title: polyglossia and minted - The current roman font does not contain the Hebrew script!

text: Trying to use `minted` with Hebrew as the default language with `polyglossia`:               \documentclass{article}     \usepackage{minted}     \usepackage{polyglossia}     \setdefaultlanguage[calendar=hebrew, numerals=arabic]{hebrew}     \setotherlanguage{english}     \newfontfamily\hebrewfont{David CLM}          \begin{document}     בדיקה          \begin{english}     \begin{minted}{bash}         $ for i in {1..2}; do echo 'Hello World'; done         Hello World         Hello World     \end{minted}     \end{english}     \end{document}      Results in:               $ xelatex -shell-escape test     ! Package polyglossia Error:      The current roman font does not contain the Hebrew script!     Please define \hebrewfont with \newfontfamily.          See the polyglossia package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.1 \begin{Verbatim}[commandchars=\\\{\}, ]      I _think_ I understand what the error is saying, but not sure why. I'm in the `english` environment which should use the default English font... So why am I getting errors about Hebrew stuff? (I did manage to workaround it by setting the default language to English, but that made other things break unfortunately)


title: How to customize list environment exclusively for tabulars?

text: I would like to implement a list within a tabular environment. Without adjustments the output looks pretty akward due to horizontal spacing. However, I used the following code to align the list directly to the left hand side of the tabular environment:               \makeatletter     \newcommand{\minipagetrue}{\@minipagetrue}     \usepackage{enumitem}     \setlist[itemize]{nosep,after=\vskip-\baselineskip,label=     {\textbullet},leftmargin=*,before=\minipagetrue,}      Plugging this code into a MWE:               \documentclass[12pt,english,hideothersubsections]{beamer}     \usepackage{ragged2e,array,longtable}          %------LAYOUT--------     \usetheme{Warsaw}     \usecolortheme{wolverine}     \usefonttheme{professionalfonts}          %defining color of itemize.     \setbeamertemplate{itemize item}{\color{yellow}$\blacksquare$}     \setbeamertemplate{itemize subitem}{\color{orange}$\blacktriangleright$}          \makeatletter     \newcommand{\minipagetrue}{\@minipagetrue}     \usepackage{enumitem}     \setlist[itemize]{nosep,after=\vskip-\baselineskip,label=    {\textbullet},leftmargin=*,before=\minipagetrue,}               \begin{document}          \begin{frame}          \begin{tabular}{>{\RaggedRight}p{30mm}>{\RaggedRight}p{30mm}>{\RaggedRight}p{30mm}}          \onslide<2->{text 1} & \onslide<2->{text 2} & \onslide<2->{text 3}\\          \begin{itemize}%[leftmargin=0mm]       \item<3-> subitem     \end{itemize}          \end{tabular}          \end{frame}               \end{document}      However, I observe two problems with my output. Firstly, the code presented first is a global code and hence refers to all list environments; I would like it to refer exclusively to list environments within a tabular. Secondly, the definition of colors of the bulletpoints disappears using the package > enumitem. Is it possible to address both issues? If so, how?


title: How to make tabbed newlines

