title: How to get longtable and bidi to work together?

text: I am typesetting a Hebrew document using bidi. The material in the longtable environment still comes out LTR. How do I make it work?               \documentclass{article}     \usepackage{longtable}     \usepackage[no-sscript]{xltxtra} % loads fixltx2e, metalogo, xunicode, fontspec          \setmainfont{FreeSans}     \usepackage[rldocument]{bidi}          \begin{document}     \begin{center}     \begin{longtable}{@{\extracolsep{\fill}}llr}     \hline     מילה עברית&English Words&123, 456\\     \hline     English Text&מילים בעברית&12 3456\\     \hline     1234 56.&More English&עוד עברית\\     \hline     \end{longtable}          מילה עברית English Words 123, 456\\     English Text מילים בעברית 12 3456\\     1234 56. More English עוד עברית\\          \end{center}     \end{document}      ![longtable doesn't seem to respect bidi](http://i.stack.imgur.com/E28oH.png) Here are the lines from the output which describe the software and package versions I'm using:               This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012)     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, uk     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     bidi package (Support for bidirectional typesetting in plain TeX and LaTeX)      Copyright © 2009–2012 Vafa Khalighi      v11.149, 2012/01/01


title: vertically center text in a table

text: I've got the following table:               \documentclass[11pt]{article}          \usepackage{rotating}          \usepackage[         lmargin=1.0in,         rmargin=1.0in,         tmargin=2.0cm,         bmargin=2.0cm     ]{geometry}          \usepackage{tabularx, booktabs}     \newcolumntype{Y}{>{\centering\arraybackslash}X}          \usepackage{multirow}          \begin{document}          \begin{table}         \centering         % table caption is to be above the table         \caption{Table title.}         \scalebox{0.65}{         \begin{tabularx}{1.5\textwidth}{ll *{10}{Y}}         \toprule           & & \multicolumn{10}{c}{aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}\\[2mm]           & & 0.1 & 0.2 & 0.3 & 0.4 & 0.5 & 0.6 & 0.7 & 0.8 & 0.9 & 1.0\\         \cmidrule[0.6pt]{3-12}             \parbox[t]{3mm}{\multirow{20}{*}{\rotatebox[origin=c]{90}{bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb}}}                 &\multirow{2}{*}{0.1}                 &40.14 & 29.7 & 23.58 & 19.57 & 16.75 & 14.67 & 13.05 & 11.77 & 10.73 & 9.86\\                 &                 &$(0\%)$ & $(5.18\%)$ & $(14.29\%)$ & $(24.2\%)$ & $(34.18\%)$ & $(44.0\%)$ & $(53.58\%)$ & $(62.89\%)$ & $(71.92\%)$ & $(80.68\%)$\\     \cmidrule{2-12}                 &\multirow{2}{*}{0.2}                 &41.93 & 28.24 & 21.01 & 16.67 & 13.81 & 11.79 & 10.3 & 9.14 & 8.23 & 7.49\\                 &                 &$(4.47\%)$ & $(0\%)$ & $(1.87\%)$ & $(5.8\%)$ & $(10.59\%)$ & $(15.78\%)$ & $(21.12\%)$ & $(26.52\%)$ & $(31.89\%)$ & $(37.21\%)$\\     \cmidrule{2-12}                 &\multirow{2}{*}{0.3}                 &44.58 & 28.74 & 20.63 & 15.92 & 12.92 & 10.86 & 9.36 & 8.24 & 7.36 & 6.66\\                 &                 & $(11.06\%)$ & $(1.78\%)$ & $(0\%)$ & $(1.03\%)$ & $(3.44\%)$ & $(6.6\%)$ & $(10.17\%)$ & $(13.99\%)$ & $(17.93\%)$ & $(21.93\%)$\\      \cmidrule{2-12}                 &\multirow{2}{*}{0.4}                 &47.1 & 29.74 & 20.84 & 15.76 & 12.57 & 10.43 & 8.91 & 7.77 & 6.9 & 6.21\\                 &                 & $(17.35\%)$ & $(5.31\%)$ & $(1.05\%)$ & $(0\%)$ & $(0.69\%)$ & $(2.42\%)$ & $(4.77\%)$ & $(7.52\%)$ & $(10.52\%)$ & $(13.67\%)$\\     \cmidrule{2-12}                 &\multirow{2}{*}{0.5}                 &49.41 & 30.93 & 21.34 & 15.88 & 12.49 & 10.24 & 8.66 & 7.5 & 6.61 & 5.92\\                 &                 & $(23.09\%)$ & $(9.52\%)$ & $(3.47\%)$ & $(0.74\%)$ & $(0\%)$ & $(0.52\%)$ & $(1.85\%)$ & $(3.73\%)$ & $(5.96\%)$ & $(8.43\%)$\\     \cmidrule{2-12}                 &\multirow{2}{*}{0.6}                 &51.51 & 32.2 & 22.01 & 16.17 & 12.56 & 10.18 & 8.53 & 7.34 & 6.43 & 5.73\\                 &                 & $(28.32\%)$ & $(14.05\%)$ & $(6.7\%)$ & $(2.58\%)$ & $(0.58\%)$ & $(0\%)$ & $(0.41\%)$ & $(1.49\%)$ & $(3.03\%)$ & $(4.9\%)$\\     \cmidrule{2-12}                 &\multirow{2}{*}{0.7}                 &53.43 & 33.52 & 22.79 & 16.58 & 12.74 & 10.23 & 8.5 & 7.25 & 6.32 & 5.6\\                 &                 & $(33.12\%)$ & $(18.72\%)$ & $(10.46\%)$ & $(5.2\%)$ & $(2.06\%)$ & $(0.47\%)$ & $(0\%)$ & $(0.33\%)$ & $(1.23\%)$ & $(2.54\%)$\\      \cmidrule{2-12}                 &\multirow{2}{*}{0.8}                 &55.21 & 34.85 & 23.64 & 17.08 & 13.02 & 10.36 & 8.53 & 7.23 & 6.26 & 5.52\\                 &                 & $(37.55\%)$ & $(23.43\%)$ & $(14.6\%)$ & $(8.39\%)$ & $(4.24\%)$ & $(1.7\%)$ & $(0.39\%)$ & $(0\%)$ & $(0.28\%)$ & $(1.04\%)$\\      \cmidrule{2-12}                 &\multirow{2}{*}{0.9}                 &56.86 & 36.18 & 24.55 & 17.66 & 13.36 & 10.55 & 8.62 & 7.25 & 6.24 & 5.47\\                 &                 & $(41.65\%)$ & $(28.13\%)$ & $(19.01\%)$ & $(12.04\%)$ & $(6.98\%)$ & $(3.56\%)$ & $(1.44\%)$ & $(0.34\%)$ & $(0\%)$ & $(0.23\%)$\\      \cmidrule{2-12}                   &\multirow{2}{*}{1.0}                 &58.39 & 37.5 & 25.49 & 18.29 & 13.76 & 10.79 & 8.76 & 7.32 & 6.26 & 5.46\\                 &                 & $(45.48\%)$ & $(32.79\%)$ & $(23.59\%)$ & $(16.05\%)$ & $(10.19\%)$ & $(5.94\%)$ & $(3.05\%)$ & $(1.25\%)$ & $(0.3\%)$ & $(0\%)$\\           \bottomrule           \end{tabularx}         } % endof \scalebox     \end{table}      this is what it produces ![LaTeX output](http://i.stack.imgur.com/FjYqO.png) The "issue" is that the vertical text (bbbbbb...) in the first column is centered according to the height of the entire table. I'd like to drag the text down a bit so as to get it centered according the the combined height of the rows 0.1 through 1.0 right to next to the first column. Would appreciate any help.


title: Does the \relax side-effect of \csname...\endcsname still have a use?

