title: Decorating a path's edge with a hatch pattern in TikZ

text: ## Problem I would like to indicate an infeasible region in one of my `pgfplot`s by manually drawing a path in the canvas. This should be a hatched pattern that is decorated on the path, something like `north east lines` from `\usepgflibrary{patterns}`. ## MWE               \documentclass{standalone}          \usepackage{pgfplots}         \pgfplotsset{compat=1.10}          \begin{document}          \begin{tikzpicture}         \begin{axis}[             % axis equal image,             xlabel = {$x$},             ylabel = {$y$},             grid,             xmin = 0, xmax = 3000,             ymin=400, xmax = 2200,             width=0.5\textwidth,             every node near coord/.append style={font=\tiny\scshape},             nodes near coords align={vertical},             ]             \addplot+[only marks, nodes near coords, point meta=explicit symbolic]             table[meta=label] {                 x    y    label                 2500 1500 a                 1306 1655 b                  200 1000 c                 1600 1570 d                 1500 2000 e             };             % path to be decorated             \draw (axis cs:1000, 500) -- (axis cs:2750,500) -- (axis cs:2750, 2000)             -- (axis cs: 1000, 2000) -- cycle;         \end{axis}     \end{tikzpicture}          \end{document}      ## Challenges Unfortunately I have no idea how to approach this. Can you help out? Here are some challenges:   * Maybe this can be done by decorating the path, but I don't know how this works.   * It is important that the pattern is bounded by the actual path and "bulges outwards". The pattern must not replace the path, but be "on the edge". Bonus: to indicate inverse problems, the pattern could also "bulge inwards".   * `north east lines` sometimes looks better than `north west lines`, based on the orientation. Can this choice be automated? ## Illustration By "bulging outwards", I mean the following: ![Bulging outwards](http://i.stack.imgur.com/1jQfn.png) "Inwards" would be the inverse: ![Bulging inwards](http://i.stack.imgur.com/odG0v.png) I apologize for this sacrilege of a drawing. Because it looks terrible we need Tikz!


title: tikz: Ignore one path in bounding box calculation

text: I want to ignore one specific path for the bounding box calculation in the middle of a tikz picture (I need the path only to get an intersection point and had to make it quite long, to be sure that the point exists). I came up with the following solution but I find it a bit odd-looking. Does something better exist?               \documentclass{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}     \draw(0,0)-- (2,2);          \begin{scope}     \path [use as bounding box]                   (current bounding box.south west)                  rectangle (current bounding box.north east);     \path (-1,-1)--(5,5); %ignore this     \end{scope}          \fill[red](0,1)rectangle (1,3);     \draw [black] (0,0)rectangle (2,3); %wanted bounding box      \draw [blue] (current bounding box.south west)                   rectangle (current bounding box.north east);%current bounding box     \end{tikzpicture}     \end{document}


title: Cross-referencing tables generated by xtable

text: I'd like to cross-reference a table that I generated with xtable in R. I cannot able to. Here is what I did:               \documentclass{article}     \begin{document}     Look at \ref{tab:mytable}.     <<echo=FALSE,results='asis'>>=       library(xtable, car)       print(xtable(x=mtcars[1:5,1:5]), label = "tab:mytable")     @     \end{document}      Any ideas?


title: New text header line in tabular?

