title: How to set a certain color (other than white) to margin areas?

text: I want to set a certain color to the margin areas (which is the region outside the content box of `\textwidth` by `\textheight` but inside the paper of course :-) ). How to change this from within the latex document as opposed to change the geometry.sty?


title: How to setup a (La)TeX-enabled server to allow visitors to submit input file and download the rendered output?

text: I am very interested to setup my own server like dev.baywifi.com or live.contextgarden.net. I am using IIS web server under Windows Server 2008 R2. Could you give me a rough idea how to setup the server and make sure it can serve multi users in parallel? * * * Objectives: To create a mathematics forum that allows users to submit PSTricks codes. For LaTeX codes I will use MathJax.


title: Good monospace font for code in LaTeX?

text: I'm currently working on my dissertation and am using Palatino for text with the Euler font for mathematics. As part of my work I'll be presenting quite a few code examples, and was wondering if someone could suggest a good monospace font to go with them. As an alternative I was thinking of using the Concrete Roman and Euler font package (ala Knuth's Concrete Mathematics).


title: Changing footnote label font in KOMA classes

text: How can I change the font used for the footnote marker in the body of the text, especially in the KOMA classes? KOMA-Script lets me change the footnote font label in the footnote, e.g.               \addtokomafont{footnotelabel}{\sffamily}      but I can't see how to change the label in the text. A reason for my asking is that I have some fonts that don't have the full complement of characters in `\textsuperscript`, so only some footnote labels in the text appear as they should.


title: Draw box around plot or fill plot area in tikz/pgfplots

text: I want to create a plot in `tikz`/`pgfplots` with a number of `\addplot table` commands. Each of the tables is the result of a simulation. I need to add a box around each simulation's result or fill the area covered by the plot. How can I do that? I can not use the start and end coordinates of the plot (for fitting a node around them) because the start and end points can be anywhere within the area covered by the result. Here is an mwe that illustrates the kind of plot I have:               \documentclass{standalone}     \usepackage{tikz,pgfplots}          \begin{document}         \begin{tikzpicture}             \begin{axis}                 \addplot coordinates{                     (0,0)                     (2,1)                     (1,1)                     (2,2)                     (0,2)                 };                 \addplot coordinates{                     (3,3)                     (5,4)                     (4,4)                     (5,5)                     (3,5)                 };             \end{axis}         \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/GCa6u.png) Now I need a box around each of the plots (or a filled background). Again, using a node to fit start and end of the plots won't work because start and end don't define a rectangle that encloses the plot. The plots won't be so similar to each other with real world data.


title: angled lines of unkown length in TikZ

text: I am trying to create angled lines from a point to specific border. Here is a minimal example:               \documentclass[margin=2mm]{standalone}      \usepackage{tikz}     \begin{document}     \begin{tikzpicture}         \coordinate (A) at (0, 0);         \coordinate (B) at (5, 0);         \coordinate (C) at (5, -5);         \coordinate (D) at (1, -4);         \clip (A) rectangle (C);          \draw (A) -- (B) -- (C);         \foreach \a in {10,30,...,70}{             \draw (D) -- +(\a:3);         }     \end{tikzpicture}     \end{document}      How do I set the length of these lines? 3 is to short. Setting the value to 10 solves the problem. However, resizing A, B and C gives the same problem. Is it possible to draw the lines until they hit a border? Or can I calculate a length in TikZ? I only know the calculation of points, but here I need a length.


title: But why are the two sets of absolute parentheses different sizes?

text: Silly question maybe - but why are the two sets of absolute different sizes? Is there an easy way to set the size locally - or globally?               \documentclass{article}     \usepackage{amsmath}     \newcommand{\vect}[1]{\mathbf{\underline{#1}}}          \begin{document}          $     I (\theta, \varphi) =     \left |     \vect{E}_{dir}^p(\theta, \varphi, r)_{\infty}     +     \vect{E}_{ref}^p(\theta, \varphi, r)_{\infty}     \right |^2     +     \left |     \vect{E}_{dir}^s(\theta, \varphi, r)_{\infty}     +     \vect{E}_{dir}^s(\theta, \varphi, r)_{\infty}     \right |^2     $          \end{document}


title: too much space between item of enumerate

text: I am using the package enumerate and my problem is when I look into the pdf, there is too much space between the items. This is my code:               \textbf{Analyse}:     \begin{enumerate}     \item \underline{le module du gradient}: le module du gradient etc...     \item \underline{l'orientation du gradient}: nous avons des valeurs bleus etc...     \item \underline{descripteur SIFT}: On voit 4 grand pics  etc...     \end{enumerate}      And this is the image of the pdf: ![enter image description here](http://i.stack.imgur.com/HmaHW.jpg) I don't understand why I have so much space.


title: Command for formatting only first level of nested subscripts?

text: I'd like to create a command which only targets the first "level" of the indexes. I'll illustrate with some examples, using `\qq` as the command in the first line, and the "real" LaTeX code on the line below:               d\qq{SA}     d_{\mathrm{SA}}          d\qq{SA_j}     d_{\mathrm{SA_{\mathit{j}}}}          d\qq{S_{j,k} A_j}     d_{\mathrm{S_{\mathit{j,k}} A_{\mathit{j}}}}          d\qq{S_{j,k} A_{j,k}}     d_{\mathrm{S_{\mathit{j,k}} A_{\mathit{j,k}}}}      The compiled code should look like this: ![picture](http://i.stack.imgur.com/Nfhc1.png) I have absolutely no idea on how to de this, or if it can be done just using `\newcommand`. Please help, doing this manually drives me nuts :)


title: Why does \text only affect next charater, but \cal affects all that follow

text: I am sure this is indicative of a more general idea, but I noticed that if I put in                $$\text hello$$      $$\text {hello}$$           $$\cal OU$$      $$\cal {OU}$$      to my tex and compile I get the following output ![enter image description here](http://i.stack.imgur.com/Vfm7Y.png) Clearly in the first case the \text command has only affected the first character unless braces are used, whereas in the other case all charcters are affected. > Is there a reason as to why these behave differently? Is there a general > rule as to which commands will act which way? Thanks for any help in advance. Also, I am not sure which tag to use - please do add anything relevant.


title: phantom wrapper of a word around a shorter one

text: It would be very handy for me if I could write something like:               \phantomwrapper{long word or text that fits in one line}{shorter text}      and the phantomwrapper would create just the amount of whitespace around its second argument so that result needs as much horizontal space as its first argument. An example application are tikz nodes that I want to draw boxes around with fit and I want to keep all boxes the same size.


title: How to number in a custom way

text: I am writing a latex file (format : book) and would like the subsections in the first chapter/section to be labeled as S.1, S.2 , S.3 etc. I tried to find how to do this on the net but could not. Please help.


title: pdflatex: How to automatically quit on compile error?

text: See also this question on Reddit. I want to automate running `pdflatex` over and over with `make` and `guard`. However, when `pdflatex` encounters a syntax error, it hangs, preventing `guard` from being able to run it again. Is there a command line flag, environment variable, or shell wrapper I can use to force `pdflatex` to quit on error rather than wait for more input?


title: Trying to use gnuplot to plot a simple graph with tex

text: I'm following this link word by word, using the epslatex terminal way: How can add some latex eq or symbol in gnuplot? When I open up texworks, and run               \documentclass{article}     \usepackage{graphicx}     \begin{document}     \input{plot.tex}     \end{document}      I'm presented with               "! LaTeX Error: File `plot' not found.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.96     \put(0,0){\includegraphics{plot}}                                               %     ? H     I could not locate the file with any of these extensions:     .png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2     Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit."      So basically it doesn't actually look for file extensions .tex? What am I missing? I have saved the .tex file in the same place as plot.tex and plot.eps. I'm fairly new to LaTex and even newer to gnuplot, so apologies if this is obvious.


title: How can I install ieeetrans.cls?

text: I need to install the `IEEEtrans.cls` for use in LyX (on a Mac) but I don't understand the instructions provided by the downloaded package. How can I install that class?


title: How to go to a particular line in TeXShop?

text: I want to edit the output PDF file, but it is difficult to find the correct place in the source editor. What is the keyboard shortcut to jump from a place in the output PDF to the corresponding place in the source of the document? I am using the editor TeXShop with Mac OS X.


title: Problems with fonts

text: I'm an average user of LaTeX, but not proficiency. I'm trying to learn from book templates I've found on the web, but I get this error message:               Trying to make PK font ccicons at 1493 DPI...     Running miktex-makemf.exe...     miktex-makemf: The ccicons source file could not be found.     Running ttf2pk.exe...     miktex-makemf: PK font ccicons could not be created.          LaTeX Font Warning: Some font shapes were not available, defaults substituted.          !pdfTeX error: pdflatex.exe (file ccicons): Font ccicons at 1493 not found      ==> Fatal error occurred, no output PDF file produced!      I'm using MiKTeX (over Windows 7), and according to the MiKTeX package manager the "ccicons" package is already installed. Could you please help me solve this problem?


title: export from lyx the right LaTeX class declaration

text: I am using svjour3 class from Springer, but for convenience I decided to use the Lyx templates. Everything went smoothly and I managed to get all the layouts and formatting as required. However, I need to submit for publication in TeX format. When I export LaTex(plain) I get               \documentclass[12pt,english]{svjour3}      The expected output is               \documentclass[smallextended]{svjour3}       Obviously, I can change that manually after export, but I am wondering if there is anything that I can do at the lyx configuration level so that it exports directly in the expected form?


title: Left and right subscripts in multline environment

text: I am using               \documentclass[12pt]{article}     \usepackage{amsmath}     \begin{document}     \begin{multline}     \big_{1}[_{2}(...)_{2}\big]_{1}.     \end{multline}     \end{document}      The lower suffix works only for right and it does not work for left. Is there anyway so that I can fix this problem.


title: Beamer slides, tufte-handout and tufte-book class in one main

text: I want one main file that contains these three document classes. The purpose is for my thesis defence I must give a seminar (Beamer slides, tufte-handout) and turn in a written document (tufte-book). I would like to integrate the content for all three into one mega file. If this is not possible with these classes does anyone know of a way to achieve the desired result (not duplicating content in multiple files) some other way? Pseudocode example:               \documentclass{...}     \usetheme{...}     \usepackage{...}          \begin{document}          \section{Section One}          \begin{frame}        \begin{itemize}     \item This frame does not appear in the tufte-handout or tufte-book but it does appear in the beamer slides.     \item second item     \item third item.     \end{itemize}     \end{frame}          This text has no argument/option/tag it appears in all three document classes.          \option1 This text (with some macro/argument/option/tag) appears in 1 out of 3 documents.          \option2 This text (with some other option statement) appears in 2 out of 3 documents.          \note This text appears in none of the documents it is a note.          \end{document}


title: Determining the math class of a non-keyboard symbol

text: What is the "right" way of determining the math class (e.g. ordinary/0, relation/3, closing/5, etc.) of a non-keyboard symbol? Something like `\oplus` is easy enough to guess, but I wasn't immediately sure about `\upuparrows` (![enter image description here](http://i.stack.imgur.com/Xoa6A.png)); on the one hand, my impression is that arrow symbols are generally treated as relations, while I know that Knuth's up-arrow notation uses it to denote a binary operation. I tried writing               \documentclass{article}     \usepackage{amssymb}     \begin{document}     \the\mathcode\upuparrows     \end{document}      but this produced an error:               Bad character code (13332) \the\mathcode\upuparrows      Note that `13332` _is the right number_ : writing               \def\test{\mathchar 13332 }     $\test$      does not produce an error, and gives the double-up-arrow symbol. And `13332` is equal to the hex number `3414`, which starts with 3, correctly indicating that it is a relation. How did I end up figuring out that is correct? Because I ran the following extremely silly code:               \documentclass{article}     \usepackage{amssymb}     \begin{document}          \newlength{\test}     \setbox0=\hbox{$a\mathord{\upuparrows}b$}     \setbox1=\hbox{$a\mathop{\upuparrows}b$}     \setbox2=\hbox{$a\mathbin{\upuparrows}b$}     \setbox3=\hbox{$a\mathrel{\upuparrows}b$}     \setbox4=\hbox{$a\mathopen{\upuparrows}b$}     \setbox5=\hbox{$a\mathclose{\upuparrows}b$}     \setbox6=\hbox{$a\mathpunct{\upuparrows}b$}     \setbox7=\hbox{$a\upuparrows b$}          \begin{tabular}{ll}     mathord    &  \setlength{\test}{\wd0}  \the\test\\     mathop     &  \setlength{\test}{\wd1}  \the\test\\     mathbin    &  \setlength{\test}{\wd2}  \the\test\\     mathrel    &  \setlength{\test}{\wd3}  \the\test\\     mathopen   &  \setlength{\test}{\wd4}  \the\test\\     mathclose  &  \setlength{\test}{\wd5}  \the\test\\     mathpunct  &  \setlength{\test}{\wd6}  \the\test\\[0.1in]     ACTUAL     &  \setlength{\test}{\wd7}  \the\test\\     \end{tabular}          \end{document}      producing: ![enter image description here](http://i.stack.imgur.com/Odnt1.png) Obviously this is not the right way of going about it either; besides the silliness, there is the issue that several math classes can have the same length. Now in contrast, writing `\the\mathcode`<` worked fine; it produced `12604` (which is `313C` in hexadecimal, which has leading digit 3 = mathrel, as it should). I did try adding the backtick in front of `\upuparrows`, but this just produced the errors               Improper alphabetic constant \the\mathcode`\upuparrows     Missing $ inserted \the\mathcode`\upuparrows     Missing $ inserted      _(Incidentally, what is the backtick doing exactly? I am reading the TeXbook and the examples given there use it, e.g.![enter image description here](http://i.stack.imgur.com/DRqkD.png) but I couldn't find an explanation.)_ I also tried the approach that seemed to be suggested by this TeX.SE thread:               \documentclass{article}     \usepackage{amssymb}     \begin{document}     \the\mathcode\string\upuparrows     \end{document}      but that produced               Missing number, treated as zero \the\mathcode\string\upuparrows


title: Overlaying or nesting graphs in tikzpicture with different axis scales

text: I need overlay or nest a figure in a graph. I try with `\pic`, but the results aren't good for figure scale, according to graph scale. I try also to define the figure in nodes, to place it in the graph, but I can't.               \documentclass[11pt]{report}     \usepackage[T1]{fontenc}     \usepackage{titlesec}     \usepackage{calc}     \usepackage{lmodern}     \usepackage{lipsum}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}          \tikzset{m2/.pic={     \draw (0,0)--(0,.4)--(1.575,.4)--(1.575,7.8)--(0,7.8)--(0,8.2)--(3.4,8.2)--(3.4,7.8)--(1.825,7.8)--(1.825,.4)--(3.4,.4)--(3.4,0)--cycle;     }}          \begin{figure}[!hbp]     \centering     \begin{minipage}[c]{0.4\linewidth}     \centering     \begin{tikzpicture}     \begin{axis}[ymin=0,xmin=-4000,x=.0035mm,y=1cm, axis x line=bottom,axis y line=left,clip=false]         \addplot[mark=none,red,very thick] coordinates{(406,8)(406,7)(823,7)(823,6)(1131,6)(1131,5)(1384,5)(1384,4)(1581,4)(1581,3)(1751,3)(1751,2)(1856,2)(1856,1)(1913,1)(1913,0)};         \addplot[mark=none,red,very thick] coordinates{(-406,8)(-406,7)(-823,7)(-823,6)(-1131,6)(-1131,5)(-1384,5)(-1384,4)(-1581,4)(-1581,3)(-1751,3)(-1751,2)(-1856,2)(-1856,1)(-1913,1)(-1913,0)};         \addplot[mark=none] coordinates{(0,0)(0,8)};         \end{axis}         \end{tikzpicture}     \end{minipage}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{minipage}[c]{0.4\linewidth}     \centering     \begin{tikzpicture}     \begin{axis}[ymin=0,xmax=5000,x=.0035mm,y=1cm, axis x line=bottom,hide y axis,clip=false]         \addplot[mark=none,red,very thick] coordinates{(822,8)(822,7)(1444,7)(1444,6)(1898,6)(1898,5)(2268,5)(2268,4)(2560,4)(2560,3)(2735,3)(2735,2)(2859,2)(2859,1)(2610,1)(2610,0)};         \addplot[mark=none,red,very thick] coordinates{(-822,8)(-822,7)(-1444,7)(-1444,6)(-1898,6)(-1898,5)(-2268,5)(-2268,4)(-2560,4)(-2560,3)(-2735,3)(-2735,2)(-2859,2)(-2859,1)(-2610,1)(-2610,0)};         \node at (axis cs: 2610,0.5) [font=\scriptsize, right] {$\sigma 2$};         \addplot[mark=none] coordinates{(0,0)(0,8)};         \pic [scale=50] at (500,400) {m2};         \end{axis}         \end{tikzpicture}     \end{minipage}     \end{figure}          \end{document}


title: Using mdframed style within \declaretheoremstyle to change title

text: I am using `thmtools` to create an example environment using `\declaretheoremstyle` and `\declaretheorem`. I am also modifying the style using the `mdframed` key, to create a frame, shade the background of the example environment, and give it rounded corners. I also want to format the title text, i.e., `Example 1` and put a coloured line underneath the title before the example, but I can't figure out how to do this. I can see that it can be done using \newmdenv to create the example environment, but I want to stick with `\declaretheoremstyle` and `\declaretheorem`, since I am using it for all my other environments. Can anyone assist?               \documentclass[12pt,a4paper]{report}          \usepackage[framemethod=TikZ]{mdframed}     \usepackage{amsthm}     \usepackage{thmtools}          % example style     \declaretheoremstyle[         headfont=\bfseries,          notebraces={[}{]},         bodyfont=\normalfont\itshape,         headpunct={},         postheadspace=\newline,         spacebelow=\parsep,         spaceabove=\parsep,         mdframed={             backgroundcolor=red!20,                  linecolor=red!30,                  innertopmargin=6pt,                 roundcorner=5pt,                  innerbottommargin=6pt,                  skipbelow=\parsep,                  skipbelow=\parsep }      ]{myexamplestyle}          % example environment - thmtools     \declaretheorem[         style=myexamplestyle,         name=Example,         numberwithin=chapter     ]{example}          \begin{document}     \begin{example}[Example 1]     something     \end{example}     \end{document}


title: How to change part and chapter pages on KOMA-Script?

text: In KOMA-Script classes, how can I change the appeareance (font size, color, arrangment, content, etc.) of the page created by `\part` an `\chapter`? The pagestyle can be changed easily with KOMA-Script commands, but this only allows changes to the header and footer but not to the actual content, as far as I understood the `scrguide`. I tried with `titlesec`, but this has some drawbacks, because it does not support KOMA's `\setpartpreamble` and `\setchapterpreamble`, which I'd really like to use.


title: Citing (author, journalabbr., year) needed

text: I am looking for a certain kind of citing in my thesis. Unfortunality there is no option in biblatex for my needs. Is the best thing to declare an new "short journal"-field in the bib file or does LaTex recognice the initials of the Journal? I added a full minimal example to show what i am actually working wiht:                \begin{filecontents}{min.bib}         @article{boisson2003unexpected,       title={Unexpected protein families including cell defense components feature in the N-myristoylome of a higher eukaryote},       author={Boisson, B. and Giglione, Carmela and Meinnel, Thierry},       journal={Journal of Biological Chemistry},       year={2003},       publisher={ASBMB}     }     \end{filecontents}                              \documentclass[fontsize=11pt, paper=a4, ngerman, DIV=calc]{scrartcl}     \usepackage[scaled]{helvet}     \renewcommand*\familydefault{\sfdefault}     \usepackage{fixltx2e}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{babel}     \usepackage[babel, german=quotes]{csquotes}     \usepackage[%style=authoryear-comp,sortcites=true,sorting=nyt,isbn=false,natbib=true, citestyle=authoryear,bibstyle=authoryear,backend=biber,maxnames=1,maxcitenames=1]     {biblatex}     \addbibresource{min.bib}     \DefineBibliographyStrings{ngerman}{        andothers = {{et\,al\adddot}}            }                              \begin{document}                              \citep{boisson2003unexpected}     \[1em]     How it should look like:     \[1em]     (Boisson et al., JBC, 2003)                              \printbibliography                     \end{document}<code>


title: Colon problems in BibLaTeX citation style

text: I have to use the bibliography entry for the first citation of a source. This bibliography string contains several colons which are unfortunately not visible in the footnote. The following minimal example is supposed to be a showcase for that problem.               \documentclass{article}     \usepackage[german]{babel}     \usepackage{csquotes}          % Bibliography database     \begin{filecontents}{\jobname.bib}       @book{Knu86,         author = {Knuth, Donald E.},         year = {1986},         title = {The \TeX book},         publisher = {publisher},         location = {location},       }     \end{filecontents}          % Biblography style     \begin{filecontents}{\jobname.bbx}         \ProvidesFile{\jobname.bbx}         \RequireBibliographyStyle{standard}              \renewcommand*{\newblockpunct}{\addcolon\space}              \DeclareBibliographyDriver{book}{         \usebibmacro{bibindex}%         \usebibmacro{author}         \addspace         \printfield[parens]{year}         \newblock         \printfield{title}         \newunit         \printlist{location}         \newblock         \printlist{publisher}         }         \endinput     \end{filecontents}          % Citation style     \begin{filecontents}{\jobname.cbx}         \ProvidesFile{\jobname.cbx}         \RequireCitationStyle{verbose}              \renewbibmacro*{cite:full}{%         \usebibmacro{cite:full:citepages}%         \printtext[bibhypertarget]             { \usedriver{}{\thefield{entrytype}}}         }         \endinput     \end{filecontents}          \usepackage[backend=bibtex8,citestyle=\jobname,bibstyle=\jobname]{biblatex}     \ExecuteBibliographyOptions{citepages=omit,citetracker=true,labelyear}     \bibliography{\jobname}               \begin{document}     \null\vfill\noindent     Filler text \footcite[85]{Knu86}.     \printbibliography     \end{document}      Why is the bibliography not fully copied? A first guess of mine would be that the `\newblockpunct` command is executed correctly only in the bibliography style. But how do I transform it to the citation style?


title: List of Acronyms is not displayed

text: \documentclass{report}     \usepackage[acronym]{glossaries}     \makeglossary     \newacronym{svm}{SVM}{Support Vector Machine}     \newacronym{wasn}{WASN}{Wireless Sensor Networks}     \begin{document}     \printglossaries     \newpage     using \gls{svm} blah blah \gls{wasn}blah blah.....\gls{svm}     \end{document}      I am testing with above MWE. The acronyms are correctly displayed in the document body when compiled, but nothing gets printed where I need the List of Acronyms. I am using TexMakerX as my IDE on Windows 7. Once I compile the above code a `.glo` file is created but it is empty. I think this is the problem but I don't know why it is happening.


title: Eliminate reference to chapter in table caption (memoir class)

text: I'm editing a book using the _memoir_ class. Each chapter has a different author, and I restart numbering of all elements at the start of each chapter. So far, so good. However, I want to eliminate the chapter number that occurs in front of tables and figures (e.g. **Table 1** , not **Table 0.1** ). I put this into my preamble, but it does only have an effect on footnotes and section titels.               \counterwithout{footnote}{chapter}     \counterwithout{section}{chapter}     \counterwithout{table}{chapter}     \counterwithout{figure}{chapter}      I suspected the fact that I use the caption-package with the memoir class was what caused the problem. Removing this did however not help. The code runs like this:               \begin{table}[h!]         \captionof{table}{\emph{some caption}}         \begin{tabular}{lrr}             \hline & \textbf{column A}  & \textbf{column B}  \\             \hline  \textbf{Alpha}  & a  & b  \\             \textbf{Beta}  & a  & b  \\             \textbf{Gamma}  & a  & b \\             \hline  \textbf{Total} & 100  & 100  \\                  \hline \label{fig1}         \end{tabular}     \end{table}      I've been reading he memoir manual and poking around the web all day, but I haven't got any closer to solving this problem. Grateful for any help. UPDATE: This is my main document. I didn't want to include it, because it is loooooong.               \documentclass [paperwidth=170mm, paperheight=240mm, 11 pt]{memoir}     \usepackage[cyr]{aeguill}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[francais, english]{babel}     \usepackage{multirow}     \usepackage{multicol}          \usepackage{tablefootnote}     \usepackage[dvipsnames,svgnames,table]{xcolor}     \usepackage{graphicx}     \usepackage{wrapfig}     \usepackage{linguex}     \usepackage{epstopdf}     \usepackage{amsmath}          \usepackage{phonetic}     \usepackage{xyling}     \usepackage{titling}     \usepackage{lipsum}     \usepackage{titlesec}     \usepackage{enumitem}     \usepackage{textcomp}          \usepackage{chngcntr}     \usepackage{setspace}     \usepackage{etoolbox}     \usepackage{makeidx}     \usepackage{setspace}     \usepackage{multirow}     \usepackage{caption}          \usepackage[figurename=Fig.]{caption}     \usepackage[tablename=Tab.]{caption}     \usepackage{colortbl}     \usepackage[dvipsnames,svgnames,table]{xcolor}     \renewcommand{\arraystretch}{1}      \setfloatadjustment{figure}{\small\centering}     \setfloatadjustment{table}{\small\centering}          \makeatletter          \preto{\@ex}{\topsep=0pt \parskip=0pt \parsep=0pt \partopsep=0pt }     \makeatother               \titleformat{\section}{\normalsize \bfseries}{\thesection}{1.75em}{\textsc}     \titleformat{\subsection}{\normalsize \bfseries}{\thesubsection}{1em}{\emph}     \titleformat{\subsubsection}{\normalsize \mdseries}{\thesubsubsection}{1em}{\emph}          \renewcommand{\cftchapterfont}{\normalfont}     \renewcommand{\cftpartfont}{\bfseries}     \renewcommand{\cftchapterpagefont}{\normalfont}          \renewcommand{\captionfont}{\small}     \renewcommand{\firstrefdash}{}          \pagestyle{myheadings}          \setlength{\parsep}{0pt}          \setsecnumdepth{subsection}          \makeatletter     \let\@afterindenttrue\@afterindentfalse     \makeatother          \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{0}          \renewcommand{\baselinestretch}{1}     \counterwithout{footnote}{chapter}     \counterwithout{section}{chapter}     \counterwithout{table}{chapter}     \counterwithout{figure}{chapter}               \begin{document}          \selectlanguage{francais}          \frontmatter          \selectlanguage{francais}          \tableofcontents*               \include{introduction}          \newpage          \mainmatter          \part{La langue française}          \include{somepaper}          \backmatter          \include{index}          \end{document}      The problems I'm experiencing is in the `{somepaper}` under `\mainmatter`. (Actually, in all papers that contain tables or figures.) I tried `\stepcounter{table}`, which removed the numbering all together.


title: Do not display one special acronym in list of acronyms without using glossaries

text: This post does what I want with the `glossaries` package that I would rather not use. Is it possible to have the same (selectively say please do not put this item in the acronym list) using only the `acronym` package?


title: Workaround for bibentry when using natbib and pagebackref

text: I am using natbib and hyperref's pagebackref. Now I also wanted to use bibentry, but I get the error message > File ended while scanning use of \BR@c@bibitem. \par \nobibliography* % For > bibentry commands It seems this is an old bug, as described in https://groups.google.com/forum/#!topic/comp.text.tex/ZJCRwBhOc5s. Is there a **workaround** so that I can add some full references in my text (as with bibentry) but can keep my remaining setup as is, especially keep using natbib and hyperrefs? * * * Details about relevant parts of my setup:               \usepackage[square]{natbib} %citation style     \usepackage{bibentry}     \usepackage[plainpages=false,                 pdftex,                 pagebackref,                 bookmarks,                 pdfstartview=FitV,                 pdfpagelabels,                 pdfpagemode=UseNone,             a4paper=false,             setpagesize=false]{hyperref}               \begin{document}       \include{introduction}       \backmatter        \hbadness=2000       \bibliographystyle{plainnat}       \bibliography{davef,diss}       \printindex     \end{document}      and in introduction, I use               \nobibliography{davef,diss}     \bibentry{foo}


title: Aromatic rings resized with chemfig

text: When I want to reduce the size of a molecule drawn with chemfig I usually put a `[scale=0.xx]` before the argument of the command. However when I deal with aromatic rings this method doesn't work well, in fact only the carbon skeleton is resized: the 'aromaticity' is not and it's also out of center.   For example:               \chemfig[][scale=0.75]{**6(-------)}\quad      gives me: ![benzene](http://i.stack.imgur.com/V3mDT.jpg) How do I achieve a complete resize?


title: pgfplots, ybar-plot: how to mark a missing value?

text: I'm very, very happy with pgfplots and using the ybar-plot-function to create a lot of diagrams. At the moment I wonders if it is possible to mark a missing value, for example with an asterisk. As you can see in the following example, one can easily identify a value of zero, but the missed values are not easy to identify. I would like to mark these empty ybars (in the example at M3, J4, J3) with an asterisk. Does anyone know how to automate or realize that?               \documentclass[     a4paper,%     headings=small,%     ]{scrbook}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage{pgfplots}     \usepgflibrary{shapes.geometric}     \usetikzlibrary{patterns,arrows}     \pgfplotsset{%     compat=newest,         every axis legend/.append style={draw=none, font=\scriptsize, column sep=5pt},         ymajorgrids=true,         /pgfplots/ybar legend/.style={     /pgfplots/legend image code/.code={%     \draw[##1,/tikz/.cd, bar width=6pt, yshift=-0.25em, bar shift=0pt, xshift=0.8em]     plot coordinates {(0cm,0.8em)};},     },       /pgfplots/line legend/.style={     /pgfplots/legend image code/.code={%     \draw[mark repeat=2,mark phase=2,##1]     plot coordinates {(0cm,0cm) (0.3cm,0cm)(0.6cm,0cm)};},     }     }          \begin{document}          \begin{figure}[htb]     \centering     \footnotesize          \begin{tikzpicture}     \begin{axis}[     symbolic x coords={M6,M5,J2,M4,M1,M3,J1,M2,J4,J5,J3},     width=15cm,     height=5cm,     ylabel=Prozent,     legend style={at={(0.5,-0.2)}, anchor=north, legend columns=-1},     ybar,     ymin=0,     ymax=100,     enlarge x limits=0.07,     enlarge y limits=0.07     ]          \addlegendentry{FS}     \addplot [pattern=north east lines, ybar legend] coordinates {(M6,0) (M5,100) (J2,42.1) (M4,16.7) (M1,0) (M3,100) (J1,100) (M2,100) (J4,) (J5,0) (J3,0)};          \addlegendentry{IS}     \addplot [color=black, fill=lightgray, ybar legend] coordinates {(M6,20) (M5,50) (J2,58.2) (M4,50) (M1,0) (M3,) (J1,100) (M2,100) (J4,100) (J5,100) (J3,)};          \addlegendentry{\=x FS}     \addplot [black, sharp plot, update limits=false, line width = 1pt, line legend] coordinates {(M6,45.9) (J3,45.9)};          \addlegendentry{\=x IS}     \addplot [black, dashed, sharp plot, update limits=false, line width = 1pt, line legend] coordinates {(M6,64.2) (J3,64.2)};          \end{axis}     \end{tikzpicture}          \caption{Variable A: Intersituative Variantenrealisierung}     \end{figure}          \end{document}


title: How to prevent extendedchars=\true from producing a blank line?

text: My previous question How to suppress BOM effect in the output? has been solved by @Vaulty. Enabling `extendedchars=\true`, however, produces an unnecessary blank line at the first line as shown below. ![enter image description here](http://i.stack.imgur.com/VUtY9.png)               \documentclass{article}     \usepackage{xcolor}     \usepackage{listings}          \lstset     {              breaklines=true,             tabsize=3,              showstringspaces=false,             extendedchars=\true,%<======= SOURCE OF PROBLEM             language={[Sharp]C},                frame=single,                rulecolor=\color{red}%        }          \begin{document}          \lstinputlisting{Program.cs}          \end{document}      `Program.cs`, that is generated by Visual Studio, is always prefixed with a BOM (Byte Order Mark). If you have no Microsoft Visual Studio installed, you can download a test file named Default.aspx.cs from the official ASP.NET website securely. It is worth mentioning that the backslash in `\true` is NOT a typo. The question is how to prevent `extendedchars=\true` from producing a blank line?


title: (Commutative) diagram with long labels on vertices

text: I am trying to draw a diagram that looks something similar to the following:               ##############  ---------> ##############            \                       /               \                   /            #########################      The important thing to notice is that the labels on all of the vertices are fairly long and the lower vertex should overlap with the upper two. It's easy to draw something like this in XYpic:               ####  ------->  ####         \          /           \      /             ####      with the following code:               \[ \xymatrix { longtexthere \ar[rr] \ar@{-}[dr] & & longtexthere \ar@{-}[dl] \\                     & longtexthere & } \]      ie where the vertices don't overlap. Unfortunately, in my case this would mean that the upper two vertices would be "pushed" over the edge of the paper, which is obviously bad. Any ideas how to draw something like this? Preferrably with XYpic, but as it seems beyond it's capabilities -- apparently you can't do cells that span multiple colums -- then maybe even TikZ.


With this `MWE` :               \documentclass{beamer}     \RequirePackage{fontspec}     \usefonttheme{serif}     \RequirePackage{lmodern}     \RequirePackage{fourier}          \beamertemplatenavigationsymbolsempty          \RequirePackage{polyglossia}     \setdefaultlanguage{french}          \usetheme{Warsaw}     \usecolortheme{wolverine}          \title{\textbf{\textsc{La Boîte à Questions}}}     \author{Mathématiques}     \date{6$^{e}$}     \institute{2014 -- 2015}          \begin{document}          \begin{frame}[plain]     \titlepage     \end{frame}          \end{document}      I have this error messages because of a problem between `lualatex` and `fourier` :               checksum mismatch in font futr8t.vf ignored      checksum mismatch in font futbc8t.vf ignored      checksum mismatch in font futr8t.vf ignored      ...      I use texlive 2013, but I saw that the problem exits in 2010, but no solution. Any idea ?


title: Scaling pgfplot with tikzscale

text: I'm using tikz and pgfplots for graphs. When using a second y-axis on the right the scaling of tikz is not proper. So I tried to use the tikzscale package and the includegraphics but it seems to scale the whole picture including text. I want to scale only the diagram, text size should be the same as in the document. See my example:               \documentclass{scrreprt}     \usepackage{tikz}     \usepackage{tikzscale}     \usepackage{pgfplots}     \begin{document}     Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text     text text text text text text text text text text text text.     \begin{figure}     \includegraphics[width=\textwidth]{tikzpicture.tikz}     \end{figure}     \end{document}      tikzpicture.tikz:               \begin{tikzpicture}          \begin{axis}[width=\textwidth,height=0.3\textheight,     axis  y  line*=left,     grid,     xlabel near ticks,     ylabel near ticks,     xmin=-50,     xmax=1000,     ymin=-50,     ymax=1200,     ytick={0,200,400,600,800, 1000,1200},     xlabel=time,     ylabel=Volt]             \addplot[blue] table[x index=0, y index=1] {voltage.txt};     \end{axis}     \begin{axis}[width=\textwidth,height=0.3\textheight,     axis  y  line*=right,     axis  x  line=none,     xlabel near ticks,     ylabel near ticks,     xmin=-50,     xmax=1000,     ymin=-50,     ymax=1500,     ytick={0,250,500,750,1000,1250,1500},     ylabel=Ampere]     \addplot[red,thick] table[x index=0, y index=1]{current.txt};     \end{axis}     \end{tikzpicture}      current.txt:               -29.068 0.69475     10.932  48.518     50.932  280.56     90.932  350.94     130.93  329.44     1010.9  -2.9516      voltage.txt               -40.268 998.72     -0.268  975.43     39.732  880.89     199.73  662     239.73  595.4     999.73  -26.092      Whats my fault? Thanks in advance Andreas


title: How to get symbols for \thanks command with Thesis class

text: I'm having a slight problem with regards to the `\thanks` command. My preamble is the following:               \documentclass[a4paper, 11pt, oneside]{Thesis}  % Use the "Thesis" style, based on the     ECS Thesis style by Steve Gunn     \graphicspath{{Figures/}}  % Location of the graphics files (set up for graphics to be in PDF format)          % Include any extra LaTeX packages required     \usepackage[square, numbers, comma, sort&compress]{natbib}  % Use the "Natbib" style for the references in the Bibliography     \usepackage{verbatim}  % Needed for the "comment" environment to make LaTeX comments      \usepackage{vector}  % Allows "\bvec{}" and "\buvec{}" for "blackboard" style bold vectors in maths     \usepackage{graphicx}     \hypersetup{urlcolor=blue, colorlinks=true}  % Colours hyperlinks in blue, but this can be distracting if there are many links      In the author section I have the following:               \begin{minipage}{0.4\textwidth}     \begin{flushleft} \large     \emph{Author:}\\      John \textsc{Smith}      \thanks{Student at the University of Cape Town}      \end{flushleft}      \end{minipage}       ~      \begin{minipage}{0.4\textwidth}      \begin{flushright} \large       \emph{Supervisor:} \\       Dr. John \textsc{Doe\thanks{Lecturer at the University of Cape Town}} % Supervisor's Name     \end{flushright}     \end{minipage}\\[2cm]      I then get the following output ![enter image description here](http://i.stack.imgur.com/JE6uD.png) But I don't want the number, I want the symbols, like in the example here: http://wiki.contextgarden.net/LaTeX_Thanks


title: Solving underfull and overfull warnings

text: Always when I want to prepare a document with LaTeX I receive different warnings including underfull and overfull but I don't know how I can handle these warnings. As you can see here i have two tables in LaTeX but I got the same errors for these, please help me how I can change these tables to solve these warnings.               \begin{table}[h]     \renewcommand{\arraystretch}{1.3}       \caption{Contention window size updating}       \label{tab:table1}       \centering       \begin{tabularx}{3.7cm}{ll}       \hline     \bfseries Status & \bfseries CW range \\     \hline\hline     011 & \\     101 & ${CW}_{min}$\\     111 & \\     \hline     \end{tabularx}          \end{table}                              \begin{table}[h]     \renewcommand{\arraystretch}{1}       \caption{The simulation parameters}       \label{tab:table2}       \centering       \begin{tabularx}{7cm}{ll}       \hline      \bfseries Simulation Parameter & \bfseries Value \\     \hline\hline      Traffic type & CBR\\     CBR packet size & 512 byte\\     CBR data rate & 4 packet/s\\     Transport protocol & UDP\\     \end{tabularx}          \end{table}


title: Horizontal margins for margin notes in the tufte classes

text: From the picture underneath you can see that the tufte class does not provide horizontal margins for the margin notes. Thus the margin notes can go beyond the `\textheigth`. Is that normal or is it a bug? How can I fix that? ![enter image description here](http://i.stack.imgur.com/0SXsS.jpg)               \documentclass{tufte-book}               \begin{document}          TEST\footnote{Test note}          \end{document}


title: Embedding HTML code in beamer

text: I want to embed html code like latex in beamer, like follows:                 \begin{frame}{HTML Code}[fragile]        \begin{lstlisting}[language=html]         <html>         <head>         </head>         <body>         </body>         </html>       \end{lstlisting}        \end{frame}      But it is not working , Latex file is giving compilation errors. It is really urgent. Please help.


title: Indicating the beginning of a paragraph with a ¶ just inside the margin

text: **How does one most easily typeset a paragraph marker inside the margin, at the beginning of every paragraph?** There are different practices regarding the indication of paragraph boundaries.   * _indentation of every paragraph:_ Makes for a visually consistent appearance.   * _indentation of every paragraph except the first after a heading:_ A bit more functional; I think it's a matter of taste compared to universal indentation.   * _no paragraph indentation:_ In my opinion not nearly as much of a problem as some would like to make you think: That the preceding paragraph ends exactly on the right-hand margin is infrequent, and even if it happens: what is the problem? There are **many** other ambiguities in printed language (including ambiguities related to spelling, sentence structure, and punctuation overloading). The actual issue I have with indentation of every paragraph is that I find it _ugly_ [Disclaimer: subjective opinion!] when there are many short lines. This can happen in a novel with lots of short dialogue but also and especially in text with lots of math. When both every math formula as well as many of the lines around these formulas are indented (often with indentation that differs only slightly), that clearly makes it _harder_ to discern the document structure. I personally also think that it's okay to not indent after any float or formula, independent of whether the first line after the float or formula starts a new paragraph - but I will not claim that my opinion is common. By the way, I like it if indentation of paragraphs and indentation of mathematical material clearly differ (say, by a factor of 2). A "solution" to the question of proper paragraph indentation is to not indent at all but precede every paragraph with a marker. Here is one way:               \documentclass{article}     \usepackage{xcolor}     \usepackage{lipsum}          \parindent0pt % no paragraph indentation          \newcommand*{\parindicator}%       {\everypar{\llap{\textcolor{gray}{\raisebox{0.5ex}[0pt][0pt]{\footnotesize \P}}\quad}}}               \begin{document}          \parindicator     \lipsum[1-2]          \begin{itemize}       \item Text.       \item Text.       \item \parindicator \lipsum[3] \lipsum*[4]       \item Text.     \end{itemize}          \parindicator     \lipsum[5-6]     \lipsum[7-8]          \end{document}      This will typeset a "¶" just inside the margin at the beginning of every paragraph. I picked the "¶" for its meaning, even though it's outdated. For the modern eye it may be a bit of an unusual choice, but why not put this character to some real use; it'd be lame if it just kept sitting there within ASCII for all eternity. I made it a bit smaller and greyed it out as well to make it less obtrusive. Above are stylistic justifications, and, yes, doing things this way will be regarded as unusual - but why not try it out. I ask: **How does one most easily typeset a paragraph marker inside the margin, at the beginning of every paragraph?** In my code above the `\parindicator` has to be used repeatedly, and the result for the bulleted list is unsatisfactory. Perhaps one could use a "¶" there only for non-initial paragraphs, or one could move these markers to the right-hand margin.


title: Inconsistent margins using columns in beamer

text: Compare the two slides generated by the following code.               \documentclass[t]{beamer}     \usepackage{lipsum}     \begin{document}     \begin{frame}       \lipsum     \end{frame}     \begin{frame}       \begin{columns}[T]         \begin{column}{0.5\textwidth}           \lipsum         \end{column}         \begin{column}{0.5\textwidth}           \lipsum         \end{column}       \end{columns}     \end{frame}     \end{document}      Notice how, in two-column mode, the side-margins are smaller, and the top margin is larger. This makes the layout on my slides inconsistent when I mix a two-column and one-column layout, particularly if I do so on the same slide. How do I get LaTeX to stop messing with margins in two-column mode? Thanks, -Willard. P.S.: In case someone else has the same issue: In two-column mode, if I had an image in one column, then placing a theorem in the other column would move the image. I traced this issue to               \setbeamercolor{structure}{...}      which apparently does more than just colour things. To change colors, use               \usecolortheme[...]{structure}      instead.


title: Insert a reference in a caption?

text: After visiting wiki on labels and cross-referencing, a couple of tex sites (1,2), and a stackexchange solution, the following reference will not appear in the caption. I'm using pdflatex on ubuntu. The section label that is being referenced (appen) is defined at the end of the doc. All of the following attempts to insert the reference in the caption produce **??** or [ **?** ]:               \begin{figure}[!ht]     \caption*{See the ~\ref{appen} for language abbreviations.}     \makebox[\textwidth]{\includegraphics[width=100mm]{{/filepath/hourly.update}.pdf}}     \end{figure}          \begin{figure}[!ht]     \caption*{See the ~\cite{appen} for language abbreviations.}     \makebox[\textwidth]{\includegraphics[width=100mm]{{/filepath/hourly.update}.pdf}}     \end{figure}          \begin{figure}[!ht]     \caption*{See the ~\protect\ref{appen} for language abbreviations.}     \makebox[\textwidth]{\includegraphics[width=100mm]{{/filepath/hourly.update}.pdf}}     \end{figure}          \begin{figure}[!ht]     \caption*{See the ~\protect\cite{appen} for language abbreviations.}     \makebox[\textwidth]{\includegraphics[width=100mm]{{/filepath/hourly.update}.pdf}}     \end{figure}          \section{Appendix}     \label{appen}     \subsection{Language Abbreviations}      ...words, figures, tables, and such.      \-- edit 2013-02-12 Error received:               LaTeX Warning: Reference `appen' on page 2 undefined on input line 94      Any idea how to insert a reference within a caption?


title: what's the difference between Boundingbox and hiresBoundingbox?

text: What's the difference between Boudingbox and hiresBoundingbox in an eps figure?


title: BibTeX style file for The Journal of Engineering Mathematics (Springer)?

text: Here is an example of how the bibliography should look. It has the order of author year, but it has numbered labels, non italic titles, removes several full stops, and ends with volume:pages. Here is an example >   1. Gower AL, Destrade M, Ogden R (2013) Counter-intuitive results in > acousto-elasticity. Wave Motion 50:1218–1228 >   2. Golub GH, Van Loan CF (1996) Matrix computations. Johns Hopkins > University Press, Baltimore > The first is an article the second is a book. How can I do this without learning the intricacies of bibtex code?


title: Setting width of lines in tabular

text: Is it possible to increase the linewidth of tables like it's possible to set the linewidth in PSTricks? Maybe you could show me how to do it on this example:               \begin{tabular}{c|c|c|c}         \hline         1 & 2 & 3 & 4\\         \hline         5 & 6 & 7 & 8\\         \hline     \end{tabular}


title: The table of contents has my entire report!

text: This was my first attempt at Latex. I am using LaTeXila. I fail to understand why my table of contents reproduces my entire report and then assigns it a page number: > **Contents**   >  0.1 1 A bin of 50 manufactured parts contain three defective parts and 47 > non-defective parts. ... Implement Bubble sort and Randomized Quicksort and > make a comparative report of their performance . . . . . . . . . . . . . . . > . . . . . . 2 The 'code' part:               \begin{document}          \maketitle{}       \tableofcontents{       \begin {enumerate}       \item {question 1}\item {question 2}\item {question 3}\item {question 4}       \end{enumerate}}            %\chapter{Assignment}       \begin{section} {1 A bin of 50 manufactured parts contain three defective parts and 47 non-defective parts. ... Implement Bubble sort and Randomized Quicksort and make a comparative report of their performance }        \end{section}       \end{document}


title: How to typeset greek letters

text: I want to write a sentence like "physics (from ancient greek φύσις)". But I don't know how to typeset the character "ύ" properly. Also I am not sure, if it is a good idea simply to use math-mode here to typeset the greek letters. So, what's the best way to typeset the ancient greek word φύσις? **Edit:** I should add that I just copied the word from wikipedia in this case, so the `xelatex` or `babel` solutions work very well since I can just copy the greek word into my latex source. But I don't know how I can insert those greek letters directly with my normal german keyboard layout.


title: Titlesec and xcolor not playing nicely?

text: I am trying to use the `titlesec` and `xcolor` packages together (well, actually, the `tufte-book` class is, but that's another story.) Here is a minimal LaTeX file that illustrates my problem:               \documentclass{book}     \usepackage{titlesec}     \usepackage[usenames]{xcolor}     \usepackage{textcase}     \titleformat{\part}[block]{}{\thepart}{1em}{\textcolor{darkgray}\MakeTextUppercase}     \begin{document}     \part{A Tale of Two Cities}     \end{document}      The 5th argument of `\titleformat` is supposed to add the section heading as an argument to the last command, so it should end up with `\MakeTextUppercase{A Tale of Two Cities}`. But running LaTeX on this file produces the following output: > ! Argument of \MakeTextUppercase has an extra }.   >  Runaway argument?   >  ! Paragraph ended before \MakeTextUppercase was complete. However, if I remove `\textcolor{darkgray}` then everything works as expected. Also, if I insert `\\` between `\textcolor{darkgray}` and `\MakeTextUppercase`, then everything also works as expected. But not if I put `\\` before `\textcolor{darkgray}`. Can anyone explain what is going on here?


title: Short title that is not displayed in the ToC {hyperref}

text: I am using TexShop and because there is nothing like a navigation (or at least I don't know how to create it) and my document comprises about 200-300 pages, I try to build my own navigation in the footer of my PDF-file by using the package `fancyhdr` and the `\nameref`. The problem is that my headlines are very long. I used the short title to cut them down, but now my ToC is cut down as well. I wonder if there is a possibility to use the short title just for `\nameref` while putting the full title in the ToC. If someone knows a solution it would be really great. Thanks in advance. Hi again, as you ask for the minimal code. Here it is (I hope it is minimal, am relatively new to this things):               \documentclass{book}          \usepackage[colorlinks,cross-references,bookmarks=true]{hyperref}          \usepackage{fancyhdr}      \pagestyle{fancy}     \lfoot{\nameref{S:A}, \nameref{S:B}, \nameref{S:C}}          \begin{document}          \tableofcontents     \newpage          \section[Intro]{Vorbemerkung}\label{S:A}     \newpage          \section[Paul]{Paul ist ein Mann von Format}\label{S:B}     \newpage          \section[Klaus]{Klaus}\label{S:C}          \end{document}      @Caramdir: My TexShop displays the document in his own pdf which enables me to switch from this pdf to the tex file and back by clicking "apple + mouse" and is one of my navigation tools which works as follows: I go to the toc of my pdf, by hyperlink I get to the section I want and there I click "apple + mouse" in the document to get exactly to the same point in the tex document. Many steps I know, but I see no other way. By placing hypertext in the header I can improve this process because I can easily jump back close to the toc (exactly to the first chapter). The "apple + mouse"-option doesn't work when I open the document with other programs and thats why your suggestion doesn't help in this case.


title: \pounds produces £, but Adobe Reader needs to search for $

text: I've read some of the similar questions - with $ being produced instead of £. I couldn't find anything that addresses the particular issue I'm currently having though... LaTeX quite happily produces the £ symbol when I use \pounds. However, I had the need to search the resulting PDF document to track down where this symbol was used - and Adobe Reader's search function duly reported no instances of it, anywhere. On the other hand, if I search for $, it will find all instances of £ without any problems. Is this a known bug/feature (of LaTeX and/or Adobe Reader)? Is there anything I can do to overcome it? MWE below...               \documentclass{article}          \begin{document}     \pounds     \end{document}


title: Vertical alignment between Figure and Table

text: I will have a meeting in a few and don't have much time to solve this "problem", I'm trying to vertically align a figure and a table, I provide a minimal working example               \documentclass[10pt]{beamer}          \usepackage{subfig}     \usetheme{Boadilla}          \makeatletter     \setbeamercovered{transparent}          \begin{document}          \begin{frame}         \begin{figure}[!h]         \centering \setcounter{subfigure}{0} \subfloat[\texttt{LBC41 BC7           Before Jump}]{\includegraphics[scale           =.27]{plots_09122013/BC7_Fit_Before.pdf}} \hspace{10mm}         \subfloat[\texttt{LBC41 BC7 After Jump}]{\includegraphics[scale           =.27]{plots_09122013/BC7_Fit_After.pdf}}       \end{figure}       \begin{columns}[2]         \column{.5\textwidth} \tiny{\begin{tabular}[!h]{r c}             \multicolumn{2}{c}{LBC41 BC7 Values From Database} \\             \hline \hline             \multicolumn{2}{c}{Before Jump} \\             \hline \hline             Cell Noise:    & 40.3797836304    \\             Sigma 1:       & 29.4964122772    \\             Sigma 2:       & 134.027191162    \\             R:             & 0.0107654100284  \\             RMS Eff:       & 32.4662005515    \\             RMS/ RMS Eff: & 1.24374835812           \end{tabular}}         \column{.5\textwidth}         \tiny{\begin{tabular}[!h]{r c}             \multicolumn{2}{c}{LBC41 BC7 Values From Database} \\             \hline \hline             \multicolumn{2}{c}{After Jump} \\             \hline \hline             Cell Noise:    & 24.2430381775    \\             Sigma 1:       & 19.3923454285    \\             Sigma 2:       & 65.2064208984    \\             R:             & 0.0173415876925  \\             RMS Eff:       & 21.0541167988    \\             RMS/ RMS Eff:  & 1.15146308008           \end{tabular}}       \end{columns}     \end{frame}          \end{document}      The immages can be found here http://www.sendspace.com/file/3exu93 http://www.sendspace.com/file/2ofs9e And the resulting pdf can be found here http://www.sendspace.com/file/825u6e As you can see the result is not so pretty, can you hint me with some idea on how can I improve the alignment between the figures and the table? Thanks!


title: how to produce a table with fixed width and height?

text: How could I produce a table like the following with fixed width and height, no matter the length of the strings? And, how can I add color to the missing grid? Thanks. ![enter image description here](http://i.stack.imgur.com/WVdis.png)


title: How to distribute narrow expressions along a line?

text: I want something like this: ![enter image description here](http://i.stack.imgur.com/Esfvq.png) two narrow equations/words equally distributed along the linewidth. I used next code:               \documentclass{beamer}     \usetheme{Warsaw}     \begin{document}     \begin{frame}     \begin{block}{My block}     \hfill$a+a=a$\hfill$a\cdot a=a$\hfill\phantom{.}     \end{block}     \end{frame}     \end{document}      As you can see I've used a `\phantom{.}` to force end of line `\hfill`. My question is do you know a better solution? Probably Werner's answer in Standard math environment for equally-spaced columns of expressions? is a better way to do it, but I think it's to much code.


title: LaTeX Error: Missing \begin{document}

text: While i wrote `\begin{document}` but it gives me the error what should i do? You can see my template below:               \documentclass{res}      \newsectionwidth{0pt}       \setlength{\textheight}{10.2in}      \topmargin=-.5in          \oddsidemargin=-.5in             \begin{document}     \newdimen\boxrulethickness\newdimen\boxaroundhmargin\newdimen\boxaroundvmargin     \boxrulethickness=.5pt             \boxaroundhmargin=35pt        \boxaroundvmargin=40pt                  \hsize=7.5in     \newbox\MACboxA  \newdimen\MACdimenA          \def\borderandboxit#1#2#3{\vbox{\hrule height#2\hbox{\vrule width#2\hskip#1\hskip-#2%       \vbox{\vskip#1\relax#3\vskip#1}\hskip#1\hskip-#2\vrule width#2}\hrule height#2}}     %     \long\def\boxaround#1{\vskip6pt       {\MACdimenA=\hsize \advance\MACdimenA by-\boxaroundhmargin        \advance\MACdimenA by-\boxaroundhmargin          \setbox\MACboxA=\hbox to \hsize{\hskip\boxaroundhmargin                          \vbox{\hsize=\MACdimenA                                \vskip\boxaroundvmargin #1                                \vskip\boxaroundvmargin}\hss}%        \borderandboxit{0pt}\boxrulethickness{\box\MACboxA}}%       \vskip2pt plus0pt minus0pt     }               \boxaround{           \name{MATTHEW M. PARKER\\[12pt]}     \address{\bf Present Address\\2174 Seventh Street\\Troy, NY 12180\\             (518) 272-4460}      \address{\bf Permanent Address\\241 Park Avenue\\              New York, NY 01810\\ (212) 742-4937}               \begin{resume}          \section{\sl  Objective}            A  summer  position  in the field of Mechanical Engineering, with      emphasis on Automation/Robotics           \section{\sl  Education}     Rensselaer Polytechnic Institute, B.S.,  Mechanical  Engineering,      expected December 1990           Bronx High School of Science, Graduated with Honors, June 1987           \section{\sl  Related Experience}     \begin{ncolumn}{2}     {\it Student Production Engineer}  &   5/89-12/89      \end{ncolumn}\\     RCA - Missile and Surface Radar Division, Moorestown, NJ \\     Involved  in  prototyping  and design of a vision guided robotics      workcell. Generated robotic workcell equipment planning diagrams,      software  specifications, and integration schematics. Using a CAD      system,  designed  end-effectors,  fixtures,  and  parts   trays.      Developed  communication  protocols between the vision system and      the robots, and  prototyped  software  to  control  the  assembly      process of the workcell, which in its entirety includes 2 robots,      vision  system,  conveyor  system,  tray  feeders,  and   various      sensors.           \begin{ncolumn}{2}      {\it Industrial Engineering Trainee} &  5/88-8/88      \end{ncolumn}\\     Mattel Toys, Hawthorne, CA \\     Analyzed  the  computing  needs  of  the  Industrial  Engineering      department,  interviewed  prospective  vendors,  evaluated  their      computer  hardware  and  software  products,  and recommended the      system  that  best  met  the  department's   requirements.   Also      developed  a software program to graphically systemize production      line flow charts and trained engineers and technicians to use the      various software.           \begin{ncolumn}{2}     {\it Structural Engineering Trainee} & 5/87-8/87     \end{ncolumn}\\       S.L.N. \& Associates, New York, NY \\     Developed  user  friendly  software  programs  to  perform  Slope      Stability Analysis and  Retaining  Wall  Stability  Analysis  and      performed   on-site  inspections  to  monitor  the  stability  of      retaining walls.           \section{\sl  Other Experience}     Pool Attendant, Bronx  High  School  of  Science  Swimming  Pool,      1985-87           \section{\sl  Honors}     Dean's List of Distinguished Students \\     National Honor Society           \section{\sl  Activities}     Model United Nations Club \\     Water Polo Club \\     Rensselaer Christian Community \\     Campus Life Committee \\     Intramural Softball, Volleyball \\     Other interests include: Squash, Sailing, Cycling, and Reading                \end{resume}          \vfill}          \end{document}


title: Table troubled in a landscape document

text: I'm making a long enough table to the landscape document here. But, as you can see, it does not correct. What should I do? **The codes:**               \documentclass[11pt, a3paper, landscape]{scrartcl}     \usepackage[margin=2.5cm]{geometry}     \usepackage{adjustbox}     \usepackage{array}     \usepackage{tabu}     \usepackage{multirow}          \begin{document}     \begin{adjustbox}{center}     \begin{tabular}{lcccllllllll}          ---the longtable---          \end{tabular}     \end{adjustbox}     \end{document}


title: utf-8 characters in latex math mode

text: I'm using utf-8 characters like "ğ" or "ı" in math-mode in LaTex, but it does not render the characters as it should. Outside of math-mode I do not have this problem. My preamble with respect to font and input encoding is:               \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}      Any pointers on how to fix this problem for math-mode?


title: Pagebreak and Verbatim environments

text: Given the following piece of code:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{fancyvrb}               \DefineVerbatimEnvironment{shell}{Verbatim}{       commandchars=\%\{\},       label=\shelltitle,       frame=single,       samepage=true,       formatcom=\setcounter{prompt}{0}\start     }     \newcommand{\shelltitle}{This is a shell}          \makeatletter     \def\start{\let\FV@FV@ProcessLine\FV@ProcessLine       \def\FV@ProcessLine{\noindent\vrule height3ex depth2ex                            \hbox to\hsize{\kern\FV@FrameSep This is the shell prompt\hfil}%                           \kern-.8pt\vrule\par                           \let\FV@ProcessLine\FV@FV@ProcessLine                           \FV@ProcessLine}%     }     \makeatother          \newcounter{prompt}     \newcommand{\prompt}{\stepcounter{prompt}\theprompt>}          \begin{document}     \begin{shell}     %prompt echo foo{}     foo     %prompt echo bar     bar     \end{shell}     \end{document}      The `samepage=true` option doesn't affect the heading line ("This is the shell prompt") and page break happens immediately after that line. How can I ensure the heading line resides on the same page of the rest of the listing?


title: Something like PGF/TikZ for HTML5/web?

text: For everyone who knows and loves PGF/TikZ: Is there something that has a similar powerful expressive high-level “graphic description language” like TikZ for HTML5? I want to convert high-level textual descriptions of drawings (e.g. TikZ) to web-readable material. Should have:   * something like PGF/TikZ’s \node   * with easy placement relative to each other: `\node (bla) [right=of othernode]`   * useful anchors for drawing “connections” between things, bla.north, bla.north_west, bla.360   * styles   * powerful coordinate systems, calculations and transformations   * labels: in the nodes and next to paths   * and: simple links (click → webpage) I don’t care about:   * animation   * dragging   * changing shapes   * or any other interaction/dynamics more than links   * (not that they would bother me, I just don’t need them) Probably something like this:   * Syntax might be JavaScript   * build on top of HTML5 canvas/SVG   * but a PGF/TikZ export to PNGs _with_ HTML imagemaps would do it, too. :-)   * other ideas? Invalid is:   * SVG as both: the description language and the output format in one SVG is simply not a high level human-readable/-edible language. I know that XML’s design goal was to be human-readable. But in practice it is not. – SVG as the output format is fine, but doesn’t answer the question yet. TikZ-export is not off-topic, so re-open this question!


title: How to determine minimum width of rectangle with distance between two nodes

text: From similar questions and given examples about how to calculate distances between two points in the TikZ manual, I was not able to figure out how to extract from them a solution for my (probably simpler) need. See, not exactly a MWE, below:               \documentclass[tikz,border=5mm]{standalone}     \usetikzlibrary{calc,positioning}          \begin{document}         \begin{tikzpicture}[node distance=7mm and 0mm,     N/.style 2 args = {name=n#1,                        minimum width=#2mm,         shape=rectangle, draw, fill=white, align=center,         minimum height=9mm, inner sep=1mm, outer sep=0mm,         text width =\pgfkeysvalueof{/pgf/minimum width} - 2*\pgfkeysvalueof{/pgf/inner xsep}                         },                             ]\small\sffamily         \node[N={1}{22},label=above:22mm]                    {sinhronizacija};         \node[N={2}{13},label=above:13mm,right=of n1]        {SFD};     %---         \node[N={3}{13},label=above:13mm,right=of n2]        {signal};         \node[N={4}{13},label=above:13mm,right=of n3]        {storitev};         \node[N={5}{13},label=above:13mm,right=of n4]        {dol\v{z}na};         \node[N={6}{13},label=above:13mm,right=of n5]        {FSM};     %---         \node[N={7}{77},label=above:77mm,right=of n6]        {PSDU};     %-------         \dimendef\mynodewidth=0         \pgfmathparse{22+5*13+77}         \pgfmathsetlength{\mynodewidth}{\pgfmathresult mm}     \node[N={8}{},minimum width=\mynodewidth,           below right=of n1.south west] {(22+5*13+77) mm = 164 mm = distance between n1.west and n7.west};     %-------         \end{tikzpicture}      It works, but I'd like to have a more general solution, where I do not need to manually set up a sum of minimum width of nodes of interest, and where `\nodewidth` is obtained from the distance between given two nodes, i.e.: the first is at the leftmost border of a set of nodes and the second one on the rightmost border. something like               \nodewidth = <macro for distance calculation between>(ni.west,nj.east)


title: How to include a .mp file into a LaTex file?

text: I used metagraf to create the figure I wanted and saved it as a .mp file and I wanted to use the command "includegraphics{**.mps}" to include the corresponding figure but it said wrong, no such file founded. Now my question is how should I carry out the procedure provided I had already drawn out the figure I wanted using metagraf and saved it as a .mp file, so that I can include the figure into my output pdf file?


title: Calculate parbox width to make it meet the page border?

text: I'm using the `program` package to typeset my algorithms. I want my comments to have a light gray background, therefore I'm using `colorbox` with a `parbox` inside (for multi-line comments). Now the problem is that when I want to insert a comment in an **indented** line, setting the `parbox`'s width to `\textwidth` or `\linewidth` will make it too big, crossing the right page border. I'm looking for a way to compute the `parbox`'s width based on the current indentation (which I can't seem to find out) or its horizontal starting position so that it always goes up to the right page border. Any ideas? **EDIT:** Here's a minimum working example. The `renewcommand` commented out is the solution suggested first, but it doesn't work here.               \documentclass{article}     \usepackage{program}     \usepackage{color}     \usepackage{calc}          \definecolor{commentcolor}{gray}{0.9}     \newcommand{\commentbox}[1] {\colorbox{commentcolor}{\parbox{\linewidth-2\fboxsep}{#1}}}     %\renewcommand{\commentbox}[1] {\noindent\colorbox{commentcolor}{\parbox{\linewidth-2\fboxsep}{#1}}}          \begin{document}          \begin{programbox}     \commentbox{A normal comment.}     \IF someCondition         \THEN             \commentbox{An indented comment.}             myVar := myVar + 1     \FI     \end{programbox}          \end{document}


title: Displaying tooltips on tablet readers, specifically iPad

text: I am trying to generate tooltips in a PDF that will be accessible somehow on a tablet PDF reader, specifically on any iPad reader. So far, I have tried the packages pdfcomment, cooltooltips, and fancytooltips, but none of these were accessible on the iPad with Adobe Reader as a reference. I am aware that tooltips on a tablet don't make much sense since there is no such thing as a mouse over, but maybe there is something similar that works with a box that opens and closes on click or something. For example, I found something similar for the Safari browser which uses JavaScript's jQuery: http://code.drewwilson.com/entry/tiptip-jquery-plugin Is there any way I could get something like that working or can you think of a reasonable work-around? Or does that actually work already and am I just using the wrong PDF viewer/settings/anything? My current solution would be to use notes at the end of the PDF and hyperref to jump between pages, but I'd like to have something more elegant. Thank you for any hints or comments.


title: how to decouple alignment of rows within a column in LyX?

text: How do I decouple the paragraph alignment of rows within a column in LyX? I would like my top row to be aligned in the centre, and all subsequent (content) rows to be aligned left. However, whenever I try to align any of them, the alignment for the entire column will change. Is there a workaround this?


title: How to insert text between two figures?

text: How to insert text between two figures or images in LaTeX? I have this code               \begin{figure}[htbp]       \centering         \includegraphics[width=0.5\textwidth]{1.jpg}         \caption{Resala's Donation Page.}     \end{figure}          and for the volunteering activities, they do record all their activities...          \begin{figure}[htbp]       \centering         \includegraphics[width=1\textwidth]{2.jpg}         \caption{Resala's Project Page.}     \end{figure}      but what happens is the text is placed before the first image and all images are placed at the end of the page.


title: \IfSubStr does not work when used as parameter of another macro

text: It seem that if macro `\IfSubStr` from package `xstring` is used as parameter it is not expanded like other macros are. Here is minimal demonstration:               \usepackage{xstring}     \newcommand{\copyArg}[1]{#1}     \newcommand{\test}[1]{%       \if#1W         in then%       \else         in else%       \fi     }     \begin{document}       \test{\copyArg{W}}       \test{\IfSubStr{WKS}{W}{W}{N}}     \end{document}      I would expect this to print `in then in then`. Instead `\test{\IfSubStr{WKS}{W}{W}{N}}` behaves differently to previous macro and the output is `in then in else`. Why is that? How can I tweak my code or replace `\IfSubStr` by another macro so that I get expected result? * * * ## Edit Here I should explain what I need do. There is a macro like the `\test` macro shown in minimal example above. This macro has optional argument that works like switch - in very similar way it is shown in example above. If optional argument is `W` some actions are taken, it is unset or anything else then `W` some other actions are taken. It uses the same `\if` `\else` condition that I have used in demo. I am creating new macro that uses this existing macro. My macro has also first argument optional that may contain number of switches. One of them is that `W` switch. This switch is to be delegated existing macro. I thought I might code like this in my macro would do the trick `\theExistingMacro[\IfSubStr{#1}{W}{W}{}]{...}{...}` but it does not work. So how do I make it work? * * * ## Edit 2 To clarify here is real life example. There is a macro like this (simplified code)               \newcommand{\addLabelAbove}[4][]{%       \if#1W%         \saveToNewBox{#2}{\vbox{\noindent#4\\*\noindent#3}}%       \else%         \saveToNewBox{#2}{\pbox{\textwidth}{\noindent#4\\*\noindent#3}}%       \fi%     }%      I am creating new macro that calls different other macros one of which is `\addLabelAbove`               \newcommand{\block}[6][]{       \uppercase{\IfSubStr{#1}}{A}{%then         \uppercase{\IfSubStr{#1}}{L}{%then           \doSomething{#2}{#3}{#4}{#5}{#6}         }{%else           \stepcounter{BoxCount}%           \addLabelAbove[\IfSubStr{#1}{W}{W}{}]{\theBoxCount}{#2}{#3}%           \someMoreMacrosSkiped         }%       }{%else         \someOtherUnimportantCommands                  }%     }      The line `\addLabelAbove[\IfSubStr{#1}{W}{W}{}]{\theBoxCount}{#2}{#3}%` intends to call macro `\addLabelAbove` with switch `W` if there is `W` among switches given to macro `\block` or with without that switch if there is no `W` switch among switches given to `\block`. It does not work this way and I'd like to know how to make it work.


title: Multiple Documents with shared TOC and Indexes

text: I've recently started a personal project for creating and managing a knowledge base, but with the individual pages written in ConTeXt instead of markup, markdown, or any of the other currently-popular choices. I'm very new to ConTeXt and have not seen any examples doing what I'm trying to do. It may simply be that I do not know the right place to look. I'd like to be able to cross-link between pages and produce metadata pages covering the entire contents (e.g. TOC, index, list of figures). At the moment I am not concerned with rendering these pages as HTML (but may be at some point). Ideally the output will be a set of cross-linked PDFs: one for each topic plus separate PDFs for the TOC, index, and any lists of figures/tables/whatever that I decide to produce. Any pointers?


title: lualatex and string.format

text: I´m doing my first steps with lualatex and don´t understand, why the following code results in an error:               \documentclass[ngerman, pagesize]{scrartcl}     \usepackage{luatextra}          \begin{document}          \directlua{     CumCDP_2012 = 1.00E-6     ICumCDP_WIP_2012 = 2.00E-7     ICumCDP_R = 1.00E-7     ICumCDP = ICumCDP_WIP_2012 + ICumCDP_R      }          \begin{tabular}{cr}     Summe: & \directlua{tex.sprint(ICumCDP)}\\     Summe: & \directlua{tex.sprint(string.format("%e", 51.2))}\\  % <-- error     \end{tabular}          \end{document}      I would like to get 5.12e01.


title: The font of operator names

text: What is the correct way of having all operator names be set in, say, sans serif? Saying               \documentclass{article}     \usepackage{amsmath}     \makeatletter     \def\operator@font{\sf}     \makeatother     \DeclareMathOperator\operator{operator}     \begin{document}     An $\operator 1$.     \end{document}      seems to do the trick, but `amsopn.sty` defines               \def\operator@font{\mathgroup\symoperators}      which seems to do more... It would be nice if there were a `@`-free way of doing this, by the way.


title: tabularx and captions and notes

text: Here is a table using `ltablex` package. Can someone tell me how I can include `caption` and use `threeparttable` with this one. Fyi, when I used:               \begin{table}      begin{tabularx}      ...     \end{tabularx}      \end{table}`       the page did not break for me. Suggestions would be extremely helpful. I want to include caption and footnotes as given in this example Table formatting.               \documentclass{article}     \usepackage{ltablex}     \usepackage{threeparttable}     \usepackage{booktabs}          \title{Document}     \begin{document}     \maketitle          \begin{tabularx}{\textwidth}{Xc}     \toprule\toprule     Some random text & 1,75,650\\\midrule     \multicolumn{2}{l}{\textbf{Panel A1: AAA}} \\\midrule     Number of observations ... & 1,75,650\\     Delete: ... & (78,420)\\     Delete: ... & (7,104)\\     Final sample & 90,126\\     Delete: & (2,143)\\     Delete: & (8,345)\\     Final sample & 79,638\\\midrule     \multicolumn{2}{l}{\textbf{Panel A2: AAA}} \\\midrule     Number of observations & 79,638\\     Delete: & (39,540)\\     Delete: & (7,979) \\     Final sample & 32,119 \\\midrule     \multicolumn{2}{l}{\textbf{Panel B1: BBB }} \\\midrule     Number of observations  & 1,75,650\\     Delete: & (78,420)\\     Delete: & (47,136)\\     Delete: & (7,178)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Final sample & 42,884\\\midrule     \multicolumn{2}{l}{\textbf{Panel B2: BBB}} \\\midrule     Number of observations  & 1,75,650\\     Delete: & (78,420)\\     Delete: & (47,136)\\     Delete: & (7,178)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Number of observations  & 1,75,650\\     Delete: & (78,420)\\     Delete: & (47,136)\\     Delete: & (7,178)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Delete: & (32)\\     Final sample & 42,884\\\midrule\bottomrule     \end{tabularx}          \end{document}


title: Different definitions of the font \mathscr

text: Looking around, I have found two different "definitions" for the font generated by the command `\mathscr` (aka "Ralph Smith’s Formal Script" according to this). **First** ![enter image description here](http://i.stack.imgur.com/eutep.png) from here. **Second** ![enter image description here](http://i.stack.imgur.com/FEYXM.png) from here. _**Questions:_** Why are there two different fonts that supposedly come from the same command? My LaTeX environment gives me the first font. How do I get the second?


title: PGFplots and GNUplot with addplot3

text: I am trying to plot the following:               \documentclass[tikz, convert = false]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat = 1.9}          \begin{document}     \begin{tikzpicture}       \begin{axis}[view = {70}{30}]         \addplot3[raw gnuplot, surf]         gnuplot[id = surf] (x, {1/x*cos(deg(y))}, {1/x*sin(deg(y))});       \end{axis}     \end{tikzpicture}     \end{document}      I only receive a 2d blank axis back. I am not that familiar with using `gnuplot` with `addplot3`, so I am under the impression I am not calling `gnuplot` correctly in this case. * * * With Henri Menke's solution, we do get a plot but it isn't correct. Here is a correct plot without using gnuplot: ![enter image description here](http://i.stack.imgur.com/VWvBV.png) Here is a different angle of Henri's plot where you can see the the issue more clearly. ![enter image description here](http://i.stack.imgur.com/WFQgn.png)


title: Preventing the page number from appearing on the title page of part

text: Can someone help me to get rid of the page number at the bottom of the `\part` title page in the `book` document class? Using               \renewcommand{\part}{\thispagestyle{empty}}      will change the font and style of the part's title page altogether.


title: Chapter & Part Headings

text: I have a standard chapter heading style which puts chapter heading right aligned. I also have pages which separate the parts of the thesis. They're empty pages with just a heading and their heading is supposed to be left aligned. I'm using the code below to define the parts. However, not only they are not left aligned (they'll be pushed right ...) they also do not have the correct page numbering in the TOC. Any ideas? Should I define a different chapter style for them? Is is because I use chapter*{.}?               \addcontentsline{toc}{chapter}{Part I: The title of part I}          \begin{flushleft}     \chapter*{\Huge\scshape Part I:\\The title of part I}     \end{flushleft}


title: Three columns aligned horizontally and vertically

text: I'm trying to make a list of three columns where the first column is on the left hand side of the page, the second column runs down the middle and the third column is on the right hand side. A table is far too compact for what I want to do. I have used `multicols` but it doesn't align the rows if I have to display and equation with `\[ \]`. Here is an example of what I'm trying to achieve. Here is what I tried, but the displayed equation is not aligned.               \documentclass[12pt,a4paper,bothsides]{article}          \usepackage{multicol}          \begin{document}     \begin{multicols}{3}     \begin{itemize}         \item[] First equation         \item[] Second equation         \item[] Third equation         \item[] $a+b=c$         \item[] \[\int_0^1 x^2 \ \mathrm{d}x\]         \item[] $u+v=w$         \item[] Adding         \item[] Integrating         \item[] Adding     \end{itemize}     \end{multicols}     \end{document}


title: Modifying Section Style modifies the style of Contents in ToC

text: In the article class, if the style of the section heading is changed, the style of the contents heading in the Table of Contents is also changed. How to prevent this?               \documentclass[12pt,a4paper]{article}     \usepackage[a4paper,margin=1in,bindingoffset=0.2in,centering,headheight=0.3in,heightrounded]{geometry}     \usepackage{tikz}     \usepackage{titlesec}     \usepackage[english]{babel}     \begin{document}     \titleformat{\section}[block]%         {          \tikz[overlay] \shade[left color=blue!20,right color=white] (0,-1ex) rectangle (\textwidth,1em);}%         {\thesection}%         {1em}%         {}     \tableofcontents     \newpage     \section{Introduction}     \section{Limitations of Existing System}     \section{Problem Definition}     \section{Architecture of Proposed System}     \section{Novelty of the Work}     \section{Hardware / Software Tools}     \section{Gnatt Chart}     \section{References}     \end{document}


title: cyrillic and breakhref, how do I define?

text: I am trying to write urls for .ru wikipedia. For a number of other reasons, I use `\cyrillic` and `\breakhref` as defined in the following script. For urls as `http://ru.wikipedia.org/wiki/Елена_Стасова`, I am not able to render them with proper cyrillic characters and active link. If you know something about, I welcome your advise.               \documentclass[titlepage,a4paper,12pt]{article}     \usepackage{etex}     \usepackage{bigfoot}     \DeclareNewFootnote{default}     \DeclareNewFootnote{Inter}[alph]  %arabic     \MakeSortedPerPage{Inter}     \usepackage[backend=biber,style=philosophy-modern,sorting=nyt]{biblatex}     \usepackage[T2A,T1]{fontenc}      \usepackage[utf8]{inputenc}      \usepackage[titletoc,toc,title]{appendix}     \usepackage{lmodern}         % Enable Latin Modern fonts     \usepackage{graphicx}     \usepackage{textcomp}     \usepackage[american,russian,italian]{babel}     \usepackage{tipa}     \usepackage[babel,italian=guillemets]{csquotes}     \usepackage{enumitem}     \usepackage{ifthen}     \usepackage{float}     \usepackage{datetime}     \usepackage{multirow}     \usepackage{pdfcolparallel}     \usepackage{longtable}     \usepackage{fancyhdr}     \usepackage{hyperref}     \usepackage{hypcap}     \usepackage{color}     \usepackage[tableposition=top,figureposition=bottom,font=small,format=hang]{     caption}     \usepackage[object=vectorian]{pgfornament}     \usepackage[normalem]{ulem}     \usepackage{soul}     \newcommand\cyrillic{%     \renewcommand\rmdefault{wncyr}%     \renewcommand\sfdefault{wncyss}%     \renewcommand\encodingdefault{T2A}%     \normalfont     \selectfont}     \makeatletter     \newcommand*{\breakhref}{}     \DeclareRobustCommand*{\breakhref}{%       \begingroup       \hyper@normalise\breakhref@     }     \newcommand*{\breakhref@}[2]{%       \endgroup       \SOUL@setup       \def\SOUL@everyspace##1{%         ##1%         \dimen@=\fontdimen2\font         \advance\dimen@ by \fontdimen3\font         \cleaders\hbox to \dimen@{%           \hss           \href{#1}{\ \vphantom{#2}}%           \hss         }\hskip\dimen@\relax         \hspace{-\fontdimen3\font             plus \fontdimen3\font minus \fontdimen3\font}%       }%       \def\SOUL@everysyllable{%         \href{#1}{\the\SOUL@syllable\vphantom{#2}}%       }%       \def\SOUL@everyhyphen{%         \discretionary{-}{}{}%       }%       \def\SOUL@everyexhyphen##1{%         \SOUL@setkern\SOUL@hyphkern         \href{#1}{##1\vphantom{#2}}%         \discretionary{}{}{%           \SOUL@setkern\SOUL@charkern         }%       }%       \SOUL@{#2}%     }     \makeatother     \author{mario \\ v. 0.1}     \title{Test}      \date{\today{,} \currenttime}      \begin{document}     \maketitle     \begin{abstract}     \end{abstract}\pagestyle{fancy}     \fancyhead{}     \fancyfoot{}     \fancyhead[LO,RE]{{\footnotesize  Draft Compilation: \today{,}     \currenttime{.}}}     \fancyhead[RO,LE]{\thepage\ }           \breakhref{http://ru.wikipedia.org/wiki/\textcyrillic{Елена{\_}Стасова}}{     http://ru.wikipedia.org/wiki/\textcyrillic{Елена{\_}Стасова}}          \end{document}


title: Recommendations for substitution of non-free fonts with LaTeX typefaces?

text: I'm trying to create a LaTeX template for reports we use in our organization. The original template is in `.doc` format, and uses a few non-free fonts, specifically **Gill Sans**. I'm looking for a LaTeX font that is a close match for this. There's no need for it to be a perfect replacement, as it won't be used for copyrighted materials such as logos, but still should be difficult to distinguish from the real thing for non-specialists. To generalize the question a bit: `Is there some sort of a recommendation engine for font substitution using LaTeX typefaces?` Ideally, choose a font, and get some reasonably good substitutes that are readily available on, say CTAN.


title: Missing $ inserted

text: I am new to latex. I am trying to compile someone else's document. I have all the correct packages installed, but I get the following error:               *Overfull \hbox <37.8394pt too wide> in paragraph at lines 26-37       [][]       ! Missing $ inserted       <inserted text>       1.39 Lines 14, 15 in vc_                                 value are bottleneck       ?*        Here are the lines that are referenced in the error message. I understand that one of the lines is too long, but I'm not sure about how to fix it. Thanks a lot for your help.               \begin{table*}[h]     \caption{Functions}     \begin{tabular}{lll}      Name & Description & Potential      \\ \hline  \texttt{c\_w.m} &  gives relationship between $W$ and $C$      \\  \texttt{compute\_pi\_min} &  Compute $\pi_{min}$ & gradient      \\  \textbf{\texttt{criterion.m}} &  Compute RSS; steps 1-10(?)      \\  \texttt{irr\_equation.m} & no idea\dots & none      \\  \texttt{pi\_min\_equation.m} &  uses \texttt{vc\_value.m} & none      \\  \texttt{pi\_min\_equation\_solo.m} &  computes optimal value of solo project &          quadrature      \\  \texttt{solo\_value.m} &  computes optimal value of solo project & quadrature      \\  \texttt{vc\_value.m} &  computes optimal value of a project to VC & quadrature \\      \end{tabular}      \end{table*}      Lines 19, 44, 45 are bottlenecks in criterion.m -- criterion.m takes 75 percent of   time\\      Lines 14, 15 in vc_value are bottlenecks


title: Trouble using xstring to edit input parameter strings

text: I am trying to use `\StrDel` to modify a parameter to use within a command. For example, say my `.tex` file contains:               \command{Word Anotherword}      and the `.sty` file I reference contains:               \newcommand{\dosomething}[1]{          \some{#1}          \thing{\StrDel{#1}{ }}          }      I want it so when the command is called, the commands it contains are called as follows:               \some{Word Anotherword}          \thing{WordAnotherword}      So, in the second command `\StrDel` is used to delete the spaces in the parameter. But this keeps generating an the following error:               Use of \@item doesn't match its definition. \new@ifnextchar ...served@d = #1\def \reserved@a {#2}\def \reserved@d {#3}\f...      Have I made a mistake? And if not, is there a solution?


title: PicTeX files inside a Plain TeX file

text: I am using Plain TeX to write my (scientific) texts which usually include many awful equations and graphs (or figures) I am constructing with unsurpassed PicTeX. My big problem is that with my MikTeX version I cannot input more than two `\input pictex` in one Plain TeX file (at the third pictex call the file cannot be texified and blows out). So I have to write a separate file for each extra graph above two, to output their pdf file, and to merge at the end all the pdf with the defect that the extra figure files are at the end of the text (and not in the body of the text as for usual texbooks). Is there a way to set TeX parameters so that more than two pictex calls can be made in one Plain TeX file? Thanks for solution (If you insist that I have to run LaTeX, I am not really a big fan because LaTeX is relatively limited).


title: Any LaTeX video tutorial recommendations for Mac users?

text: I dive into LaTex world for a time, although I try my best to read _More Math Into LaTeX_ come along with TeXShop, there are still lots of gaps uncovered. I did search them on Lynda.com and I find nothing, so, any LaTeX video tutorial recommendations for Mac Users?


title: Function like macro?

text: If you have programmed in a high level programming language, you must be familiar with the concept of functions, subroutines which return a value. For example, if you write in C, you can write a function to compute the absolute value of an integer parameter               int abs(int a) {          return a > 0 ? a: -a;      }      You can invoke this function, assigning its result to a variable, by writing e.g.,               int v = abs(a)`      Furthermore, you can use the returned value directly, without assigning it to a variable, e.g.,               abs(abs(a)-abs(b))      What's the closest you can get to this with TeX programming? The challenge is in minimizing the coupling between the caller and the callee. Of course, since TeX is primarily about characters and textual tokens, a more natural example would be something of the sort of the chain of function calls in:               int ispalindrome(const char *s) {        return strcmp(s, strrev(s)) == 0;     }


title: Problem with documentclass memoir + pgfplots from data file

text: I'm using the documentclass `memoir` and I want to make a plot from a `file.dat` of two rows, nothing special. But I keep getting that `pgfplots` could not open the file. The point is that if I make a new document (`article`) the plot is generated without problem. This is the code that works with `article` but not with `memoir`:               \begin{tikzpicture}     \begin{axis} []     \addplot[] file{pdf.dat};     \end{axis}     \end{tikzpicture}      Can somebody explain me what is happening?


title: Error when using tabular environment

text: I'm trying to create a simple table, but it just won't compile. Here's a sample bit of code:               \documentclass[11pt]{article}     \usepackage{amsmath, amssymb}     \usepackage{calc}     \usepackage{array}     \usepackage{booktabs}          \newcommand\Q{\ensuremath{\mathbb{Q}}}          \begin{document}          \begin{table}     \begin{center}     \begin{tabular}{l@{\hspace{28pt}}l@{\hspace{28pt}}p{\widthof{$\Q^2$}}@{\hspace{5pt}}p{\widthof{$\Q^2$}}@{\hspace{5pt}}p{\widthof{$\Q^2$}}@{\hspace{5pt}}p{\widthof{$\Q^2$}}@{\hspace{5pt}}p{\widthof{$\Q^2$}}@{}}     $2$ & $1$  & $0$ &     &      &     &        \\     $3$ & $3$  & $0$ & $0$ & $0$  &     &        \\     $4$ & $6$  & $0$ & $0$ & $\Q$ & $0$ & $0$    \\     $5$ & $10$ & $0$ & $0$ & $0$  & $0$ & $\Q$   \\     $6$ & $15$ & $0$ & $0$ & $0$  & $0$ & $\Q^2$ \\     $7$ & $21$ & $0$ & $0$ & $0$  & $0$ & $\Q$   \\     \end{tabular}     \end{center}     \end{table}          \end{document}      When I try to compile this, I get a sequence of errors that look like the following:               ! Missing control sequence inserted.     <inserted text>                      \inaccessible      l.14 $2$ & $1$  & $                        0$ &     &      &     &        \\      What am I doing wrong?


title: Vertical Line Length in Table

text: I am practicing LaTeX by recreating tables from one of my professor's textbooks. I came across an example I can't recreate entirely. The problem is that vertical lines in between cells of the table are not complete. This is particularly perplexing to me because it seems the leftmost vertical line is unaffected by whatever is affecting the center vertical line(s). My syntax follows:               \documentclass{article}     \begin{document}     \begin{table}     \begin{tabular}{c|c|c}     \hline     \\[1pt]     &\multicolumn{2}{c}{Time of Occurrence of Independent and}\\     &\multicolumn{2}{c}{Dependent Variables}\\     \\[1pt]     \hline     \\[1pt]     &Prior to Initiation of Study&After Initiation of Study\\     \\[1pt]     \hline     \\[1pt]     Subject Classified on Basis&Retrospective cohort study&Prospective study (follow-up\\     of Independent Variable&(historical cohort study)&study, longitudinal study,\\     &&cohort study)\\     \\[1pt]     \hline     \\[1pt]     Subject Classified on Basis&Case-control study&\\     of Dependent Variable&(case-referent study)&\\     \\[1pt]     \hline     \end{tabular}     \end{table}     \end{document}      ![output](http://i.imgur.com/TUwSP.jpg)


title: "+" sign in international phone numbers

text: I want a smaller "+" sign in international phone numbers. For example if I write               +1-123-456-7890      it gives ![+1-123-456-7890](http://i.stack.imgur.com/33ooz.png) where "-" signs are all okay (not pretty though), but the "+" sign looks too big. How can I make it smaller? Is there any special symbol in LaTeX?


title: Typesetting inline Penrose/Cvitanovic tensor diagrams (birdtracks)

text: In the 50's, Roger Penrose invented a private graphical notation for tensors, which he later published. Wikipedia has a short description. It's basically a directed graph with some labels on it and some external edges. Predrag Cvitanovic has a modified version which is more amenable to typesetting, because he uses arrows rather than depending on "gravity" to give the direction of the edges, so it's easier to lay out as an inline or displayed equation. Penrose uses geometrical shapes for the nodes his diagrams, but I would be just as happy using letters. With Cvitanovic's convention I can do simple examples as inline tex math, e.g., `\rightarrow\bigoplus\rightarrow\bigodot\leftarrow`, or `\rightarrow u\rightarrow v\leftarrow`. (For the geometrical versions, it would be nice to have large squares, circles, and triangles, the size of `\bigoplus` \--- is there any way to produce these? Things like `\nabla` seem too small.) What would really be nice would be a way to typeset slightly more complex examples as latex math. Here are two examples using letters in the nodes: ![samples of birdtracks](http://i.stack.imgur.com/3IH2f.jpg) Examples like the top one are clearly doable with symbols like `\rightleftarrow`. I'm wondering if it's possible to get some of the fancier features such as the circle and loop in the second diagram, or the kinds of crossbars and wiggly crossbars shown in the WP article. The diagrams are somewhat related to Feynman diagrams, so it seems like maybe it could be done with one of the packages used for drawing those, but those seem more oriented toward drawing larger and more inescapably 2-D diagrams, and it's also not obvious to me which package is the best and most modern. [EDIT] See also: http://mathoverflow.net/questions/25187/resources-for- graphical-languages-penrose-notation-feynman-diagrams-birdtra