title: I need a fully expandable function to expand in an "f" type argument

text: I really hope that I'm asking the correct question. What I'm actually working on if far more convoluted than what's happening in the MWE here. I think I've narrowed down things to real problem. I have some old code that does what I want perfectly. Now I would like to use that code in a new situation where I iterate several times using the old code before outputting anything.               \documentclass{article}     \usepackage{xparse}     \ExplSyntaxOn     %%--------------------------------------------------------------------------------     %% In theory, this first section of code works correctly and gives me the desired      %% result.                                                                             %%--------------------------------------------------------------------------------     %% This next macro does some complicated things:                                       %%                                                                                %%    testing booleans, setting token lists, \int_compare, \int_case                   %%                                                                                %% But, regardless, everything it does--I believe--is fully expandable.  That is       %% it should work whether in an "x" or "f" type argument.                              \cs_new:Npn  \_format_expression:n #1 { #1 x 2 - }          \seq_new:N \l_collection_of_expressions_seq     \cs_new:Npn \_parse_expressions:n #1       { \seq_set_split:Nnn \l_collection_of_expressions_seq {,} {#1} }               %% This next function, while fully expandable is not expandable in an "f"          %% tyep argument.                                                                  \cs_new:Nn \_write_expression:       {         \seq_map_inline:Nn \l_collection_of_expressions_seq           { \_format_expression:n { ##1 } }       }          \NewDocumentCommand{\trialFunctionA}{ m }         { \_parse_expressions:n { #1 }            \_write_expression:         }          %%--------------------------------------------------------------------------------     %% Here starts the problematic code                                                    %%--------------------------------------------------------------------------------     %% The start of more complicated things.                                               \seq_new:N \l_outer_collection_of_expressions_seq     \tl_new:N  \l_numerator_tl     \seq_new:N \l_formatted_expressions_seq        \seq_new:N \l_denominator_seq          \cs_new:Npn \_parse_outer:nn #1#2       {          \tl_put_right:Nn \l_numerator_tl {#2}         \_parse_expressions:n {#1}         %% This is where my problem step seems to be. I need the                           %% expansion of \_write_expression: but can't get it.  However,                    %% since \_write_expression: uses \seq_map_inline, this is not                     %% expandable in an "f" type argument.  But neither do I want to blast             %% this with "x" because I might have some unexpandable stuff in here              \seq_put_right:Nn \l_formatted_expressions_seq { 3^{\_write_expression:} }       }          \cs_new:Npn \parse_outer:n #1       {          \seq_set_split:Nnn \l_outer_collection_of_expressions_seq {,} { #1 }         \seq_map_inline:Nn \l_outer_collection_of_expressions_seq            { \_parse_outer:nn  ##1 }          \frac{\l_numerator_tl}{\seq_use:Nn \l_formatted_expressions_seq {\,}}       }             \NewDocumentCommand{\trialFunctionB}{ m }         { \parse_outer:n { #1 } }          %%--------------------------------------------------------------------------------     %% This is here just so I can easily demo the desired final result.                    \def\cheat#1{\_format_expression:n{#1}}          \ExplSyntaxOff     \begin{document}          \[       \trialFunctionA{1,2,3}     \]          \[       \frac{ABC}{3^{\cheat{1}\cheat{2}\cheat{3}}\,                  3^{\cheat{a}\cheat{b}\cheat{c}}\,                  3^{\cheat{M}\cheat{N}\cheat{P}}}     \]          \[       \trialFunctionB{{1,2,3}{A},                       {a,b,c}{B},                       {M,N,P}{C}}     \]          \end{document}      ![enter image description here](http://i.stack.imgur.com/69ale.png) The above code does compile, which is better than my actual document. But I don't have the desired results because expansion is happening too late. Is there some way to get `\_write_expression:` to expand just far enough, but not too far?


title: Why would esvect produce pixelated arrows?

text: When using esvect (MiKTeX, pdflatex) I get the following undesirable result: ![esvect pixelated arrow](http://i.stack.imgur.com/UrR3y.png) From this:               \documentclass{article}     \usepackage{esvect}     \begin{document}     \[\vv{u}\]     \end{document}      The arrows are pixelated in SumatraPDF and Adobe Reader, so it's not viewer related. I suspect it's a font issue, but I am unable to problem solve much further than that.


title: Grid dots in pgfplots

text: How can I generate a multi-resolution dot grid (see image) in pgfplots? The dot grid does not necessarily coincide with the axis ticks. ![multi-resolution dot grid](http://i.stack.imgur.com/cJus8.png) **edit:** The above plot was created using               \addplot[only marks,mark=*] plot table[row sep=crcr,]{ high res. coordinates }     \addplot[only marks,mark=*] plot table[row sep=crcr,]{ low res. coordinates }      with huge tables of MATLAB-computed coordinates. What I'm looking for in this question, is a way to algorithmically create the dot grid in pgfplots.


title: For movie15-based 3D embeds, how to get u3d files?

text: The movie15 package (an interface to embed movies, sounds and 3D objects into PDF documents for use with LaTeX as well as pdfLaTeX) requires 3D files to be in u3d format for embedding into pdf. This works fine with the sample files provided, and I have no problem generating suitable 3D files, but so far, I have not found a way to convert them to u3d. MeshLab, usually the first place to go for such things, crashes during u3d export. Does anyone know of a way to produce u3d files suitable for use with the movie15 package? As I am a newbie, I can only post one link, so I put a version of this question with some links on my blog. (Links added in edit) Edit: I have to add that my question was about 3D files generated on the basis of imaging data; since some of the initial answers were specific for drawing.


title: How can I set footnotes' numbers as superscript in a French report?

text: How to make footnotes' numbers take this form? Preferable by `\renewcommand`. ![enter image description here](http://i.stack.imgur.com/vGfDF.png) Here is what I'm getting using this code:               \documentclass[%         ,12pt         ,french         ]{report}     \usepackage{babel}          \begin{document}     Test\footnote{ojndscosdsncsdpn}     \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/2hCfn.png)


title: Is it good style to use \newline instead of just leaving a blank line in order to get a new paragraph?

text: The two alternatives in my question of course lead to very different results. If you use `\newline`, then your paragraph will not begin indented. Also the spacing between the paragraphs differs. I am asking this because this usage of `\newline` catches my eye in lots of documents.


title: Beamer: How to place graphics at the bottom of a frame

text: I want to achieve that included graphics are always on the bottom of the frame, so that their position isn't influenced by the length of the text above. I tried the `figure` enviroment without success and the `\vfill` also doesn't give the wished success. Here is some similar example source (and you can download the images here I'm using the same):               \documentclass{beamer}          \usepackage{xspace}          \begin{document}          \frame{              \only<1-3>{Blablabla1}         \only<4>{Blablabla2}         \only<5>{Blablabla3}         \only<6>{Blablabla4}         \only<7>{Blablabla5}         \only<8>{Blablabla6}         \only<9>{Blablabla7}              \vfill              \visible<3->{%             \includegraphics<1-3>[width=\linewidth]{img/1.png}             \includegraphics<4>[width=\linewidth]{img/2.png}             \includegraphics<5>[width=\linewidth]{img/3.png}             \includegraphics<6>[width=\linewidth]{img/4.png}             \includegraphics<7>[width=\linewidth]{img/5.png}             \includegraphics<8>[width=\linewidth]{img/6.png}             \includegraphics<9>[width=\linewidth]{img/7.png}             \includegraphics<10>[width=\linewidth]{img/8.png}         }          }          \end{document}      * * * alexurba gave me the answer. I have to add the `[b]` option to the `frame` enviroment. Thank you very much for that.


title: How can I tikz the equivalence (i.e. $\Leftrightarrow$) as arrow?

text: I found in the manual that `implies` is the right kind of arrow tip, so I tried               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows}          \begin{document}     \begin{tikzpicture}[>=latex]       \draw[<->,double equal sign distance,implies] (2,1) -- (3,2);     \end{tikzpicture}     \end{document}      But somehow, `implies` breaks `<->`, such that only one end of the line gets an arrow tip. So how do I get the equivalence as arrow in Tikz? * * * I searched for another suitable arrow tip (like `equivalent`) or another suitable parameter instead of `<->` to say that both line ends should get the arrow tip, but did not find anything.


title: How to use bibliography file with IEEEtransaction?

text: I am in bit of a pickle here. So please help me out. In order to submit my work to IEEE transaction, I downloaded their **IEEEtran.tar** file and unzipped it. Inside, I started using the **bare_jrnl.tex** file as the basis of my work and started editing it to fit my needs. The content of this file looks like the following (note that, I have removed most of the commented out lines to make the shorter):                   \documentclass[journal]{IEEEtran}     \usepackage{cite}     \usepackage[utf8]{inputenc}          % *** GRAPHICS RELATED PACKAGES ***     %     \ifCLASSINFOpdf       % \usepackage[pdftex]{graphicx}       % declare the path(s) where your graphic files are       % \graphicspath{{../pdf/}{../jpeg/}}       % and their extensions so you won't have to specify these with       % every instance of \includegraphics       % \DeclareGraphicsExtensions{.pdf,.jpeg,.png}     \else       % or other class option (dvipsone, dvipdf, if not using dvips). graphicx       % will default to the driver specified in the system graphics.cfg if no       % driver is specified.       % \usepackage[dvips]{graphicx}       % declare the path(s) where your graphic files are       % \graphicspath{{../eps/}}       % and their extensions so you won't have to specify these with       % every instance of \includegraphics       % \DeclareGraphicsExtensions{.eps}     \fi          \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage[justification=centering]{caption}     \usepackage{enumerate}% http://ctan.org/pkg/enumerate\textbf{•}     \usepackage{url}     \newcommand{\mytilde}{\raise.17ex\hbox{$\scriptstyle\mathtt{\sim}$}}     \newcommand{\DRAFT}{~}     \thispagestyle{empty}          % correct bad hyphenation here     \hyphenation{op-tical net-works semi-conduc-tor}          \begin{document}     %     \title{Brown Chicken, Brown Cow!}          \author{xxxxxx,} \linebreak             yyyyyy} and \linebreak             zzzzzz.}}% <-this % stops a space          % The paper headers          \markboth{Journal of \LaTeX\ Class Files,~Vol.~11, No.~4, December~2012}%     {Shell \MakeLowercase{\textit{et al.}}: Bare Demo of IEEEtran.cls for Journals}          \maketitle          \begin{abstract}     dddddd \cite{huston2006}     \end{abstract}          % Note that keywords are not normally used for peerreview papers.     \begin{IEEEkeywords}     ffffff     \end{IEEEkeywords}               \IEEEpeerreviewmaketitle          \section{Introduction}     \label{Introduction}     \input{introduction.tex}          \section{Background}     \label{Background}     \input{background.tex}          \section{Software Implementation}     \label{Software Implementation:}     \input{SoftwareImplementation.tex}          \section{Results}     \label{sec-Results}     \input{Analysis.tex}          \section{Cost Profile}     \label{Cost-Comparison}     \input{CostComparison.tex}          \section{Implementation Analysis}     \label{Implementation-Analysis}     \input{ImplementationAnalysis.tex}          \pagebreak          \section{Conclusion and Future Work}     \label{ConclusionFutureWork}     \input{ConclusionFutureWork.tex}          \appendices     \section{Proof of the First Zonklar Equation}     Appendix one text goes here.          \section{}     Appendix two text goes here.          % use section* for acknowledgement     \section*{Acknowledgment}          The authors would like to thank...          % Can use something like this to put references on a page     % by themselves when using endfloat and the captionsoff option.     \ifCLASSOPTIONcaptionsoff       \newpage     \fi          % references section          % can use a bibliography generated by BibTeX as a .bbl file     % BibTeX documentation can be easily obtained at:     % http://www.ctan.org/tex-archive/biblio/bibtex/contrib/doc/     % The IEEEtran BibTeX style support page is at:     % http://www.michaelshell.org/tex/ieeetran/bibtex/     %\bibliographystyle{IEEEtran}     % argument is your BibTeX string definitions and bibliography database(s)     %\bibliography{IEEEabrv,../bib/paper}     %     % <OR> manually copy in the resultant .bbl file     % set second argument of \begin to the number of references     % (used to reserve space for the reference number labels box)     %\begin{thebibliography}{1}          %\bibitem{IEEEhowto:kopka}     %H.~Kopka and P.~W. Daly, \emph{A Guide to \LaTeX}, 3rd~ed.\hskip 1em plus     %  0.5em minus 0.4em\relax Harlow, England: Addison-Wesley, 1999.          %\end{thebibliography}                %\bibliographystyle{IEEEtran}     \bibliography{mySources}               % that's all folks     \end{document}      You see in this tex file, I have edited it to fit my needs. And everything works; except for the bibliography part. I have created a **.bib** file called **mySources.bib** and placed it in the **same directory** as **bare_jrnl.tex**. Contents of **mySources.bib** look something like:               @inproceedings{huston2006,      author               = {G. Huston},      booktitle            = {Proceedings of APNIC 21},      month                = {March},      title                = {{2005 - A BGP Year in Review}},      year                 = {2006},      }       There are a lot of other references; but I omitted them. Now when I use `\cite{huston2006}`, I only get a **?** instead of reference number. I don't know what is happening here. I am using Texmaker 3.3.2 in Windows 7. For **quick build** (in Texmaker), I have used the command: **PdfLatex + Asymptote + PdfLatex + view Pdf**. After the PDF file is generated with **quick build** , I only get a **?** instead of reference number with the warning: **Citation huston2006 on page 1 undefined**. Please help me. I don't know, how to fix this mess. Bye.


title: Cropping/Trimming an image with includegraphics by specifying percentages

text: Say I have an image `my_image.png` that I am loading in my LaTeX document using:               \begin{figure}     \includegraphics[width=0.5cm]{my_image.png}}     \end{figure}      Is there a way of telling LaTeX to only render a specific rectangular portion (in **percentages** ) of the original image? For example, say I want to just render a cropped image:   * Trim `5%` of the original image **width** from the **left**   * Trim `10%` of the original image **width** from the **right**   * Trim `15%` of the original image **height** from the **top**   * Trim `20%` of the original image **height** from the **bottom**