text: I want to insert headers in table, but somehow I am not able to do so. The bold line in below text, I want these to just insert between rows as headers. From below code, column from 2nd to last are shifted far beyond page. I think this is due to these line are considered as row elements not just a header line. Please help.               \begin{tabular}{l*{6}{c}r}\hline     Data set & EPMM & BCC & TEST1 & TEST2 & TEST3 \\ \hline      **`IN first run of experiment with 100 ml solute \\\` **               MAE & 1.4 & 1.4 & 1.5 & 1.8 & \\     ME  & 1.4 & 1.4 & 1.5 & 1.8 & \\      **`IN second run of experiment with 200 ml solute\\\` **               MAE & 1.4 & 1.4 & 1.5 & 1.8 & \\     ME  & 1.4 & 1.4 & 1.5 & 1.8 & \\      **`In third run of experiment with 300 ml solute\\\` **               MAE & 1.4 & 1.4 & 1.5 & 1.8 & \\     ME  & 1.4 & 1.4 & 1.5 & 1.8 & \\     overall MAE & 0.80 & 3.06 & 2.65 & 3.04 & 3.13 \\     overall ME  & 0.11 & 3.03 & 2.63 & 2.00 & 3.13  \\ \hline     \end{tabular}


title: Proper Mathematical Typesetting for a point?

text: I'm working on a document in LaTeX, and I was wondering what the proper typsetting for a point is? If my understanding is correct, bold capital letters are matrices, vectors have the \vec{} symbol above them, well known sets use that fancy font thing, but what do you do when specifying a point (in multidimensional space)? Is there a special symbol for it? Is it just a bold lower case letter? I didn't see anything about points in the LaTeX math guide, does anyone know of a good resource in case I come across something like this again?


title: How to make a hyperlink cover the whole line in table of contents including the dots?

text: The `linktoc=all` option of **hyperref** package makes both the reference text and page number clickable hyperlinks. However, the dots are still not hyperlinks. This is not very important but I'm asking out of curiosity to know if it is a limitation in hyperref, noting that MS Word & OpenOffice as well as other tools allow to have the dots clickable? May be it's not recommended?


title: Legend on top of a pst-solides3d drawing

text: Another question about`pst-solides3d` and visibility: How can one draw a legend on top of the 3d drawings ? I thought that putting the `put` command before or after the 3d drawings commands would render the text in the foreground, but with both ways, the text is hidden: ![](http://i.stack.imgur.com/6P8mB.png)               \documentclass[10pt]{article}          \usepackage{graphicx}     \usepackage{pstricks}     \usepackage{pst-solides3d}               \begin{document}          \begin{figure}[h!]     \centering     \begin{pspicture}(0,-3)(7,3)          \psset{viewpoint=60 30 30 rtp2xyz,Decran=60,lightsrc=viewpoint, solidmemory}          \Large     \rput(0.5,2.7){$x^2$}     \normalsize          \psSolid[object=cylindre, h=0.4,r=2.7, fillcolor=white, ngrid=1 32, RotY=0, RotX=0] (0,0,1.1445)          \Large     \rput(0,2.7){$x^2$}     \normalsize          \end{pspicture}     \end{figure}          \end{document}      Compilation: `latex bug.tex; dvips bug.dvi; ps2pdf bug.ps`


title: Cut-off cone in TikZ

text: How would I draw the following cone using TikZ? I have no clue how to incorporate the "cut-off". I want to draw a picture of the cone given by the points (y, t) for y in R^d and t in (0, infty) such that |y - x| < t < min(1, |x|^{-1}). For several different x. Of course, to make a picture we would need d = 2. **Edit:** Following Peter Grill's idea I have the following:               \documentclass{article}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}     \begin{axis}[       axis lines=center,       axis on top,       xlabel={$x$}, ylabel={$y$}, zlabel={$t$},       domain=0:1,       y domain=0:2*pi,       xmin=-1.5, xmax=1.5,       ymin=-1.5, ymax=1.5, zmin=0.0,       samples=30]       \addplot3 [surf, color=gray, shader=flat] ({x*cos(deg(y))},{x*sin(deg(y))},{x});     \end{axis}     \end{tikzpicture}     \end{document}      This yields the following: ![Cone](http://i.stack.imgur.com/GTcUG.png) First of all, the labels are way off (and I don't see how I can move them) and I would like to have a different kind of gray for the "inside" of the cone. How do I do this?


title: How to mantain verse indendation and numbering when copy from PDF

text: I am trying to adapt this answer to produce the same result with a `verse` environment: I want to be able to copy a poem out of a PDF maintaining its indentation (numbering included) as typeset in the PDF. Although the following MWE produces the desired result with the text in the `verbatim` environment, I can't get it working also with the `verse` environment that is additionally complicated by the verse numbering (which I also what to copy out from the PDF).               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{verse}     \usepackage{color}     \input{glyphtounicode}     \pdfglyphtounicode{visiblespace}{A0}     \pdfglyphtounicode{blank}{A0}     \pdfglyphtounicode{visualspace}{A0}     \pdfglyphtounicode{uni2423}{A0}     \pdfgentounicode=1     \begin{document}\showoutput     \makeatletter     \def\@xobeysp{\textcolor{white}{\char32}}     \makeatother          % Set style for poem typesetting     \verselinenumbersleft     \setlength{\vrightskip}{-2em}     \poemlines{5}          \begin{verbatim}     S'i' fosse foco          S'i' fosse foco, arderei 'l mondo;       s'i' fosse vento, lo tempesterei;       s'i' fosse acqua, i' l'annegherei;       s'i' fosse Dio, mandereil' en profondo;          s'i' fosse Papa, allor sarei giocondo,       che` tutti cristiani 'mbrigarei;       s'i' fosse 'mperator, ben lo farei:       a tutti taglierei lo capo a tondo.          S'i' fosse morte, andarei a mi' padre;       s'i' fosse vita, non starei con lui:       similmente faria con mi' madre.          S'i' fosse Cecco, com'i' sono e fui,       torrei le donne giovani e leggiadre:       le zoppe e vecchie lasserei altrui.      \end{verbatim}          \begin{verse}     \poemtitle{S'i' fosse foco}          S'i' fosse foco, arderei 'l mondo;\\     \hspace{2em}s'i' fosse vento, lo tempesterei;\\     \hspace{2em}s'i' fosse acqua, i' l'annegherei;\\     \hspace{2em}s'i' fosse Dio, mandereil' en profondo;\\!     s'i' fosse Papa, allor sarei giocondo,\\     \hspace{2em}che` tutti cristiani 'mbrigarei;\\     \hspace{2em}s'i' fosse 'mperator, ben lo farei:\\     \hspace{2em}a tutti taglierei lo capo a tondo.\\!     S'i' fosse morte, andarei a mi' padre;\\     \hspace{2em}s'i' fosse vita, non starei con lui:\\     \hspace{2em}similmente faria con mi' madre.\\!     S'i' fosse Cecco, com'i' sono e fui,\\     \hspace{2em}torrei le donne giovani e leggiadre:\\     \hspace{2em}le zoppe e vecchie lasserei altrui.\\!     \end{verse}     \end{document}      Indeed I have no idea what the code               \input{glyphtounicode}     \pdfglyphtounicode{visiblespace}{A0}     \pdfglyphtounicode{blank}{A0}     \pdfglyphtounicode{visualspace}{A0}     \pdfglyphtounicode{uni2423}{A0}     \pdfgentounicode=1     \begin{document}\showoutput     \makeatletter     \def\@xobeysp{\textcolor{white}{\char32}}     \makeatother      produces, so I can't really tweak it for the `verse` environment.


title: LLNCS bibliography problem

text: I am using llncs format to write a paper. But I am not getting the references as mentioned in the sample pdf file. All my references as stored in one bib file. Can some one tell me what are exact commands I should use to get llncs reference style. Thank you.


title: How to get thumbnails in a list of figures?

text: To be honest, I'm not sure if I really want this because I can't imagine how exactly it would look. But maybe someone is interested in this, too, or even has already written code to achieve this: it might be practical or interesting to have small thumbnail previews of a figure in the list of figures next to the caption. This has already been briefly discussed here List of figures: source below image caption? but without any result so if anybody wants to give it a shot or has already done so: yay! :) * * * See Heiko's answer for an example image of how this might look.


title: Grouping two lines inside align environment to put smth. to the left of them

text: I have an equation which is alligned at 1st equal sign like this:               \begin{align}     a &= b + c \nonumber\\      d &= e + f \label{eq1}\\    %this is row 1     g &= h + i \nonumber\\      %this is row 2     j &= k + l \nonumber\\     m &= n + o \nonumber     \end{align}      How can i group **row 1** and **row 2** so i can put something on the left side of them? I ll be more speciffic about this. I have constructed an arrow using TiKz like this:               \begin{tikzpicture}     \path (0,0.80) coordinate(c1)     (-0.32,0.65) coordinate(c2)     (-0.32,0.25) coordinate(c3)     (0.0,0) coordinate(c4)     (-0.32,0.4) coordinate(c5);     \draw [-latex] (c1) .. controls (c2) and (c3) .. (c4);     \draw (c5) node [anchor=east] {\scriptsize \text{\eqref{eq1}}};     \end{tikzpicture}      It looks like this on the paper by itself: ![enter image description here](http://i.stack.imgur.com/CiRoM.png) Now i want to moove this element to the left of rows **row 1** and **row 2**. What i am striving to is something like this: ![enter image description here](http://i.stack.imgur.com/YZH59.png)


title: passing a theorem name using ntheorem

text: I'm looking for a way to style a theorem as shown here. ![enter image description here](http://i.stack.imgur.com/oX5O9.png) The code there works if I want the theorem number in the heading box, but I also want to be able to pass a custom theorem name to add to that heading box. The optional argument seems to be showing up as part of the #1, so how do I separate it so that I can put it elsewhere? The code I'm currently using (from the same link given above)               \usepackage{graphicx,textpos, a4wide}     \usepackage{helvet, amssymb}          \usepackage{tikz}     \usetikzlibrary{shadows}     \usetikzlibrary{shapes}     \usetikzlibrary{decorations}          \usepackage{framed}     \usepackage[framed, amsthm]{ntheorem}          \theoremclass{Theorem}     \theoremstyle{empty}     \newcommand{\thmbox}[1]{       \tikzstyle{thmbox} = [rectangle, rounded corners, draw=black, fill=gray!20, inner sep=15pt, drop shadow={fill=black, opacity=.5}]%       \tikzstyle{fancytitle} =[fill=white, text=black, rectangle, rounded corners, draw= black]%       \noindent%       \begin{tikzpicture}%         \node [thmbox] (box){%           \begin{minipage}{.91\textwidth}%             \textit{#1}%           \end{minipage}%         };%       \node[fancytitle, right=10pt] at (box.north west) {\textbf{Theorem \thetheorem}%         };%         \end{tikzpicture}}          \def\theoremframecommand{\thmbox}     \newshadedtheorem{theorem}{Theorem}      And in the body:               \begin{theorem}[abc]     Hello     \end{theorem}


title: Using pgfgantt: compilation issue

text: I'm fairly new to latex and while using pgfgantt package to create a gantt chart, I ran into a compilation issue I can't seem to figure out. There's no error message or anything, but the code won't stop building for a long time that I eventually have to stop the process. I'm using texmaker on Mac environment. I think there might be an issue with where I unzipped the .sty files? I had to create texmf folder in my ~/Library directory, and all the packages are within ~/Library/texmf/tex/latex/gantclass. I have a folder that I don't remember creating called texlive. Was I supposed to put the files in there instead? My code is as follows:               \subsection*{Timeline}         \begin{ganttchart}{1}{14}             \gantttitle{Two-Week Project Timeline} \\             \gantttitlelist{1,...,14}{1} \\             \ganttbar{Gather Tweets}{1}{2} \\             \ganttlinkedbar{Curate Comments}{3}{7} \\             \ganttmilestone{Milestone}{7}             \ganttbar{Implement Naive Bayes}{6}{11} \\             \ganttlinkedbar{Train}{9}{11} \\             \ganttmilestone{Milestone}{11} \\             \ganttbar{Evaluate}{11}{13} \\             \ganttmilestone{Milestone}{13} \\             \ganttbar{Test}{14} \\         \end{ganttchart}          Any help would be appreciated. Thank you!


title: Babel and the decimal separator

text: I'm using Babel for writing a document in spanish. However, it uses a comma instead of a period as a decimal marker (i.e. 3,14 instead of 3.14). Is there any way to reverse the behaviour? I prefer the period, as it's done in english. Also, I'd prefer it if it's something that can just be added to the preamble, instead of having to do it each time I want to write a number with a decimal part (like putting the period between brackets, for instance).


title: Align ToC pagenumber with top line

text: I need to align the pagenumber with the top line of a multi-line entry in a ToC. This figure should illustrate the issue: ![The "2" needs to be moved to the top line](http://i.stack.imgur.com/2oTma.png) Here is the relevant code from the style file:               \titlecontents{figure}[0pt]     {\normalfont\mdseries\singlespacing\hangindent=2em}         {\figuretitlename ~ \thecontentslabel : \hspace{.25em}}     {}     {\titlerule*[1pc]{}\contentspage}      If it helps, here are additional links:   * The style file (linked to the line above): https://github.com/cci-grads/uncc-thesis-latex/blob/master/packages/unccspecs.sty#L575   * The entire repo: https://github.com/cci-grads/uncc-thesis-latex


title: Math mode space after id

text: I need to write _idb_ in math mode. But a space appears after _id_ and I get _id b_. How can I remove this space? Code example:               $idb$


title: What library do I have to use such that the document can render \lt and \gt as less than and greater than signs, respectively?

text: \documentclass{article}     %\usepackage{amsmath} It does Not work !     \begin{document}     \[     x\lt y \gt z     \]     \end{document}      What library do I have to use such that the document can render `\lt` and `\gt` as `less than` and `greater than` signs, respectively? ## Edit I am using MathJax library in my site under Asp.net Mvc 3. Web application is vulnerable to XSS and XSRF attacks so `<` and `>` should be avoided as the input from the users. My database will save LaTeX commands that can be rendered by both LaTeX compiler and MathJax. Therefore, I need `\gt` and `\lt` that already work in MathJax. **Source:** ![enter image description here](http://i.stack.imgur.com/PTnzn.png) **Rendered:** ![enter image description here](http://i.stack.imgur.com/AdnCQ.png)


title: microtype settings for dummies

text: More than a year ago, a friend of mine was totally excited about microtype features in LaTeX. He was talking about it quite a bit and then said to me: "Show me your document, let me input some lines of code and it's gonna be awesome!" What he added was this:               \usepackage[    protrusion=true,                 expansion=true,                 final,                 babel                     ]{microtype}     \usepackage{fontspec}     \pdfprotrudechars=2     \pdfadjustspacing=2     \newfontfeature{Microtype}{protrusion=default;expansion=default;}     \directlua{fonts.protrusions.setups.default.factor=.5}     \setmainfont[   Microtype,                 Numbers={OldStyle, Proportional},                 Ligatures=TeX                     ]{Brill}      The only thing I changed about this was the font. I use the Brill Font, but only because it contains many special characters I need for work. About the rest, I don't have a clue what all this means. Okay, I looked into the documentations (months ago) and searched tex.sx (just now), and I learned what protrusion is and what expansion is, and what they do, but I don't really see a difference, for -- to me -- simply (almost) every TeX result looks super, and I certainly see no difference between Garamond, Minion, Caslon, et al., nor could I tell which I'd prefer. I am not a man of the "finer" arts, so deciding about microtype settings and features is but a little too "designical" to me. By the way: I am using LuaLaTeX. So maybe, someone could just tell me if these settings may be alright the way they are. If you want an example of the Brill Font to know how it looks like, in order to answer my question, see this document.


title: chapter heading section heading

text: > **Possible Duplicate:**   >  Formatting each part/section/subsection I want to change the format of the chapter, section, subsection headings.                   chapter heading - all capital, 14 font size, bold         section heading - Title case - 12 font size, bold         sub-section heading - sentence case, 12 font size, bold      how can I do it?


title: How do I create custom "list of..."s on a section level?

text: I have a long document with frequent uses on an environment that needs to be indexed on a per-section basis. I know that the `tocloft` package allows creation of custom "list of..."s I also know that the `minitoc` package allows per-part, per-chapter, or per-section tables of contents. But I need a custom "list of" that occurs on a per-section basis, that is, both functionalities. I think I have an idea how to implement this: Each instance of the environment writes something to an aux file that is unique to the section, and at the beginning of that section the custom aux file is read, writing that list. But before I start hacking I'm wondering if this wheel has been invented before and I don't know of it.


title: How to convert .bib generated by Mendeley for use with amsrefs

text: I'm using TeX live 2010. I have a .bib file generated from Mendeley, and I want to use that with amsrefs, but it's confusing and the amsrefs documentation is somewhat hard to follow: how do I massage the .bib file into something that amsrefs can stomach. (I'm using amsart as the document class).


title: \parbox "textwidth" for the combined width of a subset of table cells

text: I would like the parbox width of the text in a multicolumn to be calculated automatically from the combined width of the cells that the multicolumn spans. (Their width will vary in different copies of the table.) Is there a way of doing this? **The details are as follows** : One row of my five-column table contains a multicolumn, spanning four of the columns. I want the text in that multicolumn to wrap correctly, but I don't want to specify an actual numerical width. Instead, I want the width to be determined by the actual combined width of columns 2-5 in the previous row. I've written the basic code for the table (simplified for this illustration) this way, using a tentative numerical width of "2in":               \begin{tabular}{c|c|c|c|c|} \cline{2-5}     {\bf A} & first & second & third & fourth, of variable length \\ \cline{2-5}     & \multicolumn{4}{|c|}{\parbox{2in}{fifth, also of highly variable length but        long enough to need to wrap.}} \\ \cline{2-5}     \end{tabular}      I have used a parbox because the contents of the multicolumn contains images and text that I want to be able to treat as a unit, but I've left those details out here in order to keep the picture simple. The result looks as I want it to, except that the content of the multicolumn has too much space to the left and right, because I used an ill-chosen manual setting for the width. **The point** : How can I avoid setting the parbox width manually and instead have it calculated based on the width of the other columns? [This question was earlier posted on stackoverflow but I was urged to ask it again on this site. Thanks for your patience.] * * * ( **EDIT** ) Martin Scharrer's code, below produces an interesting problem for me: \colwidth seems to become only as big as the first measured column. I find that this only happens when I use certain packages that I need for Chinese in XeLaTeX:               \usepackage{xeCJK}     \usepackage{fontspec,xltxtra,xunicode}      The output becomes: ![columns not working](http://i.stack.imgur.com/sp0z5.png)


title: How to spread words in several lines uniformly?

text: In TeX, I can use               \hbox to 1in{foo bar baz}      to get   ![enter image description here](http://i.stack.imgur.com/LROY2.png) Is it possible generalize the use, to get this result: ![enter image description here](http://i.stack.imgur.com/9aRZo.png) by typing a paragraph `foo bar baz test text only`? I tried `\break` to break lines at the end of the paragraph, or to set `\parfillskip=0pt`, but the results are wrong: ![enter image description here](http://i.stack.imgur.com/xwZQ9.png) What parameters should be set to tell TeX's line-breaking algorithm to get this 'ugly' result?


title: Run macro before each slide in beamer

text: Following on from this question, is there an easy way to call a macro before each _slide_? So that question answers how to get at each frame, but I want finer control... I want a macro that sets a counter to the current fraction of slides we've go through so far. I can't get at it through etoolbox's patching controls, because the slides are controlled more internally than that...


title: hanging indents

text: Note: Subsequent to the original post, it was pointed out to me that my problem had nothing to do with the textpos package. I've edited the title, but left the original post as is for posterity (or so that I can feel silly every time I look at it). I'd like to be able to use the textpos package to place text at arbitrary positions on the page. At one point, however, I'd like to have multiple lines in one box with all lines after the first being indented. I tried using \addtolength{\leftskip}{18pt}, but it indented all lines including the first. After thinking about this a little, I concluded that it's probably not a bug, it just is the way it is. Anyway, does anyone have a solution to this problem? (Obviously, I could break things up into many little vertical modules, but that seems like a huge amount of trouble). Here is a small example. In the first textbox, I used the \addtolength construct; the second textbox is without it so you can see the difference. Thanks.               \documentclass{article}     \usepackage[absolute,showboxes]{textpos}     \pagestyle{empty}          \TPGrid[1in,1in]{2}{20}     \TPMargin{4pt}     \setlength{\parindent}{0pt}          \begin{document}       \begin{textblock}{1}(0,2)        {\scshape\large Name}         \newline         {\addtolength{\leftskip}{12pt}           Address 1\\           Address 2           \par         }       \end{textblock}       \begin{textblock}{1}(0,4)         {\scshape\large Name}           \newline           Address 1\\           Address 2       \end{textblock}     \end{document}


title: Can you format these equations for me?

text: Can help me formatting these (example and non-sense) equations?               \begin{eqnarray*}      z + t = b \quad \forall x \in X \\      h + g(a,b,c) + r\cdot a = f(b,c,d) \quad \forall y \in Y \\      a = b \quad \forall z \in Z \\      u \cdot v = h + q \forall n \in \mathbb N     \end{eqnarray*}      I would like to have the equality signs one below the other, the left side of the equalities aligned right towards the signs, the right term aligned left to the equality signs, and the forall-signs one below the other. I did not manage to format this in the appropiate way. Any explanation why your solution works is appreciated as well.


title: Specifying margin width manually

text: I'm trying to write my CV in LaTeX. I'm using a template which I got on-line. But the margins are huge. I need the top and bottom margin to be only 1 inch. The LaTeX code is:               \documentclass[a4paper, 10pt]{scrartcl}        \usepackage{soul}     \usepackage{scrpage2}      \usepackage{titlesec}      \usepackage{marvosym}     \usepackage{tabularx,colortbl}     \usepackage{xcolor}     %\usepackage{varwidth}       \titleformat{\section}{\large\scshape\raggedright}{}{0em}{}[\titlerule]     \pagestyle{scrheadings}       \renewcommand{\headfont}{\normalfont\rmfamily\scshape}     % add the symbols for email and phone contact data     \cofoot{\so{Liefdestraat, 7 - 1234LI, Amsterdam, Nederland}\\      \so{ {\Large\Letter} jeff@gmail.com\ {\Large\Telefon} +31 (0)6 12345678}}     \begin{document}     ...


title: Fancy remark environment

text: I have this:               \usepackage{picins}     \shadowthickness{2pt}     \newcommand{\sidenote}[1]{         \begin{center}         \hpic(0.95\textwidth,0pt)[rs]{             \parbox[b]{0.9\textwidth}{\small                  \bigskip{#1}\bigskip             }         }         \end{center}     }      Which generates a nice (shadowed) box with padding. The problem is that `\sidenote` cannot accept formatted text (i.e. paragraphs). Is it possible to define a "FancyRemark" _environment_ which has the same visual style but does allow for paragraphs and display style math?


title: Create function for setting variable

text: I have been using LaTeX for some years now, but I've only recently noticed its scripting features. Although, I find it hard to grasp many of the concepts. For example, I want to have a command `\docTitle{My Paper Title}` which I can call and then this will produce some variable that I can use in my `.sty` template file. So in my `.tex` file, I will call `\docTitle{My Paper Title}` and then the `.sty` file should somehow call `\title{\docTitle}`. How to do this?


title: How can I stop the "setspace" package from processing a "doublespacing" documentclass option?

text: LaTeX does not behave as I expected with the following files. First file:               \documentclass[doublespacing]{article}     \usepackage{lipsum} % for dummy text only     \begin{document}     \lipsum     \end{document}      Second file:               \documentclass[doublespacing]{article}     \usepackage{setspace}     \usepackage{lipsum} % for dummy text only     \begin{document}     \lipsum     \end{document}      For the first file, LaTeX gives this warning as expected:               LaTeX Warning: Unused global option(s):         [doublespacing].      However, the second file compiles without any warnings and uses double-spacing to typeset the text. Why does the second file work? It seems like the option given to the `article` documentclass should be parsed and give a warning before the `\usepackage{setspace}` is encountered. And a little bit of context: I'm trying to extend a document class to include a `doublespacing` (by using `\DeclareOption{doublespacing}`, etc.), but I can't configure the behavior properly because the `setspace` package picks it up as if I had done `\usepackage{doublespacing}`. Is there a way to keep `setspace` from seeing the `doublespacing` documentclass option?


Sorry to come back again with a similar post title ( _I had a post with this same title, then renamed it toPDF Metadata - Macro to extract (typeset) 'plain text' from a command?_) - but I hope now the question can be narrowed down a bit... Let's say you have something like               \def\mystring{Test of math $a^{b}$, \textbf{bold} and some  {\color{lightgray}coloring}}      I would like to use/know of a macro, which could accept `\mystring`, and return a "plain" text version of it. I would be quite satisfied with the math being dropped - however, I'd like the letters pulled out, where I'd otherwise have text typeset. Let's say we call such a macro `\getPlainText` - then I'd be very satisfied with something that would behave like this:               * \typeout{ \getPlainText{\mystring} }     Test of math  , bold and some coloring      Basically, I think I could use this in a couple of ways (but mostly in response to `hyperref` stuff): ### Within PDF metadata In hyperref - PDF Metadata - Macro to extract (typeset) 'plain text' from a command?, the answer to correct display of "latexed" PDF metadata is to use `\texorpdfstring` as such:               \newcommand{\myauthors}{Author 1 \\ Author 2 \\ \texorpdfstring{\color{lightgray}Author 3}{Author 3}}     ...     \hypersetup{..., pdfauthor=\myauthors, ...}       Here, I'd much rather prefer a syntax with "getPlainText" as so:               \newcommand{\myauthors}{Author 1 \\ Author 2 \\ {\color{lightgray}Author 3}}     ...     \hypersetup{..., pdfauthor=\texorpdfstring{\myauthors}{\getPlainText{\myauthors}}, ...}       ### Within PDF TOC bookmarks related to sections titles with math In mathmode - Equations in section heading/title, the answer to avoiding problems with math in sections (which `hyperref` chokes on) is again to use `\texorpdfstring` - as such:               \section{The values of \texorpdfstring{$\beta$}{TEXT} %      for which values are defined}      Here I'd much rather use something like this in the preamble:               \makeatletter     \let\oldsection\section     \renewcommand{\section}{\@ifstar                          \mysectionStar%                          \mysectionNoStar%     }     \newcommand{\mysectionStar}[1]{  % no two arguments here?     \typeout{AAAA}% debug     \oldsection{#1}}     \newcommand{\mysectionNoStar}[1]{ %     \typeout{BBBB}% debug     \oldsection[\getPlainText{#1}]{#1} }     \makeatother      ... and avoid having to manually add `\texorpdfstring`s to all the sections.. So, is there anything like this out there?


title: Harsh corner on a shape drawn with rounded corners

text: I'm trying to create a custom shape surrounding some nodes. I have used a `\path` to draw the shape but I don't get a `rounded corner` where I begin drawing the shape. Here's my MWE:               \begin{tikzpicture}          \path [rounded corners=10pt, draw] (0,0) --            ++(50em, 0) --           ++(0em,-20.5em) -- ++(-24em, 0em) --            ++(0, 11.25em) -- ++(-26em, 0) --           (0,0)           {};           \end{tikzpicture}      The output looks like this: ![enter image description here](http://i.stack.imgur.com/CDvLS.png) How do I get rid of the harsh corner at top-left?


title: How can I get a dot over a vector?

text: I would like to combine, somehow, `\vec{x}` and `\dot{x}` so that I get an x with a vector arrow over it and a dot over that. Any suggestions?


title: Arrow with plus/minus sign on top

text: Below you can see an arrow with a plus and a minus sign on top of it. How is this achievable in latex? Further possibilities: arrow with only plus and arrow with only minus sign on top. How can I do this? ![enter image description here](http://i.stack.imgur.com/AH83O.png)


title: How to include icons in table?

text: ## Question I want a table with little icons on the left and corresponding descriptive text on the right. However, LaTeX seems to make this as painful as getting your teeth pulled out, and my current attempt is shown below. How to fix...   1. No space between table and paragraph above and below it   2. Icons vertically misaligned, hence clashing with paragraph above.   3. Icons column far wider than needed ## Output ![enter image description here](http://i.stack.imgur.com/nyA4g.jpg)               Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse feugiat, neque ut scelerisque tincidunt, leo est lobortis tortor, sit amet fringilla nisl augue at nisi. Pellentesque dapibus, turpis in eleifend pharetra, quam tortor dignissim lectus, sed bibendum sapien purus ac mauris. Maecenas mi nibh, porta non dignissim nec, tincidunt non arcu. Ut dapibus sagittis est non tempor. Aliquam erat volutpat. Donec sed arcu purus, vitae malesuada erat. Nunc eget diam nisi, at pretium leo. Sed at semper magna. Nam sit amet est nisi, in aliquet eros.           \begin{tabular}{m{.1\textwidth}@{\extracolsep{5mm}} p{.75\textwidth} }         \includegraphics[scale=0.05]{Figures/eps.png} & Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse feugiat, neque ut scelerisque tincidunt, leo est lobortis  \\         \includegraphics[scale=0.05]{Figures/eps.png} & Pellentesque dapibus, turpis in eleifend pharetra, quam tortor dignissim lectus, sed bibendum sapien purus ac mauris  \\         \includegraphics[scale=0.05]{Figures/eps.png} & Ut dapibus sagittis est non tempor. Aliquam erat volutpat. Donec sed arcu purus, vitae malesuada erat. Nunc eget diam nisi, at pretium leo. \\     \end{tabular}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse feugiat, neque ut scelerisque tincidunt, leo est lobortis tortor, sit amet fringilla nisl augue at nisi. Pellentesque dapibus, turpis in eleifend pharetra, quam tortor dignissim lectus, sed bibendum sapien purus ac mauris. Maecenas mi nibh, porta non dignissim nec, tincidunt non arcu. Ut dapibus sagittis est non tempor. Aliquam erat volutpat. Donec sed arcu purus, vitae malesuada erat. Nunc eget diam nisi, at pretium leo. Sed at semper magna. Nam sit amet est nisi, in aliquet eros.


title: Locking Fields in Digital Signature

text: I am using `eforms` to create pdf where digital signature can be applied. Each document may have more than one digital signature field, ie so the document can be passed from person to person. There is an added complexity here in the sense that depending on the parameters parsed to the custom command, `\mySigField{...}`, the username and title fields are either editable or not. In other words, the 4th and 5th argument represents the name and position respectively. If those input arguments are empty, an editable field is created, if they contain something, that something is printed and no editable field is created. My Question is, in the event that there is at least one editable related field, how can I lock that field or fields once the particular user has signed. The following sample output: ![Output](http://i.stack.imgur.com/qT8K2.png) is produced with the following code:               \documentclass{article}          \usepackage{varwidth}     \usepackage{hyperref}     \usepackage[pdftex]{eforms}     \usepackage{xcolor}     \usepackage{xifthen}          \def\colFeat{blue!50!black} %Feature Color 1 for Main Color Theme.          \makeatletter         \def\eq@SigField{\centerWidget\eq@rectH             \if\autoCenter n\eqcenterWidget=0pt\fi             \leavevmode\hbox{\pdfstartlink user{\common@SigFieldCode}%             \lower\eqcenterWidget\Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%             \endgroup         }     \makeatother          \newcommand{\mySigField}[5]{         \begin{varwidth}{#2}             \textcolor{\colFeat}{                 \fcolorbox{black!5!white}{black!5!white}{\sigField{#1}{#2}{#3}}\\[1mm]                 \rule{#2+3mm}{2pt}\\[2mm]                 \begin{tabular}{rl}                     \raggedleft Name: & \ifthenelse{\equal{#4}{}}{\TextField[name=name#1,width=6cm]{}}{#4}\\\\[-3mm]                     \raggedleft Position: & \ifthenelse{\equal{#5}{}}{\TextField[name=pos#1,width=6cm]{}} {#5}                 \end{tabular}             }         \end{varwidth}     }          \begin{document}     \def\WS{8cm}     \def\HS{2.5cm}     \section{Example of No Related Fields}     \mySigField{PERSONA}{\WS}{\HS}{John Smith}{Garbo}     \section{Example of One Related Field}     \mySigField{PERSONB}{\WS}{\HS}{Jane Doe}{}     \section{Example of Two Related Fields}     \mySigField{PERSONC}{\WS}{\HS}{}{}     \end{document}


title: Can the listings package be set up to highlight Prolog code like minted does?

text: I am interested to know how `listings` can be customized to mimic the _Pygments's Prolog lexer_ (i.e. make Prolog code represented by `listings` look the same as it is done with `minted`) I previously asked this question: How to make a minted code listing centered on a page? Jubobs commented on that question and encouraged me to post this question. My previous question was answered by egreg, who provided the following example, and this is exactly how I want my code listing to look like in my report: ![mintedListing](http://i.stack.imgur.com/Usnh1.png) However, I need a lot of extra packages for this solution. So I am wondering if the same (or very similar) result can be achieved by customizing `listings`. Jubobs already provided the following `lstdefinestyle` example:               \lstdefinestyle{myPrologstyle}     {         language=Prolog,         basicstyle = \ttfamily\color{blue},         moredelim = [s][\color{black}]{(}{)},         literate =             {:-}{{\textcolor{black}{:-}}}2             {,}{{\textcolor{black}{,}}}1             {.}{{\textcolor{black}{.}}}1     }      This however is not sufficient enough for me. For example, the variables are not highlighted in the dark blue color as it is done in `minted`. Here is another (more complete) example of how Prolog code is highlighted with `minted`:               \begin{minted}{prolog}     somePredicate(A, B) :-         arbitraryPredicate(A, _, 1, 2),         predicateWithAtom(someAtom),         anotherPredicate(B, someAtom, myPredicate(A, _)),         findall(X, ('testString'(X), myPredicate(A, X)), L1),         member(A, L1),         !.     \end{minted}      The snippet above produces the following output: ![MoreCompleteExample](http://i.stack.imgur.com/kKS3d.jpg) As can be seen from this example, atoms are highlighted red, anonymous variables (underscores) are highlighted green, and numbers are grey (or is it cyan?). Does anyone know how I can customize `listings` the way I want? Keep in mind that I want my listing to be _centered_ on the page. (See my other question if you want to know how I make my listing centered.)


title: Text spirals with TikZ

text: I just ran across this, and I'm curious about whether it can be replicated in TeX... ![enter image description here](http://i.stack.imgur.com/k6voX.jpg) Ideally one would have the spiral getting tighter and tighter as one got to the centre, as in ![enter image description here](http://i.stack.imgur.com/gghZz.png) I know TikZ has the ability to fit text along a path, but I'm not sure how one might make text get smaller and smaller. The closest I can find is create elegant display of digits and symbols, but that uses manually inserted font commands. Edit: I got what I wanted using mwibrow's answer: ![mwibrow](http://i.stack.imgur.com/cnqWG.png)


title: Option clash when using graphicx and tikz packages

text: The following code fails `Option clash for package graphicx`, it seems to be an incompatibility between the package `graphicx` (when the option `pdftex` is used) and the package `tikz`.               \documentclass[a4paper,10pt]{book}     \usepackage[T1]{fontenc}     \usepackage[utf8x]{inputenc}     \usepackage{tikz}     \usepackage[pdftex]{graphicx}          \begin{document}              The lazy dog...          \end{document}      I am currently working with Debian wheezy (updated as of 10th November 2012), and the latest TeXLive LaTeX distribution included. Any ideas?


title: How can I produce this tree diagram in LaTeX?

text: I want to create the tree diagram shown below in TeX code (with the _Level 1... level 3_ by the side of the tree diagram). Also, I would like to know how to just put bullet points under a box. For example, _Level 3_ instead of _Max Size_ , _Casting Complexity_ , etc... I want it listed as bullet points from _Product Development capability_. Any help would be greatly appeciated. ![enter image description here](http://i.stack.imgur.com/HpgIh.jpg)


title: feedback on my table

text: I have created a table, inspired by this guide: http://www.tug.org/pracjourn/2007-1/mori/mori.pdf Here is my result               \begin{table}[tp]%     \centering%     \begin{tabular}{cccccc}     \toprule%     &Table &Light [L]  &$\zeta_0/2\pi$ [MHz]  &Flux [1/s]  &Dimensions [m] \\\toprule     &10    &3          &28.73                 &asd         &$(20\times 10)$ \\     &1     &3          &28.73                 &asd         &$(20\times 10)$ \\     &0     &3          &28.73                 &asd         &$(20\times 10)$ \\\bottomrule     \end{tabular}     \caption{Maximum load and nominal tension.}     \label{aggiungi}     \end{table}      I would like to hear what other people think of it. Personally I would like the distance beween the headlines and the lower toprule to be a little larger, but I'm not quite sure how to do that properly. Any feedback and suggestions are greatly appreciated.


title: How to insert N images using TikZ's \foreach?

text: I'd like to avoid having to copy & paste the same code 50 times in my input file, so I'm trying to use the automation offered by TikZ's `\foreach`. I do not know why this code generates 101 errors. The first one is that an extra `}` was used.               \begin{tikzpicture}     \matrix[row sep=1mm,column sep=5mm] {     \foreach \y in {1,...,50} {     \node (left) {\includegraphics[width=0.49\textwidth {images/S001_GUT1_COR_T2/Original/15}}; &     \node [right=of left] {\includegraphics[width=0.49\textwidth {images/S001_GUT1_COR_T2/Segmented/15}}; \\      };     };     \end{tikzpicture}      Can you help me? * * * I have found and alternative to my question. But know I have another problem: how can I split the contents of one tikzpicture in more than one page?               \begin{tikzpicture}[font=\small\sffamily]     \node (row1) {\includegraphics[width=0.49\textwidth]{images/Original/1}};     \node[left=0mm of row1]  {\includegraphics[width=0.49\textwidth]{images/Segmented/1}};     \foreach \i [remember=\i as \lastx (initially 1)] in {2,...,10} {     \node[below=0mm of row\lastx] (row\i) {\includegraphics[width=0.49\textwidth]{images/Original/\i}};     \node[left= 0mm of row\i]  {\includegraphics[width=0.49\textwidth]{images/Segmented/\i}};     };


title: How to make a symbol adjust its size globally and locally

text: In the following code I have created a bullseye symbol. What I want to do is to allow its size to change dynamically both globally (document class option say 10pt, 11pt or 12pt) or locally by using `\small`, `\large`, and any command that declares size. That is if in the options of the document class you have `10pt` as an option then the symbol will have a size of `10pt` if used in the document unless enclosed in `{\small}` or the sort in which case its size will adjust dynamically to the document settings.               \documentclass[10pt]{article}     \usepackage{tikz}     \usepackage{amsmath}     \usepackage{graphicx}          \newcommand{\bullseye}{%     \tikz{%     \filldraw (0,0) circle (0.6em);     \filldraw[white] (0,0) circle (0.4em);     \filldraw (0,0) circle (0.2em);     }     }     \begin{document}     {\small\bullseye  sample text} sample text % as you can see no change.     \end{document}


title: divides, not divides and cardinalities

text: In group theory it happens _very_ often that you want to say: "The order of $H$ divides / does not divide the order of $G$." But the length of `|` is then always the same: `$ |H| | |G| $` produces |H|||G| which is not ideal at all. (The negation `\nmid` has just this length too.) The length of "divides" should be longer than the "cardinality length". I could use `$ |H| \big| |G|$` but then there is no good way to say "does not divide" with the same length. Also, `\big|` is no solution when the expression has to be used in subscripts. I thought it was just me, but I asked other group theorists, and _nobody_ had a solution. I hope there is one. I am seeking a division sign which is a little longer than the usual `|` , allows negation (with the same length) and proportionally correct use in subscripts (also under `\sum` etc.). It does not look professional if the "order sign" has the same length as the "divides" sign. (And what about combinations with absolute values, norms - although personally I don't use them as often as group orders.)


title: Positioning inset image using overlap

text: I recently read the post about insets (Image inside another image) and am trying to implement the method that uses overlaps. I can get the inset to appear, but I can't figure out how to position it. My LaTeX looks like this:               \begin{figure}[h]     \centering     \includegraphics[scale=0.9]{figure2_2.eps}\llap{\includegraphics[height=2cm]{inset_f2_cropped.pdf}}     \caption{words}     \label{f2}     \end{figure}      The inset shows up in the lower left, mostly outside of the actual figure; I am a relatively new user, so if this is just the result of misinterpreting the original answer, I'm sorry!


title: biblatex - how to add backref list with APA style?

text: Regarding the `backref` option, the biblatex manual says: > Strictly speaking, this option only controls whether the biblatex package > collects the data required to print such references. This feature still has > to be supported by the selected bibliography style. All standard styles > which ship with this package do so. How to implement/invoke the feature in a "nonstandard" package? **MNWE**               \documentclass{article}     \usepackage[english, american]{babel}     \usepackage{filecontents}          \usepackage[style=apa,                 backref=true %% or so I thought??                ]               {biblatex}     \DeclareLanguageMapping{american}{american-apa}     \usepackage{hyperref}          \begin{filecontents}{references.bib}     @book{sloterdijk2013change,       title={You Must Change Your Life},       author={Sloterdijk, P.},       publisher={Polity Press},       year={2013}     }     \end{filecontents}          \bibliography{references.bib}          \begin{document}     \noindent Cf. Sloterdijk \citeyear[(pp. 84--85)]{sloterdijk2013change}.           \printbibliography     \end{document}      ![I don't see a backref](http://i.stack.imgur.com/vYtLj.png)


title: Using counter for \onslide in tikzpicture

text: I am trying to use a counter in the `tikzpicture` environment. The counter needs to keep track of the slide from when the picture needs to be shown; that way, it is easy to add or delete a line.                   \documentclass{beamer}              \usepackage{tikz}              \begin{document}              \newcounter{test}         \addtocounter{test}{1}         \begin{frame}         \begin{tikzpicture}         \onslide<\arabic{test}->{\draw (0,0)--(1,1);}         \addtocountour{test}{1};         \onslide<\arabic{test}->{\draw (1,1)--(2,0);}         \addtocounter{test}{1};         \onslide<\arabic{test}->{\draw (2,0)--(3,1);}         \end{tikzpicture}         \end{frame}              \end{document}


title: Macro for moving hat symbol up

text: I use mathpazo font package and I think the hat symbol is too low. Can I make a macro to change behavior of all my hats? This question has a good example, but I don't want to have to retype all of my hats: Can I move the hat symbol vertically upwards?


title: glossaries: .glo or .acn file for acronym? Was this changed recently?

text: Please show me what I'm doing wrong if I'm making a mistake here, I think the package 'glossaries' was changed and it caused me problems. I've been working on a Master Thesis for a while now, the list of acronyms used the glossaries package with acronym option. All acronym definition were made with \newacronym{}{}{}. Running pdflatex on the report.tex file resulted in a report.glo file which could be used with makeglossaries to make the glossary entry. I can track the versions since all were saved in dropbox and a week ago (17/6/14), the .glo files started coming up empty and .acn files appeared. I had to spend the better part of this afternoon to find out about these .acn files. Was this changed recently? I checked that the .glo files contained only acronym information before they became empty and the contents are identical to the current .acn files. Posting to save others the search. Code to reproduce, now gives .acn with one entry and empty .glo, previously produced .glo with same entries.               \documentclass{paper}          \usepackage[acronym]{glossaries}     \makeglossaries          \begin{document}          \newacronym{tu}{TU}{Technical University}          \section{glossary}     %\printacronyms     \section{text}     \gls{tu} Master thesis.     \end{document}


title: Prevent LaTeX to break an inline math equation

text: I hope this question was not asked before. At least I haven't found it. I have an inline math equation and LaTeX is breaking it into two parts. In this case I'd prefer to have the whole and short equation in one line. Is there any way I can do that? I already tried to put it into a `\mbox` but that destroyed the whole layout. Here is an example:               \documentclass{minimal}     \usepackage{siunitx}     \begin{document}     A text with an inline equation which is broken in to two parts     but is not wanted right here $v_{initial} = \SI{1000}{m/s}$.     \end{document}      Here the result would be:               A text with an inline equation which is broken in to two parts but is not wanted right here v_{initial} =     1000m/s.


title: autonum, subcaption and equations in floats

text: When compiling the document below (MiKTeX lualatex or pdflatex) latex seems to be stuck in an infinite loop. Removing either subcaption or autonum resolves the problem, but of course I'd like to use them both.               \documentclass{article}     \usepackage{subcaption}     \usepackage{autonum}     \begin{document}          \begin{figure}     \begin{equation}     1 = 1     \end{equation}     \end{figure}          \begin{figure}     \caption{X}\label{fig}     \end{figure}          \end{document}      I can interrupt latex and get this message:               [...]     ABD: EveryShipout initializing macros     ! Interruption.     \new@ifnextchar ...rved@d = #1\def \reserved@a {#2                                                       }\def \reserved@b {#3}\fut...     l.17 \caption{X}\label{fig}          ? x      3143 words of node memory still in use:         nodes        avail lists: 1:3,2:19,4:5,6:10,7:2,8:2,9:1,10:2     No pages of output.     Transcript written on minimal.log.      It looks like one of the packages has a problem with equations in floats. I do this to let an long equation span the whole page in a two-column layout. I assume autonum looks back to see whether the `\label` references an equation, but I don't know why this conflicts with subcaption. Thanks for your help.


title: Automatic line breaking and \hfill

text: I work on a CV and I would like to write some content (e.g. conference information) on the left side of the page and a date on the right side of the page. Because the content on the left side might be too long for one line: Is there a way to implement automatic line breaking while keeping the date after \hfill in the first line irrespective of how long the content on the left side is? My example is:               \documentclass[11pt]{article}      \usepackage[latin1]{inputenc}     \usepackage[left=1in,top=1in,right=1in,bottom=1in]{geometry}     \setlength{\parindent}{0in}          \begin{document}          {\Large \bf Conferences}          \centerline{Line 1, Line 1, Line 1, Line 1, Line 1, Line 1, Line 1, Line 1, Line 1, \hfill \textbf{Date}}     \centerline{Line 2. \hfill}          \end{document}      Is it possible to avoid using a second `\centerline{}`? I prefer not using tables or CV templates. I use MiKTeX 2.9.


title: How to print '~' character using latex

text: > **Possible Duplicate:**   >  URL with tilde character? I tried `\~`, which doesn't work; the ~ will appear on top of the following letter. `~` will print nothing but an empty spot. What I want is to print a website link like www.website.com/~aname in my document using LaTeX. How can I do it? Google didn't give me an answer.


title: How to generate this symbol~ in pdf using latex

text: > **Possible Duplicate:**   >  URL with tilde character? How to generate this line in pdf using latex. > http://www.google.com/~find/ How can I create **~find** in latex. I tried `\~\ find` which creates only > ~ find How can I do that....


title: Is pdflatex a symbol link to pdftex in cygwin system

text: I have three questions on TeXlive 2013 in cygwin.   1. Is pdflatex a symbol link to pdftex? I was surprised to see this in C:/cygwin/bin. As we all know, pdflatex and pdftex are very different commands. I don't know why. Does anyone know how it works?   2. I want to config Texstudio to use tex commands from cygwin. But system file "pdflatex" cannot be executed, and "pdftex.exe" do not recognize the grammar of latex. How can I config pdflatex command in Texstudio?   3. Chinese article compiles clean with Chinese fonts simhei.ttf, simsun.ttc under the directory of the article. I have tried to install fonts, but it seems I have failed. Could anyone help out? I have followed the instructions in How to install correctly simhei.ttf and simsun.ttc for pdflatex on TEX Live 2013 Thank you very much!


title: How to change hyphenation but not quotation marks in bibliography with biblatex?

text: I'm using `biblatex` with `biber` and an `authoryear` style for my bibliography. My main language is french, but I have different languages in my bibliography (so I load `\usepackage[english, french]{babel}`. I would like biblatex to print bibliography items hyphenated according to their hyphenation field (e.g. no space before double punctuation and question marks), but always with french-style quotation marks. When I use `\usepackage[babel=hyphen]{biblatex}`, biblatex uses the hyphenation language (e.g.: english) quotation marks, but doesn't seem to use other rules (such as no space before double punctuation and quotation marks). That's exactly the opposite of what I'm looking for. When I use `\usepackage[babel=other]{biblatex}`, `biblatex` does use the right hyphenation rules, but still uses the foreign language quotation marks, and also uses the foreign language version of some strings (e.g. 'in' or 'cit. on'). I've looked around quite a lot but couldn't find a solution to this problem. Any idea? EDIT: here is a MWE:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[english, french]{babel}     \usepackage[autostyle=true]{csquotes}     \usepackage[citestyle=authoryear-comp, bibstyle=authoryear, natbib=true, babel=hyphen]{biblatex}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @ARTICLE{agnew_iv._1987,       author = {Agnew, John},       title = {{IV.} Place anyone? A comment on the {McAllister} and Johnston papers},       journal = {Political Geography Quarterly},       year = {1987},       volume = {6},       pages = {39--40},       number = {1},       month = jan,       doi = {10.1016/0260-9827(87)90030-9},       hyphenation = {english},       issn = {0260-9827},       shorttitle = {{IV.} Place anyone?},       url = {http://www.sciencedirect.com/science/article/pii/0260982787900309},       urldate = {2012-08-02}     }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}           Some text.           Some text, with a citation \citep{agnew_iv._1987}.           And now a bibliography.           \printbibliography     \end{document}      The output here is: ![input](http://i.stack.imgur.com/KWA13.png) I would like the same but with French "guillemets" (quotation marks).


title: Prevent wrapping of subtable captions in lyx

text: ![alt text](http://i.stack.imgur.com/6vOdx.png) Could someone provide me with an elegant solution to prevent wrapping of a table caption in lyx? It must wrap at the end of the line, not at the end of the table.               %% LyX 1.6.7 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}          \makeatother          \usepackage{babel}          \begin{document}     %     \begin{table}     \caption{Valleys in promoters of genes correlated with overexpression by breast     cancer subtype}               \label{tab:vlyTallyUniqVlyMtchCntrlOvrExp}          \subtable[Number of valleys in the promoter region marking overexpresses     genes in breast cancer by subtype]{          \label{tab:vlyTallyUniqCombinedVlyMtchCntrlOvrExp}          \begin{tabular}{|c|c|c|c|}     \cline{3-4}      \multicolumn{1}{c}{} &   & \multicolumn{2}{c|}{Over-expression}\tabularnewline     \cline{3-4}      \multicolumn{1}{c}{} &  & Basal & Luminal \tabularnewline     \hline      Marked & Basal  & 131  & 116\tabularnewline     \cline{2-4}      Cell line & Luminal  & 100  & 104\tabularnewline     \hline     \end{tabular}          }     \end{table}               %     \begin{table}     \subtable[Directly overlapping valleys in promoters of genes correlated     with overexpression by breast cancer subtype]{          \label{tab:vlyTallyUniqOverlappingVlyMtchCntrlOvrExp}          \begin{tabular}{|c|c|c|c|}     \cline{3-4}      \multicolumn{1}{c}{} &   & \multicolumn{2}{c|}{Over-expression}\tabularnewline     \cline{3-4}      \multicolumn{1}{c}{} &  & Basal & Luminal \tabularnewline     \hline      Marked & Basal  & 26 & 18\tabularnewline     \cline{2-4}      Cell line & Luminal  & 20 & 10\tabularnewline     \hline     \end{tabular}          }     \end{table}          \end{document}


title: How to change the size of a european resistor in circuitikz?

text: This is my very first question i'm going to ask here. Allready found very helpfull tips, so i hope you can help me. I'm drawing a circuit with circuitikz. In there i only want to change the **size of the resistor, but not of the other components**. Therefore i used the commands `\ctikzset{bipoles/resistor/height=0.15}` and `\ctikzset{bipoles/resistor/width=0.4}`. This worked fine with american resistors but i'd like to use the european ones. Is there a simillar command for achieving this? Here a minimal example:               \documentclass{minimal}          \usepackage{circuitikz}          \begin{document}          % original size     \begin{tikzpicture}         \draw (0,0) to[R] (2,0) to[Do] (4,0);         \ctikzset{resistor = european}         \draw (6,0) to[R] (8,0) to[Do] (10,0);     \end{tikzpicture}          % shrink resistor     \ctikzset{resistor = american}     \ctikzset{bipoles/resistor/height=0.15}     \ctikzset{bipoles/resistor/width=0.4}     \begin{tikzpicture}         \draw (0,0) to[R] (2,0) to[Do] (4,0);         \ctikzset{resistor = european}         \draw (6,0) to[R] (8,0) to[Do] (10,0); % this one is NOT smaller          % than the one above, but I WANT IT TO BE SMALLER     \end{tikzpicture}          \end{document}


title: Itemized Equation

text: I am new to latex, so please pardon me if this question seems trivial. I am writing a document and write equations in `\begin{equation} ... \end{equation}` since I would like the equations to be numbered (and labeled for cross-referencing). In one part of the document, I need to create four equations (and have them numbered as 3a, 3b, 3c and 3d) as though they are in a list. I am not sure if there is a straightforward way to do this. Any help is appreciated. Thanks.


title: Writing the "&" on the Bibliography without errors

text: While writing the Bibliography, I want the last author of the article to appear preceded by an **" &"**. This is the bibtex file               @ARTICLE{Chambers2002,       author = {Chambers, A. F. and Groom, A. C. \& MacDonald, I. C.},       title = {Dissemination and growth of cancer cells in metastatic sites.},       journal = {Nature Rev. Cancer},       year = {2002},       volume = {2},       pages = {563-572},          }      This is .tex file               \documentclass[11pt]{book}     \usepackage{cite}     \bibliographystyle{unsrt}     \begin{document}          The article that's giving me headaches \cite{Chambers2002}\\          \bibliography{bibfile}     \end{document}      The output I get, regarding the bibliography entry mentioned, was: >   1. A.F. Chambers and I.C. Groom, A. C. & MacDonald. Article name.... > Notice that, in the bibtex file, the last author is MacDonald, I. C. and the previous one is Groom, A.C.. That's not what I get on the output. Why don't I get the authors' names right? Thank you! PS. I used TeXnicCenter to compile this .tex


title: Setting paragraph indentation AND vertical space in KOMA class

text: I would like to have both a paragraph indentation and a vertical space between paragraphs in a the KOMA article class. At the moment I use `\documentclass[12pt,captions=nooneline,DIV=14, parskip=half]{scrartcl}` to have vertical spacing, but I do not know how can I also have indentation. Any ideas? Many thanks


title: Drawing balls in a rectangle

text: I am trying to replicate the following figure here ![enter image description here](http://i.stack.imgur.com/bc65S.jpg) and this is what I have so far               \documentclass[12pt,a4paper]{standalone}          \usepackage{tikz,tkz-euclide,pgfplots}     \usetkzobj{all}     \newcommand{\ball}[2]{%             \begin{scope}[shift = {(#1,#2)}                 \fill[red] (0,0) circle (0.5);                 \clip (0,0) circle (0.5);                 \shade[shading=ball,ball color=white,1] (0.15,0.25) circle (0.7);             \end{scope}}          \begin{document}%              \begin{tikzpicture}                  \def\height{0.75}             \def\length{3}                  \tkzDefPoint(0,0){A}         \tkzDefPoint(0.9*\length,-\height){B}             \tkzDefPoint(2*\length,0){C} \tkzDefPoint(1.1*\length, \height){D}             \tkzDrawPolygon(A,B,C,D)                  \begin{scope}[shift={(0,2)}]                     \tkzDefPoint(0,0){A1}         \tkzDefPoint(0.9*\length,-\height){B1}                     \tkzDefPoint(2*\length,0){C1} \tkzDefPoint(1.1*\length, \height){D1}                     \tkzDrawPolygon(A1,B1,C1,D1)             \end{scope}                  \tkzDrawSegments(A,A1 B1,B C1,C D1,D);       %               \ball{2}{2}         \end{tikzpicture}     \end{document}      By using the tips I got from this question. I think I almost got it, but the code will not compile when uncommenting the last line. What is the reason for this? Other means create this image would also appreciated, it is always refreshing to see different approaches to a problem.


title: Getting the authors' "Lastname, Firstname" format

text: I'm getting the Bibliography in the following format: >   1. Firstname Lastname. Article.. > What should I change to get the Bibliography in the following format: >   1. Lastname, Firstname. Article.. > This is the bibtex file I'm referring to:               @ARTICLE{Clark2010,       author = {Clark, Michael James and Homer, Nils and O'Connor, Brian D. and Chen,         Zugen and Eskin, Ascia and Lee, Hane and Merriman, Barry and Nelson,         Stanley F},       title = {U87MG decoded: the genomic sequence of a cytogenetically aberrant         human cancer cell line},       journal = {PLoS genetics},       year = {2010},       volume = {6},     }      And a `.tex` MWE               \documentclass[11pt]{book}     \usepackage{cite}     \bibliographystyle{unsrt}     \begin{document}          Getting the Lastname, Firstname format \cite{Clark2010}\\          \bibliography{bibfile}     \end{document}      Thank you for your replies!


title: Using an en-dash for multiple author citations with natbib

text: The package `natbib` renders a citation with two authors Kashiwara and Schapira, for example, as               (Kashiwara and Schapira)      when I use the command `\citep*`. Is it possible to have it output "(Kashiwara-Schapira)" instead, separated by a hyphen (en-dash)? (Of course I could use an alias but this is the worst case.)


title: Getting error when writing ÆØÅ character

text: I'm making a thesis in danish, which means I use the packages:               \usepackage[utf8]{inputenc}     \usepackage[danish]{babel}      Now, I have split up my documents into chapters, and so far I have:               \begin{document}          \input{titlepage}          \input{abstract}          \chapter*{Dedication}     To mum and dad          \chapter*{Declaration}     I declare that..          \chapter*{Acknowledgements}     I want to thank ass...          \tableofcontents          \listoffigures          \listoftables          \chapter{Indledning}     \input{chapters/introduction}          \chapter{Ken Wilbers teoretiske bidrag}     \input{chapters/chapter02}          \chapter{Jan Tønnesvangs teoretiske bidrag}     \input{chapters/chapter03}      In my main.tex file. Now, I've been writing in danish in chapter02 and chapter03 for a while now, with no problems, regarding the ÆØÅ characters. But today I just wrote in the introduction.tex file, and when I use ÆØÅ I get the following error: > inputenc: Keyboard character used is undefined(inputenc) in inputencoding > `utf8'. ...en Wilbers Kvadrantmodel og Jan Tnnesvang ø This error comes a little different for every ÆØÅ character I use in the file. And I have no idea how to fix it ? The introduction.tex file looks exactly as the chapter files. Only text, no packages and stuff. But only in that one, I get the error. And I have tried to remove every ÆØÅ in the text, and then it works. But if I just write one character, it gives me an error. So, how do I fix this ? In my opinion there shouldn't be any difference on the chapter-tex files and the introduction-tex file. But maybe I'm missing something ? Thanks in advance.


