title: Vertical spacing around theorem environment

text: Consider this answer from karlkoeller:               \documentclass[danish]{article}          \usepackage{babel}     \usepackage{color}     \usepackage{amsthm,thmtools}          % Colors.     \definecolor{section_color}{rgb}{0.35,0.0,0}     \definecolor{MyGray}{rgb}{0.96,0.97,0.98}          % Defining common style.     \declaretheoremstyle[       spaceabove = 6pt,       spacebelow = 6pt,       headfont = \color{section_color}\sffamily\bfseries,       notefont = \mdseries,       notebraces = {(}{)},       bodyfont = \normalfont,       postheadspace = 1em,       qed = ,     ]{mystyle}          % Defining theorem environment.     \declaretheorem[       style = mystyle,       name = S{\ae}tning,       shaded = {         bgcolor = MyGray,         padding = 2mm,         textwidth = 0.98\textwidth     }     ]{theorem}          % Defining claim environment.     \declaretheorem[       sibling = theorem,       style = mystyle,       shaded = {         bgcolor = MyGray,         padding = 2mm,         textwidth = 0.98\textwidth       }     ]{claim}          \makeatletter     \renewenvironment{proof}[1][\proofname]{\par       \pushQED{\qed}%       \normalfont \topsep6\p@\@plus6\p@\relax       \list{}{\leftmargin=1.25mm\itemindent=20pt\linewidth=0.975\textwidth%       \item[\hskip\labelsep             \color{section_color}\sffamily\bfseries        #1\@addpunct{.}]\ignorespaces}     }{%       \popQED\endlist\@endpefalse     }     \makeatother               \begin{document}          \begin{theorem}[Eulers identitet]     $e^{i\pi} + 1 = 0$.     \end{theorem}          \begin{proof}     Brug Eulers formul; $e^{ix} = \cos x + i\sin x$.     \end{proof}          \begin{proof}[Bevis for Fermats sidste S{\ae}tning]     Sp{\o}rg Sir Andrew John Wiles.     \end{proof}          \end{document}      ![output](http://i.stack.imgur.com/R1OUP.jpg) As can be seen in the screenshot, the vertical spacing around the theorem environment is bigger than the spacing around the proof environment; how do I change it to be the same?


title: Resize characters in figure caption

text: I frequently use `\scalebox` from the `graphics` package in math-environment as $x^{ \scalebox{0.55}{(n)} }_{i}$ which works fine. However, I am not able to use the same sequence in a figure caption:               \begin{figure}       test       \caption{test $x^{ \scalebox{0.55}{(n)} }_{i}$}     \end{figure}      The error message follows:               ! Argument of \@caption has an extra }.     <inserted text>                       \par      l.20 ...ion{test $x^{ \scalebox{0.55}{(n)} }_{i}$}          Runaway argument?     \@captype {\Gscale@box {0.55}}\def \reserved@b {\Gscale@box {0.55}[0.\ETC.     ! Paragraph ended before \@caption was complete.     \<to be read again>                          \par      l.20 ...ion{test $x^{ \scalebox{0.55}{(n)} }_{i}$}      Same errors appear when `\scalebox` is used outside the math environment in standard text. Is there an alternative to resize parts of the caption text, in particular in the math environment? %% ---------- Edit: Solution in minimal example ----------------------               \documentclass[letterpaper,10pt]{article} % usually I am working with IEEEtran     \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \begin{document}          $x^{ \scalebox{0.55}{$(n)$} }_{i}$ % in standard text               \begin{figure}  % using \protect as suggested by Herbert       test       \caption{test $x^{ \protect\scalebox{0.55}{$(n)$} }_{i}$}     \end{figure}          \begin{figure}   % without \scalebox as suggested by egreg and tohecz        test        \caption{test $x^{ \scriptscriptstyle(\!n\!) }_{i}$}     \end{figure}          \end{document}


title: IEEEeqnarray: How can I force the number to follow the sections?

text: When using `IEEEeqnarray`, the numbering of the equations starts at 1. I would like the numbering to follow the sections. For instance, an equation in section 1 will go 1.1, 1.2, ... Is there something I need to add to the preamble to achieve the desired result?               \documentclass{article}     preamble     ....     \usepackage{amsmath}     \usepackage[retainorgcmds]{IEEEtrantools}     \usepackage{hyperref}     \begin{document}     \begin{IEEEeqnarray}{rCl}      & &     \end{IEEEegnarray}     \end{document}


title: Can you change the opacity in surfaces/plots in PSTricks pst-3dplot?

text: Can you change the opacity in surfaces/plots in PSTricks pst-3dplot ?               \documentclass[%       pstricks,%       border=12pt%     ]{standalone}          \usepackage{pst-3dplot}          \begin{document}          \begin{pspicture}(-3,-1.5)(3,4)     \pstThreeDCoor[%       xMin=-4,%       xMax=4,%       yMin=-4,%       yMax=4,%       zMax=3,%       arrows=<->%     ]     \psplotThreeD[%       plotstyle=line,%       linecolor=blue,%       yPlotpoints=40,%       xPlotpoints=30,%       linewidth=0.5pt,%       hiddenLine=true%     ](-2,2)(-2,2)     {       x 100 mul cos y 100 mul sin sub     }     \rput[tl](-2,3.5){$f(x,y) = \cos(100x) - \sin(100y)$}     \end{pspicture}          \end{document}


title: How to align the middle of some words

text: I want to align the middle of a "word" with something else. Let me explain. The following is what I have.               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align*}     a&:=b\\     c&=d     \end{align*}     \end{document}      This looks okay, but I really want the two equal signs to be what we are aligning. So the obvious thing to do is to more the `&` to the other side of the `:`, as follows.               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align*}     a:&=b\\     c&=d     \end{align*}     \end{document}      But, of course, this was never going to work! You end up with a space between the colon and the equals sign, `: =` as opposed to `:=`. So you see my problem...


title: LatexIt compile very slow

text: Is it possible to increase the compile speed for LatexIt? It takes about 5 second for me to compile, even for an empty document. ![enter image description here](http://i.stack.imgur.com/qODP5.gif)


title: Change separator of multiple authors in references using BibTeX

text: I am working on my master thesis and I have problem with citing multiple authors. The separator in pdf is "and", but this is not correct in my language. Is there a **simple** solution to change this separator? Thanks for every answer here is MWE:               \documentclass{article}     \usepackage[numbers]{natbib}          \begin{document}       blba bla bla bla bla bla bla \cite{x}            \bibliographystyle{plain}       \bibliography{references}     \end{document}      It produces results like: ![the "and" shouldn't be there](http://i.stack.imgur.com/sLWo5.png)


title: dcolumn with alignment to comma

text: this is supposed to be an easy question, but I didn't find a clear answer anywhere. I want to use `dcolumn` with comma as a separator. However, I found different solutions and the manual is unclear to me. It says in `D{>sep.tex<}{>sep.dvi<}{>decimal places<}`, I have to choose ',' instead of '.' to achieve alignment to the comma. However I dont understand the difference between `{>sep.tex<}` and `{>sep.dvi<}`. Also I found a solution where someone only used `{>sep.dvi<}` as a comma, whereas the manual suggests to use comma in both, `{>sep.tex<}` and `{>sep.dvi<}`. Can someone explain the difference and tell me how to specify it correctly? MWE simple as that: `\newcolumntype{G}{D..{2.1}}` - where `G` currently aligns to the decimal point, not the comma, in case of 2 decimal places before the separator and 1 after. Thanks.


title: Circuitikz Current Source

text: I'd like to know if it is possible to place a current source that looks like the following: ![Current source](http://i.stack.imgur.com/O7Lqk.jpg)


title: Left margin flush for itemize's item labels in LaTeX

text: I am trying to get the item label to flush with the left margin of the page width within `itemize`, i.e.: This is my sentence. Here are my items:   1. ITEMNAME      * notice my list definition is indented   2. ITEMNAME      * but my item labels are all flush with the left margin and not sticking out of it  Note I am using `\item[ITEMNAME] \hfill \\\` to create a definition style item with a linebreak between keyword and definition, as demonstrated above. How can I get the desired flush that only affects the item's label?


title: Make PhD citations say "dissertation" rather than thesis

text: At my school, PhD works are generally referred to as dissertations rather than theses. My bibtex file has this entry:               @phdthesis{Alsolami2012Auth,         title    = {An examination of keystroke dynamics for continuous user authentication},         school   = {Queensland University of Technology},         author   = {Alsolami, Eesa},         year     = {2012}, %other attributes omitted     }      And it gets rendered as:               [2] Eesa Alsolami. An examination of keystroke dynamics for continuous user authentication.     PhD thesis, Queensland University of Technology, 2012.      Is there any way to make it say "PhD dissertation" rather than "PhD defense"? On another note, why is this the default in LaTeX? Would it be unusual or poor form to change it? Edit: I'm using the `plain` bibliography style. I could probably use `ieeetr` as well:               \bibliographystyle{plain}     \bibliography{myBibFile1,myBibFile2}


title: UTF8 for listings

text: With German umlauts I have to define these characters (Typesetting UTF8 listings with German Umlaute) and the following MWE is working:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{listingsutf8}     \lstdefinelanguage{rawtext}{}     \begin{document}     \lstset{extendedchars=true,language=rawtext,basicstyle=\ttfamily,literate=%         {Ä}{{\"A}}1%         {Ö}{{\"O}}1%         {Ü}{{\"U}}1%         {ä}{{\"a}}1%         {ö}{{\"o}}1%         {ü}{{\"u}}1%         {ß}{{\ss}}1%     }           \lstinputlisting{test.txt}      \end{document}      With content of `test.txt` like:               ÄÖÜäöüß     abcd-1234      However, what can I do for real UTF8 support. I've created a directory with some international UTF8 filenames. They were displayed with a GUI ![enter image description here](http://i.stack.imgur.com/sVbrV.png) and also within a UTF8 compatible shell (bash):               logo.jpg     الجزيرة.نت.html     חדשות, ידיעות מהארץ והעולם - עיתון הארץ.html     Βικιπαίδεια.html     Администрация Президента Грузии.html     საქართველოს პრეზიდენტის ადმინისტრაცია.html     深圳航空有限责任公司 官网订票享受票价直减！.html     航空券 予約・空席照会・運賃案内・国内線｜ANA.html      But if the output of the `ls` command is in the file `test.txt`, the document can not be compiled, because I get errors like               ! Package inputenc Error: Unicode char \u8:�\lst@FillFixed@ not set up for use      with LaTeX.      I'm looking for a rock solid solution to input generated files. As there is no definition, what kind of characters in the source file is used, all kind of UTF8 characters should be possible to use.


title: Convert a latex command with parameter into a two begin end commands without parameter

text: I have defined a command               \newcommand{\CV}[1]{\parbox[c]{0.2\textwidth}{\begin{flushleft}#1\end{flushleft}}}      which I obviously have to call like               \CV{My text}      However I rather would like to use two separate commands **without** parameters (my reason is in endnote [*]), so that the call sequence looks like:               \beginCV My text \endCV      How can I define these commands, so that the `\parbox` gets appropriately "opened" and "closed". * * * [*] _I use`pandoc` to convert markdown documents to LaTeX or HTML, and I tweak the LaTeX output a bit with some helper commands. This does not affect the HTML output, **as long as no text is a parameter to a LaTeX command**._


title: draw a sequence on unimodal map

text: I would like to draw 100 iterates of a unimodal map something like that using tikz. I spend 7 hours trying to do it without success. Perhaps, some of you already done it can help me thank you. slim ![enter image description here](http://i.stack.imgur.com/zv0SU.gif)


title: verbatim text inside italic block

text: I am trying the following:               \begin{frame}[fragile]{OCP en Exceptions}     ``If you throw a checked exception from a method in your code and the     \verb!catch! is three levels above, \textit{you must declare that       exception in the signature of each method between you and       the \verb!catch!}''     \end{frame}      Somehow I can't use the verbatim text inside the italic block. How do I solve this the right way?


title: pgfplots ticks are not applied

text: I am trying to create a 3D plot with custom z-ticks. However I can not create them with starting negative number. It works however as expected when the ticks start at 0. My code is this one               \begin{tikzpicture}     \begin{axis}[view={30}{30},grid=major,        /pgfplots/xtick={0,60,...,300},        /pgfplots/ytick={0,60,...,300},        /pgfplots/ztick={-1.0,0.2,...,1.0},     ]     \addplot3[surf,domain=0:360,samples=40,       colormap/jet,colorbar]       {sin(x)*sin(y)};     \end{axis}     \end{tikzpicture}      with these results (the second with `ztick={0,0.2,...,1.0}`): ![enter image description here](http://i.stack.imgur.com/1wS2c.png) ![enter image description here](http://i.stack.imgur.com/LegEq.png) How do I get correct z-ticks from -1 to 1 with steps 0.2?


title: Translate "Table","Figure", etc. in tufte-latex

text: Recently I discovered the fantastic package `tufte-latex`. I have to write an assignment for college, and I thought that it would be a good idea to use the `handout` class include in this package. It works great, but I have a little problem: I don't live in an English- speaking country, but when I insert the date with `\today` or a table, a figure, etc. with a caption, the output is something like "Table 1: ...", that is, in English. If I use other standard document class such as `article`, the output is in my language. I _think_ that I have to modify the file `tufte-common.def`, but I am not sure, and I don't want to screw it up. Any advice on how to be able to translate this package?


title: Hanging figures in Times

text: I would love to see hanging figures by using the `times` package, but according to docs it is not possible. Typing `texdoc times` in console I was informed that this package is obsolete and it's recommended to use `mathptmx`. I realized that `mathpazo` has `osf` option, but there is nothing like it for `mathptmx`.


title: Defining a newcommand with sub- or superscript and avoiding "double subscript" error

text: I often use shortcuts defined via `\newcommand`. However sometimes it causes a "double subscript" problem if a shortcut contains a subscript and I try to add one more subscript when using it. I am aware of all kinds of workarounds, as illustrated in the example below. But what is the most robust way to define such shortcuts? Example of the code:               \documentclass{article}     % define some shortcuts     \newcommand\xa{x_a}     \newcommand\xb{{x_b}}          \def\cmpto{\quad\textrm{compare to}\quad}          \begin{document}          % this produces a "double subscript" error     %\[  \xa_i   \]          This is a workaround, which produces a good result     \[    \xa{}_i \cmpto x_{ai}    \]          But still not ideal: watch the position of the superscript     \[    \xa{}_i^2 \cmpto x_{ai}^2    \]          The \verb+{x_b}+ below produces no error, but does not look good      (watch the baseline of the subscripts)     %     \[    \xb_i \cmpto x_{bi}    \]          Also superscript does not look good     %     \[    \xb^2 \cmpto x_b^2    \]          \end{document}      ![enter image description here](http://i.stack.imgur.com/rkbi6.png)


title: TikZ example involving Spies won't typeset properly using XeLaTeX

text: The example in this answer, illustrating the use of "spies" using the Tikz package, fails to typeset correctly when using XeLaTeX: the magnification circle appears empty. Using pdfLaTeX and LaTeXmk works fine, otherwise. Do I need to configure my TeX distribution somehow in order to typeset TikZ code using XeLaTeX? (Currently using MacTex 2011 with TeXworks, on OS X Lion.)


title: \span as a math operator

text: I'd like `\span` to be a math operator (for the span of a set of vectors), but apparently it's already a TeX command. What do you guys recommend I do instead? (I don't really want a strange capital `\Span`, or some other odd variant... but I'm guessing it's a bad idea to redefine `\span`?)


title: Underline my name in the bibliography

text: For several documents I'm preparing, I need to highlight (or underline) occurences of my name within the bibliography. Is there an easy way of doing this?


title: Colorization and kerning problem with inline lists

text: The problem is as follows: I need to set an inline list with colored lowercase letters surrounded by black brackets. This is not so hard to achieve, but the problem is that kerning is lost in the process. If I add two colorization commands: one before the letter and one before the right bracket, then the second command (which restores black color) messes the kerning. Same happens with paralist and enumitem 3 alpha (take a look at "f"; with other fonts the letter and the bracket actually overlap):               \documentclass{book}          \usepackage{paralist}     \usepackage{xcolor}          \setdefaultenum{(a)}{(i)}{A.}{A.}          \begin{document}          \begin{inparaenum}     \item first,     \item second,     \item third,     \item fourth,     \item fifth     \item sixth     \end{inparaenum}          \begin{inparaenum}[(\color{red}a\color{black})]     \item first,     \item second,     \item third,     \item fourth,     \item fifth     \item sixth     \end{inparaenum}          \end{document}      Suggestions?


title: Easily aligning 'from' and 'to' address fields in LaTeX letters

text: When you write a letter in LaTeX, you can add your address with the `\address` block, while you have the possibility of adding the recipient address after the `\begin{letter}` statement as an extra argument. However, in such case, your address will always come above the recipient address. Is there a way to tell LaTeX that I want my address to begin in the same line as the recipient's address? Or, more generally, is there a way to control the distances of these fields from the top of the page in a more flexible way? Bonus question: is there a way to tell LaTeX that I don't want to have an extra blank line between my address and the date of the letter? (Or, again, more generally: to fine-tune the distance between the sender's address and the date field?)


title: Same style over the whole document for a specific word

text: I am writing my thesis and I'm looking for a way of displaying the project name with the same style all over the place. More specifically, when I'm writing 'MyProjectName' it should always be printed with bold font (just an example). How can I defined the style for a single word/phrase. Is OK if I need to create a new command for it or something, I just want to avoid copy/pasting the style definition all over the place.


title: Is there a "\nocolumnbreak" analog to \nopagebreak?

text: If I want to prevent latex from putting two (short) paragraphs on different columns, is there something similar to `\nopagebreak` that will let me do this?


title: Titlesec ruins Table of Contents formatting

text: I'm trying to use the `titlesec` package, but somehow section names in the `\tableofcontents` become overlapped with the TOC numbers and subsection names become improperly indented. Here's an example, where I use the standard classes seen here (3.2, p.27) as an example.               \documentclass{amsart}     \usepackage{titlesec}          \titleformat{\section}{\normalfont\Large\bfseries}{\thesection}{1em}{}     \titleformat{\subsection}{\normalfont\large\bfseries}{\thesubsection}{1em}{}          \begin{document}          \tableofcontents     \section{Section Title}     \subsection{Subsection Title}          \end{document}       ![Result](http://i.stack.imgur.com/OoMvN.png)


title: MikTex Installation Error: File name database capacity exceeded

text: When trying to do a complete intallation of MikTex 2.8 the setup wizard returns the following error: The operation could not be completed for the following reason: File name database capacity exceeded. I know this error was posted about here: MikTex 2.9 Installation Error: File name database capacity exceeded. The suggested solution seems to be to use the most recent version of the setup wizard. I want to install MikTex 2.8 (and not 2.9 because 2.9 does not work correctly on my computer), and I am using setup-2.8.3553.exe. How can I find out if there is a more recent version of the 2.8 setup wizard? There don't seem to be any choices given from the download website, it only provides one setup file to use: http://miktex.org/2.8/setup I also know that doing a basic installation instead of a complete installation will work fine, but it would be nice to know if a complete installation is just not possible. Thanks for your help.


title: Sweave won't create PNG images

text: Up to this morning Sweave() was regularly creating images in png format (I used `png=T` as an argument). At some point Sweave would no longer create any PNG image (this is a problem for me 'cause running MikTeX I found tricky managing pdf or eps pics). Now I have checked over any possible modification and inadvertences in the .Rnw file ultimately even retrieving files from my usb that used to work normally yesterday, I have shut off R session many times to reset possible unwanted changes to the settings, `result= nothing`. It is like all of a sudden Sweave would not work properly anymore. I know this does not make sense, in fact is quite odd thing happening to me since! Any suggestion is appreciated PS: Only thing I've been thinking to is me messing around with `getOption(default=)` and `option(default=)`, but as I said I relaunched brand new R sessions several times to be sure normal settings were restored. * * * My R platform is:               R version 2.11.1 (2010-05-31)      i386-pc-mingw32           locale:     [1] LC_COLLATE=Italian_Italy.1252  LC_CTYPE=Italian_Italy.1252        [3] LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C                       [5] LC_TIME=Italian_Italy.1252              attached base packages:     [1] tools     stats     graphics  grDevices utils     datasets  methods       [8] base               other attached packages:     [1] xtable_1.5-6    AICcmodavg_1.14 nlme_3.1-96     aod_1.2                  loaded via a namespace (and not attached):     [1] grid_2.11.1    lattice_0.18-8      I run on MiKTeX 2.9. Consider this trivial example:               % .Rnw file          \documentclass{article}          \usepackage{Sweave}          \SweaveOpts{keep.source=TRUE}          \begin{document}          \title{INTERNAL REPORT}     \date{}          \author{\textbf{Federico Bonofiglio}}          \maketitle          <<echo=F>>=          options(prompt=" ", continue= " ")          <<>>=          x<-rnorm(500,mean=3)          mean(x)          @          \begin{figure}          <<fig=T>>=          plot(x)          @          \caption(ciao)     \end{figure}          @          \end{document}      and the R code is:               setwd("C:\\your folder")               Sweave("prova",png= T, pdf=F)               library(tools)          texi2dvi("prova.tex",pdf=T)      NOTE that the Sweave command above has been working nicely for me up to this morning (i.e. producing PNG files _and_ not EPS or PDF ones). I'm very puzzled and frustrated. It seems like Sweave() has forgot about the PNG option.


title: Customizing theorem environments, eqnarray, and equation

text: I almost always use the following environments: `equation`, `eqnarray` and environments that are defined in the preamble with the command `\newtheorem` (i.e. `definition`, `theme`, `Theorema`, `proposition` etc ...) for my dissertation. But I would like to customize these environments as follows:   1. having a unified numbering all these environments of the type X.Y.Z where x = "chapter number" y = "section number" z = "number of the subsection"   2. numbering stay to the left of the right environment and not the name I mentioned these environments. Exemple:  > * _*_ "X.Y.Z Theorem " > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > (X.Y.(Z+1)) equation = equation > > X.Y.(Z+2) Definition XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX* _*_   1. do not lose the automatic spacing before or after the environments defined by the command `\newtheorem` (i.e. `definition`, `theme`, `Theorema`, `proposition` etc ...)   2. Did not lose the italic font environments defined by the command `\newtheorem` (i.e. `definition`, `theme`, `Theorema`, `proposition` etc ...)   3. What did not come in with the environment comflito `enumerate`.   4. That I could set the font in the preamble to these environments.


title: Problem with \subfigure

text: I am having some troubles in using `\subfigure` in LaTeX. Here's my code:               \begin{figure*}[t]     \centering       \subfigure[]{\includegraphics[width=0.32\textwidth]{./figure/bos_onto6.png}\label{fig:SGD_1_single}}       \subfigure[]{\includegraphics[width =0.32\textwidth]{./figure/bos_onto7.png}\label{fig:SGD_2_single}}       \subfigure[]{\includegraphics[width =0.32\textwidth]{./figure/bos_onto8.png}\label{fig:SGD_3_single}}       \caption{False negative (FN) rate vs. false positive (FP) rate obtained by varying the threshold $\tau$ in predicting       the GO annotations of \emph{Saccharomyces cerevisiae} (SGD) genes. a) BP: Biological Process, b) MF: Molecular Function, c) CC: Cellular Component GO ontologies.}\label{fig:SGD_single}     \end{figure*}      And here there's the problem that compiler gives to me:               [4]     Overfull \hbox (5.7111pt too wide) in paragraph at lines 689--713      [][]      ! Argument of \Gin@iii has an extra }.     <inserted text>                      \par      l.750 ...e/bos_onto6.png}\label{fig:SGD_1_single}}          ?       Any help? Here's my 2nd minimal NOT working example: it comes from my original file               \documentclass[conference]{IEEEtran}     % Add the compsoc option for Computer Society conferences.     %     % If IEEEtran.cls has not been installed into the LaTeX system files,     % manually specify the path to it like:     % \documentclass[conference]{../sty/IEEEtran}          %\usepackage{hyperref}     \usepackage{color}     \usepackage{amsmath,amsfonts,latexsym,amssymb,euscript,xr}     \usepackage{multirow}     \usepackage[T1]{fontenc}     \usepackage{microtype}     % \usepackage{graphicx} % for pdf, bitmapped graphics files          \def\blu{\color{blue}}     \def\nero{\color{black}}          % 3 Tabelle     % - aree e tempi     % - risultati validazione quantitativa iea e temporali     % - descrizione tabelle iniziali (righe gialle e blu)          % 2 figure ognuna da 3 sottofigure          % Some very useful LaTeX packages include:     % (uncomment the ones you want to load)               % *** MISC UTILITY PACKAGES ***     %     \usepackage{ifpdf}     % Heiko Oberdiek's ifpdf.sty is very useful if you need conditional     % compilation based on whether the output is pdf or dvi.     % usage:     % \ifpdf     %   % pdf code     % \else     %   % dvi code     % \fi     % The latest version of ifpdf.sty can be obtained from:     % http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/     % Also, note that IEEEtran.cls V1.7 and later provides a builtin     % \ifCLASSINFOpdf conditional that works the same way.     % When switching from latex to pdflatex and vice-versa, the compiler may     % have to be run twice to clear warning/error messages.                    \def\x{{\mathbf x}}     \def\A{{\mathbf A}}     \def\a{{\mathbf a}}     \def\ah{{\hat{\mathbf a}}}     \def\e{{\mathbf e}}     \def\u{{\mathbf u}}     \def\At{{\tilde{\mathbf A}}}     \def\Ah{{\hat{\mathbf A}}}     \def\U{{\mathbf U}}     \def\Uh{{\hat{\mathbf U}}}     \def\Vh{{\hat{\mathbf V}}}     \def\V{{\mathbf V}}     \def\V{{\mathbf V}}     \def\S{{\mathbf S}}     \def\Si{{\mathbf \Sigma}}     \def\Sih{\hat{{\mathbf \Sigma}}}     \def\I{{\mathbf I}}     \def\T{{\mathbf T}}     \def\G{{\mathbf G}}     \def\S{{\mathbf S}}     \def\Q{{\mathbf Q}}     \def\W{{\mathbf W}}     \def\one{{\mathbf 1}}     \def\blu{\color{blue}}     \def\rosso{\color{red}}     \def\nero{\color{black}}     \DeclareMathOperator*{\argmin}{arg\,min}               % *** CITATION PACKAGES ***     %     %\usepackage{cite}     % cite.sty was written by Donald Arseneau     % V1.6 and later of IEEEtran pre-defines the format of the cite.sty package     % \cite{} output to follow that of IEEE. Loading the cite package will     % result in citation numbers being automatically sorted and properly     % "compressed/ranged". e.g., [1], [9], [2], [7], [5], [6] without using     % cite.sty will become [1], [2], [5]--[7], [9] using cite.sty. cite.sty's     % \cite will automatically add leading space, if needed. Use cite.sty's     % noadjust option (cite.sty V3.8 and later) if you want to turn this off.     % cite.sty is already installed on most LaTeX systems. Be sure and use     % version 4.0 (2003-05-27) and later if using hyperref.sty. cite.sty does     % not currently provide for hyperlinked citations.     % The latest version can be obtained at:     % http://www.ctan.org/tex-archive/macros/latex/contrib/cite/     % The documentation is contained in the cite.sty file itself.                                   % *** GRAPHICS RELATED PACKAGES ***     %     \ifCLASSINFOpdf      \usepackage[pdftex]{graphicx}       % declare the path(s) where your graphic files are       % \graphicspath{{../pdf/}{../jpeg/}}       % and their extensions so you won't have to specify these with       % every instance of \includegraphics        %\DeclareGraphicsExtensions{.pdf,.jpeg,.png}     \else       % or other class option (dvipsone, dvipdf, if not using dvips). graphicx       % will default to the driver specified in the system graphics.cfg if no       % driver is specified.        \usepackage[dvips]{graphicx}       % declare the path(s) where your graphic files are       % \graphicspath{{../eps/}}       % and their extensions so you won't have to specify these with       % every instance of \includegraphics       % \DeclareGraphicsExtensions{.eps}     \fi     % graphicx was written by David Carlisle and Sebastian Rahtz. It is     % required if you want graphics, photos, etc. graphicx.sty is already     % installed on most LaTeX systems. The latest version and documentation can     % be obtained at:     % http://www.ctan.org/tex-archive/macros/latex/required/graphics/     % Another good source of documentation is "Using Imported Graphics in     % LaTeX2e" by Keith Reckdahl which can be found as epslatex.ps or     % epslatex.pdf at: http://www.ctan.org/tex-archive/info/     %     % latex, and pdflatex in dvi mode, support graphics in encapsulated     % postscript (.eps) format. pdflatex in pdf mode supports graphics     % in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure     % that all non-photo figures use a vector format (.eps, .pdf, .mps) and     % not a bitmapped formats (.jpeg, .png). IEEE frowns on bitmapped formats     % which can result in "jaggedy"/blurry rendering of lines and letters as     % well as large increases in file sizes.     %     % You can find documentation about the pdfTeX application at:     % http://www.tug.org/applications/pdftex                              % *** MATH PACKAGES ***     %     %\usepackage[cmex10]{amsmath}     % A popular package from the American Mathematical Society that provides     % many useful and powerful commands for dealing with mathematics. If using     % it, be sure to load this package with the cmex10 option to ensure that     % only type 1 fonts will utilized at all point sizes. Without this option,     % it is possible that some math symbols, particularly those within     % footnotes, will be rendered in bitmap form which will result in a     % document that can not be IEEE Xplore compliant!     %     % Also, note that the amsmath package sets \interdisplaylinepenalty to 10000     % thus preventing page breaks from occurring within multiline equations. Use:     %\interdisplaylinepenalty=2500     % after loading amsmath to restore such page breaks as IEEEtran.cls normally     % does. amsmath.sty is already installed on most LaTeX systems. The latest     % version and documentation can be obtained at:     % http://www.ctan.org/tex-archive/macros/latex/required/amslatex/math/                              % *** SPECIALIZED LIST PACKAGES ***     %     %\usepackage{algorithmic}     % algorithmic.sty was written by Peter Williams and Rogerio Brito.     % This package provides an algorithmic environment fo describing algorithms.     % You can use the algorithmic environment in-text or within a figure     % environment to provide for a floating algorithm. Do NOT use the algorithm     % floating environment provided by algorithm.sty (by the same authors) or     % algorithm2e.sty (by Christophe Fiorio) as IEEE does not use dedicated     % algorithm float types and packages that provide these will not provide     % correct IEEE style captions. The latest version and documentation of     % algorithmic.sty can be obtained at:     % http://www.ctan.org/tex-archive/macros/latex/contrib/algorithms/     % There is also a support site at:     % http://algorithms.berlios.de/index.html     % Also of interest may be the (relatively newer and more customizable)     % algorithmicx.sty package by Szasz Janos:     % http://www.ctan.org/tex-archive/macros/latex/contrib/algorithmicx/                         % *** ALIGNMENT PACKAGES ***     %     %\usepackage{array}     % Frank Mittelbach's and David Carlisle's array.sty patches and improves     % the standard LaTeX2e array and tabular environments to provide better     % appearance and additional user controls. As the default LaTeX2e table     % generation code is lacking to the point of almost being broken with     % respect to the quality of the end results, all users are strongly     % advised to use an enhanced (at the very least that provided by array.sty)     % set of table tools. array.sty is already installed on most systems. The     % latest version and documentation can be obtained at:     % http://www.ctan.org/tex-archive/macros/latex/required/tools/               \usepackage{mdwmath}     \usepackage{mdwtab}     % Also highly recommended is Mark Wooding's extremely powerful MDW tools,     % especially mdwmath.sty and mdwtab.sty which are used to format equations     % and tables, respectively. The MDWtools set is already installed on most     % LaTeX systems. The lastest version and documentation is available at:     % http://www.ctan.org/tex-archive/macros/latex/contrib/mdwtools/               % IEEEtran contains the IEEEeqnarray family of commands that can be used to     % generate multiline equations as well as matrices, tables, etc., of high     % quality.               %\usepackage{eqparbox}     % Also of notable interest is Scott Pakin's eqparbox package for creating     % (automatically sized) equal width boxes - aka "natural width parboxes".     % Available at:     % http://www.ctan.org/tex-archive/macros/latex/contrib/eqparbox/                              % *** SUBFIGURE PACKAGES ***     \usepackage[tight,footnotesize]{subfigure}     % subfigure.sty was written by Steven Douglas Cochran. This package makes it     % easy to put subfigures in your figures. e.g., "Figure 1a and 1b". For IEEE     % work, it is a good idea to load it with the tight package option to reduce     % the amount of white space around the subfigures. subfigure.sty is already     % installed on most LaTeX systems. The latest version and documentation can     % be obtained at:     % http://www.ctan.org/tex-archive/obsolete/macros/latex/contrib/subfigure/     % subfigure.sty has been superceeded by subfig.sty.                    %\usepackage[caption=false]{caption}     \usepackage[font=footnotesize]{subfig}     % subfig.sty, also written by Steven Douglas Cochran, is the modern     % replacement for subfigure.sty. However, subfig.sty requires and     % automatically loads Axel Sommerfeldt's caption.sty which will override     % IEEEtran.cls handling of captions and this will result in nonIEEE style     % figure/table captions. To prevent this problem, be sure and preload     % caption.sty with its "caption=false" package option. This is will preserve     % IEEEtran.cls handing of captions. Version 1.3 (2005/06/28) and later     % (recommended due to many improvements over 1.2) of subfig.sty supports     % the caption=false option directly:     %\usepackage[caption=false,font=footnotesize]{subfig}     %     % The latest version and documentation can be obtained at:     % http://www.ctan.org/tex-archive/macros/latex/contrib/subfig/     % The latest version and documentation of caption.sty can be obtained at:     % http://www.ctan.org/tex-archive/macros/latex/contrib/caption/                         % *** FLOAT PACKAGES ***     %     \usepackage{fixltx2e}     % fixltx2e, the successor to the earlier fix2col.sty, was written by     % Frank Mittelbach and David Carlisle. This package corrects a few problems     % in the LaTeX2e kernel, the most notable of which is that in current     % LaTeX2e releases, the ordering of single and double column floats is not     % guaranteed to be preserved. Thus, an unpatched LaTeX2e can allow a     % single column figure to be placed prior to an earlier double column     % figure. The latest version and documentation can be found at:     % http://www.ctan.org/tex-archive/macros/latex/base/                    \usepackage{stfloats}     % stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e     % the ability to do double column floats at the bottom of the page as well     % as the top. (e.g., "\begin{figure*}[!b]" is not normally possible in     % LaTeX2e). It also provides a command:     %\fnbelowfloat     % to enable the placement of footnotes below bottom floats (the standard     % LaTeX2e kernel puts them above bottom floats). This is an invasive package     % which rewrites many portions of the LaTeX2e float routines. It may not work     % with other packages that modify the LaTeX2e float routines. The latest     % version and documentation can be obtained at:     % http://www.ctan.org/tex-archive/macros/latex/contrib/sttools/     % Documentation is contained in the stfloats.sty comments as well as in the     % presfull.pdf file. Do not use the stfloats baselinefloat ability as IEEE     % does not allow \baselineskip to stretch. Authors submitting work to the     % IEEE should note that IEEE rarely uses double column equations and     % that authors should try to avoid such use. Do not be tempted to use the     % cuted.sty or midfloat.sty packages (also by Sigitas Tolusis) as IEEE does     % not format its papers in such ways.                              % *** PDF, URL AND HYPERLINK PACKAGES ***     %     %\usepackage{url}     % url.sty was written by Donald Arseneau. It provides better support for     % handling and breaking URLs. url.sty is already installed on most LaTeX     % systems. The latest version can be obtained at:     % http://www.ctan.org/tex-archive/macros/latex/contrib/misc/     % Read the url.sty source comments for usage information. Basically,     % \url{my_url_here}.                              % *** Do not adjust lengths that control margins, column widths, etc. ***     % *** Do not use packages that alter fonts (such as pslatex).         ***     % There should be no need to do such things with IEEEtran.cls V1.6 and later.     % (Unless specifically asked to do so by the journal or conference you plan     % to submit to, of course. )               % correct bad hyphenation here     \hyphenation{op-tical net-works semi-conduc-tor}               \begin{document}          \title{Minimal NOT working example}               % author names and affiliations     % use a multiple column layout for up to three different     % affiliations     \author{\IEEEauthorblockN{Peter Griffin}     \IEEEauthorblockA{University of Quahog}}     \maketitle               \section{Conclusions}\label{conclusion}     \label{conclusion} The conclusion goes here.           \begin{figure*}[t]      \centering        \subfigure[]{\includegraphics[width=0.32\textwidth]{./figure/bos_onto6.png}\label{fig:SGD_1_single}}        \subfigure[]{\includegraphics[width =0.32\textwidth]{./figure/bos_onto7.png}\label{fig:SGD_2_single}}        \subfigure[]{\includegraphics[width =0.32\textwidth]{./figure/bos_onto8.png}\label{fig:SGD_3_single}}     \caption{False negative (FN) rate vs. false positive (FP) rate obtained by varying the threshold $\tau$ in predicting        the GO annotations of \emph{Saccharomyces cerevisiae} (SGD) genes. a) BP: Biological Process, b) MF: Molecular Function, c) CC: Cellular Component GO ontologies.}\label{fig:SGD_single}      \end{figure*}                                        % that's all folks     \end{document}


title: Is there a way to prevent URLs from appearing in \bibentry citations?

text: I'm using Tufte document classes, in which citations appear as sidenotes consisting of the full bibliography entry, using (I believe) `\bibentry`. Many of my bibliography entries contain URLs (and I want them there) but I don't want those URLs to appear in the citations. Is there a way to omit URLs from such citations but keep them in the bibliography? ![Example of citation with unwanted URL](http://i.stack.imgur.com/GjJ85.png) * * *               \documentclass[]{tufte-handout}          \begin{document}          This,\cite{Sarukkai:2005} includes the URL for the citation, which I don't want; thought I do want it in the bibliography.          \bibliographystyle{unsrtnat}     \bibliography{References}          \end{document}      * * *               @article{Sarukkai:2005,     author = {Sarukkai, S},     title = {{Revisiting the 'unreasonable effectiveness' of mathematics}},     journal = {Current science},     year = {2005},     url = {http://www.ias.ac.in/currsci/feb102005/415.pdf},     }


title: Create command that displays input exactly

text: I want to create a command whose argument is used within a `\label{}` command. I also want a boolean switch that turns on/off the display of this label for editing purposes. Here is pseudo-code for what I'd like to do:               \newcommand{\foo}[1]{%       \refstepcounter{foocount}\label{#1}%       ... do other things ... %       \ifthenelse{\boolean{showlabel}}%       {DISPLAY #1}%       {}%       }      The problem is in the `DISPLAY #1` part. I want to display the label no matter what the label contains. For instance, many of my labels have the form "`ex:function_continuous_everywhere`" but the underscores causes math-mode errors. Using variations of `\verbatim` has its own set of issues. Is there a slick way of doing this? I know I could change all my labels, but I'd rather not.


title: Is it possible to embed multimedia (audio or video)?

text: Using TeX/LaTeX is it possible to embed multimedia? If so how?


title: Change the color of the "remark" environment in Beamer

text: I would like to change the color (bg and fg) of the remark environment in a Beamer document. I have setup my document using:               \usetheme{AnnArbor}     \usecolortheme{crane}      I read in some other question that I should use something like:               \setbeamercolor{theorem text}{fg=black}      or something like               \setbeamercolor{block title example}{bg=orange,fg=white}      I have tried both, using `remark` or `rem` instead of `theorem` or `example` to no avail. I have to make it clear that I don't want to create a new environment, as I use Lyx and I need to stick to the default "remark" environment, only modified through the preamble. UPDATE I have checked that Lyx adds the following definitions to the preamble:               \theoremstyle{definition}          \newtheorem*{defn*}{\protect\definitionname}       \theoremstyle{remark}       \newtheorem*{rem*}{\protect\remarkname}       \theoremstyle{definition}       \newtheorem*{example*}{\protect\examplename}       \theoremstyle{plain}       \newtheorem*{fact*}{\protect\factname}       \theoremstyle{definition}       \newtheorem*{problem*}{\protect\problemname}       \theoremstyle{definition}       \newtheorem*{xca*}{\protect\exercisename}      Is this a Lyx related question instead of a Beamer one?


title: biblatex: merge the list of shorthands into the bibliography

text: Using `biblatex`, is it possible to merge the list of shorthands into the bibliography? The goal is to have a single alphabetical list of references, regardless of whether they are cited in shorthand notation or not. For example, the entry for a certain lexicon cited as LIV should appear at 'L-' in the general bibliography, like this: > ... > > Liberman (1982) ... > > LIV = Rix, Helmut et al. (2001): Lexikon der indogermanischen Verben ... > > Luick (1914) ... > > ...


title: How to eliminate excessive vertical space in wrapfigure?

text: Compiling the following document using `xelatex` results in unwanted vertical space above the wrapfigure caption. Removing either the inclusion of the `polyglossia` package or `\centercaption` usage eliminates the problem. However, this is not a viable solution.               \documentclass{article}     \usepackage{polyglossia}     \usepackage{wrapfig}     \usepackage{caption}     \usepackage{lipsum}          \newcommand\centercaption{%       \captionsetup{format=plain,labelsep=newline,justification=centering}}          \begin{document}          \begin{wrapfigure}{r}{2cm}       \rule{2cm}{2cm}       \centercaption       \caption{test}     \end{wrapfigure}          \lipsum[1]          \end{document}      Above document produces ![Image 1](http://i.stack.imgur.com/rtmrA.png) Without `polyglossia` the spacing is correct: ![Image 2](http://i.stack.imgur.com/diikR.png) Is there any other way to eliminate the excessive vertical space **above** the caption? Note that setting the number of lines to be consumed by `wrapfigure` doesn't have any effect.


title: How can I include a title image at the lower part of the title page?

text: I currently have the following page as a title page: ![enter image description here](http://i.stack.imgur.com/aGlpV.png) The left title pages is with `\vspace{10cm}` / `\vspace{5cm}`, the right one without. The upper ones are in A4 page format (for students to print), the lower ones are in A5 format (for professional printing). I think the ones on the left look much better. But I would like to have the space inserted "dynamically" (so that I don't have to change this every time I change the format). How can I do this? This is the source (sources with image):               \documentclass[a4paper,oneside,DIV15,BCOR12mm]{scrbook}     \usepackage{etoolbox}     \usepackage{amsmath,amssymb}% math symbols / fonts     \usepackage{mathtools}      % \xRightarrow     \usepackage{nicefrac}       % \nicefrac     \usepackage[utf8]{inputenc} % this is needed for umlauts     \usepackage[ngerman]{babel} % this is needed for umlauts     \usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf     \usepackage[framed,amsmath,thmmarks,hyperref]{ntheorem}     \usepackage{framed}     \usepackage{marvosym}     \usepackage{makeidx} % for automatically generation of an index     \usepackage{xcolor}     \usepackage[bookmarks,bookmarksnumbered,hypertexnames=false,pdfpagelayout=OneColumn,colorlinks,hyperindex=false]{hyperref} % has to be after makeidx     \usepackage{enumitem}     \usepackage{tabto}     \usepackage{braket}         % needed for \Set     \usepackage{csquotes}       % \enquote{}     \usepackage{subfig}         % multiple figures in one     \usepackage{parskip}        % nicer paragraphs     \usepackage{xifthen}        % \isempty     \usepackage{changepage}     % for the adjustwidth environment     \usepackage{pst-solides3d}     \usepackage[colorinlistoftodos]{todonotes}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7}     \usepackage[arrow, matrix, curve]{xy}     \usepackage{caption}        % get newlines within captions     \usepackage{tikz}           % draw     \usepackage{tikz-3dplot}    % draw     \usepackage{tkz-fct}        % draw     \usetikzlibrary{3d,calc,intersections,er,arrows,positioning,shapes.misc,patterns,fadings,decorations.pathreplacing}     \usepackage{tqft}     \usepackage{cleveref} % has to be after hyperref, ntheorem, amsthm     \usepackage{xspace}   % for new commands; decides weather I want to insert a space after the command          \author{Siehe \href{http://tinyurl.com/GeoTopo}{tinyurl.com/GeoTopo}}     \title{Geometrie und Topologie\\             \vspace{10cm}             \includegraphics[width=0.9\linewidth]{figures/Torus.pdf}}     \usepackage{microtype}          \begin{document}     \pagenumbering{roman}     \setcounter{page}{1}     \maketitle     \end{document}      I thought I could make a full page as title page. But this might cause problems with font size.


title: Check if fontseries exists

text: I want to check if the actual font used has a special fontseries installed, for example:               %check for semibold     \ifx\fontseries{sb} % doesnt work         \def\textsb#1{\fontseries{sb}\selectfont #1}     \else         \let\textsb\textbf     \fi      I would appreciate an answer without use of extra package.


title: IEEEtran's \IEEEoverridecommandlockouts clashes with \maketitle

text: The heading of question says it all.                  \documentclass[conference]{IEEEtran}     \IEEEoverridecommandlockouts           %% INFOCOM 2013 addition:          \makeatletter     \def\ps@headings{%     \def\@oddhead{\mbox{}\scriptsize\rightmark \hfil \thepage}%     \def\@evenhead{\scriptsize\thepage \hfil \leftmark\mbox{}}%     \def\@oddfoot{}%     \def\@evenfoot{}}     \makeatother     \pagestyle{headings}          \usepackage{cite}     \usepackage{url}     \usepackage{bm}     \usepackage{graphicx}     \usepackage{algorithm}     \usepackage[noend]{algorithmic}     \usepackage{subfig}     \usepackage{amssymb, amsmath,graphicx,charter, latexsym}     \usepackage{enumerate}     \usepackage{comment}     \usepackage{verbatim}          \newtheorem{definition}{Definition}     \newtheorem{lemma}{Lemma}     \newtheorem{corollary}{Corollary}     \newtheorem{theorem}{Theorem}     \newtheorem{example}{Example}     %\newcommand{\abs}[1]{\lvert#1\rvert}     \newcommand{\abs}[1]{\lvert#1\rvert}     \newtheorem{remark}{Remark}     \newtheorem{observation}{Observation}     % *** SPECIALIZED LIST PACKAGES ***     %               \allowdisplaybreaks[4]     \usepackage{bbm}          % *** ALIGNMENT PACKAGES ***     %          \begin{document}     \title{\bf{XXX}}     \author{XXX     \thanks{This material is based upon work partially supported by XXX}        \\Department of XXXX        \\Email: \{XXX\}@XXX.edu     }     \maketitle     \end{document}      I am using the `IEEEtran` class for a conference paper. In order to write acknowledgements, I use `\IEEEoverridecommandlockouts`. Unfortunately, LaTeX compilation returns many errors, such as "misaligned tab or misplaced `\maketitle`". What should I do?


title: Including external notes to a latex document

text: I'm often writing scientific papers in collaboration with other authors, using a versioning system (mercurial) to manage the writing. When one of the authors wants to add a remark, we use a slightly enhanced version of `marginpar`. The problem is that in order to avoid to "pollute" the source code, the remark is removed once addressed, which sometimes makes it hard to keep track of the changes (even with mercurial, since revisions are not directly related with remarks). Hence, I was wondering if there exists a way to have "external" notes to a Latex document, that are not in the source code, but can be included at compilation, by way of either absolute reference (e.g., line 140 of file.tex) or relative (e.g., at `\label{lab}`). For instance, I could the following file, in the same directory than introduction.tex: > Note 1, line 237, introduction.tex: This definition does not work in this > special case > > SOLVED by commit 23 > > Note 2, `\ref{def:test}`: This definition still needs to work this special > case > > PENDING When compiling the file introduction.tex, I could indicate to include the previous file, which would automatically add as a marginpar the Note 2, since it's PENDING.


title: No hyphenation of long words in narrow boxes

text: I stumbled across an hyphenation problem which I cannot explain or solve. When I use a narrow box containing a long word with a width longer than the box width, this word is not hyphenated. The following MWE uses the long word `Rechnungsadjunktentochter` with an explicit hyphenation pattern in the preamble. This word is hyphenated in a long text, also when the break points are given in a narrow box locally, but it is not hyphenated automatically. What happens here? And, more important, how can I get my words hyphenated automatically as expected? **UPDATE:** @egregs comments explain what happens. But, still, I would have to insert `\hspace{0pt}` at every first word of every paragraph of every narrow box (and I have MANY of them, partly automatically generated). How can I force TeX to hyphenate the first word of EVERY paragraph (inside an environment) automatically? **UPDATE 2:** The solving answer is given by the latter comments of @egreg to this question.               \documentclass{article}          \hyphenation{%       Rech-nungs-ad-junk-ten-toch-ter     }          \begin{document}          \textit{Works even without the special hyphenation pattern:}\\     bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla Rechnungsadjunktentochter          \bigskip     \textit{Local hyphenation pattern works as expected:}\\     \fbox{\begin{minipage}{3cm}     Rech\-nungs\-ad\-junk\-ten\-toch\-ter     \end{minipage}}          \bigskip     \textit{\bfseries Hyphenation pattern from the preamble does not work as expected:}\\     \fbox{\begin{minipage}{3cm}     Rechnungsadjunktentochter     \end{minipage}}          \end{document}      ![enter image description here](http://i.stack.imgur.com/C0jff.png)


title: Bibliography in German

text: I want to change the bibliography to german. I tried to do this by adding the package `\usepackage{bibgerm}` and changed the `\bibliographystyle{gerplain}`. But when I change these two things I get the Error: **"! Package babel Error: You haven't defined the language German yet"** Without these changes everything in the document works just fine. Can someone help me?               \documentclass[a4paper,      % DinA4     headsepline,                 % Strich unter Kopfzeile     footsepline]{scrreprt}       % Strich über Fußzeile     \usepackage[utf8]{inputenc}  % für Umlaute     \usepackage[ngerman]{babel}  % für Silbentrennung     \usepackage{bibgerm}          \begin{document}     Test, Test \cite{Fertigungstechnik}          \bibliographystyle{gerplain}     \bibliography{literaturverzeichnis}     \end{document}


title: Title page plus table of contents

text: I am writing a paper for my candidacy exam. I am using `book` class, but I want my name and the title to appear on the first page with the Table of Contents instead of appearing in a sepearte page. How can I do that? Any help is appreciated.


title: Type a interlinear text, bi or tri-lingual

text: I need to do an interlinear text. If I understood the problem correctly, I need a macro or format that will treat each word as a three-story fraction. Top store, a number reference, mid store one language,low store another language. But those fractions , as words, must have in the middle store, to be connected,separated with, commas,, colons, etc. And the line is to be justified, so the size of word will influence the size of the line, a decision is to be made on how to justify. do not know if I have been clear.There will be cross references to footnotes, also. Well, page section and cross references do not appear to be very difficult. What seems critical is that "semi-mathematical" treatment of the three-story words... I imagine context or xetex/xelatex to be adequate, but...I expect proper advice


title: Trouble using an image in a Beamer presentation

text: I'm trying to include an image in my Beamer presentation, but I keep getting this error: > !pdfTeX error: /usr/local/texlive/bin/i386-linux/pdflatex (file > ./markov.jpeg): reading JPEG image failed (no JPEG header found) As per the template given on writelatex.com, I'm using the following code to install the image:               \begin{figure}         \includegraphics{markov.jpeg}         \caption{\label{fig 1:}Repeated Iteration of Markov Matrix}     \end{figure}


title: Horizontal spacing after equation

text: I have the following snipped in my LaTeX document:               \begin{align}       \sum_{j=1}^{m}x_{ij} &= 1 \text{ for } i = 1,2,...,n       \sum_{i \in P_k}x_{ij} &\leq 1 \text{ for } j = 1,2,...,m \text{; } \forall k     \end{align}      As you can see, the `=` and `\leq` are aligned, and there is some conditional text after the RHS of each equation. As it turns out, the conditional text is also aligned, but only because both RHS's are equal. If my top RHS was equal to, say, 100 and the bottom was 1, then the conditional text would be offset. I have two questions:   1. How can I align two things at once? I would like the equation to be aligned on the (in)equality, but I also want the conditions to be aligned.   2. How can I keep the equations more-or-less centred on the page, but have the conditional text off towards the right of the page (but still aligned based on their start location. Example: This is what I have now:               a(10i) = b for all i       b(j) = a for all j      however this can happen with the way I have it currently laid out:               a(10i) = b for all i       b(j) = a/10 for all j      notice that the different length RHS pushes the condition off. What I'd like is something like:               a(10i) = b                for all i        b(j) = a/10            for all j      with the equations centred on the page if possible. Also, if I change the conditional text so they're variable lengths, then they should start at the same point:               a(10i) = b                for all i       b(j) = a/10             for all j > 5      Notice that the equations are centred on the page and aligned on the equality, and the conditions are off towards the right, but still aligned from their start location.


title: How to set class options that can have multiple values?

text: Title says it all, but here's an example: the KOMA-Script classes provide the option `toc` which can have multiple values that don't interfere with each other, like values that enable the Bibliography in the TOC and others that just influence the layout of the TOC. When I need several of these values for the class option `toc`, how can I pass them all together to `toc` without having to repeat `toc=` all the time? What I have currently:               \documentclass[toc=listof, toc=bibliography, toc=flat]{scrbook}      Idea of what I'd like to have (but what does not work)               \documentclass[toc={listof, bibliography, flat}]{scrbook}      Is this somehow possible? If yes, how?


title: How to avoid overflow using \IEEEpubid on the first column?

text: I am trying to write a **journal** paper using the **IEEEtran.cls** template. My problem is that the **Publication ID Mark overflows** into my thanks section. This is the bottom of the title page: ![enter image description here](http://i.stack.imgur.com/MIKe4.png) From the documentation of **IEEEtran.cls** we see that: ![enter image description here](http://i.stack.imgur.com/YExJw.png) I included the command `\IEEEpubidadjcol` into the second column. This prevents the overflow in the second column as you can see in my previous image, but lets the first column run freely. I tried including `\IEEEpubidadjcol` into the first column aswell, but that causes compilation errors. Please, could you give me some hint on how to solve this problem without doing something illegal with respect to the IEEE modus operandi? EDIT: As the answer suggests, the problem can be solved using the `\IEEEpubidadjcol` command **twice**. When I tried this, I got an error:               Infinite glue shrinkage found in box being split      In spite of this error a correct pdf is produced. The error goes away when I **do not** include packages **fixltx2e** and **dblfloatfix**.


title: Change selection color in TeXShop

text: I'm working with TeXShop (Mac OS) and I want to change the color of text selection. If I want to search for special words with CMD+F, the program highlights the text in a light gray color... Every time I have to search the selected position, because I couldn't find it immediately. If the selection color were red or something like that, this problem would disappear. Thanks for your help!


title: tikz: Callout shape with arrow?

text: I want to mark various places on a graphic. I would like to use callouts as there are easy to shift around, but I would prefer an arrow instead of the standard tip. Has someone seen some code for this or want to write it?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes.callouts}     \usetikzlibrary{decorations.text}     \usetikzlibrary{positioning}     \begin{document}     \tikzset{markplace/.style=      {rectangle callout,       fill=orange,       callout absolute pointer={#1},       at={#1},       above=1cm         }}          \begin{tikzpicture}     \draw[fill,green] (1,1) circle (1pt);          \node[markplace={(1,1)}] {here};          \node[markplace={(1,1)},below left=2cm and 0.5cm] {and here};          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/tPcBy.png) # Edit I now came up with this code (I will naturally write some wrapper code but haven't decided about the syntax yet): It finds the location of the callout without drawing it. Then draws the arrow from the center, and then the rectangle on top of it.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes.callouts}     \usetikzlibrary{decorations.text}     \usetikzlibrary{positioning}          \begin{document}     \tikzset{markplace/.style=      {rectangle callout,       fill=none,draw=none,       callout absolute pointer={#1},         at={#1},       above=1cm       }}               \begin{tikzpicture}     \draw[fill,green] (1,1) circle (1pt);          \tikzset{shorten >=1pt}          \node[markplace={(1,1)}] (B) {here};       \draw[-latex,thick,orange] (B.center)--(1,1);     \node[anchor=center,at=(B.center),fill=orange,rectangle]{here};               \node[markplace={(1,1)},below left=2cm and 0.5cm] (B) {and here};       \draw[-latex,thick,orange] (B.center)--(1,1);     \node[anchor=center,at=(B.center),fill=orange,rectangle]{and here};               \node[markplace={(0,1)},above left=-1cm and 3cm] (B) {blub};       \draw[-latex,thick, red] (B.center)--(1,1);     \node[anchor=center,at=(B.center),fill=orange,rectangle]{blub};               \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/xdE6n.png)


title: Remove space after command

text: To simplify some text I created some commands. One command has no arguments. It uses math mode but is used inside normal text. I would like to remove any trailing space between the command and following text. This will allow me to simply the call such as `\cmd sometext` instead of `{\cmd}sometext`. Is there any way to create a negative space?


title: Bibtex webpage citations, including journal and title?

text: I'm working on a LaTeX bibliography using `natbib` and `apa-good.bst` that includes a number of web sources, including both websites and newspaper articles published online. Based on other responses on StackExchange, I'm formatting my sources as:               @misc{buckley_new_2012,      title = {In New York's public housing, fear creeps in with the dark},      howpublished = {\url{http://www.nytimes.com/2012/11/03/nyregion/in-public-housing-after-hurricane-sandy-fear-misery-and-heroism.html?pagewanted=all}},      note = {Accessed: 2012-11-19},      journal = {The New York Times},      author = {Buckley, C. and Wilson, M.},      month = nov,      year = {2012}     }      However, it seems that having a value for howpublished represses display of the journal title. How do I get both the URL and the journal title to show up in my bibliography?


title: How to install metafun?

text: How can I install the metafun metapost macros? I have tried to `tlmgr install metafun`, but it cannot find it. Also a search for “ _metafun_ ” on ctan yields only a introductory tutorial on ConTeXt, in Chinese. I remember I’ve had it installed previously, so I did a search for it on my OSX: `find /usr/local/texlive -name metafun\\*`, which listed the file `metafun.mem` from an earlier TLBasic2010 directory hierachy under `texmf- var/web2c/metapost/metafun.mem`. (I am now using TL2012Basic) I thought I could just copy it to my local `texmf` tree under `~/Library/texmf/metapost`, but               mpost --mem=metafun.mem file.mp      says it cannot find it. So I would like to ask a) where can I find it on the internet, and b) where do I put the file so that metapost can find it?


title: Table in LaTeX appearing in middle of next page

text: I've inserted a table in my LaTeX document and have used `\center` to horizontally align it to the centre of the page. However, it's appearing a page after where it should, is both horizontally and vertically aligned to the centre and appears after some text which it should precede. What's going wrong? EDIT: Edited to add a Minimal Working Example (though, given that I don't know what could be causing the problem, I can't guarantee minimality).               \large     \textbf{Section 2}     \\          \normalsize          \textbf{Description of section}.          \begin{figure}[h]     \center     \caption{Sample output}     \includegraphics[width=10cm,height=3cm]{/Users/Matt/Desktop/Figures/2.jpg}     \label{fig:2}     \end{figure}          \textbf{Hello}. Below are the results. \\          \begin{table}[ht]     \caption{Caption}      \center     \begin{tabular}{c c c}     \hline \hline     A & B & C \\     \hline     1 & a & A \\     2 & b & B \\     3 & c & C \\     4 & d & D \\     5 & e & E \\     6 & f & F \\     7 & g & G \\     \hline     \end{tabular}     \end{table}           %Section 2 end          \Large     \textbf{Title}          \large     \textbf{Section 3}     \\


title: How to draw the border of a node using late options

text: I want to create a series of rectangles, each with a different shade. The shade varies from white to black. I want to make the white (first) rectangle visible by drawing its border. My first step is to draw all the rectangles, without any conditional code:               \documentclass{standalone}     \usepackage[rgb]{xcolor}     \usepackage{tikz}     \usetikzlibrary{chains}     \begin{document}       \begin{tikzpicture}[start chain=chroma going below,                   node distance=2mm,                   every node/.style={shape=rectangle,minimum size=1cm},                   ]         \foreach \n [evaluate=\n as \value using 1-\n*0.125] in {0,...,8}         {           \definecolor{tmpc}{Hsb}{0,0,\value}           \draw node[on chain,fill=tmpc] {};         }       \end{tikzpicture}     \end{document}      I tried to replace the `foreach` code with this:                   {           \definecolor{tmpc}{Hsb}{0,0,\value}           \draw node[on chain,fill=tmpc] {}           \ifnum\n=0             (\tikzlastnode) [late options={draw}] % no effect             (\tikzlastnode.east) [draw] -- ++(1cm,0) % drawn correctly           \fi           ; % ends the path         }      Adding `draw` to the node options directly works. Only the `late options` don't behave like I expect them to do - maybe I'm not understanding something here? I have added code to see if the `ifnum` code is actually executed, and it is indeed. Is there a class of options that don't work as `late options`?


title: breaking lines in a matrix/array environment

text: I have a matrix whose entries are quite long and must be broken up across multiple lines. The desired break-points are the `+` operators separating terms in each matrix element. The following code is illustrative of the problem I face: the `+` operators in the second line of each matrix element appear as unary rather than binary operators. Can this be changed? ![enter image description here](http://i.stack.imgur.com/PmPJC.png)               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \[\begin{bmatrix}      a + b &  e + f \\     +c + d & +g + h \\[6pt]      i + j &  m + n \\     +k + l & +o + p \\     \end{bmatrix}\]     \end{document}      I would most prefer if each term was aligned vertically with the corresponding term below it (e.g., `a+b` in vertical alignment with `c+d`), with the additional `+` sign to the left, and properly spaced from the ensuing `c` (i.e., subjected to the spacing that is accorded to binary operators). Also, as a means of clarifying that the top two lines and bottom two lines separately constitute single rows, I introduced whitespace between lines 2 and 3 by adding `[6pt]` after the closing `\\\` of the second matrix line). Is there a better way to selectively introduce whitespace? Lastly, is there a more automated way to achieve line-breaking in a matrix environment, compared to my manual separation of long lines across `\\\` separators? Thanks.


title: How to set default style for arrow tips in TikZ?

text: I am creating multiple TikZ pictures within one document and would like to set the default style of arrow heads for all the pictures to the `latex` style, i.e. like `-latex` does, so that I don't have to do this every time I draw an arrow. I'm new to TikZ, but have searched and must not be choosing the correct terms.


title: Formatting a pgfplot graph. Thicker bars and total width

text: I am creating a stacked barchart with the following code. However, I have some problems.   * How do I set the width, of the whole thing? width= does not do it ...   * How can I get thicker bars?   * How can I get them narrower? Code:               \begin{figure}     \begin{tikzpicture}     \begin{axis}[xbar stacked,     %legend cell align=left,     legend style={legend columns=4,at={(0,-0.2)},anchor=north west,draw=none},     yticklabels={Chromium 16, Firefox 9, Internet Explorer 9, Internet Explorer 8},     xmin=0,     ]     %Chrome   Firefox  IE 9     IE 8     \addplot coordinates     % Transfer     {(0.38,0) (0.07,1) (0.12,2) (1,3)};     \addplot coordinates     % Database     {(6.99,0) (6.99,1) (6.98,2) (6.95,3)};     \addplot coordinates     % Transfer     {(0.04,0) (0.04,1) (0.08,2) (0.23,3)};     \addplot coordinates     % Rendering     {(1.8,0) (2.38,1) (6,2) (14.66,3)};     \legend{Transfer,Database,Transfer,Rendering}     \end{axis}     \end{tikzpicture}     \caption{Performance}     \label{fig:perf}     \end{figure}


title: How can I redefine bold to mean "semi-bold"?

text: I'm using a type family that supports a semi-bold (`sb`) face, and I'd like to use that whenever `\textbf` is called for. How can I redefine `\textbf` to do this? Can I do it on a per family basis, or only for all families in my document at once?


title: XML highlighting - different style for attributes

text: I need to highlight syntax in my LaTeX presentation, so i've found this answer: XML syntax highlighting               \lstdefinelanguage{XML}     {       morestring=[b]",       morestring=[s]{>}{<},       morecomment=[s]{<?}{?>},       stringstyle=\color{black},       identifierstyle=\color{darkblue},       keywordstyle=\color{cyan},       morekeywords={xmlns,version,type},       backgroundcolor=\color{lightgray},       numbers=left,       numberstyle=\footnotesize\ttfamily\color{gray},       numbersep=0.5pt     }      Unfortunately i didn't found any way, how to specify extra style for text in attributes. For example:               <xml>         <person age="22" sex="female">Ann</person>     </xml>      It the case above, `Ann` and `22`, `female` would have the same style... how to separate styles for those two things?


title: smooth pgfplots curve

text: How do I smooth this curve? Tried using gnuplot but its not working.               \documentclass[convert={density=400,outext=.png}]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \begin{document}     \begin{tikzpicture}[scale=1]     \begin{axis}[line width=2,enlargelimits=false,ylabel=Output Power(dBm)     ,xlabel=Control       Voltage(V),     label style={font=\bfseries\Large},     legend style={at={( 0.8,0.2)}, anchor=north west, font=\small},     tick label style={font=\bfseries\large},     grid=major]     \addplot+[no markers, raw gnuplot] gnuplot{plot 'VCO_8hp_2.txt' smooth sbezier;};     \addplot+[no markers, raw gnuplot] gnuplot{plot 'VCO_8hp_2.txt' with points;};     \addlegendentry{$P_o$}     \end{axis}     \end{tikzpicture}     \end{document}      I get the error saying 'Sorry the gnuplot result file could not be found.' My data looks like               Control Frequency     0 152.9     0.2 159.3     0.4 165.2     0.6 170.5     0.8 174.8     1 178.2     1.2 180.5     1.4 182     1.6 183     1.8 183.9     2.0 184.5


I gather that the method for adding arbitrary rich content to Apple's iBooks using iBooks Author is to install a "widget", bit none of the reconfigured widgets support LaTeX. Is there a LaTeX widget for iBooks Author?


title: Changing margins in moderncv

text: I've been working with the `moderncv` package and have hit the limit of my LaTeX skills. I've been trying to shrink the top and bottom margins enough to accomodate about two extra lines, but have had no luck.               \documentclass[11pt,a4paper]{moderncv}          % moderncv themes     \moderncvtheme[blue]{casual}                 % optional argument are 'blue' (default), 'orange', 'red', 'green', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts)          \usepackage[utf8]{inputenc}                   % replace by the encoding you are using          \usepackage[scale=0.8]{geometry}     \recomputelengths                             % required when changes are made to page layout lengths          % personal data     \firstname{first}     \familyname{last}     %\quote{}               % optional, remove the line if not wanted     \address{123 First St}{Somewhere, CA 90210}    % optional, remove the line if not wanted     \mobile{555.555.5555}                    % optional, remove the line if not wanted     \email{me@me.com}                      % optional, remove the line if not wanted     \extrainfo{info} % optional, remove the line if not wanted          \begin{document}     \maketitle          \section{Summary}     \cvline{}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vehicula, justo adipiscing consectetur blandit, leo justo consequat purus, quis consectetur lectus velit in elit. Mauris iaculis dolor at justo commodo porttitor. Aliquam ipsum sem, hendrerit eu laoreet nec, ornare eu lorem. Aenean et mauris magna, at cursus magna. Morbi nisi orci, hendrerit id feugiat in, ornare sed nulla. Suspendisse metus mauris, pharetra sit amet scelerisque nec, tincidunt et magna. Etiam mollis massa et urna laoreet feugiat. Donec vestibulum massa quis massa euismod bibendum. Nam accumsan ullamcorper nulla a sodales. Mauris lorem massa, consectetur at luctus sit amet, tempor ac eros. Sed molestie, quam eu gravida luctus, urna lacus laoreet eros, vitae euismod orci velit eget enim. Integer aliquam pharetra erat ut blandit.}          \section{Technical Skills}     \cvline{A great skill}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vehicula, justo adipiscing consectetur blandit, leo justo consequat purus, quis consectetur lectus velit in elit. Mauris iaculis dolor at justo commodo porttitor. Aliquam ipsum sem, hendrerit eu laoreet nec, ornare eu lorem. Aenean et mauris magna, at cursus magna. Morbi nisi orci, hendrerit id feugiat in, ornare sed nulla. Suspendisse metus mauris, pharetra sit amet scelerisque nec, tincidunt et magna. Etiam mollis massa et urna laoreet feugiat. Donec vestibulum massa quis massa euismod bibendum. Nam accumsan ullamcorper nulla a sodales. Mauris lorem massa, consectetur at luctus sit amet, tempor ac eros. Sed molestie, quam eu gravida luctus, urna lacus laoreet eros, vitae euismod orci velit eget enim. Integer aliquam pharetra erat ut blandit.]}          \section{Experience}     \cventry{2000--present}{Space occupier}{freelance}{San Francisco}{}{%     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vehicula, justo adipiscing consectetur blandit, leo justo consequat purus, quis consectetur lectus velit in elit. Mauris iaculis dolor at justo commodo porttitor. Aliquam ipsum sem, hendrerit eu laoreet nec, ornare eu lorem. Aenean et mauris magna, at cursus magna. Morbi nisi orci, hendrerit id feugiat in, ornare sed nulla. Suspendisse metus mauris, pharetra sit amet scelerisque nec, tincidunt et magna. Etiam mollis massa et urna laoreet feugiat. Donec vestibulum massa quis massa euismod bibendum. Nam accumsan ullamcorper nulla a sodales. Mauris lorem massa, consectetur at luctus sit amet, tempor ac eros. Sed molestie, quam eu gravida luctus, urna lacus laoreet eros, vitae euismod orci velit eget enim. Integer aliquam pharetra erat ut blandit.}          \closesection{}                   % needed to renewcommands     \renewcommand{\listitemsymbol}{-} % change the symbol for lists          \end{document}      I have tried half a dozen things, including `\addtolength` with `\topmargin`, which seems to move the footer up when I subtract length.


title: Table of Contents Spacing

text: How do I place vertical spacing between the chapter header and the first section entry (report document class). For example, I would like: > Chapter 1 Title > > 1.1 Title   >  1.2 Title > > Chapter 2 Title > > 1.1 Title   >  1.2 Title


title: Arguments delimited by blank space in a macro

text: I work on postscript objects and I need to transform lines like               109.8516 58.404 moveto      102.7108 70.7583 88.4258 67.3824 82.4704 64.0235 curveto       or               109.8516 58.404 m     102.7108 70.7583 88.4258 67.3824 82.4704 64.0235 c      in the PGF/TikZ format. I have 20,000 lines and I also need to use as few number of characters as possible. A good solution is to avoid the braces and to keep the blank spaces. Actually, I use the following code:               \def\p#1#2{\pgfqpoint{#1bp}{#2bp}}%      \def\m #1 #2 {\pgfpathmoveto{\p{#1}{#2}}}%     \def\l #1 #2 {\pgfpathlineto{\p{#1}{#2}}}%      \def\c #1 #2 #3 #4 #5 #6 {\pgfpathcurveto{\p{#1}{#2}}{\p{#3}{#4}}{\p{#5}{#6}}}%       with               \m 109.8516 58.404       \c 102.7108 70.7583 88.4258 67.3824 82.4704 64.0235       The problem: I need to use a blank space at the end of each line and I would like to avoid this blank space. Moreover, I'm not sure if my code is correct. Complement: My idea is to create a version of the psvectorian package for PGF/TikZ. I am translating the file `psvectorian.pro` to a file `pgflibraryvectorian.code.tex`. All the vector ornaments are created with the pgf basic layer. Perhaps it's not a good idea and I might try to compress this file. My project is here : pgfvectorian


title: Getting xeCJK package to work with MikTeX

text: I am trying to write Chinese in LaTeX with MikTeX 2.9, and at the moment I am using fontspec, something like the below. However, I have heard good things about xeCJK, and I am considering switching to it instead (not least to improve the looks of punctuation), however, I can't get it to work. This is a document that works right now                  \documentclass[12pt]{scrartcl}              \usepackage{fontspec}         \setmainfont{SimSun}         %\usepackage{xeCJK}              \begin{document}         %\begin{CJK}{UTF8}{SimSun}         你好         %\end{CJK}         \end{document}      , however this document               \documentclass[12pt]{scrartcl}          %\usepackage{fontspec}     %\setmainfont{SimSun}     \usepackage{xeCJK}          \begin{document}     \begin{CJK}{UTF8}{SimSun}     你好     \end{CJK}     \end{document}      gives an `! Undefined control sequence <argument> \tipaencoding` error. Can anyone help me figure out what I am doing wrong?


title: Finding and displaying UTF-8 characters with xesearch

text: The `xesearch` package allows one to replace text with other text. E.g.:               \documentclass{ctexbook}     \usepackage{fontspec}     \usepackage{xesearch}     \SearchList{list1}{newspaper}{book}     \begin{document}         The book costs \$1.     \end{document}      When the document compiles, it reads, "The newspaper costs $1." When I tried other languages (e.g. `\SearchList{list1}{书}{book}`), it prints "The costs $1." (with a blank space where the character should appear), however, the document has no difficulty displaying the same character "书" elsewhere in the document. How can I replace foreign characters? Update: The code manages to successfully replace the characters, however, the lines aren't breaking in the replacement text:               \documentclass[a5paper]{ctexbook}     \pdfpagewidth=148mm     \pdfpageheight=210mm     \usepackage{fontspec}     \setmainfont{Adobe Song Std}     \setCJKmainfont{Adobe Song Std}     \usepackage{xesearch}     \SearchList{list1}{床前明月光，疑是地上霜。举头望明月，低头思故乡。}{poem}     \begin{document}         \Huge         \noindent 床前明月光，疑是地上霜。举头望明月，低头思故乡。 \\         \noindent poem \\     \end{document}


title: What is .tex file in TeX Live for?

text: If I run               kpsewhich .tex      I get               /usr/local/texlive/2013/texmf-dist/tex/latex/tools/.tex      This file belongs to LaTeX core files and is nearly empty:               %%     %% This is file `.tex',     %% generated with the docstrip utility.     %%     %% The original source files were:     %%     %% fileerr.dtx  (with options: `return')     %%      %% This is a generated file.     %%      %% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005     %% 2006 2008 2009     %% The LaTeX3 Project and any individual authors listed elsewhere     %% in this file.     %%      %% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.     %% --------------------------------------------------------------------------     %%      %% It may be distributed and/or modified under the     %% conditions of the LaTeX Project Public License, either version 1.3c     %% of this license or (at your option) any later version.     %% The latest version of this license is in     %%    http://www.latex-project.org/lppl.txt     %% and version 1.3c or later is part of all distributions of LaTeX     %% version 2005/12/01 or later.     %%      %% This file may only be distributed together with a copy of the LaTeX     %% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'     %% without such generated files.     %%      %% The list of all files belonging to the LaTeX `Tools Bundle' is     %% given in the file `manifest.txt'.     %%       \message{File ignored}     \endinput     %%     %% End of file `.tex'.      I guess it has something to do with some > file not found error but I can't find anything about it in `source2e`. So what is it for?


title: How can I edit the ajustable style of the TikZ-circuits.ee.IEC resistor?

text: Good Evening! I want to draw some X-dependent resistor (like temperature-dependent, as shown in the picture [there are some parts in red at this moment]). I have a solution, but I do not think, this is the right way. Is there a possibility, to edit the adjustable style in a simple setting, to get the form as wished? For example, I can kill its arrowhead with the setting:               \tikzset{NoArrowhead/.style={annotation arrow/.style = {> = none}}}      Can I add the tiny red line and a textsymbol in a similar way? BTW: The letter 'vartheta' has not to be a fix symbol, because there could be some other dependences, like voltage-dependence for example, so we need the symbol 'V' _Thank you for reading and for your interest!_ ![enter image description here](http://i.stack.imgur.com/Ccn8i.png) OK, here is my Code - say, what you mean.               \documentclass[margin=5mm]{standalone}     \usepackage{tikz}     \usetikzlibrary{circuits.ee.IEC}     \usepackage{amsmath, amssymb}          %% temp adjustable %%%%%%%%%%%%%%%%     \tikzset{     temp adjustable/.style={     append after command={%     %NEW:     (-2.5\tikzcircuitssizeunit,-1.5\tikzcircuitssizeunit) edge[line to, red]     (-1.5\tikzcircuitssizeunit,-1.5\tikzcircuitssizeunit)      %OLD:     (-1.5\tikzcircuitssizeunit,-1.5\tikzcircuitssizeunit) edge[line to] (1.5\tikzcircuitssizeunit,1.5\tikzcircuitssizeunit)     %NEW     node[red] () at (-0.5\tikzcircuitssizeunit,-1.5\tikzcircuitssizeunit) {$\vartheta$}     }}}     %%%%%%%%%%%%%%%%     %===========     \begin{document}     %===========     \begin{tikzpicture}[circuit ee IEC, font=\sffamily\footnotesize]          \draw (3,0) to  [resistor= {temp adjustable}] (5,0);          \end{tikzpicture}     %===========     \end{document}     %===========


title: Extra spacing before an equation when line nearly breaks

text: I am having difficulty with producing an MWE, but let me describe the issue. I have a large document with tons of equations and run into issues with spacing. Most of the time it is fine, everything looks good; however, precisely when the line immediately prior to the equation is about to break (i.e., the text fills the entire line), the equation is preceded with additional vertical spacing, as seen on the image below. ![Error](http://i.stack.imgur.com/O8ou8.png) Equation (5.15) shows this issue, however (5.16) does not. Since the line before (5.15) is about to break, is there a chance that the extra space is due to an empty line being inserted? I tried reproducing this exact situation to produce an MWE, but `XeLaTeX` makes different line-breaking decisions. As a result I cannot reproduce this precise error. Any clues about the causes of this behavior or ways to avoid it? This is the offending fragment:               particles separately, effectively using $M = 1$, but consider executing the sampling algorithm in an unchanged form, but simultaneously for $M \geq 1$ at a time. At the coarsest level we generate $M$ samples     \begin{equation}      \vec x_{V_m}^j \sim \hat{P}(\vec x_{V_m}^j)     \end{equation}     and perform the conditional


title: Creating an engine in TexShop for nomenclature

text: I am following this guide to create an engine-file for TexShop to facilitate the use of the nomenclature package. However, after invoking the engine, it does not happen anything at all - I get no error messages, nor is a file created. I am using TexShop 3.06 under MacOS Lion and already tried to rule out obvious mistakes (like forgotten return keys etc.). Even if I place echo-commands in the engine file, I get no output. Are there any ideas on how to obtain a working menu entry?


title: Beamerposter and fonts with xelatex/fontspec

text: Has anyone had success with using `beamerposter` and `xelatex`/`fontspec`? I am able to use `fontspec` for normal documents, but when I try with `beamerposter` I keep getting warnings such as > LaTeX Font Warning: Font shape `EU1/pxss/bx/n` undefined (Font) using > `EU1/pxss/m/n` instead on input line 58. > > LaTeX Font Warning: Font shape `EU1/pxss/m/sc` undefined (Font) using > `EU1/pxss/m/n` instead on input line 8. > > LaTeX Font Warning: Font shape `EU1/pxss/bx/sc` undefined (Font) using > `EU1/pxss/bx/n` instead on input line 8. It appears this is due to the size of the poster - I am using the a0 size. I can use the `beamer` themes, eg `\usefonttheme{professionalfonts}` but really would prefer to use a wider variety of fonts.


title: titlesec titlemarks not working with pdfcolparallel

text: As you can see from the screenshot the numbers showing the verse locations in the `titlemarks` only show the very last values which were set. If you comment out the line `\usepackage{pdfcolparallel}` and compile it and use the `R` parameter to skip the warnings, you would see that it works fine. So the `pdfcolparallel` package is breaking this. Would someone please tell me why and how I should fix it? With `pdfcolparallel`: ![enter image description here](http://i.stack.imgur.com/ivya4.png) ![enter image description here](http://i.stack.imgur.com/B7KBN.png) ![enter image description here](http://i.stack.imgur.com/6jbN8.png) without `pdfcolparallel`: ![enter image description here](http://i.stack.imgur.com/X003z.png) ![enter image description here](http://i.stack.imgur.com/MOZb9.png) The following should be run through `XeLaTeX`. MWE:               \documentclass[pagesize=pdftex, fontsize=10]{scrbook}     \usepackage[paperwidth=10cm, paperheight=15cm, top=1.6cm,bottom=0.8cm, left=1cm, right=1cm]{geometry}     \usepackage[pagestyles]{titlesec}     \usepackage{xltxtra}     \usepackage{calc}     \usepackage{pdfcolparallel}          \newcommand\spanishText{El libro de la generación de Jesucristo, hijo de David, hijo de Abraham.}     \newcommand\hebrewText{זֶה סֵפֶר תּוֹלְדֹת הַמָּשִׁיחַ יֵשׁוּעַ בֶּן־דָּוִד בֶּן־אַבְרָהָם׃}          \sloppy          \defaultfontfeatures{Mapping=tex-text}     \setmainfont{Times New Roman}     \newfontfamily\hebrewfont[Script=Hebrew]{Times New Roman}     \newfontfamily\hebrewfontsf[Script=Hebrew]{Times New Roman}          \usepackage{polyglossia}     \setmainlanguage{hebrew}     \setotherlanguage{english}     \setotherlanguage{spanish}          \renewcommand{\thesection}{\arabic{section}}     \renewcommand{\thesubsection}{\arabic{subsection}}          \setcounter{tocdepth}{0}     \setcounter{secnumdepth}{2}          % sets the marks to be used (section and subsection)     \setmarks{section}{subsection}          \newcounter{subsectionfv}%firstverse     \newcounter{sectionfv}%firstverse     \newcounter{subsectionlv}%lastverse     \newcounter{sectionlv}%lastverse          % definition of the page style with required headers     \newpagestyle{Biblestyle}{       \setheadrule{0.8pt}       \sethead[\thepage][\chaptertitle]%     [\thesectionlv:\thesubsectionlv---\thesectionfv:\thesubsectionfv]%     {\thesectionlv:\thesubsectionlv---\thesectionfv:\thesubsectionfv}%     {\chaptertitle}{\thepage}     }          \newlength\spaceBetweenNumberAndText     \setlength\spaceBetweenNumberAndText{0.5em}     \newlength\howwide          \newcommand\defhowwide{         \setlength{\howwide}{\widthof{\Huge{\thesection}}}     }          % sections and subsections formatting     %\titleformat{command}[shape]{format}{label}{sep}{before-code}[after-code]     \titleformat{\section}{}{\Huge{\thesection}}{0pt}{}[\vskip-2.2\baselineskip]     \titleformat{\subsection}[runin]{\scriptsize}{\thesubsection}{1em}{}     %\titlespacing*{command}{left}{before-sep}{after-sep}[right-sep]     \titlespacing{\section}{0pt}{\spaceBetweenNumberAndText}{0pt}     \titlespacing{\subsection}{0pt}{0pt}{1em}          \begin{document}     \mainmatter     \setlength\columnseprule{0pt}     \pagestyle{Biblestyle}     \newlength{\myIndent}     \begin{Parallel}[p]{}{}     \ParallelLText{\noindent\begin{spanish}     \setcounter{section}{0}     \setcounter{sectionfv}{1}     \setcounter{subsectionfv}{1}     \section{} \spanishText     \subsection{} \spanishText     \subsection{} \spanishText     \subsection{} \spanishText     \subsection{} \spanishText     \subsection{} \spanishText     \subsection{} \spanishText     \setcounter{sectionlv}{1}     \setcounter{subsectionlv}{8}%end of page     \newpage     \setcounter{sectionfv}{1}%start of new page     \setcounter{subsectionfv}{9}     \subsection{} \spanishText     \subsection{} \spanishText     \subsection{} \spanishText     \subsection{} \spanishText     \subsection{} \spanishText     \subsection{} \spanishText     \subsection{} \spanishText     \setcounter{sectionlv}{1}     \setcounter{subsectionlv}{15}     \end{spanish}}     \ParallelRText{\noindent\begin{large}\begin{hebrew}     \setcounter{section}{0}     \setcounter{sectionfv}{1}     \setcounter{subsectionfv}{1}     \section{} \hebrewText     \subsection{} \hebrewText     \subsection{} \hebrewText     \subsection{} \hebrewText     \subsection{} \hebrewText     \subsection{} \hebrewText     \subsection{} \hebrewText     \setcounter{sectionlv}{1}     \setcounter{subsectionlv}{8}%end of page     \newpage     \setcounter{sectionfv}{1}%start of new page     \setcounter{subsectionfv}{9}     \subsection{} \hebrewText     \subsection{} \hebrewText     \subsection{} \hebrewText     \subsection{} \hebrewText     \subsection{} \hebrewText     \subsection{} \hebrewText     \subsection{} \hebrewText     \setcounter{sectionlv}{1}     \setcounter{subsectionlv}{15}     \end{hebrew}\end{large}}     \end{Parallel}     \end{document}


title: build a table in latex

text: ![enter image description here](http://i.stack.imgur.com/pMhwY.png) This is my new code but i have a new pb:               \begin{table}[!h]     \begin{center}     \begin{tabular}{l|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|}     \cline{2-11}     &\multicolumn{2}{|p{2.5cm}|} {\bf 100 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 250 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 500 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 750 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 1000 Pages }\\     \cline{2-11}     &\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\     \hline     Nb Pages Publiques &\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\     \hline     Nb Pages Amis \\et leurs Amis &\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\     \hline     Text&\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\     \hline          \end{tabular}     \end{center}          \bf{\caption{Caractéristiques du Réseau 1}}     \end{table}      When I put `Nb pages Amis\\\ et leurs Amis` a line empty is inserted and I want to eliminate this please


title: How can I put some white space between consecutive bigdelim braces in tabular, without inserting space between rows?

text: In one column of a table (using the tabular environment), I have consecutive braces created using the bigdelim package, as in the following:               &\rdelim\}{3}{60pt}[\ S--S--L]     &     &     &\rdelim\}{2}{60pt}[\ L--L]     &      I dislike that the tips of these braces touch, and I want to introduce some white space, but I do _not_ want to introduce extra space between any of the rows. I tried using a non-integer value (e.g. \rdelim}{2.8} etc.) but evidently that doesn't work. Having read the multirow documentation, I thought it might. I am using MikTeX and apparently my version of multirow was packaged in May 2004. If there is an easy solution to this, I would love to hear it. I don't particularly want a complicated workaround. Thanks!


title: how to suppress page number for subfigures in LOF?

text: I am using `tocloft` and `subcaption` package, and I would like to suppreess page numbers and dot line for subfigures in LOF. I know, if one uses `tocloft` and `subfigure` package, this can be done with the next command:               \cftpagenumbersoff{subfigure}      So, I would like to emulate this command with `subcaption` package. The point is that I have all the subfigures done with `subcaption` package, and I would not like to change the code of all them.


title: Changing text area for Table of Contents in Koma Script

text: My friend is just about to submit her Diplomarbeit (German M.Sc.) and she bumped into a tiny corner of Koma-Script. The Table of Contents was just a tiny bit too long. Thus, one chapter was forced into a new page, which seemed quite ridiculous. ![Toc Broken](http://i.stack.imgur.com/XyTuB.png) She tried solving the problem on her own by using the `geometry` package, but that didn't work out (I didn't see her solution). So she called me for help. I knew she was using Koma, and I searched a bit, and bumped into the nice package called `layouts.`. So the question was: how do we change the height for the table of contents in the Koma package? Or more generally: how to control page geometry in the Koma package, when the Geometry package will not help?


title: Wrapping table column headings in -turn- environment?

text: I'm trying to wrap the text in table column headings in the turn environment (from the package -rotating-). Is there a way to perform this using turn or do have to embed a minipage (e.g., ...`& \begin{turn}{60}\begin{minipage}[t]{3cm}\textbf{Returned Surveys}\end{mini page}`... )? Other ideas?   ( ** _note_** : I'm using a statistical program to generate/weave the code into the latex document and putting the minipage code within the turn environment causes other problems with string length -- I'd rather use an alternative to turn or an option in turn to fix the issue). Thanks for any advice! EXAMPLE:               \documentclass{article}     \usepackage{booktabs,rotating,tabularx}     \begin{document}          \begin{table}[htbp]     \centering     \caption{Add caption}     \begin{tabular}{p{7cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}rrrrr}     \textbf{OTP Name} & \begin{turn}{60}\textbf{Initial Email Sent}\end{turn} & \begin{turn}{60}\begin{minipage}[t]{3cm}\textbf{Returned Surveys}\end{minipage}\end{turn} & \begin{turn}{60}\textbf{Survey Reminder Sent}\end{turn} & \begin{turn}{60}\textbf{Response Received from Reminder}\end{turn} & \begin{turn}{60}\textbf{Returned Surveys}\end{turn} \\     \midrule     UAMS Psychiatric Research Institute & x & & x & & x \\     Valley Alliance Treatment Services & x & & x & x & \\     \ldots &&&&&&&\\     \bottomrule     \end{tabular}%     \label{tab:addlabel}%     \end{table}%          \end{document}