title: Comma after equation

text: I have seen different ways in papers to put comma after equation.   1. right after the equation: ![enter image description here](http://i.stack.imgur.com/0cIOd.jpg)   2. right before `where`: ![enter image description here](http://i.stack.imgur.com/MloyV.png)   3. no comma at all: ![enter image description here](http://i.stack.imgur.com/WyBrT.jpg) **Which way should I choose? Which way is more standard?**


title: Increase pdflatex limits

text: A pdf is generated from doxygen generated tex files. One function prototype is extremely long, generating a line in the corresponding tex file that is 1122 characters long. When pdflatex is run, no pdf is generated - no error is given Strangely, the length is not what causes the error. Before every capital letter, the escape sequence + is placed. is appears that there are too many escape sequences on that line: if I remove one of them (and add the same amount or more normal characters), the pdf is generated. **How can I increase the capabilities of pdflatex, so it can cope with more escape sequences?** I'm running this on Windows7 from a command shell, using the binaries from MikTex. * * * The line that fails the pdf generation is:               void \hyperlink{a00001_a08fada22bcd057759e344830bbaac50e}{xx\+aa\+bb\+cc\+\_\+\+dd} (int ee\+ff\+gg, \hyperlink{a00001_a6f71136ece8b9a87173c5c86bc6f248f}{aa\+bb\+cc\+\_\+\+ee\+bb\+ff\+\_\+t} eebb\+ffed, \hyperlink{a00001_a33a2104b20eef6806443b52c2b064159}{aa\+bb\+cc\+\_\+\+ee\+bb\+hh\+\_\+t} r, \hyperlink{a00001_af69c4d93122a8eb40c12d6ceae7d682e}{aa\+bb\+cc\+\_\+\+ee\+bb\+ii\+\_\+t} s, \hyperlink{a00001_aab88436ec45f3c97141d5e4ed40dec81}{aa\+bb\+cc\+\_\+\+ee\+bb\+jj\+\_\+t} t, \hyperlink{a00001_a863a5fdf396307748fcdc46b1f5e2fb9}{aa\+bb\+cc\+\_\+\+ee\+bb\+kk\+\_\+t} u, \hyperlink{a00001_a0209334ce20c0d6bd53a72771867a098}{aa\+bb\+cc\+\_\+\+ee\+bb\+ll\+\_\+t} v, \hyperlink{a00001_ab028b29cfe99d78f2d1f6fa163e24eee}{aa\+bb\+cc\+\_\+\+ee\+mm\+nn\+\_\+t} w, \hyperlink{a00001_ae4306c7f1ad814eb2f719542628238f9}{aa\+bb\+cc\+\_\+\+ee\+mm\+oo\+\_\+t} x, \hyperlink{a00001_a4febae17a1d3e78d23df7995a0caf4f5}{aa\+bb\+cc\+\_\+\+ee\+pp\+qq\+\_\+t} y, \hyperlink{a00001_aee53a9af1c43bb5e2b3096c2355a9ec8}{aa\+bb\+cc\+\_\+\+ee\+rr\+ss\+tt\+\_\+t} z)      * * * The modified line with which pdf generation succeeds - one `\+` is replaced with `xx`:               void \hyperlink{a00001_a08fada22bcd057759e344830bbaac50e}{xxxxaa\+bb\+cc\+\_\+\+dd} (int ee\+ff\+gg, \hyperlink{a00001_a6f71136ece8b9a87173c5c86bc6f248f}{aa\+bb\+cc\+\_\+\+ee\+bb\+ff\+\_\+t} eebb\+ffed, \hyperlink{a00001_a33a2104b20eef6806443b52c2b064159}{aa\+bb\+cc\+\_\+\+ee\+bb\+hh\+\_\+t} r, \hyperlink{a00001_af69c4d93122a8eb40c12d6ceae7d682e}{aa\+bb\+cc\+\_\+\+ee\+bb\+ii\+\_\+t} s, \hyperlink{a00001_aab88436ec45f3c97141d5e4ed40dec81}{aa\+bb\+cc\+\_\+\+ee\+bb\+jj\+\_\+t} t, \hyperlink{a00001_a863a5fdf396307748fcdc46b1f5e2fb9}{aa\+bb\+cc\+\_\+\+ee\+bb\+kk\+\_\+t} u, \hyperlink{a00001_a0209334ce20c0d6bd53a72771867a098}{aa\+bb\+cc\+\_\+\+ee\+bb\+ll\+\_\+t} v, \hyperlink{a00001_ab028b29cfe99d78f2d1f6fa163e24eee}{aa\+bb\+cc\+\_\+\+ee\+mm\+nn\+\_\+t} w, \hyperlink{a00001_ae4306c7f1ad814eb2f719542628238f9}{aa\+bb\+cc\+\_\+\+ee\+mm\+oo\+\_\+t} x, \hyperlink{a00001_a4febae17a1d3e78d23df7995a0caf4f5}{aa\+bb\+cc\+\_\+\+ee\+pp\+qq\+\_\+t} y, \hyperlink{a00001_aee53a9af1c43bb5e2b3096c2355a9ec8}{aa\+bb\+cc\+\_\+\+ee\+rr\+ss\+tt\+\_\+t} z)


title: Inserting a picture in an equation

text: > **Possible Duplicate:**   >  Can I insert an image into an equation? Is there any method to insert a picture in an equation? I am trying to write an equation where one of the elements of the equation is a small image. I need to obtain a pattern like this: 2 * image1 + 3 * image2 = image3 (equation number) Please note, one simple way is to make a figure and put all of these elements in it and use \includegraphics to load it into LaTeX document as a figure, however, I need to have an equation with the above structure, not a figure.


title: How can I inject the proper amount of vertical space between captions and figures?

text: In my source document, I have an image and a code listing, separated by some text. When I generate PDF using pdflatex, the image is just above the listing, and it looks like the caption for the image is the caption for the listing, i.e., the caption for the image is closer to the listing than to the image. Here is the shortest example that I could recreate the problem with.               \documentclass{book}     \usepackage[pdftex]{graphicx}     \usepackage{listings} % code listings     \begin{document}          before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before          before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before          before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before     before before before before before before before before before before          \begin{figure}[!htbp]     \centering     \includegraphics[keepaspectratio,width=4cm,clip,trim = 0mm 6cm 15cm 0mm]     {Images/XMLElement}     \caption{Constructor removal in XMLElement}     \label{XMLElement}     \end{figure}          between between between between between between between between     between between between between between between between between          \begin{figure}[!htb]       \lstset{language=Java, showspaces=false,         showstringspaces=false, tabsize=2, breaklines=true}     \begin{lstlisting}[frame=single]      public IXMLElement createElement(String fullName) { }     \end{lstlisting}     \caption{Example2}     \end{figure}           after after after after after after after after after after after     after after after after after after after after after after after     after after after after after after after after after after after     after after after after after after after after after after after          \end{document}      The image below shows the output for the source above. In my full document, there is even less distance between the first caption and the code listing. How can I insert more space (as appropriate) between the first caption and the second figure? Depending on intervening edits, the two figures may or may not end up on the same page. ![enter image description here](http://i.stack.imgur.com/vrMw1.png)


title: How to transform a local texlive installation into a portable one

text: I have a local texlive installation (texlive 2013 on a linux machine installed by texlive installer, not by linux packaging). How can I transform it into a portable installation on a usb drive (to be used with windows)? Side Question: How can I make system fonts copied onto the usb drive accessible to XeTeX from the portable installation? (Possibly using shell/batch scripts to be clicked to install the fonts.) Remark: Simply installing the portable version fresh from internet is not a liable way.


title: pdfscreen's panel Table of Contents

text: I am having trouble understanding how the panel table of contents of the `pdfscreen` package works. The only thing that I got from the documentation was that in an article-type document, the section names will become the default items in the table of contents, and that `\tableofcontents` should not be used in the body. So I did as instructed and created a test presentation from one of the templates online:               \documentclass[titlepage]{article}     \usepackage{xspace,colortbl}     \usepackage[screen,panelright,code,sectionbreak,paneltoc,chocolate]{pdfscreen}      \margins{.5in}{.5in}{.5in}{.5in}      \screensize{6in}{8in}          \usepackage{amsmath}               \title{\Huge\textbf{My Title}}     \    author{\Large M. Y. Name \\         {Department} \\       {Organization} }               \setcounter{secnumdepth}{2}     \definecolor{darkblue}{rgb}{0,0,0.635}     %\maketitle          \begin{screen}     % \margins{.65in}{.65in}{.65in}{.65in}      \margins{.35in}{.45in}{.35in}{.35in}      %\screensize{6.25in}{8in}      \screensize{5.25in}{7in}      %\changeoverlay      \paneloverlay{but.pdf}      %\overlay{logo.pdf}      \def\pfill{\vskip6pt}      \definecolor{panelbackground}{rgb}{0.5,0.5,0.9}      \backgroundcolor{white}      \paneloverlayempty     \end{screen}     \setlength{\parindent}{0cm}          \begin{document}     \maketitle          \section{Overview}     Lorem     \section{Body}     Ipsum     \section{Summary}     Dolor     \end{document}      In a normal LaTeX document, the table of contents are updated after compiling twice. However, here I am unable to get the TOC to update after I modify my section headings or such. I do not understand this, as it appears rather ad- hoc (I made some changes, they did not appear after multiple compilations. I removed them, and the earlier sections appeared). Does anyone know what is happening and how to fix this so that I know the most recent table of contents will appear when I am making the presentation? * * * **UPDATE:** Gonzalo's solution works. There is another inelegant way through which i got it to work, though I don't know the exact mechanism. In the body, introduce the `\tableofcontents` and compile (twice). This suppresses anything that the package itself does and you get an updated table of contents. Now remove the TOC and the default `pdfscreen` table of contents takes over, with the updated contents.


how to reference other reported works in the form of [-]? I tried the following trick but didnot work out.               \cite{IEEE:Zhu - IEEE:Nguyen}      I'm using article document class.


title: Enumeration flush right

text: How can I do enumeration like this: > Some loresipsum, lores ipsume loresipsum, lores ipsume loresipsum, lores > ipsume loresipsum, lores ipsume loresipsum, lores ipsume loresipsum, lores > ipsume loresipsum, lores ipsume loresipsum, lores ipsume loresipsum, lores > ipsume loresipsum, lores ipsume loresipsum, lores ipsume >   >   >                 text: some info >             Sometext: some another info >       Somelongertext: an info >   > > loresipsum, lores ipsume loresipsum, lores ipsume loresipsum, lores ipsume > loresipsum, lores ipsume loresipsum, lores ipsume loresipsum, lores ipsume > loresipsum, lores ipsume loresipsum, lores ipsume loresipsum, lores ipsume > loresipsum, lores ipsume loresipsum, lores ipsume


title: Why is the `pgffor` package messing with my scope?

text: I have a several rather lengthy documents with numbered points (catechism questions) that I would like to be able to selectively include in other documents using a utility function that uses a range argument. I ran into trouble and eventually traced it to the way the `\foreach` seems to run in its own private scope of some kind. The loops seem to iterate properly, but things set inside them (such as `\newif` definitions or toggles from the `etoolbox` package don't seem to stick. This fails miserably:               \documentclass{scrartcl}     \usepackage{pgffor}     \usepackage{etoolbox}          \newcommand{\wkk}[1]{%         \foreach \x in {1,...,5}{%             \providetoggle{wkk\x}         }         \foreach \x in {#1}{%             \toggletrue{wkk\x}         }         % In a real example the following content would be \input here         \iftoggle{wkk1}{output 1 }{}         \iftoggle{wkk2}{output 2 }{}         \iftoggle{wkk3}{output 3 }{}         \iftoggle{wkk4}{output 4 }{}         \iftoggle{wkk5}{output 5 }{}     }          \begin{document}          \wkk{2,...,4}          \end{document}      Yet if I replace the `\foreach` loops with exactly what they should be doing in the above example, it works fine:               \documentclass{scrartcl}     \usepackage{pgffor}     \usepackage{etoolbox}          \newcommand{\wkk}[1]{%         \providetoggle{wkk1}         \providetoggle{wkk2}         \providetoggle{wkk3}         \providetoggle{wkk4}         \providetoggle{wkk5}         \toggletrue{wkk2}         \toggletrue{wkk3}         \toggletrue{wkk4}         % In a real example the following content would be \input here         \iftoggle{wkk1}{output 1 }{}         \iftoggle{wkk2}{output 2 }{}         \iftoggle{wkk3}{output 3 }{}         \iftoggle{wkk4}{output 4 }{}         \iftoggle{wkk5}{output 5 }{}     }          \begin{document}          \wkk{2,...,4}          \end{document}      Obviously these are kind of clumsy MWE's and I would be including the content from an external source file that was marked up with the correct toggles. What am I doing wrong with the `pgffor` package? Or **is there a conceptually better way to do this?**


title: How can I autoadjust the table height, width in LaTeX with many pages of text

text: I am using CentOS and TeX Live. I am new to LaTeX. This is what I am trying               \documentclass[landscape, letter]{report}     \usepackage{ltxtable}     \usepackage[table]{xcolor}     \usepackage{colortbl}     \usepackage{multirow}     \usepackage[latin1]{inputenc}     \usepackage[left=0cm,top=.5cm,right=0cm]{geometry}     \usepackage{longtable}     \title{titulo}     \author{Rodrigo Coster - 1141783-01}     \begin{document}     \begin{center}\textbf{{\LARGE Relação de vagas autorizadas, providas e disponíveis}}\end{center}     \tiny     \begin{longtable}{|l|l|l|l|l|l|l|l|l}         \hline                  \textbf{ number }                     &                       \textbf{ name }                     &                       \textbf{ parentt }                     &                       \textbf{ status }                     &                       \textbf{ date }                     &                       \textbf{ bank\_statement\_no }                     &                       \textbf{ bioregion }                     &                       \textbf{ cond\_notes }                     &                       \textbf{ Impl\_notes }                   \\         \hline                                     be416f8rererec23                         &                           From C1, it follows that relational information does not affect the structure of the levels of     acceptability from fairly high (e.g. (99a)) to virtual gibberish (e.g. (98d)).                         &                           For any transformation which is sufficiently diversified in application to be of any interest, this     analysis of a formative as a pair of sets of features is, apparently, determined by a stipulation to     place the constructions into these various categories.                         &                           Draft                         &                           2013-04-27                         &                           ed802ec655d485161a6fe02a5a325cd9                         &                           Norrtrhrerren rererereley                         &                           Note that the notion of level of grammaticalness is unspecified with respect to nondistinctness in     the sense of distinctive feature theory.                         &                           We have already seen that the earlier discussion of deviance appears to correlate rather closely     with nondistinctness in the sense of distinctive feature theory.                       \\             \hline                         \end{longtable}     \end{document}      This is giving me the croped table but I want all the text on one page. Now   1. I can have the rows like 100s of rows and can span 50 pages   2. My Columns can also vary so i don't know what is the good way to handle that.   3. There will be many paragrahs of text in many columns so I want to have nice looking table I am trying since morning I am not able to figure out what to use `tabular`, or `tabularx` or `y` or `resizebox` Everytime I search google I find new way of doing it. The max I can go is A3 size in landscape mode so that it fits all data. Can anyone please tell what can I do?


title: How can I produce a 'ring (or wheel) chart' like that on page 88 of the PGF manual?

text: I really like the 'ring chart' or 'wheel chart' given as an example on page 88 of the PGF manual. It is like a pie chart, but with a label in the centre. Unfortunately, the manual doesn't give the source for that chart. Does anyone have an example? Thanks. ![The graph](http://i.stack.imgur.com/ClHcc.png)


title: Blurry images in document

text: > **Possible Duplicate:**   >  How to obtain clear printed graphics with PCTeX v6 I am a beginner with LaTeX. I created this first document this evening. My problem: I have inserted images in the document and I get them blurry in the preview not like in the original image. ![enter image description here](http://i.stack.imgur.com/BTMk4.png) How can I do to get them more high resolution . Is there any way to change the resolution of images. I'm using PCTeXv6.


title: Chapter footnotes (using symbols, not appearing in TOC or header)

text: I want to make a macro `sfootnote` specifically for footnotes on Chapter headings, such that the footnote marks are some constant symbol (e.g., '*'), and such that the marks/footnotes don't appear in the TOC. Also, I don't want these footnotes to affect the numbering of other footnotes. Example intended use of `sfootnote` macro:               \chapter{Title\sfootnote{Info on chapter...}}\label{chap:reasoning} (I'm using:               \documentclass[11pt,titlepage,twoside,openright]{report} and `fancyhdr` for headers.) Now, knowing that I'm not the first person to try this, I've had a bit of a Google, and I've had success putting non-floating footnotes in the headings using simply:               \usepackage[stable]{footmisc}     \newcommand{\sfootnote}[1]{\footnote{#1}} ...but these have ugly (albeit static) numbers as footnote marks. And I've had success using symbol marked footnotes in headings using:               \long\def\symbolfootnote[#1]#2{\begingroup%     \def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}          \newcommand{\sfootnote}[1]{\protect\symbolfootnote[1]{#1}} ...but these "float" into the TOC and headers (the mark and footnote in the TOC, only the mark in the header). I've tried various combinations of these, but only managed to induce various sorts of errors (or no change at all). I've been at this for about an hour and a half, with no luck (or, more accurately, no skill). Help?


title: How to get rid of unwanted spaces with \input?

text: For my project to bring scripting to (Xe)(La)TeX, I need to execute command lines with `write18`, redirect output to a temporary file, and then insert the produced text using `\input`. I've noticed some extraneous whitespace that occurs right after each output, and I managed to hunt down _one_ source down to the most basic part of the equation (I'm observing three different amounts of whitespace; the one discussed here is the smallest amount, so it seems that there is more than a single source for that phenomenon). here is a 'sub-minimal' MWE:               xxxxxxx\\     xxx\input{/tmp/out.txt}xxx\\     xxxx xxx      * * * Assuming that the contents of said file consists of a single `x` (which I can easily prove by running `cat /tmp/out.txt`:               $ cat /tmp/out.txt     x$ ▌      See how the `x` is directly followed by the command line prompt), I still get a space after the fourth `x` in the second line of the resulting pdf file. The second line is matching perfectly with the third line, which does contain a deliberate space; it should for all intents and purposes match with the _first_ line, of course. This looks as if — contrary to the descriptions I've read — the command `\input` actually inserts the file contents _plus_ (at least) a single (?) `\x20` character into the document. Can this observation be corroborated? And, importantly: how do i get rid of that extraneous space?


title: Chart with long x axis text labels looks ugly

text: Thanks to Caramdir and Alan Munn I am now able to create basic bar charts that use text as _x_ axis labels. Functionally they are perfect, but some of them look kind of ugly. See for yourself:               \documentclass{article}     \usepackage{pgfplots}          \begin{document}     \begin{figure}     \centering     \begin{tikzpicture}     \begin{axis}[                  width=15cm,                  height=8cm,                  symbolic x coords={elso es masodrendu varosok,                                     falu es varos kozti atmenet,                                     funkcionalis ertelemben nem varos},                  x tick label style={font=\small},                  xtick=data,                  ymin=0,                  ymax=65,                  ylabel=\%,                  ylabel style={rotate=-90},                  ybar,                  bar width=45pt,                  ]     \addplot coordinates {                           (elso es masodrendu varosok,36)                           (falu es varos kozti atmenet,4)                           (funkcionalis ertelemben nem varos,60)};     \end{axis}     \end{tikzpicture}     \end{figure}     \end{document}          % I have removed all non-English characters from the sample code     % but the image below was generated with the original strings.      ![](http://i.stack.imgur.com/0yDAa.png) Now, the chart has everything I need, but it would look much prettier if I could break the text labels into at least two lines and move the two side bars closer to the center bar. Unfortunately, {falu es varos\\\kozti atmenet} is not usable as a valid _x_ coordinate. And I have also been unable to find a way to explicitly set spacing between the bars when using non-numeric coordinates. I tried to set the bar width to a bigger value thus forcing them closer to each other, but it does not work. The bars get fatter but they keep their positions. Any help would be much appreciated.


title: How can I create a multicol "figure"?

text: I have the following, somewhat minimal, example:                \documentclass{article}      \usepackage{multicol}           \begin{document}      \begin{multicols}{2}           \begin{minipage}{\textwidth}      \begin{framed}           The function is      \begin{equation*}      F(1)      \end{equation*}           The negation is      \begin{equation*}      N(1)      \end{equation*}           \begin{center}      \bf{\underline{Figure 1.}} Function      \end{center}      \end{framed}      \end{minipage}           \end{multicols}      \end{document}      It creates a "figure" with a box around it and a caption. There are some problems. First, I'm using the `multicol` package, so I'd like to do this succesfully in one column. That means changing the `\textwidth` value, or using something other than `minipage`. I thought that I might be able to use a float to do this, but I don't even know how to get floats to display text. It may again have something to do with `multicol`. The main problem I have is that I can use the "`frame`d" portion of the text to display a figure, but LaTeX tends to break the frame into two pieces, and devote an entire page to one of the pieces, which is far more space than it needs. That is how LaTeX displays this without using `minipage`. So I'm really wondering how I can ensure that this framed portion is not broken into pieces. Really as a separate question, I'm wondering how I can use floats to display this also. But again, I'd really like to know how to do it without floats, first.


title: How to make \section items numbers show as Roman Numerals like I II III IV..?

text: And how to make them show as roman numerals in TOC?


title: xindy : how to add new letters and lettergroups to the alphabet?

text: How to define a style file that adds a couple of extra letters to the latin alphabet, and the corresponding lettergroups? I'm using the `index` package, and compiling the `.idx` files with `texindy` like this:               texindy -o book.main.ind -L english -M lang/english/utf8 -M style1 book.main.idx      I'm working on an index that has words from the Pāḷi language, such as ānāpānasati, saṃsāra, ñāṇavimutti. The `\index` commands give these word using the TeX accents, so in the text the above words would be indexed with:               \index[general]{\=an\=ap\=anasati}     \index[general]{sa\d{m}s\=ara}     \index[general]{\~n\=a\d{n}avimutti}      I tried adding the letter groups, but the ā, ñ, etc. letters don't begin new groups, they are just included under the latin letters a, n, etc.               (define-letter-group "ā" :after "a" :before "b")     (define-letter-group "ñ" :after "n" :before "o")          (merge-rule "\=a" "ā" :string)     (merge-rule "\={a}" "ā" :string)     (merge-rule "\d{m}" "ṃ" :string)     (merge-rule "\d {m}" "ṃ" :string)     (merge-rule "\~n" "ñ" :string)     (merge-rule "\~ n" "ñ" :string)


title: Environment that doesn't allow blank lines

text: Consider the command `\mpagetc` defined as               \newcommandx*\mpagetc[4][1=0.45,2=0.45]{\begin{minipage}{\textheight}%     \begin{minipage}[c]{#1 \textwidth}%      #3     \end{minipage}%     \begin{minipage}[t]{#2 \textwidth}%      #4     \end{minipage}%     \end{minipage}}      I get the error `Paragraph ended before \\mpagec was complete` _only_ when I have a blank line in the code,               \mpagetc{     blablabla          blablabla     }{ blablabla}      I have the same problems with other commands that does not allow blank lines. What is the problem with blank lines?


title: Losing resolution when using \includegraphics to import JPEG.

text: I'm using `\includegraphics{}` with the `graphicx`package to include some pictures. There is quality detoriation though (see example images). How can I fix this? I want a 1 to 1 insertion of a 756x510px image. The first pciture is a zoom in from the original (razor sharp pixels), while the second one shows a close up on the pdflatex-created pdf document. As you can see there is blurryness. ![original](http://i.stack.imgur.com/AqBok.png) ![enter image description here](http://i.stack.imgur.com/kS43a.png)


title: Cases equation problem - ! Missing { inserted

text: I am trying to compile this equation               \beta\_t^i=        \begin{cases}           \overline{\beta}-i\cdot\sigma\_{\beta} & 0\leq i\leq 4\\            0.0 & 5\leq i\leq7       \end{cases}      and I am still getting error               ! Missing { inserted.      Old topics didn't help me, I think it will be problem with `\\` or `&` but can't solve it.


title: Error with ASCII characters

text: I have an apostrophe as in `educator's`, which is displayed as `eductaor's` and prevents TeX from generating a pdf. I have used this as well: `\usepackage[utf8]{inputenc}` how can I fix that? _(Edit by Speravir – included from comment by OP)_ I am writing the file with python like this with `open("mytable.tex", 'w') as out_f: out_f.write(output.encode('utf8'))` that `output` is displaying correctly in browser but its being written like that in file.


title: Why don't these figures align horizontally?

text: I am trying to use the `subcaption` package for horizontally aligning up some figures, and I did as the documentation instructs me to do, yet the result is these are vertically aligned. It really confuses me.               \documentclass{article}          \usepackage[font=small]{caption}     \usepackage{subcaption}     \usepackage{graphicx}     \usepackage{xltxtra}     \usepackage{fontspec}               \setmainfont[Ligatures=TeX]{Linux Libertine O}          \begin{document}     \begin{figure}[htp]              \centering         \begin{minipage}[t]{0.3\linewidth}             \includegraphics[width=\linewidth]{fig/bed1.jpg}             \subcaption{Bedroom 1}         \end{minipage}              \begin{minipage}[t]{0.3\linewidth}             \includegraphics[width=\linewidth]{fig/bed2.jpg}             \subcaption{Bedroom 2}         \end{minipage}         \caption{Two bedrooms}          \end{figure}     \end{document}


title: TeXmaker and gnuplot compiling issue

text: I just received a new macbook OS 10.8 Mountain Lion and I have installed TeXmaker, MacTex, MacPorts and gnuplot. I compiled a LateX file that uses TikZ and gnuplot and got the following error in the logfile. TeXMaker also stalls after the compile attempt and a force quit is required to close the app. Versions: TeXMaker 4.0.2 Gnuplot 4.6 patchlevel 3               Package gnuplottex Warning: Shell escape not enabled.      You'll need to convert the graphs yourself..      I have already added the following to the TeXmaker preferences:               pdflatex:     "/usr/texbin/pdflatex" --shell-escape --enable-write 18 -synctex=1 -interaction=nonstopmode %.tex      So I tried adding gnuplot to my PATH               echo $PATH       says:               /opt/local/sbin:/opt/local/sbin:/usr/local/share/python:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/opt/local/bin/gnuplot:/opt/local/bin/ports      I tried running the following example in TeXworks and got the same plot error.               %& -shell-escape     % Source: The PGF/TikZ manual     \documentclass{article}          \usepackage[latin1]{inputenc}     \usepackage{tikz}          % GNUPLOT required     \begin{document}     \pagestyle{empty}               \begin{tikzpicture}[domain=0:4]     \draw[very thin,color=gray] (-0.1,-1.1) grid (3.9,3.9);     \draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$};     \draw[->] (0,-1.2) -- (0,4.2) node[above] {$f(x)$};     \draw[color=red] plot[id=x] function{x}          node[right] {$f(x) =x$};     \draw[color=blue] plot[id=sin] function{sin(x)}          node[right] {$f(x) = \sin x$};     \draw[color=orange] plot[id=exp] function{0.05*exp(x)}          node[right] {$f(x) = \frac{1}{20} \mathrm e^x$};     \end{tikzpicture}      Errors:               Warning/error below, the plot looks empty. Yes, I have gnuplot installed.      Package pgf Warning: Plot data file 'test2.x.table' not found. on input line     Package pgf Warning: Plot data file 'test2.sin.table' not found. on input line     Package pgf Warning: Plot data file 'test2.exp.table' not found. on input line      `.log` file for running on TeXMaker:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012) (format=pdflatex     2012.6.30) 16 MAY 2013 23:28     entering extended mode     \write18 enabled.     %&-line parsing enabled.     **test.tex     (./test.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation,  ge     rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus,  arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h     ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma     rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,     kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal,  nynorsk,     polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s     lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian,     welsh, loaded.     (/usr/local/texlive/2012/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2012/texmf-dist/tex/latex/base/size10.clo     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)      )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (/usr/local/texlive/2012/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty     Package: gnuplottex 2011/09/12 v0.4.4 gnuplot graphs in LaTeX     (/usr/local/texlive/2012/texmf-dist/tex/latex/base/latexsym.sty     Package: latexsym 1998/08/17 v2.2e Standard LaTeX package (lasy symbols)     \symlasy=\mathgroup4     LaTeX Font Info: Overwriting symbol font `lasy' in version `bold'     (Font) U/lasy/m/n --> U/lasy/b/n on input line 47.     )     (/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/graphicx.sty     Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     (/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/keyval.sty     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks14      )      (/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/graphics.sty     Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)     (/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/trig.sty     Package: trig 1999/03/16 v1.09 sin cos tan (DPC)     )     (/usr/local/texlive/2012/texmf-dist/tex/latex/latexconfig/graphics.cfg     File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live       )     Package graphics Info: Driver file: pdftex.def on input line 91.     (/usr/local/texlive/2012/texmf-dist/tex/latex/pdftex-def/pdftex.def     File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX     (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/infwarerr.sty     Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)     )     (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ltxcmds.sty     Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     )     \Gread@gobject=\count87     ))     \Gin@req@height=\dimen103     \Gin@req@width=\dimen104     )      (/usr/local/texlive/2012/texmf-dist/tex/latex/moreverb/moreverb.sty     Package: moreverb 2008/06/03 v2.3a `more' verbatim facilities     (/usr/local/texlive/2012/texmf-dist/tex/latex/tools/verbatim.sty     Package: verbatim 2003/08/22 v1.5q LaTeX2e package for verbatim enhancements     \every@verbatim=\toks15     \verbatim@line=\toks16     \verbatim@in@stream=\read1     )     \tab@position=\count88     \tab@size=\count89     \listing@line=\count90     )     (/usr/local/texlive/2012/texmf-dist/tex/latex/base/ifthen.sty     Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)     )     \verbatim@out=\write3     runsystem(echo t > "w18-test-20135161408")...executed.     runsystem(del "w18-test-20135161408")...executed.     Package gnuplottex Warning: Shell escape not enabled.     (gnuplottex) You'll need to convert the graphs yourself..     \c@fignum=\count91     ) (./test.aux)     \openout1 = `test.aux'.     LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6.     LaTeX Font Info: ... okay on input line 6.     LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6.     LaTeX Font Info: ... okay on input line 6.     LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6.     LaTeX Font Info: ... okay on input line 6.     LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6.     LaTeX Font Info: ... okay on input line 6.     LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6.     LaTeX Font Info: ... okay on input line 6.      LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6.     LaTeX Font Info: ... okay on input line 6.     (/usr/local/texlive/2012/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     \scratchcounter=\count92     \scratchdimen=\dimen105     \scratchbox=\box26     \nofMPsegments=\count93     \nofMParguments=\count94     \everyMPshowfont=\toks17     \MPscratchCnt=\count95     \MPscratchDim=\dimen106     \MPnumerator=\count96     \makeMPintoPDFobject=\count97     \everyMPtoPDFconversion=\toks18     ) (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty     Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX     (HO     )     (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ifluatex.sty     Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)     Package ifluatex Info: LuaTeX not detected.     )     (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ifpdf.sty     Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)     Package ifpdf Info: pdfTeX in PDF mode is detected.     )     Package pdftexcmds Info: LuaTeX not detected.     Package pdftexcmds Info: \pdf@primitive is available.     Package pdftexcmds Info: \pdf@ifprimitive is available.     Package pdftexcmds Info: \pdfdraftmode found.     )     (/usr/local/texlive/2012/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty     Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf     (/usr/local/texlive/2012/texmf-dist/tex/latex/oberdiek/grfext.sty     Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)     (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty     Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)     ))     (/usr/local/texlive/2012/texmf-dist/tex/latex/oberdiek/kvoptions.sty     Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)     (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)     (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/etexcmds.sty     Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     Package etexcmds Info: Could not find \expanded.     (etexcmds) That can mean that you are not using pdfTeX 1.50 or     (etexcmds) that some package has redefined \expanded.     (etexcmds) In the latter case, load this package earlier.     )))     Package grfext Info: Graphics extension search list:     (grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE     G,.JBIG2,.JB2,.eps]     (grfext) \AppendGraphicsExtensions on input line 452.     (/usr/local/texlive/2012/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg     File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX       Liv     e     ))     \openout3 = `test-gnuplottex-fig1.gnuplot'.     Opening gnuplot stream test-gnuplottex-fig1.gnuplot     Package gnuplottex Warning: Please convert test-gnuplottex-fig1.gnuplot     manuall     y.     \openout3 = `test-gnuplottex-fig2.gnuplot'.     Opening gnuplot stream test-gnuplottex-fig2.gnuplot     Package gnuplottex Warning: Please convert test-gnuplottex-fig2.gnuplot    manuall     y.     (./test.aux) )     Here is how much of TeX's memory you used:     1637 strings out of 493488     24017 string characters out of 3141326     75347 words of memory out of 3000000     4946 multiletter control sequences out of 15000+200000     3640 words of font info for 14 fonts, out of 3000000 for 9000     957 hyphenation exceptions out of 8191     37i,1n,23p,237b,70s stack positions out of 5000i,500n,10000p,200000b,50000s     No pages of output.     PDF statistics:     0 PDF objects out of 1000 (max. 8388607)     0 named destinations out of 1000 (max. 500000)     1 words of extra memory for PDF output out of 10000 (max. 10000000)


title: MikTeX 2.9 installs polyglossia in a different location than where it looks for it

text: I recently did a complete reinstall of Windows 7, installed all updates, and reinstalled all of my programs, including MikTeX using the 2.9 64-bit version. I ran a XeLaTeX document I had created and successfully run before, in order to re-download and autoinstall most of my packages. This went well, except for **polyglossia.sty** and **gloss-english.ldf** , both parts of the **polyglossia** package; MikTeX prompts popped up (I had set the autoinstall on "ask me" at install) twice for the first file and three times for the second, before moving on and generating the document anyway. The same thing would happen with those two every time I ran the document; I tried changing the autoinstall download from "random" to, eventually, a dozen or so repositories with no better luck. I looked in the directory cited in the autoinstall prompt, and still no **polyglossia** directory. Thinking perhaps it was a glich in the 64-bit version of MikTeX, I uninstalled it--successfully except that Windows was for some reason unable to remove the empty **MikTeX 2.9** directory from **Program Files (86)** \--I removed it myself, but had to assert administrator privilege to do so. I then ran CCleaner on the Windows registry; there were fixes to be made, but none that appeared to have anything to do with MikTeX. I then downloaded the 32-bit version and installed it, but everything just went as before. And I don't even want to think about the manual download-and-install fiasco that I tried next; it seems you can't get **polyglossia.sty** to extract from **polyglossia.dtx** without **polyglossia.sty** installed first. Then it occurred to me to look in ALL of my **C:\Program Files (x86)\MikTeX 2.9\tex** subdirectories, not just the **xelatex** subdirectory where MikTeX was looking for them, and lo and behold, there **polyglossia** was... in the **latex** subdirectory. For all I know, MikTeX was fetching it and putting it there every single time I clicked the go-get-it button. So the question becomes: do I either tell MikTeX where to put it (and how), or where it should be _looking_ for it, (and again, how)? Or should I just move the **polyglossia** directory to **C:\Program Files (x86)\MikTeX 2.9\tex\xelatex** with a simple cut-and-paste and be done with it?


title: Line numbers on different margins in two-sided document

text: I'm using the `lineno` package to print line numbers in my two-sided document, but they are always printed in the left margin.               \documentclass[twoside]{book}          \usepackage{lineno}     \usepackage{lipsum}          \begin{document}          \linenumbers     \lipsum          \end{document}       ![enter image description here](http://i.stack.imgur.com/lR3tB.png) If I load `lineno` with the option `right`               \usepackage[right]{lineno}      they all are printed in the right margin ![enter image description here](http://i.stack.imgur.com/ndu1X.png) What I would like to do is to print line numbers in the right margin in odd pages and in the left margin in even pages, but I haven't been able to find an option to achieve this. Does anyone know a workaround?


title: How to put two minipages side-by-side, which use 100 % of the text width?

text: In `draft`-mode a black marker indicates that the reserved space is too low. This also appears in the following example, but it shouldn't. How can I put two `minipage`s exactly side-by-side?               \documentclass[draft=on]{scrbook}     \usepackage{blindtext}          \begin{document}     \begin{minipage}{.5\textwidth} %       TEXT 1     \end{minipage} %     \begin{minipage}{.5\textwidth} %       TEXT 2     \end{minipage}     \end{document}


title: 'Figure' in tikz makes image move 'forward'

text: I have a weird problem, whereby if I make my existing tikz picture a 'figure', it suddenly moves forward, as in, past the paragraph that comes after it in the code. That is, if the code that makes the figure comes before a paragraph in my editor, then when compiled and viewed as a PDF, the figure jumps forward, past the paragraph. I do not know what is happening, or how to fix it. My code is:               The cow jumped over the moon as shown in this figure:          \begin{figure}     \centering          \begin{tikzpicture}         % Draw the axes         \draw [->,black] (\var*-1.5,0) -- (\var*3,0) ;         \draw [->,black] (0,\var*-1.5) -- (0,\var*3) ;         \end{tikzpicture}          \caption{Foo axis caption} \label{fig:M1}      \end{figure}          As can be seen in the anove figure, the cow jumped over the moon      Now, all those problems started when I added the:                  \begin{figure}         \centering      and                \caption{Foo axis caption} \label{fig:M1}       \end{figure}      Prior to that, I didnt have a problem, but at the same time, I didnt have a figure where I could add a caption. Appreciate any insights, thanks. EDIT: Here is the figure I am trying to center its caption for: ![enter image description here](http://i.stack.imgur.com/ZnRBs.png) Further more, here are all the packaged I am using:               \usepackage{graphicx}     \usepackage{float}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{tikz}     %\usepackage{fullpage}     \usetikzlibrary{matrix}     \usetikzlibrary{decorations.pathreplacing}     \usepackage{bm}     \usepackage{xspace}


title: pgfplots to plot a function from [4,4.001]

text: When I try to plot a function on a small range, the output is an empty graph from 0 to 1 on the x and y axis. What can I do to fix this? My tex looks like this:               \begin{tikzpicture}     \begin{axis}[     xmin=4.0,     xmax=4.001,     samples=60,     xlabel=$time$,     ylabel={$acceleration$}     ]           \addplot [very thick, blue] {5*x-x^2};      \end{axis}     \end{tikzpicture}


title: LaTeX adjusting \sum limits

text: is there a way to show \sum limits partially in inline mode and partially in display mode? i.e., I want to write               \begin{equation}     \sum_{n=-\infty}^{+\infty} [...]     \end{equation}      but this way the lower limit is too wide, and I don't like it. So I was hoping to write something like this:               \begin{equation}     \sum_{-\infty}^{+\infty}\nolimits_{n} [...]     \end{equation}      to write the index n on the right side of the sum symbol, while the limits of the summation remain above and below. Of course it doesn't work, LaTeX is pissed because there is a double subscript. Anyone knows if it's possible to do what I want to?


title: XeLaTeX : Problem with diacritics (using Gentium font)

text: I get three diacritical points in ' ї ' (U+0457) symbol using XeLaTeX and Gentium font, instead of two. This may be an issue only with Gentium, as other fonts work well.               \documentclass[12pt,a4paper]{article}      \usepackage{polyglossia}     \newfontfamily\cyrillicfont[Script=Cyrillic]{Gentium}     \setdefaultlanguage{ukrainian}          \begin{document}      ї      %   three diacritical points - wrong symbol      \"\i   %   right symbol      \ Ї    %   right capital symbol (U+0407)     \end{document}


title: Can I mark ends of lines with a cross?

text: I have the following image:               \documentclass{article}     \usepackage[pdftex,active,tightpage]{preview}     \setlength\PreviewBorder{2mm}          \usepackage{tkz-fct}     \usetikzlibrary{arrows, decorations.pathreplacing}          \tikzstyle{line}=[very thick, black]     \tikzstyle{point}=[thick,fill=gray,gray]          \begin{document}     \begin{preview}     \begin{tikzpicture}            \tkzInit [xmin=0,xmax=21,ymin=0,ymax=7]             \begin{scriptsize}                 \tkzGrid[color = gray!30!white]                 \tkzAxeXY             \end{scriptsize}             \draw[line] (1,4) -- (6,1);             \draw[line] (2,1) -- (5,4);             \draw[line] (3,1) -- (6,4);             \draw[line] (4,1) -- (8,5);             \draw[line] (3,4) -- (9,3);             \draw[line] (7,2) -- (9,3);             \draw[line] (6,7) -- (9,1);                  \draw[line] (11,1) -- (16,5);             \draw[line] (13,2) -- (14,2);             \draw[line] (14,1) -- (14,2);             \draw[line] (14,3) -- (15,2);             \draw[line] (15,4) -- (15,3);             \draw[line] (13,4) -- (13,3);                  \draw[line] (17,3) -- (21,3);             \draw[line] (19,1) -- (19,5);                  \draw[point] (1,4) circle (2pt);          \end{tikzpicture}     \end{preview}     \end{document}      Which looks like this: ![enter image description here](http://i.stack.imgur.com/gGS9r.png) I would like to mark each end of a line with a cross. It's okay for me to make this manually, like I did with `circle` (see (1|4)) at the end, but I would like to have a cross. How do I get this? (How can I make the tikz-style `point` look like a cross?)


title: Multi-line (block) comments in LaTeX

text: In LaTeX, `%` can be used for single-line comments. For multi-line comments, the following command is available in the `verbatim` package.               \begin{comment}     Commented code     \end{comment}      But is there a simple command like `/* code */` in C?


title: Is it possible to define a multi-line comment operator?

text: In C language we have `/* ... */` to create a multi-line comment in addition to a single-line comment `//`. TeX has `%` for single-line comments. So my question is _Is it possible to have a multi-line comment "operator"?_


title: Numbering problems in chapter running head and TOC

text: I have this numbering problem for days, checking this website to find these http://tex.stackexchange.com/a/25212/34618 and http://tex.stackexchange.com/a/5694/34618 but these are not what I want really, because their directions would means to renew many commands for user-defined theorems, lemmas, exercises and problems, not to mention other default setting that `\thechapter` hack carries over to equations, figures and tables. Here is my question. In the chapter running head, I have               I. Chapter for heading     and what follows are many sections in the chapter body.          II. Chapter for heading     and many sections ...          III. Chapter for heading     and many sections ...          In TOC, I would like the following style.          A. Chapter name,     1.1 section,     1.2 section,          B. Chapter name,     2.1 section,     2.2 section,          C. Chapter name,     3.1 section,     3.2 section,      In short, all numbering styles (Romanic, alphabetic, numeral) are different. I can figure out how to tackle the heading problem by redefining command `@makechapterhead` but don't know how to deal those in TOC. Flipping through definition of `l@chapter`, numberline, etc, never hit me with how, thus needing guru helps. I can foresee solving this problem may benefit different numbering styles available for non-English languages. PS. I also know some prevailing packages may achieve this goal, but those are not what I want either.


title: Getting last value in tikz foreach

text: I tried this, but it doesn't work as intended:               \foreach \x/\index in {4/0,5/1,19/2} {       \ifnum \index > 0          % use lastx       \fi       \pgfmathsetmacro\lastx{\x}      }      How do I set `\lastx` properly?


title: Creating tables spanning across colums

text: this is my first time using latex. My problem is i wanted to get the table which is very long span across / continue at the next column. But the end of my table it seems to be disappearing. my code is as below               \documentclass[conference]{IEEEtran}     \usepackage{cite}     \usepackage{longtable}     \usepackage{multicol}     \usepackage{placeins}     \usepackage{supertabular}     \usepackage{array,supertabular,multirow}     \usepackage{float}               \begin{document}     \begin{abstract}     This is an abstract for a paper to show how to use latex for IEEE paper typeset.     \end{abstract}          Apart from that these applications needs  a lot of design perspective into these application as the requirement gathering for these products are not easy as it is challenging for the autistic children to convey their likes and dislikes in the first place. There are many studies being done in getting the correct design considerations and software attributes onto the application for autistic children. Some of them are stated below in the table.           \FloatBarrier      \begin{table}[h]     \renewcommand{\arraystretch}{1.3}     \caption{A Simple Example Table}     \label{table_example}     \centering     \begin{tabular}{| p{0.01\textwidth} | p{.1\textwidth} | p{.1\textwidth}| p{.1\textwidth}|}     \hline     \bfseries No & \bfseries Title of article & \bfseries Problem addressed \bfseries & Proposed Solution\\     \hline     1 & Developing technology for autism: an interdisciplinary approach &   This paper talks about the various perspectives that need to look into from different disciplines (clinical, scientific traditions in psychology, HCI, education, social-signal processing) while creating technological aid for children with ASD. &   A design methodology which is a combination of Action Research (AR—from Education), participatory design (PD—from HCI) and Applied AI will help in providing a more meaningful technological solution as an intervention for autistic kids.\\     \hline     2 & Is simplicity the key to engagement for children on the autism spectrum?  & Interactive software which aims to help the autistic children can be inconsistent and has high level of complexity due to lack of consideration for implementation.  Example an  indication of a right or wrong answer , with a failure indication  less able children might develop  extreme anxiety and meltdowns, which are limits  learning and sociability&    This paper argues and proposes that simplicity  in design of interface is the key approach needed in designing software’s for children with autism or learning ability. \\     \hline          3 & Facial Expression Recognition Teaching to Preschoolers with Autism: A Natural User Interface approach & Children with autism have difficulties in recognition of affective expressions. Serious Games are said to be a means to help them, but most of  the games need to use mouse and keyboard, but preschoolers with delayed motor skills have problem using them (a known symptom of Autism) &  Developing a serious game with design concerns and specifications for preschoolers with delayed motor skills in autism will help them in expression recognition. \\     \hline     4 & Broadening Accessibility Through Special Interests: A New Approach for Software Customization&  Autistic children will usually have preferred repetitive interests, these unique character is said to be useful in helping them. By incorporating their interest into the activities they do, they will  participate in educational, therapeutic, or social situations  they might otherwise shun. This strategy has seen success in the research literature, it is difficult to implement on a large scale and therefore has not been widely adopted. &    The author proposes a software approach that can retrieve and process their subject of interest. And propose that a software algorithm will be helpful in aiding the autistic children and any software developer in designing a user interest  preferred application. \\     \hline     5 & Pervasive multimedia for autism intervention &  Paper based interventions for autistic children are unable to teach many concepts effectively and most if the computer-based support has targeted early detection and affect recognition but has not addressed automated stimulus generation. Some of the Proprietary systems, have limited content, deliver stimuli rigidly, and lack the ability to personalize delivery to the ASD individual. & The author proposes a framework for pervasive intervention delivery for ASD , taking into account, Learning theory,  fundamental tasks and generation of stimulus sets, Adapting stimulus complexity to performance and Delivery of daily lessons and predicts that it will be helpful in early intervention of ASD. \\     \hline     6 & Conversing through and about technologies: Design critique as an opportunity to engage children with autism and broaden research(er) perspectives  &    Involving children with Autism Spectrum Conditions (ASC) in design activities to develop interactive technology is challenging, because typical design activities involve complex social interaction between children and researchers which children with ASC find it difficult. However, this involvement is crucial, as the children’s lived experiences will necessarily differ greatly from those of adult designers. & The researcher proposes that development of a tool to support the contributions of children with Autism Spectrum Conditions (ASC) in a design critique activity can help them meaningfully participate in design activities.\\     \hline     7&  Design of a Gaze-Sensitive Virtual Social Interactive System for Children With Autism & Virtual Reality is used in promoting social interaction in kids with ASD. But these applications lack in personalisation. There exists no real-time system that can monitor eye-gaze dynamically and provide individualized feedback &  The researchers are proposing that a Virtual reality system that incorporates real time eye-gazing can increase the usefulness of virtual reality intervention for the kids with ASD.\\     \hline     8 & End-user programming architecture facilitates the uptake of robots in social therapies &    Although some easy-to-use tools for programming of robots exist , the major hurdle for using robots in everyday life is the difficulty to combine the expertise of robot programmers and developers and the domain specialists in the way that robots can be used to the state of the art of their performance by end users. &  This paper proposes an architecture that makes programming of robot behavior of an arbitrary complexity possible for end-users and shows the technical solutions in a way that is easy to understand and generalize     to different situations. It aims to facilitate the uptake and actual use of robot technologies in therapies for training social skills to autistic children.\\     \end{tabular}     \end{table}     \FloatBarrier     Apart from that these applications needs  a lot of design perspective into these application as the requirement gathering for these products are not easy as it is challenging for the autistic children to convey their likes and dislikes in the first place. There are many studies being done in getting the correct design considerations and software attributes onto the application for autistic children. Some of them are stated below in the table.      \end{document}


title: Tools for automating document compilation

text: A lot of people write makefiles that say something like               paper.pdf: paper.tex             pdflatex paper             bibtex paper             pdflatex paper             pdflatex paper      To handle re-running TeX to get new/changed references and so forth. Is there a better way to do this?


title: Is there a makefile system for LaTeX, etc?

text: > **Possible Duplicate:**   >  Tools for automating document compilation How do I handle building complicated and large LaTeX projects? Is there a makefile system (like GNU Make) or should I just write my own shell scripts (what I'm doing now)?


I'm using LaTeX and JabRef on Windows. I set up my bibliography database and cited references in my LaTeX document. However, I do not know how to use the command line on Windows to do the 'latex bibtex latex latex' compile. So my question is: **How can I do the 'latex bibtex latex latex' compiling using Windows without the command line?**


title: Convert LaTeX compilation from multiple run throughs to single compilation

text: I have a simple question about using LaTeX. I often have to do pdf2Latex several times and with a Bibtex thrown in there somewhere to get my document to come out correctly. More or less looks like               latex A.tex     bibtex B     latex A.tex     latex A.tex      Is there anyway to do that all in one go? I am using WinEdt 7.0 if that matters


title: How to find out which compile steps are necessary?

text: I have been using LaTeX for quite a while now, but I have not found out how to determine the rules for the compilation steps needed to create the document yet. A couple of questions come up. Please do not hesitate to provide a really short answer, I just do not know where to start. `texify` belongs to MikTeX and runs `pdflatex` plus what else is needed. What is the equivalent for MacTeX? When I would like to launch a recompilation script, it would probably make sense to run `texify` only once so that I do not have to take care of running BibTeX, pdflatex and others multiple times. Is that correct? What would be the best approach to write a simple script that compiles everything that is needed in the correct order? There is a grunt plugin that compiles latex, but looking at the source code, I do not understand how a simple `pdflatex` call could correctly compile everything. Is that possible?


title: Create an exec on mac to compile

text: I'm trying to create an exec on mac to compile Latex, MakeIndex and BibTex in same time. Here my make file :               latex -output-directory=build -interaction=nonstopmode sample.tex     makeindex build/sample.idx     makeindex build/sample.nlo -s nomencl.ist -o build/sample.nls     latex -output-directory=build -interaction=nonstopmode sample.tex     bibtex build/sample     latex -output-directory=build -interaction=nonstopmode sample.tex     latex -output-directory=build -interaction=nonstopmode sample.tex      But when I launch this exec with this in my sample folder, Terminal return me "Command not found". I think this is a path problem but I'm not really efficient in this domain...


title: automating compilation

text: > **Possible Duplicate:**   >  Tools for automating document compilation I am fairly new to latex and would like to automate my workflow (creating pdfs from a beamer/listings/tkiz source). What I want is a script to automatically recompile the source and reload the resulting pdf in acrobat whenever my code changes. Of course this is easy to do however I have one issue: How can a script determine whether or not a second pass of pdflatex is neccessary? Unfortunately this cannot be deduced from pdflatex' exit code (which is 0 even when another pass is needed), but maybe there is some other way to detect that in an automated way. Many thanks!


title: Building LaTeX files by one command

text: > **Possible Duplicate:**   >  Tools for automating document compilation Is there a single command which would run bibtex, makeglossary (pdflatex x N ...) etc. automatically? I could create Makefile but it seems like overkill - is there a command for it? (LuaTeX support would be a plus).


title: Run multiple commands in TeXShop typeset

text: I am a user of `biblatex-mla` and I wish to run the whole bibliography generation workflow with a single click of "Typeset" in TeXShop.               pdflatex filename.tex     bibtex filename     pdflatex filename.tex      How can I run these commands in a single click of "Typeset"?


title: Paragraph mode inside a math equation or reuse array-columns

text: My problem is that I want to reuse the spacing in a certain math equation like:               \begin{equation}     \begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}     ... & := &  ... \\[4mm]         & =: &  ...     \end{array}     \end{equation}      This equation is followed by some text and then I want to repeat the above equation with the same spacings between array-columns. Is it possible? Out of the box I will get another spacing made by tex on the basis of the math symbols. Perhaps it is possible to stick to one equation environment and insert the text in the equation. However `\mbox{...}` or `\text{...}` is not good enough because the text _must_ show up in paragraph mode, left aligned w.r.t. the page. W.r.t. the answer of Harish Kumar a MWE of my problem:               \documentclass{article}          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{mathtools}     \usepackage{relsize}     \usepackage{stmaryrd}     \usepackage{bm}          \begin{document}          \noindent      Example 1 (not ok):     \begin{align}     \begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}     a \cdot b & := &  a \cdot \mathlarger{\llbracket\,} 0, \, b \mathlarger{\,\rrbracket} \\[4mm]         & =: &  ...     \end{array}     \intertext{In the group this means that ... }     \begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}     a & = &  b.     \end{array}     \end{align}     Example 2 (ok):     \begin{align}     \begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}     a \cdot b & := &  a \cdot b \\[4mm]         & =: &  ...     \end{array}     \intertext{In the group this means that ... }     \begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l}     a & = &  b.     \end{array}     \end{align}          \end{document}


title: label for package: fancyvrb

text: I have a latex code for a computer program code like as specified in here. I want to write a label to this code. I searched for it but was unable to find how to add label for the source code. Any help will be great! * * * _Cite from linked source, contents of link as of 2013-03-20 20:53:13:_ > To write a code in latex, you can use `\begin{verbatim}` `\end{verbatim}` > environment. A similar approach is by doing this >   >   >     \usepackage{fancyvrb} >     \DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small} >     \DefineVerbatimEnvironment{example}{Verbatim}{fontsize=\small} >   > > and then you can type your code in the body >   >   >     \begin{code} >     c+=1; >     \end{code} >


title: How do I wrap lines in a column in a table

text: I am making a table in a two-column document and one of the table columns is running out of the page. This is a sample of the table. I would like to wrap the last column in the table. How can I solve this?               \begin{table}[b]          \caption{}     \label{snps.tab}%     \begin{tabular*}{\columnwidth}{@{}lllll@{}}     \toprule     SNP & Chromosome & Gene & LOD score & Annotation \\     \colrule     rs33321100 & chr17 & Srd5a2 & 3.79 & 3-oxo-5-alpha-steroid 4-dehydrogenase 2 \\     \botrule     \end{tabular*}%     \end{table}


title: Picture taking up the space left on last (twocolumn, balanced) page

text: Let's say I have a two-column `scrbook` document, with its last page of each chapter balanced by using the `balance` package because `multicol` is not an option for me for reasons that are not part of this question.               \documentclass[twocolumn]{scrbook}          \usepackage{lipsum}     \usepackage{balance}          \begin{document}          \lipsum[1]          \balance          \lipsum[2]          \end{document}      **Is there some way to fill the remaining space with an image spanning both columns?** I know this is somewhat awkwardly phrased, but I hope you get the idea of what I am trying. I am aware that this might end up being done completely differently, e.g not using `balance` in the first place, and that is fine for me. But I have to repeat, `multicol` is not an option, and neither is using a different documentclass than `scrbook`. (Mostly because the document, at >500 pages, is mostly layed out, I am applying finishing touches, and doing such fundamental changes at this point will require more re-working than I am willing to apply at this point. Sorry.)


title: Texlive - restoring texlive/updmap font state?

text: Well, I just wanted to have `times` render in a DVI in `evince`; that command failed at `mktexpk`, basically something like this if I try to run it standalone:               $ TEXMFCNF=/path/to/texlive/2011/texmf/web2c  mktexpk --mfmode / --bdpi 600 --mag 1+60/600 --dpi 660 ptmri7t     mktexpk: don't know how to create bitmap font for ptmri7t.     mktexpk: perhaps ptmri7t is missing from the map file.      Then I tried to `updmap --enable Map times.map`, then times.map doesn't exist `:(`.. then `updmap --disable times.map`, then `updmap --enable Map adobe.map`, than that didn't do anything, so I did `updmap --disable times.map`; then the same with `updmap-sys`... Apparently I've pasted also `updmap-sys --enable Map fourier.map`, so I disabled that too `updmap-sys --disable fourier.map` \- and now, I'm at a point where pdflatex started spitting this out:               pdfTeX warning: pdflatex (file /home/USER/.texlive2011/texmf-var/fonts     /map/pdftex/updmap/pdftex.map): ambiguous entry for `zpcp32bc': font file prese     nt but not included, will be treated as font file not present               pdfTeX warning: pdflatex (file /home/USER/.texlive2011/texmf-var/fonts     /map/pdftex/updmap/pdftex.map): ambiguous entry for `zpcp33bc': font file prese     nt but not included, will be treated as font file not present               pdfTeX warning: pdflatex (file /home/USER/.texlive2011/texmf-var/fonts     /map/pdftex/updmap/pdftex.map): ambiguous entry for `zpcp33bc': font file prese     nt but not included, will be treated as font file not present      I tried also `updmap-sys --force --syncwithtrees` (and `updmap --force --syncwithtrees`) after any additions are seemingly removed, but no dice... Any idea how I can "reset" everything back to defaults? Can one use `tlmgr` maybe? I'm on Ubuntu with Texlive 2011.. * * * EDIT: solved my problem, my notes are below - but I think it's good to know if there's a "factory reset" for these kinds of things... It turns out I forgot a `updmap --disable adobe.map`, now those warnings I gone ... I just went through the log file, and saw that it has:               pdfTeX warning: pdflatex (file /home/USER/.texlive2011/texmf-var/fonts     /map/pdftex/updmap/pdftex.map): invalid entry for `@c': both ps_name and font file missing          pdfTeX warning: pdflatex (file /home/USER/.texlive2011/texmf-var/fonts     /map/pdftex/updmap/pdftex.map): ambiguous entry for `@c': font file present but      not included, will be treated as font file not present      ... and then in the mentioned `pdftex.map`, I could see stuff like `@c " Adobe Type Basics " A 902` \- which should apparently be comments, but seemingly aren't treated as such.


title: Can I make this table fit in portrait mode?

text: I have a table which I want to make fit in portrait mode. Do you think this is possible? Here is the minimal example:               \documentclass[11pt,a4paper]{book}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{makeidx}     \usepackage{graphicx}     \usepackage[width=0.00cm, height=0.00cm, left=1.00in, right=1.00in, top=1.00in, bottom=1.00in]{geometry}     \usepackage{threeparttable}     \usepackage{rotating}     \usepackage{booktabs}          \begin{document}          {\footnotesize     \begin{table}[H!]     %\begin{sidewaystable}[h!]     \centering     \begin{threeparttable}     \caption{OLS results } \label{ols_results}     \begin{tabular}{lcccccccc} \toprule     & \multicolumn{4}{c}{Non-HMO Hospitals} & \multicolumn{4}{c}{HMO-Hospitals} \\     \cmidrule(r){2-5} \cmidrule{6-9}     & \multicolumn{2}{c}{Doctors} & \multicolumn{2}{c}{Non-Doctors} & \multicolumn{2}{c}{Doctors} & \multicolumn{2}{c}{Non-Doctors} \\     \cmidrule(r){2-3} \cmidrule(r){4-5} \cmidrule(r){6-7} \cmidrule{8-9}           & Mean &  StDev & Mean &  StDev & Mean &  StDev & Mean &  StDev \\ \midrule     \underline{Demographics}: &&&&&&&& \\     Age & 32.59* &  [4.00] & 31.13* &   [4.28] & 32.63* &   [4.12] & 30.69* &   [4.28] \\     Mother's Education ($\%$) &&&&&&&& \\      \hspace{0.2em} Some college &&&&&&&& \\     \hspace{0.2em} College graduate &&&&&&&& \\     \hspace{0.2em} High education &&&&&&&& \\     Father's education &&&&&&&& \\     \hspace{0.2em} Some college &&&&&&&& \\     \hspace{0.2em} College graduate &&&&&&&& \\     \hspace{0.2em} High education &&&&&&&& \\     Insurance ($\%$) &&&&&&&& \\     \hspace{0.2em} HMO &&&&&&&& \\     \hspace{0.2em} Government &&&&&&&& \\     \hspace{0.2em} Indigent &&&&&&&& \\     Placental/uterine rupture/haemorrhage & 1.44 & [0.23] &&&&&& \\ \midrule     Observations & \multicolumn{2}{c}{2360} & \multicolumn{2}{c}{7852} & \multicolumn{2}{c}{256} & \multicolumn{2}{c}{879}  \\     \bottomrule     \end{tabular}          \begin{tablenotes}     \tiny     \item[a] [whatever here, this is just a test] This table is made with the use if \LaTeXe{} . Cristobal is a port on the Atlantic side of the Panama Canal. It is located on the western edge of Manzanillo Island and is part of the Panamanian city and province of Colon. Cristobal Colon is the Spanish translation for Christopher Columbus, the Genovese explorer for whom these places were named.     \end{tablenotes}          \end{threeparttable}     %\end{sidewaystable}     \end{table}     }               \end{document}


title: How can a title be placed for a group of pgfplots?

text: Using the `groupplots` library in `pgfplots`, how can a title be set for a group of plots? The following code (basically from the manual) is an example layout. I don't want each plot to have a title, but rather a title be placed centered on top of the group.               \documentclass[crop,tikz]{standalone}          \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}          \begin{document}          \begin{tikzpicture}       \begin{groupplot}[         group style={           {group size=2 by 2}},         height=3cm,width=3cm,         title={Title}]              \nextgroupplot         \addplot coordinates {(0,0) (1,1) (2,2)};         \nextgroupplot         \addplot coordinates {(0,2) (1,1) (2,0)};         \nextgroupplot         \addplot coordinates {(0,2) (1,1) (2,1)};         \nextgroupplot         \addplot coordinates {(0,2) (1,1) (1,0)};       \end{groupplot}     \end{tikzpicture}          \end{document}      ![sample groupplot](http://i.stack.imgur.com/eDPhz.png)


title: Using sidenotes in mdframed environment

text: I get problems when I try to use sidenotes in an mdframed environment:               \documentclass{tufte-book}     \usepackage{xcolor}     \usepackage{mdframed}     \newtheorem{mdtheorem}{Theorem}     \newenvironment{theorem}%     {\begin{mdframed}[backgroundcolor=lightgray]\begin{mdtheorem}}%     {\end{mdtheorem}\end{mdframed}}          \begin{document}          \begin{theorem}     test \sidenote{side note}     \end{theorem}          \end{document}      Any ideas how to get around this issue?


title: xcolor package; color multirows

text: Consider the following table:               \documentclass[a4paper]{report}          \usepackage{multirow}     \usepackage[table]{xcolor}          \begin{document}          \begin{table}       \rowcolors{1}{gray!15}{gray!15}       \centering         \begin{tabular}{rrrrr}         \rowcolor{gray!50}         Header & 1     & 2     & 3     & 4 \\         Row1  & a     & b     & c     & d \\         \multicolumn{1}{c}{\multirow{2}[0]{*}{Multirow1}} & a1    & b1    & c1    & d1 \\         \multicolumn{1}{c}{} & a2    & b2    & c2    & d2 \\         Row2  & aa    & ab    & ac    & ad \\         \end{tabular}     \end{table}          \end{document}      What I am not happy with is the fact that "Multirow1" is now half hidden. Furthermore, instead of the colors `gray!15` and `gray!50` I want to use RGB values. Not sure how to do this though.


title: Example end mark fill

text: does anyone know how I could add fill to this end mark? It's currently a white box with a green border. I've bolded the part of the code where the problem is.               \input{setup}          \begin{document}     \parindent=0.0in{     \setcounter{chapter}{7}     \chapter{Trigonometric Functions}     \section{Angles and Their Measures}     \example     If $\sin 20^\circ\approx 0.3420$, find $\cos (70^\circ)$ without using a calculator.     \solution     Since $70^\circ=90^\circ-20^\circ$, applying the cofunction identity for $\cos(90^\circ-\theta)$ gives     \[ \cos (70^\circ) =\sin(20^\circ) \approx 0.3420.\]     \color{olive}{\stopex}     \end{document}


title: How to "outline" a path in TiKZ?

text: I have a drawing in TiKZ (of a graph, say) and I want to highlight two paths in the drawing. Is there a way to do that using my already-defined node names, without explicitly making new coordinates? I can almost get there by making my extra paths go through node anchors, but I'd like to offset the paths farther away from the nodes than where the anchors are. (I've attached a minimal example below. Ideally, I'd like both the red and blue paths to be on the outside of the triangle.)               \documentclass{article}      \usepackage{tikz}     \usepackage{pgf}     \usepackage{pgfplots}     \usetikzlibrary{calc, through}     \tikzstyle{vertex}=[circle, draw, inner sep=1pt, minimum size=6pt, fill=black!20]          \begin{document}         \begin{tikzpicture}     \foreach \i in {0,1,2}{\node[vertex] (\i) at (\i*120:1) {};}     \node[vertex] (4) at (2,0){};     \draw (0) --(1) --(2) -- (0);     \draw[dashed] (0) -- (4);     \draw[red, rounded corners] (4.north) -- (0.north) -- (1.north east) --(1.west) -- (2.west);      \draw[blue, rounded corners] (1.south east) -- (2.south east) -- (0.south) --(4.south);      \end{tikzpicture}     \end{document}      ![mwe image](http://i.stack.imgur.com/8kflA.png)


title: Pink font in TeXnicCenter

text: I am using TeXnicCenter and MiKTeX 2.9. This problem has never happened to me before, please refer to the images I attached below. Essentially out of no where, my text became pink, although everything still works fine (except TeXnicCenter now doesn't highlight corresponding brackets), I am wondering how to get rid of this pink text and why does it happen? EDIT: I realised the pictures may be too small to see on here, it'd be best to save them onto your computer as that makes it visible. ![enter image description here](http://i.stack.imgur.com/tdKsi.jpg) ![enter image description here](http://i.stack.imgur.com/fahr3.jpg) ![enter image description here](http://i.stack.imgur.com/phrOy.jpg)


title: Impossible to use array value

text: I am trying to use the value of an array in a function. But it does not work. Any ideas? See below my LaTeX code               \documentclass{article}     \usepackage{color}     \usepackage{arrayjob}          \newarray\Color     \readarray{Color}{blue&red&orange&violet}          \begin{document}          \Color(2)     \textcolor{\the\Color(2)}{moi}          \end{document}


title: Adjusting longnamesfirst to use et. al. on first occurence with more than 3 authors

text: I am making final adjustments to my thesis, ensuring that I am using the correct citation rules etc. Now it turns out I need to use all the authors' names in a citation on the first occurrence, as prescribed by APA. Afterwards et al. will suffice. I found out this can be achieved by using `longnamesfirst` as a parameter when I call natbib. However, there is an article that has 30 or so authors (yeah, I know, right?) This creates one hell of a list of authors in my text. I checked the APA rules again, and these state that if there are more than 3 authors I can use et al, even on the first occurrence. Is there a way to achieve this behaviour?


title: Suppressing fields in bibliography?

text: I'm new to LaTeX and am using TeXstudio for compiling my documents. I'm using `\usepackage{natbib}` for bibliography. The reference file was imported from EndNote for bibtex in `.txt` format - I changed the file extension to `.bib` The citations work fine but there are a lot of fields in the references I don't want appearing in my document. All of them have the keywords, copyright info., ISBN diplayed in the reference section. I changed the reference style - `\bibliographystyle{IEEEtranN}` -hoping it would solve the problem but it's not working. I checked a lot of answers on this website and elsewhere but they talk about, what I find to be, advanced stuff - often a different package is being used. Is there a simple way for removing unwanted fields? Also I used `\def\bibfont{\footnotesize}` for changing the font size but it also reduced the size for the heading 'References'. Can it be fixed? And finally, I get an error sometimes that the `.bib` file does not have info in the author-name format. It works fine but every now and then when I open the file again, it gives me this error.