title: A problem with using two different bibliography styles on Ubuntu

text: I use Latex with kile 2.1 on Ubuntu. I do not understand why when using `\bibliographystyle{plain}` it works very well, whereas when I use `\bibliographystyle{apsrev}` it doesn't (`[?]` are printed everywhere). Could you give me some advice? Additionally, there is no problem with WinEdit on Windows XP.


title: How to change font styles in verse environment without setting up a new environment?

text: This is a related question to: How to change font size in verse environment? Although this answer works very well, it does create a new `Verse` environment without the inherent functions of the `verse` package. In the case of LyX, it will be cumbersome to implement. I wondered, if there is a way to define the font styles in the Preamble—font size, leading, style etc—with all the inherent proprieties of `verse`? It will keep the LyX interface clean and still modifiable through the Preamble. ps. I tried `\renewenvironment` with simple `\selectfont`, it seems to `erase` the verse functions.


title: Biblatex foreing language example files - contribute?

text: Do you have a Biblatex bibliography file in a foreign language ? We are trying to build a test-sequence for language support in Biblatex and would like to have several files, using supported and unsupported languages, so we are able to check when changes in the package, produce visible changes in the printed biblio. We do have enough examples in English but almost none in other languages, so if you have some, send us 3 to 4 pages worth of it and any support files that will be needed to run it.