text: I need to make my text look like this for a homework assignment, how can I achieve that? ![Example Image of Text](http://i.stack.imgur.com/P8VuL.png) (Sorry if the title or tags don't fit, I don't even know how this is called)


title: Disable grid typesetting in ConTeXt

text: Is there any way to disable grid typesetting in ConTeXt. `\setuplayout[grid=yes]` gives the default behaviour of grid snapping, but so does `\setuplayout[grid=no]`. is there any way to turn off grid snapping and get line spacing like LaTeX?.


title: Is a tool or package set for users to generate latex CVs via web interface available?

text: I work at a research center at a university in Mexico in which each investigator's CV must be formatted identically. Presently, a Microsoft Word document serves as the template, and, in addition to being a nightmare to format, it looks hideous. A couple colleagues who also use LaTeX were discussing the advantages of a web interface that would work similar to a web- based database interface, whereby each investigator enters the required information in specified fields (i.e., name, surname, etc.). I know that this would be doable, but none of us would realistically have the time to write such an application from scratch via PHP. Besides, it seems like something like this should already exist. Thus, my question is whether anyone is aware of an application along these lines that could be adapted to meet our needs here. Thank you very much.


title: Creating performance profiles

text: A performance profile is a kind of plot used in the optimization community; here below is an example from http://www.gamsworld.com/performance. ![http://www.gamsworld.org/performance/profileGnuplot.gif](http://i.stack.imgur.com/7VZqW.gif) For an introduction, see Section 22.4 of Higham and Higham's book _Matlab guide_. Informally speaking, the graph reports which percentage (on the `y` axis) of a number of experiments done with competing methods is within a certain threshold (on the `x` axis) of the best result. A formal specification is as follows.   * Suppose you run m tests to compare n existing methods. Let r_{ij} be the result (error, computational time... whatever; let's say that lower is better) obtained by method j on test i.   * The _performance_ of method j on test i is defined as the ratio between its result and the best result on the same test, p_{ij} = r_{ij} / (min_j r_{ij}). Note that p_{ij} \geq 1.   * The _performance function_ of method j is the function f_j(x) = 1/m * (number of tests i such that p_{ij} \leq x), that is, the "probability" that the method j is within a factor x of the best possible method. Note that f_j(x) is (weakly) monotonically increasing in x for each j.   * A _performance profile_ is the plot of all functions f_j, as in the image above. Do you know if there is support for creating performance profiles in tex? It is a very simple plot of course, so one in principle could preprocess the data and return a set of (x,y) pairs ready for plotting, but it would cut one step if the plot logic could be implemented natively in tex. I have found nothing in the manual of `pgfplots`, which was my no. 1 candidate. If someone wishes to implement it, here is a set of sample data, in pgfplots table format (method in columns, different tests in rows):               table{       ode23    ode45   ode113       1.26e-2  6.20e-3 1.56e-2       2.41e-1  1.53e-1 1.97e-1       3.74e-2  5.00e-2 6.68e-2       3.37e0   6.45e0  7.86e0       1.44e-1  1.56e-1 3.76e-2       5.06e-1  1.07e0  1.5e0       }      The output should look more or less like this image from the Higham & Higham book: ![enter image description here](http://i.stack.imgur.com/TQDv7.png)


title: How to upgrade 'biblatex' properly?

text: I use TeXLive 2012 under Ubuntu 12.10. I would like to upgrade biblatex to the latest version (2.3). I tried the following:   1. download and unpack .tar.gz from https://github.com/plk/biblatex/downloads   2. put content in local TeX tree /usr/local/texlive/texmf-local:      * put ./tex/latex/biblatex in /usr/local/texlive/texmf-local/tex/latex     * put ./bibtex in /usr/local/texlive/texmf-local (replace the existing "bibtex" there)   3. mktexlsr (i.e., texhash) When compiling documents, I suddenly obtain:               /usr/local/texlive/2012/../texmf-local/tex/latex/biblatex/biblatex.sty:87: Miss     ing number, treated as zero.     <to be read again>                         D     l.87           ?       I checked back with the README and I have all other required (and strongly recommended packages). How is upgrading of biblatex done properly?


title: Version number for a bundle

text: I need some advice. I am going to bundle a package of mine (lets say its named `foo`, currently `v2.0a`) with two not yet released packages (therefore both `v0.1`). I am unsure which version number the “foo bundle” should get. I can think of different approaches:   1. Let every package keep its own version number and don't use a version number for the bundle but the release date. But then I'd have to tell CTAN a version like `2012/01/27`. Seems odd. And I'd have to keep track of three different version numbers (which is not too big a deal but still…)   2. Give the whole bundle and every package the same version number, either `2.1` (which would be the next number I'd choose for `foo` if I didn't bundle the packages) or `3.0` since the bundling seems a large enough step for a new main version number. However, I don't really like the idea giving previously unreleased packages a number like `2.1` or `3.0` even if they are part of a bundle and not supposed to be loaded explicitly.   3. Let every package keep it's own version number and give the bundle the number of the oldest package, namely `foo`. This also seems odd since the packages in the bundle are going to be updated together. Also I'd again have to keep track of three different version numbers. I looked into the packages of different bundles but couldn't find a “preferred solution”. Most of them seem to give each package the number of the bundle (i.e. approach 2). Do you have any suggestions? What would you do or consider the best way to proceed? If you had a similar problem: what _did_ you do?


title: Fixing formatting errors created by long eqnarrays

text: I'm writing a paper in which I have long `eqnarray`s, many of them 10 lines or longer. Since TeX seems to not want to page-break these equations, this results in weird formatting, eg pages that have large amounts of whitespace and not much actual text. Is there any way to force TeX to page-break `eqnarray` equations in a natural way?


title: Binary arithmetic

text: Is there a package to perform binary arithmetic like addition, subtraction, and so on? Ex: 1101 + 0001 = 1110. BUT not as text, like I've typed in here! Also, is there any other packager rather than **xlop** for decimal arithmetic operations?


title: ToC: frame #1 for the first page and frame #2 for the rest ones

text: I have to put such frame on the first ToC page, and such one on the rest of ToC pages (a thesis requirement). As i generate ToC via `\tableofcontents`, i have to clue how to reach that. I have that frames as PDFs, so i may use `wallpaper`/`graphicsx`/whatever package to depict them. The problem is: how to make LaTeX place frames in the required way? NB: currently my ToC is 4 pages long, that's why i need in a general solution: _`\tableofcontents --> p1 f#1, p2 f#2, p3 f#2, p4 f#2, ...`_


title: Texmaker (windows 7) don't use TEXINPUTS environment variable?

text: I normally use Unix system, but I am forced for a while on a Windows7 setup. I installed MikTex and texmaker 4.0.4. All is working except it seems that texmaker is not respecting the `TEXINPUTS` variable. MWE: go in one dir and create directories `TeXinputs` and `subdir`. In `subdir`, file `testinput.tex`:               \documentclass[10pt]{article}     \usepackage{null}     \begin{document}     Nothing     \end{document}      in directory `TeXinputs` create the file `null.sty`:               \NeedsTeXFormat{LaTeX2e}[1996/06/01]     \ProvidesPackage{null}[2013/11/12 null package.]     \def\called{\relax}     \endinput      then add the environment variable as user `TEXINPUTS` with value `.:../TeXinputs//`. To add it in Windows, open the "Start" menu, and start typing "environment" in the search box (I suppose it will be different with a non-English installation --- in Spanish should be "variables de entorno"). Then choose "set environment variables for your account"and, in the windows that opens, you can add all the variables you want. This is my example: ![Setting user environment variables](http://i.stack.imgur.com/tFxfz.png) I have it defined and checked it (this is from a bash shell installed by git):               $echo $TEXINPUTS     ./:../TeXinpus//      The idea is that I can use a structure like this in my work directory:               $ls      TeXinputs subdir1 subdir2       This **works great for MikTeX** , to have common files in the same place. I can compile my files correctly from bash:               $ pdflatex testinput     This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)     entering extended mode     ("z:\adit\My Documents\test\subdir\testinput.tex"     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,     croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))     ("z:\adit\My Documents\test\subdir\..\TeXinputs\\null.sty")     ("z:\adit\My Documents\test\subdir\testinput.aux") [1{C:/ProgramData/MiKTeX/2.9     /pdftex/config/pdftex.map}] ("z:\adit\My Documents\test\subdir\testinput.aux")     )<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb>     Output written on testinput.pdf (1 page, 12304 bytes).     Transcript written on testinput.log.      As you can see, the file `z:\adit\My Documents\test\subdir\..\TeXinputs\\null.sty` is found and all is ok. **The problem and question** : opening the file in texmaker and trying to compile gives error --- it can't find the ../TeXinputs/null.sty file. I checked too:   * setting TEXINPUTS as a "system" environment variable (don't work)   * using absolute path instead of relative one (with or without spces in the path, don't work)  Any hint on why relative TEXINPUTS paths are not working in texmaker?


title: Label part in title and TOC "First part", "Second part", etc

text: I'm sure this question has already been asked and answered but I didn't know what to look for in the forum. I'd like to label my part title in TOC and in the beginning of the part itself like "First part", "Second part", etc. What is the code for that?


title: Multiple listings styles

text: In using the `listings` package, how can I have a distinct `\lstlistingname` value for each type of listing. Lets say my document has **C++, R** and **Pseudo** listings, and I would like the `\lstlistingname` value to be: `C++ Code`, `R Code` and `Pseudo Code` respectively, is it possible to define these values as part of the `\lstdefinestyle{...}` definition, rather than calling `\renewcommand{\lstlistingname}{...}` each time it needs changing? Additionally, is it possible to have separate `list of listings` table in the front-matter of my document, for each type of listing style in preference to having all of the styles mixed into the same table?


title: typesetting different characters with different colors in a DNA sequence

text: I have created a macro which I used to format DNA sequences, as they should be in the monospaced font and uppercased:               \newcommand{\DNA}[1]{\texttt{\uppercase{#1}}}      Now I have a column with some different DNA sequences on different rows, lets say:               1 & \DNA{GCATCCAATGCC}\\     2 & \DNA{GGGACCAATGCG}\\     3 & \DNA{TTATCCAATCTC}\\      I would like to color each character (base) in the DNA sequence with a different color, as it easier for the reader to see certain patterns (in this case the reoccuring CCAAT sequence, a putative Hap complex binding domain). (for example as done here) that means, all A -> Red T -> Green C -> Blue G -> Black Is there a way to do this, or a verbatim package in which this can be achieved ? Thanks alot for your help! ## \---------- Liu's example posted works well, but not in my tabular/floatrow table Tobi's example works well in all environments tested.. Thanks again for your great help all!


title: Using package minted with non-english characters

text: I would like to use LaTeX package `minted` to colorize my c and Cuda code. I need to write comments in the code in czech. I use package `inputenc` with `utf-8` and czech characters `(ěščřžýáíé)` work good in whole paper but `minted` block: LaTeX source:                   \begin{minted}{c}             double m[4];    // staticky alokované pole         \end{minted}      Output pdf:                   double m[4];    // staticky alokovan\unhbox \voidb@x \bgroup \let \unhbox \voidb@x \      EDIT: I have tried XeTeX. minted works fine with XeTeX and czech characters. But assymptote doesn't work for me with XeTeX. asy command used on .asy file from XeTeX utilize 100% of my cpu but not generate any output in casual time. EDIT: Example for pdflatex:                  \documentclass[a4paper, pt11]{article}        \usepackage[utf8]{inputenc}        \usepackage{fullpage}        \usepackage[english, czech]{babel}             % More symbols        \usepackage{amsmath}        \usepackage{amssymb}        \usepackage{latexsym}                  \usepackage{graphicx}        \usepackage{asymptote}        \usepackage{minted}             \begin{document}        \begin{figure}[h]         \begin{asy}             import unicode;             size(15cm);             fill((0, 0)--(0.5, 0)--(0.5, 1)--(0, 1)--cycle, red);             fill((0.5, 0)--(6, 0)--(6, 1)--(0.5, 1)--cycle, blue);             fill((6, 0)--(32, 0)--(32, 1)--(6, 1)--cycle, green);             draw((0.25, 1.1)--(0.25, 1.9));             label("znaménko", (0.25,2), N);             label("exponent", (3.25,1), N);             label("mantisa", (18,1), N);             for(int i=0; i < 64; ++i) {                 draw((0.5i, 0)--(0.5i + 0.5, 0)--(0.5i + 0.5, 1)--(0.5i, 1)--cycle);             }             label("$63$",(0.25,0),S);             label("$52$",(5.75,0),S);             label("$0$",(31.75,0),S);         \end{asy}         \caption{Uspořádání \emph{double} v paměti}         \label{doublemem}        \end{figure}              \begin{minted}{c}         double m[4];    // staticky alokované pole         m[0] = 1;       // přímé nastavení první složky         double *n = (double *) malloc(pocet_cisel * 4 * sizeof (double));   // dynamická alokace         n[4 + 0] = 1;   // přímý přístup do první složky druhého čísla         free(n);        // vyčištění paměti        \end{minted}        \end{document}


title: \includegraphics caused missing number, treated as zero error

text: I was trying to include an image in my file but this error came up:               ! Missing number, treated as zero.     <to be read again>                         o     l.207               \includegraphics{rate\_of\_return}      I've looked everywhere and tried a lot of things, but the problem remains unresolved. This is my code:               % ... some stuff          \item[c)] \hfill \\         In the graph below, the full line is for 7\%, the long-short dashed         line is for 6\%, and the regular dashed line is for 5\%.             \includegraphics{rate\_of\_return}          % ... some stuff


title: Change font size of text in a table cell

text: I'm trying to create some beautoful tables with LaTex, but it's kind of hard. How can I change the font size of only _some_ words within a table cell?               \begin{tabularx}{\linewidth}{lX}     text:&this is a text, and I only want two or three words to be smaller than the rest in THIS table cell!\\[1ex]     \end{tabularx}      Is it possible to change, for example for the words "this is a text" the font size to small? `{\small this is a text}` doesn't work.


title: Define minted environment as a verbatim environment in texmaker

text: I use the minted environment in order to insert source code in a document. Contrary to `lstlistings` or `verbatim` environment, Texmaker does interpret the contains of `minted` environment. For example if I have a `$` inside a `bash` script all lines below will be green because Texmaker considers that an equation began inside the minted environment. Does it exist a way to configure Texmaker to do with minted as it does with `listings` ?


title: Horizontally align multi-line cell in table

text: I want to horizontally align two cells with two lines in a table environment, something like this:               -------------------     | A long    | foo |     |           | ----|     | multiline | bar |     -------------------      What I'm getting is a blank line under `foo` as the long multi-line takes up more vertical space, and `bar` is pushed down. In this image, I don't want the blank space between 'First text' and 'Second text', or 'Second text' and 'Third text'. ![Lines not correct](http://i.stack.imgur.com/J8U5k.png) I thought putting the top left cell into a `minipage` would make it flow into the blank space I provided in the second row, but that didn't work. My MWE is below. ### How can I align my cells correctly? Here's my MWE:               \documentclass{article}          \begin{document}          \begin{table}[tb]         \begin{center}             \begin{tabular}{p{0.3\textwidth}p{0.6\textwidth}}             \hline             \begin{minipage}[t]{0.3\textwidth} A long\\line\end{minipage} & First text\                                                                       & Second Text\            A second\\Line & Third Text\                           & Fourth Text\            \hline             \end{tabular}         \end{center}     \end{table}          \end{document}


title: babel: Adding ngerman' s language shorthands to english as the main document language

text: The `(n)german` language option of the babel package provides various shorthands related to hyphenation, e.g. `"-`: _"an explicit hyphen sign, allowing hyphenation in the rest of the word"_ (manual, section 22). At least some of these shorthands are also useful for English texts -- e.g., typing `zoning-facil"-itated` results in the following legal breakpoints (assuming English hyphenation patterns): `zoning-facil-i-tated`. (Note: hyphenation before `"-` is disabled in this case because of the explicit hyphen after "zoning".) When using `ngerman` as the main document language and switching to `english` within the document body, `\addto` allows to carry over language shorthands:               \documentclass{article}          \usepackage[english,ngerman]{babel}     \addto\extrasenglish{\languageshorthands{ngerman}}          \begin{document}          \selectlanguage{english}          Adding \textsf{ngerman} language shorthands to \textsf{english}: zoning-facil"-itated.          \end{document}      However, this doesn't work with `english` as the main document language (and `ngerman` still specified as additional option):               \documentclass{article}          \usepackage[ngerman,english]{babel}     \addto\extrasenglish{\languageshorthands{ngerman}}          \begin{document}          Adding \textsf{ngerman} language shorthands to \textsf{english}: zoning-facil"-itated.          \end{document}      How can I add `ngerman`s language shorthands to `english` while using `english` as the main document language?


title: Subsections without numbering in ToC and document

text: I have a table of contents which I want to modify. I want subsections without a number, in the document and the ToC. I'm using `memoir`.               \documentclass[12pt, a4paper, makeidx]{memoir}      I have the following table of ToC style               \settocdepth{subsection}     \setsecnumdepth{subsection}     \maxsecnumdepth{subsection}     \settocdepth{subsection}     \maxtocdepth{subsection}      This results in (ToC)               1 Chapter Titel......................         1.1  Section......................               1.1.1  Subsection......................      I want this               1 Chapter Titel......................         1.1  Section ......................               Subsection ......................      Any help would be great


title: Looking for an “easy to understand” description of the tfm file format

text: I try to understand TeX more deeply, and one part of it is the TFM (TeX font metric) file format. Is there an easy to understand yet complete description of it somewhere (perhaps free)? I know I can look into the source code (which is what I am doing at the moment), but a nicely formatted article with images would help me understanding the file structure. I am not looking for an "overall description". The description should be exact (which byte has which meaning), but it should help the reader (=me) with some illustrations and examples.


title: Tajik language in LaTeX

text: My question is about adding a new language into LaTeX: the Tajik language. There is Russian language support in LaTeX and Russian is written using a modified version of the Cyrillic alphabet. Tajik is also written in the Cyrillic alphabet and its orthography is very close to Russian. So, how can I add Tajik language support in LaTeX? Is there any manual about adding new languages into LaTeX? Thank you


title: Math list - equation, operands specification

text: What I'd like to produce:               Y = A + B + C + D     where:     A........amount of whatever     B........foobar amounts whatever     C........foo     D........you name it      I am working with this equation:               \[Y_i = \beta_0 + \beta_1 E_i + \beta_2 T_i + \sum_{j = 1}^{32} \beta_{j+2} M_{ij} + u_i \]      Similar question (yet not the one): What would be the appropriate technique for typesetting a "where" list of variable specifications after an equation?


title: Using mathdesign's math font with another text font

text: Is it possible to use a math font provided by the mathdesign package for mathematics, along with another text font, under pdflatex ? If it is, is there an easy way to do it ? More precisely, I try to use the font math that goes with Charter when using               \usepackage[charter]{mathdesign}      and some variant of New Century Schoolbook, for example the one that comes with               \usepackage{fouriernc}      My understanding of (La)TeX fonts is low ; until now, the only way I used them is to add some package in the header and magically the font changed. I tried to look at the LaTeX font guide but it only emphasized the fact that it is more complicated than I thought. Thanks.


title: Moving axes labels in pgfplots

text: How can one have an axes labels (`x` and `z` near the axis) like this: ![enter image description here](http://i.stack.imgur.com/9RGpE.png)


title: How to draw tangent line at a given point on the circle?

text: I'm trying to draw this picture using _TikZ_. I'm almost done. After drawing K and the small circle I choose those 2 points (p and \tilde p). The problem is to draw the dashed circle containing those 2 points. Also other problem is to draw the tangent lines T_1 and T_2. I've found some tricks to draw tangents to a curve but I don't have an open curve to use some positions (as path length). Finally, how to draw the right angles? That is, the small square for right angles. ![enter image description here](http://i.stack.imgur.com/sOPSa.png) * * * Here is my code for the moment. It's similar to the figure, it is not necessary to be exactly the same. Note that I had to do a trick to get the orthogonal circle.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc,through,arrows}     \usetikzlibrary{decorations}     \usetikzlibrary{intersections,patterns}     \usetikzlibrary{decorations.markings}          \begin{document}     \begin{tikzpicture}     \coordinate (q) at (0,0);     \coordinate (t) at (-20:3cm);     \coordinate (t1) at (15:3.5cm);     \draw[name path=circ,fill=white!10] (q) circle (2cm);      \draw[name path=reta] (q)--(t)node[below left]{$T$};     \path[name intersections={of=reta and circ,by={a}}] ;     \coordinate (o) at ($(a)!1cm!-90:(q)$);     \draw[name path=circ1] (o) circle (1cm);     \path[name intersections={of=circ and circ1,by={b}}] ;     \path[name path=linha,draw] (q)--(t1);     \path[name intersections={of=circ1 and linha,by={ztilde,z}}] ;          \draw (a) -- ($(a)!-4pt!(q)$) -- ($(a)!-4pt!(q)!4pt!90:(a)$) -- ($(a)!4pt!90:(q)$);     \draw (b) -- ($(b)!-4pt!(q)$) -- ($(b)!-4pt!(q)!4pt!-90:(b)$) -- ($(b)!4pt!-90:(q)$);          \draw[fill=white] (z)node[above left]{$z$} circle (1.2pt) (ztilde)node[above right]{$\tilde z$} circle (1.2pt) (a)node[below=2pt]{$a$} circle (1.2pt) (b)node[above=2pt]{$b$} circle (1.2pt);     \draw[fill=black] (q)node[left]{$q$} circle (1.2pt);     \node[below left] at (220:2cm){$\mathcal{K}$};     \node[right=1cm] at (o){$\mathcal{C}$};     \end{tikzpicture}     \end{document}


title: How to use siunitx and tabularx together?

text: I'm using the tabular features of siunitx (for what it is worth: v1.3 since I'm on TexLive 2009) to align numbers in tables, eg.               \begin{tabular}{ p{1.5cm} S S S }     bla & 1.23 & 4.5 & 67.89 \tabularnewline     \end{tabular}      and that works perfectly fine. Now I would like to have this table span a specific width, or rather to have several tables to have the same width. For this I would normally use tabularx               \begin{tabularx}{\textwidth}{ p{1.5cm} X X X }     bla & 1.23 & 4.5 & 67.89 \tabularnewline     \end{tabular}      Now, is there a way to combine the two? To have the number formatting and alignment features of siunitx inside an automatically resizing table?


title: @tempdima, reserved@a, @tempcnta, what else?

text: I'm aware that some "temporary" LaTeX dimensions etc. exist. I would, however, like to know all of them. I know `\reserved@a` (macro), `\@tempdima` (dimension) and `\@tempcnta` (counter).


title: Using ACM style produces wrong page size

text: I'm using the ACM "Tighter Alternate style" to write a document. The submission instructions state that I have to create a PDF in US letter format but unfortunately, my PDF is A4. How can I change this to US letter? I have tried the geometry package (`\usepackage[letterpaper]{geometry}`), but this produces 6 instead of 4 pages and I can read everywhere, that there are only slight differences between both sizes... Additionally, I looked into the config.ps as described here, but proposed lines to change exist both in my config.ps.


title: Lyx: remove subsections from table of contents

text: I don't want subsections to appear in the table of contents of my Lyx document. How do I turn them off? I went to Tools -> Settings -> Numbering & TOC, but it won't let me modify anything. What should I do?


title: Using a negative space \! to differentiate between functions and products

text: In Physics, I often have functions like `f(x)`, but also multiplications like `y(-x)`. I would like my math to be easy to understand, so I am looking for a way to suggest function calls and multiplications. In programming languages like C or Python, this is easy. A function call is `f(x)` and a multiplication has to have a `*` in it. I think it would be ugly and confusing to put `\cdot` everywhere, since that is more thought of as am inner product. In Mathematica, function calls are with square brackets, like `f[x]`, whereas multiplication is with round parenteses `y(-x)`. Since LaTeX has the `\!` command, a friend thought of using that between the function name and the parameters. I tried the negative spacing and the square brackets, but I am not sure whether it is valid to use `\!` at that point. Or should I use even more negative spacing? ![](http://chaos.stw-bonn.de/users/mu/uploads/2013-06-21/out.png) The font in the image is Bitstream Charter with `mathdesign`. The code for the examples is:               f\del x y \del{-x}     f\sbr x y \del{-x}     f \! \del x y \del{-x}     f \! \sbr x y \del{-x}      Where `\del` and `\sbr` come from the `commath` package and create automatically sized parenteses and square brackets.


How colorize a merged cell with a multirow? I want colorize the cell completly and I can't figure out what I must do. Thank you in advance.               % XeLaTeX          \documentclass[12pt,a4paper,oneside]{article}          \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{fontspec}     \usepackage{polyglossia}     \setdefaultlanguage{portuges}     \usepackage[bookmarks=true,       citecolor=black,       filecolor=black,       linkcolor=black,       urlcolor=black,       unicode=false,       colorlinks=false,       plainpages=false,       pdfpagelabels,       colorlinks=true,       xetex]{hyperref}     \usepackage{longtable}     \usepackage{multirow}     \usepackage{lscape}     \usepackage{booktabs}     \usepackage{array}     \usepackage{rotating}     \usepackage[table]{xcolor}               \begin{document}          %\multirow{nrows}[bigstruts]{width}[fixup]{text}     \renewcommand{\arraystretch}{1.2}          \begin{landscape}     \small     \begin{longtable}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}     \hline     \multicolumn{6}{|c|}{Elementos do Plano de Acção} & \multicolumn{8}{c|}{Temas} \\ \hline     %     &  & \multicolumn{4}{c|}{\raisebox{-1em}{Concretização}} &  &  &  &  &  &  &  &  \\ [2em] \cline{3-6}     %     \multicolumn{1}{|c|}{\multirow{-2}{*}[3em]{\cellcolor{red!10}\begin{sideways} Acção \# \end{sideways}}} &      \multirow{-2}{*}{\rotatebox[origin=c]{00}{\begin{minipage}{14em}\centering\raisebox{0em}{ Acções Previstas} \end{minipage}}} &      \begin{minipage}{6em}\centering\raisebox{-4em}{ Recursos } \end{minipage} &      \begin{minipage}{6em}\centering\raisebox{-4em}{ Intervenientes } \end{minipage} &      \begin{minipage}{6em}\raisebox{-4em}{\centering Calendarização } \end{minipage} &      \begin{minipage}{6em}\centering\raisebox{-4em}{ Avaliação } \end{minipage} &      \multicolumn{1}{c|}{\multirow{-2}{*}[3em]{\begin{sideways} Água \end{sideways}}} &      \multicolumn{1}{c|}{\multirow{-2}{*}[3em]{\begin{sideways} Resíduos \end{sideways}}} &      \multicolumn{1}{c|}{\multirow{-2}{*}[3em]{\begin{sideways} Energia \end{sideways}}} &      \multicolumn{1}{c|}{\multirow{-2}{*}[3em]{\begin{sideways} Espaços exteriores \end{sideways}}} &      \multicolumn{1}{c|}{\multirow{-2}{*}[3em]{\begin{sideways} Agricultura Biológica \end{sideways}}} &      \multicolumn{1}{c|}{\multirow{-2}{*}[3em]{\begin{sideways} Mar \end{sideways}}} &      \multicolumn{1}{c|}{\multirow{-2}{*}[3em]{\begin{sideways} Biodiversidade \end{sideways}}} &      \multicolumn{1}{c|}{\multirow{-2}{*}[3em]{\begin{sideways} Alterações climáticas \end{sideways}}} \\ [4em]      \endfirsthead          \multicolumn{14}{r}{Continua na próxima página}     \endfoot          \hline \hline     \endlastfoot               \end{longtable}     \end{landscape}          \end{document}      ![enter image description here](http://i.stack.imgur.com/NgqPG.png)


title: Looking for links, pointers to info on type specimen generation

text: So far I've found the following:   * **opentype-info.tex** by Jonathan Kew   * **TypeSp01.tex -- TypeSp10.tex** by Stephen Moye   * **t1testpage.exe** by Eddie Kohler I'm hoping that I've missed a package (or two) as well as other information. I've got >2k fonts on my development machine and I've finally concluded that I desperately need something more dependable than my memory. opentype-info.tex is set up for XeTeX, TypeSp01-10 for TeX and t1testpage is limited to .pfb files. I'd think that the first two could be rewritten for XeLaTeX and perhaps extended with a Perl script as needed. Any other solutions could be folded in as well. As an example of extension, the necessary successive runs of **otfinfo.exe** could be formatted and combined with the above. This could all be combined in a sort of grande scheme/stew so that I or anyone else for that matter could make decisions about font usage intelligently. As I'm typing this I noticed the question about ' _Generating a table of glyphs with XeTeX_ ' which I'll take a look at for obvious reasons. An answer before I even post the question---no wonder I keep coming back to this exchange :)


title: Integrating listings with fancyvrb

text: I am trying to use `fancyvrb` with `listings` and I get an error saying > l.2 ...{Verbatim}[formatcom={\lstset{style=Java}}] > > Package Listings Error: language java undefined.               \documentclass{beamer}     \usetheme{bars}          \usepackage{xcolor}     \usepackage[T1]{fontenc}     \usepackage{hyperref}     \usepackage{listings}     \usepackage{fancyvrb}     \usepackage{graphicx}     \usepackage{mathtools}          \lstdefinestyle{Java}{ %     language=Java,                % choose the language of the code     basicstyle=\scriptsize\ttfamily, % the size of the fonts that are used     numbers=left,                   % where to put the line-numbers     numberstyle=\tiny,      % the size of the fonts that are used for     stepnumber=1,                   % the step between two line-numbers.      numbersep=5pt,                  % how far the line-numbers are from the code     showspaces=false,               % show spaces adding particular underscores     showstringspaces=false,         % underline spaces within strings     showtabs=false,                 % show tabs within strings adding particular     frame=single,           % adds a frame around the code     tabsize=2,          % sets default tabsize to 2 spaces     captionpos=b,           % sets the caption-position to bottom     breaklines=true,        % sets automatic line breaking     breakatwhitespace=false,        %escapeinside={\%*}{*)},     % if you want to add a comment within your code     fancyvrb=true,     }                         \begin{document}          \begin{frame}[fragile]       \frametitle{Listings with Fancyvrb}       \begin{Verbatim}[formatcom={\lstset{style=Java}}]         new Date();        \end{Verbatim}     \end{frame}          \end{document}


title: if the remote file exists then include it, else include the local one

text: Here's the path where my tex file stands :               /home/me/documents/foo.tex      I also have one import file here :               /home/me/texmf/tex/latex/personal/bar.tex      However for security purpose I also include it here locally :               /home/me/documents/bar.tex      When I input it in my tex file, e.g. :               \input{bar}      I noticed the local file is used over the remote one (latex personal directory) **My question is :** how can I manage the following statement ?   * If the distant file exists then include it over the local one.   * If the distant file is none then include the local one.


title: Partial derivative with rightleftarrow on top of it

text: How can I write a partial derivative with an arrow on top of it (pointing to the left and right)? For instance: ![enter image description here](http://i.stack.imgur.com/TcBRq.png) I've tried to Google it, but couldn't find anything (probably because I'm not sure what keywords to use). Any help is much appreciated.


title: What are the different kinds of boxes in (La)TeX?

text: I've seen `hbox`, `vbox`, `mbox`, `parbox` and others used in various code samples. What are the different kinds of box in (La)Tex? Which are suitable for use in LaTeX, as opposed to plain TeX?


title: Tikz-Tree: Arrow-style depending on parent node

text: I have drawn a tree in tikz with different styles for nodes (this simplified example has nodes with style `a` or `b`). The arrows from nodes to childs are always the same and I would like to apply different styles to the edge/arrow depending on the style of the parent node.               \begin{tikzpicture}[         a/.style={circle, draw=black, edge from parent/.style=myEdge1},         b/.style={rectangle, draw=red, edge from parent/.style=myEdge2},         myEdge1/.code={             \draw[-] \tikzparentnode -- \tikzchildnode;         }         myEdge2/.code={             % No edge or applying a different style         }     ]     \node[a]{}         child {node[a] {}}         child {             node[b] {no arrows from this node}             child {node[a] {no arrow to this node}}             child {node[b] {no arrow to this node}}         }         child {node[a] {}}     ;     \end{tikzpicture}      This is how it is supposed to look: ![example](http://i.imgur.com/fW8wAwH.png) First of all, the code above does not work when `edge from parent/.style=myEdge1` is defined within a style (`a` or `b`). It only works when I put it right behind the child, i.e. `child[edge from parent/.style=myEdge1]`. Second (and this would probably solve the first issue), I would rather need `edge to child` than `edge from parent` since the style of the parent shall decide whether an arrow has to be drawn or not. But there is no such thing as `edge to child` in the tikz documentation. Is there an easier solution than telling each child whether it should have an arrow from its parent or not such that tikz automatically adopts the edge style from the style of the parent node?


title: How can I determine the height of a minipage?

text: If I have a `minipage`               \begin{minipage}{5cm}     content     \end{minipage}      How can I determine its height and save this value as a length?


title: How to use coordinate in tikz?

text: The following is my code:               \begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]                    \coordinate (a1) [] {};     \node (rect) (a) [draw,minimum width=3cm,minimum height=1cm, below of=a1,node distance=1cm] {Sender};     \node[rectangle] (b) [draw,minimum width=3cm,minimum height=1cm, below of=a,node distance=2cm] {Receiver};     \coordinate (b1) [below=2cm of b] {};     \path[->] (a) edge node {  $f$ } (b);     \path[->] (a1) edge node {  $f$ } (a);     \path[->] (b) edge node {  $f$ } (b1);     \end{tikzpicture}      I am getting the following output: ![enter image description here](http://i.stack.imgur.com/HSzvp.png) I want one arrow from Receiver to b1. Can anyone tell me my mistake?


title: format numbers in reference so they sort correctly

text: This is a followup to question list of occurences of references. In the MWE below the index lists the Goals in alphabetic order where numeric is needed for the second token: ![badly sorted goals in index](http://i.stack.imgur.com/e1G5p.png) The solution I found (on SE - sorry I lost the link) for the chapter and section numbers for the subsidiary indexing doesn't seem to work for the main headings. I tried a few others, to no avail. **Edit:** the solution to convert outcome of reference to regular number looks as if it ought to work but I tried something like that and it failed.               \documentclass[12pt]{book}          \usepackage{amsthm}     \usepackage{environ}     \usepackage{imakeidx}     \usepackage{refcount}     \usepackage{hyperref}          \makeindex[intoc]     \makeindex[name=goals,title=Goal References,columns=1,intoc]          \newcommand{\gref}[1]{%        [Goal~\ref{goal:#1}]        \index[goals]{Goal~\getrefnumber{goal:#1}!Section          \ifnum\value{chapter}<10 0\fi\arabic{chapter}.%         \ifnum\value{section}<10 0\fi\arabic{section}}     }          \makeatletter     \newcommand\l@goal[1]{%       \addpenalty{\@highpenalty}%       \vskip \z@ \@plus \p@        \begingroup       \parindent\z@        \rightskip\@pnumwidth       \parfillskip-\@pnumwidth        \leavevmode #1\nobreak\hfil\nobreak\null\par        \penalty\@highpenalty       \endgroup}          \newcommand{\egregaddtocontents}[1]{%          \addtocontents{toc}{\protect\l@goal{#1}}}          % arrange goal numbering by chapter     \newtheorem{Goal}{Goal}[chapter]          % define a shorthand to be able to get at \BODY with \expandafter         \newcommand\indexgoal[1]{\goalindex[goals]{Goal~\theGoal! #1}}          % save a copy of \index     \let\goalindex\index     \NewEnviron{goal}[1]{%     \begin{Goal}        \label{goal:#1}%        % here we neutralize \index so that it won't do damages        \begingroup        \renewcommand\index[2][]{}%        % but the main command uses \goalindex, so it's safe        \expandafter\indexgoal\expandafter{\BODY}%        \egregaddtocontents{\BODY}        \endgroup        %{\em label:} #1 %comment in/out to restore/suppress printing label        \normalfont{}\noindent        \BODY     }     [\end{Goal}]     \makeatother          \newenvironment{goals}     {%     {\textbf Chapter goals:}     \egregaddtocontents{Chapter goals:}     }     {}          \begin{document}          \tableofcontents{}          \setcounter{chapter}{1}     \chapter{TWO}          \tracingmacros=1          \begin{goals}          \begin{goal}{twofirst}      learn more \LaTeX     \end{goal}          \end{goals}          \tracingmacros=0          \begin{goal}{twosecond}     spend time on content, not \LaTeX      \end{goal}          \section{two-one}     stuff\index{stuff}     Reference to a chapter 11 goal: \gref{elevenfirst}          \setcounter{chapter}{10}     \chapter{ELEVEN}          \begin{goal}{elevenfirst}     have fun in any case\index{fun}     \end{goal}          Chapter contents here, referring to some goals:          \setcounter{section}{1}          \section{whatever}          Reference to a chapter 2 goal: \gref{twosecond}          Reference to a chapter 11 goal: \gref{elevenfirst}          \setcounter{section}{10}     \section{another}          Second reference to a chapter 2 goal: \gref{twofirst}          \printindex[goals]     \printindex          \end{document}


title: Use BibDesk groups in LaTeX bibliography?

text: I couldn't find a reply to this anywhere, so I hope to not be asking something discussed elsewhere. Using BibDesk (Mac OS X) for reference management, I have a single bib file with all my sources and use "Static Groups" for each project's specific references, i.e. one group for a document's reference list. When trying the use this bib file in LaTeX, I would like to show all items in this group in the respective document's bibliography. But so far I have only been able to manually add items using \nocite{item}. Is there a way to include all items of a group without using \nocite{*}, which includes the whole bib file? (In the bib file, the syntax for groups is "@comment{BibDesk Static Groups{ ...") If this way does not work, what would be a simple alternative, offering one central management list from which I can easily select which references to include for which document? I would like to avoid creating a bib file for every project and like the drag-and-drop concept of BibDesk's groups. Thanks a lot for the help!


title: Problem compiling with TeXLive

text: I am a Ubuntu user, and recently I had a problem with my upgrade from an older version of Ubuntu to a newer one, so I had to wipe everything out and start back from scratch. Unfortunately, that involves setting LaTeX to work back again. The problem I have is the following : I don't remember what I was using as a LaTeX distribution before, but I know that now I am using TeXLive ; when I run pdflatex, it gives me an error line on every single line in my code, which usually looks like this for one of my average-looking files :               \documentclass[a4paper,10 pt]{article}     \usepackage[isolatin]{inputenc}     \usepackage[T1]{fontenc}      %\usepackage[francais]{babel}     \usepackage[cyr]{aeguill}     \usepackage{xspace}     \usepackage{fullpage}          %Specific to TikZ          \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{ifthen}     \usepackage{animate}     ....      For instance, I get told from the second line that "File isolatin.def not found" and then my packages ending in ".sty" keep appearing a lot in the errors. If I keep letting them go though (by pressing enter in my terminal, it kind of ignores the warning) I can compile and get my .pdf file, but it won't show with all my pretty packages. Any idea about why this happens? Thank you!


title: newcommand and math environment

text: So I've created a latex `command` using `newcommand`. This is its definition               \newcommand{\twopartdef}[3]     {     \left\{         \begin{array}{ll}             #1 & \mbox{if } #2 \\             #3 & \mbox{otherwise}         \end{array}     \right     }      But when I try to use the command with this example               f$(x)$ = \twopartdef{$\lbrace \alpha \rbrace}{$x >$ 10}{\lbrace \beta \rbrace}      Latex tells me that it added the symbol `$` because it was unmatched.. What am doing wrong? What corrections should I make?


title: Two margin woes

text: I have two problems with my margins. One is that when I print the margins, I can't seem to get them to come out properly. I have               \usepackage[top = 1in, bottom = 1in, left = 1.5in, right = 1in]{geometry}      at the top of the document, and it looks right when it's on the screen, but it never seems to come out properly when I print. Also, I need to change it so that on pages where I start a new section it makes the top margin be two inches. Does anyone know how to do these things?


title: Print localization strings in biblatex

text: I want to print all the localization strings in biblatex for a language, so I can review them in an easier way than looking at the code. How can I achieve this?


title: Change \baselinestretch using xparse in TeX Live 2012

text: Is there a preferred way to change `\baselinestretch` using the xparse package included in TeX Live 2012? (I believe this is xparse version 3570, dated 2012/04/23.) If I run `latex -output-format pdf document.tex` on Mac OS X 10.7.4 to create a PDF from this document—               \documentclass{minimal}     \usepackage{xparse}     \RenewDocumentCommand \baselinestretch {} {1}     \begin{document}     hello, world     \end{document}      —pdfTeX never exits. Interrupting pdfTeX produces this output, which for the most part I do not understand—               ! Interruption.     \size@update ...relax \baselineskip \f@linespread                                                        \baselineskip \normalbasel...     l.4 \begin{document}      If I replace `\RenewDocumentCommand \baselinestretch {} {1}` with `\renewcommand{\baselinestretch}{1}` to obtain—               \documentclass{minimal}     \usepackage{xparse}     \renewcommand{\baselinestretch}{1}     \begin{document}     hello, world     \end{document}      —then pdfTeX finishes and a PDF is produced. Also, using `\RenewDocumentCommand` in xparse version 2219 (2011/04/08) seems to behave as expected. (I understand that `\baselinestretch` is 1 by default; I am using 1 in the examples for the sake of simplicity.)


title: Bibtex for non-literary work

text: do you have experience with bibtex and non-literary work? I'd like to cite things like movies, fine-art pieces and so on. How would you proceed? thanks.


title: Octavo environment stanza break spacing

text: In the `octavo` document-class, there is (as in many others) a `verse` environment for the setting of poetry; however, breaking stanzas appears to be unimplemented: there's no difference in vertical spacing between line-breaks and paragraph-breaks. I can fix this with a hack: using `\medskip` between each stanza; but is there a way to enable proper automatic paragraph spacing in `octavo`'s `verse` environment?


title: LaTex Error Help- Math Related

text: I'm trying to make an equation array               \begin{eqnarray*}       f^{(a)} (0) &=& \frac{a!}{2 \pi i} \oint_{ |z| = \frac{\varepsilon}{r}} \frac{f(z)}{(z)^{a+1}} dz &=&          &=& \frac{a!}{2 \pi i} \oint_{ |z| = \frac{\varepsilon}{r}} \frac{z-z^{2}-z^{3}-\dots -z^{n-1}}{(z^{a+1})(1-z-z^{2}-z^{3}-%     \dots -z^{n})} dz        \end{eqnarray*}%      Everything appears to be fine except there's an extra `=` sign to the far right and I can't seem to find any way to get rid of it. Any help would be very appreciated! **Addendum** : I'm having trouble formatting this               \begin{align*}       $$f_a = Res (F(z))_{z=0}        &= \Big(Res(F(z)_{z=0} +\sum_{\beta} \text{Res}(F(z)),z=\beta)\Big) - \Big(\sum_{\beta}   \text{Res}(F(z)),z=\beta))          &= {2\pi i}\oint F(z)dz -  \Big(\sum_{\beta} \text{Res}(F(z)),z=\beta)\Big)        &= - \Big(\sum_{\beta} \text{Res}(F(z)),z=\rho)\beta) $$        \end{align}%         The whole thing is simply staying in one line instead of breaking up into the proper formatting.


title: Typsetting binary arithmetic

text: I'm stuck trying to typset the following in math mode. I cannot get the spacing correct.                      0100   [4 in decimal]          x 1100   [12 in decimal]          ------       +    0000   [0100 x 0]       +   0000    [0100x 0, shifted left]       +  0100     [0100x 1, shifted left two positions]       + 0100      [0100x 1, shifted left three positions]       =========         0110000   [48 decimal]      Can this be achieved in math mode, or is is better / easier to just stick with pre-formatted text?


title: Slovak (and Czech) babel gives problems with cmidrule and cline

text: I tried to use the Slovak language with the `booktabs` package. Let's see a couple of cases.   1. `slovak` is included in the options to `babel`              \usepackage[english,slovak]{babel}      or              \usepackage[slovak,english]{babel}      or              \usepackage[slovak]{babel}`        2. "slovak" is NOT included in the options to `babel`              \usepackage[english]{babel}      Similarly two cases for `\cmidrule` A. `\cmidrule{2-3}` is included in the table B. `\cmidrule{2-3}` is NOT included in the table If both (`slovak`+`\cmidrule`) are included (case 1A), then following error occurrs               Paragraph ended before \@@@cmidrule was complete      (and a lot of other errors) In the other cases (1B, 2A and 2B) (NO `slovak` or NO `\cmidrule`), then `pdflatex` is succesful Does anybody know why 1A is wrong? And how to use `slovak` and `\cmidrule` together (case 1A)?               \documentclass[10pt]{book}     \usepackage[english,slovak]{babel}     \usepackage{booktabs}          \begin{document}          \begin{tabular}{ccc}     A & B & C \\     %\cmidrule{2-3}     A & B & C \\     \end{tabular}          \end{document}      I have Win7, TeXstudio 2.5.2


title: Table error after using \cline

text: I try to create bigger table in TeXworks where are different horizontal as well as vertical lines. Everything works fine but it always crash on the `\cline` command (when I use `\hline` it works perfectly). Anyone know where should be problem? I use packages:               \usepackage[czech]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}               \usepackage{array}     \usepackage{multirow}     \usepackage{hyperref}     \usepackage{amsmath}     \usepackage{tikz}      Source of the table:               \begin{table}[ht]     \centering     \begin{tabular}{*{11}{|l}}     \hline     & & \multicolumn{4}{c}{Longer text} & \multicolumn{3}{c|}{Longer text}\\     \cline{3-9}     & & a& b & c & d & ei & f & g \\     \hline     \parbox[t]{2mm}{\multirow{3}{*}{\rotatebox[origin=c]{90}{text}}} & description & 2 & 1 & 2 & 0 & 1 & 2 & -1\\     \cline{2-9}     & description & 2 & 0 & 1 & 2 & 1 & 1 & 0\\     \cline{2-9}     & description & 2 & 2 & 2 & 1 & -2 & 2 & -2\\      \hline     \parbox[t]{2mm}{\multirow{4}{*}{\rotatebox[origin=c]{90}{text}}} & description & 2 & 2 & 2 & 2 & -1 & 2 & 0\\     \\cline{2-9}     & description & -1 & 0 & 2 & 2 & -2 & 1 & -2\\     \cline{2-9}     & description & 1 & 2 & 2 &  & -1 & 1 & -1\\     \cline{2-9}     & description & -1 & -1 & 0 & 0 & 0 & -1 & 1\\     \hline     \end{tabular}     \caption{Multi-row table}     \label{tab:multirow}     \end{table}


title: Show IEEElabels with showlabel?

text: I'm using IEEEtrantools to typeset equations (here's an excellent tutorial). The package offers, among other things the `IEEEeqnarray` environment to typeset equations. That environment has an issue with labels, so one must use               \newcommand{\IEEElabel}[1]{\begingroup\addtocounter{equation}{-1}\refstepcounter{equation}\label{#1}\endgroup}      instead of `\label`. The problem is to show `IEEElabel`s with `showlabel` (or some other way?). Here's an MWE:               \documentclass{article}          \usepackage{fontspec} % enagles loading of OpenType fonts     \usepackage{polyglossia} % support for languages          % fonts:     \defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} % without this XeLaTeX won't turn "--" into dashes     \setmainfont{Arial}     \setsansfont{Arial}     \setmonofont{DejaVu Sans Mono}          % math:     \usepackage{IEEEtrantools} % for advanced typesetting like multiline equations, and the likes.     \newcommand{\IEEElabel}[1]{\begingroup\addtocounter{equation}{-1}\refstepcounter{equation}\label{#1}\endgroup}     \usepackage{unicode-math} % to use unicode in the formulas -- to improve readability of sources     \setmathfont{Asana-Math.otf}          % showlabels?     \usepackage[inline]{showlabels}          \begin{document}          \begin{IEEEeqnarray}{rCl}       e^{i π} + 1 = 0       \IEEElabel{eq:test}     \end{IEEEeqnarray}          \end{document}      **Edit** : Here's a snippet with amsmath, mathtools. When I use them -- I get no labels, when I don't -- the labels are there.               \documentclass{article}          \usepackage{fontspec} % enagles loading of OpenType fonts     \usepackage{polyglossia} % support for languages          % fonts:     \defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} % without this XeLaTeX won't turn "--" into dashes     \setmainfont{Arial}     \setsansfont{Arial}     \setmonofont{DejaVu Sans Mono}          % math:     \usepackage{amsmath, mathtools}     \usepackage{IEEEtrantools} % for advanced typesetting like multiline equations, and the likes.     \usepackage{unicode-math} % to use unicode in the formulas -- to improve readability of sources     \setmathfont{Asana-Math.otf}               % showlabels?     \usepackage[inline]{showlabels}               % define a general showlabels patch for equation numbering commands     \makeatletter       \def\eqnnumpatch#1{         \expandafter\let\csname SL@#1\expandafter\endcsname\csname #1\endcsname         \expandafter\def\csname #1\endcsname{%           \csname SL@#1\endcsname     %% produce original equation number %%           \ifx\SL@labelname\relax             % do nothing           \else             \SL@eqnlrtext{\SL@labelname}%     %% produce label annotation %%           \fi           \global\let\SL@labelname\relax         }       }     \makeatother          % patch the two macros relevant for the IEEEeqnarray environment     \eqnnumpatch{theequationdis}     \eqnnumpatch{theIEEEsubequationdis}               \begin{document}          \begin{IEEEeqnarray}{rCl}       e^{i π} + 1 & = & 0       \label{eq:test}     \end{IEEEeqnarray}          \end{document}      I have the same `IEEEtrantools` and `showlabel`. Here're the full two logs: no math, with math.


title: Scaling inside a TikZ matrix does not work?

text: I'm having some difficulty at scaling a TikZ draw inside a matrix:               \documentclass[margin=5pt]{standalone}     \usepackage{tikz}     \begin{document}         \begin{tikzpicture}[scale=.5]         \matrix [yshift=2cm]{            \draw (0,0)--(0.2,1)--(1,1.2)--(1.2,0)--(0,0);&            \node{Some text that should not be scaled};\\         };              \draw (0,0)--(0.2,1)--(1,1.2)--(1.2,0)--(0,0);         \end{tikzpicture}           \end{document}      ![enter image description here](http://i.stack.imgur.com/FAr0X.jpg) As you can see the same picture is scaled outside the matrix but not inside. I can't use the `scalebox` or `resizebox` methods because there is some text in my original picture that should not be scaled, as it happens by default when you scale via the TikZ own option. So, why the draw does not scale inside the matrix? Is there some way I can make it scale without scaling the text too?


title: How to set the listings font for the whole document

text: How do I change the listing font size of the whole document? I am quite sure that it must be specified in `Document->Settings->Listings` but I do not know the input parameter for setting the font at “smallest” size. Thanks for your attention Simone


title: Optimising TikZ pictures for greyscale printing

text: I often use colours in my TikZ pictures. Are there simple ways to make versions of these that will come out looking good if I print them on a B&W printer? For example, say I have some filled regions in my picture, can I change them into cross-hatched or dotted regions consistently and easily? Ideally I'd like some option I can pass to the the `tikzpicture` environment which would reinterpret the colour for filled regions not as a colour, but as some crosshatching or small dots type filling...


title: biblatex: extrayear only if full date is equal?

text: I have a bunch of bib entries of the same author which are labeled by the full date. The problem is that some of them have the same date and so need an extrayear label. But extrayear works by year not by full date. So it looks as if I can only either label all entries or none. Has someone an idea how in the following example the two middle entries could get the labels "a" and "b" while the other have no label?               \documentclass[fontsize=11pt,parskip=half]{scrartcl}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage[backend=biber,                 style=authoryear-ibid,                 datelabel=short,                 ]{biblatex}          \addbibresource{testextra.bib}          %\AtEveryBibitem{\iffieldundef{day}{}{\clearfield{extrayear}}{}}     %\AtEveryCitekey{\iffieldundef{day}{}{\clearfield{extrayear}}{}}               \begin{document}     abc\nocite{*}          \printbibliography          \end{document}      # Bib (edited to contain two unrelated entries which should not be affected).               @article{authorA1,      author={authorA},      title={blaa},      date={2014-03-03}      }          @article{authorA2,      author={authorA},      title={blab},      date={2014-03-04}      }               @article{authorA3,      author={authorA},      title={blac},      date={2014-03-04}      }          @article{authorA4,      author={authorA},      title={blad},      date={2014-03-05}      }          @article{gambol,     author={Gambolputty, Johann},     title={Titel},     year={1970}}          @book{authorB,     author={authorB},     title={Titel},     date={2010-10}}


title: Arabic with English in LaTex

text: I usually used this code to produce Arabic with English text when needed               \documentclass[12pt]{article}     \usepackage{arabtex}     \usepackage{cp1256}     \setcode{cp1256}      \begin{document}     Hi all \<السلام عليكم>     \end{document}      it is working fine but the problem is with some characters such as ئ ؤ as it change it to another characters any suggestion ?


title: In TikZ when is "line join=miter" the preferrable over "line join=round"?

text: The solution to How to fix TixZ corners in 3D was to use `line join=round` instead of `line join=miter`. But I am trying to understand why that is not the default. Under what circumstances would "line join=miter" come in handy? In the TikZ manual it seems that `miter` option is useful for sharp corners, but the figure I was having problems with had sharp corners. Or is the rule of thumb: use `miter` option for sharp corners in 2D diagrams, but `round` for 3D?


title: left, right, and center alignment with hfill

text: this problem is driving me nuts. I need a line of text formatted as follows:               Avian Influenza       Tamiflu          Jan 2, 2011     * This is a random description, note that it spans        mult. cols.     * These bullet points--would like to use itemize       for them.          Chicken pox           DrugXYZ          Feb 3, 1998     * This is another description.     * The "headers" (e.g. DrugXYZ, Avian Influenza) can       be different, and have different lengths.      basically, I want `Avian Influenza` to be left-aligned, `Tamiflu` to be centered, and `Jan 2, 2011` to be right-aligned, such that the disease, dates and drug names in both sets are aligned at the same tabs. Altogether, the three should span the `textwidth`. I tried to use tabular, but I want to be able to use `itemize`, etc in the "stuff" portion. Any ideas??


title: Letter 'e', when printed in the default TeX font, missing a stroke

text: I often see printed LaTeX documents where the horizontal stroke of the 'e' is invisible -- even among different printers, documents, and people who print them. The image below shows it occurring on some lines of text, but not others, within a single document. It seems like an aliasing artifact. I'd like to learn more about it and avoid it. ![enter image description here](http://i.stack.imgur.com/MXHMi.jpg)


title: No space before first section in framed box

text: I am looking for the correct way to lay out content in a framed box. In my opinion the space before the first section in a box looks odd in comparison to the same content at the start of a page. How can I remove the horizontal space before the first `section` in a framed box? In particular I am looking for a compositional solution, that is, I would like to use the same latex code no matter whether it is placed within a box or not.               \documentclass{article}          \setlength{\parindent}{0pt}          \setlength{\fboxrule}{2pt}          \usepackage{showframe}     \usepackage{blindtext}          \begin{document}          \section{Title}     \blindtext          \section{Title}     \blindtext               \fbox{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{%     \section{Title}     \blindtext          \section{Title}     \blindtext}}               \end{document}


title: How do I set a hard minimum margin size with the tufte-book document class?

text: I'm trying to typeset my thesis with the `tufte-book` document class, and I'm having an issue with the margins. There is a rule (beyond my control) that all my text and figures must remain within margins that are at least 1 inch wide. I quite like the style of putting figures and notes in the margin (that's why I'm using the `tufte-book` class), but when I place things in the large margin on the right, they are liable to end up less than one inch from the edge of the page. Is there a way to force a minimum "real margin" that even margin notes and figures won't intrude on?


title: Extraneous empty line within memoir's list environment (for very tight lists) if used with memoir's Spacing environment (for single-spacing)

text: In order to typeset lists with very tight interline spacing, I normally define my own `tightlist` using `memoir`'s `list` environment. Even though my definition (see shortly) (1) ensures that all vertical spacing parameters are zero and (2) uses the `Spacing` environment to ensure single- spacing (in a 1.5-or-wider spacing environment), I strangely get an extraneous empty line after a nested `tightlist`:               \documentclass{memoir}          \newenvironment{mytightlist}[3]{%       \begin{Spacing}{1}%       \begin{list}{#1}{%         \setlength{\topsep}{0pt}%         \setlength{\parskip}{0pt}%         \setlength{\parsep}{0pt}%         \setlength{\itemsep}{0pt}%         \setlength{\leftmargin}{#2}%         \setlength{\labelwidth}{#3}%         \setlength{\labelsep}{0.5em}%       }%     }%     {\end{list}\end{Spacing}}               \begin{document}          Text.          \begin{mytightlist}{\(\bullet\)}{1.5em}{0.5em}     \item Text.       \begin{mytightlist}{\(\circ\)}{1.5em}{0.5em}       \item Text.       \item Text.       \end{mytightlist}% there is an empty line here that shouldn't be there     \item Text.     \end{mytightlist}          Text.          \begin{mytightlist}{\(\bullet\)}{1.5em}{0.5em}     \item Text.       \begin{mytightlist}{\(\circ\)}{1.5em}{0.5em}       \item Text.       \item Text.       \end{mytightlist}\vspace{0pt}% this magically prevents the empty line from occurring     \item Text.     \end{mytightlist}          Text.          \end{document}      **Issuing`\vspace{0pt}` after the nested `tightlist` eliminates the empty line, so that solves the problem, but why does this happen in the first place, and why does this solution work?** It seems like this behavior is caused by how the `Spacing` environment interacts with the `list` environment.


title: Insert multiple figures in Latex

text: I need to insert 10 figures (in two columns- side by side) in `LaTeX` that will have one global caption, but also I need to name each `figure` (1a, 1b, 1c, ... ect.). So they will look like:                1a        1b           1c        1d           1e        1f           1g        1h           1i        1j          Figure 1: plots of....      I would really appreciate if you guys can provide any help.


title: Branding issue with MacTeX 2013?

text: After learning that TeX Live 2013 was released this Tuesday June 18, I downloaded the new MacTeX. I am just a bit puzzled though:   * The MacTeX homepage clearly presents the download as MacTeX-2013, but with a release date of May 30, 2013, i.e. before TeX Live 2013 was released (while MacTeX is based on TeX Live);   * At install, `MacTeX.pkg` greets me with a MacTeX-2012 title: ![mactex install screen](http://i.stack.imgur.com/f2dEf.png) Has anyone experienced the same? Is there something wrong with my download (maybe the mirror wasn't up to date), or is the branding simply wrong on MacTeX 2013?


title: Which package to use for writing algorithms?

text: I am looking for a package that will allow me to write pseudocode of algorithms. The pseudocode may include mathematical symbols, like `\forall`, `\in` and subscripts. But I would like also to "talk" about variables contained in the pseudocode in my text, so be able to say "In figure ... variable `foobar` corresponds .." and make the word `foobar` have the same appearance as in the pseudocode example. I found that with the `listings` package I can add mathematical symbols by using: `\begin{lstlisting}[mathescape]`. The problem with this package is that I don't know how to make just one word have the same appearance as the words appearing inside `\begin{lstlisting} ... \end{lstlisting}`. Any ideas how to do this? Or perhaps of another package that will help solve the above mentioned problem?


title: New command based on command name

text: I had this idea that would save me a considerable amount of time in writing my thesis. Here's the deal: I need to typeset lots of equations with vectors and matrices in them. I'd like my vectors in boldface, lowercase and my matrices in boldface, uppercase. For a vectors and matrices I've defined the following in my preamble:               \renewcommand{\v}[1]{\ensuremath{\boldsymbol{#1}}}     \newcommand{\m}[1]{\ensuremath{\boldsymbol{\uppercase{#1}}}}      In context, I use \v{x} to typeset a vector x, etc. However, wouldn't it be nice to be able to typeset `\vx` to create that same vector **x**. Then, if I'm writing about a vector **a** , **b** and **c** , I can just write `\va`, `\vb` and `\vc`. Is this possible in LaTeX?


title: show baseline in two columns

text: This is a follow-up to Drawing a background grid based on linespread value. In a two-column document, the background lines are drawn in the first column only. Is there a way to show them in both columns? Here is a short document for testing:               % compile with lualatex or xelatex:     \documentclass[twocolumn]{book}     \usepackage{fontspec,lipsum,microtype}     \setmainfont[Contextuals=Alternate]{EB Garamond}     \linespread{1.0609}     \AtBeginDocument{\setlength{\parindent}{1em}}     \setlength{\topskip}{\baselineskip}     \usepackage[centering,columnsep=1.5em,heightrounded]{geometry}     % grid from tex.stackexchange.com/a/150621:     \usepackage{atbegshi,picture,xcolor}     \AtBeginShipout{%       \AtBeginShipoutUpperLeft{%         \color{red}%         \put(\dimexpr 1in+\oddsidemargin,         -\dimexpr 1in+\topmargin+\headheight+\headsep+\topskip)%         {%           \vtop to\dimexpr\vsize+\baselineskip{             \hrule             \leaders\vbox to\baselineskip{\hrule width\hsize\vfill}\vfill           }%         }%       }%     }     \begin{document}     \raggedbottom     \lipsum[1-8]     \end{document}


title: Longtable width exceeds page

text: I saw these topics and sure they help a lot, Resize longtable to width of landscape page How to fit landscape multi-page table to textwidth But still it does not fix my problem for some reason. I am having this table               \begin{landscape}     \setlength\LTcapwidth{\textwidth} % default: 4in (rather less than \textwidth...)     \setlength\LTleft{0pt}            % default: \parindent     \setlength\LTright{0pt}           % default: \fill     \begin{longtable}{@{\extracolsep{\fill}}|*{19}{c|}}     \caption[Multinomial logistic regression results for daily data of the major Eurozone, the US and the UK market indices, January, 1, 2005, to 20, July, 2012]{Multinomial logistic regression results for daily data of the major Eurozone, the US and the UK market indices, January, 1, 2005, to 20, July, 2012.} \label{grid_mlmmh} \\      &  & \multicolumn{6}{l}{Bottom tails} &  & & \multicolumn{6}{l}{Top tails} &      \\     \cmidrule{2-9} \cmidrule{11-18} % 2 orizonties grammes aristera kai deksia     \\     & \multicolumn{3}{l}{(1)}  & \multicolumn{3}{l}{(2)} & \multicolumn{3}{l}{(3)} & \multicolumn{3}{l}{(4)} & \multicolumn{3}{l}{(5)} & \multicolumn{3}{l}{(6)}       \\      \cmidrule{2-3} \cmidrule{5-6} \cmidrule{8-9} \cmidrule{11-12} \cmidrule{14-15} \cmidrule{17-18}% 2 orizonties grammes aristera kai deksia \\      & Coeff & $\Delta$Prob  & & Coeff & $\Delta$Prob & & Coeff & $\Delta$Prob & & Coeff & $\Delta$Prob & & Coeff & $\Delta$Prob & & Coeff & $\Delta$Prob  \\      \endfirsthead     \multicolumn{3}{c}%     {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\      &  & \multicolumn{6}{l}{Bottom tails} &  & & \multicolumn{6}{l}{Top tails} &      \\     \cmidrule{2-9} \cmidrule{11-18} % 2 orizonties grammes aristera kai deksia     \\     & \multicolumn{3}{l}{(1)}  & \multicolumn{3}{l}{(2)} & \multicolumn{3}{l}{(3)} & \multicolumn{3}{l}{(4)} & \multicolumn{3}{l}{(5)} & \multicolumn{3}{l}{(6)}       \\      \cmidrule{2-3} \cmidrule{5-6} \cmidrule{8-9} \cmidrule{11-12} \cmidrule{14-15} \cmidrule{17-18}% 2 orizonties grammes aristera kai deksia \\      & & & Coeff & $\Delta$Prob  &  Coeff & $\Delta$Prob &  Coeff & $\Delta$Prob &  Coeff & $\Delta$Prob &  Coeff & $\Delta$Prob &  Coeff & $\Delta$Prob  \\      \endhead     \hline \multicolumn{3}{|r|}{{Continued on next page}} \\ \hline     \endfoot     \hline \hline     \endlastfoot      \midrule     PIIGS \\     $\beta_{01}$(constant) & 100 & 0.8  &  &  0.021  & 0.018 & & 0.043 & 0.146 & & 0.074 &  0.427 & & 0.019 & 0.427 & & 0.019 & 0.427   \\           Log-likelihood     \\     $Pseudo-R^{2}$ \\ \\     Non-PIIGS \\     $\beta_{01}$(constant) & 100 & 0.8    & 0.021  & 0.018 &  0.043 & 0.146 &  0.074 &  0.427 &  0.019 & 0.427 & & 0.019 & 0.427   \\                \\     $Pseudo-R^{2}$ \\ \\     \end{longtable}     \end{landscape}      and it gets off the page all the time. Also, the first "\delta Prob" column on the left gets bigger than the rest all the time.. Can you please help me fitting this table to page width and also ensure that all columns have the same size? I am probably doing something very wrong! Thank you!


title: Margins- table how do i put the table inside the margins

text: This is my code, i don't know how to write a tabel on my own yet, so i used an online maker to do this, how do i make sure that the table won't go over my textwidth?               \begin{table}[h]     \begin{tabular}{cccl}     \hline                                               & \textbf{Fremstilling}                                                                                & \textbf{Brug}                                                                                & \multicolumn{1}{c}{\textbf{Bortskaffelse}}                                                                        \\ \hline     \multicolumn{1}{|c|}{\textbf{Materiale}}  & \multicolumn{1}{|c|}{Stål (9,95kg)}                                                                           & \multicolumn{1}{|c|}{Energiforbrug til mekanisme}                                                                                & \multicolumn{1}{|l|}{Energiforbrug til omsmeltning}                                                               \\ \hline     \multicolumn{1}{|c|}{\textbf{Energi}}     & \multicolumn{1}{|c|}{3133,16MJ}                                                                               & \multicolumn{1}{|c|}{\begin{tabular}[c]{@{}c@{}}Nok energi til at trække 26.2N hver\\   gang, at anordningen aktiveres.\end{tabular}} & \multicolumn{1}{|l|}{846,8MJ}                                                                                \\ \hline     \multicolumn{1}{|c|}{\textbf{Kemikalier}} & \multicolumn{1}{|c|}{-}                                                                                & \multicolumn{1}{|c|}{Eventuel smørelse}                                                                                & \multicolumn{1}{|l|}{-}                                                                                \\ \hline     \multicolumn{1}{|c|}{\textbf{Andet}}      & \multicolumn{1}{|c|}{\begin{tabular}[c]{@{}c@{}}Slibning, eventuel galvanisering\\   (rustfrit)\end{tabular}} & \multicolumn{1}{|c|}{Vedligeholdelse, udskiftning af pigge}                                                                           & \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}c@{}}Genanvendelse af stål (10MJ/kg til\\   omsmeltning)\end{tabular}} \\ \hline     \end{tabular}     \end{table}


title: Basic questions on producing a Beamer handout

text: I use beamer for my lectures and post the handout on the course website. I create the handout with pgfpages. Here MWE:               \documentclass[handout,compress,mathserif]{beamer}     \usepackage{pgfpages}     \pgfpagesuselayout{4 on 1}[border shrink=1mm,frame=true]     \pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke}}     \pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke}}     \pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke}}     \pgfpageslogicalpageoptions{4}{border code=\pgfusepath{stroke}}          \begin{document}          \begin{frame}{}     \end{frame}          \begin{frame}{}     \end{frame}          \begin{frame}{}     \end{frame}          \begin{frame}{}     \end{frame}          \end{document}      What I would like to do is make it easy for the students to read the slides, and I have some issues.   1. I cannot figure out how to number the frames properly! I often use plain frames and I cannot figure out how to number these. So there are no page numbers on my slides, and therefore they are missing from the handout too.   2. The frame has a border, which is visible on the PDF reader of TexShop and on (Mac) Preview, but on Adobe Reader it only shows when the file is zoomed out enough. Any idea of what's happening? If you have any recommendations for producing handouts, they are most welcome. I looked online extensively, and settle for what's shown in the example. Thank you very much for your help. Ery Arias-Castro (UCSD)


