title: Is TeX Live 2012 Compatible with LaTeX2HTML 1.71 for LaTeX Codes Like \frac{1}{2} of Fractions?

text: For the following line of LaTeX code:               y=\frac{1}{2}x^2      `LaTeX2HTML 1.71` in my installations of portions of `TeX Live 2012` and an openSUSE-12.3, Linux operating system produced the equivalent of               y=Image x^2      instead of the desired equivalent of y=(1/2) x^2 without the parentheses, with a horizontal fraction line, and with `x` followed by a superscript 2 in the HyperTeXt Markup Language (.html) output file of `LaTeX2HTML 1.71` when opened by the Konqueror Web browser. I have been suspicious that something in my installations of `TeX Live 2012` and openSUSE-12.3 Linux prevented LaTeX2HTML 1.71 from enabling the display of fractions from LaTeX codes such as `\frac{1}{2}`. I request that users of `LaTeX, LaTeX2HTML 1.71`, which is the year-2008 version of `LaTeX2HTML`, and portions of `TeX Live 2012`, especially the software package named `texlive- latex` in the case of an openSUSE distribution of the Linux operating system, try this experiment and report your results and computer environments here:   1. Using a text editor copy and paste the following lines of `LaTeX` code into a blank document in a text editor; and save that file as `MyFile.tex`:              \documentclass[a4paper,12pt]{article}     \usepackage{color,html,makeidx,amsmath,latexsym}     \pagecolor{white}     \setlength{\parskip}{20pt plus 2pt minus 2pt}     \begin{document}     \baselineskip=29pt     \begin{equation}     y=\frac{1}{2}x^2     \end{equation}     \end{document}        2. Execute the following command twice: `latex MyFile.tex`.   3. Execute the following command once: `latex2html -debug -nonavigation -no_math -html_version 3.2,math -split 0 MyFile.tex`. That command should produce a subdirectory called `MyFile` in the directory in which that command was executed. In that subdirectory `MyFile` should be a file named `MyFile.html` produced by the computer program `LaTeX2HTML 1.71`.   4. Double-click on the file `MyFile.html` to have it opened properly in your default Web browser, for example Mozilla Firefox, Konqueror, et cetera.   5. Look at the line which begins with `y=`. Is the next expression the word `Image` or the equivalent of the fraction `1/2` with a horizontal fraction line? If it is `1/2` with a horizontal fraction line, choose option "Failure" or "Success," respectively according to whether you see the equivalent of `y=Image x^2` or `y=(1/2)x^2` with a horizontal fraction line and without the parentheses displayed, and write here: Success on the fraction `1/2` displayed using `TeX Live 2012` in the **___ __ ___ ___** operating system and fill in the blank with your operating system, for example openSUSE 12.2 Linux, Ubuntu-10.0 Linux, et cetera. Failure on the fraction `1/2` displayed using `TeX Live 2012` in the **___ __ ___ ___** operating system and fill in the blank with your operating system, for example openSUSE 12.2 Linux, Ubuntu-10.0 Linux, et cetera. In this way I hope to determine whether `TeX Live 2012` itself or how openSUSE-12.3 Linux "handles" `LaTeX2HTML 1.71` and portions of `TeX Live 2012` causes or caused a problem for `LaTeX2HTML 1.71` in the case of LaTeX- coded fractions in a freshly prepared, `.tex` document. * * * August 20, 2013 After a few weeks of time, gratefully I found what I will call a "workaround" solution for this problem using a clue kindly provided by Bob Tennent. On http://www.tug.org/pipermail/tex-live/2011-November/030599.html on the Internet he wrote, "...in some Linux distributions the latex2html package will _depend_ on a full installation of something hopelessly out-of-date like texlive-2007 or tetex which complicates the installation" (of I think LaTeX2HTML). And at http://www.tug.org/pipermail/tex- live/2011-November/030604.html, continuing in the same "chain" of likely electronic-mail letters, Bob Tennent further wrote, "Installation of latex2html-2008 from the tarball at CTAN" (the Comprehensive TeX Archive Network on the Internet) "does avoid the dependency issues and it's unlikely to need updating." These writings of Bob Tennent gratefully gave me the clue that LaTeX2HTML 1.71, which worked probably well for me with portions of TeX Live 2011, might be incompatible in some way with portions of TeX Live 2012. So in attempting the solution of Bob Tennent I obtained the file latex2html-2012.tgz from a CTAN Web page. Within openSUSE-12.3's Yet another Software Tool 2's (YaST2's) Software Management I deleted the installations of the openSUSE-12.3 software packages entitled "latex2html," "latex2html-doc," and "latex-pngicons." I unpacked the downloaded file latex2html-2012.tgz using the command "tar xvzf latex2html-2012.tgz" in a new folder and followed the instructions in a file entitled "INSTALL," which came within that .tgz file to install what turned out to be LaTeX2HTML 2012 (1.2) in my installation of portions of TeX Live 2012 in an openSUSE-12.3, Linux operating system. The essential commands in doing so were "./configure --prefix=/usr", "make," and "make install". The result was the installation of some executable LaTeX2HTML files in the directory /usr/bin, some shared library files in the directory /usr/shared/lib/latex2html, and some unshared library files in the directory /usr/lib/latex2html, with each of those three directories beginning with the input "prefix" of "/url". After deleting old copies of everything associated with my test file Throwaway29.tex, except the file Throwaway29.tex itself, gratefully the result of executing "latex Throwaway29.tex" twice and "latex2html -debug -nonavigation -no_math -html_version 3.2,math -split 0 Throwaway29.tex" once was that the equivalent of the expression y=(1/2) x^2 without the parentheses and with a horizontal fraction line was properly displayed in the output file ..../Throwaway29/Throwaway29.html when viewed in the Web browser Konqueror (Some problems in displaying other mathematics after similarly processing a different .tex file were rectified by making the minor changes discussed in Appendix II.). Afterwards the new folder into which the file latex2html-2012.tgz, which had been downloaded from a CTAN Web page, had been unpacked could be deleted from my computer's hard-disk drive. The above success shows that LaTeX2HTML 2012 (1.2) can be made to work with portions of TeX Live 2012 in an openSUSE-12.3, Linux operating system (As of August 14, 2013, TeX Live 2013 was not yet available for installation from the standard openSUSE-12.3 repositories for stable openSUSE 12.3. But from Harvey's posting at http://bbs.archlinux.org/viewtopic.php?pid=1299370 on the Internet, there is a possible clue that TeX Live 2013 may have worked with LaTeX2HTML 2008-2, dated July 10, 2013, up to, but not including, the TeX Live 2013 update named texlive-core2013.30962-1. Based on Harvey's joke near the end of his posting there and because that Web page has "linux" in its Uniform Resource Locator [URL], I suppose that Harvey may have been using some distribution of a Linux operating system in the results he reported. He also wrote that he reported his problem with LaTeX2HTML 2008-2 and TeX Live 2013, a problem different from my problem with LaTeX-coded fractions like \frac{1}{2}, as a "bug." I am not certain whether he reported that software "bug" to the developers of TeX Live or to the developers of the distribution of the Linux operating system that he was using at the time he found what he speculated might be a "bug."). Without delving deeply into the computer codes involved, I have two general hypotheses to explain this success: 1) Similar to what Bob Tennent reported for probably an earlier version of LaTeX2HTML and some distribution or distributions of a Linux operating system that is or are unknown to me, perhaps in my case as well there was in some way some kind of a mismatch between LaTeX2HTML 2008 (1.71) and portions of TeX Live 2012 in my installation of the openSUSE-12.3, Linux operating system. 2) In openSUSE 12.3, compared to openSUSE 12.2, I think some changes were made in grouping some software packages together. So perhaps there was a problem on the openSUSE-12.3 side of things that prevented LaTeX2HTML 1.71 from working well with portions of TeX Live 2012. I see short-, intermediate-, and long-term solutions to the general problem of getting LaTeX2HTML to work well with portions of TeX Live in a Linux operating system. The short-term solution is the one I explained in the paragraph two paragraphs above this one that gratefully worked for me in an openSUSE-12.3, Linux operating system and that one could hope might also work in other distributions of the Linux operating system. The intermediate-term solution is to have openSUSE-12.3 developers fix the problem for users of the version of LaTeX2HTML that is supplied to openSUSE-12.3 users from openSUSE-12.3's software repositories (In fact, I have already submitted the problem I mention here in a "bug" report to developers of openSUSE 12.3. I updated that "bug" report with the recent success and some of the other content I report here.). ---If the above hypothesis 1 is correct without any complications from hypothesis 2, the intermediate-term solution might be as simple as openSUSE-12.3 developers changing the version of LaTeX2HTML they supply from their online repositories from the year-2008 to the year-2012 version of it that is available from the CTAN. But the long-term and more general solution for all distributions of the Linux and Windows operating systems which may make use of TeX Live could be to incorporate a recent version of LaTeX2HTML in a recent version of TeX Live and from testing LaTeX2HTML and LaTeX in TeX Live with .tex files containing some mathematical expressions before distributing Tex Live to in that way ensure that LaTeX2HTML within TeX Live will work well with TeX Live. That is what I have recommended to people who use and/or are responsible for TeX Live. The test results I requested to be posted here by other people using LaTeX2HTML 2008 (1.71) and portions of TeX Live 2012 in some operating system other than openSUSE-12.3 Linux could still be interesting. For example, if someone using some version of Ubuntu, Gentoo, or Fedora Core Linux and LaTeX2HTML 2008 (1.71) with portions of TeX Live 2012 installed sees the same problem with the LaTeX code \frac{1}{2} in LaTeX2HTML 2008 (1.71) output that I did, then I would lean toward hypothesis 1 being correct that there may have been some kind of mismatch between LaTeX2HTML 2008 (1.71) and TeX Live 2012 that was not confined to the particular distribution of the Linux operating system.---Or if he instead has the good result of the fraction being properly displayed, then I would lean toward hypothesis 2 possibly being the correct one. Such test results could possibly be interesting to some openSUSE person or people trying to remedy the problem in openSUSE-12.3 Linux that I posted as a software "bug" report. Appendix I: Licensing of LaTeX2HTML 2012 (1.2) For LaTeX2HTML 2012 (1.2) I found license information in the file /usr/share/lib/latex2html/docs/licence.tex in my installation of LaTeX2HTML obtained from the CTAN: "Use and copying of this software and the preparation of derivative works based on this software are permitted, so long as the following conditions are met: \begin{itemize} \item The copyright notice and this entire notice are included intact and prominently carried on all copies and supporting documentation. \item No fees or compensation are charged for use, copies, or access to this software. You may charge a nominal distribution fee for the physical act of transferring a copy, but you may not charge for the program itself. \item If you modify this software, you must cause the modified file(s) to carry prominent notices (a \texttt{ChangeLog}) describing the changes, who made the changes, and the date of those changes. \item   Any work distributed or published that in whole or in part contains or is a derivative of this software or any part thereof is subject to the terms of this agreement. The aggregation of another unrelated program with this software or its derivative on a volume of storage or distribution medium does not bring the other program under the scope of these terms. \end{itemize}" Appendix II: Changes That Were Necessary to Make in LaTeX2HTML 2012 Files to Avoid Some Problems With Images of Some Mathematics Appearing in a HyperText Markup Language File Produced by the Combination of Programs LaTeX and LaTeX2HTML 2012 (1.2) The changes to LaTeX2HTML discussed here have kindly been previously discussed by Shigeharu Takeno. For example, he discussed the changes to the Perl script file latex2html at http://tug.org/mailman/htdig/latex2html/2004-February/002688.html on the Internet. In the file /usr/bin/latex2html I added a ? after each # in lines 16,454-16,455 as follows: $math_verbatim_rx ="verbatim_mark#?math(\d+)#"; $mathend_verbatim_rx ="verbatim_mark#?mathend([^#]*)#"; with, unlike the above lines, no blank line between the above, two, non-empty lines of code. I did not find the file latex2html.pm in LaTeX2HTML 2012 (1.2) and therefore did not make similar modifications within it. I left the following line in the file /usr/share/lib/latex2html/versions/math.pl unchanged: $mathend_mark = "\n${verbatim_mark}mathend000#"; because $mathend_mark is used several times in that file math.pl. I found that commenting out by prepending that line of code with a # was not essential for the successful rendering of mathematical symbols by LaTeX2HTML. And furthermore commenting out that line of code could conceivably result in $mathend_mark being undefined, if the lines using $mathend_mark in that file math.pl are ever reached and if $mathend_mark is not effectively defined for the file math.pl elsewhere within the LaTeX2HTML code. And in the file /usr/lib/latex2html/l2hconf.pm I prepended line 136 with a # as follows: # $DVIPSOPT= ' -Ppdf -E'; . The line 169 of the same file was already prepended with a # as follows: # $DVIPSOPT .= " -Ppdf"; . I left line 151 of the same file unchanged as follows: $DVIPSOPT .= " -E"; .