title: How to remove indent on non-item text inside an enumerated environment?

text: I'm using the `enumerate` environment to make a numbered list. I want to write a paragraph that serves as information for the next items. I want to remove the indent on this paragraph of text, so that it is indented just as much as the numbers in the list. How do I do this? This is in essence what I've done. I've tried using `\noindent,` but without success.               \documentclass{book}          \begin{document}     \section*{Exercises}          Here are some exercises.          \begin{enumerate}         \item This is the first exercise.         \item This is the second exercise.              Here is some information to answer the questions below. This paragraph         should be indented just as much as the numbers in the list are.              \item This is the third exercise.         \item This is the fourth exercise.     \end{enumerate}     \end{document}      The output is: ![enter image description here](http://i.stack.imgur.com/2xEdm.png)


title: Interference between \includeonlyframes and \onslide across tabular row

text: I seem to have run into a strange interference between `\includeonlyframes` and use of `\onslide` to uncover a row in a `tabular` environment. Consider the following:               \documentclass{beamer}     \begin{document}       \includeonlyframes{second}            \begin{frame}{First frame}         \begin{tabular}{rl}           \onslide<+->{Some & text}         \end{tabular}       \end{frame}            \begin{frame}[label=second]{Second frame}         Some text on second frame       \end{frame}     \end{document}      When I run `pdflatex` on this example, I get "Missing `}` inserted." Curiously, if I make any **one** of the following changes, then the example compiles successfully.   * Remove the `\includeonlyframes` line.   * Remove the `\onslide<+->{` and `}` from around the `tabular` row.   * Remove the `tabular` environment (and `&`), but leave `\onslide<+->{` and `}`.   * Replace `\onslide<+->{` and `}` with the switch form `\onslide<+->`.   That is, use `\onslide<+-> Some & text`.   * Replace `\onslide<+->{` and `}` with `\uncover<+->{` and `}`.   (It seems particularly strange that `\uncover<+->{` works but `\onslide<+->{` does not, especially considering the apparent equivalence discussed in Differences and best practices: \onslide vs. \uncover, \onslide+ vs. \visible, \onslide* vs. \only?.)   * Label the first frame with the optional argument `[label=first]`. So, by doing either of the last three bullets, I can work around this problem and still retain the overlay behavior that I want. Nevertheless, I would like to understand why this error arises. Does anyone have any ideas?


