title: Using pgfkeys as an argument to a macro

text: I would like to use pgfkeys in a macro but find the documentation a bit hard to get started with. The following code should illustrate the problem I am trying to solve:               \documentclass{article}          \usepackage{pgfkeys}          \newcommand{\mymacro}[2][]{       Before the elements.       % if the elements key is set and the list is not empty       % extract the members and list them separated by commas...       % else print `No elements passed.'       #2     }          \begin{document}          \mymacro[elements={a, b, c}]{Foo.}          % The above should expand to:     %     % Before the elements. a, b, c. Foo.          \mymacro{Foo.}          % The above should expand to:     %     % Before the elements. No elements passed. Foo.          \end{document}


title: Vertical spacing for two consecutive figure environments

text: I think I'm not going to solve my problem with the Floats and positioning of figures. I have 4 diagramms and I need to place them on two pages and at the end of the second page the caption for all 4 figures. So two figures on each page. For the the diagramms on the second page I need to place the upper image near to the top because I need some place for the caption. On the page before I need both figures to be centered in the middle with some spacing between them. So this is my code:               \begin{figure}[c]     \centering     \includegraphics[width=\linewidth]{45.pdf}     \end{figure}     \begin{figure}[c]     \centering     \includegraphics[width=\linewidth]{46.pdf}     \end{figure}     \makeatletter     \setlength{\@fptop}{0pt}     \makeatother     \begin{figure}[t!]     \centering     \includegraphics[width=\linewidth]{47.pdf}     \captionsetup[figure]{font=small,skip=0pt}     \includegraphics[width=\linewidth]{48.pdf}     \caption{Konzentrationsprofile von Al, Re, Ta und W entlang der <110>-Richtung in der UC. }     \end{figure}      The problem for the secong page was solved, but the figures on the first page were also forced to the top which I don't want!


title: Controlling text position

text: I'm writing a document and I want to put in a contact section with an e-mail address and a phone number. To signify that, I'm using `wasysym` and `bbding` for `\phone` and `\Envelope` symbols respectively. When I create the document, the e-mail address is not centered with the envelope; it's a little too low. How do I raise it? EDIT: code:               \documentclass[margin]{res}      \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{wasysym}     \usepackage{bbding}     \usepackage{hyperref}          \begin{document}                \Envelope \ \href{mailto:my@mail.com}{my@mail.com} \\               \phone \ 123 456 789     \end{document}


title: label curve and/or contour name created with pgfplot via gnuplot

text: I will want to name different contour as one can see it on topographic card. How to do that? I want label on different curve with the parameter that distinguish the curves. I have created 10+10 curves by gnuplot inside tikz environnement. All the code that give here it due to this internet site. So thank many. Someone can help me to finish my graph by put one little label (like -10°, -20°, ..., 90°) on each curve? code ici :                   \documentclass[a4paper]{article}             \usepackage[T1]{fontenc}             \usepackage[utf8,applemac]{inputenc}             \usepackage{lmodern, textcomp}             \usepackage{mathrsfs,bm}             \usepackage{amsmath,amssymb,amscd}             \usepackage{comment,relsize}             \usepackage[frenchb]{babel}             % ==============================================             \usepackage[babel=true,kerning=true]{microtype}%pour le package tikZ et les deux points``:''             %%% TikZ packages.             \usepackage{pgf,tikz}             \usepackage{pgfplots}             %             \pagestyle{empty}                  \pgfplotsset{compat=newest}             % ==============================================             \begin{document}             % ==============================================                  \begin{tikzpicture}             % réglage de la grille de coordonnées             \begin{axis}               [ grid=major,                 no markers,                 axis on top,                 tick label style={font=\small},                 %extra y tick style={grid=major},                 %extra x tick style={grid=major}                 minor y tick num=1,                 minor x tick num=1,                 smooth,                 xlabel={D{\'e}clinaison du miroir: $D_m$},                 ylabel={Distance z{\'e}nithale du miroir: $I_m$},                 xmin=0, xmax=180,                 ymin=-0, ymax=180,                 width=1\textwidth,                 height=1\textwidth,                 legend style={at={(0.02,0.97)},anchor=north west},                 legend pos=south east,                 legend cell align=left                ]%             % Création des graphes f(x,y)=0 via GNUPLOT             \addplot +[ no markers, raw gnuplot, thick, empty line = jump ]%             gnuplot {%                   set contour base;                   set cntrparam levels discrete 0.0000;                   unset surface;                   set view map;                   set grid;                   set isosamples 200;                     set xrange [0:180];                 set yrange [0:180];                 D=pi/180*165;           %<<--------- ICI                 I=pi/180*90;            %<<--------- ICI             k1=tan(pi/180*10);             f1(x,y)=k1*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k2=tan(pi/180*20);             f2(x,y)=k2*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k3=tan(pi/180*30);             f3(x,y)=k3*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k4=tan(pi/180*40);             f4(x,y)=k4*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k5=tan(pi/180*50);             f5(x,y)=k5*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k6=tan(pi/180*60);             f6(x,y)=k6*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k7=tan(pi/180*70);             f7(x,y)=k7*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k8=tan(pi/180*80);             f8(x,y)=k8*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k9=tan(pi/180*90);             f9(x,y)=k9*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);                 %                 splot f1(x,y), f2(x,y), f3(x,y), f4(x,y), f5(x,y), f6(x,y), f7(x,y), f8(x,y), f9(x,y) ;                 %                 };%             %             \addplot +[no markers, raw gnuplot, thick, empty line = jump  ]%             gnuplot {%                   set contour base;                   set cntrparam levels discrete 0.0000;                   unset surface;                   set view map;                   set grid;                   set isosamples 200;                     set xrange [0:180];                 set yrange [0:180];                 D=pi/180*165;           %<<--------- ICI                 I=pi/180*90;            %<<--------- ICI             k0=tan(pi/180*0);             f0(x,y)=k0*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k1=tan(pi/180*-10);             g1(x,y)=k1*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k2=tan(pi/180*-20);             g2(x,y)=k2*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k3=tan(pi/180*-30);             g3(x,y)=k3*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k4=tan(pi/180*-40);             g4(x,y)=k4*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k5=tan(pi/180*-50);             g5(x,y)=k5*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k6=tan(pi/180*-60);             g6(x,y)=k6*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k7=tan(pi/180*-70);             g7(x,y)=k7*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k8=tan(pi/180*-80);             g8(x,y)=k8*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);             k9=tan(pi/180*-90);             g9(x,y)=k9*(cos(D)+cos((D-2*pi/180*x))*tan(pi/180*y)**2)-2*sin(I)*sin(pi/180*x)*tan(pi/180*y)-cos(I)*(sin(D)+sin((D-2*pi/180*x))*tan(pi/180*y)**2);                 %                 splot g1(x,y), g2(x,y), g3(x,y), g4(x,y), g5(x,y), g6(x,y), g7(x,y), g8(x,y), g9(x,y) ;                 splot f0(x,y);               }; %             % Ajout d'une légende pour identifier les familles de courbes.             %Positionnement à adapter pour chaque nouvelle compilation = pas efficace dutout...          \node at (axis cs:165,160) [pin={90:\relsize{-1}{$\alpha_0=10\degres$}},inner sep=0pt] {}; %  a modifier manuellement...     \node at (axis cs:50,57) [pin={170:\relsize{-1}{$\alpha_0=90\degres$}},inner sep=0pt] {};     \node at (axis cs:118,120) [pin={200:\relsize{-1}{$\alpha_0=90\degres$}},inner sep=0pt] {};     \node at (axis cs:155,90) [pin={75:\relsize{-1}{$\alpha_0=0\degres$}},inner sep=0pt] {};           % Légende à modifier ici pour chaque couple (D ; I) du cadran à réflexion.      % \addlegendimage{empty legend}\addlegendentry{\relsize{-1.5}{$\mathscr{C}_{f_{\alpha_0}}$, pour $\alpha_0=\left\{10\degres;\ldots; 90\degres\right\}$}}      % \addlegendimage{empty legend}\addlegendentry{\relsize{-1.5}{$\mathscr{C}_{f_{\alpha_0}}$, pour $\alpha_0=\left\{-90\degres;\ldots; -10\degres\right\}$}}      %\addlegendimage{empty legend}\addlegendentry{\relsize{-1.5}{$D=165\degres$, $I=90\degres$}}      %     \end{axis}      %     \end{tikzpicture}     % ==============================================          \end{document}      ![enter image description here](http://i.stack.imgur.com/SciH8.png)


title: Simulate printing imperfections and defects with TeX?

text: Is there a way to simulate imperfections of some of the older books in LaTeX? Like the missing pieces of letters, extra splotches of ink and such? Here is an interesting artifact: ![enter image description here](http://i.stack.imgur.com/a3eoF.jpg) P.S.: I guess one way would be to get an old printer haha :-0


title: alignment of text

text: I am using itemize option to write a paragraph in latex. I see that left side the text is aligned well and look nice while on the right side it is not. Is there a way to make that look same as on the left side alignment?


title: Context - Error creating boxes in loop

text: The following code creates an array of boxes to represent an array.               \startMPinclusions      input boxes ;     \stopMPinclusions          \starttext     \startluacode     function createGraphic(k,c,indH)         local i=1         local j=65         context.startuseMPgraphic(name)         context("boxjoin(a.se=b.sw; a.ne=b.nw);")         while k[i] do             bname=string.char(j)             context("boxit."..bname.."(btex "..k[i].." etex)("..c[i]..");drawboxed("..bname..");")             i=i+1             j=j+1         end          context.stopuseMPgraphic()         context.useMPgraphic(name)     end          a={51,31,4,22,23,45,23,43,54,22,11,34}     colors={"blue","blue","blue","blue","blue","blue","blue","blue","blue","white","white","white"}     createGraphic(a,colors)      The output is ![](http://i.imgur.com/cZoPzHn.png) Now I want to change the colors dynamically and call the `createGraphic()` in a loop. So I wrote the following function to change the colors array.               function refreshColors(yellowEndIndex,redIndex,blueIndex)             print(yellowEndIndex..","..redIndex..","..blueIndex)             local ccnt=1             while a[ccnt] do                     if ccnt < yellowEndIndex then                         colors[ccnt] = "yellow"                     elseif ccnt == redIndex then                         colors[ccnt] = "red"                     elseif ccnt == blueIndex then                         colors[ccnt] = "blue"                     else                         colors[ccnt] = "white"                     end                     ccnt= ccnt+1             end     end     refreshColors(2,4,6)     createGraphic(a,colors)      Now, the output is ![](http://i.imgur.com/k0S10Er.png) Also when I call `refreshColors()` in loop and `createGraphic()` outside there is no error.               for i=1,10,1 do         refreshColors(i,0,0)     end     createGraphic(a,colors)      Now the output is ![](http://i.imgur.com/9oIyvqx.png) However, when I call `createGraphic()` inside loop, error occurs.               for i=1,10,1 do         refreshColors(i,0,0)      createGraphic(a,colors)     end      The error message thrown by Texworks is               error on line 33 in file try.tex: terminal: ! Inconsistent equation (off by -1).      Line 33 is               colors[ccnt] = "red"      Here is the link to the boxes.mp used in the program. I want to call the `createGraphic()` inside the loop. Why the error occurs??


title: Load Image for specific frame in beamer

text: I know in Latex there are draft class that can be used as a trick for speed up compilation time. In this class, there are no image that loaded to compilation result. But is there any possibility to implement the same thing to only one frame in beamer. I mean how to make latex compiler not to loaded graphic image within specific frame, or to load only image in specific frame and to ignore the others?


title: How to wrap section titles when using wordlike?

text: I have a template based on the `wordlike` package. When I have a long section title, it extends beyond the edge of the page instead of wrapping to a newline (like this). Here's the code:               \documentclass[12pt]{article}          % Emulate MS Word     \usepackage{wordlike}          % One inch margins     \PassOptionsToPackage{margin=1in}{geometry}          % Double spacing     \usepackage{setspace}     \setstretch{2}          % Don't justify along the right margin     \usepackage{ragged2e}     \RaggedRight          % Format section titles     \usepackage[uppercase]{titlesec}     \titlespacing\section{0pt}{0pt}{7pt}     \usepackage{titlesec}     \titleformat{\section}         {\normalfont\bf\center\uppercase}{\underline{\thesection.\          }}{1em}{\underline}          % Format paragraphs     \parskip 0pt     \setlength{\parindent}{0.5in}          % Remove section numbers     \setcounter{secnumdepth}{-2}          \begin{document}          \section{Here's an example of a long section title that is going to stretch beyond the page}          Lorem ipsum dolor sit amet, consectetur adipiscing elit.          \end{document}      If I try to force a line break with `\\\`, I get this error: `Something's wrong--perhaps a missing \item.`


title: Semi-colon after first author, comma after multiple authors in bibliography

text: I'm working on a bst file for a journal with very peculiar formatting instructions for the references section. Namely, the references section needs to do the following.   1. Feature a semi-colon after the first author in a citation including at least three co-authors.   2. Have a comma separating second author from third author and all the way to the penultimate author in a citation with at least four authors.   3. Have an ampersand separate the penultimate author from the final author. Consider the following image: ![enter image description here](http://i.stack.imgur.com/d14N4.png) For the fourth and fifth citations in that list, how do I replace the semi- colon with a comma for the citations after the first author (i.e. starting with the second author)? The bst file I'm creating is derivative of newapa.bst, though I hacked at it to do multiple things. Basically, everything else in the bst file is to specification, including grepping out middle initials (a trick I learned from asking another question on this same site) and de-capitalizing most of the title in the @ARTICLE class. I just need it to use commas in lieu of semi- colons to separate authors in articles and books (and whatever else) with more than three authors (up until the penultimate and final author). I hope that makes sense. Since I admit this is a complicated bst file I created, here's a pastebin link to the .bst file for a week: http://pastebin.com/HUEiSCtS Here's an example tex file with which to work:               \documentclass[11pt]{article}     \usepackage[left=1in,top=1in,right=1in,bottom=1in]{geometry}     \usepackage[compress]{natbib}     \setcitestyle{aysep={},citesep={,}}     \usepackage{titling}     \newcommand{\subtitle}[1]{%     \posttitle{%     \par\end{center}     \begin{center}\large#1\end{center}     \vskip0.5em}%     }                    \title{*.bst Example}     \subtitle{Some Random Citations for Demonstration}     \author{Guy Posting Things on the Internet}          \begin{document}          \maketitle          \section{Introduction}          Here are some citations to some really cool research \citep{firstcite,secondcite,thirdcite,fourthcite,fifthcite}.          \bibliographystyle{examplebst}     \bibliography{example}          \end{document}      Here's a list of sample citations for rendering the bibliography in question: http://pastebin.com/PbnFygZ5 I admit I'm no BiBTeX expert and a lot of what I learned is trial and error. I think the issue here is in format.rem.names in my bst file, but wouldn't know the scope of what needs to be done. Truly any help would be appreciated. Thanks.


title: unable to left align the equations

text: I see many example about aligning a set of equations to the left, but none them works for me. The set looks like               \usepackage{amsmath}     ....     \begin{equation}     \begin{flalign}     A_{l-side} &= 1+2 \\     B_{both-side} &= 3+4+5+6  \\          \end{flalign}     \end{equation}      Then I get this error                Runaway argument?      A_{l-side} &= 1+2 \\ B_{both-side} &= 3+4+5+6 \\      ! Paragraph ended before \flalign was complete.      <to be read again>                    \par      l.72           ?      Who can interpret the error?!


title: Problems while installing pst-barcode

text: I tried to install pst-barcode, but after moving the files to `/usr/share/texmf/dvips/pstricks/` and running `texhash`, I still can't use them, and have to enter the files manually when compiling the document.


title: Is it possible to make a macro sensitive to \\?

text: I have the following macro:                  \newcommand{\INFERRULE}[3][]{%        \ensuremath{\inferrule{\mathstrut #2}{\mathstrut #3}\ifx\\#1\\\else\enskip(#1)\fi}}      I want to make it sensitive to `\\\` so that I can write commands such as:                  \[        \INFERRULE[i \to j]{[i, i, j, k] \\ [i, k, j, j]}{[i, i, k, j]}        \]      However, the way I defined the macro, it is ignoring the `\\\`. Is there a way to fix it?


title: What tool to make flow graphs in Linux?

text: SQLite documentation is very nice with graphs such as ![SQLite documentation image](http://i.stack.imgur.com/Bx97v.gif) Any idea of what software can I use to do similar picture? It would be perfect if the images could be described textually, instead of drawing using graphical interface. I use Linux and I'm looking for free software.


title: WriteLatex utf-8 ģ symbol problem

text: I need to use ģ symbol in my presentation. This symbol has 0123 utf-8 code. But when I am typing it in writeLatex it compiles with error: Package ucs Error: Unknown Unicode character 291 = U+0123, (ucs) possibly declared in uni-1.def. I was dealing with such problem on my workstation, and I just hard coded this symbol in uni-1.def file as \'{g}. However in writeLatex website I can't do that, and I tried to use command, \DeclareUnicodeCharacter{0123}{\'{g}} , but there was no change, still compiled with this error. For input encoding I use \usepackage[utf8x]{inputenc}. For Now I have only one solution, instead ģ I just type \'{g} which is really inconvenient. Do you have any suggestions?


title: Declare nodes in pgfplots as overlays

text: ## The Background In pgfplots, it is possible to make plot elements such as axis labels, ticks and legends `overlay`, which means they will not be considered when determining the bounding box of the plot. Using nodes is a good way of labeling points of interest in a plot, however if a node is automatically positioned beyond the bounding box of a plot, it will be clipped. ## The Question Is it possible in some way to set nodes to behave as if they are set as `overlay`? The node style options do not seem to respond to this keyword. Alternatively, is it possible to simply tell pgfplots not to clip the figure at the edges of the bounding box described by the plot area? ## Things I've Considered Which are nevertheless not what I am looking for:   * **Extend the plot using`enlargelimits`:** adds more empty space to the plot area, and also lowers the y-axis baseline below zero, which is inappropriate when the dataset I'm graphing asymptotically approaches zero.   * **Extend the plot using manual`xmin`, `xmax`:** Also not desired in this case for a similar reason as above.   * **Situational re-orientation of the node with respect to the coordinate of interest:** I would like consistent orientation of the nodes. ## Minimal Example _(The dataset comes from the pgfplots manual)_               \documentclass{minimal}     \usepackage{pgfplots}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[]     \tikzstyle{every pin}=[draw=none,fill=white]     \begin{axis}[     width=10cm,     height=5cm,     axis x line*=bottom,     xlabel={$x$},     axis y line*=left,     ylabel={$y$},     grid=none     ]     \addplot[color=black,mark=none] coordinates {     (-4.77778,2027.60977)     (-3.55556,347.84069)     (-2.33333,22.58953)     (-1.11111,-493.50066)     (0.11111,46.66082)     (1.33333,-205.56286)     (2.55556,-341.40638)     (3.77778,-1169.24780)     (5.00000,-3269.56775)     };     \node[coordinate,pin=above right:{node}] at (axis cs:3.77778,-1169.24780) {};     \end{axis}     \end{tikzpicture}     \end{document}      ## Reference Image ![Reference rendering of a pgfplots chart with clipped node text.](http://i.stack.imgur.com/xujiL.png) Thanks for any help anyone can offer.


title: How to get an upright \partial?

text: I want to set partial derivations like `\frac{\partial}{\partial x}`. This is issue is discussed several times here. Packages like esdiff or commath or suggested. However one problem with all those solutions is that the `\partial` is not set upright. Usually a recommendation is to use `kpfonts` or other fonts. Assume I do not want to change my font. Is there some LaTeX command to set the `\partial` upright or is this always a font issue? I have tried using `\mathrm`, but this doesn't work.


title: Setting options on a per-type basis

text: In the `biblatex` documentation, under "Entry Options", it says that entry options (like `useauthor`) can be set on a per type basis. > With Biber, this option is also settable on a per-type basis. I want to set the same `useauthor` and `useeditor` options for all entries of a type (`@book`, `@manual`, `@online`). Is this what the quote is referring to? How do I do this?


title: Latex hyphenation exception

text: I have some problems with my document. I have one sentence with indentation. It is too long and it takes minimum two lines. And I have something like this:               Macierz rozproszenia idealnego, dopasowanego pierścienia hybrydowego ma po-     stać:      but I want something like this:               Macierz rozproszenia idealnego, dopasowanego pierścienia hybrydowego ma     postać:      Is it possible to do it automatically or must I do it by myself? Or is it correct?


title: Alignment problem with large subscript in sum

text: This MWE exhibits the problem I have:               \documentclass{article}     \usepackage{amsmath}     \usepackage{mathtools}          \begin{document}     This is a really long line of text to show where the margins of the page are.     This is a really long line of text to show where the margins of the page are.     This is a really long line of text to show where the margins of the page are.     \[      \sum_{\alpha \in \{a,b,c,d,e,f,g,h,i,j,k,\ell,m,n,o,p,q,r,s,t,u,v,w,x,y,z\}} 1 + \alpha + \alpha^2 + \alpha^3 + \alpha^4 + \alpha^5 + \alpha^6 + \alpha^7 + \alpha^8 + \alpha^9     \]     This is a really long line of text to show where the margins of the page are.     This is a really long line of text to show where the margins of the page are.     This is a really long line of text to show where the margins of the page are.          Using ``mathclap'':     \[      \sum_{\mathclap{\alpha \in \{a,b,c,d,e,f,g,h,i,j,k,\ell,m,n,o,p,q,r,s,t,u,v,w,x,y,z\}}} 1 + \alpha + \alpha^2 + \alpha^3 + \alpha^4 + \alpha^5 + \alpha^6 + \alpha^7 + \alpha^8 + \alpha^9     \]     \end{document}      ![enter image description here](http://i.stack.imgur.com/o2ccU.png) ## Question: How can I implement the equivalent of moving the sum of alphas left (over top of the subscript of the sum) until they are right aligned to the right margin? The sum and its subscript should not move from its currently left aligned position.


title: Why when I add package paralist into my beamer presentation, enumerate stops working?

text: I try to simple use `beamer` with `enumerate` and `compactenum` from `paralist`. But when I add `paralist` package in document, `enumerate` just stops working.               \documentclass{beamer}     \usepackage{paralist}     \usepackage{pifont}          \begin{document}     \begin{frame}     \frametitle{...}     \begin{compactenum}[{\ding{79}}]     \item ...     \item ,,,     \item  ...     \end{compactenum}          \begin{enumerate}     \item 1     \item 2     \item 3     \end{enumerate}     \end{frame}     \end{document}      > The control sequence at the end of the top line of your error message was > never \def'ed. If you have misspelled it (e.g., `\hobx'), type`I' and the > correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget > about whatever was undefined. When I do not use `paralist` (and do not use `compactenum`) than the process will end normally. I know `beamer` defines many things and adding `paralist` can make conflicts in definitions but I do not know how to fix it.


title: calling an expression in the document in pgfplot

text: Say I have the following function which I would like to plot.               $S(z)=\frac{p.(\alpha_H+z.\alpha_W)}{p.(\alpha_H+z.\alpha_W)+\beta_H+z.\beta_W}$      While I could specify it in the `\addplot` command, I was just wondering whether there might be a more efficient method where I could label it in some sense (since it is already mentioned in the document) and call it by a macro. In fact I would like to see how it changes by differing values of the parameters additionally.


title: Customize \section

text: I have a document, where I want typical code: "Problem # n" to be printed in every section. I made this code, which is working. How can I get rid of `\setcounter{secnumdepth}{1}` and `\addtocounter{secnumdepth}{1}`?               \documentclass{article}     \setcounter{secnumdepth}{1}     \renewcommand{\section}[1]{\begin{center}\Large{\bf{Problem \# \arabic{secnumdepth}}}\end{center}     \addtocounter{secnumdepth}{1}}     \begin{document}     \section{}     text     \section{}     text     \section{}     text     \end{document}      ![enter image description here](http://i.stack.imgur.com/WhtAX.png)


title: LaTex: Error: Too many math alphabet used in version kurier

text: I can not solve this problem. I did all others comments, it it is still not working. The point is, there were no problem last year. I use these package               \usepackage{verbatim}     \usepackage{pdfpages}     \usepackage{multimedia}     \usepackage{animate}     \usepackage{color}     \usepackage{dsfont}     %     \usepackage{bm}% bold math     \usepackage{amsmath,amssymb,amscd}     \usepackage{amsthm}     \usepackage{amsfonts}     \usepackage{subeqnarray}     \usepackage[newitem,oldenum]{paralist}     \usepackage{mathptmx}     \usepackage{booktabs, multirow}     \usepackage[math]{kurier}          %     \usepackage{helvet}     \usepackage{courier}     \usepackage{relsize}     \usepackage{subfig}     %     \usepackage{colortbl}     \usepackage{wasysym}     %     \usepackage{tikz}     \usepackage{pgfplots}      and error message is same with title. please help me.


title: Mathematica code in LaTeX document

text: Consider the following example:               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage{mathtools}     \usepackage{xcolor}          \newcommand*\variable[1]{\textcolor{teal}{\texttt{#1}}}          \begin{document}          \begin{equation*}       \texttt{Table[A/(A - r*X) - (1 + r)\^{}\variable{k}, \{\variable{k}, 1, 10\}]}     \end{equation*}          \end{document}      ![output](http://i.stack.imgur.com/QdsCk.jpg) If I copy the code and paste it into Mathematica, the rendering of the `^` is wrong; see the following picture: ![Mathematica](http://i.stack.imgur.com/qutsq.jpg) How do I get an output which I can paste (directly) into Mathematica without having to change `^` manually?


title: LaTeX table appears below reference, not in correct location

text: I have a table using the `tabular` environment:               \begin{table}[ht]     \centering     \begin{tabular}{c|cccccc}     & Landmarks in the Human Genome Project \\     \hline     \rowcolor{LightCyan}     1953& Watson-Crick publish DNA structure & & & & & & \\     1975& F.Sanger, A.Maxam and W.Gilbert develop methods for sequencing DNA & & & & & & \\     \rowcolor{LightCyan}     1977& Bacteriophage $\Phi X -174$ sequenced: first complete genome sequenced & & & & & & \\     1980& US Supreme court rules genetically modified bacteria are pantentable & & & & & & \\     \rowcolor{LightCyan}     1981& Human mitochondrial DNA sequenced: $16569$ base pairs & & & & & & \\     1984& Epstein-Barr virus genome sequenced: 172,281 base pairs & & & & & &\\     \rowcolor{LightCyan}     1990& International Human Genome Project launched & & & & & & \\     1991& J. Craig Venter identifies sequences of DNA complementary to messenger RNA & & & & & & \\     \rowcolor{LightCyan}     1992& Complete low resolution linkage map of the human genome & & & & & & \\     1992& \textit{Caenorhabditis} sequencing project begins & & & & & & \\     \rowcolor{LightCyan}     1992& J. Craig Venter forms the Institute for Genome Research (TIGR) & & & & & & \\     1992& Wellcome Trust and UK Medical Research Council establish The Sanger Center for large-scale genomic sequencing  & & & & & &\\     \rowcolor{LightCyan}     1995& First complete sequence of bacterial genome, \textit{Haemophilus influenzae} by TIGR & & & & & & \\     1996& High resolution map of human genome & & & & & &\\     \rowcolor{LightCyan}     1996& Completion of yeast genome, first eukaryotic genome sequence & & & & & & \\     1996& Celera claims to finish sequencing human genome by 2001, Wellcome Trust respond by increasing funding to the Sanger Center & & & & & &\\     \rowcolor{LightCyan}     1998& \textit{Caenorhabdtis elegans} genome published & & & & & & \\     \hline     \end{tabular}     \end{table}      which runs fine, and appears in the document where I want it to, however when I add one or more items to the table, the table appears at the bottom of the document below the references. Why is this? also I'm not sure how to parse LaTeX code on here to show you the table - if anyone can show me how that would be great.


title: Mimicking the `proof` environment

text: I want to mimic the `proof` environment from the `amsthm` package. I want something that has the same layout (margins, etc.) as the `proof` environment, but with the following changes: 1) Instead of beginning with _Proof._ , I want it to begin with _Proof outline._ 2) I don't want a white box added at the end.               \documentclass{article}     \usepackage{amsthm}     \begin{document}     Here is introductory text.     \begin{proof}     Here is text in the proof.     \end{proof}     Here is concluding text.     \end{document}


title: Is it possible to set a linebreak in l columns

text: Im using tabu to span tables over the full width, but I would like to span only the first column (i.e. the space between first and second column) and let TeX use the natural width of the other columns. To do that I define the first as `X` and the others as `l`or `r`. But in most of the cases the table head is much longer than the column’s content (some numbers) so it would be great if I could define some line breaks in the head without using `p{}` and guess the right column width.               \documentclass{article}          \usepackage{tabu,booktabs}     \newcommand{\tabh}{\bfseries\raggedright}          \begin{document}     Working but not exactly what I want:          \begin{tabu} to \textwidth {X[l,2]X[r,2]X[r,1]}         \toprule         \tabh Land &             \tabh Zahl der Plätze in der\linebreak Jugendpsychiatrie &             \tabh Jugendliche\linebreak unter 18 \\         \midrule         Schleswig-Holstein & 216 & 501\,667 \\         Hamburg & 110 & 271\,75 \\         \bottomrule     \end{tabu}          \bigskip%     What I want but not working:          \begin{tabu} to \textwidth {Xrr}         \toprule         \tabh Land &             \tabh Zahl der Plätze in der\linebreak Jugendpsychiatrie &             \tabh Jugendliche\linebreak unter 18 \\         \midrule         Schleswig-Holstein & 216 & 501\,667 \\         Hamburg & 110 & 271\,75 \\         \bottomrule     \end{tabu}     \end{document}      ![result](http://i.stack.imgur.com/rG53e.png)


title: Problem with Customized Marginpar (in Combination With a ToMarginpar)

text: I have two bits of "code" that work perfectly when isolated. The first piece builds a table of marginpar, the second provides certain customizations for the marginpar environment. When I copy both in one document it produces the table of Marginpar but doesnt apply the customizations correctly. This is the customization (it is not created by myself. Unfortunatelly, I dont remember the source):               \setlength{\marginparwidth}{1.2in} % Veränderung Marginpar     \let\oldmarginpar\marginpar     \renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft\footnotesize #1]%     {\raggedright\footnotesize #1}}      The ToM code results from a previous question (List marginpars in the/a TOC) and is provided by henrique:               \documentclass{article}     \usepackage{tocloft,blindtext}     \usepackage[english]{babel}     % First we create new list of marginpars with the help of tocloft package:     \newcommand{\listmarginparname}{List of Margin Pars}     \newlistof{marginpar}{lom}{\listmarginparname}     % Then we define a command that increments a counter and writes it in the created list     \newcommand{\mpar}[1]{%     \refstepcounter{marginpar}     \addcontentsline{lom}{marginpar}{#1}}     % Now we have to make \marginpar command to include the counting macro     \newcommand*\origmpar{}     \let\origmpar\marginpar     \renewcommand*\marginpar[1]{\origmpar{#1}\mpar{#1}}     \begin{document}     \listofmarginpar     \section{Two marginpars}     \blindtext \marginpar{First Marginpar Test}     \blindtext \marginpar{Second Marginpar Test}     \section{One marginpar}     \blindtext \marginpar{Third marginpar Test}     \end{document}      My question: Does anyone know how to get this kind of Table of Marginpar without compromising the other customizations?


title: Write more beautiful math equations, like a professional book

text: I want to write math equations more "beautiful". My equations are shown as follows: > ![equation](http://i.stack.imgur.com/yyPuD.jpg) The vector looks ugly and disproportionate. And I like that they look it this way: > ![equation](http://i.stack.imgur.com/tMPit.jpg) The vector looks good, in place and the letters clear and well defined.


title: How to include PDF absolute positioned and scaled?

text: Actually i started to write this question, but during the writing i discovered the answer. Althougth this information may useful also for others, so i send this question, after i'll answer it. I'm trying to make a pdf with totally filled page (no margins), and include graphics from other pdf files, and positioning them relative to the page edge. What i did: -- set margins and offsets to zero:               \usepackage[paperwidth=79mm,paperheight=85mm,margin=0cm,left=0cm,bottom=0mm]{geometry}     \setlength{\marginparwidth}{0mm}     \setlength{\marginparsep}{0mm}     \setlength{\hoffset}{-1in}     \setlength{\voffset}{-1in}     \setlength{\topmargin}{0mm}     \setlength{\headheight}{0mm}     \setlength{\headsep}{0mm}     \setlength{\footskip}{0mm}     \setlength{\textheight}{85mm}     \setlength{\textwidth}{79mm}      -- defining a tikz node style:               \tikzstyle{default}=[anchor=north west,draw=red,text width=79mm]      -- seting a grid:               \tikzset{grid/.style={gray,very thin,opacity=1}}      -- begin tikzpicture with grid:               \begin{tikzpicture}[yscale=-0.1,xscale=0.1]     \draw[grid] (0,0) grid (79,85);      -- and include graphics in the width of page               \node[badge] at (0,0) {     \includegraphics[width=79mm]{test.pdf}     };     \end{tikzpicture}      The problem is, that the edge of the box (red), the grid and the edge of the page seems to be totaly the same, but the included pdf's edges have some offset. The question: which parameters should i modify to move them in total cover? So the whole file looks like this:               \documentclass{minimal}     \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{graphicx}     \usepackage[paperwidth=79mm,paperheight=85mm,margin=0cm,left=0cm,bottom=0mm]{geometry}     \usepackage{fullpage}     \setlength{\marginparwidth}{0mm}     \setlength{\marginparsep}{0mm}     \setlength{\hoffset}{-1in}     \setlength{\voffset}{-1in}     \setlength{\topmargin}{0mm}     \setlength{\headheight}{0mm}     \setlength{\headsep}{0mm}     \setlength{\footskip}{0mm}     \setlength{\textheight}{85mm}     \setlength{\textwidth}{79mm}     \usepackage{tikz}     \usetikzlibrary{positioning,shapes,shadows,calc}     \usepackage{xcolor,color}     \tikzstyle{default}=[anchor=north west,draw=red,text width=79mmdiscovered]     \tikzset{grid/.style={gray,very thin,opacity=1}}     \begin{document}     \pagestyle{empty}     \setlength{\parindent}{0em}     \begin{tikzpicture}[yscale=-0.1,xscale=0.1]     \draw[grid] (0,0) grid (79,85);         \node[default] at (0,0) {             \includegraphics[width=79mm]{test.pdf}         };     \end{tikzpicture}     \end{document}


title: How to position the labels of the path in automata?

text: This is my tikz code :               \documentclass[a4paper,10pt]{article}     \usepackage{verbatim}     \usepackage{pgf}     \usepackage{tikz}     \usetikzlibrary{arrows,automata}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{amsmath}          \begin{document}          \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=7 cm,                     semithick, scale = 0.6, transform shape]               \node[initial,state] (A)                                    {$s_0$};     \node[state]         (B) [above right of=A]                 {$s_1$};     \node[state]         (C) [below right of=A]                 {$s_2$};     \node[state]         (D) [below right of=B]                         {$s_3$};     \node[state]         (E) [above right of=D]                 {$s_4$};     \node[state]         (F) [below right of=D]                 {$s_5$};                 \path (A) edge [left]             node {$0$ $ \rightarrow $ [$x$ = $x.0.0$] } (B)             edge [left]             node {$1$ $ \rightarrow $ [$x$ = $x.0.1$] } (C)     (B) edge [loop above]       node {$0$ $ \rightarrow\\ $  [$x$ = $x.0$] }   (B)             edge [bend right,left]  node {$1$ $ \rightarrow $ [$x$ = $x.1$] }   (C)         edge []                 node {$\$$ $ \rightarrow $ [$x$ = $x.0.\$$] } (D);             \end{tikzpicture}     \end{document}      I am getting this : ![enter image description here](http://i.stack.imgur.com/DFMcO.png) My doubts are :   1. Right now all labels are exactly at center of any arrow. How to change its position?   2. I gave `\\\` within the label description. Still it didn't show in new line. For example, `(B) edge [loop above] node {$0$ $ \rightarrow\\\$ [$x$ = $x.0$] } (B)`. I have given `\\\` after `\rightarrow` (ie `$ \rightarrow\\\$`). Still everything coming in the same line. How to give a line break there? Thanks


title: enumitem: referencing items in enumerate

text: Say we have a huge document with many `sections`, `subsections`, and `subsubsections`. In a few of these sections, we have `enumerate`d environments. The package I am using is `enumitem`. One of the environments could look like:               \begin{enumerate}       \item \label{one}       \item     \end{enumerate}     referring back to \cref{one}      Now if I reference this item later, it will say: > referring back to `item 1` I could have other enumerated environments with `\alph`, `(\alph)`, etc. and there reference could be `item (a)` or something. The problem I have is what if I have another environment with the standard numbers that starts from 1 and goes to 4 but item 1 is also labeled. I would have another `item 1` reference in the document. The `hyperref` would take it to a different list but is there a way to differentiate the printed out reference? The list are unrelated so I don't want to start the new environment continuing the old numbering. Say starting from 3 and so on. Here is a MWE:               \documentclass{article}     \usepackage{enumitem}     \usepackage{cleveref}     \begin{document}     \begin{enumerate}       \item         one \label{one}       \item         two \label{two}     \end{enumerate}     This \cref{two} is great.     \begin{enumerate}       \item         one \label{dog}       \item         two \label{cat}     \end{enumerate}     This \cref{cat} is a cat.     \end{document}      ![enter image description here](http://i.stack.imgur.com/lhdUs.png) Would there be a way to change one of the references to `observation 1` instead of `item 1`? This would be a local change nor global.


title: problem with \ifthenelse + multicolumn

text: I encounter various problems when i want to control the display of a table with a `ifthenelse` test. For example, consider the following M(non)WE :               \documentclass{article}     \usepackage{multirow}     \usepackage{ifthen}     \newcommand{\essai}[1]{     \begin{tabular}{cc}         a&b \\ \hline         \ifthenelse{\equal{#1}{coucou}}{\multicolumn{2}{|c|}{oui - #1} \\ \hline}{non&#1 \\ \hline}      \end{tabular}     }     \begin{document}       \essai{coucou}     \end{document}      If i call `\essai{hallo}`, then the `ifthenelse` test is `false`, and it compiles : the second line of the table has 2 columns, as expected. If i call `\essai{coucou}`, then the test is `true` and i would expect to have a multicolumn line. But it gives a compilation error `Misplaced \omit...`


title: includegraphics inside a TikZ node with XeLaTeX is incorrectly positioned when width or height is given

text: Consider the following code:               \documentclass{article}     \usepackage{tikz}          \begin{document}          a\includegraphics[height=100pt]{example-image-10x16}b          \begin{tikzpicture}     \node[anchor=south west] at (0,0) {a\includegraphics[height=100pt]{example-image-10x16}b};     \fill[red] (0,0) circle[radius=.1];     \end{tikzpicture}     \end{document}      Run with `pdflatex` and it compiles just fine. Run with `xelatex` and the image in the node is displaced. It appears to be where the included graphic is located, since the `a` and `b` are always in the correct place. It also has something to do with the explicit `height=100pt` since removing that also fixes the problem (`width=<something>` also causes the problem to occur). ![Displaced image](http://i.stack.imgur.com/afENC.png)   1. What's happening?   2. How can I make it stop? * * * Note that the following are related:   1. Wrong positioning of images inside tikzpicture with XeLaTeX   2. Switching from PDFLaTeX to XeLaTeX is messing with my pgftext coordinates but I'm already in the situation of the answers given there. Nor does the answer to Centering full-page Tikz image on page without margins with xelatex? work. * * * _Edit_ : Following on from David and Harish's comments, I updated TL2013 and PGF. With the PGF that comes with TL2013 then it compiles correctly. With the CVS version of PGF then it does _not_. So the problem appears to lie with the PGF code for xelatex. I also discovered that the page changed from A4 paper (TL version of PGF) to letter paper (CVS version). As a Brit, my TL is set to produce A4 by default. Manually putting in `a4paper` changes the paper size back to A4, but doesn't correct the image displacement. So my guess is that the error is in PGF's driver file for XeTeX.


title: Largest image that doesn't get put on separate page?

text: With an image in its own section of a document, like:               \subsubsection{Title}          \begin{figure}     \centering     \includegraphics[width=0.7\textwidth]{somefile.pdf}     \end{figure}      How can you set it to make the image as big as possible within the page constraints, but not so large that the image gets put on a different page to the title?


title: Kile on windows 7 - Missing settings option

text: I added another button to the toolbar. Before adding that, there was a "configure kile" or something similar in the settings tab. After adding the button that option is not visible. So now I have no way to go to Kile settings. Even removing the button from the toolbar does not resolve this. Any ideas? Windows 7 Kile ver 3.7


title: Control appearance of caption when using subfigures

text: I am trying to style the name and text of captions so that the name ("Figure", "Table" etc) is in bold, and the title text (eg "A picture of a cat.") is in italics.Following the memoir manual I use:               \captiontitlefont{\small\itshape}     \captionnamefont{\small\bfseries}      So the following works, using memoir (produced by lyx):               %% LyX 2.0.3 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[11pt,a4paper,oneside,english,oldfontcommands,justified,a4paper]{memoir}     \usepackage{mathpazo}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \pagestyle{plain}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \pdfpageheight\paperheight     \pdfpagewidth\paperwidth               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.          \captiontitlefont{\small\itshape}     \captionnamefont{\small\bfseries}          \makeatother          \usepackage{babel}     \begin{document}     \begin{figure}     \caption{A picture of a cat.}      However, as soon as I add a subfigure, the caption is no longer styled. This does not work:               %% LyX 2.0.3 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[11pt,a4paper,oneside,english,oldfontcommands,justified,a4paper]{memoir}     \usepackage{mathpazo}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \pagestyle{plain}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \pdfpageheight\paperheight     \pdfpagewidth\paperwidth               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.          \captiontitlefont{\small\itshape}     \captionnamefont{\small\bfseries}          \@ifundefined{showcaptionsetup}{}{%      \PassOptionsToPackage{caption=false}{subfig}}     \usepackage{subfig}     \makeatother          \usepackage{babel}     \begin{document}     \begin{figure}     \subfloat[My first cat.]{                    }\caption{A picture of some cats.}               \end{figure}          \end{document}      I've also tried using:               \renewcommand{\fnum@figure}[1]{\textbf{\figurename~\thefigure} : }      but again this doesn't work when the subfig package is loaded. (I am writing in French, using babel which also styles things ie putting FIGURE in uppercase, but that seems to be a separate issue). How can I style my captions when using subfigures?


title: "!Missing $ inserted" error using amsmath environments

text: I am trying to compile a document with equations but whenever I use `\begin{eqnarray}..\end{eqnarray}` or `\begin{align}...\end{align}` or anything like this I get the error msg `!Missing $ inserted.<inserted text>$`. However if I type those equations without using `\begin{eqnarray}...\end{eqnarray}` or similar things I do not get any error msg and my document runs perfectly. Even this simple thing does't work....Please help...               \documentclass[a4paper,12pt]{article}     \usepackage{amsmath}     \usepackage{amssymb}          \begin{document}          \begin{align}     $=$          \end{align}     \end{document}


title: Polyglossia and biblatex-apa

text: I am trying to typeset a document in British English, using XeLaTeX, Polyglossia and BibLaTeX, with APA-style references. Unfortunately, I get the following error:               ! Undefined control sequence.     <argument> \mkbibdateapalongextra      Below is a minimal working example:               \begin{filecontents}{mwe.bib}     @online{test2012,         author={John Doe},         title={It is not working},         date={2012-02-03},         url={http://google.com/},         urldate={2012-03-18}     }     \end{filecontents}          \documentclass[12pt,a4paper]{article}          \usepackage{polyglossia}     \setdefaultlanguage[variant=british]{english}     \usepackage{csquotes}     \usepackage[backend=biber, style=apa]{biblatex}     \DeclareLanguageMapping{british}{british-apa}          \bibliography{mwe.bib}          \begin{document}          This is a reference. \cite{test2012}          \clearpage     \printbibliography          \end{document}      After appending the commands in this solution, I get a different error:               ! Undefined control sequence.     <argument> \mkbibdateapalongmdy      The problem seems to be related to the question mentioned above, although British English is a common language, and the lbx files are present.


title: how to align longtable at the left side

text: I'm using `longtable` package to create tables, that take more than one page. But be default longtable is centered. How to left-align a longtable?


title: Wrap text with both spaces and no spaces

text: Trying to wrap text using `longtable` combined with `seqsplit` but it won't format correctly for something like `thisisareallylongexamplethisisareallylongexamplethisisareallylongexamplethisisareallylongexample with a space` because `seqsplit` removes all spaces               \documentclass[pdftex]{report}     \usepackage[left=65pt,top=28pt,right=65pt,bottom=65pt]{geometry}     \usepackage{longtable}     \usepackage{seqsplit}          \begin{document}          \begin{longtable}{p{50pt} p{360pt} p{50pt}}          & \seqsplit{thisisareallylongexamplethisisareallylongexamplethisisareallylongexamplethisisareallylongexample with a space} & test \\          \end{longtable}          \end{document}


title: Make apostrophe closer to letter

text: I am using the `lettrine` package to typeset capitals. When there is an apostrophe with a capital L, the spaces look quite ugly. I would like to achieve something like the following: ![target capital](http://i.stack.imgur.com/Jxdhh.jpg) I've already set some parameters of the capital to get close to it:               \lettrine[lines=3,lhang=0.33,lraise=0,loversize=0.15,findent=-1em,nindent=1.5em]{L'}{Esprit-Saint}      but the apostrophe is too far from the capital L. I've tried using `\kern` to get it closer, but I'm not getting anywhere really. Is there a way I can get the apostrophe aligned like in the given example?


title: Bibliography after Appendix, but supposed to be not PART of it

text: I'm using document class **scrbook**. I want to put my bibliography after appendix (in source this starts with `\appendix`), but in my toc that is visible when I open up the generated PDF file, it is a part of the appendix. Is there a way to make it the same level as appendix but not create a whole new part in the document (i.e. manipulate only the toc?). Thank you in advance!


title: Generating reports with LaTeX programmatically

text: Crystal Reports, JasperReports and many other report writers are conventionally used in software development practices when it comes to producing printer-ready reports. It would appear that a LaTeX based template engine could be successfully used instead to produce such reports. This could be especially convenient for software houses well familiar with LaTeX (e.g. where it is used to produce technical and other documentation). Had anyone heard of any effort in this direction? Some FOSS project?


title: Two-column longtable or tabular

text: I'm using `longtable` to store a glossary-like list of abbreviations used in my document, and as it only has two columns, but is two pages long, I was wondering if there was a way to make it wrap into columns, or an alternative package that would make the creation of a glossary simpler. I've read over the documentation of `nomencl`, but it doesn't look to be quite what I'm after, as I don't want an index, but a list of abbreviations and their meaning. And I don't need hyperlinks to their occurrences or even page references. Just a list of the abbreviations and their definitions. The table I'm presently using is simple:               \begin{center}\small       \begin{longtable}{>{\scshape}fm{0.10\textwidth}-m{0.50\textwidth}}         abbr & Abbreviation \tabularnewline         abbr & Abbreviation \tabularnewline          ...       \end{longtable}      \end{center}      I've set up column formatting marks so the left-hand column is always in small-caps, and the column-width setting is what looks nice-ish on an A4 page with a nice amount of space between the abbreviation and its definition. But the right side of the page is devoid of content, and I would prefer to realign this table so instead of stretching over two pages, it's reduced to just one. **EDIT** Using the `tabbing` environment gives me the desired table split over two columns, but takes away the formatting control I previously had. Can I have the best of both worlds? I really don't want to add a `\textsc{abbr}` to all 100 lines or so. **EDIT 2** I don't want this table to span columns, I want it to wrap around columns. So it runs to the bottom of the first column, and then continues down the next, _before_ moving to the next page if necessary.


title: embedded fonts in TeX

text: How can I introduce, as embedded subsets, the fonts: Symbol, Times-Bold,Times- Roman, TimesNewRomanPSMT-Bold, TimesNewRomanPSMT-Bolditalic in Plain TeX, under Ubuntu?


title: font latex IEEEtran

text: I am trying to convert my paper to IEEEtran. the problem is when I try to upload the paper. it gives me the message on the paper font as follows: The PDF file cannot be accepted: Publishers require that PDF fonts are embedded so that documents can be printed everywhere; The manuscript has a text width of 7.38 inches (on page 3), which exceeds the limit of 7.30 inches. how i can solve this problem. please i need your help.


title: Does pdflatex embed fonts and AMSMath symbols?

text: > **Possible Duplicate:**   >  How to embed fonts at compile time with pdflatex I'm interested in writing a math book and using the Internet site Lulu. They say that when you submit content in PDF format, make sure the font is 'embedded' in the PDF file. Does pdflatex do this by default? If not, could someone provide a sample command line such as:               $pdflatex -[embed-fonts?] myfile.tex


title: Drawing a tree without nodes

text: How could I redraw this without nodes and just having dots between arrows?               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{petri}     \tikzset{state/.style={circle,draw=gray,inner sep=0pt,minimum size=7mm,label=center:$#1$,name=#1},     redarrow/.style={->, red, fill=none,>=stealth},bluearrow/.style={->, blue, fill=none,>=stealth},       redline/.style={-,red,fill=none},blueline/.style={-,blue,fill=none}}          \begin{document}          \begin{tikzpicture}     \node[state=a^{-1}]{};     \node[state=1,right=of a^{-1}]{};     \node[state=b,above=of 1]{};     \node[state=a,right=of 1]{};     \node[state=ab^{-1},above=of a]{};     \node[state=aa,right=of a]{};     \node[state=ac,below=of a]{};     \node[state=acc,right=of ac]{};     \node[state=aca,below =of ac]{};     \draw[redarrow](a^{-1})--(1);     \draw[redarrow](1)--(b);     \draw[redarrow](1)--(a);     \draw[redarrow](ab^{-1})--(a);     \draw[redarrow](a)--(aa);     \draw[redarrow](a)--(ac);     \draw[redarrow](ac)--(acc);     \draw[redarrow](ac)--(aca);     \end{tikzpicture}          \end{document}


title: How to include picture in original size into document page on center?

text: I have a picture that I'd like to include in the center of the page. I don't want the picture to scale. So I tried this (among a lot of other variations):               \begin{figure}[htb]     \centering     \includegraphics{overview_pyramid.png}     \caption{Overview pyramid}\label{fg:overview_pyramid}     \end{figure}      Why isn't this working? I center the image and I don't set a specific size. Nevertheless the picture is scaled (but don't know the factor) and is on the left end of the page.


title: Glossaries: emphasize first occurrence of every section

text: I'm searching a way to emphasize the first occurrence of a glossary term in every section               \usepackage{glossaries}     \makeglossaries     \newglossaryentry{webapp}{         name=webapp,         first={\underline{webapp}},         description={description of the webapp}     }      If i use this in this way               \section{first}     \gls{webapp} \gls{webapp} \gls{webapp} \gls{webapp}          \section{second}     \gls{webapp} \gls{webapp} \gls{webapp} \gls{webapp}      Only the fist occurrence on the first section will be underlined, the other occurrence will not. Is there a solution to make also the first occurrence of "webapp" on the second section be underlined?


title: How to change the 'verbatim' font in biblatex references?

text: Cross-post of http://latex-community.org/forum/viewtopic.php?f=48&t=24483 but since I get no answer there I'm hoping someone over here can help. **The Goal:**   I want to use a custom font (Calluna and Calluna Sans by Exljbris) as main font for my document using `fontspec`, with `eulervm` as math font. Also, Calluna provides both OldStyle and Lining figures, of which I prefer the former in my main text, and the latter in mathmode. Furthermore, I'm a big fan of `siunitx` to format numbers with units. Finally I also use `biblatex` for typesetting my references. **The Problem:**   `eulervm` comes with a set of numerals that just don't look very nice together with Calluna, especially when formatting numbers inline in the text. Also, the default setting to `eulervm` is to not use the Euler digits but the default roman digits. Apparently, these are not set by `fontspec` because in 'plain' math mode the Computer Modern digits are used and that looks even worse. To make matters worse, with or without the `euler-digits` option to `eulervm`, `siunitx` _always_ uses the Euler numerals in math mode, and depending on the `detect-all` option also in text mode. To correct these problems I use the `mathspec` package to set the digits in math mode to Calluna as well, while leaving the normal text alone. This solution works fine throughout the whole main text, including verbatim environments. But then, enter references. Most of my references contain either an URL or a DOI (Digital Object Identifier), and these are handled in a verbatim style by `biblatex`. But as soon as I use the `\setmathfont` command, the numerals (and only the numerals) inside the `biblatex`-verbatim fields are changed to Calluna as well. However, the verbatim font (Latin Modern Mono) and Calluna are quite different, and don't mix very well. And unfortunately, the `\setmonofont` command does change the letters but not the numerals. **The Question**   What is the best way to get the numerals consistent throughout the document? I prefer the Calluna numerals both in text and math mode, but the default mono font in verbatim mode. If it is possible to set the numerals in math mode without `mathspec`, using only `fontspec`, then I would prefer that since `mathspec` limits me to using `XeTeX`, while I would like to use `LuaTeX`. **The Code**   Note that for compatibility I changed all references to Calluna in the code to fonts available by default on most computers.               \begin{filecontents}{test.bib}     @Article{Hay2011,       Title                    = {Can humans force a return to a `Cretaceous' climate?},       Author                   = {William W. Hay},       Journaltitle             = {Sedimentary Geology},       Year                     = {2011},       Doi                      = {10.1016/j.sedgeo.2010.04.015},       ISSN                     = {0037-0738},       Language                 = {english},       Note                     = {Causes of oxic - anoxic changes in Cretaceous marine environments and their implications for Earth systems },       Number                   = {1-2},       Pages                    = {5--26},       Volume                   = {235},            Journal                  = {Sedimentary Geology },       Keywords                 = {Cretaceous},     }     \end{filecontents}     \documentclass{scrartcl}          \usepackage{amsfonts}     \usepackage[             euler-digits             ]{eulervm}          \usepackage{siunitx}     \sisetup{         detect-all,         }          \usepackage{mathspec}     \setmainfont[Ligatures={Common,TeX},Numbers={OldStyle,Proportional}]{Times New Roman}     \setsansfont[Ligatures={Common,TeX},Numbers={Lining,Proportional}]{Arial}     \setmathfont(Digits,Latin,Greek)[Arabic=Regular,Uppercase=Plain,Lowercase=Plain,Numbers={Lining,Monospaced}]{Times New Roman}% According to the manual this sets the digits to the regular arabics, while leaving the latin and greek letters untouched, which is intented, I want eulervm for maths letters.     \setmonofont[Ligatures={NoRequired,NoCommon,NoContextual},Numbers={Lining,Monospaced}]{Courier New}          \usepackage[         style=authoryear-comp,         doi=true,         url=true,         sorting=nyvt,         backend=biber,         ]{biblatex}     \usepackage[hidelinks]{hyperref}     \addglobalbib{test.bib}     \begin{document}          \section{Verify sans font}     The following line shows the normal verb command is unaffected:          {\scshape DOI:}\ \verb|10.1016/j.sedgeo.2010.04.015|          This is a sentence to test the various fonts for digits with or without \verb|\sisetup{detect-all}| or \verb|\setmathfont|. 1234567890, \(1234567890\), \SI{1234567890}{\metre}, \(\SI{1234567890}{\metre}\),\\ \num{1234567890}, \(\num{1234567890}\).          \begin{verbatim}     This is a test of numerals in the verbatim environment: 1234567890     \end{verbatim}          \textcite{Hay2011} shows the problem with the DOI, I included this one because it has an ugly mixture of letters and digits, showing the problem to its full extent.     \printbibliography     \end{document}


title: Paragraph spacing in other languages.

text: I am writing a document in French using LaTeX and I found a weird behavior with paragraph spacing. Here is a MWE (in English):               \documentclass{article}          %\usepackage[french]{babel}     %\usepackage[spanish]{babel}     \setlength{\parskip}{10ex plus 0.5ex minus 0.2ex}          \begin{document}          Test on a first paragraph. Here I list some things:     \begin{itemize}     \item One.     \item Two.     \item Three.     \end{itemize}          Another paragraph, is it? lorem lorem lorem lorem lorem lorem lorem     lorem lorem lorem lorem lorem lorem lorem lorem.          \end{document}      Note: I set a huge `parskip` in order to differentiate paragraphs. When compiling this document, I get three groups: the first paragraph, the itemize and the second paragraph. However, when including babel with the `french` option, the result is different: One whole block (a single paragraph). What I would like is to have the second paragraph detached from the first one, i.e. with the appropriate `parskip` between them. **Question:** How can I separate these paragraphs? Also, out of curiosity: What is the rule behind this rule implemented by babel? I realize that when including babel with a specific language option, some spacing rules change. For example, in french, one must put a space before the colon, question mark, among others. Not being a native french speaker, I was wondering what is the rule that supports this.


title: How to vertically center two images next to each other?

text: How can I vertically center two images next to one another? Here is some example code:               \begin{minipage}[h]{6in}       \centering        \vspace*{.3in}~\\        \includegraphics[height=1.25in]{fig1.pdf}        \hspace*{.2in}        \includegraphics[height=1in]{fig2.pdf}     \end{minipage}      I want the center line of both images to be at the same height.


title: Migrating Texniccenter and Biber to a new computer fails

text: I had a running system with Miktex 2.9 and Biber as well as Texniccenter 1 on a W7 machine. Now I bought a new W7 machine and wanted to reproduce the system on this machine. I installed the same Texniccenter version and the latest Miktex 2.9.5105. I also downloaded Biber from here and moved it to `C:\Program Files (x86)\MiKTeX 2.9\miktex\bin`. I then exported the output profiles from my old Texniccenter Installation and imported them in the new one. The problem now when compiling on exactly the same .tex-files (after having deleted all the stale AUX-files etc.): I don't get any errors, but a lot of warnings. Basically, all my references seem to be `undefined`. E.g.: `Latex warning: citation 'oreilly_2005' on page 92 undefined on input line 201`. I also went into the Settings and Settings (Admin) of Miktex and "refreshed the FNDB", didn't help. I don't understand what the problem is, as, apart from the new Miktex (and probably biber version), everything is the same as on the old machine.


title: Correct the size of < > in math mode?

text: I am using `\left<` and `\right>` to indicate the average in an equation. Unfortunately it looks quite strange in the following example, as the automatic size estimation is different for both sides of the equation. Is there any way to fix this, so that it looks "correct"?               \documentclass{standalone}          \begin{document}          $\left< \Delta \eta \right>^2 \ll \left< \eta^2 \right>$          \end{document}      At the moment the output is as follows with clearly visible difference in size of the parentheses. ![enter image description here](http://i.stack.imgur.com/JRLr7.png)


title: Section title with runin and KOMA class?

text: I would like to have section titles with runin so that there is no newline after the section title. This can be done with               \documentclass{article}     \usepackage{titlesec}     \title{\section}[runin]{\large}{\thesection}{1em}{}[]     \begin{document}         \section{First section}          This text follows on the same line as "First section"     \end{document}      However, I am using the KOMA `scrartcl` class and use of the `titlesec` package is discouraged (see Incompatibilities between KOMA-Script and titlesec). I have searched through the KOMA-Script documentation, but cannot find anything like the `runin` option in `titlesec`. How can I achieve this functionality while using a KOMA-Script class?


title: BibTeX : what is in 3rd arg of ENTRY?

text: Could someone explain meaning of parameters is 3rd argument of the `ENTRY` declaration that appear in some BST files? Here is small extract from `unsrtnat.bst`:               ENTRY       { address         annote         . . .       }       {}       { label extra.label sort.label short.list }      I guess that `label`, `extra.label`, `sort.label`, `short.list` are computed by `bibtex.exe` but how? The `label` parameter seems to be ordinal number of current reference. Where one could find complete description of the `ENTRY` command?


title: "Undefined Control Sequence" error for several lines

text: I get "undefined control sequence" error message for several lines: "undefined control sequence" (after "\pagebreak", where I pressed ENTER for an empty line), "undefined control sequence \section", and "undefined control sequence \end{document}". It is the first time that I installed TeXstudio on Windows 7. I also installed MiKTeX prior to TeXstudio. Moreover, I tried the code on Windows XP and didn't get the error messages at all. The complete code is below.               \documentclass[a4paper]{article}     \usepackage{graphicx,float}     \floatstyle{boxed}     \usepackage[toc,page]{appendix}     \usepackage{hyperref}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{textcomp}     \usepackage{multirow}     \usepackage{natbib}     \usepackage{tikz}     \usetikzlibrary{decorations.pathreplacing}     \usetikzlibrary{decorations.pathmorphing, patterns,shapes}     \usepackage{preview}     \usepackage[affil-it]{authblk}     \usepackage{amsthm}     \newtheorem{proposition}{Proposition}     \newtheorem{lemma}{Lemma}               \title{the title}     \begin{document}     \date{March 4, 2014}     \maketitle     \pagebreak          hi          \section{Intro}          This is the main text.          \end{document}


title: verbatim text in ConTeXt tables

text: I want to create a table for a few blocks of source code. In LaTeX, I would do               \hline      \begin{lstlisting}     abc;     def;     \end{lstlisting}     \tabularnewline      Is there a way to accomplish something like this in ConTeXt? I have tried `\starttyping` and `\stoptyping` within table cells, but the file fails to compile if I do that. The reason I would like to use tables is that I could then use `\placetable` for floats, and also that I would have a clean way of referring to it in other parts of the document.


title: Can't shift/position \chapter with titlesec?

text: Somehow I my attempt to change the placement of \chapter seems not to work. I would like to that my chaptertitle begins right at the top of the page. Do I need to change the plain pagestyle?               \documentclass[paper=15cm:23cm, headinclude=true, numbers=enddot, draft]{scrbook}          \usepackage[ngerman]{babel}          \usepackage[automark]{scrpage2}        \renewcommand*{\headfont}{%      \normalfont\sffamily\scshape}      \renewcommand*{\chaptermarkformat}{}      \renewcommand*{\sectionmarkformat}{}          \usepackage{titlesec}     \setkomafont{chapter}{\huge\normalfont\sffamily\bfseries}          %Position of Chaptertitle     \titlespacing{\chapter}{0pt}{-50pt}{20pt}          \begin{document}     \chapter{This first chapter}     Hi there.     \end{document}


title: How to get tex4ht to respect listings styling better ?

text: I've been producing PDFs and HTML from Latex sources, using tex4ht for the HTML (I'm on Debian/Lenny; so whatever versions are default on that). I'm using the listings package to include source code. I'm very happy with the "look" of the PDF, but the HTML looks a bit dreary without the code colouring or "blocked" listing headers. Is there some way of getting the HTML to include more of the listings styling ? (I'm not wedded to tex4ht if there are alternatives which do the job better).


title: Hyperref package and ACM class.

text: I am using a Modified `acmtrans` document class. It was modified to add a custom journal. I am having problems using the `hyperref` package. My file has the following in the preamble:               \documentclass[mistar,hyperref]{acmtrans2m}      \usepackage[pdfmark]{hyperref}      When compiling I get the following error:               ! Undefined control sequence.     \pdfinfo #1#2->\pdfmark          {pdfmark=/DOCINFO,Title=#1,Author=#2}      Can anyone help?


title: delarray and colortbl issue

text: There seems to have a compatibility issue between the `colortbl` and `delarray` packages because when compiling the following code :               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage{delarray,colortbl}     \begin{document}     $\begin{array}({ll})     a & b \\     c & d     \end{array}$     \end{document}      pdfLaTeX complain about a               missing \right. at \end{array}.      When I remove the `colortbl` package, then it works as normal. I've got old TeX sources with a lot of matrices defined with the help of `delarray`. I discovered this problem because I wanted to put some colors on these documents. Is there a fix for that?


title: External scripts when using TeXShop

text: As I wrote in this answer to my question, I decided to use a shell script in order to concatenate the bunch of .tex files and compile them. However, this way, when ever I want to compile the whole glossary, I have to switch to the `terminal` and run the script there, from the right directory, i.e. the glossary's directory. I'm using TeXShop on a mac OSX, and I want to know is there a way to set a short cut in TeXShop that will invoke the script? Thanks, Dror.


title: Math formula mixed with wrapfigure

text: I use a wrapfigure as below:               \begin{wrapfigure}{R}{0.5\textwidth}     \begin{center}     \includegraphics{image.png}      \end{center}     \caption{\small \sl My Diagram. \label{fig:image}}       \end{wrapfigure}       Somewhere in my report i have a formula which passes right below the figure. (i.e between caption and figure). How can i prevent this?


title: Text doesn't fit the box

text: I created the following picture with Inkspace and made export to tikz. The problem is that the text doesn't fit the boxes. And the arrows should be colored with a gradient, but it's not so important. I tried `parbox` and `tabular` environment. The result is similar to the result below. Are there any other ways to get it fixed? Sorry for the ugly code )) Thanks in advance! ![enter image description here](http://i.stack.imgur.com/60ShY.png)               \documentclass[12pt,a4paper,oneside, ngerman]{scrreprt}     \usepackage[ansinew]{inputenc}      \usepackage{tikz}     \begin{document}     \begin{figure}               \definecolor{ccccccc}{RGB}{204,204,204}     \definecolor{cffffff}{RGB}{255,255,255}     \definecolor{c999999}{RGB}{153,153,153}     \definecolor{mygray}{RGB}{240,240,240}          \begin{tikzpicture}[ y=0.80pt, x=0.8pt,yscale=-1, scale=0.9]     \begin{scope}[opacity=0.540,transparency group]       \path[cm={{1.1134,0.0,0.0,1.1134,(-102.46687,-81.77008)}},fill=ccccccc]         (557.1429,311.6479)arc(-0.015:180.015:138.571)arc(-180.015:0.015:138.571) --         cycle;       \path[cm={{1.02577,0.0,0.0,1.02577,(-65.21652,-55.31787)}},fill=cffffff]         (557.1429,311.6479)arc(-0.015:180.015:138.571)arc(-180.015:0.015:138.571) --         cycle;       \path[fill=black] (180,242.36218) node[above right] (text4246) {};       \path[draw=ccccccc,line join=miter,line cap=butt,miter limit=4.00,line         width=0.000pt] (265.0000,152.3622) -- (310.0000,127.3622);     \end{scope}       \path[fill=ccccccc,nonzero rule] (170.4042,189.8211) -- (259.5958,152.7604);       \path[draw=ccccccc,fill=ccccccc,line join=miter,line cap=butt,miter         limit=4.00,line width=9.982pt] (165.0322,167.4265) .. controls         (205.0000,167.3622) and (240.0000,167.3622) .. (264.5510,156.9455);       \path[draw=ccccccc,fill=ccccccc,line join=miter,line cap=butt,miter         limit=4.00,line width=9.840pt] (548.1593,287.4135) -- (598.5310,326.3043);       \path[draw=ccccccc,line join=miter,line cap=butt,miter limit=4.00,line         width=9.840pt] (267.8571,151.6479) .. controls (285.0000,137.3622) and         (295.0000,132.3622) .. (312.8571,125.2193);       \path[draw=ccccccc,line join=miter,line cap=butt,miter limit=4.00,line         width=11.126pt] (416.7852,123.3070) .. controls (465.0000,147.3622) and         (485.0000,177.3622) .. (504.0658,210.8975);       \path[draw=ccccccc,line join=miter,line cap=butt,miter limit=4.00,line         width=9.840pt] (511.4464,278.0983) .. controls (506.4286,312.3622) and         (505.0000,317.3622) .. (491.5232,339.1471);       \path[draw=ccccccc,line join=miter,line cap=butt,miter limit=4.00,line         width=11.558pt] (302.5861,399.3372) .. controls (360.0000,417.3622) and         (390.0000,422.3622) .. (452.4374,382.1258);       \path[draw=ccccccc,line join=miter,line cap=butt,miter limit=4.00,line         width=11.126pt] (217.6500,281.8994) .. controls (225.0000,322.3622) and         (230.0000,327.3622) .. (245.1144,355.2866);       \path[draw=ccccccc,line join=miter,line cap=butt,miter limit=4.00,line         width=11.126pt] (265.9079,154.0784) .. controls (241.4286,181.2908) and         (233.2143,192.7193) .. (215.7025,237.4581);       \path[draw=ccccccc,line join=miter,line cap=butt,miter limit=4.00,line         width=9.840pt] (597.9835,325.9815) .. controls (624.8229,346.1229) and         (624.8229,346.1229) .. (624.8229,346.1229);       \path[draw=black,fill=mygray,line join=miter,line cap=butt,even odd rule,line         width=0.987pt,rounded corners=0.0000cm] (133.2388,212.6087) rectangle         (264.7613,274.0543);       \path[cm={{0.91468,0.0,0.0,0.90175,(-100.95407,-80.85112)}},fill=cffffff,opacity=0.000]         (644.4773,389.7021)arc(-0.000:180.000:148.492)arc(-180.000:0.000:148.492) --         cycle;       \path[fill=black] (150,262.36218) node[above right] (text4251) {};       \path[draw=black,fill=mygray,line width=0.742pt] (595.7193,265.8981) --         (509.7908,314.9300) -- (423.8622,265.8981) -- (509.7908,216.8661) -- cycle;       \path[fill=black] (443.01562,266.86725) node[above right] (text4362)         {\begin{minipage}[c]{10em}Abbruchkriterium \\ erfüllt?\end{minipage}};       \path[cm={{0.79307,-0.34521,0.66812,2.0141,(127.42176,109.33876)}},fill=c999999]         (210.0000,42.3622) -- (195.0000,51.0224) -- (195.0000,33.7019) -- cycle;       \path[cm={{0.73268,0.45968,-1.28519,1.68858,(505.694,162.81655)}},fill=c999999]         (210.0000,42.3622) -- (195.0000,51.0224) -- (195.0000,33.7019) -- cycle;       \path[draw=black,fill=mygray,line join=miter,line cap=butt,even odd rule,line         width=0.987pt,rounded corners=0.0000cm] (210.0560,328.7001) rectangle         (341.5786,390.1457);       \path[draw=black,fill=mygray,line join=miter,line cap=butt,even odd rule,line         width=1.068pt,rounded corners=0.0000cm] (394.0991,348.4690) rectangle         (548.3774,409.8133);       \path[draw=black,fill=mygray,line join=miter,line cap=butt,even odd rule,line         width=0.987pt,rounded corners=0.0000cm] (322.4799,94.0224) rectangle         (454.0024,155.4680);       \path[draw=black,fill=mygray,line join=miter,line cap=butt,even odd rule,line         width=1.043pt,rounded corners=0.0000cm] (22.5064,134.1592) rectangle         (169.6727,195.5343);       \path[draw=black,fill=mygray,line join=miter,line cap=butt,even odd rule,line         width=0.987pt,rounded corners=0.0000cm] (606.0053,302.4869) rectangle         (737.5278,363.9325);       \path[fill=black] (164.28571,247.93361) node[above right] (text4255) {Mutation};       \path[fill=black] (217.85713,363.07645) node[above right] (text4255-0)         {Rekombination};       \path[fill=black] (405,373.79074) node[above right] (text4331) {\begin{minipage}[c]{10em}Selektion der\\ besten Individuen\end{minipage}};       \path[fill=black] (340.14285,120.21932) node[above right] (text4335) {\begin{minipage}[c]{10em}Berechnung\\ der Fitness    \end{minipage}};       \path[fill=black] (26.270847,159.8571) node[above right] (text4341)         {\begin{minipage}[c]{10em}Initialisierung \\der ersten\\ Population\end{minipage}};       \path[fill=black] (612.86725,328.42966) node[above right] (text4349) {\begin{minipage}[c]{10em}Ergebnis: \\ beste Individuen \end{minipage}};       \path[cm={{0.60459,-0.61854,1.37766,1.61401,(84.78393,210.78691)}},fill=c999999]         (210.0000,42.3622) -- (195.0000,51.0224) -- (195.0000,33.7019) -- cycle;       \path[cm={{0.3593,0.78678,-2.00187,0.70393,(516.30858,26.20105)}},fill=c999999,miter         limit=4.00,line width=7.278pt] (210.0000,42.3622) -- (195.0000,51.0224) --         (195.0000,33.7019) -- cycle;       \path[cm={{-0.28036,0.81824,-1.93729,-0.86596,(627.99541,212.57875)}},fill=c999999]         (210.0000,42.3622) -- (195.0000,51.0224) -- (195.0000,33.7019) -- cycle;       \path[cm={{-0.61294,-0.61027,1.62665,-1.36272,(357.04714,578.75742)}},fill=c999999]         (210.0000,42.3622) -- (195.0000,51.0224) -- (195.0000,33.7019) -- cycle;       \path[cm={{-0.22342,-0.83865,2.21259,-0.33168,(167.67156,464.36418)}},fill=c999999]         (210.0000,42.3622) -- (195.0000,51.0224) -- (195.0000,33.7019) -- cycle;       \path[fill=black] (582.5,298.07648) node[above right] (text5333) {Ja};       \path[fill=black] (446.07141,322.36218) node[above right] (text5337) {Nein};          \end{tikzpicture}          \end{figure}     \end{document}


title: How to move dark rectangle in headline of PaloAlto theme after changing the sidebar width?

text: I'm currently using the `beamer` `PaloAlto` theme with a headline and sidebar on each slide. I used the command `\setbeamersize{sidebar width left=1.7cm}` to fit the table of contents in the sidebar. The command changes the width of the sidebar, but it doesn't change the width of the darker area in the upper left corner of the slide where the sidebar overlaps the headline. I was wondering what parameters I need to change to make the width of the dark overlap area the same as the width of the sidebar?


title: Phantom equals sign in aligned equation

text: When typing out long equations, I like to split everything up into separate lines and start each one off with an equals sign. How do I hide the first equals sign while keeping the layout exactly the same? I tried wrapping it with `\phantom`, but that oddly decreases the horizontal offset of the first line: > ![enter image description here](http://i.stack.imgur.com/k5LNR.png) Here's the source for the above picture:               \documentclass[preview]{standalone}          \usepackage{amsmath}          \begin{document}         \begin{align*}             &\phantom{=} x^2 - 1 \\             &= (x - 1) (x + 1) \\             &= 7         \end{align*}     \end{document}      Moving the ampersands to the other side of the equals signs sort of works, but it makes the equals signs too close to the equations: > ![enter image description here](http://i.stack.imgur.com/7MAbO.png)


title: sidewaystable on not landscape page?

text: Is it possible to have a `sidewaystable` that will be in the document but will be oriented like other pages in the document (non landscape)? I made a table that goes all over a page (well the length of it)               \documentclass[a4paper,12pt]{scrartcl}     \usepackage{rotating}     \usepackage{adjustbox}     \usepackage{array}         \setlength{\extrarowheight}{2pt}          \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{amsfonts}          \begin{document}        \thispagestyle{empty}               \begin{sidewaystable}     \begin{adjustbox}{width=\textwidth,totalheight=\textheight,keepaspectratio}         \centering        \begin{tabular}{c|c|c|c}         \textbf{Rubni uvjeti} & \textbf{Difeomorfizam} & \textbf{Lijevi modovi U(1)} & \textbf{Desni modovi SL(2,$\mathbb{R}$)} \\ \hline              Guica et. al. & & & \\         $\mathcal{O}\left(\begin{array}{cccc}         r^2 & r^{-2} & r^{-1} & 1 \\             & r^{-3} & r^{-2} & r^{-1} \\             &        & r^{-1} & r^{-1} \\             &        &        & 1          \end{array}\right)$ &  $\begin{array}{c}\xi=[C+\mathcal{O}(r^{-3})]\partial_\tau+\\         +[-r\epsilon'(\varphi)+\mathcal{O}(1)]\partial_r+\mathcal{O}(r^{-1})\partial_\theta+\\         +[\epsilon(\varphi)+\mathcal{O}(r^{-2})]\partial_\varphi\\ \end{array}$          & $\begin{array}{c}\xi_\epsilon=\epsilon(\varphi)\partial_\varphi-r\epsilon'(\varphi)\partial_r\\ \epsilon_n(\varphi)=-e^{-in\varphi},\ \xi_n=\xi(\epsilon_n)\\ \\ i[\xi_m,\xi_n]=(m-n)\xi_{m+n}\\ \\\end{array}$ &          $\begin{array}{c}          \textrm{Naboj pridružen}\ SL(2, \mathbb{R} )\ \textrm{je nula.} \\          \textrm{Nema pojačavajna}\ SL(2,\mathbb{R} )\ \textrm{u Virasoro.}           \end{array}$\\  \hline          % % %              Matsuo et. al. & & & \\        $\mathcal{O}\left(\begin{array}{cccc}         1 & r^{-3} & r^{-3} & r^{-2} \\             & r^{-4} & r^{-4} & r^{-3} \\             &        & r^{-3} & r^{-3} \\             &        &        & r^{-2}          \end{array}\right)$ &  $\begin{array}{c}\xi=[\epsilon(\tau)+\frac{\epsilon''(\tau)}{2r^2}+\mathcal{O}(r^{-3})]\partial_\tau+\\         +[-r\epsilon'(\tau)+\frac{\epsilon'''(\tau)}{2r}+\mathcal{O}(r^{-2})]\partial_r+\mathcal{O}(r^{-3})\partial_\theta+\\         +[C-\frac{\epsilon''(\tau)}{r}+\mathcal{O}(r^{-3})]\partial_\varphi\\ \\\end{array}$          & $\begin{array}{c}\xi_\epsilon=\epsilon(\tau)\partial_\tau-r\epsilon'(\tau)\partial_r\\          \epsilon(\tau)=\tau^{1+n} \\ {}[\xi_n,\xi_m]=(m-n)\xi_{m+n}\\ \\ \end{array}$ & $\begin{array}{c}          [L_n,L_m]=(n-m)L_{m+n}\\          \textrm{Mjeri odstupanje od ekstremalnosti.} \\          \textrm{Postoji kvazilokalni naboj.}           \end{array}$\\  \hline          % % %              Matsuo et. al. & & & \\        $\mathcal{O}\left(\begin{array}{cccc}         r^2 & r^{-1} & r^{-2} & 1 \\             & r^{-3} & r^{-3} & r^{-1} \\             &        & r^{-1} & r^{-1} \\             &        &        & 1          \end{array}\right)$ &  $\begin{array}{c}\xi=[\epsilon_\tau(\tau)+\mathcal{O}(r^{-1})]\partial_\tau+\\         +[-r\epsilon'_\tau(\tau)-r\epsilon'_\varphi(\varphi)+\mathcal{O}(1)]\partial_r+\mathcal{O}(r^{-1})\partial_\theta+\\         +[\epsilon_\varphi(\varphi)+\mathcal{O}(r^{-1})]\partial_\varphi\end{array}$          & $\begin{array}{c}l_n=\epsilon_\varphi(\varphi)\partial_\varphi-r\epsilon'_\varphi(\varphi)\partial_r\\ \epsilon_n(\varphi)=-e^{-in\varphi}\\ \\ i[l_n,l_m]=(n-m)l_{m+n}\\ \\\end{array}$          &          $\begin{array}{c}\bar{l}_n=-i\epsilon_\tau(\tau)\partial_\tau+ir\epsilon'_\tau(\tau)\partial_r\\ \epsilon_\tau(\tau)=\tau^{1+n}\\ \\ i[\bar{l}_n,\bar{l}_m]=(n-m)\bar{l}_{m+n}\\ \\ \end{array}$\\  \hline         \end{tabular}     \end{adjustbox}     \end{sidewaystable}                    \end{document}      My plan is to put this in an existing document that is of this type: `\documentclass[a4paper,12pt,oneside,openright]{book}`. If I just include it in, I'll get 50+ portrait oriented pages and one landscape one that has this table. But I'd like it to be also portrait oriented, while preserving the orientation of the table (across the page). I hope I'm making myself clear enough :S


title: How does latex restore font after section heading?

text: What I basically want to achieve is to know about every font change in the document. I have overriden the `\selectfont` command as it is used to activate new font according to LaTeX NFSS doc. My version of `\selectfont` does exactly the same as the original version and uses `\message{\fontname\font}` to print new font name to the log file. Before the section heading I can see the font change for bigger bold font, but after the section heading there is no font change using `\selectfont` command. So how does LaTeX change the font back to normal size?


title: Downloading LyX 2.1 Beta1, for Windows

text: I am considering downloading Beta Version 2.1 of LyX, I am currently using version 2.0.6 I have Three questions. The first is, how reliable is this beta version? Second, which files should I download If I am already using Version 2.0.6? Lastly, will I be able to use both versions side by side? I got the picture below from here ftp://ftp.lyx.org/pub/lyx/devel/lyx-2.1/lyx-2.1.0beta1. ![enter image description here](http://i.stack.imgur.com/8Uwfq.png)


title: Expandably change letter case and use inside \csname, without a package

text: I want to change the letter-case of a single character argument, and use that changed letter inside a `\csname`. And I want to do it without an additional package. For example, I want to pass a macro the letter `{S}`, and have it execute the macro `\csname macros\endcsname`, or pass it the letter `{T}`, and have it execute the macro `\csname macrot\endcsname`. In my MWE, I show three approaches:   1. I didn't expect `\lowercase` to work, since I recall reading that it is not truly expanded until the last possible moment. Surprisingly, it goes into an `\edef` okay, but it must not be truly expanded, because it breaks the `\csname`.   2. I also formulated an approach where I used `\numexpr` to add 32 to the ASCII code of the argument and perform a `\char` upon that result. Like `\lowercase`, it gives the appearance of being expandable, but it also fails inside the `\csname`.   3. I finally achieve success with the `stringstrings` package. Having written the package, I _know_ the conversion was **not pretty**... essentially, it is an exhaustive 26-fold check of the form `\if #1Aa\else\if #1Bb\else\if #1Cc\else...\fi\fi\fi`, which has the virtue that it can be expandably placed into an `\edef`, and so it works. There has to be a better way. The MWE works only because I use the inefficiently calculated `\tmp` from METHOD 3 inside the `\csname`. If I use `\tmp` from either of the two earlier methods, it breaks.               \documentclass{article}     \usepackage{stringstrings}     \def\macros{Expandably converted an S to a s}     \def\macrot{Expandably converted a T to a t}     \newcommand\convert[1]{%       %MAKE THE ARGUMENT LOWER CASE       1) LOWERCASE\\       \edef\tmp{\lowercase{#1}}% PRETENDS TO EXPAND, BUT FAILS IN \csname       Here is the ``expanded'' conversion: \tmp\\       % OR       2) ASCII CONVERSION\\       \edef\tmp{\expandafter\char\numexpr`#1+32\relax}% PRETENDS TO EXPAND, BUT FAILS IN \csname       Here is the ``expanded'' conversion: \tmp\\       % OR       3) STRINGSTRINGS PACKAGE\\       \caselower[q]{#1}\def\tmp{\thestring}% WORKS BUT USES A PACKAGE       Here is the ``expanded'' conversion: \tmp\\       %       Now use it in a csname: \csname macro\tmp\endcsname%     }     \begin{document}     \convert{S}\par     \convert{T}     \end{document}      ![enter image description here](http://i.stack.imgur.com/VLuIo.jpg) * * * SUMMARY OF ANSWERS: I have added egreg's code snippets into this MWE to produce a document (and not just terminal output), showing the methods put forth to this point:               \documentclass{article}          %%%%%%%%%%%%%%%%%%%%%%%%%%%% L3 APPROACH          \usepackage{expl3}          \ExplSyntaxOn     \cs_set_eq:NN \Xexplower \tl_expandable_lowercase:n     \ExplSyntaxOff          %%%%%%%%%%%%%%%%%%%%%%%%%%%% EGREG'S LESS HACKY SOLUTION          \def\explowerchar#1{%       \ifcase\numexpr`#1-`A\relax        a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m\or        n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z\else        #1\fi     }          \def\explower#1{%       \doexplowerchar#1\relax     }          \def\doexplowerchar#1{%       \ifx#1\relax       \else         \explowerchar{#1}\expandafter\doexplowerchar       \fi     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%% STEVE'S HACKY PACKAGE APPROACH          \usepackage{stringstrings}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%          \def\macros{Expandably converted an S to a s}     \def\macrot{Expandably converted a T to a t}          \begin{document}          \textbf{Steve's hacky approach}          \caselower[q]{S}\csname macro\thestring\endcsname\par     \caselower[q]{T}\csname macro\thestring\endcsname          \textbf{egreg's less hacky approach}          \edef\lcstring{\explowerchar{S}}\csname macro\lcstring\endcsname\par     \edef\lcstring{\explower{T}}\csname macro\lcstring\endcsname          \textbf{L3 approach}          \edef\lcstring{\Xexplower{S}}\csname macro\lcstring\endcsname\par     \edef\lcstring{\Xexplower{T}}\csname macro\lcstring\endcsname          \end{document}      ![enter image description here](http://i.stack.imgur.com/G2irK.jpg)


title: which eclipse core installation should I download to use install the plug-in TeXlipse?

text: I want to taste TeXlipse. First of all, I must install the eclipse core downloaded from the official site. I am confused with which one I should install. :D Could you let me know the correct installation? Or I can choose at random? I just want to use it for supporting TeXlipse. Thank you.


title: rotating package: positioning does not match documentation

text: I want a `sidewaystable` to appear with its top against the inner margin of the body text. According to the `rotating` package documentation, these following settings:               \rotFPtop=0pt and       \rotFPbot=0pt plus 1fil        will place a `sidewaystable` with its top nearest the edge of the page. However, what actually happens is that the _center_ of the table is positioned at the margin, as is illustrated with the following:               \documentclass[twoside]{article}     \usepackage[counterclockwise]{rotating}     \usepackage[a4paper,margin=50mm,showframe]{geometry}          \rotFPtop=0pt     \rotFPbot=0pt plus 1fil     \fboxsep0pt     \def\tab{        \begin{sidewaystable}           \begin{center}              \fbox{\begin{tabular}{c}                 line 1\\line 2\\line 3\\line 4\\\hline                 line 5\\line 6\\line 7\\line 8\             \end{tabular}}           \end{center}        \end{sidewaystable}     }     \begin{document}     \tab\newpage\tab     \end{document}      which shows that the top is neither at the edge of the page, nor at the margin (i.e. 50mm from the edge of the page in this example). **How can I get it at the margin?** _(Edit by Gonzalo Medina)_ This image showing the problem mentioned was obtained from the code posted (I added `showframe` for visualization purposes) using TeX Live2012: ![enter image description here](http://i.stack.imgur.com/lqVOb.png)


title: Define my own xfrac command?

text: Is it possible to create my own xfrac command - without using that package (it is giving me too much trouble)? I know you can do superscript, subscript to make a fraction look. Can I do something like:                \newcommand xfrac{a}{b} = ^a/_b      Thanks!


title: Include R output as pdf in Texmaker

text: I just switched from texshop to texmaker on `Mac OS X`. However, now the plots I want to insert from `R` as pdf in the document are missing the fonts in the `pdflatex` output. It used to work fine with Texshop, but I need Texmaker .Jpeg format has low quality. What is the problem? The minimal working example is:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage[hidelinks]{hyperref}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{array}     \usepackage{rotating}     \usepackage{verbatim}     \usepackage[flushleft]{threeparttable}     \usepackage{booktabs}     \usepackage{tikz}     \usepackage{breqn}     \usepackage{mathstyle}     \usepackage{flexisym}     \usepackage{float}     \usepackage{pdfpages}     \usepackage[sort,comma,numbers,authoryear]{natbib}     \usepackage[onehalfspacing]{setspace}     \setlength{\parindent}{0pt}          \begin{document}          \begin{figure}[h!]     \centering     \includegraphics[scale=0.7]{ael}     \caption{\label{fig:your-figure}Simulated distribution of $\alpha$}     \end{figure}          \end{document}       I attach an image that shows the plot without fonts.![Bildschirmfoto 2014-02-20 um 11.33.11](http://i.stack.imgur.com/yXDKL.png) This it what it looks like in the pdf. ![enter image description here](http://i.stack.imgur.com/pyCft.png)