text: I find it annoying that using `\csname...\endcsname` will define `...` to be `\relax` if ... is undefined, and there is no improved primitive that does not have this side-effect, though there are partial workarounds (as previously asked in another question). I may be wrong, but I'm currently thinking that the only use of the `\relax` side-effect was for testing if a command was undefined before the days of e-TeX and `\ifdefined`. Obviously, we'll probably be stuck with this side- effect now as there will be lots of code that relies on it, but is anyone aware of any other uses for the side-effect? Might one day another primitive be introduced that doesn't have this side-effect? * * * Post-acceptance update: (Many thanks for all the answers and comments, I've learnt something from each and so I'm glad I asked this question!) Note that I've accepted Bruno's answer as he has been able to show me some good uses of the side-effect. If you're coming to this question late, you may find it clearer to read the answers in chronological order (David's, Joseph's then Bruno's). Also, I'm still interested in any other uses that you discover/remember/invent or if anyone can say with more certainty what the original intention was. Summary (with apologies if I'm doing a bad job, feel free to edit or remove):   * The overall feeling is that the side-effect is not a bad thing;   * David pointed out that the side-effect wasn't necessary to be able to have a pre-eTeX `\ifdefined` test;   * Joseph (and Frank) mentioned memory and performance issues, and showed that the side-effect was clearly an intentional design decision, though the reason for the decision isn't specified in the `tex.web` source;   * Bruno showed three very clever uses of the side-effect and further increased my excitement about LaTeX3!


title: mathpazo, mathdesign and kpfonts

text: is possible have the `\usepackage{mathpazo}` with `\usepackage[nomath,fulloldstylenums,fulloldstyle]{kpfonts}` but with the integrals symbols (`\int \oint` ecc) from the `\usepackage[utopia]{mathdesign}` and the `\ell` character from the `\usepackage[fulloldstylenums,fulloldstyle]{kpfonts}` ? ![](http://i.stack.imgur.com/zzywN.jpg) ## for me, the serifs of the `\int` from `\usepackage{mathpazo}` is not according to the kpfonts; or i'm wrong?               \documentclass[a4paper]{memoir}          \usepackage[T1]{fontenc}          \usepackage{mathpazo}          \usepackage[utopia]{mathdesign}          \usepackage[nomath,fulloldstylenums,fulloldstyle]{kpfonts}          \begin{document}     \begin{equation}     \int f(x)\, dx     \end{equation}     \end{document}


title: Listings not breaking up

text: I have a code listing as shown in the picture (number 4) that goes a bit out of the margin although breaklines=true. When I try to break new line it gives me an error `Listings Error: lstinline ended by EOL.` How can I break this up so that the arguments line up in a more elegant way like:                computeInitialValues(const Query& query,                           const std::vector<const Array*> &objects,                           std::vector< std::vector<unsigned char>> &values,                           bool &hasSolution)      ![enter image description here](http://i.stack.imgur.com/eRo0I.png) EDIT: Code sample:               \documentclass[a4paper,11pt,twoside]{report}     \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \usepackage[T1]{fontenc}     \usepackage{amsmath, graphicx, tikz, enumerate, amssymb, pgf}     \usepackage{fancyhdr}     \usepackage{setspace}     \usepackage{pgfplots}     \usepackage{slashbox}     \usepackage{bchart}     \usepackage{float}     \usepackage{caption}     \raggedbottom     \usepackage[bottom]{footmisc}          \usepackage{listings}     \usepackage{color}     \usepackage{textcomp}     \definecolor{dkgreen}{rgb}{0,0.6,0}     \definecolor{gray}{rgb}{0.5,0.5,0.5}     \definecolor{mauve}{rgb}{0.58,0,0.82}     \lstset{     %frame=tb,        language=C++,        aboveskip=3mm,        belowskip=3mm,        showstringspaces=false,        columns=flexible,        basicstyle=\ttfamily\footnotesize\bfseries,        numbers=none,        numberstyle=\tiny\color{gray},        commentstyle=\color{dkgreen},        breaklines=true,        breakatwhitespace=true,        tabsize=3     }     \begin{document}          \lstinline$bool computeInitialValues(const Query& query, const vector<const Array*>& objects, vector<vector<unsigned char>>& values, bool& hasSolution )$ computes the initial values for a list of objects.             \end{document}


title: Placing a figure inside a multirow table cell

text: Is it possible to place a figure within a multirow cell? The vertical alignment is ruined. Does it have to do anything with tikz's bounding boxes? The following mwe produces the following result ![](http://i.stack.imgur.com/hPtNL.png) ## Edit Clarification after Gonzalo Medina's answer. Why is it necessary to restrict the `width` of the figure? The figure is a box. Is it not possible to just fit this box in the merged cell? I have some figures that have to be rather big in order to be viewable. ## Edit 2 After G.M.'s comment I realized that `multirow` works only horizontally and not vertically. Unfortunately, I can't make the figures much smaller because they don't look nice. So I have to increase the height of the unmerged rows. Perhaps a work around would be to calculate the height of the *.pdf, divide it by the number of unmerged rows and use `\vphantom{}` on the unmerged cells to increase their height. Or some kind of a box. Probably increasing the `arraystretch` would work too if there are no rows without figures. Is there a more robust way to handle this sitution?               \documentclass[]{article}     \usepackage{amsmath}          \usepackage{graphicx}          \usepackage{booktabs}     \usepackage{multirow}     \usepackage{tabu}          \begin{document}     \begin{table}     \centering     \renewcommand{\arraystretch}{2}     \begin{tabu}{ccc}         \toprule         Sections & Axis & Imperfections\\         \midrule         \multirow{2}{*}{\includegraphics[width=3cm]{circular_hollow.pdf}} & $y-y$ & $\dfrac{L}{200}$ \\                                                                                & $z-z$ & $\dfrac{L}{150}$ \\         \bottomrule     \end{tabu}     \end{table}          \end{document}      `circular_hollow.pdf` is produced by the following file               \documentclass[a4paper,12pt,fleqn]{article}     \usepackage{graphicx}     \usepackage[usenames,dvipsnames,svgnames]{xcolor}       \usepackage{mathtools}          \usepackage{tkz-tab,tkz-euclide}     \usetkzobj{all} % all the objects          \usepackage[xetex,active,tightpage]{preview}     \PreviewEnvironment[]{tikzpicture}     \PreviewEnvironment[]{pgfpicture}          \begin{document}     \begin{tikzpicture}[>=stealth]     \tkzInit[xmin=-4.5, xmax=4.5, ymin=-4.5, ymax=4.5]     \useasboundingbox(-4.5, -4.5) rectangle (4.5, 4.5);          % Concrete and steel section     \tkzDefPoints{0/0/O, 0/3/R}     \tkzDrawCircle[fill=black!10,line width=8pt](O,R)          % Steel Rebars + Stirrups     \tkzDefPoints{0/0/O, 0/2.3/R}     \tkzDrawCircle[fill=black!30,line width=2pt](O,R)          \foreach \a in {0,30,...,360}{%         \tkzDefPoint(\a:2){A}         \tkzDrawPoint(A)     }          % Axes     \tkzDefPoints{0/0/O, -4/0/Y, 0/-4/Z}     \tkzLabelPoint[left](Y){\huge $y$}     \tkzLabelPoint[below](Z){\huge $z$}          \tkzDrawSegments[line width=2pt,->](O,Y O,Z)          \end{tikzpicture}     \end{document}


title: How to draw a double \hline in a table without interrupting vertical lines

text: I need to draw a double line after the first row in a table, but when using `\hline` twice, this interrupts the vertical lines:               \documentclass{article}     \begin{document}          \begin{tabular}{|c|c|c|}     \hline      1 & 2 & 3 \\ \hline \hline     4 & 5 & 6 \\ \hline     7 & 8 & 9 \\ \hline     \end{tabular}          \end{document}      produces: ![enter image description here](http://i.stack.imgur.com/kqJwt.png) This is without using any additional packages. How can I change this is such a ways that the vertical lines are not interrupted?


title: Documenting a latex package from comments

text: I have just completed writing my very own LaTex package, how can i make the package to be self documented like maybe from comments in the package code?


title: How can I change the shading of beamer's \tableofcontents[currentsection]?

text: I like to use `\tableofcontents[currentsection]` as an orientation at the start of a new section. But in my experience (depending on the projector), the default shading of the other sections can be to light. How can I change it? MWE:               \documentclass{beamer}          \begin{document}          \section{First Section}          \frame{     \frametitle{Title}     A frame of the first section     }          \section{Second Section}          \frame{     \frametitle{The shaded section is too light!}     \tableofcontents[currentsection]     }          \end{document}


title: Problem during production of LaTeX book with plasTeX (with many packages on it) into HTML5 website

text: I want to ask if there is a way to generate my book that I currently have in LaTeX format into an HTML5/XHTML website so that I can upload it to Internet. My book will be designed into a format with many chapters and subchapters so that the user will be able to move into directories from one another. I have already tried plasTeX, which is great, but I have a problem with recognizing my packages and it produces errors during the conversion. How can I solve this error? Or can I use another tool, with a full package support, if there is one? My packages are the following:               \usepackage{amsmath}      \usepackage{amssymb}      \usepackage{makeidx}      \usepackage{graphicx}     \usepackage{float}     \usepackage{hyperref}     \usepackage{acronym}      \usepackage{url}     \usepackage[square,numbers,sectionbib]{natbib}     \usepackage{chapterbib}


title: Problem with Texmaker

text: I'm trying to configure "Synchronization source-pdf with Synctex" in Texmaker. If I add "-synctex=1" to PdfLatex command, it can't compile and give message "Could not start the command". Only if I remove "-synctex=1" it works. But in that case, synchronization with pdf definitely does not work. Did someone have this issue before? How to get rid of it? Thanks. Just add some new finding. When "-synctex=1" is added, the error message is "Invalid command-line option". Does that mean my version of PdfLatex doesn't support "-synctex"?


title: Where can I find definition of starred version of \chapter command to redefine it

text: # General question I need to redefine how starred version of `\chapter` command (that is `\chapter*`) works in `book` class. I found definition of not-starred version of \chapter command in `book` class:               \def\@makechapterhead#1{%       \vspace*{50\p@}%       {\parindent \z@ \raggedright \normalfont         \ifnum \c@secnumdepth >\m@ne           \if@mainmatter             \huge\bfseries \@chapapp\space \thechapter             \par\nobreak             \vskip 20\p@           \fi         \fi         \interlinepenalty\@M         \Huge \bfseries #1\par\nobreak         \vskip 40\p@       }}      According to this SO answer there should be `@ifstar` somewhere inside that definition, but I can not find it. **How and where is starred version of`\chapter` defined then?** * * * # My specific case To give general idea why I need this here is explaination: I have document which require me that chapter headings consist of two parts: (1) Descriptive chapter number (Chapter One etc. so it can't use regular `\chapter` command) and (2) descriptive title below number that can be long. I was able to push descriptive title below chapter number and style it according to my needs with following macro:               \documentclass[final]{book}     \usepackage{lipsum}          \def \mylongchapter#1#2{     \chapter*{\centering{\LARGE #1} \\* \textnormal{\Large #2}}     \addcontentsline{toc}{chapter}{#1: #2}     }          \begin{document}          \mylongchapter{Chapter One}{This Chapter Have Very Interesting and Long Title Below Chapter Number}          \lipsum[11-30]          \end{document}      Which gives: ![](http://i.stack.imgur.com/3zWQA.png) I want to control spacing between two lines of chapter headings (space marked with red lines on screenshot): ![](http://i.stack.imgur.com/whSpp.png)


title: Two-columns wide figure at the bottom of a page with Revtex

text: The problem is simple: how to place a two-columns wide figure at the _bottom_ of a page with the revtex document class? For those unfamiliar with revtex, it is a two-column style guide used by a number of physics journals. I did extensive searching, only to find that many people face this problem (for example Putting two-column long figure in Revtex4-1). For a non-revtex document the usual solution is using the stfloats or the dblfloatfix package. Revtex is however incompatible with both packages (revtex incompatible with stfloats? and revtex incompatible with dblfloatfix?). The revtex manual is also of no help with this problem. I have been able to place a float at the position where I define it by wrapping it in the widetext environment, but this does improve readability. A possible solution may be to use boxes in some way, but after some searching and trials I have not got this working. The problem with the top placement is two-fold:   \- multiple two-column images clutter up at the top of a page   \- the text referring to the image(s) is lagging behind, forcing the reader to look at subsequent page(s) for the image. So, anyone willing to pick up the challenge of solving this problem? A problem lasting for too long, for too many people.    Edit. A minimal working example as requested:               \documentclass[reprint, pre]{revtex4-1}     \usepackage{graphicx}     \usepackage{lipsum}          \begin{document}     \lipsum[1]     %I want the figure at the bottom of the first page and      %not on the top of the next page as it does now     \begin{figure*}[b]         \centering         \includegraphics[width=\textwidth]{someImage.pdf}         \caption{Some caption here.}         \label{f:someImage}     \end{figure*}     \lipsum[1]     \end{document}


title: How to plot a linear function with axes, arrows, and labels?

text: I have now spend hours by creating this figure - without luck. I have tried different types of `tikz`, `pstricks` and `multido` usepackages. The lines from a to `x_2`, `d` to `x_1` and `p_1` to `c`, should be dashed line. If it is possible to add arrows at `x`,`y`-axis. ![enter image description here](http://i.stack.imgur.com/fCEDw.png)               \documentclass[a4paper,12pt,oneside]{article}     \usepackage[english]{babel}     \usepackage{tikz}     \usepackage{pgf}     \usetikzlibrary{shapes,arrows,positioning,calc}      \usepackage{tabu}     \usepackage{hyperref}     \usepackage{longtable}     \usepackage{array}     \usepackage{siunitx,multirow,tabularx,booktabs}     \usepackage{amsmath,amssymb,bm,mathtools}          \begin{document}     \begin{center}     \begin{tikzpicture}[scale=6]     \draw[->] (0,0) -- (0,1) node[left] {$P/X$};      \draw[->] (0,0) -- (1,0) node[below] {$X/t$};     \end{tikzpicture}     \end{center}          \end{document}


title: Huge empty space

text: I'm a beginner at using LaTeX and I keep getting weird behaviours. For example, on the image below, I get so much empty space. Why is that ? How can I remove it ? ![enter image description here](http://i.stack.imgur.com/VQUxg.png)


title: Can I replace the accents somehow?

text: I've asked about how similar is `mathptmx` to Times New Roman. I have a fine answer for that, but I forgot to mention I have a few accented characters... They doesn't look similar at all to the desired. Can I fix the accented characters somehow (all the other characters are fine)? I have no idea whether this is even possible... What I wanted (sg similar would do): ![enter image description here](http://i.stack.imgur.com/dZ3o5.png) What I've got with `mathptmx`: ![enter image description here](http://i.stack.imgur.com/BhfYR.png) Example code what we have for the last one.               \documentclass[doc,a5paper,landscape,12pt]{apa6}          \PassOptionsToPackage{chapternumber=Huordinal}{magyar.ldf}     \usepackage[magyar]{babel}     \usepackage[utf8]{inputenc}     \usepackage{t1enc}     \usepackage{graphicx}          \newgeometry{         margin=2.5cm,         bindingoffset=0.5cm,         headheight=2cm,     }          \usepackage{times}          \usepackage{microtype}          \usepackage{lipsum}          \shorttitle{}          \begin{document}          ABCDEFGHIJKLMNOPQRSTUVWXYZ\\     abcdefghijklmnopqrstuvwxyz\\     0123456789\\     ÁÉÍÓÖŐÚÜŰáéíóöőúüű          \end{document}      (yes, Hungarian has a bunch of accented characters...) Or can I use Times New Roman, apa6 and Hungarian anyhow? (some of the commenters mentioned LuaLaTeX and XeTeX but I could get them work together)


title: Drawing a circle in the complex plane.

text: I would like to draw the set of points in the complex plane that satisfies `$|z-1+i| <= 3$` using LaTeX (with TikZ, or some related system). I would want to fill this circle with say dashed lines, or something of the sort, so that it's not "completely" filled. I would also want the axis labeled. I have no idea on how to do this properly, unfortunately. Could anyone tell me how, or supply me with some reference? Would be perfect.


title: Glossary terms not aligned vertically

text: I had a problem trying to set the width of a glossary column. The suggested solution solved the issue, but raised another problem where the terms are appearing weird, not aligned vertically in the glossary. A minimum working example is:               \documentclass{article}         \usepackage[nomain,acronym]{glossaries}         \newcommand{\acronentry}[2]{%       \newglossaryentry{acro#1}{type=\acronymtype, name={#1},description={#2}, first={#2 (#1)}}%       \glsadd{acro#1}%     }         \makeglossaries          \newglossarystyle{clong}{%      \renewenvironment{theglossary}%          {\begin{longtable}{p{.3\linewidth}p{\glsdescwidth}}}%          {\end{longtable}}%       \renewcommand*{\glossaryheader}{}%       \renewcommand*{\glsgroupheading}[1]{}%       \renewcommand*{\glossaryentryfield}[5]{%         \glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}%       \renewcommand*{\glossarysubentryfield}[6]{%          & \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}%       %\renewcommand*{\glsgroupskip}{ & \\}%     }          \usepackage{lipsum}          \acronentry{ABC}{An example one}     \acronentry{BCD}{A second example}     \acronentry{DEF}{A new third example, with more text}     \begin{document}     \glsaddall     \printglossary[type=\acronymtype,style=clong]         \end{document}      What produces: ![Resulting document](http://i.stack.imgur.com/Kfh0l.jpg) How can I make the term and its descriptions aligned to the top vertically keeping the solution provided by @Martin H, as I need that else my layout will break?


title: moderncv and cvitem

text: In moderncv I use `\cvitem` to point my skills. The problem is that if I use long text in a first column it gets breaked. Picture shows what I want to achieve. ![enter image description here](http://i.stack.imgur.com/AT62b.png) first example is how it looks when I use `\cvitem{Something looooong}{Second entry}`. I can not achieve that second result with `\cvitem{Something looooong}{\\Second entry}` \- if second entry is preceded by `\\` (new line), then it gets into first column where "Something looooong" text is. All in all - how to easily achieve this second example, please?


title: \caption* does not work properly

text: I have a problem with using the command `\caption*` (from the `caption` package) together with the algorithm environment. Instead of parsing the `\caption*` as a single command, it is parsed like `\caption` with parameter "*". Any ideas?               \documentclass{article}     \usepackage{algorithm}     \usepackage{algpseudocode}     \usepackage{caption}     \begin{document}     \begin{algorithm}[H]     \caption*{This should be an unnumbered caption.}     \begin{algorithmic}       \State $0 \gets 0$     \end{algorithmic}     \end{algorithm}     \end{document}


title: Redefining \maketitle to put a maximum of information in a page

text: I'm currently writing LaTeX articles containing all of my lessons content in order to have it on a very few pages instead of the heavy thing the teacher gives us with exercises, demonstrations and so on. The goal of it is to be really short so I can see it before an oral. I've already tried to improve this with :               \marginparwidth 0pt     \oddsidemargin 0pt     \evensidemargin 0pt     \marginparsep 0pt     \topmargin 0pt     \textwidth 6.5in     \textheight 8.5in      And I specified a small font-size in the document class :               \documentclass[a4paper, 10pt]{article}      This works really well. However, the `\maketitle` command creates the title very low on the first page and this is kind of awkward. Is there a workaround for this? And by the way do you have other tips to reduce the space taken by the text while still keeping it legible?


title: Developing a programmed text similar to Quick Calculus: A Self-Teaching Guide

text: I am interested in using LaTeX to put together a self-study guide (also called a programmed text). Quick Calculus: A Self-Teaching Guide is perhaps the most well known. Such books teach a topic through a series of panels. Each panel asks a question (usually with a yes/no answer) and the reader is directed and other panels depending on the answer. If the question is wrong, a destination panel explains the topic a bit more and may ask additional questions. A correct answer moves the reader onto the next topic panel. I've looked at doing a homegrown effort in LaTeX and also looked at flashcards (also Mnemosyne) as a starting point but before commencing I was wondering if anyone had any suggestions for packages that might already exist. The main requirement is the ability to track panel identifiers (via labels), and render them on the panels with the appropriate labels for yes/no answers. Eg Three panels might have labels panel1, panel2, and panel3. A yes answer to the question on panel1 will point the reader to panel3 while a no answer will direct the reader to panel2. I haven't mentioned that answer panels also need to be provided either on the other side of the page or side by side with the question panel (or even in a separate document). The reader must obviously cover up the answer panels before answering a question.


title: Rectangles around words in table including diagonals

text: I'm trying to make a map of word correlations that will include a table of words with similar groupings marked by surrounding them with a rectangle with rounded corners. This needs to also be possible to do diagonals as in Example 2 below. Is this possible to do in latex? Thanks a lot. ![Example Table 2](http://i.stack.imgur.com/EIqO7.png) ![Example Table](http://i.stack.imgur.com/7WYCh.png)


title: LaTeX Error: \theHchapter undefined when using tex4ht with hyperref and appendix package

text: Using texlive 2013. The following MWE compiles fine with pdflatex, but gives the error:               ./foo.aux) [1]     Chapter 1.     ! LaTeX Error: \theHchapter undefined.      when I run it using the command:               htlatex foo.tex      Here is the file               \documentclass[12pt]{report}     \usepackage[toc,page]{appendix}     \usepackage{hyperref}     \begin{document}     \chapter{first}       some text          \begin{appendices}     \chapter{some chapter}       some text again     \end{appendices}          \end{document}      I really do not have to use the appendix package if that is the problem, I just wanted a way to obtain an `Appendix` title, before each chapter I add as an appendix. Without this package, I do not get this `Appendix` title on its own.               >htlatex foo.tex     This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode      **Update** Putting the new file `appendix.4ht` (thanks to `michal.h21` answer below) in `$TEXMFHOME/tex/latex/tex4ht` worked. Strange why `/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht` does not work since that is where all the other .4ht files are? But there are still issues with toc. The table of contents links is not formatted correctly. Clicking on the appendix link from toc opens a web page that also contains the last section from the main body inside it. And clicking on the last section of the body opens a page that contains the appendix in it. So it seems that appendix is treated as part of the last section that appears in the body, instead of being a separate section on its own web page. Here is a MWE example:               \documentclass{article}     \usepackage[toc,page]{appendix}     \usepackage{hyperref}     \begin{document}     \author{me}     \title{title}     \date{\today}     \maketitle     \tableofcontents          \section{first}       some text          \section{two}       some text in section 2          \begin{appendices}     \section{somesection inside appendices}       some text again     \end{appendices}          \end{document}      Now compiled with               htlatex foo.tex "htm,2"   %now split 2 option to see the problem      ![enter image description here](http://i.stack.imgur.com/Wng79.png) update: To answer @egreg on using `mktexlsr`, I did now use that. As root, but still htlatex does not see the file appendix.4ht when this file is in `/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht` with all the other .4ht files. It only works when this file is in local `$TEXMFHOME/tex/latex/tex4ht` which is really strange. Here is screen shot: ![enter image description here](http://i.stack.imgur.com/oM7ks.png)


title: One-column abstract in KOMA-script

text: I would like to make the abstract in KOMA Article appear on both columns, when writing a two column article. I would like to use internal koma options, instead of loading external packages. The following code sample works for me, but it is only to demonstrate what I want, not what I really want (which is not to use external packages like the abstract package)               \documentclass[twoside=false,                twocolumn=true,                a4paper,                10pt]{scrartcl}     \usepackage[utf8x]{inputenc}          \usepackage{lipsum}          \usepackage{lastpage}     \usepackage{fancyhdr}     \usepackage{abstract}               %opening     \title{Some Magnificant Article}     \author{Dr Brainy}          \begin{document}     \twocolumn[     \maketitle     \begin{onecolabstract}     Here is which one-column abstract resides     trying lipsum does not work here      \end{onecolabstract}     ]          \tableofcontents          \section{introduction}     \lipsum          \section{method}     \subsection{mptre}     \subsubsection{aasdasd}     \section{results}     \end{document}


title: How to change page numbers in ToC?

text: My page numbers were created according to user package `fansy`. My page numbers look like 4.1, 4.2, 4.3 and so on. But in the ToC it only shows 1, 2, 3, etc. Instead I would like ToC to display 4.1, 4.2, 4.3 ... Any idea how to set up this special numbering in the ToC?


title: How to express 72.27pt in terms of \oddsidemargin, \textwidth, ... that are subtracted from \paperwidth?

text: By default, LaTeX appends one inch (72.27pt) to the left (and top) of document. Here I want to prove it as follows. But I missed some other page layout macros to subtract from `\paperwidth`.               % the objective is to prove that     % left padding of 1in  = 72.27pt     % has been added by default     % by LaTeX          \documentclass{article}          \begin{document}         \the         \dimexpr             \paperwidth             -\hoffset             -\oddsidemargin             -\textwidth             -\marginparsep             -\marginparwidth             % minus some other page layout macros              % should be there but I don't know         \relax     \end{document}      How to express `72.27pt` in terms of `\oddsidemargin`, `\textwidth`, ... that are subtracted from `\paperwidth`? * * * I need a length macro for the red segment below. ![enter image description here](http://i.stack.imgur.com/4THH2.png) * * * The reason I accepted egreg answer is due to his comment below. > Again: the length you display in red is not available directly, but only > through computation: it's > `\paperwidth-1in-\hoffset-\oddsidemargin-\textwidth-\marginparsep-\marginparwidth` Thus it is impossible to get the required expression to prove `72.27pt`.


title: Problems with \ref when using soul for highlighting

text: Here is a minimal example showing the problem.               \documentclass[10pt]{article}     \usepackage[usenames,dvipsnames]{color}     \usepackage{soul}     %\soulregister{\ref}{1}     \begin{document}          \section*{x}\label{x}          \section*{y}     \hl{ Some text.       Section~\ref{x}.     }     \end{document}      I'm getting the error               LaTeX Warning: Reference `{x}' on page 0 undefined on input line 12.          ! Argument of \ref has an extra }.      The problem is with `\ref`. Commenting out the line beginning with "Subsection" makes the error disappear. `\soulregister` is intended for font commands. I don't know if `\ref` is a font command, but I could not get `\soulregister` to fix the problem (see the commented line above).


title: Misplaced alignment tab character with eledpar's \stanza in command argument

text: I tried defining a command to enter parallel text/translation with eledpar to avoid having to write all the code for parallel typesetting (both for code clarity and because I'm lazy). So I did try this:                   %XeTeX document         \documentclass{article}              \usepackage{fontspec}         \usepackage{xunicode,xltxtra}              \usepackage[english,latin,german,francais]{babel}              \usepackage{eledmac}         \usepackage{eledpar}              \begin{document}              \setstanzaindents{1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0}              \begin{pairs}           \begin{Leftside}             \beginnumbering         \stanza         First verse&         second verse\&             \endnumbering           \end{Leftside}           \begin{Rightside}             \beginnumbering         \stanza         First translation&         second translation\&             \endnumbering           \end{Rightside}         \Columns         \end{pairs}              %Up to this part, everything works as expected              \newcommand{\trad}[2]{         \begin{pairs}           \begin{Leftside}             \beginnumbering             #1             \endnumbering           \end{Leftside}           \begin{Rightside}             \beginnumbering             #2             \endnumbering           \end{Rightside}         \Columns         \end{pairs}         }              \trad{         \stanza         First verse&         second verse\&         }         {         \stanza         First translation&         second translation\&         }              \end{document}      The first part, which is the basic code, works as expected. The second part, however, yields a                   Section 2  (./minimalstanza.2)        ! Misplaced alignment tab character &.        <argument>  \stanza First translation&                                        second translation\&         l.58 }      Any idea why, and how to fix this? The command with its argument should yield exactly the same code as the regular block. A same example with regular text starting and ending with \pstart an \pend as arguments works perfectly. A stanza alone outside a pairs environment works fine too.


title: Tool for merging WEB file with its change file

text: Is there any tool that can take a `sample.web` and `sample.ch` file and produce a `merged.web` file as output?


title: Using lmodern as default teletype font

text: I would like to use `lmodern` as my default teletype font, while using other fonts for sans etc. So far I have               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[defaultsans]{cantarell}     \usepackage{lmodern}     \renewcommand*\ttdefault{???}          \begin{document}     {\ttfamily Hello in lmodern }     \end{document}      What do I have to replace the `???` with in order for the lmodern to be used as the default teletype?


title: Automating table creation

text: I have the following table that I need to recreate quite a few times ![enter image description here](http://i.stack.imgur.com/wQg9j.jpg) Due to its size and complexity (yes, I am a tex novice) I am looking into ways of automating the creation of said table. I try to think of ways to automating it, but my tex-fu is too weak to do anything with it. What I ultimately want to do is the following   * Having a command or environment to typeset the table   * Being able to sum up the points, in three places (24,36 and 60) and store its value   * Add an extra line if the number of problems exceeds a given threshold (say 10-12) Using the exam package is not an option, as per said time it can not display the points from subquestions. Now I have all the labels for the problems stored (oppgave = problem, Poeng = marks/points) and can refer to them as \label(1.1.a), \label(1.1.b) and so forth. So if possible using these values would be great, however I do not know how to make this into an loop.  I could also type in both the points and the numbers for each problem, but then I ran into difficulties dealing with `exparse` and understanding the `\SplitList` command was rather complicated. Especially when it is unknown how many problems /rows I will need. Though it is safe to assume that the number of parts and subparts will never exceed 36 for either Part I nor II. I also looked into using lat3x syntax with `\ExplSyntaxOn`obtain something along the lines of `\TypeSettable{ Del1 = 1a1,1a2,1a3, ... , PDel1 = 1,1,1,1, ... , Del2 = 2a, 2b ... }` Here is the code I used to create the table in image               \documentclass[12pt,a4paper]{article}     \usepackage{xparse}     \usepackage{xstring}     \usepackage{booktabs}     \usepackage{mathtools}     \usepackage{tabularx}     \usepackage{multirow}     \usepackage{caption}     \begin{document}     \begin{table}     \caption*{\bf Gjeldende poengfordeling}     { \noindent \begin{tabular*}{\textwidth}{@{}cl*{18}{@{\;}c@{\;}}}       \toprule       & & &  & & &  & & &  & & &  & & & & Sum  \\       \cmidrule{1-1} \cmidrule(l){2-15} \cmidrule(l){16-17}       \multirow{2}{*}{Del $1$} & & Oppgave &  $1$a  &  $1$b  &  $1$c                                            &  $2$a  &  $2$b  &  $2$c                                             &  $3$a  &  $3$b                                              &  $4$a  &  $4$b                                              &  &       \\                                & & Poeng   &  $1$   &  $1$   &  $1$                                                   &  $1$   &  $2$   &  $2$                                              &  $2$   &  $2$                                                 &  $2$   &  $2$   &        &      &  & $24$  \\                                  \cmidrule(l){1-17}       \multirow{2}{*}{}        & &         &  $5$a  &  $5$b                                              &  $6$a  &  $6$b                                               &  $7$a  &  $7$b  &  &   &    &   &  &         \\                                & &         &  $2$   &  $2$                                                &  $2$   &  $2$                                             &  $2$   &  $2$   &  &   &    &   &  &        \\       \cmidrule{1-1}\cmidrule(l){2-17}       \multirow{2}{*}{Del $2$} & & Oppgave &  $1$a  &  $1$b  &  $1$c                                            &  $2$a  &  $2$b  &  $2$c                                             &  $3$a  &  $3$b  &  $3$c \\     %                                                                      & & Poeng   &  $2$   &  $2$   &  $2$                                            &  $1$   &  $2$   &  $2$                                            &  $2$   &  $3$   &  $2$ &   &    &  & &  $36$       \\     %                                              \cmidrule(l){1-17}       \multirow{2}{*}{}        & &         & $4$a   &  $4$b  & $4$c                                               & $5$a   &  $5$b                                               & $6$a   &  $6$b  & $6$c &       &       &       &      &  &     \\                                & &         & $3 $   &  $2$   & $3 $                                              & $2 $   &  $2$                                               & $2 $   &  $2$   & $2$ &       &       &       &      & &   &     \\       \cmidrule(l){1-15}\cmidrule(l){16-17}                                                                     & \multicolumn{14}{r}{Total antall poeng} &  & $60$  \\       \bottomrule       \end{tabular*}}     \end{table}     \end{document}      I did look at a few similar questions to automating table creation, but nothing really sprung to mind =( In short I do not know what the best path to automating the given table is, but any help and tips and ideas is very much welcome!


title: \hhline doesnt work

text: I wonder you can help me why LaTeX can't draw a `\hhline` in my table?? (I would put a picture but I need at least 10 reputation...) Here is the code:               \documentclass[12pt,titlepage]{report}          \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[utf8]{inputenc}     \usepackage[czech]{babel}     \usepackage{fullpage}     \usepackage{listings}     \usepackage{palatino, url, multicol}     \usepackage{graphicx}     \setlength{\parindent}{1cm}     \usepackage{indentfirst}     \setcounter{secnumdepth}{3}     \usepackage{mdframed}     \usepackage[usenames,dvipsnames]{xcolor}     \definecolor{light-gray}{gray}{0.85}     \setcounter{tocdepth}{3}     \usepackage{titlesec}     \titleformat{\chapter}[display]        {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}       \titlespacing*{\chapter}{0pt}{-50pt}{40pt}     \usepackage{multirow}     \usepackage{hhline}     \usepackage{enumerate}     \usepackage{here}     \usepackage{longtable}     \usepackage[bottom]{footmisc}     \usepackage[font={small,it}]{caption}          \begin{document}           \begin{table}[H]         \centering         \begin{tabular}{|c|c|c|}         \hline         \multirow{2}{*}{Rok} & \multicolumn{2}{|c|}{$r_f$}\\         \hhline{~--}           & ARAD & INFA\\         \hline           2000         & 7,38 \%  & \\         \hline           2001    & 5,43 \% & \\         \hline           2002         & 4,15 \%  &  \\         \hline           2003    & 4,82 \% & \\         \hline           2004         & 4,04 \% & \\         \hline           2005         & 3,61 \% &\\         \hline           2006         & 3,68 \% & \\         \hline           2007         & 4,65 \%  &  4,28 \%\\         \hline           2008    & 4,09 \% & 4,55 \%\\         \hline           2009         & 3,68 \% & 4,67 \%\\         \hline           2010         & 3,75 \% & 3,71 \%\\         \hline           2011         & 3,43 \% & 3,51 \%\\         \hline           2012         & 1,45 \% & \\         \hline         \end{tabular}         \caption{Hrubý výnos českého desetiletého dluhopisu v letech 2000 - 2012, zdroj: ČNB a MPO}\label{dluhopisy}         \end{table}     \end{document}      ![Result of code](http://i.stack.imgur.com/MxWnr.jpg)


title: Appendix Problem

text: I have a problem with \appendix in my thesis. The result it's correct in the ToC, ![ToCappendix](http://i.stack.imgur.com/6z8W2.png) but wrong (i would like to have it as "Appendix A") in the text: ![textappendix](http://i.stack.imgur.com/EF0h1.png) I'm using this template: http://bror.einarsson.net/chalmersthesistemplate/ThesisTemplate.zip. I think that the problem is in the settings:               % Chapter headings style (fncychap)     \makeatletter     \ChNumVar{} % sets the style for digit     \ChTitleVar{\Huge\bfseries\centering} % sets the style for title     \ChRuleWidth{4pt} % Set RW=4pt     \ChNameUpperCase % Make name uppercase     \renewcommand{\DOCH}{     \centering     {\CNoV {\fontsize{60pt}{20pt}\selectfont\thechapter} }     \vskip 40\p@}     \renewcommand{\DOTI}[1]{%     \CTV\FmTi{#1}\par\nobreak     \vskip 40\p@}     \renewcommand{\DOTIS}[1]{%     \CTV\FmTi{#1}\par\nobreak     \vskip 40\p@}     \makeatother      I will really appreciate your help. EDIT: EXAMPLE CODE https://dl.dropboxusercontent.com/u/64063159/ThesisTemplate.zip


title: Stretching each cell to the same height

text: I'm building a _TikZ_ diagram in a row-by-row fashion. Each row is composed of a sequence of blobs, and the end of the row is signalled by issuing `\newrow`. Here is the code I have produced so far:               \documentclass{article}          \usepackage{tikz}     \usepackage{keycommand}           \begin{document}          \newcounter{HeightCounter}     \setcounter{HeightCounter}{0}          \newkeycommand{\blob}[left=0,right=0,minheight=0,color={}]{%       \fill[\commandkey{color}] (\commandkey{left},\theHeightCounter)          rectangle (\commandkey{right},\theHeightCounter+\commandkey{minheight});     }     \newcommand{\newrow}{...}          \begin{center}     \begin{tikzpicture}[x=1mm,y=-1mm]     \blob[color=blue, left=0, right=20, minheight=6]     \blob[color=blue, left=25, right=45, minheight=8]     \blob[color=blue, left=50, right=60, minheight=7]     %\newrow     \addtocounter{HeightCounter}{8}     \blob[color=green, left=0, right=20, minheight=4]     \blob[color=green, left=25, right=35, minheight=2]     \blob[color=green, left=40, right=60, minheight=5]     %\newrow     \addtocounter{HeightCounter}{5}     \blob[color=red, left=0, right=35, minheight=4]     \blob[color=red, left=40, right=60, minheight=2]     %\newrow     \end{tikzpicture}     \end{center}          \end{document}      And here is what that code produces: ![current pdf output](http://i.imgur.com/5mzC0yx.png) What I would _like_ :   * Each blob in a row stretches to the same height, say _h_ , which is defined as the maximum `minheight` in that row.   * The `\newrow` command then advances the counter `HeightCounter` by _h_. Here is my desired output (see how each blob has stretched downward to fill the height of its respective row): ![desired pdf output](http://i.imgur.com/oNIOttC.png) Here is what I would _like_ to type (note that the `\newrow` command has no parameters; it should calculate the height of the preceding row automatically):               \begin{center}     \begin{tikzpicture}[x=1mm,y=-1mm]     \blob[color=blue, left=0, right=20, minheight=6]     \blob[color=blue, left=25, right=45, minheight=8]     \blob[color=blue, left=50, right=60, minheight=7]     \newrow     \blob[color=green, left=0, right=20, minheight=4]     \blob[color=green, left=25, right=35, minheight=2]     \blob[color=green, left=40, right=60, minheight=5]     \newrow     \blob[color=red, left=0, right=35, minheight=4]     \blob[color=red, left=40, right=60, minheight=2]     \newrow     \end{tikzpicture}     \end{center}      I am generating a large number of these diagrams programmatically, so it is important to me that the height calculations are done by LaTeX, not by the human user. The way I would program this in an ordinary programming language is:   * Process each blob in turn, storing the respective `color`, `left` and `right` data for each, and accumulating the maximum of the `minheight` fields.   * Upon reaching `\newrow`, draw all of the blobs in that row to the required height, and then advance `HeightCounter` by the appropriate amount. I think that this algorithm may be quite similar to how tables are drawn by LaTeX, so maybe this problem will have quite a natural LaTeX solution.


title: Vertical shift of figures in the first page of landscape

text: In a document I need to switch to landcape mode and insert some pictures. The pictures are the same size in all following pages and inserted in the same way. In the first page of landcape mode the pictures are shifted cca 2 cm upwards (towards the longer side of the page) when compared with the pictures in all following pages. I want the pictures to be aligned in the same way in all pages. What's wrong? Thank for your suggestions. There is no formatting in the code, just plain insertion of pictures..               \begin{landscape}     %%%     \begin{figure}[!h]     \begin{subfigure}[b]{11.6cm}     \centering      \includegraphics[width = 11.6cm]{pic/app2_broadlCRSopt.png}     \end{subfigure}     \begin{subfigure}[b]{11.6cm}     \centering      \includegraphics[width = 11.6cm]{pic/app2_broadlCRSreg.png}     \end{subfigure}          \begin{subfigure}[b]{11.6cm}     \centering      \includegraphics[width = 11.6cm]{pic/app2_broadlCRSsec.png}     \end{subfigure}     \begin{subfigure}[b]{11.6cm}     \centering      \includegraphics[width = 11.6cm]{pic/app2_broadlCRS6.png}     \end{subfigure}     \end{figure}          \begin{figure}[!h]     \begin{subfigure}[b]{11.6cm}     \centering      \includegraphics[width = 11.6cm]{pic/app2_broadlNCSopt.png}     \end{subfigure}     \begin{subfigure}[b]{11.6cm}     \centering      \includegraphics[width = 11.6cm]{pic/app2_broadlNCSreg.png}     \end{subfigure}          \begin{subfigure}[b]{11.6cm}     \centering      \includegraphics[width = 11.6cm]{pic/app2_broadlNCSsec.png}     \end{subfigure}     \begin{subfigure}[b]{11.6cm}     \centering      \includegraphics[width = 11.6cm]{pic/app2_broadlNCS6.png}     \end{subfigure}     \end{figure}      ...


title: Aligned list of acronyms

text: I am using latex to write my thesis report and would like to generate list of abbreviation for same. I use the acrnonyms package to generate it. Following is my minimal code:               \documentclass[a4paper,12pt]{article}     \usepackage{hyperref}     \usepackage{acronym}     \begin{document}          \section*{Acronyms}     \begin{acronym}     \acro{MRC}{Maximal Ratio Combining} \acro{QoS }{Quality of Service}     \acro{MIMO}{Multiple Input Multiple Output} \acro{RF }{Radio     Frequency} \acro{TAS }{Transmit Antenna Selection}     \acro{VAA}{Virtual Antenna Array} \acro{ASER}{Average Symbol Error     Rate} \acrodef{SC}[SC]{Selection Combining} \acro{CSI }{Channel     State Information} \acro{AF  }{Amplify and Forward}     \acro{SNR}{Signal-to-Noise Ratio} \acro{CDF }{Cumulative     Distribution Function} \acro{PDF }{Probability Distribution     Function} \acro{MGF }{Moment Generating Function}     \acro{AWGN}{Additive White Gaussian Noise}     \end{acronym}          \end{document}      The above code does generate a list of acronyms, but the full names are not aligned under each other. Is there a way to arrange them? I would really appreciate any help.


title: Ugly diagonal arrows using xymatrix

text: I have tried to create some diagrams using xymatrix. However, the problem I have encountered is that diagonal arrows do not look very well - they are not smooth and resemble raster graphics rather than vector graphics. I have the same problem using pdfLaTeX as well as LaTeX + dvips. Here is my code:               \documentclass{article}     \usepackage[utf8]{inputenc}                                         \usepackage[T1]{fontenc}     \usepackage[all,cmtip]{xy}     \begin{document}     \begin{displaymath}     \xymatrixcolsep{5pc}\xymatrix{& & A & \\ B \ar[r] \ar[urr] & C \ar[r] & D \ar[r] \ar[u] & E      }     \end{displaymath}     \end{document}      The urr-arrow is the one that does not look well. I wonder if this problem can be solved, since, e.g., in this document demonstrating the use of xymatrix, there is no sign of a similar problem. Thank you in advance.


title: Glossaries package: Remove separator between numberlist and seelist

text: I am using the `glossaries` package using `makeidx` (referred to as Option 2 in the manual). My glossary contains several items which have cross-references to other terms, an example of how one of these is defined is:               \newglossaryentry{gls:crossCorrelation}{name={cross-correlation},     description={A mathematical process which is used to determine the similarity of two signals},     see={gls:convolution}     }      I want the cross reference to appear on a separate line to the description and page list (the `numberlist` sometimes called the `locationlist` in the manual). To this end I have redefined the `seeformat` command to be:               \renewcommand*{\glsseeformat}[3][\seename]{     \newline \emph{#1} \glsseelist{#2}}      The problem I have is that the `seelist` is actually part of the number list (as explained on page 111 of the `glossaries` manual) and thus shares it separator punctuation. As a result the glossary entry for the above example appears as: > Cross-correlation A mathematical process which is used to determine the > similarity of two signals. 26, 49,   >  See also: convolution As can be seen above there is an undesirable comma following the `numberlist`. I have had a good look through the manual and documented code but cannot figure out a way of removing this comma. I had hoped to find the command to build the `numberlist` and assumed there would be a if statement relating to the cross reference list. Full MWE:               \documentclass{article}     \usepackage{glossaries}          %Setup see formatting of gloaary entries     \renewcommand*{\seename}{See also:}     \renewcommand*{\glsseeformat}[3][\seename]{     \newline \emph{#1} \glsseelist{#2}}          %Enable glossaries     \makeglossaries          %Gloassry entries     \newglossaryentry{gls:world}{name={World},         description={A planet capable of supporting life. It is not unheard of for bowls of petunias or indeed whales to fall towards them},         see={gls:planet,gls:life}     }     \newglossaryentry{gls:planet}{name={planet},         description={A large object with a radius typically greater than $2000~\mathrm{km}$ which meets the following criteria: is in orbit around the Sun, has sufficient mass for its self-gravity to overcome rigid body forces so that it assumes a hydrostatic equilibrium (nearly round) shape, and (c) has cleared the neighbourhood around its orbit}     }     \newglossaryentry{gls:life}{name={life},         description={The condition that distinguishes animals and plants from inorganic matter, including the capacity for growth, reproduction, functional activity, and continual change preceding death}     }          \begin{document}     Hello \gls{gls:world}! How is \gls{gls:life} on your \gls{gls:planet}?     \printglossary     \end{document}      This is compiled with:               pdflatex.exe example.tex     makeindex -s example.ist -t example.glg -o example.gls example.glo     makeindex -s example.ist -t example.alg -o example.acr example.acn     pdflatex.exe example.tex      The result of these can be seen below (with the undesirable comma highlighted). ![MWE Output](http://i.stack.imgur.com/HjFdk.png)


title: how to implement something that looks like email in memoir class

text: I'm writing some fiction and typesetting it using texlive. I want to include a number of "emails" as part of the story but I'm a bit stuck how best to achieve this. My first attempt looks like this:               \rule{250pt}{1pt}     \newline     \texttt{From: HamiltonP, Beth\newline     To: Croft, Norrie\newline     Date: September 12th 2014\newline     Subject: Paris\newline     \newline     <some paragraph text>     \newline     <more paragraph text> }     \newline          \rule{250pt}{1pt}     \newline      obviously a monospace font is not particular appropriate for modern emails but it should be in a different font from the main text (maybe a sans serif for instance) and probably a different (smaller?) size. Is there a straightforward way to do this? has someone done something similar before?


title: How can I remove the indent after every section in new page?

text: I am using a preconfigured LaTeX file and have a problem. After I use `\section{}`, everything works well, but only on the current page. If I reach the new page, I have an indent on the left side and the current section is written like a header. How can I disable that? I've already tried `\noindent`, `\setlength{\parindent}{0mm}`, `\setlength{\parskip}{4em}`, `\parindent`, `\parskip`... to no avail. What should I do? EDIT:               \begin{document}          \include{TEXT}          TEXT looks like:     \chapter{TEXT}     this is my text....          after reaching new page i get the indent on the left side as mentioned above...     hope this helps          \end{document}


title: Linux fonts with several weights

text: Identically to this question, I'm trying to use the amazing Frigerri CV template on Linux Mint 17 (which is based on Ubuntu) The answer there points to the `.cls` file. But the file mentions three _sans_ fonts of different weights. I know there are a few Linux fonts which match Helvetica very closely (e.g. Nimbus Sans) but I can't work out how to get a light version and a bold version.               -\newfontfamily\bodyfont[]{Helvetica Neue}     -\newfontfamily\thinfont[]{Helvetica Neue UltraLight}     -\newfontfamily\headingfont[]{Helvetica Neue Condensed Bold}      How might I modify these lines to use Nimbus Sans with various weights? OR Are there any Linux _sans_ fonts with several weights like this?


title: Page numbering resets after table of contents (roman/arabic)

text: For some reason my page numbering restarts after table of context and changes from roman to arabic numbers. I don't really know how to make MWE for this because I use include to put text into the document. Here is how that part of the code looks like:               \documentclass[a4paper,11pt]{scrartcl}     \usepackage[latin1]{inputenc}     \usepackage{blindtext}     \usepackage{hyperref}     \hypersetup{         colorlinks,          citecolor=black,          filecolor=black,          linkcolor=black,          urlcolor=black     }     \pagenumbering{roman}%     \begin{spacing}{1.4}%     \tableofcontents     \end{spacing}     \clearpage     \begin{spacing}{1}     \input{Text/Introduction}     \end{spacing}     \pagenumbering{arabic}     \setcounter{page}{1}     \include{Text/MainText}     \usepackage[ngerman]{babel}     \begin{document}     \blindtext     \blindtext     \printbibliography     \end{document}      With this I get roman numbering for table of contents, as it should, but after that the Introduction chapter starts with arabic numbering instead to continue roman numbering. What am I doing wrong?


title: Using decimal values for figure-captions (floats)

text: Given a figure and a section i need the figures in that section to be labeled in a `section.counter` manner. Example First figure, section 3. should be Figure 3.1 I can only use `\documentclass{article}`               \documentclass[12pt]{article}     \usepackage{graphicx}     \usepackage{pdflscape}     \usepackage{caption}     \usepackage[paper=A4,pagesize]{typearea}     \usepackage[driver=pdftex, margin=2.54cm]{geometry}     %Preamble          \begin{document}          \date{}     \bibliography{Biblio}     \bibliographystyle{harvard}     \author{Aiden Strydom\\201103578}     \title{Artificial Intelligence\\Deliverable One: Agent Design}          %New page     \maketitle     \tableofcontents     \newpage          \section{Background}     \section{Section 1}     \section{Section 2}     \section{Section 3}         \begin{figure}[ht]             \centering             \resizebox{0.8\hsize}{!}{\includegraphics[angle=90,origin=c]    {AeroponicsUCDportrait.pdf}}             %\caption{Figure 3.1 Aeroponics \textit{Use Cases}}              \caption[(3.1)]{A figure without list entry.}         \end{figure}     \end{document}


title: How to create a matrix by itself and have a letter equal to it?

text: ![enter image description here](http://i.stack.imgur.com/YjZlH.jpg) I am trying to exactly duplicate this picture here in LaTex. ... so far all i have is                \[ \left( \begin{array}{ccc}     a & 0 & 0 \\     0 & b & 0 \\     0 & 0 & c \end{array} \right)\]        which creates just the matrix on the left but i don't know how to insert the D = and the rest of the image. Much help would be greatly appreciated Thank you much


title: scrlttr2: make second page footer match first page footer

text: I'm trying do my cover letter in `scrlttr2`. I'm working from a template which I found online and I want the same footer for the second page as for the first. I really have no idea how to do this and all I get is "page 2" in the footer section of my second page. The template, extended to be a two page letter can be found below. Any help would be greatly appreciated.               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Short Stylish Cover Letter     % LaTeX Template     % Version 1.0 (28/5/13)     %     % This template has been downloaded from:     % http://www.LaTeXTemplates.com     %     % Original author:     % Stefano (http://stefano.italians.nl/archives/63)     %     % License:     % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)     %     % IMPORTANT: THIS TEMPLATE NEEDS TO BE COMPILED WITH XeLaTeX     %     % The two fonts used in this template: Adobe Garamond Pro and Gill Sans     % do not come with Windows by default. You will need to download them in     % order to get an output as in the preview PDF. Otherwise, change those      % fonts to fonts that do come with Windows or comment out the lines to use      % the default font.     %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %----------------------------------------------------------------------------------------     %   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS     %----------------------------------------------------------------------------------------          \documentclass{scrlttr2}          \usepackage{fontspec} % Allows font customization     \usepackage{marvosym} % Allows the use of symbols     \usepackage[english]{babel} % Required to compile in Windows          \setlength\parindent{0pt} % Removes all indentation from paragraphs          \defaultfontfeatures{Mapping=tex-text}     \setmainfont {Garamond} % Main document font     \setsansfont {Garamond} % Used in the from address line above the to address          \renewcommand{\normalsize}{\fontsize{12.5}{17}\selectfont} % Sets the font size and leading     %----------------------------------------------------------------------------------------     %  PERSONAL INFORMATION     %----------------------------------------------------------------------------------------          \setkomavar{fromname}{John Smith} % Your name     \setkomavar{fromaddress}{123 Broadway\\City\\Country} % Your address     \setkomavar{fromphone}{(000) 111-1111} % Your phone number     \setkomavar{fromemail}{john@smith.com} % Your email address     \setkomavar{place}{} % City written before the date, put your city here if you want this     \setkomavar{signature}{John Smith} % Your name as you want it to appear in the signature          % These are not used in this document, uncomment if you would like to use them and refer to them as \usekomavar{name}     %\setkomavar{fromfax}{+1 (1)23 456789} % Your fax number     %\setkomavar{fromurl}{http://www.johnsmith.com} % Your personal website     %\setkomavar{frombank}{Postbank 9307157}          %----------------------------------------------------------------------------------------     %  HEADER SECTION     %----------------------------------------------------------------------------------------          \firsthead{     \centering     {\addfontfeature{LetterSpace=20.0}\fontsize{36}{36}\selectfont\scshape \usekomavar{fromname}}\\[5mm]     \fontsize{21}{21}\selectfont\scshape Programmer at Initech } % Your current job title          %----------------------------------------------------------------------------------------     %  FOOTER SECTION     %----------------------------------------------------------------------------------------          \firstfoot{     \centering     \addfontfeature{LetterSpace=20.0}\scshape     {     \renewcommand{\\}{\ {\large\textperiodcentered}\ }     \usekomavar{fromaddress}     }\\     {\Large\Letter} \usekomavar{fromemail} \ {\Large\Telefon} \usekomavar{fromphone} % If you want your fax number or website URL showing, add it here; you may need to play around with spacing     }          %----------------------------------------------------------------------------------------          \begin{document}          %----------------------------------------------------------------------------------------     % COVER LETTER CONTENTS     %----------------------------------------------------------------------------------------          \begin{letter}{ % Address of the company you are applying to     HR Dept. --- Corporation\\     123 Pleasant Lane\\     12345 City, State     }          \setkomavar{subject}{Cover Letter} % This is the bold text saying 'Cover Letter', remove it if you don't like it          \opening{Dear Recruiter,}          PARAGRAPH ONE: State the reason for the letter, name the position or type of work you are applying for and identify the source from which you learned of the opening.\\          PARAGRAPH TWO: Indicate why you are interested in the position, the company, its products, services - above all, stress what you can do for the employer. If you are a recent graduate, explain how your academic background makes you a qualified candidate for the position. If you have practical work experience, point out specific achievements or unique qualifications. Try not to repeat the same information the reader will find in the resume. The purpose of this section is to strengthen your resume by providing details which bring your experiences to life.\\          PARAGRAPH TWO: Indicate why you are interested in the position, the company, its products, services - above all, stress what you can do for the employer. If you are a recent graduate, explain how your academic background makes you a qualified candidate for the position. If you have practical work experience, point out specific achievements or unique qualifications. Try not to repeat the same information the reader will find in the resume. The purpose of this section is to strengthen your resume by providing details which bring your experiences to life.\\          PARAGRAPH TWO: Indicate why you are interested in the position, the company, its products, services - above all, stress what you can do for the employer. If you are a recent graduate, explain how your academic background makes you a qualified candidate for the position. If you have practical work experience, point out specific achievements or unique qualifications. Try not to repeat the same information the reader will find in the resume. The purpose of this section is to strengthen your resume by providing details which bring your experiences to life.\\          PARAGRAPH THREE: Request a personal interview and indicate your flexibility as to the time and place. Repeat your phone number in the letter. End the letter by thanking the employer for taking the time to consider your credentials.\\          Sincerely yours, \\ \\ \\     \usekomavar{signature}          %----------------------------------------------------------------------------------------          \end{letter}     \end{document}


title: Build table with different cells sizes

text: I have written this code for the table shown bellow on the left but I like to make some modifications so it looks like the table on the right. Can you help me?               \begin{table}[t]\footnotesize\renewcommand{\arraystretch}{1.2}\addtolength{\tabcolsep}{-1pt}     \begin{center}     \begin{tabular}{ c || c | c || c | c ||}     \hline     {\bf Types} & \multicolumn{2}{c|}{\bf Line A} & \multicolumn{2}{c|}{\bf Line B} \\\hline\hline      & a  & b & a  & b \\\hline     x & d  & 2 & 76  & 2 \\\hline     y & 1 & 3 & 74 & 3 \\\hline\hline     z & \multicolumn{2}{c|}{4a} &\multicolumn{2}{c|}{4a} \\     \hline       \end{tabular}     \caption{ll}     \label{table:senspec}     \end{center}     \end{table}      ![enter image description here](http://i.stack.imgur.com/W8wAs.png)


title: Putting footnotes on same page as table that references them

text: I've got a `\tabularx` with two `\footnote` marks immediately followed by two `\footnotetext`. I would like them to show up on the same page, but tex is pushing the table to the following page making relating the footnotes to the table difficult. I tried `\samepage,` but that doesn't seem to keep them together. Thoughts?


title: How do I make WinEdt show the TOC (Table of Contents)?

text: How do I make WinEdt show the TOC (Table of Contents) used for navigation? Similar to the TOC visible in the image below (source: WinEdt Snapshots): ![enter image description here](http://i.stack.imgur.com/HaXdK.png)


title: Why doesn't this code compile?

text: Why doesn't this code compile?               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \GraphInit[vstyle=Classic]     \SetGraphUnit{2}     \Vertices{circle}{A,B,C,D}     \Edges(A,B,C,D,A,C)     \SetVertexNoLabel     \AddVertexColor{red}{B,D}     \AddVertexColor{green}{A}     \AddVertexColor{blue}{C}     \end{tikzpicture}     \end{document}


title: Double space between sentences.

text: I've been reading a question on spaces between sentences on a sister site. The answers there seem to imply that the days of double spacing between sentences are over, and that this was a relic of the type-writer and mono-spaced fonts. I was a little surprised by this, so I took a look in two magazines I have at hand: The NewYorker, and The Economist. I was surprised to notice that indeed, it doesn't seem that they use double-space between sentences. Are we (*tex users) "behind the times"? Or are we in the right and everyone else is trying to save a space in an inappropriate place? Perhaps this is just lazyness of modern type-setters and editors (since they dont use latex...). What is the typesetters' profesional opinion about this? Finally, to make the question relevant to this site: What command will make my documents look like that too (If I so wanted to...)? In orther words, how to cancel this double-space between sentences, and make the spacing always single space?


title: Technical documentation class

text: I just made a component that is going to be added to our platform in the next month. As such I need tu draw out some documentation for the guys that will do the integration. Is there any class that allows me to quickly produce technical documentation or do I need do engineer it myself?


title: geometry sets footskip too small

text: I'm using the `geometry` package to change the header and footer of my page to specific values. Until now, it wasn't possible for me to get the footer in the right dimensions. The header looks has its 17mm, but the footer doesn't. Here is a minimal example which I compile with `LuaLaTeX`.               \documentclass[paper = a4]{scrartcl}      \usepackage{blindtext, fontspec}     \usepackage[automark, headsepline, footsepline, plainheadsepline, plainfootsepline]{scrpage2}     \pagestyle{scrheadings}     \usepackage[  includeheadfoot                 , headheight = 17mm                 , footskip = 17mm                 , tmargin = 0mm                 , bmargin = 0mm                 , verbose                ]{geometry}          \begin{document}     \Blinddocument     \end{document}      Do you have an idea, how to get a footer with 17 mm, too?


title: Missing character in BibTeX

text: During compiling literature using BibTeX I've got the following message in the log file:               This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8)      (preloaded format=pdftex  010.12.7)  7 DEC 2010 00:33 entering extended mode     Missing character: There is no ę in font cmr10!      What should I do to fix this problem?


title: What are the advantages of TikZ/PGF over PSTricks?

text: The first time I saw the PSTricks' 3D Galleries, I immediately felt in love with it. I have spent much time to learn and use it. In this forum, I see many people using TikZ. I have not used TikZ yet. But now I am confused why there are so many people discussing TikZ rather than PSTricks. Probably there are special things, in TikZ, that surpass featurs offered by PSTricks. Learning new thing really takes time and need hard effort.   1. So Is it worth investing time in learning TikZ even though I already know PSTricks?   2. Or Should I leave PSTricks and migrate to TikZ?


title: Defining #1^#2 as \overset{#2}{#1} for some characters

text: When I write math in `xelatex`, I like notation such as:               $x \overset{ℝ}{+} y$       $x \overset{f}{↦} y $       $x \overset{(1)}{=} y$      However, as I type things like this so often, I would like to type it faster, and to keep the source code better readable (in the sense of quick scanning the code). I thought about three things, from which I don't how to do it (or if it is possible):   1. Defining `#1^#2` as `\overset{#2}{#1}` when `#1∈{+,↦,=,→}` and maybe more   2. Defining `#1^^#2` as `\overset{#2}{#1}` for all `#1`   3. Defining `#1↖#2` as `\overset{#2}{#1}` for all `#1` I prefer option 1, but I'm not sure if this is possible. I think it should be possible as `\sum`, `\int` and `\prod` already act in this way.


title: Index in table of contents without page number

text: I use `\addcontentsline` for putting an entry for the index in the table of contents, but I don't want the page number and I want a hyperlink. How can I do this?               \documentclass{book}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage[makeindex]{splitidx}     \usepackage{hyperref}     \newcommand{\ITerm}{IndexTerms}     \newcommand{\IServ}{IndexServs}     \newcommand{\MyLarge}{\Large}     \newcommand{\smindexxspecial}[2]{{\MyLarge#2} \sindex[#1]{#2}}     \newcommand{\smindexspecial}[2]{{\MyLarge#2}\sindex[#1]{#2}}     \newcommand{\smindexvspecial}[2]{{\MyLarge#2}\sindex[#1]{#2}}     \newcommand{\smsindexspecial}[2]{{\MyLarge \url{#2}}\sindex[#1]{#2}}     \newindex[General Index]{IndexTerms}     \newindex[Websites]{IndexServs}     \tableofcontents     %\addcontentsline{toc}{chapter}{General Index}     \addtocontents{toc}{\protect\contentsline {chapter}{General Index}{}{}}     \printindex[\ITerm]     \addcontentsline{toc}{chapter}{Websites}     \printindex[\IServ]              And this is the end of the story.     \end{document}      When I do this one               \addtocontents{toc}{\protect\contentsline {chapter}{General Index}{}{}}      It appears without pagenumber in table of contents, but without hyperlink. But when I use this one               %\addcontentsline{toc}{chapter}{General Index}      I have page number and a hyperlink. Also I want it without pagenumber and with hyperlink. I should mention that this is nothing to do with index termns page but with index names.. I have two index. The first one named as General Index and the other one Websites. I want this index names in table of contents.


title: To put lim over the arrow?

text: I want to have the `N \to \infty` over the arrow like ![enter image description here](http://i.stack.imgur.com/rmQ26.png) **How can you have something over the arrow?**


title: Error in LaTeX file

text: \documentclass[12pt,a4paper]{article}     \usepackage{amsmath}\usepackage{amssymb}     \usepackage{tabularx}     \usepackage{graphicx} \usepackage{hyperref}     \usepackage{lscape}     \usepackage{rotating}     \newcommand{\specificthanks}[1]{\@fnsymbol{#1}}% Inserts a specific \thanks symbol     \usepackage[left=1.25in, right=1.0in, top=1.25in, bottom=1.0in]{geometry}     \usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables for horizontal lines     \newcommand{\piRsquare}{\pi r^2}             \title{{\Large Profitability of Moving Averages in the European Stock Market\thanks{My special thanks go to my supervisor Prof.Dr.Name for the excellent guidance and the provided dataset.}}}           \author{ ABC \thanks{University World Email: \url{http://abc@xyz.com}}}}         \date{December 20, 2013}                     %     \begin{document} \baselineskip=22pt     \begin{landscape}     \maketitle     %     \centerline{\bf ABSTRACT}     In this line abstract will need to be written.     %     \medskip          \medskip\medskip     %     \noindent \textbf{JEL Codes:} G11; G14;          \noindent \textbf{Keywords:} Technical Analysis; Moving Averages; Market Efficiency;          \medskip          \medskip\medskip          \noindent \textsc{Since the existence of} stock markets, is one of the controling...      \end{document}       In the LaTeX file I found a problem in a footnote but I couldn't solve it. When I open the file with the Kile editor, it compiles easily, but in Winedit, it is showing an error. What has actually happened?


title: having trouble with the \pause command!

text: When i use the `\pause` commande & right click, it doesnt take me to the next slide. I am forced to scroll down to see the other slides. Please help!               \documentclass{beamer}          \usepackage[frenchb]{babel}      \usepackage[T1]{fontenc}      \usepackage[latin1]{inputenc}      \usepackage{newcent}          \usetheme{Warsaw}          \begin{document} % les pauses          \begin{frame}      Ce texte sera directement affiché lors de l'apparition de la page.\\     \pause Ce texte s'affichera après un clic de la souris ou alors après avoir appuyé sur la flèche de droite de votre clavier.\\     \pause Et encore un autre clic et on aura ce texte là. Magnifique non ?      \end{frame}          \end{document}


title: Headline Table of Contents in columns in Beamer

text: I was wondering if anyone knows how to tell Beamer to divide the table of contents in the headline in columns if there are too many sections, else leave it in one column. I found this thread very useful Beamer with Warsaw Theme: Two column navigation However, with this code, the ToC will always show up in two columns, which is not always esthetically pleasing (when there are only 2 sections, for example). I am working on a customized template for my institution, which is why I need to make it as versatile as possible. I was thinking of something along the lines of keeping the default \insertsectionnavigation if the height of the table of contents is smaller than or equal to the height of the headline, else divide. But I am having trouble turning this into proper code. Thank you for your help.


title: How to insert a page break between a figure and its caption?

text: Is it possible to insert a page break or put the figure caption on the following page. The figure is too big for both the figure and caption to fit on a single page.               \begin{figure}     \centering     \includegraphics[width=1\textwidth]{Figure.pdf}     \caption{caption}      \label{label}     \end{figure}      Using `\clearpage` or `\pagebreak` before `\caption` doesn't work. Cheers


title: How to change arrow to \Rightarrow in psmatrix?

text: I would like to change arrow to `\Rightarrow` in `psmatrix`, how can I do that? Actually I do not need the arrows to be so long. Because G, H, R are statements, I just want to show the imply relations. code that is not `\Rightarrow` but `\rightarrow` is as follows.               \documentclass[12pt,leqno]{article}     \usepackage{pstricks,pst-node}     \newcommand{\ds}{\displaystyle}          \begin{document}     \thispagestyle{empty}          \begin{psmatrix}               &       $ G        &   \\     $H$     &                   & $R $      \psset{arrows=->,arrowscale=2,labelsep=3pt,nodesep=3pt}     \ncline{2,1}{1,2}     \ncline{1,2}{2,3}     \ncline{2,1}{2,3}          \end{psmatrix}      ![enter image description here](http://i.stack.imgur.com/H7tk2.png)


title: unaltered citation in theorem

text: I would like to keep the way my citations are presented to be uniform. When I enter a citation after I declare my theorem it's in italic just like the text for the theorem. Whereas the citations in the body of the text are not. I'm currently using                \makeatletter      \renewcommand*{\@cite@ofmt}{\bfseries\hbox}      \makeatother      to make the number in the square bracket bold. for instance what I would like: **Theorem 2.1** [ **3** ] statement what I currently have is: **Theorem 2.1** _[ **3** ] statement_


title: Huge white-space in latex template (springer journal)

text: I downloaded springer journal template from Springer Manuscript and after I compiled, there is a huge white-space on the right. White-space was there even if I use the sample from the template directly, anyone know how I can solve that?


title: Drawing 3d diagrams

text: I would like to use a few simple 3d diagrams in my LaTeX document. They primarily consist of polyline segments in 3d, along with an occasional simple surface (e.g. paraboloid). There are two questions: 1) Is there a good way to draw polylines in 3d that conveys the depth? I thought about fading based on distance from the eye, and also of shadows of the drawing on the coordinate planes, but I am not sure how well it'd work in practice. I'd love hear how others solved this/see some examples that I can imitate. 2) What are the drawing packages that are compatible with LaTeX that would make the task of drawing easier. I know of asymptote which can draw parametric 3d surfaces, but are there others?


title: Justification of paragraph

text: 1. How can I force justify the paragraph. As you can see the words are flowing out. ![1](http://i.stack.imgur.com/cLQMi.png) MWE : Download


title: Vertical grid lines not showing when using `xticksize`

text: Consider the following example:               \documentclass{article}          \usepackage{pst-coil,pst-plot}          \begin{document}          \begin{figure}      \centering      \psset{unit=0.6}       \begin{pspicture}(-2.0,-0.7)(18.2,11.2)         % x-axis.         \psaxes[           yAxis=false,           xLabels={1997,,,2000,,,,,2005,,,,,2010}         ]{->}(1,0)(0,0)(15.5,0)[Something,0][,90]         % y-axis.         \psaxes[           xAxis=false         ](0,0.25)         \psyTick(0){0}         \pszigzag[           coilarm=0.0625,           coilwidth=0.3,           coilheight=0.5         ](0,0.25)(0,0.75)         \psaxes[           xAxis=false,           Oy=10,           dy=1,           Dy=2,           ylabelFactor={\cdot 10^6},           ticklinestyle=dotted,           tickwidth=0.5pt,           xticksize=10 19, % Wrong!           yticksize=0 15         ]{->}(0,1)(0,0.75)(0,10.5)[,0][Something else,90]         \psline[           linecolor=blue         ](1,4.55)(2,4.55)(2,4.9)(3,4.9)(3,5.95)(4,5.95)(4,7.35)(6,7.35)(6,8.6)(9,8.6)(9,10)(10,10)         \rput*(4.5,9){\shortstack[l]{%           \footnotesize{Antal}\strut\\[-0.5ex]           \footnotesize{passagerer,}\strut\\[-0.5ex]           \footnotesize{lufthavnen}\strut\\[-0.5ex]           \footnotesize{kan betjene}\strut         }}         \psline[           linecolor=red         ](1,4.3)(2,4.7)(3,5.1)(4,5.5)(5,6)(6,6.45)(7,7)(8,7.55)(9,8.1)(15,9.6)         \rput*(9,6){\shortstack[l]{%           \footnotesize{Forventet}\strut\\[-0.5ex]           \footnotesize{passagertal}\strut         }}       \end{pspicture}     \end{figure}          \end{document}      ![output](http://i.stack.imgur.com/f4fWU.jpg) The vertical lines in the grid are not showing. I am rather sure it is because I have chosen the wrong beginning and end parameters (`10` and `19`) but I have no idea what the correct ones are; any help on this simple question will be much appreciated.


title: Turning off TeXnical enhancements

text: I want to create a table for comparing TeX's typography with that of (approximated) other document solutions. I'd like to turn off _all_ TeXnical enhancements for a single column of text—no ligatures, no good kerning, etc. I'm trying to use `fontspec` to do this, since Computer Modern simply doesn't have the ligatures I'm also looking to show off (`fj` for example). Since the solution doesn't particularly ride on being usable in a table (to my knowledge), any solution where such typography is turned off within a group would work. :-) Here is my attempt at a solution:               \documentclass{article}     \usepackage{fontspec,booktabs,array}     \begin{document}     \begin{table}       \centering     {       \setmainfont{Hoefler Text} % Linux Libertine also has fj I believe,                                  % but I do not have it installed on my system       \begin{tabular}{ c >{\addfontfeature{Ligatures=NoCommon}}c }         \toprule         \TeX & \MicrosoftWord \\         \midrule         Table & T{}a{}b{}l{}e \\         SALT  & S{}A{}L{}T    \\         AVAST & A{}V{}A{}S{}T \\         \midrule         efficient firefly & e{}f{}f{}i{}c{}i{}e{}n{}t f{}i{}r{}e{}f{}l{}y \\         \bottomrule       \end{tabular}     }       \caption{A comparison of \TeX\ and other word processing solutions         (such as \MicrosoftWord) in regards to         kerning, ligatures, and small capitals}       \label{tab:compare}     \end{table}     \end{document}      which does successfully turn off ligatures, but I've _no_ idea how to 'turn off' kerning other than what I'm doing right now, which is very much not in the spirit of TeX (one that I am actively trying to advertise).


title: Newcommand for table

text: I have to use certain table format again and again, so I decided to create a new command for better tex file readability. Table as such works but when I put a working table header then it gives me a error. Here is the code               \newcommand{\Vigrah}[3]{     \begin{table}[htbp]       \centering       \caption{#1}     \begin{tabular}{|p{2cm}|p{13cm}|}         \addlinespace         \toprule     लौकिक    & {#2} \\     अलौकिक & {#3} \\         \bottomrule         \end{tabular}%       \label{tab:addlabel}%     \end{table}%     }      I was calling this by \Vigrah{Name }{text 1}{ text 2} what am I doing wrong. Is it possible to do?


title: Understanding forest options when customising trees

text: This is a follow-up to Gonzalo Medina's answer to this question. The solution offered there includes the following code at the start of the `forest` environment:                 edge path={         \noexpand\path[\forestoption{edge}]           (!u.parent anchor) -- +(0,-13pt) -|              (.child anchor)\forestoption{edge label};       },      How does this code achieve the desired layout? I am unclear how the explanation of the relevant option on page 33 of the manual relates to the resulting diagram. In general, I find `forest`'s documentation rather difficult to follow when it comes to customising tree layout (as opposed to specifying the relationships between nodes etc.) but I would like to understand it since `forest` seems to be more powerful and flexible in principle than the available alternatives. For completeness, the full code of Gonzalo Medina's solution is:               \documentclass{article}     \usepackage{forest}          \begin{document}          \begin{forest}      where n children=0{font=\sffamily}{},     for tree={       edge path={         \noexpand\path[\forestoption{edge}]           (!u.parent anchor) -- +(0,-13pt) -|              (.child anchor)\forestoption{edge label};       },       l sep=10pt,     }      [\mbox{}       [$C1_2$         [$C1$ [a]]         [$C2$ [b]]         [$C3$ [c]]         [$C4$ [d]]       ]       [$C2_2$         [$C5$ [e]]         [$C6$ [f]]         [$C7$ [g]]         [$C8$ [h]]       ]     ]     \end{forest}          \end{document}


title: How can I prevent TeX hyphenating one occurrence of a word (locally)?

text: I'm currently typesetting a test using the `exam` class and the test consists of some True or False statements. Some statements span a couple of lines, but some could fit in a single line, except for the last word, which is hyphenated, like so:               O momento angular de um sistema pode mudar sem a ação de torques ex-     ternos      I know I can _make_ hyphenations by using `tor\-que`, but I would like to know if there is an opposite that works _locally_ , i.e., not adding `\hyphenation{torque}` to the preamble because I may want this word hyphanated at some other point. I know that `\mbox{…}` does the trick, but I'm not sure if it's a kludge and there's a better solution, specially without extra packages. Ideas?


title: Adding figure in framed or shaded environment

text: I am currently using the `shaded` environment from the `framed` package for large calculation digressions in my papers.               \usepackage{framed}     \newenvironment{digression}[1]{\begin{shaded} \noindent\textbf{\sc {#1}\\} }{ \end{shaded} } % or snugshade     \definecolor{shadecolor}{gray}{0.9}      Unfortunately, when I try to include a figure within such a digression, I get the error `! LaTeX Error: Float(s) lost.` I'm using tikz right now, but ideally I'd like it to be in a wrapfigure since it's such a small figure..


title: Pdflatex problem with Texstudio and Miktex 2.9

text: I'm trying to build a tex file with TeXstudio 2.3 (and MikTeX 2.9 installed separately), which builds with no problem using LEd. When I run pdflatex with TeXstudio, I get the error message (and thus the .pdf is not generated):               Process started: "C:/Program Files/MiKTeX 2.9/miktex/bin/pdflatex.exe" -synctex=1 -interaction=nonstopmode "project".tex          pdflatex.exe: The MiKTeX web service has rejected your request. Possible reason: too many requests arriving from your IP address. pdflatex.exe: Data:      pdflatex.exe: Data:      ERROR     pdflatex.exe: Data:      Access Denied     pdflatex.exe: Data:           pdflatex.exe: Data:      pdflatex.exe: Data:      pdflatex.exe: Data: pdflatex.exe: Data: Access Denied by security policy pdflatex.exe: Data: pdflatex.exe: Data:      pdflatex.exe: Data:      pdflatex.exe: Data: The security policy for your network prevents your request from  pdflatex.exe: Data: being allowed at this time. Please contact your administrator if pdflatex.exe: Data: you feel this is incorrect. pdflatex.exe: Data:      pdflatex.exe: Data: pdflatex.exe: Data:      Process exited normally      Also, I run pdflatex on command line, and it generates the .pdf with no problem (no policy problem), and the pdflatex command is configured as               pdflatex.exe" -synctex=1 -interaction=nonstopmode %.tex      Should I configure something to fix this?


title: array of organizations with a default?

text: I am trying to make a custom list, that has a default value, without being dependent on too many other packages because I am trying to get some very specific formatting. I am trying to use this for a custom coverpage that I hope to put into a custom CLS. I imagine this as working               \organization{2nd organization}     \organization{3rd organization}     \makecustomcover      I hope this will render:               1st organization     2nd organization     3rd organization      Obviously, \makecustomcover will iterate over the values; however, I'm unclear the best way to "push" them into a stack. I'm also unclear of the best way to have the default one. Any advice or references that would discuss this would be appreciated.


title: How to install arara with MiKTeX / Windows?

text: Arara is a tool to automate your LaTeX workflow. It comes pre-installed with `TeXLive 2012`. However, I could not find any reference on how to install it on MikTeX / Windows. In the documentation it says, that there is an executable on the github page, but there is none. MikTeX does not have it in their repository either. How to install `Arara` on Windows?


title: Alignment in the Leftbar Environment. Is Rightbar possible?

text: In this question I asked about changing the indentation (on the left) in the `leftbar` environment. I've got things nicely lined up (with the bar outside of the text field), but there is a little bit of space on the right side that I'd like to remove. Also, how does one convert a _leftbar_ into a _rightbar_?               \documentclass{article}     \usepackage[centering]{geometry}     \usepackage{lipsum}          \newlength{\leftbarwidth}     \setlength{\leftbarwidth}{3pt}     \newlength{\leftbarsep}     \setlength{\leftbarsep}{10pt}          \usepackage{xcolor}     \usepackage{framed}     \renewenvironment{leftbar}[1][\hsize]     {%      \def\FrameCommand      {%          {\hspace{-7pt} \color{black} \vrule width 2pt}%     \hspace{0pt}%must no space.     \fboxsep=\FrameSep\colorbox{white}%     }%     \MakeFramed{\hsize#1\advance\hsize-\width\FrameRestore}%     }     {\endMakeFramed}     \setlength{\FrameSep}{5pt}               \begin{document}     \lipsum[3]     \begin{leftbar}     \lipsum[3]     \end{leftbar}     \lipsum[3]     \end{document}


title: How to get a 1-click compilation of XeLaTeX with Biber using arara?

text: I want to use XeLaTeX as typesetting engine and Biber for my references. I want to have a 1-click-compilation setup, preferably in a GUI editor. I work on Windows, thus a solution for TeXworks or TeXnicCenter would be great. For `TeXnicCenter`, I wonder how to tweak the existing setting to use `XeLaTeX` and `Biber`: ![enter image description here](http://i.stack.imgur.com/ozGDd.png) Also, for TeXworks, I have no idea how to set it up properly: ![enter image description here](http://i.stack.imgur.com/wF4pY.png) I would love to know how to set up the two editors in Windows. However, please feel free to add solutions also for other editors.


title: Redefine \part style

text: I'm using `\documentclass{book}`. I want to modify my `\part` style so that I can get a page that for instance illustrates the following content (basically Part title + a quote at the bottom):               \begin{flushleft}     \chapter*{\Huge\scshape Part I:\\ Part Title}     \end{flushleft}          \addcontentsline{toc}{chapter}{Part I: Part Title}               \vspace*{3cm}     \epigraph{``bla bla.''}{Mr. Bla-Bla}


title: Differentiating multiple authors having same surname (last name)

text: I am citing works of two authors, say, `K. Lee 2010` and `V. Lee 2010`. When I used `apacite` package, it took care of making sure that in the text if multiple authors have same surname then their first name is also used. However, now I am using ACM journal provided `bst` file which quotes both of them as `Lee 2010` and hence it becomes unclear. I am using BibTeX (`biblatex` conflicts with journal provided format). I tried to search on google but could not find much except this. Can you tell how I should address this. Here is an MWE.               \documentclass[acmnow]{acmtrans2m}     \begin{document}     First is \cite{vlee2010}. Second is \cite{jlee2010}.      \bibliographystyle{acmtrans}     \bibliography{temp}     \end{document}      Bibtex file is:               @inproceedings{vlee2010,       title={{First paper}},       author={Lee, VCCC and  others},       booktitle={xyz},             year={2010},          }     @inproceedings{jlee2010,       title={{Second Paper}},       author={Lee, JCCC and others},       booktitle={pqr},         year={2010},       }      The style and bst files used are: style file and bst file Output comes:               First is [Lee et al. 2010b]. Second is [Lee et al. 2010a].     REFERENCES     Lee, J. et al. 2010a. Second Paper. In pqr.     Lee, V.  et al. 2010b. First paper. In xyz.