title: pdflatex renders files differently from a strings -- example provided

text: I am running pdftex from command line and the images are getting clipped. When I run the same commands from a saved tex file, no clipping occurs. I have attached the commands and rendered outputs also available (if you bump up my reputation points I can upload them). I do not see any unusual differences in the log files. This seems like a bug and pdftex's tracking system would not let me register to file a bug (http://foundry.supelec.fr/gf/project/pdftex/). Can some please confirm this as bug, recommend how I can report it, and perhaps provide a workaround. I am trying to render a circuitikz via commandline.               :: PDF from Files         pdflatex -interaction=nonstopmode -halt-on-error -jobname circuit_file circuit.tex circuit.pdf          :: PDF from String            pdflatex -interaction=nonstopmode -halt-on-error -jobname circuit_string \documentclass[class=minimal,border=4pt]{standalone} \usepackage{tikz} \usepackage{circuitikz} \usepackage{siunitx} \pagestyle{empty} \begin{document} \begin{circuitikz}[european]\draw(0,0) to [V, v=$V_1$, i_=$I_1$] (0,2)to [R, l^=${R_1}$] (2,2)to [R, l^=${R_2}$, v^<=$V_2$] (2,0) -- (0,0); \end{circuitikz} \end{document}      ![enter image description here](http://i.stack.imgur.com/muCnH.png)


title: XeLaTeX, otf fonts and dotless i

text: I am on an ubuntu machine with XeLaTeX and have been facing this annoying issue. On setting roman font to any of my otf files (Adobe Jenson Pro, Adobe Garamond Pro etc), the dotless i and j characters (`\i` and `\j`) default to ComputerModern.               \documentclass[12pt]{article}          \usepackage[T1]{fontenc}     \usepackage{fontspec}     \setromanfont{Adobe Garamond Pro}          \begin{document}          {\Huge i \i \"{i}}     \end{document}      And this is the output: ![enter image description here](http://i.stack.imgur.com/QkavX.png) The otf file does seem to have the dotless-i symbol but this keeps defaulting to CM. Some of my friends using a mac don't seem to be facing this problem though. Is this a non-mac specific issue?


title: redefine \ref so that it also shows page number?

text: i was idly wondering instead of having `see Section \ref{labelname}` produces > see Section 4.1.1 i could make it so that `see Section \ref{labelname}` produces > see Section 4.1.1 **(p65)** is this possible? Would using `hyperref` mess this up?


title: Suppress initial inline citations biblatex

text: I'm trying to suppress initials within inline citations. I'm using biblatex. I've searched through other posts, and found that setting `uniquename=false` and `uniquelist=false` has worked for other people. However, setting these options is not working for me. How can I get my citations to appear as follows: 'some text (Anderson 1999) and more text (Armenta _et al._ 2008)'. My bib file is as follows:               @ARTICLE{AnderssonS1999,       author = {{Andersson, S.}},       title = {Morphology of UV reflectance in a whistling-thrush: implications         for the study of structural colour signalling in birds},       journal = {Journal of Avian Biology},       year = {1999},       volume = {30:},       pages = {193-204}     }          @ARTICLE{armenta2008,       author = {{Armenta, J.K., Dunn, P.O. \& Whittingham, L.A.}},       title = {{Effects of specimen age on plumage color}},       journal = {The Auk},       year = {2008},       volume = {125:},       pages = {803--808},       file = {:Users/rossahmed/Library/Application Support/Mendeley Desktop/Downloaded/Armenta, Dunn, Whittin\textit{g\textit{}}ham - 2008 - Effects of specimen age on plumage color.pdf:pdf},       publisher = {BioOne},       url = {http://www.bioone.org/doi/abs/10.1525/auk.2008.07006}     }      My .tex file is as follows:               \documentclass{article}     \usepackage[firstinits=true,style=authoryear-comp,natbib=true,doi=false,isbn=false,url=false,uniquename=false,uniquelist=false,sorting=none]{biblatex}                    \addbibresource{test.bib}     \DeclareFieldFormat       [article,inbook,incollection,inproceedings,patent,thesis,unpublished]       {title}{#1\iSDot}          \renewbibmacro{in:}{%       \ifentrytype{article}{}{%       \printtext{\bibstring{in}\intitlepunct}}}          \renewcommand*{\nameyeardelim}{\addspace} % remove comma inline citations               \makeatletter     \ifcsundef{abx@macro@\detokenize{date+extrayear}}{%       }{%       \renewbibmacro*{date+extrayear}{%         \iffieldundef{year}{%           }{%           \addperiod\space           \printtext{\printdateextra}%         }%       }%     }     \makeatother               \DeclareFieldFormat[article]{pages}{#1}     \DeclareNameFormat[article,periodical,book,electronic]{author}{\mkbibbold{#1}}               \begin{document}          \title{}     \author{}     \date{date}     \maketitle          some text \parencite{AnderssonS1999} and more text \parencite{armenta2008}          \printbibliography          \end{document}


title: tikz declare function and babel french option

text: I would like to declare functions in tikz for multiple uses of the same function within the code. Sadly, it seems that the tikz "declare function" is not compatible with the french option in babel. Indeed, the following code (that I simplifed on purpose) runs fine :               \documentclass[english]{article}     \usepackage{babel}                           \usepackage{tikz}          \begin{document}     \begin{tikzpicture}         \tikzset{declare function={Carre(\t)=\t*\t;}}         \draw plot [domain=-1:1] (\x,{Carre(\x)});     \end{tikzpicture}     \end{document}      But when I replace               \documentclass[english]{article}      with               \documentclass[english,french]{article}      compilation generates an error. This is what the log file says : > Missing character: There is no = in font nullfont! Missing character: There > is no @ in font nullfont! Missing character: There is no @ in font nullfont! > > Runaway argument? -1:1] (\x ,{Carre(\x )}); \end {tikzpicture} \end > {document} ! Paragraph ended before \pgfmath@local@@functions was complete. > \par l.18 > > I suspect you've forgotten a `}', causing me to apply this control sequence > to too much text. How can we recover? My plan is to forget the whole thing > and hope for the best. Before posting this, I updated all packages without success. Any help welcome!


title: Specify name of reference

text: See the MWE below. I want to achieve that, the `\nameref{c}` is printed as `Appendix` not as `Some Stuff`.               \documentclass{book}     \usepackage{lipsum}     \usepackage{appendix}     \usepackage{hyperref}     \begin{document}     \chapter{First Chapter}     \lipsum[1]          We refer to the \nameref{c}.          \lipsum          \begin{appendices}          \renewcommand\thechapter{}     \chapter{Some stuff}\label{c}     \lipsum     \end{appendices}     \end{document}      Note that for some reasons I want to use `\renewcommand\thechapter{}` rather than `\chapter*{...}` plus `\addcontentsline...`. This seems like a bit of a special situation. However, the following MWE shows an application which might be quite frequent:               \documentclass{book}     \usepackage{lipsum}     \usepackage{appendix}     \usepackage{hyperref}     \begin{document}     \chapter{First Chapter}     \lipsum[1]          This is explained in the next chapter.      %I want to set a link on "next chapter" which points to the second chapter          \lipsum[2]          \chapter{Second Chapter}     \lipsum[3]     \end{document}      NB: I have rewritten my original question. It is now much more to the point and may also be more interesting for others.


title: Make \phantomsection get me where links to chapter usually do