title: TeX distribution and TeX implementation

text: TeX distributions are the large collections of TeX-related software to be downloaded and installed. For example, Tex Live and MiKTeX. TeX implementations are for example > Web2c is the name of a TeX implementation, originally for Unix, but now also > running under DOS, Amiga, and other operating systems. **By TeX > implementation, we mean** all of the standard programs developed by the > Stanford TeX project directed by Donald E. Knuth: Metafont, DVItype, > GFtoDVI, BibTeX, Tangle, etc., as well as TeX itself. Other programs are > also included: DVIcopy, written by Peter Breitenlohner, MetaPost and its > utilities (derived from Metafont), by John Hobby, etc.   1. So I wonder what differences and relations are between Tex distributions and Tex implementations?   2. If Web2c is not a TeX distribution, then why?   3. What else besides Web2c are also examples of TeX implementations? Thanks!


title: Overall formatting in LyX

text: I could not find a previous question that dealt with this topic, and much of the guidance is one-off. I am creating a paper and I want the text to be double spaced but not section headings, the title, tables, nor the references. Is there is a global preamble item that deals with this? I am assuming that this is a popular request. Additionally, the double spacing in LyX seems small, specially when compared to MS Word. Is the latter wrong, if not is there a way to fix this in LyX, without affecting non-body text items? The only thing that helps with the section spacing is:               \usepackage{titlesec}          \titleformat*{\section}{\normalfont\Large\bfseries\singlespacing}     \titleformat*{\subsection}{\normalfont\large\bfseries\singlespacing}     \titleformat*{\subsubsection}{\normalfont\normalsize\bfseries\singlespacing}      I find though that this fixes one problem, the title is now single spaces, but adds extra white space directly above the section headings.


