title: Memoir Page Layout doesn't work as expected: Text shifted right

text: I'm trying to setup the layout as a **one-sided A4 page** , with 2.5 cm equal left & right margins. Since the width of A4 is 21cm, then I'm trying to do this with the following 2 steps:   1. Set the typeblock size to 16cm (using `\settypeblocksize{20cm}{16cm}{*}`)   2. Set equal L & R margins (using `\setlrmargins{*}{*}{*}`) I tried several other combination, but it doesn't work as expected; I'm getting very narrow right margin with most of the margin at the left. So why doesn't the text get centered between 2 equal left & right margin? Here is the full code, the output screenshot is attached:               % Preview source code          %% LyX 1.6.7 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[a4paper,oneside,english,oldfontcommands,article]{memoir}     \usepackage{mathptmx}     \renewcommand{\sfdefault}{lmss}     \renewcommand{\ttdefault}{lmtt}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.          \newcommand{\code}[1]{\texttt{#1}}          \special{papersize=\the\paperwidth,\the\paperheight}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \settypeblocksize{20cm}{16cm}{*}     %Memoir: Set L & R margins around the type block:     %\setlrmargins{0cm}{0cm}{*}     %\settrims{0pt}{0pt}           \setlrmargins{*}{*}{*} %equal L & R margins ( = 2.5cm)          \makeatother          \usepackage{babel}          \begin{document}          \chapter{Page Dimentions}     \begin{description}     \item [{\code{\textbackslash{}stockheight}}] \the\stockheight     \item [{\code{\textbackslash{}stockwidth}}] \the\stockwidth     \item [{\code{\textbackslash{}paperheight}}] \the\paperheight     \item [{\code{\textbackslash{}paperwidth}}] \the\paperwidth     \item [{\code{\textbackslash{}textheight}}] \the\textheight     \item [{\code{\textbackslash{}textwidth}}] \the\textwidth     \item [{\code{\textbackslash{}trimtop }}] \the\trimtop     \item [{\code{\textbackslash{}trimedge}}] \the\trimedge     \item [{\code{\textbackslash{}spinemargin}}] \the\spinemargin     \item [{\code{\textbackslash{}marginparsep}}] \the\marginparsep     \item [{\code{\textbackslash{}marginparwidth}}] \the\marginparwidth     \end{description}          \chapter{Example Paragraph}          This is an example paragraph. This is an example paragraph. This is     an example paragraph. This is an example paragraph. This is an example     paragraph. This is an example paragraph. This is an example paragraph.     This is an example paragraph. This is an example paragraph. This is     an example paragraph. This is an example paragraph. This is an example     paragraph. This is an example paragraph. This is an example paragraph.     This is an example paragraph.      \end{document}      ![output page](http://i.stack.imgur.com/qOh7e.png)


title: a very weird situation for the Latex Error: Something's wrong--perhaps a missing \item

text: I am using classicthesis download from latextemplate. It has main.tex and chapter01.tex. etc.... I got this error "Latex Error: Something's wrong-- perhaps a missing \item" when I was writing in chapter04.tex. The log pointed me to the main.tex where the \include{chapter04} command is. I guess this is more complicated than just changing anything about this line. Plus, I had not come across with any error before when I compiled main.tex with Chapter04. What made it REALLY weird is when I just randomly comment out (or delete) a paragraph in chapter04 or just change the font from 11pt to larger ones like 15pt, the error disappeared and main.tex compiled OK. It just seemed I have certain length (after typeset) of this chapter that Latex is not happy about... I really dont understand this. since there are multiple files related to the issue and I frankly dont know which one went wrong or have conflicting issue, I just uploaded the zip folder containing all the relevant files. a dropbox link to my files I would really appreciate any help for this urgent issue in my thesis writing.


title: How can I reformat the lists throughout a document?

text: Forgive me for asking what I'm sure is such a simple question, but I haven't been able to dredge up an answer off Google. I'm working on a document which contains a series of topic descriptions followed by short bibliographies. I'm entering the bibliographies as short lists. I'd like to reformat all of the unordered lists in the document to have no bullet, start flush left, and have a quarter-inch or so hanging indent. In other words, I'd like these all to look like bibliographies. Is there a way to redefine the list format at the start of the document so that they all take this form? In case there's some special way of formatting bibliographies internal to LaTeX, I should say that I'm not actually working in LaTeX; I'm working in Markdown and using pandoc to convert to PDF through pdfTeX. So I want to leave this as a simple unordered list. Thanks for any help!


title: wrong page numbering in the bibliography using fncychap

