title: Error when compile Simple Slide at ConTeXt ? (ConTEXt)

text: I have problem about compile Simple Slide at ConTeXt, and my MWE like this               \usemodule[simpleslides][style=Boxed,color=red]     \setupTitle       [ title={Title of the presentation},        author={Name of authors},          date={Date of presentation},       ]          \starttext     \placeTitle          \SlideTitle {The first slide}     Write whatever you want.          \SlideTitle {The second slide}     Continue writing.          \stoptext      But when compile Simple Slide at ConTeXt and I get error Message like this :               Command Line:   C:\context\tex\texmf-mswin\bin\context.exe --synctex=-1 "ss.tex"     Startup Folder: D:\SS               mtx-context     | warning: synctex is enabled     mtx-context     | run 1: luatex --fmt="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="ss" --lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --synctex=-1 --c:currentrun=1 --c:fulljobname="./ss.tex" --c:input="./ss.tex" --c:kindofrun=1 --c:maxnofruns=8 --c:synctex="-1" "cont-yes.mkiv"     This is LuaTeX, Version beta-0.78.1 (TeX Live 2013/W32TeX) (rev 4732)       \write18 enabled.     (C:/context/tex/texmf-context/tex/context/base/cont-yes.mkiv          ConTeXt  ver: 2014.01.03 00:40 MKIV current  fmt: 2014.1.4  int: english/english          system          > 'cont-new.mkiv' loaded     (C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv)     system          > files > jobname 'ss', input './ss', result 'ss'     fonts           > latin modern fonts are not preloaded     languages       > language 'en' is active     (D:/SS/ss.tex     resolvers       > modules > 'simpleslides' is loaded     (C:/context/tex/texmf-modules/tex/context/third/simpleslides/t-simpleslides.mkiv     loading         > module simpleslides     resolvers       > modules > 'default' is loaded     (C:/context/tex/texmf-modules/tex/context/third/simpleslides/simpleslides-f-default.tex     simpleslides    > loading default font setup     fonts           > bodyfont '17.0pt' is defined (can better be done global)     fonts           > preloading latin modern fonts (third stage)     fonts           > typescripts > unknown library 'loc'     (C:/context/tex/texmf-context/tex/context/base/type-otf.mkiv)     fonts           > bodyfont '14pt' is defined (can better be done global)     fonts           > bodyfont '16.8pt' is defined (can better be done global)     fonts           > bodyfont '13.44pt' is defined (can better be done global)     fonts           > bodyfont '15pt' is defined (can better be done global)     fonts           > bodyfont '18pt' is defined (can better be done global)     fonts           > bodyfont '16pt' is defined (can better be done global)     fonts           > bodyfont '19.2pt' is defined (can better be done global)     fonts           > bodyfont '15.36pt' is defined (can better be done global)     fonts           > bodyfont '20pt' is defined (can better be done global)     fonts           > bodyfont '24pt' is defined (can better be done global)     fonts           > bodyfont '25pt' is defined (can better be done global)     fonts           > bodyfont '30pt' is defined (can better be done global)     {C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}     fonts           > 'fallback modern ss 17pt' is loaded     )     resolvers       > modules > 'default' is loaded     (C:/context/tex/texmf-modules/tex/context/third/simpleslides/simpleslides-s-default.tex     simpleslides    > loading default style setup     colors          > 'rgb' color space is supported     colors          > 'cmyk' color space is supported     interface       > namespaces > installing namespace 'simpleslidestitle' with settings ' type=module, name=simpleslidestitle, setup=list, style=yes, parent=simpleslidetitle, '     interface       > namespaces > using namespace 'simpleslidestitle' for 'simpleslidestitle'     interface       > namespaces > namespace 'simpleslidestitle' for 'simpleslidestitle' uses parent 'simpleslidetitle'     interface       > namespaces > installing parameter handler for 'simpleslidestitle'     interface       > namespaces > installing parameterhash handler for 'simpleslidestitle'     interface       > namespaces > installing attribute handler for 'simpleslidestitle'     interface       > namespaces > installing setup command for 'simpleslidestitle' (multiple)     interface       > namespaces > installing namespace 'SlideTitle' with settings ' type=module, name=SlideTitle, command=yes, setup=list, style=yes, parent=SlideTitle, '     interface       > namespaces > using namespace 'SlideTitle' for 'SlideTitle'     interface       > namespaces > namespace 'SlideTitle' for 'SlideTitle' uses parent 'SlideTitle'     interface       > namespaces > installing parameter handler for 'SlideTitle'     interface       > namespaces > installing parameterhash handler for 'SlideTitle'     interface       > namespaces > installing attribute handler for 'SlideTitle'     interface       > namespaces > installing definition  command for 'SlideTitle' (single)     interface       > namespaces > installing setup command for 'SlideTitle' (multiple)     )     resolvers       > modules > 'simpleslides-s-Boxed' is loaded     (C:/context/tex/texmf-modules/tex/context/third/simpleslides/simpleslides-s-Boxed.tex     simpleslides    > loading style Boxed     system          > command '\NormalHeight' is already defined     system          > command '\NormalWidth' is already defined     system          > command '\PictureFrameHeight' is already defined     system          > command '\PictureFrameWidth' is already defined     ! Undefined control sequence.          system          > tex > error on line 63 in file C:/context/tex/texmf-modules/tex/context/third/simpleslides/simpleslides-s-Boxed.tex: Undefined control sequence ...          53     \define\PictureFrameWidth   {.476\textwidth}     54          55     %D We define our colorscheme:     56          57     \definecolor [simpleslides:backgroundcolor]     [s=.75]     58     \definecolor [simpleslides:altbackgroundcolor]  [s=.2]     59     \definecolor [simpleslides:contrastcolor]       [r=.55, g=0, b=.04]     60     \definecolor [simpleslides:variantcolor]     [yellow]     61     \definecolor [simpleslides:itemize:color]       [simpleslides:contrastcolor]     62          63 >>  \definevisualcounter     64       [simpleslides:squarescounter]     65       [markers]     66       [counter=userpage,     67        distance={(\the\dimexpr\visualcounterparameter{maxwidth})/(max(m-1,1)) - width},     68        path=unitcircle,     69        maxwidth=\textwidth,     70        height=0.5cm,     71        width=0.5cm]     72          73     \definepalet[visualcounter:markers]          l.63 \definevisualcounter          ?           Process has been terminated ...      As a comparison, i adding my MWE with `\usemodule[visualcounter]` like this               \usemodule[visualcounter]     \usemodule[simpleslides][style=Boxed]     \setupTitle       [ title={Simple Slides?},        author={Hirwanto},          date={6 Januari 2013},       ]          \starttext     \placeTitle          \SlideTitle {The first slide}     Write whatever you want.          \SlideTitle {The second slide}     Continue writing.          \stoptext      And i still get error Message like this error simpleslides Any solution to get The Result like this : ![Boxed](http://i.stack.imgur.com/VUWIV.png)


title: Changing the linespacing of headings independently from the rest of the text

text: I'm currently writing my thesis using TeXworks and MiKTeX. I'm using the `report` document class. My problem is that I need to increase line spacing but some of my chapter and section headings are very long (sometimes spanning 5 lines which is half a page for a chapter heading). Headings such as this one I cannot change to be shorter (the work is already published) but I'd rather not have an entire page taken up with a heading. I've tried `\doublespacing` in `setspace` as well as `\linespread`. Any and all suggestions would be great.               \documentclass[12pt,a4paper,oneside,draft]{report}     \usepackage[lmargin=4.0cm, rmargin=2.5cm,tmargin=3cm,bmargin=2.5cm]{geometry}     \usepackage{mathpazo}     \usepackage{sectsty}     \usepackage{setspace}     \allsectionsfont{\scshape}     \doublespacing     \begin{document}          \tableofcontents     \listoffigures     \listoftables          \include{chapters/Chapter1}     \include{chapters/Chapter2}     \include{chapters/Chapter3}     \include{chapters/Chapter4}     \include{chapters/Chapter5}          \end{document}


title: Using \multido with PSTricks

