title: siunitx: specifying custom command as input-symbol

text: This is a follow up from siunitx uses math mode for symbols - workaround needed when using different fonts for math and text. The problem has been solved thanks to David, however there is a problem remaining with tables that are generated by `esttab` for Stata. Esttab enters asterisks by a newly defined `\sym` command, i.e. `\sym{*}`. This is not necessary since I have redefined `\sym` to plain text, but esttab does not offer an option to omit the `\sym` command. The problem is that siunitx does not recognise `\sym` as an input-symbol and the result are overfull hboxes, as the MWE below illustrates. My question is how to specify `\sym{*}`, `\sym{**}` and `\sym{***}` as input symbols for siunitx as I would like to avoid hacking the esttab plugin (btw, the problem is not pdfLaTeX or XeLaTeX specific).               \documentclass{scrartcl}     \usepackage{booktabs}     \usepackage[osf]{mathpazo}     \usepackage[euler-digits]{eulervm}     \overfullrule=5pt          % For Tables created by estout     \newcommand{\sym}[1]{#1} % for symbols in Table     \usepackage{siunitx}     \sisetup{ detect-mode,                group-digits            = false ,               input-signs             = ,               input-symbols           = ()[]-+* , % specifying \sym here does not work               input-open-uncertainty  = ,               input-close-uncertainty = ,               table-align-text-post   = false              }          \def\xxx#1{%       \bgroup\uccode`\~\expandafter`\string#1%       \uppercase{\egroup\edef~{\noexpand\text\string#1}}%       \mathcode\expandafter`\string#1"8000 }     \def\textsymbols{\xxx[\xxx]\xxx(\xxx)\xxx*}          \begin{document}          {\textsymbols     \begin{tabular*}{0.75\textwidth}{         l @{\extracolsep\fill} *{2}{S[table-format=4.6]} @{}}     \toprule     \multicolumn{1}{@{}l}{\emph{Age}}  \\[0.5ex]     18--24 &   [-1360.228]*  &  -1371.941\sym{*}  \\            &       (6.915)\sym{**} &    (-7.953)**      \\     \bottomrule     \end{tabular*}}     \end{document}      ![enter image description here](http://i.stack.imgur.com/akxDO.png)


title: Left aligning cell contents in a table

text: If you compile the code given below, then the row which states "Average Pre- Authentication Response Time" is justified with a lot of spacing between the words. I want it to be left-aligned. Also, if a line breakage is required, then can I ask LaTeX to prefer keeping the word as a whole and shifting it to the next line if space is available? In this case, there is a hyphen and the word is breaking, but there is enough space for the whole word to shift down.               \documentclass{article}\usepackage[]{graphicx}\usepackage[]{color}     %% maxwidth is the original width if it is less than linewidth     %% otherwise use linewidth (to make sure the graphics do not exceed the margin)     \makeatletter     \def\maxwidth{ %       \ifdim\Gin@nat@width>\linewidth         \linewidth       \else         \Gin@nat@width       \fi     }     \makeatother          \definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345}     \newcommand{\hlnum}[1]{\textcolor[rgb]{0.686,0.059,0.569}{#1}}%     \newcommand{\hlstr}[1]{\textcolor[rgb]{0.192,0.494,0.8}{#1}}%     \newcommand{\hlcom}[1]{\textcolor[rgb]{0.678,0.584,0.686}{\textit{#1}}}%     \newcommand{\hlopt}[1]{\textcolor[rgb]{0,0,0}{#1}}%     \newcommand{\hlstd}[1]{\textcolor[rgb]{0.345,0.345,0.345}{#1}}%     \newcommand{\hlkwa}[1]{\textcolor[rgb]{0.161,0.373,0.58}{\textbf{#1}}}%     \newcommand{\hlkwb}[1]{\textcolor[rgb]{0.69,0.353,0.396}{#1}}%     \newcommand{\hlkwc}[1]{\textcolor[rgb]{0.333,0.667,0.333}{#1}}%     \newcommand{\hlkwd}[1]{\textcolor[rgb]{0.737,0.353,0.396}{\textbf{#1}}}%               \definecolor{shadecolor}{rgb}{.97, .97, .97}     \definecolor{messagecolor}{rgb}{0, 0, 0}     \definecolor{warningcolor}{rgb}{1, 0, 1}     \definecolor{errorcolor}{rgb}{1, 0, 0}     \newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX          \usepackage{alltt}     \usepackage{graphicx,booktabs}     \usepackage{tabularx}     \usepackage[table]{xcolor}     \usepackage{array}     \usepackage{ragged2e}     \newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}          %% for inline R code: if the inline code is not correctly parsed, you will see a message     \newcommand{\rinline}[1]{SOMETHING WRONG WITH knitr}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \colorlet{tableheadcolor}{blue!25}     \colorlet{fail}{red}     \colorlet{passPoor}{yellow}     \colorlet{passGood}{green!50}     \colorlet{optimal}{green}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \addtolength{\oddsidemargin}{-.875in}     \addtolength{\evensidemargin}{-.875in}     \addtolength{\textwidth}{1.75in}     \addtolength{\topmargin}{-.875in}     \addtolength{\textheight}{1.75in}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \IfFileExists{upquote.sty}{\usepackage{upquote}}{}          \begin{document}          \section{Summary}     \begin{flushleft}     \begin{table}[htbp]       \small       \centering       \caption{Brief overview of the Results}         \begin{tabularx}{0.75\textwidth}{XX}         %\hline         \toprule         \rowcolor{tableheadcolor}         Metrics for machine  & \textbf{Result} \\         %\hline         \midrule         Failure Rate & 0.00\% \\         Lorema LoremLore Lore & 0.0 sec \\         Average Pre-Authentication (ASD) Response Time & 0.0 sec \\         Overall Result & \cellcolor{passGood}Passed \\         %\hline         \bottomrule         \end{tabularx}%       \label{tab:overviewOld}%     \normalsize     \end{table}     \end{flushleft}          \end{document}


title: Macro's in mhchem?

text: I want to write hydroxyl radicals quite frequently, so I thought of making a small macro. But with the macro, the text is not processed as chemical compounds in the `mhchem` package. Consider the following MWE:               \documentclass{standalone}          \usepackage[version=3]{mhchem}     \usepackage{amsmath}          \newcommand\ohrad{OH^{.}}          \begin{document}          This is with the macro \ce{\ohrad}, this is without the macro \ce{OH^{.}}          \end{document}      and the output ![enter image description here](http://i.stack.imgur.com/PbRWw.png)


title: How to modify the number of columns in a poster under scrartcl document class

text: I am using the `scrartcl` document class to produce a poster for a conference presentation. The number of columns set at the beginning of the document is four, but I would like to use four just for the upper part of the poster and then modify the number of the columns, for example two or three, for the lower part. In any case there seems to be no change in doing that.


title: How to put a vertical space between two functions inside algorithmic environment?

text: To make the algorithm readable, I would like to put some space between two functions. E.g.:               \documentclass{article}     \usepackage{algorithm}     \usepackage{algpseudocode}     \begin{document}     \begin{algorithm}[t]       \begin{algorithmic}[1]         \Function{Euclid1}{$a,b$}\Comment{The g.c.d. of a and b}         \State $r\gets a\bmod b$         \While{$r\not=0$}\Comment{We have the answer if r is 0}           \State $a\gets b$           \State $b\gets r$           \State $r\gets a\bmod b$         \EndWhile         \State \textbf{return} $b$\Comment{The gcd is b}         \EndFunction              \Function{Euclid2}{$a,b$}\Comment{The g.c.d. of a and b}         \State $r\gets a\bmod b$         \While{$r\not=0$}\Comment{We have the answer if r is 0}           \State $a\gets b$           \State $b\gets r$           \State $r\gets a\bmod b$         \EndWhile         \State \textbf{return} $b$\Comment{The gcd is b}         \EndFunction            \end{algorithmic}       \caption{Euclid2’s algorithm}\label{euclid2}     \end{algorithm}     \end{document}


title: How to force latex to put a quote in one line?

text: I am currently writing a CV on LaTeX. I want to have a quote on the head of my modernCV, but latex puts ONE word into a second line. Can I make LaTeX put all the quote into one line?               \documentclass[11pt,a4paper,sans]{moderncv}       \usepackage[latin1]{inputenc}     \usepackage[ngerman]{babel}      \usepackage[T1]{fontenc}      \usepackage{lmodern}      \moderncvtheme[red]{classic}     \usepackage[scale=0.8]{geometry}     \firstname{}      \familyname{}      \title{\textcolor{red}{\textsc{Curriculum Vit\ae}}}      \address{}{}      \mobile{}      \phone{}      \email{}           \quote{\glqq quote \grqq \begin{flushright} -authorname- \end{flushright}}      And I don't mean that the authorname is in a second line (as a matter of fact of `\flushright`) but that the quote is one word too long to fit into one line.


title: How to indent long frametitle (beamer)?

text: I have (sub)section numbers in the `\frametitle`, and I want an indentation if the frame title is too long to fit in one line (similar to default LaTeX behavior). I fiddeled around with adding `\hangindent=3em` to the `\frametitle` argument but this does not help. Example:               \documentclass{beamer}     \begin{document}     \begin{frame}     \frametitle{1.1 A long frametitle that produces a linebreak line line line line line}          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua.           \end{frame}     \end{document}      The desired outcome would be something like:               1.1 A long frametitle that produces a linebreak         line line line line line      instead of               1.1 A long frametitle that produces a linebreak     line line line line line      Background: The whole `\frametitle` command with (sub)section number and actual (sub)section heading is generated by the following command:               \newcommand{\frametitledef}{\frametitle{     \ifnum\value{subsection}=0       \thesection{} \insertsection{}     \else       \ifnum\value{subsubsection}=0         \thesection{}.\thesubsection{} \insertsubsection{}       \else         \thesection{}.\thesubsection{}.\thesubsubsection{} \insertsubsubsection{}       \fi     \fi     }}


title: Latex Conditional Display of Image

text: I have an interesting situation, I am passing a variable into a LaTeX page via `smarty` & `php`. I am generating a PHP Quote form to be used by multiple companies, and what changes is just the logo header and some variables just below the header. I have a variable `$outletname` and would like to display the following at the top (or even in the header)..               if $outlet1 = star, display logo_star1.png      if outlet1=jambb, display a different logo...       and so on and so forth. I'll then just pick these from a directory where GD uploads and names the logos in a certain format... I'll appreciate your help in this. * * * @Werner, I currently have about ten images. Logos, Lemme try to make things clearer... A school has ten departments, each department has a different header for a document whose content and footer are the same. (in other words generate use one layout and content pages but different header logos depending on department that the document is addressed to). So we have:   1. Engineering with a corresponding `Engineering.png` logo that goes at the top of the document,    2. Business Studies that has a `Business_Studies.png` logo    3. `Computer_Science.png` & `comp_science.png` and so on and so forth. I can pass a single variable $department to the pdf, i have gotten as far as display the right department on the generated document. I now need to use that variable in a loop to have an image header used that corresponds to the department..               so if ($department="engineering") { display ../images/engineering.png}     elseif ($department=compsci"){display comp_sci.png}...       Im interested in a LaTeX syntax that can be used to do conditional display of items, in this case images.


title: Can a command begin and end within {} and {}?

text: Is there any way to have a command, such as `\section{}`, begin and end inside two other commands?               \documentclass{article}         \newcommand{\thisisaspecialcommand}[1]{             #1         }     \begin{document}         \thisisaspecialcommand{\section{} % The section begins here.         \thisisaspecialcommand{This is the section's title.}         \thisisaspecialcommand{}} % The section ends here.         (text)     \end{document}      In this sample code, LaTeX does not understand which `{` begins the section and which `}` ends the section.


title: Combining citations for two different sets of authors with Natbib when they share a common lead author

text: I use natbib and bibtex. I have 2 different articles as follows:               Article 1- Written by authors A, B, C, and D in year 2000.     Article 2- Written by authors A, C, E, and G in year 2003.      I want to refer to these 2 articles in the text. I would say something like A et al. (2000, 2003) but I know that is not precise since technically they are 2 different sets of authors. In reality, I only care about referencing the first author in something like Author A and collagues in 2000 and 2003. However, because I use hyperreferencing, natbib, and bibtex, I still want it to be the case that when I click on the 2000 in the .pdf, it takes me to the bibliographic information in the reference section for the 2000 article and the same with the 2003 one. I use natbib. Any suggestions? Thank you!


title: How to deal with the size of the exponential type function's argument?

text: I have the following function in a report of global size 12 :               $Q= \rho V c_{p} \left( T -T_{\infty} \right) [ 1-e^{\frac {h A_s}{\rho V c_{p}}t}]$      As one would expect, the exponential function's argument appears very tiny: ![enter image description here](http://i.stack.imgur.com/0L8o1.png) **Now , my question is that** : Are there ways to make deal with this problem?Some people _may suggest and have suggested) that I change the argument's font size_..that surely is a way but in small font sizes such as font size 12, it looks terrible , and _others suggest to use the`exp` function_ , but I feel that , that answer applies to a class of functions that have popular inline alternatives. Also answers suggested should be within the range of good scientific/mathematical documentation practices.


title: xcolor \color command affects the wrong word in a Hebrew sequence

text: When compiling               \documentclass{article}     \usepackage[utf8x]{inputenc}     \usepackage[hebrew,english]{babel}     \usepackage{xcolor}     \begin{document}     \sethebrew     ראשונה     \color{red} שניה \color{black}      שלישית     \end{document}      I get the following output ![enter image description here](http://i.stack.imgur.com/HSiYo.png) instead of the middle word being red. Is there a way to fix it?


title: Replacing dot leaders in the table of contents with better typography

text: Dot leaders are the lines of dots in the table of contents, for example. Bringhurst says of them: > [They] force the eye to walk the width of the page like a prisoner being > escorted back to its cell (p.35) He is not a fan. And nor am I. I'm trying to recreate the style that Bringhurst suggests on that same page. It has the following features:   * section titles ragged left.   * page numbers ragged right.   * between the two, a large-ish center dot.   * More or less centered toc. Here's what I have so far:               \documentclass{article}     \usepackage{tocloft}     \usepackage{graphicx}     \newcommand\meddot{\scalebox{0.7}{\textbullet}}     \renewcommand\cftsecfont{\hfill}     \renewcommand\cftsecleader{\quad\meddot}     \renewcommand\cftsecpagefont{\normalfont}     \renewcommand\cftsecafterpnum{\cftparfillskip}     \renewcommand\cftdot{}     \usepackage{lipsum}     \begin{document}     \tableofcontents          \section{One}     \lipsum     \section{Two and then some more words to make it long}     \lipsum     \section{Three}     \setcounter{page}{40}     \lipsum     \section{Quattro}     \lipsum     \end{document}      The current code's deficiencies are:   * The page numbers aren't ragged right. (adding `\raggedright` to `\cftsecpagefont` has not effect. Adding `\flushleft` breaks it. [`Missing item` error])   * The TOC isn't centred: it is too far left. What I'd _really_ like is a kind of tabular with three columns: section number, title and page number. And control over spacing and alignment of all three individually… My question is, is piecemeal fiddling with `tocloft` the best way to achieve what I want? And if so, how do I achieve it. If it isn't the best way, what better options to I have for pleasing looking tables of contents?


title: Vertical line left out in tabular

text: The code               \documentclass[a4paper]{article}     \usepackage{multirow}     \begin{document}          \begin{tabular}{|l|l|l|l|l|l|l|}       \hline       \multirow{2}{*}{Color Type} & \multirow{2}{*}{Channels} & \multicolumn{5}{c}{Bits per         channel} \\            \cline{3-7}            & & 1 & 2 & 4 & 8 & 16 \\            \hline          \end{tabular}          \end{document}      Results in the table ![enter image description here](http://i.stack.imgur.com/Eidma.png) How may I fix this code so that a vertical line is also added after "Bits per channel"?


title: Getting correct labels on axes with PSTricks

text: Consider the following example. **Code**               % latex test.tex     % dvips test.dvi     % ps2pdf test.ps          \documentclass{article}          \usepackage{pst-coil,pstricks-add}          \def\turister#1#2{%      \psset{linewidth=0.075,linecolor=red}       \psline(!#1 1990 sub 0)(!#1 1990 sub #2 190 sub)       \psline(!#1 1990 sub 0.25 sub #2 190 sub)(!#1 1990 sub 0.25 add #2 190 sub)     }          \begin{document}          \psset{xunit=1.4,yunit=0.07}     \begin{pspicture}(8,150)       \psaxes[labels=none,yAxis=false](1,0)       \psaxes[Ox=1991,yAxis=false]{->}(1,0)(6.5,0)[{\AA}rstal,0][,90]       \psaxes[xAxis=false,Oy=200,Dy=10](0,2)       \pszigzag[coilarm=0.125,coilwidth=0.3,coilheight=0.5](0,2)(0,8)       \psaxes[xAxis=false,Oy=200,Dy=10,ylabelFactor={\cdot 10^3}]{->}%         (0,10)(0,7.5)(0,135)[,0][Antal norske turister,90]       \psline[linecolor=blue](0,98)(6.5,98)       \turister{1991}{264}       \turister{1992}{285}       \turister{1993}{290}       \turister{1994}{298}       \turister{1995}{275}       \turister{1996}{316}     \end{pspicture}          \end{document}      **Output** ![output](http://i.stack.imgur.com/Mw760.jpg) **Question** What is the easiest way to get the same labels on the x-asix as now? I guess writing               \psaxes[labels=none,yAxis=false](1,0)     \psaxes[Ox=1991,yAxis=false]{->}(1,0)(6.5,0)[{\AA}rstal,0][,90]      is overkill, but my attempts to get it with a single `\psaxes` have failed.


title: Is it possible to manually alias the bbm blackboard fonts?

text: > **Possible Duplicate:**   >  Get high resolution for bitmap fonts under pdflatex? I am using the command `\mathbbm` from the `bbm` package and I have realized that this fonts are pixelated when I generate my pdf with `pdftex`. The issue is that this fonts are bitmap fonts, and, after some search, no vector version of them seems to be available. The **question** is, is there a way in LaTeX to control how much a bitmap font is aliased? In other words, can I make these fonts look more smooth, even if they are bitmaps? I tried to look for a solution similar to this post's, where the OP had a problem with pixelated greek characters, yet it did not work. Another "solution" is to use other packages, but yet I do not know another type of blackboard fonts that looks 'good' together with `computer modern` (or `latin modern`) and that it is supported in MiKTex/TexLive (this is important to me for compatibility reasons with my coworkers): examples that look bad are `bbold`, `txfonts` and `mathpazo`.


title: How do I create a LaTeX package?

text: I would like to jump into the cold waters of LaTeX package creation, mostly for procrastination reasons...but I haven't a clue how to start. For example, a previous question of mine got some nice answers. I would like to take one of these answers and create a package from it.   * How do I start?    * If others find it useful, how should I document it?    * How do I publish it?  Perhaps I should say, I do not want anyone to do the work for me...I would much prefer an explanation on how I could do it myself!


title: Circle around content of a table: is it possible?

text: I managed to create three tables with letters in it:               \begin{minipage}{0.37\textwidth}     \begin{tabular}{c | c | c | c | c}     E & G & P & A & L\\     \hline     I & I & U & G & F\\     \hline     G & A & F & Z & U\\     \hline     \textbf{H} & R & T & U & Z\\     \hline     \textbf{A} & I & N & F & H\\     \hline     \textbf{U} & I & A & C & T\\     \hline     \textbf{S} & N & E & R & Z\\     \end{tabular}     \end{minipage}     \begin{minipage}{0.37\textwidth}     \begin{tabular}{c | c | c | c | c}     E & G & P & A & L\\     \hline     I & I & U & G & F\\     \hline     G & A & F & Z & U\\     \hline     \textbf{H} & \textbf{A} & \textbf{U} & \textbf{S} & Z\\     \hline     L & I & N & F & H\\     \hline     G & I & A & C & T\\     \hline     D & N & E & R & Z\\     \end{tabular}     \end{minipage}     \begin{minipage}{0.37\textwidth}     \begin{tabular}{c | c | c | c | c}     E & G & P & A & L\\     \hline     I & I & U & G & F\\     \hline     G & A & F & Z & U\\     \hline     \textbf{H} & B & R & T & Z\\     \hline     L & \textbf{A} & N & F & H\\     \hline     G & I & \textbf{U} & C & T\\     \hline     D & N & E & \textbf{S} & Z\\     \end{tabular}     \end{minipage}      Now I want to draw one circle around all the letters that are printed bold. Is this easily possible?


title: Reference to an unnumbered section

text: I am writing a thesis with document class **report** and I am using **hyperref**. My structure is the following:               \chapter{First chapter}     \section{First section}         \subsection{First sub section}             \subsubsection*{My Section}      However, I'd like to reference the `\subsubsection` with their name, but I don't want to number them (at all in the whole document). For example, I could write (using `\nameref` command): In Section "My Section" we saw that... However, if I add label to that section, it references to the subsection (First sub section). This is what I have:               \phantomsection     \addcontentsline{toc}{subsubsection}{My title}     \subsubsection*{My title}     \label{sec:mysection}      Moving `\label` command between `\phantomsection` and `\addcontentsline` makes it reference to the previous subsection. How could I make it refer to the unnumbered subsubsection?


title: Insert Picture on Titlepage

text: I have made a titlepage with a wide (104pt) vertical line and i want to place a logo on top of that line. I tried to do it with icluding a picture with tikzpicture, but it places the image at the bottom of the page and I can't move it. This is my code:               \newcommand*{\titleREP}{\begingroup{     \vspace{5cm}     \hspace{-2cm} % Whitespace to the left of the page     \color{darkgreen}\rule{104pt}{\textheight} % vertical line     \color{black}     \hspace*{0.1\textwidth}     \parbox[b]{0.9\textwidth{     {\noindent\Huge\bfseries MyTitleOfTheReport} \\[2\baselineskip]     {\Large \textit{The subtitle}} [4\baselineskip}     {\Large \textsc{The Author}}     \vspace{0.5\textheight}     {\noindent Organization}\\[\baselineskip]     }}     \endgroup          \begin{document}     \titleREP     \end{document}      The document is a memoir class document btw. I tried inserting the picture everywhere with the following command:               \begin{tikzpicture}     \includegraphics[height = 2cm]{Logo}     \end{tikzpicture}      but I can't change the position where it is placed. How can i do that?


title: Does amsmath provide any medium to auto-break equations?

text: I'm writing large equations in texlive with amsmath, and I want them to be automatically broken at the end of the line. Is there any way to do that with amsmath? What would you recommend me to do that?


title: polyglossia and algorithmicx - Missing \endcsname inserted

text: Trying to compile a simple document using polyglossia with Hebrew as the default language:               \documentclass[a4paper]{article}     \TeXXeTstate=1     \usepackage{amsmath, amssymb}     \usepackage{polyglossia}     \setdefaultlanguage[calendar=hebrew, numerals=hebrew]{hebrew}     \setotherlanguage{english}     \setmainfont{David CLM}     \usepackage[noend]{algpseudocode}          \begin{document}     \section{}       שלום       \begin{english}         Procedure(A)         \begin{algorithmic}[1]           \State $A = 0$         \end{algorithmic}       \end{english}     \end{document}      Results in this using XeTeX:               ! Missing \endcsname inserted.     <to be read again>                         \relax      l.15     \begin{algorithmic}[1]      If I set the default language to English and other language to Hebrew it works fine though.


title: How to remove the copyright box on a paper that uses the ACM sig-alternate.cls class file?

text: The ACM provides a LaTeX template called sig-alternate.cls (webpage, class file). The current version is 2.4 released in April, 2009. I would like to submit a paper for review using this class file. Unfortunately, the class file reserves some space at the bottom of the first page in the first column for a copyright notice. This copyright notice is required for the camera ready version of the paper, but not for the initial paper submission. How can I remove this copyright notice and reclaim this space?


title: How to make unavailable document classes available for LyX on Macbook?

text: I have a problem with making unavailable document classes available for LyX on Mac OS X. I have installed LyX and MacTeX (latest versions). I can see the `nature` class in `TeX information` of LyX, but when I go to > LyX > Document Setting > Local Layout > Library > TeX > Root > `texmf-dist` > > TeX > LaTeX > nature I can see the `nature.cls` there but it looks like hidden files and cannot select it to make it active. I have checked this for available classes also, those are hidden too but they are working. I am confused now. May someone guide me on this please? Thank you.


title: Hyperref links generated by Glossaries pointing to wrong page

text: In a long document I have two title pages and want to start the page numbering from one on the first non-title page. Thus I use `\addtocounter{page}{-2}` at the begin of the document. Pages before the first chapter is numbered in Roman, from there on in arabic. Now I started to use the glossaries-package. I found that the page links in the glossary are pointing to the total page numbers in the pdf. So if the first `\gls{label}` is on page `2` in the arabic numbered section, the link behind the glossary entry points to the second title page. All other links generated by hyperref are good. In a different posting I learned, that it is because of the `hypertexnames=false` option of hyperref. If I replace it as supposed in the other post, all the links to floats are broken. How can I fix this problem? Or if not, how can I hide those page numbers? Did not find it in the manual of the package... **Example** with broken links: (comment the line `hypertexnames=true,` and replace it by the two lines above to get the glossaries links working but loose the links to floats)                % 1. latex minimalgls      % 2. makeglossaries minimalgls (note no extension)      % 3. pdflatex minimalgls     \documentclass[ngerman]{article}     \listfiles     \usepackage[utf8]{inputenc}     \usepackage[ps2pdf,     bookmarks=true,%                   %%% generate bookmarks ...     bookmarksnumbered=true,%           %%% ... with numbers     %     %plainpages=false,     %pdfpagelabels,     hypertexnames=true,%              %%% needed for correct links to figures !!!     %     %breaklinks=true,%                  %%% breaks lines, but links are very small     %linkbordercolor={0 0 0},%          %%% blue frames around links     pdfborder={0 0 0}]{hyperref}      \usepackage[hyperfirst=false]{glossaries} % acronym will go in main glossary      %\usepackage[acronym]{glossaries} % make a separate list of acronyms          \makeglossaries          \newglossaryentry{sample}{name={sample},     description={a sample entry}}          \newacronym[\glsshortpluralkey=cas,\glslongpluralkey=contrived      acronyms]{aca}{aca}{a contrived acronym}          \begin{document}     \pagenumbering{fnsymbol}     Title One     \clearpage     Title Two     \clearpage     \pagenumbering{Roman}     \printglossaries     \clearpage     \pagenumbering{arabic}          A \gls{sample} entry and \gls{aca}. Second use: \gls{aca}.     \clearpage     Plurals: \glspl{sample}. Reset acronym\glsreset{aca}.     First use: \glspl{aca}. Second use: \glspl{aca}.          \end{document}


title: Mathematical statement problem

text: I want to write a mathematical statement which also has to be numbered. For example : > The function f is bounded (1.1) However, the `align` environment does not work. Any hints?


title: How can I create wrapper macro for lstinline?

text: Using `\lstinline` I can include inline code snippets in a paragraph. I would like to provide a macro that selects formatting, etc, for lstinline so I can just do, say, `\codeinline{snippet}`. I had implemented this as a short inline, like this:               \lstdefinestyle{inlinecode}{basicstyle=\ttfamily\footnotesize\bfseries}     \lstMakeShortInline[style=inlinecode]~      So I could then write `~snippet~`, and that works fine. However, If I need to use `~` in the snippet it doesn't work. The same applies if I change the short inline character to something else. So, I thought of just having a well defined macro, something like:               \newcommand\codeinline[1]{\lstinline[style=inlinecode]{#1}}      Which also works, except when certain characters are in the snippet. For example, this               \codeinline{example-command ~/myfile}      does not work because of the `~`. I found a similar question (which inspired the above `\codeinline` macro) but I don't want to have to escape characters in the snippet, I just want it treated verbatim in the same way as lstinline does. I hope that it is possible because lstinline does it. It is possible to write a wrapper around `lstinline` that works as well as `lstinline` works ?


It sounds like XeLaTex does not have limit to at most 16 alphabets. However when I declared some alphabets and included many fonts(I indeed included _fontspec_ ), the message "Too many math alphabets..." occurred as usual. Haven't I use the correct command? * * * Update Edited title **My question** :How to use abundant math font features in one article in XeLaTeX?


title: Inlining aligned tabular material in block of text

text: Edit. Some comments might be outdated. I would like to do the following: ![enter image description here](http://i.stack.imgur.com/IV7T7.png) The blue parts should be treated as normal paragraph text, with normal automatic hyphenation. The green part is what you typically get from an align* environment. As you see in the figure, I would like to revisit the same alignment after a kind of \intertext paragraph. I have tried with the tabbing environment but it doesn't support making tabs towards the end of wrapped lines. tabularx and other table environments makes it problematic to let TeX typeset the first blue paragraph as a whole, as the third line (with blue and green) is separated from the first two blue lines. Also, it is difficult to let some lines of the green region overlap the blue region on other lines if the regions are put in different columns. Below is the code from my original post. From the code, it seems that I have succeeded, but I would like to do it with more elegant code.               \documentclass[10pt,twoside,a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[norsk]{babel}     \usepackage{lmodern}     \usepackage[lmargin=5cm,rmargin=186.3661pt,tmargin=5cm,bmargin=5cm]{geometry}     \usepackage[table]{xcolor}     \definecolor{red}{HTML}{dd0000}          \begin{document}          \setlength{\parindent}{0mm}          \makebox[\linewidth][s]{Hvis en addend minker med 1, så minker summen med 1:}     \begin{tabular}{@{}l@{ }r@{\,\,}l@{\,\,}l@{}p{4.822cm}}       Det betyr at\hspace{-3.5mm} & $5+2$ & $=$ & $7$, &\\                       & $5+1$ & $=$ & $6$, &\\                       & $5+0$ & $=$ & $5$, &\\                       & $5+(-1)$ & $=$ & $4$, &\\                       & $5+(-2)$ & $=$ & ${\color{red}3}$, osv., & \hfill så å legge til et negativt tall     \end{tabular}     \makebox[\linewidth][s]{er det samme som å trekke fra samme tall med motsatt fortegn:}     \begin{tabular}{@{}l@{ }r@{\,\,}l@{\,\,}l@{}p{3.841cm}}     \hspace{15.695mm}   & $5+(-2)$ & $=$ & $5-(+2)=5-2={\color{red}3}$. &\\     \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/HNWRa.png)


title: How to use the ifsym package?

text: I have added `\usepackage{ifsym}` in the front, and LaTeX cannot pass the command `\Letter`. What should I do to it?


title: Horizontal spacing issue in \listoftheorems using amsthm + thmtools

text: I am using the command `\listoftheorems` with packages `amsthm` and `thmtools`. The problem is that the theorem's head and its optional title overlap. How can I make this space bigger to avoid overlapping? * * * Thank you all. I include an example below (maybe not minimal). I've tried `\makeatletter\thmt@listnumwidth{4.3em}\makeatother` but I get errors. Same thing with `\renewcommand{\l@theorem}{\@tocline{0}{3pt plus2pt}{0pt}{3.5em}{}}`. Any other clues? Should I try working with ntheorem instead?               %% LyX 2.0.0 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[12pt,a4paper,english,titlepage, fleqn,numbers=noenddot]{scrbook}     \usepackage[osf]{mathpazo}     \usepackage{helvet}     \usepackage{courier}     \renewcommand{\familydefault}{\rmdefault}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \pagestyle{headings}     \setcounter{tocdepth}{3}     \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}     \usepackage{babel}     \usepackage{setspace}     \onehalfspacing     \usepackage[unicode=true,      bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=4,      breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]      {hyperref}     \hypersetup{pdftitle={},        pdfkeywords={music cognition, categorization, embodiment}}          \makeatletter          \pdfpageheight\paperheight     \pdfpagewidth\paperwidth          \usepackage{amsthm}     \usepackage{thmtools}          \declaretheorem[style=remark, name={}]{Example}     \renewcommand{\theExample}{\bf{Def. \thechapter.\arabic{Example}}}          \makeatletter     \def\th@remark{%     \thm@headpunct{:}       \thm@notefont{\bfseries\itshape}}     \makeatother          \makeatletter     \def\thmhead@plain#1#2#3{%       \thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%       \thmnote{ {\the\thm@notefont#3}}}     \let\thmhead\thmhead@plain     \def\swappedhead#1#2#3{%       \thmnumber{#2}%       \thmname{\@ifnotempty{#2}{~}#1}%       \thmnote{ {\the\thm@notefont#3}}}     \makeatother          \newcounter{genero}     \setcounter{genero}{1}          \AtBeginDocument{       \def\labelitemi{\normalfont\bfseries{--}}       \def\labelitemii{\(\star\)}       \def\labelitemiii{\(\cdot\)}     }          \makeatother          \begin{document}     \listoftheorems          \begin{Example}[Género musical \thegenero]\stepcounter{genero}          first example.          \end{Example}          \begin{Example}[Género musical \thegenero]\stepcounter{genero}          second example.          \end{Example}          \begin{Example}[Género musical \thegenero]\stepcounter{genero}          third example.          \end{Example}     \end{document}


title: Too long/short pipe (absolute value) in math mode with certain letters

text: In the question Absolute Value Symbols I read about the best ways to write absolute values. I found the accepted answer pretty good and it works in almost all cases. Sadly, only in almost. For example on the letter "k" the pipes are drawn far under the lower end of the letter "k" in the PDF output. Why is this and what to do about it? The bad thing is: I can _not_ just skip the macro on all "k" vectors and use the regular pipes `|\vec{k}|` or the starred version of the `abs*` operator because as you will see from the last two lines in the minimal example, the regular pipes on the "k" are drawn to short at the top (not around the vector arrow). The "x" is drawn like expected by a reader, however. The following is a minimal example that shows the problem (letter "x" works fine, letter "k" has to big/small pipes). In my real world document I also have T1 `fontenc`, and font packages loaded (`libertine`, `fouriernc` and `inconsolata`), so this behavior seems to be independent of all the font/math- related packages.               \documentclass{article}          \usepackage{mathtools}          %define abs     \DeclarePairedDelimiter\abs{\lvert}{\rvert}%          %switch starred and non-starred (auto-size)     \makeatletter     \let\oldabs\abs     \def\abs{\@ifstar{\oldabs}{\oldabs*}}     \makeatother          \begin{document}       \[ \abs{\vec{x}} \]       \[ \abs{\vec{k}} \]       \[ |\vec{x}| \]       \[ |\vec{k}| \]     \end{document}      The output: ![enter image description here](http://i.stack.imgur.com/aPOBZ.png) I know about the `nath` package, but it always gives me a lot of errors and seems to be unmaintained. Also, to me it always feels a bit "strange" if things are auto-done to my document that can't be "looked inside" (without investing tons of non-available time to work through the `nath` package code). So, I'd rather like to not use it.


title: How to left-justify an equation to the left page margin?

text: My equations are centered on the page, as is each line of each equation. I want each equation, and each line of the equation, to be left-justified on the page. I've checked all the suggestions, but the best I could do was to left-justify the individual lines of the equation, but the equation itself is centered.


title: Moving display mode to the left

text: > **Possible Duplicate:**   >  Left align (to the page) displayed math I have a document in which I want to use display mode, but want the expressions left-aligned instead of centered. So far, I've been able to do this with this code:               \begin{align*}     \[some display math\]     \end{align*}      This is a pain. Is there some setting I can use that will align all display math to the left? I've tried `[fleqn]`, but this seems to only left align equations and equation blocks, instead of any general display math.


title: Put formulas on the left position in LateX

text: > **Possible Duplicate:**   >  Left align (to the page) displayed math As you know the following equation will be in the center:               $$     \sum_{\substack{a\leq1/2\\0<b\leq T}}\frac{2+a}{2|b|}     $$      And the following is on the left but in small size and decrease the space:               $     \sum_{\substack{a\leq1/2\\0<b\leq T}}\frac{2+a}{2|b|}     $      But the below formula is similar to the first one, but on the left:               $     \displaystyle{\sum_{\substack{a\leq1/2\\0<b\leq T}}\frac{2+a}{2|b|}}     $      Does anyone know another way such that it works similar to the last one (put the formula on the left) but with:               \begin{xxxx}     *     \end{xxxx}


title: Why do I need to append % right after { of multido rather than right after } of pstVerb?

text: Why do I need to insert `%` right after the opening curly brace `{` of `multido` rather than right after the closing `}` of `\pstVerb`? In my mental model, the unnecessary white spaces exist after the `\pstVerb` call so they must be removed by appending `%` right after `}` of `\pstVerb`.               \documentclass[pstricks,border=24pt]{standalone}     \usepackage{multido}     \begin{document}     \begin{pspicture}[dimen=m](8,8)         \multido{\ix=1+1,\ic=97+1}{8}         {% <-- this comment is necessary but I don't understand why.             \pstVerb{/hx \ix\space .5 sub def}             \uput[d](!hx 0){$\char\ic\mathstrut$}             \uput[l](!0 hx){$\ix\mathstrut$}             \multido{\iy=1+1,\io=\ix+1}{8}             {                        \psframe[origin={\ix,\iy},fillstyle=\ifodd\io solid\else vlines\fi,hatchsep=.5pt,hatchcolor=lightgray](-1,-1)                 \rput(!hx \iy\space .5 sub){$(\iy,\ix)$}             }         }     \end{pspicture}     \end{document}


title: Subnumber equations within theorem environments but keep them intact otherwise

text: I want to number my equations in a manner similar to this. However, what I want is that when the equation is not within a `theorem` environment, there should be normal numbering 1,2,3,4. However, each equation within the `theorem` environment should be subnumbered. For example, in the code like below:               \begin{equation}      \lim x = 0 % Suppose this equation is numbered 55     \lim x = 0 % Then this equation should be numbered 56     \end{equation}          \begin{theorem}         \begin{equation}          \lim x = 1 %This equation should be numbered 57.1         \end{equation}              \begin{equation}          \lim x = 1 %This equation should be numbered 57.2         \lim x = 1 %This equation should be numbered 57.3         \end{equation}     \begin{theorem}               \begin{equation}      \lim x = 1 %This equation should be numbered 58     \end{equation}      Is such a thing possible? If it helps, I am using the following declaration in my package.               \usepackage[amsthm, framed, thmmarks]{ntheorem}      **EDIT** : I want to change my question a little bit. Is it possible to define a discontinuous environment so that I can subnumber my equations within that environment? For example, I already know that I can use environments like `align` with conditions so that the equations are subnumbered within that environment, but then, it is a consecutive sets of equations which are subnumbered, I am looking for something which would enable me to separate the environment while still maintaining the numbering. This is useful when I am discussing equations both inside and outside of a `theorem` environment. Sometimes a proof of the theorem is very long and there are a lot of substitutions, and a lot of equations are numbered, however, the numbering then takes the focus away from the nested-property of the equation making the equation numbers hard to follow. For example, you are more likely to remember equations `4.1` `4.2` inside a theorem rather than equations `117` and `118` since you are in that proof reading mode and hence, you can more easily remember the first equation in that proof or ninth equation in that proof. So probably something like `\startsubnumbering`,`\endsubnumbering` commands which I can then insert at the beginning of whatever I see fit.


title: Remove sidebar margin from title page only

text: I have a modified theme where I want merge Torino with a side bar. However, the sidebar space appears on my title page (left margin). More, I can't replace the side bar title, author and blue area with the logo... I uploaded the code in https://github.com/dnascimento/beamerLisbonTheme (everyone is welcome to help to reach the goal or use the theme) ![Cover](http://i.stack.imgur.com/JEC4K.png) ![Slides](http://i.stack.imgur.com/6mkAU.png) I'm using: `\useoutertheme{sidebar}` in my outertheme. I guess the issue is the               \hbox{\hskip-\Gm@lmargin\hbox{\vbox{%      Gm@lmargin is modified to include the sidebar left margin. How can I include the sidebar without modify the title page? The title page code is:               \defbeamertemplate*{title page alternative}{cascais theme}[1][]     {       {\parskip0pt\offinterlineskip%       \hbox{\hskip-\Gm@lmargin\hbox{\vbox{%       \@tempdima=\textwidth\textwidth=\paperwidth\hsize=\textwidth\def\\{,}\vbox{}\vskip-1.5ex%         % Title.         \begin{beamercolorbox}[wd=\paperwidth,ht=.4\paperheight,center,#1]{title page header}           \usebeamerfont{title}\inserttitle\par%           \ifx\insertsubtitle\@empty%           \else%             \vskip0.25em%             {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%           \fi%                \vspace{.125\paperheight}%         \end{beamercolorbox}%         \vbox{}\vskip-\beamer@cascais@lineup%         \vbox{}\vskip-\beamer@cascais@linemid%         % First line.         \hbox{%         \begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@cascais@lineup,dp=0pt]{}%         \end{beamercolorbox}%         \begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@cascais@lineup,dp=0pt]{lineup}%         \end{beamercolorbox}%         }%         \vbox{}\vskip0ex%         % Second line.         \hbox{%         \begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@cascais@linemid,dp=0pt]{}%         \end{beamercolorbox}%         \begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@cascais@linemid,dp=0pt]{linemid}%         \end{beamercolorbox}%         }%         % Third line.         \hbox{%         \begin{beamercolorbox}[wd=.5\paperwidth,ht=\beamer@cascais@linebottom,dp=0pt]{}%         \end{beamercolorbox}%         \begin{beamercolorbox}[wd=.5\paperwidth,ht=\beamer@cascais@linebottom,dp=0pt]{linebottom}%         \end{beamercolorbox}%         }%         \vskip0pt%       }}%       \hskip-\Gm@rmargin%       }}\hfil%


title: How can I fix the perpendicular coordinate system?

text: I am trying to draw draw perpendicular coordinate but it is drawing a bit further than it suppose to. ![enter image description here](http://i.stack.imgur.com/sbgda.png) This is the code:               \begin{tikzpicture}[auto, node distance=3cm,>=latex', scale=0.6 ,every                 node/.style={transform shape}]                     % Draw axes                     \draw[->] (xyz cs:x=-5) -- (xyz cs:x=5) node (alpha_coord) [above]                     {$\alpha$}; \draw[->] (xyz cs:y=-5) -- (xyz cs:y=5) node (beta_coord)                     [right] {$\beta$};                               \draw[draw=red!60, ->] (0, 0) -- (0:3)  node (beta_f)                     [above, red]{$\beta_1$};                      \draw[draw=red!60, ->] (0, 0) -- (120:3)    node                     (beta_s) [above, red]{$\beta_2$};                      \draw[draw=red!60, ->] (0, 0) -- (240:3)    node (beta_t)                     [left, red]{$\beta_3$};                          \draw[dashed, draw=red!60] (beta_coord |- 120:3)  -| (120:3 |-                     alpha_coord);                          \draw[dashed, draw=red!60] (beta_coord |- 240:3)  -| (240:3 |-                     alpha_coord);                          \draw[->, draw=blue!60] (0.5,0) arc (0:120:0.5) node[midway,                     right=3pt, blue]{$120^{\circ}$};                     \draw[->, draw=blue!60] (120:0.5) arc (120:240:0.5) node[near start,                     left, blue]{$240^{\circ}$};                           \end{tikzpicture}


title: Text Alignment problem

text: I am having a problem with the alignment in my pdf. The pdf is compiled with Xelatex. Some words instead of being separated with a "-" and continue at the bottom line are written whole in the upper line and thus they extend more than they should normally leading to a bad result to the reader's eye, as they don't respect the right margin of the page. Any possible ideas? I am not speaking of a mathematical formula, which can't be separated, I am speaking of a simple word that normally should have been separated with a "-" and continue at the next line. In my text, there are more than 1 languages if that helps. Any ideas appreciated, feel free to ask more if question is not specific enough.


title: How to typeset a "small" non-breaking space

text: I can use `~` to produce a non-breaking space. But it is too large for me, and I would like a non-breaking space of the size of `\,` for example. Is it possible ?


title: Bibliography backref on new line with smaller font size

text: At the moment I use               \usepackage[style=authoryear,dashed=false,                 abbreviate=false,                 natbib=true,backref=true,backend=biber]{biblatex}     \setlength\bibitemsep{1.7\itemsep}     \bibhang=0pt % don't ask, I'm still experimenting ;)      which outputs entries like               Eddy, Sean R (Nov. 2004). "How do RNA folding algorithms work?" In: Nature     Biotechnology 22.11, pages 1457–1458. ISSN: 1087-0156 (cited on page 1 and 3).      But ideally I'd like to have it like               Eddy, Sean R (Nov. 2004). "How do RNA folding algorithms work?" In: Nature     Biotechnology 22.11, pages 1457–1458. ISSN: 1087-0156.      (Cited on pages 1 and 3.)      with the backref line in a smaller font size. Note also the big "C" in "Cited" and the different punctuation. Background info: I think the backref shouldn't be part of the actual main bib information as it's not an info from the article/book/whatever. Of course, the same is true for the "visited on" part but these kind of references (websites) are the exception anyway.


title: How to use sed to comment some lines in tex files (has "%" a particular meaning for sed ?)

text: I've been reading something in Most useful sed one-liners for TeX users which is related to my problem, but albeit interesting, it is not what I need. I have many tex (beamer class) files in subdirectories and I would like to comment some lines in each of them. The purpose is to modify the preamble in order to compile the files to get the handouts as indicated in Passing parameters to a document answer 45 In each file I have the following lines, which I comment in and out as needed. The first one is to compile the beamer presentation while the others three are needed to compile for handouts               %here is some text, consistent in all the .tex files     %\documentclass[xcolor={usenames, table, x11names}, final, 10pt]{beamer}      %      \documentclass[xcolor={usenames, table, x11names}, handout, 10pt]{beamer}       \usepackage{pgfpages}      \pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]      The four lines above should be commented out and the some lines should be appended. The desired .tex file should contains the following               %here is some text, consistent in all the .tex files     \ifdefined\ishandout      \documentclass[xcolor={usenames, table, x11names}, handout, 10pt]{beamer}       \usepackage{pgfpages}     \pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]     \else       \documentclass[xcolor={usenames, table, x11names}, final, 10pt]{beamer}      \fi          %\documentclass[xcolor={usenames, table, x11names}, final, 10pt]{beamer}      %     %\documentclass[xcolor={usenames, table, x11names}, handout, 10pt]{beamer}      %\usepackage{pgfpages}     %\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]      Of course I could edit each file manually, but I would learn nothing. I was successful in inserting the lines from `\ifdefined` to `\fi`, by pasting them into a file (saved as insert.txt) and then sending in a terminal (debian wheezy) the following line               sed  -i "/^%here is some text, consistent in all the .tex files$/ r ../insert.txt" lesson_10.tex      I tested it only on one .tex file, and it works To add the lines to each file in each subdir, I wrote this bash script                  for i in ??_lesson*/          do             if [ -d $i ]                  then                                     cd $i                 THIS=$(ls lesson_??.tex)                       sed  -i "/^%here is some text, consistent in all the .tex files$/ r ../insert.txt" $THIS                 fi             done      Now I need a sed command that change/replace the lines               \documentclass[xcolor={usenames, table, x11names}, handout, 10pt]{beamer}      \usepackage{pgfpages}     \pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]      into/with               %\documentclass[xcolor={usenames, table, x11names}, handout, 10pt]{beamer}      %\usepackage{pgfpages}     %\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]      I've read somewhere on the internet that sed process a line at time, so I tried this one.               sed "s/%\documentclass/%\documentclass/g" lesson_01.tex > checkthis.tex; head checkthis.tex       which returns                \%documentclass[xcolor={usenames, table, x11names}, final, 10pt]{beamer}       \%documentclass[xcolor={usenames, table, x11names}, handout, 10pt]{beamer}       \usepackage{pgfpages}      \pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]      This other line was executed to check whether the problem was in the `s` or in the `g` part of the command               sed "s/%\documentclass/%\documentclass/g" lesson_01.tex > checkthis.tex; head checkthis.tex       which returns               \%       oo[xcolor={usenames, table, x11names}, final, 10pt]{beamer}            \%        oo[xcolor={usenames, table, x11names}, handout, 10pt]{beamer}       \usepackage{pgfpages}      \pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]      It's evident that the "`%`" has a special meaning for sed, a meaning which I ignore. I tried also some escaping characters before the `%`, but to no avail. Googling around was of no help, I therefore decided to ask for a direct help here.


title: Errant comma with biblatex publist when omitting name

text: I would like to use `biblatex` and the `publist` style to present a list of publications that omits my own name. But when I do so, I get two styles (see comma before _et al._ ) depending on whether my name appeared first in the author list or not. For example: ![bib](http://i.stack.imgur.com/KXzPV.png) ### Questions:   1. Should there be a comma before _et al._ in this case? (I think probably not.)   2. Why is there a difference? Is this a bug?   3. How do I remove the inconsistency? I would prefer no comma (unless there is good evidence for the other case). ### MWE:               \documentclass[]{article}          \begin{filecontents}{\jobname.bib}     @inproceedings{paperA,         booktitle = {Proceedings},         year = {2014},         author = {First, Author and Second, Author and Third, Author and Fourth, Author and Fifth, Author},         title = {AAA Title of Paper},     }     @inproceedings{paperB,         booktitle = {Proceedings},         year = {2013},         author = {Second, Author and First, Author and Third, Author and Fourth, Author and Fifth, Author},         title = {BBB Title of Paper},     }     \end{filecontents}          \usepackage[backend=biber,defernumbers=true,sorting=nyt,bibstyle=publist]{biblatex}     \addbibresource{\jobname}     \omitname{First} % Omit author with last name "First"          \begin{document}          \null\nocite{*}     \printbibliography[heading=none]          \end{document}


title: Align formula with amsmath

text: I know similar questions have already been asked, but still I couldn't get the alignment to work. I know that `align` is supposed to replace `eqnarray`, but I just don't manage to achieve the same alignment. So I've got a calculation that I'd like to center around the equality sign. Here is a stupid MWE:               \documentclass[fleqn]{scrartcl}     \usepackage{amsmath}     \begin{document}     \begin{align*}     & \frac{1}{2} & = 0.5 \\     && = 0.25 + 0.25 \\     \end{align*}     \end{document}      Unfortunately, the second part of the formula is aligned on the right side. Is there a way to put the equality signs one under the other instead?


title: Refer to label in another chapter (another file)

text: I am writing my thesis using LyX's `thesis` template, and each chapter is a different file (`chapter-x.lyx`). However, sometimes, I need to refer to a section from another chapter, which is in a different file. So for example: **chapter-2.lyx** :               this is explained further in chapter \ref{chap:White-Box-Testing}      **chapter-3.lyx** :               \begin_layout Chapter     White Box Testing     \begin_inset CommandInset label     LatexCommand label     name "chap:White-Box-Testing"      The problem is that when I generate the PDF document from Thesis.lyx, which has the pointers to all the `chapter-x.lyx` files, I get broken links in the output document. How would I go about fixing this?


title: Add content behind beamer background (or theme)

text: I have a custom beamer template that frames the content of each slide, like the standard themes but with wiggly header/footer lines. I add the background image of the template with               \setbeamertemplate{background}      {\includegraphics[width=\paperwidth,height=\paperheight]{master.png}}      I now want the content to be behind the background image and the rest of the template (title, page number...). The template will then have a cut-out with the content visible underneath. The background image can have .png or .pdf transparency. Kind of like: http://en.wikipedia.org/wiki/Passe-Partout_%28framing%29 Does anyone have an idea how to move the content behind the background image? Thank you for your help!


title: Parsing rows (`\\`) and tab characters (`&`)

text: I have a use for parsing what would look like `tabular` input data, except that it isn't part of a `tabular` environment, but rather the argument to a macro. So I developed two macros, `\readTABrow` which will read a `&` separated list into different tokens, and `\readMANYrows` which will read a `\\` separated list into many tokens. Each of these two macros behaves as expected, when I pass it arguments that would otherwise appear in a `tabular` "row" or "table". The problem comes when I take the output from `\readMANYrows`, which gives me one token per row, each populated with `&`-separated data, and I pass that token to `\readTABrow` in an effort to further parse a tabular row into individual cell data. I'm suspecting that somehow, the "nature" of the `&` characters change when being parsed by `readMANYrows` and that they no longer look like tab separators by the time they reach `\readTABrow`. My question is how to preserve the tab "nature" of the `&` characters during a `\readMANYrows`, so that I can pass the token containing them straight to `\readTABrow` without a problem. Here is my MWE:               \documentclass{article}     \usepackage{ifthen}          \makeatletter          % FOR PROCESSING A &-SEPARATED ROW      \newcounter{TABcellindex@}          \newcommand\readTABrow[2]{%       \def\doneTABread{F}%       \def\postTAB{#2}%       \setcounter{TABcellindex@}{0}%       \whiledo{\equal{\doneTABread}{F}}{%         \stepcounter{TABcellindex@}%         \expandafter\processTAB\postTAB&\\%         \ifthenelse{\equal{\preTAB}{}}{%           \addtocounter{TABcellindex@}{-1}%           \def\doneTABread{T}%         }{%           \expandafter\protected@edef\csname #1X\roman{TABcellindex@}\endcsname{%             \preTAB}%         }%       }%     % \#1TABcells GIVES HOW MANY TAB COLUMNS WERE PROCESSED       \expandafter\xdef\csname #1TABcells\endcsname{\arabic{TABcellindex@}}%     }          \def\processTAB#1&#2\\{%       \protected@edef\preTAB{#1}%       \protected@edef\postTAB{#2}%     }          % FOR PROCESSING A \\-SEPARATED GROUP OF ROWS     \newcounter{ROWcellindex@}          \newcommand\readMANYrows[2]{%       \def\doneROWread{F}%       \def\postROW{#2\\}%       \setcounter{ROWcellindex@}{0}%       \whiledo{\equal{\doneROWread}{F}}{%         \stepcounter{ROWcellindex@}%         \expandafter\processROW\postROW||%         \ifthenelse{\equal{\postROW}{}}{%           \def\doneROWread{T}%         }{}%         \expandafter\protected@edef\csname #1X\roman{ROWcellindex@}\endcsname{%           \preROW}%       }%     % \#1ROWs GIVES HOW MANY ROWS WERE PROCESSED       \expandafter\xdef\csname #1ROWs\endcsname{\arabic{ROWcellindex@}}%     }          \def\processROW#1\\#2||{%       \protected@edef\preROW{#1}%       \protected@edef\postROW{#2}%     }          \makeatother          \begin{document}     \verb|\readTABrow| Input: \verb|{a&b&c&d}|     \readTABrow{myrow}{a&b&c&d}\par     .\myrowXi.\par     .\myrowXii.\par     .\myrowXiii.\par     .\myrowXiv.\par     COLUMNS: \myrowTABcells\par     ---          \verb|\readMANYrows| Input: \verb|{a&b&c&d\\b\\\\ c}|     \readMANYrows{mydata}{a&b&c&d\\b\\\\ c}\par     .\detokenize\expandafter{\mydataXi}.(detokenized)\par     .\mydataXii.\par     .\mydataXiii.\par     .\mydataXiv.\par     ROWS: \mydataROWs\par     ---          \verb|\readTABrow| Input: \verb|\mydataXi|     \readTABrow{mydataXi}{\mydataXi}\par     .\detokenize\expandafter{\mydataXiXi}.(detokenized)\par     COLUMNS:\mydataXiTABcells\par          \end{document}      The output, given below, shows individual cases of `\readTABrow` and `\readMANYrows` working as I expected, while the last example shows that `\readTABrow`, when passed a token produced by `\readMANYrows`, erroneously determines the token to be `&` free, composed of a single cell, rather than being composed of 4 cells ![enter image description here](http://i.stack.imgur.com/GybHZ.jpg) **Note that the use of`\detokenize` is merely as a debugging aid to display the contents of various macros that contain `&` characters. No `\detokenize`d data is passed to `\readTABrow`.** On a related side note, is it traditional when parsing `&` and `\\` markers to ignore the spaces following them or not? As you see from my MWE, I do not ignore them. **UPDATE:** David Carlisle solved the problem, though he still isn't quite sure what I want with it. So, let me show it. If the last lines of the MWE are replaced with               \verb|\readTABrow| Input: \verb|\mydataXi|     \def\foo{\readTABrow{mydataXi}}     \expandafter\foo\expandafter{\mydataXi}\par     .\mydataXiXi.\par     .\mydataXiXii.\par     .\mydataXiXiii.\par     .\mydataXiXiv.\par     COLUMNS:\mydataXiTABcells\par      the final output becomes ![enter image description here](http://i.stack.imgur.com/W9gIr.jpg) Thus, with David's help, I can use my two routines to take a tabular like argument like               {a&b&c\\d&e&f\\g&h&i}      and store the table components as if I had typed elements of an array:               \edef\mydataXiXi{a}     \edef\mydataXiXii{b}     \edef\mydataXiXiii{c}     \edef\mydataXiiXi{d}     \edef\mydataXiiXii{e}     \edef\mydataXiiXiii{f}     \edef\mydataXiiiXi{g}     \edef\mydataXiiiXii{h}     \edef\mydataXiiiXiii{i}      which is amenable to accessing via `\csname mydataX\roman{row}X\roman{col}\endcsname` This will be useful when the output associated with the argument must be split up (horizontally across pages) or spliced (merged with other data), or if individual cells need to be later recalled.


title: Align text under a colon

text: In plain text, this is what I want to do:               Explanation: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus volutpat eu orci vitae eleifend.                  Praesent sed orci commodo, venenatis neque vel, pulvinar velit.                  Mauris ullamcorper tellus sed quam pellentesque, vitae sagittis nisl dapibus.      ## update If `hspace{5cm}` fit the length of the word "Explanation: " and if `hspace` worked in the enumerate environment, the following would be what I want my document to look like:               \documentclass[11pt]{article}          \begin{document}          \begin{enumerate}          \item 1          answer          \item 2          explanation: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus volutpat eu orci vitae eleifend.\\ \hspace {5cm}Praesent sed orci commodo, venenatis neque vel, pulvinar velit.\\ \hspace {5cm}Mauris ullamcorper tellus sed quam pellentesque, vitae sagittis nisl dapibus.          \item 3          answer          \end{enumerate}          \end{document}      Basically, imagine               Explanation: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus volutpat eu orci vitae eleifend.                  Praesent sed orci commodo, venenatis neque vel, pulvinar velit.                  Mauris ullamcorper tellus sed quam pellentesque, vitae sagittis nisl dapibus.      is in an enumerate environment. This is what I want: ![img](http://i.imgur.com/CTDfucX.png)


title: highlight glossaries entries on page

text: I want to highlight my glossaries entries with bold or italic formatting. I have used the following command but then the whole document is very colorful what I didn't want to have it like this.               \usepackage[colorlinks=true,linkcolor=blue]{hyperref}      I define my definitions like this:               \newglossaryentry{fps}{       name=Frame per second,       description= {       TEXT..... }     }      And I reference this entry in the content with `\gls{fps}`. How can I highlight in this example the word **_Frame per Second_** in the text


title: Caption with two figures in a single column

text: How can I put two figures in a single column, with a label (say a), b) ) on the left and in the middle or top of each figure? I was trying               \newcommand{\Inserttwopgf}[6]{%     \begin{figure}[t]         \centering         \scalebox{#2}{\input{#1}}%         \\         \scalebox{#4}{\input{#3}}%         \label{#5}         \caption{#6}     \end{figure}     }      but I don't know how to put the labels to the left of each figure. Most of the solutions I found put the figures in a row or with a caption for each figure, I just need a label. I was also thinking in a minipage but I don't understand quite well the positioning.


title: How to divide with tikz calc (to find center of mass)

text: I am trying to calculate the center of mass of a few coordinates and the logical way of adding up and then dividing results in an error.               \documentclass[a4paper,14pt]{scrartcl}     \usepackage{tikz}     \usepackage{pgfplots,pgfplotstable}     \usetikzlibrary{calc}     \usepackage{calc}     \pgfplotsset{compat=newest}          \usepackage[active,tightpage]{preview}     \setlength\PreviewBorder{2pt}               \begin{document}     \begin{preview}          \begin{tikzpicture}     \coordinate (m1) at (0,0);     \filldraw [blue] (m1) circle (5);     \draw [blue] (m1)  circle (75);     \draw [blue] (m1)  circle (200);          \coordinate (f1) at ($(m1) + (0,10)$);     \filldraw [red] (f1) circle (3);          \coordinate (m2) at (45:150);     \filldraw[blue] (m2) circle (5);     \draw[blue] (m2) circle (15);          \coordinate (m3) at ($(m2) +(10:30)$);     \filldraw[blue] (m3) circle (5);          \coordinate (m4) at ($(m1) +(200:65)$);     \filldraw[blue] (m4) circle (5);          \coordinate (com) at ($ ((m1)+(m2)+(m3)+(m4)+(f1))/5 $);                    \end{tikzpicture}     \end{preview}     \end{document}      I couldn't find any examples like this online. Adding up the five coordinates work fine. Thanks for the help!


title: PSTricks figure way too big; normal scaling seems not to work

text: Consider the following example:               \documentclass{article}          \usepackage{pstricks}          \begin{document}          \begin{figure}     \def\radius{19.2}     \def\lige{33.3}     \newlength\R \R=\radius\psunit     \newlength\hW \hW=\lige\psunit     \hW=0.5\hW     \centering      \psset{        unit=0.2,        linewidth=1pt      }       \begin{pspicture}(-35.5,-18.9)(34.9,18.9)        \psset{          linecolor=red        }         \psarc( \hW,0){\R}{270}{90}         \psarc(-\hW,0){\R}{90}{270}         \psline(-\hW, \R)(\hW, \R)           \psline(-\hW,-\R)(\hW,-\R)        \psset{          linecolor=black,          linestyle=dotted        }         \psline(-\hW,-\R)(-\hW,\R)         \psline( \hW,-\R)( \hW,\R)         \psline(\dimexpr-\hW-\R,0)(\dimexpr\hW+\R,0)         \rput*(0,0){\lige\,cm}         \rput*(\dimexpr-\hW-0.5\R,0){\radius\,cm}         \rput*(\dimexpr \hW+0.5\R,0){\radius\,cm}         \rput(-\hW,0){\textbf{+}}         \rput( \hW,0){\textbf{+}}       \end{pspicture}     \end{figure}          \end{document}      The figure is way too big and changing the `unit` option apparently has no effect. How do I fix this? P.S. The figure used to have the right scale so I have obviously introduced something 'fishy' but I haven't got a clue as to what that is.


title: Big arrow across the table (overlay)

text: As shown in picture, is there a way to achieve this? ![enter image description here](http://i.stack.imgur.com/lNOf1.png)               \documentclass[12pt,a4paper]{article}          \usepackage{rotating} % sidewaytables               \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}                    \begin{sidewaystable}          \begin{tikzpicture}     \matrix (m) [matrix of math nodes,left delimiter=|, right delimiter=|] {         & K=3 & K=4 & K=5 & K=6 & K=7 & K=8 & K=9 & K=10 & K=11 & K=12\\         \hline         C=2 &4&7&10&12&14&16&18&20&&\\ \hline         C=3 &4&7&11&16&21&24&27&30&&\\ \hline         C=4 &4&7&11&16&22&29&36&40&&\\ \hline         C=5 &4&7&11&16&22&29&37&46&&\\ \hline         C=6 &4&7&11&16&22&29&37&46&&\\ \hline         C=7 &4&7&11&16&22&29&37&46&&\\ \hline         C=8 &4&7&11&16&22&29&37&46&&\\ \hline         C=9 &4&7&11&16&22&29&37&46&&\\ \hline         C=10&4&7&11&16&22&29&37&46&&\\     };     \draw[->,red,thick] (m-2-2.west) -- (m-2-3.east);     \draw[->,red,thick] (m-4-4.west) -- (m-4-7.east);     \draw[->,red,thick] (m-6-7.west) -- (m-6-8.east);     \draw[->,red,thick] (m-9-3.west) -- (m-9-6.east);     \end{tikzpicture}          \end{sidewaystable}               \end{document}      This works OK. But how do I make it into "tabular" look, ie the vertical lines that separates the columns.


title: Incorrect placement of quotation marks

text: I just want to include some sourcecode by using the `listings` package wit XeTeX. Here is my minimal example:               % !TEX TS-program = XeLaTeX     % !TEX encoding = UTF-8 Unicode     \documentclass[xetex]{scrreprt}     \usepackage{xltxtra}     \defaultfontfeatures{Mapping=tex-text}     \setmonofont[Scale=.8]{Inconsolata}     \usepackage{bold-extra}     \usepackage{upquote}     \usepackage{listings}     \lstset{         basicstyle=\ttfamily\scriptsize,         keywordstyle=\bfseries,         numbers=left,         inputencoding=utf8x,         extendedchars=true,         showlines=true,         upquote=true,         showstringspaces=false     }     \lstdefinelanguage{turtle} {       morekeywords={@prefix,@base,@forSome,@forAll,@keywords},     %   literate=%     %       *{``}{``}{1}     %       {''}{''}{1}     %       {„}{``}{1}     %       {“}{''}{1},     }          \begin{document}     \begin{lstlisting}[language=turtle]     @prefix crm:  <http://www.cidoc-crm.org/cidoc-crm/> .     @prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .     @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .          <http://my.domain/object/1>       rdf:type         crm:E22_Man-Made_Object ;       rdfs:label          "„David“ Skulptür …", "This is another ‚test‘ …" ;       crm:P102_has_title          <http://my.domain/title/1> ;       crm:P108i_was_produced_by         <http://my.domain/production/1> ;       crm:P31i_was_modified_by         <http://my.domain/modification/1> .     \end{lstlisting}     \end{document}      This produces te following output: ![example listing with wrong quotation marks](http://i.stack.imgur.com/9Ptx1.jpg) As you can see in line `8` (the last sign at the end) and line `9` (after the first quotation mark; in front of the word `test`) the quotation marks are wrong/incorrect. – `David` should be surrounded by (German) double quotation marks (`„David“`) and `test` with (German) single quotation marks (`‚test‘`). **→ Does someone know how to fix that/produce that?** Another problem in line `9` is the display of typographical quotation marks (opening and closing) for the whole string ( **"**`„David“ Skulptür …` **"** ). I can only fix this by commenting out `\defaultfontfeatures{Mapping=tex- text}` in the preamble. **→ Again: Does someone know how to fix that (without disabling`\defaultfontfeatures`)?** Thanks a lot and best regards! **PS:** The disabled `literate` option in the MWE doesn't change anything if is enabled …


title: How to avoid sub-stacks being squeezed onto the baseline?

text: **I'm using XeLaTeX on Linux** _(just to pre-empt any questions about that...)_ I think my question is best described with this Picture: ![enter image description here](http://i.stack.imgur.com/KDdIK.png) As you can see in the red circles, the `n \to \infty` line got squeezed onto the baseline when `\lim` is used inside something like `\frac{}{}`, here's the relevant code portion:                   &=& \lim_{n \to \infty} - \frac{1}{n} \frac{c^{\frac{1}{n}}(c-1)}{c^{\frac{1}{n}} - 1} \\         &=& - \frac{\lim_{n \to \infty} c^{\frac{1}{n}} (c-1)}                    {\lim_{n \to \infty} n \left(c^{\frac{1}{n}}-1\right)} \\      _(the portion is inside an`eqnarray*` environment)_ It should be evident, that in both instances, `\lim` has the same parameters, but behaves differently. How do I avaid that line being squeezed over next to `\lim` rather than below it? On a lesser note: I'd like to give my exponents a bit more headroom (blue circles), make them smaller maybe or something. Please advice what I should do.


title: Transparent foreground watermark

text: As a follow-up to Add watermark that overlays the images, I'd like to have a transparent foreground watermark that doesn't render the underlying content, i.e. text and images, illegible. Is that possible? I'm especially interested in using that on a couple of beamer slides in which I'd like to put a semi-transparent watermark/banner above a couple of pictures.


title: How to install ConTeXt from CD-ROM?

text: I would like to prepare a current version of ConTeXt on a CD-ROM, so that it can be installed on Debian, in some emergency situation, i.e. when Internet access is unavailable. The typical installation method I have seen is through the Internet only. Debian provides packages, but these are very outdated. Is there a way to download the entire ConTeXt repository to a CD-ROM for later installation?


title: Cycle option when drawing between nodes in TikZ

text: Cycle lets you close curves when drawing, and               \coordinate (a) at (0,0);     \coordinate (b) at (1,0);     \coordinate (c) at (0.5, -1);     \draw (a) -- (b) -- (c) -- cycle;      works fine. Shouldn't also               \node (a) at (0,0) {};     \node (b) at (1,0) {};     \node (c) at (0.5, -1) {};     \draw (a) -- (b) -- (c) -- cycle;      give the same result? The former gives a triangle, while the second doesn't close up. Is this a bug or am I missing something regarding the cycle option? (Of course, as a workaround I could use the coordinates to draw the cycled path, and then draw the nodes at the same coordinates, but still...)


title: TikZ: Fill (closed) parametric plot of catacaustic

text: Is there a trick to fill the parametric plot of a catacaustic which looks closed but isn’t closed in TiKZ meaning. The Problem is the egdge which looks closed but isn’t it … ![problem](http://i.stack.imgur.com/DuBzL.png) I guess I can experiment with overlay a withe area or try to clip with a limited second plot using the `even odd rule` but I hope theres a more comfortable way to to this. **Code**               % needs gnuplot     \documentclass{minimal}          \usepackage{tikz}     \tikzset{samples=500}          \begin{document}     \begin{tikzpicture}         \draw [thick, fill=red] plot [id=op-12,parametric]             function{2*cos(t)-cos(2*t),2*sin(t)-sin(2*t)};         \draw [<-] (1.5,0) -- +(1.5,0) node [right] {Problem};     \end{tikzpicture}     \end{document}


title: Move graph nodes on a circular path while keeping the circle

text: I would like to show nodes on a graph. The graph shape should be a circle. I would like to move the nodes while keep the circular shape. The following is what I can create with four nodes and it actually looks good:               \tikzstyle{cblue}=[circle, draw, thin,fill=cyan!20, scale=0.5]          \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,thick,main node/.style={rectangle,fill=blue!20,draw,font=\sffamily\Large\bfseries}]     \draw[help lines] (-1,-1) grid (1,1);     \node[cblue] (1) at ( 90:1 ) {1};     \node[cblue] (2) at ( 0:1 ) {2};     \node[cblue] (3) at ( -90:1) {3};     \node[cblue] (4) at ( 180:1) {4};          \path[every node/.style={font=\sffamily\small}]     (1) edge  [bend left]  node [right] {} (2)     (2) edge  [bend left]  node [right] {} (3)     (3) edge  [bend left]  node [right] {} (4)     (4) edge  [bend left]  node [right] {} (1) ;     \end{tikzpicture}      ![good](http://i.stack.imgur.com/Z6sf3.png) However, as I move the nodes along the circle, the circular shape is not preserved. Here are some modified coordinates:               \node[cblue] (1) at ( 90:1 ) {1};     \node[cblue] (2) at ( 30:1 ) {2};     \node[cblue] (3) at ( 340:1) {3};     \node[cblue] (4) at ( 180:1) {4};      ![bad](http://i.stack.imgur.com/Cjt8k.png) I guess this is because as explained here, bend right option is not exactly a circular pattern. I have looked into pgf's "through library" and though I could draw a circle that passes through the nodes, but what I really want is a circle that is broken into four pieces, each piece separated by two nodes. I appreciate if someone could tell me how I can do this?


title: Character "1" with long serif

text: I'm looking for a character "1" with looong horizontal serif at the bottom (in math mode). Currently I use `\mathtt{1}`, but would prefer longer. I also tried stretching it horizontally by `\scalebox`, but then it produced some Fatal error, something like "too complex task", probably because of the subscripts. Does anyone know a font or easy way to create "1" with long serif?


title: Seeking improvement on a poor solution---for descendant charts

text: I've a solution to a problem that screams out for improvement. I'm working on a second edition of a family history (mine) that has a great number of descendant charts. I've cobbled together a way of presenting them, but it is an enormous PIA and I can't help but believe there is a better way! Below is a MWE that illustrates the crudeness of the code. I've looked at TikZ, hoping for something pre-rolled, but have found nothing that I was able to modify to a solution. Which is a shame in that I'd like the vertical lines to touch at the obvious intersections as well as having midpoint origins leading to horizontal lines as need be.               %%     %% chart1.tex -- The Original Immigrant     %%     \documentclass[letterpaper,12pt]{article}     \usepackage{soul}     \usepackage{booktabs}     \usepackage{rotating}     \usepackage[sc,osf]{mathpazo}     \newlength{\mysize}     \newcommand{\mycfs}[1]{\setlength{\mysize}{#1pt}%       \fontsize{\mysize}{1.2\mysize}\selectfont}     \newcommand{\nemo}{\rule{4.5em}{0.4pt}}     \begin{document}     \setul{}{1pt}     \begin{table}[ht]     \caption{``\textbf{The Original Immigrant}''}     \vskip .5in     \mycfs{11}     \begin{sideways}     \begin{tabular}{c c c c c}     \multicolumn{5}{c}{\textbf{Pieter Myers}} \\     \multicolumn{5}{c}{c.1660--c.1725} \\     \multicolumn{5}{c}{\vrule} \\     \multicolumn{5}{c}{David Myers} \\     \multicolumn{5}{c}{c.1690--c.1760} \\     \multicolumn{5}{c}{\vrule} \\     \multicolumn{5}{c}{David Myers} \\     \multicolumn{5}{c}{\ul{c.1730--c.1790}} \\     \multicolumn{5}{c}{\vrule} \\     \cmidrule(l{3.49em}){1-1}\cmidrule(r{4.56em}){2-5} \\     % \cmidrule columns should be {2-N} where N ='s number of 'c's     \addlinespace[-1.5em]     % increase 0em till above \vrule then decrease     % as many \vrules as 'children' with enough white space to fit widest entry after...     \vrule & \vrule & \vrule & \vrule & \vrule \\     Henry Myers & Christian Myers & Samuel Myers & Daniel Myers & \textbf{Abram Myers I} \\     c.1752--c.1778 & c.1754--23 Aug 1799 & c.1755-- & c.1758-- & c.1760--c.1845 \\     & m. Charity \rule{4.5em}{0.4pt} & & & m. Mary C. Schell \\     & c.1755--19 Mar 1812 & & & \ul{1765--c.1855} \\     & & & & \vrule \\     & & & & David Myers \\     & & & & c.1770--1872 \\     & & & & Jonas Myers \\     & & & & 1795--1870 \\     & & & & Abram Myers II \\     & & & & 1795--1870 \\     & & & & Caroline Myers \\     & & & & 1800--1849 \\     & & & & Mary Myers \\     & & & & c.1805-- \\     & & & & John Myers \\     & & & & 1807--c.1879 \\     \end{tabular}     \end{sideways}     \end{table}     \end{document}      Any improvement gratefully accepted. Something I can turn into a style would be tremendous, but any clarity would be good.


title: plotting a line in a barchart

text: Problem: line stops at given coordinates, ymax is not obeyed.               \documentclass[a4paper,10pt]{report}     \usepackage[left=1.5cm,top=2cm,right=1.5cm,bottom=1.5cm]{geometry}     \usepackage[table,usenames,dvipsnames]{xcolor}     \usepackage{tikz}     \usepackage{pgfplots}          \pgfplotsset{         width=\textwidth,     }     \begin{document}     \begin{tikzpicture}     \begin{axis}[     ybar,ymax=100,enlarge y limits={upper,value=1},     height=8cm,     enlargelimits=0.25,     ylabel={Uptime \%},     symbolic x coords={Mar '12,Apr '12,May '12},     xtick=data,     nodes near coords=\rotatebox{90}{\scriptsize\pgfmathprintnumber\pgfplotspointmeta},     ]     \addplot[draw=blue,fill=blue!40!white] coordinates      {(Mar '12,100)      (Apr '12,100)       (May '12,100)};      \addplot[draw=Salmon,fill=Salmon!40!white] coordinates      {(Mar '12,100)      (Apr '12,100)       (May '12,100)};      \addplot[draw=yellow,fill=yellow!40!white] coordinates      {(Mar '12,99.86)    (Apr '12,99.47)     (May '12,99.37)};      \addplot[draw=RawSienna,fill=RawSienna!40!white] coordinates    {(Mar '12,100)      (Apr '12,100)       (May '12,99.98)};     \addplot[draw=purple,fill=purple!40!white] coordinates      {(Mar '12,99.69)    (Apr '12,98.79)     (May '12,97.91)};      \addplot[draw=cyan,fill=cyan!40!white] coordinates      {(Mar '12,100)      (Apr '12,100)       (May '12,100)};      \addplot[draw=magenta,fill=magenta!40!white] coordinates    {(Mar '12,100)      (Apr '12,100)       (May '12,99.96)};      \addplot[draw=LimeGreen,fill=LimeGreen!40!white] coordinates    {(Mar '12,100)      (Apr '12,100)       (May '12,99.99)};      \addplot[draw=red,fill=red!40!white] coordinates        {(Mar '12,100)      (Apr '12,100)       (May '12,99.99)};      \addplot[red,sharp plot] coordinates {(Mar '12,98) (May '12,98)} node[above] at (axis cs:Apr '12,98) {KPI};          \end{axis}     \end{tikzpicture}          \end{document}      Now I like to have a continuous line at 98% without the labels but with the KPI label, and the y axis should stop at 100. Is this possible?


title: How to exclude an appendix table from list of table?

text: I have a table in Appendix. It also shows in list of tables. How can I remove it? I tried the following but it didn't do anything.               \usepackage{caption}          \begin{document}          .          .          .          \appendix          \captionsetup{list=no}          \end{document}


title: Make a particular column of a longtable borderless

text: I am using longtable package to create tables as the number of rows are large and doesn't fit in a single page. This works fine for me. I now need a particular column not to have top and bottom border lines.. Example table which fits my requirement                _________________       ___________         |SlNum |Name      |Phone| Hobby     |      -----------------       -----------     |   1  |Pitbull   | NA  | Raps a lot|      ------------------      -----------


title: list of todos (todonotes) is empty with llncs

text: I am using `todonotes` together with Springer's `llncs` and I noticed that the list of todos created with `\listoftodos` remains empty, regardless how often I run `pdflatex`. With other document classes its working fine. Example:               %\documentclass{scrartcl} %list of todos is correct     \documentclass{llncs} %list of todos is empty     \usepackage{todonotes}          \begin{document}          \listoftodos          \section{Contents}     test text \todo{test}          \end{document}      Is there an easy workaround?


title: typesetting 2 line conditions over which is summed

text: I am trying to typeset the formula below in a way that `m_j=m_i` and `z_j=z_i` have the same scriptsize, the `=` are aligned, and `j:` is before both, larger and with vertical position between the lines. How can this be done?               \documentclass[a4paper,12pt]{book}     \usepackage{amsmath,amssymb}          \begin{document}          \begin{align}       y&=\sum_i\frac{\left(1-\frac{1}{\sum_{j:_{m_j=m_i}^{z_j=z_i}}         {f(m(j),z(j),s(j))}}\right)^2}{1}\\       y&=\sum_i\frac{\left(1-\frac{1}{\sum_{j:\substack{m_j=m_i\\z_j=z_i}}         {f(m(j),z(j),s(j))}}\right)^2}{1}\\       y&=\sum_i\frac{\left(1-\frac{1}{\sum_{j:\stackrel{m_j=m_i}{z_j=z_i}}         {f(m(j),z(j),s(j))}}\right)^2}{1}     \end{align}          \end{document}


title: Org-mode export to LaTeX: temptation or nuisance?

text: We are talking about Emacs and Org-mode: There are several advantages of drafting papers with Org-mode and to have them transferred later to LaTeX, e.g.:   1. I'd like to avoid »programming while writing«. I prefer a clean text without the usual LaTeX-Commands in the editor.    2. Org-mode has a incredible feature: radio tables. We can have a spreadsheet, calculations and export the whole thing to a LaTeX tabular easily.  Of course the export from Org-mode to LaTeX is more or less basic, see the manual here and here. The more features we implement in Org-mode, the more »crowded« and less clean the view of the text in the window will become. That said, I've got a # Question: What do you do to draft using Org-mode and to publish in LaTeX? How do you »enrich« your Org-mode file to be able to export to LaTeX without the need to add more than some finishing touches to the result? Is there anybody out there who has to offer experience and all the dirty tricks? # Edit:   1. Is there anybody drafting letters and exporting them to LaTeX?   2. TODO-Lists are coloured in Emacs, but the output in LaTeX is simply black, while to html all colours are conserved. I'd like to have coloured TODO-Lists in the LaTeX output as well!?


title: Footception: Footnote within a footnote within a footnote

text: Inspired by the question Footnote to a footnote (where it was asked if one could have a footnote reference in a footnote), I'm asking something a bit more complex. Before I ask though, let me prefence the question by stating that _I'm not looking for the standard tyopgraphical practice_ , but rather asking if something is possible for my own sake. How can I put a footnote section within another footnote section, i.e.               This is the outer block of[1] text[2].          ---- % Begin first footnote (scriptsize)     [1] Here we start the first[*] footnote to main.     [2] Here we start the second footnote to main.           ---- % Begin second footnote (even smaller then scriptsize)      [*] Here is the first[+] footnote[-] to the first footnote block.             ---- % Begin third footnote (even smaller then the last one)        [+] Here is the first[a] footnote to the second[b] footnote block.        [-] Here is the second footnote to the second[c] footnote block.      etc ... I'm looking for footnotes all the way down, or at least as deep as I'd like to specify.


title: Bad font using \psfrag

text: I'm trying to include a figure that I made in MATLAB. I want to change the font using `\psfrag`, however there seems to be a problem when scaling the figure down. It keeps the font the same size as the text, which is fine, but the tick labels keep their position (they are overlapping the axes!), which looks bad. See the figure below. MWE follows below.               \documentclass[11pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{psfrag}          \begin{document}     \begin{figure}     \psfrag{0}{$ 0 $}     \psfrag{5}{$ 5 $}     \psfrag{10}{$ 10 $}     \psfrag{15}{$ 15 $}     \psfrag{20}{$ 20 $}     \psfrag{25}{$ 25 $}     \psfrag{30}{$ 30 $}     \psfrag{358}{$ 358 $}     \psfrag{360}{$ 360 $}     \psfrag{362}{$ 362 $}     \psfrag{364}{$ 364 $}     \psfrag{366}{$ 366 $}     \psfrag{368}{$ 368 $}     \psfrag{370}{$ 370 $}     \psfrag{xtitle}{$ d_{c}\, \mathrm{[\mu m]} $}     \psfrag{ytitle}{$ t_{i}\, \mathrm{[nm]} $}     \begin{centering}     \includegraphics[scale=0.7]{layer_thickness.eps}     \par\end{centering}     \caption{Insert caption}     \label{fig: layer thickness}     \end{figure}     \end{document}      ![The font of the tick labels are changed using <code>\\psfrag</code>, but the positioning is bad.](http://i.stack.imgur.com/ohl71.png)


title: How to draw a generalized Catalan number diagram using TikZ

text: This question is related to my previous question How to draw a Catalan number diagram on TikZ I would like to be able to draw generalized Catalan number diagrams using Tikz. More concretely, I would like a 3 dimensional version of the previous 2 dimensional one. Three dimensional Catalan numbers are defined as 3-dimensional lattice paths using steps (1,0,0),(0,1,0) and (0,0,1) from the origin to the point (n,n,n), the points in the path satisfy 0 ≤ x_1 ≤ x_2 ≤ x_3.


title: 'Dummy' LaTeX environment

text: I have a big LaTeX file which I would like to compile so that certain environments like `figure` are not shown. To that end I wanted to make use of the `renewenvironment` command. But the facilities of this command are rather limited: essentially, one can only replace an environment by something which is logically also an environment. What would suffice for me, hence, is to introduce a 'dummy enviroment' - one which discards the argument. Is there any way to define it? EDIT: I also need to eliminate the `displaymath` environment. This might be essential, because the argument of it is not going to be valid text on its own.


title: How to change the margins of the only first page of each chapter?

text: I'm using the `geometry` package in the `book` class and now I want the margins of the first page of each chapter to be, for example, `top=50mm, bottom=50mm, left=50mm, right=50mm` and the margins of other pages to be, say, `top=30mm, bottom=30mm, left=30mm, right=30mm`. BTW, I want to do it in the preamle, and not in the document body itself. For convenience, I put the following MWE:               \documentclass{book}     \usepackage[top=50mm, bottom=50mm, left=50mm, right=50mm]{geometry}     \usepackage{lipsum}      \begin{document}     \chapter{One}     \lipsum[1-12]     \chapter{Two}     \lipsum[4-8]              \end{document}      I'm familiar with commands like `\newgeometry`, `\savegeometry`, and `\loadgeometry` etc, but I couldn't accomplish that. Can anybody please help me do that?


title: Sliders in LaTeX

text: I was wondering if there is a standardized and fancy way to have sliders like these horizontal linear ones in a LaTeX article. Anyone has an idea on how I should start tackling it? I'd like to get an horizontal slider that takes text space, not floating. So far I don't get past this, I don't know how to place a square+triangle shape on top of it:                \documentclass{article}      \usepackage{xcolor}      \usepackage{tikz}      \begin{document}      SLIDER \tikz{\path[draw=lightgray,fill=lightgray, rounded corners] (0,0) rectangle (2.5cm,0.2cm);}      \end{document}


title: Draw Bohr atomic model with electron shells in TeX?

text: > **This question led to a new package:**   >  `bohr` I'm making slides with `beamer` for my chemistry students. I would like to draw a figure in LaTeX to illustrate the electron shells in the Bohr model but I cant find any chemistry package that does that? Is the only way to do it to use TikZ or something and do it manually? Somebody must have had this need before?


title: Period Padding with Price

text: I'm looking for a way to have automated period padding for some items I'm discussing in my proposal. For example: Pneumatic Drill.......................$450.12 Drill Bit.....................................$12.90 * * * Ideally, I'm looking for something like the following I suppose: `\noindent\hspace{0.45cm}\dag\hspace{0.25cm}\begin{period- padder}\$450.12\end{period-padder}`


title: Long lines when using listings

text: ## First Issue I'm using the `listings` package to present some algorithms using pseudocode. The problem is that sometimes the lines of my pseudocode are too "long" and `listings` breaks them in 2 lines. For example, you can see the following screenshots: ![enter image description here](http://i.stack.imgur.com/qFOdq.png) and ![enter image description here](http://i.stack.imgur.com/RScw2.png) in which in the first case the line is broken into 3 other lines while in the second example the `)` is moved to the next line. Is there any way to fix that? E.g. by making a specific line inside listing have smaller letters? ## Second Issue Also I use `\lstinline{}` for keywords that appear in the pseudocode inside my document. The problem is that sometimes it doesn't work "fine" as can be seen below: ![enter image description here](http://i.stack.imgur.com/SfpRz.png) `counter` in the document is inside a `\lstinline{}` snippet and the `.` is after it but the created document moves the `.` to the next line which isn't that nice (in appearance). Any ideas how to solve it?


title: Pgfplots - How to deal with special characters in data files?

text: I have a file which contains column headings such as `AAA-BBB` or something to the effect of `CC_DD_8734-20°`. How should I deal with this if I just want to use such a file? Or should I prepare each set of data for with `x-y` columns? (which would be very cumbersone, but definitely work) ## MWE               \documentclass[     a4paper     ]{scrartcl}          \usepackage{         lmodern,         tikz,         pgfplots,         pgfplotstable         }     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \begin{filecontents}{data.csv}     AA-BB;Min;Max     CC_DD-01;-28.035191;19.114903     CC_DD-02°;-26.760864;22.937884     CC_DD-03°;-29.309518;16.566249     CC_DD-04;-28.035191;20.38923     CC_DD-05;-26.760864;19.114903     CC_DD-06;-25.486538;16.566249     \end{filecontents}          \pgfplotstableread[col sep=semicolon]{data.csv}{\tableabcdef}          \begin{document}     Test.     \begin{center}     \centering     \begin{tikzpicture}     \begin{axis}[     xbar,     xlabel={Values},     ylabel={Subject},     xmin=-4,     ytick=data,     nodes near coords, nodes near coords align={horizontal},     yticklabels from table={\tableabcdef}{AA-BB},     ]     \foreach \i in {Min,Max}{     \addplot table [meta=AA-BB, y expr=\coordindex, x=\i] {\tableabcdef};}     \end{axis}     \end{tikzpicture}     \end{center}     \end{document}


title: Creating multiple columns of different width

text: I'm pretty new to LaTeX and am using it to write an exam. I'm using the `geometry` package to create two columns. I'd like one column to be 5" and the second column to be 1" with 0.5" separating the columns and 1" for the left and right margins. How do I go about doing this?


title: How do you break long lines in pgfgantt?

text: I am drawing a gantt chart using the `pgfgantt` package. I have some text in nodes that I would like to break down into multilines, but it doesn't seem to work. I made a simple example like so:               \begin{ganttchart}[                 hgrid,                  vgrid,                  newline shortcut=true,                 bar label node/ .append style={align=left}     ]{1}{2}     \gantttitle{aa}{2} \\     \ganttbar{%      A very long line, A very long\ganttalignnewline     line A very long line A very long ...%     }{1}{2}     \end{ganttchart}      I get the error, `*"I do not know the key //pgfgantt//bar label node// .append style'"*`. The example is almost copy-and-paste from an example in the pgfgantt manual.


title: Few level enumerate across few rows in table

text: I would like to create result like below: ![enter image description here](http://i.stack.imgur.com/wI824.png) First I was trying to do it using `tabbing`, but it doesn't work inside `enumerate`. So I found that it can work with table. How can I do this? \----- EDIT ------ Here is my preamble and packages:               \documentclass[11pt, a4paper, notitlepage]{report}     \usepackage{polski}     \usepackage[cp1250]{inputenc}     \usepackage{graphicx}     \usepackage{enumerate}     \usepackage[final]{pdfpages}     \usepackage[T1]{fontenc}      \----- EDIT 2 ------ Thanks to @A.Ellett for very good answer to my question. Additionally I would like to add headers to this columns like on the picture: ![enter image description here](http://i.stack.imgur.com/8y89b.png)


title: A simple (indented) integration contour with Tikz

text: I would like to draw an integration contour which is pretty easy I think, but I am a newbie at the Tikz package. The integration contour goes from -i*infinity to +i*infinity parallel to the Imaginary axis but not exactly on it, rather slightly to the left (or right) of it. The integration contour also has a semicircle on it somewhere near the origin but not exactly on the origin. I guess I'm looking for an indented contour but not the usual ones where one go from -infinity to + infinity with a jump over a pole as in the following picture ![contour](http://i.stack.imgur.com/jZLQA.png) but like I said I would like it to go vertically. ![Indented contour](http://i.stack.imgur.com/W125Y.png) I also found this picture, I want something very close to this. If I get some help getting what is in the picture in the link I think I can manage doing the rest myself. indented integration contour Please, any help would be appreciated, thanks.