title: mark LaTeX keywords in listings

text: I am using this code to define keywords for listings               \lstdefinestyle{demostyle}{         columns=flexible,         keepspaces=true,             basicstyle=\small\ttfamily,         language = [LaTeX]TeX,         morekeywords={textwidth,color,let},     }     \lstloadlanguages{[LaTeX]TeX}      However that marks every word `color` as a keyword, no matter if it is preceded by a `\`. I however really want only LaTeX keywords to be highlighted. Can this somehow be achieved?


title: Why is the indentation in my alltt environment not consistent?

text: I am writing a paper that involves some code. I set the code using `alltt` because I like to use `\color` and that doesn't seem to work in `verbatim` or `listings`. But I am having problems with indentation. Usually, it's exactly what is shown. But sometimes not. For instance:               \documentclass{article}     \usepackage{alltt}     \usepackage{color}     \usepackage{float}          \begin{document}     \begin{alltt}     proc template;      define statgraph fancybox;      begingraph;        entrytitle "Box plot w/histogram";        layout lattice/rows = 2 columns = 1         order = columnmajor rowweights = (.8 .2);         columnaxes;             columnaxis /griddisplay = on;             columnaxis /label = '' griddisplay = on;         endcolumnaxes;           boxplot x = ht y = wt;           barchart x =  ht y = wt;         endlayout;     endgraph;     end;     run;     \end{alltt}     \end{document}      the second row that starts with `columnaxis` is not indented to match the one just above. I'm running `pdflatex` on a Windows machine.


title: Can LaTeX be persuaded to produce text output?

text: I've read here and there that ConTeXt can produce XML output. We also have, from time to time, questions about converting LaTeX to different formats. On the basis that "The only parser for TeX is tex", if latex could produce text output instead of PDF then it would be possible to write a style file to convert **reasonable** input to a different markup language. Would this be possible? _Bit of background:_ I encounter this "can we convert from LaTeX?" question in the context of the nLab where the input format is Markdown+iTeX (iTeX not being anything to do with Knuth's proposal but a subset-of-LaTeX-to-MathML converter) but people often have snippets of LaTeX articles that they want to include. So converting all the way to XHTML+MathML via, say, tex4ht isn't the right option. I wrote a Perl script that reimplements much of TeX to do this, but after doing so realised that my style files would work in ordinary LaTeX and produce the "right" output, except that they would be embedded in a PDF. So if I could just persuade TeX to produce text, I'd be almost there. Of course, I could _try_ to extract the text from the PDF but that "feels wrong" and I'd worry about extra stuff sneaking in by accident.


title: Single spacing long entries in List of Figures and moving page number

text: I'm assembling my master's thesis in latex and I'm currently having trouble with spacing in my List of Figures. Currently, if there is an entry that extends more than one line, it is double spaced and the page number is on the bottom line. My university requires subsequent lines in a single entry to be single spaced, individual entries double spaced, and page numbers to be on the first line of each entry.


title: Peek ahead for next token not in token-list

text: > **This question led to a new package:**   >  `xpeek` I’ve been developing my `xpeek` package with lots of help from you folks on TeX.SX. It’s intended to help write commands which, like the familiar `\xspace`, look ahead into the input stream and choose what to do based on what follows. Although the interface needs to change, it has enough functionality to implement something like xspace, or the intelligent italic- correction from LaTeX's \textit. Which means it has the same familiar limitation as \textit, best illustrated by example:               \textit{foof}\xspace. \textit{foof}\xspace!  % bad italic correction before "."     \def\nocorrlist{.,\xspace}     \textit{foof}\xspace. \textit{foof}\xspace!  % no italic correction before "!"      Thinking about the problem, it seems I need the ability to scan ahead in the input stream, ignoring tokens from one list while looking for tokens from another. In Expl3 terms, I’m hoping to define something like `\peek_inlist_ignore_auxlist:nnTF`. As an initial step toward this end, I’m trying to simply scan ahead for the next input token not on the ignore list. For example:               \def\ignorelist{ ,.;:!}     \newcommand{\nextnonpunc}{\scanignoring{\ignorelist}`\scanfound'}     The next non-punctuation mark is \nextnonpunc.,;:! xyz      yielding > The next non-punctuation mark is ‘x’.,;:! xyz (Actually, since I’m using Expl3, the syntax would be               \ExplSyntaxOn     \tl_const:Nn \ignorelist {~,.;:!}     \NewDocumentCommand { \nextnonpunc } { }       {         \peek_ignore_list:N \ignorelist         `\l_peek_token'       }     \ExplSyntaxOff      or something like that.) So how can I implement `\peek_ignore_list:N`? The direction I’m considering is to read ahead, consuming tokens. Each token read is added to a save-list and compared to the ignore-list. If it’s on the ignore-list, continue; otherwise put the save-list back on the input stream and stop. Does this sound reasonable so far? To consume tokens one-by-one, I built this function:               \cs_new_protected:Npn \peek_meaning_really_remove:NTF #1 #2 #3       {         \peek_meaning_remove:NTF #1           { #2 }           {             \peek_meaning_remove:NT \l_peek_token               { #3 }           }       }      but the question above still stands: How can I implement `\peek_ignore_list:N`?


