title: Block quote with big quotations - white on black

text: There is are some very nice answers to the question of how to put large quotation marks around a block of text at Block quote with big quotation marks. Using the first answer (which uses tikz) but with white text on a black background gives me a large white rectangle over the text. How can you change it to work with slides (I am using beamer) that have white text on a black background? Example that gives the problematic white box over the text.               \PassOptionsToPackage{svgnames}{xcolor}     \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{libertine} % or any other font package (or none)     \newcommand*\quotefont{\fontfamily{fxl}} % selects Libertine for quote font     \usepackage{tikz}     \usepackage{framed}     % Make commands for the quotes     \newcommand*{\openquote}{\tikz[remember picture,overlay,xshift=-15pt,yshift=-10pt]      \node (OQ) {\quotefont\fontsize{60}{60}\selectfont``};\kern0pt}     \newcommand*{\closequote}{\tikz[remember picture,overlay,xshift=15pt,yshift=10pt]      \node (CQ) {\quotefont\fontsize{60}{60}\selectfont''};}     % select a colour for the shading     \definecolor{shadecolor}{named}{Azure}     % wrap everything in its own environment     \newenvironment{shadequote}%     {\begin{snugshade}\begin{quote}\openquote}     {\hfill\closequote\end{quote}\end{snugshade}}          %\usetheme{Darmstadt}     \usefonttheme[onlylarge]{structurebold}     \setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}     \setbeamertemplate{navigation symbols}{}          \setbeamercolor{background canvas}{bg=black}     \setbeamercolor{normal text}{fg=white}          \makeatletter          \makeatother          \begin{document}     \begin{frame}     \begin{shadequote}     A common mistake that people make when trying to design something completely     foolproof is to underestimate the ingenuity of complete fools.\par\emph{Douglas Adams}     \end{shadequote}     \end{frame}          \end{document}


title: Make a polygon with automatically labelled nodes according to their coordinates