text: Consider the following example: **Code**               % xelatex filename.tex          \documentclass{article}          \usepackage{pst-poly,pstricks-add}     \usepackage[locale=DE]{siunitx}          \ExplSyntaxOn       \cs_new_eq:NN \calc \fp_eval:n     \ExplSyntaxOff          \begin{document}          \def\radius{5 }     \def\factorA{\calc{(1/10*(5+5^(1/2)))^(1/2)*\radius}}     \def\factorB{\calc{1/2*(3+5^(1/2))}}     \def\factorC{\calc{\factorA*\factorB}}     %\def\firstcoor{\calc{5/4*(5^(1/2)-1)*\factorB}}     %\def\secondcoor{\calc{1/4*(10*(5+5^(1/2)))^(1/2)*\factorB}}     \def\dist{\calc{(1/10*(5-5^(1/2)))^(1/2)*\factorB*\radius}}     \def\firstcoorA{\calc{\dist*cos(3/10*pi)}}     \def\secondcoorA{\calc{\dist*sin(3/10*pi)}}     \def\firstcoorB{\calc{\dist*cos(7/10*pi)}}     \def\secondcoorB{\calc{\dist*sin(7/10*pi)}}     \def\firstcoorC{\calc{\dist*cos(11/10*pi)}}     \def\secondcoorC{\calc{\dist*sin(11/10*pi)}}     \def\firstcoorD{\calc{\dist*cos(15/10*pi)}}     \def\secondcoorD{\calc{\dist*sin(15/10*pi)}}     \def\firstcoorE{\calc{\dist*cos(19/10*pi)}}     \def\secondcoorE{\calc{\dist*sin(19/10*pi)}}          \psset{unit=0.5}     \begin{pspicture}(-10.7,-11.2)(10.7,9)     {\psset{%       linewidth=2\pslinewidth,%       linecolor=green!90!yellow!70!blue!70,%       fillstyle=solid,%       fillcolor=green!60!yellow!80!blue!80%      }      \rput(0,0){\PstPentagon[unit=\factorA]}      \rput{ 36}(\firstcoorA,\secondcoorA){\PstPentagon[unit=\factorA]}      \rput{ 36}(\firstcoorB,\secondcoorB){\PstPentagon[unit=\factorA]}      \rput{ 36}(\firstcoorC,\secondcoorC){\PstPentagon[unit=\factorA]}      \rput{180}(\firstcoorD,\secondcoorD){\PstPentagon[unit=\factorA]}      \rput{ 36}(\firstcoorE,\secondcoorE){\PstPentagon[unit=\factorA]}     }      \rput{180}(0,0){\PstPentagon[unit=\factorC,linewidth=2\pslinewidth]}      \rput(!0.8 \radius mul neg 0.26 \radius mul neg){\num{\radius}}     \end{pspicture}          \end{document}      **Output** ![output](http://i.stack.imgur.com/xNDIg.jpg) **Question** How do I use the `\multido` command to draw the five green pentagons around the center one?


title: Problem with Listings package concerning line breaking and wrong alignment

text: ![enter image description here](http://i.stack.imgur.com/0yHPO.jpg)Hello I have the following code:               \documentclass[12pt]{article}     \usepackage[top=0.3in, bottom=1.5in, left=0.8in, right=0.8in]{geometry}          \usepackage[utf8]{inputenc}          \usepackage{setspace}     \setlength{\parindent}{0cm}          \usepackage{amsmath}     \usepackage{unicode-math}          \usepackage{listings}          \begin{document}          \begin{lstlisting}[frame=single,title={Blinking both LEDs},breaklines=true]          #include  <msp430g2553.h>           unsigned int i = 0;          void main(void)     {       WDTCTL = WDTPW + WDTHOLD;            P1DIR |= 0x01;       P1DIR |= 0x40;            for(;;)            {             //Both LEDs blink simultaneously                  P1OUT ^= 0x01;             P1OUT ^= 0x40;                  //Or alternative P1OUT ^= 0x01|0x40                  for(i=0;i<30000;i++);                  //If I place P1OUT ^= 0x40; here then one LED blink and then the other       };          }               \end{lstlisting}          \end{document}      In the last comment why doesn't the new line starts from the beggining (meaning under the //) but instead starts with a little left margin? And also why the first comment is far more left than the rest of the code in its block? I have uploaded an image also with tabs on. There is something wrong. When I experiment with tabs odd things happen and the document doesn't appear as it should be. The second image is based on the code I wrote in that post and I haven't experiment on that one. ![enter image description here](http://i.stack.imgur.com/kqFHK.jpg)


title: Code in listing not formatted correctly

text: My preamble is as follows:               \documentclass{llncs}     \usepackage{xcolor}     \usepackage{harvard}     \usepackage{listings}     \usepackage{chngcntr}     \makeatletter     \lst@InstallKeywords k{attributes}{attributestyle}\slshape{attributestyle}{}ld     \makeatother          \definecolor{bluekeywords}{rgb}{0,0,1}     \definecolor{greencomments}{rgb}{0,0.5,0}     \definecolor{redstrings}{rgb}{0.64,0.08,0.08}     \definecolor{xmlcomments}{rgb}{0.5,0.5,0.5}     \definecolor{types}{rgb}{0.17,0.57,0.68}     \definecolor{cyan}{rgb}{0.168,0.568,0.686}          %\counterwithin{lstlisting}{section}          \lstset{language=C++,     basicstyle=\ttfamily,     literate={~} {$\sim$}{1},     showspaces=false,     showtabs=false,     breaklines=true,     showstringspaces=false,     breakatwhitespace=true,     escapeinside={(*@}{@*)},     commentstyle=\color{greencomments},     keywordstyle=\color{bluekeywords}\bfseries,     stringstyle=\color{redstrings},     basicstyle=\ttfamily,     morekeywords=     {  abstract, event, new, struct,        as, explicit, null, switch,        base, extern, object, this,        bool, false, operator, throw,        break, finally, out, true,        byte, fixed, override, try,        case, float, params, typeof,        catch, for, private, uint,        char, foreach, protected, ulong,        checked, goto, public, unchecked,        class, if, readonly, unsafe,        const, implicit, ref, ushort,        continue, in, return, using,        decimal, int, sbyte, virtual,        default, interface, sealed, volatile,        delegate, internal, short, void,        do, is, sizeof, while,        double, lock, stackalloc,        else, long, static,        enum, namespace, string, var, \#region, \#endregion     },     moreattributes={Assert, Test, GeneticAlgorithmHarmonizer, ExpectedException,     InvalidElitismRate,     InvalidMutationRate,     InvalidPopulationSize,      ScoreManagementUnitTests, TestFixture, Double, Int32, MusicalStyle, KeySignature,     TimeSignature}, % etc...     attributestyle = \bfseries\color{cyan}, % (for instance)     backgroundcolor=\color{black!5}, % set backgroundcolor     basicstyle=\footnotesize% basic font setting     }      I have the following listing in my document:               \begin{lstlisting}[basicstyle=\ttfamily, caption={class foo managing private memory},label={lst:baseFoo}]          class foo     {       public:         foo() { aReallyLargeArray = new char[123456789]; }         ~foo() { delete [] aReallyLargeArray; }       private:         char* aReallyLargeArray;     };          int main(int argc, char** argv)     {        foo bar;       }          \end{lstlisting}\bigskip      However, indentation in the input is not preserved in the output. Note how the `~foo()` destructor is indented much more than `foo` on the previous line. This improper indentation occurs in other listings of mine as well. I suspect it has to do with the `~`... Any thoughts? ![enter image description here](http://i.stack.imgur.com/0QydL.png)


title: Modifying a thesis template

text: I am using a thesis template available here. I have a problem in working with this template: -I would like to add some new commands and redefine some old commands. Where do I put those in this template? I tried putting these new commands at several places in the main file of the template, but I keep getting errors while compiling. I would be very grateful if you could help me!


title: TikZ: using name intersections to define a node

text: Two questions:   1. What is going wrong with these nodes that are defined from the intersections?    2. Can this be automated with `\foreach` syntax to find the other vectors for the 2nd point? I couldn't figure that out. * * *               \documentclass[tikz]{standalone}     \usepackage{amsmath}          \usetikzlibrary{intersections}     \usetikzlibrary{calc}          %  Used for both ellipses and circles                                                    \tikzset{%                                                                                partial ellipse/.style args = {#1:#2:#3}{%                                                 insert path = {+ (#1:#3) arc (#1:#2:#3)}       }     }          %  unit vectors                                                                          \newcommand{\unit}[1]{\hat{\mathbf{#1}}}          \begin{document}     \begin{tikzpicture}       \coordinate (O) at (0, 0);            \draw[-latex] (O) -- (4, 0) node[pos = 1.1, font = \scriptsize] {\(x\)};       \draw[-latex] (O) -- (0, 4) node[pos = 1.1, font = \scriptsize] {\(y\)};       \draw[blue, name path = arc] (O) [partial ellipse = -15:75:3];                 \foreach \i/\angle in {1/60, 2/30}{         \path[name path global = line\i] (O) -- (\angle:3.5);         \path[name intersections = {of = arc and line\i, by = P\i}];         \path[name path global = circ\i] (P\i) circle[radius = 1bp];              \filldraw[black] (P\i) circle[radius = .025cm];       }            \node[coordinate, name intersections = {of = circ1 and arc}] (A1) at       (intersection-1) {};       \node[coordinate, name intersections = {of = circ1 and arc}] (A2) at       (intersection-2) {};       \draw[name intersections = {of = circ1 and arc}, -latex] (P1) --       ($(A2)!.75cm!(A1)$) node[pos = 1.125, font = \tiny] {\(\unit{u}\)} coordinate       (B1);            \draw[-latex] (P1) -- ($(P1)!.75cm!-270:(B1)$) node[pos = 1.125,       font = \tiny] {\(\unit{n}\)};     \end{tikzpicture}     \end{document}      From the image, we see that first point is drawing correctly it just has associated errors with it. ![enter image description here](http://i.stack.imgur.com/SApRK.png)


title: Texstudio + Biber + build folder

text: I used this tutorial to export my auxiliary files into a different directory. Basically i just add `-aux-directory=build` in `Options -> Configure -> Commands` and added the `build` folder into `Options -> Configure -> Build -> Build Options -> Additional Search Paths -> Log`. This succesfully generates all the auxilliary files in the build folder and it's also possible to generate the pdf. Unfortunately biber has a problem with this setup: > Prozess gestartet: biber.exe "MyFile" > > INFO - This is Biber 1.7 > > INFO - Logfile is 'MyFile.blg' > > ERROR - Cannot find control file 'MyFile.bcf'! - did you pass the > "backend=biber" option to BibLaTeX? > > INFO - ERRORS: 1 I guess i have to specify the correct path for biber somewhere in Texstudio. Does anyone know where i have to update the path? In this thread someone had similar problems. Also i'm not sure if the solution of this thread applies to my situation.


How does makeindex sort alphabets of a language? How many languages does it support? Is the sorting hardcoded or does it provide someways to create sorting alphabets for a new language?


title: How to align the chapter number to the right?

text: Is there any way to align the chapter number to the right (without the CHAPTER word!) and the chapter title itself to the left? The chapter title must be on the line below the chapter number Here is part of the code I use (both the chapter number and title are right aligned):               \usepackage{titlesec}          \titleformat{\chapter}[display]     {\normalfont\Huge\bfseries\color[RGB]{0,120,182}}     {\thechapter}{1em}      PS: I use Sphinx to generate latex output if it matters Thanks in advance


title: portable PS-viewer with forward and inverse-search

text: I am using a portable Latex (Miktex, Texniccenter & Sumatrapdf) from my flashdrive and all works good. But I found no possibility to search in *.ps files through forward or inverse-search. I use Evince (also as a portable edition) for viewing *.ps files but I found no options to enable forward or inverse-search. Is there a portable PS-viewer which understands forward and inverse-search? Is it possible to set up forward and inverse-search with Evince? If yes, how? If ther is no portable viewer, which other PS-viewers can use forward and inverse-search? Maybe it is possible to make it portable. With portable I mean for different versions of the same operatingsystem. In my case windows-pcs. I am using my flashdrive at university-windows-pcs wheres no latex and so on is installed at all. So I have to bring it with me. And because there are no adminrights (for me) i cant install anything.


title: Table cell height too small when wrapping text

text: I have the following problem with my table: The height of the 2nd row is slightly too small and the text overlaps with the line at the bottom and the top of the cell. My code is below:               \begin{longtabu} to \linewidth {| m{0.41\textwidth} | m{0.53\textwidth} |}     \hline     \multicolumn{1}{|c}{Static (stuff)} & \multicolumn{1}{|c|}{Dynamic (stuff)} \\ \hline     \endhead     \hline     \endfoot     \endlastfoot      textetxtetxtexttext & textetxtetxtexttext$-$Buffer: X\textbackslash Y\textbackslash y\textbackslash G\textbackslash X\textbackslash H\textbackslash J\textbackslash x00$-$\\ \hline      textetxtetxtexttext & textetxtetxtexttext$-$Information: XYZ\textbackslash x00 ???\\ \hline        \caption{calls}     \label{tab:alls}%      \end{longtabu}      Any help is appreciated. Using packages tabu, booktabs and longtable. Thanks


title: biblatex: shorthands in Reference section

text: I'm quite new with `biblatex`. Is there a possibility to have the shorttitle within the Reference list? I'd like to have something as the normal entries, each looking +/- like > Jorio Marco, "Wider den Pakt mit dem Teufel". Die Gegenwehr der > Konservativen, in: Hildbrand/Tanner, Revolution, S. 139–160. _[Jorio, Pakt]_ I mainly care about the latest part. The "List of Shorthands" didn't really do the trick.


title: Biblatex: Avoid abbreviations for "editor" or "translator" (modifying historian bibstyle)

text: I am trying to conform to a bibliographic style that is close to "historian", but instead of the usual abbreviations in the bibliography, they want the words spelled out. So instead of this: > Turner, Nigel. _Syntax_. Ed. by James Hope Moulton. Vol. 3 of _A Grammar of > New Testament Greek_. Edinburgh: T. & T. Clark, 1963. This: > Turner, Nigel. _Syntax_. **Edited** by James Hope Moulton. **Volume** 3 of > _A Grammar of New Testament Greek_. Edinburgh: T. & T. Clark, 1963. I have tried the following, but it does not work.               \DefineBibliographyStrings{american}{%     namedash={---------},%     volumeof={of},     editor={Edited by},     translator={Translated by}     }


title: Bibliography with only initials of names

text: I have a .bib file created automatically with jabRef. When I use it in my thesis some of the author names are full and some only initial letter. Why? How can I have only inital for all? Here is a MWE:                   \documentclass[a4paper,11pt,titlepage,twoside,openright]{book}         \usepackage[utf8]{inputenc}         \usepackage[italian,english]{babel}         \usepackage[T1]{fontenc}         \usepackage{csquotes}         \usepackage{hyperref}         \usepackage[style=numeric-comp,sorting=none,sortcites=true,doi=false,url=false, hyperref]{biblatex}              \renewbibmacro{in:}{ %eliminates the 'in' in the biblio         \ifentrytype{article}{}{%         \printtext{\bibstring{in}\intitlepunct}}}              \renewcommand*{\bibfont}{\small}              \bibliography{bib_tesi}         \AtEveryBibitem{%         \clearfield{month}%         \clearlist{language}%         }              \begin{document}              \backmatter         \begingroup         \phantomsection         \printbibliography         \addcontentsline{toc}{chapter}{Bibliography}               \endgroup              \end{document}


title: I don't have navigation bar in the beamer

text: I saw many threads that want to remove the navigation bar but my problem is I don't have a navigation bar...nor do I have page numbers.                   \documentclass{beamer}         \usepackage{graphicx}         \usepackage{grffile}         \usetheme{Frankfurt}              \begin{document}              \title{}         \author{}         \date{\today}              \begin{frame}             \titlepage         \end{frame}


title: Decrease length of underscore character in normal text (gender_gap)

text: I use the underscore character _ in normal text mode (not typewriter). However, it is quite long. How can I decrease its length so that it is shorter? I followed the Tex FAQ on how to typeset an underscore character using this:               \documentclass[oneside]{scrbook}          % (1) choose a font that is available as T1     \usepackage{lmodern}          % (2) specify encoding     \usepackage[T1]{fontenc}          % (3) load symbol definitions     \usepackage{textcomp}          \begin{document}     Forscher\_innen, Protagonist\_innen, etc.     \end{document}      However the outcome looks like this then: ![enter image description here](http://i.stack.imgur.com/wzqIz.png) If the underscore was a bit shorter, everything would be fine. I would rather not like to solve this by inserting a `\rule` as I would still be able to search the resulting PDF file for a string like `Forscher_innen`. The background is that I use the so called Gender Gap (german wikipedia), i.e. underscores within normal text.


title: strange error in \end{document}

text: I am using ACM template to write a paper for a conference. This is my main document structure:               .....     ......     \section{Introduction}     \label{sec:Introduction}     \input{introduction}          \section{Related Work}     \label{sec:rWork}     \input{relatedWork}     ...     \section{Concluding Remarks}     \label{sec:conclusion}     \input{conclusion}          \bibliographystyle{abbrv}     \bibliography{sigproc}     %\balancecolumns          \end{document}      Somehow every time I create pdf (PDF Textify) using WinEdt. I get strange error as shown in the following image. ![error screenshot](http://i.stack.imgur.com/U9r29.png) source: https://plus.google.com/photos/111071276548636760112/albums/5913461747487936689 > >     pdfTeX warning (ext4): destination with the same identifier > (name{page.}) has >     been already used, duplicate ignored >     <to be read again> >                       \relax >     l. 177 \end{document} >                          [2 >   This is what my .bib entries are               @article{bisbal1999legacy,       title={Legacy information systems: Issues and directions},       author={Bisbal, Jes{\'u}s and Lawless, Deirdre and Wu, Bing and Grimson, Jane},       journal={IEEE Soft.},       volume={16},       number={5},       pages={103--111},       year={1999},       publisher={IEEE}     }          @article{veerman2004revitalizing,       title={Revitalizing modifiability of legacy assets},       author={Veerman, Niels},       journal={J. Softw. Maint. Evol.: Res. Prac.},       volume={16},       number={4-5},       pages={219--254},       year={2004},       publisher={Wiley Online Library}     }          @article{arranga1997cobol,       title={Cobol: Perception and reality},       author={Arranga, Edmund C and Coyle, Frank P},       journal={IEEE Comp.},       volume={30},       number={3},       pages={126--128},       year={1997},       publisher={IEEE}     }          @MISC{Toby2008burden,       author =       {Sucharov, Toby and Rice, Philip},       title =        {The Burden of Legacy},       howpublished = {Online},       year =         {2008},       source =       {http://www.ncc.co.uk/article/?articleid=15665}     }          @book{glaser2009discovery,       title={The discovery of grounded theory: Strategies for qualitative research},       author={Glaser, Barney G and Strauss, Anselm L},       year={1967},       publisher={Aldine Transaction},       ADDRESS = {Chicago, Illionios}     }          @article{adolph2011using,       title={Using grounded theory to study the experience of software development},       author={Adolph, Steve and Hall, Wendy and Kruchten, Philippe},       journal={Emp. Soft. Eng.},       volume={16},       number={4},       pages={487--513},       year={2011},       publisher={Springer}     }


title: "Reference does not exist" warning with \includeonly

text: I am in the process of writing my thesis and am using the `\include` command to separate the files. But when I use the `\includeonly` command to select on the current chapter which has references to figures, theorems and `algorithm2e` code blocks in other chapters, I get the correct references in the output PDF file along with this warning:               name{..} has been referenced but does not exist, replaced by a fixed one      Based on all I have read upon on `\includeonly`, I don't think this is its expected behavior. This is the that preamble I am using.               \documentclass[pdftex,11pt,a4paper,twoside]{book}     \special{papersize=210mm,297mm}     \usepackage[slide,algochapter,linesnumbered,algoruled,vlined]{algorithm2e}     \usepackage{enumitem,IEEEtrantools,graphics,float,amsmath,amssymb,fullpage}     \usepackage{verbatim,tabularx,graphicx,setspace,sectsty,microtype}     \usepackage[a4paper,margin=1in,left=35mm]{geometry}     \usepackage[unicode,colorlinks,linktocpage=true]{hyperref}     \usepackage[all]{hypcap}     \usepackage{amsthm}     \usepackage[nameinlink,capitalise,noabbrev]{cleveref}      For some reason the `\WarningsOff*` and `\WarningFilter` commands of the `silence` package aren't working either. What am I doing wrong? How can I avoid these warnings?


title: Sharp-symbol offset and text left-justification problem with tikz

text: I'm trying to improve a figure that I made with the tikz package. It currently looks like this: ## ![figure](http://i.stack.imgur.com/CcliE.png) Specifically, I have the following two questions regarding the row and column headers:   * The sharp symbol "\sharp" seems to offset the preceding letters vertically. How do I prevent this?   * How do I left-justify the row headers? I have no idea how to do these things, even after searching. Any help would be appreciated. This is the code snippet that produces the headings:               \foreach \x/\y in { 1/C,                         2/C$\sharp$,                         3/D,                         4/E$\flat$,                         5/E,                         6/F,                         7/F$\sharp$,                         8/G,                         9/A$\flat$,                         10/A,                         11/B$\flat$,                         12/B}     {         \draw (\x,13) node{\y};         \draw (0,13-\x) node{\y};     }


title: How can I reduce the left margin in the documentclass hitec?

text: I am quite aware of the package `geometry`, but it does not seem to play nice with the hitec document class. I have looked at related questions How to reduce the margins and How can I change the margins in LaTeX? Consider the following example:               \documentclass{hitec}     %\usepackage[hmargin=3cm]{geometry}          \begin{document}          \author{Merlin $merlin@merlin.com$}     \title{Arbitrary Title}          \maketitle          \section{Section}          \subsection{Subsection}     \begin{itemize}     \item Item 1     \item Item 2     \item     \end{itemize}               \end{document}      If I uncomment the line `\usepackage[hmargin=3cm]{geometry}`, a lot of text flies off the left side of the page. Moreover, the two horizontal lines on the top and bottom of the title do not move. I suspect that the document class is doing something unusual with the usage of margins, but I wonder if there is a systematic way to just shift everything to the left by 1 cm.


title: The command \year gives a number instead of text. How is it done?

text: As I know, in the command sequence `\the\year`, `\year` gives a number, and `\the` converts it to text. What I don't understand is, how to make a command that results in a number but not a piece of text representing that number, like the command `\year`? In other words, if I want `\theXXX` to generate "1234" (without quotes), what do I replace `XXX` with?


title: Reference \ biography indentation issue

text: I have added a reference in my latex template. The problem is shown in a picture below ![enter image description here](http://i.stack.imgur.com/MbeGA.png) If you see the last reference, it goes a bit leftwards. I have found that it appears only for the last reference, whichever, reference comes last. I think it is a possible template issue. here is MWE               \documentclass{fcs}     \usepackage{bm}          \volumn{ }     \doi{ }     \articletype{REVIEW~ARTICLE}     \copynote{{\copyright} Higher Education Press and Springer-Verlag Berlin Heidelberg 2012}     \ratime{Received month dd, yyyy; accepted month dd, yyyy}     \email{$\times\times\times\times@\times\times\times.\times\times\times$}     \title{$\bm{Frontiers~ of~ Computer~ Science}$\\[2mm] Instruction for authors}     \author{Firstname LASTNAME \xff $^{1,2}$}     \address{{1\quad Higher Education Press, Beijing 100029, China}\\     {2\quad Acadcmic Journal Division, Beijing 100029, China}}          \markboth{Front. Comput. Sci.}{Firstname LASTNAME: please insert running head here}          \begin{document}     \maketitle     \setcounter{page}{1}     \setlength{\baselineskip}{14pt}          \begin{abstract}     A short abstract of up to 300 words written in one     paragraph, clearly indicating the object and scope of the paper as     well as the results achieved, should appear on the first page. It     should be written using the abstract environment.     \end{abstract}          \Keywords{Up to 8 words separated by commas.}          \section{Introduction}          \noindent Frontiers of Computer Science is an international     peer-reviewed academic journal sponsored by the Ministry of     Education of China. The journal is jointly published by Higher     Education Press of China and Springer on a bimonthly basis in     English. Online versions are available through both     http://www.springerlink.com/content/11704 and     http://journal.hep.com.cn/fcs.          In-text citations must agree with the references in either numbering     or names and year. The references should be presented completely and     without mistakes, and should be the original publication. We use the     citation-sequence system, that is to number the citations according     to sequence of their first appearance. Journal names should be     spelled out in full. Examples are given in     \cite{KargerD,Mastroianni,SchlessingerD,ZhugeH}.          \Acknowledgements{The ``Acknowledgement section'' is the general     term for the list of contributions etc}          \begin{thebibliography}{99}     \bibitem{Mastroianni} Verta O. Mastroianni C, Talia D. A super-peer model for resource     discovery services in large-scale grids. Future Generation Computer     Systems, 2005, 21(8): 1235--1248          \bibitem{ZhugeH} Zhuge H. The Knowledge Grid. Singapore: World Scientific Publishing   Co., 2004          \bibitem{SchlessingerD}     Schlessinger D. Schaechter M. Bacterial toxins. In: Schaechter M,     Medoff G, Eisenstein BI, eds. Mechanisms of microbial disease. 2nd     ed. Baltimore: Williams and Wilkins, 1993, 162--175          \bibitem{KargerD}     Karger D. Ruhl M. Simple efficient load balancing algorithms for     peer-to-peer systems. In: Proceedings of Sixteenth Annual ACM     Symposium on Parallelism in Algorithm and Architectures. 2004,     36--40     \end{thebibliography}          %% \Biography{#1}{#2}     %% #1 is the file name of photo,     %% #2 is author's biography     \Biography{fcs-2}{Please provide each author's biography here with no     more than 120 words. The photo can be informal. Our journal prefers     to exhibit an encouraging atmosphere. Please use a one that best     suits our journal.}            \end{document}      It also appears in following cases 1) if no biography 2) even if the bbibliograhy is added in this way `\bibliographystyle{unsrt} \bibliography{oo}` What I understand after lot of R & D is that perhaps its a templates issue. Any way to solve it. Here is the screenshot ![enter image description here](http://i.stack.imgur.com/5Q1gc.png) Whatever the end line is, either a biography or a reference, this problem appears. The FCS latex template could be downloaded at following URL [journal.hep.com.cn/fcs/EN/column/column11258.shtml]


title: Creating a hybrid mapsto/leadsto arrow

text: I have a construction that isn't a function, but does produce values assigned (in an ill defined way) varyingly over a domain. I can write this as `A \leadsto B`. I want to write what happens to `a \in A` not as `a \mapsto b` but with a `\leadsto` arrow that begins with the small vertical bar `\mapstochar`. I've already loaded the `extpfeil` package, so `stmaryrd` won't work. What can I do?


title: Equivalent of \ker for the image of a map

text: I know I can use `\ker` in place of `\text{ker}` to denote the kernel of a map. Is there a similar command for the image of a map? Even if I define my own command like               \newcommand{\Ima}{\text{Im}}      Inside the theorem environment (for example) I get the italic version of _Im_. How can I fix this?


title: Auctex previews

text: I am using PSTricks and trying to generate an inline preview with auctex for part of a document. This works fine if I surround the whole thing in `$` signs like               $     \begin{pspicture}     ...     \end{pspicture}     $      but this doesn't work when I want to use a math variable, say `$\theta$` within that block. I expected using `\theta` without the dollar signs would work, but it doesn't. Is there a way to generate inline previews without surrounding dollar signs, or is there a way to include nested dollar signs within the section?


title: How to view .xdv files?

text: How can I view eXtended DVi files in a computer? These are the output of the command `xelatex -no-pdf`. I am particularly interested for the solution on a Mac, but please comment on other platforms as well. Traditional programs like xdvi or Okular seem not to be able to deal with the `.xdv` file.


title: Shuffle numbers in a loop

text: I want to have a document, where the exact same page will be printed for a certain number of pages and on every page there should be a unique number. I know how to do so with a loop, but I don't want the numbers of random order, like 5,2,7,10,1,.... (without any double number and no number out of range). Is it possible to do this in LaTeX? I would give a number and I get an shuffled array of numbers back which I can use within the loop? (I do not want to create the list by some external script since the number can be different). Is there a way that LaTeX can do something like this? Thank you very much! (Background: I want to make exams where the numbers should refer to the students in order to make an anonymous list in the end. When the numbers are in natural order, everyone can see the mark of their neighbors in the exam. At the moment I am shuffeling after printing) **Edit:** At the moment, I'm using sort of this code. And I would like to have a solution that something is calculated a new quantity `\randno`, which I can used within the loop instead of `examno`.               \documentclass{article}     \newcounter{examno} \setcounter{examno}{1}     \newcommand{\numbermax}{7}          \begin{document}     \loop     Test. This is exam no. \arabic{examno} \pagebreak     \ifnum\value{examno}<\numbermax     \stepcounter{examno}     \repeat     \end{document}


title: Unable to make symbol similar to bowtie or lrtimes

text: I wish to write something like this in latex: ![enter image description here](http://i.stack.imgur.com/NK5db.png) I tried using `\lrtimes` and also `\bowtie`, but none is able to give me the correct output. Also, i had problems getting that `{task1}` below the symbol. For this, i tried using `$\bowtie_\\{task_1\\}$`, but it didnt give me the required output. Any help would be appreciated.


title: How do i create a rectangle with parallel line inside it?

text: How to create rectangle with parallel line? ![enter image description here](http://i.stack.imgur.com/XYVp4.png)


title: Pushing citations to LaTeXila from JabRef

text: I've just starting learning the LaTeX ropes in the past couple weeks and I am loving it!! There is just one (last, yeah right!) thing that I am trying to get to work. I'm managing my citations with JabRef, because I really like the easy of editing in the GUI, and although I was planning on entering all my citations manually it appears as if JabRef has a method of pushing citations to LaTeX editors but I can't get it to work with LaTeXila in Ubuntu 12.04. I was wondering if anyone here has set this up and it willing to let me know how it's done. Sorry if this question has already been answered I was unable to find a solution any where. I am using `natbib` with `\citep` and using the JabRef generated .bib file I am getting exactly the bibliography I want. This would just makes things that one tiny bit easier. Thanks so much!


title: pgfkeys error in tcolorbox

text: I am trying to duplicate part of an example code given in the `tcolorbox` package documentation on page 13. It looks like this:               \documentclass{article}     \usepackage{tcolorbox}     \tcbuselibrary{skins}     \tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,nobeforeafter,width=(\linewidth-4mm)/2}     \begin{document}     \begin{tcolorbox}[sidebyside,title=Lower not separated,lower separated=false]     This is the upper part.     \tcblower     This is the lower part.     \end{tcolorbox}     \end{document}      ![enter image description here](http://i.stack.imgur.com/yYRWe.jpg) It all looks good except for the dashed vertical line that should not be there. The above code generates the error:               pgfkeys:Ido not know the key /tcb/lower separated...      The log file sends me to the `pgfkeys` package. Section 55 on Key Management (page 481) in the pgfmanual doesn't provide me with an answer.So what's wrong here? Perhaps there's just something missing as in this example: Problem with "Package pgfkeys Error". And how to give each part a different color?


title: How to use showexpl with an external class?

text: The `showexpl` package defines `LTXexample` environment which allows to define a latex code and shows its result side by side. The problem is that it uses the same document class where the LaTeX code is defined and I would like to define which class to use for examples. Do you know if it's possible? Here you have an examples. It's a `beamer` presentation with some `LTXexample`s.               \documentclass{beamer}      \usepackage{showexpl}      \lstloadlanguages{[LaTeX]Tex}      \lstset{%          basicstyle=\ttfamily\small,          commentstyle=\itshape\ttfamily\small,          showspaces=false,          showstringspaces=false,          breaklines=true,          breakautoindent=true,          captionpos=t      }           \begin{document}      \frame[containsverbatim]{        \frametitle{First slide}        \begin{LTXexample}          \begin{itemize}             \item a             \item b             \item c          \end{itemize}        \end{LTXexample}             \begin{LTXexample}          \begin{equation}             a^2+b^2=\sqrt{\frac{c^2}{1}}          \end{equation}        \end{LTXexample}      }           \frame[containsverbatim]{        \frametitle{Second slide}        \begin{LTXexample}           \documentclass{article}           \begin{document}           \section{Section 1}              Text for section 1           \end{document}        \end{LTXexample}      }      \end{document}      Second slide doesn't show 'section title' because beamer has its own section behaviour, so it seems that `\documentclass{article}` inside the example doesn't have any effect. The resulting font is sanserif because beamer uses it. I know I can use several external documents and insert code and results, but with `LTXexample` or a similar environment would be easier. Do you know a better solution?


title: Avoid comment style for URLs in code listings

text: I using the following settings for code listings.               \usepackage{listings}     \usepackage{textcomp}     \lstset{language=Java,         keywordstyle=\color{RoyalBlue},         basicstyle=\scriptsize\ttfamily,         commentstyle=\color{Green}\ttfamily,         rulecolor=\color{black},         upquote=true,         numbers=left,         numberstyle=\tiny\color{gray},         stepnumber=1,         numbersep=8pt,         showstringspaces=false,         breaklines=true,         frameround=ftff,         frame=single,         belowskip=3em,         belowcaptionskip=.25\baselineskip     }      The actual code listing contains comments as well as URLs. How can I ensure that only the comment will be colored with `commentstyle` but not the URL that contains a double slash `//` as well?               // This is a comment.     http://tex.stackexchange.com      In the example `tex.stackexchange.com` would be colored `Green`.


title: LyX: crossreference keeps popping up in ToC

text: I have a slight problem with LyX in my latest document. I do have a rather large appendix and have inserted titles to structure it a bit. Since my appendix has to be unnumbered I used `\subsubsection*` and inserted an entry for the ToC as well as a label:               Ausschnitt 1      [sub:Ausschnitt-1]          \addcontentsline{toc}{subsubsection}{\numberline{}Ausschnitt\ 1}          \subsubsectionmark{Ausschnitt\ 1}      that works fine but the problem is that every time I use a cross-reference to this label the cross-reference itself appears as an entry in the ToC as well.. It doesn't help to move the label to the end, the problem remains the same. So is there anything I can do to prevent the cross-references from popping up in the ToC? **Edit** : I found the problem or at least parts of it. In some instances it wouldn't let me set the brackets appropriately and I can't get it to work properly. In LyX, the code looks like this:               \addcontentsline{toc}{subsubsection}{\numberline{}Ausschnitt\ 1}     \subsubsectionmark{Ausschnitt\ 1}      if I try to submit this, I'm getting the following error message:               Too many }'s:  ...tt\ 1}\subsubsectionmark{Ausschnitt\ 1}}}      You've closed more groups than you opened. Such booboos are generally harmless, so keep going. it lets me generate the pdf if I remove the final bracket but then the problem with all the cross-references popping up in the ToC starts. is there a way to remove those brackets manually?


title: Spacing between tables

text: I need to adjust the vertical spacing between three tables as defined in the following MWE. `\vspace{30pt}` only works for between the second and third table. I'm suspecting this has something to do with the minipages defined but I need them for the footers beneath the tables. Any clues?               \documentclass[12pt, a4paper]{report}          \begin{document}     \begin{table}[t]     \begin{minipage}{\textwidth}      \renewcommand{\thefootnote}{\thempfootnote}     \centering     \setlength{\tabcolsep}{12pt}     \renewcommand{\arraystretch}{1.3}     \begin{tabular}{ l l l }     \hline         \multicolumn{1}{|c|}{X} & \multicolumn{1}{c|}{Y} & \multicolumn{1}{c|}{Z } \\ \hline     \multicolumn{1}{|c|}{YYYYY.\footnote{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy} + ZZZZZ.} & \multicolumn{1}{c|}{62.9\% (73.2\%)} & \multicolumn{1}{c|}{213} \\       \multicolumn{1}{|c|}{XXXX + YYYYY.\footnote{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy}} & \multicolumn{1}{c|}{81.5\% (92.8\%)} & \multicolumn{1}{c|}{638} \\       \multicolumn{1}{|c|}{XXXX + ZZZZZ.} & \multicolumn{1}{c|}{80.9\% (93.8\%)} & \multicolumn{1}{c|}{560} \\       \multicolumn{1}{|c|}{XXXX + YYYYY.\footnotemark[\value{mpfootnote}] + ZZZZZ.} & \multicolumn{1}{c|}{94.8\% (98.7\%)} & \multicolumn{1}{c|}{155} \\     \hline     \end{tabular}     \caption{Results for a}     \end{minipage}     \vspace{30pt}     \begin{minipage}{\textwidth}      \renewcommand{\thefootnote}{\thempfootnote}     \centering     \setlength{\tabcolsep}{12pt}     \renewcommand{\arraystretch}{1.3}     \begin{tabular}{ l l l }     \hline       \multicolumn{1}{|c|}{X} & \multicolumn{1}{c|}{Y} & \multicolumn{1}{c|}{Z } \\ \hline     \multicolumn{1}{|c|}{YYYYY.\footnote{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy} + ZZZZZ.} & \multicolumn{1}{c|}{67.7\% (81.7\%)} & \multicolumn{1}{c|}{344} \\       \multicolumn{1}{|c|}{XXXX + YYYYY.\footnote{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy}} & \multicolumn{1}{c|}{80.4\% (92.6\%)} & \multicolumn{1}{c|}{810} \\       \multicolumn{1}{|c|}{XXXX + ZZZZZ.} & \multicolumn{1}{c|}{82.1\% (94.2\%)} & \multicolumn{1}{c|}{727} \\       \multicolumn{1}{|c|}{XXXX + YYYYY.\footnotemark[\value{mpfootnote}] + ZZZZZ.} & \multicolumn{1}{c|}{90.6\% (97.0\%)} & \multicolumn{1}{c|}{267} \\     \hline     \end{tabular}     \caption{Results for B}     \end{minipage}     \vspace{30pt}     \begin{minipage}{\textwidth}      \renewcommand{\thefootnote}{\thempfootnote}     \centering     \setlength{\tabcolsep}{12pt}     \renewcommand{\arraystretch}{1.3}     \begin{tabular}{ l l l }     \hline       \multicolumn{1}{|c|}{X} & \multicolumn{1}{c|}{Y} & \multicolumn{1}{c|}{Z } \\ \hline     \multicolumn{1}{|c|}{YYYYY.\footnote{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy} + ZZZZZ.} & \multicolumn{1}{c|}{73.2\% (79.4\%)} & \multicolumn{1}{c|}{97} \\         \multicolumn{1}{|c|}{XXXX + YYYYY.\footnote{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy}} & \multicolumn{1}{c|}{86.0\% (94.0\%)} & \multicolumn{1}{c|}{315} \\       \multicolumn{1}{|c|}{XXXX + ZZZZZ.} & \multicolumn{1}{c|}{88.5\% (95.5\%)} & \multicolumn{1}{c|}{157} \\            \multicolumn{1}{|c|}{XXXX + YYYYY.\footnotemark[\value{mpfootnote}] + ZZZZZ.} & \multicolumn{1}{c|}{90.5\% (95.9\%)} & \multicolumn{1}{c|}{74} \\     \hline     \end{tabular}     \caption{Results for C}     \end{minipage}     \end{table}          \end{document}


title: How to define a special tikz node?

text: I want to define a special tikz node, that I'll use that way:               \specialNode[name=mynode, label=mylabel, otherTikzOptions...] (node_name) at (some_coordinate);      And gets coverted to:               \node[circle, fill=red, color=black, label=mynode, label=mylabel, otherTikzOptions...] (node_name) at (some_coordinate) {};      (the double label is not an error, I want this configuration to have semantic options). I tried `pgfkeys` but I don't really know how to pass the `otherTikzOptions` options and get the optional `at (some_coordinate)` part. Is it even possible to realize this kind of things with LaTeX?


title: How to wrap lines correctly inside algorithmic

text: I am having problems displaying algorithms. The wrapping is really ugly and I can't, for the life of me, find a fix that doesn't involve manually tweaking the hell out of everything, to the point that I might as well scrap the crappy algorithm packages and write everything out in TeX. Is there any way to properly indent the following               \documentclass{article}     \usepackage{algorithm}     \usepackage{algpseudocode}     \begin{document}     \begin{algorithm}        \caption{My pseudo code.}     \begin{algorithmic}[1]        \While{this line is sooooooooooo long and boring and too much for algorithmic to handle}           \State look at this state, this state is just too long for algorithmic to display it properly            \While{again this line is sooooooooooo long and boring and too much for algorithmic too handle}              \State look at this state again, this state is just too long for algorithmic to handle, I'm just going to switch to Word           \EndWhile        \EndWhile     \end{algorithmic}     \end{algorithm}     \end{document}      ![Ugly algorithm](http://i.stack.imgur.com/EFo0m.png) so that the output is similar to ![Pretty algorithm](http://i.stack.imgur.com/awqYM.png)


title: 'Floor' and 'ceiling' functions

text: Is there a convenient way to typeset the floor or ceiling of a number, without needing to separately code the left and right parts? For example, is there some way to do `$\ceil{x}$` instead of `$\lceil x \rceil$`?


title: Paragraph ended before \@lbibitem was complete error

text: I've happily typing up my report and including references when suddenly it refuses to compile and outputs ` C:\Users\User\Documents\Project work\Latex Report\Main\master.bbl:53: Paragraph ended before \@lbibitem was complete. []`. I've searched through my bib file and there is no error and the entry DOES exist. When I take after the offending `citep{....}` it works again! I've tried deleting the temp files but to no avail! Any ideas? MWE:               \documentclass[12pt, preprint]{aastex}     \begin{document}     \citep{zou_sky_2010}     \bibliographystyle{mn2e}     \bibliography{zotero}     \end{document}      and here is the bib file entry (it works for other citations before the zou one):               @article{aragon-salamanca_measuring_2006,         title = {Measuring the fading of S0 galaxies using globular clusters},         volume = {458},         issn = {0004-6361, 1432-0746},         url = {http://arxiv.org/abs/astro-ph/0607645},         doi = {10.1051/0004-6361:20065948},         abstract = {We test the hypothesis that S0 galaxies are the descendants of fading spirals whose star formation has been shut down, by using the properties of their globular cluster ({GC)} systems. We estimate the amount by which the {GC} specific frequency (number of {GCs} per unit V-band luminosity) is enhanced in S0s relative to spirals. If the transformation hypothesis is correct, and no {GCs} are created or destroyed in the process, then this difference provides a measure of the degree to which the S0's V-band luminosity has faded relative to that of its spiral progenitor. We also explore whether the degree to which the {GC} specific frequency is enhanced in S0s correlates with the colour of the stellar population, as also predicted by this hypothesis in which galaxies become redder as they fade. We find that, on average, the {GC} specific frequency is a factor {\textasciitilde}3 larger for S0s than for spirals, which can be interpreted as meaning that passively-evolving S0s have faded by about a factor of 3 from their spiral progenitors. This value fits remarkably well with the predictions of stellar population synthesis calculations, and the offset between the S0 and spiral Tully-Fisher relations. We also find that the global colours of S0 galaxies are strongly correlated with their {GC} specific frequencies: the redder the stellar population of an S0, the larger its specific frequency, as we might expect if we are catching different S0s at different stages of passively fading and reddening. Comparison to the predictions of stellar population synthesis models show that this explanation works quantitatively as well as qualitatively. These tests strongly support the hypothesis that S0 galaxies were once normal spirals, whose star formation was cut off, presumably due to a change of environment.},         number = {1},         urldate = {2014-02-21},         journal = {{A\&A}},         author = {Aragon-Salamanca, A. and Bedregal, A. G. and Merrifield, M. R.},         month = oct,         year = {2006},         note = {{arXiv:astro-ph/0607645}},         keywords = {Astrophysics},         pages = {101--105},         file = {arXiv.org Snapshot:C:\Users\User\AppData\Roaming\Zotero\Zotero\Profiles\1lsc8c6m.default\zotero\storage\EGF2HBU9\0607645.html:text/html;astro-ph/0607645 PDF:C:\Users\User\AppData\Roaming\Zotero\Zotero\Profiles\1lsc8c6m.default\zotero\storage\SDKMTE4D\Aragon-Salamanca et al. - 2006 - Measuring the fading of S0 galaxies using globular.pdf:application/pdf}     }          @article{zou_sky_2010,         title = {The sky brightness and transparency in i-band at Dome A, Antarctica},         url = {http://arxiv.org/abs/1001.4951},         abstract = {The i-band observing conditions at Dome A on the Antarctic plateau have been investigated using data acquired during 2008 with the Chinese Small Telescope {ARray.} The sky brightness, variations in atmospheric transparency, cloud cover, and the presence of aurorae are obtained from these images. The median sky brightness of moonless clear nights is 20.5 mag arcsec{\textasciicircum}\{-2\} in the {SDSS} \$i\$ band at the South Celestial Pole (which includes a contribution of about 0.06 mag from diffuse Galactic light). The median over all Moon phases in the Antarctic winter is about 19.8 mag arcsec{\textasciicircum}\{-2\}. There were no thick clouds in 2008. We model contributions of the Sun and the Moon to the sky background to obtain the relationship between the sky brightness and transparency. Aurorae are identified by comparing the observed sky brightness to the sky brightness expected from this model. About 2\% of the images are affected by relatively strong aurorae.},         urldate = {2014-03-27},         journal = {{arXiv:1001.4951} [astro-ph]},         author = {Zou, Hu and Zhou, Xu and Jiang, Zhaoji and Ashley, M. C. B. and Cui, Xiangqun and Feng, Longlong and Gong, Xuefei and Hu, Jingyao and Kulesa, C. A. and Lawrence, J. S. and Liu, Genrong and Luong-Van, D. M. and Ma, Jun and Moore, A. M. and Qin, Weijia and Shang, Zhaohui and Storey, J. W. V. and Sun, Bo and Travouillon, T. and Walker, C. K. and Wang, Jiali and Wang, Lifan and Wu, Jianghua and Wu, Zhenyu and Xia, Lirong and Yan, Jun and Yang, Ji and Yang, Huigen and Yao, Yongqiang and Yuan, Xiangyan and York, D. and Zhang, Zhanhai and Zhu, Zhenxi},         month = jan,         year = {2010},         keywords = {Astrophysics - Instrumentation and Methods for Astrophysics},         file = {1001.4951 PDF:C:\Users\User\AppData\Roaming\Zotero\Zotero\Profiles\1lsc8c6m.default\zotero\storage\ZPP55GBQ\Zou et al. - 2010 - The sky brightness and transparency in i-band at D.pdf:application/pdf;arXiv.org Snapshot:C:\Users\User\AppData\Roaming\Zotero\Zotero\Profiles\1lsc8c6m.default\zotero\storage\4NKTSGT6\1001.html:text/html}     }          @article{pohlen_outer_2002,         title = {Outer edges of face-on spiral galaxies. Deep optical imaging of {NGC} 5923, {UGC} 9837 and {NGC} 5434},         volume = {392},         issn = {0004-6361},         url = {http://adsabs.harvard.edu/abs/2002A%26A...392..807P},         doi = {10.1051/0004-6361:20020994},         abstract = {We present deep optical imaging of three face-on disk galaxies together      with a detailed description of the reduction and calibration methods     used, in order to measure the intrinsic shape of their outer stellar     edges. Whereas it is now well accepted that disks of spiral galaxies are     not infinite exponential beyond galactocentric distances of about 3-5     radial scalelengths, the genuine structure of the truncation region is     not yet well known. Our data quantitatively establish a smooth     truncation behaviour of the radial surface brightness profiles and is     best described by a two-slope model, characterised by an inner and outer     exponential scalelength separated at a relatively well defined break     radius. This result disagrees with the frequently assumed sharply     truncated nature of the radial surface brightness profiles and implies     the presence of stars and even star-formation beyond the break radius.     In addition, we do not find a strong influence of a nearby companion on     the ratio of the break radius to the radial scalelength. Our results     denote new observational constraints for the search of the physical     explanation for these smooth disk truncations. Based on observations     obtained at the German-Spanish Astronomical Center ({DSAZ)}, Calar Alto,     jointly operated by the Max-Planck-Institut f{\"u}r Astronomie     Heidelberg and the Spanish National Commission for Astronomy.},         urldate = {2014-02-26},         journal = {{A\&A}},         author = {Pohlen, M. and Dettmar, R.-J. and L{\"u}tticke, R. and Aronica, G.},         month = sep,         year = {2002},         keywords = {galaxies: fundamental parameters, galaxies: individual: {NGC} 5923, galaxies: spiral, galaxies: structure, {NGC} 5434, {UGC} 9837},         pages = {807--816},         file = {NASA/ADS Full Text PDF:C:\Users\User\AppData\Roaming\Zotero\Zotero\Profiles\1lsc8c6m.default\zotero\storage\2VQC2SMP\Pohlen et al. - 2002 - Outer edges of face-on spiral galaxies. Deep optic.pdf:application/pdf}     }


title: \input problem 'missing $' 'extra }'

text: I'm writing my thesis and I'm stuck on a problem                \usepackage[latin1]{inputenc}      \usepackage[brazil]{babel}           \input{./inc/Intro/intro.tex}      When compiling I get tons of "Missing $", "Missing {", "Extra }"   If I insert my text manually it works The funny thing I just noticed is that the compiler acuses error in the main file(TCC.tex), not in the one I'm trying to input. But the lines that have "errors" are equivalent to the ones in intro.tex file               E: /Users/Rafael/Dropbox/Poli/13 Semestre/TCC/Relatório/Latex/modelo_poli/TCC.tex:3 Missing $ inserted ...ventualmente, suprir uma carência tecnoló     E: /Users/Rafael/Dropbox/Poli/13 Semestre/TCC/Relatório/Latex/modelo_poli/TCC.tex:3 Extra }, or forgotten $ ...ventualmente, suprir uma carência tecnoló     E: /Users/Rafael/Dropbox/Poli/13 Semestre/TCC/Relatório/Latex/modelo_poli/TCC.tex:4 Missing $ inserted     E: /Users/Rafael/Dropbox/Poli/13 Semestre/TCC/Relatório/Latex/modelo_poli/TCC.tex:5 Missing $ inserted ... do projeto, nosso objetivo é ter o protó     E: /Users/Rafael/Dropbox/Poli/13 Semestre/TCC/Relatório/Latex/modelo_poli/TCC.tex:5 Extra }, or forgotten $ ... do projeto, nosso objetivo é ter o protó      There is another question very similar to mine at: tabular, siunitx and input - `Extra }, or forgotten $.` But I couldn't really bring this to my problem. I also don't understand what the solution of "using an additional column" is exactly I also found this topic: “Missing $ inserted” in included .tex file via \input And indeed the encoding of the files was different but now I set both to UTF-8... Thanks!


title: Autofit table column with booktabs

text: ## Background Using `booktabs` produces the top table in the following image: ![enter image description here](http://i.stack.imgur.com/2Hxtm.png) Both tables reside in floats, but even when outside of the float the same result is produced. The **Application** and **Version** columns are too wide. LyX seems to generate the following LaTeX code:               \begin{tabular}{>{\raggedright}p{4.5cm}>{\raggedright}p{4.5cm}>{\raggedright}p{4.5cm}l}      The preamble is straightforward:               \hypersetup{         colorlinks=false,         pdfborder={0 0 0},     }          \usepackage{flafter}     \usepackage{colortbl}     \usepackage{booktabs}      The commands `\toprule()` and `\\\\\midrule %` and `\\\\\bottomrule %` are applied directly to the table. ## Questions   1. Without hand-massaging each table, how can the columns be made to auto-fit? (I could not find how to control column width in the `booktabs` documentation.)   2. How can the top-, mid-, and bottom-rules be applied across all tables in the document, automatically? Thank you!


title: LaTeX \newenvironment with nested braces

text: I'm making a beamer presentation and I wanted to show terminal commands in a terminal-styled box. I've created what I want using tkiz but now I have some trouble defining it as a new environment due to what I think is the preprocessor mismatching braces. Here is the block I want to turn into an environment.               % Define box and box title style     \tikzstyle{terminal} = [draw=white, text=white, font=courier, fill=black, very thick,         rectangle, inner sep=10pt, inner ysep=20pt]     \tikzstyle{terminalTitle} =[fill=black, text=white, draw=white]              \begin{tikzpicture}         \node [terminal] (box){      % 1: this         \begin{minipage}{0.90\textwidth}         \begin{lstlisting}         $ python -c " print 'x'*80 + '\x01' " | ./test1         Enter password:         You win!         $         \end{lstlisting}         \end{minipage}         };                           % 2: matches this         \node[terminalTitle, rounded corners, right=10pt] at (box.north west) {\texttt{tty1: /bin/bash}};         \end{tikzpicture}      Here is the result: ![enter image description here](http://i.stack.imgur.com/eNbR1.png) But when I try to make it into a new environment, the pre-processor matches brace #2 and throws errors. I tried using the package environ like so:               \NewEnviron{terminal}{     \tikzstyle{terminal} = [draw=white, text=white, font=courier, fill=black, very thick,         rectangle, inner sep=10pt, inner ysep=20pt]     \tikzstyle{terminalTitle} =[fill=black, text=white, font=\ttfamily, draw=white]          \begin{tikzpicture}     \node [terminal] (box){%         \begin{minipage}{0.90\textwidth}     \begin{lstlisting}     \BODY     \end{lstlisting}         \end{minipage}     };     \node[terminalTitle, rounded corners, right=10pt] at (box.north west) {tty: /bin/bash}};     \end{tikzpicture}%     }      But I still get errors. Is there a way to escape the nested braces in this environ? Also here is the preamble:               \documentclass{article}          \usepackage{tikz}     \usepackage{listings}     \usepackage{lipsum}     \usepackage{courier}     \usepackage{environ}          \usetikzlibrary{shapes}          \lstset{basicstyle=\ttfamily,breaklines=true}


title: Package pdfpages interrupts customization with enumitem

text: I have a longer work and in that I want include a pdf-file and also I have customize enumerate-items with package `enumitem`. With inculded package `pdfpages` I get errors. Is it possible to include `pdfpages` and to keep my customization with enumitem? Minimal working example below.               \documentclass{scrreprt}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}          \usepackage{enumitem}          % um PDF-Dateien einbinden zu können ---------------------------------------------------------------     \usepackage{pdfpages}          % Tabellen -----------------------------------------------------------------------------------------     \usepackage{booktabs}                   % horizontale Linien in Tabellen     \usepackage{longtable}                  % lange Tabellen     \usepackage{ragged2e,array}             % für Ausrichtung der Tabellen(-spalten/-zellen)          % Programmierung der Auflistung der Interviewitems -------------------------------------------------     \newcounter{Kategorie}     \setcounter{Kategorie}{0}     \newcounter{Frage}     \setcounter{Frage}{1}          \newcommand{\KategoriePlus}{%       \addtocounter{Kategorie}{1}%       [\Alph{Kategorie}]%       \setcounter{Frage}{1}%     }          \newcommand{\FragePlus}{%       \theFrage%       \addtocounter{Frage}{1}%     }          \usepackage{blindtext}          \begin{document}          \chapter{Einleitung}          \blindtext[3]          \chapter{Anhang}          \renewcommand{\arraystretch}{2}     \begin{longtable}[l]{>{\RaggedRight}p{5.75cm}>{\RaggedRight}p{10.25cm}} \toprule          Inhalt & Frage \\ \midrule     \multicolumn{2}{l}{\begin{minipage}[t]{16cm}     \bfseries \begin{enumerate}[label=\KategoriePlus] \item Allgemeine Daten \end{enumerate} \end{minipage}} \\     Soziodemografische Daten der Versuchsperson &     \begin{minipage}[t]{10cm} \begin{enumerate}[label=\Alph{Kategorie}.\FragePlus]     \item Alter     \item Geschlecht     \item Schulabschluss     \end{enumerate} \end{minipage} \\ \bottomrule          \end{longtable}          \end{document}


title: Presentation doesn't automatically start in fullscreen and shows a flickering?

text: I wrote my thesis presentation using beamer package. In the below code you can see the full preamble. I think there is something wrong with it: it doesn't start in **fullscreen mode** automatically and when I use PDF Exchange Viewer (my favorite viewer) there is a **flickering** when changing the frame. Is there something I can do to "enable" the presentation mode?               \documentclass{beamer}          % packages     \usepackage[italian]{babel}     \usepackage[utf8]{inputenc}     \usepackage{graphics}     \usepackage{hyperref}     \usepackage{fancybox}     \usepackage{verbatim}     \usepackage{textpos}          % settings     \usetheme{Warsaw}     \graphicspath{{./images/}}          % titlepage     % ...          % document includes     \begin{document}         % ...     \end{document}


title: appendix package: making appendix subsections

text: The problem with the code below is, it treats the Safety section as its own independent section. So in the table of contents, I've got 'Appendices' and 'Safety' as separate sections. I want Safety to look like a subsection of the 'Appendices' section. Also, how do I rename 'Appendices' to 'Appendix'? It just looks better. Is it through a `\renewcommand`?               \documentclass[a4paper,12pt]{scrartcl}     \usepackage{tocbibind}     \usepackage[toc,page]{appendix}          \begin{document}         \section{Introduction}       this is my introduction     \appendix     \appendixpage     \section{Safety}     \end{document}


title: Underlining Text in tikz

text: I have drawn a picture using tikz the code of which is shown below:               \begin{tikzpicture}        \draw [rounded corners=10pt] (0,0) rectangle (4,2);                \draw (-3,1) -- (0,1) node [near start, above]{incoming communication};         \draw (2,3) -- (2,2) node [near start,left]{ input};         \draw (2,-1.5) -- (2,0) node [midway, left] {subroutine output};         \draw (1, 1.3) -- (3.5, 1.3) node [midway, above] {identity};         \draw (1, 0.5) -- (3.5, 0.5) node [midway, above] {sec. param.};     \end{tikzpicture}      the output is like this:   ![alt text](http://i.stack.imgur.com/L4CpH.png) Is it possible that the text inside the rectangle be underlined and the line to be as long as the text (like a simple underlined text)? Is it possible to have each line leading to the rectangle to be like a negative (photo film). I can imagine that some rectangles of thick borders which are set aside each other can do the job of the negative. is there any possibility of scaling a picture of negative and using the pattern for a line? or I must draw those rectangles and have them glued together? :D


title: Preview package cutting off top of content

text: When the `preview` package is loaded, the `tikzpicture/figure` environment that I am trying to isolate becomes set too high, resulting in the top of the image being cut off. (This is similar behavior to the "Side Question" part of Code to ignore all of document except for list environments and sections, so I don't believe it to be directly related to the `tikzpicture` or `figure` environments, nor the `floats` option.) However, when I load the `preview` package with the `tightpage` option, everything comes out fine (so long as I have made the `papersize` big enough using `geometry` beforehand, as has been mentioned in this answer). I'd like to be able to have all figures on a common page size, however, so `tightpage` isn't really what I'm after in this case. **What causes`preview` to incorrectly place the content and effectively trim off the top?** * * * `preview` version 11.87, dated 2010/02/14 * * * ### MWE:               \documentclass[]{article}          \usepackage[a3paper,landscape]{geometry} % Make paper super big, fixes tightpage option cutting off right of image          % This works okay now with tightpage option set once papersize is made bigger     %\usepackage[active,floats,delayed,tightpage,pdftex]{preview}           % Without tightpage, this form still cuts off the *top* of the image     \usepackage[active,floats,delayed,pdftex]{preview}           % Define a few styles for use in making the figures     \usepackage{tikz}     \usetikzlibrary{shadows,arrows,positioning}          \tikzstyle{block}=[         draw, fill=blue!80!black!20,         anchor=north,         text width=13.0em, text centered,         minimum height=1.5em,drop shadow]     \tikzstyle{flowline}=[         draw, very thick,         color=black, -latex,         font=\tt]          \begin{document}     \begin{figure}     \centering     \begin{tikzpicture}[]     % Nodes     \path             node  (p1)    [block] {Flowchart Block Text};     \path (p1.south)+(0,-1.5) node  (p2)    [block] {Flowchart Block Text};     \path (p2.south)+(0,-1.5) node  (p3)    [block] {Flowchart Block Text};     \path (p3.south)+(0,-1.5) node  (p4)    [block] {Flowchart Block Text};          % Connectors     \path   [flowline]  (p1.south) -- node [right,align=left] {Flow Label} (p2);     \path   [flowline]  (p2.south) -- node [right] {Flow Label} (p3);     \path   [flowline]  (p3.south) -- node [right] {Flow Label} (p4);          % Alternate Start     \node (p1alt) [block,left=of p1,text width=10em] {Flowchart Block Text};     \path   [flowline, dashed]  (p1alt.south) |- node {} (p2.west);          % Optional Output     \node (next) [block,right=of p4,text width=10em] {Flowchart Block Text};     \path   [flowline, dashed]  (p4.east) -- node {} (next.west);     \end{tikzpicture}%     \label{workflow}%     \end{figure}%     \end{document}


title: KDE Template Header not displaying

text: The KDE template won't display the .png image file. I haven't changed anything from the stock settings. I wanted to give the template a whirl, but all I see is a label called oxygen-header for a space where the image file should be. What do you guys think is the issue?


title: Description list using package enumitem: how to force lowercase small caps and align body text?

text: I'm trying to format a description list with small caps for the labels and have the body text a standard distance from the left margin. When I use capitals in the labels (in the real list they are abbreviations and acronyms) and try to force lowercase and then small caps, I only get the first letter in small caps. Also, the "leftmargin" option seems only to apply if there is a second line (i.e., like a hanging indent). I'd like all the body text to be indented the same amount from the left margin, regardless of the size of the label.               \documentclass[11pt]{memoir}        \usepackage{enumitem}             \begin{document}             \begin{description}[leftmargin=4cm,font=\normalfont\scshape\MakeLowercase]           \item[FIRST] My definition here           \item[NEXT] and another one           \item[AFTER] This is the third        \end{description}             \end{document}


title: \show with fewer lines?

text: I am writing some macros for general debugging purposes (See Yiannis' question). I am basically expanding a given input step by step, and printing the result to the terminal and log. In order for this to happen step by step, I am using `\show`, which interrupts TeX and gives the user the opportunity to follow what is going on. However, `\show` is quite verbose: at least six lines, most of which are useless. Can this number be reduced? (I don't mind dropping `\show` for a better alternative.) Namely,               \documentclass{minimal}     \begin{document}     \errorcontextlines=-1\relax % attempt to have less lines     \def\deeper{\show\deepest...}     \def\deep{A \deeper macro}     \deep     \end{document}      writes the following to the terminal:               > \deepest=undefined.     \deeper ->\show \deepest                               ...     l.6     \deep          ?


title: Error in arrow symbols.

text: My LaTeX installation, and many others on the internet seem to be typesetting arrows with thick bits in them, and it looks like a hypen or something has been overlayed over them. Does anyone have a solution---this isn't a problem on inkjets, it all just smudges together but it looks ugly on `PDF` viewers and nice laser printers.


title: Tikz node: color change when the mouse is hovering

text: Is it possible to get a change of Tikz node colors when the mouse is hovering on it? Thanks in advance!


title: Extraneous entry in bibliography (biblatex)

text: here an image of my bibliography. ![enter image description here](http://i.stack.imgur.com/51HAf.png) As per the image, LaTeX makes an extra entry in my bibliography. Note that I do not have this references in my `references.bib`, nor do I have any references labelled 1 in the text itself. Here's my preamble, if it helps:               \documentclass[a4paper,12pt,twoside,openright,notitlepage]{report}          \usepackage[UKenglish]{babel}     \usepackage[style=numeric]{biblatex}     \usepackage[printonlyused]{acronym}     \usepackage{setspace}     \usepackage{fullpage}     \usepackage{float}     \usepackage{graphicx}     \usepackage{subfig}     \usepackage{array}     \usepackage{amssymb}     \usepackage{gensymb}     \usepackage{listings}     \usepackage{xspace}     \usepackage{datetime}     \usepackage{url}     \usepackage{color}     \settimeformat{hhmmsstime}     \doublespacing     \raggedbottom     \addbibresource{references.bib}     \makeatletter     \newcommand\ackname{Acknowledgements}     \if@titlepage       \newenvironment{acknowledgements}{%           \titlepage           \null\vfil           \@beginparpenalty\@lowpenalty           \begin{center}%             \bfseries \ackname             \@endparpenalty\@M           \end{center}}%          {\par\vfil\null\endtitlepage}     \else       \newenvironment{acknowledgements}{%           \if@twocolumn             \section*{\abstractname}%           \else             \small             \begin{center}%               {\bfseries \ackname\vspace{-.5em}\vspace{\z@}}%             \end{center}%             \quotation           \fi}           {\if@twocolumn\else\endquotation\fi}     \fi     \makeatother          \renewcommand{\thefootnote}{\alph{footnote}}          \newcolumntype{L}{>{\centering\arraybackslash}m{0.5\textwidth}}          \newcommand{\latex}{\LaTeX\xspace}     \newcommand{\tex}{\TeX\xspace}          \lstset{     numbers=left,      numberstyle=\small,      numbersep=8pt,      frame = single,      language=R,      framexleftmargin=15pt}      Here's an example of an entry in my `references.bib`               @online{QuickR,     author = {Robert I. Kabacoff},     title = {About Quick-R},     year = {2012},     url = {http://www.statmethods.net/},     }               @online{StackOverflow,     author = {Stack Exchange Inc},     title = {Welcome to Stack Overflow},     year = {2014},     url = {http://stackoverflow.com/about},     }      Edit: file can be found here: https://www.sharelatex.com/project/52da502aa5d18bc436000021


title: Unexplained Gap?

text: I'm trying to make a resume CV document, using a various packages for certain things. I'm not sure if I'm not noticing a conflict in these packages, or I'm being stupid when or comes to margins or tables, but I can't get rid of this infuriating gap! Here you can see an example of the document. Here is the code:               \documentclass[a4paper,11pt]{article}          %Packages          \usepackage[a4paper, margin={2.5cm,0cm}]{geometry} %To make it printable     \usepackage{kantlipsum} %For verbose garbage     \usepackage{enumitem} %For the enumerated lists     \usepackage[letterspace=100]{microtype} %For letter spacing     \usepackage[small,compact]{titlesec} %For customising section headings     \usepackage{color}          %Preamble          \pagestyle{empty}     \linespread{1.2} %increasing line spacing     \titleformat{\part}[display]{\rmfamily \centering \Huge \sc \lsstyle}{}{}{}[]     \titlespacing{\part}{0pt}{0pt}{0pt}{}     \titleformat{\section}[display]{\rmfamily \Large \sc \lsstyle}{}{}{}[\color{grey}{\titlerule}\vspace{1ex}]     \definecolor{grey}{gray}{0.7}      \renewcommand*{\familydefault}{\sfdefault}     \newenvironment{coverletter}{\newgeometry{margin=5cm} \rmfamily}{\restoregeometry \newpage}          \begin{document}          \begin{coverletter}          Dear Sir or Madam,     \\     Here goes a cover letter.     \\          \begin{flushright}     Kind Regards,     \end{flushright}           \end{coverletter}          %Name title          \part*{kant}     \begin{center}     Address     \\     Email     \end{center}          %Profile          \section*{Profile}     \noindent     \kant[2]          %Education          \section*{Qualifications}          \begin{flushright}     \begin{tabular}{@{}rp{0.75\textwidth}@{}}     Kant &\kant[1]      \\      \end{tabular}     \end{flushright}          %Work Experience          \section*{Experience}          \begin{flushright}     \begin{tabular}{@{}rp{0.75\textwidth}@{}}     Kant &\kant[1]      \\      \end{tabular}     \end{flushright}          %Skills          \section*{Key Skills}     \kant          \end{document}


title: How to more easily generate a normalized eigenvalue spectrum?

text: I'm trying to generate a normalized eigenvalue spectrum like this one: ![enter image description here](http://i.stack.imgur.com/zAJMM.png) In the above example, the normalized eigenvalues are like the following:               0.8332     0.0433     0.0310     0.0152     0.0061     0.0047     0.0035     0.0022     0.0018     0.0014     0.0013     0.0011     0.0010     0.0008     0.0007     ...      and more small ones      The accumulated eigenvalues are:               0.8332     0.8765     0.9074     0.9227     0.9287     0.9334     0.9369     0.9392     0.9410     0.9424     0.9437     0.9448     0.9458     0.9467     0.9474     ... and more     1      The above spectra is generated by the following (with accumulated eigenvalues):               \begin{tikzpicture}[scale=10]              \draw[ xstep=.1, ystep=0.1]  (0,0) grid (1,0.1);              \fill [red!50]               ( 0,0.008)      rectangle ( 0.8332,0.1);         \fill [purple!60]            ( 0.8332,0.008) rectangle ( 0.8765,0.1);         \fill [blue!70]              ( 0.8765,0.008) rectangle ( 0.9074,0.1);         \fill [green]             ( 0.9074,0.008) rectangle ( 0.9227,0.1);         \fill [orange]            ( 0.9227,0.008) rectangle ( 0.9287,0.1);         \fill [purple!!50!!red]   ( 0.9287,0.008) rectangle ( 0.9334,0.1);         \fill [yellow]            ( 0.9334,0.008) rectangle ( 0.9369,0.1);         \fill [purple!!50!!green] ( 0.9369,0.008) rectangle ( 0.9392,0.1);         \fill [lime]              ( 0.9392,0.008) rectangle ( 0.9410,0.1);         \fill [teal]              ( 0.9410,0.008) rectangle ( 0.9424,0.1);         \fill [teal!!20!!white]   ( 0.9424,0.008) rectangle ( 0.9437, 0.1);              %\fill [gray]              ( 0.9437,0.008) rectangle ( 1, 0.1);              \fill  [teal!!20!!white]   (0.9437,0.008) rectangle ( 0.9448,0.1);         \fill  [gray]              (0.9448,0.008) rectangle ( 0.9458,0.1);         \fill  [red]               (0.9458,0.008) rectangle ( 0.9467,0.1);         \fill  [purple]            (0.9467,0.008) rectangle ( 0.9474,0.1);         \fill  [blue]              (0.9474,0.008) rectangle ( 0.9480,0.1);         % and more ...                      \draw[|<->|] (0,0.032) -- node [left, fill=red!50] {0.84} (0.5,0.032)  -- (0.8332,0.032);         \draw[|<->|] (0,0.055) -- node [fill=red!50] {0.88} (0.7, 0.055) -- (0.8765,0.055);         \draw[|<->|] (0,0.078) -- node [right, fill=red!50] {0.91} (0.9, 0.078) -- (0.9074,0.078);          \end{tikzpicture}      In the above I just choose colours manually, and copy-paste colours in `visual block` in `Vim`.   1. Here I'm wondering, how can I assign colours automatically? And then maybe I can draw the above in a `for` loop.   2. Is there a better way than drawing rectangles ? **EDIT. July 8 2013** The following colors seem OK for generating eigenvalue spectrum. Welcome suggestions and modifications on the color list.               \begin{filecontents}{eigenvaluesA}     % 20 value-color pairs     Values Colors     0.0500    red!50     0.1000    purple!60     0.1500    blue!70     0.2000    green     0.2500    orange     0.3000    purple!!50!!red     0.3500    yellow     0.4000    purple!!50!!green     0.4500    lime     0.5000    teal     0.5500    blue     0.6000    purple!!50!!red     0.6500    yellow     0.7000    purple!!50!!green     0.7500    lime     0.8000    teal     0.8500    yellow!!20!!white     0.9000    blue     0.9500    red     1.0000    green     \end{filecontents}      ![enter image description here](http://i.stack.imgur.com/gILjK.png)


title: Source with range of years

text: Some of my references are annual publications of which I'm using multiple editions. I cannot figure out, however, how to cite them with only 1 reference entry. In the text it should look something like this: **(IEA 1996-2012)** And in the References: **IEA 1996-2012. Energy Balances of non-OECD Countries, Paris.** BibTex does not seem to accept year-ranges in the year field... Any help is highly appreciated!


title: Memoir oneside/twoside question

text: I have a `memoir`-class document:               \documentclass[oneside,letterpaper]{memoir}      which I set to `oneside` or `twoside` depending on if I want to create either an electronic copy (one side) or printable copy (two side). I have three questions:   1. Is it possible to have it (TeXnicCenter in this case) create two PDF versions when I build (both onesided and twosided) automatically, with different file names?   2. There is a blank page I need to add only when in `twoside` mode, not `oneside`. How can I integrate that with the above question?   3. If I can't do the two-versions-on-build, how can I do in "if-then" that checks if it's set to `oneside` or `twoside` mode? i.e.              if(twoside) then         add blank page;     end


title: Text does not fit into table which causes bad box errors

text: I use Excel2Latex to convert tables in Excel to Latex, however a problem arises when the text is too long to fit in the column and I get many bad box errors. My code is:               % Table generated by Excel2LaTeX from sheet 'Sheet1'     \begin{table}[htbp]       \centering       \caption{Add caption}         \begin{tabular}{rr}         \toprule         \multicolumn{1}{c}{\textbf{Variable}} & \multicolumn{1}{c}{\textbf{Description}} \\         \midrule         \multicolumn{1}{l}{\textit{W\_hours}} & \multicolumn{1}{l}{The average number of hours worked each week by the respondent} \\         \multicolumn{1}{l}{\textit{W\_hours\_dummy}} & \multicolumn{1}{l}{A dummy variable that takes the value of unity if the respondent works more than 0 hours each week, and zero otherwise} \\         \multicolumn{1}{l}{\textit{W\_age}} & \multicolumn{1}{l}{The age (in years) of the woman} \\         \multicolumn{1}{l}{\textit{W\_educ}} & \multicolumn{1}{l}{The number of years of formal education of the woman} \\         \multicolumn{1}{l}{\textit{W\_exper}} & \multicolumn{1}{l}{The woman's work experience (in years)} \\         \multicolumn{1}{l}{\textit{Hus\_age}} & \multicolumn{1}{l}{The age (in years) of the woman's husband} \\         \multicolumn{1}{l}{\textit{Hus\_educ}} & \multicolumn{1}{l}{The number of years of formal education of the woman's husband} \\         \multicolumn{1}{l}{\textit{Hus\_inc}} & \multicolumn{1}{l}{The annual income (in \$'000s) of the woman's husband} \\         \multicolumn{1}{l}{\textit{faminc}} & \multicolumn{1}{l}{The annual income (in \$'000s) of the family unit} \\         \multicolumn{1}{l}{\textit{kids05}} & \multicolumn{1}{l}{The number of children under the age of 6} \\         \multicolumn{1}{l}{\textit{kids618}} & \multicolumn{1}{l}{The number of children aged between 6 and 18} \\         \multicolumn{1}{l}{\textit{largecity}} & \multicolumn{1}{l}{A dummy variable that takes the value of unity if the woman lives in a large city, and zero otherwise} \\         \multicolumn{1}{l}{\textit{W\_mothereduc}} & \multicolumn{1}{l}{The number of years of formal education of the woman's mother} \\         \multicolumn{1}{l}{\textit{W\_fathereduc}} & \multicolumn{1}{l}{The number of years of education of the woman's father} \\         \multicolumn{1}{l}{\textit{W\_motherworked}} & \multicolumn{1}{l}{A dummy variable that takes the value of unity if the woman's mother was herself a working mum, and zero otherwise} \\         \multicolumn{1}{l}{\textit{Hus\_mothereduc}} & \multicolumn{1}{l}{The number of years of formal education of the woman's husband's mother} \\         \multicolumn{1}{l}{\textit{Hus\_fathereduc}} & \multicolumn{1}{l}{The numbger of years education of the woman's husband's father} \\         \multicolumn{1}{l}{\textit{Hus\_motherworked}} & \multicolumn{1}{l}{A dummy variable that takes the value of unity if the woman's husband's mother was herself a working mum, and zero otherwise} \\         \bottomrule         \end{tabular}%       \label{tab:addlabel}%     \end{table}%      The resulting table produced looks like: ![table](http://i.stack.imgur.com/GwJWK.jpg) What are some solutions to this?


title: Ledpar: Does the function "ledgroup" work with ledpar

text: Setting a critical editions of (Greek) fragments with facing translations works fine with `ledmac` and `ledpar`. Even the critical apparatuses (up to 3) are there (at the bottom of the page). Now I have to set a bundle of fragments with the apparatuses (?) right beneath the concerning fragment, then followed by the next fragment/apparatuses and so on. With `ledmac` (without facing translations) one can use `minipage`/`ledgroup` which - again - works fine. But I (or `ledpar` - I don't hope so) am not able to use `\begin{ledgroup} ... \end{ledgroup}` in my parallel version. Here a minimum example:               \documentclass{scrbook}     \usepackage{ledmac,ledpar}       \setcounter{firstlinenum}{1}         \setcounter{linenumincrement}{1}     \begin{document}          \begin{pages}     \begin{Leftside}     \beginnumbering     \pstart     \edtext{This is a sample text.}{\Afootnote{A secondary footnote}}      \pend          \endnumbering     \end{Leftside}          \begin{Rightside}          \beginnumbering          \pstart     On this page there is supposed to be the translation of the left page.     \pend          \endnumbering     \end{Rightside}          \Pages     \end{pages}          \end{document}      Has anyone some (or better lots of) experience with `ledpar` and an idea how this problem could be solved?


title: Beamer: Short section titles in Headline

text: I have a beamer template for a presentation. In this template, the headline shows the section name and the subsection to which the current slide belongs to. However, even if I have defined a short title as in               \section[Short title]{The very long title that surely is way too long}      the headline always shows the long title. Here is the code from the style file which shows the section name                   \pgftext[at=\pgfpoint{\beamer@headline@lmargin}{-0.55\beamer@headline@height},left,center]{%             \begin{beamercolorbox}[dp=0.5ex]{section in head/foot}                 \shadowtextline{\insertsection}             \end{beamercolorbox}         }      So my question: Is there any other command for \insertsection in order to show the short title? (I assume no, as googleing it I didn't really find anything). Additionally, does it matter if not all sections have short titles?


title: Tex-shell in AUCTeX

text: Whenever I compile a file in AUCTeX (e.g. `C-c` `C-c` and then choosing an option) , it creates a buffer `tex-shell` where I can see the output of the compilation command. Once the compilation finishes this shell buffer stays open. What is the right way to close it? Besides showing me the compilation output, what else can I use it for?


title: How to shorten the editor when the author is same as the editor?

text: In my bibliography, I have a case where the author of an `@Inbook` entry is the same as the editor of the book:               @Book{ducktales, Booktitle={Ducktales}, Editor = {Donald Duck}, Year = {2001}}          @Inbook{intro, Title={Introduction}, Crossref = {ducktales}, Author = {Donald Duck}, Pages = {1-10}}      The bibliography entry appears like this: > Donald Duck: Introduction. In: Ducktales (2001), Published by Donald Duck. However, if the author is the same as the editor, I'd like to have the editor replaced by author. So the entry should look like this: > Donald Duck: Introduction. In: Ducktales (2001), Published by author. How can I do that?


title: indenting under item

text: I'm trying to indent paragraphs after doing `\item`, for instance               \item {\bf Research Question} \\     \indent The purpose of this research is      However, \indent is not working when I'm using \item. Would there be a way to solve this?


title: I'm trying to use biblatex for citations but \cite returns key not value

text: I'm trying to use `biblatex` and I want to cite something but if I use `\cite{key}` or `\footcite{key}` the author and title is not printed but the key itself is printed. bibtex says there are no `\citation` commands TUDreport.tex               \documentclass[11pt, nochapterpage,bigchapter,linedtoc,longdoc,colorback,accentcolor=tud9b]{tudreport}          \usepackage[utf8]{inputenc}       \usepackage{ngerman}          \usepackage[stable]{footmisc}       \usepackage{longtable}       \usepackage{multirow}       \usepackage{booktabs}       \usepackage{graphicx}            \renewcommand{\thefigure}{\arabic{figure}}          \usepackage[backend=biber, style=authoryear, sorting=nyt]{biblatex}     \addbibresource{literatur.bib}               \begin{document}          Test\footcite{keyword}          \printbibliography       \end{document}      literatur.bib:               @BOOK{keyword,         title = {Werkzeugmaschinen Maschinenarten und Anwendungsbereiche},         publisher = {Springer Verlag},         year = {2005},         author = {M. Weck}       }      But instead of: > Test1 > > * * * > >   1. Weck(2005), Werkzeugmaschinen und .... > The Output is: > Test1 > > * * * > >   1. keyword >


title: Customizing the `\columnseprule` in a `\multicols` environment

text: In OpenOffice and LibreOffice, one can specify the height (depth?) of the column separator rule in a multi-column section. It can be e.g. 50% of the columns’ height. I would like to be able to do the same in LaTeX, with `multicol`. I came upon this question about changing the appearance of the column separator. I find this very interesting, but it is not quite what I am looking for. For one thing, I do not yet know enough plain TeX to adequately modify the provided solution for my needs. How can I achieve something like this:               text text text   text text text     text text text   text text text     text text text | text text text     text text text | text text text     text text text | text text text     text text text   text text text     text text text   text text text      Where, as in OO/LibO, the column separator does not span the full height of the columns? I’d like to go even further and be able to create fancier separators, for example:               text text text   text text text     text text text   text text text     text text text | text text text     text text text • text text text     text text text | text text text     text text text   text text text     text text text   text text text      or other similar patterns, with rules and symbols such as bullets. I am open to solutions based on environments other than `multicols`, but ideally it would be an environment that keeps the benefits of `multicols` and the possibility of changing width as in `adjmulticol`.


title: Changing circle to "-stealth"

text: I took an example from pgfplots               % Preamble: \pgfplotsset{width=7cm,compat=1.3}     % [See the TikZ manual if you’d like to learn about nodes and pins]      \begin{tikzpicture}       \tikzset{          every pin/.style={fill=yellow!50!white,rectangle,rounded corners=3pt,font=\tiny},          small dot/.style={fill=black,circle,scale=0.3}       }       \begin{axis}[                   clip=false,                   title=How \texttt{axis description cs} works       ]       \addplot {x};       \node[small dot,pin=120:{$(0,0)$}] at (axis description cs:0,0) {};       \node[small dot,pin=-30:{$(1,1)$}] at (axis description cs:1,1) {};       \node[small dot,pin=-90:{$(1.03,0.5)$}] at (axis description cs:1.03,0.5) {};       \node[small dot,pin=125:{$(0.5,0.5)$}] at (axis description cs:0.5,0.5) {};      \end{axis}     \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/00rH4.png) I would like to place an arrow (-stealth’) instead of a circle and to be able to control the thickness.


title: ntheorem and attributions without redefinining a theorem style

text: I'm using the theoremstyle marginbreak from the package ntheorem as follows:               \theoremstyle{marginbreak}     \theoremindent1cm     \newtheorem{teo}{Theorem}[chapter]      The problem is that when I want to specify a reference or an attribution as in               \begin{teo}[Pitagora]         $a^2+b^2=c^2$     \end{teo}      the text between square brackets is showed in a bold font. I've seen this answer: ntheorem and theoremname. But since I'm not comfortable with theoremstyles I'm not able to redefine the marginbreak style. On the other hand the following works:               \begin{teo}[\normalfont Pitagora]         $a^2+b^2=c^2$     \end{teo}      but of course writing everytime \normalfont is not a solution. If this was a command, instead of an envirovment, I would do something like this:               \renewcommand{\teo}[1]{\teo{\normalfont #1}}      But with environments I don't know how to do it. Any suggestions?


title: Inserting hindi text in between English paragraphs

text: I want to write some Hindi text along with English using LaTeX for eg: k=क, bollywood or (बॉलीवुड). I have used the below in the preamble but I'm getting the error command: > \G already defined.               \documentclass{report}     \usepackage{polyglossia}     \setdefaultlanguage{english}     \setotherlanguage{sanskrit}     \usepackage{xltxtra}     \usepackage{fontspec}     \setmainfont{Times New Roman}     \newfontfamily\devanagarifont[Script=Devanagari]{mangal.ttf}     \newfontfamily\devtransl[Script=Roman,Mapping=DevRom]{Times New Roman}