title: biblatex: make "authors" hyperlink to DOIs, URL or ISBN and url breaklink issue in hyperref

text: This is a follow up question to biblatex: Make title hyperlink to doi url (if available) and biblatex: make title hyperlink to DOIs, URL or ISBN! First , I have an issue with breaklinks=true because the urls don't break up and I have to turn breaklinks on but at the same time , if I turn on it, these links are no longer be clickable. ![breaklinks=false](http://i.stack.imgur.com/H1mi2.png) Here is the code from Herbert.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[backend=biber]{biblatex}      \usepackage[colorlinks,breaklinks=false]{hyperref}     \bibliography{biblatex-examples}     \ExecuteBibliographyOptions{doi=false}     \newbibmacro{string+doi}[1]{%       \iffieldundef{doi}{#1}{\href{http://dx.doi.org/\thefield{doi}}{#1}}}     \DeclareFieldFormat{title}{\usebibmacro{string+doi}{\mkbibemph{#1}}}     \DeclareFieldFormat[article]{title}{\usebibmacro{string+doi}{\mkbibquote{#1}}}     \begin{document}     A reference to~\cite{kastenholz} and~\cite{sigfridsson}.      \printbibliography     \end{document}      Second, I would like to know how I can change this to "authors" instead of "title". Thanks for your help.