text: When I use the `hyperref` and the `fncychap` package, the bibliography in the ToC gives an incorrect link. When I click on references in the summary it does not go to page bibliography. How do I fix?               \documentclass[a4paper,10pt]{book}     \usepackage[utf8]{inputenc}     \usepackage{hyperref}     \usepackage{lipsum}     \usepackage[Sonny]{fncychap}          \begin{document}     \frontmatter     \tableofcontents     \mainmatter          \chapter{First Chapter}          \lipsum[1-10]          \begin{thebibliography}{99}          \bibitem{bredon} BREDON, G.E.: {\sl Topology and geometry.} Springer: Verlag, 1995.          \bibitem{hygino} DOMINGUES, Hygino H. {\sl Espaços métricos e introdução à topologia.} São Paulo: Atual, 1982.          \bibitem{kuhlkamp} KUHLKAMP, Nilo. {\sl Introdução à topologia geral.} Editora da UFSC: Florianópolis, 2002.          \bibitem{elon} LIMA, Elon Lages. {\sl Elementos de Topologia Geral.} Rio de Janeiro: IMPA, 1976.          \bibitem{lima} LIMA, Elon Lages. {\sl Espaços Métricos}. 3ª ed. Rio de Janeiro: IMPA, 2005.          \bibitem{lipschutz} LIPSCHUTZ, S. {\sl Topologia geral.} Ed. McGraw-Hill do Brasil Ltda: Rio de Janeiro, 1971.          \bibitem{munkres} MUNKRES,J.R.: \sl {Topology: A first course.} Prentice Hall: New Jersey, 1975.          \end{thebibliography}          \addcontentsline{toc}{chapter}{Refer\^encias Bibliogr\'aficas}          \end{document}


title: How can I wipe TeX's memory of a user-defined control sequence?

text: I know I can redefine a control sequence to be empty or `\relax`, as in my example below. However, doing so doesn't prevent one from using that control sequence , because it is still defined. To add some safeguards in my code, I'd like to wipe TeX's memory of a user- defined control sequence, so that, if I subsequently use that control sequence, I get the usual `Undefined control sequence` error. How can I do that?               \documentclass{article}     \begin{document}     \newcommand\foo{foo}     \renewcommand\foo{}     \foo % no error     \end{document}


title: Grouping two tables, one above the other

text: I'd like to group two tables, one below the other, so they don't show separated ie. one in each page. What's the best way to achieve that? I've read about positioning them side by side, but not this. Probably, I could create a custom float with `\usepackage{float}`, but I bet there is a simpler way (other than playing around with [htpb]).


title: Automatically restore Texstudio session on startup

text: Is there an option to restore automatically the last session on startup with Texstudio?


title: Shift y labels, stop y labels being dropped

text: I have a const plot with intervals on the y-axis. I'd like my y labels to be centered in each bar, as it would be if this were an xbar interval graph. Also, and more importantly, I'd like more flexibility and control in the y label intervals. Can I, for instance, include every other interval, as in [0,.05) [.1,.15) etc., with that gap in between? Finally, is there an easy way to make the last interval a closed bracket on both sides?               \documentclass{article}     \usepackage{pgfplots}               \begin{document}          \begin{tikzpicture}         \begin{axis}[        height=10cm,             const plot,             y tick label as interval=true,             ytick=,             yticklabel={$[\pgfmathprintnumber\tick, \pgfmathprintnumber\nexttick)$},             enlargelimits=false,             ymin=0,             xmin=0         ]      \addplot [fill=blue,opacity=.6,draw=blue]     coordinates     {(0,0) (393,0.000) (93,0.050) (44,0.100) (49,0.150) (31,0.200) (32,0.250) (37,0.300) (52,0.350) (90,0.400) (30,0.450) (26,0.500) (11,0.550) (32,0.600) (31,0.650) (15,0.700) (33,0.750) (18,0.800) (25,0.850) (31,0.900) (162,0.950) (0,1)};     \end{axis}     \end{tikzpicture}               \end{document}


title: Line break in author list for elsarticle document class

text: I'm using the Elsavier document class `elsarticle` where the authors are added with individual `\author{Bob}` commands. I have a long list of authors (generated randomly for this example):               \author{Stormy Kilduff}     \author{Rosann Ursery}     \author{Sebrina Bucklew}     \author{Lashaun Valerius}      This generates two lines:               Stormy Kilduff, Rosann Ursery, Sebrina     Bucklew, Lashaun Valerius      Instead I would like to force a line break after a comma and produce something like this:               Stormy Kilduff, Rosann Ursery,     Sebrina Bucklew, Lashaun Valerius


title: What point (pt) font size are \Large etc.?

text: In the preamble I have:               \documentclass[a4paper,11pt]{article}     \usepackage{fontspec}     \setmainfont{Arial}      What can be inferred about the real font `pt` size for the following? `\tiny`, `\scriptsize`, `\footnotesize`, `\small`, `\normalsize`, `\large`, `\Large`, `\LARGE`, `\huge`, `\Huge`


title: How do I create a Shidoku grid?

text: I can't figure out how to create a Shidoku grid using LaTeX. In other words, I am trying to have a 4x4 grid with a bold line separating the 2x2 subsquares. I have the `sudoku` package but it won't work when I try to decrease the number of rows and columns. Any help is greatly appreciated. Edit: I am using the following document classes:               \documentclass{ltxdoc}     \usepackage{sudoku}     \usepackage{natbib}     \usepackage{amsmath}


title: high resolution table of numbers

text: I'd like to design a table of numbers for poster-size printing, say like a multiplication table, so I'm looking for: high resolution, colors, pretty fonts. Does it sound like it could be done in LaTeX or related languages? I'm reasonably proficient in PSTricks, I have never used TikZ but am happy to learn. Edit: Here are a couple of examples of fonts I have come across: http://www.dafont.com/kg-traditional-fractions.font http://www.fontsquirrel.com/fonts/MEgalopolis-Extra How would you proceed to include these fonts in a LaTeX document?


title: How to have text overlay top and bottom of image with fade at top and bottom?

text: How can I make the text in my letter just slightly overlay the top and bottom of a centered, margin-to-margin image within my document. The image is faded at the top and bottom so that the image is just visible---you know, a gradient fade. Anyway, I thought it would be nice to have my text blend right into the image with the text overlaying this faded part just slightly---whatever the most aesthetic text-to-image overlay ratio happens to be. Anyway, thank you for your help.


title: bibentry macro with ConTeXt

text: I am trying to get the `\bibentry` (bibtex) or `\fullcite` behavior with ConTeXt. My MnWE is:               \setupbibtex[database={library},sort=author]     \setuppublications[alternative=apa]          \starttext     blablabla\cite{Bohr:1923tl}          \section{References}     \placepublications[criterium=all]          \stoptext      with the bib-file:               @article{Bohr:1923tl,     author = {Bohr, N},     title = {{The structure of the atom}},     journal = {Nature},     year = {1923},     volume = {112},     pages = {29--44}     }      My output is: ![output](http://i.stack.imgur.com/5eqPY.png) but I would like to have to full line similar to the one in references (I am using mkiv). Something such as `\placepublications[key=Bohr:1923tl]`. To give some context ;), here is the first page of a book. Note how the reference is put in the margin, so I was thinking about `\def\sidecite#1{\inouter{\fullcite{#1}}}`, but there is no `\fullcite`? (sorry, German) ![example page](http://i.stack.imgur.com/MDAof.png)


title: \renewcommand to redefine \cite

text: I would like to redefine `\cite{}` so that text like               \cite{blah:1991:pldi}      gets replaced by               \cite{blah:1991:pldi:short}      I tried the following:               \let\oldcite\cite     \renewcommand{\cite}[1]{\oldcite}{#1:short}}      However, this does not work with multiple arguments to `\cite{}`. For instance, I would like               \cite{blah1, blah2}        to be replaced by               \cite{blah1:short, blah2:short}      as well. Any suggestions?


title: Linking the section titles to the ToC

text: (Somewhat related to Defining a Command for Linked and Indexed Section Headings). I'm trying to have the section headings link to their entry in the Table of Contents so as to get "two-way" navigation, eg: a user looks in the Table of Contents for a section title, jumps there, reads a couple of lines, clicks on the section title again and gets taken to the section's entry in the Table of Contents once more. My original question is here, from the discussion there I got the following code:               \newcounter{tocBackrefCount}     \newcommand{\Chapter}[3]{%     \chapter%     (#1)%     [\protect\raisebox{\baselineskip}{\protect\hypertarget{toc:backref:\thetocBackrefCount}{}}#2]%     {\hyperlink{toc:backref:\thetocBackrefCount}{#3}}\stepcounter{tocBackrefCount}%     }      (nb: the parenthesis argument for `\chapter` are a courtesy of the `hypbmsec` package) this macro is called like so `\Chapter{bookmark}{short}{long}`, where `bookmark` is the bookmark name as you wish it to appear in the viewer, `short` is the ToC entry, and `long` is the actual section title (in text, the one which will be linked). I currently face three problems with this approach:   1. It takes between 3 to 5 compilation runs to get all the references in place (maybe the hypdestopt package has something to do with it...?).   2. It's **ugly** , I'd much rather have a redefinition of the standard `\chapter` and `\chapter*` commands, or at least make it take optional arguments which default like the standard ones. Care to share your TeXpertise on the matter? PS: the `\raisebox` command is there to avoid `hyperref` setting the target's anchor to the lower-left corner of the ToC entry (try it without it and you'll see what I mean). PPS: here's a MWE for your viewing pleasure:               \documentclass{book}     \usepackage[colorlinks,linktocpage]{hyperref}     \usepackage{hypbmsec}     \newcounter{tocBackrefCount}     \newcommand{\Chapter}[3]{%     \chapter(#1)%     [\protect\raisebox{\baselineskip}{\protect\hypertarget{toc:backref:\thetocBackrefCount}{}}#2]%     {\hyperlink{toc:backref:\thetocBackrefCount}{#3}}%     \stepcounter{tocBackrefCount}}     \begin{document}       \tableofcontents       \Chapter{Bookmark 1}{Short 1}{Long 1}         \noindent\ldots       \Chapter{Bookmark 2}{Short 2}{Long 2}         \noindent\ldots       \Chapter{Bookmark 3}{Short 3}{Long 3}         \noindent\ldots       \Chapter{Bookmark 4}{Short 4}{Long 4}         \noindent\ldots       \Chapter{Bookmark 5}{Short 5}{Long 5}         \noindent\ldots       \Chapter{Bookmark 6}{Short 6}{Long 6}         \noindent\ldots       \Chapter{Bookmark 7}{Short 7}{Long 7}         \noindent\ldots     \end{document}      # Possible **_Nice_** Solution Fiddling around with this for the best part of the weekend I got the following "final" version of @egreg's code:               \documentclass{book}     \usepackage{xparse}     \usepackage{etoolbox}     \usepackage[colorlinks,linktocpage,plainpages=false,pdfpagelabels]{hyperref}     \usepackage{bookmark}     \usepackage{hypbmsec}     \usepackage{hypdestopt}          \makeatletter     \newcounter{tocBackrefCount}          \def\MPR@command#1{%       \AtBeginDocument{\csletcs{HYPBMSEC@#1}{#1}\csletcs{#1}{MPR@#1}}%       \expandafter\DeclareDocumentCommand\csname MPR@#1\endcsname{s d() o m}{         \stepcounter{tocBackrefCount}         \IfBooleanTF{##1}           {\IfNoValueTF{##2}             {\IfNoValueTF{##3}               {\addtocounter{tocBackrefCount}{-1}\@nameuse{HYPBMSEC@#1}*{##4}}               {\@nameuse{HYPBMSEC@#1}*{\phantomsection{}\mpr@mand{##4}%                 \addcontentsline{toc}{#1}{\texorpdfstring{\mpr@opt{##3}}{##3}}}}             }             {\IfNoValueTF{##3}               {\@nameuse{HYPBMSEC@#1}*{\phantomsection{}\mpr@mand{##4}%                 \addcontentsline{toc}{#1}{\texorpdfstring{\mpr@opt{##4}}{##2}}}}               {\@nameuse{HYPBMSEC@#1}*{\phantomsection{}\mpr@mand{##4}%                 \addcontentsline{toc}{#1}{\texorpdfstring{\mpr@opt{##3}}{##2}}}}             }           }           {\IfNoValueTF{##2}             {\IfNoValueTF{##3}               {\@nameuse{HYPBMSEC@#1}(##4)[\mpr@opt{##4}]{\mpr@mand{##4}}}               {\@nameuse{HYPBMSEC@#1}(##3)[\mpr@opt{##3}]{\mpr@mand{##4}}}             }             {\IfNoValueTF{##3}               {\@nameuse{HYPBMSEC@#1}(##2)[\mpr@opt{##4}]{\mpr@mand{##4}}}               {\@nameuse{HYPBMSEC@#1}(##2)[\mpr@opt{##3}]{\mpr@mand{##4}}}             }           }       }     }     \def\mpr@opt#1{\protect\raisebox{1.6ex}{%       \protect\hypertarget{toc:backref:\thetocBackrefCount}{}}#1}     \def\mpr@mand#1{\hyperlink{toc:backref:\thetocBackrefCount}{#1}}          \MPR@command{chapter}     \MPR@command{section}     \makeatother          \begin{document}       \tableofcontents            \chapter{No optional argument}         \noindent\ldots            \section{ABC}         \noindent\ldots            \chapter[opt]{Optional argument}         \noindent\ldots            \chapter(book){No optional argument + bookmark}         \noindent\ldots            \chapter(book)[opt]{Both optional arguments}         \noindent\ldots            \chapter*{No optional argument}         \noindent\ldots            \section*{ABC}         \noindent\ldots            \chapter*[opt]{Optional argument}         \noindent\ldots            \chapter*(book){No optional argument + bookmark}         \noindent\ldots            \chapter*(book)[opt]{Both optional arguments}         \noindent\ldots          \end{document}      This deals gracefully with starred versions of the sectioning commands. Note the addition of the `hypdestopt` package: without it you'd get spurious warnings about duplicated `hyperref` targets. Note that we no longer `\reisebox` by a whole `\bsaelineskip`: that produces certain undesired artifacts in the ToC; instead, the empirically sound value of `1.6ex` is used. I wager this will _not_ be a sure shot solution and am open to suggestions on this matter. This solution works the best for me, but I'd like to hear your ideas as well, I'm sure there's more to be said on the matter!


title: Precompiled header in Lualatex on Windows?

text: I am trying to typeset a longer document with lots of packages. Now it seems that pre-compiling the header can speed up the edit-compile-revise cycle quite a bit. I tried to follow the guideline from How to speed up pdflatex for a very large document on MacOS X? but it does not work on my system and I am not sure what I am doing wrong. My preamble.tex looks as follows:               \documentclass[a4paper]{scrbook}     \usepackage{scrpage2}     \def\preambleloaded{Precompiled preamble loaded.}      and the main.tex file:               \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax} \ifundefined{preambleloaded}     \typeout{PRECOMILED PREAMBLE NOT LOADED}\input{preamble} \else     \typeout{\preambleloaded}     \fi          \begin{document}     test test test     \end{document}      Now after compiling the preamble with               lualatex -ini -job-name="main" "&lualatex preamble.tex\dump"      a main.fmt file is created and lualatex runs without errors. Compiling the main file with               lualatex -shell-escape main.tex      gives the message right at the beginning that the preamble was not included:               LaTeX2e <2011/06/27>     LuaTeX adaptation of babel <v3.8l-luatex-1.4> and hyphenation patterns for engl     ish, loaded.     PRECOMILED PREAMBLE NOT LOADED     (C:/Users/User/Documents/LaTeX/precompile/preamble.tex     (C:/Users/User/AppData/Roaming/MiKTeX/2.9/tex/latex/koma-script/scrbook.cls      ...      The only difference that I can think of at the moment is that I am using LuaLaTeX on Windows 7 instead of pdftex on Mac OS X as in the linked question. Any hint how to fix this is very appreciated.


title: Export of BibDesk articles

text: I am new to BibDesk and Latex. I was wondering if there is a faster way than exporting articles from BibDesk as a .bib file via the file -> export button to integrate those into latex? Isn't there any latex package which directly exports your articles form BibDesk? So ideally I add a new reference to my BibDesk then copy the \cite tag and finally just rerun make (and other commands recompile latex and it is there.


title: Use labels from file in Tikz

text: I want to compare data from two files in a 4 by 4 grid. The data files are like this: `data1.dat`:               A  B   C  D     .....      `data2.dat`:               1   2   3   4     .........      I am able to set up the grid with the following code using snippets from this site. The labels for each grid point have to be entered manually. I want some suggestions to modify the program to read the labels from the files instead.               \documentclass{article}     \usepackage{tikz}     \begin{filecontents}{Data1.dat}     A        B         C          D     E        F         G          H     I        J         K          L     M        N         O          P     \end{filecontents}     \begin{filecontents}{Data2.dat}     1      2    3     4     5   6   7     8     9     10    11  12     11   12     13     14     \end{filecontents}          \begin{document}     \begin{tikzpicture}     \draw[step=1.0cm,color=gray] (-2,-2) grid (2,2);     \node at (-1.5,+1.75) {A};     \node at (-1.5,+1.25) {1};     \node at (-0.5,+1.75) {B};     \node at (-0.5,+1.25) {2};     \node at (+0.5,+1.75) {C};     \node at (+0.5,+1.25) {3};     \node at (+1.5,+1.75) {D};     \node at (+1.5,+1.25) {4};     %..     \node at (+1.5,-1.25) {P};     \node at (+1.5,-1.75) {16};          \end{tikzpicture}     \end{document}


title: \fancypage border to surround header and footer

text: I am trying to create a page border that encapsulates the header and footer not just the body of a TeX document. Here is what i've got:               \documentclass[a4paper]{article}          \usepackage[a4paper,vmargin={20mm,20mm},hmargin={20mm,20mm}, includehead, includefoot]{geometry}     \usepackage{fancybox}          \begin{document}          \fancypage{\setlength{\fboxsep}{0pt}\fbox}{}          Document text goes here...          \end{document}      When I take out the `includehead` and `includefoot` tags the border stays at 2cm on all sides but page numbers are still on the outside of the border. When I include these tags page numbers stay on the outside and the border on top/bottom is no longer 20mm. I theorise that this is due to header/footer. Any pointers?


title: Can I locally switch to a 'greedy' justification algorithm?

text: I'm not optimistic about this since this is a core part of TeX's algorithm, but is there any way to switch to a 'greedy' justification algorithm? That is, instead of working on the paragraph as a whole and optimizing word spacing, fit as much as you can onto one line, hyphenating if necessary, justify, and then move to the next line.


title: coloring every other row of a table, with vertical lines

text: I am making a table that needs every other row colored. I thought to use this.               \usepackage[table,svgnames]{xcolor}     \rowcolors{1}{white}{gray!15}      But my table has vertical bars               \begin{tabular}{r|*{3}{p{2in}|}}      as well as horizontal bars               \multicolumn{1}{c}{\ }     &\multicolumn{1}{c}{Monday}       &\multicolumn{1}{c}{Wednesday}       &\multicolumn{1}{c}{Friday} \\ \hline      and the color makes them disappear (the bar from the "`r|`" stays as I have it above, but if I change the first multicolumn's "`\`" to "week" then this bar also disappears). Am I missing something; is there a way to keep the bars and get the colors behind them? (I have a 2010 TeX Live.)


title: How to wrap text in flalign

text: not a duplicate of this question because I want to keep the equation numbering, so a tabular won't do (I think). I am using flalign to typeset philosophical arguments. I also want to use hyperref to be able to hotlink back to the individual lines of the argument later in the document. This works fine until I have a sentence that needs to be wrapped to the next line. MWE:               \documentclass[11pt]{amsart}     \usepackage{hyperref}     \begin{document}          \begin{flalign}     && \text{This is premise 1.} && \text{(Premise)} \label{premise1} \\     && \text{This is premise 2. What happens when the text goes over the line though? } && \text{(From \autoref{premise1})}\label{premise2}     \end{flalign}          Obviously \autoref{premise2} follows from \autoref{premise1}.          \end{document}


title: How to hyphenate Portuguese in plain TeX?

text: I'd like to use plain TeX in Portuguese, but I don't know how to hyphenate in this language, or in any other language than English. What do I have to do?


title: My boxplot draws but the coordinates are NaN when I try to label the plot

text: I have been slowly getting my barchart with a boxplot to come together. My current project is to label the whiskers, quartiles and median. Using examples from the manual, no label is printed. This is a snippet of what I have:               \addplot[ boxplot={draw position=\numberofrows} ]     table[ y index=0, col sep=comma] {data.csv};     [above]     node[left] at (boxplot box cs: \boxplotvalue{lower whisker},1) {\pgfmathprintnumber{\boxplotvalue{lower whisker}}};     node[left] at (boxplot box cs: \boxplotvalue{lower quartile},1){\pgfmathprintnumber{\boxplotvalue{lower quartile}}}     node[left] at (boxplot box cs: \boxplotvalue{median},1)        {\pgfmathprintnumber{\boxplotvalue{median}}}     node[right]at (boxplot box cs: \boxplotvalue{average},1)       {\pgfmathprintnumber{\boxplotvalue{average}}}     node       at (boxplot box cs: \boxplotvalue{upper quartile},1){\pgfmathprintnumber{\boxplotvalue{upper quartile}}}     node[right]at (boxplot box cs: \boxplotvalue{upper whisker},1) {\pgfmathprintnumber{\boxplotvalue{upper whisker}}};          \draw  node[anchor=center,on top] at (axis cs:40.0,\numberofrows) {\pgfmathprintnumber{\boxplotvalue{median}}};      The \pgfmathprintnumber{\boxplotvalue{median}} prints NaN and that explains why the boxplot label values do not print. How does \boxplotvalue{} work? I'm using the code straight from the manual. Is the barchart causing problems with the boxplot coordinates? The boxplot draws with no labels. What do I need for something that seems so straight forward. Regards, Dave


title: Equation conditions

text: I am in doubt of how to properly write (multiple) conditions to an equation. Right now I have               a+b=c,\quad a>0,b\ge 0      Which gives ![this](http://i.stack.imgur.com/4cspT.png) But I dont think it looks very nice. How can I make it look better? If you want to reference an example in a journal or elsewhere, I would be gracious for that as well.


title: Expand after all that stuff?

text: Often I find myself in the need of expanding some macro, whose contents should be given as an argument to another command. The usual solution is to invoke some `\expandafter` concoctions to somehow control the expansion, but I wonder if (at least for some common cases) there is an easier way. As an example, imagine that I want to write something like the following               \somecommand{Some Argument}{\secondarg}      But I want to expand `\secondarg` _before_ actually attempting to process `\somecommand`. For this kind of scenarions, would it be possible to define a command so that               \expandafterallthat{\somecommand{Some Argument}}{\secondarg}      expands to something like               \somecommand{SomeArgument}{Contents of secondarg macro}


title: No BoundingBox in LaTeX for a JPEG figure

text: I am creating a pdf file with MiKTeX editor. I am including a figure as follows:               \begin{figure}         \centering         \includegraphics[width=0.9\textwidth]{MonitoringConcept.JPEG}         \caption{Monitoring concept for energy and comfort}         \label{MonitoringConcept}     \end{figure}      In the header, I have added these packages:               \usepackage{lineno,hyperref,subfig,graphicx}      However, in the compilation time I get an Error. The message is the next one:               ! LaTeX Error: Cannot determine size of graphic in MonitoringConcept.JPEG (no BoundingBox).       Do you know what the problem could be? Thank you very much in advance!


title: What is the difference between square brackets and curly brackets in a command invocation?

text: Pardon the naive beginner question. In a command like: `\textcolor[HTML]{4C7045}{dark green text}`, or `\documentclass[12pt]{article}`, or `\begin{figure}[htb]`, why are some arguments surrounded by [] and some by {}? The above examples are all for LaTeX, but this doesn't seem to be LaTeX- specific.


title: Text in table is defaced for no apparent reason

text: I made this table (now is modified to reproduce the problem described on Edit 1):               \documentclass[11pt]{article}          \usepackage[spanish,mexico]{babel}           \usepackage{arabtex}      \usepackage{utf8}      \usepackage[utf8]{inputenc}          \usepackage{longtable}     \usepackage{array}     \setlength{\tabcolsep}{10pt} %separación columnas     \renewcommand{\arraystretch}{2} % separación filas     \usepackage{multirow}     \usepackage{graphicx}               \begin{document}     \vocalize %usar diacriticos     \setarab     \setcode{utf8}          \noindent Si anteponemos \RL{ا}, \RL{مَا}, o \RL{مَنْ}  a \RL{هَذَا} , se convierte en una pregunta:      \begin{itemize}     \item Frase afirmativa: \RL{هَذَا بَيْتٌ} (Esto es una casa)     \item Frase interrogatoria 1: \RL{اَهَذَا بَيْتٌ؟} (¿Es esto es una casa?)     \item Frase interrogatoria 2: \RL{مَنْ هَذَا؟} (¿Quién es este?)     \item Frase interrogatoria 3: \RL{مَا هَذَا؟} (¿Qué es esto?)     \end{itemize}     \bigskip          \begin{Large}     \begin{center}     \begin{tabular}{cc|c c|}     \cline{1-4}     \multicolumn{4}{ |c| }{\begin{LARGE}\RL{تَحْلِيلْ الْجُمَلْ }\end{LARGE}} \\ \cline{1-4}     \multicolumn{1}{ |c }{\multirow{4}{*}{\rotatebox{-270}{\RL{مُذَّكَرُُ مُفْرَدْ}}} } &     \multicolumn{1}{ |c }{\RL{الْمُشَرُ اِلَيْهِ}} &  \RL{اسْمُ الاِشَارَة} & \RL{الْجُمْلَة}       \\ \cline{2-4}     \multicolumn{1}{ |c  }{}                        &     \multicolumn{1}{ |c }{\RL{نَجْمٌ}} &  \RL{ذَلِكَ} & \RL{ذَلِكَ نَجْمٌ}      \\ \cline{2-4}     \multicolumn{1}{ |c  }{}                        &     \multicolumn{1}{ |c }{\RL{مَسْجِدٌ، بَيْتٌ }} & \RL{هَذَا، ذَالِكَ} & \RL{هَذَا مَسْجِدٌ وذَلِكَ بَيْتٌ}      \\ \cline{2-4}     \multicolumn{1}{ |c  }{}                        &     \multicolumn{1}{ |c }{\RL{حِصَانٌ، حِمَارٌ }} & \RL{هَذَا، ذَالِكَ} & \RL{هَذَا حِصَانٌ وذَلِكَ حِمَارٌ}      \\ \cline{1-4}     \end{tabular}     \end{center}     \end{Large}          \end{document}      Which looks like this: ![good table](http://i.stack.imgur.com/YQ2zJ.png) ...but only when it is in its own .tex file, alone. When I put it within the original file with other tables and normal text it looks like this: ![bad table](http://i.stack.imgur.com/f93OP.png) And I don't know why. TeXmaker does not send me any error and the rest of the tables above and below this one look perfect. * * * **Edit 1** I discovered that the issue is this part of the original file:               \begin{itemize}     \item Frase afirmativa: \RL{هَذَا بَيْتٌ} (Esto es una casa)     \item Frase interrogatoria 1: \RL{اَهَذَا بَيْتٌ؟} (¿Es esto es una casa?)     \item Frase interrogatoria 2: \RL{مَنْ هَذَا؟} (¿Quién es este?)     \item Frase interrogatoria 3: \RL{مَا هَذَا؟} (¿Qué es esto?)     \end{itemize}      If I delete this part from the code, or if I put my table before this part, the table looks good. But I don't really see why this list is a problem, since there are other lists before and after this one and all the other tables look good. In fact, if I erase _this particular_ `itemize` environment, while leaving the text, the problem is gone. Is this a glitch, a bug? **I still don't get any error while compiling** , not even a warning. * * * **Edit 2** I modified the first code so that the problem can be reproduced. If you erase the `itemize` environment or if you put the table before it, the problem is solved. Now I get a warning, which is caused by using the `Large` and `LARGE` environments, when I delete those the warning is gone but the main problem remains... in a smaller fontsize.


title: Question on the syntax of the options of pdflatex, latex, etc.: difference between -shell-escape and --shell-escape?

text: What is the difference between               pdflatex -shell-escape myFile.tex      and               pdflatex --shell-escape myFile.tex      ?


title: Odd pages should be right

text: I'm writing a document using `srcbook`. It has quite many pages and I have the following scenario: The first ~10 pages are numbered with small roman numbers (i.e. i, ii, iii, iv, v, vi, vii, ...). These pages contain preface, table of contents, and such stuff. After these pages, I continue with ordinary arabic page numbers. The problem however is the following: The first page with arabic numbers is _on the left_. This results in the face that all `\part`s and `\chapter`s start on the left page. However, I would like to start them on the right page. So, I tried the option `openright` to enforce new chapters opening on the right page. However, LaTeX seems to check this property according to the page number. Of course, I can simply insert an empty page to enforce this manually, but this seems like a hack. Is there any way to acchieve what I want more elegant?


title: \listoffigures font size

text: Can anyone tell me how I can change the font size of the `\listoffigures` content (not the caption)? I couldn't find a corresponding option in the tocloft package


title: Right align memoir chapter style + appendix problem

text: Merry christmas to everyone. I'm trying to make a LyX template since I have to write three reports over the next 12 months. I'm using memoir and chapterstyle demo2. How can I 1) Right align the chapter number (the name is already right aligned) and 2) Change it from e.g. "one" to "Chapter 1"? 3) Can I do the same thing on my appendix? I.e., make right align and make it start with "Appendix A" instead of "A"? ![enter image description here](http://i.stack.imgur.com/3u2OX.png) This is my preamble so far:               \chapterstyle{demo2}     \makepagestyle{mystyle}     \makeheadrule {mystyle}{\textwidth}{\normalrulethickness}      \makeevenhead{mystyle}{\small\leftmark}{}{}     \makeoddhead{mystyle}{\small\rightmark}{}{}     \makeevenfoot{mystyle}{}{\thepage }{}      \makeoddfoot{mystyle}{}{\thepage}{}


title: Can I force hyperref to use a custom driver?

text: As part of a project to get LaTeX to output something useful, I found myself wanting to write a new hyperref driver for the desired format. The documentation explains what a driver needs to do, but it doesn't explain how to get hyperref to load the new driver instead of its given one. Looking through the code, I can't see an obvious hook but I may well be missing something. At the moment, I load the driver file using the `\AtBeginDocument` hook, but it worries me that this might not be very robust. So, can I get hyperref to load a custom driver _without_ modifying `hyperref.sty`? If not, are there any dangers from manually loading it myself at the start of the actual document?


title: How do I put a line break in for a line of Maple input that is too long?

text: I've exported a Maple worksheet to LaTeX. The main problem is the Maple input is too long for one line, how do I put in line breaks? This is the code I want to fix,               \begin{mapleinput}     \mapleinline{active}{1d}{eq1 := diff(theta[1](t), `$`(t, 2))+(1+Delta)*sin(theta[1](t))+ mu*((theta[1](t)/theta[0])\symbol{94}2-1)*(diff(theta[1](t), t))-beta*cos(theta[1](t))*(diff(sin(theta[1](t))+sin(theta[2](t)), `$`(t, 2))) = 0;}{}     \end{mapleinput}      Currently it does this.![enter image description here](http://i.stack.imgur.com/KOoPE.png) You can see how it needs a line break.


title: LaTeX Font Warning on Natty Ubuntu Linux

text: > **Possible Duplicate:**   >  How to include font into document?   >  "Font shape undefined" with latex and isodoc I am using the following in a document:               \usepackage[T1]{fontenc}     \usepackage{calligra}     \usepackage{tgothic}     \usepackage{libertine}      I am using Ubuntu Natty and I am getting the following warning:                LaTeX Font Warning: Some font shapes were not available, defaults substituted.      I must be missing a package but I am not sure which one?


title: How to include font into document?

text: I have a template that use Frutiger Font. But I think the font is not correctly included because while generating the document I get various font errors and the last one:               LaTeX Font Warning: Some font shapes were not available, defaults substituted.      So how can I included that font?


title: LaTeX error in the LaTeX compilation

text: For the last few days I have been facing some problems while trying to compile my LaTeX document. When I run it (`shift`+`ctrl`+`L`), the window compiles for some time; then it is stopped. It starts working once I enter `r` and press `enter`. Earlier there was no break like this. Do I have to install it again? **_Note:_** I am using WinEdt. I compiled file and just pressed `x` and `enter`. ![enter image description here](http://i.stack.imgur.com/apmu1.png)


title: How to remove the leading unnecessary white spaces when using linerange option?

text: To be honest, I am looking for people who already read the `listings` documentation completely. If those people also cannot solve it, then the documentation does not mention anything about it. Sorry for this inconvenience. But at least I can show my effort by providing you with the minimal working example.               \documentclass[preview,border=12pt,12pt]{standalone}     \usepackage{filecontents}          \begin{filecontents*}{Program.cs}     using System;     using System.Collections.Generic;     using System.Linq;     using System.Text;     using System.Threading.Tasks;          namespace Delegate     {         class Program         {             // start             static void Main(string[] args)             {                 for (int x = 0; x < 10; x++)                     Console.WriteLine(x);             }             // stop         }     }     \end{filecontents*}               \usepackage{accsupp}     \newcommand*{\noaccsupp}[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}}          \usepackage{xcolor}     \usepackage{listings}               \lstdefinestyle{Common}     {            language={[Sharp]C},         numbers=left,         numbersep=1em,         numberstyle=\tiny\noaccsupp,         frame=single,         framesep=\fboxsep,         framerule=\fboxrule,         rulecolor=\color{red},         xleftmargin=\dimexpr\fboxsep+\fboxrule,         xrightmargin=\dimexpr\fboxsep+\fboxrule,         breaklines=true,         breakindent=0pt,         tabsize=2,         columns=flexible,         includerangemarker=false,         rangeprefix=//\ ,     }               \lstdefinestyle{A}     {         style=Common,         backgroundcolor=\color{yellow!10},         basicstyle=\scriptsize\ttfamily,         keywordstyle=\color{blue}\bf,         identifierstyle=\color{black},         stringstyle=\color{red},         commentstyle=\color{green}     }          \begin{document}     \section*{Full Code}     \lstinputlisting[style=A]{Program.cs}     \section*{Code Snippet}     \lstinputlisting[style=A,linerange=start-stop]{Program.cs}     \end{document}*      ![enter image description here](http://i.stack.imgur.com/NcIeQ.png) My question is how to remove the leading white space when using `linerange` option? ## Edit Consider some extreme cases below. ## Case 1               namespace Delegate     {         class Program         {             // start             static void Main(string[] args)             {                 for (int x = 0; x < 10; x++)                     Console.WriteLine(x);             }               }             }     // stop      The code should be rendered as follows with `includrangemarker=true`                       // start             static void Main(string[] args)             {                 for (int x = 0; x < 10; x++)                     Console.WriteLine(x);             }               }             }     // stop      with `includerangemarker=false`                       static void Main(string[] args)             {                 for (int x = 0; x < 10; x++)                     Console.WriteLine(x);             }               }             }      ## Case 2               namespace Delegate     {         class Program         {         // start             static void Main(string[] args)             {                 for (int x = 0; x < 10; x++)                     Console.WriteLine(x);             }               }             }         // stop      The code should be rendered as follows with `includerangemarker=true`,                   // start             static void Main(string[] args)             {                 for (int x = 0; x < 10; x++)                     Console.WriteLine(x);             }               }             }         // stop      with `includerangermarker=false`                       static void Main(string[] args)             {                 for (int x = 0; x < 10; x++)                     Console.WriteLine(x);             }               }             }


title: Formatting text inside minipage

text: If I use `\begin{textbf}` and `\end{textbf}` (for example) inside a minipage, it seems to apply only to the first character. Here's a simple example:               \documentclass{article}          \begin{document}          \begin{minipage}{10cm}     \begin{textbf}     This is a test.     \end{textbf}     \end{minipage}          \end{document}      Only the "T" of "This" appears bold. Am I doing something very stupid? (Probably!)


title: hline in nested table

text: I have a really complex table in my opinion which is why im running into some Problems here. I used a nested table because I had Problems when using the `\multirow` and `\cellcolor` / `\rowcolor` command. However the Problem now is that the `\hline` is not reaching to either the left and right side of the outer table. The Picture below Shows the Problem: ![enter image description here](http://i.stack.imgur.com/WDybb.png) How can i solve this Problem? Does someone has a better solution for this Kind of table? This is the code:               \documentclass{article}          \usepackage{colortbl}     \usepackage{multicol}     \usepackage{multirow}     \usepackage{booktabs}          \definecolor{Beige}{RGB}{219,212,192}     \definecolor{Table}{RGB}{246,244,239}          \begin{document}     \begin{table}         \centering         \begin{tabular}{|p{0.4cm}|p{6.7cm}|p{1cm}|p{1cm}|p{1cm}|p{2cm}|}         \hline         \rowcolor{Beige}         \multicolumn{6}{|l|}{\textbf{B1 Eingabefelder}} \\ \hline         \rowcolor{Table}         Nr. & Beschreibung & \multicolumn{4}{l|}{             \begin{tabular}{@{}>{\centering\arraybackslash}m{1cm}|>{\centering\arraybackslash}m{1cm}|>{\centering\arraybackslash}m{1cm}|>{\centering\arraybackslash}m{2cm}@{}}                 \multicolumn{4}{l}{Kommentare / Verhaltensweisen} \\ \hline                 H & A & B & Schweregrad \\             \end{tabular}         } \\ \hline         ~ & ~ & \multicolumn{4}{l|}{} \\ \hline         \end{tabular}     \end{table}     \end{document}


title: How can I change the language of my natbib bibliography?

text: I am using the `natbib` package for my bibliography. For documents in English, everything works fine.               \bibliographystyle{plainnat}     \bibliography{tex/bibliography} % the file is called bibliography.bib      There are certain keywords like `and` and `edition` that belong to the English language. When writing a German document, like in my case, they have to be translated. I started by editing the `plainnat.bst` file, but it turned out to be rather difficult, as different comma rules apply in German etc. Is there a package or a convenient approach to get it in German? I am already using the following for my document, but it does not apply to the bibliography.               \usepackage{ngerman} % this only applies to the content, not the bibliography


title: Add big bracket below/over tikz node

text: How can I prolong the big bracket to not only cover `yyyy` but also the `uuuu` node?               \tikzstyle{level 1}=[level distance=3.5cm, sibling distance=3.5cm]     \tikzstyle{level 2}=[level distance=3.5cm, sibling distance=2cm]     \begin{figure}     \centering     \begin{tikzpicture}[grow=right, sloped]     \node[draw] {ppp\textsuperscript{p}}                         child {                     node[draw, circle, label=right:                         {$xxxx$}]     {}                     edge from parent                     node[above] {xx}                     node[below]  {$xxxx$}                 }                 child {                     node[draw, circle, label=right:                         {$uuuu$}]      {}                     edge from parent                     node[above] {uu}                     node[below]  {$uuuu$}                  }                 child {                     node[draw, circle,label=right:                         {$yyyy \Bigg\} $}]      {}                     edge from parent                     node[above] {yy}                     node[below]  {$yyyy$}         };     \end{tikzpicture}     \end{figure}


title: Get the title instead of the number of a referenced chapter/section?

text: In my document I am referencing a section, e.g.               \section{My Section}\label{test}     Also see section\ref{test}      This gives me, e.g. > Also see section 1 but what I want is: > Also see section My Section How can I do that?


title: How can I convert from Microsoft Word to a LaTeX document

text: I am a final year graduate student and I have my thesis (about 350 pages) in Microsoft Word format. I would like to convert the document into a LaTeX "camera" ready PDF. Is there any easy way to do this? I am very new to LateX..


title: Word 2003 to LaTeX converter

text: > **Possible Duplicate:**   >  How can I convert from Microsoft Word to a LaTeX document I have this fairly large physics thesis due in half a year (about 150 pages) and I wanted to use LaTeX for the formulas and such. I am just the average PC- user, I don't know much about computers, I just use it casually (unlike most of you, who I assume to know much about computers). Since I am a rookie, I like LaTeX very much, because it is so simple. Just use dollars signs and some short abbreviations and voila: you can get the most complicated formulas and such! I want to write a document, preferably in word 2003, and I want a simple converter that can convert it into LaTeX style, just like the box below where I'm typing is doing now. Keep in mind, I don't know a lot, so please suggest some easy converters with some instruction. Also, if there is a type of free document-writer like word with LaTeX 'built-in', I'm willing to use that too.   * Also, if you guys would like to tell me what you use for projects like these, I would appreciate it too.


title: Acute/grave accents: upper case versus low case

text: The acute and grave accents on capital letters are more squat and flatter than on lower case letters. Compare `\'A` with `\'a`. What is the code for the squatter acute/grave on capitals if I want it insolation? Rationale: I need capital letters with macron and acute/grave. If I put `\'{}` on top of `\=A`, then the letter is too tall for the interline spacing, partly because `\'{}` produces the 45-degree accent of `\'a` (and partly because the default height of the macron is too high).               \documentclass[12pt]{article}          \begin{document}     If the difference between the accents of \'A, \'a isn't apparent, try superimposing     them: \makebox[0pt]{\'A}\makebox[0pt]{\raisebox{.6ex}{\'a}}\,\raisebox{.6ex}{\'a}.     See how the character on the left has a wedge (as opposed to the acute on the     right-hand \'a)?  The two accents don't exactly overlay, because the acute on     \'A is flatter.     \end{document}      ![wrong accents](http://i.stack.imgur.com/hmIxT.png)


title: Sorting a list of tokens (not necessarily numerals) in expl3/LaTeX3

text: I'd like to sort a list of words according to their lexicographical order using `expl3` code. My words are in a `seq` variable that I access in a stack- like manner (this is not relevant, though). I've learnt of the `l3sort` package, but it seems as though its functions worked only for numerical variables, because I've had no trouble with my code to sort a list of integers but I've ran into trouble with non-numerical data (meaning "plain" characters; no fancy macros, expandable stuff, or the likes). Is there a ready-made way to do this in `expl3/LaTeX3`? On the negative, could somebody possibly provide some hints as to how to do this?


title: Centering Xcircuit Figure

text: Hi I am using a program called xcircuit to make circuit diagrams and I cant seem to get the figure centered. I have tried `\begin{center}`, `\centering`. I have tried messing with `\flushleft` but it needs to be flushleft for the words to line up in the figure (see attached image) These commands work when i use `\includegraphics.` I know its not a bounding box problem. Thanks for your help here is the code:               \documentclass[]{article}     \usepackage{graphicx,epstopdf}     \usepackage{epsfig}     \usepackage{float}     \begin{document}     \begin{figure}[H]     \centering      \input{hvdc}      \caption{CIGR\'E Idealized Rectifier Station}      \label{fig:hvdc}     \end{figure}          \begin{figure}[H]     \begin{center}      \input{hvdc}      \end{center}      \caption{CIGR\'E Idealized Rectifier Station}      \label{fig:hvdc}     \end{figure}     \end{document}      Here is the code generated by Xcircuit for hvdc.tex               \def\putbox#1#2#3{\makebox[0in][l]{\makebox[#1][l]{}\raisebox{\baselineskip}[0in][0in]{\raisebox{#2}[0in][0in]{#3}}}}     \def\rightbox#1{\makebox[0in][r]{#1}}     \def\centbox#1{\makebox[0in]{#1}}     \def\topbox#1{\raisebox{-\baselineskip}[0in][0in]{#1}}     \def\midbox#1{\raisebox{-0.5\baselineskip}[0in][0in]{#1}}     \begin{flushleft}     \epsfig{file=C:/Users/kasun/Desktop/center_pic/hvdc.eps}\\     % translate x=1222 y=-12 scale 0.38     \putbox{2.46in}{1.27in}{$1000 kV$}%     \putbox{0.42in}{1.08in}{$345 kV$}%     \putbox{0.42in}{0.91in}{$50 Hz$}%     \putbox{1.00in}{2.08in}{$345 kV:422 kV$}%     \putbox{0.25in}{0.49in}{$P_{ac}$}%     \putbox{1.17in}{1.24in}{$P_{6pulse}$}%     \putbox{1.17in}{0.24in}{$P_{6pulse}$}%     \putbox{2.34in}{0.08in}{$P_{dc}$}%     \end{flushleft}      ![enter image description here](http://i.stack.imgur.com/AcPuq.png)


title: Is there any way to change the caption of a table after its declaration?

text: I have some tables that are generated automatically by a third-party program. I would like to change their captions without editing their text. Is there any way to change the caption of a table after it has been declared? For example:               \input{file_containing_the_table}     \some_command_to_change_the_caption{new_caption}      where file_containing_the_table.tex is something like this:               \begin{table}     a tabular ...     \caption{old_caption}     \label{table_label}     \end{table}      Thanks.


title: Nearest-neighbour surface plot from matlab2tikz fails with colormap

text: I load an external custom colormap with               \input{coolwarm_.map}      I have a range of complex surface plots created with matlab2tikz which use this colormap and compile successfully. One does not. It fails with this error:               ! Package pgfplots Error: No such element: \pgfplotsarrayselect257\of{pgfpl@cm@     matlab}.      I tried the fix given here but it does not work. You can look at the colormap here. The working tikzpicture is here. The non-working tikzpicture is here. I am wondering if it has anything to do with the plot type; the one that fails is a nearest neighbour interpolation with some very steep surfaces, the other is a cubic interpolation. EDIT: Yes, this is a clue to the cause -- the other nearest neighbour surface plot in my collection, produced with MATLAB's `TriScatteredInterp`, produces exactly the same error when using this colormap.


title: Forbid page ranges in index

text: I'm using `imakeidx` with `makeindex` and an `.ist` file. How can I forbid `makeindex` from creating page ranges (e.g. `3--5`)?


title: \middle uses spacing as if it were regular size even when it's \bigg

text: Following the lead of this answer and the interface of `mathtools.sty's` `\DeclarePairedDelimiter` macro, I've made a `\setof<*|[<size>]|>#1#2` that uses setbuilder notation for a set. But I cannot for the life of me understand why the third setbuilder lines up with the first one rather than the second one.               \documentclass[12pt]{article}     \usepackage{amsmath}     \makeatletter     \def\mathcrel#1{\mathrel{}#1\mathrel{}}     \def\midrel#1{\mathcrel{\middle#1}}     \let\setbuilder|     \def\setof{%       \@ifstar         \setof@S         {\@ifnextchar[%]           \setof@B           \setof@N}}     \def\setof@S#1#2{\left\lbrace #1 \midrel\setbuilder #2 \right\rbrace}     \def\setof@B[#1]#2#3{\mathopen #1\lbrace #2 \mathcrel{#1\setbuilder} #3 \mathclose #1\rbrace}     \def\setof@N#1#2{\lbrace #1 \mathcrel\setbuilder #2\rbrace}     \makeatother          \def\CC{\mathbf C}\def\NN{\mathbf N}     \begin{document}     \begin{align*}     \ell^\infty &= \setof{(x_n) \in \CC^\NN}{\sup_{n\in\NN} |x_n| < \infty}. \\     \ell^\infty &= \setof[\bigg]{(x_n) \in \CC^\NN}{\sup_{n\in\NN} |x_n| < \infty}. \\     \ell^\infty &= \setof*{(x_n) \in \CC^\NN}{\sup_{n\in\NN} |x_n| < \infty}.     \end{align*}     \end{document}


title: Scaling cmtt to match times

text: I want to use Times Roman (times) as the default font and Computer Modern Typewriter (cmtt) for monospaced text. However, Computer Modern is a little too large. How do I scale it down document-wide? If I were using Courier as my monospace font, I could do:               \usepackage[scaled=0.95]{couriers}      But I cannot find any scaling options for Computer Modern.


title: Are the Lido STF font installation instructions up-to-date?

text: The Czech TUG homepage has instructions and files to install the Lido STF fonts here. I don't know much about how fonts work in TeX, and the files have a modification date of 2001, so I'd like to ask:   1. Are these instructions up-to-date and correct? If not, please provide corrections.   2. Do I need to install the OFS package? This is unclear for me from the instructions.   3. How do I invoke the font in my documents? (I know I can just use XeTeX, but it's sometimes fun to do things like this. I'm using MiKTeX 2.9.) * * * Here is a summary in case the link breaks.   1. Unpack the `.tgz` archive.   2. Insert the following line into `texmf/dvips/config/config.ps`: `p +slido.map`   3. Insert the following line into `texmf/pdftex/config/pdftex.cfg`: `map +slido.map`   4. In `texmf/web2c/mktex.cnf`, delete `fontmaps` from the line setting `MT-FEATURES`.   5. Run `texhash`.


title: controlling the figure in the top left corner with powerdot

text: I'm trying to change the width and the height of the figure appearing in the top left corner of a powerdot presentation with the default style. This is not achieved with the `logocmd` and `logopos` parameters of the `\pdsetup{}` command, is it ? ![enter image description here](http://i.stack.imgur.com/BsB5N.jpg)


title: Prevent the overflow of text

text: I'm having some Yiddish text overflow it's box in a XeLaTeX document. I suspect there is a simple command to stop this from happening. Does anyone know an easy solution or do I need to make and post a MWE? As can be seen in the screenshot it is interfering with my image to the right and causing it to be shifted down. ![enter image description here](http://i.stack.imgur.com/1gpXK.png)


title: \AtBeginSection in other document classes like article or book

text: I understand that there is `\AtBeginSection` in `beamer` class which allows us to execute a set of commands at the start of each section. As we find in beamer guide, > **`\AtBeginSection[⟨special star text⟩]{⟨text⟩}`** The given text will be > inserted at the beginning of every section. If the ⟨special star text⟩ > parameter is specified, this text will be used for starred sections instead. Now in the `article` or `book` class, we find the command `\AtBeginDocument`, but that is all. Is there anything like `\AtBeginSection` in other document classes like `article` or `book`? If there is none, is there any chance we can define it?


title: Alternatives to footnotes?

text: I have a document that uses a lot of footnotes (avg. 15 per page, and 1 line of text per footnote in A5 paper). Unfortunately, this necessitates a lot of eye movement: readers must find the corresponding footnote, then find their place back in the text again. Frequently, readers must refer back to prior footnotes. I need to find something more efficient, that also doesn't take up much space. I have tried every option in `footmisc`, but these only make insignificant formatting changes. I've tried using the margin features of `tufte-latex` and `footmisc`, but this runs into errors complaining about too many floats and not enough memory; the workarounds for this are insufficient given the large quantity of footnotes I'm dealing with. What other options or adjustments can I try?


title: How can I put the table caption on the top in pdfLaTeX?

text: I have this code               \begin{table}[H]       \caption{My Caption }       \centering       \begin{tabular}{*{6}{|p{3cm}}}       \hline\hline      But caption comes at bottom. I can't use this               \begin{table}[Ht]      as it gives error.


title: Table caption above, figure caption below

text: In a LaTeX article, I would like to place table captions above the tables and figure captions below. Is this possible?


title: exporting tikz pictures starting with 1 rather than 0

text: I want to export my figures for an editor for import in another text editing program. I would like to have the name of the file correspond to the figures in the document. In the document they start with one but the export functionality of pgf adds a 0. The documentation says: > Changes the names of all following figures. It is possible to change figure > name during the document either using \tikzset{external/figure > name={⟨name⟩}} or with this command. A unique counter will be used for each > different {⟨name⟩}, and each counter will start at 0. I tried to define the picture name and increase the counter, but the counter seems to have a different name:               \tikzsetfigurename{mueller-abbildung-}     \addtocounter{mueller-abbildung-}{1}      LaTeX complains:               ! LaTeX Error: No counter 'mueller-abbildung-' defined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.131 ...nter{mueller-abbildung-}{1}


title: Is there a track change package/mechanism that support "accepting" changes

text: I have learned from this thread "Track changes" in LaTeX that there do exists some change tracking mechanisms. What I need now is more than change tracking but also change accepting similar to that in word. ![enter image description here](http://i.stack.imgur.com/xfKIu.png) There is a button in word that you can accept all changes and then the change tracking record will all gone from the doc only leaving the final draft. This is different from only showing the final draft. I actually want to delete all tracking record at some point to progress to next version. So that you can start change tracking again and only show those "new" changes. I know there are version control systems, but majority of my collages do not like them. Is there any possible solution? I feel if some pre-compile user-command can be supported this is possible. Here is what I mean: How to let latex only run one user defined command and save the ouput to a tax file


title: table of contents entries and formating

text: I am working on a thesis and I am having some problems with the table of contents. I have tried to make a minimal example and the LaTeX files are given at the end of this post. The main tex file is `main.tex`. I have an introduction called `intro.tex` and an appended Paper A called `paperA.tex`. When you will compile and look at the resulting ps or pdf file, the first page shows the table of contents and you will note that I have used wide margins and so the text area becomes small. The chapter names appear very big. This is so because for example I have the Introduction in the file `intro.tex` titled using               \chapter{\huge \bfseries Introduction}      (I want to have this big size on my first page in the introduction section). My questions (ALL referring to the Table of contents):   1. How can I make the size of the titles such as "Introduction" smaller without affecting the text size in the corresponding file (`intro.tex` for the introduction)   2. I've added a `\addtocounter{chapter}{-1}` in part preceding “`\include{paper1}`”. This is because my first chapter uses arabic numbering and the paper A that comes afterwards uses alphanumeric numbering. If I did not put the command the `\addtocounter{chapter}{-1}`, then Paper A would have had sections as B.1, B.2 etc. which would be wrong. My question is if using `\addtocounter{chapter}{-1}` is the right prcedure here.   1. (should be question number 3) I have a page separation for the paper A on page 4 in the pdf file (page number is hidden on that page). How can I make this page through its title appear in the Table of Contents? Here are the codes: I. The main file `main.tex`               \documentclass[fleqn,a4paper,openany,twoside,12pt]{book}     \usepackage[top=5.5cm,left=45mm,right=45mm,bottom=5.5cm]{geometry}     \usepackage[latin1]{inputenx}     \usepackage[OT1]{fontenc}               \begin{document}     \newpage{\pagestyle{empty}}     \tableofcontents          \newpage     \pagenumbering{arabic}     \setcounter{page}{1}          \begingroup     \renewcommand\chaptername{Chapter}     \renewcommand{\thechapter}{\arabic{chapter}}     \renewcommand{\thesection}{\arabic{section}}%     \include{intro}     \endgroup          \newpage     \thispagestyle{empty}     \vspace*{\stretch{1}}     \begin{center}     \textsc{\LARGE Paper A}\\[10mm]     {\Huge \bf Duis tristique faucibus tincidunt. Duis ante mauris, vehicula   \\[5mm]}     \ \\     \label{PaperA}     \ \\     \end{center}     \vspace*{\stretch{2}}          \newpage     \begingroup     \addtocounter{chapter}{-1}     \renewcommand\chaptername{Paper}     \renewcommand{\thechapter}{\Alph{chapter}}     \renewcommand{\thesection}{\thechapter.\arabic{section}}%     \include{papera}     \endgroup     \end{document}      II. The file `intro.tex` for the introduction               \chapter{\huge \bfseries Introduction}          \section{first section}     Lorem ipsum dolor sit amet, consectetur adipiscing elit.       III. The file `papera.tex` for the first paper (Paper A)               \chapter{\huge \bfseries Lorem ipsum dolor sit amet, consectetur adipiscing elit}          \section{first section}     Maecenas dapibus arcu sit amet mauris porttitor lacinia.       Thanks a lot...


title: Global "ragged right" justification of report

text: I don't want my report justified. I want it `\raggedright`. I added a \begin{raggedright} / \end{raggedright} pair around the whole document, and it is working, but I'm wondering if I can somehow include the directive at the document level (without having to enclose the entire document like that! Feels awkward.)


title: How to reference subfigure in caption

text: I used to have code like this: `\caption{In \subref{fig:foo:a} you can see...}`. Now I switched to using memoirs `subtop/subbottom` command instead of `\subfigure`. How can I refer to that subfigure? As a temporary step I changed `\subref` to `\autoref` but that results in output like "In 1.1a you can see... ", I want "In (a) you can see...".


title: How can I have a verbatim text in specific sized box?

text: I am trying to typset the following               \resizebox{0.95\textwidth}{!}{%      \begin{verbatim}       require( "lattice" )       require( "grid" )      \end{verbatim}     }      I have a lot more to add to this box, and it needs to be typset `verbatim`, but it gives me an error. Am i doing something wrong.


title: How to make the reference label start with a capital letter?

text: I have the following lines in my document:               In \secref{2}, a very basic review is presented. \secref{3} compares different structures.      `\secref{3}` must start with a capital letter. However, LaTeX makes it start with its ordinary label "section" (with a small "s"). How can I correct this? PS: It does not need to be automatic. Any particular (manual) solution is fine for me.


title: LaTeX algorithmic package: Undefined Control Sequence in for-Loop

text: I'm trying to specify an algorithm in pseudocode in a LaTeX document, but I'm having trouble with the for-Loop. My statement:               \for{$bin=0 to binCount$}     \item blablabla     \endfor      keeps on generating the error **"Undefined Control Sequence"**. I also tried the usual for-notation (`bin=0;bin<binCount;bin++`).   I have not defined any of the variables before, nor do I want to do that; I just want LaTeX to print exactly what I'm writing in an algorithm layout. **Is there a way to "switch off" this sort of code interpretation? What exactly am I doing wrong?** Add'l information: I have stated bot the algortihm and `algorithm` environment. Without this for-Loop, it generates the document without any errors. The `\item` statement is just a filler.


title: Figure preview wrapper

text: How do I best preview my figures? I have one file with this:               \begin{figure}      \begin{tikzpicture}  %if tikz      ...      \end{tikzpicture}      \includegraphics{...}  %if eps      \caption{...}      \label{fig:..}     \end{figure}      and I can use it in my papers with `\input{...}`, but to preview my figure, I need some compilable wrapper like this:               \documentclass[a4paper]{article}     \pagestyle{empty}     \usepackage{tikz}     \begin{document}      \input{FIGURENAME}     \end{document}      Is there a way to write this wrapper in a way, so it can be used for all my figures? or is there a better way to do this? shellscript?


title: Multiple doi, url, and eprint entries in biblatex

text: I'm in the process of writing a `biblatex` style file to support the on-line journal Theory of Computing. The journal has been using BibTeX for years, and I am looking forward to the flexibility `biblatex` offers. **The difficulty** : Our bibliographic entries typically need to refer to _multiple_ dois, urls, or eprint entries. (Why? We often link to "preliminary" versions of an article, typically a conference article or an arXiv preprint.) My first question is a bit of a meta-question: what's the nicest approach? Two approaches come to mind; I don't have enough experience with `biblatex` to decide which one to pursue. ## Approach 1 _Arrange for biblatex to "natively" handle multiple dois, urls, eprints, etc._ Specifically, it would be nice to permit a record to have several fields of the form               doi = {first-doi},     doi = {second-doi},     ...      and               url = {first-url},     url = {second-url},     ...      The idea would be that each of these produces its own output: DOI: _first-doi_ , DOI: _second-doi_ , etc. Is this within easy reach? Of course, the idea of processing multiple eprint entries seems problematic, since an `eprint` field is typically coupled with other "helper" fields such as `eprinttype`. (Incidentally, supporting two eprint fields seems like something that one might wish to do in many other natural circumstances, such as where a paper has both a MathSciNet entry _and_ a DOI). ## Approach 2 Given the problem with even parsing multiple eprint fields, another possibility would be to add a number of new fields:   * `prelim-doi`   * `prelim-eprint`   * `prelim-url`   * `prelim-manuscript` These are to be printed right after the regular `doi`, `eprint`, and `url` entries (for a journal, say). Specifically, I would like output along the lines of:               Preliminary versions: DOI: ..., eprint: ..., URL: ..., Manuscript: ... .      Handling of DOI, eprint, and URL should be just like the corresponding "regular" fields (in particular, I would like `prelim-eprint` to inherit the same eprint handlers that exist for `eprint`). Manuscript should be handled just like `eprint` as well (again with the same handlers). (If you are wondering why we need both `prelim-eprint` and `prelim-manuscript`, this is because we often need to cite both a preliminary conference version, using eprint, and also a preliminary arXiv version.) ## My first attempt (for approach 2) To get my feet wet, I tried the following (in a `.bbx` file):               \DeclareFieldFormat{prelim-doi}{%       \mkbibacro{DOI}\addcolon\space       \ifhyperref         {\href{http://dx.doi.org/#1}{\nolinkurl{#1}}}         {\nolinkurl{#1}}}          \newbibmacro*{prelim-doi+eprint+manuscript+url}{%       \iftoggle{bbx:doi}       {\printfield{prelim-doi}}       {}}          \renewbibmacro*{doi+eprint+url}{%       \iftoggle{bbx:doi}       {\printfield{doi}}       {}%       \newunit\newblock       \iftoggle{bbx:eprint}       {\usebibmacro{eprint}}       {}%       \newunit\newblock       \iftoggle{bbx:url}       {\usebibmacro{url+urldate}}       {}%       \iftoggle{bbx:preliminary}       {\usebibmacro{prelim-doi+eprint+manuscript+url}}       {}}      This uses a toggle called `bbx:preliminary` and was just intended to handle printing preliminary dois (to get started). However, it never seems to print anything (even for a record with a `prelim-doi` field). Is there something fancy I need to do to tell `biblatex` about the new fields? (Incidentally, this little `.bbx` file is essentially just loaded over Marco Daniel's trad- plain style (see How to emulate the traditional BibTeX styles (plain, abbrv, unsrt, alpha) as closely as possible with biblatex?), since our traditional bibliography style is not far from BibTeX's `plain` style.)


title: How would (La)TeX be different if it had been created recently?

text: If Knuth/Lamport/anyone else had created a typesetting system with the flexibility and power of TeX, using everything we have learned about computation and programming languages in the last 35 years, in what ways would it differ from TeX? (Note that I'm asking what differences would exist from a user's perspective, rather than in the source code itself.)


title: How do I put special characters in a section title?

text: I'd like to name my (sub-sub-)section "Something something β something." When I try               \subsubsection{Something something $\beta$ something}      it shows up exactly like that: with the dollar signs, unformatted. How do I fix this?


title: Lipsum text generator for an index

text: Is there something like `lipsum` package but for generating an index?


title: Recover scaling factor in TikZ

text: Does it exist some tikz register (let say \zoomfactor) that provides the curent scale factor. For example can I do something like :               \begin{tikzpicture}[scale=2]         \begin{scope}[scale=1.5]             \draw (0,0) circle (\zoomfactor);         \end{scope}     \end{tikzpicture}      and to obtain circle of size 3=2*1.5 ?


title: when is Implementation of example into LATEX2e?

text: **When the write into texwork the following :**                \begin{algorithm}[H]     \SetAlgoLined     \KwData{this text}     \KwResult{how to write algorithm with \LaTeX2e }     initialization\;     \While{not at end of this document}{     read current\;     \eIf{understand}{     go to next section\;     current section becomes this one\;     }{     go back to the beginning of current section\;     }     }     \caption{How to write algorithms}     \end{algorithm}      **error occurs:** This is LuaTeX, Version beta-0.76.0-2013062820 (rev 4627) I can't find the format file `miktex-luatex.fmt'! What is the reason? Please .... Do I find help??


title: How to access i'th argument of a macro?

text: How can I access the i'th argument of a `\newcommand` declaration via an iteration variable? Assume I want a command `\foo` like:               \newcommand{\barr}[1]{argument 1 is: #1}          \newcommand{\foo}[6]{         \foreach \i in {1,...,6}             \barr{#\i}; %this does not work. \barr{#1}, \barr{#6} do work     }      EDIT: As requested a bit of background. I want a command like `\foo{1}{2}{5}{0}{1}{2}` to paint 1 ball in the first section, 2 in the second, 5 in the third and so on. Everything works fine, the only thing I was missing was to access the i'th parameter in a convenient way.


title: Problem regarding Errors after Theoremdefinition using thmtools

text: I am currently hunting for errors in my template and these two I cannot solve after reading the log and researching: First:               ! Argument of \strip@prefix has an extra }.     <inserted text>                      \par      l.60                postheadspace=\newline]{mystyle}      Second:               ! Paragraph ended before \strip@prefix was complete.     <to be read again>                         \par      l.60                postheadspace=\newline]{mystyle}      Minimal example:               \documentclass[a4paper, 12pt, oneside]{book}                  \usepackage{amsthm}             \usepackage[unq]{unique}             \usepackage{thmtools}             \declaretheoremstyle[                     numbered=unless unique,                     %within=chapter,                     headpunct={},                     shaded,                     spacebelow=\parsep,                     spaceabove=\parsep,                     notefont=\normalfont\itshape,                     bodyfont=\itshape,                     postheadspace=\newline]{mystyle}             \declaretheorem[                     style=mystyle,                     name=Theorem,                     refname={theorem,theorems},                     Refname={Theorem,Theorems}             ]{FF}                  \usepackage{hyperref}                  \usepackage{cleveref}              \crefname{FF}{Theorem}{Theorems}             \Crefname{FF}{Theorem}{Theorems}          \begin{document}          \begin{FF}\label{ff1}     Test     \end{FF}          Link to \Cref{ff1}.          \begin{FF}\label{ff2}     Test2     \end{FF}          \end{document}


title: LaTeX3: \dim_eval:n and e-TeX dimension expression

text: Why does the following code not yield the expected result `264pt`? Are non- integers not allowed as factors in e-TeX dimension expressions?               \documentclass{article}     \usepackage{expl3}          \begin{document}          \ExplSyntaxOn          \tl_set:Nn\l_dimen_tl{120pt}     \tl_set:Nn\l_mult_tl{2.2}     \tl_set:Nx\l_result_tl{\dim_eval:n{\l_dimen_tl*\l_mult_tl}}          \l_result_tl %gives 240.0pt.2          \ExplSyntaxOff          \end{document}


title: How to use the volumes package?

text: I need to split a book in two volumes, the problem is that I need the table of contents and the index of the whole book in each volume. I already tried to use the package `volumes` but I can't make it work.               \usepackage{volumes}     \onlyvolume      And according to the documentation I should put `\volumeone` and `\volumetwo` but after installig the package these commands are not recognized.


title: How can I create full page table with varying column widths?

text: Concretely, this is what I want to do as described in this picture. Create two columns, one of larger width and spanning the whole page. I understand there is multicolumn but I can't seem to make it use.


title: Pagefilling pictures resulting in blank page before the next chapter

text: I've got a question in regards to pictures and chapters. It happened a few times now to me (like in the example below) that I have 1 or 2 pictures that fill up a page that suddenly the chapter following the picutre is not on the next page but one page after the next page (resulting in it being this order: Picture, Empty page, Chapter). Now what would interest me is why is there time and again (example is below for one such occurance) this situation the case and what can I do to avoid this?               \documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof,parskip=full]{scrbook}     \usepackage{etoolbox}     \makeatletter     \renewcommand{\chapterheadstartvskip}{\vspace{0pt}}     \renewcommand{\chapterheadendvskip}{\vspace{\baselineskip}}     \patchcmd{\section}{-3.5ex \@plus -1ex \@minus -.2ex}{-\z@}{}{}      \patchcmd{\section}{2.3ex \@plus .2ex}{1sp}{}{}      \patchcmd{\subsection}{-3.25ex\@plus -1ex \@minus -.2ex}{-\z@}{}{}     \patchcmd{\subsection}{1.5ex \@plus .2ex}{1sp}{}{}     \patchcmd{\subsubsection}{-3.25ex\@plus -1ex \@minus -.2ex}{-\z@}{}{}     \patchcmd{\subsubsection}{1.5ex \@plus .2ex}{1sp}{}{}     \patchcmd{\@xsect}{\ignorespaces}{\vspace*{-.5\baselineskip}\ignorespaces}{}{}     \makeatother          \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{booktabs}                 \usepackage{multicol}                 \usepackage[usenames,svgnames, dvipsnames]{xcolor}          \usepackage{hyperref}     \begin{document}     \twocolumn     \raggedright     \null\vfill     \hspace*{-3cm}\includegraphics[width=\paperwidth]{chart_part1.jpg}     \hspace*{-3cm}\includegraphics[width=\paperwidth]{chart_part2.jpg}     \vfill\null     \chapter{Forms of the dragons}     Test1     \end{document}      As note: The pics are not tall enough to fill the entire page so thhey are centered on the page without filling it completely. Edit:trying out Werners answer I still have the prob with teh 2 pics. 1 blank page in between the pics and the chapter.                \clearpage     \mbox{}% Just to put something on the page     \AddToShipoutPictureFG*{%       \AtPageCenter{%         \begin{tabular}{@{}c@{}}           \makebox[0pt]{\includegraphics[width=\paperwidth]{chart_part1.jpg}} \\           \makebox[0pt]{\includegraphics[width=\paperwidth]{chart_part2.jpg}}         \end{tabular}%       }%     }     \clearpage     % \null\vfill     % \hspace*{-3cm}\includegraphics[width=\paperwidth]{chart_part1.jpg}     % \hspace*{-3cm}\includegraphics[width=\paperwidth]{chart_part2.jpg}     % \vfill\null     \chapter{Forms of the dragons}     Dragons despite being      tried to remove the 2nd clearpage but no effect there


title: Design size mismatch warning when using the eco package

text: I'm using the `eco` package and am getting the following warning:               design size mismatch in local font ecrm2074 in virtual font ecorm2074.vf ignored.      when compiling the following MWE:               \documentclass{book}     \usepackage{eco}          \begin{document}       {\huge This causes a warning}     \end{document}      the warning goes away if I don't use `\huge` (or `eco`). Any ideas as to how I can get rid of it?


title: Moving BibTeX References to the same Margin as the Rest of the Text

text: When I do BibTeX references using the `alpha` style, they are slightly shifted to the left from the rest of the text. How can I align them with the document body? * * *               \documentclass[12pt,headings=normal]{article}     \usepackage{amsfonts, amsmath, amssymb}     \usepackage[margin=1in]{geometry}     \usepackage[hebrew,english]{babel}     \usepackage{general}     \begin{document}     We see \cite{hs}.     \bibliographystyle{alpha}     \bibliography{references}     \end{document}       My BibTeX file has this:               @ARTICLE{hs,       AUTHOR = {Yonatan Harpaz and Tomer Schlank},       TITLE = {Homotopy Obstructions to Rational Points},       YEAR = {2011},       NOTE = {arXiv:1110.0164 [math.AG]},     }


title: How can I reduce the line spacing in references?

text: I am trying to reduce the spacing in between the references to save some space. However, I couldn't do it by myself. I am using the `article` class, and a portion of my code is as follows:               \documentclass[9pt]{extarticle}     \providecommand{\keywords}[1]{\textbf{\textit{Index Terms---}} #1}     \usepackage{spconf,amsmath,graphicx}     \usepackage{epstopdf}               \usepackage{graphicx}     \usepackage{color}     \usepackage{placeins}     \usepackage{float}     \usepackage{tabularx,colortbl}     \usepackage{amssymb} % \in     \usepackage{amsmath} % For align command     \usepackage[breaklinks=true]{hyperref}     \usepackage{setspace}     \usepackage{cite}     \usepackage{subfigure}          \begin{document}     Huuuuuuuuuuuuuuuuuuu!!          \bibliographystyle{IEEEbib}     \bibliography{references}          \end{document}      How can I manage to reduce the line spacing in reference section? Thanks in advance.


title: Increasing vertical distance between bibliography items

text: Numeration in the bibliography looks like               1. Book1     2. Book2      I want to change it to               [1] Book1     [2] Book2      Also, I would like to increase a space between separate item. I'm using the `\begin{thebibliography}` command:               \begin{thebibliography}{45}     \bibitem{} Book1     \bibitem{} Book2     \end{}


title: Uppercase until end of group

text: In LaTeX, all font commands have two versions, one requires an argument (`\textbf`, `\textit`, `\textsc` etc), other changes the font until the end of group (`\bfseries`, `\itshape`, `\scshape` etc). The latter is especially useful when defining fonts for some auto-generated text in some package or class file. For example, with the memoir class:               \captionnamefont{\small\scshape}      or               \renewcommand*{\chapnamefont}{\Large\sffamily\bfseries}     \setsecheadstyle{\Large\sffamily\raggedright}      However, now I need a similar command for making text uppercase. `\MakeUppercase` requires an argument, but I don't know if there is a solution to make all text uppercase until end of a group, so that I could do something like:               \captionnamefont{\small\bfseries\lsstyle\MakeUppercaseUntilEndOfGroup}      In the event of no such command exists, to make this specific case work, I think I need to patch some internal memoir commands, something like this:               \makeatletter     \renewcommand{\fnum@figure}[1]{\small\bfseries\lsstyle\lsstyle\MakeUppercase{\figurename~\thefigure}\quad}     \makeatother      However this is rather inelegant and limited; besides the fact that for other commands such as `\setsecheadstyle` this would have to be duplicated, even for floats, only captions for _figures_ are changed. I also have tables and other custom float types defined by the `\newfloat` command. Then is it possible to simply define this new style for every kind of floats in my document? I suppose there is some code that creates new float types and maybe that should be patched...


title: Is it possible to store an array generating by foreach?

text: For example, I want to get an array with values `sin(1),sin(2),..,sin(100)` and store it to an variable. Is there a way to get this result by using `foreach` ? EDIT: A more complicated example: Drawing 100 random points `{(1,rnd),(2,rnd),...,(10,rnd)}` and then drawing the distances from these points to their mean value. I have no idea how to implements it in tikz, here is the pseudocode:               yarray = {}   //an array to store 100 random value     sum    = 0     for i = {1...100}        yarray[i] = random        sum = sum + yarray[i]     mean = sum/100     absarray = {}  //an array to store the distance from points to mean     for i = {1...100}        absarray[i] = abs(yarray[i]-mean)          // draw the image     for i = {1...100}        \fill (i,yarray[i]) circle (2pt)        \fill (i,absarray[i]) circle (2pt)


title: How to rotate a node and text independently in Tikz

text: How can I rotate the `text` inside a `node` independent of the `node` in `tikz`? Right now I am using the `rotatebox`. The other option I tried was to have two overlapping nodes. Is there a better way to do this?               \documentclass{standalone}     \usepackage{tikz}         \usetikzlibrary{shapes.geometric}   % For trapezium     \usepackage{rotating}                   % For rotatebox     \begin{document}     \begin{tikzpicture}     % Text orientation is wrong     \node[draw, trapezium, rotate=-90, minimum height=1.2cm, trapezium stretches body] at (1,1.5) {Component};     % Method 1 using rotatebox     \node[draw, trapezium, rotate=-90, minimum height=1.2cm, trapezium stretches body] at (3,1.5) {\rotatebox{180}{Component}};     % Method 2 overlapping nodes     \node[draw, trapezium, rotate=-90, minimum height=1.2cm, trapezium stretches body, text=white] at (5,1.5) {Component};     \node[trapezium, rotate=90, minimum height=1.2cm, trapezium stretches body] at (5,1.5) {Component};     \end{tikzpicture}     \end{document}      ![Getting text orientation right](http://i.stack.imgur.com/HO9uc.png)


title: Using multiple \multicolumn in a table

text: I'm trying to create a table with 2 sets of data, each with the same type of measurements:               \begin{tabular}{cccc}     \hline     \multicolumn{2}{c}{Set A} \\     \cline{1-2}     \multicolumn{2}{c}{Set B} \\     \cline{3-4}     Weight& Diameter    & Weight &Diameter      \\     \hline     \end{tabular}      This code correctly places `Set A` over columns 1 and 2, but then it places `Set B` directly below `Set A`, also over columns 1 and 2. I cannot figure out how to specify which 2 columns that I want merged as the code just merges the first 2 (or 3, or however many are specified). My second question is how to have separate `\cline`'s. I would like one to go over columns 1 and 2, and a distinct one to go over columns 3 and 4. Right now, they merge and I just see one line as if I had done `\hline`. This can be seen by commenting out `\multicolumn{2}{c}{Set B} \\\` **Edit. May I ask how would I 'shift' the `\multicolun`'s? For example, if I had a common first row of dates, which neither `Set A` nor `Set B` should span, meaning `Set A` should span columns 2-3, and `Set B` should span columns 4-5.


title: Cursive lowercase ell

text: What is the easiest way to make a cursive lowercase ell in latex math mode?


title: Index: Repeat first-level item on new column/page?

text: In my family history book, I'm using a two-level index. First level is surname, and second level is given name. Index items are defined such as the following:               \index{Doe!John}      Often a first-level will contain many second-level items (one surname, many given names). When the second-level overflows to a new column or page, I would like to repeat the first-level item. Is this possible? Here is an example of the default behavior: Column 1:               Doe         John, 3, 6, 9         Melvin, 6, 14, 18         Sally, 24, 32      Column 2:                   Timothy, 11, 15, 27         Victor, 5     Smith         Gary, 7, 18      Here is what I would like to see: Column 1:               Doe         John, 3, 6, 9         Melvin, 6, 14, 18         Sally, 24, 32      Column 2:               Doe (continued)         Timothy, 11, 15, 27         Victor, 5     Smith         Gary, 7, 18      Note the "Doe (continued)" at the start of column one. This combines re- showing the level-one name, and appending text to it. Is this possible? Edit: Here is a minimum working example.               \documentclass[a4paper]{article}          \usepackage[paperwidth=8.5in,paperheight=3in]{geometry}          \usepackage{makeidx}     \makeindex          \begin{document}          Some text.          \index{Jones!Alvin}     \index{Jones!Billy}     \index{Jones!Carter}     \index{Jones!Dennis}          \index{Smith!Alex}     \index{Smith!Brian}     \index{Smith!Carrie}     \index{Smith!Dewey}     \index{Smith!Eric}     \index{Smith!Frank}     \index{Smith!Gary}     \index{Smith!Huey}     \index{Smith!Irma}     \index{Smith!Joey}     \index{Smith!Kevin}     \index{Smith!Louie}     \index{Smith!Martin}     \index{Smith!Ned}     \index{Smith!Opal}     \index{Smith!Paul}     \index{Smith!Quincey}     \index{Smith!Rosie}     \index{Smith!Steven}     \index{Smith!Thomas}          \index{White!Alice}     \index{White!Barney}          \printindex          \end{document}      I run it through the following:               pdflatex MWE.tex     makeindex MWE.idx     pdflatex MWE.tex       This produces a PDF where the index has "Smith" names across columns one and two on page one, and in column one on page two. I'd like to have page one, column two and page two, column one both begin with "Smith (continued)", but have yet to find any way to accomplish this.


title: Only-Quote page after abstract page?

text: I want a quote-page after my abstract in my document. No numbering, no header, just the plain quote plus source. Howto? My main file (the file is named 'slogan' in here):               \documentclass[         12pt,         a4paper,         bibtotoc,         cleardoubleempty,         idxtotoc,         ngerman,         openright         final,         listof=nochaptergap,         ]{scrbook}          \input{src/settings}          \begin{document}          \setcounter{secnumdepth}{3}          \include{src/title}     \cleardoubleemptypage          \frontmatter          % Abstract     \include{src/abstract}     \cleardoubleemptypage          \include{src/slogan}     \cleardoubleemptypage          \tableofcontents     \addcontentsline{toc}{chapter}{Table of contents}     \cleardoubleemptypage          % ...      The slogan file, by now:               \vspace*{\fill}     \begin{center}         \begin{quote}             % quote         \end{quote}     \end{center}     \vfill


title: Avoiding "rivers" in successive lines of type

text: > **This question led to a new feature in a package:**   >  `impnattypo` The following quote is from James Felici, _The Complete Manual of Typography_ (2003), p. 161: > Rivers occur when word spaces stack one above the other in successive lines > of type, creating the appearance of fissures running through the text [...]. > Rivers are accidents of composition, and software isn't yet smart enough to > detect them, much less do anything about them. On the following page, Felici shows an example of a "mighty river" running through a paragraph. Below, you'll find the LaTeX code and the pictured output of my (somewhat abridged) recreation of Felicis example. (The layout is chosen so that the effect also occurs if one uses the `microtype` package with its default settings.)               \documentclass{article}          \usepackage{mathptmx}     \usepackage{microtype}          \textwidth 247pt     \parindent 23pt     \frenchspacing          \begin{document}          Though the Pearl measures less than 50~miles in total length from its     modest source as a cool mountain spring to the screaming cascades and     steaming estuary of its downstream reaches, over those miles, the     river has in one place or another everything you could possibly ask     for. You can roam among lush temperate rain forests, turgid white     water canyons, contemplative meanders among aisles of staid aspens     (with trout leaping to slurp all the afternoon insects from its calm     surface), and forbidding swamp land as formidable as any that Humphrey     Bogart muddled through in \emph{The African Queen}.          \end{document}      ![alt text](http://i.stack.imgur.com/F7GXD.jpg) So, was Felici right that "software isn't yet smart enough" to deal with rivers? Or is this something TeX can handle? And if not TeX, then possibly LuaTeX? EDIT: As rassie pointed out that TeX is Turing-complete, let me clarify that I'm interested in solutions that either already exist or could be implemented with reasonable time and effort.


title: Writing manpage / reference manual for software in LaTeX

text: Is it a good idea to write your software manual pages (manpages) / reference manuals using TeX? I'm new to TeX and exploring my options around this. I'd be able to deliver a manpage.pdf along with the sources, but I'd also like to put them online. Not only in PDF format, but also as HTML or within a MediaWiki. Is this possible? And how? What would be a good template / example to start with? Any .sty file to add manpage functionality? Thank you


title: How do I specify color in RGB using \hypersetup in hyperref?

text: How do I specify color in RGB using `\hypersetup` in `hyperref`? I know that this is the right way to do it with color names:               \hypersetup{colorlinks,breaklinks,                 urlcolor=Maroon,                 linkcolor=Maroon}      But I want `Teal`, which `hyperref` doesn't recognize. I know `Teal = {0 128 128}` in RGB, but the following code won't compile:               \hypersetup{colorlinks,breaklinks,                 urlcolor={0 128 128},                 linkcolor={0 128 128}}      I have tried it with comma separators, proportional values (e.g. `0 < x < 1`), but to no avail. What is the right way to do it? Also mention the correct `texdoc` that I should read for further info.