title: Derivative at a point

text: When you write the differential at a point, you write f`(x)|_(x = k). What is the correct LaTeX command for the "|" symbol? Is it just a pipe, or is there a separate mathematical symbol for it? My LaTeX for the above is:               \[f^\prime(x)|_{x = 1} = 5\]      Is this formally correct?


title: Automat within Record

text: Could somebody help me, please? I'd like to define a new shape with parameters (input/ouput variables and a automat). It should look like:               INPUT                                          OUTPUT     +------+--------------------------------------+------+     |      |                                      |      |     |  v1  |                                      |      |     |      |                                      |      |     +------+             AUTOMAT                  |  o1  |     |      |                                      |      |     |  v2  |                                      |      |     |      |                                      |      |     +------+--------------------------------------+------+      I'm not skilled enought to define such a complex object. I appreciate any help.


title: Alignment problem or the height of one text line for \footnotesize text

text: I want to align the arrows so that it goes directly through the "x". How can I do this? It works if I use \normalsize font. The background is that I want to separate my Tikz document in text rows where I can position objects easily by a multiple of e.g. \baselineskip (\baselineskip seems to be wrong. It only works for \normalsize font). This is a follow-up question from https://tex.stackexchange.com/questions/152950/size-of-baselineskip-for-if- font-size-is-footnotesize. I am not sure but I think I need "node font=\footnotesize" which is only available in Tikz 3.0.               \documentclass{article}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{tikz}     \usetikzlibrary{positioning}          \begin{document}          \begin{tikzpicture}[every node/.style={node font=\footnotesize, font=\footnotesize}]         \node[anchor=north west, inner sep=0, rectangle, red, draw,                text width=0.5cm, align=left](A) {%               \strut x\\               x\strut         };         \draw[->] (0.1cm, -0.5\baselineskip) -- (1cm, -0.5\baselineskip);         \draw[->] (0.1cm, -\baselineskip-0.5\baselineskip) -- (1cm, -\baselineskip-0.5\baselineskip);     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/O0KCB.png) It should looks likes this (you get this result if "every node/.style={node font=\footnotesize, font=\footnotesize}" is removed): ![enter image description here](http://i.stack.imgur.com/lG6ZW.png)


title: two t characters next to each other form one tt glyph

text: I am using xelatex and linux libertine font. When I write in my text something that contains two `t` characters next to each other, such as "rotten", it changes these two `t`s into one `tt` character. It displays fine in PDF, but it is impossible to copy that or search for that in pdf. How can I make it just simple two `t` characters next to each other?


title: Plotting Trigonometric Functions

text: I was trying to plot graph of sine functions. I found PSTricks and tried using it, but I have no idea whether there are more standard / more appropriate packages to do this. Here is what I did (which was miserable):               \psset{unit=1cm}     \begin{center}     \begin{pspicture}(-3.5,-2)(6.5,2)         \psaxes[dx=\pstPI4,trigLabelBase=2,trigLabels]{->}(0,0)(-3.2,-1.25)(6.5,1.25)         \psplot[xunit=0.5cm,linecolor=red,linewidth=1.5pt,plotpoints = 100]{-\psPiTwo}{\psPiFour}{x RadToDeg sin}     \end{pspicture}     \end{center}      Would any of you mind giving me some suggestions on how to make this better? I actually don't really understand why I need to put `{-\psPiTwo}{\psPiFour}` in the part where it is, but I tried changing that to some other things and they do not seem to work well. Thanks!


title: Generate labels using xstring and \Makelowercase

text: I am trying to write a command that allows me to reference a subsection with a generated label. The idea is that when I declare a step `\step{Long Name With Many Uppercase Letters}`, the generated label will be \label{step:long_name_with_many_uppercase_letters}. I already found Generate labels based on macro argument, but I fear the answer based on using `\@firstofone` does not work for my case. My current approach is the following:               \makeatletter     % Step command     \newcounter{step}[section]     \setcounter{step}{0}          \newcommand{\step}[1]{%       \subsection{#1}        \refstepcounter{step}        \label{step:\MakeLowercase{\StrSubstitute[0]{#1}{ }{\_}}}     }     \makeatother      Unfortunately, using the label command with other command inside gives me the following errors:               Missing \endcsname inserted \step{First Step}     TeX capacity exceeded, sorry [input stack size=5000] \step{First Step}      If I remove the `\label` command, it works (but of course gives me warnings about undefined references). A minimal example looks like this:               \documentclass{scrbook}          \usepackage{xstring}          \makeatletter     % Step command     \newcounter{stepctr}[section]     \setcounter{stepctr}{0}          \newcommand{\step}[1]{%       \subsection{#1}        \refstepcounter{stepctr}        \label{step:\MakeLowercase{\StrSubstitute[0]{#1}{ }{\_}}}     }     \makeatother          \begin{document}          \chapter{My only chapter}          \section{A section where I reference steps}          I'd like to reference step number \ref{step:first_step} and \ref{step:third_step} here.          \section{A section where I define steps}          \step{First Step}          Foo.          \step{Second Step}          Bar.          \step{Third Step}          Whatever.           \end{document}


title: Method for aligning nodes of different sizes at specified sections

text: I'm trying to make a tikz diagram in which I can place nodes with long pieces of text, one above the other, such that I can specify sections which are to be centered (things outside these sections are then dragged along) with a vertical arrow connecting the centers of the centered sections. That's kind of a jumble of words, so to give an example, I'd like something like this:               \begin{tikzpicture}     \node (a) at (0,1) {really long stuff \centerthis{blahh} other stuff};     \node (b) at (0,0) {more stuff \centerthis{blah blah blah} possibly other stuff};     \draw[->] (a) -- (b);     \end{tikzpicture}      to automatically produce this:                           really long stuff (blahh) other stuff                                      |                                      |                                      v                    more stuff (blah blah blah) possibly other stuff      so that the center of `(blahh)` is at (0,1) and the center of `(blah blah blah)` is at (0,0). The main things I'm looking for in a solution are that   * I want to avoid any manual adjustment of distances or sizes.   * I want everything to appear on the same baseline. For example, I tried making 6 nodes, for upper and lower left, middle, and right, and when one of them had a descender and the others did not, it looked off. Perhaps there's a way around this? Apologies for not having more to offer, but I'm simply stuck on this. Of course, the hypothetical code I used above is just an idea, if you see another way of setting up a solution (as I'm sure there are many), please post it as well.


title: align margin note to vertical center of text block or environment, with optional bar

text: Here is what I wish to achieve:   * section title as usual   * (optional) subsection in left-margin, aligned to top of its contents   * group of text/theorem/etc blocks within subsection   * margin note or label aligned to vertical center of individual blocks   * vertical rule along block Ideally, in case of page break in a block, the margin note would be vertically positioned where it would be if the page were not broken, or else if the block is split equally across pages, the first line after the break In reality the blocks are actually sub-proofs of a larger proof I would be writing for a school assignment. Perhaps this could further be implemented as some kind of theorem environment with labels in the margins? Here's my MWE:               \documentclass{article}     \usepackage[letterpaper,hmargin=1.5in,vmargin=0.8in,nohead,nofoot,showframe]{geometry}     \usepackage[small]{titlesec}     \titleformat{\subsection}[leftmargin]{\raggedleft\bfseries}{}{0pt}{}     \titlespacing*{\subsection}{1.5in}{*2.5}{*2}     \usepackage{lipsum}     \usepackage{mdframed}     \newmdenv[topline=false, leftline=false, bottomline=false,%       linewidth=1pt, innerleftmargin=0pt, rightmargin=-1pt,%       innerrightmargin=5pt, skipabove=8pt, skipbelow=8pt]{rightbar}          \begin{document}         \section*{A1}         \subsection*{not good$\uparrow \downarrow$}         \begin{minipage}[c]{\linewidth}           \begin{rightbar}             \lipsum[1]           \end{rightbar}         \end{minipage}\marginpar{good}              \vspace{2ex}             \noindent         \begin{minipage}[c]{\linewidth}           \begin{rightbar}             \lipsum[1]           \end{rightbar}         \end{minipage}\marginpar{good}              \subsection*{not good $\rightarrow$}         \begin{minipage}[t]{\linewidth}           \begin{rightbar}             \lipsum[1]           \end{rightbar}         \end{minipage}\marginpar{$\downarrow$not good}              \subsection*{good}             \lipsum[1]             \marginpar{$\uparrow$ not good}              \vspace{3ex}     \end{document}      here's what that looks like: ![non-examples](http://i.stack.imgur.com/CEDg0.png) here are some possibly related questions:   * Vertical line next to a block, across page breaks   * Changing minipage vertical alignment in mid-line?   * Brace and text in side margin


title: Graphics preview in Lyx gives `Error loading file into memory`

text: When I add a pdf figure into lyx the preview works only for the current session. When I restart Lyx I get an error: `Error loading file into memory`. This only seems to occur with .pdf files (i.e. not with .svg or .png) and has no effect on the final rendered PDF document. I've seen references to this bug in several places online but in those case the issue was that previews were never generated. Also, I have pdf2ps and pdftoeps installed so this shouldn't be the problem either. Running Kubuntu 12.04; Lyx 2.04


title: split a \xrightarrow into two lines

text: I'm using the command `\xrightarrow{}[]` in a two column document. The problem is that the string above the arrow is too long and the arrow ends outside the column. Is there a way to "split" the arrow over two different lines?


title: Customize citation style to include notes field

text: I would like to include a table in my document that pulls in all the notes from the `bibitem`s in my bibliography. So each row in the table would have a column for the citation `\cite{myitem}` and for the notes `\citenotes{myitem}`. How do I define a `citenotes` command that would only pull in the `notes` field for that `bibitem`?


title: Force newline, but collapse vertical space

text: I'm trying to create a block of subfigures with no space between them, ![result](http://i.stack.imgur.com/sgKNf.png) The above is the desired result, but the way I did it feels hacky. I used a newline forcer followed by negative vertical space               \\[-28pt]      Is there a better way to do this? (collapse the vertical space that appears by default between lines 123 and 456 in the figure?) Source:               \begin{centering}     \begin{figure}     \begin{centering}       \begin{subfigure}[b]{0.33\textwidth}         \caption{1}         \includegraphics[width=\textwidth]{1.png}         \label{fig1}       \end{subfigure}%       \begin{subfigure}[b]{0.33\textwidth}         \caption{2}         \includegraphics[width=\textwidth]{2.png}         \label{fig2}       \end{subfigure}%       \begin{subfigure}[b]{0.33\textwidth}         \caption{3}         \includegraphics[width=\textwidth]{3.png}         \label{fig3}       \end{subfigure}\\[-28pt]       \begin{subfigure}[b]{0.33\textwidth}         \includegraphics[width=\textwidth]{4.png}         \caption{4}         \label{fig4}       \end{subfigure}%       \begin{subfigure}[b]{0.33\textwidth}         \includegraphics[width=\textwidth]{5.png}         \caption{5}         \label{fig5}       \end{subfigure}%       \begin{subfigure}[b]{0.33\textwidth}         \includegraphics[width=\textwidth]{6.png}         \caption{6}         \label{fig6}       \end{subfigure}%       \caption{images}\label{imagetable}     \end{centering}     \end{figure}     \end{centering}


title: Caption does not appear under a figure

text: I need to put into my thesis (portrait format) a figure in landscape format. I tried using `pdflscape` environment but it didn't work for me. Now I am trying to use `sidewaysfigure` environment. The figure looks good ![Scheme](http://i.stack.imgur.com/bK58u.jpg) but there is no caption under it. Where is my mistake? And is there any other way to put my figure in landscape format? My code is:               \documentclass[11pt, a4paper, oneside]{Thesis}          \usepackage{wrapfig}     \usepackage{pdflscape}     \usepackage{rotating}     \usepackage{epstopdf}          \begin{sidewaysfigure}     \centering        \includegraphics{d:/Thesis/Thesis_InLaTeX/thesis_1/Figures/Scheme1.pdf}     \caption{Scheme of Tengiz--Koargalzhyn depression.}        \label{fig:scheme1}     \end{sidewaysfigure}      Update: new figure ![Scheme1](http://i.stack.imgur.com/Y5OMd.jpg)


title: Iterate through list to generate references

text: I would like to create a new command, in which I pass a comma-separated list, which then will be iterated to create refs. Example:               \iteratecommand{ref1, ref2, ref3}      And within the iteratecommand it should go through the list and create \ref{ref1}, \ref{ref2}, \ref{ref3}. EDIT: I am very sorry. I was in a rush and was too vague with my explanation. What I want to achieve is to have a macro that reduces my typing. Currently I have this:               \begin{description}         \item[Static Title] \hfill \\         \ref{ref1}, \ref{ref2}     \end{description}      I would like to have a macro in which I only pass the refs and it will output the description with the references. So instead of having:               \documentclass{article}     \begin{document}     \begin{description}         \item[Static Title] \hfill \\         \ref{ref1}, \ref{ref2}     \end{description}          \begin{description}         \item[Static Title] \hfill \\         \ref{ref1}, \ref{ref2}     \end{description}          \begin{description}         \item[Static Title] \hfill \\         \ref{ref1}, \ref{ref2}     \end{description}     \end{document}      I would like to have something like this:               \documentclass{article}     \begin{document}     \reff{ref1, ref2}          \reff{ref1, ref2}          \reff{ref1, ref2}     \end{description}     \end{document}      I hope it's clearer now. It just came to me that I probably could use one of the answers given and put it inside another macro that handles the description part?


title: Separately annotate parts of a fraction

text: I'm trying to create the following image in TikZ as part of a handout explaining blood pressure to patients in a clinic. I am unsure how to annotate a fraction in tikz. I know of the example using Beamer arrows to explain terms. The example for Carl's students doesn't apply because it only colors parts of the terms of the equation. ![enter image description here](http://i.stack.imgur.com/EKC9s.png) I've come to TikZ after using a simple array (code below), which won't look as nice.               $\begin{array}{cc}       \underline{120} & \textrm{La cifra superior mide la fuerza de la sangre cuando se contrae el corazon}\\       80 & \textrm{La cifra inferior mide la fuerza de la sangre cuando el corazon       relaje}        \end{array}$


title: How to sanely format conditionals in clrscode package?

text: `clrscode` can produce some really nice-looking algorithm texts, but if you have nested conditionals, things start to look ugly. `clrscode` has the peculiar preference that the `\Then` keyword at the end of an `\If` statement should go on a second line, indented. Not only is this not very compact (needed for a paper in two-column format!), it runs counter to the convention in most mainstream programming languages. If you try to place the `\Then` at the end of the same line that the `\If` is on, the package often overprints the `\Then` on top of the conditional expression! To be clear, you need to do this               \li \If $a = b$     \li   \Then foo      but I would really like to do               \li \If $a = b$ \Then foo      or               \li \If $a = b$ \Then     \li   foo      Furthermore, I would like to be able to line up `\Else` statements with the preceding `\If` (not the preceding `\Then`!), and this does not seem to be possible, either. Any pointers?