title: Counter too long subfigure

text: I'm trying to make a igure with more than 26 subfigures, therefore, the counter of the alphabet is not enough since it goes only to the z. I tried as suggested in other posts to use the package alphalph like this:               \documentclass[smallextended]{svjour3}     \usepackage{graphics,graphicx,color}      \usepackage{subfigure}     \usepackage{alphalph}     \usepackage{psfrag,epsfig}     \renewcommand{\thesubfigure}{\alphalph{subfigure}}          \begin{document}     \begin{figure}     \centering     \subfigure[]{\includegraphics[width=0.23\columnwidth]{figures/Segmentation/Pedestrians_trck.eps}\label{fig:a_trck}}     \subfigure[]{\includegraphics[width=0.23\columnwidth]{figures/Segmentation/Pedestrians_segm.eps}\label{fig:a_segm}}     \subfigure[]{\includegraphics[width=0.23\columnwidth]{figures/Segmentation/Pedestrians_SOBS.eps}\label{fig:a_SOBS}}          %and so on until 32 subfigures          \caption{Segmentation performance}     \label{fig:pedestrians}     \end{figure}     \end{document}      However, I get this error for the other figures in the document (which are not with automatic enumeration): "Missing number treated as zero". The other figures are declared as:               \begin{figure}[!h]     \centering     \subfigure[\scriptsize{distribution with heavy tails}]{\includegraphics[width=.48\columnwidth]{Figures/Theory/PDF1n}\label{fig:PDF1}}      \subfigure[\scriptsize{distribution with light tails}]{\label{fig:PDF2}      \includegraphics[width=.48\columnwidth]{Figures/Theory/PDF2n}}     \caption{\scriptsize{Kernel bandwidth selection strategy}}.     \end{figure}


title: Positioning of node label in pgfplot

