title: How to incorporate and scale matplotlib plots in latex using the PGF backend?

text: I am using the pgf backend of matplotlib to generate pgf files which I want to put into my latex document using tikzscale to be able to resize them easily. Example python code:               #!/usr/bin/env python     # -*- coding: utf-8 -*-     import matplotlib as mpl     mpl.use('pgf')     import numpy as np     import matplotlib.pyplot as mplp          mpl.rcParams['text.latex.unicode']=True     mpl.rcParams['text.usetex']=True     mpl.rcParams['pgf.texsystem'] = 'pdflatex'          fig = mplp.figure()     ax = fig.add_subplot(111)          x = np.arange(0,2 * np.pi, .1)     data = np.sin(x)          fmt = {"lw" : 3, "c" : "r", "ls" : '-'}          ax.plot(x, data, label=r"sample data with greek $\mu$", **fmt)          ax.set_ylabel(r"sample", rotation=0)     ax.legend()     fig.set_size_inches(1.41,1.)     # fig.savefig('./sample.pgf', dpi=500, bbox_inches='tight')     fig.savefig('./sample.pgf', dpi=500)      Example latex code:               \documentclass{article}          \usepackage[utf8]{inputenc}          \usepackage{tikz}     \usepackage{tikzscale}     \usepackage{pgfplots}          \pgfplotsset{compat=1.8}          \newcommand{\includepgf}[4]     {       \begin{figure}       \centering       \includegraphics{#1}       \includegraphics[width=#2\textwidth, height=#2*0.7071428571428572\textwidth]{#1}       \includegraphics[width=#2\textwidth, axisratio=0.7071428571428572]{#1}       \caption[]{#4}       \label{#3}       \end{figure}     }          \begin{document}     \includepgf{sample.pgf}{.9}{fig:sample}{Sample Figure}         \end{document}      Unfortunately the following happens for the three different `\includegraphics` commands:   1. Works as expected, includes plot in original size   2. Compiles with              Package tikzscale Warning: Scaling of sample.pgf's width was only     (tikzscale)                accurate to 208.59694pt on input line 27.               Package tikzscale Warning: Scaling of sample.pgf's height was only     (tikzscale)                accurate to 147.29488pt on input line 27.      no resizing in final pdf file.   3. Does not compile, gives              ! Package tikzscale Error: Requested to scale unscalable graphic.


title: Why does fake slant only seem to work after italics has been used?

