title: Box for multiple lines and automatic width

text: I feel this is rather a dumb question, but I could not find an answer. I'm looking for a `\parbox` without the `width` parameter, i.e. it should be determinded by its content. And the content is multiple lines. Something like:                      A     I like B , but who cares?            C2      An `\mbox` or `\makebox` doesn't allow for line breaks, it seems and a `\parbox` wants a `width` parameter. There must be some easy solution for what I want, no?


title: Several questions about migrating to XeLaTeX

text: I am using LaTeX for years now but I am considering to migrate to XeLaTeX. The main reason for this change is the `babel` package which change a lot the layout of my documents according to my language (French). For example, the itemize environment in LaTeX/Babel (in French) is completely different from the original (LaTeX/Babel/English). I prefer the original layout and I don't like the changes made by babel authors of the French option1. XeLaTeX (with Polyglossia and French language selected) does not change the layout (AFAIK). For example, here are two screenshots. At the left, there is the LaTeX/Babel/French way of itemize. At the right, there is the same text with XeLaTeX/polyglossia/French. For me, there are no doubts the second (right side) is better. ![LaTeX/babel/French](http://i.stack.imgur.com/OT6lg.png)![XeLaTeX](http://i.stack.imgur.com/S0D4I.png) **However** , I have several questions about XeLaTeX. I don't know it at all, so please excuse the naivety.   1. Is the default font in XeLaTeX the same than the one in LaTeX? In my screenshot the XeLaTeX font seems a little bit thicker. -> Related question : is it still usefull to call `lmodern` package with XeLaTeX?   2. Is the `csquotes` package still working with XeLaTeX?   3. For writing with XeLaTeX, I add these three packages calls after the document class : `fontspec`, `xunicode`, `polyglossia` (with the command `\setmainlanguage{french}`). Is it sufficient? Do I miss something?   4. With the three package mentioned in question 3, do I have correct ligature and hyphenation for French? I am also interested by documentations explaining how to migrate from LaTeX to XeLaTeX. * * * 1. I believe it is not the job of the language package to decide the layout of the document.


title: How to retrieve a value which is set later on in the document?

text: According to What is the recommended way to assign a value to a variable and retrieve it for later use?, in ConTeXt, one can use `\setvalue{name}{value}` to set a value and `\getvalue{name}`, to retrieve that value later. This seems to only work if `\setvalue` is used before `\getvalue` is needed. How can I retrieve a value early on in a document, when the value is set much later in the document?


title: Centering full-page Tikz image on page without margins with xelatex?

