title: Using latexdiff to highlight changes: alternatives for soul?

text: I am using latexdiff to create a pdf that highlights changes between two .tex along with hg diff latex, so as to use with Mercurial. However, the problem is that the the strikethrough formatting (which makes things much easier to read) seems to break under multiple paragraphs. This was pointed out by this SE question that went unanswered by @levesque. A workaround was given here by @Keks Dose, suggesting that people put               \providecommand{\DIFadd}[1]{{\protect\color{blue}#1}} %DIF PREAMBLE     \providecommand{\DIFdel}[1]{{\protect\color{red}\protect\scriptsize{#1}}}      into the preamble of their files. This replaces the strikethrough highlighting with red text in scriptsize. While this seems to work, the problem is that it is not a terribly attractive solution. Now 2-3 years later after the original question, is there a workaround to using the broken \sout and latexdiff combination? If not, is there a way to better highlight the text? * * * Here is a minimal example: Create a file `testdiff1.tex`               \documentclass{article}          \begin{document}     \section{Introduction}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet scelerisque diam, at eleifend dolor. Aliquam id neque placerat, posuere quam vitae, vulputate mauris. Morbi eu aliquam quam, ut posuere mauris. Vestibulum sit amet nisl felis. Proin in felis mauris. Etiam sed egestas velit. Donec pellentesque hendrerit lacus, in rhoncus dolor dignissim condimentum. Nullam sagittis tellus a hendrerit interdum. Duis risus est, semper eu feugiat posuere, interdum sit amet ante. Etiam porta enim quis quam imperdiet suscipit. Donec vel egestas quam, sit amet ullamcorper orci.          Vivamus in augue sit amet erat viverra bibendum at at eros. Donec dignissim aliquet mauris, non pellentesque odio luctus eu. Nunc placerat, sem in hendrerit placerat, risus leo aliquet quam, id tincidunt leo augue vel nisl. Phasellus pharetra felis vitae metus laoreet bibendum. Integer vitae ultricies libero. Proin egestas cursus justo. Ut viverra leo non nunc condimentum suscipit. Interdum et malesuada fames ac ante ipsum primis in faucibus. Morbi suscipit malesuada ultricies. Aliquam a tempor lorem, quis varius lorem. Morbi aliquet dignissim est. Nulla et nibh vel ligula consectetur laoreet quis at neque.          Mauris ornare leo vel sem feugiat lacinia. Mauris placerat tortor eget felis pharetra, quis eleifend odio malesuada. Ut non interdum purus. Donec auctor ante sed erat iaculis convallis. Aliquam convallis laoreet erat, et placerat dolor. Nunc condimentum neque dui, eget malesuada orci bibendum eget. Ut a odio interdum, ullamcorper tellus eget, vehicula orci. Sed congue sem non diam tristique, id sagittis ante congue. Praesent sagittis mi vitae ligula faucibus, et pellentesque eros auctor. Nunc erat est, vehicula eu risus in, semper tincidunt augue. Nam eu eleifend felis, quis dictum urna. Vestibulum eget purus vel lectus tempor ultrices sit amet in ligula. Suspendisse et libero a turpis volutpat vestibulum sit amet porttitor dolor. Etiam pellentesque pretium massa, a vehicula mi ullamcorper quis. Morbi eros nunc, semper quis augue porttitor, posuere interdum tellus.          Vestibulum ultrices vel nibh non consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla in mollis eros, in iaculis magna. Vestibulum fermentum non sem nec laoreet. Maecenas sit amet sapien metus. Maecenas consectetur gravida ornare. Nam vel risus nec turpis rutrum viverra ut et augue.          Quisque mattis, libero nec dictum pretium, mauris libero interdum erat, eu pulvinar turpis velit ac velit. Phasellus tempor orci quis aliquet tincidunt. Fusce pharetra, lorem a pellentesque pulvinar, ante ipsum pellentesque quam, et porttitor odio orci ut ligula. Donec ullamcorper eros et fringilla sodales. Curabitur faucibus dui sed ipsum tincidunt congue. Maecenas vel egestas mauris. Proin augue nisi, rutrum et consequat nec, fringilla sed lacus. Phasellus vitae vulputate velit. Nunc ut luctus mi.      \end{document}      Now create a file `testdiff2.tex`               \documentclass{article}          \begin{document}     \section{Introduction}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet scelerisque diam, at eleifend dolor. Aliquam id neque placerat, posuere quam vitae, vulputate mauris. Morbi eu aliquam quam, ut posuere mauris. Vestibulum sit amet nisl felis. Proin in felis mauris. Etiam sed egestas velit. Donec pellentesque hendrerit lacus, in rhoncus dolor dignissim condimentum. Nullam sagittis tellus a hendrerit interdum. Duis risus est, semper eu feugiat posuere, interdum sit amet ante. Etiam porta enim quis quam imperdiet suscipit. Donec vel egestas quam, sit amet ullamcorper orci.               Mauris ornare leo vel sem feugiat lacinia. Mauris placerat tortor eget felis pharetra, quis eleifend odio malesuada. Ut non interdum purus. Donec auctor ante sed erat iaculis convallis. Aliquam convallis laoreet erat, et placerat dolor. Nunc erat est, vehicula eu risus in, semper tincidunt augue. Nam eu eleifend felis, quis dictum urna. Vestibulum eget purus vel lectus tempor ultrices sit amet in ligula. Suspendisse et libero a turpis volutpat vestibulum sit amet porttitor dolor. Etiam pellentesque pretium massa, a vehicula mi ullamcorper quis. Morbi eros nunc, semper quis augue porttitor, posuere interdum tellus. Inserting a new sentence here. Quisque nisi nisl, malesuada at convallis ac, condimentum ac nulla. Suspendisse tempus quam id commodo laoreet. Maecenas vitae diam ornare, vehicula est id, ultricies justo. Quisque a felis ipsum. Mauris suscipit tincidunt enim nec auctor. Nam sem ipsum, sodales ut sollicitudin ut, adipiscing at metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut nulla ac lectus malesuada rhoncus. Vestibulum eget felis lacus. Etiam at erat nec est iaculis cursus.           Vestibulum ultrices vel nibh non consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla in mollis eros, in iaculis magna. Vestibulum fermentum non sem nec laoreet. Maecenas sit amet sapien metus. Maecenas consectetur gravida ornare. Nam vel risus nec turpis rutrum viverra ut et augue.          Quisque mattis, libero nec dictum pretium, mauris libero interdum erat, eu pulvinar turpis velit ac velit. Phasellus tempor orci quis aliquet tincidunt. Fusce pharetra, lorem a pellentesque pulvinar, ante ipsum pellentesque quam, et porttitor odio orci ut ligula. Curabitur faucibus dui sed ipsum tincidunt congue. Maecenas vel egestas mauris. Proin augue nisi, rutrum et consequat nec, fringilla sed lacus. Phasellus vitae vulputate velit. Nunc ut luctus mi.      \end{document}      Call               latexdiff testdiff1.tex testdiff2.tex > diff.tex      The output `diff.tex` will contain               %DIF 1a1-12     %DIF LATEXDIFF DIFFERENCE FILE     %DIF DEL testdiff1.tex   Sun Oct 13 18:36:20 2013     %DIF ADD testdiff2.tex   Sun Oct 13 18:36:21 2013     % This is file JFM2esam.tex      %DIF >      % first release v1.0, 20th October 1996      %DIF >      %       release v1.01, 29th October 1996      %DIF >      %       release v1.1, 25th June 1997      %DIF >      %       release v2.0, 27th July 2004      %DIF >      %   (based on JFMsampl.tex v1.3 for LaTeX2.09)      %DIF >      % Copyright (C) 1996, 1997 Cambridge University Press      %DIF >       %DIF >      %\NeedsTeXFormat{LaTeX2e}      %DIF >       %DIF >      %\documentclass{jfm}      %DIF >      %\usepackage{natbib}      %DIF >      %DIF -------     \documentclass{article}          %DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF     %DIF UNDERLINE PREAMBLE %DIF PREAMBLE     \RequirePackage[normalem]{ulem} %DIF PREAMBLE     \RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE     \providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE     \providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}                      %DIF PREAMBLE     %DIF SAFE PREAMBLE %DIF PREAMBLE     \providecommand{\DIFaddbegin}{} %DIF PREAMBLE     \providecommand{\DIFaddend}{} %DIF PREAMBLE     \providecommand{\DIFdelbegin}{} %DIF PREAMBLE     \providecommand{\DIFdelend}{} %DIF PREAMBLE     %DIF FLOATSAFE PREAMBLE %DIF PREAMBLE     \providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE     \providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE     \providecommand{\DIFaddbeginFL}{} %DIF PREAMBLE     \providecommand{\DIFaddendFL}{} %DIF PREAMBLE     \providecommand{\DIFdelbeginFL}{} %DIF PREAMBLE     \providecommand{\DIFdelendFL}{} %DIF PREAMBLE     %DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF          \begin{document}               \section{Introduction}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet scelerisque diam, at eleifend dolor. Aliquam id neque placerat, posuere quam vitae, vulputate mauris. Morbi eu aliquam quam, ut posuere mauris. Vestibulum sit amet nisl felis. Proin in felis mauris. Etiam sed egestas velit. Donec pellentesque hendrerit lacus, in rhoncus dolor dignissim condimentum. Nullam sagittis tellus a hendrerit interdum. Duis risus est, semper eu feugiat posuere, interdum sit amet ante. Etiam porta enim quis quam imperdiet suscipit. Donec vel egestas quam, sit amet ullamcorper orci.               \DIFdelbegin \DIFdel{Vivamus in augue sit amet erat viverra bibendum at at eros. Donec dignissim aliquet mauris, non pellentesque odio luctus eu. Nunc placerat, sem in hendrerit placerat, risus leo aliquet quam, id tincidunt leo augue vel nisl. Phasellus pharetra felis vitae metus laoreet bibendum. Integer vitae ultricies libero. Proin egestas cursus justo. Ut viverra leo non nunc condimentum suscipit. Interdum et malesuada fames ac ante ipsum primis in faucibus. Morbi suscipit malesuada ultricies. Aliquam a tempor lorem, quis varius lorem. Morbi aliquet dignissim est. Nulla et nibh vel ligula consectetur laoreet quis at neque.          }%DIFDELCMD <           %DIFDELCMD < %%%     \DIFdelend Mauris ornare leo vel sem feugiat lacinia. Mauris placerat tortor eget felis pharetra, quis eleifend odio malesuada. Ut non interdum purus. Donec auctor ante sed erat iaculis convallis. Aliquam convallis laoreet erat, et placerat dolor. Nunc \DIFdelbegin \DIFdel{condimentum neque dui, eget malesuada orci bibendum eget. Ut a odio interdum, ullamcorper tellus eget, vehicula orci. Sed congue sem non diam tristique, id sagittis ante congue. Praesent sagittis mi vitae ligula faucibus, et pellentesque eros auctor. Nunc }\DIFdelend erat est, vehicula eu risus in, semper tincidunt augue. Nam eu eleifend felis, quis dictum urna. Vestibulum eget purus vel lectus tempor ultrices sit amet in ligula. Suspendisse et libero a turpis volutpat vestibulum sit amet porttitor dolor. Etiam pellentesque pretium massa, a vehicula mi ullamcorper quis. Morbi eros nunc, semper quis augue porttitor, posuere interdum tellus. \DIFaddbegin \DIFadd{Inserting a new sentence here. Quisque nisi nisl, malesuada at convallis ac, condimentum ac nulla. Suspendisse tempus quam id commodo laoreet. Maecenas vitae diam ornare, vehicula est id, ultricies justo. Quisque a felis ipsum. Mauris suscipit tincidunt enim nec auctor. Nam sem ipsum, sodales ut sollicitudin ut, adipiscing at metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut nulla ac lectus malesuada rhoncus. Vestibulum eget felis lacus. Etiam at erat nec est iaculis cursus.           }\DIFaddend           Vestibulum ultrices vel nibh non consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla in mollis eros, in iaculis magna. Vestibulum fermentum non sem nec laoreet. Maecenas sit amet sapien metus. Maecenas consectetur gravida ornare. Nam vel risus nec turpis rutrum viverra ut et augue.          Quisque mattis, libero nec dictum pretium, mauris libero interdum erat, eu pulvinar turpis velit ac velit. Phasellus tempor orci quis aliquet tincidunt. Fusce pharetra, lorem a pellentesque pulvinar, ante ipsum pellentesque quam, et porttitor odio orci ut ligula\DIFdelbegin \DIFdel{. Donec ullamcorper eros et fringilla sodales}\DIFdelend . Curabitur faucibus dui sed ipsum tincidunt congue. Maecenas vel egestas mauris. Proin augue nisi, rutrum et consequat nec, fringilla sed lacus. Phasellus vitae vulputate velit. Nunc ut luctus mi.      \end{document}      The error has to do with the blank lines that are inserted prior to the `%DIFDELCMD <` comments. Once these are removed, then it compiles. If it is not removed, it does not compile. As it was pointed out in the old thread, how do we fix this without going through things manually?


title: \newpage,\clearpage and \cleardoublepage not working

text: I'm trying to compile the following:               \documentclass[twoside,11pt,titlepage]{article}     \usepackage[paperwidth=5in,paperheight=7in]{geometry}     \usepackage{graphicx}     \usepackage[absolute]{textpos}     \begin{document}     \thispagestyle{empty}      \begin{textblock*}{125mm}(0mm,0mm)       \noindent       \includegraphics[width=\textwidth]{front.jpg}     \end{textblock*}     \newpage     Hello!     \end{document}      I get the jpg image on the first page. But the second page with "Hello" comes over the first page itself. I tried `\clearpage` and `\cleardoublepage` instead of `\newpage` as per the following question: Why is \newpage ignored sometimes ? But to no avail. Any suggestions so as to how to get a new page started after the first page?


title: Changing `proof` endmark when using `ntheorem` with `thmmarks` and `amsthm` options

text: Q: Is there an easy way to change the default `proof` environment endmark (it's normally a funny open square and I'd like to change it to `\blacksquare`) when using the `ntheorem` package with the `amsthm` and `thmmarks` options? I'd like to continue using the `ntheorem` package without migrating over to `amsthm` You can see below that I added a `\square` endmark to the different theorem environments. I'm just stuck on changing the `proof` endmark. You can see below I tried the code `\renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}` It didn't work. A number of other approaches didn't work either.               \documentclass{article}     \usepackage[amsthm,thmmarks]{ntheorem}     \usepackage{amssymb}          \theoremstyle{break}     \theoremsymbol{\ensuremath{\square}}     \newtheorem{theorem}{Theorem}[section]     \newtheorem{definition}[theorem]{Definition}     %\renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}          \begin{document}          \begin{theorem}[My Theorem]       Lorem ipsum.      \end{theorem}     \begin{proof}       Lorem ipsum.     \end{proof}          \begin{definition}[My Definition]       Lorem ipsum.     \end{definition}          \end{document}       ![endmarks](http://i.stack.imgur.com/OLkzK.jpg)


title: TeX Fancy-preview,fancytooltips, Perl library Config::IniFiles

text: I was trying to get the LaTeX fancy preview running (http://user.mendelu.cz/marik/fancy-preview/#real) I think, I managed to get everything right but except for Config::IniFiles. As pointed out at the end of the site one needs the Perl Config::IniFiles and i am totally unfamiliar to perl; so how do i use Perl library Config::IniFiles to get the LaTeX fancytooltips output? i am using windows7, 64Bit; MikTex Thanks in advance


title: Grammar-checking tool for use with LaTeX?

text: I am looking for a grammar-checking tool, i.e., something that checks for mistakes such as "two dog" or "a books". It has to work on Linux (Ubuntu). Also, since that I use macros to generate some of the prose, it has to somehow work with LaTeX. I don't believe that such checkers are LaTeX-aware, to it has to work with some compilation product of LaTeX: DVI or PDF. If you suggest a grammar checker that checks plain text, please explain how to you extract the text. catdvi does a nice job, but it leaves some garbage, like page numbers.


title: Any LaTeX editor with grammar check capability?

text: Is there any LaTeX editor with built-in grammar check? I was writing my thesis and was just wondering; it could be very helpful.


title: Problem with \maketitle in moderncv

text: I downloaded the `moderncv` template for LyX, I tried to compile it but this error appears: > \maketitle > > Your command was ignored. Type I to replace it with another command, or to > continue without it. If I delete `\maketitle` it works, but the title, name and so don't appear! I am not able to use LaTeX, I only use Lyx. Please help me!


title: How to repair path to updmap config files in MacTeX

text: I installed MacTeX 2012 on a freshly installed Mountain Lion. I now would have liked to install some special fonts (Trebuchet, Frutiger etc.). For that I made sure that all the font files are in               ~/Library/texmf/      If I run               updmap --enable Map=jtr.map      (or even `updmap-sys`) I would receive this result:               updmap: resetting $HOME value (was /Users/anouak) to root's actual home (/var/root).     updmap is using the following updmap.cfg files (in precedence order):       /var/root/Library/texlive/2012/texmf-config/web2c/updmap.cfg       /usr/local/texlive/2012/texmf-config/web2c/updmap.cfg       /usr/local/texlive/2012/texmf/web2c/updmap.cfg       /usr/local/texlive/2012/texmf-dist/web2c/updmap.cfg     updmap is using the following updmap.cfg file for writing changes:       /var/root/Library/texlive/2012/texmf-config/web2c/updmap.cfg     dvips output dir: "/var/root/Library/texlive/2012/texmf-var/fonts/map/dvips/updmap"     pdftex output dir: "/var/root/Library/texlive/2012/texmf-var/fonts/map/pdftex/updmap"     dvipdfmx output dir: "/var/root/Library/texlive/2012/texmf-var/fonts/map/dvipdfmx/updmap"     pxdvi output dir: "/var/root/Library/texlive/2012/texmf-var/fonts/map/pxdvi/updmap"          ERROR:  The following map file(s) couldn't be found:         jtr.map (in /var/root/Library/texlive/2012/texmf-config/web2c/updmap.cfg)              Did you run mktexlsr?              You can disable non-existent map entries using the option           --syncwithtrees.      Indeed, I did run `mktexlsr` and a `kpsewhich jtr.map` results in:               /Users/anouak/Library/texmf/fonts/map/dvips/jtr.map      So it is there. I also did a `\--syncwithtrees` to disable the "non-existent" map entries, but unfortunately to no avail. What is irritating to me is that `updmap` is trying to use config files in `/var/root/` or `/private/var/root/` respectively to which even I have rarely access and if then only with difficulties. Also, during my research in the web I found nobody citing this path. Can anybody help me to get this weird problem solved? Because I need those additional fonts in order to cope with our corporate design.


title: Prevent supertabular* from breaking too early

text: I have a similar question as ipavlic, that is, the break of a long table by the `supertabular` package comes too soon. The solution proposed by egreg works well for the `supertabular` environment, however, being a LateX noob I cannot get it to work for the `supertabular*` environment. Minimal working example                   \documentclass[a4paper,12pt,oneside]{article}         \usepackage{supertabular}              \makeatletter          \def\mod@estimate@lineht{%            \ST@lineht=\arraystretch \baslineskp            %\global\advance\ST@lineht by 1\p@            \ST@stretchht\ST@lineht\advance\ST@stretchht-\baslineskp            \ifdim\ST@stretchht<\z@\ST@stretchht\z@\fi            \ST@trace\tw@{Average line height: \the\ST@lineht}%            \ST@trace\tw@{Stretched line height: \the\ST@stretchht}%          }          \newenvironment{strictsupertabular*}            {\let\estimate@lineht\mod@estimate@lineht\supertabular*}            {\endsupertabular*}          \makeatother              \begin{document}              \tablefirsthead{\hline\hline a & b & c\\\hline}         \tablehead{\hline\hline a & b & c\\\hline}         \tabletail{\hline\hline}         \tablelasttail{\hline\hline}         \topcaption{caption}         \centering         \begin{supertabular*}{1 \columnwidth}{@{\extracolsep{\fill}} c c c}         1 & 2 & 3\\         4 & 5 & 6\\         \end{supertabular*}              \end{document}      However, when I change `supertabular*` to `strictsupertabular*` I get an error. Is it possible to define a `strictsupertabular` environment that has `tabular*` functionality?


title: Compatibility issue between svn-multi and lineno

text: There is an issue between svn-multi and lineno. Setting the `svnid` confuses `lineno` witch results in a unwanted outcome. Without `\svnid{$Id: abc.tex 1 2013-06-25 15:30:32Z asb $}` everything works as expected. ## **Edit 1:** The wrong line numbers show up only in the paragraph before the `svnid`-command. Since in my case, I use the `svn`-command at the beginning of files that I include via `\input` that always start a new paragraph, I can solve the problem via using `\par` before the `svnid`-command. Nonetheless I am still interested in better solution. ## Output ![enter image description here](http://i.stack.imgur.com/SFBO2.jpg) ## MWE               \documentclass{article}     \usepackage{blindtext}     \usepackage{lineno}     \linenumbers     \usepackage{svn-multi}          \begin{document}          \blindtext[1]      % calling \par is work-around     % \par      \svnid{$Id: abc.tex 1 2013-06-25 15:30:32Z asb $}%     \blindtext[1]          \end{document}


title: How two connect any arbitrary nodes of tree in tikz

text: I need to be able to connect any arbitrary nodes in a tree to each other. I am using the tree package in tikz to create my tree. I cannot figure out though how to connect to nodes by let say a draw or path command. here is a minimal example. Let say I like to connect node F to node D, any suggestions would be truly appreciated. Artimess               \documentclass[10pt]{book}     \usepackage{tikz}     \usetikzlibrary{backgrounds}     \usetikzlibrary{trees,positioning,arrows}     \begin{document}     \begin{tikzpicture}[scale=0.8,font=\small, edge from parent fork down,     every node/.style={fill=blue!10},     edge from parent/.style={red,thick,draw},     level 1/.style={sibling distance=8cm},     level 2/.style={sibling distance=4.5cm}]     \node {A}       child {node {B}        child {node {C} }         child {node {D}  child{node{E}}}}       child {node {F}       child {node {G}}       };     \end{tikzpicture}     \end{document}


title: Consistency versus aesthetics with respect to \tilde and \widetilde

text: I am currently working on a paper which heavily uses `\tilde` for both lower case letters and capitals in math bold font. When using `\tilde` for lower case letters, everything looks perfectly fine, but `\tilde{\mathbf{X}}` looks a little silly because the symbol is so out of proportion relative to the symbol below it. My solution to this has been to use `\widetilde` only for capitals instead, but I am concerned about consistency and any personal bias on the aesthetics of tiny tildes over large symbols. To me, the problem is twofold:   1. If I use `\widetilde`, I am essentially using two different symbols, `\tilde` and `\widetilde` to mean the same thing.    2. When `\widetilde` is used inside a line of text, it disrupts the spacing (in a very minor way) unless I override that behavior. This would also be inconsistent with the way I've written to avoid any disruption of line spacing by things such as using `\displaystyle` for my in-text limits and summations. At this time, I think the best solutions are to either just use a tiny tilde for everything; only use `\widetilde` in the math environment for capitals and `\tilde` in-text; or suppress the added spacing because most readers will never notice the difference and this is a somewhat pedantic detail anyway (Is messing with ``vertical kerning'' a big deal?). I would appreciate any suggestions.


title: Texmaker 1 2 3 buttons

text: What is the usage of 1 2 3 here in the source viewer of texmaker? ![enter image description here](http://i.stack.imgur.com/dwf1m.png)


title: Latex randomly skips a line (or not)

text: Consider the following example:                \documentclass{article}      \RequirePackage{amsthm}      \usepackage{lipsum}      \RequirePackage[framemethod=tikz]{mdframed}      \mdfdefinestyle{proof}{        skipabove         = 1\baselineskip ,        skipbelow         = 0\baselineskip ,        leftmargin        = 0pt ,        rightmargin       = 0pt ,        innermargin       = 0pt ,        innertopmargin    = .4em ,        innerleftmargin   = .3em ,        innerrightmargin  = 0pt ,        innerbottommargin = .23em ,        hidealllines      = true ,        singleextra       = {          \draw (O) -- ++(0,.450em) (O) -- ++(.450em,0) ;          \draw (P-|O) -- ++(0,-.450em) (P-|O) -- ++(.450em,0) ;        },        firstextra        = {          \draw (P-|O) -- ++(0,-.450em) (P-|O) -- ++(.450em,0) ;        },        secondextra       = {          \draw (O) -- ++(0,.450em) (O) -- ++(.450em,0) ;        },      }      \surroundwithmdframed[style=proof]{proof}      \newcommand{\Title}[1]{\leftskip=0.0cm{\textbf{\\#1:}}}      \begin{document}        \Title{Test 1}        \lipsum[1-3]        \begin{proof}\hangindent0.5cm        %\lipsum[4]  %Makes it one page        \lipsum[4-5] %Makes the proof go to the 2nd page        \end{proof}        \Title{Test 2}      \end{document}         The problem is: When a proof is only on one page, there is exactly one line between the next proof and the next title. But if the proof goes over one page, this extra line disappears (see image below). Is there any way to prevent this from happening?      ![enter image description here](http://i.stack.imgur.com/AlI7B.jpg)


title: Using mathabx and MnSymbol in the same document

text: I'm not a computer expert, so when I simply include the lines               \include{mathabx, MnSymbol}      in a `.tex` file, compile it, and it gives me a bunch of errors, I don't know what to do... I'm running MikTeX in Windows.


title: Is there a way to print two tikzpictures next to each other marked with a and b?

text: I have the following code that should print the two figures next to each other with an a to the left of the first figure and a b to the left of the second one. The code below does this, but everything is aligned to the bottom line. Is there an option to force the pictures down? Or maybe a totally different way of avhiving my goal? Thanks!               \documentclass{scrbook}          \usepackage{tikz-qtree}          \begin{document}          \begin{figure}[htbp]     \centering     \begin{tabular}[t]{@{}ll@{\hspace{2cm}}ll@{}}     a. & \begin{tikzpicture}     \Tree[.N                [.PV pazirāi ]               [.N                  [.V kon- ] ande ] ]     \end{tikzpicture} &     b. &     \begin{tikzpicture}     \Tree[.N                [.V                  [.PV pazirāi ]                 [.V kon- ] ] ande ]      \end{tikzpicture}     \end{tabular}     \end{figure}               \end{document}


title: LaTeX debugging strategies and brace mismatching

text: What is the recommended way to track down brace mismatches in LaTeX? I have a large `beamer` presentation, but this equally applies to any other LaTeX work I've done. In other computer languages I've used pretty printers to highlight where things mismatch, but I can't seem to find a pretty printer for the LaTeX code itself rather than some other language inside in LaTeX. My next thought is to start commenting out large sections of the source until the problem is pinned down. What other strategies might be used?


title: New command to insert a couple of red XXX as placeholder?

text: I seem to misunderstand the documentation, as               \newcommand\ph{\textcolor{red}{XXX}}      causes pdflatex to halt. I'm not sure if this is the error:               ! Argument of \sf@@subfloat has an extra }.      And I also don't know what it is referring to. What I want to achieve is that               \myshortcommand      turns into               \textcolor{red}{XXX}      so the output is XXX (in red)


title: How to obtain this fancy chapter page with the book class

text: I know that designing fancy things under latex can sometimes be very difficult. I've designed the following model under powerpoint in 5 minutes, and now I would like to achieve this with latex (I have to use the book class for my document, but I can use all existing package). So here is the challenge: ![Chapter image](http://i.stack.imgur.com/JP0RQ.png) How to do the same thing for my latex document?


title: Is there any incompatibility between \section* and \numberwithin?

text: I have to use `\section*{}` in my thesis because I need align the TOC. But when I use `\numberwithin{}{}` equations are numbered like (0.1), (0.2) and so on. It seems that `\numberwithin{}{}` does not recognize sections when it is used `\section*`. The same occurs when I try to number propositions according to sections, that is, they became proposition 0.1,an so on. How can I use both?               \documentclass[a4paper,12pt,oneside]{article}          \usepackage[left=3cm,top=3cm,right=2cm,bottom=2cm]{geometry}          \usepackage{amsmath,amsfonts,amssymb,arial,graphicx,longtable,setspace,color,booktabs,ragged2e}          \usepackage{indentfirst}          \usepackage[portuges]{babel}          \pagestyle{myheadings}          \newtheorem{theorem}{Teorema}[section]           \newtheorem{definition}[theoremm]{Definition}          \newtheorem{example}[theorem]{Example}          \renewcommand{\figurename}{Figura}          \renewcommand{\contentsname}{\centering \normalsize Sum\'ario}          \usepackage[applemac]{inputenc}          \def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}          \let\endchangemargin=\endlist          \onehalfspacing          \newtheorem{theorem}{Teorema}     \newtheorem{acknowledgement}[theorem]{Acknowledgement}     \newtheorem{algorithm}[theorem]{Algorithm}     \newtheorem{axiom}[theorem]{Hip\'{o}tese}     \newtheorem{case}[theorem]{Case}     \newtheorem{claim}[theorem]{Claim}     \newtheorem{conclusion}[theorem]{Conclusion}     \newtheorem{condition}[theorem]{Hip—tese}     \newtheorem{conjecture}[theorem]{Conjecture}     \newtheorem{corollary}[theorem]{Corol\'{a}rio}     \newtheorem{criterion}[theorem]{Criterion}     \newtheorem{definition}[theorem]{Defini\c{c}\~ao}     \newtheorem{example}[theorem]{Exemplo}     \newtheorem{exercise}[theorem]{Exercise}     \newtheorem{lemma}[theorem]{Lema}     \newtheorem{notation}[theorem]{Notation}     \newtheorem{problem}[theorem]{Problem}     \newtheorem{proposition}[theorem]{Proposi\c{c}\~ao}     \newtheorem{remark}[theorem]{Remark}     \newtheorem{solution}[theorem]{Solution}     \newtheorem{summary}[theorem]{Summary}     \newenvironment{proof}[1][Prova]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}          \numberwithin{equation}{section}          \begin{document}          \thispagestyle{empty}     \singlespacing     \begin{center}     \textbf{\normalsize UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL}          \textbf{\normalsize FACULDADE DE CIæNCIAS ECONïMICAS}          \textbf{\normalsize PROGRAMA DE PîS-GRADUA‚ÌO EM ECONOMIA}     \vspace{3cm}          \vspace{3cm}          \large Marcelo de Carvalho Griebeler\\          \vspace{3cm}     \textbf{\large ENSAIOS EM TEORIA ECON\^{O}MICA}\\          \vspace{4cm}          \begin{flushright}     \normalsize     \end{flushright}          \vspace{5cm}          \normalsize \textbf{Porto Alegre}          \normalsize \textbf{2013}     \end{center}          \newpage          \thispagestyle{empty}     \singlespacing     \begin{center}     \textbf{\large Marcelo de Carvalho Griebeler}          \vspace{3cm}          \vspace{3cm}          \textbf{\large ENSAIOS EM TEORIA ECON\^{O}MICA}\\          \vspace{4cm}          \begin{changemargin}{7.4cm}{0.6cm}     Tese submetida ao Programa de P\'{o}s-Gradu\c{c}\~{a}o em Economia da Faculdade de Ci\^{e}ncias Econ\^{o}micas da UFRGS, como quesito parcial para obten\c{c}\~{a}o do t\'{i}tulo de Doutor em Economia, com \^{e}nfase em Economia Aplicada.     \end{changemargin}          \begin{flushright}     \normalsize Orientador: Prof. Dr. Ronald Otto Hillbrecht     \end{flushright}          \vspace{5cm}          \normalsize \textbf{Porto Alegre}          \normalsize \textbf{2013}     \end{center}     \end{document}


title: Left align definition for symbols in a LaTeX math equation?

text: I have an equation and want to have a 'where' block beneath it explaining the variables used. I would like to use something similar to the last example in this answer, but I would like the 'where' block to be aligned (as is, i.e. aligned in itself on the ':') at the left side of the text body -- adapted to the surrounding text. I would like to do so without leaving the math environment. Here is my MWE:               \documentclass{article}     \usepackage{amsmath}% http://ctan.org/pkg/amsmath     \begin{document}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac velit dolor.     Nulla nunc dolor, commodo sed consectetur ac, dapibus malesuada odio.     Mauris porta libero eget nisi placerat quis bibendum tellus fermentum. It is therefore     possible to define the relationship     \begin{gather}       x >> R + E,\\\notag       \begin{split}         \text{where } R &: \text{Racoon,}\\         E &: \text{Elephant}       \end{split}\hfill\mbox{}     \end{gather}     Sed suscipit tristique laoreet.     Nulla mi orci, rutrum sed dapibus sed, elementum nec lacus.     Phasellus id tellus mi, at rutrum justo. Nullam eget turpis justo, ullamcorper     pretium mauris.  It is therefore     possible to define the relationship     \begin{gather}       x \gg R + E,\\\notag       \begin{alignedat}{2}         &\text{where} &\quad R &: \text{Racoon,}\\         &     &E &: \text{Elephant}       \end{alignedat}\hfill\mbox{}     \end{gather}     Sed suscipit tristique laoreet.     Nulla mi orci, rutrum sed dapibus sed, elementum nec lacus.     Phasellus id tellus mi, at rutrum justo. Nullam eget turpis justo, ullamcorper     pretium mauris.  It is therefore     possible to define the relationship     \end{document}      EDIT: Based on the answer from daleif, I extended the MWE.


title: Error in latex, No Bounding box on pdf figure

text: I am trying to compile a document on TeXShop (on a mac). I get an error when I insert a picture from a pdf file. I get the error that `bounding box cannot be determined`. I looked at other answers. Somebody suggested to compile pdfLatex instead of Latex, but on TexShop I do not see how to do it. I also tried to fix a bounding box on LaTeX, as in the following:               \includegraphics[width=1\columnwidth][bb=0 0 100 100]{nameFileFigure}      but it does not work. How can I solve this problem?


title: Set the number of inverted commas automatically based on document language

text: For some languages, `babel` would automatically interpret the inverted commas and convert it to the proper form of the selected language. For example, with Hungarian, when one begins a quotation and writes ````, babel would automatically convert it to `,,` (which is the proper opening of a quotation in Hungarian). However, when I set the language option to British, babel won't do the same kind of conversion (AFAIK British typesetting uses single inverted commas for quotations, so I would expect `babel` to convert automatically the ```` to ``` when starting a quotation). Is there a reason why this automatic conversion doesn't work? Or is there a package option that would enable this conversion?


title: equal column spacing in longtable

text: Does anyone know how to get equal spacing between columns in longtable? My code is attached below. Thanks. Franz               \documentclass[12pt,a4paper]{article} \usepackage[latin1]{inputenc}     \usepackage{import} \usepackage{amsmath} \usepackage{amsfonts}     \usepackage{amssymb} %\usepackage{float} \usepackage{lscape}      \usepackage{setspace} \usepackage{color} \usepackage{geometry}       \geometry{a4paper,left=25.4mm,right=25.4mm,top=25.4mm,bottom=25.4mm}      \usepackage{epsfig} \usepackage{epstopdf} \epstopdfsetup{update}      \usepackage{booktabs} \usepackage{dcolumn} \usepackage{natbib}      \usepackage{caption} \usepackage{subcaption} \usepackage{longtable}     \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}     \setlength{\tabcolsep}{1pt}          \renewcommand{\arraystretch}{.7}     \begin{scriptsize}     \begin{longtable}{l*{7}{c}}     \caption{Unconditional Quantile Wage Regressions: Non-performance paid, 2003-2004 \label{tab rifquantnw0304}}\\         \hline\hline\endfirsthead\hline\endhead\hline\endfoot\endlastfoot             &\multicolumn{1}{c}{RIF5}&\multicolumn{1}{c}{RIF10}&\multicolumn{1}{c}{RIF25}&\multicolumn{1}{r}{RIF50}&\multicolumn{1}{c}{RIF75}&\multicolumn{1}{c}{RIF90}&\multicolumn{1}{c}{RIF95}\\             \hline         Age                 &      0.0930\sym{**} &      0.0847\sym{***}&       0.127\sym{***}&       0.105\sym{***}      &      0.0275         &      -0.150\sym{***}&      -0.189\sym{***} \\                             &      (3.14)         &      (4.42)         &      (7.52)         &      (7.04)               &      (1.78)       &     (-6.13)         &     (-5.77)         \\         Age squared/1000    &      -1.283\sym{***}&      -1.100\sym{***}&      -1.326\sym{***}&      -1.081\sym{***}     &      -0.217         &       1.804\sym{***}&       2.217\sym{***} \\                             &     (-3.64)         &     (-5.04)         &     (-7.78)         &     (-7.31)         &     (-1.39)       &      (6.95)         &      (6.07)         \\         Female              &      -0.109\sym{**} &      -0.253\sym{***}&      -0.401\sym{***}&      -0.364\sym{***}     &           -0.227\sym{***}&      -0.186\sym{***}&      -0.129\sym{***} \\                             &     (-2.66)         &     (-7.56)         &    (-13.53)         &    (-15.18)         &     (-9.87)       &     (-6.54)         &     (-3.98)         \\         Married             &      0.0324         &     -0.0387         &    -0.00840         &      0.0631\sym{*}       &       0.147\sym{***}&       0.122\sym{***}&       0.118\sym{***}\\                             &      (0.75)         &     (-1.41)         &     (-0.33)         &      (2.51)         &      (5.68)       &      (4.10)         &      (4.35)         \\         Number of kids      &     -0.0501         &     -0.0390         &    -0.00465         &     0.00457         &     -0.0178       &    -0.00818         &      0.0195         \\                             &     (-1.14)         &     (-1.31)         &     (-0.19)         &      (0.21)         &     (-0.75)       &     (-0.22)         &      (0.44)         \\         Elementary school   &     -0.0545         &      -0.220\sym{**} &      -0.199\sym{***}&      -0.103\sym{**}      &     0.00754         &      0.0672\sym{*}  &       0.122\sym{**} \\                             &     (-0.52)         &     (-3.06)         &     (-4.76)         &     (-3.19)         &      (0.23)       &      (2.01)         &      (2.93)         \\              \hline         Observations        &        5882         &        5882         &        5882         &        5882         &        5882         &        5882         &        5882         \\         \hline\hline         \end{longtable}         \end{scriptsize}     \end{document}


title: Including .tex files that need a different style file than the main text

text: EDIT: Substantial edit of the original version has been done to clarify the question. ## Background I've written two small python package manuals with `sphinx` (http://sphinx- doc.org/) a program that helps with source code documentation. Among others `sphinx` allows to output the manuals to LaTeX, based on their own documentclass and defined in a style file. I am currently writing my thesis and would like to present the manuals in the appendix of the document. The format of the sphinx latex files is convenient for its purpose, but I don't want to use it for the remainder of the thesis. However, vice-versa in the manuals I'd like to stick to the sphinx-format. ## Question Is there a way to include full documents into a main document, such that they maintain their format without interfering with the main document? A similar problem would be to include a refereed paper inside e.g. a thesis such that it maintains the format of the Journal. ## Notes Including the files in tex format and compiling them together with the main document would allow referencing as well as correcly numbered pages and inclusion in the toc. **EDIT:** Options from the comments below:   * standalone package this seems promising. However I still have issues with it (see below.) (also http://tex.stackexchange.com/a/12268/27635)   * `combine` seems to me that it is rather usefull to produce something like conference proceedings with mutliple files in the same format. It also only lists the titles in the general TOC.   * Compiling the manuals indivudualy and including them in the main tex as pdf. I would rather not use this option, if possible. ## Possible contender: Standalone I am not sure if this is the right way to go. From what I understand `standalone` loads the preamble from the sub-files for the `main.tex` file. This is what I'd like to avoid. Hoever, so far I managed to use standalone to include the manuals into my main manual, however the style remains the same as in the main tex, otherwise this would be what I search for. Here is my current setup for my `main.tex`:               \documentclass[12pt, twoside, paper=A4, final]{scrbook}     \usepackage{standalone}     \usepackage{load other packages ...}          \begin{document}     Mainmatter     \input{manual}     \end{document}      and my `manual.tex`:               \documentclass[subpreamble]{standalone}     \usepackage{sphinx}     \standaloneconfig{class=sphinxmanual}          \begin{document}      manual content     \end{document}      I am not sure if I declare the documentclass for standalone correcly and wheter `\standaloneconfig` accepts it.


title: Change Color of extra ticks grid

text: I got a nice an d tidy plot with the help of pgfplot using groupeplot. Now I want to insert some extra ticks with different color than the major grid...everything works pretty well except the color line of the grid...I know extra ticks are treated as major ticks and for those                major grid style = {red}      would change the color. But I can't find something like                extra grid style = {red}      in the manual. All I can actually find is                extra tick line style={red}      which only changes the color of the label entry of the extra tick. Does anybody knows a tiny and beautiful workaround? Thank in advance, CN


title: Very consistent latex - customized class or KOMA?

text: This is mostly a thought exercise, but in working on a large document, I've come across some annoying inconsistencies when working with latex. These are usually somewhat trivially fixed, but they add up over time and it's kind of a mess, though it's a little better when they are in their own style files. For example, when adding custom floats with the `float` package and then requesting the listofXXXX, the line in the toc doesn't have a vspace, whereas for figures and tables it does (the `report.cls` file adds it, but it is not customizable). Then the list of listings from the `listings` package may look a bit different. There are some other examples, but the overall story is that after a while the document becomes a mishmash of stuff handled by the class and many add-on packages. Lets say I wanted to create a large, complex document or book with lots of customization (think science - different kinds of equations, figures, schemes, examples, problems, etc), with a VERY consistent but somewhat non-standard (by latex standards) layout. How might this be done? I see maybe 2 possibilities:   1. KOMA or similar (feel free to mention others)   2. Some sort of class (like `minimal`) that does the bare minimum, then allow the packages to control everything Or maybe something more powerful than latex?


title: a4paper ignores 14pt

text: I need font size = 14 in article document, but when I change               \documentclass[a4paper,11pt]{article}      to               \documentclass[a4paper,14pt]{article}      font becomes even smaller. How to change font size?


title: LyX, LaTeX, LaTeX2e

text: I need to know (for publication reasons) which are the features of LaTeX2e and the differences between LaTeX2e and normal LaTeX. On the other hand I'm working with LyX. I have no problems in converting my .lyx files to (compilable) .tex files but...had I any problem in getting a LaTeX2e file with convert command of my LyX?


title: Two figures side by side

text: How can I put two figures side-by-side? Not two sub-figures, but two actual figures with separate "Fig.: bla bla" captions. A figure is supposed to spread over the entire text width, but I have two figures which are narrow and long, and I need to save the space in order to withstand the pages limit.


title: undefined control sequence for \subfigure

text: using TeXShop in OS X Maverick, a simple subfigure script is returning "undefined control sequence". Although I can bypass it and still generate the image-included pdf by typing "s" to "ignore all" (of the warnings), I would still like to know the cause and fix for this. Thanks! The sample script is:               \documentclass[a4paper,12pt]{article}     \usepackage{graphicx}          \begin{document}          \begin{figure}[htdp]       \begin{center}         \subfigure{\includegraphics[width=0.3\textwidth]{fig1}}         \subfigure{\includegraphics[width=0.3\textwidth]{fig2}}     \end{center}     \end{figure}          \end{document}


title: Subfigures placed horizontally

text: I want to place two or more figures on top of the two-column page next to each other (horizontally). However, for some reason I can't do this. This is the code that I use, it puts the second figure in the new line. Why is that? Btw, figures are tiny and many of them can fit in one line.               \begin{figure*}[t]     \centering          \subfigure[Market revenue]{     {\epsfig{file = figures/graphs/revenue.pdf, width = 3cm}}     \label{fig:evaluation:revenue}     }          \subfigure[Average price]{     {\epsfig{file = figures/graphs/avgPrice.pdf, width = 3cm}}     \label{fig:evaluation:avgPrice}     }          \caption{Simulation results}     \end{figure*}


title: Putting two images beside each other

text: If I want to put two images beside each other, what should I do? I have inserted a figure. But, rather than having the next figure on a new line, I want it to be beside the already inserted figure. How can I do that?


> **Possible Duplicate:**   >  Two figures side by side How do I put two different pictures side by side? I'm using the figure environment. My code is:               \begin{figure}[h!]     \centering     \includegraphics[scale=0.2,keepaspectratio=true]{fase5.pdf}     \caption{Figura experimental. Nome fase4.pdf}     \label{fase1}     \end{figure}      After the response from @flh I tried the code below and failed.               \begin{figure}[h!]     \centering     \includegraphics{left}[scale=0.2,keepaspectratio=true]{fase5.pdf}     \caption{Figura experimental. Nome fase4.pdf}     \label{fase1}     \includegraphics{rigth}[scale=0.2,keepaspectratio=true]{fase5.pdf}     \caption{Figura experimental. Nome fase4.pdf}     \label{fase2}     \end{figure}


title: Placing two figures side by side

text: > **Possible Duplicate:**   >  Two figures side by side   >  Subfigures placed horizontally I want to place two figures side by side in my document. I am using the `subcaption` package and my code is as follows               \documentclass[a4paper, 12pt, notitlepage]{report}     \usepackage{amsfonts} % if you want blackboard bold symbols e.g. for real numbers     \usepackage{graphicx} % if you want to include jpeg or pdf pictures     \usepackage{amsmath}     \usepackage{chngcntr}     \usepackage{wrapfig}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}     \begin{figure}[h]         \centering         \begin{subfigure}{.5\textwidth}             \centering             \includegraphics[width=0.4\textwidth]{tworoundgameeffortvaryingmujnegative}             \caption{J=-1}             \label{fig:tworoundvarymujnegative}         \end{subfigure}         \begin{subfigure}{.5\textwidth}             \centering             \includegraphics[width=0.4\textwidth]{tworoundgameeffortvaryingmujpositive}             \caption{$J=1$}             \label{fig:tworoundvarymujpositive}         \end{subfigure}         \caption{Effort levels in round one and two with varying $\mu$. $\alpha=1$, $v=0.25$ and $w=0.25$}         \label{fig:effortlevelsvarymu}     \end{figure}     \end{document}      For some reason my two pictures get put on top of each other. Does anybody know why this may be the case?


title: Two figures side by side with two captions and alphanumeric counting

text: How can I have two figure side by side with two captions and in the floating format, like               fig. 10A. some caption                fig. 10B. some caption


title: Caption issue when placing figure side by side

text: I placed 2 figures side by side using the `minipage` method from this post, and the figures look perfectly fine. However, the caption of the right figure stick out into the margin, why is that and how can I fix it? ![enter image description here](http://i.stack.imgur.com/sy9Xl.jpg) My code is like this:               \begin{figure}[htbp]       \centering       \begin{minipage}{.5\textwidth}         \centering         \includegraphics[width=6.6cm]{figure1.png}         \caption{Caption for figure 1.}         \label{fig:fig1}       \end{minipage}%       \begin{minipage}{.5\textwidth}         \centering         \includegraphics[width=6.6cm]{figure2.png}         \caption{Caption for figure 2, but longer.}         \label{fig:fig2}       \end{minipage}     \end{figure}


title: Adding captions to sub-figures

text: For the question here, how can we add captions to each sub-figure?


title: Two images in one line

text: How can set two images in one line without using a table, but having a caption and a label for each image? Besides image one should be labeled Figure 1 and the second figure with Figure 2. Therefore I want the following construction:               **************     *******************     *            *     *                 *     *            *     *                 *     **************     *******************     Figure 1: Caption  Figure 2: Caption      I tried already subfigure:               \begin{figure}[!ht]     \subfigure[caption]{\includegraphics[width=0.4\linewidth]{Screenshots/step1.png}}     \subfigure[caption]{\includegraphics[width=0.41\linewidth]{boundingbox.eps}}     \end{figure}      But this made (a) and (b) and one number for both figures. Furthermore I tried:               \begin{table}[!ht]     \begin{tabular}{p{7cm} p{7cm}}     \begin{center}     \includegraphics[width=0.7\linewidth]{Screenshots/step1.png}     \label{fig:stepone}     \caption{caption one}     \end{center} & \begin{center}     \includegraphics[width=0.7\linewidth]{boundingbox.eps}     \label{fig:steptwo}     \caption{caption two}     \end{center} \\      \end{tabular}      \end{table}      But here the the columns are labeld with Table 1 and Table 2.


title: How to align two diagrams on the same line

text: I would like to know how can I put two diagrams on the same like rather than one of the top and one at the bottom. which consumed too much space on the paper. Here are the codes for the figure which I used.                 \begin{figure}[!htb]\centering          \frame{\includegraphics[width=10cm]{Data1}}          \caption{Interpolation for Data 1}       \label{Fig:Data1}       \end{figure}            \begin{figure}[!htb]\centering          \frame{\includegraphics[width=10cm]{Data2}}          \caption{Interpolation for Data 2}       \label{Fig:Data2}       \end{figure}


title: How this shading effect would be applied to an mdframed environment?

text: I'd like to apply the following shading effect ![enter image description here](http://i.stack.imgur.com/c0Z38.png) proposed in " Fake sheet effect " as a background for a mdframed environment. How can this be achieved?


title: Modifying .sty files?

text: Yesterday I did some changes in the layout of my TeX document. I couldn't accomplish the changes until I opened the `.sty` files and modified some of their code. I am sure this is not the best idea. For one reason, after the packages got an update, I will have to modify the file again (and again and again). Another way would be to create my own version of that `.sty` file and call that instead of the original one, but this might not be the best idea either. (again: at least the updates speak against it) How can I accomplish the following changes by adding code to a _local_ file (e.g. my `.tex` preamble) instead of changing _global_ files (like the package `.sty` files)? I wanted to change the following lines in `ledmac.sty`:               \def\printlines#1|#2|#3|#4|#5|#6|#7|{\begingroup       \setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%       \ifl@d@pnum #1\fullstop\fi       \ifledplinenum \linenumrep{#2}\else \symplinenum\fi     %% #2 into: \arabtxt{\n{#2}}       \ifl@d@ssub \fullstop \sublinenumrep{#3}\fi       \ifl@d@dash \endashchar\fi       \ifl@d@pnum #4\fullstop\fi       \ifl@d@elin \linenumrep{#5}\fi       \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi     \endgroup}      The second thing is a line in `ledpar.sty`:               \newcommand*{\l@dlinenumR}{%       \numlabfont\linenumrepR{\line@numR}\Rlineflag%       %% numlabfont into: numlabfontR       \ifsublines@         \ifnum\subline@num>\z@           \unskip\fullstop\sublinenumrepR{\subline@numR}%         \fi       \fi}      (In the latter case, just adding `\renewcommand` with the modified code did not work.)


title: Shade and insert labels in a triangular region with TikZ

text: I need to plot a triangle with vertices `(0,0)`, `(1,2)`, `(0,3)` with x & y coordinate axes (and labels), and tick marks on the axes. How can I accomplish this in TikZ. My code is:               \begin{tikzpicture}      \draw[->] (-5.0,0) -- (5.0,0) node[right] {$x$} coordinate(x axis);      \draw[->] (0,-5.0) -- (0,5.0) node[above] {$y$} coordinate(y axis);      \draw (0,0) -- (1,2) -- (0,3) -- cycle;      \end{tikzpicture}       But, how do I get the points labeled and shade in the region?


title: How can I obtain a character count?

text: I want to count the number of characters within a brief essay, like an abstract or summary thesis, including math symbols. Is there a command like the one in microsoft word (preferences, statistics) that count characters?


title: Draw a ERD in Crow's foot

text: I am draw my entity relationship diagram in a UML tool, I am new to TeX writing and now want to draw it in latex. The image of my ERD is given below;![](http://i.stack.imgur.com/paGSY.png)   Please help me with code and tell me which packages I use. Thanks


title: biblatex with verbose-trad2: how not to print page range of article if a page number is set?

text: When `\cite`ing an article which has a `pages` defined in the bibtex source, and if passing a page argument, biblatex display both. Example: `\cite[42]{Key}` will result in something like: > Author, "Title", _Journal_ , etc., **p.31-52, p.42**. If I'm not passing any page number (42), it's fine to have the page range (31-52). But if I am, I'd rather not, and have only: > Author, "Title", _Journal_ , etc., p.42. Can this be done ?


title: Brackets with correct delimiters and automation

text: According to What is the correct way to do delimiters? the correct way of using brackets in math mode could be achieved by a macro like this:               \newcommand{\myLeft}{\mathopen{}\left}      I wonder if there is a way to automate it. What I mean is that I would like to be able to write a formula in math mode without using `\left` and `\right.` I would like to 'replace' all opening brackets in math mode by `\myLeft+bracket` and all closing brackets by `\right+bracket`. Is that possible? What arguments are against such an approach?


title: Defining [keine Autorenangabe] so that it will be typeset in an author choosen place in the bibliography (biblatex)

text: badroit (supported by PLK) pointed out a way to create a makro to obtain an [ohne Autorenangabe] (english "no credits") output by using this (see Biblatex: Defining author = {} so that it leads to [Keine Autorenangabe] (engl. "no credits") in the output):               @string{unknown= {{[Ohne~Autorenangabe]}}}      in combination with               @book{example,      author = {},     title = {Meaning of it},      year = 1998,     }      Output: [ohne Autorenangabe] (1998): Meaning of it. When I was using this, I realised that the entry is not in a good position in the bibliography. It is typeset between n and p entries following an alphabetical order. My question: Is it possible to define the position of the entry? For example, that these entries occure in the beginning (or end) of the bibliography?


title: Problem with matrix dots

text: Why do I have the following problem? I've tried \cdots![enter image description here](http://i.stack.imgur.com/oLVBI.png).


title: \eqref for systems

text: Is there anyway to create a single label for a system of equations instead of just one, such that I can recall it? I've done this but the result doesn't totally make sense.               \documentclass[12pt,a4paper]{report}     \usepackage[T1]{fontenc}     \usepackage[italian]{babel}     \usepackage[utf8]{inputenc}     \usepackage{amsmath,amssymb,amsthm}          \newenvironment{sistema}%     {\left\lbrace\begin{array}{@{}l@{}}}     {\end{array}\right.}          \begin{document}     \[     \begin{cases}     \label{eq:conditions}     \sum_{\substack{i}}     n_{i}=N\\     \sum_{\substack{i}}     n_{i}\epsilon_{j}=E     \end{cases}     \]          blahblahblahblah \eqref{eq:conditions}     \end{document}      This is what the system looks like. All fine but the equation number is missng. ![This is what the system looks like. All fine but the equation number is missng](http://i.stack.imgur.com/0YXUS.png) ![And this is what \\eqref gives back. I cannot get where that 2 is coming from.](http://i.stack.imgur.com/bIUKG.png) And this is what `\eqref` gives back. I cannot really understand where that `2` is coming from since there is no number for the system.


title: Combine showing multiple figure labels

text: I have two sub-figures in a figure (say `Figure M`) called `a` and `b`. How can I combine showing multiple figure labels like this? > Figure Ma and b P.S. I can easily get the following figure labels by command `Figure \ref{fig_M_a} and \ref{fig_M_b}` (assume the labels for them are `fig_M_a` and `fig_M_b` respectively): > Figure Ma and Mb


title: How to add arrows to an infinite line?

text: I'm graphing part of a parabola, like so:               \documentclass{article}     \usepackage{tikz}          \begin{document}              \begin{tikzpicture}             \clip (-0.1,-0.1) rectangle (4,3);             \draw[->] (0,0) -- (4,0);             \draw[->] (0,0) -- (0,3);% draw axis lines             \draw[domain=0.1:2,red,->,thick,samples=400] plot ({\x},{\x^3} );% draw plot         \end{tikzpicture}          \end{document}      As you see, I'm trying to put an arrowhead onto the upward end of the parabola line, but it's not happening. I hypothesize that it's because the line is infinite, so there's no end to put an arrowhead on. Is that right? And in any case, is there a way to put an arrowhead on to that line?


title: Certain Beamer themes not working in Write Latex

text: I'm using the Beamer template provided by Write Latex: https://www.writelatex.com/templates/2-beamer-presentation (It's pretty basic...) The odd thing is that when I choose certain themes (eg. Hannover, though not the default), I get an `\end{frame}` error, saying that I'm missing `$` signs. Has anyone else encountered this? I'm giving a talk in a few days and I don't want to use the default theme. Thanks.


title: How to make a single word look as some code?

text: I would like to be able to make a single word in a text look like a coded word. Is there any command such as `\code{...}` which allows me to do so? (basically, I want to produce something like above for the "\code{...}" part)


title: Table of contents exclusive to a particular section or chapter

text: I have a document with a short main-body but a huge appendix. The body just has a couple of short sections, so I wouldnt like to have any Table of Contents for them. The Appendix on the other hand contains about 50 pages of a lot of different programs used to generate the results. Without a TOC it is a navigational mess. I want a TOC only for the Appendix which starts at the page the appendix starts.               \documentclass{book}     \begin{document}          \chapter*{Main Body}     So here is what I found out...          \appendix     \tableofcontents          In case you wish to reproduce these fantastic results here is the code          \chapter*{Appendix A} Program A     \chapter*{Appendix B} Program B     \chapter*{Appendix C} Program C     \chapter*{Appendix D} Program D     % and so on...          \end{document}      I tried the above and it wasnt working, though I havent found a workaround for it over the itnernet.


title: PDF version issue when including PDF figures

text: I keep getting the following line in my log file               ** WARNING ** Version of PDF file (1.5) is newer than version limit specification.      with reference to each image I'm trying to include in my document. The images are inserted easily enough but I'm just a little miffed about this message. I used Inkscape to create the images, and when I was exporting them to PDF, the only option I had for versioning was 1.4. I'm also using XeTeX to compile the document. How can I get rid of these messages?


title: Setting a counter for sections

text: I prepare a document where there are questions as follows and the relevant content               \section*{Question 1}     ...     \section*{Question 2}     ...     \section*{Question 3}     ...     ...      I want a counter instead of writing 1,2,3 such as               \section*{Question \qno}     ...     \section*{Question \qno}     ...     \section*{Question \qno}     ...     ...      where `\qno` will be automatically incremented and inserted as a number in the document. I read this post, but it's not something I need since I don't need cross-referencing. Is there a way to initialize a counter and use it in LaTeX or is there an alternative solution for me to generate sections with name `Question #` in my document?


title: Most efficient way to reverse a token list (tail recursion)

text: Goal: reverse a list of characters, going from `\def\mylist{abcdefgh}` to `\def\mylist{hgfedcba}`. This is easy using a marker which does not appear in the list, such as `\relax`:               \def\mylist{abcdefgh}     \def\reverse #1%       {\edef #1{\expandafter \reverseloop #1\relax \marker }}     \def\reverseloop #1#2\marker       {\ifx#1\relax\reverseend\fi \reverseloop #2\marker #1}     \def\reverseend #1\marker #2{}     \reverse\mylist     \show\mylist      So far, so good. Unfortunately, this wastes a large amount of memory, and trying to apply the same function when `\mylist` has a few thousand characters already blows up. Indeed, each call to `\reverseloop` reads the whole token list as its `#2` argument, and this is _not flushed from TeX's memory via tail recursion_ , because TeX never reaches the end of the replacement text of `\reverseloop`, or rather, only reaches it at the very end, once all the `\reverseloop` macros have been expanded. You can see this from the call trace in               \def\fiveup{\edef\mylist{\mylist\mylist\mylist\mylist\mylist}}     \fiveup \fiveup \fiveup \fiveup     \tracingall     \reverse\mylist      Thus, the whole process consumes a memory proportional to the square of the number of characters, reaching millions, typical size of TeX's main memory. **How can I implement such a reversal using only a linear amount of memory?** It should easily scale up to 100000 characters, albeit maybe be a bit slow there: of course we cannot avoid a quadratic time. I don't care too much about expandability.


title: Make \translate'd string uppercase

text: I'd like to typeset German weekday names in uppercase using the translator package but I can't get it working:               \documentclass[ngerman]{article}     \usepackage{babel}     \usepackage{translator}     \usedictionary{translator-months-dictionary}          \begin{document}          \translate{Monday}     \uppercase{\translate{Monday}}     \expandafter\uppercase\expandafter{\translate{Monday}}     \MakeUppercase{\translate{Monday}}     \expandafter\MakeUppercase\expandafter{\translate{Monday}}          \end{document}      The result is               Montag MONDAY MONDAY MONDAY MONDAY      How to get `MONTAG`?


title: bordermatrix with thinner columns

text: I'm trying to set-up the column width of a `bordermatrix` with the usual `\setlength{\arraycolsep}{0pt}` command (usual in the sense that it works for usual matrices) without success: what should I use instead?


title: Subscript spacing

text: I have a question similiar to the post: How to change default for spacing around binary relations?. In particular, I would like to make subscripts look less cramped. According to another post (Increase the space between operator in subscript/superscript), there doesn't appear to be a good way to do this. Currently, I do the following (more or less what the author in the second referenced post suggests).               \documentclass{article}         \newcommand{\ts}[1]{\, #1 \,}          \begin{document}          \[         \sum_{i \ts{=} 1}^{n} a_{i}     \]          \end{document}      However, the \ts command makes the LaTeX harder to read. Does anyone have any ideas about how to get the desired spacing while keeping the LaTeX simple? Ideally, I would just write the following:               \[         \sum_{i=1}^{n} a_{i}     \]      but get some extra space around the equals sign in the subscript of the summation.


title: Reference to a listing returns wrong number

text: I'm using the following code to create a listing with sourcecode:               \begin{lstlisting}[caption={caption_text}\label{lst:a_label},language=Java]      // Code...     \end{lstlisting}      Unfortunately, a `\ref{lst:a_label}` somewhere in my text does not return the correct number, or at least not the number I expected. The caption itself shows the correct number. How can I fix that?


title: "Corrupted NFSS Tables" Using `otftotfm` and Fontenc

text: I have just converted some OTF fonts using `otftotfm`; these fonts were created using a custom encoding I wrote called `EL` (I needed to modify the `T1` encoding to include extra ligatures). When I try to test whether the font works in a simple file as follows, I get the following output. What is causing the "Corrupted NFSS tables" message, and how can I resolve the issue?               LaTeX Font Warning: Font shape `EL/cmr/m/n' undefined     (Font)              using `EL/cmr/m/n' instead on input line 100.          ! Corrupted NFSS tables.     wrong@fontshape ...message {Corrupted NFSS tables}                                                       error@fontshape else let f...     l.100 \fontencoding\encodingdefault\selectfont      I created the fonts using the following command.               otftotfm -a -e el.enc -fcalt -fdlig -ffrac -fkern -fonum -fordn -fpnum -fsinf \     -fsmcp -fsubs -fsups -fzero --vendor crimson Crimson-Roman.otf \     Crimson-Roman      Here is the test file I am using to check whether the font works.               \documentclass[a4paper]{article}     \usepackage[EL]{fontenc}     \pdfmapfile{crimson.map}     \renewcommand{\rmdefault}{Crimson}     \begin{document}     The     \end{document}      The files `elenc.def` and `elcrimson.fd` are both visible to pdfTeX, as I have verified using `kpsewhich`. Thanks for your help!


title: Enquote title using csquotes

text: I use the package `csquotes` and the `\enquote` command to place quotes in my documents that depend on my babel settings. For my current document I would like to enquote of an article. Therefore I wrote `\title{\enquote{...}}`. Unfortunately, I have the term `I'd` in my title. When I use British english for my document the quotes look similar to the half quote in `I'd`. Is there a possibility to change that behaviour? **Update** The whole command is `\title{\enquote*{I never did say how, but I told you I'd get you out of Vietnam}}`.


title: \widthof text in a def'd subroutine inside a tikzpicture?

text: I have already seen \widthof within tikzpicture, but this is slightly different. I have a rather complex Tikz image, which I'd like to eventually include in a Latex document; as such, I'd like this .tikz file to be as self contained as possible. There are a bunch of commands in there relevant to building the plot; unfortunately if I leave them as-is, I get Wrong placement (and/or size) of picture / plot with groupplot of table (... and discontinuity)? (even in a standalone .tex file). Specifically, if the commands execute between `{document}` and `{tikzpicture}`, then the extraneous space is generated; I could have the commands in preamble, but then the .tikz file will not be self- contained. So, I thought I'd collect these commands in a `\def` subroutine, and have them run _inside_ the `{tikzpicture}`. Unfortunately, one of those commands is `\widthof`, which I intended for measuring the width of the text "256" in the tiny font, and wanted to use that to set the x scale of the pgfplot. So I came to this MWE:               % \documentclass{article}     \documentclass{standalone}          \usepackage{calc} %\widthof     \usepackage{pgfplots}     \pgfplotsset{compat=1.5.1}     \usetikzlibrary{pgfplots.groupplots}     \usepackage{pgfplotstable}          \pagecolor{yellow!15}          % \newcommand\prepCmds{     \def\prepCmds{       \newlength{\smlblwtmp}       \setlength{\smlblwtmp}{\widthof{\tiny 256}}       \global\let\smlblwid\smlblwtmp       \typeout{smlblwid FIRST: \the\smlblwid}     }          % \prepCmds{} % smlblwid FIRST: 10.2085pt          \begin{document}          % \prepCmds{} % smlblwid FIRST: 10.2085pt          \begin{tikzpicture}            \prepCmds{} % smlblwid FIRST: 0.0pt            \begin{axis}[         x=2*\smlblwid,       ]         \addplot {x*0.5};       \end{axis}          \end{tikzpicture}          \end{document}      As it can be seen, _only_ when I call the `\prepCmds` inside `{tikzpicture}`, the `\widtgof` fails and returns 0 (everywhere else, it returns a correct number); when that happens, `pdflatex` shows this:               PGFPlots warning: The ticklabel anchor cannot be determined, the normal vector      -(0.0pt,-1.0pt) and the unit y vector (0.0pt,1.00005pt) are almost parallel (ab     s(cos(angle)) = 1.00005pt)!     pgfplots@borderanchor@for@axis 1,2,3: y, 1v0, rectangle      One would say, as expected for x unit of 0 - but it took me _hours_ to debug this so far: among other things, I inserted a `\message` in the pgfplots source so the arguments of `\pgfplots@borderanchor@for@axis` are plotted (when the width is not zero, with `\prepCmds` running elsewhere, the arguments are `x, v00, rectangle`). Obviously, all this boils down to `\widthof` returning 0 inside a `{tikzpicture}`; now that I know this, I guess I could move just the `\widthof` calculation out of the subroutine. However, I'd still prefer for the `\widthof` calculation to be inside the subroutine, for self-containment reasons, so I would like to ask: why is `\widthof` inside a `{tikzpicture}` zero; and is there some sort of a trick (maybe "globalize" some tikz intern variables?) that would make `\widthof` work inside a `{tikzpicture}` properly?


title: Format intersection of groups with index below intersection symbol

text: I'm writing in LyX and would like to format the intersection of groups such that the index appears directly below a large U. Currently I do the following which produces a relatively small U with the index as a subscript kind of off to the right a bit: `$\cap_{2\leq n\in\mathbb{N}}A_{n}$`


title: Expandable Nested Boxes with TikZ

text: Could someone please post a minimal `tikz` example to draw this: ![nested boxes with tikz](http://i.stack.imgur.com/XjZDR.png) I am currently doing this with nested tables, but would like to see how it can be done with tikz. The nodes would ideally have a pre-set minimal width and height, yet expand with their contents.


title: TikZ trees grow right typesets things "upside down"

text: This is a pretty minor gripe with what is a great library.               \documentclass[border=3em]{standalone}     \usepackage{tikz}     \usetikzlibrary{trees}     \begin{document}     \begin{tikzpicture}[grow=right]       \node {a}         child {           node {b}         }         child{           node {c}         };     \end{tikzpicture}     \end{document}      This MWE produces the following output: ![tree upside down](http://i.stack.imgur.com/BgGp7.png) Note that despite the `b` node being written before the `c` node, it is the `c` node that is on top. This is unintuitive. I'd have expected the `b` node to be on top, since it's defined first. I understand why it works that way because without the `grow=right` option, things are typeset in the obvious order. What I want to know is: > Is there an easy way to have right-growing trees set their nodes in the > order you'd expect from reading the source? * * * # Edit Matthew's suggestion in the comments works well for basic trees. Unfortunately, it breaks the `sloped` option:               \documentclass[border=3em]{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \begin{tikzpicture}[grow=right,yscale=-1,sloped]       \node {a}         child {           node {b}           edge from parent           node[above] {Foo}         }         child{           node {c}         };     \end{tikzpicture}     \end{tikzpicture}     \end{document}      ![slope is broke](http://i.stack.imgur.com/3m4XD.png)


title: Import a symbol from the Fourier font family

text: > **Possible Duplicate:**   >  Importing a Single Symbol From a Different Font I would like to use a single symbol from the fourier family in mathmode in one of my formulae in my document. In the comprehensive symbol archive, ftp://tug.ctan.org/pub/tex-archive/info/symbols/comprehensive/symbols-a4.pdf on page 53, the \partial symbol in table 147 is what I am after. How can I manage this?


title: Taking letters and numbers from different fonts

text: Can we mix fonts? For example:   * Letters from Palatino   * Numbers from Times New Roman   * Greek symbols from Fourier Thanks in advance.


title: typesetting a single mathematical symbol in a different font

text: > **Possible Duplicate:**   >  Importing a Single Symbol From a Different Font Is there a command like `\mathfont[font]{}`, which enables me to use a different mathematical font for everything inside the parenthesis `{ }` ? I want for example to use `\mathfont[txfonts]{$\mathbb{I}$}`, so that just the blackboard symbol for "I" is display using the `txfonts` font, while the rest of my text uses the usual computer modern latex font. I know there are similar questions and answers, but I can't get anything out of them, since to apply them, I have to know slot in the font of the symbol I'd like to import.


title: How to load a single symbol for my LaTeX document

text: I simply want to use the `\multimapboth` symbol, which belongs to the `\txfonts` package; however I don't want to install this package, as it changes some formatting on my document... How can I do this? Thank you in advance. EDIT: I'm looking for something like the answer to this question, just don't know how can I find more details about my symbol...


title: Sharp or angled v in math mode (\varv)

text: I'm trying to achive a more angled $v$ that is more distinct from $u$. The default math mode v looks like this in the default font: ![Math mode 'v' in default font](http://i.stack.imgur.com/vivPG.png) What I'm trying to achive is something like this (from `txfonts`): ![math mode 'v' in txfonts](http://i.stack.imgur.com/llEmN.png) (Edit: the picture is a bit misleading - I posted it to demonstrate the angledness. I'm not trying to get the Greek letter "nu", but rather the classic Latin letter "v" which is straight-lined and mostly symmetric.) I remember I used to be able to get the alternative v by using `\varv` (analogously to \varphi), but I guess this was just a command defined in the template I used when I didn't know much LaTeX. I can't find a package that defines `\varv`. Ironically (and confusingly), the angled v is default in `txfonts`, and to get the rounded one, there is a package option called `varv`. I'm using the default fonts right now (Computer Modern / `lmodern`), but I might switch to Minion or Palatino plus matching math (`mathpazo` for Palatino, forgot what the math font for Minion was called), so an ideal solution would be somewhat font independent.


title: cancel package downward arrow

text: Let's say that I want to cancel the denominator of a fraction and also assign him a value. Something like that `\cancel{2}\cdot\dfrac{9}{\cancelto{2}{4}}`. The problem here is that the fraction doesn't look good at all after that. So I need a `cancelto` command that creates a downward arrow. Is there any way to do it?


title: Microtypography on equations

text: Is there a way to make all three lines of math in the code below take up the same amount of length by use of font expansion? I know too little about `microtype` to even see if it could offer a solution. I don't care too much about the exact math environment that'll be used in the end (`gather` is not too bad a solution if I can't get expansion working). Bonus if the solution works with `lualatex`, and especially the `\usefonttheme{professionalfonts}` of `beamer`. Alas, changing variable and function names is not an option (basically, only the square braces may change if that can help). Alternatively, one could try to tweak the spacings manually, but except by trial and error using `\hspaces`, would there be an intelligent way of doing that (say, aligning the absolute values on top of each other, and the total length of each line being the same?)               \documentclass{article}          \usepackage{amsmath}     \usepackage{amsfonts}          \begin{document}            \begin{align*}         \lim_{y\to\infty}\sup_{x\in\mathbb{R}} \left\vert y^{5/2-\varepsilon}\left[\vphantom{A^2}u(x,y)-u_{\mathrm{as}}(x,y)\right]\right\vert & = 0 \\         \lim_{y\to\infty}\sup_{x\in\mathbb{R}} \left\vert y^{5/2-\varepsilon}\left[\vphantom{A^2}v(x,y)-v_{\mathrm{as}}(x,y)\right]\right\vert & = 0 \\         \lim_{y\to\infty}\sup_{x\in\mathbb{R}} \left\vert y^{9/2-\varepsilon}\left[\vphantom{A^2}\omega(x,y)-\omega_{\mathrm{as}}(x,y)\right]\right\vert & = 0       \end{align*}          \end{document}      Present output: ![Present output](http://i.stack.imgur.com/IZFFh.png)


title: How much text will end up on a page?

text: ---Edit: In response to David Carlisle's answer, here is an actual scenario where the problem occurs. I have two Bible texts in two languages. Let's say English and Spanish. The basic idea of presenting the text in parallel has been addressed by the following question. Syncing text on bilingual pages The remaining problem is that I need to get the verses synced per page. The current proposed solution goes out of sync really quickly. So that for instance Genesis chapter 20 verse 5 of the English and Spanish is on the same set of pages. So I was thinking about adding a `\pdfsavepos` at the end of the verse and dumping it into an aux file. This would produce an aux file where the verses would be something like:               book01chapter01verse001=10000ypos     book01chapter01verse002=15000ypos     book01chapter01verse003=20000ypos      and then where a page break occurs:               book01chapter01verse009=50000ypos     book01chapter01verse010=10000ypos      But since I want full verses on each page I will have to do an "if yposCurrent > yposNext then insert `\newpage` before current verse" for every page. Then it gets messy since the aux file needs to be updated for this verse and the subsequent verses. Then the compiler needs to be run again. And it will very likely find the same occurrence on the very next page. So I'll probably end up doing about a thousand compiler runs just to produce the PDF. ---Original post: In many of my past projects this question has arisen. How can I find out how much of the actual text will LaTeX place on the current page? LaTeX obviously has a mathematical way of counting and distributing the letters/words (boxes) involved for the text. Using that to calculate how much to place on the page and spread it out to justify it etc. So when page 1 is done it knows where in the original text to start for page 2, and when page 3 is done the same for page 4 and so on. So somehow it not only calculates these parameters but also keeps track of it. Now, I want to know if it is possible for me to get a hold of these parameters to be able to parse my text through LaTeX and get this data stored in a variable of where exactly my text will be broken up? (Without hacking into TeX and having to rewrite parts of it, by the way...) Previous suggested solutions mentioned writing certain "milestones/waypoints" to an aux "log" file which can be used on the next run to adjust your text, but that solution won't fully work for my problem. Since I use source texts which are very large and if you do it by means of a log file then you need a compilation run for every time you adjust any text on any page. And if any of the subsequent pages needs adjusting, then you need another compilation run for that page whilst writing the new "milestones" to the log file, which again requires another run to process and adjust the subsequent text. So on my book which is over a thousand pages, I'll be sitting all day having to compile it. Then if I need to go back to page 23 to fix a minor mistake in the text, I'll probably end up having to compile the whole thing over again about 900 times. Therefore as far as I can see, I need the variable with the page break data, and be able to adjust this in **one compilation run**. So that I can then manually do the needed adjustments to my texts and then let LaTeX place it in the correct place. A bit like a massive FOR loop working on the text in the variable... In summary: The problem might seem a bit vague to you but I really just need to be able to figure out how much TeX would place on a page, and that's it.


title: Custom Command Highlighting in TeXstudio

text: I have defined several macros in my LaTeX report. For instance, following is a macro I defined for writing bold letter H. I have several macros like this I use throughout my work.               \newcommand{\channel}{\ensuremath{\mathbf{H}}}      Whenever I use `\channel`, TeXstudio highlights it as red saying unknown- command. But it is indeed supported by the auto-completion feature. I want to stop TeXstudio from highlighting it as red (as it is annoying and affects readability). Is there any way to do this? Update--- After seeing the comments, I realize I forgot to include a important thing. I always write these macros and package calls all inside a single file. Then I input this file in the LaTeX file I am writing. But now I guess I am asking a bit too much. I mean I require the software to recognize the macros which I have input from another file. Nevertheless I was wondering if there was any solution.


title: Enumerate with a range of numbers in an item's label

text: I am preparing an outline of lectures for a course. Some topics will take more than one lecture. I want to create an `enumerate` environment that reflects this. I want to end up with something like                 1. Topic 1.     2-3. Topic 2.       4. Topic 3.     5-6. Topic 4.      I know that I can do this manually, e.g.,               \documentclass{article}          \begin{document}     \begin{enumerate}         \item [1.] Topic 1.         \item [2-3.] Topic 2.         \item [4.] Topic 3.         \item [5-6.] Topic 4.     \end{enumerate}     \end{document}      However, if I want to insert another topic in the middle of the list, I need to re-do everything by hand. Is there a way of doing this with one or more counters?


title: How to cut a surface at the intersection with another surface in Asymptote?

text: In the code below, I define a cylinder (as a surface of revolution) and a plane (as a cyclic path). From both, I can get a surface that renders in 3D. Now, I would like to hide (or better remove) the part of the cylinder, which is below the surface (in this example at z < 0, rendered in a darker shade of red), while the plane should remain semi-transparent. How can this be done elegantly?               import three;     import solids;          currentprojection = obliqueY();          path3 xyplane = path3(scale(10) * box((-1,-1),(1,1)));     revolution c =  rotate(-45,Y) * shift((0,0,-5)) *cylinder(O,1,15);          draw(surface(xyplane),black+opacity(.5));     draw(xyplane,black+linewidth(.1));          draw(surface(c),red);     draw(c,red);      ![Rendered image](http://i.stack.imgur.com/JXAhn.png)


title: Problem with pgf library in TexLive

text: I am using TexLive, and I am writing a paper with someone else. He has sent me all of his files. He uses tikz to draw commutative diagrams. I am trying to compile his files, but I get an _undefined control sequence_ error every time that `\pgfsetarrowoptions` is called in the `pgflibraryarrows.new.code` file. It also doesn't seem to like the `\tikzset` command (same error), and I also get the following message: > ! Package pgfkeys Error: I do not know the key '/tikz/align' and I am going > to ignore it. Perhaps you misspelled it. It is working just fine for him, so there must be something wrong with the tikz / pgf library set up on my machine. Here is the document header of the main .tex file:               % Math packages     \usepackage{latexsym,amssymb,amsgen,amsmath,amsxtra,amsfonts,mathtools}     \usepackage{mathrsfs}     \usepackage[mathscr]{euscript}          % TikZ     \usepackage{tikz}     \usepgflibrary{arrows.new}     \usetikzlibrary{backgrounds,shapes,decorations.pathmorphing,arrows.new}     \tikzset{>=to new, arrow head=3pt}      It's not telling me that it can't find the tikz package. Is it possible that I need to reinstall or update it? If so, how should I go about this?


title: Path with complicated colormap in TikZ

text: I want to draw a path in tikz whose local color is a function of position. Here are two examples of what I have in mind: ![colored ptahs](http://i.stack.imgur.com/7Ib3t.png) I found the answers from Path following color gradient in TikZ very instructive. However, in the examples the used colormaps are simple gradients. I need to define a more complicated colormap. Is there a simple way to do this? Or are there even pre-defined colormaps? Or should I use pgfplots?


title: Column line overshooting the horizontal line in table

text: \begin{tabular}{|m{3.5cm}|m{5.5cm}|m{4.5cm}|}     \hline     \emph{Category of Benefits} & \emph{General Benefit} & \emph{Operational Advantages} \\ \hline     \multirow{3}{*}{\pbox{3.5cm}{Robust operational performance}} & \multirow{3}{*}{\pbox{5.5cm}{One sensor can contribute information while other are unavailable, denied(jammed), or lack coverage of a target or event}} & -Allows continued operation despite jamming \\     &  & -Graceful degradation \\     &  & -Increased probability of detection \\ \hline          \multirow{2}{*}{\pbox{3.5cm}{Extended spatial coverage}} & \multirow{2}{*}{\pbox{5.5cm}{One sensor can look where another cannot}} & -Increased survivability \\     &  & -Probability of detection increased  \\     \hline     \label{tab1.1}     \end{tabular}      For the LateX code mentioned above the table which comes looks like this ![enter image description here][1] In the resulting table, column 1 vertical line overshoots the last horizontal line. What is the problem?


title: IEEE Documents as book Chapters

text: I use the \documentclass[conference]{IEEEtran} which produces neat double- column papers but would like to make a book/monograph that way (a book collection of papers in which individual papers are chapters). Is there a template for that? Thanks.


title: Reducing bibliography font size

text: I am using the `thebibliography` command in LaTeX to generate a bibliography under a "References" heading at the end of a paper. My bibliography is not stored in a separate TeX file, but rather is just typed under the command `\begin{thebibliography}` at the end of the paper. I would like to reduce the font size of my bibliography. I tried using the command suggested in the first answer here How to change font size for bibliography?, but it did not seem to work for me. It appears to be intended for documents with a separate bibliography file, which I do not have. Does anyone have any suggestions as to how I can reduce the font size with `thebibliography`?


title: Exact green color of example in Beamer

text: I'd would like to use the same green colour as in the example mode. Does it coincide with `\definecolor{darkgreen}{rgb}{0,0.5,0}`? Is it possible to use it without defining a new color? (Maybe using something like `\structure` or `\alert`). I'm simply starting with               \documentclass{beamer}     \setbeamercovered{transparent}     \begin{document}.


title: AUCTeX and TikZ does not work in emacs for me : plz help?

text: I've looked around for resolutions however, could not find any. Indeed the one response that is pointed out, I already tried. I did the following               sudo gedit .emacs      and embedded the code provided by Preview TikZ figure in AUCTeX? into that file. Am I supposed to run another command after I include that into the .emacs file ? So that emacs knows that it has been upgraded ? I then also took other posts into consideration, such as AucTeX extension for TikZ, but it did not help me. Am I supposed to simply download the files into the `auctex/` folder ? and/or the `preview` sub-folder ? The minimum working example that does not preview is               \documentclass{article}     \usepackage{tikz}     \begin{document}     \section{test}     \begin{tikzpicture}       \draw [fill=orange] (1,1) rectangle (2,2);     \end{tikzpicture}     \end{document}      I then try to preview it using the `C-c C-p C-s` command but the TikZ picture doesn't show. I am a newbie by the way. Any advice is appreciated. UPDATE: I now realized that I can click on the icon that appears before `\begin{tikzpicture}` to view the error which I hereby append.               gs -dOutputFile\=\(_region_.prv/tmp5466eRu/pr1-1.png\) -q -dDELAYSAFER      -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4      -sDEVICE\=png16m -r127.763x127.523     GS>{<</PermitFileReading[(_region_.prv/tmp5466eRu/preview.ps)]>> setuserparams      .locksafe} stopped pop {DELAYSAFER{.setsafe}if}stopped pop/.preview-BP      currentpagedevice/BeginPage get dup null eq{pop{pop}bind}if      def<</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get 1 ne      or{.preview-BP }{pop}ifelse}bind/PageSize[1      1]>>setpagedevice/preview->do{[count 3 roll save]3 1 roll dup length 0 eq{pop}>     {setpagedevice}{ifelse .runandhide}stopped{handleerror quit}if aload pop      restore}bind def [(_region_.prv/tmp5466eRu/preview.ps)(r)file]aload exch dup 0      setfileposition 25159()/SubFileDecode filter cvx .runandhide aload pop dup dup      25270 setfileposition 497()/SubFileDecode filter cvx<<>>preview-do     Error: /undefined in pgfo     Operand stack:     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--        --nostringval--   2   %stopped_push   --nostringval--   --nostringval--        %loop_continue   --nostringval--   --nostringval--   false   1        %stopped_push   .runexec2   --nostringval--   --nostringval--        --nostringval--   2   %stopped_push   --nostringval--   --nostringval--        false   1   %stopped_push   1148   --nostringval--   %end_runandhide        --nostringval--     Dictionary stack:        --dict:1169/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--        --dict:106/300(L)--     Current allocation mode is local     Last OS error: 2     Preview-Ghostscript finished      UPDATE UPDATE: I also edited the .emacs file without the sudo command. I also included the following packages but it still does not work               \usepackage[active,float]{preview}          \PreviewEnvironment{tikzpicture}


title: Using TeX fonts in HTML documents?

text: If I want to use TeX fonts (such as cmr10, cmbx10, cmtt10, and so forth) in my HTML documents, what are the recommended ways to do that? As a thought experiment and proof-of-concept, this afternoon I re-encoded the 140 fonts from the bakoma-fonts package as web fonts and made a font waterfall demonstration page:   * Using TeX Fonts in HTML The results are encouraging, but I don't know if this is the best way to achieve this. I still need to organize the various sizes and shapes into font families in the CSS style sheet and add CSS classes for invoking the various weights, shapes, and sizes. I hope I'm not reinventing the wheel here, but I started down this path today because I was unsuccessful in finding any other resources about this topic anywhere. It seems that lots of people want to use fancy TrueType fonts in TeX documents, but I seem to be the only one who wants to use native TeX fonts in my web pages. Is this a road to Hell paved with good intentions and nothing but insanity at the end of the rainbow? I know that ligatures are going to be difficult and that obviously hyphenation is going to work differently, but I still think it would be really fun to use Computer Modern Roman and friends in some of my HTML documents, and the challenge of getting there is so tempting.


title: Vertical lines in table where none is supposed to be

text: \begin{table*}     \renewcommand\arraystretch{2}         \begin{tabular}{|c|c|c|c|c|c|c|c|c|}         \cline{3-9}      &&\multicolumn{7}{|c|}{Hashtag-dataset}     \\\cline{3-9}          &&Joy & Fear &Sadness &Thankfulness & Anger & Surprise & Love        \\  \cline{1-9}           &    Joy          & 70,80\% & 5,78\% & 3,53\% & 22,89\% & 1,62\% & 16,73\% & 19,63\% \\ \cline{2-9}        \multirow{4}{*}{\rotatebox[origin=c]{90}{Crowdsource-set}} &  Fear         & 3,53\% & 69,77\% & 2,94\% & 1,66\% & 1,37\% & 5,53\% & 1,32\% \\ \cline{2-9}        &  Sadness      & 5,61\% & 12,97\% & 74,33\% & 4,72\% & 16,06\% & 40,84\% & 6,12\% \\  \cline{2-9}        & Thankfulness & 4,31\% & 0,59\% & 0,56\% & 53,22\% & 0,20\% & 1,36\% & 6,59\% \\ \cline{2-9}        & Anger        & 2,74\% & 9,13\% & 15,06\% & 2,79\% & 79,28\% & 20,40\% & 2,21\% \\ \cline{2-9}        & Surprise     & 0,70\% & 0,21\% & 0,23\% & 0,35\% & 0,18\% & 8,12\% & 0,30\% \\ \cline{2-9}        & Love         & 12,31\% & 1,56\% & 3,34\% & 14,37\% & 1,30\% & 7,03\% & 63,83\% \\      \hline         \end{tabular}         \caption {Redistribution of the labels from the hasthag-dataset to the crowdsource-dataset}     \end{table*}      ![enter image description here](http://i.stack.imgur.com/NDjvn.png) I'm not sure how to remove those 2 vertical lines at the left-hand side of the table. Any help?


title: I need to draw the chemical Structural Formula of Bisphenol A

text: I need to draw the chemical structure of Bisphenol A as shown on this page: http://commons.wikimedia.org/wiki/File:Bisphenol_A.svg I've also found this presentation how to do it: http://www.suedraum.de/latex/stammtisch/strukturformeln.pdf Kindly help me with some guidance.


title: Using negative coordinates in EPS file with XeLaTeX

text: I've run into inconsistent behavior with XeLaTeX and EPS files with negative coordinates. The wrapping block for the figure is calculated correctly; however, the content of the figure is misplaced (coordinate `(0, 0)` are where the squares adjoin). ![bad result](http://i.imgur.com/iTSrGv9.png) For comparison, see expected result ![good result](http://i.imgur.com/WE3eR8R.png) What's the point, this behavior changed **after update from TeX Live 2009 to TeX Live 2013** and I think it's a bug as with `pdflatex`, I obtain the expected result. I've been digging into texlive files and found that the important change is in `xetex.def` file, seemingly v0.96 update. I'd like to know whether this is a regression bug or intended behavior. And if it's correct, why it's different from `pdflatex`. Thanks. Bellow are MWEs for the document and the figure as well.               \documentclass{minimal}          \usepackage{graphicx}          \begin{document}     Lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum.     \includegraphics[width=0.25\textwidth]{fig.eps}     Lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum     lorem ipsum lorem ipsum lorem ipsum.     \end{document}      And the figure (Metapost source)               prologues:=3;     u:=1cm;          beginfig(1);          draw unitsquare.scaled(3u);     fill unitsquare.scaled(3u).shifted(-3u,-3u);          % this is a quickfix for the issue     %currentpicture := currentpicture shifted (-llcorner currentpicture);          endfig;          end