text: The goal: Make a polygon (and a circle containing that polygon at the nodes of the polygon, without the polygon's lines) with automatically numbered nodes according to their coordinates (x,y) [which latex must calculate] or unique names. [EDIT: I have added a different MWE (Ignasi's), to clarify, since it does away with two macros in my old MWE at expense of one option. In this example: how does one control the size of the dots on the nodes [the option lost], and to make (x,y) coordinate positions of the nodes their visible labels, as per title of the question?] Of course,               \node (n1) at (x,y) {$1$};      or               \node (n1) at (x,y) {$\boldsymbol{W_1(z)}$};      or               \node (n1) at (x,y) {$(x,y)$};      could be done manually on top any figure otherwise made but for more many nodes makes for long code and lots of guessing where (x,y) the nodes on the circle or polygon actually are. !!! The labels should preferably all be away from the lines of the nodes, like here: Drawing a regular polygon encompassed by a circle MWE(Ignasi):               \documentclass{minimal}     \usepackage{amsmath}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{shapes.geometric}          \begin{document}          \begin{tikzpicture}[scale=1]     \foreach \a in {4,...,5}     {     \draw[blue, solid, line width = 1mm] (\a*7,0) circle(3cm);     \node[regular polygon,         regular polygon sides=\a,         minimum size=6cm,         draw] at (\a*7,0) (A) {};     \foreach \i in {1,...,\a}         \node[circle,         label=above:{$w_\i(z)$},         fill=red] at (A.corner \i) {};     }     \end{tikzpicture}          \end{document}      MWE(old):               \documentclass{minimal}     \usepackage{amsmath}     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          %POLYGON command     \newcommand{\polygon}[2]{%     let \n{len} = {2*#2*tan(360/(2*#1))} in     ++(0,-#2) ++(\n{len}/2,0) \foreach \x in {1,...,#1} { -- ++(\x*360/#1:\n{len})}}          %DOTS command     \makeatletter     \tikzset{         dot diameter/.store in=\dot@diameter,         dot diameter=3pt,         dot spacing/.store in=\dot@spacing,         dot spacing=7pt,         dots/.style={         line width = \dot@diameter,         line cap = round,         dash pattern = on 0pt off \dot@spacing}             }\makeatother          %BEGIN          \begin{tikzpicture}     \node (n1) at (-2,-2) {$\boldsymbol{0}$};          \draw[black, dot diameter=3pt, dot spacing=40pt, dots] (0,0) circle (2);     \draw[black, solid, line width=0.5mm] (5,0) \polygon{9}{2};     \draw[black, solid, line width=0.5mm] (10,0) circle (2);     \end{tikzpicture}          %figure out how to automatically number nodes          \end{document}


title: keyboard shortcut does not work in TEXnicCenter

text: I have recently used TXnicCenter . But it is a matter of surprise that keyboard shortcut is not working here . Like I am trying to select all text by pressing `Ctrl`+`A` or want to build output by pressing `Ctrl`+`F5` But no shortcut is working here . What could be the probable solution ? My keyboard is completely right because it works in Microsoft office .


title: Stretching text vertically

text: Is it possible to stretch text vertically? Like this: ![enter image description here](http://i.stack.imgur.com/S1K1U.png)


title: ellipsis+titletoc+…(utf character) : does it also cause a bug and how to solve it?

text: ## The error In the MWE               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{titletoc, ellipsis}          \begin{document}          \addcontentsline{toc}{section}{So…}          \end{document}      I get the error (when using `pdflatex`)               Undefined control sequence.     \textellipsis ->\futurelet \ellipsis@token                                                 \@textellipsis      l.7 \addcontentsline{toc}{section}{So…}      # My question How can solve this issue and do you also encounter this bug? Thanks!


title: How to obtain the current page number in ConTeXt?

text: I want to obtain the current page number, for use in Lua conditionals, e.g.:               \startlua         if 10 <= \pagenumber < 20 then             context("The pages are between 10 and 20")         end     \stoplua        * According to this article on counters at the ConTeXt wiki, I think `\getnumber[page]` should display the page number in a document, but it does not display anything.   * I thought How to compare two counters using TeX conditionals in ConTeXt? would provide the answers, but `\rawstructurecountervalue` seems to be undefined in my version of ConTeXt. How can I display and work with the current page number in ConTeXt?


title: How to set a fixed (or remove) whitespace border around subfloat when using subcaption package

text: Say for example I have the following code for a double-column article:               \begin{figure*}         \centering         \begin{subfigure}[t]{0.96\textwidth}                 \centering                 \includegraphics[width=\textwidth]{test/rest_fin.jpg}\hfill         \end{subfigure}              \begin{subfigure}[t]{0.96\textwidth}                 \centering                 \includegraphics[width=\textwidth]{test/rest_tex.jpg}\hfill         \end{subfigure}              \begin{subfigure}[t]{0.48\textwidth}                 \centering                 \includegraphics[width=\textwidth]{test/def_fin.jpg}\hfill         \end{subfigure}         \begin{subfigure}[t]{0.48\textwidth}                 \centering                 \includegraphics[width=\textwidth]{test/def_rem_fin.jpg}\hfill         \end{subfigure}              \begin{subfigure}[t]{0.48\textwidth}                 \centering                 \includegraphics[width=\textwidth]{test/def_tex.jpg}\hfill         \end{subfigure}         \begin{subfigure}[t]{0.48\textwidth}                 \centering                 \includegraphics[width=\textwidth]{test/def_rem_tex.jpg}\hfill         \end{subfigure}         \caption{Worm example}\label{fig:worm}     \end{figure*}      Can I control the white border around each image? Either to set it at a fixed number, or remove it completely?


title: Nodes near coords gives Undefined Control Sequence

text: I have the following example of a graph. I want to place the items in the table "Restart" next to the nodes. Everything works until I add "nodes near coords", I get a bunch of errors saying "Undefined Control Sequence \end {axis}" and "Missing control sequence inserted \end{axis}" I'm using the latest pgfplogs (v1.8), the wierd part is that when I enable the nodes near coords option I do get errors but my graph also draws correctly.               \documentclass[10pt,a4paper]{article}     \usepackage{xcolor}      \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \begin{document}     \begin{figure}     \begin{tikzpicture}         \begin{axis}[         % If I remove nodes near coords line everything works, if I enable it, I get errors             nodes near coords={\label},             cycle list name=exotic,              visualization depends on={value \thisrow{Restart} \as \label},               every node near coord/.append style={                 anchor=mid west,                 xshift=1pt,                 yshift=5pt,                 font={\footnotesize}             },             clip mode=individual,             ylabel={Error (m)},              xlabel={Standard Deviation (m)},             axis x line=bottom,             axis y line=left,             ylabel style={font=\footnotesize},             xlabel style={font=\footnotesize},             yticklabel/.append style={font=\sffamily\footnotesize},             xticklabel/.append style={font=\sffamily\footnotesize},             ymax=11,             ymin=-1,             symbolic x coords={0.10, 0.20, 0.50, 0.75, 1.00, 1.25, 1.50, 1.75, 2.00, 2.50, 3.00, 3.50, 4.00, 4.50, 5.00},             xtick=data,             xticklabel style={             inner sep=2pt,                 xshift=1.5pt,                 anchor=north east,                 rotate=45             },             x axis line style={-},               ]         \pgfplotsset{cycle list shift=+5}              \addplot+[dashed, mark options=solid,             /pgfplots/error bars/.cd,                 x dir=none,                 y dir=both,                 error bar style={thin,solid},                 y explicit,                 ]         table [x={Standard Deviation (m)},y={Error (m)}, y error=Variance, col sep=comma] {     Restart,{Standard Deviation (m)},{Error (m)},Variance     4,0.10,9.580479722,0.004650518     3,0.20,7.041733905,0.000561627     4,0.50,1.07983849,0.030414248     2,0.75,0.058386362,0.025176577     3,1.00,0.532316937,0.059721487     3,1.25,5.86951615,0.360786607     3,1.50,0.586363552,0.082407842     2,1.75,9.873261494,0.029932573     3,2.00,6.352042095,1.410836942     0,2.50,0.45595227,0.157863302     1,3.00,0.251621273,0.150290522     0,3.50,0.274931276,0.173965793     0,4.00,0.198035166,0.176157261     0,4.50,0.404109133,0.29203061     0,5.00,0.237515925,0.476506476     };         \end{axis}     \end{tikzpicture}     \end{figure}     \end{document}      This is the error message in the log that I get, it keeps repeating for a while (I think):               ! Undefined control sequence.     \pgfplotsaxisvisphasetransformpointmeta ...@trafo                                                        {\pgfplotspointmeta }\let ...     l.68     \end{axis}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          Missing character: There is no 1 in font nullfont!     Missing character: There is no Y in font nullfont!     Missing character: There is no 9 in font nullfont!     Missing character: There is no . in font nullfont!     Missing character: There is no 5 in font nullfont!     Missing character: There is no 8 in font nullfont!     Missing character: There is no 0 in font nullfont!     Missing character: There is no 4 in font nullfont!     Missing character: There is no 7 in font nullfont!     Missing character: There is no 9 in font nullfont!     Missing character: There is no 7 in font nullfont!     Missing character: There is no 2 in font nullfont!     Missing character: There is no 2 in font nullfont!     Missing character: There is no e in font nullfont!     Missing character: There is no 0 in font nullfont!     Missing character: There is no ] in font nullfont!     Missing character: There is no , in font nullfont!     ! Missing control sequence inserted.     <inserted text>                      \inaccessible      l.68     \end{axis}          Please don't say `\def cs{...}', say `\def\cs{...}'.     I've inserted an inaccessible control sequence so that your     definition will be completed without mixing me up too badly.     You can recover graciously from this error, if you're     careful; see exercise 27.2 in The TeXbook.          Missing character: There is no 4 in font nullfont!     ! Undefined control sequence.     \pgfplotsaxisvisphasetransformpointmeta ...@trafo                                                        {\pgfplotspointmeta }\let ...     l.68     \end{axis}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          Missing character: There is no 1 in font nullfont!     Missing character: There is no Y in font nullfont!     Missing character: There is no 9 in font nullfont!     Missing character: There is no . in font nullfont!     Missing character: There is no 5 in font nullfont!     Missing character: There is no 8 in font nullfont!     Missing character: There is no 0 in font nullfont!     Missing character: There is no 4 in font nullfont!     Missing character: There is no 7 in font nullfont!     Missing character: There is no 9 in font nullfont!     Missing character: There is no 7 in font nullfont!     Missing character: There is no 2 in font nullfont!     Missing character: There is no 2 in font nullfont!     Missing character: There is no e in font nullfont!     Missing character: There is no 0 in font nullfont!     Missing character: There is no ] in font nullfont!     Missing character: There is no , in font nullfont!     ! Missing control sequence inserted.     <inserted text>                      \inaccessible      l.68     \end{axis}


title: Chemfig - Name some compounds under a single label

text: I know within the `chemfig` package compounds can be named with the command `\chemname`. Is there a way to label some compounds under a single label? For example, put a label "Reactants" under the reactants in a reactions scheme. In the following example:               \documentclass{article}     \usepackage{chemfig,chemmacros}     \begin{document}          \schemestart     \chemfig{R-[:30](=[:90]O)-[:-30]R}     \arrow{0}[,.5]     \chemfig{R'-[:30](=[:90]O)-[:-30]R'}     \arrow{0}[,1.5]     \chemfig{R'-[:30](=[:90]O)-[:-30]R}     \schemestop          \end{document}      I can put a label under the third compound with `\chemname`, but how can I put a single label under the first two compounds?


title: \urlstyle{same} with apacite

text: I use `apacite` to create a bibliography according to APA guidelines for my article. Some of the references contain URLs. By default, LaTeX shows these in a different, monospace font than the rest of the article. I dislike this, so wish to use the `url` package with `\urlstyle{same}`. This does not work however in combination with `apacite`. Here is a little reference document.               \documentclass{article}          \usepackage{url}     \urlstyle{same}     \usepackage{apacite}          \begin{document}     \url{http://www.google.com}     \end{document}      Leaving out the `apacite` package will render the link in the document font. It will currently render in the monospace font however. Does anyone have a suggestion on how to fix this, so I can have APA references and good looking URLs?


title: TeXworks doesn't see packages installed by tlmgr

text: I am running Fedora 19 on a Dell Latitude E6410 with an i7 dual-core. The program I use for LaTeX is TeXworks. I have Tex Live 2013, and use pdfTeX 3.1415926-2.5-1.40.14 set as my processing tool under preferences. I would like to use the package "pgfplots.sty" in TeXworks, but TeXworks tells me > ! LaTeX Error: File `pgfplots.sty' not found. This question has been asked several times, but I have not found an answer. For each of the things I have tried, the explanation includes a link to the answer(s) suggesting that solution. I have checked, and TeXworks is running TeX Live 2013:               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      I have set up tlmgr and have run the commands to install the package:               [root@localhost Desktop]# tlmgr install pgfplots     tlmgr: package repository http://mirror.hmc.edu/ctan/systems/texlive/tlnet     [root@localhost Desktop]# tlmgr update pgfplots     tlmgr: package repository http://mirror.utexas.edu/ctan/systems/texlive/tlnet     tlmgr: saving backups to /usr/local/texlive/2013/tlpkg/backups     tlmgr: no updates available      tlmgr has downloaded the package into the correct location:               [beason4251@localhost ~]$ kpsewhich pgfplots.sty     /usr/local/texlive/2013/texmf-dist/tex/latex/pgfplots/pgfplots.sty      I have run mktexlsr and it ran successfully.               [root@localhost ~]# mktexlsr     mktexlsr: Updating /usr/local/texlive/2013/texmf-config/ls-R...      mktexlsr: Updating /usr/local/texlive/2013/texmf-dist/ls-R...      mktexlsr: Updating /usr/local/texlive/2013/../texmf-local/ls-R...      mktexlsr: Updating /usr/local/texlive/2013/texmf-var/ls-R...      mktexlsr: Done.      tlmgr tells me the package is installed, output linked below: [beason4251@localhost Desktop]$ tlmgr info pgfplots --list If I run the command               pdflatex M365CNotes.tex      everything works fine and the pdf is created, I just can't do the same through TeXworks. Here are my typesetting preferences. The duplicate entry at the bottom is one I added manually while trying to get this to work. I've removed it now. I can't link to the output of the following document since I don't have enough reputation yet:               \RequirePackage{array}\stop      Here's a disassembled link: http: //pastebin. com/Zgxt2s6R


title: hf-tikz markin has to be on the 1st slide to be referable by overlay anotation

text: I am making a presentation in beamer. I would like to show some equations with description using overlays. code:               \documentclass[12pt]{beamer}     \usepackage[beamer,markings]{hf-tikz}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}          \begin{frame}[t]     \frametitle{Total Electron Content}              \uncover<1->{             \begin{equation*}                 n_{ion} = 1- \frac{40.3 N_e}{f^2}             \end{equation*}             }                  \uncover<2->{             \begin{equation*}                                \Delta \rho_{ion}=\frac{40.3}{f^2}\tikzmarkin<{1,3}>[mark at=0.93]{col}(0.2,-0.5)(-0,0.7)\int_S N_e\mathrm{d}S\tikzmarkend{col}                      \end{equation*}             }     \uncover<3->{     \begin{tikzpicture}[remember picture,overlay]     \coordinate (col-aa) at ($(col)+(-2,-1.8)$);     \node[align=right,left] at (col-aa) {\small{TEC}};     \path[-stealth,red,draw] (col-aa) -| ($(col)+(1,-1.55)$);     \end{tikzpicture}     }     \end{frame}     \end{document}      This works OK since the first slide does not show the highlighted equation. The `\tikzmarkin<{1,3}>` can be there and would not affect anything. ![beamer example](http://i.stack.imgur.com/Fwfmk.gif) However in case I would like to put the equation on the slide 1 and than highlight it on the 2nd, it does not work. It needs the `\tikzmarkin{col}` specified from the beginning, but, I do not want to show it there. part of the code:               \begin{frame}[t]     \frametitle{Total Electron Content}              \begin{equation*}                                \Delta \rho_{ion}=\frac{40.3}{f^2}\tikzmarkin<2>[mark at=0.93]{col}(0.2,-0.5)(-0,0.7)\int_S N_e\mathrm{d}S\tikzmarkend{col}                      \end{equation*}          \uncover<2>{     \begin{tikzpicture}[remember picture,overlay]     \coordinate (col-aa) at ($(col)+(-2,-1.8)$);     \node[align=right,left] at (col-aa) {\small{TEC}};     \path[-stealth,red,draw] (col-aa) -| ($(col)+(1,-1.55)$);     \end{tikzpicture}     }     \end{frame}      error:               ! Package pgf Error: No shape named col is known.          See the pgf package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.20 \end{frame}          ?       Is it possible to make it work somehow?


title: How to render LaTeX in programs?

text: Recently I'm writing a calc program, on android. As a frequent LaTeX user, it comes to be compelling to use LaTeX rendering in displaying the inputs and outputs. Is there any possibilities to use a minimal/basic TeX distribution to render simple equations including sin/cos/tan, fractions etc.? I've heard of BasicTeX but it seems far too huge, and it may not work on android system, I suppose?


title: PGFPLOTS: figure and table formatting

text: Just after an hour spending browsing through the `pgfplots` manual, I am trying to have a figure and a table side by side (both the figure and the table use the same data). So I still have lot to learn! So here is `apples.dat` file:               %Apples that went bad     year    value     2008    12053   %31 Dec 2007     2009    15792   %31 Dec 2008        2010    22907   %31 Dec 2009       2011    30997   %31 Dec 2010      And here are my plot commands:               \documentclass[12pt]{article}     \usepackage{pgfplots}     \usepackage{pgfplotstable}          \begin{document}          \pgfplotsset{width=7cm,height=5cm,compat=newest}     \begin{figure}[h]     \begin{tikzpicture}     \begin{axis}[     enlargelimits=false,     xmin=2008,     xmax=2012,     x tick label style={rotate=45,anchor=east},     mark=x,line width=1pt,     axis y line = none,     nodes near coords,     color=black,     grid=major     ]     xlabel=year,     ylabel=value]     \addplot+ file[skip first = true,x=year,y=value,const plot mark right]{apples.dat};     \end{axis}     \end{tikzpicture}     \end{figure}     \pgfplotstabletypeset[columns={year,value}]{apples.dat}          \end{document}       I am saving space by eliminating the `y` values and tick marks. Questions:   1. How to make the figure and the table appear side by side?   2. If I need to rotate the two floats (figure and table) together at the same time and turn them 90 deg anticlockwise so that the appear in the landscape mode, how to proceed?   3. I've tried using the `const plot mark right` option in `\addplot` but it doesn't work. Why?   4. Why does the `mark=x` option doesn't work in my code?   5. Why does the `color=black` option doesn't work in my code?   6. If I want to output everything as an eps file. How to proceed? I have tried using               \usepgfplotslibrary{external}     \tikzexternalize% activate externalization!      but this doesn't work with the conventional LaTeX > dvips > ps2pdf route. So how to get an eps? I am using TeXLive 2011 (with everything updated last week) on Win XP. Thanks a lot...


title: N first words command for citation style

text: I need a way to get to display three first words of the title in citations and if some words did not get displayed add dots. I am using Biblatex.               \nfirstwords[3]{I Like Apples and Oranges}{\dots}     \nfirstwords[3]{I Like Apples}{\dots}      Would give:               I Like Apples...     I Like Apples


title: How to strip a listing of all (line and block) comments without leaving white space?

text: I'm looking for an easy and robust way to strip all the comments from a listing. My approach (passing `\@gobble` to the `commentstyle` key) correctly removes all the one-line comments and block comments. However, the white space left behind by by block comments remains, creating useless gaps in my listing. See the screenshot below (the red rectangle is my emphasis). Any idea? ![enter image description here](http://i.stack.imgur.com/gpwCb.png)               \documentclass{article}          \usepackage{xcolor}     \usepackage[T1]{fontenc}     \renewcommand{\ttdefault}{pcr}     \usepackage{listings}          \makeatletter     \lstset%     {%       basicstyle   = \ttfamily,       morecomment  = [l]{//},       morecomment  = [s]{/*}{*/},       frame        = single,       commentstyle = \itshape\color[gray]{.5},       rulecolor    = \color{black},       breaklines,     }     \makeatother          \usepackage{filecontents}     \begin{filecontents*}{sample.c}     #include <stdio.h>      /*      block comment taking up white space     */     main()     {         float fahr, celsius;         float lower, upper, step;         lower   = 0;    /* lower limit of temperature scale */         upper   = 300;  /* upper limit */         step    = 20;   /* step size */         celsius = lower;         printf("\nCelsius\tFahr\n");         while (celsius <= upper)            {             fahr = (9.0/5.0) * celsius+32.0;             printf("%3.0f\t%6.1f\n", celsius, fahr);             celsius = celsius + step;         }     }     \end{filecontents*}          \begin{document}     \makeatletter     \lstinputlisting[caption={with comments}]{sample.c}     \lstinputlisting[caption={without comments},commentstyle={\@gobble}]{sample.c}     \makeatother     \end{document}


title: "Package xkeyval Error: value `no' is not allowed." while working baposter

text: I faced the same problem as the author of an older question - I got following message in my log:               ! Package xkeyval Error: value `no' is not allowed.          See the xkeyval package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.134   }      The linked question's answer suggested few options, which I (as a complete LaTeX beginner) didn't understand completely: > To fix this either try to add a margin= option to the geometry package to > overwrite the global one or to rename the margin option of the class to > something else. > > Another alternative is to delete the global options, i.e. put the following > after the \documentclass. The < > part marks a place which should be filled > out, not taken verbatim.               \makeatletter      \def\@classoptionslist{<class options except `margin` OR empty>}      \makeatother      I tried to add "margin" with some value to the Geometry parameters in baposter.cls, and I tried to add the code in the bottom of the answer citation just after \documentclass in my .tex file (with < > part empty), but no joy here. I didn't found any "global margin option" declared in baposter, though "basemargin" is called many times, so it should be somewhere in the class. How to find it and check any problem that might be there? What did I misunderstand? And what's more important: what should I do to make baposter work?


title: Complete example from LaTeX3 intro

text: I don't understand an example from section 6.1 of expl3-intro.tex from LATEX3 documentation. It is said there: > Here are two equivalent ways of defining the function `\foo:nn`: >   >   >     \cs_set:Npn \foo:nn  #1#2 {(#1)/(#2)} >     \cs_set:cpn {foo:nn} #1#2 {(#1)/(#2)} >   > > These macros are respectively equivalent to \TeX's >   >   >     \long\def\foo:nn >   > > , and >   >   >     \expandafter\long\expandafter\def\csname foo:nn\endcsname >   > > . > > Note the `:nn` suffix to denote that |\foo| takes two arguments. Given equivalents seem to be reduced rather than complete. **Could somebody provide accurate equivalents of**               \cs_set:Npn \foo:nn  #1#2 {(#1)/(#2)}      and               \cs_set:cpn {foo:nn} #1#2 {(#1)/(#2)}      **?** In particular, I wonder at `\long\def\foo:nn`. Is colon allowed in command names in Plain TeX or LaTeX 2e? Is it assumed here that catcode of `:` has been changed? If so, corresponding commands are suggested to be explicitly added to the above example. And where is the expanded part of definitions (i.e. `{(#1)/(#2)}`)?


title: Use lemmas without numbering, without separate thing in preamble for each lemma

text: My apologies if this question is answered elsewhere; I searched for it with no success. I want to use lemmas in my paper, but I want to do it the dummy way: instead of inserting a different thing in the preamble for each lemma, I just want to use               \documentclass{article}     \usepackage{amsthm, amssymb}          \newtheorem{lemma}{Lemma}          \begin{document}     \begin{lemma}     Here is my first lemma     \end{lemma}          \begin{proof}     Here is the first proof \& \qedhere      \end{proof}          \begin{lemma}     Here is my second lemma     \end{lemma}          \begin{proof}     Here is the second proof \& \qedhere      \end{proof}               \end{document}      but then it will automatically insert a number. This is just a homework assignment, so I have no need of a number for each lemma. Is there a simple way to get rid of the numbering? I've tried putting asterisks in various places...


title: Available width inside algorithm2e

text: I wanted to use an environment inside an `algorithm2e` and it turned out, that it is too wide. I tried to draw some boxes to see the width, and it turned out that `\textwidth` is too large inside the algorithm. The `framed` environment however adheres to the correct size. **My question is:** How can I access the available width in the algorithm area? ![An example using a frames environment, which works fine and a box of width \\textwidth, which is too large.](http://i.stack.imgur.com/YKNbU.png) Here is a MWE:               \documentclass[a4paper,draft]{article}     \usepackage[ruled]{algorithm2e}     \usepackage{framed}           \begin{document}       \begin{algorithm}[h]         \begin{framed}           something in a framed environment         \end{framed}         \fbox{\parbox{\textwidth}{           something with textwidth         }}         \caption{Some algorithm.}       \end{algorithm}     \end{document}


title: tocloft, listoffigures and scrheadings missing page-numbers

text: There are in this example page-numbers missing at the pages containing table of contents and list of figures. Just for clarification: They're not missing in toc or list of figures but on the pages where toc and lof are located.               \documentclass[12pt,a4paper]{scrartcl}          \usepackage{dejavu} % Schriftart     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}      \usepackage[ngerman]{babel} % Deutsches Wörterbuch     \usepackage{pageslts}     \usepackage[hyphens]{url} % Automatische Worttrennung, auch URLs     \usepackage[backend=biber,bibstyle=alphabetic,citestyle=alphabetic]{biblatex}     \usepackage[hidelinks]{hyperref} % klickbare Links im PDF ermöglichen     \usepackage[a4paper,left=3cm,right=3cm,includehead=true,includefoot=true,top=2.5cm,bottom=2.5cm,footskip=14pt,headsep=30pt]{geometry} % Layout anpassen     \usepackage{scrpage2} % Seitenlayout     \pagestyle{scrheadings}     \usepackage{graphicx} % Grafiken     \usepackage{tocloft} % Inhaltsverzeichnis     \usepackage{floatflt}     \usepackage{lipsum} % Just 4 Test.          % Fußzeile     \clearscrheadfoot     \ofoot{Seite \thepage~}          \begin{document}          \pagenumbering{Roman}          \tableofcontents          \newpage     \pagenumbering{arabic}      \setcounter{page}{1}          \sloppy          \section{Section 1}     \lipsum[10]          \section{Section 2}     \lipsum[10]     \begin{figure}     \includegraphics[width=\textwidth]{image1.png}     \caption[Short caption]{Long caption}     \end{figure}          \section{Section 3}     \lipsum[10]          \newpage     \pagenumbering{Roman}     \setcounter{page}{2}          \listoffigures          \end{document}      How to fix it without removing the current footer? What's happening there currently?


title: ConTeXt TABLEs width

text: I am using the "natural tables" in ConTeXt:               \bTABLE     \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR     \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR     \eTABLE      How can I setup the table that the whole table uses a certain width? For example `width=\textwidth`


title: Try to use input and currfile together

text: I have a folder tree a little like this, "document.tex" is the root file, section1 is a folder               document.tex      |--[section1]     |     |--index.tex      My document.tex code is like that:               \documentclass{article}          \usepackage{currfile}          \newcommand{\insertIndex}[2]     {%         \input{#1#2/index}      }     \begin{document}          \insertIndex{\currfiledir}{section1}          \end{document}      The command throw a error because it say > section1/section1/index.tex" don't exist. I try a lot and I don't understand why it duplicate the folder If I view the string `#1#2/index` without the input the path is correct


title: How to indicate elision in a quotation?

text: > How should one typeset an elided passage in a quote? An example: > >     \begin{quotation} >     some text [...] then some more >     \end{quotation} >   Elision in a quote is usually indicated by an ellipsis (three dots) in square brackets. I have tried variations on `[ \ldots ]`, `[\ldots]`, `\emph{[ \ldots ]}` and `\emph{[\ldots]}`, which all look quite ugly. Since the specific quotation environment typesets the quote in italics, the best so far seems to be `\emph{[\,\ldots ]}`. However, this seems a horribly fragile and hacky way to achieve a nice-looking indication that some part of the quote has been left out. Is there a standard way to do this, or should I start experimenting with under-the-hood things like boxes, negative kerning, and `\phantom`? (By the way, I'm not sure _elision_ is the right technical term here, I'd welcome a pointer to the correct term.)


title: \to arrow with tikz or tikzcd

text: I want to replace the usual `\to` short arrow by an (approximately) equally short arrow with a nicer tip. Although completely newbie, I'm fond of `tikz`-methods and I write all my commutative diagrams with `tikzcd`. But using this tool inside the text renders a longer arrow. So far, I've just found the very unelegant solution               \documentclass{article}     \usepackage{tikz}     \usepackage{tikz-cd}     \usetikzlibrary{arrows}     \tikzset{     commutative diagrams/.cd,     arrow style=tikz,     diagrams={>=stealth}}     \begin{document}     $\alpha: A$ \begin{tikzcd}[column sep=small]\arrow{r}\!\!\!\!\!\! &     \!\!\!\!\!\!\end{tikzcd} $B$     \end{document}      This renders: ![enter image description here](http://i.stack.imgur.com/n2pRT.jpg) This won't allow me to redefine the command `\to`. I'm sure there is a better way to implement this.


title: Is it possible to make an underfull tabulary spread out?

text: With this MWE               \documentclass{article}     \usepackage{tabulary}          \begin{document}          \hrule          \begin{center}       \begin{tabulary}{\textwidth}{|L|L|L|}         foo&bar&baz       \end{tabulary}     \end{center}          \hrule          \end{document}      I get a table which is narrower than the page: ![example](http://i.stack.imgur.com/9oKXM.png) But I'd like the table to be spread out to `\textwidth` like `tabularx` would do. Is this possible? Or is there an alternative approach?


title: Combine two \tikzmark solutions

text: I would like to combine the following two solutions provided in the question: How to draw arrows between parts of an equation to show the Math Distributive Property (Multiplication)?   1. http://tex.stackexchange.com/a/35721/10898 and   2. http://tex.stackexchange.com/a/61990/10898 The first is not reusable (at least I don't find a way to reuse several instances in one document since only one source can be defined.) The second is. What I am looking is to combine the `\target` command (this provides a north or south of the node in question, therefore directly targeting the character, like `\target{x^2}` as opposed to `x\tikzmark{a}^2` or the sort.) and the second I can reuse in my example shown below:               \documentclass{article}     \usepackage{amsmath}     \usepackage{tikz}          \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node ({#1}) {};}     \tikzset{square arrow/.style={to path={-- ++(0,-.125) -| (\tikztotarget)}}}          \newcommand{\sn}[2]{\ensuremath{{#1}\times 10^{#2}}}     \begin{document}              \begin{align*}         \sn{23,900,00\tikzmark{b}0.\tikzmark{a}}{0} &= \sn{2,390,00\tikzmark{d}0.\tikzmark{c}0}{1}\\                                                     &= \sn{239,000}{2}\\                             &= \sn{23,900}{3}\\                             &= \sn{2,390}{4}\\                             &= \sn{239}{5}\\                             &= \sn{23.9}{6}\\                             &= \sn{2.39}{7}     \tikz[overlay,remember picture] {\draw[->,square arrow] (a.south) to (b.south);}     \tikz[overlay,remember picture] {\draw[->,square arrow] (c.south) to (d.south);}         \end{align*}     \end{document}      This yields: ![enter image description here](http://i.stack.imgur.com/h5m03.png) Of course it is not a systematic (I welcome a systematic response.) way of doing it, but gets the job done. If the arrows could be set either as curves or as squares as they are, it is fine. If the arrows could be closer to the the targeted character that would be fine as well. What I want to achieve is something like the following: ![enter image description here](http://i.stack.imgur.com/SBkos.png)


title: Increasing the length between rows in a table

text: I have defined a new command to increase the length between rows in a table:               \newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}      For example               \documentclass[a4paper, 11pt]{article}          \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}          \begin{document}          \ra{3}     \begin{tabular}{ll}     \hline     col 1 & col 2 \\     \hline     1 & 2 \\     3 & 4 \\     5 & 6 \\     7 & 8 \\     \hline     \end{tabular}          \end{document}      Here is what it gives (left) and what I would like (right). That is, I would like the new command not to have any effect in the header. ![enter image description here](http://i.stack.imgur.com/1gSvc.png) Can you help me?


title: How to hyperlink name part in \citet using natbib numerical and hyperref

text: I am using natbib and unsrtnat style for numerical citation with hyperref package.               \documentclass{article}       \usepackage[square, super, sort]{natbib}       \usepackage[dvips,                  bookmarks,                  bookmarksopen = true,                  bookmarksnumbered = true,                  breaklinks = true,                  linktocpage,                  pagebackref,                  colorlinks = true,                  linkcolor = blue,                  urlcolor  = blue,                  citecolor = red,                  anchorcolor = green,                  hyperindex = true,                  hyperfigures]{hyperref}           \begin{document}      \bibliographystyle{unsrtnat}       some text...\citet{ref1}        other text        \end{document}            % some bibliography file       % test.bib       @Article {ref1, author = Author1, title = Title1, year = 2010}      `\citet{ref1}` results in Author1 et al. [1] where only [1] is hyperlinked to the reference. I would like that name part of citation (Author1 et al.) is also hyperlinked. How to make that work?


title: Can you use arabic letters in equations?

text: Making equations with greek letters is easy -- for example, `$2 \gamma = 1$`. But is there any way to do it with arabic letters -- something like `$2 \gim = 1$`? I've run out of greek letters in my equations, so arabic is the logical next step... Oh, and I have looked at this but it is... complicated... For example, I have no need for right-to-left support or the ability to make sentences. Just a single letter!


title: Getting same footnotes on each page of a table

text: Want to be put the same footnotes on each page of a multipage table. Below is some code that provides an example. How can I get the footnotes that appear at the bottom of page 2 to appear at the bottom of page 1 as well? The idea is to avoid making the reader go to the bottom of the table to get this information when they are reading page 1.               \documentclass[11pt]{article}          %%%% Margins %%%%          \setlength{\textwidth}{6.25in}     \setlength{\oddsidemargin}{0in}          %%%% Packages %%%%          \usepackage[font={bf}, justification=centerfirst]{caption}     \usepackage{longtable}     \usepackage{array}     \usepackage{lscape}     \usepackage{threeparttablex}     \usepackage{booktabs}     \usepackage[english]{babel}     \usepackage[pdfview=Fit]{hyperref}          %%%% Table Captions %%%%          \DeclareCaptionLabelSeparator{period-newline}{. }     \captionsetup{singlelinecheck=false,labelsep=period-newline,aboveskip=3pt}          \begin{document}          %%%% Demographic Characteristics Table %%%%          \scriptsize     \begin{landscape}          \begin{longtable}{l  *{5}{>{\centering}m{0.7in}} m{2in}}      \caption{Demographic Characteristics by Treatment Arm}  \\ \hline \addlinespace[3pt]      \multicolumn{1}{l}{} &  \multicolumn{4}{c}{Treatment Arm} &  &  \\ \cmidrule(lr){2-5}       Variable/Statistic & Arm A & Arm B & Arm C & Arm D & Total & Test \\        & (n = xx) & (n = xx) & (n = xx) & (n = xx) & (n = xx) &  \\       \hline \addlinespace[12pt]     \endfirsthead       \caption{Demographic Characteristics by Treatment Arm (Continued)}  \\ \hline\addlinespace[3pt]       \multicolumn{1}{l}{} &  \multicolumn{4}{c}{Treatment Arm} &  &  \\ \cmidrule(lr){2-5}       Variable/Statistic & Arm A & Arm B & Arm C & Arm D & Total & Test \\        & (n = xx) & (n = xx) & (n = xx) & (n = xx) & (n = xx) &  \\       \hline \addlinespace[12pt]     \endhead       \addlinespace[3pt] \hline \multicolumn{7}{r}{\emph{Continued on next page}} \\ \hline     \endfoot       \hline     \endlastfoot          Gender &  &  &  &  &  & $\chi^2$(x, xx) = x.xxxx, p = x.xxxx \\       ~~~Male &  xx ( xx.xx\%) &  xx ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\       ~~~Female &  xx ( xx.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\       ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\     \addlinespace[12pt]     Race &  &  &  &  &  & Fisher's Exact, p = x.xxxx \\       ~~~White &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\       ~~~Black or African American &   x (  x.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &  \\       ~~~Hispanic or Latino &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &  \\       ~~~Other &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &  \\       ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\         \addlinespace[12pt]     Caucasian &  &  &  &  &  & Fisher's Exact, p = x.xxx \\       ~~~Yes &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\       ~~~No &   x (  x.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  \\       ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\         \addlinespace[12pt]     Age &  &  &  &  &  & F (x, xx) = x.xxxx, p = x.xxxx \\       ~~~N & xx & xx & xx & xx & xx &  \\       ~~~Mean & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\       ~~~Median & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\       ~~~Standard Deviation & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\       ~~~Minimum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\       ~~~Maximum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\         \addlinespace[12pt]     BMI &  &  &  &  &  & Kruskal-Wallis = x.xxxx, p = x.xxxx \\       ~~~N & xx & xx & xx & xx & xx &  \\       ~~~Mean & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\       ~~~Median & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\       ~~~Standard Deviation & x.xx & x.xx & x.xx & x.xx & x.xx &  \\       ~~~Minimum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\       ~~~Maximum & xx.xx & xx.xx & xx.xx & xx.xx & xx.xx &  \\         \pagebreak     Region &  &  &  &  &  & Fisher's Exact, p = x.xxxx \\       ~~~Northeast &   x ( xx.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  \\       ~~~Midwest &  xx ( xx.xx\%) &   x ( xx.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &  xx ( xx.xx\%) &  \\       ~~~South &  xx ( xx.xx\%) &  xx ( xx.xx\%) &   x ( xx.xx\%) &  xx ( xx.xx\%) &  xx ( xx.xx\%) &  \\       ~~~West &   x ( xx.xx\%) &   x (  x.xx\%) &   x (  x.xx\%) &   x ( xx.xx\%) &   x (  x.xx\%) &  \\       ~~~Total &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  xx (xxx.xx\%) &  \\          \end{longtable}          \begin{tablenotes}     \raggedright     \begin{hyphenrules}{nohyphenation}     \vspace{-6pt}     \item[]     Arm A: Miracle drug \\     Arm B: Wonder drug  \\     Arm C: Eye of newt  \\     Arm D: Standard of care     \end{hyphenrules}     \end{tablenotes}          \end{landscape}     \normalsize          \end{document}


title: How to combine the listings and algorithm2e packages to be used with List of Listings

text: I want to make a "List of Algorithms and Listings" that contains both listings made with `\begin{lstlisting}...` (`listings` package) and algorithms `\begin{algorithm}...` (`algorithm2e` package). I also want the numbering to be continuous in the List of..., no matter how I alternate between listings and algorithms. I have tried to use the listings package to make the List of... and to put something like `\addcontentsline{lol}{section}{\numberline {\thelstlisting}This is a test}` after `\end{algorithm}`, but that entry does not get properly numbered. 10x.


title: ShareLaTeX compilation flags

text: Is it possible and if so how can you pass flags to the ShareLaTeX compiler which one would have passed as parameters to the LaTeX compiler? I am using the minted package and need to pass the `-shell-escape` flag.


title: Overlapping fills

text: I would like to create a graphic representing a stack of rectangles. I would ideally like a simple command like \stack{5} to create a stack of 5. I can use the following code:               \draw[fill=blue] (0.4,-0.4) rectangle +(3,2);     \draw[fill=blue] (0.3,-0.3) rectangle +(3,2);     \draw[fill=blue] (0.2,-0.2) rectangle +(3,2);     \draw[fill=blue] (0.1,-0.1) rectangle +(3,2);     \draw[fill=blue] (0.0,-0.0) rectangle +(3,2);      ![enter image description here](http://i.stack.imgur.com/HtxlR.png) However, it seems hard to turn that into a command, and if we need to shift the stack around it is a hassle to change all of the coordinates. I was thinking this might be better:               \draw[fill=blue] (0.4,-0.4)       rectangle +(3,2) ++(-0.1,0.1)       rectangle +(3,2) ++(-0.1,0.1)       rectangle +(3,2) ++(-0.1,0.1)       rectangle +(3,2) ++(-0.1,0.1)       rectangle +(3,2) ++(-0.1,0.1);      ![enter image description here](http://i.stack.imgur.com/WUr8t.png) This has the advantage that shifting it around only changes the coordinates in one obvious place, and it is even a little more clear about what is intended. Unfortunately, this second version fills all the rectangles first, and then draws their outlines, so the "top" rectangle does not cover the rest of the stack. Is there a simple way to draw overlapping regions using relative draw commands?


title: How to deal with bibliography items containing long URLs?

text: A picture is worth a thousand macros: ![alt text](http://i.stack.imgur.com/L72yO.png) I don't blame LaTeX for having difficulty in formatting this entry. What can I do, however, to alleviate the effects and avoid the Word-like indentation? A related question suggested by the site is http://tex.stackexchange.com/questions/299/how-to-get-long-texttt-sections-to- break which indeed produces a better aligned entry: ![alt text](http://i.stack.imgur.com/qNAdp.png) While I like the sane alignment, I'm not not very happy with the switch to a monospaced font (while it works in the regular text, in bibliographical entries it attracts too much attention and takes too much space). Any other suggestions? The entry for the above test bibitem is:               \begin{thebibliography}          \bibitem{anything-here}     "Lorem Ipsum Society,     \emph{dolor sit amet, consectetur}, May 2010     retrieved on Oct 16, 2010 from http://www.lorem-ipsum.com/whatever-here/about\%20something/here\%20takes/space\%20in\%20a\%20long/url\%20foobar.aspx           \end{thebibliography}


title: How can i import a 3D SolidWorks Model into my PDF using LaTeX

text: Acrobat Adobe supports 3D PDFs to be included into LaTeX. I could use another tool to create a PDF and import that PDF into my build, but i would rather use a package o include a solid works model directly via my latex compiler. The result schould look like one of the results on the Adobe Demo page. Including the users ability to freely rotate the Unit.


title: How do I set the margins in a KOMA-Script class?

text: I am writing my resume (using the `currvita` package) within a `scrartcl` document class from KOMA-Script. How do I set the margins? I think the text width is a bit too narrow for me.


title: Very long name of Section reflects badly in TOC

text: I have too long name of Section that reflects badly in TOC. Name of section doesn't have spaces in its name. I can not know how pledge it to move part of name to the next line automatically. (Idea to split name manually is bad). ![enter image description here](http://i.stack.imgur.com/cbhfu.png) * * * * * * * * *                \begin{document}      \tableofcontents      \part{New Part}      \chapter{Name of the Chapter}          %Can not fit on the page, and can not be divided automatically      \section{This\_Is\_very\_Long\_Name\_of\_Section\_That\_Can\_Not\_Fit\_On\_Page\_And\_Push\_Out\_Of\_The\_Page\_Field}      \section{This\_Is\_very\_Long\_Name\_of\_Section \ That\_Have\_Spaces On\_Its Name \ And\_Will\_Be Bring\_On\_The\_Next\_Line}           \end{document}      Also, name of section creates automatically, and I previously cannot know how long will be it.


title: Plot 2-D data point in just one plan

text: everyone! I have got a little problem trying to draw in LaTeX. Let me try to explain: I have a xyz-axis, as you can see on the figure below. ![enter image description here](http://i.stack.imgur.com/L5NCd.png) Plotting any 2-D data point graph in the xy-axis:               \begin{filecontents}{data.dat}     0 0     1 1     2 4     \end{filecontents}          \begin{document}          \begin{tikzpicture}[scale=1]          \draw[thick,->,black] (0,0,0) -- (2,0,0) node[anchor=west]{$x$};     \draw[thick,->] (0,0,0) -- (0,4.5,0) node[anchor=east]{$y$};     \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=east]{$z$};          \draw[smooth] plot file {data.dat};          \end{tikzpicture}      Resulting: ![enter image description here](http://i.stack.imgur.com/C0Ky6.png) The problem is: I cannot plot a similar graph just in the zy-axis. Any idea how to do it? Thanks a lot!


title: Add picture's caption in left margin in refman class

text: I am using `refman` class in latex in order to write a manual of instructions. I would like to add pictures/diagrams with the caption in the left margin since it is quite wide but when I do it with the caption option of the figure environment the caption is placed below the picture and when I use `marginlabel{text of the caption}` it is aligned to the bottom of the picture and I'd rather have it aligned to the top of the picture. This is my MWE:               \documentclass[twoside,a4paper]{refart}     \usepackage[utf8x]{inputenc}     \usepackage[francais]{babel}     \usepackage{graphicx}     \begin{document}          \begin{figure}     \includegraphics[scale=1]{img/bpa/bpa1.jpg}      \caption{Text of the caption}     \end{figure}          \marginlabel{Text of the caption} \includegraphics[scale=1]{img/bpa/bpa1.jpg}           \end{document}


title: Combining `tikzpicture` and `lstlisting`

text: I'm working on a custom `lstlisting` environment, in which I use TikZ to add a frame and a title. Because of the widespread curly braces of `node` I cannot use `newenvironment`, so I have to resort to `NewEnviron`. From the MWE and the picture below it should be clear what I'm trying to accomplish:               \documentclass[a4paper,11pt]{article}          \usepackage{listings}     \lstset{breaklines=true, postbreak={\mbox{$\hookrightarrow\space$}}, language=Mathematica}          \usepackage{tikz}     \usetikzlibrary{shapes,decorations}          \tikzstyle{boxround} = [draw=black, thick, rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]     \tikzstyle{head} =[draw=black, fill=white, thick, rectangle]          \usepackage{environ}          \NewEnviron{code}{%     \bigskip     \noindent\begin{tikzpicture}     \node [boxround] (box){%     \begin{minipage}{.94\textwidth}     \BODY     \end{minipage}};     \node[head, right=10pt] at (box.north west) {\textbf{Code listing}};     \end{tikzpicture}     \bigskip     }          \begin{document}          \begin{code}     How to get some \textsc{Mathematica} code (shown below) in this box...     \end{code}          \footnotesize     \begin{lstlisting}     B11[x_, y_] = Piecewise[{{1, 0 <= x <= 1 && 0 <= y <= 1}}];     Plot3D[B11[x, y], {x, -.5, 1.5}, {y, -.5, 1.5}, PlotRange -> Full];      \end{lstlisting}     \normalsize          \end{document}      Which results in ![enter image description here](http://i.stack.imgur.com/Yy0ls.png) If it weren't for `tikzpicture`, I would just use `lstnewenvironment`. But considering the widespread curly braces of `node` I don't know how I could. Any ideas?


How to get line-breaking / multirow to work in the caption of my beginner's table?               \caption{this is my first table's captive caption}      I'd like the caption to look sth like this: > this is my first > > _table's captive caption_ How?               \documentclass{article}     \usepackage{tabulary}     \usepackage{threeparttable}     \usepackage{array}     \usepackage{siunitx}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{pbox}     \usepackage{lipsum}     \usepackage[utf8]{inputenc}\usepackage{textcomp}     \renewcommand{\arraystretch}{1.2}     \sisetup{round-mode=places,round-precision=1, add-decimal-zero=true, add-integer-zero=true, round-integer-to-decimal}          \begin{document}          \lipsum[1]               \begin{table}     \begin{threeparttable}     \caption{this is my first table's captive caption}     \begin{tabulary}{\textwidth}{@{}*{2}{L}*{6}{S[table-format=3.2]}@{}} \toprule     × & TOTALLY bla percentage of bla & {1000} & {2000} & {3000} &      \multicolumn{1}{c}{\begin{tabular}{@{}c@{}}Bonjour\tabularnewline monde!\end{tabular}} &      {5000} & {6000\tnote{1}}\\ \midrule     % × & TOTALLY bla percentage of bla & {1000} & {2000} & {3000} & \multirow{2}*{4000 apples and pears \\ and whatnot} & {5000} & {6000\tnote{1}}\\ \midrule     DDD 1 & 47.6 & 29.1 & 1.0 & 0.2 & 1.9 & 15.2 & 0.0\\     UUU & 24.8 & 10.8 & 6.4 & 0.0 & 3.2 & 4.5 & 0.0\\     × & × & × & × & × & × & × & ×\\     Unweighted average: & × & × & × & × & × & × & ×\\     BBB & 33.8 & 11.3 & 9.1 & 0.4 & 1.8 & 11.0 & 0.2\\     GGG & 32.9904 & 8.60325 & 9.3845 & 0.0495 & 1.43225 & 10.79525 & 0.119\\     DDD & 39.4545 & 9.8695 & 15.3365 & 0.6915 & 2.246 & 10.6705 & 0.5105\\ \bottomrule     \end{tabulary}          \begin{tablenotes}     \item [1] the first note ...     \end{tablenotes}          \end{threeparttable}     \end{table}          \lipsum[2]          \end{document}      * * * **Edit** trying to **center** the two-line headings:               \usepackage{caption}     (...)     \begin{table}       \captionsetup{singlelinecheck=false, justification=centering}     \begin{threeparttable}     \caption{this is my first\newline table's very captive caption}      ... the result of this attempt doesn't look quite right ... how to do it right? * * * **Edit 2**   * How could I make the linebreak happen between two particular words (or even characters), **_but only iff_** the caption would linebreak in any case? Meaning, the linebreak would be "dormant" so long as the caption is short enough to fit entirely on one line; as soon as it would _have to_ linebreak, the break occurs at the predefined place.


title: \clearpage after every subsubsection

text: I'd like to clear the page at the end of every `\subsubsection`. I tried               \usepackage{titlesec}     \newcommand{\subsubsectionbreak}{\clearpage}      But this appears to force a `\clearpage` at the **start** of every `\subsubsection`. Is it possible to force a `\clearpage` at the end?


title: How can I construct a page layout with framed boxes?

text: For a report I'm writing, I have got an MS Word template for a page that needs to be included. The page looks like this (print screen from Word): ![A printscreen of the Word document](http://i.stack.imgur.com/dcZJ1.png) However, there are a few things that makes me not want to use this template in its current form, but rewrite it in LaTeX:   1. This page is in Word, while the rest of my report is in LaTeX. Hence the styles will be different, which includes fonts and line widths for example.   2. Word converts vector images stored in pdf format to low-resolved raster images when you include them (and yes it is still rasterized after you have printed it as a pdf file). Anyway, enough of the arguing for using LaTeX already and to the question: **How do I achieve this kind of layout using LaTeX**? All I need to know for the moment is how to create these kind of boxes that exist right next to each other in this pattern, and how to get the text adjusted properly within the boxes. **Edit:** It would be nice if the dimensions of the boxes were independent of the content inside of them. In that way the layout would stay the same for different people who used the same LaTeX template. My department at the university is maybe going to use it as an official alternative to the Word template.


title: Align chapter and section headings after their number/counter

text: How do I align headings whithout interfering with my TOC? This what I have:               1 Chapter     1.1 Section     1.1.1. Subsection      This is what I need               1      Chapter     1.1    Section     1.1.1. Subsection      I am using the `titlesec` package, but so far I have not been able to find a solution. Another problem, basically preventing me from "cheating", is that I am using the `tocloft` package. Thus, I need to find a way to align my headings without interfering with the TOC. MME:               \documentclass{scrreprt}          \usepackage{atveryend}     \usepackage{titlesec}               \titleformat{\chapter}{\normalfont\fontsize{12.5}{0}\bfseries}{\thechapter}{1em}{}     \titleformat{\section}{\normalfont\fontsize{10}{0}\bfseries}{\thesection}{1em}{}     \titleformat{\subsection}{\normalfont\fontsize{10}{0}\bfseries}{\thesubsection}{1em}{}     \titleformat{\subsubsection}{\normalfont\fontsize{10}{0}\bfseries}{\thesubsubsection}{1em}{}     \titleformat{\paragraph}{\normalfont\fontsize{10}{0}\bfseries}{\theparagraph}{1em}{}          \titlespacing*{\chapter}{0pt}{0pt}{14pt}     \titlespacing*{\section}{0pt}{14pt}{7pt}     \titlespacing*{\subsection}{0pt}{14pt}{0pt}     \titlespacing*{\subsubsection}{0pt}{7pt}{0pt}     \titlespacing*{\paragraph}{0pt}{14pt}{0pt}     \titlespacing*{\bhead}{0pt}{14pt}{0pt}          \makeatletter     \newlength{\secnumwidth}     \setlength{\secnumwidth}{0pt}     \providecommand*{\usesecnumwidth}{0pt}          \newcommand*{\secnumwidthbox}[1]{%       \begingroup         \sbox0{#1}%         \ifdim\wd0>\secnumwidth           \global\secnumwidth=\wd0\relax         \fi       \endgroup       \leavevmode       \hbox to          \ifdim\usesecnumwidth>\secnumwidth           \usesecnumwidth         \else           \secnumwidth         \fi       {#1\hfil}%     }          \let\org@chapterformat\chapterformat     \renewcommand*{\chapterformat}{%       \secnumwidthbox{\org@chapterformat}%     }          \renewcommand*{\othersectionlevelsformat}[3]{%       \secnumwidthbox{#3\autodot\hfill\enskip}%     }          \AfterLastShipout{%       \if@filesw         \immediate\write\@mainaux{%           \string\gdef\string\usesecnumwidth{\the\secnumwidth}%         }%       \fi       \ifdim\usesecnumwidth=\secnumwidth       \else         \@latex@warning@no@line{Rerun LaTeX, because \noexpand\usesecnumwidth           has changed}       \fi     }     \makeatother          \begin{document}     \chapter{Chapter}     \section{Section}     \subsection{Subsection}     \end{document}


title: Found it tiring to type so many \begin and \end

text: Is there some way to get rid of the `\begin` and `\end`'s? For example, I need to type a small matrix, but I should type `\begin{matrix}...\end{matrix}`. I tried to define a macro               \newcommand{\matx}[1]{\begin{matrix}{{#1}}\end{matrix}}      but it doesn't work. Do you know if there's a LaTeX way to do it? Thank you very much!


title: pgfplots axis abbreviation

text: Suppose I have a pgfplot with the following axis text:               |-----|-----|-----|------|     0    500  1000  1500  2000      Is there a way to change axis text to:               |-----|-----|-----|------|     0    0.5K  1K   1.5K    2K


title: Do not count appendix with total page count

text: When you open a PDF file made by TeX, you usually have some means of telling what the total page count is in the client GUI. I want to modify this page count such that the appendices is not counted along with the rest of the pages.


title: Cleveref doesn't find the label

text: The following code gives me as reference the section and not the signpost. It is probably a beginner's mistake.               \documentclass{article}          \usepackage{tikz}     \usepackage{mdframed}               \newcounter{signpost}%     \newenvironment{signpost}[1][]{%         \stepcounter{signpost}%             \ifstrempty{#1}%             {\mdfsetup{%                 frametitle={%                     \tikz[baseline=(current bounding box.east),outer sep=0pt]                     \node[anchor=east,rectangle,fill=blue!20]                     {\strut Summary~\thesignpost};}}             }%             {\mdfsetup{%                 frametitle={%                     \tikz[baseline=(current bounding box.east),outer sep=0pt]                     \node[anchor=east,rectangle,fill=blue!20]                     {\strut Summary~\thesignpost:~#1};}}%             }%             \mdfsetup{innertopmargin=10pt,linecolor=blue!20,%                 linewidth=2pt,topline=true,                 skipabove=6pt, skipbelow=6pt, nobreak=true,                 frametitleaboveskip=\dimexpr-\ht\strutbox\relax,}             \begin{mdframed}[]\relax%             }{\end{mdframed}}          \usepackage[noabbrev]{cleveref}     \crefname{signpost}{summary}{summaries}                     \begin{document}          \section{Hello Stackexchange}          This is some text.          \begin{signpost}[This is a summary]     This is a summary of the above text.     \label{signpost:MWE}     \end{signpost}          In \cref{signpost:MWE} you see \ldots          \end{document}      What do I need to change in order to get the "In signpost 1 you see..."


title: Changing copyright notice of theme

text: In this question about adding visual style and pizzaz one person gave an answer with a link to a package (grid.sty) whose documentation contains a style that suits me a lot. I would like to use it in a document I'm typesetting but I'm left wondering if I should leave the copyright as is or if I could remove it or change it to a copyright notice of my own making. What is the consensus in the TeX community? Has this issue cropped up for anyone else before? The packages I'm using for incorporating this style into my _memoir_ document are   1. rvdtx.sty   2. pdfwidgets.sty (included by rvdtx.sty) I'm not using _elsarticle.sty_ The license of the packages is the LPPL 1.2. I read the document and it doesn't seem to mention that the copyright must be visible in the generated document. However, to change the copyright information one would have to change the package _rvdtx.sty_ , which would imply making a Derived Work. Can I and should I post these alteration online? Should I ask the copyright holder? An image of how it looks (the copyright notice by Elsevier and River Valley is at the bottom:) ![grid.sty](http://i.stack.imgur.com/w5WDh.png). If this issue hasn't come up before and it's absolutely necessary to contact a lawyer about this, I think I just won't use the style. * * * **EDIT** : to sum up and remove ambiguities in my question:   * The package _rvdtx.sty_ includes a copyright notice for Elsevier in every footer. This is not configurable with package arguments   * I would like to change or eliminate this, thus I would have to modify the package   * Is this legal according to the LPPL (the license of the package)? What would I have to do to ensure the legality of my actions?


title: Font setup in header (ConTeXt)

text: I use `\setupheadertexts [][section][chapter][]` to get the section- and chapter-title in the header of the odd- and even pages. How to change the font, like its size, or making it bold or italic? The way `\setupheadertexts [][\it section][chapter][]` does not work, as "section" is than interpreted as text, and not as variable.


title: How to show the "data-does-not-start-at-zero" symbol on a pgfplot graph?

text: I have a graph and it doesn't start at zero. How do I add the symbol (my vague description is mentioned in the title) to the y axis of the graph? If it helps, my graph is a scatterplot. ![enter image description here](http://f.cl.ly/items/1o3u2Q2s3v450U0I3n0q/Screen%20Shot%202012-10-27%20at%208.38.08%20AM.png)


title: beamer: \nameref calls the name of the section instead of the name of the theorem environment

text: In my LaTeX documents, I am playing with a lot of axioms which I write under a `theorem` environment, while using the following math packages:               \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}:      I define the `axiom` environment in the preamble,               \newtheorem{ax}{Fairness axiom}      then in the text I write,               \begin{ax}[name of the axiom]     \label{label of the axiom}     {definition of the axiom}     \end{ax}      To refer to these axioms, I use `\nameref{label of the axiom}` through the following packages               \usepackage{hyperref}     \usepackage{nameref}      In the `article` document class, `\nameref{label of the axiom}` does exactly what I want : a reference to the name of the axiom with an hyperlink to its definition. But in the `beamer` class, `\nameref{label of the axiom}` quits referring to the name of the axiom and refers instead to the name of the section in which the axiom is included. Do you know why? Is there any way to get the `beamer` class behaving like the `article` class in this matter?


title: Formatting of matrices

text: I have a document full of matrices, and many of them don't look very good, right now. Hunting for solutions, I found this post from two years ago. I have the same problems mentioned there, and I'd also like to have better control over the amount of space between the outer-most columns and my delimiters (which are either brackets or lines). If it matters, my matrices are always either 3x3 or 4x4. Has any progress been made in the last two years? I would think that this would be a very common problem, and I'm amazed that there doesn't seem to be a package that addresses it. **Added** Two of the three problems I mentioned are well illustrated in the post cited above, so I don't see any point in repeating them here. The third problem I mentioned is shown here: ![matrix](http://i.stack.imgur.com/HOfSN.jpg) I'd like to have more space before the first column and after the third column. The example above was produced with the following code               \documentclass[a4paper,10pt]{article}          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{mathtools}     \usepackage{fontspec}     \setmainfont{Latin Modern Roman}          \begin{document}          $$     \begin{bmatrix*}[r]        {1} & { 2}  & { \mathbf M}  \\       {1} & {-3}  & { \mathbf M}  \\       {1} & { 6}  & {-\mathbf M}      \end{bmatrix*}     $$          \end{document}      I can fix the matrices one at a time, but that doesn't seem like the right solution. I'd like to have a new "matrix" command, but I don't have the expertise to create this myself, so I'm hoping that there is a package that provides one, now, after 2 years of progress. **Attempt at a Solution** Here is a neophyte's attempt at a solution, based on the one from Gonzalo Medina in the post cited above:               \newcommand\myfact{}     \newenvironment{Mybmatrix}[2][1.8]       {\renewcommand\myfact{#2}\renewcommand{\arraystretch}{#1}\left[\;\begin{matrix}}       {\\[-\myfact em]\mbox{}\end{matrix}\;\right]}      I don't understand much of it. Is this a good approach?


title: Not classical distribution of multiple images

text: I'm using the packages `\usepackage[font=small]{caption}`, `\usepackage{graphicx}` and `\usepackage[font=small, subrefformat=parens]{subcaption}` and I would like to organize 7 images like this: ![Desired distribution of pictures](http://i.stack.imgur.com/sY6MZ.png) Is there a way to achieve it with these packages?


title: connecting loop lines in algpascal?

text: I am using the algorithmic package to typeset an algorithm. I would like to have connecting lines between the beginning and end of a loop or conditional in `algpascal` package. in this link enter link description here you used `algpseudocode` package so, is it possible to have connecting loop lines in `algpascal` package? thanks


title: Point Symbol Analogous to Section Marker

text: Is there a standard typography symbol for _point_ used to reference a preceding list, analogous to the section marker `§`? Conceptual example: > As to •3 above...


title: Can one define an expandable command that removes control sequences from its argument?

text: I am trying to create an expandable command that accepts a single argument that may contain control sequences, and expands to that same argument with all control sequences and braces removed. That is:               \StripControlSequences{John Q. Author, \textit{Book Title}}       should expand to merely:               John Q. Author, Book Title      Alternatively, if I could designate the control sequences that get stripped out, such as `\textit`, `\textbf`, etc. that would be reasonable, as well. If I didn't care about expandability, this would be easy. I have a macro using xstring that strips out arbitrary control characters. If I just wanted to get rid of the formatting from `\textit` during execution, I could do something like this:               \def\StripControlSequences#1{{%     \let\textit=\relax%     #1%     }}      Unfortunately, this is not expandable; from my understanding, any macro that itself uses assignments (including `\let` and `\def`) can never be expanded. In this case, I need to use the output of `\StripControlSequences` in something like the following:               \def\Def#1#2{\expandafter\def\csname\StripControlSequences{#1}\endcsname{#2}}      such that the command sequence could later be called, without the control sequences, like the following:               \Def{John Q. Author, \textit{Book Title}}{full citation string}          \begin{document}     \csname John Q. Author, Book Title\endcsname     \end{document}      which would produce a document with only:               full citation string      (of course, users of my macro package wouldn't call `\csname ... \endcsname` directly, but you get the point). In case anyone is wondering about the context, I have a macro package for producing automated legal citations, and given that my target audience is non-technical, I need to try to make the interface as simple as possible. (I'm happy to explain more about the broader context, if necessary). I've hunted for a while for any good answers to this without luck; but I apologize if this has been asked before! I basically understand the problems with fragile/robust commands, but it seems to me that no combination of `\protect`, etc. will be applicable here, because `\protect` merely delays expansion until later execution, so as to allow its argument to be moved. On the other hand, here I basically want execution at all times. So perhaps another way to ask this question is: is it possible to force execution, like an `\edef` that fully executes its argument, instead of merely expanding it?


title: Modifying another checkmark, or adding another one?

text: I should explain beforehand, that I use XeLaTeX, so I have access to all kinds of fonts, and Unicode support. Now, I'm using the "BALLOT BOX" (U+2610) and "BALLOT BOX WITH CHECK" (U+2611) quite often for attendance protocols. Now, I'd like to add another character in the likes of that, but with a little "e" or "E" inside the ballot box. This is what I plan to use for "excused". I'd much rather mix the "BALLOT BOX" character with a smaller "E", rather than constructing a new shape as SVG or something, so it'll be no problem when changing to a different font.


title: Using XMLTeX to typeset OpenDocument Text

text: I know that XMLTeX has already been used to typeset TEI documents, but has anyone publicly worked on a set of environment files and stylesheets to typeset OpenDocument Text? I have been looking for such things lately but could not find anything. The rationale is that I want a comprehensive solution for typesetting ODT documents produced by OpenOffice and LibreOffice without having to rely on XSLT. Writer2LateX does a great job in some situations, but for more consistency and efficiency I deem it eminently desirable to be able to define the style of an ODT document directly in TeX and then apply this style to a set of documents that have the same structure and use the same styles. Writer2LaTeX uses Java, XSLT and components from the OpenOffice SDK to produce a relatively faithful LaTeX document from the provided ODT; this means that every time the source ODT is modified, a new LaTeX document must be produced from it, with _all_ content and _all_ styles converted each time. What is more, Writer2LaTeX must more or less “reinvent the wheel” each time it is given a new paragraph, character or list style, resulting in environment and command definitions which are extremely verbose. It would be great to instead create concise and generic environment definitions for each ODT element and then create more detailed definitions for each style attribute. Am I making sense? I am aware of the fact that what I am asking for is huge. After all, to get the expected results, one would have to provide definitions for _all_ the elements of _all_ the relevant XML namespaces (a typical ODT file has many besides the standard ODF 1.2 namespaces). However, if someone provided those generic element definitions “once and for all”, then the person who is in charge of typesetting a given document could concentrate on defining environments for the particular styles encountered in the particular document.


title: Preview in auctex on debian stable works in dvi mode, but fails on pdf mode

text: My `auctex` renders preview images on my debian stable system (6.0.6) if I set it to `dvi` mode, but it fails if I set `auctex` to `pdf` mode. ![auctex renders preview images on my debian stable system](http://i.stack.imgur.com/xymVf.png) ![auctex fails if i set it to pdf mode](http://i.stack.imgur.com/rexnx.png) I assume there is either a mistake in my `emacs` configuration or a permanent bug in the `ghostscript` package. I need help to isolate the bug step by step. Additionally I would be glad, if someone with the same software could help me out with his configuration. Perhaps it will help, if I can upgrade the `ghostscript` package, but I have no idea how to do this as I found no backport yet. My complete emacs configuration is available on github.               $ ghostscript --version     8.71     $ emacs-snapshot --version     GNU Emacs 24.2.50.1     $ pdftex --version     pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)


title: algorithm2e - Different ending words for switch and case blocks

text: In the following MWE, I would like the end of `switch` to be different from the ends of `case` and `other`. Is it possible ?               \documentclass{article}         \usepackage{algorithm2e}          \begin{document}          \begin{algorithm}         \Begin{             \Switch{X}{                 \Case{1}{                     \While{Continue}{Action}                 }                 \Other{Other}             }         }     \end{algorithm}          \end{document}


title: MacTeX 2014 installation failed - no software found to install

text: I'm having trouble installing MacTeX 2014 after I've uninstalled 2013 on my Mac. Whenever I try to install, I get the following error clicking _Install_. ![screenshot](http://i.imgur.com/dPcT59s.png) I've tried to only install TeXLive-2014 and skip GhostScript and the GUI application, but that didn't help ![screenshot](http://i.imgur.com/JLb2q7D.png) **the same also happens if I try to only install either GhostScript or the GUI Applications.** I also tried downloading the MacTeX version from the Torrent, but I'm getting the same result. The exact version I'm trying is mactex-20140525.pkg


title: List a CMake file

text: Does anyone have/know of a style file for the listings package which would enable the correct syntax highlighting of `cmake` files in LaTeX?


title: How do I refer in the text to a molecule drawn with chemfig?

text: I just found `chemfig` fantastic for drawing even difficult molecules. Now, I have a question: how can I put under the molecule a line with a caption like "Figure #: captiontext" and, even more important, how can I refer in the text to the drawn molecule?


title: tex4ht and colortbl

text: The package `colortbl` steals my beloved horizontal rules in the longtable. When I run `tex4ht`.               % run: htlatex main.tex          \documentclass{article}     \usepackage{longtable}     %\usepackage{colortbl}          \begin{document}          \begin{longtable}{c|c}     fooo & baaar \\\hline     baz &  morebaz\\\hline     \end{longtable}               \end{document}      The file above gives a beautiful html, but when I load the package `colortbl`, it eats my `\hline`. Question: how to get the horizontal rules _and_ use the package `colortbl`?


title: Allowing breaks at a location with no spaces or hyphens

text: I have two letters: A and B. In most situations, I'd like them to appear together with no space, e.g. ("AB"), however, if TeX feels it needs a linebreak or to split these across two pages, this is allowed. This could appear as: > AB Or: > A > > B What can I place between the two letters (or long string of letters), which will allow them to be split across pages?   * This should leave no space.   * This should leave no hyphen.   * This should use the same splitting rules used if the letters actually had a space.


title: Compiled documents appearing with extra wide right margin

text: This problem appeared after I installed XeTeX from TeX Live 2011. Now, many of my files are rendering with a very wide right-hand margin. Here is some sample code:               \documentclass{octavo}     \usepackage{lipsum}     \begin{document}         \lipsum     \end{document}      When running `pdflatex` or `xelatex` on the file, the right 60% of the file is white and the text is all of the right. With `xelatex`, the output PDF always ignores my custom page dimensions and only gives A4 paper with my text printed very small in the top left corner.


title: pgfplots: group stacked bars

text: I'm trying to create groups of 5 stacked xbars, using `y expr={\thisrow{y} - (mod(\thisrow{y},5)/2)}`. However, after some groups, the calculation seems to get thrown off and the third group actually consists of 6 bars:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}     \usepackage{pgfplotstable}     \begin{document}     \pgfplotstableread{%     x y     0 0     1 1     2 2     3 3     4 4     5 5     6 6     7 7     8 8     9 9     10 10     11 11     12 12     13 13     14 14     15 15     16 16     17 17     18 18     19 19     20 20     21 21     }\loadedtable              \begin{figure}[h]             \begin{tikzpicture}                 \begin{axis}[xbar stacked, ytick=data, y=0.9cm]                     \addplot table[x=x,y expr={\thisrow{y} - (mod(\thisrow{y},5)/2)}] \loadedtable ;                     \addplot table[x=x,y expr={\thisrow{y} - (mod(\thisrow{y},5)/2)}] \loadedtable ;                 \end{axis}             \end{tikzpicture}         \end{figure}     \end{document}      ![enter image description here](http://i.stack.imgur.com/OmCLQ.png)


title: How to fully build with Rubber?

text: How do I do a full build with `rubber` that does the equivalent of               latex foo     bibtex foo     makeindex -s myindex.ist foo     latex foo     latex foo     dvips foo     ps2pdf foo      The files I am using are               foo.tex     myindex.ist


title: Beamer and bytefield

text: I am using **bytefield** package with **beamer** having the same problem described here. According with Till Tantau, in **2004** , _the problem is due to the fact that bytecode redefines the so-called catcode of & to 10._ Any other hint? Are there alternatives to use? The code I am using:               \documentclass[]{beamer}          \usepackage[T1]{fontenc}      \usepackage[brazil]{babel}       \usepackage[utf8]{inputenc}          \usepackage{bytefield}          \begin{document}          \frame{       \frametitle{}          \begin{bytefield}[leftcurly=.]{32}     \bitheader[endianness=big]{0,22,23,30,31} \\     \begin{leftwordgroup}{}     \bitbox{1}{s} & \bitbox{8}{\textcolor{red}{E}} & \bitbox{23}{f - mantissa}     \end{leftwordgroup}      \end{bytefield}          }     \end{document}


title: Caption for align environment

text: I would like to add a caption under the set of equations that I have in the `align` environment (i.e., `\begin{align}` `...` `\end{align}`). I tried `\caption{...}` inside the `align` environment, but it didn't work.


title: Listing books in a series

text: Are there any package for creating a list of books within a series, i.e. for, listing the chronology of a series (which includes the current book within), or providing a list of other books by the same author?


title: How to customize pagenumber position using fncychap

text: Using `fancypages` and two-sided documents, I used to set `\fancyfoot[LE,RO]{\thepage}` to get the page number on the page away from the center. Now that I use the package `fncychap` it won't work on pages where I start a new chapter because of the style. Can anyone help me edit this somehow? I am using LyX but am quite used to filling up the preample with LaTeX code.


title: Highlight equations by temporary changing the formatting of their number

text: I am writing a long paper having 100+ equations, and want to highlight a few key equations. Since the journal won't let me use boxes around equations, I am trying to have their label being typeset differently, e.g. as (5*) instead of (5). This should only affect specific equations. I have been trying to set up a new environment similar to subequations, but without success.


title: Circular arrow in tikz-cd

text: How do I draw a circular arrow (to indicate commutativity) in tikz-cd, similar to the one in the middle of the following diagram? ![](http://i.stack.imgur.com/8vfXs.png) (Image from this question.)


title: Bibtex link word "AND" with different translations in a single bibliography

text: In a thesis, I refer to english publications and some old publications written in french or german. So in my text I have that kind of references: [Billy and John], [Pierre and Paul], [Helmut and Friedrich]. Is there a way to have a different linking word ("and") between authors according to the publication language? What I need is [Billy and John], [Pierre et Paul], [Helmut und Friedrich].


title: How to change bibliography item labels to boldface?

text: I would like to change the labels for my bibliography items to boldface (only in the reference list, not for citations in the text). The complete label should be printed in bold, i.e., including the square brackets. I had a look at these questions: How to change the appeareance of bibliography item labels in amsrefs? and BibLaTeX bibliography without square brackets. However, I was unable to transfer them to my case. I even tried to change the bst file, but couldn't get what I wanted to achieve. What is the correct approach to change only the appearance of the labels in the bibliography? Here's my example:               \documentclass{article}          \bibliographystyle{alpha}          \begin{document}          I cite \cite{A1} and \cite{B2} in my text.          \bibliography{bibliography}          \end{document}      And this is the content of bibliography.bib:               @BOOK{A1,        author = {Author One},        title = {Alpha},        publisher = {Publisher A},        year = {2000},        }          @BOOK{B2,        author = {Author Two},        title = {Beta},        publisher = {Publisher B},        year = {2001},        }      This is what I want the output to look like: ![Desired Output](http://i.stack.imgur.com/WOhwF.png)


title: How to change the height of the sum sign

text: I would prefer to write the definition as in equation (2). However the sum sign is too low in this case. Is there a way to make it higher?               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{equation}      \ell_{p}(n)= \sum_{k=1}^{\infty}{{\genfrac{\lfloor}{\rfloor}{}{}{n}{p^{k}}}}\bmod2      \end{equation}     \begin{equation}      \ell_{p}(n)= \sum_{k\geq1}{{\genfrac{\lfloor}{\rfloor}{}{}{n}{p^{k}}}}\bmod2      \end{equation}     \end{document}      ![output of example code](http://i.stack.imgur.com/Dqnyg.png) ![enter image description here](http://i.stack.imgur.com/PCaYD.png)


title: Tables inside of ntheorem environment

text: Very short question: How to put table inside of the ntheorem environment? Simple first try               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}          \usepackage{ntheorem}     \usepackage{amsmath}     \usepackage{thmtools}     \usepackage[dvipsnames]{xcolor}          \definecolor{defbckgcolor}{RGB}{200,220,240}     \theoremstyle{break}     \declaretheorem[     name=Definition,     shaded={margin=0.5em, bgcolor=defbckgcolor},     %thmbox=M,     numberwithin=section]     {definition}          %opening     \title{Table in ntheorem}     \author{John Doe}          \begin{document}          \maketitle          \section{Example}     intro     \begin{definition}     Some text     \begin{table}[htbp]     \begin{tabular}{lll}     \hline     1 & 2 & 3\\     4 & 5 & 6\\     7 & 8 & 9\\     \hline     \end{tabular}     \caption{Example}       \end{table}     more text.     \end{definition}     conclusion          \end{document}      gives an error:               Overfull \hbox (6.0pt too wide) in paragraph at lines 40--40     [][]      [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]          ! LaTeX Error: Float(s) lost.      Didn't yet try, but how about figures? Same issue?


title: How to write this algorithm properly

text: Here I have attached the current code               \begin{document}          \begin{flushleft}          \begin{picture}(10,5)          \put(1,1){\line(1,0){450}}          \end{picture}          \end{flushleft}          \textbf{\textit{Algorithm:}} Curves on Air          \\\textbf{\textit{given}} \textit{initialisation:} \textit{$\lambda(0)=pi$ and      $\epsilon=10^{-9}$.}          \\$\textbf{\textit{i=0}}$          \\\textit{1. compute $x_{0}$:}          \begin{equation}          x_{0}(i)=\frac {\lambda(i)-1}{AB-C^2} \nonumber      \end{equation}          \textit{2. update $\lambda$}:          \begin{equation}     \lambda(i+1)=\arctan\bigg( -\frac{1}{x_{0}(i)+1} \bigg)  \nonumber     \end{equation}          $\textbf{\textit{i=i+1}}$ \\ \textit{\textbf{repeat} till $|\lambda(i+1)-\lambda(i) |<\epsilon$ }          \\     \begin{picture}(10,5)     \put(1,1){\line(1,0){450}}     \end{picture}               \end{document}


title: TOC: center 'Part' and wrap subsubsection properly

text: I would like to center PART and wrap the subsubsection in one line in TOC, with proper indentation (matching with section or subsection or chapter). Please see the image. Attached is the sample code too. Thank you very much. ![Sample Current Output](http://i.stack.imgur.com/ACMJ0.jpg)               \documentclass[12pt,bothside]{book}               \usepackage[titles]{tocloft}%      \renewcommand{\cftchapleader}{~\cftdotfill{5}}     \setcounter{secnumdepth}{0}     \setcounter{tocdepth}{3}          % to center part     \renewcommand{\cftpartfont}{\hfill\Large\bfseries}     \renewcommand{\cftpartaftersnum}{\hfill}     \addtocontents{toc}{\cftpagenumbersoff{part}}          %wrap TOC contents     \usepackage{titletoc}     \titlecontents*{subsubsection}% <section>       [1.5em]% <left>       {\scriptsize}% <above-code>       {}% <numbered-entry-format>       {}% <numberless-entry-format>       {,\ \thecontentspage}% <filler-page-format>       [\ - \ ]% <separator>       [\\]% <end>               \begin{document}          \frontmatter     \tableofcontents          \mainmatter     \part{Part 1}     \chapter{Chapter1}     \section{Section 1}     \subsubsection{Subsubsection 1}     \subsubsection{Subsubsection 2}               \part{Part 2}     \chapter{Chapter1}     \section{Section 1}     \subsection{Subection 1}     \subsubsection{Subsubsection 1}     \subsubsection{Subsubsection 2}               \end{document}


title: small-caps figures, anyone?

text: Is there a good (possibly free) opentype font out there with small-caps figures and small question and exclamation marks; and could I use them with xelatex + fontspec? Or, better still, is there a workaround I can use with one of the excellent free fonts like Linux Libertine or TeX Gyre Pagella? I need this for my page headers, which I want to typeset in all-smallcaps; therefore it would be useful to have some kind of mechanism I can put in my pagestyle macro. Shrinking all-caps is not the way -- in Linux Libertine, for example, lining numbers and question and exclamation marks are noticably smaller than the capital letters, and anyway, scaled caps don't look that good. Based on this answer I tried the following, which seems to work within normal text, but not in the pagestyle macro (I'm not very comfortable around `\catcode` and `\lccode`, so it's more or less copy and paste and trial and error; maybe it just needs the odd `\protect` strewn in?): `File mysmallcaps.sty`:               \ProvidesPackage{mysmallcaps}     \newenvironment{mylcsc}{%         \addfontfeature{Letters=UppercaseSmallCaps,Letters=SmallCaps,LetterSpace=2,WordSpace=1.2,Numbers=Lining}%         \catcode`\'=\active\begingroup\lccode`\~=`\'\lowercase{\endgroup\def~{\protect\raisebox{-0.45ex}{\kern0.03em'}}}%         \catcode`!=\active\begingroup\lccode`\~=`!\lowercase{\endgroup\def~{\protect\scalebox{1}[0.75]{\kern0.01em!}}}%         \catcode`?=\active\begingroup\lccode`\~=`?\lowercase{\endgroup\def~{\protect\scalebox{1}[0.75]{\kern0.02em?}}}%         \catcode`1=\active\begingroup\lccode`\~=`1\lowercase{\endgroup\def~{\protect\scalebox{1}[0.8]{1}}}%         \catcode`2=\active\begingroup\lccode`\~=`2\lowercase{\endgroup\def~{\protect\scalebox{1}[0.8]{2}}}%         \catcode`3=\active\begingroup\lccode`\~=`3\lowercase{\endgroup\def~{\protect\scalebox{1}[0.8]{3}}}%         \catcode`4=\active\begingroup\lccode`\~=`4\lowercase{\endgroup\def~{\protect\scalebox{1}[0.8]{4}}}%         \catcode`5=\active\begingroup\lccode`\~=`5\lowercase{\endgroup\def~{\protect\scalebox{1}[0.8]{5}}}%         \catcode`6=\active\begingroup\lccode`\~=`6\lowercase{\endgroup\def~{\protect\scalebox{1}[0.8]{6}}}%         \catcode`7=\active\begingroup\lccode`\~=`7\lowercase{\endgroup\def~{\protect\scalebox{1}[0.8]{7}}}%         \catcode`8=\active\begingroup\lccode`\~=`8\lowercase{\endgroup\def~{\protect\scalebox{1}[0.8]{8}}}%         \catcode`9=\active\begingroup\lccode`\~=`9\lowercase{\endgroup\def~{\protect\scalebox{1}[0.8]{9}}}%         \catcode`0=\active\begingroup\lccode`\~=`0\lowercase{\endgroup\def~{\protect\scalebox{1}[0.8]{0}}}%     }{}     % redefining \ps@headings like this does _not_ work:     \def\ps@mynewheadings{%         \ps@headings         \let\@oddfoot\@empty\let\@evenfoot\@empty         \def\@evenhead{%             \thepage\hfil             \normalfont\small\begin{mylcsc}\MakeLowercase{\leftmark}\end{mylcsc}%         }%         \def\@oddhead{%             {\normalfont\small\begin{mylcsc}\MakeLowercase{\rightmark}\end{mylcsc}}%             \hfil\thepage%         }%     }     \pagestyle{mynewheadings}      File `test.tex`:               \documentclass{book}     \usepackage{lipsum}     \usepackage{fontspec}     \setmainfont[Numbers=OldStyle, Ligatures=TeX]{Linux Libertine O}     \usepackage{mysmallcaps}     \begin{document}         \chapter{Here comes Orwell's 1984!}         \section{Whatever happened in 336\,\textsc{bc} that made the high priest blush?}%         Can't? Won't! 0123456789\\[3mm]         \emph{Small-caps with homemade corrections:}\\         \begin{mylcsc}Can't? Won't! 0123456789\end{mylcsc}\\[3mm]         \emph{Scaled all-caps:}\\         \scalebox{0.65}[0.65]{\addfontfeature{Numbers=Lining, LetterSpace=4}\MakeUppercase{Can't? Won't! 0123456789}}\\[12mm]         \lipsum\lipsum     \end{document}     \endinput