text: I'm trying to export some full-page SVG images via `inkscape2tikz`, and then trying to include these tikz-code images in a Latex document; but there seems to be a slight problem with `xelatex`. After checking   * How does TiKZ calculate positioning of picture on page?   * How to include PDF absolute positioned and scaled? ... I came up with the following MWE:               \documentclass[12pt,a5paper]{article}          \usepackage{tikz}          \begin{document}          \thispagestyle{empty}          \definecolor{cff0000}{RGB}{255,0,0}               \begin{tikzpicture}[overlay,remember picture,anchor=north west,inner sep=0pt, outer sep=0pt]          \node at (current page.north west) {%            \begin{tikzpicture}[overlay,remember picture,y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt,anchor=north west]              \begin{scope}[shift={(0,0.34461553)}]% layer1                % rect3016           \path[color=black,fill=cff0000,line width=0.800pt,rounded corners=0.0000cm]             (0.0000,-0.3446) rectangle (524.4094,743.7499);              \end{scope}            \end{tikzpicture}          };          \end{tikzpicture}          \end{document}      Now, if I build this with `pdflatex`:   * after first build, the rectangle is positioned wrong - but    * after second build, the rectangle is correctly positioned But, if I build with `xelatex`:   * after first build, the rectangle is positioned way out   * after second build, the rectangle is positioned differently, but still wrong.  Here is what `xelatex` produces after multiple runs (kinda hard to see here, but download the image to see the positioning of the red rectangle vs. the white background): ![xelatex rectangle fail](http://i.stack.imgur.com/iuEUp.png) Obviously, I'd like to have the red rectangle centered on page (or aligned at top left corner, doesn't matter) - so that the red rectangle takes up most of the page. Any ideas on how to do that? Many thanks in advance for any answers,   Cheers!


title: Add (n) working days to a specific date

text: My `g-brief` will contain something like "I have noted a deadline for your answer of ten working days until...". Is there a package or way to add `n` working-days (ie. mon-fri, let's not over complicate things with holidays etc ;) to todays date programmatically? I have found an approximate solution in the `datenum` and `advdate` packages:               \setdatetoday     \addtocounter{datenumber}{10}     \setdatebynumber{\thedatenumber}      But this "only"* adds the days, not taking into account if a day is a working day or a free day (ie. weekend). *In the humble _"I couldn't have done anything remotely like this myself (so I'm thankful for it), but it doesn't quite fit my need and possibly could be tweaked"_ -way.


title: How to insert a text between two cases in a multi valued function?

text: I want to do something similar to this but do not know how: ![Multi valued function](http://i.stack.imgur.com/qOPjS.jpg) I do know how to write multi-valued functions by using cases or align or whatever but do not know how to achieve a text that is to the right and in the MIDDLE between two cases. How can this be done?


title: Centering does not work within minipage

text: I cannot place my plot centered on the page. I tried the following code:               \begin{figure}[ht]     \begin{center}     \begin{minipage}{\columnwidth}     \includegraphics[width=5in]{plot1.pdf}     \end{minipage}     \begin{minipage}{\columnwidth}     \includegraphics[width=5in]{plot2.pdf}     \end{minipage}     \begin{minipage}{\columnwidth}     \includegraphics[width=5in]{plot3.pdf}     \end{minipage}     \caption{xxx}      \end{center}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/EyKCM.png) As one can recognize, the plot is not centered. Waht should I do to get it centered?


title: Placement of Chapter Number in Makechapterstyle

text: In this code, I'm not able to move the chapter number, only the title. The chapter number should be at the same height as the chapter title. What command can I use? The chapter title should not be moved.                \documentclass[11pt,a4paper]{memoir}           \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2cm,right=2cm]{geometry}                \usepackage[ngerman,english]{babel}   % select the language      \usepackage[utf8]{inputenc}           % input encoding      \usepackage{mathptmx}                 % font size extension      \usepackage{blindtext}                % blindtext      \usepackage{xcolor}                   % extended colors      \usepackage{calc}                     % \setlength minus ...                % --- fancy chapter style ---      \makechapterstyle{combined}{        \setlength{\midchapskip}{-4cm}        \setlength{\afterchapskip}{3cm}        \renewcommand*{\printchaptername}{}        \renewcommand*{\chapnumfont}{\normalfont\bfseries\fontsize{80}{80}\selectfont}        \renewcommand*{\printchapternum}{\flushright\chapnumfont\textcolor{gray}{\thechapter}}        \renewcommand*{\chaptitlefont}{\normalfont\fontsize{35}{35}\selectfont}        \renewcommand*{\printchaptertitle}[1]{%          \raggedright\chaptitlefont\parbox[t]{\textwidth -2cm}{\raggedright##1}}      }      \chapterstyle{combined}      % --- end of chapter style definition ---                \begin{document}      \chapter{First Chapter}      \blindtext[4]      \end{document}


title: Adjust margins for long table on a landscape page

text: My minimum working example:               \documentclass{article}          \usepackage{longtable}     \usepackage{lscape}     \usepackage{array}          \begin{document}          \begin{landscape}          \section{My First Section}          \begin{longtable}{|>{\raggedright}m{2in} |>{}m{3.5in} | >{}m{0.8in}| >{}m{0.3in} |>{}m{0.7in} |} \hline         \textbf{Author(s)} & \textbf{Title} & \textbf{Type} & \textbf{Year} & \textbf{Cited-by} \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline         F.M.~Cardullo, A.V.~Ercole, J.A.~Houck, L.C.~Kelly &         {A}lgorithm for {S}imulating {A}tmospheric {T}urbulence and {A}eroelastic {E}ffects on {S}imulator {M}otion {S}ystems &         techreport &         2012 &          0 \\ \hline     \end{longtable}          \end{landscape}          \end{document}      The result is: ![enter image description here](http://i.stack.imgur.com/3me9S.png) Now I would like to increase the margins, such that more rows will fit on the page. Normally I would use:               \begingroup     \setlength{\LTleft}{-20cm plus -1fill}     \setlength{\LTright}{\LTleft}     \begin{longtable}     ...     \end{longtable}     \endgroup      But with landscape orientation this does not give the desired result.


title: tcolorbox: lines after break?

text: Is there something equivalent to "lines before break" for the end part in tcolorbox? If there is I can't find it ;-) The following box should have at least 3 lines on the second page. As the code is created automatically any solution that involves manual break points (like `break at`) is not suitable.               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{tcolorbox,lipsum}     \tcbuselibrary{skins,breakable}     \begin{document}     \begin{tcolorbox}[enhanced,colback=lightgray!20!white,frame hidden,breakable]     a\\b\\c\\d\\e\\f\\g     \lipsum[1-4]     \end{tcolorbox}          \end{document}


title: Determinants inside matrix

text: I am typing in .tex a solution using Cramer method but I can't find a way to write those matrixes inside the main matrix. Is there an easy way to do that?


title: How to write index on the bottom of a word?

text: I want to write index on the bottom of a word               Word(min a element b)      I want to put "min a element b" exactly on the bottom of "Word", I don't know how suppose I do, I'd try Word$_{min a element b}$, but it isn't fulfill my intention. Any help appreciated


title: More efficient way to draw movement arrow to roof in tikz-qtree

text: When drawing syntactic representations in linguistics, one often uses a triangle to represent a unit whose internal structure is irrelevant. This can be accomplished with the `tikz-qtree` command `\edge[roof]; {John}`. Now, sometimes I need to show the movement of such a unit whose internal structure is irrelevant to the point at hand. To do this, I usually make use of the `positioning` library, and define a node relative to the node above the triangle, like so:               \documentclass{article}          \usepackage{tikz}     \usepackage{tikz-qtree}     \tikzset{every tree node/.style={align=center, anchor=north}}     \usetikzlibrary{positioning}          \begin{document}          \begin{tikzpicture}     \Tree     [.TP         [.\node(DP1-rel){DP}; \edge[roof]; {John} ]         [.T$'$             [.T ]             [.\emph{v}P                 [.\node(DP2-rel){DP}; \edge[roof]; {$<$John$>$} ]                 [.\emph{v}$'$                     [.\emph{v}                         [.V \node(V1){likes}; ]                         [.\emph{v} ]                     ]                     [.VP                         [.V \node(V2){$<$likes$>$}; ]                         [.DP \edge[roof]; {Mary} ]                     ]                 ]             ]         ]     ]     \node (DP1) [below=1cm of DP1-rel] {};     \node (DP2) [below=1cm of DP2-rel] {};     \draw[->] (DP2)..controls +(south west:1) and +(south:1)..(DP1);     \draw[->] (V2)..controls +(south:1) and +(south:1)..(V1);     \end{tikzpicture}          \end{document}      ![syntactic-tree](http://i.stack.imgur.com/noGmg.png) Is there an easier/better way to do this, where I don't have to define a relative node each time I need to move a unit whose internal structure is irrelevant ( _i.e._ , whose structure I'm representing with a triangle, using the `tikz-qtree` command `\edge[roof]; {John}`)?


title: Exam documentclass question title grading table

text: How can I give my question a name and a the same time show in the grading table only its number? For example, in the main text I'd like the question to be something like "Question 1: Cauchy-Schwartz Inequality.................(10 points)" but the grading table should just refer to it as "1". The only way I could label my question was \titledquestion, but this necessarily influences the grading table. Thanks!


title: How to plot a region under $y=\sin(x)$ in TikZ

text: I would like to plot the _shaded_ region between `$y=\sin(x)$` and `$y=0$` over `$x \in [0, \pi]$` using TikZ and/or possible other packages which I don't know yet. Can you give some examples? Specifically: how to do the computation of the special function `$\sin$`? how to specify the region in TikZ? how to shade the region? Thanks and regards!


title: Custom-positioned page number appears in arabic-indic numerals

text: I am using LaTeX (TeXmaker) to give format to an article in arabic and spanish (with some special characters to represent a transliteration of arabic text). I used this solution to locate my page number in the place that I needed (both header and footer will be used for other information). As I began to introduce the text (alternating between arabic and spanish) the page number sometimes is shown in arabic-western numerals and sometimes in arabic-indic numerals, but I would like them to show always in arabic-western numerals. Sometimes using \newpage solves the problem, but sometimes it does not, so I need a permanent solution. I left some packages I use in the preamble of the NWE, but I'm not sure if they're part of the problem or not. NWE:               \documentclass[11pt]{article}          \usepackage[spanish,mexico]{babel} %Spanish          \usepackage{arabtex} %Arabic          \usepackage{utf8} %Arabic     \usepackage[utf8]{inputenc} %Spanish          % Page number     \usepackage{eso-pic}     \AddToShipoutPicture{%       \AtPageUpperLeft{%         \setlength\unitlength{0.43in}%         \hspace*{\dimexpr\paperwidth-1.4in\relax}%         \makebox(1,-3)[rt]{\thepage}%     }}          % Helvetica     \usepackage[scaled]{helvet}     \renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif     \usepackage[T1]{fontenc}          \usepackage{textcomp} % Transliteration     \usepackage{semtrans} % Transliteration          \begin{document}     \setarab           \setcode{utf8}     \begin{arabtext}      وقول الله تعالى: `الْيَوْمَ أَكْمَلْتُ لَكُمْ دِينَكُمْ وَأَتْمَمْتُ عَلَيْكُمْ نِعْمَتِي وَرَضِيتُ لَكُمُ لْأِسْلامَ      ادِيناً.' (المائدة: من الآية3)     \\وقوله تعالى: `قُلْ يَا أَيُّهَا النَّاسُ إِنْ كُنْتُمْ فِي شَكٍّ مِنْ دِينِي فَلا أَعْبُدُ الَّذِينَ تَعْبُدُونَ مِنْ      دُونِ اللَّهِ وَلَكِنْ أَعْبُدُ اللَّهَ الَّذِي يَتَوَفَّاكُمْ.' (يونس: من الآية140)     \\وقوله تعالى: `يَا أَيُّهَا الَّذِينَ آمَنُوا اتَّقُوا اللَّهَ وَآمِنُوا بِرَسُولِهِ يُؤْتِكُمْ كِفْلَيْنِ مِنْ رَحْمَتِهِ      وَيَجْعَلْ لَكُمْ نُوراً تَمْشُونَ بِهِ وَيَغْفِرْ لَكُمْ وَاللَّهُ غَفُورٌ رَحِيمٌ.' (الحديد: 28)     \end{arabtext}       \bigskip          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat ut neque semper mattis. Aliquam rutrum sem sit amet purus imperdiet lacinia. Cras aliquet lorem nisl, sit amet varius turpis consectetur id. Nulla scelerisque nulla in cursus mattis. Quisque dignissim turpis ut nunc rhoncus, quis elementum arcu interdum. Phasellus ut justo congue neque sagittis ultricies vel ac lacus. In hac habitasse platea dictumst. In vitae metus quis nibh dictum hendrerit ullamcorper sit amet sapien. Etiam tempor dui quis sapien tristique, a vulputate urna tristique. Nunc malesuada, ligula a tristique ullamcorper, quam ante bibendum mi, in ullamcorper felis ligula at ipsum. In hac habitasse platea dictumst. Aliquam erat volutpat. Donec eu eleifend nulla. Fusce est velit, dapibus quis augue hendrerit, pulvinar posuere arcu. Donec diam purus, varius nec tempus at, faucibus sed mauris.     \bigskip     \setcode{utf8}     \begin{arabtext}      وقول الله تعالى: `الْيَوْمَ أَكْمَلْتُ لَكُمْ دِينَكُمْ وَأَتْمَمْتُ عَلَيْكُمْ نِعْمَتِي وَرَضِيتُ لَكُمُ لْأِسْلامَ      ادِيناً.' (المائدة: من الآية3)     \\وقوله تعالى: `قُلْ يَا أَيُّهَا النَّاسُ إِنْ كُنْتُمْ فِي شَكٍّ مِنْ دِينِي فَلا أَعْبُدُ الَّذِينَ تَعْبُدُونَ مِنْ      دُونِ اللَّهِ وَلَكِنْ أَعْبُدُ اللَّهَ الَّذِي يَتَوَفَّاكُمْ.' (يونس: من الآية140)     \\وقوله تعالى: `يَا أَيُّهَا الَّذِينَ آمَنُوا اتَّقُوا اللَّهَ وَآمِنُوا بِرَسُولِهِ يُؤْتِكُمْ كِفْلَيْنِ مِنْ رَحْمَتِهِ      وَيَجْعَلْ لَكُمْ نُوراً تَمْشُونَ بِهِ وَيَغْفِرْ لَكُمْ وَاللَّهُ غَفُورٌ رَحِيمٌ.' (الحديد: 28)     \end{arabtext}       \bigskip          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat ut neque semper mattis. Aliquam rutrum sem sit amet purus imperdiet lacinia. Cras aliquet lorem nisl, sit amet varius turpis consectetur id. Nulla scelerisque nulla in cursus mattis. Quisque dignissim turpis ut nunc rhoncus, quis elementum arcu interdum. Phasellus ut justo congue neque sagittis ultricies vel ac lacus. In hac habitasse platea dictumst. In vitae metus quis nibh dictum hendrerit ullamcorper sit amet sapien. Etiam tempor dui quis sapien tristique, a vulputate urna tristique. Nunc malesuada, ligula a tristique ullamcorper, quam ante bibendum mi, in ullamcorper felis ligula at ipsum. In hac habitasse platea dictumst. Aliquam erat volutpat. Donec eu eleifend nulla. Fusce est velit, dapibus quis augue hendrerit, pulvinar posuere arcu. Donec diam purus, varius nec tempus at, faucibus sed mauris.     \bigskip     \setcode{utf8}     \begin{arabtext}      وقول الله تعالى: `الْيَوْمَ أَكْمَلْتُ لَكُمْ دِينَكُمْ وَأَتْمَمْتُ عَلَيْكُمْ نِعْمَتِي وَرَضِيتُ لَكُمُ لْأِسْلامَ      ادِيناً.' (المائدة: من الآية3)     \\وقوله تعالى: `قُلْ يَا أَيُّهَا النَّاسُ إِنْ كُنْتُمْ فِي شَكٍّ مِنْ دِينِي فَلا أَعْبُدُ الَّذِينَ تَعْبُدُونَ مِنْ      دُونِ اللَّهِ وَلَكِنْ أَعْبُدُ اللَّهَ الَّذِي يَتَوَفَّاكُمْ.' (يونس: من الآية140)     \\وقوله تعالى: `يَا أَيُّهَا الَّذِينَ آمَنُوا اتَّقُوا اللَّهَ وَآمِنُوا بِرَسُولِهِ يُؤْتِكُمْ كِفْلَيْنِ مِنْ رَحْمَتِهِ      وَيَجْعَلْ لَكُمْ نُوراً تَمْشُونَ بِهِ وَيَغْفِرْ لَكُمْ وَاللَّهُ غَفُورٌ رَحِيمٌ.' (الحديد: 28)     \end{arabtext}       \bigskip          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat ut neque semper mattis. Aliquam rutrum sem sit amet purus imperdiet lacinia. Cras aliquet lorem nisl, sit amet varius turpis consectetur id. Nulla scelerisque nulla in cursus mattis. Quisque dignissim turpis ut nunc rhoncus, quis elementum arcu interdum. Phasellus ut justo congue neque sagittis ultricies vel ac lacus. In hac habitasse platea dictumst. In vitae metus quis nibh dictum hendrerit ullamcorper sit amet sapien. Etiam tempor dui quis sapien tristique, a vulputate urna tristique. Nunc malesuada, ligula a tristique ullamcorper, quam ante bibendum mi, in ullamcorper felis ligula at ipsum. In hac habitasse platea dictumst. Aliquam erat volutpat. Donec eu eleifend nulla. Fusce est velit, dapibus quis augue hendrerit, pulvinar posuere arcu. Donec diam purus, varius nec tempus at, faucibus sed mauris.     \bigskip     \setcode{utf8}     \begin{arabtext}      وقول الله تعالى: `الْيَوْمَ أَكْمَلْتُ لَكُمْ دِينَكُمْ وَأَتْمَمْتُ عَلَيْكُمْ نِعْمَتِي وَرَضِيتُ لَكُمُ لْأِسْلامَ      ادِيناً.' (المائدة: من الآية3)     \\وقوله تعالى: `قُلْ يَا أَيُّهَا النَّاسُ إِنْ كُنْتُمْ فِي شَكٍّ مِنْ دِينِي فَلا أَعْبُدُ الَّذِينَ تَعْبُدُونَ مِنْ      دُونِ اللَّهِ وَلَكِنْ أَعْبُدُ اللَّهَ الَّذِي يَتَوَفَّاكُمْ.' (يونس: من الآية140)     \\وقوله تعالى: `يَا أَيُّهَا الَّذِينَ آمَنُوا اتَّقُوا اللَّهَ وَآمِنُوا بِرَسُولِهِ يُؤْتِكُمْ كِفْلَيْنِ مِنْ رَحْمَتِهِ      وَيَجْعَلْ لَكُمْ نُوراً تَمْشُونَ بِهِ وَيَغْفِرْ لَكُمْ وَاللَّهُ غَفُورٌ رَحِيمٌ.' (الحديد: 28)     \end{arabtext}       \bigskip          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat ut neque semper mattis. Aliquam rutrum sem sit amet purus imperdiet lacinia. Cras aliquet lorem nisl, sit amet varius turpis consectetur id. Nulla scelerisque nulla in cursus mattis. Quisque dignissim turpis ut nunc rhoncus, quis elementum arcu interdum. Phasellus ut justo congue neque sagittis ultricies vel ac lacus. In hac habitasse platea dictumst. In vitae metus quis nibh dictum hendrerit ullamcorper sit amet sapien. Etiam tempor dui quis sapien tristique, a vulputate urna tristique. Nunc malesuada, ligula a tristique ullamcorper, quam ante bibendum mi, in ullamcorper felis ligula at ipsum. In hac habitasse platea dictumst. Aliquam erat volutpat. Donec eu eleifend nulla. Fusce est velit, dapibus quis augue hendrerit, pulvinar posuere arcu. Donec diam purus, varius nec tempus at, faucibus sed mauris.     \bigskip     \setcode{utf8}     \begin{arabtext}      وقول الله تعالى: `الْيَوْمَ أَكْمَلْتُ لَكُمْ دِينَكُمْ وَأَتْمَمْتُ عَلَيْكُمْ نِعْمَتِي وَرَضِيتُ لَكُمُ لْأِسْلامَ      ادِيناً.' (المائدة: من الآية3)     \\وقوله تعالى: `قُلْ يَا أَيُّهَا النَّاسُ إِنْ كُنْتُمْ فِي شَكٍّ مِنْ دِينِي فَلا أَعْبُدُ الَّذِينَ تَعْبُدُونَ مِنْ      دُونِ اللَّهِ وَلَكِنْ أَعْبُدُ اللَّهَ الَّذِي يَتَوَفَّاكُمْ.' (يونس: من الآية140)     \\وقوله تعالى: `يَا أَيُّهَا الَّذِينَ آمَنُوا اتَّقُوا اللَّهَ وَآمِنُوا بِرَسُولِهِ يُؤْتِكُمْ كِفْلَيْنِ مِنْ رَحْمَتِهِ      وَيَجْعَلْ لَكُمْ نُوراً تَمْشُونَ بِهِ وَيَغْفِرْ لَكُمْ وَاللَّهُ غَفُورٌ رَحِيمٌ.' (الحديد: 28)     \end{arabtext}       \bigskip          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat ut neque semper mattis. Aliquam rutrum sem sit amet purus imperdiet lacinia. Cras aliquet lorem nisl, sit amet varius turpis consectetur id. Nulla scelerisque nulla in cursus mattis. Quisque dignissim turpis ut nunc rhoncus, quis elementum arcu interdum. Phasellus ut justo congue neque sagittis ultricies vel ac lacus. In hac habitasse platea dictumst. In vitae metus quis nibh dictum hendrerit ullamcorper sit amet sapien. Etiam tempor dui quis sapien tristique, a vulputate urna tristique. Nunc malesuada, ligula a tristique ullamcorper, quam ante bibendum mi, in ullamcorper felis ligula at ipsum. In hac habitasse platea dictumst. Aliquam erat volutpat. Donec eu eleifend nulla. Fusce est velit, dapibus quis augue hendrerit, pulvinar posuere arcu. Donec diam purus, varius nec tempus at, faucibus sed mauris.     \end{document}      Output: ![Output1](http://i.stack.imgur.com/nIba8.png) ![Output2](http://i.stack.imgur.com/2KVeU.png) ![Output3](http://i.stack.imgur.com/K8xie.png) Lists of files (don't know if necessary, but the "how to ask" seems to recommend it?) ![file list1](http://i.stack.imgur.com/U6l4K.png) ![file list2](http://i.stack.imgur.com/2ysyG.png) * * * **Edit1: More details.** I don't use the fancyhdr for the page number because there is other information placed there. To avoid overcrowding my header I want to put the page-number at the left of the main body of the text. This is how a final page in my article looks like (I used package showframe to show you the layout I need): ![final look](http://i.stack.imgur.com/gM0sD.png) So I need to preserve _this_ page-number position.


title: a/an substitution in LaTeX

text: I was wondering if there is a conditional command that I can use in LaTeX (e.g., `\ifthenelse`) that would allow me to, in one case, use the word 'a' and in another use the word 'an' based on the whether or not the following word starts with a vowel.


title: chaptertitle in place of section mark in header

text: I am looking to make a page that has in the header > chapter chapter num -------------------------chaptertitle for both odd and even pages. Any pointers? Can someone explain how a sectionmark gets displayed in the header? And how to change the rightmark? thank you


title: Small indentation after labelled subequations

text: I am trying to reference a set of equations that are placed within a `alignat` and `subequations` environments. I would like to reference them as `Eq. 1` together, rather than `Eqs. 1a and 1b` separately. The MWE below does exactly this, yet leaves a small indentation in the paragraph just below the equations. Is there a way to circumvent this or use a different environment?               \documentclass{article}      \usepackage{mathtools}      \usepackage{lipsum}      \begin{document}       \lipsum[1]       \begin{subequations}        \begin{alignat}{1}         \dot{\mathbf{u}}_{i} &= \frac{\mathbf{u}_{i+1} - \mathbf{u}_{i-1}}{2\Delta t} + \mathcal{O}(\Delta t^2) \\         \ddot{\mathbf{u}}_{i} &= \frac{\mathbf{u}_{i+1} - 2\mathbf{u}_{i} + \mathbf{u}_{i-1}}{\Delta t^2} + \mathcal{O}(\Delta t^2)        \end{alignat}        \label{eq}       \end{subequations}       \lipsum[2]            I'm referencing the equation here: \ref{eq}      \end{document}


title: Changing the pdf page size for Springer LaTeX Template

text: I am using the Springer template `svmono` to write my professor's geometry textbook. After compiling in Texmaker, I received a pdf file with page size 21.587cm x 28cm. I want to change it into 16cm x 24cm, so what and how can I do?


title: Lilypond-book seems to skip included files

text: I am experimenting with using Lilypond from windows. It seems lilypond-book skips sub-files. I created a minimum working/not-working example in main.lytex, which I'm processing with a CMD-file (see below). The first two versions (lilypond-environment and lilypondfile) work, while the third one (included in sub-file) doesn't: ![enter image description here](http://i.stack.imgur.com/GCU8G.png) **Any ideas, why it won't work?**   Should I perhaps put all subfiles into a subdirectory and tell lilypond-book to process all files in this directory? (How?)   Did I miss to tell lilypond-book to include a specific directory? **Notes:**   * on Linux it works (using `\input` instead of `\include`)   * on OS it works (using `\input` instead of `\include`)    _main.lytex_ :               \documentclass{article}     \begin{document}          \section{Lilypond directly}     \begin{lilypond}         \relative c'         {           c4 d e f | g1         }     \end{lilypond}          \section{Lilypond via include}     \lilypondfile{sheet.ly}          \section{Lilypond included from subfile}     \include{sub}          \end{document}         _sub.tex:_               \lilypondfile{sheet.ly}         _sheet.ly:_               \version "2.16.2"          \score {       <<         \relative c'         {           c4 d e f | g1         }       >>     }         _my CMD-file:_               set "outputdir=out"     set "includedir=inc"     set "maindir=%CD%"     set "mainfile=main"     set "TEXINPUTS=%TEXINPUTS%;%CD%"          set "lytexfile=%mainfile%.lytex"     set "latexfile=%mainfile%.tex"     set "pdffile=%mainfile%.pdf"          lilypond-book --pdf --output=%outputdir% --loglevel=ERROR %lytexfile%           cd %outputdir%     pdflatex --interaction=nonstopmode --include-directory=%maindir% %latexfile%          cp %pdffile% ../%pdffile%     cd ..         _output on command line:_               D:\path_to_working_dir>createPDF.cmd     This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)     entering extended mode     (D:\path_to_working_dir\out\main.tex     LaTeX2e      Babel  and hyphenation patterns for english, afrikaans, ancientgreek, arabic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, galician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, icelandic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, latvian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usenglishmax, welsh, loaded.     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo"))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty")))     (D:\path_to_working_dir\out\main.aux)     (C:\Users\hardmooth\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ) (D:\path_to_working_dir\out\87/lily-da14f453-systems.tex          )     (D:\path_to_working_dir\out\05/lily-f1bfdfe8-systems.tex          ) [1{C:/Users/hardmooth/AppData/Local/MiKTeX/2.9/pd     ftex/config/pdftex.map}  ] (D:\path_to_working_dir\out\sub.tex     (D:\path_to_working_dir\out\46/lily-dc205d25-systems.tex          ! LaTeX Error: File `46/lily-dc205d25-1' not found.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H   for immediate help.      ...          l.1 \includegraphics{46/lily-dc205d25-1}                                             %     )) [2] (D:\path_to_working_dir\out\main.aux     (D:\path_to_working_dir\out\sub.aux)) )     (see the transcript file for additional information)     Output written on main.pdf (2 pages, 37499 bytes).     Transcript written on main.log.


title: Naming 3D axes in pgfplots

text: I want to label the axes in a 3D plot with `pgfplots`. Using the anchors `.right of origin` and `.above origin`, I can label the axes as "x" and "y" in 2D with ease. In 3D, the labels must be tweaked to appear in the correct place, and I have no simple way of labeling the x-axis. Is there an anchor that directly relates to these positions? The MWE below shows what I've produced so far.               \begin{tikzpicture}     \begin{axis}%     [width=175pt,tick label style={font=\scriptsize},axis on top,     axis lines=center,     y dir=reverse,     name=myplot,     ymin=-1.1,ymax=1.1,     xmin=-1.1,xmax=1.1,     zmin=-1.1, zmax=1.1     ]     \end{axis}     \node [right] at (myplot.right of origin)[shift={(-20pt,-8pt)}] {\scriptsize $y$};     \node [above] at (myplot.above origin) [shift={(0,-20pt)}] {\scriptsize $z$};     \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/djQca.png)


title: Typesetting listofalgorithms like listoffigures and listoftables using titletoc

text: I would like to typeset the `\listofalgorithms` generated by package `algorithm` in the same way than the `\listoffigures` and `\listoftables`, using package `titletoc`. However, I have not been able to find a solution to that problem. Here is a MWE:               \documentclass[12pt,a4paper]{book}          \usepackage{titletoc}     \usepackage[chapter]{algorithm}     \usepackage{algpseudocode}          \renewcommand{\cleardoublepage}{\clearpage}          \titlecontents{figure}[2.0em]{}{\contentslabel{2.3em}}{}{\titlerule*[0.25pc]{.}\contentspage}{}     \titlecontents{table}[2.0em]{}{\contentslabel{2.3em}}{}{\titlerule*[0.25pc]{.}\contentspage}{}     \contentsuse{algorithm}{loa}     \titlecontents{algorithm}[2.0em]{}{\contentslabel{2.3em}}{}{\titlerule*[0.25pc]{.}\contentspage}{}          \begin{document}          \listoffigures     \listoftables     \listofalgorithms          \chapter{Nice chapter}          \begin{figure}[t]         \caption{Nice figure}     \end{figure}          \begin{table}[t]         \caption{Nice table}     \end{table}          \begin{algorithm}[t]         \caption{Nice algorithm}     \end{algorithm}          \end{document}      Can someone think of a way to do it ?


title: Custom table of contents numbering

text: Two questions about customization of ToCs:   1. My document is numbered the following way: "section"-"page number inside this section". How can I get this numbering style in the ToC?   2. How to not show the page number of a certain entry in the ToC, more specifically, the bibliography (I'm not sure if it is a special case)? MWE:               \documentclass[12pt]{article}          \usepackage[numbib,notlof,notlot,nottoc]{tocbibind}     \usepackage{fancyhdr}     \usepackage[top=1in, bottom=1.3in, left=1in, right=1in]{geometry}          \begin{document}          \pagestyle{fancy}     \fancyfoot{}     \fancyfoot[C]{\footnotesize\thepage}          \pagenumbering{roman}     \renewcommand\contentsname{Table of Contents}     \tableofcontents     \listoffigures     \listoftables     \pagebreak          \begin{abstract}     Something...     \end{abstract}          \pagebreak     \fancyfoot[C]{\footnotesize \thesection-\thepage}     \setcounter{page}{1}     \pagenumbering{arabic}     \let\OldSection\section     \renewcommand{\section}[1]{\clearpage\pagenumbering{arabic}\OldSection{#1}\setcounter{subsection}{-1}}          \section{A section}     \subsection{A subsection}     \section{Another section}          \end{document}


title: Place a table on a new landscape page in a two column paper

text: Very related to this question and some of the comments therein, I need to insert a landscape page for a wide table, in a two column document. As suggested there, I have tried to use               \afterpage{%     \clearpage      so that the floats were supposed to be flushed in a proper way, but this is not the case. The document still show wrong disposal of the floats and/or blank parts. I don't know exactly what information I should add here, but I hope this gives the general sense.


title: Who can help me to create a *.bbx file?

text: I was trying to find a suitable bbx style, but found none. So I decided to make my own. Then I realized that all the `\DeclareBibliographyDriver`, `\usebibmacro` and so on is too complicated for me, I simply don’t understand it, even not while reading the manuals. So the only thing I can do is to try and then see how it looks like, so I thought that maybe one of you experts could help me. :) I already found the uni-wtal-lin style which is helpful, but also I want some elements of the authoryear-icomp standard.               \documentclass[%     11pt,     a4paper,     %parskip-,     %titlepage,     onepage,     BCOR5mm,     bibliography=totoc,     footsepline,     bookmarksopen=true,     pdfusetitle]{scrreprt}     …     \usepackage[%     backend=biber,     maxbibnames=4,     maxcitenames=2,     % Pfad: /usr/share/texmf/tex/latex/biblatex/bbx/     style=authoryear-icomp, %uni-wtal-lin // authoryear-icomp     babel=other,     %hyperref=true,     useprefix=true,     url=false,     isbn=false     ]{biblatex}     %Anpassungen linguistische Literaturangaben     \renewcommand{\postnotedelim}{\addcolon~} % Doppelpunkt zwischen Jahr und Seite: (Meier 1999:~S. 23)     \DeclareFieldFormat{postnote}{#1} %einleitendes S. weg     \renewcommand{\labelnamepunct}{\addcolon~} %doppelpunkt statt punkt in literaturliste     \renewcommand*{\multicitedelim}{\addsemicolon\space}          \DefineBibliographyStrings{ngerman}{     andothers = {{et\addabbrvspace al\adddot}},     }      I want the output to look like this: [book] Name, Paul (2000): _Title._ Place: Publisher (= Series; Bd. 5). [inbook] Name, Paul (2000): _Title._ In: Mayer, Peter/Hans Wurst (Hrsg.): _Book title._ Place: Publisher (= Series; Bd. 5), S. 123–456. [article] Name, Paul (2000): _Title._ In: _Journal title_ 19/2000, S. 123–456. Names are in `\textsc{}` And with the same author, I want the second line marked with – and indented a bit :) Anyone who can help me with this? Thanks! :) PS: I tried to make it for book, this is how it looks like (just copy and paste from uni-wtal-lin for testing), anyway, it does’t work:               %% requires authoryear     \RequireBibliographyStyle{authoryear-icomp}          %% Book     \DeclareBibliographyDriver{book}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/editor+others/translator+others}%       \setunit{\labelnamepunct}\newblock       \usebibmacro{maintitle+title}%       \newunit       \iffieldundef{maintitle}         {\printfield{volume}%          \printfield{part}}         {}%       \newunit       \newunit\newblock       \usebibmacro{byeditor+others}%       \newunit\newblock       \printfield{note}%       \newunit\newblock       \usebibmacro{publisher+location+date}%       \newunit\newblock       \usebibmacro{chapter+pages}%       \newunit       \printfield{pagetotal}%       \newunit\newblock       \iftoggle{bbx:isbn}         {\printfield{isbn}}         {}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%     \newblock       \newunit\newblock     \renewbibmacro*{series+number}{%     \iffieldundef{series}     {}     {\printtext[parens]{%     \iffieldundef{number}     {}     {=\addhpthinspace}%     \printfield{series}%     \setunit*{\addsemicolon\addspace{}Bd.~}%     \printfield{number}%     }}\newunit}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \setunit{\bibpagespunct}       \usebibmacro{finentry}}


title: Quotation marks around operator in math mode

text: I want to create formulae where the `\rightarrow` is enclosed in double quotation marks and appears like any other word in a formula. What I'm getting instead, are formulae where these quotation marks are drawn to adjacent words, leaving a gap between the quotation marks and the `\rightarrow`. Example: I'm getting `Some'' -> ''Word`. I want `Some ''->'' Word`. The sequence `''->''` should be treated the same as `Some` or `Word`. The `->` (`\rightarrow`) should be rendered as if it were used in an arbitrary math- environment.   I have looked at this answer, but I could not turn that into something useful, as my MWE will show. Also, I do not wish to break up my math environment, since the quotation marks are part of the formulae. ![bad rendering](http://i.stack.imgur.com/CS2ze.png)               \documentclass{standalone}     \usepackage{varwidth}     \usepackage{amsmath}     \DeclareMathSymbol{\mlq}{\mathord}{operators}{``}     \DeclareMathSymbol{\mrq}{\mathord}{operators}{`'}          \begin{document}     \begin{varwidth}{\linewidth}     $Op \mapsto Op ``\rightarrow'' Op$%large gap on left; ' treated as prime          $Op \mapsto Op {``\rightarrow''} Op$%large gap on left; ' treated as prime          $Op \mapsto Op \mlq\rightarrow\mrq Op$%large gaps on left & right          $Op \mapsto Op {\mlq\rightarrow\mrq} Op$%large gaps on left & right          Quotation marks close\\     to arrow: ``$\rightarrow$''     \end{varwidth}     \end{document}


title: Getting Math Operators to work in verbatim

text: I'm very new to Latex and I'm looking to simply have math operators appear with in verbatim tags as follows:               \begin{verbatim}     24:     max:=0     25:     for i:=n downto 1 do     26:         found:=false     27:         clique($S_i$ \cap N($v_i$); 1)     28:         c[i]:=max     29:     end for     30:     return     \end{verbatim}      but `$S_i$` appears as is and not with a subscript? How can I render the `i` as a subscript?


title: Boolean AND Gate

text: I cannot figure out how I can to draw and label a single AND gate. All of the online examples are horizontally aligned. I drew the image. Please anyone show me how do this in LaTeX. Edited to clarify: Also, I want to label the wires in 3 places each as I show in the image. ![enter image description here](http://i.stack.imgur.com/LDBay.png)


title: Evaluation of Differentiation and Integration

text: I was having some thought about what would be the syntax to make the end point evaluation of derivatives or integrals. Such as making the `|` with the `two end points of evaluation` on the top an bottom of the line. Any suggestions would be wonderful.


title: A macro that conditionally disregards the need for one of its arguments

text: Let's suppose I want to write nested equations that contain a fair few nested parenthetical/delimiter characters, like `()`, `[]`, `{}`, `||`, and perhaps others. Suppose too that I think these things look nicer if the outer delimiters are a tad bigger than the inner ones (where possible), appearing to "frame" them. I can write things like this:               $\pi_G\big(f\big(\big[[v]_{\sim}\big]_{\sim''}\big)\big)$      But this `\big(...\big)` stuff is kind of ugly and gets in the way of seeing, from the LaTeX code, what's going on. What might be better is if I could write:               $\pi_G\mybig(){f\mybig(){\mybig[]{[v]_{\sim}}_{\sim''}}}$      Here, the `()` after `\mybig` mean that the macro argument should be surrounded by `\big(...\big)`. If it's `[]`, then the argument should be surrounded by `\big[...\big]`, and so on. But wait! This can in fact be done; it is only necessary to define the macro with three arguments, like the following:               \newcommand{\mybig}[3]{\big{#1}#3\big{#2}}      How nice. But unfortunately, this doesn't work so well when I want to use braces, as in               $\mybig{}{(x)}$      Here, `{}` is actually a group, and constitutes only one argument. So this fails. Of course, the following both work, but mean that uses of the macro are less uniform in appearance (which is not so pleasing):               $\mybig{}{}{(x)}$     $\mybig\{\}{(x)}$      So what I really need is to test whether argument #1 is empty (indicating that the macro-invocation was immediately followed by an empty group, i.e. `{}`). If so, the macro "skips" to the third argument, and typesets `\big\\{#3\big\\}`. Is there a way to do this?


title: ambiguity in the name of the header

text: I use Lyx 2.1, document class : report. I created a chapter called "list of acronyms" after "list of tables". At the 2nd page of the chapter "list of acronyms" header is incorrect. ![enter image description here](http://i.stack.imgur.com/CrkwZ.png) ![enter image description here](http://i.stack.imgur.com/MPcUF.png)


title: Is there a smart way to get a consistent accuracy with fp package?

text: Is there a smart way to get a consistent accuracy with `fp` package? I don't want to use `round` for sure! ![enter image description here](http://i.stack.imgur.com/YTGAX.png)               \documentclass[preview,border=12pt]{standalone}          \usepackage[nomessages]{fp}     \FPeval\Sixty{trunc(cos(pi/3):12)}     \FPeval\ThreeHundred{trunc(cos(5*pi/3):12)}     \usepackage{amsmath}          \begin{document}     $\!     \begin{aligned}         \cos 60^\circ &= \Sixty\\         \cos 300^\circ &= \ThreeHundred     \end{aligned}     $     \end{document}


title: Is there a collaboration system on the web that I can use to write book together with others?

text: If this question is out of topic, I will remove as soon as possible. I have used neither Subversion nor GIT nor any collaboration system to write any document together with others. I am looking for the collaboration system on the web, either commercial (cheap) or free (preferred) that I can use to write a LaTeX book with others. Is there anybody here knows the details?


title: Displaying Bibliography Photo in IEEE Journal

text: I've formatted my photo as a PDF but it doesn't seem to be working correctly. Here is the relevant code (I am using the IEEE bare journal template and `IEEEtran` class with the `journal` option). Here is the code from the document with dots to indicate filler:               \documentclass[journal]{IEEEtran}          ...          \ifCLASSINFOpdf       \usepackage[pdftex]{graphicx}     \else     \fi          ...          \begin{document}          ...          % biography section     %      % If you have an EPS/PDF photo (graphicx package needed) extra braces are     % needed around the contents of the optional argument to biography to prevent     % the LaTeX parser from getting confused when it sees the complicated     % \includegraphics command within an optional argument. (You could create     % your own custom macro containing the \includegraphics command to make things     % simpler here.)     \begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{mshell}}]{Michael Shell}     % or if you just want to reserve a space for a photo:          \begin{IEEEbiography}{Michael Shell}     Biography text here.     \end{IEEEbiography}          ...          \end{document}      I've uncommented the macro line to use it, but it doesn't seem to work for me (yes I have an mshell pdf image in the correct path as a test). This is the offending line (commenting it makes the error go away):               \begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{mshell}}]{Michael Shell}      I am getting this error:               <mshell.pdf, id=1, 72.27pt x 90.3375pt> <use mshell.pdf> <use mshell.pdf>     ! TeX capacity exceeded, sorry [main memory size=5000000].     \par ->\hfil \penalty -\@M                                 \indent      l.685 \begin{IEEEbiography}{Michael Shell}          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on Heuristic_Paper.log.      The PDF image is only 77KB - I know I've used much larger images in TeX files before with no memory problems.


title: How to squeeze white spaces between sections and figures?

text: I am using a multicolumns article template for some kind of CV profile. I have all working as intended except of 1 small problem. In my first column, I have quite some high amount of white space (between bottom of photo and "Profil"), that I don't understand how to remove. You can see an example in the picture below.![Column with white space](http://i.stack.imgur.com/VeMZs.png) The corresponding code is:                  \begin{document}        \setlength{\columnsep}{.25in}        \begin{multicols}{2}                              {\LARGE John Doe}\        lorem \        ipsum                              \NewPart{Kontakt}                    lorem ipsum          \begingroup          \leftskip 1cm          \includegraphics{foobar}          \rightskip\leftskip     \endgroup          \NewPart{Profil}          \subsection{Berufserfahrung}     \begingroup          \leftskip 0.7cm          {\em (11 months)} Sfoobar    \\ [0.6ex]     {\em (2 months)} Blorem ipsum    \\ [0.6ex]     {\em (3 months)} foo bar \\ [0.6ex]          \rightskip\leftskip          \endgroup      Is there any way to remove all the spacing beween section and figure (as in the picture below)?


title: xelatex mathspec with polyglossia

text: How to use `mathspec` package and `polyglossia` for the russian language? **MWE**               \documentclass[14pt]{extreport}     \usepackage{mathtools}     \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage{commath}    % \dif sign     \usepackage{array}     \usepackage{mathspec}          \usepackage{polyglossia}     \usepackage{ucharclasses}     \usepackage{microtype} % better management of overfulls               \setdefaultlanguage{russian}     \setotherlanguage{english}     \setTransitionsForLatin{\begingroup\hyphenrules{english}}{\endgroup}     %\setallmainfonts[Mapping=tex-text, Numbers={Lining,Proportional}]{Times New Roman}     \setmainfont[Mapping=tex-text]{Times New Roman}     \setmathfont{Latin Modern Math}     \setmonofont{Consolas}     \DeclareMathSizes{12}{12}{8}{6}     \DeclareMathSizes{14}{14}{9}{7}               \begin{document}       \(\lambda_{сист}\) --- интенсивность системы.     \end{document}      ![enter image description here](http://i.stack.imgur.com/312Ir.png)


title: Add figure, which is a table, to the list of tables

text: I am converting my thesis from Word to LaTeX, and I saved several huge tables as images. For my thesis I have to compile a list of tables and figures. I am using `\listoftables` and `\listoffigures`. However, now that some of my tables are given by images, it would add those table to the List of Figures. What would be a good way to list those images to the List of Tables as well (instead of List of Figures). I could imagine there should be a way to make an invisible table with one cell which contains the table image. Maybe somebody has LaTeX code. Any ideas are appreciated!


title: need to change the way title chapters are displayed in 'report' document class

text: I'm using the report document class and the chapter titles are very large, in bold font, and left justified. I need them to be 18pt, not bold, and centered. I also need the words 'chapter 1' to be centered above the chapter title. My preamble and chapters look like this:               \documentclass[12pt]{report}     \usepackage{graphicx}     \usepackage{fullpage}     \usepackage{setspace}\doublespacing    % important!     \textfloatsep 0.75in                   % important with double spacing                         \begin{document}          \chapter{chapter title}          \end{document}.      I have tried modifying as follows:               \centerline{\chapter{chapter title}}      or               \begin{center}     \chapter{chapter title}     \end{center}      but I don't think this is going to work... Their are lots of posts related to this topic but I can't make sense of which exact parts to use for my application. Please help with my specific case.


title: Move chapter number to chapter title in classicthesis

text: I'm using `classicthesis 4.1` in LyX to write my thesis and I need help to relocate the chapter number. The top half of the image shows what I have The bottom half shows what I want: ![problem](http://i.imgur.com/EDRgAUG.png)


title: matrix in a matrix

text: I would like to draw a matrix with top left, top right, bottom left and bottom right blocks. The top left should be a 3x3 matrix with numerical entries, the top right is 0, the bottom left is 0 and the bottom right is just a "single" entry uJ. Here is my attempt.               $     \left[     \begin{array}{c|c}     [\begin{array{c|c|c}     0 & 0 & 2\mathrm tr(MM^{*}) \\     0 & 0 & -ua \\     u & -ua & 0 \end{array}]     &  0\\ \hline     0 & uJ      \end{array}\right].     $       I would like to emphasize that the non-top-left entries are not just single entries, but blocks, so I do not want to just make a 4 by 4 matrix with vlines and hlines and additional 0's.


title: Plain enumeration of theorems definitions etc

text: In my TeX document Theorems, Definitions, Lemmas are enumerated in the following way:               Definition 1.1          Lemma 1.1          Theorem 1.1          Definition 1.2          Lemma 1.2          Theorem 1.2      But I would like to have               Definition 1.1          Lemma 1.2          Theorem 1.3          Definition 1.4          Lemma 1.5          Theorem 1.6      How can I obtain this? Edit. The begin of my document is:               \documentclass[12pt]{article}          \usepackage[T1]{fontenc}          \usepackage[cp1250]{inputenc}          \usepackage{amsfonts}          \usepackage{amssymb}          \usepackage{latexsym}          \usepackage{amsthm}               \theoremstyle{plain}          \newtheorem{theorem}{Theorem}[section]          \newtheorem{corollary}{Corollary}[section]          \newtheorem{lemma}{Lemma}[section]          \newtheorem{observation}{Observation}[section]          \newtheorem{proposition}{Proposition}[section]          \theoremstyle{definition}          \newtheorem{definition}{Definition}[section]                    \newtheorem{example}{Example}[section]


title: Spacing after first line with titlesec using runin option in titleformat

text: I'm using the titlesec package to format my (sub)section titles. I'd like to use the `runin` option in `\titleformat` to place my subsections titles within the first paragraph of each subsection. However, when I do this, I get extra spacing after the first line of each subsection. I've fiddled with the the options in `\titlespacing` and none of them seem to fix the problem.               \documentclass[11pt]{article}           \usepackage{titlesec}     \titleformat{\section}{\normalfont\fontsize{11}{36}\bfseries}{\thesection.}{0.25em}{}     \titlespacing{\section}{0em}{-1.0em}{-2.0em} % {left}{before}{after}[right]     \renewcommand{\thesubsection}{\thesection.\alph{subsection}}     \titleformat{\subsection}[runin]{\normalfont\fontsize{11}{36}\bfseries\slshape}{\thesubsection.}{0.25em}{}     \titlespacing{\subsection}{0.0em}{0.0em}{0.5em} % {left}{before}{after}[right]          \linespread{1}          \begin{document}          \section{The first section}          \subsection{The first subsection within the first section:} Asdf asdf asdf asdf asdf asdf adsf asdf asdf asdf adf adf adsf adsf adsf asdf asdf asdf asd f. Wert qwer qwer qwer qwer qwer qwer qewr qewr erwq erw erw rewr rew re ewq ewr wqr qwer weq rqwe r re qwe reqw r ewe r we e w er qwe rq we rqwer qwer qw erq er qewr we are qew  rq ew r ew. Hkjlkljj h jlkjh  lkjlk jlhlkh lhkjljkj lklkk.          \subsection{The second subsection within the first section:} Asdf asdf asdf asdf asdf asdf adsf asdf asdf asdf adf adf adsf adsf adsf asdf asdf asdf asd f. Wert qwer qwer qwer qwer qwer qwer qewr qewr erwq erw erw rewr rew re ewq ewr wqr qwer weq rqwe r re qwe reqw r ewe r we e w er qwe rq we rqwer qwer qw erq er qewr we are qew  rq ew r ew. Hkjlkljj h jlkjh  lkjlk jlhlkh lhkjljkj lklkk.          \end{document}      Any suggestions?


title: Cartesian Coordinate System In TikZ VS Pstricks

text: I have been using pstricks to add cartesian coordinates to my exam document class structures for years. But, now I have switched to a Macbook air and I am using Texpad. The newsiest version of Texpad dos not support pstricks anymore, and I need to generate graphing spaces within my exams using TikZ. I am learning how it works still and I am having a hard time generating a nice coordinate system. Here is an example of what I would add using pstricks.                           \begin{center}                     \unitlength 0.15in                     \psset{unit=\unitlength}                 \begin{pspicture}(-10,-10)(10,10)                     \psgrid[subgriddiv=1,griddots=2,gridlabels=7pt](-10,-10)(10,10)                     \psaxes[labels=none,showorigin=true]{<->}(0,0)(-10,-10)(10,10)                 \end{pspicture}                 \end{center}      Here is what I have come up with so far to use in TikZ                      \begin{figure}[h]              \begin{tikzpicture}                \tkzInit[xmax=9,ymax=9,xmin=-9,ymin=-9]                \tkzGrid                \tkzAxeXY              \end{tikzpicture}            \end{figure}      I would prefer that it looks more like my pstricks example. Does anyone have any advice or experience with this?


title: Greedy line breaks for 2 lines

text: I have some text to typeset which is short enough so that it fits to either 1 or 2 lines. I'm using `\raggedright`. I'd like to set up parameters like `\hyphenpenalty` so that as much as possible would be put to the first line without creating underfull or overfull hboxes. If it is possible to hyphanate a word (and that would produce more text in the first line), then it should be hyphenated at the last possible position. I was trying to change many settings including `\pretolerance-1`, but I couldn't make it work. For example, here:               \documentclass{article}     \usepackage{t1enc}     \begin{document}     \hrule width137pt height 1pt     \vbox{\hsize137pt\parindent0pt\sf\raggedright\par       Kun\-szent\-m\'ar\-ton, au\-t\'obusz-\break\'al\-lo\-m\'as \par}     \bigskip     \vbox{\hsize137pt\parindent0pt\sf\raggedright\par       Kun\-szent\-m\'ar\-ton, au\-t\'obusz-\'al\-lo-\break m\'as \par}     \vbox{\hsize137pt\parindent0pt\sf\raggedright       \pretolerance-1       \hyphenpenalty1       \exhyphenpenalty2       \par       Kun\-szent\-m\'ar\-ton, au\-t\'obusz-\'al\-lo\-m\'as \par}     \end{document}      , it's possible to fit _Kunszentmárton, autóbusz-állo-_ to the 1st line, but if LaTeX is breaking the line automatically, then it only puts only _Kunszentmárton,_ there (see in the last `\vbox`). How do I put as much as possible to the first line? I know that TeX's line breaking algorithm optimizes paragraphs globally, and it's close to impossible to configure it to make it greedy, but maybe there is an easy solution when the text first to 1 or 2 lines. I know about Can I locally switch to a 'greedy' justification algorithm? and `\linebylinepar` in its answer http://tex.stackexchange.com/a/131275/820, but even that one wouldn't put _Kunszentmárton, autóbusz-állo-_ to the 1st line.


title: How can I draw styrene using xymtex?

text: How can I draw styrene using xymtex? ![styrene](http://i.stack.imgur.com/DyGuY.png)


title: Indentation in enumerate/list

text: I'm trying to get rid of indentation in `enumerate`. The code below shows the indentation with `enumerate`, and then the only partial fix I could implement. With `enumitem` package I could avoid indentation on the 'count' line through `leftmargin=*`, but there is still indentation in the text. How could I fix that?               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{enumitem}     \usepackage{blindtext}     \begin{document}          \blindtext          \begin{enumerate}     \item Case $a\in B$          \blindtext          \item Case $a\in C$          \blindtext          \end{enumerate}          \begin{enumerate}[leftmargin=*]     \item Case $a\in B$          \blindtext          \item Case $a\in C$          \blindtext          \end{enumerate}          \end{document}


title: How to install Babel English?

text: I use MikTex Update to install, some security configurations make me can only install package in Update, not Package Manager. I install all package in the Update, but the system show error that I do not install babel english... How can I install Babel english?


title: Pictures in tex. I see only path to pictures instead of pictures

text: I have tried many pictures in format `.epd`, `.png` `.pdf`... I only see border box with path to pictures. Do you know where is the problem?


title: How to fix EPS with incorrect bounding box?

text: I want to get a standalone EPS graphic from DVI. This process can be done using the batch file as follows               latex %1     dvips -E %1 -o %1.eps      And the test file is as follows               \documentclass{minimal}     \usepackage{pstricks}               \begin{document}          \begin{pspicture}[showgrid=false](3,3)     \pscircle(1.5,1.5){1}     \end{pspicture}          \end{document}      However the resulting EPS has incorrect bounding box. How to fix the bounding box? * * * Update: You can also find a more detailed solution in How to produce EPS instead of PS using latex.exe followed by dvips.


title: How to overlay a box with included lstlisting

text: i wanna have this block appear by tapping next.               \begin{block}{Methode}     \begin{lstlisting}     for i in range(2,N):         a[i] = (a[i-1] * b + 1) % m     \end{lstlisting}     \end{block}      i tried it with               \onslide<2->{ CODE }      but i get this error message               (no line number in this file):     Package utf8x Error: Character159appearedalone.          See the utf8x package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.23   \item<4->m sollte groß und eine Potenz von 10 oder 2 sein     Characters128-191areonlyallowedasargumentstocharacters194-244      thanks for your help =)


title: PSTricks code not compiling

text: The following code is an attempt to extend Herbert's figure here:               \documentclass[       dvipsnames     ]{article}          \usepackage[       hmargin=2.4cm,       vmargin=3cm     ]{geometry}     \usepackage{pst-solides3d}          \pagestyle{empty}          \begin{document}          \begin{center}       \begin{pspicture}[solidmemory](-5.9,-7.95)(5.9,10.45)        \psset{          lightsrc=viewpoint,          viewpoint=40 -10 0 rtp2xyz,          Decran=100,          grid=false,          object=tore,          r0=0.2,          action=none        }         \psSolid[r1=1,  ngrid=10 50,        RotY=90,        fillcolor=blue,  name=S1](-3,0,3)         \psSolid[r1=0.9,ngrid=10 45,RotX=90,        RotZ=30,fillcolor=green, name=S2](-3,0,1.5)         \psSolid[r1=0.8,ngrid=10 40,        RotY=90,        fillcolor=red,   name=S3](-3,0,0.2)         \psSolid[r1=0.7,ngrid=10 35,RotX=90,        RotZ=30,fillcolor=gray,  name=S4](-3,-0.9)         \psSolid[r1=0.6,ngrid=10 30,        RotY=90,        fillcolor=yellow,name=S5](-3,0,-1.8)         \psSolid[r1=0.5,ngrid=10 25,RotX=90,        RotZ=30,fillcolor=Purple,name=S6](-3,0,-2.5)         \psSolid[           object=fusion,           base=S1 S2 S3 S4 S5 S6,           linewidth=0.1pt,           linecolor=black!60,           action=draw**         ]         \psSolid[r1=1,  ngrid=10 50,        RotY=90,        fillcolor=blue,  name=T1](3,0,3)         \psSolid[r1=0.9,ngrid=10 45,RotX=90,        RotZ=30,fillcolor=green, name=T2](3,0,1.5)         \psSolid[r1=0.8,ngrid=10 40,        RotY=90,        fillcolor=red,   name=T3](3,0,0.2)         \psSolid[r1=0.7,ngrid=10 35,RotX=90,        RotZ=30,fillcolor=gray,  name=T4](3,-0.9)         \psSolid[r1=0.6,ngrid=10 30,        RotY=90,        fillcolor=yellow,name=T5](3,0,-1.8)         \psSolid[r1=0.5,ngrid=10 25,RotX=90,        RotZ=30,fillcolor=Purple,name=T6](3,0,-2.5)         \psSolid[           object=fusion,           base=T1 T2 T3 T4 T5 T6,           grid=false,           linewidth=0.1pt,           linecolor=black!60,           action=draw**         ]       \end{pspicture}     \end{center}          \end{document}      (It takes about 25 seconds to compile the code, using XeLaTeX, on my computer.) Her is the error:               [1] (./test.aux)Error: /typecheck in --add--     Operand stack:        les_sommets   --nostringval--   0.0   --nostringval--     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1884   1   3   %oparray_pop   1883   1   3   %oparray_pop   1867   1   3   %oparray_pop   1755   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   --nostringval--   359   --nostringval--   %repeat_continue   --nostringval--   --nostringval--     Dictionary stack:        --dict:1175/1684(ro)(G)--   --dict:0/20(G)--   --dict:117/200(L)--   --dict:754/1012(L)--   --dict:206/300(L)--   --dict:754/1012(L)--   --dict:2/3(L)--   --dict:3/3(L)--   --dict:6/6(L)--     Current allocation mode is local     Last OS error: Not a directory     Current file position is 10322     GPL Ghostscript 9.10: Unrecoverable error, exit code 1          ** WARNING ** Filtering file via command -->rungs -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='/tmp/dvipdfmx.XXFBpfjq' '/tmp/dvipdfmx.XXat2UdM' -c quit<-- failed.     ** WARNING ** Image format conversion for PSTricks failed.     ** WARNING ** Interpreting special command pst: (ps:) failed.     ** WARNING ** >> at page="1" position="(306, 410.74)" (in PDF)     ** WARNING ** >> xxx "pst:  tx@Dict begin STP newpath   1. .setopacityalpha  1 setlin"      )      What do I have to change to make the code compilable? How do I fix this? **Update** After help from Werner, the following is what I ended up with:               \documentclass[       dvipsnames     ]{article}          \usepackage[       hmargin=2.4cm,       vmargin=3cm     ]{geometry}     \usepackage{pst-solides3d}          \pagestyle{empty}          \begin{document}          \begin{center}       \begin{pspicture}[solidmemory](-4.8,-7.75)(4.8,10.2)        \psset{          lightsrc=viewpoint,          Decran=100,          object=tore,          r0=0.2,          action=none        }         \psSolid[r1=1,  ngrid=10 50,        RotY=90,       fillcolor=blue,  name=S1](-1.5,0,3)         \psSolid[r1=0.9,ngrid=10 45,RotX=90,        RotZ=0,fillcolor=green, name=S2](-1.5,0,1.5)         \psSolid[r1=0.8,ngrid=10 40,        RotY=90,       fillcolor=red,   name=S3](-1.5,0,0.2)         \psSolid[r1=0.7,ngrid=10 35,RotX=90,        RotZ=0,fillcolor=gray,  name=S4](-1.5,0,-0.9)         \psSolid[r1=0.6,ngrid=10 30,        RotY=90,       fillcolor=yellow,name=S5](-1.5,0,-1.8)         \psSolid[r1=0.5,ngrid=10 25,RotX=90,        RotZ=0,fillcolor=Purple,name=S6](-1.5,0,-2.5)         \psSolid[           viewpoint=40 45 0 rtp2xyz,           object=fusion,           base=S1 S2 S3 S4 S5 S6,           grid=false,           action=draw**         ]         \psSolid[r1=1,  ngrid=10 50,        RotY=90,       fillcolor=blue,  name=T1](1.5,0,3)         \psSolid[r1=0.9,ngrid=10 45,RotX=90,        RotZ=0,fillcolor=green, name=T2](1.5,0,1.5)         \psSolid[r1=0.8,ngrid=10 40,        RotY=90,       fillcolor=red,   name=T3](1.5,0,0.2)         \psSolid[r1=0.7,ngrid=10 35,RotX=90,        RotZ=0,fillcolor=gray,  name=T4](1.5,0,-0.9)         \psSolid[r1=0.6,ngrid=10 30,        RotY=90,       fillcolor=yellow,name=T5](1.5,0,-1.8)         \psSolid[r1=0.5,ngrid=10 25,RotX=90,        RotZ=0,fillcolor=Purple,name=T6](1.5,0,-2.5)         \psSolid[           viewpoint=40 135 0 rtp2xyz,           object=fusion,           base=T1 T2 T3 T4 T5 T6,           linewidth=0.1pt,           linecolor=black!60,           action=draw**         ]       \end{pspicture}     \end{center}          \end{document}


title: Draw a 3D diamond structure

text: I want to draw a 3D diamond crystal structure. The point where I struggle is quite in the beginning to draw connecting 3D rods:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{geometry}     \usepackage{pstricks}     \usepackage{pst-solides3d}          \begin{document}      \begin{pspicture}(-4,-4)(14,14)       \psSolid[object=cylindre,h=6,r=1,fillcolor=yellow,](0,0,0)       \psSolid[object=sphere,r=2,fillcolor=red!25](0,0,0)       \psSolid[object=sphere,r=2,fillcolor=red!25](0,0,6)      \end{pspicture}     \end{document}      ## Desired result In the end it should describe the cubic cell of diamond, e.g. like the following picture from Phase Transformations & Complex Properties Research Group. ![Cubic cell of diamond](http://i.stack.imgur.com/adF4e.gif) ## Comments   * To me it seemed not reasonable at all to use `TikZ` as the picture gets useless at different view angles as I recognized by asking the question Unordered layers in tikz-3dplot (3d effect).   * Even the example in question Help creating solid cylinders along a path in Tikz for crystal lattice diagram using `asymptote` has unrealistic 3D layers (i.e. all atoms in front of the connecting rods - and the atoms are semitransparent in contrast to the image presented there).


title: Name clash when defining a class based on article class

text: \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{funny-class}          %%          % Pass any options to the underlying class.     \DeclareOption*{%       \PassOptionsToClass{\CurrentOption}{article} % (could be another class)     }          % Options for this class.     \DeclareOption{fun}{%       \def\contentsname{Blarg, blarg, blarg}%     }               % Defaults.     \ExecuteOptions{fun}          % Now execute any options passed in     \ProcessOptions\relax          % Load underlying class.     \LoadClass{article}      LaTeX complains when the `article` class tries to define `\contentsname`:               \newcommand\contentsname{Contents}      When I try to load the class before doing my options-processing, LaTeX of course complains. What's my best way around this? Ideally, I'd like to stick as much to my original idea as possible, because I'm sure there's a much better way to do what I'm trying to do (like figuring out how to harnest Babel, etc.).


title: Writing two right hand sides in an equation in latex

text: I want to write LATeX code whose output should look like this:               A = B + C       = 2 + 3      I'm trying to write the following code in LATeX:               \begin{equation}     A &= B + C \\       &= 2 + 3      But the output of this code is:               A = B + C = 2 + 3      How to change the latex code to achieve the required output?


title: How to make a graphic fill the rest of a given space?

text: Sometimes I use a figure numbering style in which each number is placed to the left of a figure. When using this formatting, I try to make sure that the space occupied by a given number and figure is confined by the same margins as those set for the main text. This creates a nice alignment effect. I have tried to achieve it in LaTeX by using two `minipage` environments inside a `figure` environment and some simple mathematics:               \begin{figure}[htp]     \begin{minipage}{\1cm}     {\Large(3)}     \end{minipage}%     \newlength{\pic}     \setlength{\pic}{\columnwidth}     \addtolength{\pic}{-\1cm}     \begin{minipage}{\pic}     \includegraphics[width=\pic]{blue}     \caption{Caption}     \label{blue}     \end{minipage}%     \end{figure}      This code, however, didn't work quite as I expected: as you can see in the picture below, the figure sticks out onto the right margin. ![Figure](http://i.stack.imgur.com/YxJoH.png) How can I ensure that the figure fills up the space next to the number while being neatly aligned with the body of the text? (Incidentally, I would also be very grateful for some suggestions on how to make the number and the picture aligned at the top.)


title: biblatex/multicol: Incorrect vertical space after bibliography heading

text: I'm trying to typeset a bibliography inside a `multicols` environment, but with the heading as a single column (using `multicols`' optional argument). I've noticed that the vertical space between the heading and the actual bibliography is larger than with a bibliography typeset in one-column mode. On closer inspection, it seems that the spacing after headings is also somewhat larger for "normal" text when using `multicols`, but that the combination biblatex/multicol results in even more additional vertical space. The `multicol` documentation states on p. 2 that `\addvspace` is used for the spacing before and after the `multicols` environment (the length is `\multicolsep`). This seems to be consistent with the observed behaviour after "normal" headings because the default value of `\multicolsep` (12pt) is larger than the vertical space after sections in the standard classes (2.3ex, i.e. about 9.9pt for a fontsize of 10pt). My current workaround is to set `\multicolsep` to 0pt, but this will negatively affect in-text `multicols` environments. So I'd like to know what is the cause of the "on-top" additional vertical space after bibliography headings.               \documentclass{article}          \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage{biblatex}     \defbibheading{none}{}% for biblatex v<1.5          \usepackage{multicol}          % My current workaround     % \setlength{\multicolsep}{0pt}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @misc{A01,       author = {Author, A.},       year = {2001},       title = {Alpha},     }     @misc{B02,       author = {Buthor, B.},       year = {2002},       title = {Bravo},     }     @misc{C03,       author = {Cuthor, C.},       year = {2003},       title = {Charlie},     }     \end{filecontents}          \addbibresource{\jobname.bib}          \nocite{*}          \begin{document}          \section{First Section }          \blindtext          \begin{multicols}{2}[\section{Second Section}]     \blindtext     \end{multicols}          \printbibliography[title={First Bibliography}]          \begin{multicols}{2}[{\printbibheading[title={Second Bibliography}]}]     \printbibliography[heading=none]     \end{multicols}          \end{document}


title: TeX Live Utility (unable to find update server)

text: I know this is a duplicate, but the other question are already pretty old... When I start Tex Live Utility. It says that http://mirror.ctan.org/systems/texlive/tlnet is not available. When you copy the address in the browser, it says the same. Does anyone knows another server? ON hold. Ok, no problems if this question will be deleted... but the problem persists. I don't want to polute the forum, but this is the only forum I know for LateX...


title: Combine Type1 and OpenType libertine fonts

text: I would like to use the Type1 `libertine` fonts provided by the package `libertine` and compile with `XeLaTeX`. According to the manual under section 4, this can be activated with the option `type1`:               \documentclass{article}     \usepackage[type1, oldstyle]{libertine}     \begin{document}     This is a test 1234567890 fi ffi fl ffl ft fft fj ffj tt     \end{document}      I would like to use the OpenType fonts, also provided by the `libertine` package, when I need to access glyphs not included in the Type1 fonts. As mentioned in section 5 in the manual, I can access these with the macro `\libertineGlyph{}`:               \documentclass{article}     \usepackage{libertine}     \begin{document}     \libertineGlyph{uni025D}     \end{document}      But how do I combine these? As said above, I'd like to stick to Type1 fonts as far as possible (as this renders ligatures and old style numbers copy- and searchable in the pdf), but switch to the OpenType fonts when I need special glyphs. Combining the `type1` option with `\libertineGlyph{}` does not compile:               \documentclass{article}     \usepackage[type1, oldstyle]{libertine}     \begin{document}     This is a test 1234567890 fi ffi fl ffl ft fft fj ffj tt \libertineGlyph{uni025D}     \end{document}      > ! Undefined control sequence. > > l.4 ...ffi fl ffl ft fft fj ffj tt \libertineGlyph{uni025D}?


title: Always a problem with the last update

text: I have done the last update today. The update have removed the package "latex- base". Consequently, I cannot compile any tex document. I have always the same message: article.cls not found.


title: How does quotchap package deal with chapters read from external files?

text: If I use the `quotchap` package, with the following sample code,               \documentclass{book}     \usepackage[grey]{quotchap}     \begin{document}     \input{ch1}     \chapter{Chapter 2 Heading}     \end{document}      it recognizes chapter 2 as chapter 1, and does not assign a number to the first chapter which is read from the following file:               \chapter*{Introduction}     \begin{quote}     A quote.     \end{quote}      Any hint for this problem?


title: tikzexternalize error

text: I get the error "`Paragraph ended before \tikzexternalize@opt was complete`" on the following code:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize          \begin{document}     \begin{figure}     \centering          \begin{tikzpicture}          \node [draw,rectangle,minimum width=0.5cm,minimum height=0.5cm] {};          \begin{scope}[xshift=0.5cm]     \node [draw,rectangle,minimum width=0.5cm,minimum height=0.5cm] {2};     \end{scope}               \begin{scope}[xshift=1cm]     \node [draw,rectangle,minimum width=0.5cm,minimum height=0.5cm] {};     \end{scope}          \end{tikzpicture}          \end{figure}     \end{document}      Any idea on how to fix this issue?


title: Is that a bug between `xymatrix`, the `input` command and .sty file?

text: I have a problem compiling the following document. First, I have a file `macros.sty` that consists of :               \newcommand{\test}{     \xymatrix@R=0mm{x}     }      Then, I have an auxiliary file `out.aux` that consists of :               \test      Finally, the main file is :               \documentclass{article}     \usepackage[all]{xy}     \usepackage{macros}     \begin{document}     \input{out.aux}     \end{document}      The error message is :               ./out.aux:1: Undefined control sequence.     \xymatrix@R ->\Addop@@                         \xymatrixrowsep@ \dimen@ii       _Note that if you remove the`R=0mm`, the problem no longer holds._ Is that a bug ? It is very strange because I remember to have already used a command similar to `\test` in an `input` file without any problem. Does it come from my distribution ? Thank you :)


title: Minimal distance in dotfill

text: I'm generating an index with `dotfill`s, such that my ind looks like this (extract):               \item\raggedright l\IeC {\`e}pre\dotfill \transform{21}     \item\raggedright libre arbitre\dotfill \transform{1}     \item\raggedright louange\dotfill \transform{245}, \transform{253}      In this case, `\transform{245}` and `\transform{253}` just fit on the line with `louange`, resulting in this: ![index touching](http://i.stack.imgur.com/whiP5.png) Here is a MWE reproducing such a behavior:               \documentclass{article}          \begin{document}          \parbox{3.4cm}{     \LaTeX\dotfill powerful, useful     }          \end{document}      which gives me: ![dotfill... without dots](http://i.stack.imgur.com/eyyBX.png) How could I ensure a minimal distance between `louange` and the first entry, having `9 septembre` move to the next line in this case?


title: memoir margins and hyperref

text: I'm trying to use the `hyperref` package with the `memoir` class but the bottom margin of the document is no longer 2 cm as I set it. Rather, it seems like there is no margin at all. When I remove the `hyperref` package, the margins are reset to the correct value. What should I do? I'm using the `memoir` class in LyX and then I add the following to the preamble:               \openany          \midsloppy          \setlength{\parskip}{0cm}          \clubpenalty=10000     \widowpenalty=10000     \raggedbottom          \usepackage{babel}     \frenchbsetup{FrenchFootnotes=false,AutoSpaceFootnotes=false,AutoSpacePunctuation=false}          \usepackage{hyperref}


title: How to center an unnumbered section name?

text: I have a chapter `chap1.tex` in latex project `project.tex` which has the following sections:               \chapter{Overview}         \section*{Introduction}         \section{Model}         \section{Discussion}      When I run my latex project `project.tex`, I will get something like this: ![enter image description here](http://i.stack.imgur.com/M3KR5.png) I would like to make `Introduction` in the center. How to do this? I tried `\centering\section*{Introduction}`


title: Aligning in the aligned equations in widetext

text: I have expressions that I'd like to have aligned so that the first letters are aligned, but that the whole thing is still in center. I have this:               \documentclass[twocolumn,prc,floats,amsmath,amssymb]{revtex4}          \usepackage[croatian]{babel}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage{mathtools}     \usepackage{bbm}     \usepackage{mathrsfs}     \usepackage[paperwidth=210mm,paperheight=297mm,centering,hmargin=1.5cm,vmargin=2.5cm]{geometry}               \begin{document}          Random textRandom textRandom textRandom textRandom textRandom      Random textRandom textRandom textRandom textRandom text     Random textRandom textRandom textRandom textRandom textRandom text          \begin{widetext}     \begin{equation}     \left.     \begin{aligned}     U &= -\pi/2 \\     V &=\pi/2     \end{aligned}     \right\}\Rightarrow     \left\{     \begin{aligned}     u &\to -\infty \\     v &\to \infty     \end{aligned}     \right\}\Rightarrow     \left\{     \begin{aligned}     r &\to \infty \\     t &\ \textrm{konačan}     \end{aligned}     \right\}     \begin{aligned}     &\textrm{prostorna} \\     &\infty,\ i_0     \end{aligned}     \end{equation}          \begin{equation}     \left.     \begin{aligned}     U &= \pm\pi/2 \\     V &=\pm\pi/2     \end{aligned}     \right\}\Rightarrow     \left\{     \begin{aligned}     u &\to \pm\infty \\     v &\to \pm\infty     \end{aligned}     \right\}\Rightarrow     \left\{     \begin{aligned}     r &\ \textrm{konačan} \\     t &\to \pm\infty     \end{aligned}     \right\}     \begin{aligned}     &\textrm{prošla i buduća} \\     &\textrm{vremenska}\ \infty,\ i_\pm     \end{aligned}     \end{equation}     \end{widetext}                    Random textRandom textRandom textRandom textRandom textRandom text     Random textRandom textRandom textRandom text     Random textRandom text               \end{document}      Which gives me this: ![enter image description here](http://i.stack.imgur.com/jbRrK.png) I'd like that the U and V are aligned in every row. Is it possible without renaming and redefining commands? Flushleft isn't helping, and centering doesn't do anything :\


title: Tikz: redefinition of patterns

text: I save my TikZ figures in separate files containing all the necessary definitions, so it's easy to reuse them. In some cases I defined a new pattern, e.g. by               \pgfdeclarepatternformonly{wide lines}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{12pt}{12pt}}{\pgfqpoint{9pt}{9pt}}%     {       \pgfsetlinewidth{0.4pt}       \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}       \pgfpathlineto{\pgfqpoint{9pt}{9pt}}       \pgfusepath{stroke}     }      However, if I use two such figures in the same document, pdflatex complains about the already defined pattern. Is there any way that I can check if a pattern with that name is already defined, and if yes, just skip my definition? I looked a bit in the pgf source codes but didn't really understand it.


title: Figures (pdf) do not contain any text in the final document

text: I am creating some plots in Matlab and saving them as pdf files. When I include these pdf files in latex (i am using MikTex and pdflatex) using `\includegraphics`, all text from plots (legends, xlabel, etc) does not show up in the final document. The exported pdf from matlab contain the text. Does anyone know what could be the problem and how can I fix it ? Edit (geometrikal): Here is an example of a file with the problem: https://dl.dropboxusercontent.com/u/8184720/recon_rmse.pdf I am using texstudio, with the buit in viewer (dvipng) and building with pdflatex. In the viewer it shows: ![enter image description here](http://i.stack.imgur.com/8aQOi.png) In Adobe reader it shows: ![enter image description here](http://i.stack.imgur.com/F5FkC.png) There are no errors or warnings in pdfTex about missing fonts.


title: Change the color of ticks in pgfplots

text: How do I set the color of the tick marks (major and minor) in pgfplots? It seems like a very basic question, but I cannot find it in the instructions. I would like to have black tick marks instead of the standard gray.


title: Alignment in inline math

text: I want to enclose a `tabular` environment with a bracket, inside an `enumerate` environment, and be **aligned to top**. In the following example:               \documentclass[a4paper]{article}     \begin{document}     \begin{enumerate}       \item         \(\left.\begin{tabular}{l}           First line\\           Second line\\           Third line         \end{tabular}\right\}\)         Text     \end{enumerate}     \end{document}      I get everything **centred** , and not **aligned to top** : ![enter image description here](http://i.stack.imgur.com/vTBtD.png) If I ask `tabular` to be aligned at top, then still the inline math is not, so the following happens:               \documentclass[a4paper]{article}     \begin{document}     \begin{enumerate}       \item         \(\left.\begin{tabular}[t]{l}           First line\\           Second line\\           Third line         \end{tabular}\right\}\)         Text     \end{enumerate}     \end{document}      ![enter image description here](http://i.stack.imgur.com/LIBAs.png) Is there any way to tell the inline math to also align to top?


title: Spacing in QM-style integrals (differential first)

text: I'd like to write integrals with the differential first, the way physicists tend to: `$\int dx f(x)$`. The problem is that this puts an unsightly (to my eye) gap between the integral sign and the differential, and then puts the integrand much too close to the differential. I can solve this by writing something like `$\int \hskip -3pt dx\ f(x)$`, but that is hardly satisfactory. What is the accepted way to do this? Where should I be looking?


title: Runaway argument error when creating a macro for code that works outside a macro

text: I'm certain my problem is due to my almost complete lack of understanding of LaTeX's expansion rules... I wrote some code, which uses the SageTeX package to keep track of a list of answers to homework problems and then print them all at the end. Here is an example of part of it:               \begin{sagesilent}     class AnswerList:         def __init__(this):             this.answers = []         def _latex_(this):             result = "\\begin{answers}\n"             for answer in this.answers:                 result += "    \\item " + str(answer) + "\n"             result += "\\end{answers}\n"             return result         def next(this, answer):             this.answers.append(answer)     answerlist = AnswerList()     \end{sagesilent}      This compiles in my LaTeX document just fine. I then use other SageTeX commands to add answers (in order) to this object, and then print them all at the end automatically, and it produces the desired results. However, I was hoping to move all the programming into macros in a separate file to make it more reusable and to keep my LaTeX document clean. So, one macro I created was:               \newcommand{\makeanswers}{%     \begin{sagesilent}     class AnswerList:         def __init__(this):             this.answers = []         def _latex_(this):             result = "\\begin{answers}\n"             for answer in this.answers:                 result += "    \\item " + str(answer) + "\n"             result += "\\end{answers}\n"             return result         def next(this, answer):             this.answers.append(answer)     answerlist = AnswerList()     \end{sagesilent}     }      I then include the second document into my first document (with an `\input` command) and call `\makeanswers` right after I enter the document environment in my main LaTeX file. I'm getting runaway argument errors when I try to compile the document. Is there a way to create a macro that inserts this chunk of LaTeX code? There is probably a more LaTeX-friendly, less Python-dependent, approach to my problem here, but it is what I know...


title: Unexpected vertical bar appearing in leaflet document

text: I am creating a basic leaflet using the (appropriately named) leaflet package. I immediately ran into the minor issue of an unexplained vertical "bar", similar to the pipe character, being typeset between the first and second columns of the second page. Even the example document and a very minimal leaflet document, such as               \documentclass[10pt]{leaflet}          \usepackage[utf8]{inputenc}     \usepackage[icelandic]{babel}     \usepackage[T1]{fontenc}          \title{Title}     \author{Myname}          \begin{document}     \maketitle     \end{document}      has this bar. (It is visible near the bottom right corner, due to page rotation.) My question is: What is this vertical bar, and how do I get rid of it?


title: biblatex prints an unwanted star (*)

text: I am using `biblatex` in an `article` document class which has been turned into a resume manually. The `\section` and `\subsection` have been redefined. Now If I use `bibtex` or `biblatex`, I get an unwanted star (*) on the left of References. A similar problem has been reported here: The bibliography prints a * (star) on the first line. The solution given there works only for `bibtex`. Can someone suggest a solution for `biblatex`? Putting the (journal and conference) publication list in the resume is not easy. Here is a minimum working example. Here is a minimum working example (MWE).                   \documentclass[10pt]{article}     \usepackage{hyperref}               % Redefine section     \renewcommand{\section}[2]%             {\pagebreak[2]\vspace{1.3\baselineskip}%              \phantomsection\addcontentsline{toc}{section}{#1}%              \hspace{0in}%              \marginpar{              \raggedright \scshape #1}#2}               % Redefine subsection     \renewcommand{\subsection}[2]%             {\pagebreak[2]\vspace{1.3\baselineskip}%              \phantomsection\addcontentsline{toc}{section}{#1}%              \hspace{0in}%              \marginpar{              \raggedright \scshape #1}#2}          %%%%%%%% biblatex     \usepackage[style=ieee, bibstyle=ieee, defernumbers=true, sorting=ydnt]{biblatex}          \begin{filecontents}{\jobname.bib}     @article{paper1,       author = {John G. Smith},       year = {2004},       title = {This is journal paper 1},     }     @article{papere2,       author = {John G. Smith},       year = {2006},       title = {This is journal paper 2},     }     @conference{C03,       author = {John G. Smith},       year = {2003},       title = {This is conference paper 1},     }     \end{filecontents}                    \begin{document}               \section{Publications}          \begin{refsection}[\jobname.bib]     \nocite{*}     \printbibliography[heading=subbibliography,type=article, title={Journals}]     \end{refsection}          \begin{refsection}[\jobname.bib]     \nocite{*}     \printbibliography[heading=subbibliography, type=inproceedings, title={Conferences}]     \end{refsection}          \end{document}      To run this example, save it as mwe.tex and type:   * pdflatex mwe.tex   * bibtex mwe1-blx.aux   * bibtex mwe2-blx.aux   * pdflatex mwe.tex   * pdflatex mwe.tex The output shows section Publication on right. In the original file it's placed on left (I turned it into a MWE and that's what happened). Nevertheless you can see two stars on the right. These are printed by biblatex, probably because \section* has not been redefined. The template for latex is same as this template. The problem with this template is that, it does not offer a proper solution for the list of publications. I wanted to use biblatex to be able to list journal and conference papers in two sections, and enumerate them, separately.


title: How to use `\newline` after an item list?

text: Concretely, this is what I am trying to do:               \documentclass{article}                    \begin{document}     \begin{itemize}         \item This         \item That         \item Where     \end{itemize}     %if I put \newline or \\ here it does not work. Why?      I am doing it here to test this.     \end{document}      Where the item list ends, I want to give some linespacing but neither `\newline` nor `\\\` is working. Why is that?


title: Setting gnuplot-like colormaps with pgfplots

text: I would to use the `gnuplot` default colormap with `pgfplots`. This colormap is defined in `gnuplot` with `set palette rgb 7,5,15` where the numbers refer to a function for the red, green and blue colours respectively with this mapping:                * there are 37 available rgb color mapping formulae:          0: 0               1: 0.5             2: 1                        3: x               4: x^2             5: x^3                      6: x^4             7: sqrt(x)         8: sqrt(sqrt(x))            9: sin(90x)       10: cos(90x)       11: |x-0.5|                 12: (2x-1)^2       13: sin(180x)      14: |cos(180x)|             15: sin(360x)      16: cos(360x)      17: |sin(360x)|             18: |cos(360x)|    19: |sin(720x)|    20: |cos(720x)|             21: 3x             22: 3x-1           23: 3x-2                    24: |3x-1|         25: |3x-2|         26: (3x-1)/2                27: (3x-2)/2       28: |(3x-1)/2|     29: |(3x-2)/2|              30: x/0.32-0.78125 31: 2*x-0.84       32: 4x;1;-2x+1.84;x/0.08-11.5         33: |2*x - 0.5|    34: 2*x            35: 2*x - 0.5               36: 2*x - 1               * negative numbers mean inverted=negative colour component       * thus the ranges in `set pm3d rgbformulae' are -36..36      For this specific map the RGB component behaves as in the graph passing from the minimum (rgb=(0,0,0) black) to the maximum (rgb=(1,1,0) yellow) of the palette. I add also the palette so you can see the correspondence with the graph. ![enter image description here](http://i.stack.imgur.com/HZ3gI.png) ![enter image description here](http://i.stack.imgur.com/NTuxJ.png) Is there a way of specify colormap functions also in `pgfplots` or it is only possible to have linear interpolation between colors?


title: Logbook for daily activity with automatic hour count

text: I am writing a logbook at work in which I note down when I started, left and how much of a break I took in between. I do this for every day, but I would like to use the result to display it in a table at the end of the file. So basically I would like to store the individual numbers in an array style as in matlab or python (I have tried the embedded python environment in LaTeX). Then I want to display the hours over every day and then later on in a table at the end of the file. I furthermore want to summarize after each week and month what I have done in that interval without having to do it all by hand. So far, I do something like this:               \documentclass[a4paper,oneside,10pt]{scrreprt}     \usepackage[nomessages]{fp}% http://ctan.org/pkg/fp     \newcommand{\week}{0}     \newcommand{\total}{0}          \section{September 2013}          \newcommand{\start}{9} \newcommand{\finish}{18.30} \newcommand{\brk}{1}     \FPeval{\day}clip(\finish - \start - \brk)}     \FPeval{\week}{clip(\week + \day)} \FPeval{\total}{clip(\total + \day)}     \paragraph{02. September 2013, Mon - \start /\finish (-\brk h) $\rightarrow$ \day h}     \begin{itemize}     \item did this     \item did that     \end{itemize}          \end{document}


title: TikZ arrow emanating from node at an angle for a distance

text: How do I draw a line of length `l` and at an angle of `a` from a circular node `N` in TikZ?