title: Remove period when cross-referencing a section

text: I'm writing a paper for an IET conference, and they have provided the latex class ecoc02 for formatting. In this format Sections appear with a period after the number:   1. Introduction but when I reference the section, I also get an unwanted period after the reference. Can I easily remove the period when cross-referencing sections? For example:               \documentclass[12pt]{ecoc02}     \begin{document}           \section{Introduction}     This is the introduction, Section \ref{sec:methods} is the methods section. Some conclusions are given in Section \ref{sec:conclusions}.          \section{Methods}\label{sec:methods}     This is the methods section. Section \ref{sec:method1} discusses the first result.          \subsection{Method 1}\label{sec:method1}     This is method 1.          \section{Conclusions}\label{sec:conclusions}     Something profound.          \end{document}      ![enter image description here](http://i.stack.imgur.com/pFN94.png)


title: wileysev document class messes up bmatrix etc. from amsmath

text: Consider the following example using `wileysev`document class (used for books by John Wiley, available in this zip file):               \documentclass{wileysev}     \usepackage{amsmath}          \begin{document}     $\begin{bmatrix} 16 & 19 & 30 & 4 \end{bmatrix}$     \end{document}      which gives ![enter image description here](http://i.stack.imgur.com/HNQLn.png)   1. I am guessing that this is because of all the fudging around with `\@array...` macros that `wileysev.cls` does.   2. How do I restore the default output of `bmatrix`?   3. Does anyone know the right forum to report this bug to Wiley?


title: spot package with pdflatex

text: I need to draw an ellipse around a word in a beamer presentation and I stumbled across the promising Spot package. Unfortunately it does not seem to work with pdflatex and I could not find any hint in the manual. A MWE is               \documentclass{beamer}     \usepackage{spot}     \begin{document}     \begin{frame}       \frametitle{Test}       Blub, \spot<3->[fill=red]{Bla}, blob, \spot(first)[fill=red,color=blue]{blib}, \spot*(second){blib}     \end{frame}     \end{document}      Edit: I included some screenshots. This is how it looks like with latex + dvipdf ![Result with latex + dvipdf](http://i.stack.imgur.com/y3tUy.png) And this is the result with pdflatex ![Result with pdflatex](http://i.stack.imgur.com/mrysT.png) Edit2: My version of pdftex is "pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)"


title: how to cite the numeric reference at beginning of sentence

text: I want to citing the numeric references using BibTeX. Problem arise when I try to cite a reference at the beginning of a sentence. e.g., when I try to cite \citet{TrHe02} at the beginning of sentence the I got "(author?)[1]". Actually the citation should be "Trampert and Heijst [1]". But when I cite the same at end or inbetween the sentence using "citep" or "cite" then I got citation correctly as "[1]". How to get the correct citation as "Trampert and Heijst [1]" at he beginning of sentence?. Below I have given my latex script with content of reference file and file which i have used inside script with the link.               \documentclass[preprint,12pt]{elsarticle}          \begin{document}               \section{Introduction}          \citet{TrHe02}, when I use "citet" then i get the problem, but if cite it as ''citep'' or ''cite'' then i just got the numeric reference.           \cite{TrHe02}, here i used just use cite at the beginning i just got the numeric reference as [1]. Actually i should get as  Trampert and Heijst \citep{TrHe02}. I have manually written Trampert and Heijst.       From here details of the file which i have use while running the script.               In the latex script all this file elsarticle and elasrticle-num are standard which i have taken from website. This is the link          \verb+http://www.elsevier.com/author-schemas/the-elsarticle-latex-document-class+          And the file to be download is elsarticle.zip     I am using elsarticle-template-num.tex, elsarticle-num.bst and      elsarticle.cls     \bibliographystyle{elsarticle-num}     \bibliography{refs}     \end{document}      % refs.bib is my reference file and it contain                @STRING{SCI={Science}}           @article{TrHe02,       AUTHOR ={Trampert, J. and Heijst, H. J. V.},       TITLE  ={Global Azimuthal Anisotropy in the Transition Zone},       YEAR ={2002},       JOURNAL    =SCI,       VOLUME={296},       NUMBER={},       MONTH  ={},       PAGES  ={1297-1299}      }


title: Labeling links, Markdown style

text: In Markdown, you can do               [google.][1]     ...     [1]:http://www.google.com      In LaTeX, I've tried               \href{\ref{1}}{google?}     ...     \label{1}{http://www.google.com}      But that doesn't work, and I'm tired of having long URLs in my document. How do you label and reference a URL?


title: Improve inline fraction style with Quattrocento font

text: I'm using the Quattrocento font in a beamer presentation (which my audience likes a lot) but I have a small problem with inline fractions like 33 1/3, which do not look very good. Specifically the "1" and "3" are placed respectively a little too low and too high, and the fraction looks too "wide". This is the example code you require:               \documentclass{beamer}     \usepackage[sfdefault]{quattrocento}     \usepackage{xfrac}     \begin{document}     \begin{frame}     33\sfrac{1}{3} $33\sfrac{1}{3}$     \end{frame}     \end{document}       The mathmode version looks a bit better but I still don't like it. This happens also with other fractions, 33 1/3 is just an example case. I'm searching for a way to improve the appearance of the inline fraction as specified above: some kind of more compact look. Since this happens a lot, I'd like a solution that does not clutter the code and also something that works both in normal and mathmode. I already tried with nicefrac but I think the output is even worse. I'm open to different approaches like changing the font only for the relevant fractions, as long as the new font doesn't look too different from Quattrocento.


title: Still can't compile with newpx

text: I have the same problem as this question: Cannot compile using the newpx package But the solution there doesn't work for me. After running `updmap` several times I still can't compile even the simple               \documentclass{article}     \usepackage{newpxtext}     \begin{document}     test     \end{document}      I get the error:               !pdfTeX error: pdflatex.EXE (file T1-TeXGyrePagellaX-Regular-lnum-kern-liga--base):     Font T1-TeXGyrePagellaX-Regular-lnum-kern-liga--base at 600 not found      ==> Fatal error occurred, no output PDF file produced!      I tried `updmap --force` and `\--admin` too. I'm using MiKTeX 2.9.


title: Using chapter instead of section number with amsthm

text: I'm trying to number my examples, definitions, theorems, etc. in the form `Chapter#.example#`. However, the `amsthm` package only seems to provide sectional numbering, which I don't like. Does anyone know how to get the correct format of numbering? In the `MWE` the numbering should be: Example 1.1. and Definition 1.1.               \documentclass{book}     \usepackage{amsthm}     \newtheorem{exmp}{Example}     \newtheorem{defi}{Definition}[section]     \begin{document}         \chapter{}             \section{section 1}             \begin{exmp}             \end{exmp}             \section{section 2}             \begin{defi}             \end{defi}     \end{document}      EDIT: I read this might be possible with `thmtools`, but i'd prefer to do it without loading additional packages if possible. Unless it becomes a to complicated solution ofcourse.


title: How to top align all rows in table by keeping fixed width?

text: I am working on a LaTeX table and R, but I am facing some problems concerning column width and alignment.               cat("\\centering","\n")          cat("\\rowcolors{2}{burlywood1}{white}","\n")     cat("\\begin{tabular}{>{\\rule{0pt}{.5cm}}>{\\arraybackslash}m{2.25 cm}>{\\arraybackslash}m{2.25cm}c>{\\arraybackslash}m{7.5cm}c>{\\arraybackslash}m{2cm}c}","\n")     #cat("\\hline","\n")     cat("\\rowcolor{goldenpoppy} \\textbf{Col1} &\\textbf{Col2} &\\textbf{Col3} &\\textbf{Col4} &\\textbf{Col5}\\\\","\n")             cat("\\hline","\n")        ![enter image description here](http://i.stack.imgur.com/hC1Nq.png) In the above example `Col1` is bottom aligned while others `Col2`, `Col3`, `Col4` and `Col5` are top aligned. Also how can I keep column width fixed?


title: Output routine and \box255

text: The `\box255` referred to in this question applies only to the container of the latest chunk of the MVL, as cut by the page builder. Now the question: I read somewhere that               \setbox0=\vbox to \vsize{\unvbox255}      may yield an underfull box error even when `\box0` has the same height as `\box255`. The apparent remedy, which seems to be               \setbox0=\vbox to \vsize{\unvbox255\vfill}      doesn’t solve the problem: it may give an overfull box. Is there any reason why underfull and overfull `\box255` aren’t reported? The TeX Book, page 400, simply said nothing is reported in this case. Is it only so that a page may be ejected prematurely?


title: \if@minipage purpose in floats

text: In floating environments such as the captions of figures, LaTeX has a `\global\@minipagefalse`, why is this necessary and what does this switch do?               \long\def\@makecaption#1#2{%       \vskip\abovecaptionskip       \sbox\@tempboxa{#1: #2}       \ifdim \wd\@tempboxa >\hsize         #1: #2\par       \else         \global \@minipagefalse         \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%       \fi       \vskip\belowcaptionskip}


title: Outputting a spread at a time

text: I think I remember Stephan Lehmke writing here somewhere in a comment about outputting a spread at a time instead of page. That got me thinking; does that mean something like:               \output={\shipout\vbox to 2\vsize{\vsplit255 to\vsize\vfil}}      (Does that even make any sense?) What benefits does it have compared to page at a time?


title: How to detect a tab character when processing a literate in lstlistings?

text: In the solution to Making more easy the itemized of item with tabulation system, I am counting up the number of spaces in order to determine the type of leading character to insert. However, if the I replace the leading spaces with a tab character, the solution does not work. If I could detect the tab character in the `literate`, then I could have `\ProcessSpace` increment the counter `NumOfContigousSpaces` appropriately, but I don't know how to test for it? I thought adding `tabsize=4, keepspaces=true` would do the job but this is not quite enough. So I attempted to use `lstag@tabulator` from How to automatically skip leading white spaces in listings, but was not able to get that to work. The code below has a 4 leading spaces before the `W` in the first line and a tab as the leading character before the `W` in the second line. This produces no bullet for the line with a tab: ![enter image description here](http://i.stack.imgur.com/BbXZw.png) The correct output can be seen by using 4 spaces before the `W` in both lines: ![enter image description here](http://i.stack.imgur.com/GJeDW.png) ## Note:   * It appears the posting a code snippet here replaces a tab with 4 spaces. So to use the MWE below you will need to replace the four leading spaces before the `Wxxx` with a `tab` character. ## Code:               \documentclass{article}     \usepackage{pgf}     \usepackage{xstring}     \usepackage{listings}          \newcounter{NumOfContigousSpaces}%     \setcounter{NumOfContigousSpaces}{0}%          \newcommand{\Width}{1}%     \newcommand*{\AddApproriateBulletIfFirstChar}[1]{%         \pgfmathtruncatemacro{\BulletType}{\arabic{NumOfContigousSpaces}/4}%         \IfEqCase{\BulletType}{%             {0}{\gdef\Width{1}}             {1}{\gdef\Width{3}$\bullet$ }             {2}{\gdef\Width{3}$\circ$ }             {3}{\gdef\Width{3}$\times$ }             {4}{\gdef\Width{3}$\star$ }             {5}{\gdef\Width{3}$-$ }         }[\gdef\Width{3}$\bullet$ ]%         #1%         \setcounter{NumOfContigousSpaces}{0}%     }%     \newcommand*{\ProcessSpace}{%         \addtocounter{NumOfContigousSpaces}{1}%         \space%     }%     \newcommand*{\ProcessTab}{%         \addtocounter{NumOfContigousSpaces}{4}%         \space\space\space\space%     }%               \makeatletter     \lstdefinestyle{MyItemize}{%         basicstyle=\ttfamily,         columns=flexible,         tabsize=4, keepspaces=true,          literate=%             {\ }{{{\ProcessSpace}}}1% Count contigous spaces             {lstag@tabulator}{{{\ProcessTab}}}4% ??? how detect a tab?             %             %--- much code removed here (See http://tex.stackexchange.com/questions/57939/making-more-easy-the-itemized-of-item-with-tabulation-system for full code)             {W}{{{\AddApproriateBulletIfFirstChar{W}}}}\Width             {x}{{{\AddApproriateBulletIfFirstChar{x}}}}\Width     }%     \makeatother          \begin{document}     \begin{lstlisting}[style=MyItemize]         Wxxx xxx         Wxxx xx xx     \end{lstlisting}     \end{document}


title: Color - How to make a few letters in an equation have color

text: > **Possible Duplicate:**   >  How to color math symbols? I have an equation: y = 2x + 3. How would I make the 2x red in equation mode in beamer?


title: How to remove the warnings "Font shape `OT1/cmss/m/n' in size <4> not available" and "Size substitutions with differences" in beamer?

text: LaTeX Font Warning: Font shape `OT1/cmss/m/n' in size <4> not available     LaTeX Font Warning: Size substitutions with differences      I am using the files from http://www.poirrier.be/~jean- etienne/info/latexbeamer/latex-beamer.tar.gz. How to remove the above 2 warnings?


title: Resuming a list started within a minipage

text: I have a minipage with a figure, and I want part (a) to be on the right of this figure (so part (a) is in a 2nd minipage), and the remaining parts (b), (c), etc to be below. The insights provided in What are the differences between using paralist vs. enumitem indicate that `enumitem` is the way to go. My first thought was to begin the enumerate within the 2nd minipage, and attempt to resume this list outside of this minipage as documented in Resuming a list. When I attempt to use the `resume*` option provided by the `enumitem` package, this option seems to be ignored, and the text " **resume,,** " is added to the output. I then thought about starting the `\begin{enumerate}` outside of the first minipage, and having the first `\item` within the 2nd minipage. Surprisingly this almost works, except that it has a problem if I uncomment the `\begin{center}`, `\end{center}` lines. This is the second part below. But since this results in a syntax error (and even _seems_ wrong to me) with the uncommented lines to me indicates that this is not proper usage. The output of this can be seen here.               \documentclass[12pt]{article}     \usepackage[shortlabels]{enumitem}     \begin{document}          \begin{minipage}{0.5\linewidth}         \begin{center}             \fbox{Figure here.}         \end{center}     \end{minipage}     \begin{minipage}{0.5\linewidth}     \begin{enumerate}[(a)]       \item One         \begin{itemize}             \item Item 1             \item Item 2         \end{itemize}       \end{enumerate}     \end{minipage}          \bigskip     Now this should be part (b), and "resume" should not be printed here:          \begin{enumerate}[resume*]       \item Two       \item Three     \end{enumerate}          \hrule% Alternate attempt, but "feels" wrong...          \begin{enumerate}[(a)]% Move enumerate outside of minipage     \begin{minipage}{0.5\linewidth}         %\begin{center}% "Missing item" if this is uncommented             \fbox{Figure here.}         %\end{center}     \end{minipage}     \begin{minipage}{0.5\linewidth}       \item One         \begin{itemize}             \item Item 1             \item Item 2         \end{itemize}     \end{minipage}          \bigskip     Now this should be part (b), and "resume" should not be printed here:            \item Two       \item Three     \end{enumerate}     \end{document}       So, how do I properly do this (and still be able to use the `center` environment).


title: underfull \vbox

text: What do the following messages mean?               LaTeX Font Info:    Try loading font information for U+msa on input line 205.      ("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\amsfonts\umsa.fd"     File: umsa.fd 2009/06/22 v3.00 AMS symbols A     )     LaTeX Font Info:    Try loading font information for U+msb on input line 205.          ("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\amsfonts\umsb.fd"     File: umsb.fd 2009/06/22 v3.00 AMS symbols B     )     LaTeX Font Info:    Try loading font information for U+lasy on input line 205.          ("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\base\ulasy.fd"     File: ulasy.fd 1998/08/17 v2.2e LaTeX symbol font definitions     )     LaTeX Font Info:    Try loading font information for U+rsfs on input line 205.          ("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\jknappen\ursfs.fd"     File: ursfs.fd 1998/03/24 rsfs font definition file (jk)     ) [2] [3]     Underfull \vbox (badness 10000) has occurred while \output is active []           [4]     [5] [6] [7] [8          ] (C:\Users\acb\Desktop\Profissional\Tese\files\tese.toc     Underfull \vbox (badness 1242) has occurred while \output is active []      How can I fix the problem?


title: Chapters without the "chapter" text in content

text: Is there any way to use chapters without the `Chapter 1` etc listings? I want only the chapter name to appear not the number.


title: Some fields don't show up or are missing formatting in the bibliography even though I have entries for them

text: I am trying to add several types of bibliography entries using the "standard" BibLaTeX options in LaTex editor. For example: I have a multi-author book, so I enter each name in the Author field with commas, but they erratically show up in the entry. The date or year entry often does not show up. I have a court case that I used an "article" format for, with creative use of some of the optional fields to get the full citation, but not all the fields show up, so I have to jam everything into the title. Is there a way to make LaTeX interpret the bibliography file more "literally", and not try to interpret each entry? Here are some actual entries in my .bib file that are not fully displaying (missing date field):               @book{ELA,        author = {Tod I. Zuckerman Thomas J. Bois II Thomas M.Johnson},        title = {Envrionmental Liability Allocation: Law and Practice},        date = {2011}, chapter = {3}     }          @book{Rodricks,        author = {Joseph V. Rodricks},        title = {Calculated Risks},        date = {2007},        edition = {2nd},        publisher = {Cambridge University Press}     }


title: My document doesn't compile

text: I am new to tex writing and I've had issues with my first document. I tried compiling a simple text, and on the message box it only says that the Process Started and then it simply does nothing. I installed MikTex 2.9 and TexMaker and I am using Windows 7. Anyone have any suggestions?


title: How can I make a simple index in Latex that includes every bolded word throughout the document?

text: This is a very general question, but I would like to make and index for my thesis, that indexes any word that I bf in the documents, and references the page number next to it. I am using the `makeidx` package. I just need the command to work it. Thanks guys!


title: Mark changes since last edition with bars in the margin

text: I would like to mark the parts of my document that have changed since the last revision with vertical bars in the margin. Is there a package to help with this? Is there a tool that can compare two files and automatically add bars in the appropriate places, or do I have to insert markup manually?


title: Endfloat: Spacing of multiple tables per page at end of chapter

text: As an alternative to having each table or figure on a separate page at the end of each chapter, I'm using a command to put an \mbox around each figure/table. How can I control the spacing, as some tables start in the middle of each page and others start at the top?               \documentclass[oneside,12pt]{book}     \usepackage[tablesfirst,notablist]{endfloat}     \usepackage{titletoc}     \usepackage[demo]{graphicx}     \renewcommand\theposttable{\arabic{chapter}.\arabic{posttbl}}     \renewcommand\thepostfigure{\arabic{chapter}.\arabic{postfig}}     \renewcommand{\efloatseparator}{\mbox{}} %Rather than a separate page between each table               \begin{document}     \chapter{Data}     \startlist{lot}     \begin{table}     \caption{First Table} \label{tab:table1}     \end{table}          \begin{table}     \caption{First Table} \label{tab:table1}     \end{table}          \begin{table}     \caption{First Table} \label{tab:table1}     \end{table}          \printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}     \processdelayedfloats          \chapter{Learning}     \startlist{lot}     \begin{figure}     \centering     \includegraphics{histoOne1}     \caption{My caption for this figure}     \label{fig:MyFigure}     \end{figure}     \begin{figure}     \centering     \includegraphics{histoOne1}     \caption{My caption for this figure}     \label{fig:MyFigure}     \end{figure}     \begin{figure}     \centering     \includegraphics{histoOne1}     \caption{My caption for this figure}     \label{fig:MyFigure}     \end{figure}     \printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}     \processdelayedfloats          \end{document}


title: Setting edges in proof environment

text: I would need to move the `itemize` environment used in the `proof` environment more to the left side of every slide. I used `\setbeamersize{text margin left=15pt,text margin right=20pt}` for moving the `definition` and `theorem` environments but what can I use for `itemize` items in the `proof` environment?


title: Emacs interacting with MS Windows: how to minimize windows

text: Title says it: Is there a way to hide MS windows windows from within Emacs? What I would like to do is create a function to:   1. Hide all windows including Emacs   2. Restore Emacs   3. Restore SumatraPDF (which shows the PDF I'm working on)   4. Show windows side-by-side (windows) Any ideas?


title: N images in a strip

text: I needed something (a package, a macro, whatever) that would take n images of arbitrary size and calculate their height so that all the images side by side filled a column exactly. As far as I know, there is no such package. The nearest thing I found was this: How to define a macro that uses image width and height to define a variable for later use. I modified the solution offered there to accept any number of images. I put it here in the hope that someone may find it useful:               \documentclass{article}          \usepackage{graphicx}     \usepackage{calc}     \usepackage{pgf}     \usepackage{pgffor}     \usepackage{subfig}     \usepackage{lipsum}          \newlength\myheight%     \newlength\mywidth%     \newlength\effwidth%     \newlength\finalheight%     \newlength\gapspace%          \newcommand{\manyimages}[2]{          \setlength{\gapspace}{#2}%     \pgfmathsetlength{\effwidth}{0.99\textwidth - \gapspace}%          \def\sumratio{0}          \foreach \im [remember=\sumratio] in {#1} {%              \def\myimage{\includegraphics{\im}}%         \setlength{\myheight}{\heightof{\myimage}}%         \setlength{\mywidth}{\widthof{\myimage}}%         \pgfmathsetmacro{\myratio}{\mywidth / \myheight}%              \pgfmathsetmacro{\sumratio}{\sumratio+\myratio}     }%          \pgfmathsetlength{\finalheight}{\effwidth / \sumratio}%      }          \begin{document}          \begin{figure}     \begin{centering}     \manyimages{image1, image2, image3, image4}{0.06\textwidth}     \subfloat{\includegraphics[height=\finalheight]{image1}}     \hfill     \subfloat{\includegraphics[height=\finalheight]{image2}}     \hfill     \subfloat{\includegraphics[height=\finalheight]{image3}}     \hfill     \subfloat{\includegraphics[height=\finalheight]{image4}}     \end{centering}     \end{figure}          \lipsum          \end{document}      Notes:   1. `\manyimages` has two arguments. The first argument is a comma-separated list of images. The second argument is the gap space between them (the total gap, to be split in n-1 gaps).   2. The code needs real images with arbitrary sizes, otherwise the problem is trivial. Therefore I don't put the graphics in demo mode.   3. I'm new to LaTeX and StackExchange, I appreciate input about best practices, etc.


title: How to get more than 3 levels of nesting in mdframed environments?

text: Before I get to many of "don't do this as it does not look good", I have two modes of my documents:   1. _Final mode_ : where there is ONLY one level of nested `mdframed`   2. _Review mode_ : where there are numerous levels of nested `mdframed`, each one indicating information needed during the review process relevant to the text within the `mdframed`. So, this requested usage is ONLY for my review mode. The code below produces ![enter image description here](http://i.stack.imgur.com/6d8EJ.png) But, Un-commenting out the two lines in the code yields > LaTeX Error: Too deeply nested. I would like to get a larger number of nesting? ## Code:               \documentclass{article}     \usepackage{xcolor}     \usepackage{mdframed}     \begin{document}     \begin{mdframed}[frametitle={Outer Title 1},backgroundcolor=orange!25]         \begin{mdframed}[frametitle={Inner Title 2},backgroundcolor=cyan!25]             \begin{mdframed}[frametitle={Inner Title 3},backgroundcolor=yellow!25]                 %\begin{mdframed}[frametitle={Inner Title 4},backgroundcolor=green]                 %\end{mdframed}             \end{mdframed}         \end{mdframed}     \end{mdframed}     \end{document}


title: Shown and actual url in moderncv

text: I am working on my CV using moderncv. I would like to add a homepage within the CV, i.e., NOT in the header. So far I have used the following code:               \documentclass[11pt,a4paper,sans]{moderncv}          \moderncvstyle{casual}     \moderncvcolor{blue}     \renewcommand{\familydefault}{\sfdefault}     \nopagenumbers{}          \usepackage[utf8]{inputenc}          \usepackage[scale=0.75]{geometry}          \firstname{John}     \familyname{Doe}     \title{Resumé title (optional)}     \address{street and number}{postcode city}     \mobile{+1~(234)~567~890}     \phone{+2~(345)~678~901}     \fax{+3~(456)~789~012}     \email{john@doe.org}     \homepage{www.johndoe.com}     \extrainfo{additional information}     %\photo[64pt][0.4pt]{picture}     \quote{Some quote (optional)}          \begin{document}     \makecvtitle          \section{name}     \cventry{}{\homepagesymbol\httplink{www.homepage.com}}{name}{institution}{}{}          \end{document}      The point is that I would like to differentiate the actual homepage link from the shown link in the CV. In other words, since the actual link is kind of ugly and pretty long, my idea is to "mask" it with a simple denomination. However, I would like to keep the homepagesymbol provided by the moderncv- class. Is there a way to do that easily? Thanks a lot in advance, Phil


title: Example numbering changes between overlays

text: I am trying to include overlaid `expex` glossed examples in a `beamer` presentation. However when changing between overlays, the example numbering for the same examples also changes. The code below is a pair of such examples.               \documentclass[x11names]{beamer}      \usepackage[spanish]{babel}     \usepackage[utf8]{inputenc}     \usepackage{tipa}     \usepackage{tipx}     \usepackage{multicol}      \usetheme{Boadilla}     \usecolortheme{seahorse}     \useinnertheme{rectangles}     \setbeamercovered{transparent}     \usepackage{expex}               \begin{document}     \begin{frame}     \frametitle{\phantom{}}          \onslide<1>{\pex[interpartskip=1ex]~\textcolor{DarkOrchid4}{el francés}                 \a                 \begingl[everygl=,everygla=\it\footnotesize,everyglb=\tiny,                 everyglft=\footnotesize,aboveglftskip=0pt]                 \gla Pourquoi (cela$_i$) la gênera *(-t {-\textcolor{red}{il}$_i$) ?} //                 \glb {por qué} eso {\sc cl}.ac.3sg.f. molestar-fut.ind.3sg. {'t' «eufónica»} {\sc cl}.nom.3sg.m./n. //                 \glft «¿Por qué le molestará (eso)?» //                 \endgl                 \a                 \begingl[everygl=,everygla=\it\footnotesize,everyglb=\tiny,                 everyglft=\footnotesize,aboveglftskip=0pt]                 \gla *(Cela$_i$/\textcolor{red}{il}$_i$) (*\textcolor{red}{il}$_i$) la gêne(*-t-\textcolor{red}{il}$_i$) pour le sujet. //                 \glft «Le molesta eso por el tema» //                 \endgl                 \xe                 }                 \vspace{-1cm}         \onslide<2>{\pex[interpartskip=1ex]~\textcolor{DarkOrchid4}{el francoprovenzal friburgués}                 \a                 \begingl[everygl=,everygla=\it\footnotesize,everyglb=\tiny,                 everyglft=\footnotesize,aboveglftskip=0pt]                 \gla Portyè *(\textcolor{red}{i}) travayè? //                 \glb {por qué} {\sc cl}.nom.1sg./1pl./3sg./3pl. trabajar-pres.ind.3sg. //                 \glft «¿Por qué trabaja?» //                 \endgl                 \a                  \begingl[everygl=,everygla=\it\footnotesize,everyglb=\tiny,                 everyglft=\footnotesize,aboveglftskip=0pt]                 \gla (Djan$_i$/li$_i$) (\textcolor{red}{i}$_i$) travayè din na fretyire. //                 \glb Juan/{\sc pr}.nom.3sg.m. {\sc cl}.nom.1sg./1pl./3sg./3pl. trabajar-pres.ind.3sg. en una {granja lechera} //                 \glft «(Juan) trabaja en una granja lechera» //                 \endgl                 \xe                 }     \end{frame}     \end{document}      I have tried changing the scope of the `\onslide` command, thinking that maybe I was including too much of the `expex` example commands (`\pex`) therein, but no luck. On the other hand, if I don't overlay (removing the `\onslide` commands), the numbering stays nicely put between frame changes in the original (larger) document (which of course one would expect, since changing from frame to frame changes the examples that are seen). I have looked for threads on similar topics that might help me, but quite frankly I haven' found a single one, despite a few promising titles (1, 2, 3). Maybe my issue is the result of something silly that I, a novice user, have been doing and that other more knowledgable users know to avoid. Please help.


title: How to use showkeys with hyperref?

text: The "ChangeLog for hyperref bundle" file claims that support for the `showkeys` package was added to `hyperref` in various stages on 2000-05-08, 2001-01-27, and 2007-05-29. However, there still seem to be some incompatibilities between the two packages. Furthermore, some strange interactions occur depending on which of the two packages is loaded first. Consider the following MWE, where `showkeys` is loaded before `hyperref`:               \documentclass{article}     \usepackage{showkeys}     \usepackage{hyperref}          \begin{document}          \section{New Section}     \label{some-label}          This is a really important section.          Now we want to refer to~\autoref{some-label} on \autopageref{some-label}.          What if we just refer to section~\ref{some-label} on page~\ref{some-label}?     This seems to work fine.          \begin{thebibliography}{99}     \bibitem{abc}         This book has no title.     \end{thebibliography}     \end{document}      First of all, it appears that the `\autopageref` command has no support for package `showkeys`, as the label is not printed. Next, with this example, the `\bibitem` key is not printed either. On the other hand, suppose we reverse the package loading order, and load `hyperref` before `showkeys`. In this case, the key for `\bibitem` is displayed correctly, but now `\autopageref` is totally broken: The page number is missing from the output text, replaced by `??some-label`, and the following warning is written:               LaTeX Warning: Reference `*' on page 1 undefined on input line 28.      So when I prepare my draft documents, I'm stuck having to choose between having the `\bibitem` keys not shown or having `\autopageref` totally broken. I can live with the `\autopageref` keys not being shown, as long as the output is the correct text (`showkeys` before `hyperref`), but I really want to have the `\bibitem` keys shown (`hyperref` before `showkeys`) so that I can copy the labels into citations when typing the rest of the document. How can I correct one or the other of these problems to get the best of both scenarios?


title: How to draw a sinewave in Tikz?

text: I am an absolute newbie in LaTeX in general and Tikz in particular and am in the process of exploring various aspects of the ecosystem. During the course of looking Tikz related information I came across this response: Sinewave in Tikz. This works but I am unable to figure out how this works. Can someone point me or explain how these commands combine to generate a sine wave?


title: How can I align horizontally matrices of different dimensions?

text: I'm wondering how can I align two different matrices horizontally. They are: [-1 0 +1] And: [-1 0 +1].T This is my code:               \begin{equation}     \begin{bmatrix}         -1 & 0 & -1     \end{bmatrix}     \end{equation}          \begin{equation}     \begin{bmatrix}         -1 & 0 & -1     \end{bmatrix}\top     \end{equation}      And this is how the matrices appear, which is expected: ![enter image description here](http://i.stack.imgur.com/AsoAs.png) However, I would left aligned. I tried to use `\begin{align}` and `\begin{array}`, but I didn't succeed. Thank you in advance.


title: How do I get filled black < and \leq?

text: I want to define an order relation where I to distinguish want to fill in with black so that I have a black lying triangle in the first case and a black lying triangle with the suitable line below as in `\leq` in the second case. I am not satisfied with `\blacktriangleleft` and `\overset{\blacktriangleleft}{-}`.


title: Move-around box in PDF display

text: I tried using the `fancytooltips` package and like it a lot. One thing that I could imagine would be nice is to have the entry showing up as a movable box instead of just a tooltip. (Sometimes the tooltip obscures other text.) Is this possible at all to implement? I mean it could take a lot of work, but if it's possible at all I'd like to look into it. The examples and screenshots of `fancytooltips` can be found in this post. To quote from that post: * * * Both Gonzalo Medina and Audrey posted an excellent solution. But the things are simpler now. See the `fancy-preview` webpage - based on the new version of `fancytooltips` (May 2012), `preview.sty` and some bash scripts you get tooltips for bibliographic entries, theorems, definitions, displayed equations etc. automatically. Small example and screenshots are attached.               \documentclass{article}     \usepackage{amsmath,amsthm}     \newtheorem{lemma}{Lemma}     \usepackage{hyperref} % Important!     \begin{document}          \begin{lemma}[Lemma from \cite{M}]\label{lemma}       If $k<0$, then       \begin{equation}         \label{eq:1}         x^2+k<x^2       \end{equation}       for every real number $x$.     \end{lemma}          Inequality \eqref{eq:1} in Lema \ref{lemma} can be proved easily. Is     more general than \cite[Theorem 3.4]{K}.          \begin{thebibliography}{9}     \bibitem[M]{M} Me: My book related to the problem (2006), 145 p.       % The new line is important!          \bibitem{K} Karl: Karl's paper published in some minor proceedings,          a local conferrence organized by his university (2005), 23--25.       % The new line is important!               \end{thebibliography}     \end{document}      **The file in Adobe Reader** ![enter image description here](http://i.stack.imgur.com/45NX6.png) **Ref M** ![enter image description here](http://i.stack.imgur.com/zAiLg.png) **Ref 1** ![enter image description here](http://i.stack.imgur.com/GLPJI.png) **Equation (1)** ![enter image description here](http://i.stack.imgur.com/IE8ZY.png) **Lemma 1.** ![enter image description here](http://i.stack.imgur.com/i0FcA.png)


title: Undefined control sequence and \chapter error

text: I’m getting an “undefined control sequence” error with the following code, using TeXstudio:               \documentclass[11pt]{article}     \begin{document}     \begin{center}     \chapter{CHAPTER 6}     \end{center}     \end{document}


title: Have Biblatex display only the first of first names for an author

text: I am looking for a way to force `biblatex` to strip all first names except the very first one. I am actually using only initials, but even that gets messy when the author has 3-4 first names in a row and is known only by the first one. Say I am citing this guy:               John Paul Peter Julian Doe      the output will be:               J. P. D. J. Doe      which is already quite long. Removing the dots and thin-spaces is not really an option. I would like it to just end up being `J. Doe` for the in-text (`cbx`) part of the reference. Based on this related question, I suppose it is possible with `biblatex`+`biber` and it is the solution I would favour.


title: How could I make \dotfill appear also in subsection and section as well as list of figures?

text: If using `\hbox{$\m@th\mkern\@dotfill mu\hbox{.}\mkern\@dotfill mu$}` could provide the dots fill as in 1 and 2, how could I make it also appear in section of 2.1 to 2.3 as well? ![Enter image description here](http://i.stack.imgur.com/vyRKE.png)               \documentclass[12pt]{report}     \usepackage{times}     \usepackage{Eba_Thesis}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{makeidx}     \usepackage{graphicx}     \usepackage{amsthm}     \pagenumbering{roman}     \author{SAmanu}     \begin{document}     \Dept{sample}     \tableofcontents     \listoffigures     \chapter{Particle in a Box}     \numberwithin{equation}{chapter}     \section{Boundary}      In this chapter,     \section{kvalues}     However,     \begin{figure}[ht]     \begin{center}     \rule{0.5\linewidth}{0.35\linewidth}     \caption[Long box figure]{\blindtext}     \label{fig:dum1}     \end{center}     \end{figure}     \section{Inner Products}     We     \end{document}


title: Drawing pgfplot from/to previously defined intersection points

text: I'm attempting to draw a plot, using `pgfplots`, where the start and end coordinates are intersection points I have computed earlier in the same `tikzpicture`. I start by defining the paths and intersections, but when I input the names of the intersection points as coordinates in the `addplot` command, the document won't compile. The error message reads:               pdflatex> ! Package PGF Math Error: Unknown function `t' (in 't-1)(-10.869411').      Obviously I'm doing something wrong. Does anyone know how I can use previously defined intersection points within the `addplot` command? Here is the essence of the code I'm trying to compile:               \documentclass[11pt]{standalone}     \usepackage[utf8]{inputenc}     \usepackage{tikz,pgfplots}         \usetikzlibrary{intersections}     \pgfplotsset{compat=newest}     \begin{document}              \begin{tikzpicture}                   \begin{axis}[view={0}{90}, width=10cm, height=7cm, scale only axis, axis equal,                           xmin=-17.936700408998, xmax=5.89970040899796, ymin=12.5, ymax=31.3,]                       \path[name path=topslant] (axis cs: -0.529628,27.8830164982243) -- (axis cs: -0.445369,28.2419383436497);                  \path[name path=top] (axis cs: 0,31.272) -- (axis cs: -00.15,28) -- (axis cs: -1,28.12);                  \path[name intersections={of=topslant and top, name=t}];                       \path[name path=bottomslant] (axis cs: -12.037,12.52) -- (axis cs: -10.869411,13.6420106655631);                  \path[name path=corner] (axis cs: -12,12.07) -- (axis cs: -11.133,12.921) -- (axis cs: -11.574,13.3);                  \path[name intersections={of=bottomslant and corner, name=c}];                       \addplot[color=blue, solid]                      coordinates{                          (t-1)(-10.869411,13.6420106655631)(-2.756473,22.6522459312844)(-0.529628,27.8830164982243)(c-1)                      };                  \end{axis}         \end{tikzpicture}     \end{document}


title: Process locking diagram in LaTeX

text: Does someone know if it is possible to reproduce something like this Diagram (found at this Website) in LaTeX, perhaps with Tikz? Or do I have to draw my diagrams in another program and import them as pictures? * * * I now started as R. Schumacher suggested with pgfgantt. Here is my example:               \documentclass[11pt,a4paper]{article}          \usepackage{tikz}     \usepackage{pgfgantt}     \newcommand{\ganttbarGrey}{\ganttbar[bar/.style={fill=black!50}]}     \newcommand{\ganttbarBlack}{\ganttbar[bar/.style={fill=black}]}     \newcommand{\ganttbarUnderline}{\ganttbar[bar/.style={fill=black},bar top shift=.699, bar height=.001]}          \begin{document}          \begin{tikzpicture}     \begin{ganttchart}[canvas/.style={draw=none},vgrid={*1{black!30,thin}},hgrid={*1{black!30,thin}},include title in canvas=false,title/.style={draw=none, fill=none}]{12}     \ganttbar{\(T_1\)}{3}{3}\ganttbarUnderline{}{4}{9} \ganttbarGrey{}{10}{10} \ganttbar{}{11}{11}\\     \ganttbar{\(T_2\)}{5}{8}\\     \ganttbar{\(T_3\)}{1}{1}\ganttbarGrey{}{2}{2} \ganttbarUnderline{}{3}{3}\ganttbarGrey{}{4}{4} \ganttbarUnderline{}{5}{8}\ganttbarGrey{}{9}{9}\ganttbarUnderline{}{10}{11} \ganttbar{}{12}{12}     \gantttitlelist[title top shift=1.2]{1,...,12}{1}     \end{ganttchart}     \draw[->](0,-3) --(0,0.5);     \draw[->](0,-3) --(6.5,-3);     \end{tikzpicture}          \end{document}      So far it is not that bad but I would like to transform it into a form similar to the one I saw in this diss (look e.g. on page 110). I added the two arrows but I have to manually "calculate" the coordinates.. But this would be ok. But I am missing a possibility to mark where a critical section starts and where it ends (e.g. with "locked" and "unlocked" flags like in the diss). Does anyone know how to change my example to make it look that way? * * * I improved my example even more. There was an error in it and I changed some things. Perhaps now it is easier to help me?


title: bibliography error

text: I am using the following code to include my references:               \bibliographystyle{alpha}     \addcontentsline{toc}{chapter}{Bibliography}      There is one generated item in .bbl file:               \bibitem[DD05]{DaaaDbbb05} ....the content...      The problem is that since both authors' name starts from D, the system automatically generates the abbreviation DD05. With DD05, there is an compiling error. If I change this item by DeD05 for example in the .bbl file, it will work. Do you know what is wrong? It is not the first time for me to meet this problem. Here is my bib entry:               @article {DaaaDbbb05On,     AUTHOR = {Daaa, Xcccc and Dbbbb, Fffff},      TITLE = {A sample paper},      JOURNAL = {Sample journal},      VOLUME = {1},      YEAR = {2005},      NUMBER = {1},      PAGES = {1--17},      }      The compiling error is                ./my_thesis:133:Undefined control sequence \bibitem[DD05]{DaaaDbbb05On}


title: Is memoir's page layout incompatible with TikZ?

text: Can someone explain what's going on here?:               \documentclass[showtrims,svgnames]{memoir}     \usepackage{lipsum}     \settrimmedsize{210mm}{148mm}{*}     \setstocksize{236mm}{164mm}     \settrims{5mm}{5mm}     \setulmarginsandblock{20mm}{22mm}{*}     \setlrmarginsandblock{20mm}{30mm}{*}     \checkandfixthelayout     \trimLmarks     \usepackage{tikz}     \begin{document}       \begin{tikzpicture}[remember picture, overlay]         \draw[red]  (current page.south west) rectangle                      (current page.north east);       \end{tikzpicture}     \lipsum[1-4]     \end{document}      renders (in XeLateX) as shown below. I should like better to understand how TikZ defines/establishes the placing of the "current page" node. I can see that the south west corner is aligned with the stock, but it looks like the north west corner has been calculated from the wrong dimensions. Here's page 1 of the PDF output: ![Screen shot of rendered PDF](http://i.stack.imgur.com/dCbZn.png)


title: How to align table headers differently than all other table cells?

text: I'm using fixed-width columns with my table, and using both `longtable` and `booktabs` packages (as well as `tabularx` because of `\newcolumntype` command). In my table, I'll have lots of number data in **cells that I want to align to the right**. However, **I still want to keep the headers aligned to the center** , because some heading text will be broken into two (or more) lines. How can I solve this? Here is a small testcase:               \documentclass{article}          \usepackage[brazilian]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{longtable}     \usepackage{tabularx}     \usepackage{booktabs}          \title{Table header aligment}          \begin{document}          \newcolumntype{D}{m{20mm}}     \newcolumntype{L}{>{\raggedright\arraybackslash}m{20mm}}     \newcolumntype{C}{>{\centering\arraybackslash}m{20mm}}     \newcolumntype{R}{>{\raggedleft\arraybackslash}m{20mm}}          \begin{longtable}{DLCR}          \toprule     I want this header text centered &     I want this header text centered &     I want this header text centered &     I want this header text centered \\     \midrule          \endhead          Justified alignment &     Left alignment &     Center alignment &     Right alignment \\          % This row is just to show which columns will hyphenate, and which ones won't     Love alignment &     Love alignment &     Love alignment &     Love alignment \\          \midrule          % I wanna keep the numbers of this column aligned to the right, while keeping     % the headers aligned to the center.     dummy text & dummy text & dummy text & 123456 \\      dummy text & dummy text & dummy text &   1234 \\      dummy text & dummy text & dummy text &    456 \\           \bottomrule          \end{longtable}          \end{document}      ![LaTeX rendering of the above code](http://i.stack.imgur.com/k9CNk.png)


title: how do I get a hyphen in \mathrm

text: A simple question I think, but if I write `$\omega{\mathrm{anti-Stokes}}$`, the hyphen looks an awful lot like a minus sign. If I naively try `$\omega{\mathrm{anti\hyp{}Stokes}}$` (I think `\hyp{}` requires `\usepackage{hyphenat}`) I get the same result - I'm not actually surprised, presumably it sets the same character. A full MWE:               \documentclass{standalone}     \begin{document}     $\omega_{\mathrm{anti-Stokes}}$     anti-Stokes     \end{document}      ![output](http://i.stack.imgur.com/d1H1v.png) The minus sign looks like a rather thin en-dash instead of a hyphen.


title: !LaTeX Error: Cannot determine size of graphic in simLinkError.pdf (no Bounding Box)

text: I'm trying to put a `.pdf` graphic in my `LaTeX` file. This is usually no problem for me. I use `pdfLaTeX` in `TeXworks`. The only difference this time seems to be that I'm using the style files from the journal Statistical Science (http://www.e-publications.org/ims/support/sts-instructions.html). I've tried several solutions. This one and converting the `pdf` to `.eps` or `.ps` all make the error go away, but then there is just a big blank space where the image is supposed to be. Any ideas? **Edit:** Here is the preamble:               \documentclass[dvips,sts]{imsart}     \usepackage{graphicx}     \usepackage{float}     \begin{document}     \begin{figure}[h!]     \centering     \includegraphics[width =  \textwidth]{simLinkError.pdf}     \caption{Blah}       \label{fig:sim1}     \end{figure}     \end{document}


title: Lining up angled tick labels on a pgfplots bar plot

text: I'm trying to produce a bar chart for publication with math text in the tick labels. The most readable layout would be to angle them, but when I do they clash with the axis and are difficult to relate to the correct bar. I've tried padding with \quad spaces, but this pushes them even further from the bar they are supposed to be labelling. Is there a way of offsetting the label positions, or some more elegant solution? Minimal example:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}          \begin{axis}[%     xmin=0.5, xmax=5.5,     xtick={1,2,3,4,5},     xticklabels={     $\textrm{fish}^\textrm{cake}$,$\Delta \textrm{bob}^2$,spoon,$e^{i \pi}+1 = 0$,knife},     x tick label style={rotate=45, anchor=east},     ylabel={Energy / Hadouken mol$^{-1}$}]     \addplot[ybar,bar width=0.6cm,fill=gray,draw=black] plot coordinates{(1,10)     (2,20)     (3,40)     (4,-20)     (5,10)};               %% This is just to add a zero line for clarity     \addplot [     color=black,     solid,     forget plot     ]     table{     0 0     6 0     };          \end{axis}     \end{tikzpicture}     \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/sbbgG.png)


title: Custom Spacing on PGF legend

text: I'm trying to change the spacing of a single legend entry in a PGF bar plot. This is my MWE:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \begin{document}       \begin{tikzpicture}         \begin{axis}[ybar]             \addplot coordinates {(1,3) (2,5) (3,2)};             \addlegendentry{(a)}             \addplot coordinates {(1,2) (2,6) (3,1)};             \addlegendentry{(b)}             \addplot coordinates {(1,4) (2,4) (3,4)};             \addlegendentry{(c)}         \end{axis}       \end{tikzpicture}     \end{document}      which generates the following figure ![Minimal Working Example for this question](http://i.imgur.com/8LZns1w.png) What I want is to create a space between (a) and (b) in the legend, while not creating a space between (b) and (c) (that is, I don't want to change the `row sep`). The ideia is to separate (a) from (b) and (c) in order to highlight that (a) is the result of a work and (b) and (c) are the result of another work in a presentation. I tried to create a custom legend using `\label` and `\ref`, but this changes the bars (in the legend) to lines.


title: Changing Style Inside LaTeX Listing

text: In short, I'm trying to combine some C code with its disassembly in LaTeX such that the x86 code is displayed after the relevant statement. In order to make this look nice, I would like to be able to switch between styles inside of a listing. I've searched online for quite a while and have come across multiple sources talking about `escapeinside` and `escapechar` (this post for example), but I can't seem to get either working. Right now, my code looks like:               \begin{lstlisting}[style=customcpp, escapechar=\@]     void sort(int *rgList, int nLen)     {@\lstset{escapechar=\@, style=customasm}@         push    ebp         mov     ebp, esp         sub     esp, 48h         push    ebx         push    esi         push    edi         ...     \end{lstlisting}      where `customcpp` and `customasm` are styles that I have defined. Both work fine separately. It's when I try and combine them that I get issues. I have a feeling that I'm doing something stupid, but I can't seem to find it. For what it's worth, here are my style definitions:               \lstdefinestyle{customcpp}{        belowcaptionskip=1\baselineskip,        breaklines=true,        frame=L,        xleftmargin=\parindent,        language=C++,        showstringspaces=false,        basicstyle=\footnotesize\ttfamily,        keywordstyle=\color{blue},        commentstyle=\itshape\color{green},        stringstyle=\color{purple},        identifierstyle=\color{gray},        tabsize=4,        numbers=left,        numbersep=8pt,        stepnumber=1,        numberstyle=\tiny\color{gray},     }          \lstdefinestyle{customasm}{        belowcaptionskip=1\baselineskip,        frame=L,        xleftmargin=\parindent,        language=[x86masm]Assembler,        basicstyle=\footnotesize\ttfamily,        commentstyle=\itshape\color{purple!40!black},        keywordstyle=\color{black},        identifierstyle=\color{black},        tabsize=4,        numbers=left,        numbersep=8pt,        stepnumber=1,        numberstyle=\tiny\color{gray}     }      I should also note that escaping _works_. What doesn't work is changing the style.


title: Missing $ inserted

text: When I use this code I get the `! Missing $ inserted.<inserted text>$ R` and `! Missing $ inserted.<inserted text>$ \bottomrule` errors on the 3rd and 4th last lines. How can I fix my code so that those errors go away?               \documentclass[letterpaper,12pt]{article}     \usepackage{tabularx,amsmath,boxedminipage,graphicx}     \usepackage[margin=1in,letterpaper]{geometry} % this shaves off default margins which are too big     \usepackage{cite}     \usepackage[final]{hyperref} % adds hyper links inside the generated pdf file     \usepackage{booktabs} % for better looking tables     \usepackage{siunitx}  % for units of measure and data in tables     \hypersetup{         colorlinks=true,       % false: boxed links; true: colored links         linkcolor=blue,          % color of internal links         citecolor=blue,        % color of links to bibliography         filecolor=magenta,      % color of file links         urlcolor=blue              }          \begin{document}     \begin{tabular}{      l % left aligned column      l % left aligned column      *{2}{S[table-format=4.0]} % three columns with numeric data            }     \toprule     &\textbf{Method 1} & \textbf{Method 2}\\     \midrule     Run 1 & $345 \pm 1$ & $235 \pm 3$\\     Run 2 & $465 \pm 2$ & $342 \pm 4$\\     \bottomrule     \end{tabular}     \end{document}


title: Cleveref to Nomenclature?

text: I am writing a `book` and use `nomencl` to print a list of symbols at the end. How do I cleveref to this list? In the introduction of the book, I would like to write something like "All the notation we use can be found in `\cref{...}`", where LaTeX should replace `\cref{...}` by the name of the nomenclature list, i.e. by `\nomrefname`. Using the `intoc` option or the `\addcontentsline` command, I managed to get an entry for the list of symbols in the table of contents, but when I put something like `\label{SectionNomenclature}` before or after my `\printnomenclature` and try `\cref{SectionNomenclature}` I am referenced to the last chapter before the list of symbols. :( MWE:               \documentclass[a4paper,oneside]{book}          \usepackage[refpage,intoc]{nomencl}     %nomenclature     \usepackage[pdftex]{hyperref}       %hyperlink references     \usepackage[capitalize]{cleveref}   %automatic clever references               \makenomenclature          \nomenclature[N]{$\mathbb{N}$}{the natural numbers $\N=\{0,1,2, \ldots \}$}          \begin{document}               \tableofcontents          \part{Introduction}          \chapter{Overview}          \section{Blabla}          All the symbols used can be found in \cref{SectNomenclature}.          \printnomenclature          \label{SectNomenclature}               \end{document}


title: How can I use a table generated by Latex in R(xtable)?

text: I have a LaTeX table generated by Excel. I want to place this table but not as a LaTeX code, but rather as a xtable. It is possible to convert LaTeX to xtable?


title: PS-Tricks error Undefined control sequence. [\psline{->}]

text: I get the error > Undefined control sequence. [\psline{->}] when i try to run the code               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-all}     \usepackage{mathtools}     \begin{document}     \begin{pspicture}[showgrid=false](20,10)     \psline{->}(0,0)(20,0)     \psline{->}(0,0)(0,10)     \psplot{12.879}{17.121}{9-2*(15-x)^2} %Curve 2      \psplot{0.757359}{9.24264}{9-0.5*(5-x)^2}%curve 1     \psline[linestyle=dotted]{}(5,0)(5,9)% Optimum curve 1      \psline[linestyle=dotted]{}(15,0)(15,9) % Optimum curve 2     \psline[linestyle=dotted]{}(13.5,0)(13.5,4.5) % change in curve 2     \psline[linestyle=dotted]{}(0,4.5)(13.5,4.5) % lower horizontal line     \psline[linestyle=dotted]{}(3.5,0)(3.5,7.875) % change in curve 2     \psline[linestyle=dotted]{}(0,7.875)(3.5,7.875) %upper horizontal line          \psline[]{|-|}(3.5,2)(5,2)     \psline[]{|-|}(13.5,2)(15,2)     \psline[]{|-|}(2,4.5)(2,7.875)          \uput[45](4.8,-0.5){$t_1^*$}     \uput[45](3.3,-0.5){$t_1$}     \uput[45](14.8,-0.5){$t_2$}     \uput[45](13.3,-0.5){$t_2$}     \uput[45](4,2.2){$t'$}     \uput[45](14,2.2){$t'$}     \uput[45](0.5,5.8){$u_1\ge u_2$}     \uput[45](-0.5,4.2){$u_2$}     \uput[45](-0.5,7.6){$u_1$}     \end{pspicture}     \end{document}


title: Need to produce "real" double quotes in LaTeX and XY-pic in Emacs

text: I am using Emacs as a text editor on Xubuntu. I am using the XY-pic package to make some commutative diagrams, and I need the following command (which is inside figure, center, and xy begin tags):               (0,0)*+{\mathbb{S}^3\cup\mathbb{S}^3\cup\mathbb{S}^3\cup\mathbb{S}^3}="4S3";(0,-20)*+{\mathbb{S}^3}="S31";      The meaning is not really important if you don't know XY-Pic, but see those double quotes, ie "4S3"? Those are important! All of the following break during compile (I get runaway argument errors):               `4S3' ``4S3'' ''4S3'' ``4S3``      The problem is that on Emacs, I can't seem to make those "close double quotes". I type various things but always end up with single backwards or forwards quotes. My current solution is to write the double quotes in a different editor (I can't quite remember what I originally used, possibly gedit) and copy the required quotes over to Emacs. Then they show up correctly! There has to be a better way; does anyone know of one?


title: resizebox doesn't resize a tabular vertically

text: Why is that? Shouldn't they both be `2cm`x`2cm` in size?! ![enter image description here](http://i.stack.imgur.com/TKBHe.png)               \documentclass{article}     \usepackage{graphicx}          \begin{document}          \resizebox{2cm}{2cm}{\rule{6cm}{7cm}}     \resizebox{2cm}{2cm}{\begin{tabular}{l l}A&B\\C&D\end{tabular}}          \end{document}


title: Creating a new environment for multiple choice questions

text: I am trying to create a new environment for multiple choice test questions. I want to make sure that every question has a number and has a constant indentation:               1.  Lorem ipsum         dolor sit amet.         Lorem ipsum         dolor sit amet.          2.  Lorem ipsum         dolor sit amet.         Lorem ipsum         dolor sit amet.      I think I should use a `minipage` for each question in the environment definition. But I don't know how to adjust the spacing so that each question body is aligned. What should I use for the numbers? Edit: I'm attaching my working example. Down below is a portion of the latex.ltx file, with enumerate modified to `cnumerate` to prevent name clashes. I basically want to create an independent environment like the `equation` or `tabular`. Just assume that `\begin{question} \item Lorem. \end{question}` is to create a single indented item with a number. **Why does cnumerate not print numbers?** The indentation is fine, but there is no numbers. I print \thecnumi for each item, and it works, but the numbers do not show up in the labels. cnumerate.sty:               \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{cnumerate}               [1999/03/05 v3.00 cnumerate extcnsions (DPC)]          % latex.ltx          \newcount\@cnumdepth \@cnumdepth = 0     \@definecounter{cnumi}     \@definecounter{cnumii}     \@definecounter{cnumiii}     \@definecounter{cnumiv}     \def\cnumerate{%       \ifnum \@cnumdepth >\thr@@\@toodeep\else         \advance\@cnumdepth\@ne         \edef\@cnumctr{cnum\romannumeral\the\@cnumdepth}%           \expandafter           \list             \csname label\@cnumctr\endcsname             {\usecounter\@cnumctr\def\makelabel##1{\hss\llap{##1}}}%       \fi}     \let\endcnumerate =\endlist     \endinput      the main file, doc.tex               \documentclass{article}     \usepackage{cnumerate}     \begin{document}     \begin{cnumerate}     \item Lorem ipsum.     \end{cnumerate}     end{document}


title: Quote an inproceedings title in unsrtnat

text: I am using unsrtnat.bst, but I need entries of type inproceedings to have their title quoted. The title line is:               format.title "title" output.check      I found a 'quote' function in another .bst file               FUNCTION {quote}     { duplicate$ empty$         { pop$ "" }         { "``" swap$ * "''" * }       if$     }      and changed the line to               format.title quote "title" output.check      and it almost works... it produces:               Author "Title", Conference      but unfortunately it needs to be               Author "Title," Conference      (the comma inside the quotes). Can anyone suggest a way to do this?


title: How to typeset a wide table (typography)

text: First MWE:               \documentclass[twoside,a4paper,12pt]{article}     \setlength{\oddsidemargin}{9.6mm}     \setlength{\evensidemargin}{-0.4mm}     \setlength{\textwidth}{150mm}     \usepackage[         top    = 3.00cm,         bottom = 3.00cm]{geometry}     \usepackage{setspace}     \onehalfspacing     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead[LO,RE]{\thepage}     \cfoot{}     \setlength{\headheight}{15pt}     \usepackage{polyglossia}     \setmainlanguage{magyar}     \usepackage{soul}     \usepackage{color}     \usepackage{cancel}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{longtable}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{tikz}     \usepackage{tabularx}     \usepackage{fontspec}     \setmainfont{Times New Roman}     \author{Nagy László}     \title{Elemzés}     \usepackage{hyperref,bookmark}     \begin{document}                              \begin{longtable}{@{}lrrrc@{}} \toprule             Név (\footnotesize{Leírás})         &   Ref.         &   $x_i$         &   $\alpha_i$         &   Érték \\ \midrule \endhead     %             Betű nagyság         &   $0.87$         &   $$         &   $1.0$         &    \\         \multicolumn{5}{l}{\footnotesize{átlag középzóna magasság egyharmada.}}\\     %             Betű szélesség         &   $1.06$         &   $4.53$         &   $1.0$         &    \\         \multicolumn{5}{l}{\footnotesize{átlag betűszélesség egyharmada}}\\     %             Betű távolság         &   $0.99$         &   $5.20$         &   $1.0$         &    \\         \multicolumn{5}{l}{\footnotesize{átlag betűtávolság egyharmada}}\\     %             Felső hurokszár         &   $$         &   $$         &   $1.0$         &    \\         \multicolumn{5}{l}{\footnotesize{átlag hurokhossz egyharmada}}\\     %             Also hurokszár         &   $$         &   $$         &   $1.0$         &    \\         \multicolumn{5}{l}{\footnotesize{átlag hurokhossz egyharmada}}\\     %             Ovál betű dőlés         &   $0.0°$         &   $60.0°$         &   $0.5$         &    \\         \multicolumn{5}{l}{\footnotesize{5 fokos tartományon belül}}\\     %             Nemovál betű dőlés         &   $0.0°$         &   $25.7°$         &   $0.5$         &    \\         \multicolumn{5}{l}{\footnotesize{5 fokos tartományon belül}}\\     %             Szótáv         &   $1.79$         &   $7.29$         &   $1.0$         &    \\         \multicolumn{5}{l}{\footnotesize{átlag szóköz egyharmada}}\\     %             Tudatos sortáv         &   $1.30$         &   $4.14$         &   $0.5$         &    \\         \multicolumn{5}{l}{\footnotesize{átlag középzóna fele}}\\     %             Nem tudatos sortáv         &   $1.30$         &   $4.31$         &   $0.5$         &    \\         \multicolumn{5}{l}{\footnotesize{átlag középzóna fele}}\\     %             Sor irány         &   $1.30$         &   $$         &   $0.5$         &    \\         \multicolumn{5}{l}{\footnotesize{sorvég emelkedhet/süllyedhet fél középzónát}}\\     %             Sor alak         &   $$         &   $$         &   $0.5$         &    \\         \multicolumn{5}{l}{\footnotesize{alakja minden sorban azonos legyen}}\\     %             Kötöttség         &   $$         &   $$         &   $1.0$         &    \\         \multicolumn{5}{l}{\footnotesize{az első két sorban megállaptíott kategória maradjon}}\\     %             Kötésforma         &   $$         &   $$         &   $1.0$         &    \\         \multicolumn{5}{l}{\footnotesize{10\%-os eltolódás tényezőnként}}\\     %             Bal margó         &   $2.60$         &   $2.69$         &   $0.5$         &    \\         \multicolumn{5}{l}{\footnotesize{Egy középzóna magasságon belüli eltérés}}\\     %             Jobb margó         &   $7.81$         &   $26.62$         &   $0.5$         &    \\         \multicolumn{5}{l}{\footnotesize{Három középzóna magasságon belüli eltérés}}\\          \caption{Globális szabályosság}     \end{longtable}                         \end{document}      Result: ![enter image description here](http://i.stack.imgur.com/L7FzN.png) Table structure is messed up, cannot see what value belongs to what column. Second MWE:               \documentclass[twoside,a4paper,12pt]{article}     \setlength{\oddsidemargin}{9.6mm}     \setlength{\evensidemargin}{-0.4mm}     \setlength{\textwidth}{150mm}     \usepackage[         top    = 3.00cm,         bottom = 3.00cm]{geometry}     \usepackage{setspace}     \onehalfspacing     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead[LO,RE]{\thepage}     \cfoot{}     \setlength{\headheight}{15pt}     \usepackage{polyglossia}     \setmainlanguage{magyar}     \usepackage{soul}     \usepackage{color}     \usepackage{cancel}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{longtable}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{tikz}     \usepackage{tabularx}     \usepackage{fontspec}     \setmainfont{Times New Roman} % Szakdolgozat előírása!     \author{Nagy László}     \title{Elemzés}     \usepackage{hyperref,bookmark}     \begin{document}                         \begin{longtable}{@{}llrrrc@{}} \toprule             Név         &   Leírás         &   Ref.         &   $x_i$         &   $\alpha_i$         &   Érték \\ \midrule \endhead     %             Betű nagyság         &   \footnotesize{átlag középzóna magasság egyharmada.}         &   $0.87$         &   $$         &   $1.0$         &    \\     %             Betű szélesség         &   \footnotesize{átlag betűszélesség egyharmada}         &   $1.06$         &   $4.53$         &   $1.0$         &    \\     %             Betű távolság         &   \footnotesize{átlag betűtávolság egyharmada}         &   $0.99$         &   $5.20$         &   $1.0$         &    \\     %             Felső hurokszár         &   \footnotesize{átlag hurokhossz egyharmada}         &   $$         &   $$         &   $1.0$         &    \\     %             Also hurokszár         &   \footnotesize{átlag hurokhossz egyharmada}         &   $$         &   $$         &   $1.0$         &    \\     %             Ovál betű dőlés         &   \footnotesize{5 fokos tartományon belül}         &   $0.0°$         &   $60.0°$         &   $0.5$         &    \\     %             Nemovál betű dőlés         &   \footnotesize{5 fokos tartományon belül}         &   $0.0°$         &   $25.7°$         &   $0.5$         &    \\     %             Szótáv         &   \footnotesize{átlag szóköz egyharmada}         &   $1.79$         &   $7.29$         &   $1.0$         &    \\     %             Tudatos sortáv         &   \footnotesize{átlag középzóna fele}         &   $1.30$         &   $4.14$         &   $0.5$         &    \\     %             Nem tudatos sortáv         &   \footnotesize{átlag középzóna fele}         &   $1.30$         &   $4.31$         &   $0.5$         &    \\     %             Sor irány         &   \footnotesize{sorvég emelkedhet/süllyedhet fél középzónát}         &   $1.30$         &   $$         &   $0.5$         &    \\     %             Sor alak         &   \footnotesize{alakja minden sorban azonos legyen}         &   $$         &   $$         &   $0.5$         &    \\     %             Kötöttség         &   \footnotesize{az első két sorban megállaptíott kategória maradjon}         &   $$         &   $$         &   $1.0$         &    \\     %             Kötésforma         &   \footnotesize{10\%-os eltolódás tényezőnként}         &   $$         &   $$         &   $1.0$         &    \\     %             Bal margó         &   \footnotesize{Egy középzóna magasságon belüli eltérés}         &   $2.60$         &   $2.69$         &   $0.5$         &    \\     %             Jobb margó         &   \footnotesize{Három középzóna magasságon belüli eltérés}         &   $7.81$         &   $26.62$         &   $0.5$         &    \\          \caption{Globális szabályosság}     \end{longtable}                         \end{document}      Appears like this: ![enter image description here](http://i.stack.imgur.com/P25TF.png) The obvious problem is that horizontal overflow. The right margin should be smaller. The third example is the same as the second, except that I have specified the width of the description field manually:               \begin{longtable}{@{}lp{5cm}rrrc@{}} \toprule      The result is: ![enter image description here](http://i.stack.imgur.com/nNm1Q.png) It seems to be the best, but there might be a better solution. The question is not just TeX, but also typography. How should I typeset a table like this? I know that I can rotate a page and put the table on a portrait page. But these tables are generated from a program, and sometimes the description will be wider than a page anyway. (It is rare, but it happens.) Is my third solution is the best? Is there a more professional approach?


title: Using tree-dvips with pdflatex?

text: It seems like using `tree-dvips` with `pdflatex` is not very easy. It has been documented in various places in the web. I wouldn't mind using `latex` and then convert to PDF, but I am actually interested in using some options in my `.tex` file which are available only to `pdflatex`. Is there a way to make `tree-dvips` and `pdflatex` agree? What happens right now is that my code compiles, but the elements which are supposed to be printed by `tree-dvips` commands do not appear.


title: Upright parentheses in italic text

text: > **This question led to a new package:**   >  `embrac` Bringhurst, in _Elements of Typographic Style_ , recommends to use upright parentheses in italic text (i.e., write ' _a_ ( _simple_ ) _example_ ' as opposed to ' _a (simple) example_ '). I tend to agree, it looks nicer. But, how do I achieve this using LaTeX? One could of course write `\emph{a \emph{(}simple\emph{)} example}`, but that would get old real soon. Two approaches I've thought of:   * Make `()` (and possibly `[]`) active characters, and ensure that they're always typeset upright, or   * Do some wizardry with virtual fonts or somesuch. I might be able to implement the first suggestion with my knowledge, but my gut tells me the second option is more elegant. Unfortunately, my knowledge of (virtual) fonts in LaTeX is even more limited than my knowledge of (in)active characters and catcodes and such. Any ideas on how to go about this?


title: \AtBeginDocument breaks csquotes nesting - or \xspace won't add space

text: A couple of months ago, I asked this question because `xspace` wasn't adding whitespace before an active quote. The apparent solution was to add `\AtBeginDocument`. However, this breaks `csquotes` nesting as I just found out:               \documentclass{minimal}          \usepackage[log-functions=false]{expl3}     \usepackage[log-declarations=false]{xparse}          \usepackage{luatextra}          \usepackage[autostyle,german=guillemets]{csquotes}          \usepackage{xspace}     \usepackage[xspace]{ellipsis}               \AtBeginDocument{        % comment this for the nesting to work         \MakeAutoQuote{“}{”}     }          \NewDocumentCommand \test {} {         test\xspace     }          \begin{document}          Hello, \test “after command, with just an “inner quote,” which \emph{should} be automatic.”          \end{document}      Is there a way to somehow get both to work? The inner quotes switching to single quotes automatically AND the space after the command?


title: prettyref- defining my references in a shorter way

text: Currently I am working with `prettyref` which is pretty useful and works fine. The only disadvantage so far is: if I use several references in a summary the references itself become pretty long and are disturbing the reading flow (e.g. "see section 4.1.2 "Test-Chapter" on page XYZ"). Is there a possible solution to shorten the cross-reference in my way (e.g. only see section 4.1.2)? I did not find any similar questions.               \documentclass{article}     \usepackage{prettyref}          \begin{document}     \section{Example 1}     \label{sec:Example_1}     Random Text.Random Text.Random Text.Random Text.Random Text.     \section{Example 2}     This is my second chapter. See also \prettyref{sec:Example_1}     \end{document}


title: Small caps for the math mode

text: How do I make "E" in this equation a small cap?               $x^E$


title: Defining a command for amsmath's align environment

text: I'd like to define a shorthand command for `\begin{align*}` and `\end{align*}`. When I write               \newcommand{\ba}{\begin{align*}}        it works fine. But when I write               \newcommand{\ea}{\end{align*}}        LaTeX complains. It looks like it's interpreting it as part of the environment and is not happy with that. Anyone know how to fix this?


title: Is the LPPL compatible with the corporate design of a university?

text: I created a `.cls` file for the letterhead of my university. Can I write something like > This class is licensed under LaTeX Project Public License(LPPL) and only > university staff is allowed to use it. Or > are there any problems with LPPL + "only some people are allowed to use it"?


title: Vertical sidebars

text: I'm trying to layout a text book where each page in a given chapter has a thin coloured sidebar that starts at the top of the page and is some fixed length long. Each chapter will have a differently coloured sidebar of differing lengths. For example, chapter 1 might have a green sidebar of length 5cm, chapter 2, red of length 3cm and so on. The sidebars will in an ideal world be in addition to any margin notes. Would appreciate any help anyone could give with this. The best option I can see at the moment is to use tikz, but maybe there's a simpler solution.


title: Thickness and alignment of curly braces for block matrix dimensions

text: I need to create block matrices with the dimensions in the right. The blocks of the matrices are of different dimensions. Here is a MWE:               \documentclass{article}     \usepackage{easybmat}     \usepackage{bm}          \newcommand{\smsub}[1]{\scriptscriptstyle\mathrm{#1}}          \begin{document}          \begin{equation}       \hat{\bm{P}}=       \left(       \begin{BMAT}(b){c}{ccc.c}         P_{\smsub{1}}  \\          \vdots \\         P_{\smsub{K-1}}\\         P_{\smsub{K}}          \end{BMAT}       \right)=       \left(       \begin{BMAT}(b){c}{ccc.c}         \vphantom{\vdots} \\         \bm{\breve{P}} \\          \vphantom{\vdots} \\         P_{\smsub{K}}          \end{BMAT}       \right)       \begin{BMAT}(@)[1pt,10pt,0pt]{l}{cc}         \left. \vphantom{\rule{0mm}{30pt}}\right\rbrace{\scriptstyle (K-1)\times 1}\\          \left. \vphantom{\rule{0mm}{10pt}}\right\rbrace{\scriptstyle \; 1 \times 1}\\        \end{BMAT}     \end{equation}           \end{document}      Problems:   1. I don't know how to create braces with the same thickness. As it can be seen, the upper brace for the (k-1)x1 dimension is larger and sensibly thicker than the one for the lower block. Ideally they should have the same thickness, and they should be thin.   2. The alignment of the braces added in the third BMAT with the other two BMAT is done somehow manually. Is there a way to align the braces automatically? I am not tied to use easybmat, so should anybody present a better solution I would be fine with that.


title: Upright Lowercase $\pi$

text: On pg. 144 of Kopka and Daily's _A Guide to LaTeX_ , they mention that the symbols `$e$`, `$i$`, `$d$`, and `$\pi$` should be displayed upright in math mode (for their usual uses). This is easy to do for `$e$`, `$i$`, and `$d$`: just use `\mathrm`. However, this does nothing to `\pi`. How exactly do you generate an upright `\pi` in math mode?


title: How to change the appearance of the optional argument of \cite in amsrefs?

text: Continuing my odyssey with oldstyle numbers, I'd like to disable them also in the optional (second) argument of `\cite{...}*{...}` in `amsrefs`. Any hints how to do that? (I'm using XeLaTeX, but this is probably irrelevant here, since the problem is now not "how to get rid of oldstyle numbers", but "how to change the style of the second `\cite`'s argument".) **Edit:** here's an example:               \documentclass{article}          \usepackage{amsrefs}          \begin{document}          See \cite{somebook}*{p.~123}.     Also compare \citelist{\cite{somebook}\cite{anotherbook}*{p.987}}.          \begin{bibdiv}       \begin{biblist}         \bib{somebook}{book}{           title={Title},           author={Author},           date={1999},         }         \bib{anotherbook}{book}{           title={Another Title},           author={Somebody Else},           date={2001},         }       \end{biblist}     \end{bibdiv}          \end{document}      What I'd like to achieve is to change the style of "p. 123" (for instance, to boldface). **Edit 2:** It seems that `\citelist` is a bonus challenge to this... (I modified the MWE above to show the problem.)


title: pgf-Tikz code generator for Latex

text: LatexDraw is a PSTricks code generator for Latex. LatexDraw generates PSTricks codes of any fugure are drawn. ![enter image description here](http://i.stack.imgur.com/uAcsW.png) Are there any such tools that will generate pgf-tikz code of any figure for latex? If yes please suggest me. Thank you in advance.


title: caption package doesn't recognize font=doublespacing?

text: The journal I'm targetting requires "doublespaced" figure captions, and posts like these http://www.latex-community.org/forum/viewtopic.php?f=45&t=4187 made me try out the `caption` package. I grabbed it from CTAN and looking at its doc (p. 10) made me try the `font=doublespacing` option, via a `\usepackage[font=doublespacing]{caption}` line in my preamble. But doing so generates an unknown key error:               ! Package keyval Error: doublespacing undefined.     See the keyval package documentation for explanation.     l.448 \ProcessOptionsWithKV{caption}          this is using  pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex      2006.12.10), via LyX v2.0.3.


title: How to get more space underneath a block in beamer?

text: I'm creating a beamer presentation. This is my code:               \documentclass{beamer}          \usetheme{Berlin}     \useoutertheme{miniframes} %Titelbalken     \setbeamertemplate{blocks}[rounded][shadow=true]          %Packages     \usepackage{amsmath, amssymb, amsthm}          \newenvironment{te bewijzen}[1][]     {\textbf{Te bewijzen:} #1}          \newenvironment{bewijs}[1]{         \pushQED{\qed}         \textbf{Bewijs:} #1}     {\popQED}          \begin{document}          \section{Deelvraag 1}          \subsection{Bewijs}     \frame{\frametitle{Bewijs}         \begin{block}{Block}             some text in my block         \end{block}         \begin{te bewijzen}             this is what I have to prove         \end{te bewijzen}         \begin{bewijs}             \begin{align*}                                    & line 1\\                 \Longrightarrow~    & line 2\\                 \Longrightarrow~    & line 3\\                 \Longrightarrow~    & line 4             \end{align*}     \end{bewijs}     }          \end{document}      As you can see, the block and the text underneath are a bit close together and I don't really like that. How can I get some more space between them?


title: How to put a PDF figure on top of another one

text: I have two PDF figures (charts) in a LaTeX document. As one of them is really simple, and I have some document space constraints, I was thinking of putting it in the upper right corner of the second chart. I could do this using some image editing tool. But can I do it directly in LaTeX (avoiding the need to create a single merged PDF)?


title: Is there a database of Tex/LaTeX package bugs where one can report or track status?

text: I recently stumbled across an annoying flaw in a package that I require, which pretty much makes a mess of good chunk of my documents. That made me wonder whether there was some central repository of data about bugs and their status. It would be particularly helpful, for example, to have some idea of whether a bug had a recommended patch that was likely to survive updates, or whether a package was actively maintained.


title: Equation numbering restart for every theorem

text: How to make the equation numbering restart after every proof? One alternative is to use               \numberwithin{equation}{theorem}      but it shows the chapter and theorem number, like (5.5.1). I want the numbering to exclude the chapter and theorem number, so it only shows (1) instead of (5.5.1).


title: fontspec usage with XeLaTeX under MiKTeX 2.9 and Win7Pro

text: I've a few questions about XeLaTeX and fontspec. Given:               EBGaramond12-SC.otf:Family:              EB Garamond 12 SC     EBGaramond12-SC.otf:Subfamily:           SC     EBGaramond12-SC.otf:Full name:           EB Garamond 12 Regular SmallCaps     EBGaramond12-SC.otf:PostScript name:     EBGaramond12-SC     EBGaramond12-SC.otf:Preferred family:    EB Garamond     EBGaramond12-SC.otf:Preferred subfamily: 12 SC Regular      obtained with the command line of `otfinfo -i -q EBG*.*`. My first question is which name to use with `\fontspec`? I know from experience that the `Postscript name` will work. But in many examples that I've read, I've seen names with embedded blanks. Since I can retrieve either this is mostly asked to clarify my knowledge. In sum, what works when specifying the name of a font? My second question is related again to `\fontspec` (and by extension to XeLaTeX). Virtually all of my postscript fonts are missing the requisite table information. The various character glyphs are present, but no tables. So, does this mean that an attempt to use a font without the `onum` tag (Oldstyle Figures) means that I'll get the warning about missing feature in the log file? With the attendent lack of Oldstyle Figures? By the way I'm aware that this is not a problem with EBGaramond. My last question is a preferred style question (idiomatic usage). Do people prefer the short tag specification or the long name specification in `\fontspec`? Use `onum` or 'Oldstyle Figures'?


title: Change glossary entry to show (name) (see ___ , if exists) (description)

text: I would like to alter the glossary style to be able to show each entry as: (name) (see ___ , if exists) (description) (page#) How can I accomplish this? Really appreciate your help in advance.               \documentclass{article}     \usepackage{datatool}         \usepackage{glossaries}           \makeglossaries     \makeindex          \newglossaryentry{random variable}     {       name={random variable},       description={a variable which can take on multiple values}     }     \newglossaryentry{sample space}     {       name={sample space},       description={a set of values that a random variable        can take},      see={random variable}     }          \begin{document}     Something about \gls{random variable} and \gls{sample space}     \printglossary     \end{document}      The output is then: ![enter image description here](http://i.stack.imgur.com/NSWS3.png) I'd really like to have the "see random variable" before the description.