text: I am using pgfplot to make a 2D plot with the nodes labelled. However, some of the text labels interfere with each other as they're too close. The default positioning of text labels in pgfplot seems to be _above_ the node. Is it possible to position them _beside_ the node? This is what I have (had to make the y axis semilogy to increase the spacing between points) ![enter image description here](http://i.stack.imgur.com/fHlv1.jpg) Here's what I want it to be (pardon my poor photoshopping skills) ![enter image description here](http://i.stack.imgur.com/rwgKB.jpg) The pgfplot code I am using is as described here: Update reference labels in scatter plots


title: What are the restrictions when using the TeX Live rpm distro?

text: I installed               [root@magpie ~]# yum -q info texlive     Installed Packages     Name        : texlive     Arch        : x86_64     Epoch       : 3     Version     : 2013     Release     : 4.20131226_r32488.fc20     Size        : 0.0       Repo        : installed     From repo   : updates     Summary     : TeX formatting system     URL         : http://tug.org/texlive/     License     : Artistic 2.0 and GPLv2 and GPLv2+ and LGPLv2+ and LPPL and MIT and Public Domain and UCD and Utopia      However things that I used to use such as `\begin{equation*}` and `\left(` no longer work. Here is the message for the equation numbering problem.               ---------------------------------------------------------     ! LaTeX Error: Environment equation* undefined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.249  \begin{equation*}     --------------------------------------------------------      What have I missed?


title: Understanding some pieces of luatex the program

text: I'm looking forward the implementation of a `tex.execute()` command on the `lua` side in luatex. But it needs patching `luatex` the program and I have a dream: providing the patch... :) As I have nearly no experience with dealing with such big projects with lots of libraries entangled, I'd like to be taught how to read a piece of `luatex` code and understand it. I have three examples in mind:   1. the `\directlua` primitive (to understand the tex2lua route);   2. the `tex.sprint` function (to understand the lua2tex route);   3. the `tex.getbox` function (to understand how `lua` interact with `TeX` material). Note: when travelling for summer holidays, I can understand people speaking `C` provided they speak slowly but I'm a bit too shy to speak myself :)


title: Include non floating graphic in a theorem environment

text: In a mathematical text I use theorem environments, for example I have defined _example_. In some of these environments I‘d like to inlcude a graphic:               \begin{example}       A nice example for this foo is the following:            \includegrapcis{foo}.            As you can see: \dots     \end{example}      Unfortunately that does not work very well. At first I am unable to add a caption, but that is not the main problem. The main problem is that the graphic‘s bottom and the text of my environment (“Example x.y”) are aligend at their bottom, ie. parts of the grapic are above the environment. I tried some googling, ie. used the `placeins` package and `\FloatBarrier` (and put the `\includegraphics` in a `figure`) but without any good result. How to include such a graphic in a not ugly way?


title: leaders and evaluation order

text: I made this simple latex file :               \documentclass{minimal}     \usepackage{tikz}     \newcommand\randdot{%     \tikz{\pgfmathsetmacro{\r}{0.01+0.05*random()}\fill (0,0) circle (\r);}\ }          \begin{document}          \randdot\randdot\randdot\randdot\randdot\randdot          Test \leaders\hbox{\randdot\ }\hfill 3 \hfill \           \randdot\randdot\randdot\randdot\randdot\randdot          \end{document}      ![Random dots, but not in leaders](http://i.stack.imgur.com/5yIde.png) The new command randdot typeset a dot of random size. The command works good, BUT when I use it in a leader, the dots are no more random. The leaders command must evaluate only once the randdot, and copy it... How can I obtain a random leader, with each dot being evaluated differently ? Thanks !!


title: delimiter size in cases environment

text: How can I change delimiter (brace) size in cases environment (for piece-wise function)?               \begin{equation}     f(x)=\begin{cases}          \end{cases}     \end{equation}


title: Insert pages from password protected pdf file in latex

text: If I have a password protected PDF (my own document, source unfortunately lost), and I want to include a portion of it in a new document, can that be done? This previous question explains how to do it in general, but when I try this with a passworded input and compile using XeLaTeX, I get a XeLaTeX error `xelatex> <use "myOldPdf.pdf"> Command Line Error: Incorrect password`. Is there a way to pass XeLaTeX a password for this file?


title: pgfplots black and white line graph

text: hi refered the pgfplots user manual but found no instructions as to how one can proceed with creating a black and white line graph. My graph is as follows               \begin{figure}[H]     \begin{tikzpicture}     \begin{axis}[     scaled y ticks=real:150,     ytick scale label code/.code={},     ymax = 150,     symbolic x coords={8 by 8, 16 by 16,32 by 32,64 by 64},     xtick=data,     height=9cm,     width=8cm,     grid=major,     xlabel={Dimensions},     ylabel={Force},     legend style={     cells={anchor=east},     legend pos=south east,     }     ]          \addplot coordinates {     (8 by 8,38) (16 by 16, 50)  (32 by 32, 69)  (64 by 64, 99)      };               \addplot coordinates {     (8 by 8,43)  (16 by 16, 66) (32 by 32, 92)  (64 by 64, 118)     };          \addplot coordinates {     (8 by 8,25)  (16 by 16, 81) (32 by 32, 91)  (64 by 64, 150)     };          \addplot coordinates {     (8 by 8,100)  (16 by 16, 145)   (32 by 32, 146) (64 by 64, 150)     };          \addplot coordinates {     (8 by 8, 12)  (16 by 16, 135)   (32 by 32,141)  (64 by 64, 149)     };          \addplot coordinates {     (8 by 8, 111)  (16 by 16, 138)  (32 by 32, 140) (64 by 64, 145)     };          \addplot coordinates {     (8 by 8, 76)  (16 by 16, 121)   (32 by 32, 140) (64 by 64, 147)     };               \legend{$AAAA$,$BBBB$,$CCCC$,$DDDD$,$EEEE$,$FFFF$,$GGGG$}     \end{axis}     \end{tikzpicture}          \caption{Force as area increases}          \label{fig:force}     \end{figure}                         \end{document}      ![enter image description here](http://i.stack.imgur.com/UjFLM.png) I have posted the resulting graph as well. Iam clueless on how to give each line a unique symbol. Could someone please help me out.


title: installed package not running

text: I have TexShop installed on my Mac and I need to use the Slovak language in my LaTeX documents. Through the TexLive Utility, I found out that I have `collection-langczechslovak` installed, but when I write it in the preamble of the document, it says that this file was not found. Do you have any idea what could be wrong?


title: list of tables customization

text: I was working with LaTex and wanted to get the following form output for \listoftables tab space is a particular amount of gap. Can any body help me in doing this in following format. I've tried it but it has yielded no result like the needed ones.               LIST OF TABLES          Chapter 1          Table 1.1   {tab space}            Name of Table     {tab space}                   Page Number          Table 1.2   {tab space}            Name of Table     {tab space}                   Page Number          Chapter 2          Table 2.1   {tab space}            Name of Table     {tab space}                   Page Number


title: Book template for <<Operating systems concepts>>

text: Could you help me to write a LaTeX book template just like the following link? I am planning to translate this book. I really hope someone can help me to write a template for the translation project. Looking forward for your replies!! http://en.tjcities.com/wp-content/uploads/Books/OS_Java_8th.pdf


title: Strange behavior with \draw within axis environment

text: Consider the following snippet of code:               \documentclass{standalone}     \begin{document}     \begin{tikzpicture}       \begin{axis}         \draw[-latex,cyan] (axis cs:0,0) -- (axis cs:1,1);         \addplot coordinates {(1,1)};       \end{axis}     \end{tikzpicture}     \end{document}      The `\draw` doesn't show up if I comment out the `\addplot`. Something I've missed?


title: Beamer overlays, tikz external and custom file name

text: This is a follow-up question from Use tikz external feature with beamer \only . Andrew's answer there is excellent, and does the job (almost) perfectly. The rough edge I have found was when I tried to use `\tikzsetnextfilename` together with it. Why would I want to do that? Because in beamer, one might need to reorder one's slides, or to add an overlay, etc. In this case, most pictures will need to be regenerated, even if they weren't changed. What is the problem? The following M(n)WE shows the usual way of using `\tikzsetnextfilename`.               \documentclass{beamer}          \usepackage{tikz}          \usetikzlibrary{external}          \makeatletter     \tikzset{       beamer externalizing/.style={%         execute at end picture={%           \tikzifexternalizing{%             \ifbeamer@anotherslide             \pgfexternalstorecommand{\string\global\string\beamer@anotherslidetrue}%             \fi           }{}%         }%       },       external/optimize=false     }     \makeatother          \tikzset{every picture/.style={beamer externalizing}}          \tikzexternalize          \begin{document}          \begin{frame}       \tikzsetnextfilename{figure}       \only<1>{Image 1:}       \only<2>{Image 2:}       \begin{tikzpicture}         \only<1>{\node {Overlay 1};}         \only<2>{\node {Overlay 2};}       \end{tikzpicture}     \end{frame}          \end{document}      This doesn't work. I'm not pro enough with latex, beamer and tikz mechanics, but I suspect that the problem is `tikz externalize` trying to generate the two pictures with the same file name. And indeed, the following code snippet does work.               \documentclass{beamer}          \usepackage{tikz}          \usetikzlibrary{external}          \makeatletter     \tikzset{       beamer externalizing/.style={%         execute at end picture={%           \tikzifexternalizing{%             \ifbeamer@anotherslide             \pgfexternalstorecommand{\string\global\string\beamer@anotherslidetrue}%             \fi           }{}%         }%       },       external/optimize=false     }     \makeatother          \tikzset{every picture/.style={beamer externalizing}}          \tikzexternalize          \begin{document}          \begin{frame}       \only<1>{\tikzsetnextfilename{figure-1}}       \only<2>{\tikzsetnextfilename{figure-2}}       \only<1>{Image 1:}       \only<2>{Image 2:}       \begin{tikzpicture}         \only<1>{\node {Overlay 1};}         \only<2>{\node {Overlay 2};}       \end{tikzpicture}     \end{frame}          \end{document}      Now it is still far from perfect. For example, it requires to know precisely how many overlays are needed for every picture. Hence the question : is there a better, more natural way of achieving this? If not, is there a way to make this method transparent to the user (so that he doesn't need to count the overlays himself)?


title: Mapping to replace \newfont with \usefont

text: Rather than write               \newfont{\mynewfont}{pagk8r scaled 3000}      one now apparently (Ref.: Math symbol within a new-font word) should write:               \DeclareRobustCommand\bigavantgarde{\fontsize{30}{42}\usefont{\encodingdefault}{pag}{m}{n}}      What is the general mapping? In other words, for a given font in my > /usr/local/texlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map , say `pagko8r`, what is the mapping to use `\usefont` instead of `\newfont`?


title: Adding space after a line in ToC

text: I have been trying to determine way to add space **after** a section or chapter line in my table of contents. `tocloft` allows me to add spacing before lines but not after, and this leads to spacing issues at the top of new pages (see this question). I have tried using \preto and \appto commands, _e.g._ ,               \preto\section{       \addtocontents{toc}{\vskip 2pt}     }     \appto\section{       \addtocontents{toc}{\vskip 5pt}     }      However, `\appto` causes errors (for reasons explained in another TeX.SX post). I also tried manually adding the ToC line:               \usepackage{nameref}     \makeatletter     \newcommand*{\currentname}{\@currentlabelname}     \makeatother          \setcounter{tocdepth}{0}          \preto\section{       \addtocontents{toc}{\vskip 2pt}       \addtocontents{toc}{         \protect\contentsline{section}{\numberline{\thesection}\currentname}{}       }       \addtocontents{toc}{\vskip 5pt}     }      This also didn't work as it used the previous section name rather than the current section name (since it is called in `\preto` not `\appto`). This attempt also causes problems with `hyperref`.


title: A correct bounding box for a standalone logo

text: Writing               \documentclass{standalone}     \usepackage{varwidth}          \begin{document}     \begin{varwidth}{\linewidth}       {\em line 1}            {\em line 2}     \end{varwidth}     \end{document}      produces an incorrect bounding box for italics (note that the '2' is clipped): ![enter image description here](http://i.stack.imgur.com/axSd3.png) How can one generate a correct standaline image? Simply modifying \linewidth to a fixed dimension does not work. (As discussed here, inserting `varwidth` is necessary to avoid that `standalone` would merge the two lines on one line.)


title: ToC-title formatting problem

text: I am relatively new to Latex and I came across a problem I am not able to fix myself. From a friend I got a number of commands for formatting my chapter titles, which works quite well, unfortunately it does not work for the toc- title and chapters with an asterisk (`\chapter*{}`). Can somebody help to solve this problem?                   \documentclass{book}              \makeatletter         \renewcommand{\@makechapterhead}[1]{%         \vspace*{1 pt}%         {\setlength{\parindent}{0pt} \raggedright \normalfont         \bfseries\LARGE\thechapter.\ #1         \par\nobreak\vspace{20 pt}}}         \makeatother              \begin{document}         \tableofcontents         \chapter*{Abstract}         \chapter{Introduction}         \section{abc}         \section{def}         \chapter{Results}         \section{ABC}         \end{document}


title: How to detect if the first non-space/non-tab character in a string is '-' (minus)?

text: I have a macro `\myNumericString` that expands to a string of numbers, with the possibility to present a minus sign as a first non-space character. How can I construct a macro:               \isNegative{\myNumericString}{ true }{ false }      in order to make decisions on how to treat `\myNumericString` in successive typesetting steps? Here's a simple case of usage:               \[        4 \times \isNegative{\myNumericString}{            ( \myNumericString ) }{ \myNumericString }     \]


title: BibTeX with Diplomarbeit and Eprint

text: I found it a bit challenging to write a bibliography with Diplomarbeit and Eprints. From looking in http://arxiv.org I would need to use their `bst` style, which I don't know how to install local and probably does not support Diplomarbeit, rather Master thesis. From the other hand, `dinat.bst` support Diplomarbeit, but does not support Eprints. How could I combine both worlds in one BibTeX? I am using               \documentclass[ pdftex, a4paper ]{scrbook}     \usepackage[numbers]{natbib}      **EDIT** Diplomarbeit is equivalent to Master thesis, but its called Diplomarbeit, so if i would write in my bibliography Master thesis, it would be incorrect. I used `plainnatdin.bst` but for having Diplomarbeit, i needed to moved to `dinat.bst`. I tried both with the following lines in my bibtex file                archivePrefix = "arXiv",      eprint        = "0707.3168",      primaryClass  = "hep-th",      with out success. I am using Gentoo (Linux) with `dev-texlive/texlive-latex v2011`