title: Change display style in xlop package

text: I recently discovered the package xlop to typeset automatically elementary school calculations. Using this for division for example like this, gives the output below.               \documentclass{article}          \usepackage{xlop}          \begin{document}             \opdiv[period=true,voperation=top,displayintermediary=all,decimalsepsymbol={,},shiftdecimalsep=none,maxdivstep=30]{54.60}{28}          \end{document}      ![Output of xlop](http://i.stack.imgur.com/7o7TD.png) However I want the display style like this: ![Desired Display Style](http://i.stack.imgur.com/gSjuZ.png) The part I marked manually is important, i.e. the ": 28 = 1,95" instead of the way xlop displays the divisor and the result. Additionally I want the vertical line and the right horizontal line in the xlop output to disappear. I guess that there is no switch in xlop to to this so I checked the source code of xlop and wanted to modify a part of it (in my document between a `makeatletter` and `makeatother` pair). I managed it to realize that the display thing is done in the macro `\op@divdisplayone`. Let me quote it here (I added comments at the lines which seems to be relevant):               \def\op@divdisplayone{%       \begingroup         \op@count@z=\z@\relax         \op@count@i=\OP@a@w         \loop         \ifnum\@nameuse{OP@a@\the\op@count@i}=0           \advance\op@count@i by-1           \advance\op@count@z by1         \repeat         \op@count@i=\op@firstlength         \advance\op@count@i by\op@count@z         \xdef\op@firstlength{\the\op@count@i}%         \setbox2=\vbox{%           \op@count@i=\op@firstlength           \advance\op@count@i by1           \hbox{%             \ifx\op@displayintermediary\op@string@none\else     % add 0.25               \ifx\op@displayintermediary\op@string@None\else     % end add 0.25                 \kern\opcolumnwidth                 \advance\op@count@i by1     % add 0.25               \fi     % end add 0.25             \fi             \ifop@dividendbridge               \vrule width0pt depth0pt height\oplineheight               \opvline(0,1){0.4}%               \ophline(0,1){\op@firstlength}%               \opvline(\op@firstlength,1){0.4}%             \fi             \op@display{operandstyle.1}{a}%             \ifnum\op@shift=0\relax\else               \op@count@v=\op@shift               \advance\op@count@v by\OP@a@d               \oplput(-\the\op@count@v,0){\op@strikedecimalsepsymbol}%             \fi           }%           \op@count@z=\OP@q@w           \op@count@ii=1\relax           \ifx\op@displayintermediary\op@string@none             \advance\op@count@i by-1\relax     % add 0.25           \else\ifx\op@displayintermediary\op@string@None             \advance\op@count@i by-1\relax     % end add 0.25           \else             \op@count@iv=\@nameuse{OP@q@\the\op@count@z}\relax             \op@count@iii=\op@count@i             \advance\op@count@iii by-\@nameuse{OP@T\the\op@count@iv @w}%             \hbox{%               \ifx\op@voperator\op@string@center                 \oplput(0,0.5){\op@subsymbol}%               \else\ifx\op@voperator\op@string@top                 \oplput(0,1){\op@subsymbol}%               \else                 \oplput(0,0){\op@subsymbol}%               \fi\fi               \ophline(1,-0.25){\op@firstlength}%               \advance\op@count@ii by1               \kern\op@count@iii\opcolumnwidth               \op@display{intermediarystyle.1}%                          {T\the\op@count@iv}%             }%     % modif 0.25           \fi\fi     % end modif 0.25           {\global\setbox4=\hbox{}\setbox4=\box4}%           \loop             \advance\op@count@z by-1             \advance\op@count@i by1\relax           \ifnum\op@count@z>0\relax             \op@count@iv=\@nameuse{OP@q@\the\op@count@z}\relax             \ifnum\op@count@iv=0               \ifx\op@displayintermediary\op@string@all                 \op@count@v=\op@count@i                 \advance\op@count@v by-\@nameuse{OP@R\the\op@count@ii @w}%                 \hbox{%                   \kern\op@count@v\opcolumnwidth                   \op@display{remainderstyle.\the\op@count@ii}%                              {R\the\op@count@ii}%                 }%                 \op@count@iii=\op@count@i                 \advance\op@count@iii by-\@nameuse{OP@T\the\op@count@iv @w}%                 \hbox{%                   \kern\op@count@v\opcolumnwidth                   \ifx\op@voperator\op@string@center                     \oplput(-1,0.5){\op@subsymbol}%                   \else\ifx\op@voperator\op@string@top                     \oplput(-1,1){\op@subsymbol}%                   \else                     \oplput(-1,0){\op@subsymbol}%                   \fi\fi                   \ophline(0,-0.25){\@nameuse{OP@R\the\op@count@ii @w}}%                   \kern-\op@count@v\opcolumnwidth                   \kern\op@count@iii\opcolumnwidth                   \op@display{intermediarystyle.\the\op@count@ii}%                              {T\the\op@count@iv}%                 }%               \else                 \ifnum\@nameuse{OP@R\the\op@count@ii @w}=2                   \ifnum\@nameuse{OP@R\the\op@count@ii @2}=0                     \op@makebox{1}{0}{remainderstyle.\the\op@count@ii.1}{zero}%                     \setbox4=\hbox to\opcolumnwidth{\hss\box0\hss}%                   \fi                 \fi               \fi               \advance\op@count@ii by1\relax             \else               \op@count@v=\op@count@i               \advance\op@count@v by-\@nameuse{OP@R\the\op@count@ii @w}%               \ifvoid4\relax\else                 \advance\op@count@v by-1               \fi               \hbox{%                 \kern\op@count@v\opcolumnwidth\copy4                 \op@display{remainderstyle.\the\op@count@ii}%                            {R\the\op@count@ii}%               }%               \advance\op@count@ii by1\relax               \ifx\op@displayintermediary\op@string@none     % add 0.25               \else\ifx\op@displayintermediary\op@string@None     % end add 0.25               \else                 \op@count@iii=\op@count@i                 \advance\op@count@iii by-\@nameuse{OP@T\the\op@count@iv @w}%                 \hbox{%                   \kern\op@count@v\opcolumnwidth                   \ifx\op@voperator\op@string@center                     \oplput(-1,0.5){\op@subsymbol}%                   \else\ifx\op@voperator\op@string@top                     \oplput(-1,1){\op@subsymbol}%                   \else                     \oplput(-1,0){\op@subsymbol}%                   \fi\fi                   \advance\op@count@ii by-1                   \ifvoid4\relax                     \ophline(0,-0.25){\@nameuse{OP@R\the\op@count@ii @w}}%                   \else                     \ophline(0,-0.25){\@nameuse{OP@T\the\op@count@iv @w}}%                     \ophline(\@nameuse{OP@T\the\op@count@iv @w},-0.25){1}%                     {\setbox4=\box4}%                   \fi                   \advance\op@count@ii by1                   \kern-\op@count@v\opcolumnwidth                   \kern\op@count@iii\opcolumnwidth                   \op@display{intermediarystyle.\the\op@count@ii}%                              {T\the\op@count@iv}%                 }%     % modif 0.25               \fi\fi     % end modif 0.25             \fi           \repeat           \advance\op@count@i by-1           \op@count@iii=\op@count@i           \advance\op@count@iii by-\@nameuse{OP@R\the\op@count@ii @w}%           \hbox{%             \kern\op@count@iii\opcolumnwidth             \op@display{remainderstyle.\the\op@count@ii}%                        {R\the\op@count@ii}%           }%         }%         \setbox3=\vbox{%           \op@count@v=\op@max{\OP@qq@w}{\OP@b@w}           \hbox{\ophline(-0.5,-0.25){\the\op@count@v.5}%                 \op@display{operandstyle.2}{b} %%This seems to be the divisor             \ifnum\op@shift=0\relax\else               \op@count@v=\op@shift               \advance\op@count@v by\OP@b@d               \oplput(-\the\op@count@v,0){\op@strikedecimalsepsymbol}%             \fi}           \hbox{\op@display{resultstyle}{qq}} %%This seems to be the result         }%         \dimen0=\ht2         \ifdim\dimen0>\ht3           \ht3=\ht2         \else           \ht2=\ht3         \fi         \ifx\op@voperation\op@string@top           \dimen0=\ht2           \advance\dimen0 by-0.5\oplineheight           \ht2=0.75\oplineheight           \ht3=0.75\oplineheight           \dp2=\dimen0           \dp2=\dimen0         \fi         \setbox1=\hbox{%           \box2           \kern0.5\opcolumnwidth           \kern-0.5\op@hrulewidth           \ifx\voperation\op@string@top             \vrule width\op@hrulewidth           \else             \vrule width\op@hrulewidth           \fi           \kern0.5\opcolumnwidth           \kern-0.5\op@hrulewidth           \box3         }%         \ifx\op@voperation\op@string@center           \setbox1=\hbox{$\vcenter{\box1}$}%         \fi         \leavevmode\box1       \endgroup     }     \def\op@div#1#2#3#4#5{%       \begingroup         \def\op@divmode{#1}%         \op@copy{#2}{da}%         \op@copy{#3}{db}%         \op@count@iv=0         \op@count@iii=\op@max{\OP@da@d}{\OP@db@d}\relax         \op@powten{da}{\the\op@count@iii}%         \op@powten{db}{\the\op@count@iii}%     % add 0.23         \op@unzero{da}%         \op@unzero{db}%     % end 0.23         \ifnum\op@divmode=1           \op@cmp{da}{maxinteger}%           \ifopgt             \op@warning{I can't deal period with such great dividend                         (max = 2147483647).^^J                         Use of maxdivstep instead period.}%             \def\op@divmode{0}%           \else \op@cmp{db}{maxdivperiod}%           \ifopgt             \op@warning{I can't deal period with such great divisor                         (max = 214748363).^^J                         Use of maxdivstep instead period.}%             \def\op@divmode{0}%           \else             \op@unsplit{da}{@a}%             \op@unsplit{db}{@b}%             \op@divperiod{\Op@@a}{\Op@@b}{op@lengthperiod}%             \ifnum\op@lengthperiod>\op@safedivstep               \op@warning{Period of division is too big                           (\op@lengthperiod\space > safedivstep).^^J                           \space\space\space Division will stop                           before reach it.}%             \fi           \fi\fi         \fi         \op@multable{db}%         \op@copy{da}{R}%         \op@cmp{da}{db}%         \ifople           \op@count@i=\OP@da@w         \else           \xdef\OP@R@d{0}%           \xdef\OP@R@s{0}%           \op@count@i=\@nameuse{OP@db@w}%           \op@leftdividend{\the\op@count@i}%           \op@cmp{R}{db}%           \ifoplt             \ifnum\OP@da@w>\op@count@i               \advance\op@count@i by1               \op@leftdividend{\the\op@count@i}%             \fi           \fi         \fi         \xdef\op@firstlength{\the\op@count@i}%         \op@count@i=-\op@count@i         \advance\op@count@i by\OP@da@w         \op@copy{R}{R0}%         \op@copy{zero}{dq}%         \op@count@ii=0         \op@againtrue         \loop         \ifop@again           \op@tableextract{R}%           \op@multen{dq}%           \@namexdef{OP@dq@1}{\op@k}%           \op@sub{R}{T\op@k}{dr}%           \op@unzero{T\op@k}%           \op@multen{dr}%           \ifnum\op@count@i>0             \@namexdef{OP@dr@1}{\@nameuse{OP@da@\the\op@count@i}}%           \fi           \advance\op@count@i by-1\relax           \op@unzero{dr}%           \ifnum\OP@dr@w=1             \xdef\OP@dr@w{2}%             \xdef\OP@dr@i{2}%             \@namexdef{OP@dr@2}{0}%           \fi           \advance\op@count@ii by1\relax           \op@copy{dr}{R\the\op@count@ii}%           \op@copy{dr}{R}%           \ifcase\op@divmode\relax             \ifnum\op@count@ii<\op@maxdivstep\relax\else               \op@againfalse             \fi             \ifnum\op@count@i<0\relax%               \op@cmp{zero}{R}%               \ifopeq                 \op@againfalse               \fi             \fi           \or             \ifnum\op@count@ii<\op@safedivstep\relax\else               \op@againfalse             \fi             \ifnum\op@count@i<-\op@lengthperiod\relax               \op@count@iv=\op@count@ii               \advance\op@count@iv by-\op@lengthperiod               \op@cmp{R\the\op@count@iv}{R\the\op@count@ii}%               \ifopeq                 \op@againfalse               \fi             \fi           \or             \ifnum\op@count@i=-1               \op@againfalse             \fi           \fi         \repeat         \op@copy{zero}{T0}%         \advance\op@count@i by1\relax         \ifnum\op@count@i<0           \xdef\OP@dq@d{-\the\op@count@i}%           \op@count@z=\OP@dq@w           \advance\op@count@z by\op@count@i           \xdef\OP@dq@i{\the\op@count@z}%         \fi         \op@unzero{dq}%         \op@copy{dq}{#4}%         \op@unzero{dr}%         \op@copy{dr}{R}%         \op@rshift{1}{dr}%         \op@copy{dr}{R\the\op@count@ii}%         \op@count@i=\op@count@iii         \advance\op@count@i by1         \advance\op@count@i by\OP@dq@d\relax         \op@count@ii=\op@count@i         \advance\op@count@ii by\OP@R@w         \op@format{\the\op@count@ii}{0}{R}%         \op@count@z=\OP@R@w         \advance\op@count@z by-\op@count@i         \xdef\OP@R@i{\the\op@count@z}%         \xdef\OP@R@d{\the\op@count@i}%         \op@unzero{R}%         \op@copy{R}{#5}%       \endgroup     }      However I am just a LaTeX user and don't know too much about TeX itself. However for me it seems to be a minor modification for someone who knows TeX, so I hope that someone can tell my how to achieve the desired display style.


title: Is it possible to define transduration for frames created with allowframebreaks?

text: is there any way to define transduration for the whole bibliography? The following doesn't work, just the first of the created frames has the expected behavior.               \begin{frame}[allowframebreaks]{Bibliography}       \transduration{2}       \bibliographystyle{plainnat}       \bibliography{literature}     \end{frame}


title: colored dotplot with pgfplots

text: How can I control the color of a dotplot created with `pgfplots`? I tried the `point meta` key, but apparently I did not get it right, since it is not respected. \begin{edit}   I would also like to have control over what colors to use.   \end{edit} Here is what I get: ![](http://i.stack.imgur.com/qSqP5.png) Here is what I want (via gimp): ![enter image description here](http://i.stack.imgur.com/WURu3.png) And here follows the code:               \documentclass{article}               %% -------- %%     %% the data %%     %% -------- %%     \begin{filecontents}{data.tsv}     number  name    point   error_l error_r     6   foo -0.017  0.1 0.096     5   bar 0.035   0.1 0.100     4   baz 0.383   0.1 0.106     3   tmp 0.202   0.1 0.176     2   wee 0.171   0.1 0.100     1   lot 0.270   0.1 0.120     \end{filecontents}               %% -------- %%     %% packages %%     %% -------- %%     \usepackage{pgfplotstable}     \usepackage{pgfplots}                              \begin{document}          %% ------------- %%     %% read the data %%     %% ------------- %%     \pgfplotstableread{data.tsv}\data               %% ------------- %%     %% plot the data %%     %% ------------- %%     \begin{tikzpicture}%       \begin{axis}[         y=\baselineskip,%         scale only axis,%         width=10cm,%         xmin=-1,%         xmax=1,%         ymin=0.2,%         ymax=6.4,%         axis y line*=none,%         ytick=\empty,%         axis x line*=bottom]         \addplot+[only marks,%                   point meta=explicit,%           <<<<< does not work                   error bars/.cd,%                   x dir=plus,%                   x explicit,%                   error mark=none,%                   error bar style={line width=1pt}]%             table[x=point,y=number,x error=error_r,meta=number]{\data};         \addplot+[only marks,%                   point meta=explicit,%           <<<<< does not work                   error bars/.cd,%                   x dir=minus,%                   x explicit,%                   error mark=none,%                   error bar style={line width=1pt}]%             table[x=point,y=number,x error=error_l,meta=number]{\data};       \end{axis}%     \end{tikzpicture}%               \end{document}


title: Mimicking the Microtype documentation

text: One of the nicest LaTeX examples I have seen is the Microtype documentation. The `.dtx` file is available here and I have been trying to recreate a document looking like this. Unfortunately it's not super clear to me how to recreate a similar document from the `.dtx` file. I am using               \documentclass[10pt,a4paper]{ltxdoc}      which is straight from the `.dtx` file. Is that the package from the original `.tex` file? I'm also interested in recreating the color scheme and margin notes!


title: How to include pdfpage with subsection written on top?

text: I am using pdfpages package and I have a 3 page document of pdf I want to insert into my main document. But the problem is I can't get the subsection heading to show on the top of the page before the pdf file is inserted ONLY ONCE. I used pagecommand but what that does is for everypage it writes out the subsection at the top. Here is the code im using Here is the code I am using               \usepackage{pdfpages}     ...     \includepdf[pages=-,pagecommand=\subsection{List of use cases}]{SE2.pdf}      What am i doing wrong?


title: tabularx option in tcolorbox

text: I'd like to use the recently introduced (in version 2.10) `tabularx` key for the `tcolorbox` package. The key is documented in the `tcolorbox` documentation, section 3.6, paragraph `/tcb/tabularx`, page 28. I have the latest versin of the package (2.20). I can't seem to reproduce the examples given there nor a simplified one like this:               \documentclass{article}     \usepackage{array,tabularx}     \usepackage{tcolorbox}     \begin{document}          \begin{tcolorbox}[tabularx={X|X},title=table]     cell A & Cell B\\\hline     cell C & Cell D     \end{tcolorbox}          \end{document}      What I got is an `undefined control sequence` error in `\begin{tcolorbox}[tabularx={X|X},title=table]` and this output: ![enter image description here](http://i.stack.imgur.com/q4Hy2.png) The colorname printed in the left side is the default value of the `colframe` option, i.e., if you add `colframe=red` in the tcolorbox options, the word "red" will be printed out. Am I hitting a bug or did I miss something?


title: how to text-wrap an image in latex

text: how to text-wrap an image in LaTeX. Ex: In technical documents, authors names will be text wrapped tights, with their images. can someone help me....its urgent for my paper submission.


Below is part of my code.               \documentclass[11pt,table,a5paper]{article}     \usepackage{array,ragged2e}     \usepackage{graphicx}     \usepackage[framemethod=TikZ]{mdframed}     \usepackage{lipsum}     \usepackage[top=2cm, bottom=2cm, outer=1cm, inner=2.1cm,twoside, headsep=16pt]{geometry}     \usepackage{ifthen}      \usepackage{wrapfig}     \usepackage{comment}     \usepackage{parskip}     \usepackage{framed}     \usepackage{sidecap}     \renewcommand{\familydefault}{\sfdefault}     \usepackage[T1]{fontenc}     \usepackage{tikz}     \usepackage{lipsum}      \usepackage{url}     \usepackage[utf8]{inputenc}     \usepackage{fancyhdr}     \usepackage{transparent}     \usepackage{hyphenat}     \usepackage{bm}     \newcommand{\+}{\discretionary{\mbox{${\bm\cdot}\mkern-1mu$}}{}{}}     \usepackage{microtype}     \usepackage{xstring}     \usepackage{forloop}     \usepackage{collcell}     \usepackage{longtable}     \usepackage{makecell}     \usepackage{varwidth}      \usepackage{textcomp}     \usepackage{enumitem}     \usepackage[T1,T2A]{fontenc}     \usepackage{CJKutf8}     \usepackage{alltt}     \usepackage{caption}     \captionsetup{skip=5pt,font=footnotesize}     \usepackage[labelformat=empty]{caption}     \usepackage{needspace}     \usepackage{setspace}        \singlespacing     \raggedbottom     \usepackage{keyval}% http://ctan.org/pkg/keyval     \makeatletter     \newlength{\mylist@beforeskip}     \newlength{\mylist@afterskip}          \define@key{mylist}{beforeskip}{\setlength{\mylist@beforeskip}{#1}}     \define@key{mylist}{afterskip}{\setlength{\mylist@afterskip}{#1}}     \newenvironment{mylist}[1][,]      {\setkeys{mylist}{beforeskip=10pt,afterskip=10pt,#1}%     \par\vspace*{\mylist@beforeskip}%     \begin{itemize}}     {\end{itemize}%     \vspace*{\mylist@afterskip}}     \makeatother     \usepackage{etoolbox,graphicx}% http://ctan.org/pkg/{etoolbox,graphicx}     \newcommand{\addstufftotoc}[2][toc]{% \addimagetotoc[<toc>]{<stuff>}     \addtocontents{#1}{#2}}     \makeatletter     \patchcmd{\l@section}% <cmd>     {\begingroup}% <search>     {\begingroup\normalfont\Large\bfseries}% <replace>     {}{}% <success><failure>     \makeatother               \usepackage{etoolbox}     \newcounter{cnt}     \newcommand\textlist{}     \newcommand\settext[2]{%     \csdef{text#1}{#2}}     \newcommand\addtext[1]{%     \stepcounter{cnt}%     \csdef{text\thecnt}{#1}}     \newcommand\gettext[1]{%     \csuse{text#1}}     \newcounter{colnum}     \newcommand\maketabularrow[1]{%     \setcounter{colnum}{0}%     \whileboolexpr     { test {\ifnumcomp{\value{colnum}}{<}{#1}} }%      {&\stepcounter{colnum}\thecolnum}     }     %        \def\hlinewd#1{%     \noalign{\ifnum0=`}\fi\hrule \@height #1 %     \futurelet\reserved@a\@xhline}      \newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}     \begin{document}     \tableofcontents     \begin{mdframed}[roundcorner=0pt,leftmargin=0, rightmargin=0, linecolor=gray,outerlinewidth=.1, innerleftmargin=0, innerrightmargin=0, innertopmargin=0,innerbottommargin=0, everyline = true, splittopskip=.6cm, splitbottomskip=.3cm]      \end{mdframed}      \small      \leavevmode      \newline      \leavevmode      \newline      \scriptsize       \addcontentsline{toc}{section}{\protect\numberline{}AAA}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[trim=0.6cm 4.5cm 0cm 1cm, clip=true,width=1.0\linewidth]{./tmp/AAA.pdf}\par}      \leavevmode      \newline      \\      }      \newpage           \end{document}linecolor=goldenpoppy      I got this error message.               Underfull \hbox (badness 10000) in paragraph at lines 295--307               Underfull \vbox (badness 10000) detected at line 323     ! TeX capacity exceeded, sorry [input stack size=30000].     \par ->\@restorepar                      \everypar {}\par \@endpefalse      l.329 ..../tmp/image.pdf}\par}          !  ==> Fatal error occurred, no output PDF file produced!      I found many replies for the similar question but none of the answer solve my pblm.


title: Insert jpg image in the margin of beamer slide

text: I am using the Goettingen theme (beamer). I want to insert a jpg file in the margin (bottom right) of the current frame. I also want the image to be semi- transparent. Please help.


title: Associate array of returns of commands

text: I'm trying to get strings from an external program, as shown in this example:               \documentclass{article}       \usepackage{fontspec}       \usepackage{xunicode}       \newcounter{verse}       \stepcounter{verse}       \immediate\write18{/home/rpinson/bas/tex/diatheke2tex "Jn 3:16" "FreMartin" "\roman{verse}" "\jobname.verses"}       \begin{document}       \input{\jobname.verses}       \versei     \end{document}      Where `diatheke2tex` is:               #!/bin/bash          REF="$1"     VERSION="$2"     ID="$3"     FILE="$4"          echo "\\newcommand\\verse${ID}{%" >> $FILE          diatheke -o plain -b "$VERSION" -k "$REF" | \       head -n -1 | \       sed -e 's/^[^:]\+ [0-9:]\+://' >> $FILE          echo "}" >> $FILE      The `\versei` is kind of a hack, as it's not possible to use spaces and numbers in a macro name. Obviously, this is not a proper solution… How can I build an associative array of some sort associating references (like `Jn 3:16`) to the result of the command (in this case `Car Dieu a tant aimé le monde, qu'il a donné son Fils unique, afin que quiconque croit en lui ne périsse point, mais qu'il ait la vie éternelle.`)?


title: Numbering tables A1, A2, etc in Latex

text: I have main tables and appendix tables in my paper. I would like to number the appendix tables "A1", "A2", "A3", etc OR, at the very least, re-start the table numbering at 1 in the appendix. Any suggestions on how to do that?


title: Verbatim in environ’s \BODY

text: I’d like to print a TeX install guide for different OS, but the most text is the same for all OS. So I build the following               \documentclass{article}          \usepackage{environ}     \newcommand{\mlw}[3]{}     \NewEnviron{multichaps}{%        \renewcommand{\mlw}[3]{##1}%        \BODY        \renewcommand{\mlw}[3]{##2}%        \BODY        \renewcommand{\mlw}[3]{##3}%        \BODY     }          \begin{document}     \begin{multichaps}     \section{Installation on \mlw{Mac}{Windows}{Linux}}     Now it's time to test the system. Create a file     test.tex with the follwoing content.     \begin{verbatim}     \documentclass{article}          \begin{document}     Hallo World!     \end{document}     \end{verbatim}     Now open your \mlw{Terminal}{Command Promt}{Terminal}     and call \verb+pdflatex test+     \end{multichaps}     \end{document}      With `\mwl` I can set text to appear only in the text of one OS or different texts for different OS. Everything works fine but it crashes when I try to use `verbatim` inside the body. Is it possible to do this or are there other ways to do something like this?


title: How to draw circle using 'xypic ' package?

text: I have little knowledge about the package `xypic`. I am stuck with the following problems:   1. I cannot able drow a circle with radius BC, centered at C.   2. I want to draw the five dots on the line.   3. For better looking I want to draw the points 2, 1, 0, -1 and -2 as well as A, B, C, D and E out side the line. Here is my effort:               \documentclass{article}     \usepackage{xypic}     \begin{document}     \xymatrix{     \ar[dddddd] \\     .2 & & & & &\\     .1 & & &D & & \\     .0 \ar[r]^p & \ar[rrrr] &A  & C &B &\\     .-1& & &E \\     .-2 & & &\ar[uuuu]\\     \ar[uuuuuu]     }     \end{document}


title: Is there a difference between \bot and \perp, when they are used in exponent?

text: I am used to write `$M^\bot$` for the orthogonal complement of the set M. Is this incorrect? I have seen this question, the answer there says that these two symbols have different spacing. (One of them is treated as relation. Does this difference manifest in some way when the symbols are used at exponent (without any other symbols around them). * * * I have tried to search a little to find out whether there are other people which use \bot in the same way I do. You can judge for yourself, but I found some occurrences of this.   * "\bot" "\oplus"   * "\bot" "\oplus" filetype:tex   * "V^\bot" complement   * "S^\bot" complement Here are the same searches with perp instead of bot:   * "\perp" "\oplus"   * "\perp" "\oplus" filetype:tex   * "V^\perp" complement   * "S^\perp" complement


title: Dynamic Table/Multirow with xstring macro

text: i'm getting a little bit lost with the following. As i'm quite new to using TeX for more than just typesetting, i hope to get some help here. I already searched this forum for some helpful posts and found many of them, but i didn't got all problems solved i ran into. What i want to do is to automatically typeset a list of IP addresses and the corresponding FQDNs into a table. It should look like:               Source: IP1:FQDN1;IP2:FQDN2;...                 |  IP1   FQDN1     Hosts  |  IP2   FQDN2            |  ...   ...      Here's what i tried to do (shortened down the code to the essential piece):               \documentclass{article}     \usepackage{xstring}     \usepackage{multirow}          \begin{document}     % test input     \newcommand{\myinput}{IP1:FQDN1;IP2:FQDN2}          \newcommand{\splitstring}[1]{       % split input into table rows       \ifx\@empty#1\else       \saveexpandmode\expandarg       % split column elements with leading & (after multirow)       \StrSubstitute{\tmp}{;}{\empty\\&}[\tmp] % fails with: forbidden control sequence found while scanning use of \@xs@next       % split row elements       \StrSubstitute{#1}{:}{&}[\tmp]       \restoreexpandmode\tmp     }          \begin{tabular}{l|ll}       % StrCount fails (Missing number, treated as zero)       \multirow{\StrCount{\myinput}{:}}{*}{Hosts} & \splitstring{\myinput}     \end{tabular}     \end{document}      [Edit] Some additional information: Changing the line                \StrSubstitute{\tmp}{;}{\empty\\&}[\tmp]      to                \StrSubstitute{\tmp}{;}{\empty\\}[\tmp]      (removing the &) makes this step build without errors. The output looks like this:                       |  IP1   FQDN1       Hosts  |       IP2   |  FQDN2      As you can see the & is needed for correct alignement in the table. I'm wondering why the substitution of ":" by "&" works without error, but this one fails. No further news on feeding the StrCount output into the multirow-environment. [/Edit] I'm not sure if i can use the output from the xstring-functions for typesetting or if they can be converted to be used as parameters. Any help is greatly appreciated.


title: Biblatex-apa: No change of citation with three authors to "et al." ("/u.a." in german) after first citing the source

text: in my doc, biblatex-apa seems not to change citation-style to "et al." for a source with three authors after first citing that source, if there are other citations in between. So, when citing the source the first time it should be "(Stroebe, Nijstad & Rietzschel, 2010)" and the second time "(Stroebe et al., 2010)". With four authors, it's working as intended in my doc. I compared the entries in the .bib and found nothing wrong. I tried to search for that problem some hours and surprisingly haven't found any entries refering to this problem with up-to-date version of biblatex-apa. I am totally new to LaTex and just don't know, what else to do. What am I doing wrong? I'm using MikTex 2.9, biblatex-apa v1.7 with biber v0.9.9 Here is an example:               \documentclass[a4paper,12pt,oneside,parskip=half]{scrreprt}     \listfiles     \usepackage[american, ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{csquotes}     \usepackage[backend=biber,style=apa,babel=other]{biblatex}     \DeclareLanguageMapping{german}{german-apa}     \addbibresource{minibib.bib}      \begin{document}          \parencite{Stroebe2010}.\\     %\parencite{Stroebe2004}?\\ % excluding this, the subsequent citation becomes "et al."     \parencite{Stroebe2010}.          \printbibliography[heading=bibnumbered]     \end{document}      My .bib exported from Mendeley is as follows:               @article{Stroebe2010,     annote = {      },     author = {Stroebe, Wolfgang and Nijstad, Bernard A and Rietzschel, Eric F},     editor = {Psychology, Mark P Zanna and James M Olson B T - Advances in Experimental Social},     isbn = {0065-2601},     journal = {Advances in Experimental Social Psychology},     pages = {157--203},     publisher = {Academic Press},     title = {{Beyond Productivity Loss in Brainstorming Groups: The Evolution of a Question}},     url = {http://www.sciencedirect.com/science/article/pii/S006526011043004X},     volume = {Volume 43},     year = {2010}     }     @article{Stroebe2004,     author = {Stroebe, Wolfgang and Nijstad, Bernard A},     doi = {10.1026/0033-3042.55.1.2},     file = {:C$\backslash$:/Users/Rico/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Stroebe, Nijstad - 2004 - Warum Brainstorming in Gruppen Kreativit\"{a}t vermindert.pdf:pdf},     issn = {0033-3042},     journal = {Psychologische Rundschau},     keywords = {1953,brainstorming,creativity,ein einflussreiches buch,ein halbes jahrhundert vor,erscheinen dieses artikels,group processes,group productivity,in dem er ein,osborn,social cognition,verfahren zum,ver\"{o}ffentlichte der werbefachmann alex},     month = jan,     number = {1},     pages = {2--10},     title = {{Warum Brainstorming in Gruppen Kreativit\"{a}t vermindert: Eine kognitive Theorie der Leistungsverluste beim Brainstorming}},     url = {http://psycontent.metapress.com/openurl.asp?genre=article\&id=doi:10.1026/0033-3042.55.1.2},     volume = {55},     year = {2004}     }      Thank you very much for your answers!


title: Drawing 3d circuit diagram

text: I've started using tikz only few weeks ago and find it utmost useful todraw beautiful picutres.But now i'm a bit stuck on a 3d circuit which should resemble the physical structure and hope the experts here can help me on my little problem. This is what i got so far: ![enter image description here](http://i.stack.imgur.com/hKWsP.jpg) The Problem is that the circuit nodes are not drawn as 3d which looks unplesant. As I understand tikz it only transforms coordinates, therefore nodes will always be drawn as 2d. Is this correct? an if so, is there a way to change this? I also thought about drawing the resistors by hand, however, I don't know how to spezifie planes accept for xy etc. (e.g. canvas is plane xz at z=0).                   \begin{tikzpicture}[scale=0.7,         x={({cos(20)*1cm},{sin(20)*1cm})},y={({cos(160)*1cm},{sin(160)*1cm})}, z={(0cm,1cm)},         point/.style={minimum  size=1pt,inner  sep=2pt, circle, draw, red},         cont/.style={contact, draw, thick},         circuit ee IEC,         thick,         ]              %untere Kreise mit intersectionpaths         \draw[name path=CUA,dashed, thin] (0,0,0) circle(6);         \draw[name path=CUI] (0,0,0) circle(1);         \path[name path=L0] (0,0) -- ++(60:6.5);         \path[name path=L1] (0,0) -- ++(-60:6.5);         \path[name path=L2] (0,0) -- ++(-180:6.5);              %obere kreise mit intersection paths         \draw[name path=COA, dashed,thin] (0,0,8) circle(6);         \draw[name path=COI] (0,0,8) circle(1);         \path[name path=L4] (0,0,8) -- ++(60:6.5);         \path[name path=L5] (0,0,8) -- ++(-60:6.5);         \path[name path=L6] (0,0,8) -- ++(-180:6.5);              %untere intersectionpoints         \path[name intersections={of=CUA and L0}] (intersection-1) node[cont, name = IUA0] {};         \path[name intersections={of=CUA and L1}] (intersection-1) node[cont, name = IUA120] {};         \path[name intersections={of=CUA and L2}] (intersection-1) node[cont, name = IUA240] {};         \path[name intersections={of=CUI and L0}] (intersection-1) node[cont, name = IUI0] {};         \path[name intersections={of=CUI and L1}] (intersection-1) node[cont, name = IUI120] {};         \path[name intersections={of=CUI and L2}] (intersection-1) node[cont, name = IUI240] {};              %obere intersectionpoints         \path[name intersections={of=COA and L4}] (intersection-1) node[cont, name = IOA0] {};         \path[name intersections={of=COA and L5}] (intersection-1) node[cont, name = IOA120] {};         \path[name intersections={of=COA and L6}] (intersection-1) node[cont, name = IOA240] {};         \path[name intersections={of=COI and L4}] (intersection-1) node[cont, name = IOI0] {};         \path[name intersections={of=COI and L5}] (intersection-1) node[cont, name = IOI120] {};         \path[name intersections={of=COI and L6}] (intersection-1) node[cont, name = IOI240] {};              \draw[small  circuit  symbols]  (IUA0)  to  [resistor]  (IUI0);         \draw  (IUA120)  to  [resistor]  (IUI120);         \draw  (IUA240)  to  [resistor]  (IUI240);              \draw[small  circuit  symbols]  (IUI0)  to  [resistor={near start, fill=white}, resistor={near end}]  (IOI0);         \draw  (IUI120)  to  [resistor] ++(0,0,4) to [resistor] ++(0,0,2) to (IOI120);         \draw  (IUI240)  to  [resistor={fill=white}] ++(0,0,4) to [resistor] ++(0,0,2) to (IOI240);              \draw[small  circuit  symbols]  (IUA0)  to  [resistor={near start}]  (IOA0);         \draw  (IUA120)  to  [resistor]  (IOA120);         \draw  (IUA240)  to  [resistor={fill=white}]  (IOA240);              \draw[small  circuit  symbols]  (IOA0)  to [voltage  source={near start, direction  info={<-}, info=$I_1w$}, resistor={near end}] (IOI0);         \draw  (IOA120)  to  [voltage  source={near start, direction  info={<-}, info=$I_2w$}, resistor={near end}]  (IOI120);         \draw  (IOA240)  to  [voltage  source={near start, direction  info={<-}, info=$I_3w$}, resistor={near end, fill=white}]  (IOI240);              \end{tikzpicture}


title: Customizing indexentry

text: I am trying to create an index manually, where each index entry refers to a page and the corresponding chapter. So basically I am creating my own idx file, then use Latex's MakeIndex functionality to get ind file, and then produce the corresponding PDF file. So my tex file simply looks like:               \documentclass[a4paper,10pt]{extarticle}     \usepackage[10pt]{extsizes}     \usepackage{makeidx}     \begin{document}     \printindex     \end{document}      My idx file has entries as follows:               \indexentry{Aims of regulation}{3}     \indexentry{Cost of regulation}{4}      Now I was wondering how to edit my indexentry command to allow for a chapter number, so the index looks something like: Aims of regulation, ...... Ch5.p3 Cost of regulation, ....... Ch5.p4 I was trying to use:               \indexentry{Aims of regulation}{Ch5.p3}     \indexentry{Cost of regulation}{Ch5.p4}      but that doesn't work since I assume only numbers are accepted. My aim is simply to make use of MakeIndex so a sorted .ind file is created automatically, which I then simply print to a PDF file. Any suggestions? Thanks.


title: Beamer: define a backgroung color for the "part page" frames

text: I'm trying to make a .sty template, but I cannot figure out how to define a dedicated background canvas for the "part page" frames. Here (How to add background only to title frame and an other only to the last frame?) is a solution for when it is possible to characterize the background depending on the frame number, but it cannot be applied in my situation. So is there a way to test the "type" of frame? (like "title page", "part page", ...). If yes, it means I can do the same as the solution to sandoche's problem. If not, can anybody think of a workaround?


title: Beamer navigation symbols inside footline

text: I am trying to get the navigation symbols placed inside a second footline that I added. I created a second footline above the standard one, inspired by the infolines theme code. Inside this extra footline, I want to see the navigation symbols.               \addtobeamertemplate{footline}{         \leavevmode%         \hbox{%         \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,right]{author in head/foot}%         \end{beamercolorbox}%         }%         \vskip0.5pt%     }      When I do this, the navigation symbols are added _above_ this extra footline. But I want them to be added on top of this extra line. I tried doing this using a `\vspace`, but they ended up _behind_ the footline:               % uncommented, because it doesn't work:     %\addtobeamertemplate{navigation symbols}{\vspace{-3.5ex}}      Rendering:   ![footline](http://i.stack.imgur.com/8DKsx.png)               \documentclass{beamer}     \mode<presentation>          \title[Beamer Sample]{Sample presentation using Beamer}     \institute[UoF]{University of Foo}     \author{derabbink}     \date{\today}          \usecolortheme{dolphin}     \useoutertheme{infolines}          \setbeamertemplate{headline}[default]          \addtobeamertemplate{footline}{         \leavevmode%         \hbox{%         \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,right]{author in head/foot}%         \end{beamercolorbox}%         }%         \vskip0.5pt%     }     %\addtobeamertemplate{navigation symbols}{\vspace{-3.5ex}}          \begin{document}          \frame{\titlepage}          \begin{frame}\frametitle{FooBar}     \begin{itemize}         \item Foo         \item Bar     \end{itemize}     \end{frame}          \end{document}      PS: I also noticed that when I add a background image, it will be visible in the 0.5pt space between both foorlines. What would be the best way to make that space a white line?


title: Unable to cite in LaTeX

text: I would like to use citing in my document. I have an `*.bib` file like this:               @misc{ Nobody06,            author = "Nobody Jr",            title = "My Article",            year = "2006" }      My document is this:               \documentclass[11pt]{article}     \usepackage{cite}          \begin{document}          \title{My Article}     \author{Nobody Jr.}     \date{Today}     \maketitle          Blablabla said Nobody \cite{Nobody06}.          \bibliography{refm}{}     \bibliographystyle{plain}     \end{document}      but I can't see this reference at the end of my document. How can I solve this problem?


title: How to make an inline landscape 2 column page look the same as a separate one from pdf?

text: I have a document I would like to add a code listing to. The document format is as shown:               \documentclass[a4paper, 12pt]{report}     \begin{document}     \end{document}      this is a large project with lots of sections, one I would like to add is a precise code listing. I created a code listing like so:               \documentclass[landscape,twocolumn,a4paper]{report}     \usepackage{listings}     \usepackage{pdflscape}     \begin{document}     \lstset{%     numbers=left}}          \lstinputlisting[label=preface, caption=directories,basicstyle=\small,breaklines=true]{directory_listing.txt}          \end{document}      now I can add this to the document by using:               \begin{landscape}     \includepdf[pages={1-3}, angle=90]{code_listing/code_listing.pdf}     \end{landscape}      but so that I can link to the content within the code listing I would like to do something like:               \begin{landscape}     \setlength{\columnsep}{20pt}     \setlength{\columnseprule}{1pt}     \begin{multicols}{2}     \lstset{%     numbers=left}          \lstinputlisting[label=preface, caption=directories,basicstyle=\small,,breaklines=true]{code_listing/directory_listing.txt}          \end{multicols}     \end{landscape}      within my document. Unfortunately when I try this the lines are a lot shorter and this leads to some horrible wrapping. how can you make both of these code snippets look the same?


title: Automatically Step Through List of Numbers in Beamer

text: I have a long list of numbers (about 200) and would like to do the following in Beamer:   1. Display the first number.   2. Pause for one second.   3. Erase the first number.   4. Display the second number. ...and so on for the entire list. My current hack is the following:               \begin{frame}     \foreach \n in {0, 1, 2, 3}{     \n \\     \vspace{-\baselineskip}     \pause     {\color{white} \n}\\     \vspace{-\baselineskip}     }     \end{frame}      This leaves an undesirable artifact from the white numbers and does not advance automatically. What is a better way?


title: Different \pagestyle - doesn't accept last one

text: I'm stuck again. -.- I'm currently creating a template for my projects works, thesis, ... and I tried to structure it with `\include` what really worked fine till now:               \documentclass[pdftex,12pt,oneside]{report}     \usepackage[pdftex]{graphicx}     \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[scaled]{helvet}     \renewcommand{\familydefault}{\sfdefault}     \usepackage{titlesec}     \titleformat{\section}{\Large\bfseries}{\thesection}{1em}{\textsc}     \parindent0em     \usepackage{setspace}     \usepackage[paper = a4paper, margin = 1in, includehead, showframe]{geometry}     \usepackage{fancyhdr}     \fancypagestyle{titlepage}     {....}     \fancypagestyle{dhbw}     {....}     \fancypagestyle{restriction}     {....}     \fancypagestyle{project_work}     {         \fancyhf{}         \fancyfoot[R]{\thepage}         \renewcommand{\headrulewidth}{0pt}         \renewcommand{\footrulewidth}{0pt}     }          \begin{document}         \include{title_page}         \restoregeometry         \include{restriction_note}         \include{progress_report}         \restoregeometry         \tableofcontents         \include{introduction}     \end{document}      As you can see this is my main document and everything works fine till the TOC section. Indifferent where I insert the `\pagestyle{project_work}` it keeps ignoring the command and just puts the page number in the middle of the footer. The other headers contains graphics, but they'll be displayed correctly. I searched the web and the threads, but I couldn't find any useful answer. It keeps driving me crazy and I think I'm overlooking something, but I don't know what.


title: Issues when including a tex file

text: I have this without any issues if I use it alone. However if I call it with input or include I get this ![enter image description here](http://i.stack.imgur.com/HdpLh.png) Why?


title: Supress the word "References" with biblatex-chem

text: I'm using `biblatex-chem` to make a list of papers of interest for a group meeting: A MWE looks something like:               \documentclass[letterpaper]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{cfr-lm}     \usepackage[backend=biber,style=chem-rsc,doi=true,articletitle=true,pageranges=true,maxnames=6,minnames=1]{biblatex}     \addbibresource{2013-8-GroupMeeting.bib}          \begin{document}     \nocite{*}     \printbibliography     \end{document}      and a random entry from my .bib file being:               @article{doi:10.1021/ja400917r,     author = {Rao, Y.-L. and Amarne, H. and Chen, L. D. and Brown, M. L. and Mosey, N. J. and Wang, S.},     title = {Photo- and Thermal-Induced Multistructural Transformation of 2-Phenylazolyl Chelate Boron Compounds},     journal = {JACS},     volume = {135},     number = {9},     pages = {3407--3410},     year = {2013},     doi = {10.1021/ja400917r},     URL = {http://pubs.acs.org/doi/abs/10.1021/ja400917r},     }      This gives me a nice list of citations that I can email to everyone, but it starts with the word 'References' at the top, which isn't needed and is just wasting space. Is there a way I can suppress that?


title: How to place a program and a text side by side?

text: My first question is how you write a program in LaTeX, with and without a line number for each line. The second question is, because often my program is not too large, I want to save some space for text on its right hand side. So we could imagine two rectangle parts side by side: a program and some text. Could anyone tell me how to realize that? Thank you very much! **Edit1:** Now I have another need... I would like to have `l1, l2, l3...` to specify each line, instead of `1, 2, 3...`. Does anyone know how to do that?


title: Can't align list of equations uniformly after "subequations" break, why?

text: I'm trying to write a list of equations from a chapter of my textbook, each one preceded by a `\label{}` command so that I can refer to it in the rest of the text. However after the 1st `\begin{align} \end{align}` environment, I've inserted a `\begin{subequations}` environment, then another `\begin{align}` environment. This has resulted in 3 blocks of equations that are aligned each in their own way. I want them to align all as the 1st block of equations. **Is there a way to do that?** I'm using the `scrartcl` class, a number of packages that I've listed below and some `\newcommand` to speed up the typing. I'm running TeXLive 2013 on Win7 with TeXStudio 2.6.6.               \documentclass[a4paper, 12pt]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[italian]{babel}     \usepackage{hyperref}     \hypersetup{pdfstartview=FitH}      \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{mathrsfs}     \usepackage{amssymb}     \usepackage{booktabs}     \usepackage{graphicx}     \usepackage{tabularx}     \usepackage{caption}     \usepackage{mathrsfs}     \usepackage{marvosym}     \usepackage{textcomp}     \usepackage{enumerate}     \usepackage{siunitx}     \usepackage{outlines}     \usepackage{cancel}     \usepackage[italian]{cleveref} % \cref adds ``fig.'' or ``eq.'' before the reference          \graphicspath{{./pictures/}} %{./figuresdir2/}{./figuresdir3/}}          \renewcommand{\@}{\MVAt}     %\renewcommand{\familydefault}{\sfdefault} %uses sans-serif font for entire document     \newcommand{\domanda}[1]{\paragraph{Q: #1\newline}}     \newcommand{\es}{\varepsilon_s}     \newcommand{\Nd}{N\ped{d}}     \newcommand{\Na}{N\ped{a}}      \newcommand{\xd}{$x\ped{d}$}     \newcommand{\Ld}{$L\ped{D}$}     \newcommand{\Oi}{$\phi_i$}     \newcommand{\campoE}{\mathscr{E}\ped{x}}     \newcommand{\wf}{$q\Phi$}     \newcommand{\WF}[1]{\Phi_\text{#1}}     \newcommand{\derivata}[2]{\frac{\textup{d}{#1}}{\textup{d}{#2}} }     \newcommand{\derivataseconda}[2]{\frac{\textup{d}^2{#1}}{\textup{d}{#2}^2} }     \newcommand{\derivataparziale}[2]{\dfrac{\partial{#1}}{\partial {#2}} }     \newcommand{\integrale}[4]{\displaystyle \int_{#3}^{#4}#1\,\text{d}{#2} }     \DeclareMathOperator\erf{erf}     \DeclareMathOperator\erfc{erfc}     \newcommand{\email}[1]{\href{mailto:#1}{{\small\texttt{#1}}}}     %----------------------------------     \title{E.S.S.}     \author{}     \date{}     \begin{document}          \maketitle     \tableofcontents     \thispagestyle{empty}          \clearpage          \include{cap7}     \include{cap7_formule}     \end{document}      This is the `cap7_formule.tex` file, containing the said 3 blocks of equations that I can't get aligned uniformly:               \section{Formule cap.7}     \begin{align}     \label{7.1.1} I\ped{c} &=\dfrac{q\tilde{D\ped{n}} n\ped{i}^{2} A\ped{E} \, \exp({qV\ped{BE}/kT})}{\integrale{p}{x}{0}{x_B} } & \\     \label{7.1.2} \derivataparziale{I_C}{V\ped{CB}}&= \dfrac{-q\tilde{D\ped{n}}     n\ped{i}^{2} A\ped{E} \, \exp({qV\ped{BE}/kT}) \, p(x_B) }{\bigg[\integrale{p}{x}{0}{x_B}     \bigg]^{2}} \, \derivataparziale{x_B}{V\ped{CB}}&\\     \label{7.1.3} \notag \derivataparziale{I\ped{C}}{V\ped{CB}}&= -I\ped{C}\,p(x\ped{B})    \Bigg[ \dfrac{1}{\integrale{p}{x}{0}{x\ped{B}}} \Bigg] \, \bigg [\derivataparziale{x\ped{B}}{V\ped{CB}} \bigg] &\\      &= {} -\dfrac{I\ped{C}}{V\ped{A}}=\dfrac{I_C}{|V_A|}\\     \label{7.1.4} V\ped{A}&= \dfrac{\integrale{p}{x}{0}{x_B} }{p(x\ped{B}) \derivataparziale{x\ped{B}}{V\ped{CB}}}     \end{align}          \begin{subequations}     Scrivo V\ped{A}, la tensione di Early, in modo pratico:     \label{eqn:alternativeVa}     \begin{align}     \label{7.1.5}  \integrale{p}{x}{0}{x\ped{B}}&=\dfrac{Q\ped{B}}{q}\\     \label{7.1.6} q\, p(x\ped{B}) \, \derivata{x_B}{V\ped{CB}}&=\derivata{Q_B}{V\ped{CB}}\\     \label{7.1.7} \bigg| \derivata{Q_B}{V\ped{CB}} \bigg|&= C\ped{jc}\\     \label{7.1.8} |V\ped{A}|&= \dfrac{Q\ped{B}}{C\ped{jC}}     \end{align}     \end{subequations}          \begin{align}     \label{7.2.1}I_B&= I_0\, \exp\big( {\dfrac{qV\ped{BE}}{nkT}} \big)\\     \label{7.2.2} \integrale{p(x)}{x}{0}{x\ped{B}}&=\integrale{[N\ped{a}(x) + \, n'(x)]}{x}{0}{x\ped{B}}\\     \label{7.2.3} n(0) &=\dfrac{N\ped{a}(0)}{2} \bigg[ \bigg(1+ \dfrac{4 \, n^{2}\ped{i} \, \exp(qV\ped{BE}/kT)}{N\ped{a}(0)} \bigg)^{1/ \,2} -1 \bigg]\\     \label{7.2.4} \derivata{\campoE}{x}&=\dfrac{1}{\varepsilon\ped{s}}\bigg( q\,N(x) - \dfrac{J_C}{v(x)} \bigg)\\     \label{7.2.5}  V\ped{CB}+\phi \ped{i}&=\integrale{-\campoE}{x}{x_B}{x_C}     \end{align}      Here is what I get in the pdf: ![As you can see, the 3 blocks aren't aligned uniformly](http://i.stack.imgur.com/4tVOs.jpg)


title: Reverse citation order of two library entries

text: I have the following problem illustrated by a simple example: If I cite the paper of an author T. Coven in my document, the outcome is 'Coven (2004b)'. If I cite the appendix to this paper, the outcome is 'Coven (2004a)'. Now the appendix pops up much less frequently than the original paper, therefore I would like to reverse the order (exchange 'a' and 'b' in the citations). Is this possible? I am using Biblatex. Here is the bib-file of the above example (named: lib.bib):               @article{co:2004,     author = {T. Coven},     title = {Title A},     journaltitle = {The X Journal},     date = {2004}     }     @article{coapp:2004,     author = {T. Coven},     title = {Appendix to Title A},     journaltitle = {The X Journal},     date = {2004}     }      MWE:               \documentclass[a4paper, 12pt, headsepline, headings=small,]{scrreprt}     \usepackage[backend=bibtex8,         style=authoryear-icomp,         dashed=false,         autocite=footnote,         maxcitenames=3,         mincitenames=1,         maxbibnames=100,         firstinits=true,         sorting=nty         ]{biblatex}     \bibliography{lib}          \begin{document}     \cite{co:2004} and \cite{coapp:2004}     \end{document}


title: Problem with amsmath's `gather` environment

text: I have a lot of math to write so I tried to use `align` inside `gather`. When the column was over I was getting badboxes. So I used two `gather` environments and the output is weird. What is happening and why? How can I fix that?               \documentclass[12pt]{article}     \usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}          \usepackage{multicol}          \usepackage[utf8]{inputenc}          \setlength{\parindent}{0cm}          \usepackage{setspace}          \usepackage{xltxtra}     \usepackage{xgreek}     \setmainfont[Mapping=tex-text]{GFSDidot.otf}     \setsansfont[Mapping=tex-text]{GFSDidot.otf}          \usepackage[fleqn]{amsmath}     \usepackage{unicode-math}          \setlength{\mathindent}{0cm}                    \newcommand{\3}{\vspace{0.3cm}}          \title{}     \author{}     \date{}          \begin{document}          \begin{multicols*}{2}          \begin{gather*}     \begin{aligned}     &\text{70}\\     &e^{jz}=\cos z+j\sin z\\     &\cos z=(1/2)(2\cos z)=\\     &=(1/2)(2\cos z+j\sin z-j\sin z)=\\     &=(1/2)(\cos z+j\sin z+\cos z-j\sin z)=\\     &=(1/2)(e^{jz}+e^{-jz})     \end{aligned}\\     \begin{aligned}     &\text{207}\\     &x(t)=A_{c}\cos \theta(t)\\     &\theta(t)=2\pi f_{c}t+\phi(t)\\     &\phi(t)=K_{p}m(t)\\     &x(t)=A_{c}\cos[2\pi f_{c}t+K_{p}m(t)]     \end{aligned}\\     \begin{aligned}     &\text{208}\\     &x(t)=A_{c}\cos \theta(t)\\     &\theta(t)=2\pi f_{c}t+\phi(t)\\     &\frac{d\phi(t)}{dt}=2\pi K_{f}m(t)\Rightarrow\\     &\Rightarrow \phi(t)=2\pi K_{f}\int\limits_{-\infty}^{t}m(\tau)d\tau\\     &x(t)=A_{c}\cos\left[2\pi f_{c}t+2\pi K_{f}\int\limits_{-\infty}^{t}m(\tau)d\tau\right]     \end{aligned}\\     \begin{aligned}     &\text{208}\\     &x(t)=A_{c}\cos\theta(t)=A_{c}\cos[2\pi f_{c}t+\phi(t)]\\     &\cos(a+b)=\cos a \cos b-\sin a \sin b\\     &\phi(t)=K_{p}m(t)\\     &\phi(t)=2\pi K_{f}\int\limits_{-\infty}^{t}m(\tau)d\tau     \end{aligned}\\     \begin{aligned}     &\text{265}\\     &g(t)=f(t)\ast h(t)=\int\limits_{-\infty}^{\infty}f(\tau)h(t-\tau)d\tau\\     &j(t)=\sum\limits_{k=-\infty}^{\infty}\delta(t-kT_{s})\Rightarrow\\     &\Rightarrow \mathcal{F}[j(t)]=\sum\limits_{k=-\infty}^{\infty}\mathcal{F}[\delta(t)]e^{j2\pi fkT_{s}}\\     &=\sum\limits_{k=-\infty}^{\infty}e^{j2\pi fkT_{s}}     \end{aligned}     \end{gather*}          \end{multicols*}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Gkw7p.png)               \documentclass[12pt]{article}     \usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}          \usepackage{multicol}          \usepackage[utf8]{inputenc}          \setlength{\parindent}{0cm}          \usepackage{setspace}          \usepackage{xltxtra}     \usepackage{xgreek}     \setmainfont[Mapping=tex-text]{GFSDidot.otf}     \setsansfont[Mapping=tex-text]{GFSDidot.otf}          \usepackage[fleqn]{amsmath}     \usepackage{unicode-math}          \setlength{\mathindent}{0cm}                    \newcommand{\3}{\vspace{0.3cm}}          \title{}     \author{}     \date{}          \begin{document}          \begin{multicols*}{2}          \begin{gather*}     \begin{aligned}     &\text{70}\\     &e^{jz}=\cos z+j\sin z\\     &\cos z=(1/2)(2\cos z)=\\     &=(1/2)(2\cos z+j\sin z-j\sin z)=\\     &=(1/2)(\cos z+j\sin z+\cos z-j\sin z)=\\     &=(1/2)(e^{jz}+e^{-jz})     \end{aligned}\\     \begin{aligned}     &\text{207}\\     &x(t)=A_{c}\cos \theta(t)\\     &\theta(t)=2\pi f_{c}t+\phi(t)\\     &\phi(t)=K_{p}m(t)\\     &x(t)=A_{c}\cos[2\pi f_{c}t+K_{p}m(t)]     \end{aligned}\\     \begin{aligned}     &\text{208}\\     &x(t)=A_{c}\cos \theta(t)\\     &\theta(t)=2\pi f_{c}t+\phi(t)\\     &\frac{d\phi(t)}{dt}=2\pi K_{f}m(t)\Rightarrow\\     &\Rightarrow \phi(t)=2\pi K_{f}\int\limits_{-\infty}^{t}m(\tau)d\tau\\     &x(t)=A_{c}\cos\left[2\pi f_{c}t+2\pi K_{f}\int\limits_{-\infty}^{t}m(\tau)d\tau\right]     \end{aligned}\\     \begin{aligned}     &\text{208}\\     &x(t)=A_{c}\cos\theta(t)=A_{c}\cos[2\pi f_{c}t+\phi(t)]\\     &\cos(a+b)=\cos a \cos b-\sin a \sin b\\     &\phi(t)=K_{p}m(t)\\     &\phi(t)=2\pi K_{f}\int\limits_{-\infty}^{t}m(\tau)d\tau     \end{aligned}\\     \end{gather*}     \begin{gather*}     \begin{aligned}     &\text{265}\\     &g(t)=f(t)\ast h(t)=\int\limits_{-\infty}^{\infty}f(\tau)h(t-\tau)d\tau\\     &j(t)=\sum\limits_{k=-\infty}^{\infty}\delta(t-kT_{s})\Rightarrow\\     &\Rightarrow \mathcal{F}[j(t)]=\sum\limits_{k=-\infty}^{\infty}\mathcal{F}[\delta(t)]e^{j2\pi fkT_{s}}\\     &=\sum\limits_{k=-\infty}^{\infty}e^{j2\pi fkT_{s}}     \end{aligned}     \end{gather*}          \end{multicols*}          \end{document}      ![enter image description here](http://i.stack.imgur.com/iS07D.png) Edit I: This is the output with `\raggedcolumns` as proposed in the comments and obviously there are problems concerning the space left in the first column and the height difference between the first and the second column. Also I don't understand why is there a problem in the first place with `gather` environments.               \documentclass[12pt]{article}     \usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}          \usepackage{multicol}          \usepackage[utf8]{inputenc}          \setlength{\parindent}{0cm}          \usepackage{setspace}          \usepackage{xltxtra}     \usepackage{xgreek}     \setmainfont[Mapping=tex-text]{GFSDidot.otf}     \setsansfont[Mapping=tex-text]{GFSDidot.otf}          \usepackage[fleqn]{amsmath}     \usepackage{unicode-math}          \setlength{\mathindent}{0cm}          \newcommand{\3}{\vspace{0.3cm}}          \title{}     \author{}     \date{}          \begin{document}     \raggedcolumns          \begin{multicols*}{2}          \begin{gather*}     \begin{aligned}     &\text{70}\\     &e^{jz}=\cos z+j\sin z\\     &\cos z=(1/2)(2\cos z)=\\     &=(1/2)(2\cos z+j\sin z-j\sin z)=\\     &=(1/2)(\cos z+j\sin z+\cos z-j\sin z)=\\     &=(1/2)(e^{jz}+e^{-jz})     \end{aligned}\\     \begin{aligned}     &\text{207}\\     &x(t)=A_{c}\cos \theta(t)\\     &\theta(t)=2\pi f_{c}t+\phi(t)\\     &\phi(t)=K_{p}m(t)\\     &x(t)=A_{c}\cos[2\pi f_{c}t+K_{p}m(t)]     \end{aligned}\\     \begin{aligned}     &\text{208}\\     &x(t)=A_{c}\cos \theta(t)\\     &\theta(t)=2\pi f_{c}t+\phi(t)\\     &\frac{d\phi(t)}{dt}=2\pi K_{f}m(t)\Rightarrow\\     &\Rightarrow \phi(t)=2\pi K_{f}\int\limits_{-\infty}^{t}m(\tau)d\tau\\     &x(t)=A_{c}\cos\left[2\pi f_{c}t+2\pi K_{f}\int\limits_{-\infty}^{t}m(\tau)d\tau\right]     \end{aligned}\\     \begin{aligned}     &\text{208}\\     &x(t)=A_{c}\cos\theta(t)=A_{c}\cos[2\pi f_{c}t+\phi(t)]\\     &\cos(a+b)=\cos a \cos b-\sin a \sin b\\     &\phi(t)=K_{p}m(t)\\     &\phi(t)=2\pi K_{f}\int\limits_{-\infty}^{t}m(\tau)d\tau     \end{aligned}\\     \end{gather*}     \begin{gather*}     \begin{aligned}     &\text{265}\\     &g(t)=f(t)\ast h(t)=\int\limits_{-\infty}^{\infty}f(\tau)h(t-\tau)d\tau\\     &j(t)=\sum\limits_{k=-\infty}^{\infty}\delta(t-kT_{s})\Rightarrow\\     &\Rightarrow \mathcal{F}[j(t)]=\sum\limits_{k=-\infty}^{\infty}\mathcal{F}[\delta(t)]e^{j2\pi fkT_{s}}\\     &=\sum\limits_{k=-\infty}^{\infty}e^{j2\pi fkT_{s}}     \end{aligned}     \end{gather*}          \end{multicols*}          \end{document}      ![enter image description here](http://i.stack.imgur.com/uwBnV.png)


title: Allow underscore in PGFPlots tick labels read from table

text: I'm trying to use the text data from a table column as the tick labels in a plot. The text data contains underscores, which makes LaTeX throw a `Missing $ inserted` error. I'd usually get around this by loading the `underscore` package, and that works fine if I provide the list of tick labels explicitly using `xticklabels={A_B,B_C}`. However, when I use the `xticklabels from table={<table name>}{<column name>}` syntax, the underscores are not printed and I get the `Missing $` error again. I looked at what the the `xticklabels from table` option does, and basically it just reads the specified table column, writes the content into a list, and then unpacks that list for each tick, using the following macro:               \makeatletter     \def\pgfplots@user@ticklabel@list@x{%         \pgfplotslistselectorempty\ticknum\of\pgfplots@xticklabels\to\tick         \tick     }     \makeatother      `\pgfplots@xticklabels` is the list that the labels were stored into, and `\tick` is just a macro that holds the label text for a single tick. Using `\show\tick` in that macro shows that it really just holds the plain text:               > \tick=macro:     ->A_B.      Now ordinarily, that should just work. If I say `\def\testtext{_}` and then I print that text using another macro, say `\def\printtest{\testtext} \printtest`, the underscore shows up. How can I use underscores in ticklabels specified using `xticklabels from table` without having to replace the underscores in the data table with `\\_`?               \documentclass{article}          \usepackage{underscore}     \usepackage{pgfplots}     \usepackage{pgfplotstable}               %% For your convenience: This is the unaltered macro that prints     %% the tick label when "xticklabels from table" is used     \makeatletter     \def\pgfplots@user@ticklabel@list@x{%         \pgfplotslistselectorempty\ticknum\of\pgfplots@xticklabels\to\tick         \tick     }     \makeatother               \pgfplotstableread{     Label Value_A     A_B 1     B_C 2     }\datatable          \begin{document}            \begin{tikzpicture}         \begin{axis}[                 xtick=data,                 % xticklabels={A_B,B_C}, % <- this works                 xticklabels from table={\datatable}{Label} % <- this doesn't             ]          \addplot table[x expr=\coordindex]{\datatable};         \end{axis}       \end{tikzpicture}     \end{document}


title: Figures with borders problem

text: I am writing my thesis in TexniCenter and I have the following problem. I want all my figures to have a border. So I use :               \usepackage{float}     \floatstyle{boxed}      \restylefloat{figure}      in the beginning. However, every figure after that has a border with width equal to text width, even it is much smaller. For example I use the following code to include an image:               \begin{figure}[h]       \centering       \includegraphics [width=0.5\textwidth] {myfigure.png}       \caption[myfigure]%       {myfigure}       \label{myfigure}     \end{figure}      I want to have a figure with width half the text width. The border though remains full width size. Could you help me please.


title: xelatex broken: How do I get Arabic vowels back in mactex 2011?

text: I upgraded to mactex 2011 from 2009 and xelatex (XeTeX, Version 3.1415926-2.3-0.9997.5 (TeX Live 2011)) no longer produces the same output when using Arabic language. The vowels (called harakaat in arabic) are missing in the pdf output. They used to show up fine and mactex 2009, and no longer do in 2011. I'd appreciate any assistance.. Here is a minimal example..               \documentclass{article}     \usepackage{fontspec}     \usepackage{arabxetex}     \usepackage{fullpage}          \newfontinstance\farsifont[Script=Arabic,Scale=1.6,WordSpace=2]{mylotus}     \newfontinstance\arabicfont[Script=Arabic,Scale=1.6,WordSpace=2,Mapping=arabicdigits]{mylotus}     \setromanfont[Mapping=tex-text]{Verdana}          \begin{document}     \begin{enumerate}     \item{There are many languages in the world.\\     \textarab{في العالمِ لغةٌ كثيرةٌ.}\\     }     \end{enumerate}     \end{document}      EDIT: This is the actual output of the example: ![actual output](http://i.stack.imgur.com/aJx0q.png) This output shows the missing vowels: ![expected output of code](http://i.stack.imgur.com/RQd91.png) Also, the log of xelatex compile is http://pastebin.com/raw.php?i=9Hraw83d


title: Bold and color (*) asterisk before enumerate

text: Good morning. It's my problem, add the bold ( ***** ) asterisk before enumerate items and also colored. Here my code,               \documentclass[a4paper,twoside,openright,11pt]{scrbook}     \usepackage[left=1.5cm,right=1cm,top=3cm,bottom=1.5cm,marginparwidth=6cm,marginparsep=1cm,outer=8cm]{geometry}          \usepackage[T1]{fontenc}     \usepackage{color}     \usepackage{enumitem}          \newcommand{\ssitem}{\stepcounter{enumii}\item[${ }*{ }$\theenumii)]}     \newcommand{\sitem}{\stepcounter{enumi}\item[${ }*{ }$\theenumi.]}          \renewcommand\theenumi{\textbf{\arabic{enumi}}}     \renewcommand\theenumii{\textbf{\alph{enumii}}}          \setlist[enumerate,2]{font=\bfseries,before=\bfseries,before=\setupmodenumerate}     \setlist[enumerate,1]{font=\bfseries,before=\setupmodenumerate}          \newif\ifcitem          \newcommand{\setupmodenumerate}{%     \global\citemfalse     \let\origmakelabel\makelabel     \def\citem##1{\global\citemtrue\def\cecolor{##1}\item}%     \def\makelabel##1{%     \origmakelabel{\ifcitem\color{\cecolor}\fi##1}%     \global\citemfalse}}          \begin{document}          \begin{enumerate}     \item Black Question     \begin{enumerate}     \item Case \textbf{*}     \item Case     \ssitem No problem in black color     \end{enumerate}     \end{enumerate}          \textbf{Lorem}          \begin{enumerate}[resume]     \citem{blue} Blue Question     \begin{enumerate}     \citem{red} Case     \citem{blue} Problem, no added asterisk     \end{enumerate}     \end{enumerate}          \begin{enumerate}[resume]     \citem{red} Problem, no added asterisk     \end{enumerate}          \end{document}      ![enter image description here](http://i.stack.imgur.com/kzidP.png) Can be solved the problem by adding this codes? So, does anyone know how to fix it. **Related:** Define a colour enumeration


title: How to test if-condition using \csname within an \ifcase branch

text: I am trying to test an if-condition, where the name of the condition depends on a macro argument. To do this, I use `\csname ifcondition#1 \endcsname`. This works fine in a simple macro like this:               \newif\ifconditionA     \conditionAtrue     \def\test#1{         \csname ifcondition#1\endcsname             A: True         \fi     }     \test{A}      However, in my real use case, this test is part of an `\ifcase` branch, like so:               \documentclass{article}     \begin{document}     \newif\ifconditionA     \conditionAtrue          \def\test#1#2{     \ifcase#2         Case 0     \or         %\ifconditionA % This works         \csname ifcondition#1\endcsname             Case 1, A: true         \fi     \fi     }          \test{A}{0}     %\test{A}{1} % This works          \end{document}      This fails with the error message `! Extra \fi. \test ...tion#1\endcsname Case 1, A: true \fi \fi`. If I use the name of the condition directly, without `\csname`, it works fine, and it also works if the branch containing the condition is executed. What's going on, and how do I fix this?


title: Error using \variation command in the skak package

text: I'm using the `skak` package to write and comment a chess match. Trouble occurs when you use the command `\variation` to analyze the possible consequences to vary the move 15. This `MWE` code generates an error if i uncomment the commented lines (lines 16 and 17), but i want to type this explanation. The command `\variation` already has been used before (in the code) without problems. Here my code               \documentclass{minimal}     \usepackage{skak}     \begin{document}     \newgame     \noindent\mainline{1.e4 c6 2.d4 d5 3.Nd2 dxe4 4.Nxe4 Nd7 5.Ng5 Ngf6 6.Bc4 e6 7.Qe2 Nb6 8.Bb3 h6 9.N5f3 c5} (\variation{9...a5}) \mainline{10.Bf4 Bd6 11.Bg3 Qe7}     (it's also possible \variation{11...Qc7} and \variation{11...O-O})     \mainline{12.dxc5 Bxc5 13.Ne5 Bd7 14.Ngf3 Nh5}     (no \variation{14...O-O-O 15.Nxf7 Qxf7 16.Qe5}).\\     \begin{center}     \showboard     \end{center}     \styleC     \mainline{15.O-O-O Nxg3}     Change this move by \variation{15...O-O-O} allows      %\variation{16.Nxd7 Nxd7 17.Bc5!}     %and if \variation{17...Nxe5?!}, then \variation{18.Nxe5 Nf4 19.Qc4}, giving an advantage.     \mainline{16.hxg3 O-O-O}     \end{document}      As I said before if i uncomment the lines get an error message like this > [] > > ! mainline: 16 is not the correct move number. ...: 16 is not the correct > move number} > > l.15 \variation{16.Nxd7 Nxd7 17.Bc5!} > > This error message was generated by an \errmessage command, so I can't give > any explicit help. Thanks for your help!


title: How do I add a caption to a table within a minipage?

text: I am using Knitr to generate two tables side by side on a two column layout (ACM sigproc).               \begin{table*}     \begin{minipage}[h]{0.49\linewidth}     <<results='asis'>>=     print(xtable(o.stats.sel.op, caption='Original', label='table:rando'),        include.rownames=FALSE, floating=FALSE,  size='\\small',        sanitize.text.function=function(x){x})     @     \end{minipage}     \hspace{0.5cm}     \begin{minipage}[h]{0.49\linewidth}     <<results='asis'>>=     print(xtable(r.stats.sel.op, caption='Randoop', label='table:randr'),       include.rownames=FALSE, floating=FALSE,size='\\small',       sanitize.text.function=function(x){x})     @     \end{minipage}     \bigskip     \caption {Operators}     \label{tbl:operators}     \end{table*}      My problem is that the captions of child tables (Original and Generated) are not visible (they are not generated in the tex file because apparently it wont be generated if floating is false). Is there any way I can get them to show up?


title: Drawing selected borders of a node

text: Is there a way to draw only selected borders of a node? The node shape I have in mind is `rectangle`. The `\node[draw]...` syntax draws all four borders of the node. But what if I want to draw only the top and bottom borders? One solution I can think of is to "manually" draw them, as below. But this doesn't seem very elegant. I'm looking for a key similar to `[draw={<left/right/top/bottom>}]`.               \documentclass[border=2pt]{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}         \node(s){node text};         \draw(s.north west)--(s.north east) (s.south west)--(s.south east);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ycLOr.png)


title: Drawbacks of the `H` specifier

text: According to the `float` package documentation, the `H` float placement specifier > [...]when added to a float, tells LaTeX to “put the float HERE, period”. If > there isn’t enough space left on the page, the float is carried over to the > next page together with whatever follows, even though there might still be > room left for some of that. I've heard some opinions in favour and some against the use of this placement specifier. I personally tend not to recommend its use and suggest the use of an static object from the beginning instead (but the only reason I have is that I don't like the idea of declaring something as a float and then suppressing the flotation; I'd rather use a static object from the beginning). Are there any major drawbacks associated with the `H` float placement specifier besides the one mentioned in the last sentence of the quoted text?


title: Reftex \cite command binding

text: I have a computer where the char `[` is made with `AltGr+è` so I can't use the command `Ctrl+[` of RefTeX. Is there a solution to this?


title: Without changing the shape of the figure, how I can decrease the size?

text: \begin{figure}     {        \begin{center}     \begin{tikzpicture}[scale=2.00]     \node [draw, thick, minimum size=3cm, circle] at (0.5,1.3) {};     \node [draw, thick, minimum size=3cm, circle] at (0.0,0) {};     \node [draw, thick, minimum size=3cm, circle] at (1,0) {};     \node [draw, dotted, minimum size=3cm, circle] at (2.2,0.25) {};     \node [draw, dotted, minimum size=3cm, circle] at (1.65,1.05) {};     \node [draw, dotted, minimum size=3cm, circle] at (1.45,2.15) {};               \draw (0.7,1.30) node{$C$};     \draw (0.5,1.30) node{.};     \draw (-0.1,-0.10) node{$A$};     \draw (0.183,0.07) node{\footnotesize{$\alpha$}};     \draw (0.183,0.37) node{\footnotesize{$\gamma$}};     \draw (0.82,0.29) node{\footnotesize{$\beta$}};               \draw (0.5,0.70) node {$O$};          \draw (0,0) node{.};     \draw (1.1,0) node{$B$};     \draw (1,0) node{.};          \draw (0,0)--(0.50,0.57);     \draw (-0.002,-0.0)--(0.50,1.31);     \draw (1.005,0)--(0.50,1.31);               \draw (1,0)--(0.50,0.57);     \draw (0,0)--(1,0);     \draw [thick]( 0.12 , 0.0 )-- ( 0.119 , 0.0155 )-- ( 0.118 , 0.0218 )-- ( 0.117 , 0.0267 )-- ( 0.116 , 0.0307 )-- ( 0.115 , 0.0343 )-- ( 0.114 , 0.0375 )-- ( 0.113 , 0.0404 )-- ( 0.112 , 0.0431 )-- ( 0.111 , 0.0456 )-- ( 0.11 , 0.048 )-- ( 0.109 , 0.0502 )-- ( 0.108 , 0.0523 )-- ( 0.107 , 0.0543 )-- ( 0.106 , 0.0562 )-- ( 0.105 , 0.0581 )-- ( 0.104 , 0.0599 )-- ( 0.103 , 0.0616 )-- ( 0.102 , 0.0632 )-- ( 0.101 , 0.0648 )-- ( 0.1 , 0.0663 )-- ( 0.099 , 0.0678 )-- ( 0.098 , 0.0693 )-- ( 0.097 , 0.0706 )-- ( 0.096 , 0.072 )-- ( 0.095 , 0.0733 )-- ( 0.094 , 0.0746 )-- ( 0.093 , 0.0758 )-- ( 0.092 , 0.077 )-- ( 0.091 , 0.0782 )-- ( 0.09 , 0.0794 )-- ( 0.089 , 0.0805 )-- ( 0.088 , 0.0816 )-- ( 0.087 , 0.0826 )-- ( 0.086 , 0.0837 )-- ( 0.085 , 0.0847 )-- ( 0.084 , 0.0857 )-- ( 0.083 , 0.0867 )-- ( 0.082 , 0.0876 )-- ( 0.081 , 0.0885 )-- ( 0.08 , 0.0894 )-- ( 0.079 , 0.0903 )-- ( 0.078 , 0.0912 )-- ( 0.077 , 0.092 )-- ( 0.076 , 0.0929 )-- ( 0.075 , 0.0937 )-- ( 0.074 , 0.0945 )-- ( 0.073 , 0.0952 )-- ( 0.072 , 0.096      )-- ( 0.071 , 0.0967 )-- ( 0.07 , 0.0975 )-- ( 0.069 , 0.0982 );          \draw [thick]( 0.635 , 0.4224 )-- ( 0.63 , 0.418 )-- ( 0.625 , 0.4139 )-- ( 0.62 , 0.41 )-- ( 0.615 , 0.4064 )-- ( 0.61 , 0.403 )-- ( 0.605 , 0.3998 )-- ( 0.6 , 0.3968 )-- ( 0.595 , 0.394 )-- ( 0.59 , 0.3914 )-- ( 0.585 , 0.389 )-- ( 0.58 , 0.3867 )-- ( 0.575 , 0.3846 )-- ( 0.57 , 0.3827 )-- ( 0.565 , 0.3809 )-- ( 0.56 , 0.3792 )-- ( 0.555 , 0.3777 )-- ( 0.55 , 0.3764 )-- ( 0.545 , 0.3751 )-- ( 0.54 , 0.374 )-- ( 0.535 , 0.3731 )-- ( 0.53 , 0.3723 )-- ( 0.525 , 0.3716 )-- ( 0.52 , 0.371 )-- ( 0.515 , 0.3706 )-- ( 0.51 , 0.3703 )-- ( 0.505 , 0.3701 )-- ( 0.5 , 0.37 )-- ( 0.495 , 0.3701 )-- ( 0.49 , 0.3703 )-- ( 0.485 , 0.3706 )-- ( 0.48 , 0.371 )-- ( 0.475 , 0.3716 )-- ( 0.47 , 0.3723 )-- ( 0.465 , 0.3731 )-- ( 0.46 , 0.374 )-- ( 0.455 , 0.3751 )-- ( 0.45 , 0.3764 )-- ( 0.445 , 0.3777 )-- ( 0.44 , 0.3792 )-- ( 0.435 , 0.3809 )-- ( 0.43 , 0.3827 )-- ( 0.425 , 0.3846 )-- ( 0.42 , 0.3867 )-- ( 0.415 , 0.389 )-- ( 0.41 , 0.3914 )-- ( 0.405 , 0.394 )-- ( 0.4 , 0.3968 )-- ( 0.395 , 0.3998 )-- ( 0.39 , 0.403 )-- ( 0.     385 , 0.4064 )-- ( 0.38 , 0.41 )-- ( 0.375 , 0.4139 )-- ( 0.37 , 0.418 );               \draw( 0.09 , 0.265141 )-- ( 0.1 , 0.261534 )-- ( 0.11 , 0.257488 )-- ( 0.12 , 0.252982 )-- ( 0.13 , 0.247992 )-- ( 0.14 , 0.242487 )-- ( 0.15 , 0.236432 )-- ( 0.16 , 0.229783 )-- ( 0.17 , 0.222486 )-- ( 0.18 , 0.214476 )-- ( 0.19 , 0.20567 );          \draw( 0.83 , 0.189737 )-- ( 0.84 , 0.203224 )-- ( 0.85 , 0.215407 )-- ( 0.86 , 0.226495 )-- ( 0.87 , 0.236643 )-- ( 0.88 , 0.245967 )-- ( 0.89 , 0.254558 )-- ( 0.9 , 0.262488 )-- ( 0.91 , 0.269815 );     \draw (0.52,0.32) node{\footnotesize{$\pi$-$2\alpha$}};          \draw (-.4,-0.8) node{$C_1$};     \draw (1.5,-0.8) node{$C_2$};     \draw (0.52,-0.72) node{$P$};     \draw (-.25,0.80) node{$R$};     \draw (1.25,0.80) node{$Q$};          \draw (0.40,2.15) node{$C_3$};     \draw[dotted](0.71,2.02)--(1.45,2.15)--(2.02,1.70)--(1.65,1.05)--(2.41,0.97)--(2.2,0.25)--(1.7,-0.30)--(1,0)--(0.50,-0.55)--(0,0)--(-0.0,0.75)--(0.5,1.30)--(0.71,2.02);     \draw[dotted](0.5,1.30)--(1.00,0.75)--(1.65,1.05);          \draw[dotted] (1.00,0.75)--(1,0);                    \end{tikzpicture}     \end{center}     }     \caption{}     \label{figcir}     \end{figure}


title: Turning off all colors and background images in beamer

text: Is there a command to turn off all colors in beamer ? I have a tex file (beamer) where I have used a lot of colors. Just in case, the colors don't show well on the projector, I wanted to turn off all colors. I am looking for a single command to do this. Is there a similar command to turn off the background images for all the frames too ? I am using the theme: Juan-Les-Pins.


title: multiple algorithm2e algorithms in two column documents

text: I tried this example Place four algorithms (algorithm2e) in a subfigure and arrange them in two rows and two columns on two column documents. It doesn't work. The error message is               ! LaTeX Error: [H] in two columns mode is not allowed for algorithms.      Is there anyway to go? The code example is:               \documentclass[twocolumn]{article}     \usepackage{algorithm2e}     \usepackage{caption}     \usepackage{subcaption}               \newcommand{\myalgorithm}{%     \begin{algorithm*}[H]     \SetAlgoLined     \KwData{this text}     \KwResult{how to write algorithm with \LaTeX2e }     initialization\;     \While{not at end of this document}{     read current\;     \eIf{understand}{     go to next section\;     current section becomes this one\;     }{     go back to the beginning of current section\;     }     }     \end{algorithm*}}     \begin{document}          \begin{figure}         \begin{subfigure}{.5\textwidth}             \myalgorithm             \caption{How to write algorithms}         \end{subfigure}% need this comment symbol to avoid overfull hbox         \begin{subfigure}{.5\textwidth}             \myalgorithm             \caption{How to write algorithms}         \end{subfigure}\\         \begin{subfigure}{.5\textwidth}             \myalgorithm             \caption{How to write algorithms}         \end{subfigure}%         \begin{subfigure}{.5\textwidth}             \myalgorithm             \caption{How to write algorithms}         \end{subfigure}     \caption{Main caption}     \end{figure}               \end{document}


title: align environment according to *first* character, rather than last

text: \begin{align*}         abcd &= abcd &(abcdefghijk)\\              &= ab   &(ab)     \end{align*}      After the first ampersand the equal signs are aligned. However, after the second ampersand, the closing parentheses ")" are aligned. I'd like the opening parenthesis "(" to be aligned instead. Is there an optional argument like that for align? Am I using the wrong environment? Should I define a new one instead? Incidentally, how can I avoid having that much white space in between these two? ![enter image description here](http://i.stack.imgur.com/WcabL.png)


title: How to add mdframed in footer?

text: I am working on `fancyhdr` in report generation. Currently I am using `fancyhdr` which produces one line and I can add left, center and right footers below to this line. But I need an `mdframed` as footer and need to add right, left and middle text inside it. Below is sample `mdframed` which need to be added as footer. ![enter image description here](http://i.stack.imgur.com/fr6WN.png) Please help me out.


title: Is it possible to make a tikiz's school book axes in logarithmic coordinate?

text: I'm wondering if it's possible to do a plot like this with tikz, (or with pgfplot): ![enter image description here](http://i.stack.imgur.com/L3Z1s.jpg) I need some help, thanks This is a start:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}               \begin{document}          \begin{tikzpicture}     \begin{semilogxaxis}[xmin=0,xmax=10e8,ymin=100,ymax=900,axis lines=left, xlabel={$\log N$},ylabel={$\log\sigma_a$}]     \addplot [dashed,black]{700};     \addplot [dashed,black]{330};     \end{semilogxaxis}     \end{tikzpicture}          \end{document}


I'm having problem with generating pdf file from my tex file. When I use \documentclass with draft option, it generates pdf file with images as boxes without errors, so it's fine. But when I change that to final, I get following error almost on every space sign. Error:               Package inputenc Error: Unicode char \u8:�\expandafter not set up for use wit     h LaTeX.          See the inputenc package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.206 \caption{Upravený                               graf spoločnosti Apple Inc.}      Another Error:               ! Package inputenc Error: Unicode char \u8:�\expandafter not set up for use wit     h LaTeX.          See the inputenc package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.206 \caption{Upravený graf spoločnosti                                                 Apple Inc.}      I'm writing my document in Slovak. This is my header:               %\documentclass[12pt,oneside, draft]{fithesis2}       \documentclass[12pt,oneside, final]{fithesis2}       \usepackage[czech, slovak]{babel}     \usepackage[utf8]{inputenc}     \usepackage{textcomp}     \usepackage[T1]{fontenc}     \usepackage[plainpages=false,pdfpagelabels,unicode]{hyperref}     \usepackage{url}     \usepackage{graphicx}          \DeclareGraphicsExtensions{.pdf,.eps,.png,.jpg,.mps}      I have tried changing utf8 package to utf8x - no success. I use Texmaker and editor font encoding is set to utf-8. I thought there was an extra invisible character. I retyped that sentence again but same error appeared. After writing it with english keyboard without special slovak chars, it showed next error(so I guess it was ok). I've spent hours googling this errors and thinking what might be wrong. No luck. This is my first experience with latex by the way. **//edit//** I had this in my tex file.               ... metóda \begin{lstlisting}add_gaps_to_graph_default(...)\end{lstlisting}, ktorá. ...      I changed it to:               ... metóda add\_gaps\_to\_graph\_default(...),      I thought lstlisting was something similar to verbatim. It successfully generates pdf file now. Thanks for MWE suggestion Steven! I'm a bit surprised error was not showing proper line. I guess I need to look at preceding lines in future as well.


title: Text placed below bottom margin that is not footnote

text: I'm using package `geometry` to specify global document margins: `\usepackage[scale=0.82, top=1.5cm, bottom=2.5cm]{geometry}` But I have a piece of information that I would like to add on first page on the bottom and somehow override margin limitations set by `geometry` package. Easiest way to say thing that I want achieve: I want to place text on bottom margin (below these 2.5cm).


title: lualatex print, directlua env, and newline

text: When using print from lua, if the log file's current line has not been terminated then the lua tex will not start on a new line. This is very annoying because many times I search for some debug string being printed and it is not on a new line but at the end of some rather long line printed from TeX. e.g.,               Printing some debug string 1     [1{C:/Users/Administrator/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]      [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]Printing another debug string 2     [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27]`      Instead of               Printing some debug string 1     [1{C:/Users/Administrator/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]     Printing another debug string 2     [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27]      The 2nd one is the preferred case but if I print a newline, `\n`, then I'll get unnecessary empty lines I do not want. Is there any way to fix this? Basically on every entry of `\directlua` or whatever is used I want to print a new line ONLY if something is actually printed(so I don't get a bunch of blank lines) and, even better, only if the log file does not also end on a new line.


title: Several \begin{equation} \end{equation} in columns

text: I have 3 elements of the following form (approx ~20 equations for each one) :               \begin{equation}     \begin{aligned}     % LOTS OF EQUATIONS %     \end{aligned}     \end{equation}      How to put display these 3 elements in 3 columns on one page ? I tried :               \begin{tabular}{ccc}     \begin{equation}     \begin{aligned}     % LOTS OF EQUATIONS %     \end{aligned}     \end{equation}     &     \begin{equation}     \begin{aligned}     % LOTS OF EQUATIONS %     \end{aligned}     \end{equation}     &     \begin{equation}     \begin{aligned}     % LOTS OF EQUATIONS %     \end{aligned}     \end{equation}     \end{tabular}      But it does not work and return the following error :                You can't use '\eqno' in restricted horizontal mode      How to do what I want to do?


title: Slanted grids in TikZ as a macro?

text: I'm trying to draw a diagram with slanted grids in it, sort of like the 3D effect given at http://www.texample.net/tikz/examples/3d-graph-model/ Ideally, I'd like a macro `slantedgrid` so that for example               \draw (10,12) \slantedgrid (7,5);      or maybe even simply               \slantedgrid{10}{12}{7}{5}      will draw a grid with all vertical lines slanted at 45 degrees, the lower left corner at (10,12) and with 5+1 horizontal lines and 7+1 vertical (slanted) lines. My first (and so far only) attempt was to define it with LaTeX "newcommand" as               \newcommand{\slantedgrid}[4]{%       \foreach \x in {#1,#1+1,...,#1+#3} \draw (\x,#2) -- ++(#4,#4);%       \foreach \y in {#2,#2+1,...,#2+#4} \draw (\y-#4,\y) -- ++(#3,0);%      }      However, all this produces is loads of errors - "Illegal unit of measure (pt inserted)" - when I bung `slantedgrid{10}{12}{7}{5}` into a `tikzpicture` environment. Is there any simple method of doing something like this - in particular passing the parameters from a `newcommand` to TikZ's `foreach`?


title: Everything in one slide for a theme

text: I have the following problem. I use a theme, where it seems, that I can't put everything in one slide. First, there is an empty page, than the picture, than then every item one after another. I want to have a picture on the left side and the text on the right side to appear at once in one slide. Is there a way to do it with the following code? I use the FUBerlin theme, which you can find here: http://ctanhg.scharrer- online.de/pkg/beamer-fuberlin.html               \documentclass[t,smaller,compress]{FUbeamer}          \usepackage[ngerman]{babel}     \usepackage[utf8x]{inputenc}     \begin{document}     \title{title}     \author{Anonymous \\      Betreuer: Dr. Anonymous}     \date{1. Juli 2014}     \titlegraphic{geo}     \fachbereich{Institut}     \maketitle          \begin{frame}{Inhaltsverzeichnis}     \tableofcontents     \end{frame}          \section{Motivation}          \begin{frame}     \begin{columns}[T]          \begin{column}[T]{5cm}             pic             \includegraphics[height=6cm]{region_krueg.jpg}             \end{column}                 \begin{column}[T]{5cm}     \begin{itemize}     \item text     \item text     \item text      \item text     \item text     \end{itemize}             \end{column}       \end{columns}     \end{frame}               \begin{frame}     \begin{columns}[T]          \begin{column}[T]{5cm}             %Bild             \includegraphics[height=5cm]{verteilung_kor.jpg}             \end{column}                 \begin{column}[T]{5cm}     \begin{itemize}     \item text     \item text     \item text     \item text     \item text     \end{itemize}             \end{column}       \end{columns}     \end{frame}          \end{document}      If it isn't possible with this theme, could somebody give me an alternative theme, where it works? Help is much appreciated. It's my first presentation in beamer. Greetz


title: How to type apostrophes in an easier way?

text: I find typing > `a word' and > ``a word'' quite inconvenient, because I find it rather annoying to type > ` and > `` all the time. Instead, I'd prefer typing 'a word' and "a word" (which I often do when I don't pay attention, causing wrong displays). I was hoping the `inputenc` package would make this possible, but apparently it doesn't. Is there a solution for this?


title: Bold subscripts

text: I would like my subscript `y_{ij}` in bold. I used:               \usepackage[fleqn]{amsmath}          \begin{document}     \bf{y}_{ij}      \end{document}      or               \mathbf{y}_{ij}            but really nothing happens. Only `y` is in bold. Can anyone help me please? Best


title: Modiagram Package: How can we add 3s,3d ... orbitals?

text: I'm learning to use LaTeX to prepare my chemistry lessons using Beamer. While searching the internet I found the `modiagram` package that helped me so much, but I need help with the following:   1. How can I build energy diagrams for individual atoms? I would like to be able to add the 3s, 3d, _etc._ orbitals   2. Also, how can I put energy values on the y axis, like hidrogen energy level's diagram?


title: Proper use of the emp package

text: I've used metapost for generating figures for my latex documents for some time, but I've always managed them as separate documents, and included the resulting graphics into the latex document using `\includgraphics{figure.mps}`. However, I decided to try the `emp` package to incorporate the metapost definitions directly in my main document. Here's a working example (working.mp) of the metapost code I'm trying to generate:               verbatimtex     \documentclass [12pt]{article}     \newcommand \stack [1]{\vbox {\halign {\hfil ##\hfil \cr #1\crcr }}}      \begin {document}     etex;     input expressg;     beginfig(1);     LaTeX_unitlength := 1.0pt;     w := 40*LaTeX_unitlength;     h := 40*LaTeX_unitlength;     z0 = origin;     drawroundedbox(0, 2.5cm, 3cm, 5mm)(btex \stack{Domain\cr Name\cr Service} etex);     endfig;     verbatimtex     \end{document}     etex;     end.     endinput;      I can invoke `TEX=latex mpost working.mp` and it successfully process this file. Here's an MWE of the latex file (test.tex) I'm trying to use to generate the same metapost figure:               \documentclass[letterpaper,12pt, openbib]{article}     \usepackage[utf8]{inputenc}     \usepackage{emp}     \empaddtoTeX{\newcommand\stack[1]{\vbox{\halign{\hfil##\hfil\cr#1\crcr}}}}     \empprelude{input expressg}     \DeclareGraphicsRule{*}{mps}{*}{}     \title{Emp Package Test}     \author{Author}     \begin{document}     \maketitle     \begin{empfile}[\jobname-figs]     \section{Emp Package Test}     This is a test trying to get a macro properly added to the verbatimtex section      of the generated metapost file.          \verb+\newcommand\stack[1]{\vbox{\halign{\hfil##\hfil\cr#1\crcr}}}+          The macro above is what we are trying to add.  However, things aren't working      out the way I want them to.  Instead, what's showing up in the MetaPost file is:     \begin{verbatim}     verbatimtex     \documentclass [12pt]{article}     \newcommand \stack [1]{\vbox {\halign {\hfil ####\hfil \cr ##1\crcr }}}      \begin {document}     etex;     \end{verbatim}          \begin{figure}       \begin{center}         \begin{emp}(40,40)           z0 = origin;           drawroundedbox(0, 2.5cm, 3cm, 5mm)(btex \stack{Domain\cr Name\cr Service} etex);         \end{emp}       \end{center}       \caption{\label{fig:emp}Example using embeded MetaPost}     \end{figure}     \end{empfile}     \end{document}      Running pdflatex on example.tex produces example-figs.mp. Running the same mpost command on example-figs.mp fails with this output:               --(0)> TEX=latex mpost test-figs.mp      This is MetaPost, version 1.803 (kpathsea version 6.2.0dev)     (mpost.mp (/usr/share/texlive/texmf-dist/metapost/base/plain.mp     Preloading the plain mem file, version 1.004) ) (./test-figs.mp     (/usr/share/texlive/texmf-dist/metapost/expressg/expressg.mp     >> "expressg.mp version 1.61, 2004/03/17")fatal: Command failed: latex --parse-first-line --interaction=nonstopmode mpm0nOLA.tex; see mpxerr.log     >> test-figs.mp     >> test-figs.mpx     ! ! Unable to make mpx file.     l.13       drawroundedbox(0, 2.5cm, 3cm, 5mm)(btex                                                        \stack{Domain\cr Name\cr     Transcript written on test-figs.log.      Examining the metapost file the emp package created (test-figs.mp) reveals that it is identical to the working.mp file I showed at the beginning _except_ for the definition of the \stack macro added in the verbatimtex ... etex block at the start:               verbatimtex     \documentclass [12pt]{article}     \newcommand \stack [1]{\vbox {\halign {\hfil ####\hfil \cr ##1\crcr }}}      \begin {document}     etex;      This was added by the `\empaddtoTeX` macro that is in the preamble of test.tex. I have two related questions:   1. How can I get `\empaddtoTeX` from doubling all the '#' characters in the argument passed to it.   2. I really want a `%&latex` added to the `verbatimtex` block so I can invoke metapost as just `mpost test-figs.mp` instead of the way I described, but `\empaddtoTex{%&latex}` doesn't work because everything after the '%' is treated as a somment, and pdflatex complains about the missing '}'. Can this be done?


title: Problem in using comment line in tcolorbox in a bash code

text: I am recently introduced to `tcolorbox`, which is a great package. I am trying to use it to highlight computer codes such as `bash`, `python`, and `c++` in my document. When I run the following MWE, I get the error: `Illegal parameter number in definition of \next #`. In the following MWE, when I remove the first comment line: `# Unzip the file to the created directory` it works with no problem. However, I would like to have the comment line at the beginning of the bash code. Could someone shed light on this?               \documentclass[11pt,letterpaper]{article}          \usepackage{tcolorbox}     \tcbuselibrary{minted,skins}          \newtcblisting{bashcode}[1][]{       listing engine=minted,       colback=bg,       colframe=black!70,       listing only,       minted style=colorful,       minted language=bash,       minted options={linenos=true,numbersep=3mm,texcl=true,#1},       left=5mm,enhanced,       overlay={\begin{tcbclipinterior}\fill[black!25] (frame.south west)                 rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}}     }     \definecolor{bg}{rgb}{0.85,0.85,0.85}          \begin{document}          \begin{bashcode}     # Unzip the file to the created directory     $ unzip code-163f67cbf550560aa351b3d0a3bbbd7a22863cb4.zip -d ~          $ mkdir ~/code          # Since the directory name is long, I do the following     $ mv ~/code-163f67cbf550560aa351b3d0a3bbbd7a22863cb4/ ~/code     $ cd ~/code     $ ls -F     apps/     inverters/           Makefile*  numerics/    sphfunc/     imaging/  logging.properties*  models/    simulation/          $ make     \end{bashcode}          \end{document}


title: Hatching that does not obscure a right-angle mark

text: Hatching - I suppose in the northeast direction - is to be added to the square with an edge length of $c$ in following diagram. I have a right-angle mark at one of the corners of the square. Is there code to instruct TikZ to draw these hatching lines not to go into the little square made by this right-angle mark? I would like these hatching lines to go to the right-angle mark, though. (What code would instruct TikZ to shade the square with an edge length of $c$? The shading should be drawn in the little square made by this right-angle mark.) By the way, this is a diagram for a demonstration of the Pythagorean Theorem. I saw one web site that attributed this diagram to the 12 century Indian mathematician Bhaskara. Does anybody have a citation for this?               \documentclass[10pt]{amsart}     \usepackage{tikz}     \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}     \usepackage{tkz-euclide}     \usetkzobj{all}               \begin{document}          \begin{tikzpicture}     \path (-3,-3) coordinate (A) (-3,3) coordinate (B) (3,3) coordinate (C) (3, -3) coordinate (D);     \path (-3,-1) coordinate (P) (-1,3) coordinate (Q) (3,1) coordinate (R) (1,-3) coordinate (S);     \draw (A) -- (P) node [midway, left]{$a$} -- (B) node [midway, left]{$b$}     -- (Q) node [midway, above]{$a$} -- (C) node [midway, above]{$b$}     -- (R) node [midway, right]{$a$} -- (D) node [midway, right]{$b$}      -- (S) node [midway, below]{$a$} -- (A) node [midway, below]{$b$};     \draw (P) -- (Q) node [midway, left]{$c$} -- (R) node [midway, right, above]{$c$} -- (S) node [midway, right]{$c$} -- (P) node [midway, below]{$c$};     \draw[|<->|] ($(A)!7mm!-90:(D)$)--node[fill=white,sloped] {$a + b$} ($(D)!7mm!90:(A)$);     \draw[|<->|] ($(A)!7mm!90:(B)$)--node[fill=white,sloped] {$a + b$} ($(B)!7mm!-90:(A)$);     \tkzMarkRightAngle(P,A,S);     \tkzMarkRightAngle(Q,P,S);     \end{tikzpicture}          \end{document}


title: Add comment/explnation at the end of the page

text: How can I add a comment at the end of the page like this: ![enter image description here](http://i.stack.imgur.com/T9XIz.png) Thank you.