text: I have such code:               \documentclass{report}          \usepackage{hyperref}          \newcommand{\specnodala}[1]{\newpage\phantomsection\addcontentsline{toc}{chapter}{#1}\section*{#1}}          \begin{document}     \tableofcontents          \specnodala{Izmantotie}     \specnodala{Ievads}          \end{document}      The links (from bookmarks or table of contents) lead me to the heading, but I want it to get me a bit higher like it does with a chapter. I tried adding `\clearpage` or `\cleardoublepage` before `\phantomsection`. It made linking to the second chapter nicer, but changed nothing about the first.


title: Definition/explantion of tabular column types

text: In a question I recently asked (How to make table with rotated table headers in LaTeX) the accepted answer used some features of tabular column types that I was not familiar with, e.g.,               \begin{tabular}{@{} cl*{10}c @{}}      I tried Googling for `latex "@{}"` but that just brought up some generic LaTeX pages. Where can I got to learn about `@{}` tabular columns and other options? * * * Okay, so I found the answer in appendix C.10 of Lamport's book, but I'd like to know where to look for electronic resources.


title: Frameboxes in multicol environment don't align

text: This code:               \documentclass{article}          \usepackage{polyglossia}          \usepackage{multicol}     \usepackage{calc}          \setlength{\parindent}{0pt}     \begin{document}          \begin{multicols}{2}         \begin{center}            \huge Left         \end{center}         \framebox[.5\textwidth-.5\columnsep]{             Left         }         \columnbreak         \begin{center}             \huge Right         \end{center}         \framebox[.5\textwidth-.5\columnsep]{             Right         }     \end{multicols}          \end{document}      Produces: ![](http://flyx.org/files/multicols.png) Why is the huge text aligned, but the frameboxes not?


title: How to "bubble in"/color fill an item counter ((A),(B),(C),...) in an enumerated list

text: I'm trying to make an answer explanation guide for a test where the correct answer is "bubbled in". I've tried using the enumitem package and tikz as shown in this post (Enumerated list with blue circles and number inside it), but it's messing up the default spacing and the counters of the other answer choices. This is what I have so far:               \documentclass{article}     \usepackage{tikz}          \newcommand*\circled[1]{\tikz[baseline=(char.base)]{%             \node[shape=circle,fill=blue!20,draw,inner sep=2pt] (char) {#1};}}          \usepackage{enumitem}          \begin{document}     \renewcommand{\labelenumi}{(\Alph{enumi})}     \begin{enumerate}     \item Answer A     \item[label=\circled{(\Alph*)}] Answer B     \item Answer C     \item Answer D     \item Answer E     \end{enumerate}          \end{document}      Ultimately what I want is something like this: ![enter image description here](http://i.stack.imgur.com/trtCY.png) A transparent fill color would be nice. Thanks for any help.


title: Determine the operating system

text: I often switch between Linux and Windows. A number of my LaTeX files use images from a central folder. All of these are within a Dropbox folder, which is how I sync between them. The dropbox folders are in different paths on Windows and Linux, so I would like to make a macro which detects the OS and uses the correct path.


title: Customizing apacite style using bibtex in SWP

text: Sorry for the basic question, but I got stuck finishing up my thesis. I'm using Scientific Workplace 5.5 (very basic LaTeX literacy) and I need to customize `apacite` to meet the faculty requirements. I need to:   1. be able to customize the .bbl file and deal with capitalization problems,   2. create a "numbered" reference list,   3. modify the spacing between lines. Even if I edit the `.bbl` file using Notepad++, nothing changes in my output PDF file. I am not sure where to add any necessary codes to introduce numbering as I'm using SWP. Here is a sample of my `.bbl` file:               \begin{thebibliography}{}               \bibitem[\protect\citeauthoryear{%       C. Capps}{%       C. Capps}{%       2010}]{%       Capp10b}%       \APACinsertmetastar{%         Capp10b}%       Capps, C. \newblock{}\BBOP{}2010, June\BBCP{}. \newblock{}\BBOQ{}Buyer power in health plan mergers.\BBCQ{} \newblock{}\Bem{Journal of Competition Law and Economics}, \Bem{6}(2), 375-391.          \bibitem[\protect\citeauthoryear{%       C. Capps \BBA{} Dranove}{%       C. Capps \BBA{} Dranove}{%       2004}]{%       Capp04}%       \APACinsertmetastar{%         Capp04}%       Capps, C.\BCBT{} \BBA{} Dranove, D. \newblock{}\BBOP{}2004, March\BBCP{}. \newblock{}\BBOQ{}Hospital consolidation and negotiated ppo prices.\BBCQ{} \newblock{}\Bem{Health Affairs}(2), 175-181.          \end{thebibliography}      Here is what my preamble in SWP looks like:               \newtheorem{theorem}{Theorem}     \newtheorem{acknowledgement}[theorem]{Acknowledgement}     \newtheorem{algorithm}[theorem]{Algorithm}     \newtheorem{axiom}[theorem]{Axiom}     \newtheorem{case}[theorem]{Case}     \newtheorem{claim}[theorem]{Claim}     \newtheorem{conclusion}[theorem]{Conclusion}     \newtheorem{condition}[theorem]{Condition}     \newtheorem{conjecture}[theorem]{Conjecture}     \newtheorem{corollary}{Corollary}     \newtheorem{criterion}[theorem]{Criterion}     \newtheorem{definition}{Definition} \newtheorem{assumption}{Assumption}     \newtheorem{example}[theorem]{Example}     \newtheorem{exercise}[theorem]{Exercise}     \newtheorem{lemma}{Lemma}     \newtheorem{notation}[theorem]{Notation}     \newtheorem{problem}[theorem]{Problem}     \newtheorem{proposition}{Proposition}     \newtheorem{remark}{Remark}     \newtheorem{solution}[theorem]{Solution}     \newtheorem{summary}[theorem]{Summary}     \newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}     \geometry{left=1.378in,right=0.984in,top=0.984in,bottom=0.984in}     \setlength{\parindent}{0.25in}     \setlength{\parskip}{8pt plus 1pt minus 1pt}     \widowpenalty=50000000     \clubpenalty=50000000     \titleformat*{\section}{\normalsize\bfseries}     \titleformat*{\subsection}{\normalsize\bfseries}     \titleformat*{\subsubsection}{\normalsize\bfseries}


title: Aligning verses differently

text: Is there a way to create the following layout using the verse package?               \documentclass{article}     \usepackage{verse}     \usepackage[utf8]{inputenc}     \usepackage[margin=1.3in]{geometry}          \newcommand{\attrib}[1]{\nopagebreak\noindent       \makebox[\dimexpr(\versewidth)+2em][r]{\footnotesize#1\hspace{-2em}}}          \begin{document}          \settowidth\versewidth{What if tomorrow the war could be over?}          \begin{flushright}     \parbox{\versewidth}{     This is a war and we are soldiers. \\     What if tomorrow the war could be over? \\     Isn't that worth fighting for? \\     Isn't that worth dying for? \\     \attrib{Morpheus}     }     \end{flushright}          \begin{flushleft}     \parbox{\versewidth}{     This is a war and we are soldiers. \\     What if tomorrow the war could be over? \\     Isn't that worth fighting for? \\     Isn't that worth dying for? \\     \attrib{Morpheus}     }     \end{flushleft}          \end{document}      Is this possible to do it without using the \makebox for positioning the author (\attrib) ? I'm just a beginner in both typography and LaTeX. I have experience only in website development.


title: How to add other shapes on a arrow in tikz?

text: I have an arrow between 2 coordinates               \documentclass{article}     \usepackage{tikz}          \begin{document}      \begin{tikzpicture}        \node[fill=blue,circle,text width=3cm]   (first) at (1,1) {};        \node[fill=purple,circle,text width=3cm] (third) at (1,9) {};        \draw [->] (first) -- (third);      \end{tikzpicture}     \end{document}      How can I change the arrow to something like this, I want to add shapes on it, which can contain some text ![enter image description here](http://i.stack.imgur.com/U4Mu1.png) * * * ## edit what if the arrow is on a curve?![enter image description here](http://i.stack.imgur.com/E4bCj.png)


title: Too many unprocessed floats

text: I'm trying to a large number of figures. The code is               \begin{figure}     \includegraphics[scale=0.5]{m2T4.pdf}     \caption{M2T, Problem Size 513}     \end{figure}      I'm not able to compile, I get the error               ! LaTeX Error: Too many unprocessed floats.     See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...     l.113 \includegraphics     [scale=0.5]{m2T4.pdf}     You've lost some text. Try typing <return> to proceed.     If that doesn't work, type X <return> to quit.     ! Undefined control sequence.     \@float@Hx ...ltovf \fi \global \setbox \@currbox     \color@vbox \normalcolor \...     l.113 \includegraphics     [scale=0.5]{m2T4.pdf}     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.     ! Missing number, treated as zero.     <to be read again>     \vbox     l.113 \includegraphics     [scale=0.5]{m2T4.pdf}     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)     pdfTeX warning: pdflatex (file ./m2T4.pdf): PDF inclusion: found PDF version <1     .5>, but at most version <1.4> allowed     <m2T4.pdf, id=1121, 538.28104pt x 212.1526pt>     File: m2T4.pdf Graphic file (type pdf)     <use m2T4.pdf>


title: \includegraphics restriction to the number of calls

text: Is there any restriction about `\includegraphics` usage? This question arise from a LaTeX document where the number of `\includegraphics` has an uncommon result. When exceeded a limit number of includes at a particular section, the following includes aren't displayed (no error).


title: Citations not linking to bibliography

text: In my thesis, I use the url and hyperref packages (they were included as part of a thesis template) to get links from where a work is cited to where that citation is in the bibliography (and it works great). I am trying to do the same thing in a paper I'm writing, however when I build that paper, the links to figures and tables work, but links to the references do not. A MWE is:               \documentclass[letterpaper, 12 pt, conference]{ieeeconf}     \IEEEoverridecommandlockouts          \pdfoptionpdfminorversion 6          \usepackage{amssymb, amsmath}     \usepackage{graphicx}     \usepackage[labelformat=simple]{subcaption}         % allows for subfigures     \renewcommand\thesubfigure{(\alph{subfigure})}     \usepackage{setspace}     \usepackage{cite}     \usepackage{newtxtext,newtxmath}     \DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}     \usepackage{color}     \usepackage{xparse}     \usepackage{bm}     \usepackage{siunitx}     \usepackage{multirow}     \usepackage{algorithm}     \usepackage{algpseudocode}     \let\Algorithm\algorithm     \renewcommand\algorithm[1][]{\Algorithm[#1]\setstretch{1.15}}          \lefthyphenmin4     \righthyphenmin4          \usepackage{array}     \usepackage{placeins}          % *** PDF, URL AND HYPERLINK PACKAGES ***          \usepackage{url}     \usepackage[pdftex,backref,pagebackref,plainpages=false]{hyperref}     \hypersetup{         breaklinks   = false, % Allow link text to break across lines (default=false).         colorlinks   = false, % Color the text of links (true) or put color frames over         linkbordercolor  = {1 1 1}, % The color of the box around normal links (white so they won't show up)         citebordercolor  = {1 1 1}, % The color of the box around citations (white so they won't show up)                               % the links (false).         pdfstartview = {FitV}, % Set the startup page view. Possible options are:                                % FitH: Fit whole width of page                                % FitV: Fit whole height of page                                % FitB: Fit whole ?Bounding Box? page                                % FitBH: Fit whole width of ?Bounding Box? of page                                % FitBV: Fit whole height of ?Bounding Box? of page         bookmarksnumbered  = true, % Put section numbers in bookmarks (default=false)         bookmarksopen      = true, % Open up the bookmark trees (default=false).         bookmarksopenlevel = 0, % Level to which bookmarks are open (default=\maxdimen).         bookmarkstype      = toc, % Specify which toc file to mimic (default=toc).         pdfpagemode        = {UseOutlines}, %  Specify how document starts when opened ({None}).                                             % Possible options are:,                                             % None: Neither bookmarks nor thumbnails are visible.                                             % UseOutlines: Bookmarks are visible.                                             % UseThumbs: Thumbnails are visible.                                             % FullScreen: Full-screen mode         pdftitle    = {My Title},         pdfauthor   = {Authors},         pdfcreator  = {PDF Creator},         pdfsubject  = {PDF Subject},         pdfkeywords = {PDF Keywords},         pdfborder       =   {0 0 0},}          \interdisplaylinepenalty=2500          \begin{document}     \title{\LARGE \bf My Title}          \author{Me%     %     \thanks{Me \href{mailto:me@gmail.com}{\tt\footnotesize me@gmail.com}}}  %% End the author section          % make the title area     \maketitle          \abstract     My abstract     \endabstract          Blah blah list of citations now \cite{Stone2001_2} and \cite{Green2005}.          \clearpage          \bibliographystyle{IEEEtran}     \bibliography{refs}          \end{document}      This requires the ieeeconf.cls file. The refs.bib file contains (among other references):               @inproceedings{Green2005,     address = {Monterey, CA},     author = {Green, WE and Oh, PY},     booktitle = {Proceedings, 2005 IEEE/ASME International Conference on Advanced Intelligent Mechatronics.},     doi = {10.1109/AIM.2005.1511063},     isbn = {0-7803-9047-4},     keywords = {Aerial Robots,Fixed wing UAV,Hover,Unmanned Aerial Vehicles},     pages = {693--698},     publisher = {IEEE},     title = {{A MAV That Flies Like an Airplane and Hovers Like a Helicopter}},     url = {http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=1511063},     year = {2005}     }     @conference{Stone2001_2,     address = {Canberra},     author = {Stone, Roland Hugh and Clarke, G},     booktitle = {Australian International Aerospace Congress},     month = mar,     title = {{Optimization of Transition Maneuvers for a Tailsitter Unmanned Air Vehicle}},     year = {2001}     }      Any idea on what I'm missing? I am on Windows 7 and use TeXstudio. edit: I've done a little additional troubleshooting and it seems if for the document class I replace ieeeconf with report, then all works as it should. Is there a reason ieeeconf is preventing this?


title: Does cfr-lm have any other side-effects besides changing to old style numbers?

text: I am currently using the following:               \documentclass[12pt,extrafontsizes]{memoir}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \begin{document}     I have 1,233,345.6 cats.     \end{document}      I want old-style numerals, and using               \usepackage{cfr-lm}      gives them to me universally. However, as my document is more complicated than the MWE above, I'm worried that `cfr-lm` does other changes besides old-style numbering. Does it?


title: insert text RIGHT under image ABOVE caption

text: How do I place text RIGHT below an image (above the caption) within `subfig`? Here Is my code:               \documentclass{article}          \usepackage{hyperref}     \usepackage{graphicx}      \usepackage{subfig}           \begin{document}          \captionsetup[subfigure]{labelfont=bf,textfont=normalfont,singlelinecheck=off,justification=raggedright}     \captionsetup[figure]{singlelinecheck=off}          \begin{figure}     \subfloat[\textit{\textit{D. pulex}}     \newline \tiny \url{commons.wikimedia.org/wiki/File:Daphnia_pulex.png}     \newline \tiny Photos by Paul Hebert]{\label{dpulex}     \includegraphics[width=0.48\textwidth]{dpulex.png}     }     \end{figure}          \end{document}      Here is what it prints: ![enter image description here](http://i.stack.imgur.com/9cJ8l.png) So I'd like those two lines written in `tiny` to appear below the image and above "(a) D. pulex". Any help will be appreciated.


title: Transition in Petri Net

text: I am newbie in Tikz, After reading this question Transitions in Petri nets I want to create this ![enter image description here](http://i.stack.imgur.com/5nXiz.png) And this is my code, you can access with this link https://www.writelatex.com/read/bxwwcmmghpmw               \documentclass{article}          \usepackage[version=0.96]{pgf}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes,automata,petri}          \tikzset{         place/.style={             circle,             thick,             draw=blue!75,             fill=blue!20,             minimum size=6mm,         },         transitionH/.style={             rectangle,             thick,             fill=black,             minimum width=8mm,             inner ysep=2pt         },         transitionV/.style={             rectangle,             thick,             fill=black,             minimum height=8mm,             inner xsep=2pt         }     }          \begin{document}          \begin{tikzpicture}[node distance=1.3cm,>=stealth',bend angle=45,auto]         \node [place,label=above:$P_1$] (p1) {};         \node [transitionV,label=above:$T_1$] (t1) [right of=p1] {}             edge[pre]   (p1);         \node [place,tokens=1,label=above:$P_2$] (p2) [right of=t1] {}             edge[pre]   (t1);         \node [place,tokens=2,label=above:$P_3$] (p3) [below of=p2] {}             edge[pre]   (t1);         \node [transitionV,label=above:$T_2$] (t2) [right of=p3] {}             edge[pre]   (p2)             edge[pre]   (p3)             edge[post, bend left]  (p1);         \node [place,tokens=1, label=above:$P_4$] (p4) [right of=t2] {}             edge[pre]   (t2);     \end{tikzpicture}          \end{document}      I am not quite happy with the edge from T2 --> P1, and I want them center in vertical. Thank you very much for your help.


title: What's the best way to switch language in Xetex for whole chapter?

text: I am wondering, what might be the best way to switch a language in a Xetex document for a whole chapter. The specific problem is, that in the chapter the language is switched (say from English, which is the default language, to German) might be some quotations in a third language or the default language. What I tried is the following:               \begin{german}     \chapter[]{A title}          \section{Introduction}     Das ist ein deutscher Text mit einem englischen Zitat: \textenglish{»To be or not to be, that is the questions. Whether 'tis nobler…«} Und hier geht der deutsche Text weiter, ist aber nicht mehr als deutscher gesetzt.          \end{german}      But the problem is, that after ´\textenglish´ the language isn't switched back to German again in spite of the fact, that the whole chapter is included in ´\begin{english} … \end{english}´. So I assume, that this might not be the correct way to do it. But how than? Here is a working example:               \documentclass[10pt,twoside]{memoir}     \usepackage[english,german]{babel}     \usepackage{polyglossia} % Vgl. http://tex.stackexchange.com/questions/135185     \setmainlanguage[spelling=old,babelshorthands=true,script=latin]{english}     \setotherlanguage{german}     \usepackage{fontspec}     \setmainfont[Numbers={OldStyle},Ligatures={Common, Historic}]{Adobe Garamond Pro}     \begin{document}          \begin{german}     \chapter[]{A title}          \section{Introduction}     Das ist ein deutscher Text mit einem englischen Zitat: \textenglish{»To be or not to be, that is the questions. Whether 'tis nobler…«} Und hier geht der deutsche Text weiter, ist aber nicht mehr als deutscher gesetzt.          \end{german}          \end{document}


title: Question relate to Table of Contents

text: I want to use the `\mathsection` in the `chapter` content, as I said and Gonzalo Medina figured out for me in Using \mathsection in the chapter. However, when I use his solution, the Table of Contents went wrong like this: ![enter image description here](http://i.stack.imgur.com/scoHD.png) Here is the code of my template :                \documentclass[11pt,a4paper]{amsbook}      \usepackage{bbold,amscd,amsmath,amssymb,amsfonts,ifthen,amsthm}      \usepackage[utf8]{vietnam}      \usepackage{titlesec}      \usepackage[all]{xypic}       \usepackage{kpfonts}`      %%%%% FOR SEARCHING LABELS AND REFS %%%%%%%%%%%%%%%      \usepackage{color}      \usepackage[color,notref,notcite]{showkeys}      \definecolor{refkey}{rgb}{0,0,0}      \definecolor{labelkey}{rgb}{0,0,1}      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      \usepackage{newcent}         %\usepackage[unicode]{hyperref}      \usepackage{cmap}           %%%%%MARGIN %%%%%%%%%%%%%%%%%%%      \oddsidemargin 2cm %0.3cm      \evensidemargin 2cm % 3cm      \topmargin2cm      \textwidth12cm %15      \textheight18.5cm %22      \headheight3ex      \headsep5ex      \topskip3ex      %% FOR TYPESETTING VIETNAMESE WITH AMSART %%%%%%      \def\firstofone#1{#1}      \let\uppercase\firstofone      \let\MakeUppercase\firstofone      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%             %STYLE%%%%%%%%%%%      \def\thepart{\Roman{part}}      \def\thechapter{\arabic{chapter}}      \def\thesection{\arabic{section}}      \def\labelenumi{\roman{enumi})}      %\numberwithin{thm}{section}      \numberwithin{equation}{section}      \titleformat{\chapter}[display]      {\normalfont\huge\filcenter\scshape}{\chaptertitlename\ \thechapter}{0.2pt}{}      \titleformat{\section}      {\normalfont\Large\bfseries}{\S\thesection.}{0.1em}{}           %THEOREM%%%%%%%%%%%%%%%%      \theoremstyle{plain}      \newtheorem{thm}{Theorem}[section]      \newtheorem{dl}[thm]{Định lý}      \newtheorem{bd}[thm]{Bổ đề}      \newtheorem{hq}[thm]{Hệ quả}      \newtheorem{md}[thm]{Mệnh đề}      \theoremstyle{definition}      \newtheorem{nx}[thm]{Nhận xét}       \newtheorem{chuy}[thm]{Chú ý}      \newtheorem{dn}[thm]{Định nghĩa}      \newtheorem{vidu}[thm]{Ví dụ}       \newtheorem{bt}{}[section]      % miscellaneous                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \pagestyle{myheadings}     \begin{document}     \parskip4pt     \renewcommand{\baselinestretch}{1.1}          \frontmatter          \tableofcontents       \normalsize     \chapter*{Lời nói đầu}     Thử xem thế nào.\\      Let's try it.\\     \chapter*{Các ký hiệu}     \markleft{\sc Các ký hiệu}     \markright{\sc Các ký hiệu}     Ta sẽ dùng các ký hiệu sau \\     We will use these following notations.\\     \mainmatter          \pagenumbering{arabic}               \markleft{\hfill \sc Nguyễn Minh Hà}     \chapter{Hướng của đoạn thẳng}          \markright{\sc Hướng của đoạn thẳng\hfill\ }     \section{Hình thang và hình bình hành}     We define the following figure.\\     \section{Đoạn thẳng}     We define the following arc.\\     \backmatter          \begin{thebibliography}{99}     \end{thebibliography}     \end{document}      So, how can I fix my template to get the correct content with `\mathsection`, number of section, the name of the section, and the number of page?


title: Defining a local graphicspath for gnuplot epslatex plots

text: I'm having trouble including gnuplot plots (epslatex terminal) that are stored in a subdir of my main tex. Here's how i create a plot in gnuplot:               set datafile separator ","     set terminal epslatex input color size 3.2in,2.8in font 8 header \        "\\scriptsize"          set out 'test.tex'     plot    "../data/points.csv"  using 22:$11 with lines title 'curve'     set out      Because I use this same gnuplot code for lots of different datasets, I cannot assign a unique name to the output instead of "test.tex" but simply distinguish the datasets only by the subdirectories they are stored in. Say I have a set of "test.tex" and "test.eps" in each of the subdirectories "subdir1" and "subdir2" of my main.tex. Now consider the following _not_ working minimal example:               \documentclass{scrbook}     \usepackage{graphicx}     \usepackage{epstopdf}          \begin{document}       \input{./subdir1/test}       \input{./subdir2/test}     \end{document}      This does not work, because the epslatex terminal writes               \put(0,0){\includegraphics{test}}      into test.tex which is however included in the main directory. Furthermore I can't use               \graphicspath{{./subdir1}{./subdir2}}       because then the .eps files that have all the same name would be mixed up. Is there a way to define a local graphicspath within the \input{} or the test.tex or at least within an environment (that can itself be included into a subfloat) I could put the \input{} command into? Until now I have to go to each included test.tex and specify the exact path of the test.eps which is tedious, because this correction gets overwritten every time I redo the plot in gnuplot.


title: Figure numbering removing section LyX

text: Figures are labeled as 1.0.1 but as I am only using "Parts" and do not have "chapters" or"sections" i would like them to be 1.1, 1.2 and so on.


title: landscape figure on different page to heading

text: I'm trying to keep a landscape figure on the same page as the section heading -- with section heading still in portrait. But figure keeps slipping onto next page. MWE here:               \documentclass{article}          \usepackage{pdflscape}  % landscape figures tables and caption     \usepackage{graphicx}          \begin{document}          \section{Figures}          \begin{landscape}     \begin{figure}[htbp]     \centering     \includegraphics{FIGURE.png}     \caption{Figure cpation}     \label{figsitemap}     \end{figure}     \end{landscape}          \end{document}      Tried altering top/bottom margins and scale bit not joy. Rotating and sidewaysfigure aren't what I want. Any help? cheers


title: Algorithm code width problem

text: I have a problem in the width of the algorithm which I wrote as shown below, and I need to write it in a better way but I can't, any help? ![enter image description here](http://i.stack.imgur.com/R2LDb.png) This is my code:                 \begin{algorithmic}       \WHILE{$GenC[i] ! = null$}       \STATE $SpkRealC1 = GetSpikesInfo(GenC[i],RealC[1])$       \STATE $SpkRealC2 = GetSpikesInfo(GenC[i],RealC[2])$       \STATE $SpkRealC3 = GetSpikesInfo(GenC[i],RealC[3])$            \STATE $MappedRealtoGenClass[i] = $       \STATE $MaxSpikeNo(SpkRealC2,SpkRealC2,SpkRealC3)$       \STATE $MappedRealtoGenClassRatio[i]=$       \STATE $MaxSpikeNo(SpkRealC2,SpkRealC2,SpkRealC3)/spikesCount(GenClass[i])$       \ENDWHILE       \end{algorithmic}


title: Key Mappings in Vim - Is the following Suffice?

text: I just installed LaTeX-Suite for Vim in Ubuntu 13.10. I couldn't find for a proper set of key mappings that would help me out as a beginner. So I followed these : Key-Mapping in LaTeX-Suite for Vim. But are these the only once, I would like to know how to customize Vim like for **auto-completion** and different keys to compile and view the pdf and also if possible generating the pdf as and when we type. Also I would want the people's `.vimrc` file with the key mappings to help me out. I will be very grateful for that.


title: How do I [simply] typeset a bibliography as a separate PDF?

text: I'm preparing a document that requires the body of the text and the references to be separate PDF files. Of course, the bibliography comes from \bibliograpy command and the text citations come from \cite command.. you need both to be present in order for BibTeX to work. I have been typesetting the document and then breaking it apart with pdftk(1) -- but that is annoying and requires me to know page numbering. Is there a TeX-only way to do it?


title: How can I create a multi line split inside of a radical inside of an array environment?

text: I have an align like this:               \begin{align*}     \sigma &= \sqrt{\sum_x \left[ (x-\mu_x)^2\mathbf{f}(x) \right] } = \sqrt{\frac{1}{10}\sum_x (x-\mu_x)^2 } \\      &= \sqrt{\frac{1}{10}(         (0-.45)^2 + (1-.45)^2 + (2-.45)^2 + (3-.45)^2 + (4-.45)^2 +          (5-.45)^2 + (6-.45)^2 + (7-.45)^2 + (8-.45)^2 + (9-.45)^2 } \\      &= \sqrt{24.6525}     \end{align*}      However, this goes off the edge of the page. I wanted to create a multiline inside the middle square root symbol, so I tried this:               \begin{align*}     \sigma &= \sqrt{\sum_x \left[ (x-\mu_x)^2\mathbf{f}(x) \right] } = \sqrt{\frac{1}{10}\sum_x (x-\mu_x)^2 } \\      &= \sqrt{\frac{1}{10}(         \begin{split} (0-.45)^2 + (1-.45)^2 + (2-.45)^2 + (3-.45)^2 + (4-.45)^2 + \\          (5-.45)^2 + (6-.45)^2 + (7-.45)^2 + (8-.45)^2 + (9-.45)^2 } \end{split} \\      &= \sqrt{24.6525}     \end{align*}      but this gives me errors about mismatched curly braces. Ideally, I would have something exactly like \frac, except which did not draw the horizontal line between it's operands.


title: Is it \catcode or \catcode`?

text: I've noticed that `\catcode` is poorly documented in the TeXbook. The primitive is defined as `\catcode` but every time it is used, it is used as `\catcode`` ... the backquote is never discussed. ``` itself is not active (right?) so I don't understand its function. Is it required for `\catcode` to work properly?


title: Adding Subsubsection & Subsubsection* to the TOC with lyx?

text: I'm using, lyx 2.0.2, how can I add the Subsubsection in a document with a report class to the TOC, I tried the solution provided in this Question but didn't work for me, it generated no errors but no Subsubsection is added to the TOC.   Now I have a couple of section* I added those with this:               \addcontentsline{toc}{section}{Conclusion}      But when I tried to do the same with Subsubsection or Subsubsection* it didn't work:               \addcontentsline{toc}{subsubsection}{subsubsection label}      **Note:** that the Subsubsection are not numbered in a report class, and that's how I want them to be added to the TOC.


title: Emergency crash course on LaTeX

text: So, I wrote a document in LaTeX. Someone who doesn't know LaTeX and is a very busy person now has to edit it. Is there a crash course in LaTeX document? Aside from saying 'Ignore everything that starts with \'? Like a one page \textit means italic, % means a comment; you can ignore anything after this, type of thing? It is a really simple document, just straight text basically.


title: Aligning the right parts in multiple \begin{cases}

text: Is there an intelligent way to left-align the parts right of & of the two cases environments shown below (if x >= 0, otherwise, if y < 0, otherwise). I wonder if there is a better way than using manual spaces:               \begin{align*}      u(x) &=       \begin{cases}        0        & \text{if } x \geq 0 \\        1        & \text{otherwise}       \end{cases}       \\      \tau &=       \begin{cases}        a+b+c+d  & \text{if } y < 0 \\        1        & \text{otherwise}       \end{cases}     \end{align*}      ![alt text](http://i.stack.imgur.com/Ofp3T.png)


title: Top aligning text contents of two parboxes or minipages

text: I'd appreciate help top aligning the contents of `\parbox`es containing texts of different sizes as shown in the following graphic. Because one of the texts has a different size it appears to hover above the other: ![enter image description here](http://i.stack.imgur.com/zQbqw.png) Source (MWE):               \documentclass[english]{article}     \begin{document}          \mbox{\Huge \textsc{Text}}     \hfill     \parbox[t]{4.25cm}{     I am a fish          I am a fish          I am a fish          I am a fish     }          \end{document}


title: Why can I compile a tikzpicture perfectly in one chapter but not in another?

text: I am having trouble with including a tikz flow chart in my code. In my preamble I have included               \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{shapes,arrows}      and this is the flow chart:               \begin{figure}[hc]           \begin{tikzpicture}[node distance = 4cm, auto]     % Place nodes     \node [block] (Bio) {Biological Processes};     \node [block, below of=Bio] (Nut) {Nutrient Levels};         \node [block, left of=Nut] (Growth) {Growth/Mortality Rates};         \node [block, right of=Nut] (Predprey) {Predator-Prey Interactions};              \path [line] (Bio) -- node[name=uptake] {} (Nut);         \path [line] (Bio) -- node[name=grazing] {} (Growth);         \path [line] (Bio) -- node[name=pgrowth] {} (Predprey);          \end{tikzpicture}     \caption{\textbf{The biological processes governing the dynamics of plankton populations}}           \label{bioprocesses}         \end{figure}      I have another similar flow chart further down in my code, which is of a similar format               \begin{figure}[hc]           \begin{tikzpicture}[node distance = 3cm, auto]          \node [block] (Nitr) {Nitrates};     \node [block, below of=Nitr] (Phyto) {Phytoplankton};              \path [line] (Nitr) -- node[name=uptake] {nutrient uptake} (Phyto);          \node [block, below of=Phyto] (Zoo) {Zooplankton};              \path [line] (Phyto) -- node[name=grazing] {grazing} (Zoo);              \node [output, right of=Phyto] (Pgrowth) {};         \node [output, right of=Zoo] (Zgrowth) {};         \node [output, below of=Zoo] (Zdeath) {};              \path [line] (Phyto) -- node[name=pgrowth] {growth} (Pgrowth);         \path [line] (Zoo) -- node[name=zgrowth] {growth} (Zgrowth);         \path [line] (Zoo) -- node[name=zdeath] {death} (Zdeath);              \path[line] (Phyto) -- ([xshift=-1.75cm,yshift=0cm]Phyto.west) |- node[name=nutre] {nutrient recycling} (Nitr);               \end{tikzpicture}     \caption{\textbf{Population Interactions}}           \label{flowchart}         \end{figure}      The thing that I do not understand is WHY flow chart 1 can only be placed in the same chapter as flow chart 2 (it compiles perfectly here). Every time I try to place it elsewhere, it comes up with:               package pgfkeys error i don't know the key '/tikz/line'          package pgfkeys error i don't know the key '/tikz/block'      Surely if it compiles in one chapter then I should be able to copy and paste it into another and it should still work? EDIT: Minimal Example               \documentclass[10pt,a4paper]{article}          \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{shapes,arrows}               \begin{document}          \section{FIRST SECTION}          Here is my first section.          \begin{figure}[hc]           \begin{tikzpicture}[node distance = 4cm, auto]     \node [block] (main) {MAIN};     \node [block, below of=main] (Opt1) {Option 1};     \node [block, left of=Opt1] (Opt2) {Option 2};     \node [block, right of=Opt1] (Opt3) {Option 3};          \path [line] (main) -- node[name=line1] {} (Opt1);     \path [line] (main) -- node[name=line2] {} (Opt2);     \path [line] (main) -- node[name=line3] {} (Opt3);          \end{tikzpicture}     \caption{\textbf{First diagram}}           \label{diagram1}         \end{figure}          \section{SECOND SECTION}          Here is my second section.          \begin{figure}[hc]           \begin{tikzpicture}[node distance = 3cm, auto]          \node [block] (Top) {Top Box};     \node [block, below of=Top] (Middle) {Middle Box};     \node [block, below of=Middle] (Bottom) {Bottom Box};     \node [output, below of=Bottom] (output) {};          \path [line] (Top) -- node[name=down1] {line down} (Middle);     \path [line] (Middle) -- node[name=down2] {line down} (Bottom);     \path [line] (Bottom) -- node[name=down3] {line down} (output);          \end{tikzpicture}     \caption{\textbf{Second diagram}}           \end{figure}          \end{document}


title: Rescaling a math symbol?

text: I am trying to rescale a math symbol while using the `amsbook` package. At first I was using the `relsize` package, but it creates clashes with the AMS packages: Amsart with algorithm2e introduces extraneous text into pdf file with Texlive 2011. Then, I read here Change font size relative to current font size that the `amsbook` has a similar option. I looked it up, and there is the `\larger` command. But it doesn't work. I used:                 \newcommand{\Alpha}{\larger{\alpha}}      and the `\alpha` does not change in size. Any ideas how to rescale the `\alpha` so that it is relatively larger (I used to use `mathlarger` from `relsize` which worked fine, but created clashes with AMS packages, as I said)?


title: LaTeX/BibTeX: References / Bibliography

text: I have been working all day long without any result. I have a specific way my references and bibliography should look like, but I can't figure it out. That is why, I am writing here. I am using BibTeX. **References** If it is possible, I hope my references could look like this: 1 author: (Lastname 2010: 39) 2 authors: (Lastname & Lastname 2010: 39) 3 authors: (Lastname et al. 2010: 39) If I would like to make two references - I would like to combine these two with ";" - for instance: (Lastname 2010: 39; Lastname 2012: 59) **Bibliography** The bibliography for an article should look like this: 1 author: Lastname, A. (2010). Title of the article. _Journal_ , volume(number): page 2 authors: Lastname1, A. & A. Efternavn2 (2010). Title of the article. _Journal_ , volume(number): page 3 authors: Lastname1, A., A. Lastname2 & A. Lastname3 (2010). Title of the article. _Journal_ , volume(number): page For a book chapter: Lastname, A. (2010). Chapter title. I Lastname, A. (red.) Book title (page). Addresse: Publications place * * * I have tried the following two user package:               \userpackage{natbib}     \bibliographystyle{apalike}          \usepackage[apalike]{dk-bib}     \bibliographystyle{dk-apali}      My preamble look like this:               \documentclass[a4paper,12pt,oneside]{article}     \usepackage[english,danish]{babel} % Dansk sporg, f.eks. tabel, figur og kapitel     \usepackage{fixltx2e}      \usepackage{layout}     \renewcommand{\danishhyphenmins}{22}      %_ndring af overskrifter     \addto\captionsdanish{     \renewcommand\appendixname{Appendiks}     \renewcommand\contentsname{Indholdsfortegnelse}     \renewcommand\refname{Litteratur}     }     %     \usepackage[T1]{fontenc} % Hj_lper med orddeling     \usepackage{amsmath,amssymb,bm,mathtools}     \usepackage{lmodern}     \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \usepackage{float}     \usepackage[left=3.0cm,right=3.0cm,top=3.0cm,bottom=3.0cm]{geometry}     \usepackage{setspace}     \doublespacing     \usepackage{tocloft}     \renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}     %referencer%     \usepackage[apalike]{dk-bib}     \usepackage[isbn,issn,url]{dk-bib}     %referncer-slut%     \usepackage{hyperref}     \begin{document}


title: Does `\noexpand` have to be a primitive?

text: **Background:** I'm trying to deepen my understanding of TeX and how the intricacies work (spurred a little by this place, I should say, and hoping one day to not be a "Cargo Cult Programmer" - see When to use \edef, \noexpand, and \expandafter? both for my other attempts to deepen my knowledge and the - justified - accusation of being a CCP). My source is TeX-by-Topic, but I'm not good at reading from first to last and dip in and out so don't always understand things fully when I read them. I feel I'm beginning to get the idea of expansion, but still a few things elude me. To try to make an answerable question out of this, let me focus on `\noexpand`. According to TeX-by-Topic, this is expandable and sets the next token to temporarily be `\relax`. It's the "temporarily" that I'm finding hard to get my head around. If one wanted to emulate `\noexpand` as a _macro_ , then the best I could think of was:               \def\noexpand#1{\let\tempa#1%     \let#1\relax     #1%     \let#1\tempa}      but I suspect that this would cause problems in an "expand-until-no- expandables-left" context (such as following an `\if`). So, to make this a definite question: Can `\noexpand` be implemented as a macro, or is there some black magic that requires it to be a primitive? (The picture that I have in mind when I think of `\noexpand` is that TeX goes in to a ravenous eating mode wherein it chomps up a load of input in its mouth and grinds it up as much as possible before swallowing it, but `\noexpand` wraps its stuff in an unchewable coating. However, that coating is not immune to the stomach acids. Unfortunately, sometimes TeX (not being well brought up) does a little belch and some of what it ate comes back up to be reconsumed. At this point, the stuff previously protected by `\noexpand` has had its coating removed by the acids and is now chewable.)


title: How to extend the table when text longer then the size of a cell is inserted?

text: ![image of table](http://i.stack.imgur.com/UGYp7.png)                \documentclass{article}         \usepackage{tikz}         \usetikzlibrary{matrix}         \begin{document}              \tikzset{              table/.style={                 matrix of nodes,                 row sep=-\pgflinewidth,                 column sep=-\pgflinewidth,                 nodes={                     rectangle,                     draw=black,                     align=center                 },                 minimum height=1.5em,                 text depth=0.5ex,                 text height=2ex,                 nodes in empty cells,         %%                 every even row/.style={                     nodes={fill=gray!20}                 },                 column 1/.style={                     nodes={text width=2em,font=\bfseries}                 },                 row 1/.style={                     nodes={                         fill=black,                         text=white,                         font=\bfseries                     }                 }             }         }              \begin{tikzpicture}              \matrix (first) [table,text width=6em]         {         & Monday   & Tuesday & Wednesday & Thursday & Friday\\         1   & A & B & C & D & E \\         2   & F & G & H & J & K \\         3   & A & B & C & D & E \\         4   & F & G & H & J & K \\         };                   \end{tikzpicture}         \end{document}      What if I write to the first cell 'Monday is the first day of the day' instead of just monday? I want the cell to adapt vertically, increasing the height of the whole row, to accomodate the text How to do that?


title: Empty clause symbol

text: This is a very simple question. I was wondering if anybody might know of a way to generate the symbol for the empty clause in LaTeX (small, character-sized empty square). By ``empty clause" I am referring to the propositional / first- order logic symbol which denotes a clause that is unsatisfiable by default, and is the result of a refutation from a set of unsatisfiable clauses.


title: Problem in enabling back-referencing in classisthesis package

text: I am using `classicthesis` package version 4.1. In its manual it is written: > If you want to use backreferences from your citations to the pages they were > cited on, change the following line from: > > `\setboolean{enable-backrefs}{false} % true false` > > to > > `\setboolean{enable-backrefs}{true} % true false` Unfortunately, the compiler does not like setting `enable-backrefs` to `true` and complains by outputting the following error messages regarding the `.bbl` file:               Paragraph ended before \BR@@lbibitem was complete     Illegal parameter number in definition of \Hy@tempa You meant to type ## instead of #, right?      I am using the following versions for `hyperref` and `backref` packages:               hyperref.sty   2012/11/06 v6.83m Hypertext links for LaTeX     backref.sty    2012/07/25 v1.38 Bibliographical back referencing      Could someone help me fix this problem?


title: Pages interchanged; unwanted

text: Consider the following:               \documentclass[       danish,       dvipsnames     ]{article}          \usepackage{babel}     \usepackage[       hmargin=2.4cm,       vmargin=3cm     ]{geometry}     \usepackage{amsmath}     \usepackage{pst-solides3d}          \pagestyle{empty}          \begin{document}          \begin{figure}[htbp]      \centering       \begin{pspicture}[solidmemory](-2.9,-6.93)(2.9,10.43)        \psset{          lightsrc=viewpoint,          viewpoint=40 -10 0 rtp2xyz,          Decran=100,          object=tore,          r0=0.2,          action=none        }         \psSolid[r1=1,  ngrid=10 50,        RotY=90,        fillcolor=blue,  name=R1](0,0,3)         \psSolid[r1=0.9,ngrid=10 45,RotX=90,        RotZ=30,fillcolor=green, name=R2](0,0,1.5)         \psSolid[r1=0.8,ngrid=10 40,        RotY=90,        fillcolor=red,   name=R3](0,0,0.2)         \psSolid[r1=0.7,ngrid=10 35,RotX=90,        RotZ=30,fillcolor=yellow,name=R4](0,0,-0.9)         \psSolid[r1=0.6,ngrid=10 30,        RotY=90,        fillcolor=Purple,name=R5](0,0,-1.8)         \psSolid[           object=fusion,           base=R1 R2 R3 R4 R5,           linewidth=0.2pt,           linecolor=black!60,           action=draw**         ]       \end{pspicture}     \end{figure}     \newpage          \noindent Tredjekoordinaten~$z_{i}$ til centrum for torus nummer~$i$, regnet fra toppen, er givet ved     \begin{equation*}      z_{i} =       \begin{cases}         z_{1}                                                       & \text{for } i = 1,\\         z_{1} - r_{1} - 2r_{2} - \dotsb - 2r_{i-1} - r_{i} + 2(i - 1)r & \text{for } i > 1,       \end{cases}     \end{equation*}     hvor $r$ er den konstante radius af hvert "`torusr{\o}r"' og $r_{i}$ er radius af den $i$'te torus.          Bem{\ae}rk, at startv{\ae}rdien~$z_{1}$ skal \emph{v{\ae}lges}.          \end{document}      (Compile using XeLaTeX.) Why are the two pages interchanged and how do I fix this? P.S. Feel free to change/add tags.


title: bodegraph package just display grids but not curves

text: I'm using pdfLatex (with `\--shell-escape` option) and I had a problem of compilation with TexWorks that was successfully solved with the help of other post in this site: bodegraph on Ubuntu 10.04. After correcting that error the code compiles smoothly but just displays the logarithmic grids, not the function. The gnuplot files are created in the right place, but the graphic doesn't come out in the PDF. Code from Martin Scharrer’s asnwer:               \documentclass{article}          \usepackage{tikz}     \usepackage{bodegraph}          \begin{document}          \begin{tikzpicture}[         gnuplot def/.append style={prefix={}}, % Fixed the issue (prefix was 'gnuplot/\jobname/' before)     ]     \begin{scope}     \UnitedB     \semilog{-1}{2}{-50}{60}          \BodeAmp{-1:1.35}{\POAmpAsymp{4}{2.0}+\IntAmp{1}}          \end{scope}     \end{tikzpicture}     \end{document}      Any clues?


title: LaTeX figure problems

text: I want to include a `jpg` to a LaTeX document, which I have done many times. Normally, I use put it in a figure environment, the code looks like this:               \documentclass[twoside]{article}     \usepackage{graphicx}          \begin{figure}     \includegraphics{myfig.jpg}     \end{figure}      When I try compiling this the document compiles, but no figure shows up. If I do not wrap the `\includegraphics` in a figure environment then the pdf compiles with the image. I want the `figure` environment, because I want to add captions/labels. I can't figure out why this method does not work for this document, when it worked fine for other documents that I have made. The `jpg` is saved in the same directory as my `tex` file, so that is not the issue. Any ideas?


title: Difference of perp and bot

text: I saw in _math.stackexchange_ that someone uses `\perp` for what I always use `\bot`. In XeLaTeX: lost \perp in Cambria math? it says that they are two different symbols, do they just look the same? I guess the spacing is different like in `\Longleftrightarrow` and in `\iff`, which one should be used in math?


title: Dimension is too large error on changing my axis.

text: I successfully swapped my axis over earier and managed to get it scaled fine. I changed my mind and then changed it again so since then I've been spending hours trying to get this to work               \documentclass{standalone}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage{tikz}     \usepackage{siunitx}     \pgfplotsset{compat=1.7}          \begin{document}               \begin{tikzpicture}     \begin{axis}[    xticklabel={\pgfmathparse{(\tick)}\num[round-mode=places, round-precision=3]{\pgfmathresult}},     scaled y ticks=false,      xlabel={Resonant Magnetic Field [mT]}, ylabel={Residuals [MHz]}]     \addplot[mark size=0.5, only marks,           error bars/.cd,             y dir=both, y explicit,           ]        table [y error index=2]        {residuals_glycerin.txt};        \addplot[mark size = 0.5, only marks,color=black]         table [x index = 0, y index= 1]         {residuals_glycerin.txt};          \draw[ultra thin,gray] (axis cs:\pgfkeysvalueof{/pgfplots/xmin},0) -- (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0);           \end{axis}     \end{tikzpicture}               \end{document}      Can someone please tell me why I am getting this error and how to fix it? I have checked the examples and none of them helped.                   -0.00106 328.43799 0.00092     -0.00038 328.18900 0.00092     0.00113 327.92099 0.00092     0.00057 327.70099 0.00092     0.00194 327.43600 0.00092     0.00246 327.19101 0.00092     -0.00389 327.10599 0.00092     0.00005 326.54800 0.00092     -0.00162 326.82001 0.00092     -0.00003 326.54999 0.00092     0.00057 326.30301 0.00092     0.00027 326.07700 0.00092


title: How could I insert a \section tag inside a \multicolumn tag?

text: is it possible to define a `\section` inside a `\multicolumn` in a `xtab` table?. Example:               \documentclass{article}     \usepackage{xtab}          \begin{document}     \tableofcontents          \section{TestSectionA}          \begin{xtabular}{|lp{\textwidth}|}       \hline       & bla bla 1\\       \hline       & \section{TestSectionB}  \\       \hline       \multicolumn{2}{c}{\section{TestSectionC}}  \\       \hline       & bla bla 2\\       \hline     \end{xtabular}     \end{document}      LaTeX stops when detects this tag: `\section{TestSectionC}`. How could I workaround it?


title: Wrapfig bug when immediately followed by citation

text: I noticed that with `wrapfig`, if the first text is a citation or cross reference, `wrapfig` ignores the entire paragraph and the paragraph spools over the top of the image. Don't ask me to put a full MWE up, as I have deadlines and don't have the time now, but if someone knows what I am talking about, feel free to chip in. Basically something like this should reproduce.               \begin{wrapfigure}{r}{0.5\textwidth}     .... image code whatever     \end{wrapfigure}     \citet{key} published bla and bla and the topics discussed are bla and this is a paragraph bla bla bla.      However, this works fine:               \begin{wrapfigure}{r}{0.5\textwidth}     .... image code whatever     \end{wrapfigure}     The cat sat on the mat. \citet{key} published bla and bla and the topics discussed are bla and this is a paragraph bla bla bla.


title: Getting IPE LaTeX text labels working

text: IPE won't save my file as an `.eps` whenever I try to insert any text labels. Here's what I have inserted as the preamble:               \usepackage{graphicx}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{latexsym}     \usepackage{mathrsfs}      Whenever I try to save, I get the following error: `Something is wrong with the PDF file generated by Pdflatex. Please consult the stderr output to identify the problem.` Any ideas where I'm going wrong? I'm working on a mac if that's relevant.


title: Problem with keyword nomenclatureentry

text: I am trying to create a nomenclature in my LaTeX document. I run:               makeindex test.nlo -o test.gls      And the answer is: > This is makeindex, version 2.15 [TeX Live 2009] (kpathsea + Thai support). > Scanning input file test.nlo...done (0 entries accepted, 5 rejected). > Nothing written in test.gls. In the .log-file I get:               This is makeindex, version 2.15 [TeX Live 2009] (kpathsea + Thai support).     Scanning input file test.nlo...     !! Input index error (file = test.nlo, line = 1):        -- Unknown index keyword \nomenclatureentry.     !! Input index error (file = test.nlo, line = 2):        -- Unknown index keyword \nomenclatureentry.     !! Input index error (file = test.nlo, line = 3):        -- Unknown index keyword \nomenclatureentry.     !! Input index error (file = test.nlo, line = 4):        -- Unknown index keyword \nomenclatureentry.     !! Input index error (file = test.nlo, line = 5):        -- Unknown index keyword \nomenclatureentry.     done (0 entries accepted, 5 rejected).     Nothing written in test.gls.     Transcript written in test.ilg.      How can `\nomenclatureentry` be an unknown keyword? I tried to change the keyword manually to `glossaryentry` but I get the same result. Any help to solve this problem is very welcome!


title: Dropping article title from references without redefining bibstyle

text: In the bibliography, how can I drop the titles from the references? For every entry, I want only author names, journal name and year MWE:               \documentclass[xcolor=dvipsnames, 10pt]{beamer}     \usepackage[T1]{fontenc}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{amsmath,bm,mathtools}          \usepackage{natbib}     \usepackage{bibentry}     \bibliographystyle{apalike}          \newcommand\footcite[1]{\footnote{\bibentry{#1}}}\usepackage{graphicx}                    \setbeamertemplate{navigation symbols}{}     \definecolor{byublue}{RGB}{0 34 85}%added     \definecolor{mydarkgray}{RGB}{64 64 64}%added          \usecolortheme[named=MidnightBlue]{structure}%added     \usetheme{Montpellier}%Montpellier originally     \useoutertheme{tree}%added     \useinnertheme{circles}%added     \beamersetuncovermixins{\opaqueness<1>{25}}{\opaqueness<2->{15}}                         \usefonttheme{professionalfonts} % using non standard fonts for beamer     \usefonttheme{serif} % default family is serif               \begin{document}     \nobibliography{bibliography_phd_journal_key}          \section{Introduction}                \begin{frame}     \begin{center}     Some text \footcite{titanath2008p165326}     \end{center}     \end{frame}                               \end{document}


title: How can I centre merged columns with tabulary?

text: I'm trying to centre the content of the cells but I can't do it in merged cells. It's working properly in normal cells, but isn't working in merged cells. Does anyone knows how to fix it? Here is my code               \documentclass{article}          \usepackage{tabulary,booktabs}          \begin{document}          \begin{center}     \begin{tabulary}{\linewidth}{C|C|C|C|C|C|C|}          \toprule          \multicolumn{7}{>{\centering\arraybackslash}m{13cm}}{Lorem ipsum dolor sit amet} \\          \midrule     \midrule          \multicolumn{7}{>{\centering\arraybackslash}m{13cm}}{Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes} \\          \midrule          \multicolumn{7}{>{\centering\arraybackslash}m{13cm}}{Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus.} \\          \midrule          Vivamus Integer tincidunt  & elementum & semper & nisi & Aenean & vulputate & eleifend \\          \midrule          Donec & vitae & sapien & libero Integer tincidunt & venenatis & faucibus & libero \\          \bottomrule          \end{tabulary}     \end{center}          \end{document}


title: How to Get Bookmarks on the Left Pane?

text: I have seen several PDF documents which, when opened in adobe acrobat, gives bookmarks to every chapter, section and subsection in the left pane. Is there any easy way to generate such PDF files with LaTeX? I have an about 100 page document in `report` class. How do I modify the code to get bookmarks like that?


title: Document programming in Latex

text: I'm looking of document programming in LaTeX, but I have not found it; just tutorials for beginners. Can someone suggest me the best (French or English)? ok .. thank you for your answers. Then I searched courses to understand how to program in latex and spéciallement how to use commands, for example:               \newcommand \xxx {yyy}     \renewcommand \xxx {yyy}     \newcommand* \xxx [n][m] {yyy}     \renewcommand* \xxx [n][m] {yyy}     \newenvironment* \xxx [n][m] {yyy}{zzz}     \renewenvironment* \xxx [n][m] {yyy}{zzz}     \makeatletter ... \makeatother     .....     \rule[aaa]{bbb}{ccc}     \nointerlineskip     .....     \ifthenelse {test} {action si vrai} {action si faux}     \isodd {nombre}     \lengthtest {longueur a <=> longueur b}     \equal {chaîne a} {chaîne b}     \AND \OR \NOT \( \)     ...         \newboolean{nom} \setboolean{nom}{true/false} \boolean{nom}         \newif\if<nom> \<nom>true \<nom>false         \if<nom> texte si vrai \else texte si faux \fi     ...................      thank you ...


title: Auto-capitalizing first word in every list \item?

text: I'm working on a paper that deals with foreign words and a lot of diacritics. To help with this, I've created a series of macros, so that if I write \wufen it comes out as " _wǔfēn_ ". Usually this is mid-sentence, so that's fine. However in a few cases, I've got the following:               \begin{enumerate}         \item \wufen something something         \item Something \wufen something...     \end{enumerate}      Is there a way to force `\item`s to always capitalise the first letter? I want to see this as the result of the above: * * * • _Wǔfēn_ something something • Something _wǔfēn_ something... * * * Is this possible? I'm relatively new to LaTeX so apologies if this is a terrible question. I'm honestly not too clear on what I should be searching for, though past attempts haven't produced anything yet.


title: calligraphic forms for math/logic symbols

text: Is there a calligraphic form for $\exists$ and other logic quantifiers? I tried the approach in this answer but that only gives the usual font for this symbol.


title: Iterating over files in a directory and including them

text: I have a folder called `diary` which contains a series of files:   * `20120101.tex`   * `20120105.tex`   * `20120304.tex`   * etc. How can I create a single LaTeX document that includes each of these files, in alphabetical order? I'd like to do this within LaTeX, not using LuaTeX or shell operations (to make it portable). I found a near-solution here, but I can't get it to work properly for this situation.               \documentclass{book}     \usepackage{xifthen}          \begin{document}          % 20120101.tex included here     % 20120105.tex included here     % etc          \end{document}      The code from the near solution linked above for iterating over files that I am trying to modify is:               \foreach \Year in {\StartYear,...,\EndYear}     {   \foreach \Month in {Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec}         {   \foreach \Day in {1,...,31}             {   \IfFileExists{\Year/\Month/\Day}                     {   \newread\mysource                         \openin\mysource=\Year/\Month/\Day.tex                         \read\mysource to \firstline                         \closein\mysource                         \xdef\writetitle{1}                         \begin{loggentry}{\Year - \Month - \Day}{\firstline}                                 \xdef\writetitle{0}                             \input{\Year/\Month/\Day}                         \end{loggentry}              }             {   % files does not exist, so nothing to do             }                  }           }     }      Here is my failed modification that I want to not look in year/month subdirectories, but read the files as I have listed them above:               \foreach \Year in {\StartYear,...,\EndYear}     {   \foreach \Month in {01,02,03,04,05,06,07,08,09,10,11,12}         {   \foreach \Day in {01,...,31}         {   \IfFileExists{{Year}{Month}{Day}}                     {   \newread\mysource                     \openin\mysource={Year}{Month}{Day}.tex                         \read\mysource to \firstline                         \closein\mysource                         \xdef\writetitle{1}                         \begin{loggentry}{\Year - \Month - \Day}{\firstline}                                 \xdef\writetitle{0}                             \input{{YearMonth/\Day}                         \end{loggentry}              }             {   % files does not exist, so nothing to do             }                  }           }     }      The problem is in concatenating the variables to create the file name instead of subdirectories, which I can't figure out how to do (the above, obviously, doesn't work).


title: Change the vertical spacing between "References" heading and bibliographic entries

text: I am using BibTeX with the `amsart` class. Is there a way to decrease the vertical spacing between the "References" section heading and the bibliographic entries?


title: Where is TeXLive after i installed it via terminal ?

text: # What i want install LaTeX for Linux on Mint 14 OS # What i did download LaTex from http://www.tug.org/texlive/acquire-netinstall.html i installed this package: **install-tl.zip** successfully installed it via terminal # Problem Where is LaTeX on my laptop? i can't find it.


title: Disappearing Euro symbol in MATLAB EPS plots

text: I have a problem using eps images in LaTeX. Briefly, I have a plot from MATLAB were a label on an axis is "€". I insert this image in my tex file, then, when I compile, on the pdf the "€" disappear. Is it a problem of MATLAB images or EPS can't handle "€" symbol? Or maybe another reason?


title: How can I set the table counter?

text: I've got my little `examples` env with               \newlist{examples}{enumerate}{1}                               \setlist[examples]{label=(\arabic*), ref=\arabic*, resume}      How do I use the same counter for the `table` env?


title: Define a command so that it is only active within the document environment

text: I would like to configure a custom command so that it only affects the `document` environment. Because the command changes a number of catcodes, it has to be included after the `begin{document}` tag in order to work properly. However, I would prefer to set it up so that I can include it in its own `.sty` file. Is there some way to define a command so that it is only active within the `document` environment? * * * The type of code that I am trying to use is similar to the following:               \AtBeginDocument{         \catcode`\_=13  \def_#1_{\emph{#1}}     }      When I typeset the document with the `\AtBeginDocument` command, the console stops at the `\begin{document}` line and notes the following:               Missing control sequence inserted.     <inserted text>         \inaccessible      If I include the code (without the `\AtBeginDocument{}` rule) after the `\begin{document}` command, however, the document will process correctly.


title: a book recommendation for doing graphics in beamer

text: I am interested in drawing diagrams, trees, and other simple basic graphical items (all in beamer, as a matter of fact). Can someone recommend on a good book that would explain how to do that? (I am guessing the package of choice for doing this should be TikZ, so maybe I am looking for a good book about TikZ.) I _think_ I prefer to learn this "by example", but it does not have to be that kind of book.


title: How can I make a table that takes up more than a single page?

text: I've got data that I need to include in a table, but there's a lot if it. I've played with the font size and table formatting as much as I can, but the table still won't fit on the page. Is there anyway to make a table that spans multiple pages with LaTeX?


title: Table spanning multiple pages

text: > **Possible Duplicate:**   >  How can I make a table that takes up more than a single page? I want to make a table in LaTeX span multiple pages in a way that it retains the same column headings on the subsequent pages. How may I do so?


title: Table Out of Page

text: > **Possible Duplicate:**   >  In LaTeX, how can I make a table that takes up more than a single page? I have a big table which one page is not enough for. I would suppose that since LaTeX is WYSIWYM (What You See Is What You Mean), it should automatically divide the table into two parts in two pages, but that's not happening! Now:   1. Why doesn't it automatically do that?   2. Is there any way (probably a package) to automatically divide a table into two parts of it can't fit in a page?


title: Allow table to split across pages

text: > **Possible Duplicate:**   >  How can I make a table that takes up more than a single page? Is there a way to allow tabular environment to split across two pages? I build an environment which uses tabular, because I want to write something short in the left side, and explanations in the right side. Everything is fine until the table becomes big enough not to fit on the page it started, and then it jumps on the next page, leaving half a page blank before it. Is there a way to avoid this?


title: How to use \owedge and \boxwedge

text: We can use symbols of `$\otimes$ and $\boxtimes$, $\oplus$ and $\boxplus$, $\ominus$ and $\boxminus$ ` in Latex. However, do we have `$\owedge$` and `$\boxwedge$`, which combines `$\wedge$` in the mid of a `$O$` and a box? If yes how, if not, how could we define it? Thank you so much for the experts here!!! (I received great comments from many of you.)


title: How to install and use the ocr-a font

text: Can someone help to install the `ocr-a` font? I'm using fedora, I'm trying to find a proper tutorial but cannot find a good one.


title: How can I zoom to box of slide but this action happen like a movie?(very slowly)

text: > **Possible Duplicate:**   >  Zooming images out to specific locations in beamer I want to move to box but if it be suitable that happen like a movie and slowly. my slide as below:               \documentclass[mathserif]{beamer}     \usetheme{CambridgeUS}     \usecolortheme{beaver}%wolverine     \usepackage{time}            \usepackage[margin=15mm]{geometry}     \usepackage{tikz}     \begin{document}          \begin{frame}[t]{Lissajous in action}          \begin{center}     \pgfmathtruncatemacro{\tubelength}{10}  %in "double hexagon lengths"     \pgfmathtruncatemacro{\tubecirumferenceatoms}{12}      \pgfmathsetmacro{\tuberadius}{3}     \newcommand{\carboncolor}{red}     \newcommand{\bondcolor}{blue}     \pgfmathsetmacro{\initialrotationangle}{270}     \pgfmathsetmacro{\atombondlengthfraction}{0.2}     \newcommand{\bonddrawoptions}{thin}          \begin{tikzpicture}[x={(-0.2cm,-0.5cm)}, y={(1cm,0cm)}, z={(0cm,1cm)}, scale=0.3]     \foreach \x in {1,...,\tubelength}     { \pgfmathsetmacro{\bondlength}{2*3.14159265*\tuberadius/sqrt(3)/\tubecirumferenceatoms}         \pgfmathsetmacro{\atomradius}{\bondlength*\atombondlengthfraction}         \foreach \y in {1,...,\tubecirumferenceatoms}         {   \pgfmathsetmacro{\rotangle}{\y/\tubecirumferenceatoms*360}             \pgfmathsetmacro{\ycoord}{cos(\rotangle)*\tuberadius}             \pgfmathsetmacro{\zcoord}{sin(\rotangle)*\tuberadius}             \pgfmathtruncatemacro{\shadingcolor}{50*cos(\rotangle+\initialrotationangle)+50}             \draw[\bonddrawoptions,\bondcolor!\shadingcolor!gray] (\x*3*\bondlength+0.5*\bondlength,\ycoord,\zcoord) -- (\x*3*\bondlength+1.5*\bondlength,\ycoord,\zcoord);             \shade[ball color=\carboncolor!\shadingcolor] (\x*3*\bondlength+0.5*\bondlength,\ycoord,\zcoord) circle (\atomradius*1cm) ;         }              \foreach \y in {1,...,\tubecirumferenceatoms}         {             \pgfmathsetmacro{\ycoord}{cos(\y/\tubecirumferenceatoms*360)*\tuberadius}             \pgfmathsetmacro{\zcoord}{sin(\y/\tubecirumferenceatoms*360)*\tuberadius}             \pgfmathsetmacro{\rotangle}{\y/\tubecirumferenceatoms*360+360/2/\tubecirumferenceatoms}             \pgfmathsetmacro{\ycoordtwo}{cos(\rotangle)*\tuberadius}             \pgfmathsetmacro{\zcoordtwo}{sin(\rotangle)*\tuberadius}             \pgfmathsetmacro{\rotanglethree}{\y/\tubecirumferenceatoms*360-360/2/\tubecirumferenceatoms}             \pgfmathsetmacro{\ycoordthree}{cos(\rotanglethree)*\tuberadius}             \pgfmathsetmacro{\zcoordthree}{sin(\rotanglethree)*\tuberadius}             \pgfmathtruncatemacro{\shadingcolor}{50*cos(\rotangle+\initialrotationangle)+50}             \draw[\bonddrawoptions,\bondcolor!\shadingcolor!gray] (\x*3*\bondlength+1.5*\bondlength,\ycoord,\zcoord) -- (\x*3*\bondlength+2*\bondlength,\ycoordtwo,\zcoordtwo);             \draw[\bonddrawoptions,\bondcolor!\shadingcolor!gray] (\x*3*\bondlength+1.5*\bondlength,\ycoord,\zcoord) -- (\x*3*\bondlength+2*\bondlength,\ycoordthree,\zcoordthree);             \shade[ball color=\carboncolor!\shadingcolor] (\x*3*\bondlength+1.5*\bondlength,\ycoord,\zcoord) circle (\atomradius*1cm);         }              \foreach \y in {1,...,\tubecirumferenceatoms}         {   \pgfmathsetmacro{\rotangle}{\y/\tubecirumferenceatoms*360+360/2/\tubecirumferenceatoms}             \pgfmathsetmacro{\ycoord}{cos(\rotangle)*\tuberadius}             \pgfmathsetmacro{\zcoord}{sin(\rotangle)*\tuberadius}             \pgfmathtruncatemacro{\shadingcolor}{50*cos(\rotangle+\initialrotationangle)+50}             \draw[\bonddrawoptions,\bondcolor!\shadingcolor!gray] (\x*3*\bondlength+2*\bondlength,\ycoord,\zcoord) -- (\x*3*\bondlength+3*\bondlength,\ycoord,\zcoord);             \shade[ball color=\carboncolor!\shadingcolor] (\x*3*\bondlength+2*\bondlength,\ycoord,\zcoord) circle (\atomradius*1cm);         }              \foreach \y in {1,...,\tubecirumferenceatoms}         {   \pgfmathsetmacro{\ycoord}{cos(\y/\tubecirumferenceatoms*360)*\tuberadius}             \pgfmathsetmacro{\zcoord}{sin(\y/\tubecirumferenceatoms*360)*\tuberadius}             \pgfmathsetmacro{\rotangle}{\y/\tubecirumferenceatoms*360+360/2/\tubecirumferenceatoms}             \pgfmathsetmacro{\ycoordtwo}{cos(\rotangle)*\tuberadius}             \pgfmathsetmacro{\zcoordtwo}{sin(\rotangle)*\tuberadius}             \pgfmathsetmacro{\rotanglethree}{\y/\tubecirumferenceatoms*360-360/2/\tubecirumferenceatoms}             \pgfmathsetmacro{\ycoordthree}{cos(\rotanglethree)*\tuberadius}             \pgfmathsetmacro{\zcoordthree}{sin(\rotanglethree)*\tuberadius}             \pgfmathtruncatemacro{\shadingcolor}{50*cos(\rotangle+\initialrotationangle)+50}             \draw[\bonddrawoptions,\bondcolor!\shadingcolor!gray] (\x*3*\bondlength+3.5*\bondlength,\ycoord,\zcoord) -- (\x*3*\bondlength+3*\bondlength,\ycoordtwo,\zcoordtwo);             \draw[\bonddrawoptions,\bondcolor!\shadingcolor!gray] (\x*3*\bondlength+3.5*\bondlength,\ycoord,\zcoord) -- (\x*3*\bondlength+3*\bondlength,\ycoordthree,\zcoordthree);         }         \foreach \y in {1,...,\tubecirumferenceatoms}         { \pgfmathsetmacro{\rotangle}{\y/\tubecirumferenceatoms*360+360/2/\tubecirumferenceatoms}             \pgfmathsetmacro{\ycoordtwo}{cos(\rotangle)*\tuberadius}             \pgfmathsetmacro{\zcoordtwo}{sin(\rotangle)*\tuberadius}             \pgfmathtruncatemacro{\shadingcolor}{50*cos(\rotangle+\initialrotationangle)+50}             \shade[ball color=\carboncolor!\shadingcolor] (\x*3*\bondlength+3*\bondlength,\ycoordtwo,\zcoordtwo) circle (\atomradius*1cm);         }          }     \end{tikzpicture}     \end{center}     \framezoom< 1 >< 2 >[border](6.02 cm, 1.305 cm)(1 cm, 1 cm)     \end{frame}     \end{document}


title: cleveref fails to reference algorithms

text: In the following example document, both `\autoref` and plain `ref` will correctly link and number an algorithm reference, but `cleveref` fails that task. It will just insert question marks instead. In another, far more complex document I have, it does insert correct numbers but links them all to page 1. Since the documentation of `cleveref` sounds like it should support everything other referencing packages support and more, I'd have hoped this was supported, too.               \documentclass{article}     \usepackage[nameinlink,noabbrev]{cleveref}     \usepackage{hyperref}     \usepackage{algorithm}     \usepackage{algpseudocode}     \providecommand\algorithmname{algorithm}     \begin{document}     We want the real content on page two to better detect errors.     \newpage          \begin{algorithm}       \caption{Incrementation step}\label{alg:inc}       \begin{algorithmic}         \State $x\gets x+1$       \end{algorithmic}     \end{algorithm}     Comparing auto like \autoref{alg:inc},     clever like \cref{alg:inc} % this gives the error message     and manual like algorithm~\ref{alg:inc}.     \end{document}      Compiling the above I get               LaTeX Warning: Reference `alg:inc' on page 1 undefined on input line 18.      If I move the `algorithm` package before `cleveref`, I get an error instead of that warning:               (/usr/share/texmf-dist/tex/latex/cleveref/cleveref.sty     ! Undefined control sequence.     <argument> \ALG@beginalgorithmic           l.2843   }{}                 %  end of \@ifpackageloaded{algorithm}      But if I move the `algpseudocode` before `cleveref`, I'm back to the beginning. This is a Gentoo texlive 2012 installation, with the following packages involved:   * cleveref 2012/03/07 v0.18.5   * hyperref 2012/05/13 v6.82q   * algorithm 2009/08/24 v0.1   * algorithmicx 2005/04/27 v1.2


title: Automating order of citations within parenthesis

text: I'm using `chicago` style with `natbib` and am generally happy with the results. What I'm hoping for though is a way to automatically order the appearance of references within each parenthetical citation in some logical way, whether alphabetical or chronological. In other words, if I type `\citep{Smith2009,Smith2001,Jones2010,Jones1999}` I want the results to look like `(Jones,1999,2010;Smith,2001,2009)`. Other then entering the citations in the order I want in the `.tex` file itself, switching to something like `biblatex` or changing or editing the style I am using, is there a way to get the results I want?


title: Repeated division - Converting from base 10 to another base

text: I am teaching how to convert from one base to another base, however, I can't find a way to do something like this: ![enter image description here](http://i.stack.imgur.com/S6Vmu.png) I know little about Tikz, the only thing I have been able to produce is a simple square with a couple of lines over it, so I don't even know where to start. Any suggestions? I don't mind typing all the numbers, what I want to do is to automatize the process of creating the lines.


title: How to make a simple division diagram to a base b?

text: How can I typeset a simple diagram (dividend-quotient-remainder) in a base different to decimal? For example: `$120101_{3} \div 102_{3}$`


title: Using a macro inside the axis options for pgfplots

text: I want to create an macro to replace the string '{a,b,c}' in my code:               xticklabels={a,b,c}      so I set               \newcommand\inputnames{a,b,c}     xticklabels=\inputnames      but this gives me the same result as `xticklabels={{a,b,c}}`, which is different in my case. I suppose that it comes from an unwanted expansion of my macro but I can't find how to prevent it. The complete code is bellow:               \documentclass{standalone}     \usepackage{pgfplots}               \begin{document}          \newcommand{\inputnames}{a,b,c}          \begin{tikzpicture}     \begin{axis}[xtick={1,2,3},xticklabels=\inputnames]     \addplot coordinates {(1,-1)(2,-3)(3,-4)};     \end{axis}     \end{tikzpicture}          \begin{tikzpicture}     \begin{axis}[xtick={1,2,3},xticklabels={a,b,c}]     \addplot coordinates {(1,-1)(2,-3)(3,-4)};     \end{axis}     \end{tikzpicture}          \end{document}


title: How to place a line break between every character in ConTeXt?

text: I have some text appearing in a macro, like this:               \printascolumn{This is some text.}      How can I place a line break between each letter or printed symbol, such that it appears like this?               T     h     i     s          i     s          s     o     m     e          t     e     x     t     .


title: Biblatex in author-date changes the way footnotes appear in the footer

text: I am using `Biblatex-chicago` in `authordate` format. The problem is that it also changes the way footnotes appear in the footer. Instead of appearing as superscripts they appear as inline numbers. Here is a minimal working example.               \documentclass[11pt, a4paper]{report}                         \usepackage[authordate,natbib,backend=biber,useprefix=true]{biblatex-chicago}     \addbibresource{library.bib}          \title{Brief Article}     \author{The Author}          \begin{document}     \maketitle          Here is a footnote which looks fine in the text.\footnote{But here at the bottom of the page the number is in-line.}               \end{document}        Also I am typesetting in `LuaLaTex` but I don't think it makes a difference.


title: Inter-word spacing issue with long code tags

text: I'm having an issue with the Sphinx Documentation Generator, you may be asking what this has to do with LaTeX. Well, we were hoping to use it for our specification documentation which needs to be generated as a PDF. Sphinx generates PDF output by first converting `reStructuredText` to LaTeX, then LaTeX to PDF. In our documentation there exists some(okay, a lot) of very long class/interface/etc names such as               some.really.long.class.path.that.causes.our.spacing.to.be.atrocious      Often, these are referenced mid paragraph (and sometimes many in one paragraph) and can cause issues like pictured below: ![image](http://i.stack.imgur.com/024tb.png) And here is a sample of the LaTeX that is generated by sphinx that was used to create the above screenshot of the issue:               % Generated by Sphinx.     \def\sphinxdocclass{report}     \documentclass[letterpaper,10pt,english]{sphinxmanual}     \usepackage[utf8]{inputenc}     \DeclareUnicodeCharacter{00A0}{\nobreakspace}     \usepackage{cmap}     \usepackage[T1]{fontenc}     \usepackage{babel}     \usepackage{times}     \usepackage[Bjarne]{fncychap}     \usepackage{longtable}     \usepackage{sphinx}     \usepackage{multirow}               \title{spacingexample Documentation}     \date{April 01, 2013}     \release{1}     \author{me}     \newcommand{\sphinxlogo}{}     \renewcommand{\releasename}{Release}     \makeindex          \makeatletter     \def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%         \let\PYG@ul=\relax \let\PYG@tc=\relax%         \let\PYG@bc=\relax \let\PYG@ff=\relax}     \def\PYG@tok#1{\csname PYG@tok@#1\endcsname}     \def\PYG@toks#1+{\ifx\relax#1\empty\else%         \PYG@tok{#1}\expandafter\PYG@toks\fi}     \def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%         \PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}     \def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}          \expandafter\def\csname PYG@tok@gd\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}     \expandafter\def\csname PYG@tok@gu\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}     \expandafter\def\csname PYG@tok@gt\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.25,0.82}{##1}}}     \expandafter\def\csname PYG@tok@gs\endcsname{\let\PYG@bf=\textbf}     \expandafter\def\csname PYG@tok@gr\endcsname{\def\PYG@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}     \expandafter\def\csname PYG@tok@cm\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}     \expandafter\def\csname PYG@tok@vg\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}     \expandafter\def\csname PYG@tok@m\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}     \expandafter\def\csname PYG@tok@mh\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}     \expandafter\def\csname PYG@tok@cs\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}\def\PYG@bc##1{\setlength{\fboxsep}{0pt}\colorbox[rgb]{1.00,0.94,0.94}{\strut ##1}}}     \expandafter\def\csname PYG@tok@ge\endcsname{\let\PYG@it=\textit}     \expandafter\def\csname PYG@tok@vc\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}     \expandafter\def\csname PYG@tok@il\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}     \expandafter\def\csname PYG@tok@go\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.19,0.19,0.19}{##1}}}     \expandafter\def\csname PYG@tok@cp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@gi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}     \expandafter\def\csname PYG@tok@gh\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}     \expandafter\def\csname PYG@tok@ni\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.84,0.33,0.22}{##1}}}     \expandafter\def\csname PYG@tok@nl\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.13,0.44}{##1}}}     \expandafter\def\csname PYG@tok@nn\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.05,0.52,0.71}{##1}}}     \expandafter\def\csname PYG@tok@no\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.38,0.68,0.84}{##1}}}     \expandafter\def\csname PYG@tok@na\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}     \expandafter\def\csname PYG@tok@nb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@nc\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.05,0.52,0.71}{##1}}}     \expandafter\def\csname PYG@tok@nd\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.33,0.33,0.33}{##1}}}     \expandafter\def\csname PYG@tok@ne\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@nf\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.49}{##1}}}     \expandafter\def\csname PYG@tok@si\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.44,0.63,0.82}{##1}}}     \expandafter\def\csname PYG@tok@s2\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}     \expandafter\def\csname PYG@tok@vi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}     \expandafter\def\csname PYG@tok@nt\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.45}{##1}}}     \expandafter\def\csname PYG@tok@nv\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}     \expandafter\def\csname PYG@tok@s1\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}     \expandafter\def\csname PYG@tok@gp\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.78,0.36,0.04}{##1}}}     \expandafter\def\csname PYG@tok@sh\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}     \expandafter\def\csname PYG@tok@ow\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@sx\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.78,0.36,0.04}{##1}}}     \expandafter\def\csname PYG@tok@bp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@c1\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}     \expandafter\def\csname PYG@tok@kc\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@c\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}     \expandafter\def\csname PYG@tok@mf\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}     \expandafter\def\csname PYG@tok@err\endcsname{\def\PYG@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}     \expandafter\def\csname PYG@tok@kd\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@ss\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.32,0.47,0.09}{##1}}}     \expandafter\def\csname PYG@tok@sr\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.14,0.33,0.53}{##1}}}     \expandafter\def\csname PYG@tok@mo\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}     \expandafter\def\csname PYG@tok@mi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}     \expandafter\def\csname PYG@tok@kn\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@o\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}     \expandafter\def\csname PYG@tok@kr\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@s\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}     \expandafter\def\csname PYG@tok@kp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@w\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}     \expandafter\def\csname PYG@tok@kt\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.56,0.13,0.00}{##1}}}     \expandafter\def\csname PYG@tok@sc\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}     \expandafter\def\csname PYG@tok@sb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}     \expandafter\def\csname PYG@tok@k\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}     \expandafter\def\csname PYG@tok@se\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}     \expandafter\def\csname PYG@tok@sd\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}          \def\PYGZbs{\char`\\}     \def\PYGZus{\char`\_}     \def\PYGZob{\char`\{}     \def\PYGZcb{\char`\}}     \def\PYGZca{\char`\^}     \def\PYGZam{\char`\&}     \def\PYGZlt{\char`\<}     \def\PYGZgt{\char`\>}     \def\PYGZsh{\char`\#}     \def\PYGZpc{\char`\%}     \def\PYGZdl{\char`\$}     \def\PYGZti{\char`\~}     % for compatibility with earlier versions     \def\PYGZat{@}     \def\PYGZlb{[}     \def\PYGZrb{]}     \makeatother          \begin{document}          \maketitle     \tableofcontents     \phantomsection\label{index::doc}               Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tristique, leo in dictum fermentum, lorem sapien rhoncus tortor,      in fringilla sem magna in velit. Pellentesque bibendum ultricies ligula at bibendum. Proin gravida metus sit amet leo pretium fringilla      tincidunt orci sollicitudin. Quisque suscipit ligula id massa ultricies eu ultricies lacus imperdiet. Aenean sagittis pharetra neque,      sit amet aliquet turpis varius ut. Aliquam sed mauris sed risus volutpat bibendum. Praesent id luctus sapien. Class aptent taciti sociosqu      ad litora torquent per conubia nostra, per inceptos himenaeos. Ut id orci risus. Curabitur vel rhoncus sapien. Aliquam sollicitudin semper dictum.      In magna orci, tristique a suscipit ut, fringilla eget dolor. Pellentesque vel neque elit. Mauris in ipsum nibh.      \code{super.long.class.name.that.we.are.talking.about.that.ruins.our.interword.spacing} Nunc nec mauris elit, sit amet ullamcorper augue.       Sed ornare est vel nibh venenatis eu faucibus lorem mattis. Nam lorem nulla, aliquam a convallis vel, lacinia sit amet lorem. Donec vulputate       neque in enim aliquam quis ullamcorper nunc consequat. Nunc at ipsum accumsan metus vehicula porta. another. \code{super.long.class.name.that.we.are.talking.about.}       Vivamus blandit  \code{more.really.long.class.stuff.} orci ac felis aliquam pharetra sollicitudin felis tincidunt.      Pellentesque molestie varius dui vitae varius. Sed mauris dui, tristique in blandit tincidunt, iaculis sit amet augue. Curabitur ut tortor sapien,      a tristique ligula. Etiam porta auctor purus, pretium posuere dolor rutrum ut. Phasellus velit nisl, gravida id volutpat at, porta at orci.      Etiam dapibus augue sit amet ligula tristique accumsan. Vestibulum nibh elit, pharetra in aliquam ut, auctor id felis. Curabitur posuere euismod orci nec consectetur.       Curabitur vulputate, sem eu auctor scelerisque, neque metus aliquet neque, ultrices hendrerit lacus tellus et metus.          Contents:               \chapter{Indices and tables}     \label{index:welcome-to-spacingexample-s-documentation}\label{index:indices-and-tables}\begin{itemize}     \item {}      \emph{genindex}          \item {}      \emph{modindex}          \item {}      \emph{search}          \end{itemize}                    \renewcommand{\indexname}{Index}     \printindex     \end{document}      Now the reason I'm asking on this StackExchange instead of one related to `reStructuredText` is because I'm hoping there is some simple LaTeX solution. Sphinx supplies it's user with a LaTeX preamble variable that allows me to inject LaTeX into the beginning of the intermediate `.tex` file that is used to generate the PDF. So, does anyone have some sort of solution to my issue? I've seen suggestions where you can give LaTeX "hints" on where it is acceptable to insert hyphens into these really long code tags but there is no built in way for me to get Sphinx to be able to pass through that type of syntax that I know of. What I need is the class paths to be the teletype/monospaced font style, but have them look better than the default behavior in regards to the spacing between words. Is there some way to redefine the code tags to accomplish something like this?


title: Index of Notation for Thesis using AMS template

text: I would like to add a List of Notation at the end of my thesis - just before the Index - similar to this book: http://books.google.com.mt/books?id=h5bMkZTnowAC&pg=PA1055&source=gbs_selected_pages&cad=2#v=onepage&q&f=false Specifically I would like to collect symbols of particular topics such as topology, measure theory, function spaces, etc. together, with a short explanation and the page number of their first occurrence. I am using AMS-LaTeX v.2 and any help would be greatly appreciated. Thanks!