text: Based on this question, can someone explain this behavior:               \documentclass{article}     \usepackage{fontspec}     \setmainfont[       SlantedFont={Linux Libertine O},       SlantedFeatures={FakeSlant=0.30},       BoldSlantedFeatures={FakeSlant=0.30},       ]{Linux Libertine O}            \begin{document}           abc \textsl{abc} \textit{abc} \textsl{abc} \textbf{\textsl{abc}}       \end{document}      ![enter image description here](http://i.stack.imgur.com/67gRw.png) It seems the fake slant only works after italics has been used. Am I doing something crazy or is this a very subtle bug?


title: Overriding the paragraph style in the LNCS document class

text: I am using the LNCS document class to typeset a paper. I would like to keep most of this document style, but I do not like how paragraphs are typeset. The heading of the paragraph is in italics, which is not enough contrast to the rest of the text. I would like to change this to bold text. How can I override the paragraph style, being minimally invasive?


title: Unnecessary space after \end{spacing}

text: This is my latex file:               \documentclass[11pt]{article}     \usepackage{setspace}     \begin{document}        \section*{Section 1}           \begin{spacing}{1.5}              Unnecessary\\              space\\              after\\              this1           \end{spacing}        \section*{Section 2}           Perfect\\           space\\           after\\           this2        \section*{Section 3}     \end{document}      This is the output: ![spacing](http://i44.tinypic.com/15ri9ow.png) I want as much space after 'this1' as there is after 'this2'. Any help would be appreciated.


title: Install listings package manually

text: How do I install the **listings** package manually ?. With other packages I used to download all the files needed and copied in the right folders and then refreshing the packages and it worked perfectly, but some of the files I need now for this package is **listings.sty** and **lstlang1.sty** , but I don't find them anywhere on the net , the folders contain anything but those files. Any help would be appreciated


title: Add Logo to LaTeX poster

text: I'm using this template to create a poster. I would like to add a logo to the top right corner of the poster, next to the tittle of the poster. Is this possible? How?


title: Beamer: hyperlink to bottom of slide with stepwise overlay-specification

text: I am making a presentation where I move from one frame to another through a hyperlink to a hypertarget and then back to a hypertarget at the last position in the first frame. This works fine, but when I use `\beamerdefaultoverlayspecification{<+->}` in order to get stepwise uncovering of bullet points, the link always moves the presentation back to the beginning of the first frame. What I would like, however, is that the second hyperlink moves to the bullet point where I set the hypertarget. Any suggestions?               \documentclass{beamer}     \beamerdefaultoverlayspecification{<+->} %stepwise uncovering     \usepackage{hyperref}          \begin{document}          \begin{frame}         \begin{itemize}             \item A             \item B             \item \hyperlink{target1}{\beamergotobutton{Go to target 1}}             \item \hypertarget{target2}{C}         \end{itemize}     \end{frame}          \begin{frame}         \begin{itemize}             \item \hypertarget{target1}{Target 1}             \item \hyperlink{target2}{\beamergotobutton{Go back to first slide next bullet point}}         \end{itemize}     \end{frame}          \end{document}


title: How may I insert horizontal dots in the second row of my vmatrix?

text: It seems to me that my method is quite inconvenient. Could someone help me in this matter?                   \documentclass[11pt,a4paper]{article}         \usepackage{blindtext}         \usepackage{mathtools}         \DeclareMathOperator{\sgn}{sgn}     \begin{document}         $\begin{vmatrix}         a_{11} \cdots a_{1r}\cdots a_{1n}\\         \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \dots \cdot \cdot \cdots \cdot \\         a_{n1} \cdots a_{nr} \cdots a_{nn}     \end{vmatrix}$     \end{document}


title: texpos package - is there a push text to the bottom of the page to stretch the text block without using ~?

text: I have a couple subsections in my texpos block. I noticed you can't really set the size of the block vertically. What I want to do is push one of the subsections and the content's under it to the bottom of the block with having to space and stretch it out with ~~~~~~~~. I couldn't find anything on the documentation. ![Here's a picture of what I want it to look like:](http://i.stack.imgur.com/5B7SK.png)


title: Chapter header wanted in a separate page

text: As the title indicates I want the chapters' titles to appear in the middle of a separate page.


title: How to make a custom sized poster?

text: I am trying to make a 36 x 36 poster, but the dimensions are not coming out correctly. I have tried               \documentclass[size=custom,width=91.44,height=91.44]{sciposter}          .     .     .          \renewcommand{\papertype}{custom} \renewcommand{\fontpointsize}{25pt}     \setlength{\paperwidth}{91.44cm} \setlength{\paperheight}{91.44cm}      but only the height is 36 in.


title: Footnotes in tables and shaded environment

text: I have a problem with having my footnotes on the same page with the footnotemark. What I use to have them inserted into the table or a shaded box is `\footnotemark` and `\footnotetext` pair. But the text of the footnote appears only after the end of the table/shaded text. If it occupies several pages then the footnotetext will be seen too late in the text.   One more puzzle for me here is now to insert several footnotes into one table/shaded text. It doesn't hold numeration giving the same number to all footnotes.


title: Angle brackets with an underset arrow

text: I am trying to make a pair of angle brackets of variable height enclosing a main box along with a box beneath each bracket and an arrow of variable length between these lower boxes. Since I'm sure that's extremely unclear, here are two hand-drawn (and a little crooked) examples of what I mean: ![](http://i.imgur.com/SDggEIx.gif) With my limited skills, here is the code I managed to produce:               \newcommand{\imfun}[3]{\underset{#1 \;-\hspace{-.1in} \hfill \rightarrow \; #3}{\sbox0{$#2$}     \mathopen{\resizebox{1.2\width}{\ht0}{$\Bigg\langle$}}     \usebox{0}     \mathclose{\resizebox{1.2\width}{\ht0}{$\Bigg\rangle$}}     }}      The three arguments are the three content boxes: lower left, main, and lower right. In this implementation, the angle brackets do not change height gracefully and no attempt has been made to connect the head of the arrow to the tail. I certainly appreciate any help you can offer!


title: Mathematics formulae can't be compiled

text: I have this code for my presentation:               \documentclass{beamer}     \usepackage[T1,T2A]{fontenc}     \usepackage[cp 1251]{inputenc}     \usepackage[serbian,english]{babel}     \usepackage{amssymb,amsmath}          \setbeamertemplate{navigation symbols}{\insertframenavigationsymbol}     \setbeamercolor{normal text}{bg=blue! 25}     \useinnertheme{circles}     \usecolortheme{orchid}     \usecolortheme{whale}          \mode<presentation> \title{XY}          \author{XY\\     XY}     \date{}          \usefonttheme[onlylarge]{structuresmallcapsserif}     \usefonttheme[onlysmall]{structurebold}     \setbeamerfont{title}{shape=\itshape,family=\rmfamily}          \begin{document}          \begin{frame}     \titlepage     \end{frame}          \begin{frame}     \insertframenavigationsymbol     \frametitle{XY}     \begin{align}     \notag     A^{*}_{JY}X\ =\ -Ph(X,\ Y).     \end{align}     \end{frame}     \end{document}      I am receiving a message: PDFTeXify failed to create a pdf file. Only in case when I use mathematics, otherwise everything is ok. What could be a problem? Thank you!


title: change figure numbering in lyx

text: I have a lyx document with two figures side-by-side. right now everytime I reference to them I get them numbered like this 2a and 2b. I want to make lyx to number them like this: 2(a) and 2(b). I want to add the parentheses. Is there any way? maybe add something to the preamble? Thank you


title: Words not vertically aligned in gb4e glosses when underlined

text: I'm glossing my linguistic examples with `gb4e` and am having some problems with alignment. The language I am working with uses underlines in its orthography, and the morpheme that my paper focuses on requires an underlined g... alas. When I attempt to put an underlined _g_ into a gloss line, the word which contains the _g_ receives different line spacing than the rest of the words on its line, making it look incredibly out of place (especially if I have three glossing lines, two of which contain the _g_ ). This affects almost all of my examples. Is there a way to force a particular line spacing for the glossed sections that will remain unaffected by underlines on characters with descenders? Here is an example.               \documentclass{article}          \usepackage{gb4e}     \newcommand{\Gitg}{\underline{g}}          \begin{document}     \begin{exe}     \ex \glll   Guhu'mhl wan \Gitg ant John.\\                 guxw-'m=hl wan  \Gitg an=t John\\                 shoot-1pl.ii=det deer GAN=det John\\         \glt    \emph{John and I shot the deer.}     \end{exe}     \end{document}      Ideally a solution would be compatible with `cgloss` as I'm also using `\hfill` for right-aligned references. Using `cgloss` has no impact on this issue.


title: Fading a path in TikZ

text: I want to draw a path/plot in TikZ whose shade depends on the coordinate. For example, I want say something like               \draw[color=black!\x] plot coordinates{ coord1 ... coord100};      i.e. the shade of the color depends on the coordinate of the point. In examples of using colour in TikZ documention that I found, the colour is set for the entire path, and does not change with the point. Is there a way to do what I want?


title: What template has the least "wasted" space for headings, sections, etc

text: Does anyone have suggestions for a document template that doesn't look terrible but is the most economical with regard to space used up for headings, sections, titles, and so forth? The AMS article template is quite good, but I'd like to know if there's one out there that's even better. (More to the point: if I have a strict page/margin/font/spacing limit for something, what package/template is the best for maximizing the amount of content I can still include, while not looking completely ridiculous?)


title: Making parts of equations larger

text: Is there a way to make only a part of an equation larger? I'm working with the code below, but I feel like the s-angle-n and a-angle-n are far too small and would really like to make them both bigger without affecting the rest of the equation.               \DeclareRobustCommand{\lcroof}[1]{       \hbox{\vtop{\vbox{%           \hrule\kern 1pt\hbox{%             $\scriptstyle #1$%             \kern 1pt}}\kern1pt}%         \vrule\kern1pt}}     \DeclareRobustCommand{\angle}[1]{       _{\lcroof{#1}}}               \begin{align*}     s\angle{n}&=\dfrac{(1+r)^n-1}{r}\\     a\angle{n}&=\dfrac{1-\dfrac{1}{(1+r)^n}}{r}     \end{align*}      Thanks for any help.


title: Where does TeXworks store list of words to be ignored by the spell checker

text: Where does TeXworks store words selected to be ignored by the spell checker? I am using TeXworks 0.4.5 r1280 (MiKTeX 2.9 64-bit) on Win7 Enterprise 64-bit, with the Hunspell dictionary en_AU (C:\Program Files\MiKTeX 2.9\hunspell\dicts). Although I have selected several words to be ignored by the spell checker none of the hunspell dictionaries have been updated in several months. Thus I am wondering where does TeXworks store the list of words to be ignored by the spell checker?


title: shortening of braces (or padding tikz brace decorations)

text: Feels a bit weird doing this, but I found this unanswered question: PGF and TikZ (mailing list) - shortening of braces, and as I'm interested in the answer, I'll repost: > many times i need to give some description to groups of successive > (rectangle) shapes, i.e. something like this: [below]   >  where i like to have small space between successive braces without changing > braces coordinates. so i try to use shorten, but result is only partly > satisfactory... (see braces C and D). well, if i set shorten to 0.5 points, > braces look perfectly, but distance between them is little to small. > > do anyone has better solution? Here is the output of the example: ![test41](http://i.stack.imgur.com/KPDI2.png) I have added the red brace as an example of a preferred solution (for me), where it has 1 pt "padding"; the `shorten`ed braces are below it, and they don't look that good. The red brace looks OK, but it is achieved with `calc` and manually offsetting the end points, which for me is somewhat tedious to type. So, is there a better way of achieving a "shortened" or "padded" brace? Here is the MWE (with the red brace modification):               \documentclass[tikz]{standalone}     \usetikzlibrary{decorations.pathreplacing}     \usetikzlibrary{calc}     \begin{document}     \begin{tikzpicture}[     box/.style = {draw, minimum size=9pt,inner sep=1pt, outer sep=0pt, right},     brc/.style = {decorate, decoration={brace,raise=1mm}},     shorten <>/.style = {shorten >=#1pt, shorten <=#1pt}                          ]     \coordinate (a0) at (0,0);     \foreach \x [count=\xi from 0] in {1,...,4}        \node[box] (a\x) at (a\xi.east) {\x};     \draw[brc] (a1.north west) to node[above=2mm] {A} (a2.north east);     \draw[brc] (a3.north west) to node[above=2mm] {B} (a4.north east);     \def\brcpad{1pt}     \draw[brc, draw=red, decoration={raise=0.5mm}] ($(a2.south east)+(-\brcpad,0pt)$) -- ($(a1.south west)+(\brcpad,0pt)$);     \draw[brc,shorten <>=1] (a2.south east) to node[below=2mm] {C} (a1.south     west);     \draw[brc,shorten <>=1] (a4.south east) to node[below=2mm] {D} (a3.south     west);     \end{tikzpicture}     \end{document}


title: Centering of image does not work

text: I have used `\centering` but still the picture is aligned to the right and leaves too much space above it. This is my code:               \begin{figure}[t]     \centering     \includegraphics[scale=0.01]{image-000.jpg}     \caption{...}     \label{overflow}     \end{figure}


title: No shape is known for just created foreach nodes

text: This can be similarly formulated to Why are just-created TikZ shapes "unknown"?; but its slightly different. Here is the MWE:               \documentclass[%     12pt,     journal,     onecolumn,     twoside,     draftcls,     letterpaper,     ]{IEEEtran}          \usepackage{adjustbox}     \usepackage{setspace}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{shapes}     \usetikzlibrary{shapes.geometric}     \usetikzlibrary{positioning}     \usetikzlibrary{decorations}     \usetikzlibrary{decorations.markings}     \usetikzlibrary{decorations.pathreplacing}          \begin{document}     \singlespacing     \begin{adjustbox}{width=1.0\textwidth}% fbox,     \begin{tikzpicture}     \tikzstyle{bb} = [draw,line width=1pt]     \tikzstyle{brdec} = [thick, decoration={ brace, mirror, amplitude=8pt, raise=8pt }, decorate]%     \tikzstyle{brdecn} = [pos=0.5,anchor=north,yshift=-1.5em]%          \foreach \a/\b in {       0/t1,       1/t2,       2/t3,       3/t4,       4/t5,       5/t6,       6/t7,       7/t8     } {       \typeout{1st loop; name is: bn\a};       \node[bb] (bn\a) at (\a,0) {\b};     };          \foreach \a/\b/\c in {       0/x1/0,       2/x2/1,       4/x3/2,       6/x4/3     } {       \pgfmathtruncatemacro{\next}{\a+1} % returns int       \typeout{2nd loop; name is: brz\c};       \draw[brdec] (bn\a.south west) -- (bn\next.south east)         node[brdecn] (brz\c) {\b};     };          \foreach \a/\b/\c in {       0/0/z1,       2/1/z2     } {       \pgfmathtruncatemacro{\next}{\a+1} % returns int       \typeout{3rd loop; name is: brf\b};       \draw[brdec] (brz\a.south west) -- (brz\next.south east)         node[brdecn] (brf\b) {\c};     };          \end{tikzpicture}     \end{adjustbox}     \end{document}      The output from `pdflatex` is this:               ...ABD: EveryShipout initializing macros     1st loop; name is: bn0     1st loop; name is: bn1     1st loop; name is: bn2     1st loop; name is: bn3     1st loop; name is: bn4     1st loop; name is: bn5     1st loop; name is: bn6     1st loop; name is: bn7     2nd loop; name is: brz0     2nd loop; name is: brz1     2nd loop; name is: brz2     2nd loop; name is: brz3      3rd loop; name is: brf0     3rd loop; name is: brf1          ! Package pgf Error: No shape named brz3 is known.          See the pgf package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.63 }           ;      Note that `brz3` should be, in fact, created (and the typeout shows that the problem is not floating point numbers, like in the solution for the question cited above) - and there are no problems referencing other nodes; in fact, if I instruct `pdflatex` to keep going after this error, I get this: ![test31.png](http://i.stack.imgur.com/nH3WN.png) Does anyone have an idea what is going on, and how to solve this problem? * * * EDIT: Many thanks to @alexwlchan, however, if I add commas after the first two loops (`7/t8,` and `6/x4/3,`), I get this: ![test32.png](http://i.stack.imgur.com/Xpz1T.png) Adding a comma to the third loop (`2/1/z2,`) adds an additional rotated brace. I think with an additional comma, `tikz` runs one more iteration of the loop, but with empty arguments, thereby resulting with the extra erroneous brace. Any way to fix this?


title: Changing cite name in .bib files generated from Mendeley

text: I would like to customize the code names of the articles I cite since AuthorDate does not work for me. I usually give specific names to every paper because I often cite up to 6 papers from same author. The problem is that Mendeley keeps renaming the citing code words periodically (updating the .bib file). Is there a way to change this? I would like to keep the code names I personally create since i can easily remember them which makes the writing faster. Thanks


title: TiKz and \pgfmathifthenelse

text: Does anybody know why, with the following code, I do not get my blue line go from (0,0) to (0.5,0)? To me, the abscissa 1 should be multiplied by 0.5, given by `\pgfmathresult`, result of the condition `\pgfmathifthenelse` but that is not the case...               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{positioning}     \usetikzlibrary{calc}          \newcommand{\origin}{     \node (O) at (0,0){$\times$};     \node at (1,0){$\times$};     \node at (O){O};}          \begin{document}     \begin{tikzpicture}     \origin     \pgfmathifthenelse{1}{"0.5*"}{}     \draw[blue] (0,0)--++(\pgfmathresult1,0);     \end{tikzpicture}     \end{document}


title: How to set BibTeX bibliography title?

text: Currently my bibliography says "Literatur" (german). But I want something completely different there. How can I achieve that?


title: Alignment using an alignat{2} environment

text: In the following code, I have the appropriate alignment. All the equal signs are aligned. There is one expression that is written on two lines; I wanted the first plus signs aligned. I used an `aligned[t]` environment to get this. How do I get this using an `alignat{2}` environment?               \documentclass[draft,a4paper,landscape]{amsart}     \usepackage{}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{newlfont}     \usepackage{mathtools,array}          \begin{document}          \noindent $a = x_{1} + iy_{1}$ and $z = x_{2} + iy_{2}$.     \begin{align*}     \big\vert 1 - \overline{a}z \big\vert^{2} &= \big\vert 1 - x_{1}x_{2} - y_{1}y_{2} + i(x_{1}y_{2} - x_{2}y_{1}) \big\vert^{2} \\     &= \begin{aligned}[t]1 &+ {x_{1}}^{2}{x_{2}}^{2} + {y_{1}}^{2}{y_{2}}^{2} - 2x_{1}x_{2} - 2y_{1}y_{2} + 2x_{1}x_{2}y_{1}y_{2} \\     &+ {x_{1}}^{2}{y_{2}}^{2} + {x_{2}}^{2}{y_{1}}^{2} - 2x_{1}x_{2}y_{1}y_{2}     \end{aligned} \\     &= \begin{aligned}[t]1 + {x_{1}}^{2}{x_{2}}^{2} + {y_{1}}^{2}{y_{2}}^{2} - 2x_{1}x_{2} - 2y_{1}y_{2} + {x_{1}}^{2}{y_{2}}^{2} + {x_{2}}^{2}{y_{1}}^{2}     \end{aligned} \\     &= \begin{aligned}[t]1 + ({x_{1}}^{2} + {y_{1}}^{2}) ({x_{2}}^{2} + {y_{2}}^{2}) - 2x_{1}x_{2} - 2y_{1}y_{2} ,     \end{aligned}     \intertext{and}     \vert z - a \vert^{2} &= \mathmakebox[0pt][l]{\vert x_{2} - x_{1} + i(y_{2} - y_{1}) \vert^{2}} \\     &= {x_{1}}^{2} + {x_{2}}^{2} + {y_{1}}^{2} + {y_{2}}^{2} - 2x_{1}x_{2} - 2y_{1}y_{2} .     \end{align*}          \end{document}


title: Enclosing Page Numbers using the `Backref=Pages` Extension of `Hyperref`

text: I'm using the `backref=pages` extension of the `hyperref` package, as I'd like to have a list of back-reference pages after my bibliographic items. Is there a way to enclose these page numbers in brackets like "[2]" instead of just having the number (without enclosure)? For example, I'd like for a `bibitem` to appear as > [1] Witten, E., The Theory of Everything, Any Journal, Volume, Pages (Year) > [pg. 1], [pg. 2]


title: \alert within align in Beamer

text: I am trying to use `alert` within the AMS-math `align` environment, so that sets of equations uncover sequentially and are highlighted. I would expect something like this to work:               \begin{align}     \alert<1>{a &= b+c} \\     \alert<1>{a &= b+c} \\ \pause     \alert<2>{a &= b+c} \\     \alert<2>{a &= b+c} \\     \end{align}      by highlighting the first two equations in the first slide and the next two in the next slide. I am doing something wrong? Or is there a different way to get this to work?


title: How to write properly multiple authors in bibtex file?

text: I use Jabref to store all articles i need and bibtex4word add-on (in MS Word) to maintain the reference list. So, i would like to know hot to fill properly the "author" field in Jabref with multiple authors to appear them correct in the reference list. For example, i've got the article with several authors: E. Orti, J.L. Bredas, C. Clarisse And i would like them to appear in this manner. But instead i get this: C. C. E. Orti, J. L. Bredas Thanks in advance.


title: Need help formatting moderncv \cventry

text: I am working on a CV in latex and for the most part I have achieved what I am trying to accomplish but for the life of me I cant figure out how to correctly format what I am going after. Specifically, I am using `moderncv` and am editing a `\cventry` but I only want to write the paragraph and leaving the first parameters blank outputs two commas. Also I am working on a two column bulleted list but am having trouble indenting the list to be flush with the paragraph above and creating a second parallel list. If any knowledgeable people regarding latex would lend an extra pair of eyes, it would be much appreciated. Here's what I am referring to: ![1](https://whatimg.com/i/Pu1Rbp.png) ![2](https://whatimg.com/i/KTe9e7.png)


title: How can I create a diagram to compare skyline operation results using LaTeX?

text: I'm trying to draw this but except for the straight lines in this diagram I'm not able to place other things such as square and circle properly. How can I do this? Help much appreciated. ![example of what I would like to achieve](http://i.stack.imgur.com/2D669.png) EDIT: Since MWE is asked I'll post here my code and update it as and when I get close to the picture above.               \documentclass{minimal}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[y=.2cm, x=.7cm,font=\sffamily]         \draw (0,0) -- coordinate (x axis mid) (10,0);         \draw (0,0) -- coordinate (y axis mid) (0,30);     \end{tikzpicture}     \end{document}


title: CJK inside a math environment

text: I'm trying to display CJK characters as part of math formulae in XeLaTeX, and it's not working well. I've tried a number of options, and all have failed:   * Defining a `\jp` font command via `fontspec` and then using `\text{\jp{character}}`. This gives me an undefined control sequence error.   * Using `fontspec`'s `\setmathfont`. This also gives me an undefined control sequence error.   * Using the `unicode-math` package with `\setmathfont[range="4E00-"2FA1F]{font}` \- depending on the range, CJK characters either still display as the 'unavailable character' box or simply disappear A minimal failing example:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{CMU Serif}     \newfontfamily\jp{TakaoPGothic}     \usepackage{unicode-math}     \setmathfont[range="96E2]{TakaoPGothic} % the code for this particular character     \setmathfont{CMU Serif}     \begin{document}          $離$     \jp{離}          \end{document}      This produces a missing-character box on the first line, and rightly outputs 離 on the second. Is there any good way to do this?


title: making a table fit on a page by moving it left

text: I have a table where the last columns fall off the page. Instead of making the text smaller I would like the table to not adhere to the margin of where it begins. I would like to move it to the left. I am using `flushleft`, which is not working. Here is the code:               \begin{figure}     \begin{flushleft}     \begin{tabular}{l|l|l|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}     \multicolumn{21}{l}{a)text}\\ \hline         & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10& 11& 12& 13& 14& 15& 16& 17& 18& 19& 20\\ \hline     day1&9.2&8.6&8.1&6.3&7.7&7.3&8.0&8.4&5.9&6.8&7.3&7.6&9.0&7.4&6.6&7.0&5.3&7.0&8.0&5.2\\     day2&6.7&6.9&0&7.0&0&8.1&9.0&6.1&0&6.9&0&7.3&7.8&5.3&0&8.9&0&8.4&8.4&7.5\\     day3&0&5.2&0&0&7.5&0&0&8.2&0&0&5.4&0&0&8.3&0&0&7.7&0&0&7.3     \end{tabular}     \end{flushleft}     \caption{\label{fig:text}text experiment}     \end{figure}      What can be modified? What possible solutions exist?


title: updmap fails to create 10local.cfg

text: i encountered a strange behaviour of **updmap** with texlive 2009-13: When I try to enabe map files with updmap(-sys) (or run getnonfreefonts(-sys), the program exits silently. Even with a complete new install. It took me some time to work out why. The problem occurs if the file /etc/texmf/updmap.d/10local.cfg does not exist already. The responsible line in the debianize-updmap file is:               localfile="`ls $debDirname/*local*cfg 2>/dev/null`"      The funny thing is, that with my old version everything was ok. I guess the problem is the added line               set -e      which causes the script to exit if the ls does not find a file and thus returns exit code 2. I wonder that i have not found anything about this in the internet yet. Has anyone else encountered this problem, too? Or knows any other solution? I temporary solved it for me by commenting out set -e.


title: Incompatibility of scrbook and fontspec in TeX-Live 2013

text: Since updating to TeX-Live 2013 I am facing the following error: Compiling the following file by XeLaTeX ...               \documentclass{scrbook}     \usepackage{fontspec}     \begin{document}      bla     \end{document}      ... ends up with               ! Undefined control sequence.     <argument> \str_if_eq_x_p:nn           l.5 \end{document}      Replacing scrbook by scrartcl or scrreprt works smoothly. Also in my old TeX- Live 2012 installation the problem does not occur.


title: How to make biblatex persistent choice in kile for Bibliography settings?

text: In kile, there is a setting: `LaTeX -> Bibliography -> Settngs -> Settings for biblatex` I would like to know the following regarding this setting: (a) what does it do? (because there doesn't seem to be any difference between choosing bibtex and biblatex); and (b) assuming (a) does something useful to me, to make the selection of biblatex persistent across different kile sessions. AFAIK, I need to set it afresh each time I open up kile.


title: table with monospaced and nonbreaking spaces

text: I have a xtable generated in R/Sweave that I would like displayed in portrait mode in a pdf. The spaces in the spacedSeq should properly align the sequences. How can I force this to be in a monospace font. I can use XeteX if necessary but I don't know what fonts are available to me from my TeXlive installation on OS X. a subset of the table below:               % latex table generated in R 2.13.0 by xtable 1.5-6 package     % Tue Nov  1 13:53:39 2011     \begin{table}[ht]     \begin{center}     \begin{tabular}{rlllrrrrrr}       \hline      & rname & spacedSeq & edits & RB494N & RB494T & RB495N & RB495T & RB498N & RB498T \\        \hline     1 & hsa-let-7a-1 &      AGAGGTAGTAGGTTGTATAA & 6:T 25:G &   1 &   0 &   0 &   0 &   0 &   0 \\        2 & hsa-let-7a-1 &      AGAGGTAGTAGGTTGTATAGT & 6:T &   7 &   5 &  21 &   4 &   5 &   2 \\        3 & hsa-let-7a-1 &      AGAGGTAGTAGGTTGTATAGTT & 6:T &  14 &  16 & 113 &  20 &  30 &   4 \\        4 & hsa-let-7a-1 &      AGAGGTAGTAGGTTGTATAGTTA & 6:T 28:T &   2 &   1 &   8 &   0 &   0 &   0 \\        5 & hsa-let-7a-1 &      AGAGGTAGTAGGTTGTATAGTTG & 6:T 28:T &   1 &   0 &   1 &   1 &   1 &   0 \\        6 & hsa-let-7a-1 &      AGAGGTAGTAGGTTGTATAGTTGT & 6:T 28:T &   1 &   0 &   0 &   0 &   0 &   0 \\        7 & hsa-let-7a-1 &      AGATGTAGTAGGTTGTATAGT & 6:T 9:G &   1 &   0 &   2 &   0 &   0 &   0 \\        8 & hsa-let-7a-1 &        AGGTAGTAGGTTGTATAGT &  &   5 &   0 &   0 &   0 &   8 &   1 \\        9 & hsa-let-7a-1 &        AGGTAGTAGGTTGTATAGTTT &  &   1 &   0 &   0 &   0 &   0 &   0 \\        10 & hsa-let-7a-1 &        AGGTAGTGGGTTGTATAGT & 15:A &   1 &   0 &   0 &   0 &   0 &   0 \\         \hline     \end{tabular}     \end{center}     \end{table}


title: How can one insert an arrow on the z-axis of a ternary diagram to indicate increasing order of the element on this axis?

text: I need help on how I can insert `X_{Bi}` and a `rightarrow` on the z-axis of each of the `subfigures` in my ternary diagram. `X_{Bi}` implies `X` subscript `Bi` while `rightarrow` is as in LaTeX to indicate that `Bi` on the z-axis is increasing from left to right. In the example shown below I want to use a `rightarrow` placed in front or at the top of `X_{Bi}` to show that `X_{Bi}` is increasing from 0 to 1.0 in each of the two figures.               \documentclass{article}     \usepackage{pgfplots,subcaption}     \usepgfplotslibrary{ternary}     \pgfplotsset{compat=1.8}     %     \begin{document}     \begin{figure}%     \begin{subfigure}{\columnwidth}\centering       \begin{tikzpicture}         \begin{ternaryaxis}[                ternary limits relative=false,                width=7.5cm,                height=7.5cm,                ymax=1.0,                no markers,     %           clip=false,     %         disabledatascaling,                minor tick num=1,                grid=both,                xlabel=Sn,                xlabel style={                 at={(axis cs:1,0,0)},                 anchor=south                },                ylabel=Sb,                ylabel style={                 at={(axis cs:0,1,0)},                 anchor=10                },                zlabel=Bi,                zlabel style={                 at={(axis cs:0,0,1)},                 anchor=north west                },         ]              \addplot3 [black,dashed] coordinates {            (0.9047, 0.0953, 0.0000)                  (0.9019,   0.0883, 0.0098)                  (0.8993,   0.0806, 0.0201)                  (0.8969,   0.0722, 0.0309)                  (0.8950,   0.0630, 0.0420)                  (0.8936,   0.0532, 0.0532)                  (0.8929,   0.0428, 0.0643)                  (0.8930,   0.0321, 0.0749)                  (0.8938,   0.0212, 0.0850)                  (0.8953,   0.0105, 0.0942)                  (0.8975,   0.0000, 0.1025)         };              \addplot3 [black,dashed] coordinates {             (0.8209,    0.1791, 0.0000)                   (0.8131,  0.1682, 0.0187)                   (0.8054,  0.1557, 0.0389)                   (0.7980,  0.1414, 0.0606)                   (0.7913,  0.1252, 0.0835)                   (0.7859,  0.1071, 0.1071)                   (0.7823,  0.0871, 0.1306)                   (0.7810,  0.0657, 0.1533)                   (0.7822,  0.0436, 0.1742)                   (0.7859,  0.0214, 0.1927)                   (0.7917,  0.0000, 0.2083)         };              \addplot3 [black,dashed] coordinates {                 (0.7439,    0.2561, 0.0000)          (0.7313,   0.2418, 0.0269)          (0.7186,   0.2251, 0.0563)          (0.7060,   0.2058, 0.0882)          (0.6942,   0.1835, 0.1223)          (0.6841,   0.1580, 0.1580)          (0.6767,   0.1293, 0.1940)          (0.6729,   0.0981, 0.2290)          (0.6734,   0.0653, 0.2613)                 (0.6777,    0.0322, 0.2901)                 (0.6848,    0.0000, 0.3152)         };       \end{ternaryaxis}     \end{tikzpicture}     \caption{First Image}     \label{fig:a:first}     \end{subfigure}     \begin{subfigure}{\columnwidth}\centering     \begin{tikzpicture}       \begin{ternaryaxis}[                ternary limits relative=false,                width=7.5cm,                height=7.5cm,                ymax=1.0,                no markers,     %           clip=false,     %         disabledatascaling,                minor tick num=1,                grid=both,                xlabel=Sb,                xlabel style={                 at={(axis cs:1,0,0)},                 anchor=south                },                ylabel=Sn,                ylabel style={                 at={(axis cs:0,1,0)},                 anchor=10                },                zlabel=Bi,                zlabel style={                 at={(axis cs:0,0,1)},                 anchor=north west                },       ]              \addplot3 [black,dashed] coordinates {            (0.9047, 0.0953, 0.0000)                  (0.9019,   0.0883, 0.0098)                  (0.8993,   0.0806, 0.0201)                  (0.8969,   0.0722, 0.0309)                  (0.8950,   0.0630, 0.0420)                  (0.8936,   0.0532, 0.0532)                  (0.8929,   0.0428, 0.0643)                  (0.8930,   0.0321, 0.0749)                  (0.8938,   0.0212, 0.0850)                  (0.8953,   0.0105, 0.0942)                  (0.8975,   0.0000, 0.1025)         };              \addplot3 [black,dashed] coordinates {             (0.8209,    0.1791, 0.0000)                   (0.8131,  0.1682, 0.0187)                   (0.8054,  0.1557, 0.0389)                   (0.7980,  0.1414, 0.0606)                   (0.7913,  0.1252, 0.0835)                   (0.7859,  0.1071, 0.1071)                   (0.7823,  0.0871, 0.1306)                   (0.7810,  0.0657, 0.1533)                   (0.7822,  0.0436, 0.1742)                   (0.7859,  0.0214, 0.1927)                   (0.7917,  0.0000, 0.2083)         };              \addplot3 [black,dashed] coordinates {                 (0.7439,    0.2561, 0.0000)          (0.7313,   0.2418, 0.0269)          (0.7186,   0.2251, 0.0563)          (0.7060,   0.2058, 0.0882)          (0.6942,   0.1835, 0.1223)          (0.6841,   0.1580, 0.1580)          (0.6767,   0.1293, 0.1940)          (0.6729,   0.0981, 0.2290)          (0.6734,   0.0653, 0.2613)                 (0.6777,    0.0322, 0.2901)                 (0.6848,    0.0000, 0.3152)         };          \end{ternaryaxis}       \end{tikzpicture}     \caption{Second Image}     \label{fig:a:second}     \end{subfigure}     \caption{Isoactivity curves}%     \end{figure}          \end{document}


title: TikZ table text alignment

text: I'm having trouble aligning text inside a TikZ table. It currently just centres the middle letter, despite the align=left. I also tried using:               row 1/.style={nodes={align=left}}      (as suggested in Creating table using TikZ matrix) ![Table text alignment](http://i.stack.imgur.com/K4qbg.png)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix,positioning}     \usetikzlibrary{calc}     \usetikzlibrary{decorations.pathmorphing}          \tikzset       {          table/.style={matrix of nodes,                       row sep=-\pgflinewidth,                       column sep=-\pgflinewidth,                       nodes={rectangle,                              draw=black,                              text width=2ex,                              align=left,                              minimum width=1.5cm                             },                       text depth=0.25ex,                       text height=2ex,                       nodes in empty cells                      },         texto/.style={font=\footnotesize\sffamily},         title/.style={font=\small\sffamily},         my top text/.style={font=\small\sffamily},         my bottom text/.style={font=\sffamily\footnotesize}       }          \newcommand\CellText[2]{%       \node[texto,left=of mat#1,anchor=east]       at (mat#1.west)       {#2};     }          \newcommand\SlText[2]{\node[my top text,anchor=base] at ($(mat#1.north)+(0,1.0ex)$) {#2};}     \newcommand\SIundertext[2]{\node[my bottom text,anchor=base] at ($(mat#1.south west)-(0,2.0ex)$) {#2};}          \newcommand\RowTitle[2]{%     \node[title,left=6.3cm of mat#1,anchor=west]       at (mat#1.north west)       {#2};     }     \begin{document}          \begin{tikzpicture}[node distance=0pt and 0.5cm]            \matrix[table] (mat11) {  1,53& |[draw=none,alias=gap A]| & 22 & 22 & 22,24  & |[draw=none,alias=gap B]| & 1 \\ };            \foreach \x/\y in {1/$0$,                          3/$h-1$,                          4/$h$,                          5/$h+1$,                          7/$b$}       { \SlText{11-1-\x}{\y} }            \foreach \x/\y in {1/$0$,                          2/$\epsilon$,                          3/$(h-2)\epsilon$,                          4/$(h-1)\epsilon$,                          5/$h\epsilon$,                          6/$(h+1)\epsilon$,                          7/$\xi\epsilon$}         { \SIundertext{11-1-\x}{\y} }         \node at (mat11-1-2.center) {$\ldots$};         \node at (mat11-1-6.center) {$\ldots$};         \node[my bottom text] at ($(mat11-1-7.south east)-(0,1.5ex)$) { $(\xi+1)\epsilon$ };            %% create ragged edges for ellipsis in time line       \coordinate (intrusion for box)     at (1.75ex,   0  );       \coordinate (vertical border adj)   at (  0  , 0.2pt);       \coordinate (horizontal border adj) at (0.2pt,   0  );            \foreach \x in {A,B}{       \draw ($(gap \x.south west)+(intrusion for box)+(vertical border adj)$)     --              ($(gap \x.south west)+(horizontal border adj)+(vertical border adj)$) --             ($(gap \x.north west)+(horizontal border adj)-(vertical border adj)$) --             ($(gap \x.north west)+(intrusion for box)-(vertical border adj)$);                                                                                \draw [decorate,decoration={zigzag,segment length=4pt,amplitude=2pt}]                                                                                ($(gap \x.north west)+(intrusion for box)-(vertical border adj)$) --             ($(gap \x.south west)+(intrusion for box)+(vertical border adj)$);            \draw ($(gap \x.south east)-(intrusion for box)+(vertical border adj)$)     --              ($(gap \x.south east)-(horizontal border adj)+(vertical border adj)$) --             ($(gap \x.north east)-(horizontal border adj)-(vertical border adj)$) --             ($(gap \x.north east)-(intrusion for box)-(vertical border adj)$);       \draw [decorate,decoration={zigzag,segment length=4pt,amplitude=2pt}]                                                                                ($(gap \x.north east)-(intrusion for box)-(vertical border adj)$) --             ($(gap \x.south east)-(intrusion for box)+(vertical border adj)$);       }            \node[my top text,anchor=base east]    at ($(mat11-1-1.north west)-(2ex,0)+(0,1.0ex)$) {Bin};       \node[my bottom text,anchor=base east] at ($(mat11-1-1.south west)-(2ex,0)-(0,2.0ex)$) {Time};       \node[title,anchor=east]          at ($(mat11-1-1.west)-(1.5cm,0)$) {Vehicle $k$};          \end{tikzpicture}     \end{document}      Previous question where I was very kindly helped to this point can be found in TikZ table with floating labels + time discontinuity.


title: Conflict between glossaries and siunitx (possibly via hyperref) when defining color

text: I'm in the process of writing my thesis which has a large glossary. The hyperref and glossaries package allow for linking and colouring the references, which is great. Unfortunately the large number of coloured entries is visually overwhelming. To circumvent this I edited the \glsdisplayfirst and \glsdisplay commands as follows,               \renewcommand*{\glsdisplayfirst}[4]{\textcolor{blue}{#1}#4}     \renewcommand*{\glsdisplay}[4]{\textcolor{black}{#1}#4}      which works effectively for \gls, \Gls and \GLS. This allows the first use of the glossary entry to be coloured differently to all subsequent uses. In this case the first entry is "blue" and the rest match the colour of the body text (BLACK). I arrived at these commands mostly by trial and error. Unfortunately when I add the siunitx package \Gls and \GLS building the document returns the following error.               ! Argument of \@declaredcolor has an extra }.     <inserted text>                      \par      l.55 ...lised versions: 1) first letter \Gls{tla},                                                        and 2) entire word \GLS{t...      The conflict seems independent of where the \usepackage{siunitx} statement is located in the preamble. There does not appear to be a reference to @definecolor in siunitx.sty. \usepackage{siunitx} is commended out in the worked example below, uncomment to produce the error. Although I'm familiar with LaTeX, this is definitely beyond my experience. I'm not sure where to start resolving this issue, any help would be appreciated. **A separate and minor issue:** using the command \newacronym disables the two edited commands (\glsdisplayfirst and \glsdisplay) reverting all glossary entries to their original colour "red". Although this is an issue I can work around by only using \gls, any insight into why this happens would also be helpful. Code to test this issue is commented out in the worked example below. **Worked example**               % document must be saved as "document.tex" for the makeindex command.     \documentclass[a4paper]{scrbook}     % \usepackage{siunitx}          % Colour     \usepackage{color}     \usepackage{xcolor}         % black must be capitalised due to the way glossaries works         \definecolor{BLACK}{RGB}{0,0,0}          % Hyperlinks     \usepackage{hyperref}         \hypersetup{colorlinks = true}          % Glossary     \usepackage[toc]{glossaries}         % define the colour of the first instance         \renewcommand{\glsdisplayfirst}[4]{\textcolor{blue}{#1}}         % define the colour of all subsequent instances         % as the subsequent entries are capitalised the colour BLACK must be defined         \renewcommand{\glsdisplay}[4]{\textcolor{black}{#1}}          % the following code automates the makeindex process     % borrowed from http://www.freiheitsfreund.de/2010/10/automatically-run-makeindex-from-within-a-latex-document-with-write18/     \def\execute{%     \begingroup     \catcode`\\=12     \executeaux}     \def\executeaux#1{\immediate\write18{#1}\endgroup}     \execute{makeindex -s document.ist -t document.glg -o document.gls document.glo}          \makeglossaries          %-------------------------     \begin{document}          \newglossaryentry{tla}{         name={TLA},         description={Three Letter Acronym},         first={Three Letter Acronym (TLA)}         }          %\newacronym{ana}{ANA}{A New Acronym}          Following is an example of a \gls{tla}.     Repeated again to demonstrate the desired change in colour at subsequent use \gls{tla}.     Again using the capitalised versions: 1) first letter \Gls{tla}, and 2) entire word \GLS{tla}.          %Using the newacronym command \gls{ana}, \Gls{ana} and \GLS{ana}          \printglossaries     \end{document}      Thanks in advance for your help. **EDIT** The second \renewcommand that is causing the issues. By removing it and placing the statement \hypersetup{linkcolor=black} after the table of contents (in my own example) I have been able to achieve the same result without the siunitx conflict; avoiding the problem rather than solving it.


title: How to place algorithm outside float?

text: Is there any elegent way to place algorithm without using `algorithm` environment?


title: Glossaries Capitalize Every First Letter

text: How can I get the `\Gls{...}` command to capitalize the first letter of **EACH** word, not just the first word?               \documentclass[a4paper,12pt]{article}          \usepackage{glossaries}          \newacronym{tla}{TLA}{three lettered acronym}     \makeglossaries          \begin{document}     \glsfirst{tla}          \Glsfirst{tla}          \end{document}


title: moving the whole word to next line when there is no free space

text: Is there any option in tabular that can move the whole word to the next line whenever the length of the word is greater than the fixed cell size? Currently I use               \begin{tabular}{ | p{2cm} | }      And that results in this format               +---------+     | First t-|     | hing    |     +---------+      However I am looking for this shape               +---------+     | First   |     | thing   |     +---------+


title: How can I get epigrapf on a page without `1.1 TITLE` left over from the previous section?

text: Epigraph would appear on a page under the previous section's heading in the MWE below:               \documentclass{memoir}     %\usepackage{epigraph}     \usepackage{lipsum}          \begin{document}         \chapter{preface}         \section{title}         \lipsum              \clearpage         \epigraph{text}{source}              \chapter{main chapter}         \lipsum     \end{document}      Is it possible to remove the section heading from that page? ![enter image description here](http://i.stack.imgur.com/4Ai9s.png)


title: "I can't find file `pgfutil-common-lists.tex'." after update

text: I've just did an update.               $ sudo tlmgr update --self     tlmgr: package repository http://sunsite.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/systems/texlive/tlnet     tlmgr: saving backups to /usr/local/texlive/2013/tlpkg/backups     tlmgr: no updates for tlmgr present.     tlmgr: no updates available     $ sudo tlmgr update --all     [...]     [108/109, 06:49/06:49] update: collection-pictures [1k] (32769 -> 33307) ... done     [109/109, 06:51/06:51] update: collection-publishers [1k] (32864 -> 33330) ... done     tlmgr: package log updated: /usr/local/texlive/2013/texmf-var/web2c/tlmgr.log     running mktexlsr ...          mktexlsr failed (status -1), output:          running mtxrun --generate ...          mtxrun --generate failed (status -1), output:          Can't exec "kpsewhich": No such file or directory at ./tlmgr line 679.     Use of uninitialized value $TEXMFSYSVAR in scalar chomp at ./tlmgr line 679.     Can't exec "kpsewhich": No such file or directory at ./tlmgr line 680.     Use of uninitialized value $TEXMFSYSCONFIG in scalar chomp at ./tlmgr line 680.     Can't exec "kpsewhich": No such file or directory at ./tlmgr line 681.     Use of uninitialized value $TEXMFLOCAL in scalar chomp at ./tlmgr line 681.     Can't exec "kpsewhich": No such file or directory at ./tlmgr line 682.     Use of uninitialized value $TEXMFDIST in scalar chomp at ./tlmgr line 682.     Use of uninitialized value $TEXMFDIST in concatenation (.) or string at ./tlmgr line 693.     Can't exec "kpsewhich": No such file or directory at /usr/local/texlive/2013/tlpkg/TeXLive/TLUtils.pm line 2785.     Use of uninitialized value $tmfsysconf in scalar chomp at /usr/local/texlive/2013/tlpkg/TeXLive/TLUtils.pm line 2785.     Use of uninitialized value $tmfsysconf in concatenation (.) or string at /usr/local/texlive/2013/tlpkg/TeXLive/TLUtils.pm line 2786.     Cannot open /web2c/updmap.cfg for writing: No such file or directory at /usr/local/texlive/2013/tlpkg/TeXLive/TLUtils.pm line 2928.      Then I run `mtxrun --generate` which seemed to work. Then I've tried to compile this file and got:               (/usr/local/texlive/2013/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex)     (/usr/local/texlive/2013/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.te     x     ! I can't find file `pgfutil-common-lists.tex'.     l.556 \input pgfutil-common-lists.tex          (Press Enter to retry, or Control-D to exit)     Please type another input file name:      When I enter `/usr/local/texlive/2013/texmf- dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex` it seems to work until it gets to `pgfmathfunctions.integerarithmetics.code.tex` which it also doesn't find. As one other question with the same problem had problems with the path, I checked it (added breaks to make it easier to read):               $ echo $PATH     /usr/local/texlive/2013/bin/x86_64-linux:     /usr/local/texlive/2013/bin/x86_64-linux:     /usr/local/texlive/2013/bin/x86_64-linux:     /usr/local/texlive/2013/bin/x86_64-linux:     /usr/local/texlive/2013/bin/x86_64-linux:     /usr/local/sbin:/usr/local/bin:     /usr/sbin:/usr/bin:/sbin:/bin:/usr/games:     /usr/local/games      I don't know why TexLive is there 5 times, but that should not be a problem (?) Before the update, I had pgfplot 1.09. Can anybody please tell me how to fix this problem?


title: Author Citations

text: I'm working on a paper for a course and I found a citation style that closely mimics the one that the instructor wants us to use the only problem is that I need it to have a comma after the journal name. I am using the following style here - http://www.ctan.org/pkg/nar \- does anyone know how to do so? This way I could avoid custom making my own citation style.


title: Superflous vertical spacing after tagging environment

text: I would like to use the `tagging` package to tag parts of a document, which not only contain text, but also other environments like `enumerate`. If I use the `taggedblock`-environment for this, this creates additional vertical space after the `taggedblock`, see the minimal example below. Is there any way to avoid that? This effectively ruins the layout of my document. :/ One solution would be to replace the `taggedblock`-environment by the `\tagged`-command, but I don't want to do that, since the parts of the documents are quite large and every time I forget a `}` to close the `\tagged`-command it becomes a mess.               \documentclass{scrartcl}          \usepackage{tagging}          \usetag{mytag}          \begin{document}          %a tagged block     \begin{taggedblock}{mytag}     \begin{enumerate}         \item          foo         \item         bar     \end{enumerate}     \end{taggedblock}     %here you have additional vertical space     \begin{enumerate}         \item          foo         \item         bar     \end{enumerate}     %here you don't      \begin{enumerate}         \item          foo         \item         bar     \end{enumerate}          \end{document}


title: How to add braces automatically after \hat (or \tilde, \bar) in emacs auctex math mode

text: When typing operators in quantum mechanics, there is a lot of stuff like "\hat{...}" going on. But in math mode, typing `apostrophe`+`^` only gives `\hat` inside math environment. How can I modify the `.emacs` file to achieve automatically adding a pair of braces after the macro and put the cursor inside the braces, like `\hat{cursor}`, as `Ctrl`\+ `C` `Ctrl`\+ `M` frac `Enter` gives `\frac{cursor}{}`. btw it would be better if the key binding ```+`^` could be reserved. I tried that is suggested in the post but have not had any luck. Thanks a lot!


title: How do I create the following macro

text: ![](http://i.stack.imgur.com/Rrm1J.png) How do I create this where `{a}{b}{c}` are variables for a possible math formula?


title: change code font using mcode package

text: I'm using `mcode` package to insert into my document matlab code. I would change the default font. what command I should use to get this font? ![enter image description here](http://i.stack.imgur.com/Zl1O6.png)


title: What options to use with pdflatex and when

text: Reading this question arara: show warnings only in the last compilation step made me realize that I can probably save some compile time by changing the options I use with `pdflatex`. For a "typical" LaTeX file that requires a processing chain like `pdflatex`, `biber`, `pdflatex`, `pdflatex` what options (e.g., synctex, draftmode, halt-on-error), should I include with `pdflatex` and when?


title: Unable to convert HTML + embedded Latex to PDF

text:
This is my code in file foo.html:               <!DOCTYPE html>          <title>Foo</title>
Example equation

     $$ 1 + 2 = 3 $$

     \[ 1 + 2 = 3 \]
                I execute this command: pandoc -f html+tex_math_single_backslash foo.html -o foo.pdf The output foo.pdf has the headings rendered properly as headings in PDF. But the LaTeX math is not rendered as math in the PDF, instead it appears verbatim (in code form) in the HTML. ![enter image description here](http://i.stack.imgur.com/8LQRe.png) How can I resolve this?


title: How can I revert to the defaults in LyX?

text: New LyX user here. How can I restore LyX to its original document defaults?* (I have tried reinstalling LyX, but that didn't work.) *I want to do this, because I want to return to the default fonts. Also, for some reason my PDF output isn't rendering (math symbols) properly and changes the font. If there is is a better way to fix these (possibly related problems) let me know.


title: Having problems aligning in a table with siunitx when using uncertainties in some power of 10

text: I'm trying to have a table, with an `S` column (from the `siunitx-package`) where the numbers are aligned to the `\pm` signifying uncertainty. Some values have uncertainties like `1.00 x 10⁴` and that seems to trip up the aligning. Here's a MWE:               \documentclass{article}     \usepackage{booktabs}     \usepackage[separate-uncertainty,bracket-numbers = false]{siunitx}          \begin{document}          \begin{table}       \begin{tabular}{S} \toprule         \num{0.37 \pm 0.07} \\         \num{0 \pm 7e-4} \\ \bottomrule       \end{tabular}     \end{table}          \end{document}      What I'd like is to see the `\pm`'s line up, so what's missing here? UPDATE: I've been searching around a little and just saw this answer answer on why `\num{}` doesn't work with S columns, by removing the `\num{}` environment however, everything after (and including) `\pm` doesn't show up in the table. This is not an improvement. Should I be thinking up another way of doing this or is there an option for this in the `siunitx-package` that I can't find?


title: Best way to write an xml tag

text: I'm writing a document about an XML schema, and I will be talking a lot of times about that `<tag1>` or that other `<tag2>`. Since I'm only mentioning them and not printing a whole XML file, it doesn't feel like a job for `listings`. I suppose using `$<tag1>$` wouldn't fit well either. So... which would be the best way of writing isolated XML tags in a document?


title: How to reduce spacing in equations?

text: I want to typeset short equations (variable = value) saving space. Is there a **global parameter** which allows to reduce the space between operators and operands in math mode? * * * I found out, that there is a negative space `\!`which could be used, but I would have to type it in each single equation, which is inefficient.               \documentclass[11pt, a4paper]{scrbook}     \usepackage[ngerman]{babel}     \begin{document}     $a_0\!\!=\!\!12{,}459$          \end{document}


title: Page numbering - removing page number from first page

text: How do you turn off page numbering from the first page in a LaTeX document?


title: Change font color of scrbook titlepage

text: I have the following code:               \documentclass[a4paper,landscape,12pt,oneside]{scrbook}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{xcolor}     \usepackage[pdfborder={0 0 0}, breaklinks=true, pdftex=true, raiselinks=true]{hyperref}          \begin{document}     \color{red}     \title{MainTitle}     \author{"author"}     \subject{Subject} \publishers{Publisher}     \titlehead{Publisher\\City}     \maketitle     \end{document}      I can set colors of everything except the subject and the title to red. Can somebody give me a tip on how to set the size of the text and the font color of the title and subject too, please?


title: Subscripts on Variables uneven

text: When I write something like               $|x_n y_n - xy|<\epsilon$      the n's in the subscripts are placed at different depths, which looks awkward in my opinion. For instance, see this post over on MathematicsSE which is where I noticed the problem (although I have run into this several times). I think it would look best to align the n's, either moving the subscript of "y" up or that of "x" down. Can this be done? And is this considered "good practice" for pure mathematics papers? Cheers!


title: Text block near image

text: I'm creating a photo address book for the community. Near the photo there are 3 text blocks 1. Names, 2. Address/phone/email and 3. native place). I want each of this blocks to be at top, center and bottom respectively. When I use every node `anchor = center`, there is equal space at and bottom of the text. But if the space is between the text blocks then it would be great. ![enter image description here](http://i.stack.imgur.com/e5JZp.jpg) Excerpt of the `tex` file is below:               \documentclass[10pt,a5paper]{book}     \usepackage{graphicx,pdfpages}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tikz}     \usepackage[T1]{fontenc}     \usepackage{mathptmx}     \usepackage{scalefnt}     \usepackage[top=15mm, bottom=15mm, left=10mm, right=10mm]{geometry}          \usetikzlibrary{positioning,shapes.geometric,%       decorations.pathreplacing,decorations.pathmorphing,shapes,%       matrix,shapes.symbols,decorations.markings,shadows}          \pagestyle{plain}     \addtolength{\oddsidemargin}{+5mm}     \addtolength{\evensidemargin}{-5mm}     \begin{document}     %\includepdfmerge{/home/chidamba/Downloads/51_nov26.pdf,-}     \setcounter{page}{3}     \scalefont{0.9}          \begin{tikzpicture}     [every node/.style={anchor=north}]     \matrix [fill={rgb:black,1;white,8}] (profile1)     {     \node [text width=44mm] {     Xxxxxxx Xxxxxxxx \\     \vspace{2ex}     \begin{raggedleft}     Xxxxxxxxx, XX 99999 \\     \vspace{2ex}     xxxxxxx@xxxxx.xxx \\     \end{raggedleft}     \vspace{2ex}     Xxxxxxxxx \\     Xxxxxxxxxxxxxx Xxxxx \\     (Xxxxxxxxxxxx) \\     }; &&     \node {      \includegraphics[width=70mm,height=50mm,keepaspectratio]{\detokenize{/home/chidamba/Downloads/pn_photos/Chettinad_house.jpg}}     }; \\      };          \matrix [fill=blue!15,below=2mm] at (profile1.south) (profile2)     {     \node {      \includegraphics[width=70mm,height=50mm,keepaspectratio]{\detokenize{/home/chidamba/Downloads/pn_photos/Chettinad_house.jpg}}     }; &&      \node [text width=44mm] {     \begin{raggedleft}     Xxxxxx Xxxxxxxxx \\     Xxxxx Xxxxxx \\     Xxxxxxxxxxx Xxxxxx Xx \\     Xxxxxx Xxxxxxxx Xxxxxx \\     Xxxxxxxxx Xxxxx \\     \end{raggedleft}     \vspace{2ex}     9999 Xxxxx Xxxxx \\     Xxxxxxxxxx, XX 99999 \\     \vspace{2ex}     (999) 999-9999 \\     xxxxxxx@xx.xxxxxxxxxxx.xxx \\     xxxxx.xxxxxx@xxxxx.xxx \\     \vspace{2ex}     \begin{raggedleft}     Xxxxxxxx \\     Xxxxxxxx Xxxxx \\     \end{raggedleft}     }; \\     };          \matrix [fill={rgb:black,1;white,8},below=2mm] at (profile2.south) (profile3)     {     \node [text width=44mm] {     Xxxxxx Xxxxxxxxxxxxxx \\     Xxxxxx Xxxxxx \\     Xxxxx \\     \vspace{2ex}     \begin{raggedleft}     99999 Xxxxxxxx Xxxxxxx \\     Xxxxxxxxx, XX 99999 \\     \vspace{2ex}     (999) 999-9999 \\     xxxxxx\_xxxxxx@xxxxx.xxx \\     xxxxxxxxxxxx@xxxxxxx.xxx \\     \end{raggedleft}     \vspace{2ex}     Xxxxxxxxx \\     Xxxxxxxxx Xxxxx \\     }; &&     \node {      \includegraphics[width=70mm,height=50mm,keepaspectratio]{\detokenize{/home/chidamba/Downloads/pn_photos/Chettinad_house.jpg}}     }; \\      };          \end{tikzpicture}     \newpage     \end{document}


title: How to format an arbitrary number of lines in interlinear text

text: I'm searching for packages for formatting interlinear text with an arbitrary number of lines. So far, it seems that the packages `gb4e`, `covington`, `expex` only format up to three aligned lines. (`covington` and `gb4e` provide `\gll`, and `\glll` but no `\gllll`, for example). I've found references to SIL's ITF software (http://www.sil.org/computing/catalog/show_software.asp?id=17) which supposedly accomplishes this, but no real instructions on usage. This task can obviously be accomplished using the tabular environment, but I'm trying to figure out if there are any established packages which provide an environment that carries out most of the dirty work.


title: bold \angstrom (perhaps in conjunction with siunitx)?

text: How can I get a bold `\angstrom` (perhaps in conjunction with `siunitx`)?               \mathbf{(\si{\angstrom})}      or               \bm{(\si{\angstrom})}      or               \boldmath{(\si{\angstrom})}      does not work. An example- I want the following in a table's column heading:               \multicolumn{4}{c}{$\bm{a}${\bfseries (\SI{}{\angstrom})}}      The above is not printing the angstrom symbol at all. The following does not make the angstrom bold.               \multicolumn{4}{c}{$\boldmath{(\SI{}{\angstrom})}$}      Though the following works in normal text.               {\bfseries (\SI{}{\angstrom})}


title: How to Make This Block Diagram with LaTeX

text: I understand that there are some questions here regarding the block diagrams. However, I am strongly interested in one particular style shown as below: ![enter image description here](http://i.stack.imgur.com/SnE0F.png) This is a picture from a paper. As can be seen, the text can be selected there. So it is not an attached picture. I suppose it is done by LaTeX. **Could anyone point me to the right direction to achieve this?** (I specially LOVE the colored "thin grid"! It is much more beautiful than the fully filled color!)


title: Graph of sin(1/x) in pgfplots and TikZ

text: I try to draw the graph of sin(1/x) on domain (0,1]; using pgfplots, it seems to work, but with TikZ plot-function, it doesn't. What am I doing wrong? My code:               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}         \begin{axis}[             xmin=0.01, xmax=1,              xticklabel style={/pgf/number format/.cd,fixed},              width=6cm, height=4cm,             grid = major,             grid style={gray!30},             ymin=-1,                   ymax= 1,                   axis background/.style={fill=white},             ylabel={$\sin (1/x)$},             xlabel={$x$},             tick align=outside          ]          \addplot[domain=0.01:1, red, thick,samples=5000] {sin(deg(1/(x)))};         \end{axis}     \end{tikzpicture}          \begin{tikzpicture}         \draw[step=.5,lightgray,ultra thin] (-0.5,-1.5) grid (1.5,1.5);         \draw[->] (0,0) -- (1.1,0) node[right] {$x$};         \draw[->] (0,-1) -- (0,1.1) node[above] {$\sin (1/x)$};         \draw[blue, domain=0.01:1] plot (\x, {sin(1/ (\x r))});     \end{tikzpicture}     \end{document}      The output: ![The output](http://i.stack.imgur.com/Bu9Gj.png)


title: mathspec selects the wrong math font

text: I am trying to use DejaVu Sans Light as a math font. It doesn't have a comprehensive set of math characters, but it has what I need (Roman numerals, beta, gamma, epsilon, and just a few other characters). I've tried to select the font using               \setmathfont(Greek,Latin,Digits){DejaVu Sans ExtraLight}      in my preamble. (The "Light" font must be called "ExtraLight" in the preamble; it won't load otherwise.) This gives me a document with digits set in the Light font. But no other characters are set in that font. Instead, they are set in a heavier version of the same typeface: DejaVu Sans Oblique. Here is a complete working example:               \documentclass{article}     \usepackage{mathspec}     \setmathfont(Greek,Latin,Digits){DejaVu Sans ExtraLight}       \begin{document}        Inline math: $\hat{\beta} = (X'X)^{-1}X'Y, 1234$.\\         Display math: $$\hat{\beta} = (X'X)^{-1}X'Y, 1234$$     \end{document}      And here is the result: ![the result](http://i.imgur.com/zCuc1.png) This behavior puzzles me. I can't see anything in the log file or the `mathspec` documentation that speaks to it. And it's not as though the Light font has glyphs that the Oblique font lacks. Is there a way to make sense of what `mathspec` is doing –– or at least to get it to render `$\beta$`, `$\gamma$`, and a few other characters in the Light font, while still using XeLaTeX?


title: Tikz mindmap example from manual gives error

text: Looking to produce a tikz mindmap which gives the error missing number treated as zero l.9 . Can anyone tell me what the problem is?               \documentclass[10pt]{article}     \usepackage{tikz}     \usetikzlibrary{mindmap}          \begin{document}           \tikz [mindmap, every node/.style=concept, concept color=black!20, grow=cyclic,         level 1/.append style={level distance=4.5cm,sibling angle=90},         level 2/.append style={level distance=3.5cm, sibling angle=45}]        \node [root concept] {Computational Complexity} %  root         child { node {Computational Problems}           child { node {Problem Measures} }           child { node {Problem Aspects} }           child { node {Problem Domains} }           child { node {Key Problems} }         }         child { node {Computational Models}           child { node {Turing Machines} }           child { node {Random-Access Machines} }           child { node {Circuits} }           child { node {Binary Decision Diagrams} }           child { node {Oracle Machines} }           child { node {Programming in Logic} }         }         child { node {Measuring Complexity}           child { node {Complexity Measures} }           child { node {Classifying Complexity} }           child { node {Comparing Complexity} }           child { node {Describing Complexity} }         }         child { node {Solving Problems}           child { node {Exact Algorithms} }           child { node {Randomization} }           child { node {Fixed-Parameter Algorithms} }           child { node {Parallel Computation} }           child { node {Partial Solutions} }           child { node {Approximation} }     };     \end{document}


title: meta packages and typesetting

text: **Background(just ignore):** Is there an exhaustive list of packages that you should load and of things you should do to improve your document? Here I mean packages and things that have to do with the quality of your document and which can be forgotten if you do not know about them. My real question is more like 'Why is LaTeX so bloody difficult to use?', but I do not think that this would do here! I have been using LaTeX for several years, and I am still discovering things that I do wrong or things that I can do better. _Hey sir.. you just do the conceptual markup, and people that know about typesetting have already done the work for you._ – well not really. My recent discoveries mainly come from these TeX.sx pages:   * What packages do people load by default in LaTeX?   * Why is \\[ ... \\] preferable to $$?   * Are \\( and \\) preferable to $?   * What are the finishing touches you put to a document? * * * **Actual questions:** My list of things(with no direct functionality(do not read literally)), to do when starting a new document, include:               \RequirePackage{fix-cm}     \documentclass     \usepackage{fixltx2e}[⟨date⟩]     \usepackage[final,babel]{microtype}      and from the `microtype` manual: > For the memoir class, you would additionally have to disable auto-detection > of multiple footnotes, which prevents protrusion: >   >   >     \renewcommand*\@makefnmark{\hbox{\@textsuperscript{\normalfont >     \microtypecontext{protrusion=footnote}\@thefnmark}}} >     \let\m@mmf@prepare\relax >     \let\m@mmf@check\relax >     * Do you know more? are all of these things always a good idea?   * Have I missed something in the manuals? (I do not plan to use any of the actual functions in e.g. microtype)   * What date should I use for fixltx2e, and where do I find it?   * Is the 'final' option for microtype not default?   * Will future LaTeX distributions be more complete(in some sense) and user-friendly?   * I remember reading about something you could do to make the compiler error messages more human readable – what was it?


title: Latex Listing Format Error

text: I'm having some difficulty with getting the `listings` package to properly format code snippets. In particular, it does not consistently **bold** keywords and _italicize_ comments. The code I am currently using is:               \usepackage{listings}     \lstset{language=C,       morekeywords=    {*,rule,endrule,module,endmodule,Action,interface,endinterface,method,endmethod,case,endcase,matches},       showspaces=false,               % show spaces adding particular underscores       showstringspaces=false,         % underline spaces within strings       showtabs=false,                 % show tabs within strings adding particular  underscores       %frame=single,                   % adds a frame around the code       tabsize=2,                      % sets default tabsize to 2 spaces       breaklines=true,                % sets automatic line breaking       breakatwhitespace=true,        % sets if automatic breaks should only happen at whitespace     }     \begin{lstlisting}[caption={code},label={lst:code}]     //  1: t1 = Py - Qy     rule op1_ctrl(oper == 4'd1 && fire_cond);     pa0.loadAddSub(0, 5, 7, 1, vecCnt);     pa1.loadAddSub(0, 5, 7, 1, vecCnt);     pa2.loadAddSub(0, 5, 7, 1, vecCnt);     pa3.loadAddSub(0, 5, 7, 1, vecCnt);     endrule          //  2: t2 = Px - Qx     rule op2_ctrl(oper == 4'd2 && fire_cond);     pa0.loadAddSub(0, 4, 6, 2, vecCnt);     pa1.loadAddSub(0, 4, 6, 2, vecCnt);     pa2.loadAddSub(0, 4, 6, 2, vecCnt);     pa3.loadAddSub(0, 4, 6, 2, vecCnt);     endrule     \end{lstlisting}      For example, my code snippet should be displayed like this: > _// 1: t1 = Py - Qy_ > > **rule** op1_ctrl(oper == 4'd1 && fire_cond); > > pa0.loadAddSub(0, 5, 7, 1, vecCnt); > > pa1.loadAddSub(0, 5, 7, 1, vecCnt); > > pa2.loadAddSub(0, 5, 7, 1, vecCnt); > > pa3.loadAddSub(0, 5, 7, 1, vecCnt); > > **endrule** > > _// 2: t2 = Px - Qx_ > > **rule** op2_ctrl(oper == 4'd2 && fire_cond); pa0.loadAddSub(0, 4, 6, 2, > vecCnt); > > pa1.loadAddSub(0, 4, 6, 2, vecCnt); > > pa2.loadAddSub(0, 4, 6, 2, vecCnt); > > pa3.loadAddSub(0, 4, 6, 2, vecCnt); > > **endrule** What I actually get is: > _// 1: t1 = Py - Qy_ > > **rule** op1_ctrl(oper == 4'd1 && fire_cond); > > pa0.loadAddSub(0, 5, 7, 1, vecCnt); > > pa1.loadAddSub(0, 5, 7, 1, vecCnt); > > pa2.loadAddSub(0, 5, 7, 1, vecCnt); > > pa3.loadAddSub(0, 5, 7, 1, vecCnt); > > endrule > > // 2: t2 = Px - Qx > > rule op2_ctrl(oper == 4'd2 && fire_cond); pa0.loadAddSub(0, 4, 6, 2, > vecCnt); > > pa1.loadAddSub(0, 4, 6, 2, vecCnt); > > pa2.loadAddSub(0, 4, 6, 2, vecCnt); > > pa3.loadAddSub(0, 4, 6, 2, vecCnt); > > **endrule** Any ideas why this is happening or how I can fix it?


title: Possible to change sort order in natbib?

text: I have played a little with LaTeX lately and I really like it, it makes the document look top professional and makes structuring a report easy. I am currently using it for a big assignment with lots of references, but I can't get `natbib` to work as I want. What it does now is to sort by appearance which works, but I would like to have it categorized as well. I really hope this is possible, as it is a requirement. As requested, I will try to provide a MWE               \documentclass[12pt,a4paper,danish,oneside,openany]{memoir}            \usepackage[round]{natbib}     \usepackage[utf8]{inputenc}     \usepackage[danish]{babel} % danske overskrifter     \usepackage[T1]{fontenc} % fonte (output)     \usepackage{lmodern} % vektor fonte            \begin{document}     % include abstract     \tableofcontents*     % include other pages            \bibliography{./biblio/ipr}     \bibliographystyle{unsrt}          % include appendix     \end{document}      and a page could be               \section{Don't be evil}            This is the first paragraph from a website.\footnote{\cite{pnp}}          This is a second paragraph with text from a book.\footnote{\cite[Part 3, chap. 2]{itp-2}}      In the footnote it looks like > 1[1]   >  2[2, Part 3, chap. 2] pnp is a website and itp-2 is a book, defined as `@misc` and `@book` in my .bib file.               @book{itp-2,         Author = {Steven Levy},         Edition = {1},         Publisher = {Simon \& Schuster},         Title = {In The Plex},         Year = {2011}       }          @misc{pnp,         author = {Laszlo Bock},         title = {{Passion, Not Perks}},         howpublished = "\url{http://www.thinkwithgoogle.com/quarterly/people/laszlo-bock-people-ops.html}",         year = {2011},         note = "Bes{\o}gt den 19/12/2012"       }      Is it possible to sort the book first, even though the website appears first? This is an example of how I want it to order my references. > **Books**   >  [4] Steven Levy. In The Plex. Simon & Schuster, 1 edition, 2011. > > **Web Articles**   >  [1] Mette Morsing. Corporate Branding Basics. http: > //www.kommunikationsforum.dk/artikler/ corporate-branding-basics/, 2011\. > Besøgt den 17/12/2012. > > [3] Vlad Savov. The benefits of working at Google continue af- ter death. > http://www.theverge.com/2012/8/10/3232810/ google-employees-life-insurance, > 2012. > > **Websites**   >  [2] Ebbe Berg. Branding. http://www.berg-marketing.dk/ branding.htm, 2012. The numbers is the order of appearance in the text, but it is sorted after books first, then web articles and at last websites. To define what is a web article and what is a website, I believe it is possible to choose an appropriate style? I am not very good at StackExchange layout, so I hope someone can change it to look more like a real LaTeX example. Anyway, I hope this is possible and if you know how to, it would be a great help!


title: What is a sound way to add wrapped figure support to a letter?

text: I am using the `letter` class and would like to put a wrapped figure in the letter. How can this be done properly? Attempting to insert a wrapped figure using the `wrapfig` package (with a caption) fails. The following is a workaround I stumbled upon but don't fully understand. I posted it as responding to a special case of this item: Letter class alternatives with support for figures, tables, and labels. It was deleted there (after some upvotes), presumably because a moderator felt it was raising a different question rather than providing a sound workaround. So I'm posting it as a separate issue. I mention the deleted post for context; readers may find related content there. With the letter class, attempting to put a caption in a `wrapfig` environment with a standard `\caption{}` command gives an error:               ! LaTeX Error: No counter 'figure' defined.      The same error appears if I use `\caption*{}` (evidently the counter is being used even though the count is not used in the caption). Adding a new figure counter only makes other errors appear. I tried again, using `\usepackage{caption}`. This gives a different error:               ! Package caption Error: No float type 'figure' defined.      This happens with both `\caption{}` and `\caption*{}`. Just as a shot in the dark, I tried adding:               \newcounter{figure}      After doing so, `\caption*{}` works fine, although a plain `\caption{}` gives an error:               ! Undefined control sequence.     <write> \@writefile{\ext@figure ...      Further adding the following in the preamble:               \makeatletter     \def\ext@figure{}     \makeatother      makes the error go away, and produces correct captions, including correctly incrementing figure numbers. I don't understand exactly what is going on "under the covers" that is making this workaround effective, but it works. I'd like to understand why it works, or a more correct solution. Note that the regular figure `environment` remains unavailable. In summary, my preamble has:               \usepackage{wrapfig}     \usepackage{caption}     % caption will raise "No float type 'figure'" w/i wrapfigure unless     % a figure counter is defined; ext@figure prevents further errors     \newcounter{figure}     \makeatletter     \def\ext@figure{}     \makeatother      Is there a better way to get a wrapped figure in a letter?


title: Change Page Ordering

text: In one of my documents, the first few (lets say 2) pages include code output and settings and configurations, in terms of communicating with R for example (for plotting etc...), I would like these pages to appear at the rear of the document, or split off into a second document. They need to be 'typeset' in the **original** order, since much of the appearance of the document thereafter, is dependent on what is defined in this pre-section. The actual contents of the output to the pre-section, however, is trivial to the reader of the actual document, however, of interest to me. How can I re-arrange or split the document post typesetting, to either remove the first 2 pages into a new document, or, move them to the end of the current document.


title: LaTeX Template for Question and answer

text: I am looking for a LaTeX template (if anyone has created such a template) that will allow me to layout a question on the left side then and answer on the right side, followed by a brief annotation describing the question and answer in more detail. I am inspired by the Socratic Method used in 'Little Schemer' by Daniel Friedman. Does any know of a template that comes close?


title: What can I do to improve the spacing in a Tikz tree?

text: I finally managed to make a genealogy tree with Tikz, but there are some spaces that I can't figure out how to increase between nodes:               \documentclass[a4paper,12pt,DIV=calc,headings=small{scrreprt}%,chapterprefix=true,numbers=noenddot     \usepackage{scrpage2}     \usepackage{fontspec}     \defaultfontfeatures{Mapping=tex-text}     \setmainfont[Numbers=OldStyle]{Minion Pro}     \setsansfont[Numbers=OldStyle, Ligatures=Rare]{Minion Pro}     \setmonofont[Scale=MatchLowercase]{Consolas}     \usepackage{polyglossia}     \setmainlanguage{brazil}     \usepackage[dvipsnames]{xcolor}     \usepackage{graphicx}     \usepackage{hyperref}     \usepackage{tikz}     \usetikzlibrary{mindmap,shadows,trees}                    \begin{document}               \begin{tikzpicture}[draw, every node/.style={fill=Green, rectangle, rounded     corners},sibling distance=4cm,     level 6/.style={sibling distance=6cm}     ]     \node {Maomé}     child {node (fatima) {Fátima}}     child {node (ali) {1. Ali} edge from parent [draw=none]     child {node {2. Hasan}}     child {node {3. Husayn}      child {node {4. Ali Zaynu'l-Abidin}     child {node {Zayd} child {node [fill=green!30]{Zayditas}}}     child {node {5. Muhammad al-Baqir}     child {node {6. Jaafar al-Sadiq}     child {node {7. Ismail} child {node [fill=green!30] {Califado Ismaelita Fatímida do Egito}} child {node [fill=green!30]{Xiitas Ismaelitas}}}     child {node {7. Musa al-Kazim}     child {node {8. Ali al-Rida}     child {node {9. Muhammad al-Taqi}     child {node {10. Ali al-Hadi}     child {node {11. Hasan al-Askari}     child {node {12. Imam Mahdi}     child {node [fill=green!30] {Xiitas Duodecimais}}     }}}}}}}}}}};          \draw (fatima) -- (ali);     \end{tikzpicture}                         \end{document}      Which looks like this: ![enter image description here](http://i.stack.imgur.com/H4DNO.png) I've tried, but I can't increase space between 7-8. Is there any way I can get a more even space between those nodes?