title: Chess diagramm with arrows in skak, xskak

text: How can I draw arrows on a chess game? For example, if the game starts with 1. e4 ..., I want to draw a black arrow from e2 to e4 to show the movement, and, in the same diagram, two red arrows from e4 to f5, and another from e4 to d5, to show the pawn attacking the squares. Following game works for me. I'd like to find additional highlighting possibilities. For example, for educational purposes, an arrow between the knight in f6 to the squares being attacked by it.               \documentclass[a4paper,10pt]{article}     \usepackage{skak}     \usepackage{xskak}               \begin{document}          \newgame     \mainline{1. e4 e5 2. Nf3 Bc5}     \chessboard          \end{document}


title: Hyphenate when using underscore as a letter

text: In many place in my current text I have to insert something like `Name_of_model` for instance. I found the last suggestion in this answer very helpful. However, I am facing a problem when it come to hyphenation of the argument of the macro `\escapeus`. How can I improve `\escapeus` so it will enable hyphenation of the argument. In particular, if hyphenation is needed, it should put it right after an underscore, for example: `Name_of_-model`. Inspired by this one, I tried to modify the definition given by @egreg above as follows:               \DeclareRobustCommand*{\escapeus}[1]{%       \begingroup\@activeus\scantokens{#1\endinput}\endgroup}     \begingroup\lccode`\~=`\_\relax     \lowercase{\endgroup\def\@activeus{\catcode`\_=\active \let~\_\discretionary{-}{}{}}}      All my attempts (which included moving the `_` around) failed. **How can I improve the code above, so it will enable hyphenation of the argument of`\escapeus`?**


title: Remove shadow from beamer displaybox

text: I don't like shadows of the displaybox environment of beamer. I've found this file `/usr/share/texmf/tex/latex/beamer/themes/inner/beamerinnerthemeumbcboxes.sty` which contains its declarations               \newenvironment{displaybox}[1]     {       \centerline\bgroup\hfill       \begin{beamerboxesrounded}[lower=umbcboxes,shadow=true,width=#1]{}     }     {       \end{beamerboxesrounded}\hfill\egroup     }      I tried to change to `shadow=false` and then execute a `$texhash` but I keep getting shadows, can anyone tell me how to override this setting? Thanks


title: Justify text beamer poster

text: I was trying to modify the style of this template (http://www.latextemplates.com/template/dreuw-deselaers-poster). I can not justify the text inside of each block. I tried modifying the style and tex archives. Is there any solution for that? Thanks in advance!


title: Section vertical position is displaced

text: Here are two pages of the same document, Image 1 shows the 2nd page, where `\section{Tareas realizadas}` is overlapping the textheight top, while the Image 2 shows the 3rd page (correct behavior). Why is the first `\section` overlapping the top border? ![Image 1](http://i.stack.imgur.com/zEdgy.png) ![Image 2](http://i.stack.imgur.com/NV6e0.png) Here's the code (table data is generated on-the-fly by an external Python program):               % use article styling for this document     \documentclass[11pt,a4paper]{article}          % enable system font access     \usepackage{fontspec}     \usepackage{lastpage}     \usepackage{fancyhdr}     \usepackage[spanish]{babel}     % agregar showframe para ver los márgenes     \usepackage[showframe, top=3cm, bottom=3cm, left=2cm, right=2cm]{geometry}     \usepackage{tocloft}     \usepackage{xcolor,colortbl}     \usepackage{longtable}     \usepackage{titlesec}          \definecolor{Gray}{gray}{0.85}     \definecolor{LightCyan}{RGB}{60,179,113}          \renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}     \fancypagestyle{myheader}{%       \fancyhf{}% Clear all headers/footers       \fancyhead[C]{Informe Semanal - \input{fecha.dat}}% Header Centred       \fancyfoot[R]{\thepage /\pageref{LastPage}}% Footer Centred       \renewcommand{\headrulewidth}{2pt}% 2pt header rule       \renewcommand{\headrule}{\hbox to\headwidth{%         \color{LightCyan}\leaders\hrule height \headrulewidth\hfill}}       \renewcommand{\footrulewidth}{0pt}% No footer rule     }          % styling: Palatino (main text), Helvetica (stress)     \setmainfont{OptimaLTStd}     \newfontfamily{\maintext}{OptimaLTStd}     \newfontfamily{\stressed}{HelveticaLTStd-Roman}          % start of actual document     \renewcommand{\abstractname}{Sumario}          \begin{document}            \pagestyle{myheader}       \begin{titlepage}         \setcounter{page}{0}              \title{Informe semanal}         \author{Leonardo M. Ramé\\ Medical I.T.}         \immediate\write18{./get_date.sh > fecha.dat}         \date{\input{fecha.dat}}         \maketitle               \renewcommand\contentsname{Tabla de contenidos}         \tableofcontents              \section*{Resumen}         \immediate\write18{./get_agregados.sh > temp.dat}         \input{temp.dat}            \thispagestyle{empty}       \end{titlepage}          %\titleformat{name=\section}[block]     %  {}     %  {}     %  {0pt}     %  {\colorsection}          %\titlespacing{\section}{0pt}{\baselineskip}{\baselineskip}          %\newcommand{\colorsection}[1]{%     %  \colorbox{Gray}{\parbox{\dimexpr\textwidth-2\fboxsep}{\thesection\ #1}}}          \newpage     \section{Tareas realizadas}          % generamos el listado y lo guardamos en temp.dat     \immediate\write18{./get_reports.sh closed|python parser.py CLOSED > temp.dat}     \input{temp.dat}          \newpage     \section{Tareas pendientes}          % generamos el listado y lo guardamos en temp.dat     \immediate\write18{./get_reports.sh open|python parser.py OPEN > temp.dat}     \input{temp.dat}          \end{document}      **Edit** : Here's the warning by Fancyhdr               Package Fancyhdr Warning: \headheight is too small (12.0pt):       Make it at least 23.11996pt.      We now make it that large for the rest of the document.      This may cause the page layout to be inconsistent, however.      I've modified my fancypagestyle to this:               \fancypagestyle{myheader}{%       \fancyhf{}% Clear all headers/footers       \setlength{\headheight}{40pt}       \setlength{\textheight}{620pt}       \fancyhead[C]{Informe Semanal - \input{fecha.dat}}% Header Centred       \fancyfoot[R]{\thepage /\pageref{LastPage}}% Footer Centred       \renewcommand{\headrulewidth}{2pt}% 2pt header rule       \renewcommand{\headrule}{\hbox to\headwidth{%         \color{LightCyan}\leaders\hrule height \headrulewidth\hfill}}       \renewcommand{\footrulewidth}{0pt}% No footer rule     }      And it worked as expected!.


title: How to solve 'I found no database files--while read file something.aux'

text: Hi I am trying to include references into my paper but it keeps showing the following when I compile. I am using texstudio. Message: I'm skipping whatever remains of this command The style file: plain.bst I found no database files--- while reading file term paper.aux Warning--I didn't find a database entry for "Astrov" My code is like this:               \documentclass[letter,scriptaddress,twocolumn, prl,showkeys]{revtex4}          \usepackage{amssymb, amsmath, amstext, amscd, verbatim, mathtools, graphicx, float, caption, subcaption}     \usepackage[utf8]{inputenc}     \usepackage{natbib}     \begin{document}     This is my reference\cite[1]{Astrov}.     \bibliography{term paper}     \bibliographystyle{plain}     \end{document}      They are all in the same directory. I am really panicing about this at the moment and apologize if similar questions have been asked before. Thanks in advance for your help!


title: How to make shaded pages and still see memoir's trim frame?

text: I am using memoir and I have the showtrims setting activated which I want visible on my pages. I am trying to toggle shading of entire pages and so far I am not having any great success. I have looked around but not seen anything obvious that can help me but this is what I have managed to come up with:               \documentclass[showtrims, 10pt]{memoir}     \usepackage{lipsum}     \usepackage{eso-pic}          \stockaiv     \settrims{20mm}{20mm}     \trimFrame          \pagesmallroyalvo          \setbinding{4mm}     \settypeblocksize{*}{24.5pc}{1.618}     \setlrmargins{*}{*}{1.5}     \setulmarginsandblock{6pc}{7pc}{*}     \setmarginnotes{6pt}{6pc}{12pt}     \strictpagecheck     \setlength{\topskip}{1.6\topskip}     \checkandfixthelayout          \begin{document}     \lipsum[1-4]          \newpage     \AddToShipoutPictureBG{       \AtStockUpperLeft{         \colorbox{cyan}{\vspace* \stockheight \hspace \stockwidth}       }     }          \lipsum[1-4]          \AddToShipoutPictureBG{       \AtStockUpperLeft{       }     }     \newpage     \lipsum[1-4]               \end{document}      However there are two problems.   1. I can't seem to manage to fill out the page in the vertical direction. Only in te horizontal.   2. I don't seem to be able to turn it off by changing the ship out picture again. What am I doing wrong? Or is there a better way of doing this?


title: Append text to biblatex footnote citation

text: Does biblatex allow to append arbitrary comments to footnote citations? For example, I now have this code:               Lorem ipsum.\autocite[2]{foobar}      And it gives this at the bottom of the page: > Foobar, p. 2. The result I'm after is: > Foobar, p. 2. What a cute little comment. Where should I put "What a cute little comment." for it to appear in the footnote?


title: plot pgfplots graph similar to facet_wrap from ggplot2

text: I need to plot a 2x2 grid of graphs as shown below: ![enter image description here](http://i.stack.imgur.com/39r1P.png) **Note:** The above graph was generated using the `ggplot2` library from the statistical programming language R. Graph taken from link. Here are the four data files: `tips-fri.csv`:               totalbill,tip,sex,smoker,day,time,size     28.97,3,Male,Yes,Fri,Dinner,2     22.49,3.5,Male,No,Fri,Dinner,2     5.75,1,Female,Yes,Fri,Dinner,2     16.32,4.3,Female,Yes,Fri,Dinner,2     22.75,3.25,Female,No,Fri,Dinner,2     40.17,4.73,Male,Yes,Fri,Dinner,4     27.28,4,Male,Yes,Fri,Dinner,2     12.03,1.5,Male,Yes,Fri,Dinner,2     21.01,3,Male,Yes,Fri,Dinner,2     12.46,1.5,Male,No,Fri,Dinner,2     11.35,2.5,Female,Yes,Fri,Dinner,2     15.38,3,Female,Yes,Fri,Dinner,2     12.16,2.2,Male,Yes,Fri,Lunch,2     13.42,3.48,Female,Yes,Fri,Lunch,2     8.58,1.92,Male,Yes,Fri,Lunch,1     15.98,3,Female,No,Fri,Lunch,3     13.42,1.58,Male,Yes,Fri,Lunch,2     16.27,2.5,Female,Yes,Fri,Lunch,2     10.09,2,Female,Yes,Fri,Lunch,2      `tips-sat.csv`:               totalbill,tip,sex,smoker,day,time,size     20.65,3.35,Male,No,Sat,Dinner,3     17.92,4.08,Male,No,Sat,Dinner,2     20.29,2.75,Female,No,Sat,Dinner,2     15.77,2.23,Female,No,Sat,Dinner,2     39.42,7.58,Male,No,Sat,Dinner,4     19.82,3.18,Male,No,Sat,Dinner,2     17.81,2.34,Male,No,Sat,Dinner,4     13.37,2,Male,No,Sat,Dinner,2     12.69,2,Male,No,Sat,Dinner,2     21.7,4.3,Male,No,Sat,Dinner,2     19.65,3,Female,No,Sat,Dinner,2     9.55,1.45,Male,No,Sat,Dinner,2     18.35,2.5,Male,No,Sat,Dinner,4     15.06,3,Female,No,Sat,Dinner,2     20.69,2.45,Female,No,Sat,Dinner,4     17.78,3.27,Male,No,Sat,Dinner,2     24.06,3.6,Male,No,Sat,Dinner,3     16.31,2,Male,No,Sat,Dinner,3     16.93,3.07,Female,No,Sat,Dinner,3     18.69,2.31,Male,No,Sat,Dinner,3     31.27,5,Male,No,Sat,Dinner,3     16.04,2.24,Male,No,Sat,Dinner,3     38.01,3,Male,Yes,Sat,Dinner,4     26.41,1.5,Female,No,Sat,Dinner,2     11.24,1.76,Male,Yes,Sat,Dinner,2     48.27,6.73,Male,No,Sat,Dinner,4     20.29,3.21,Male,Yes,Sat,Dinner,2     13.81,2,Male,Yes,Sat,Dinner,2     11.02,1.98,Male,Yes,Sat,Dinner,2     18.29,3.76,Male,Yes,Sat,Dinner,4     17.59,2.64,Male,No,Sat,Dinner,3     20.08,3.15,Male,No,Sat,Dinner,3     16.45,2.47,Female,No,Sat,Dinner,2     3.07,1,Female,Yes,Sat,Dinner,1     20.23,2.01,Male,No,Sat,Dinner,2     15.01,2.09,Male,Yes,Sat,Dinner,2     12.02,1.97,Male,No,Sat,Dinner,2     17.07,3,Female,No,Sat,Dinner,3     26.86,3.14,Female,Yes,Sat,Dinner,2     25.28,5,Female,Yes,Sat,Dinner,2     14.73,2.2,Female,No,Sat,Dinner,2     10.51,1.25,Male,No,Sat,Dinner,2     17.92,3.08,Male,Yes,Sat,Dinner,2     44.3,2.5,Female,Yes,Sat,Dinner,3     22.42,3.48,Female,Yes,Sat,Dinner,2     20.92,4.08,Female,No,Sat,Dinner,2     15.36,1.64,Male,Yes,Sat,Dinner,2     20.49,4.06,Male,Yes,Sat,Dinner,2     25.21,4.29,Male,Yes,Sat,Dinner,2     18.24,3.76,Male,No,Sat,Dinner,2     14.31,4,Female,Yes,Sat,Dinner,2     14,3,Male,No,Sat,Dinner,2     7.25,1,Female,No,Sat,Dinner,1     10.59,1.61,Female,Yes,Sat,Dinner,2     10.63,2,Female,Yes,Sat,Dinner,2     50.81,10,Male,Yes,Sat,Dinner,3     15.81,3.16,Male,Yes,Sat,Dinner,2     26.59,3.41,Male,Yes,Sat,Dinner,3     38.73,3,Male,Yes,Sat,Dinner,4     24.27,2.03,Male,Yes,Sat,Dinner,2     12.76,2.23,Female,Yes,Sat,Dinner,2     30.06,2,Male,Yes,Sat,Dinner,3     25.89,5.16,Male,Yes,Sat,Dinner,4     48.33,9,Male,No,Sat,Dinner,4     13.27,2.5,Female,Yes,Sat,Dinner,2     28.17,6.5,Female,Yes,Sat,Dinner,3     12.9,1.1,Female,Yes,Sat,Dinner,2     28.15,3,Male,Yes,Sat,Dinner,5     11.59,1.5,Male,Yes,Sat,Dinner,2     7.74,1.44,Male,Yes,Sat,Dinner,2     30.14,3.09,Female,Yes,Sat,Dinner,4     20.45,3,Male,No,Sat,Dinner,4     13.28,2.72,Male,No,Sat,Dinner,2     22.12,2.88,Female,Yes,Sat,Dinner,2     24.01,2,Male,Yes,Sat,Dinner,4     15.69,3,Male,Yes,Sat,Dinner,3     11.61,3.39,Male,No,Sat,Dinner,2     10.77,1.47,Male,No,Sat,Dinner,2     15.53,3,Male,Yes,Sat,Dinner,2     10.07,1.25,Male,No,Sat,Dinner,2     12.6,1,Male,Yes,Sat,Dinner,2     32.83,1.17,Male,Yes,Sat,Dinner,2     35.83,4.67,Female,No,Sat,Dinner,3     29.03,5.92,Male,No,Sat,Dinner,3     27.18,2,Female,Yes,Sat,Dinner,2     22.67,2,Male,Yes,Sat,Dinner,2     17.82,1.75,Male,No,Sat,Dinner,2      `tips-sun.csv`:               totalbill,tip,sex,smoker,day,time,size     16.99,1.01,Female,No,Sun,Dinner,2     10.34,1.66,Male,No,Sun,Dinner,3     21.01,3.5,Male,No,Sun,Dinner,3     23.68,3.31,Male,No,Sun,Dinner,2     24.59,3.61,Female,No,Sun,Dinner,4     25.29,4.71,Male,No,Sun,Dinner,4     8.77,2,Male,No,Sun,Dinner,2     26.88,3.12,Male,No,Sun,Dinner,4     15.04,1.96,Male,No,Sun,Dinner,2     14.78,3.23,Male,No,Sun,Dinner,2     10.27,1.71,Male,No,Sun,Dinner,2     35.26,5,Female,No,Sun,Dinner,4     15.42,1.57,Male,No,Sun,Dinner,2     18.43,3,Male,No,Sun,Dinner,4     14.83,3.02,Female,No,Sun,Dinner,2     21.58,3.92,Male,No,Sun,Dinner,2     10.33,1.67,Female,No,Sun,Dinner,3     16.29,3.71,Male,No,Sun,Dinner,3     16.97,3.5,Female,No,Sun,Dinner,3     17.46,2.54,Male,No,Sun,Dinner,2     13.94,3.06,Male,No,Sun,Dinner,2     9.68,1.32,Male,No,Sun,Dinner,2     30.4,5.6,Male,No,Sun,Dinner,4     18.29,3,Male,No,Sun,Dinner,2     22.23,5,Male,No,Sun,Dinner,2     32.4,6,Male,No,Sun,Dinner,4     28.55,2.05,Male,No,Sun,Dinner,3     18.04,3,Male,No,Sun,Dinner,2     12.54,2.5,Male,No,Sun,Dinner,2     10.29,2.6,Female,No,Sun,Dinner,2     34.81,5.2,Female,No,Sun,Dinner,4     9.94,1.56,Male,No,Sun,Dinner,2     25.56,4.34,Male,No,Sun,Dinner,4     19.49,3.51,Male,No,Sun,Dinner,2     38.07,4,Male,No,Sun,Dinner,3     23.95,2.55,Male,No,Sun,Dinner,2     25.71,4,Female,No,Sun,Dinner,3     17.31,3.5,Female,No,Sun,Dinner,2     29.93,5.07,Male,No,Sun,Dinner,4     14.07,2.5,Male,No,Sun,Dinner,2     13.13,2,Male,No,Sun,Dinner,2     17.26,2.74,Male,No,Sun,Dinner,3     24.55,2,Male,No,Sun,Dinner,4     19.77,2,Male,No,Sun,Dinner,4     29.85,5.14,Female,No,Sun,Dinner,5     48.17,5,Male,No,Sun,Dinner,6     25,3.75,Female,No,Sun,Dinner,4     13.39,2.61,Female,No,Sun,Dinner,2     16.49,2,Male,No,Sun,Dinner,4     21.5,3.5,Male,No,Sun,Dinner,4     12.66,2.5,Male,No,Sun,Dinner,2     16.21,2,Female,No,Sun,Dinner,3     13.81,2,Male,No,Sun,Dinner,2     17.51,3,Female,Yes,Sun,Dinner,2     24.52,3.48,Male,No,Sun,Dinner,3     20.76,2.24,Male,No,Sun,Dinner,2     31.71,4.5,Male,No,Sun,Dinner,4     7.25,5.15,Male,Yes,Sun,Dinner,2     31.85,3.18,Male,Yes,Sun,Dinner,2     16.82,4,Male,Yes,Sun,Dinner,2     32.9,3.11,Male,Yes,Sun,Dinner,2     17.89,2,Male,Yes,Sun,Dinner,2     14.48,2,Male,Yes,Sun,Dinner,2     9.6,4,Female,Yes,Sun,Dinner,2     34.63,3.55,Male,Yes,Sun,Dinner,2     34.65,3.68,Male,Yes,Sun,Dinner,4     23.33,5.65,Male,Yes,Sun,Dinner,2     45.35,3.5,Male,Yes,Sun,Dinner,3     23.17,6.5,Male,Yes,Sun,Dinner,4     40.55,3,Male,Yes,Sun,Dinner,2     20.69,5,Male,No,Sun,Dinner,5     20.9,3.5,Female,Yes,Sun,Dinner,3     30.46,2,Male,Yes,Sun,Dinner,5     18.15,3.5,Female,Yes,Sun,Dinner,3     23.1,4,Male,Yes,Sun,Dinner,3     15.69,1.5,Male,Yes,Sun,Dinner,2      `tips-thur.csv`:               totalbill,tip,sex,smoker,day,time,size     27.2,4,Male,No,Thur,Lunch,4     22.76,3,Male,No,Thur,Lunch,2     17.29,2.71,Male,No,Thur,Lunch,2     19.44,3,Male,Yes,Thur,Lunch,2     16.66,3.4,Male,No,Thur,Lunch,2     10.07,1.83,Female,No,Thur,Lunch,1     32.68,5,Male,Yes,Thur,Lunch,2     15.98,2.03,Male,No,Thur,Lunch,2     34.83,5.17,Female,No,Thur,Lunch,4     13.03,2,Male,No,Thur,Lunch,2     18.28,4,Male,No,Thur,Lunch,2     24.71,5.85,Male,No,Thur,Lunch,2     21.16,3,Male,No,Thur,Lunch,2     10.65,1.5,Female,No,Thur,Lunch,2     12.43,1.8,Female,No,Thur,Lunch,2     24.08,2.92,Female,No,Thur,Lunch,4     11.69,2.31,Male,No,Thur,Lunch,2     13.42,1.68,Female,No,Thur,Lunch,2     14.26,2.5,Male,No,Thur,Lunch,2     15.95,2,Male,No,Thur,Lunch,2     12.48,2.52,Female,No,Thur,Lunch,2     29.8,4.2,Female,No,Thur,Lunch,6     8.52,1.48,Male,No,Thur,Lunch,2     14.52,2,Female,No,Thur,Lunch,2     11.38,2,Female,No,Thur,Lunch,2     22.82,2.18,Male,No,Thur,Lunch,3     19.08,1.5,Male,No,Thur,Lunch,2     20.27,2.83,Female,No,Thur,Lunch,2     11.17,1.5,Female,No,Thur,Lunch,2     12.26,2,Female,No,Thur,Lunch,2     18.26,3.25,Female,No,Thur,Lunch,2     8.51,1.25,Female,No,Thur,Lunch,2     10.33,2,Female,No,Thur,Lunch,2     14.15,2,Female,No,Thur,Lunch,2     16,2,Male,Yes,Thur,Lunch,2     13.16,2.75,Female,No,Thur,Lunch,2     17.47,3.5,Female,No,Thur,Lunch,2     34.3,6.7,Male,No,Thur,Lunch,6     41.19,5,Male,No,Thur,Lunch,5     27.05,5,Female,No,Thur,Lunch,6     16.43,2.3,Female,No,Thur,Lunch,2     8.35,1.5,Female,No,Thur,Lunch,2     18.64,1.36,Female,No,Thur,Lunch,3     11.87,1.63,Female,No,Thur,Lunch,2     9.78,1.73,Male,No,Thur,Lunch,2     7.51,2,Male,No,Thur,Lunch,2     19.81,4.19,Female,Yes,Thur,Lunch,2     28.44,2.56,Male,Yes,Thur,Lunch,2     15.48,2.02,Male,Yes,Thur,Lunch,2     16.58,4,Male,Yes,Thur,Lunch,2     7.56,1.44,Male,No,Thur,Lunch,2     10.34,2,Male,Yes,Thur,Lunch,2     43.11,5,Female,Yes,Thur,Lunch,4     13,2,Female,Yes,Thur,Lunch,2     13.51,2,Male,Yes,Thur,Lunch,2     18.71,4,Male,Yes,Thur,Lunch,3     12.74,2.01,Female,Yes,Thur,Lunch,2     13,2,Female,Yes,Thur,Lunch,2     16.4,2.5,Female,Yes,Thur,Lunch,2     20.53,4,Male,Yes,Thur,Lunch,4     16.47,3.23,Female,Yes,Thur,Lunch,3     18.78,3,Female,No,Thur,Dinner,2      Here is my best attempt and the output               \documentclass{standalone}          \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}          \pgfplotsset{compat=1.8}          \begin{document}     \begin{tikzpicture}       \begin{groupplot}[             group style={group size=2 by 2},             ymin=0,ymax=0.75,]         \nextgroupplot[title=Friday]         \addplot+[only marks,mark=o] table [x=totalbill,y expr={\thisrow{tip} / \thisrow{totalbill}},col sep=comma]             {tips-fri.csv};         \nextgroupplot[title=Saturday]         \addplot+[only marks,mark=o] table [x=totalbill,y expr={\thisrow{tip} / \thisrow{totalbill}},col sep=comma]             {tips-sat.csv};         \nextgroupplot[title=Sunday]         \addplot+[only marks,mark=o] table [x=totalbill,y expr={\thisrow{tip} / \thisrow{totalbill}},col sep=comma]             {tips-sun.csv};         \nextgroupplot[title=Thursday]         \addplot+[only marks,mark=o] table [x=totalbill,y expr={\thisrow{tip} / \thisrow{totalbill}},col sep=comma]             {tips-thur.csv};       \end{groupplot}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ZDMu1.png) **Room for improvement**   * How to get the title of each plot closer to the corresponding plot?   * How to put the title in a grey rectangular box above the corresponding plot?   * How to insert the x-axis and y-axis labels?   * I **don't** need the background of the plot area to be shaded grey, nor to have help lines.


title: Substitute string in subscript

text: I want to define a command to shorten formula like this `a^1,\cdots,a^n`, using a placeholder `(-)` instead of index, the code is               \usepackage{xstring}     \newcommand{\replaceStr}[2]{\begingroup\expandarg\StrSubstitute{#1}{(-)}{#2}\endgroup}     \newcommand\coordsnn[1]{\replaceStr{#1}{^1},\cdots,\replaceStr{#1}{^n}}      It works, e.g. `$\coordsnn{A(-)B(-)C}$` results in `$A^1B^1C,\cdots,A^nB^nC$`. However, if I go further and extend it to situation like `a_{01},\cdots,b_{0n}`, the command looks like:               \newcommand\coordsnX[1]{\replaceStr{#1}{1},\cdots,\replaceStr{#1}{n}}      It doesn't work any more, leaving `(-)` unchanged. How to realize this kind of command? How about supscript? Following is the sample testing code:               \documentclass{article}     \usepackage{xstring}     \newcommand{\replaceStr}[2]{\begingroup\expandarg\StrSubstitute{#1}{(-)}{#2}\endgroup}     \newcommand\coordsnn[1]{\replaceStr{#1}{^1},\cdots,\replaceStr{#1}{^n}}     \newcommand\coordsnX[1]{\replaceStr{#1}{1},\cdots,\replaceStr{#1}{n}}     \begin{document}     Working example:     $$     \coordsnn{a(-)b(-)c}     $$     Not working example:     $$     \coordsnn{a_{0(-)}b_{0(-)}c}, \coordsnn{a^{0(-)}b^{0(-)}c}     $$     \end{document}


title: How to get the proper position for eps graphs using dvipdfm?

text: After a MikTeX update in the middle of October, the dvipdfm utility does not put eps graphs to correct place. The graphs are shifted with respect to their captions, parts of graphs may disappear. The same happened on computers of my colleagues after MikTeX updates. I am working with MikTeX 2.9 under Windows 7. The conversion through dvips and ps2pdf works normally. Does anybody know what could be done with dvipdfm? Here is a sample code:               \documentclass{article}     \usepackage{graphicx}          \begin{document}     \title{Minimum example}     \author{S. O. Mebody}     \maketitle          Just some text.           \begin{figure}       \centering       \includegraphics[width=0.45\textwidth]{cp.eps}       \caption{Sketch of something.}       \label{fig:surfaces}     \end{figure}          \end{document}      The graph appears below the page number in the `pdf` file generated by `dvipdfm` in MikTeX: ![Image of the pdf file produced with dvipdfm in MikTeX](http://i.stack.imgur.com/WWRGG.png) The figure is positioned normally in the dvi file. The `dvipdfm` utility in TeXLive (on another computer) generates normal `pdf` file: ![Image of the pdf file produced with dvipdfm in TeXLive](http://i.stack.imgur.com/jzc6N.png) I do not know if this is important, but to generate eps files, I use printer drivers in eps mode, for example, a Tektronics Phaser 750P driver. Because the utilities dvipdfm and dvipdfmx do not differ in this respect, I would assume that the problem is in some common configuration file. Another assumption is that something was wrong when dvipdfm and dvipdfmx were compiled from source. The dvipdfm utility in TeXLive works normally. I do not observe this behavior on my laptop, where MikTeX 2.9 is outdated with the following packaging dates: miktex-dvipdfm-base-2.7 packaged on 2007-08-23, miktex-dvipdfmx-base-2.7 packaged on 2009-07-08, miktex-dvipdfmx-bin-2.9 packaged on 2012-06-11. The packaging dates on the computer where wrong behavior is observed are as follows: miktex-dvipdfm-base-2.7 2007-08-23; miktex-dvipdfmx-base-2.7 packaged on 2013-06-18, miktex-dvipdfmx-bin-2.9 packaged on 2013-06-23.


title: Randomized coordinates in TikZ

text: I need to draw a number of `bacteria' in TikZ. Their coordinates and orientation needs to be random within a pre-defined scope. I have randomized the orientation successfully, but not the location of each bacterium. Here is what I have:               \documentclass{article}       \usepackage{pgfplots}       \pgfplotsset{compat=newest}       \usetikzlibrary{calc,decorations,decorations.pathreplacing}       \begin{document}           \newcommand{\bacterium}[3]{\scalebox{#2}{\tikz[rotate=#3]{         \coordinate (A) at (#1);           \shadedraw[shading=ball,ball color=yellow!75, white,rounded corners=10](A) rectangle++(1.5,.65);           \draw[decorate,decoration={snake,amplitude=1mm}](A)++(0,.75*.5)--++(-1,0);}}}               \begin{tikzpicture}           \foreach \x in {1,2,...,10}{         \bacterium{rand*10,rand*10}{.2}{rand*360}}       \end{tikzpicture}       \end{document}      This results in the bacteria orienting randomly but lining up along the x-axis. ![enter image description here](http://i.stack.imgur.com/eHhyr.png)


title: How can I Fix Unrecognize command in TeXStudio 2.6 and 2.5

text: when i am using the `pdflscape` package, when i use `\begin{landscape}` this command changes color and upon placing the pointer on it, it shows unrecognized command massage and same as for `\multirow{4}{*}{1.}`, why it does? although it is working.


title: DeclareSIUnit failed

text: It seems that the dtx-file-contained `\ul` (for `\micro\litre`) doesn't work on my machine `Undefined control sequence` I have tried to install from the `.dtx`, the .ins and the `tds.zip` files, all from the latest versions of `l3` and `siunitx` packages with no success. I have solved the problem for `\ul`-kind of declarations (see `\molar` in the mwe) but I'm trying to `\DeclareSIUnit\Molar{\textsc{m}}` which won't do the trick. Here's a mwe:                   \documentclass{article}         \usepackage{siunitx}              \newcommand{\molar}{\mole\per\cubic\deci\meter}              \begin{document}              % (Ugly but) Works fine         \SI{2}{\molar}.              % Doesn't work, although DeclareSIUnit \ul {\micro\litre} is in siunitx.dtx...         \SI{2}{\ul}              \end{document}      If anyone asks me to do a `\listfile`, I'd be much obliged to but haven't succeeded (and G**gle hasn't been my friend neither), so a mwe would be helpful)


title: Why does \[...\] do the wrong thing at the top of a page?

text: Upon reading What are the differences between $$, [, align, equation and displaymath?, I decided I really wanted to understand what was going on inside `\\[...\\]` and so I devised some tests. What I discovered confounds me. Why does `\\[...\\]` do the wrong thing at the top of a page? The definition of `\\[` goes out of its way to suppress additional vertical space by invoking `\nointerlineskip`, but then _adds_ vertical space implicitly by making an empty box 60% the width of the line: `\makebox[.6\linewidth]{}`. I can see how this might be desirable in some cases, but it's certifiably the wrong thing to do for a displayed formula at the top of a page, as it causes a whole extra line's worth of unwanted space at the top. This happens whether the result of a forced page break or the result of natural break after a paragraph. Here is a minimal working example:               \documentclass{article}     \begin{document}     \newpage $$y=x^2$$     \newpage \[y=x^2\]     \end{document}      Notice how the second equation is much lower on the page than the first. Does anyone know why this is? Is it a flaw in `\\[...\\]`? Is it by design? Note that it also does this inside of (at the top of) a `\parbox`.


title: Grouping figures in \listoffigures

text: Is it possible to group together several figures in the List of Figures. For example a time step sequence where there are 4 or 5 different figures would only have one entry.


title: Create a header for my page

text: Can someone help me to create like this header with LaTeX? ![enter image description here](http://i.stack.imgur.com/iP88X.png) here is My code :               \documentclass[a4paper,11pt] {report} %document A4 type rapport          \usepackage[utf8]{inputenc} % les caractère spéciaux          \usepackage[french]{babel}  %traduire les mots anglais en français.          \usepackage{graphicx} %Package pour les images.          \usepackage{geometry} % la margine de la page          \usepackage{fancyheadings}% l'entête et le pied de page          % paramètre de l'entête du page et pied du page          \lhead{\includegraphics[width=60mm, height=20mm]{latex.jpg}}     \chead{}     \rhead{My adress My adress \\My adress My adress \\My adress My adress \\}          \cfoot{}          \pagestyle{fancy}                    \usepackage{color}           \usepackage{setspace} %espace entre paragraphe          \usepackage{enumitem} %package de liste          \usepackage{xcolor} %package de liste          \definecolor{lightgray}{rgb}{0.9,0.9,0.9}               \renewcommand{\thechapter}{\Roman{chapter}}     \renewcommand{\thesection}{\arabic{section}}                    %\geometry{hmargin=2.5cm,vmargin=2cm}          \geometry{top=2cm, bottom=2cm,left=2.5cm, right=2.5cm}               \begin{document}     \vspace*{5cm}          Text text     \end{document}      The result : ![enter image description here](http://i.stack.imgur.com/OXnMM.png)


title: TeXnicCenter cannot automatically open PDF in Adobe Reader

text: I am attempting to automatically open a PDF after recompilation using TeXnicCenter. If I compile using `Ctrl` + `F7`, I can go into the directory of the PDF and it opens fine, but if I use `Ctrl` + `Shift` + `F5` to "Build and View", the PDF won't open, and I get the error message "Cannot execute the command": ![screenshot of error message](http://i.stack.imgur.com/R9xeQ.png) I have just reinstalled my Adobe, so this shouldn't (?) be an issue. This happens with both `LaTex => PDF` and `XeLaTeX => PDF` options. _Update_ : Here are my DDE settings: ![enter image description here](http://i.stack.imgur.com/DK3wR.png)


title: Itemized list is appearing outside of margins

text: I am writing a `memoir` document with a subsection that contains a itemized list. This itemized list is not appearing within the margins of text, but instead starts somewhere unknown and only has the last few words of each item in the margin. The rest of the document fits within the margin, just this small section with the list seems to be off. Apparently I can't post an image but I hope I described it well enough. Can anyone explain to me what I might need to do to fix this?


title: Is there a lightweight implementation/distribution of TeX for Mac OSX?

text: I'm on an SSD and space is an issue. The MacTeX distribution is over 2GB. BasicTeX seems to be too limiting to be useful to me, unfortunately.


title: mathtools vs amsmath

text: I read on http://en.wikibooks.org/wiki/LaTeX/Mathematics: > The `mathtools` package fixes some `amsmath` quirks and adds some useful > settings, symbols, and environments to `amsmath`. It sounds like "`mathtools` has everything that `amsmath` has and more", isn't it? Are there cases when it is justified to use `amsmath` instead of `mathtools`? In other words: Is `mathtools` "always" better?


title: Replacement for picins, for wrapping text around some construct within multicols?

text: Within the `multicols` environment I would like to wrap text around a makebox construct. The description of `picins` in _The LaTeX Companion_ , 2nd ed., makes it sound ideal, but it's no longer being distributed with TeXLive and I'd prefer to use something in the standard installation. I've tried `wrapfig`, but it does not seem to work inside the `multicols` environment. I've tried `picinpar`, but it provides a box around the construct, which I don't want. [I fixed an earlier justification problem by adding `ragged2e`.] `floatflt` is also not standardly installed, it seems. * * * For illustration:               \usepackage{multicol}   % allows multicols     \usepackage{picinpar}   % allows window     \usepackage{wrapfig}        % allows wrapfigure and wraptable     \usepackage{ragged2e}   % fixes justification problem in window          \newcommand{\lorip}{Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. }          \begin{multicols*}{2}{      \vspace{6pt}      \begin{window}[0,l,%       \fbox{Headword here},]       \textbf{\small{\textsf{POS}}}\RaggedRight\textrm{. \lorip}      \end{window}           \vspace{6pt}      \begin{wraptable}[2]{l}{0pt}       \centering        \fbox{Headword here}      \end{wraptable}      \textbf{\small{\textsf{POS}}}\textrm{. \lorip}     }     \end{multicols*}      `picinpar` first, with box; `wrapfig` second, doesn't work in multicols: ![picinpar and wrapfig results](http://i.stack.imgur.com/dG5ea.png) Any other suggestions? * * * **Edit** : I've fixed the earlier justification problem with package `ragged2e`.


title: Is there any operator like ⊎, only with a minus sign instead of a plus sign?

text: I need to use an operator similar to ⊎ in my paper. The required symbol looks like ⊎, only with minus sign instead of a plus sign, inside the "U". I haven't been able to find any symbol for this. Can someone please give me some pointers as to where I can find that symbol?


title: newcommand which computes something

text: I would like to have a command which executes a simple division of numbers. This `\newcommand{\mylen}[1]{1.0 / #1}` just prints `1.0 / 3` when invoked as `\mylen{3}` and not the desired `0.33333`. What do I have to do? **Edit:** The result should be usable in an expression like `\includegraphics[width=\mylen{3}\textwidth]{a}`


title: cross-referencing acronyms not displayed in the text with

text: I use glossaries and define besides standard acronyms also some acronyms like this:               \documentclass{scrreprt}          \usepackage{xcolor}           \definecolor{navy}{RGB}{0,0,128}          \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}          \usepackage[         colorlinks=true,         linkcolor=navy,         anchorcolor=black,         urlcolor=navy     ]{hyperref}          \usepackage[acronym,toc]{glossaries}          \makeglossaries          \newglossaryentry{P2P}{         type=\acronymtype,          name={P2P},          description={Peer-to-Peer},          first={Peer-to-Peer (P2P)},          see=[\glossaryname:]{Peer-to-Peer}     }     \newglossaryentry{Peer-to-Peer}{         name={Peer-to-Peer},         description={Eine direkte Kommunikation zwischen zwei Teilnehmern}     }          \newglossaryentry{Plug-in}{         name={Plug-in},         description={Ein Softwaremodul, das zur Laufzeit eingebunden werden kann und damit die Funktionalität eines Systems erweitert}     }          \newacronym{DIN}{DIN}{Deutsches Institut für Normung}               \newcommand*\acrshortlong[2][]{\glslink[#1]{#2}{\glsentryshort{#2} (\glsentrylong{#2})}}          \begin{document}          Works as expected:          gls: \gls{Plug-in}          gls: \gls{DIN}          acrshort: \acrshort{DIN}          acrshortlong: \acrshortlong{DIN}          gls: \gls{Peer-to-Peer}          Not as expected:          acrshort: \acrshort{P2P}          acrshortlong: \acrshortlong{P2P}          \glossarystyle{altlist}     \printglossary[type=\acronymtype]          \glossarystyle{altlist}     \printglossary          \end{document}      Unfortunately the \acr... commands dont work as expected with acronyms defined via \newglossaryentry with type=\acronymtype Anyone an idea how to get these cross-referencing acronyms also working as expected?


title: section titles, cyrillic and hyperref

text: I need to use cyrillic. I hacked from somewhere the def of `\textcyrw` you see below. Everything works fine, but when I need to use `\textcyrw` within a section title. It seems that the culprit is `hyperref`. Your advise is welcome.               \documentclass[a4paper,10pt]{article}     \usepackage[OT2,T1]{fontenc}      \usepackage[utf8]{inputenc}     \usepackage[american,russian,italian]{babel}     \usepackage{hyperref} % no problem without hyperref          \newcommand\cyrillic{%     \renewcommand\rmdefault{wncyr}%     \renewcommand\sfdefault{wncyss}%     \renewcommand\encodingdefault{OT2}%     \normalfont     \selectfont}     \DeclareTextFontCommand{\textcyr}{\cyrillic}          \begin{document}     \section{AAA}     \textcyr{Личное дело} % works fine     \section{\textcyr{Личное дело}} % gives error     \end{document}      The error message I got is:               ! Argument of \@sect has an extra }.     <inserted text>                  \par      l.- \section{\textcyr{Личное дело}}      ----- fixed the following fixed it, although I am not sure why:               \pdfstringdefDisableCommands{%     \let\textcyr\relax}


title: Vertical spacing between sections

text: I would like to know how I can define the vertical space between:   * a previous section and the new section title;   * the new section title and the following text. Now it looks like both space measure the same.


title: When writing a user defined package, how can I decide whether the \documentclass using it is book or article?

text: I want to write my own package as a collection of other packages I often use. Some declarations in my package only work for book, some for article, and the remaining work for both. In (La)TeX, how can we make a conditional declaration ?               \ProvidesPackage{MyPackage}          \newcommand\ContentsDir{Contents/}          \newcommand\ChapterDir{\ContentsDir}          %==============================================     %== It will be defined for book document class     %==============================================     \newcommand\IncludeChapter[1]{%     \renewcommand\ChapterDir{\ContentsDir#1/}%     \include{\ContentsDir#1}%     }          \newcommand\IncludeOnlyChapter[1]{%     \includeonly{\ContentsDir#1}%     }          \newcommand\Chapter[1]%     {%     \chapter{#1}%     %\addcontentsline{toc}{chapter}{#1}%     }%     %==============================================                    %==============================================     %== Common commands     %==============================================     \newcommand\SectionDir{\ChapterDir}          \newcommand\InputSection[1]{%     \renewcommand\SectionDir{\ChapterDir#1/}     \input{\ChapterDir#1}%     }     %----------------------------------------------     \newcommand\SubSectionDir{\SectionDir}          \newcommand\InputSubSection[1]{%     \renewcommand\SubSectionDir{\SectionDir#1/}     \input{\SectionDir#1}%     }     %----------------------------------------------     \newcommand\InputSubSubSection[1]{%     \input{\SubSectionDir#1}%     }     %----------------------------------------------     \newcommand\Section[1]%     {%     \section{#1}%     %\addcontentsline{toc}{section}{#1}%     }%     %----------------------------------------------     \newcommand\SubSection[1]%     {%     \subsection{#1}%     %\addcontentsline{toc}{chapter}{#1}%     }%     %----------------------------------------------     \newcommand\SubSubSection[1]%     {%     \subsubsection{#1}%     %\addcontentsline{toc}{chapter}{#1}%     }%     %----------------------------------------------


title: Getting right currfile with own class loaded from subdirectory

text: When writing my own class in a subdirectory, e.g. `myclass/aclass.cls`, and I use the **currfile** package to load that class's current file path, it always returns the information of my main file only. Could someone please tell me what I am doing wrong or if it's not even possible to do? Here is an example: **TeX sample tree**               .     ├── myclass     │   └── aclass.cls     ├── test.pdf     └── test.tex      **test.tex**               \documentclass{myclass/aclass}          \begin{document}     \section{Class file: \aclassfile}     \end{document}      **myclass/aclass.cls**               \NeedsTeXFormat{LaTeX2e}[1995/12/01]     \ProvidesClass{aclass}     \LoadClass[a4paper, 12pt]{article}          \RequirePackage{currfile}     \edef\aclassfile{\currfilepath}      **test.pdf** ![test.pdf image output](http://i.stack.imgur.com/cSQy5.png)


title: Change typeface size after \documentclass?

text: I use the same tex file to create several different layouts with basically the same content. I have several switches and `\ifthenelse` constructs to control the layouts. Normally, I just have to set one or two boolean variables to activate a specific layout. Some layouts require typeface size 10pt, some 11pt. Is it possible to change the size after `\documentclass{article}`? E.g., in a constuct such as:               \ifthenelse{\boolean{layoutA}}       {\setlength{\typefacesize}{10pt}}       {\setlength{\typefacesize}{11pt}}      Obviously, there is no `\typefacesize`. I would like to avoid having to change the typeface size in `\documentclass` all the time.


title: Restrict total height/length of text

text: I have a large chunk of text that's currently being used in my template, I want to programmatically split this over too pages. The text is first put into a textbox onto a page and needs to be restricted to a certain size (8 lines or so). The rest of the text needs to put into a variable or something on the following page. Not exactly sure how I can implement this since the text overflows the boxes no matter I tend to find in there.


title: Forcing page numbers to ignore large margins

text: My teacher wants a large space to post comments on my work, so I have placed a bottom margin of 10 cm to pdfLatex. But the problem is that Latex also moves the page numbers up along with the margins so that the page numbers end up almost in the middle of the page. How can I force the page numbers to stick to the bottom of the actual page? My current document looks like:               \documentclass[10pt,a4paper]{report}     \usepackage{fixltx2e}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{float}     \usepackage{wrapfig}     \usepackage{subfig}     \usepackage[pdfborder={1 0 0}]{hyperref}     \usepackage{pdfpages}     \usepackage[bottom=10cm]{geometry}          \begin{document}     %Lots of work here     \end{document}


title: Issue with glossaries and hierarchal categories

text: I'm having an issue using the hierarchal categories feature for the glossaries package. What i'm trying to do is add various entries under the "Greek Letters" parent. First, without adding the parent option to a glossary entry I get the following: ![enter image description here](http://i.stack.imgur.com/AXhtk.png) So far, so good. Now, if I add the parent option to the delta and pi glossary entries I get the following: ![enter image description here](http://i.stack.imgur.com/w91fu.png) As you can see, the entries are combined into one instead of on three lines with "Greek letters" entry first. Here is the code to produce the two cases:               %% no parent option     \documentclass[12pt,letterpaper]{report}     \usepackage[nonumberlist,toc,nopostdot]{glossaries} % load after hyperref     \makenoidxglossaries     \newglossaryentry{greekletter}{name={Greek letters},description={\glspar}}     \newglossaryentry{pi}     {       name={\ensuremath{\pi}},       sort={pi},       description={ratio of the circumference of a circle to the diameter}     }     \newglossaryentry{delta}     {       name={\ensuremath{\delta}},       sort={delta},       description={change in ...}     }          \begin{document}       \glsaddall       \printnoidxglossary     \end{document}          %% parent option     \documentclass[12pt,letterpaper]{report}     \usepackage[nonumberlist,toc,nopostdot]{glossaries} % load after hyperref     \makenoidxglossaries     \newglossaryentry{greekletter}{name={Greek letters},description={\glspar}}     \newglossaryentry{pi}     {       name={\ensuremath{\pi}},       sort={pi},       description={ratio of the circumference of a circle to the diameter},       parent=greekletter     }     \newglossaryentry{delta}     {       name={\ensuremath{\delta}},       sort={delta},       description={change in ...},       parent=greekletter     }          \begin{document}       \glsaddall       \printnoidxglossary     \end{document}


title: Moderncv : put the homepage in bold

text: I'd like to do this:               \homepage{ \textbf{www.adress.com} }      But it doesn't work. How can I do for putting the homepage in bold?


title: Suppressing \glstextformat for certain entries

text: I am using `\glossaries` to index people, for example `\gls{Walter Scott}`. If a person is mentioned frequently I use `\glslink` to give a shortened version of their name, `\glslink{Walter Scott}{Scott}`. I used `\glstextformat` to make these references underlined and sans-serif but if I continuously mention `\glslink{Walter Scott}{Scott}` this looks messy (however, I still want the page reference to appear in the index). I can remove the hyperlink by using `\glslink*`, but how can I remove the `\glstextformat` for these references? I don't want to suppress all but the first use because if, after ten pages, I mention `\gls{Walter Scott}` again it is helpful for the reader to be reminded that he may be found in the index.


title: TikZ: Named nodes in nested `pic`s

text: I am using the new TikZ/PGF 3.0 `pic` feature. I use them heavily, including using a pic inside another pic. The problem is that Tikz sometimes cannot find the node names of nested pics. I expect the following to work:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}     \begin{tikzpicture}     \tikzset{complex/.pic={       \node(re) {re};       \node[right=0mm of re](im) {im};     }}     \tikzset{su3v/.pic={       \path pic(c0) {complex};       \path pic[right=1mm of c0im](c1) {complex};       \path pic[right=1mm of c1im](c2) {complex};     }}     \tikzset{spinor/.pic={       \path pic(v0) {su3v};       \path pic[below=2mm of v0c2re](v1) {su3v};       \path pic[below=2mm of v1c2re](v2) {su3v};       \path pic[below=2mm of v2c2re](v3) {su3v};     }}          \path pic {su3v};       % Works     \path pic(name) {su3v}; % ! Package pgf Error: No shape named namec0im is known.     \path pic {spinor};     % ! Package pgf Error: No shape named v0c1im is known.     \end{tikzpicture}     \end{document}      What is wrong here?


title: Sec/subsec in the margins

text: It is possible to put sec/subsec numbers in the margins (enlarged), on the left for even pages and on the rigth for odd pages? The corresponding titles must be left aligned on even page and rigth aligned in the odd pages.


title: Combining numbers and letters in equation numbering LaTeX

text: I currently have the following equation in LaTeX: ![enter image description here](http://i.stack.imgur.com/qtpz1.png) I'm trying to achieve the following in LaTeX: ![equations in first part of section](http://i.stack.imgur.com/cqpXC.png) The problem is that I can't seem to get the numbering to start at 1a. When I use the following code, it starts at 0a:               \renewcommand{\theequation}{\thesection\alph{equation}}          \begin{align}     \text{Level 1}&: y_{mdi} = \mu_{di} + e_{mdi}\\     \text{Level 2}&: \mu_{di} = \mu_i + r_{0di}\\     \text{Level 3}&: \mu_i = \gamma_{000} + u_{00i}     \end{align}      I've tried using               \setcounter{equation}{1}      But that line of code changes where the lettering starts (in this case with 0b). EDIT: I already have 4 sections in my piece (document class apa); This piece of code is in the 4th section, so technically it would have to start at 4a.


title: JASA Express Letters Template

text: It may be silly but I wonder if anyone could provide a LaTeX template for JASA Express Letters. The template for the "regular" journal paper is available on the website of the Acoustical Society of America but I do not seem to be able to find one for the Express Letters. I hope someone here encountered the problem and has hopefully be more successful than myself in finding the solution.


title: Typesetting transition metal cluster in mhchem?

text: I would like to use `mhchem`'s `\ce` command to typeset a transition metal cluster. If I use `\ce{[Ru(cod)($2\text{-}$methylallyl)2]}`, I get the correct output, but it is very much a hack. I have tried to use `\ce{[Ru(cod)(2-methylallyl)2]}` but this incorrectly sets the first `2` as a subscript. What is the correct way to handle this?               \documentclass{article}     \usepackage{mhchem}     \begin{document}       Compare \ce{[Ru(cod)($2\text{-}$methylallyl)2]} with \ce{[Ru(cod)(2-methylallyl)2]}.     \end{document}


title: Restyling the caption in an algorithm created with algorithm2e

text: In the caption of an algorithm created with `algorithm2e`,               \documentclass{article}          \usepackage[ruled]{algorithm2e}          \begin{document}          \begin{algorithm}[H]     \caption{Caption.}     pseudocode     \end{algorithm}          \end{document}      "Algorithm 1:" comes out bold. How could I change its font, say, to small caps? Also, how could I make "Algorithm 1." appear instead?


title: table and caption distance

text: I am quite new to Latex, and I was wondering, if there is way to change the distance between the caption and the table. If you compile this example you can understand what I mean.               \documentclass[11pt,twoside,a4paper,final,titlepage,openany]{amsbook}     \usepackage[ngerman]{babel}     \begin{document}          \begin{table}[h]     \centering     \begin{tabular}{|l|l|l|l|}     \hline     blah & blah & blah & blah \\\hline     blah & blah & blah & blah \\\hline          \end{tabular}\\     \caption{blah}     \end{table}     \end{document}      Edit: Somehow I can't change it so the ngerman isn't there, I get an error everytime I try. Maybe because I am using a4paper?


title: Some commands don't come out in the pdf - TeXmaker

text: I'm just starting to learn how to use the program and watching tutorials online, at the moment I'm using TexMaker. Everything seems to be going just fine however when I try to use the commands `\title`, `\author`, and `\date`, they become highlighted red as if the program acknowledges them as a command. However when I compile the code into a PDF everything else appears just not those three.


title: Should tcolorbox enforce inner boxes to be unbreakable?

text: The `tcolorbox` package provides breakable boxes. Also, a `tcolorbox` can be nested inside another `tcolorbox`, even inside a breakable one. But there is no real support for nesting a breakable box inside a breakable box. Breakability is switched off for inner boxes, but it may be switched on again by using the `breakable` key. In retrospective, this feature (to switch breakability for inner boxes on) has been a permanent pitfall for users, since it's quite easy to misuse the `breakable` key as the following example shows:               \documentclass[a4paper]{article}          \usepackage[many]{tcolorbox}     \usepackage{lipsum}          \newtcolorbox{redbox}{colframe=red,enhanced,breakable}     \newtcolorbox{bluebox}{colframe=blue,enhanced,breakable}          \begin{document}          \begin{redbox}     \lipsum[1-4]     \end{redbox}          \begin{bluebox}       \begin{redbox}% gives shattered boxes (until tcolorbox 3.04)       \lipsum[1-4]       \end{redbox}     \end{bluebox}          \end{document}      Therefore, I would like to disable the `breakable` key for inner boxes completely and remove this pitfall. The only thing which worries me is loss of backward compatibility. That's the reason for this question. Under **very** controlled circumstances, the current feature could have been used to get breakable boxes inside breakable boxes. But to be clear: it's not possible for normal usage. Is anything speaking against declaring this _feature_ a _misbehavior_ and therefore remove it?


title: protected footnotes cause hyperref error

text: To use a footnote in a section one has to use the protect keyword to avoid an error... then when using the hyperref package you get another error:               Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):     (hyperref)                removing `\@ifnextchar' on input line 105.      With MWE:               \documentclass{book}          \usepackage{hyperref}     \scrollmode               \begin{document}          \chapter{test}     \section{Test Section\protect\footnote{my footnote}}     asdfasdfsadf               \end{document}      Any ideas how to fix this?


title: I want to draw a nice connecting homomorphism arrow

text: \begin{tikzpicture}[scale=1.5]          \node (A) at (0,0) {$0$};     \node (B) at (1,0) {$H^0(G,P)$};     \node (C) at (2,0) {$H^0(G,M)$};     \node (D) at (3,0) {$H^0(G,N)$};     \node (E) at (1,-1) {$H^1(G,P)$};     \node (F) at (2,-1) {$H^1(G,M)$};     \node (G) at (3,-1) {$H^1(G,N)$};     \path[->,font=\scriptsize,>=angle 90]     (A) edge node[above]{} (B)     (B) edge node[above]{$\phi$} (C)     (C) edge node[above]{$\psi$} (D)     (D) edge node[above]{} (E)     (E) edge node[above]{} (F)     (F) edge node[above]{} (G);          \end{tikzpicture}      So I've got this that I want to try and draw a 'nice' connecting homomorphism which I'll try my best to describe: It starts from the end of the last element in the first row and ends at the beginning of the first element in the second row. Maybe it's better to do it in tikzcd but I don't know how to do that either.


title: PSTricks -> How can I compile a graph/figure to obtain an PNG/JPG with background transparent?

text: How to obtain this graph in a PNG/GIF/JPG graph with transparent background?               \documentclass[12pt,a4paper,x11names]{report}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{latexsym}     %\usepackage[x11names,table]{xcolor} % colores por nombres y tablas. dddd%          \usepackage{datetime}     \settimeformat{ampmtime}          \usepackage{hyperref} %Dudo si este paquete puede dar error al compilar con LATEX (no PDFLATEX)     \hypersetup{colorlinks=true, urlcolor=blue}               \headheight=15pt  %/ MARGENES y otros          \usepackage[spanish]{babel}     \usepackage[T1]{fontenc}          %--------   Paquetes para uso con PSTricks  -----------------------------------------------%     \usepackage{pstricks}     % -------- Paquetes de pst-all \usepackage{pst-all}   paquete pstricks para las figuras en postcript     \usepackage{pst-plot}     \usepackage{pst-node}     \usepackage{pst-tree}     \usepackage{pst-grad}     \usepackage{pst-coil}     \usepackage{pst-text}     \usepackage{pst-3d}     \usepackage{pst-eps}     \usepackage[tiling]{pst-fill}     \usepackage{pstricks-add}     \usepackage{multido}     % ---- Fin Paquetes de pst-all     \usepackage{pst-fr3d}               % paquete pstricks para las figuras en postcript     \usepackage{pst-infixplot,pst-math} % paquete pstricks para las figuras en postcript     %%%%%   Paquetes para definir los "ladillos" de la parte superior de las páginas, los capítulos, las secciones y más cosas.     %%%%% La explicación de cómo se hace todo esto viene en las instrucciones que están incluidas en la instalacion.     \usepackage[clearempty,explicit,pagestyles]{titlesec}     \usepackage{titletoc}     %%%% Paquete para hacer los gráficos.   % OJO.- En alguna compilación me daba incompatibilidad de esta opción dvips con la clase article %     \usepackage[dvips]{graphicx}  % OJO.- HE QUITADO [dvips] antes de {graphicx} porque me daba error , y me pedía poner [dvips] en la clase principal, pero aparecía atenuado en article, como si no aceptase esta opción. Cargar despues de paquetes PSTricks     %--------   Fin Paquetes para uso con PSTricks  -------------------------------------------%          \usepackage{graphicx}    % paquete para insertar gráficos     \usepackage{epstopdf}    % para que funcioneen los eps con pdflatex     \usepackage{multicol}    % para incluir columnas multiples          \usepackage{marginnote}  % para crear notas al margen          \usepackage{mathpazo}    % para usar la fuente MathPAzo que me gusta más, yse lee bien.          \usepackage{fix-cm}       \usepackage{anyfontsize} %          \usepackage{fancyhdr}   % Paquete para cabeceras y pies en cada página.     \pagestyle{fancy}       % seleccionamos un estilo          \renewcommand{\labelenumi}{\arabic{enumi}.- }   % personalizado a mi gusto los itemize.          \graphicspath{{G:/}{G:/Rafa/TEX Arquivos/}}          \settimeformat{ampmtime} % para incrustar fecha y hora en los documentos.          \spanishdecimal{.}       % Para usar el punto decimal, y no confundirlo con las comas.          % ///////////////////////////////////////////////////////////////////////////// %     %\cfoot{\includegraphics[width=11cm]{heado2}} % imagen centro del pie     \lhead{M.I.} % texto izquierda de la cabecera     %\chead{\today \;-\;  \currenttime } % texto centro de la cabecera     \rhead{Right Header} % número de página a la derecha     % - - -  - - - - - - - - - - -  - - - - - - - - - - -  - - - - - - - - %     \lfoot{{\gray{\footnotesize Compilado: \today \;-\;  \currenttime}}} % texto izquierda del pie     \rfoot{Página \thepage}     % texto derecha del pie     \cfoot{} % texto central del pie     \renewcommand{\headrulewidth}{0.4pt} % grosor de la línea de la cabecera     %\renewcommand{\footrulewidth}{0.1pt} % grosor de la línea del pie     % ///////////////////////////////////////////////////////////////////////////// %     %\title{Foro }     %\author{Rafa S.F.}     %\date{\today}     % //////////////////////////////////////////////// %          \begin{document}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   Figura 2.1     \begin{figure}[h]     \begin{center}     \psset{unit=.6cm,linewidth=1pt,linecolor=black,nodesep=3pt,arrowscale=1.3,arrows=->,arrowsize=4pt}\small      \begin{pspicture}*(-.5,0)(9.5,9.5)     \psframe[fillcolor=white,fillstyle=solid,linestyle=none](-.5,0)(9.5,9.5)          \rput(1,3){$\circlenode{A}{\textcolor{blue}{a}}$}     \rput(3,6){$\circlenode{B}{\textcolor{blue}{b}}$}     \rput(5,1){$\circlenode{C}{\textcolor{blue}{c}}$}     %     \ncline{->}{A}{B}\naput{\small $43$}     \ncarc[arcangleB=300]{->}{C}{B}\naput{\small $12$}     %     \ncarc{->}{C}{A}\naput{\small $23$}          %                \end{pspicture}     \end{center}     \caption{prueba}     \end{figure}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \end{document}


title: List of Indexing Packages - Pros and Cons

text: What are the various indexing packages and what are their pros and cons? When should one choose one over the other? There is some discussion of this in What are the latest/best practices for index generation?, but I would prefer to have more details about each package.


title: Picture and caption going out of margins using wrapfig

text: I'm using `wrapfig` to put a picture side-by-side with text. It happens that it going after the margins and I want it to stick inside them. here's the code,               \documentclass[12pt,a4paper,titlepage,final, twoside]{report}          \usepackage{wrapfig}     \usepackage{graphicx}          \usepackage[headsep=10mm]{geometry}     \geometry{top=30mm,bottom=30mm, left=25mm,right=25mm}          \begin{document}          \begin{wrapfigure}{r}{0.5\textwidth}     \centering     \includegraphics[width=0.45\textwidth]{./im_theory/progression}     \caption{Alzheimer Progression Stages, \cite{Center2008}}     \label{fig:ad_progression}     \end{wrapfigure}          \FloatBarrier     \subsection{Very Early Stage}          \\By this stage the first symptoms to appear are memory problems. People who have more memory problems than usual for their age are classified as amnestic \ac{MCI}. Be classified as such means that the person as more possibility of developing Alzheimer than normal.          \end{document}      ![enter image description here](http://i.stack.imgur.com/KGSZk.png)


title: Is it possible to define abbreviations for coding?

text: I am using the `tikz-timing` package to create a timeline since `chronosys` and `chronology` wouldn't cooperate and were too limited and archaic-looking to suit my purposes, and `moderntimeline` unfortunately was unable to display in a horizontal linear format. (The timeline I'm trying to create is rather complex, and the timeline package selection is extremely limited.) Everything is working fairly nicely, considering that I have just recently taken up LaTeX (after some limited experience with Lilypond) to create this timeline, except for the fact that typing `[white, timing/D/background/.style={fill=orange}]` takes up a ridiculous amount of space (and time), which is very inconvenient and makes the code look super messy. I've tried using `\newcommand` (I've heard `\def` is basically just an inferior version of it), but so far the compiler doesn't like me using it that way because I'm not defining an actual command, just a substitution. What I had originally was               \newcommand{\efill}[1]{timing/D/background/.style={fill=#1}}      thinking this would allow me to type `[\efill {blue}]` to set the fill to blue. Since this was an abbreviation and not a command, it didn't work the way I had intended it to. The ideal solution would allow the definition of character-to-color synonyms (so instead of typing the whole color name, I could just type the single- character name), and the definition of a custom enclosure notation (eg `{{ob}}` would expand during compilation to `[orange, timing/D/background/.style={fill=blue}]`. How can I achieve this? Here is my newbie attempt at an MWE: > >     \documentclass{article} >     \usepackage{tikz, tikz-timing} >   >     \begin{document} >        \Huge >        \begin{tikztimingtable} >            {\LARGE{Benjy}}  & [blue, > timing/D/background/.style={fill=none}]DDDD;[orange,timing/D/background/.style={fill=green}]DDDD > \\ >   >            \begin{extracode} >             \tableheader >                 {\begin{Large}Character\end{Large}} >                     {\begin{LARGE}\textbf{Events}\end{LARGE}} >                 \tablerules >                 \fulltablegrid >             \end{extracode} >         \end{tikztimingtable} >     \end{document} >   _I'm not sure if I tagged this correctly, so feel free to add/remove tags._


title: Tikz + Verbatim + Sphinx , output drawn twice with slight offset. Works great Tikz + Verbatim

text: I'm working on a piece of software that outputs IPython Notebooks as tex documents. One of my requirements is to be able to draw code input output blocks that look like the Notebook's UI. Disclaimer: For a long time I was using MDFRAMED to draw the cells. Unfortunately the vertical spacing of the MDFRAMED differs between versions, and I absolutely cannot force users to use a specific version of MDFRAMED. I looked into distributing MDFRAMED along with the software and found that it could not be done without modifications to MDFRAMED So I bit the bullet and started writing my own custom framing logic in TIKz. My only requirements were to have rounded edges, a small border, support for multiple pages, and support for pygments output (fancyvrb Verbatim). After a couple hours, I had completely met my goal: ![goodoutput](http://i.stack.imgur.com/tXReS.png) BUT! When I try to use the Sphinx templates to produce my output: ![badoutput](http://i.stack.imgur.com/Uwgij.png) The majority of the tikz code is this http://www.texample.net/tikz/examples/framed-tikz/ example modified EDIT: After David's suggestion: ![closer](http://i.stack.imgur.com/YICTB.png) EDIT: MWE, with suggested solution(s). Produces same output as above.               % Make sure that the sphinx doc style knows who it inherits from.     \def\sphinxdocclass{article}          % Declare the document class     \documentclass[letterpaper,10pt,english]{/usr/local/lib/python2.7/dist-packages/Sphinx-1.2predev_20130207-py2.7.egg/sphinx/texinputs/sphinxhowto}                    \usepackage[Bjarne]{/usr/local/lib/python2.7/dist-packages/Sphinx-1.2predev_20130207-py2.7.egg/sphinx/texinputs/fncychap}               \usepackage{/usr/local/lib/python2.7/dist-packages/Sphinx-1.2predev_20130207-py2.7.egg/sphinx/texinputs/sphinx}                    \usepackage{graphicx} % Used to insert images     \usepackage{adjustbox} % Used to constrain images to a maximum size      \usepackage{color} % Allow colors to be defined     \usepackage{enumerate} % Needed for markdown enumerations to work     \usepackage{geometry} % Used to adjust the document margins     \usepackage{amsmath} % Equations     \usepackage{amssymb} % Equations     \usepackage[utf8]{inputenc} % Allow utf-8 characters in the tex document     \usepackage{ucs} % Extended unicode (utf-8) support     \usepackage{fancyvrb} % verbatim replacement that allows latex     \usepackage{grffile} % extends the file name processing of package graphics                       %to support a larger range           % The hyperref package gives us a pdf with properly built     % internal navigation ('pdf bookmarks' for the table of contents,     % internal cross-reference links, web links for URLs, etc.)     \usepackage{hyperref}               \usepackage{tikz} % Needed to box output/input     \usepackage{scrextend} % Used to indent output     \usepackage{needspace} % Make prompts follow contents     \usepackage{framed} % Used to draw output that spans multiple pages                              \definecolor{orange}{cmyk}{0,0.4,0.8,0.2}     \definecolor{darkorange}{rgb}{.71,0.21,0.01}     \definecolor{darkgreen}{rgb}{.12,.54,.11}     \definecolor{myteal}{rgb}{.26, .44, .56}     \definecolor{gray}{gray}{0.45}     \definecolor{lightgray}{gray}{.95}     \definecolor{mediumgray}{gray}{.8}     \definecolor{inputbackground}{rgb}{.95, .95, .85}     \definecolor{outputbackground}{rgb}{.95, .95, .95}     \definecolor{traceback}{rgb}{1, .95, .95}          % new ansi colors     \definecolor{brown}{rgb}{0.54,0.27,0.07}     \definecolor{purple}{rgb}{0.5,0.0,0.5}     \definecolor{darkgray}{gray}{0.25}     \definecolor{lightred}{rgb}{1.0,0.39,0.28}     \definecolor{lightgreen}{rgb}{0.48,0.99,0.0}     \definecolor{lightblue}{rgb}{0.53,0.81,0.92}     \definecolor{lightpurple}{rgb}{0.87,0.63,0.87}     \definecolor{lightcyan}{rgb}{0.5,1.0,0.83}          % Define a nice break command that doesn't care if a line doesn't already     % exist.     \def\br{\hspace*{\fill} \\* }          % Document parameters     \title{simpletest}                         % Pygments definitions          \makeatletter     \def\PY@reset{\let\PY@it=\relax \let\PY@bf=\relax%         \let\PY@ul=\relax \let\PY@tc=\relax%         \let\PY@bc=\relax \let\PY@ff=\relax}     \def\PY@tok#1{\csname PY@tok@#1\endcsname}     \def\PY@toks#1+{\ifx\relax#1\empty\else%         \PY@tok{#1}\expandafter\PY@toks\fi}     \def\PY@do#1{\PY@bc{\PY@tc{\PY@ul{%         \PY@it{\PY@bf{\PY@ff{#1}}}}}}}     \def\PY#1#2{\PY@reset\PY@toks#1+\relax+\PY@do{#2}}          \expandafter\def\csname PY@tok@gd\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}     \expandafter\def\csname PY@tok@gu\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}     \expandafter\def\csname PY@tok@gt\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.25,0.82}{##1}}}     \expandafter\def\csname PY@tok@gs\endcsname{\let\PY@bf=\textbf}     \expandafter\def\csname PY@tok@gr\endcsname{\def\PY@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}     \expandafter\def\csname PY@tok@cm\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}     \expandafter\def\csname PY@tok@vg\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}     \expandafter\def\csname PY@tok@m\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}     \expandafter\def\csname PY@tok@mh\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}     \expandafter\def\csname PY@tok@go\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.50,0.50,0.50}{##1}}}     \expandafter\def\csname PY@tok@ge\endcsname{\let\PY@it=\textit}     \expandafter\def\csname PY@tok@vc\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}     \expandafter\def\csname PY@tok@il\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}     \expandafter\def\csname PY@tok@cs\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}     \expandafter\def\csname PY@tok@cp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.74,0.48,0.00}{##1}}}     \expandafter\def\csname PY@tok@gi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}     \expandafter\def\csname PY@tok@gh\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}     \expandafter\def\csname PY@tok@ni\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.60,0.60,0.60}{##1}}}     \expandafter\def\csname PY@tok@nl\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.63,0.63,0.00}{##1}}}     \expandafter\def\csname PY@tok@nn\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}     \expandafter\def\csname PY@tok@no\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.53,0.00,0.00}{##1}}}     \expandafter\def\csname PY@tok@na\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.49,0.56,0.16}{##1}}}     \expandafter\def\csname PY@tok@nb\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}     \expandafter\def\csname PY@tok@nc\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}     \expandafter\def\csname PY@tok@nd\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}     \expandafter\def\csname PY@tok@ne\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.82,0.25,0.23}{##1}}}     \expandafter\def\csname PY@tok@nf\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}     \expandafter\def\csname PY@tok@si\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}     \expandafter\def\csname PY@tok@s2\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}     \expandafter\def\csname PY@tok@vi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}     \expandafter\def\csname PY@tok@nt\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}     \expandafter\def\csname PY@tok@nv\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}     \expandafter\def\csname PY@tok@s1\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}     \expandafter\def\csname PY@tok@sh\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}     \expandafter\def\csname PY@tok@sc\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}     \expandafter\def\csname PY@tok@sx\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}     \expandafter\def\csname PY@tok@bp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}     \expandafter\def\csname PY@tok@c1\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}     \expandafter\def\csname PY@tok@kc\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}     \expandafter\def\csname PY@tok@c\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}     \expandafter\def\csname PY@tok@mf\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}     \expandafter\def\csname PY@tok@err\endcsname{\def\PY@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}     \expandafter\def\csname PY@tok@kd\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}     \expandafter\def\csname PY@tok@ss\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}     \expandafter\def\csname PY@tok@sr\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}     \expandafter\def\csname PY@tok@mo\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}     \expandafter\def\csname PY@tok@kn\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}     \expandafter\def\csname PY@tok@mi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}     \expandafter\def\csname PY@tok@gp\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}     \expandafter\def\csname PY@tok@o\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}     \expandafter\def\csname PY@tok@kr\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}     \expandafter\def\csname PY@tok@s\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}     \expandafter\def\csname PY@tok@kp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}     \expandafter\def\csname PY@tok@w\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}     \expandafter\def\csname PY@tok@kt\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}     \expandafter\def\csname PY@tok@ow\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}     \expandafter\def\csname PY@tok@sb\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}     \expandafter\def\csname PY@tok@k\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}     \expandafter\def\csname PY@tok@se\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.13}{##1}}}     \expandafter\def\csname PY@tok@sd\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}          \def\PYZbs{\char`\\}     \def\PYZus{\char`\_}     \def\PYZob{\char`\{}     \def\PYZcb{\char`\}}     \def\PYZca{\char`\^}     \def\PYZam{\char`\&}     \def\PYZlt{\char`\<}     \def\PYZgt{\char`\>}     \def\PYZsh{\char`\#}     \def\PYZpc{\char`\%}     \def\PYZdl{\char`\$}     \def\PYZti{\char`\~}     % for compatibility with earlier versions     \def\PYZat{@}     \def\PYZlb{[}     \def\PYZrb{]}     \makeatother               % NB prompt colors     \definecolor{nbframe-border}{rgb}{0.867,0.867,0.867}     \definecolor{nbframe-bg}{rgb}{0.969,0.969,0.969}     \definecolor{nbframe-in-prompt}{rgb}{0.0,0.0,0.502}     \definecolor{nbframe-out-prompt}{rgb}{0.545,0.0,0.0}          % NB prompt lengths     \newlength{\inputpadding}     \setlength{\inputpadding}{0.5em}     \newlength{\cellleftmargin}     \setlength{\cellleftmargin}{0.15\linewidth}     \newlength{\borderthickness}     \setlength{\borderthickness}{0.4pt}     \newlength{\smallerfontscale}     \setlength{\smallerfontscale}{9.5pt}          % NB prompt font size     \def\smaller{\fontsize{\smallerfontscale}{\smallerfontscale}\selectfont}          % Define a background layer, in which the nb prompt shape is drawn     \pgfdeclarelayer{background}     \pgfsetlayers{background,main}     \usetikzlibrary{calc}          % define styles for the normal border and the torn border     \tikzset{     normal border/.style={draw=nbframe-border, fill=nbframe-bg,     rectangle, rounded corners=2.5pt, line width=\borderthickness},     torn border/.style={draw=white, fill=white, line width=\borderthickness}}          % Macro to draw the shape behind the text, when it fits completly in the     % page     \def\notebookcellframe#1{%     \tikz{%     \node[inner sep=\inputpadding] (A) {#1};% Draw the text of the node     \begin{pgfonlayer}{background}% Draw the shape behind     \fill[normal border]%         (A.south east) -- ($(A.south west)+(\cellleftmargin,0)$) --          ($(A.north west)+(\cellleftmargin,0)$) -- (A.north east) -- cycle;     \end{pgfonlayer}}}%          % Macro to draw the shape, when the text will continue in next page     \def\notebookcellframetop#1{%     \tikz{%     \node[inner sep=\inputpadding] (A) {#1};    % Draw the text of the node     \begin{pgfonlayer}{background}         \fill[normal border]              % Draw the ``complete shape'' behind         (A.south east) -- ($(A.south west)+(\cellleftmargin,0)$) --          ($(A.north west)+(\cellleftmargin,0)$) -- (A.north east) -- cycle;     \fill[torn border]                % Add the torn lower border         ($(A.south east)-(0,.1)$) -- ($(A.south west)+(\cellleftmargin,-.1)$) --          ($(A.south west)+(\cellleftmargin,.1)$) -- ($(A.south east)+(0,.1)$) -- cycle;     \end{pgfonlayer}}}          % Macro to draw the shape, when the text continues from previous page     \def\notebookcellframebottom#1{%     \tikz{%     \node[inner sep=\inputpadding] (A) {#1};   % Draw the text of the node     \begin{pgfonlayer}{background}        \fill[normal border]             % Draw the ``complete shape'' behind         (A.south east) -- ($(A.south west)+(\cellleftmargin,0)$) --          ($(A.north west)+(\cellleftmargin,0)$) -- (A.north east) -- cycle;     \fill[torn border]               % Add the torn upper border         ($(A.north east)-(0,.1)$) -- ($(A.north west)+(\cellleftmargin,-.1)$) --          ($(A.north west)+(\cellleftmargin,.1)$) -- ($(A.north east)+(0,.1)$) -- cycle;     \end{pgfonlayer}}}          % Macro to draw the shape, when both the text continues from previous page     % and it will continue in next page     \def\notebookcellframemiddle#1{%     \tikz{%     \node[inner sep=\inputpadding] (A) {#1};   % Draw the text of the node     \begin{pgfonlayer}{background}        \fill[normal border]             % Draw the ``complete shape'' behind         (A.south east) -- ($(A.south west)+(\cellleftmargin,0)$) --          ($(A.north west)+(\cellleftmargin,0)$) -- (A.north east) -- cycle;     \fill[torn border]               % Add the torn lower border         ($(A.south east)-(0,.1)$) -- ($(A.south west)+(\cellleftmargin,-.1)$) --          ($(A.south west)+(\cellleftmargin,.1)$) -- ($(A.south east)+(0,.1)$) -- cycle;     \fill[torn border]               % Add the torn upper border         ($(A.north east)-(0,.1)$) -- ($(A.north west)+(\cellleftmargin,-.1)$) --          ($(A.north west)+(\cellleftmargin,.1)$) -- ($(A.north east)+(0,.1)$) -- cycle;     \end{pgfonlayer}}}          % Define the environment which puts the frame     % In this case, the environment also accepts an argument with an optional     % title (which defaults to ``Example'', which is typeset in a box overlaid     % on the top border     \newenvironment{notebookcell}[1][0]{%     \def\FrameCommand{\notebookcellframe}%     \def\FirstFrameCommand{\notebookcellframetop}%     \def\LastFrameCommand{\notebookcellframebottom}%     \def\MidFrameCommand{\notebookcellframemiddle}%     \par\vspace{1\baselineskip}%     \MakeFramed {\FrameRestore}%     \noindent\tikz\node[inner sep=0em] at ($(A.north west)-(0,0)$) {%     \begin{minipage}{\cellleftmargin}%     \hfill%     {\smaller%     \tt%     \color{nbframe-in-prompt}%     In [#1]:}%     \hspace{\inputpadding}%     \hspace{2pt}%     \hspace{3pt}%     \end{minipage}%%     }; \par}%     {\endMakeFramed}                         \sloppy % Prevent overflowing lines due to hard-to-break entities          % Setup hyperref package     \hypersetup{     breaklinks=true,  % so long urls are correctly broken across lines     colorlinks=true,     urlcolor=blue,     linkcolor=darkorange,     citecolor=darkgreen,     }          % Slightly bigger margins than the latex defaults          \geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}                    % Override to specify your own logo     \newcommand{\sphinxlogo}{}          % Make the index page of the document.     \makeindex                    \begin{document}          \maketitle               This is a \emph{simple} notebook          % Add contents below.          {\par%     \vspace{-1\baselineskip}%     \needspace{4\baselineskip}}%     \begin{notebookcell}[1]%     \begin{addmargin}[\cellleftmargin]{0em}% left, right     {\smaller%     \par%     %     \vspace{-1\smallerfontscale}%     \begin{Verbatim}[commandchars=\\\{\}]     \PY{k}{print}\PY{p}{(}\PY{l+s}{"}\PY{l+s}{Which has a simple task}\PY{l+s+se}{\PYZbs{}n}\PY{l+s}{Seriously...}\PY{l+s}{"}\PY{p}{)}     \PY{k}{print}\PY{p}{(}\PY{l+s}{"}\PY{l+s}{Cool!}\PY{l+s}{"}\PY{p}{)}     \end{Verbatim}     %     \par%     \vspace{-1\smallerfontscale}}%     \end{addmargin}     \end{notebookcell}          \par\vspace{1\smallerfontscale}%     % Only render the prompt if the cell is pyout.  Note, the outputs prompt      % block isn't used since we need to check each indiviual output and only     % add prompts to the pyout ones.     %     %     \begin{addmargin}[\cellleftmargin]{0em}% left, right     {\smaller%     \vspace{-1\smallerfontscale}%          \begin{Verbatim}[commandchars=\\\{\}]     Which has a simple task     Seriously...     Cool!     \end{Verbatim}     }%     \end{addmargin}%     % Add contents below.          {\par%     \vspace{-1\baselineskip}%     \needspace{4\baselineskip}}%     \begin{notebookcell}[2]%     \begin{addmargin}[\cellleftmargin]{0em}% left, right     {\smaller%     \par%     %     \vspace{-1\smallerfontscale}%     \begin{Verbatim}[commandchars=\\\{\}]     \PY{l+s}{"}\PY{l+s}{To print hello world}\PY{l+s+se}{\PYZbs{}n}\PY{l+s}{Multiple lines}\PY{l+s}{"}     \end{Verbatim}     %     \par%     \vspace{-1\smallerfontscale}}%     \end{addmargin}     \end{notebookcell}          \par\vspace{1\smallerfontscale}%     % Only render the prompt if the cell is pyout.  Note, the outputs prompt      % block isn't used since we need to check each indiviual output and only     % add prompts to the pyout ones.          {\par%     \vspace{-1\smallerfontscale}%     \noindent%     \begin{minipage}{\cellleftmargin}%     \hfill%     {\smaller%     \tt%     \color{nbframe-out-prompt}%     Out[2]:}%     \hspace{\inputpadding}%     \hspace{0em}%     \hspace{3pt}%     \end{minipage}%%     }%     %     %     \begin{addmargin}[\cellleftmargin]{0em}% left, right     {\smaller%     \vspace{-1\smallerfontscale}%                    \begin{verbatim}     'To print hello world\nMultiple lines'     \end{verbatim}               }%     \end{addmargin}%          \end{document}


title: How to get a file's "date modified" string when including graphics?

text: I am working on my thesis, and want to have the date corresponding to when each figure was generated included in it's caption. Currently I manually update the caption when I update the figure. I am wondering if there is a LaTeX package or equivalent that I can use (with texmaker) to access the file information so that this field is generated automatically?


title: Creating IEEE References in Ph.D Thesis

text: How to create IEEE standards references/citations, figures, tables in writing Ph.D Computer Science & Engineering thesis . Lyx tutorials/guide is helpful some extent, is there any templates like Latex so that we can edit and use it for our thesis in IEEE standard.


title: Use of the color package changes the height of the text block

text: Here is the packages in my documents:               \documentclass[12pt,twoside]{article}          \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{color}     \renewcommand{\baselinestretch}{1}     \numberwithin{equation}{section}     \setcounter{page}{1}     \setlength{\textheight}{23.4 cm}     \setlength{\textwidth}{14cm}     \setlength{\oddsidemargin}{1cm}     \setlength{\evensidemargin}{1cm}     \pagestyle{myheadings}     \thispagestyle{empty}     \date{}      ![My document in pdf](http://i.stack.imgur.com/c5X9s.jpg) My problem is when I'm using color package and apply it to one of the words of my doc, the document doesn't have a bottom space. Note that if I don't use the color package and standard black and white word, then we have a normal bottom space and everything is fine. ![Normal document not using color](http://i.stack.imgur.com/sdyaT.jpg) Thanks for your help. Here is my entire code:               \documentclass[12pt,twoside]{article}          \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \hyphenation{o-pe-ra-tors}     \hyphenation{ge-ne-ra-li-za-ti-on}     \hyphenation{ge-ne-ra-li-zed}     \renewcommand{\baselinestretch}{1}     \numberwithin{equation}{section}     \setcounter{page}{1}          \setlength{\textheight}{23.4 cm}          \setlength{\textwidth}{14cm}          \setlength{\oddsidemargin}{1cm}          \setlength{\evensidemargin}{1cm}          \pagestyle{myheadings}          \thispagestyle{empty}          \markboth{\small{wasjcbjab cja}}     {\small{saknckjndsckjndsk}}          \date{}     \begin{document}               \centerline {\Large{\bf TES}}          \centerline{}          \centerline{\Large{\bf TES}}          \centerline{}     \centerline{\Large{\bf TESSS}}          \centerline{}          \centerline{}          \centerline{\bf { TESSS}}          \centerline{Department ofTESSS}          \centerline{TESSS}          \centerline{TESSS}          \centerline{}          \centerline{\bf {TESSS}}          \centerline{TESSS}          \centerline{TESSS.}          \centerline{TESSS}          \centerline{}          \centerline{\bf {TESSS}}          \centerline{TESSS}          \centerline{TESSS}          \centerline{TESSS}               \centerline{}     \centerline{\bf {TESSS }}          \centerline{TESSS,}          \centerline{TESSS}          \centerline{TESSSTESSS}          \newtheorem{Theorem}{Theorem}[section]          \newtheorem{Definition}[Theorem]{Definition}          \newtheorem{Corollary}[Theorem]{Corollary}          \newtheorem{Lemma}[Theorem]{Lemma}          \newtheorem{remark}[Theorem]{Remark}          \newtheorem{Example}[Theorem]{Example}     \newtheorem{proposition}[Theorem]{Proposition}     \newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}          \begin{abstract}     \noindent       TESSSTESSSTESSSTESSSTESSSTESSSTESSST               ESSSTESSSTESSSTESSSTESSSTES          SSTESSSTESSSTESSSTESSSTES     SSTESSSTESSSTESSSTESSS          ProblemProblemProblemProblemProblem          ProblemProblemProblemProblemProblem     ProblemProblemProblemProblemProblem          ProblemProblemProblemProblemProblem     ProblemProblemProblemProblemProblemProblemProblemProblemProblemProblemProblemProbl     emProblemProblemProblemProblemProble     mProblemProblemProblemProblemProblem     ProblemProblemProblemProblemProblem     ProblemProblemProblemProblemProblem          ProblemProblemProblemProblemProblem               ProblemProblemProblemProblemProblem          ProblemProblemProblemProblemProblem                    ProblemProblemProblemProblemProblemP          roblemProblemProblemProblemProblemPr                    oblemProblemProblemProblemProblemPro               blemProblemProblemProblemProblemProbl          emProblemProblemProblemProblemProblemPro     blemProblemProblemProblemProblemProblem     ProblemProblemProblemProblemProblemProble     mProblemProblemProblemProblemProblem     ProblemProblemProblemProblemProblemProbl     emProblemProblemProblemProblemProblemPro     blemProblemProblemProblemProblemProblemP          roblemProblemProblemProblemProblemProble     mProblemProblemProblemProblemProblemProb     lemProblemProblemProblemProblemProblemPr     oblemProblemProblemProblemProb     lemProblemProblemProblemProblemProblemProblemProblemProblemProblemProblemProblemProble     mProblemProblemProblemProblem     ProblemProblemProblemProblemPro     blemProblemProblemProblemProble     mProblemProblemProblemProblemPr     oblemProblemProblemProblemProble          mProblemProblemProblemProblemProb     lemProblemProblemProblemProblemPro     blemProblemProblemProblemProblemPro     blemProblemProblemProblemProblemPro     blem     \end{abstract}          {\bf ication:} adjhabsdjabfcjbacj. \\          {\bf Keywords:} TESSSSS.          \end{document}


title: Using counter within database

text: I try to add a countervalue into a database. But if the database content will be printed, the value is allways the maximum value. I have a simple code example               \documentclass[11pt,titlepage,a4paper]{article}     \usepackage{datatool}          \DTLnewdb{testDB}     \newcounter{couter1}          \begin{document}              %first row         \setcounter{couter1}{1}         \DTLnewrow{testDB}%         \DTLnewdbentry{testDB}{Field1}{cnt: \arabic{couter1}}%         \stepcounter{couter1}         \DTLnewdbentry{testDB}{Field2}{cnt: \arabic{couter1}}%              %second row         \stepcounter{couter1}         \DTLnewrow{testDB}%         \DTLnewdbentry{testDB}{Field1}{cnt: \arabic{couter1}}%         \stepcounter{couter1}         \DTLnewdbentry{testDB}{Field2}{cnt: \arabic{couter1}}%                   %display content of the database         \DTLdisplaydb{testDB}          \end{document}      The result shuld just look like:               1 | 2     3 | 4      Can anyone help me?


title: Sub tilde in LaTeX

text: In LaTeX, `\tilde{x}` puts a ~ on top of the x.   How can I put a ~ below the x?


title: Why does \relsize{-1} in normal size not result in \smaller?

text: This is maybe just me being unable to find the corresponding part of the manual, but I'd expect `relsize`'s `\smaller` or `\relsize{-1}` to have the same effect as using `\small` inside normal-sized text. However, both seem to result in the equivalent of `\footnotesize`. MWE:               \documentclass{article}          \usepackage{relsize}          \begin{document}              \texttt{\small k1}: \texttt{\smaller k1} \textsmaller{\texttt{k1}} \texttt{\relsize{-1} k1} \texttt{\relsize{0} k1} \texttt{\footnotesize k1}          \end{document}      Result, where I'd expect all but the last two (which I included only for comparison) to be the same size: ![](http://i.stack.imgur.com/Eams5.png)


title: How to create a fixed counter?

text: How can I create a counter which is fixed once it has been set? The idea is to insert some kind of remarks into a text which should be numbered, but increasing with the date of actual implementation into the source code. They should not depend on the order in the source code, and they should keep their value even if some of them are removed. Here not a MWE, but an idea how the implementation should look like:               \documentclass{article}     \begin{document}       \mynote{Some note I've added first},        \mynote{A fourth note},        \mynote{A second note},        \mynote{A fifth note},        \mynote{A third note}.         \end{document}      This should give an output as: **Note 1:** Some note I've added first   **Note 4:** A fourth note,   **Note 2:** A second note,   **Note 5:** A fifth note,   **Note 3:** A third note. If I delete the line with the second note, it should give: **Note 1:** Some note I've added first,   **Note 4:** A fourth note,   **Note 5:** A fifth note,   **Note 3:** A third note.