title: Prepending "Chapter" except for appendix entry, and other requirements

text: A more apt title to this is question may be "Jumping through hoops". My question is similar to this one. I have the following requirements for the table of contents in my thesis:   1. The title "Table of Contents" must be centered   2. Every chapter, section, subsection, and appendix must have dots between the chapter/section/etc name and the page number   3. The chapters must start out "Chapter #" for each entry in the ToC. Following the second answer in the link above, I can get all three of these requirements using Tocloft, however it also puts "Chapter Appendix" which is not correct (see MWE below). Following the first answer, I no longer have this problem, but I can't get #2: there are no dots between the chapter name and the page number. Looking at the documentation for titletoc, it doesn't seem possible to include them (but maybe I'm missing something). I would like to satisfy all three requirements but not have "Chapter Appendix". I am willing to use any package(s) to meet these. MWE:               \documentclass{report}     \usepackage{titlesec,tocloft,calc}          \renewcommand{\cftchappresnum}{Chapter }     \AtBeginDocument{\addtolength\cftchapnumwidth{\widthof{\bfseries Chapter }}}     \renewcommand\cftchapdotsep{\cftdotsep}     \renewcommand{\contentsname}{\vspace*{-1.75in}\hfill\bfseries\Large Table of Contents\hfill}        \renewcommand{\cftaftertoctitle}{\hfill}          \begin{document}     \tableofcontents          \chapter{Asdf}     \section{Foo}     \chapter{Jkl;}     \section{Bar}          \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}     \titleformat{\chapter}[display]{\centering\Huge\bfseries}{\thechapter}{0pt}{}     \appendix     \renewcommand{\thechapter}{}     \begin{chapter}{APPENDIX}     \renewcommand{\thechapter}{A}     \end{chapter}     \addtocontents{toc}{\protect\setcounter{tocdepth}{2}}     \end{document}


title: Page Number of Middle references in Multiple References not listed

text: When I have multiple references:               blah blah \cite{ref1, ref2, ref3}      then ref2 will not be listed on this page in my bibliography. Instead it just has > -> pages with no page listed if I did not cite that reference anywhere else. In the PDF text it will show up as > [1-3]


title: splitting by using & \qquad

text: \epsilon ^7 \left(g_7 \phi _1^7+6 g_6 \phi _1^5 \phi _2+10 g_5 \phi _1^3 \phi _2^2     + 4 g_4 \phi _1 \phi _2^3+5 g_5 \phi _1^4 \phi _3+12 g_4 \phi _1^2 \phi _2 \phi _3      + 3 g_3 \phi _2^2 \phi _3+3 g_3 \phi _1 \phi _3^2+4 g_4 \phi _1^3 \phi _4     + 6 g_3 \phi _1  \phi _2 \phi _4  +2 g_2 \phi _3 \phi _4+3 g_3 \phi _1^2 \phi _5     + 2 g_2 \phi _2 \phi _5+2 g_2 \phi _1 \phi _6+\phi _7\right)      I need to split the above line and I did using & \qquad , but didn't run . I think the problem arised because, I used \ within bracket.               \epsilon ^7 \left(g_7 \phi _1^7+6 g_6 \phi _1^5 \phi _2+10 g_5 \phi _1^3 \phi _2^2 \\      & \qquad +4 g_4 \phi _1 \phi _2^3+5 g_5 \phi _1^4 \phi _3+12 g_4 \phi _1^2 \phi _2 \phi_3+\\     & \qquad3 g_3 \phi _2^2 \phi _3+3 g_3 \phi _1 \phi _3^2+4 g_4 \phi _1^3 \phi _4+6 g_3 \phi _1 \phi _2 \phi _4  + \\     & \qquad 2 g_2 \phi _3 \phi _4+3 g_3 \phi _1^2 \phi _5+2 g_2 \phi _2 \phi _5+2 g_2 \phi _1 \phi _6+\phi _7\right)


title: How can I add automatic consistency tests for formulas in my paper?

text: Let me start with an analogy: In test driven software development, you craft a couple of tests that describe what your program is supposed to do. When introducing a new feature, you start with a test that describes it, and then implement the feature that's supposed to satisfy that test, while not breaking any other existing tests. Now when writing a paper in LaTeX that involves mathematical formulas, I find myself in the following situation: I might write an early draft based on some calculations that I did on paper or in a Computer Algebra System (CAS). Later, I want to modify some equations, e.g. generalize them. To ensure other equations derived from the modified ones are still correct -- or to modify them, too -- I need to look up my initial calculations, e.g. find the sheet(s) of paper on which I did them, or the CAS file containing them, or, if I can't find them anymore (as it happens), do my entire calculations again. Now one way to tackle this might just be tidying up my notes ;-) but ideally, I'd like to have automatic tests that ensure e.g. equation (14) follows from (10) and (12) with `a` set to `b^2`, so that if I modify (10), I'm notified that (14) breaks. That way, I would know that I'd also need to modify (14) (or something else it's based on), and when I think I've fixed it, rerun my tests. Is there an easy way to achieve this? Do people write entire papers in a CAS like Maple or Mathematica (which I've personally never used much) to allow for such a workflow? Personally, I'm writing my papers with LyX, so I'd prefer a solution that integrates with that. For calculations, I'm using paper and pencil, and SymPy for the occasional matrix multiplication, but currently, my SymPy files end up rather chaotic with time, which is one of the reasons why I'm looking for a better workflow.


title: Drawing a Zero Pole plot

text: I'm trying to draw a zero-pole plot for use with some filter design. Since i couldn't find any standard way to go about this, I tried using the polar library of PGFPlots. I'm having some trouble, however. The first plot i did turned out decently, with only poles in it. When i try to add some zeros though, its missing part of the marker used to denote the position.               \begin{tikzpicture}     \begin{polaraxis}[enlargelimits=false, % axis x line = bottom, axis y line=right,     % height=5cm, width=5cm,      ytick={1}, %axis y line*=none,      yticklabels={},     xtick={0,45,90,135,180,225,270,315,360},     %xticklabels={},     %separate axis lines=true,     every outer x axis line/.append style={color=red, opacity=0, fill opacity=0},     every outer y axis line/.append style={color=red, opacity=0, fill opacity=0},     xticklabels={0,     $\frac{2\pi}{8}$,     $\frac{4\pi}{8}$,     $\frac{6\pi}{8}$,     $\frac{8\pi}{8}$,     $\frac{10\pi}{8}$,     $\frac{12\pi}{8}$,     $\frac{14\pi}{8}$}     ]         \addplot+[data cs=polarrad,mark options={color=black, mark=o}] coordinates{(0,0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=o}] coordinates{(2*pi/8,0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=o}] coordinates{(4*pi/8,0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=o}] coordinates{(6*pi/8,0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=o}] coordinates{(8*pi/8,0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=o}] coordinates{(10*pi/8,0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=o}] coordinates{(12*pi/8,0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=o}] coordinates{(14*pi/8,0.9564)};              \addplot+[data cs=polarrad,mark options={color=black, mark=asterisk}] coordinates{(0,2-0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=asterisk}] coordinates{(2*pi/8,2-0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=asterisk}] coordinates{(4*pi/8,2-0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=asterisk}] coordinates{(6*pi/8,2-0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=asterisk}] coordinates{(8*pi/8,2-0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=asterisk}] coordinates{(10*pi/8,2-0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=asterisk}] coordinates{(12*pi/8,2-0.9564)};         \addplot+[data cs=polarrad,mark options={color=black, mark=asterisk}] coordinates{(14*pi/8,2-0.9564)};         \addplot+[data cs=polarrad,mark options={fill opacity=00, opacity=00, mark=*}] coordinates{(0,1)};     \end{polaraxis}     \end{tikzpicture}      After some testing it seems i get at problem whenever i go above 5 markers. Anything above that, and some of them don't get rendered properly. Edit: It was a problem with linestyling. I didn't explicitly set it to solid, so it changed after a while. Fixed it now.


title: What is the scope of elements of TikZ pictures?

text: I understand that named elements of a `tikzpicture` cannot be referenced before they are defined; but I'm confused about how "long" a named element persists. It appears that once named, an element continues to exist, even _in (subsequent) pictures that do not contain the element_. For example, the code               \draw[bluearrow](e)--(r);      generates the expected "undefined element" error if used prior to the definition of 'e' and 'r', but once I create a picture containing code that defines these elements, subsequent figures containing exactly the code above will no longer produce an error, and will instead draw the requested arrow, between the locations in that figure corresponding to the locations of 'e' and 'r' in the original figure in which they were defined: ![enter image description here](http://i.stack.imgur.com/M7zDf.png) What is the default scope of `tikzpicture` element names? Is there a way to control their scope? The (apparent) default behavior seems likely to produce hard to debug behavior in figures. * * *               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{arrows}     \usetikzlibrary{petri}          \begin{document}          \tikzset{         bluearrow/.style={->, blue, fill=none,>=stealth', thick},         state/.style={circle,draw=black,inner sep=0pt,minimum size=7mm,label=center:$#1$,name=#1}}          \begin{center}          % This fails here ...     %\begin{tikzpicture}     %\draw[bluearrow](e)--(a);\draw[bluearrow](a)--(a^2);\draw[bluearrow](a^2)--(a^3);\draw[bluearrow](a^3)--(e);     %\end{tikzpicture}          \begin{tikzpicture}     \def\nodes{0/{e},1/{r},2/{r^2},3/{r^3}};\def\dim{4};     \foreach \n\lab in \nodes{         \node[state={\lab}]at({cos(90+\n*(360/\dim))},{sin(90+\n*(360/\dim))}){};}     \draw[bluearrow](e)--(r);\draw[bluearrow](r)--(r^2);\draw[bluearrow](r^2)--(r^3);\draw[bluearrow](r^3)--(e);     \end{tikzpicture}          \vspace{10 mm}          % ... but it works fine here.     \begin{tikzpicture}     \draw[bluearrow](e)--(r);\draw[bluearrow](r)--(r^2);\draw[bluearrow](r^2)--(r^3);\draw[bluearrow](r^3)--(e);     \end{tikzpicture}          \end{center}          \end{document}


title: Line breaks not breaking using varwidth package for color background which is giving compilation error

text: When we are using `varwidth` package and the below macro               \newcommand\MyCBox[1]{%       \colorbox{red!60}{\begin{varwidth}{\dimexpr\linewidth-2\fboxsep}#1\end{varwidth}}}      While compiling we are getting the error as `! Undefined control sequence. \dimexpr` Please suggest me how to avoid this error.


title: putting a box around each line of text in a paragraph

text: In my environment I would like to automatically make a box around each individual line of text in a paragraph so that I can operate on each line. I think this should really be done in LaTeX rather than plain TeX as not to break text coloring and wrapping. I have been on this for some time now and it is still not obvious how to do this safely with LaTeX so any help would be greatly appreciated. This is for typesetting boustrophedonic writing as seen in Safaic, Sabean and some ancient Greek writing systems as well as reverse-boustrophedonic text as seen in Rongorongo (Easter Island). For boustrophedon I can just mirror every other line with `\reflectbox` because this writing direction moves like an ox turns in the field. For rongrongo I can use `\rotatebox[origin=c]{180}{` because every other line is rotated 180 degrees.


title: High level macros and environments based on Tikz

text: I was browsing the tikz examples that I found this wonderful example. The example uses tikz to create a tex environment to produce a framed text. The result looks like this: ![TikZ framed text example](http://i.stack.imgur.com/lYiZF.png) The underlying process may look too complicated for someone unfamiliar with tikz, but it is quite simple to use the environment:               \begin{parchment}[Paragraph Title]         The main text goes here ...     \end{parchment}      Then, it came to my mind that it would be great to have some high level tex macros or environments to produce such fancy figures or plots. Something like SmartArt graphics in microsoft office. For instance, use something like this:               \begin{env-name}[Discipline]         \usecolorpallet{pallet-name}         \item Love         \item Trust         \item Self-control         \item Journey         \item Obedience     \end{env-name}      to produce figures like this or this. I think, these kind of high level environments, in addition to hiding the details of tikz, provides some novel ideas for making much more elegant slides and documents with tex. So my question is: Is there any tex package that has such a functionality? If not, do you know any idea/example like the ones that I described, with available source code?


title: Partial italic text in PDF bookmarks

text: In my LaTeX file I've got some chapter titles with partial italicised text. With the `hyperref` package, I get the required bookmarks, etc. but the style for these partial italicised text disappears. Just wondering if it's possible to implement this? I've had a look at using the `bookmark` package, but I'm not sure which options (if any) to use, given that I'm not looking to have the entire text italicised, only bits of it. Thanks for the assistance! Here's a MWE that I'm running using `pdflatex`:               \documentclass[12pt,a4paper]{report}          \usepackage{hyperref}          \begin{document}          \chapter{\textit{Some Italic Text} and Some Normal Text}          \end{document}


title: How to input Traditional Chinese in pdfLaTeX

text: I'm trying to write Chinese using pdfLaTeX. But currently I can only write Simplified Chinese Characters, If I try writing Traditional Chinese then the text wont show up. This is what I have:               \documentclass{article}     \usepackage{CJKutf8}     \begin{document}     \begin{CJK*}{UTF8}{gbsn}     文章内容。     \clearpage\end{CJK*}     \end{document}      What would I need to do to get Traditional Chinese?


title: How to tell latex what i write should stay as it is, and not as a mathematical expression

text: I'm trying to write my thesis on Latex and I don't have much experience with it. I try to put an information about some arrays i used as a table one like looks like this: column names: > FileName, Strain, Replicate for this i use this code:               \begin{tabular}     US45102998_251897210500_S01_GE1_107_Sep09_1_3.txt & RAL765 & 1 \\     \end{tabular}      what LaTeX thinks it is: `US45102998251897210573S01GE1107Sep0911.txt` It creates this line where the numbers after underscore are subscripts of the former text. I used \textdollar{} and it didn't work for me . I used `\verb{}`, and it worked (it didnt turn the text into a mathematical expression), but now I see "}" sign right after the text and it doesn't break the line. the full code is:               \begin{center}     \tablehead{Array Information}     \toprule     \tableheadline {File Name} & \tableheadline{Strain} & \tableheadline{Replicate} \\ \midrule      \hline}     \tabletail{\multicolumn{4}{r} {Continued on next page...} \\}     \tablecaption{Array information}     \xentrystretch{0}     \begin{tabular}{llll{5 cm}}     \label{xtab: arrayinformation}      And at the end it is:               \hline     \end{xtabular}     \end{center}      Any suggestions? Note: i'm not so familiar with LaTeX lingo.


title: pgfplots function which touches the edges of the plot

text: I need to plot the constant y = pi function with the plot touching both sides of the plot. I have had a search through the `pgfplots` manual without much luck. I have tried `\addplot{3.141...}` which produces a small line spanning very little of the x axis, and manually plotting points for the range of my graph.


title: Limiting the number of authors in the references with IEEEtran

text: I'm trying to limit the number of authors that appear in the references by putting "et al." when their number is equal or greater than 3. According to the documentation (in page 8), you have to define the field that you want to change in your .bib file like so:               @IEEEtranBSTCTL{IEEEexample:BSTcontrol,     CTLmax_names_forced_etal = "3"}      Then, you have to put the following line in the .tex document:               \bstctlcite{IEEEexample:BSTcontrol}      I have done both things and it compiles. However, the output still shows more than 3 authors in the references (no reference has an "et al." written on them). Does anyone have experience with using IEEEtran.bst with IEEEtran.cls? What am I doing wrong?


title: How to display unprinted text in headers?

text: I use `fancyhdr` to display first and last headword from my dictionary in the header section. The problem is that the headwords in the dictionary may contain special symbols (see example picture)![Headwords in header section](http://i.stack.imgur.com/o79rI.png)) that I do not want to appear in the header line. How can I display headwords without symbols in the header line? Here comes the minimum example:               \documentclass[twocolumn]{book}     \usepackage[margin=2cm]{geometry}     \usepackage[icelandic, czech, english]{babel}     \usepackage[utf8x,utf8]{inputenc}     \usepackage[T1]{fontenc}     \newcommand{\entry}[2]{\hangpara{2em}{1}\textsf{\textbf{#1}}\          #2\markboth{#1}{#1}\par}\nopagebreak[4]     \usepackage{fix2col,hanging}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancypagestyle{dictstyle}{%         \fancyhf{}         \fancyhead[LE,RO]{\textsf{\textbf{\rightmark\ -- \leftmark}}}         \fancyhead[LO,RE]{\textsf{\textbf{\thepage}}}     }          \begin{document}      \pagestyle{dictstyle}     \entry{kímni··gáf|a}{meaning}     \end{document}


title: \footnotetext numbering for many \footnotemark - automatic solution

text: \documentclass{report}     \begin{document}     Text\footnote{text1} Text\footnote{text2}          \vbox{%     \begin{itemize}     \item X\footnotemark{}     \item Y\footnotemark{}     \item Z\footnotemark{}     \end{itemize}     }     \footnotetext{a}     \footnotetext{b}     \footnotetext{c}     \end{document}      generates:               Text^1 Text^2          * X^3     * Y^4     * Z^5          -------------     1 text1     2 text2     5 a     5 b     5 c      How to recover `\footnotetext` numbering without manual numbering? I assume, I know that I used `\footnotemark` `n` times, so I would like solution like (It is _"pseudocode"_ of draft of an idea) :               \newcounter{tempcounter := footnotecounter - n}     \footnotetext[ ++tempcounter ]{a}     \footnotetext[ ++tempcounter ]{b}     \footnotetext[ ++tempcounter ]{c}      Or other authomatic numbering solution. I don't want to manually correct this list each time I change footnotes in chapter. P.S. I know putting list into `vbox` might look strange, please assume it's just a toy-example of environment that needs usage of `\footnotemark`+`\footnotetext`.


title: Generating a list of Source Code Listings of a document

text: how I can generate a list of source code Listings like a list of Figures ?? here is an exemple of a code source Listings:               \lstset{     numbers=left,     stepnumber=1,     numbersep=5pt,     numberstyle=\small\color{black},     basicstyle=\ttfamily\small,     keywordstyle=\color{black},     commentstyle=\color{black},     stringstyle=\color{black},     frame=single,     backgroundcolor=\color{lightgray},     caption=Code coté serveur avec Express}     \begin{lstlisting}[firstnumber=1, framerule=0pt] % Start your code-block          %Code ...          \end{lstlisting}


title: How to set two types of appendixes on memoir class?

text: I need to set up two types of appendixes: Appendixes and Annexes They must appear as "Appendix A - Title of Appendix A", etc, and "Annex A - Title of Annex A", etc. in the chapter head (which I managed to do with a `\renewcommand{\appendixname}{Annex}`.) I also need that they appear that way in the table of contents... but a `\renewcommand{\cftappendixname}{Annex}` works globally...


title: Is there a way to get TexMakerX to recognize commands defined in an input file?

text: I have a file that defines a bunch of commands for various variables that I use in other documents. Here's a small example of what it contains:               \newcommand{\varElevation}{\ensuremath{\alpha_{el}}}     \newcommand{\varAzimuth}{\ensuremath{\alpha_{az}}}     \newcommand{\varRoll}{\ensuremath{\phi}}     \newcommand{\varPitch}{\ensuremath{\theta}}     \newcommand{\varYaw}{\ensuremath{\psi}}      I use the `input{...}` command to insert the above file into the preambles of the documents that use those variables (thus making it very easy to change the symbols I use for the variables across multiple documents). Although the documents build correctly, TexMakerX highlights all calls to those custom commands as "unrecognized commands." Is there a way to get TexMakerX to parse the input file as well so that the syntax highlighting is correct?


title: What's the difference between format and macro language?

text: From a comment by morbusg > depends on what you mean by "plain tex": if you mean "plain tex – **the > macro language** ", then yes, LaTeX does provide an interface. If you mean > "plain tex – **the format** ", then… well, LaTeX does use plain as a base > for many things. I thought _format_ and _macro language_ are the same concept. But the quote seems to distinguish the two. So I wonder what differences and relations are between them?


title: lineno not showing line numbers on proofs using the llncs class

text: Line numbers are not properly rendered on the last paragraph of a proof when using the lecture notes in computer science class llncs. Here's a minimal working example.               \documentclass[oribibl]{llncs}     \usepackage [pagewise]{lineno}          % Halmos box at the end of proofs.     \let\doendproof\endproof     \renewcommand\endproof{~\hfill\qed\doendproof}          \linenumbers          \title{testing}     \author{tester}     \institute{University of Breaking Things}     \begin{document}     \maketitle     \begin{abstract}          \end{abstract}          \pagestyle{plain}          \section{Introduction}     Some lines of text          more text          \begin{lemma}     Here lies a meaty lemma.     \end{lemma}     \begin{proof}     Bacon ipsum dolor sit amet hamburger flank enim, ut filet mignon beef meatloaf tempor chicken frankfurter tri-tip occaecat consequat dolor. Reprehenderit consequat tongue est, duis prosciutto voluptate ham hock ut chicken ribeye. Sint consectetur bacon tenderloin. Fatback nisi pork loin excepteur sed ut turducken cow pastrami. Labore adipisicing laboris fugiat short loin.          Sunt boudin et shankle esse. Sint in ut esse tempor tongue tri-tip chicken strip steak biltong ullamco consectetur. Sed ex magna voluptate esse. Meatball sirloin ea pariatur short loin pig sint shoulder. Fugiat doner qui ea ribeye shankle ex tri-tip deserunt ullamco nulla jowl. Bresaola sint brisket andouille. Dolore in aliqua labore in mollit boudin corned beef officia fugiat incididunt sirloin.     \end{proof}          And now some more text.          \end{document}


title: What do these OpenType Font Math Table terms mean?

text: These terms are defined in the OpenType Math Tables as follows :   1. **StretchStackTopShiftUp** Standard shift up applied to the top element of the stretch stack.   2. **StretchStackBottomShiftDown** Standard shift down applied to the bottom element of the stretch stack.   3. **StretchStackGapAboveMin** Minimum gap between the ink of the stretched element, and the (ink) bottom of the element above.   4. **StretchStackGapBelowMin** Minimum gap between the ink of the stretched element, and the (ink) top of the element below. Please note that this paper does **not** have a figure for these constants. I also would like to know what is a "stretch stack".


title: Combining bold and multi-page index numbering

text: Wish to have some multi-page Index numbering (e.g.: `\index{Text|(}` `\index{Text|)}`) appear BOLD. I tried adding `\index{Text|textbf}` but got no BOLD. What's the trick?


title: Macro for a code translator

text: Is there an existing macro that "translate" tokens using some code ? For example :               \def\code{{{a,b},{b,c},{c,a}}}     \translate[\code]{caac} % => would typeset "abba"      or even better something like that :               \def\code{{{ab,ba},{ac,ca},{b,c}{c,b}}}     \translate[\code]{abbcac} % => would typeset "bacbca"      The syntax for the code definition is not important. If there is no such macro, any proposition is welcomed to obtain an efficient solution to this problem. Thank you :)


title: vertical spacing between enumerate and multicol increase

text: I would like to slightly increase the vertical space between the fraction answers as currently it looks wrong (ie the spacing between and a b, c and d, and e and f: ![spacing](http://i.imgur.com/CHXgvdD.png) any suggestions on formatting or how i could improve it i would appreciate also.               \documentclass{article}     \usepackage[margin=10pt, paperwidth=992pt, paperheight=558pt]{geometry}     \usepackage[fleqn]{amsmath}     \usepackage{multicol}     \usepackage{enumerate}     \usepackage{stix}     \begin{document}     \LARGE     \begin{enumerate}     \item     \begin{multicols}{3}     \begin{enumerate}[(a)]         \item \quad $\displaystyle 2$         \item \quad $\displaystyle \frac{3}{4}$         \item \quad $\displaystyle \frac{16}{25}$         \item \quad $\displaystyle \frac{11}{12}$         \item \quad $\displaystyle \frac{23}{10}$         \item \quad $\displaystyle \frac{3}{2}$     \end{enumerate}     \end{multicols}     \end{enumerate}     \end{document}      thanks!


title: Horizontal line spanning the entire document in LaTeX

text: I have used the `\hrulefill` command to create a horizontal rule, along with some other commands. In each case I have the rules extended up to the margin. I want the rule width to be controllable, i.e. I want them to span the entire page. How can this be done? The existing help on Internet looks pretty scarce. Thanks for your help.


title: When is \if@nobreak set to \iftrue or \iffalse?

text: In my answer to a question on page breaking, I used a private switch that the user had to set by hand to prevent tables which start just after a section from breaking (at the first line). It seems that `\@nobreaktrue` is set after each heading, and restored as soon as the next paragraph begins (see definition of `\@afterheading`). Is this the only place where `\if@nobreak` is altered? Am I right that the intent of this switch is to indicate places where macros should avoid at all costs to insert page breaks?


title: Sorting Comma Separated Lists defined with, or without macro

text: I would like to be able to sort a comma separated list. Before I resort to writing something that would require `\ensureunix` :-) and having that do the sort for me, I thought I'd make an attempt to doing it within TeX. So, with the help of the two questions listed in the references I have been able to get this to work, but **only** for the case where the list is **not** defined in a macro. Unfortunately for me, I **only need the case where it works _with_ macro defined lists**, but would be nice to have one version which handles both.   1. With `%\def\SupportMacroDefinedList{}` commented out (as in the given MWE), you can see that the sorting works fine for the case when the list is not defined in a macro (right hand side of image). There are no spurious spaces and empty lists are handled just fine: ![enter image description here](http://i.stack.imgur.com/BFXCc.png)   2. For the macro defined list (i.e., with `\def\SupportMacroDefinedList{}` uncommented), this is the best I can do: ![enter image description here](http://i.stack.imgur.com/Ad9na.png) This is labelled as _"almost" working_ for several reasons, and note that there are different definitions of the list macros for each case. Some of the problems are:     * A trailing `%` was required after the first entry. Without that the sort order changes!!     * It does not properly handle empty lists (which the non-macro version above had no problems with).     * Multiple consecutive commas are properly treated as non-list members as in `Zebra,,`, but if there is a space in between the commas as in `Zebra, ,` then this yields the error `Undefined control sequence. <argument> \@xfor@endmarker`.     * Similarly, can't have a line with just a comma (probably same issues as the spaces in multiple consecutive commas).     * This requires a trailing `%` after the last list member. Try taking that out, or adding a space before the `%` and making sense of the sort order.  ## Notes:   * The commas in the output are printed at the end of each list member only to be able to see if there is any spurious spaces.   * According to the comments in How to process a comma separated list?, `\clist_map_inline:nn` is supposed to be able to strip spurious spaces, but does not seem to for me. Instead it treats the macro defined list as a single member list. Also, this same linked question references `\clist_map_inline:on` but this yields a compile time error: `Undefined control sequence` for me. ## References:   * How to process a comma separated list?   * How to sort an alphanumeric list ## Minimum Requirements: For this to useful for me, I really only need it to handle   1. Empty lists (only commas, spaces, and/or newlines),    2. No trailing `,` on the last list member:              \newcommand*{\ListMembers}{%       Odd,       Zebra,       Even,       Alpha     }%        3. with a trailing `,` on the last member:              \newcommand*{\ListMembers}{%       Odd,       Zebra,       Even,       Alpha,     }%      Something that did not use the `expl3` syntax would be great too as then I would at least have have some hope of modifying it if it was ever needed. :-) ## Code:               %\def\SupportMacroDefinedList{}%          \documentclass{article}     \usepackage{datatool}     \usepackage{xparse}     \usepackage{xstring}          \newcommand*{\SortDBName}{sortDB}%     \newcommand*{\DBKey}{label}%     \newcommand{\TitleA}{\textit{My Enumerated List:}}%     \newcommand{\TitleB}{\textit{My Empty List:}}%               %------------------------------------- Sort CSV list     % Adapted from:     %    http://tex.stackexchange.com/questions/40031/how-to-process-a-comma-separated-list     %    http://tex.stackexchange.com/questions/6988/how-to-sort-an-alphanumeric-list          \newcommand{\SortItem}[1]{%         \IfStrEq{#1}{\empty}{%             % Skip empty list members         }{%             \DTLnewrow{\SortDBName}%             \IfEndWith{#1}{\space}{% attempt to remove any trailing space                 \DTLnewdbentry{\SortDBName}{\DBKey}{\StrGobbleRight{#1}{1}}%             }{%                 \DTLnewdbentry{\SortDBName}{\DBKey}{#1}%             }%         }%     }          % How do I make \SortCommaSeparatedList work for BOTH cases      \ifdefined\SupportMacroDefinedList%         \ExplSyntaxOn         \NewDocumentCommand{\SortCommaSeparatedList}{>{\SplitList {,}}m}           { \clist_map_inline:Nn {#1} { \SortItem {##1} } }% List in macro         % Note: nn is supposed to handle spurious spaces as per ... but doesn't         \ExplSyntaxOff     \else         \ExplSyntaxOn         \NewDocumentCommand{\SortCommaSeparatedList}{>{\SplitList {,}}m}          { \tl_map_inline:nn    {#1} { \SortItem {##1} } }% Non macro list         \ExplSyntaxOff     \fi%                    \newcommand{\SortedList}[3]{%         % #1 = type of list          % #2 = title to print         % #3 = list content (Comma separated list)         %         \noindent#2\par%         %         \DTLifdbexists{\SortDBName}%             {\DTLcleardb{\SortDBName}}% DB exists, so just clear it             {\DTLnewdb{\SortDBName}}%   DB does not exist, so create it         %         \SortCommaSeparatedList{#3}%         \DTLsort{\DBKey}{\SortDBName}%         \IfEq{\DTLrowcount{\SortDBName}}{0}{%             \par%             No items to print for ``#1" list.%         }{%             \begin{#1}%                 \DTLforeach*{\SortDBName}{\CurrentItem=\DBKey}{%                     \item \CurrentItem,%             }%             \end{#1}%         }%     }%          \ifdefined\SupportMacroDefinedList%         \newcommand*{\ListMembers}{% Why is % required after the first line?             Odd,%             Zebra,             %,%  Can't have this             Even,             Alpha%         }%         \newcommand*{\EmptyListMembers}{%          , ,% %%% Note: Spaces after last comma NOT-ok for macro version         }%     \else%         \newcommand*{\ListMembers}{%             Odd,,              Zebra, ,             ,             Even,                 Alpha  ,         }%         \newcommand*{\EmptyListMembers}{%          , ,  % %%% Note: Spaces after last comma ok for non-macro version         }%     \fi%               \begin{document}     \ifdefined\SupportMacroDefinedList%         \section*{Almost works for Macro Defined List}%     \else%         \section*{Works for non-macro Defined List}%     \fi%          \begin{minipage}[t]{0.45\linewidth}\noindent%         \textbf{Macro defined list}\medskip\par%         \SortedList{enumerate}{\TitleA}{\ListMembers}         \SortedList{itemize}{\TitleB}{\EmptyListMembers}     \end{minipage}%     %     \hfill     %     \begin{minipage}[t]{0.45\linewidth}%         \textbf{Non-macro defined list}\medskip\par\noindent%         \SortedList{enumerate}{\TitleA}{  Odd, Zebra, , Even , Alpha  ,}         \SortedList{itemize}{\TitleB}{ , , }     \end{minipage}%     \end{document}


title: How to type the check sign in LaTeX?

text: > **Possible Duplicate:**   >  More aesthetic (perhaps shallower) superscript check symbol In the notation for the "dual" of something, I want to use check, like `$X^{v}$`, with the v replaced by a check. I tried `\check`, `\v`... but no one works.


title: Alignment of logo in first and second page of a certificate

text: I was preparing a certificate. I was stumbled on this behavior: The logo (on north west side) and the text between two logos (Department of....etc) are not maintaining the same alignment from page 1 to page 2. But page 2 onwards things are good. In other words, the logo and text slightly moves to left from page 1 to page 2 and then remains steady. Here comes the code: First contents of `namelist-1.csv`               number,degree,Name,Dgn,subject,inst,place,     1,Dr,Abdul Ali,Asst. Prof., E \& I,Pondicherry Engineering College, Pondicherry - 605 014      1,Dr,Abdul Ali,Asst. Prof., E \& I,Pondicherry Engineering College, Pondicherry - 605 014      1,Dr,Abdul Ali,Asst. Prof., E \& I,Pondicherry Engineering College, Pondicherry - 605 014       The logos: pec_emblem and AICTE4; ![enter image description here](http://i.stack.imgur.com/ioQ4a.png) ![enter image description here](http://i.stack.imgur.com/qEsFY.png) The background: 10.jpg and seal; ![enter image description here](http://i.stack.imgur.com/g1cU7.jpg) ![enter image description here](http://i.stack.imgur.com/Y73F3.png) Now the main code itself:               \documentclass[16pt]{scrartcl}     \usepackage[a4paper,left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \usepackage[svgnames]{xcolor}     \usepackage{pdflscape,setspace,amsmath,amssymb}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{calligra}     \usepackage{tgschola}     \usepackage{fourier-orns}     \usepackage{graphicx}     \usepackage{wallpaper}     \usepackage[normalem]{ulem}     \usepackage{charter}     \usepackage{microtype}     \usepackage{frcursive}     \hyphenpenalty 100000     %     \input Zallman.fd     \newcommand*\initfamily{\usefont{U}{Zallman}{xl}{n}}     %     \usepackage{datatool}     \DTLloaddb{names}{namelist-1.csv}     %     \def\signature#1#2{\parbox[b]{1in}{\smash{#1}\vskip12pt}     \hfill \parbox[t]{2.2in}{\shortstack{\vrule width 2.2in height 0.4pt\\\small#2}}}     \def\sigskip{\vskip0.4in plus 0.1in}             \def\beginskip{\vskip0.5875in plus 0.1in}     %     \definecolor{title}{RGB}{180,0,0}     \definecolor{other}{RGB}{171,0,255}     \definecolor{name}{RGB}{255,0,0}     \definecolor{phd}{RGB}{0,0,240}     %     \begin{document}     \begin{landscape}     %     \linespread{2}\selectfont     \pagestyle{empty}     \TileWallPaper{1\paperwidth}{1\paperheight}{10.jpg}     \rotatebox{90}{\CenterWallPaper{0.5}{seal}}     %     \DTLforeach{names}{%     \dg=degree, \name=Name, \dgn=Dgn, \sub=subject, \inst=inst, \place=place}{%     %---------------------------------------------------     %---------------------My problem lies here------------------     %\noindent % These have no effect on my problem     %\hspace{-40pt} % This works out very badly     \begin{minipage}[l]{1in}%     \noindent % Has no effect on my problem     %---------------------My problem lies here------------------     \includegraphics[width=1\textwidth]{pec_emblem}     \end{minipage}%     \hspace*{\fill}     \begin{minipage}[c]{7.1in}%     {\centering     {\onehalfspacing         {\LARGE\bfseries {\color{other}{\fontfamily{pzc}\selectfont{Department of Computer Science \& Engineering}}}}\\[0.6em]         {\LARGE\bfseries {\color{phd}{{Pondicherry  Engineering College}}}}\\[0.3em]         {\calligra Puducherry} -- {\calligra 605 014\\}}         \par}%     \end{minipage}%     \hspace*{\fill} % A futile attempt to correct the problem     \begin{minipage}[r]{1.4in}     \includegraphics[width=1\linewidth]{{AICTE4}}     \end{minipage}%     \vskip1em     %     \begin{minipage}[l]{1.5in}     \end{minipage}%     \hfill     \begin{minipage}[c]{6.5in}     {\centering     {\onehalfspacing         {\Large\bfseries \color{title}{Certificate of Participation}}\par         \vskip0.5em         {\color{DeepPink}\Large\decofourleft\quad{\color{blue}\decoone}\quad\decofourright}         \par}}     \end{minipage}%     \hfill     \begin{minipage}[r]{1.5in}     %     \end{minipage}%     \vskip1.8em     %     {\doublespacing      This is to certify that \, \uuline{\emph{\large\sffamily\bfseries\color{name}{{{\color{magenta}\fontfamily{frc}\selectfont{\dg. \name}}}}}}, { \dgn}     of {\sub}, {\inst}, {\place},     has successfully participated in the two week AICTE sponsored Staff Development  Program     on  ``\emph{\color{phd}{Design Of Embedded Systems – Issues \& Challenges}}''  %sponsored   by  AICTE  and     organized  by  Department of  Computer Science \&     Engineering, Pondicherry  Engineering   College, from     16\textsuperscript{th} to 27\textsuperscript{th} April 2012.}          \noindent     %     {\singlespacing     \vfill     \hspace{-40pt}     \begin{minipage}[l]{2.5in}     \sigskip \signature{}{Dr. Ka. Selvaradjou \\ Co-ordinator\phantom{p} }     \end{minipage}     \hfill     \begin{minipage}[c]{4.7in}     \begin{minipage}[l]{2.25in}     \sigskip \signature{}{\phantom{j}Dr. E. Ilavarasan\phantom{j} \\ \phantom{p}Co-ordinator\phantom{p} }     \end{minipage}     \hfill     \begin{minipage}[r]{2.25in}     \sigskip \signature{}{\phantom{j}Dr. N. Sreenath\phantom{j} \\ \phantom{p}Professor \& Head, CSE\phantom{p} }     \end{minipage}     \end{minipage}     \hfill     \begin{minipage}[r]{2.5in}     \sigskip \signature{}{Prof. V. Prithiviraj \\ Principal }     \end{minipage}}     %     \vfil     \pagebreak     }     \end{landscape}     \end{document}       When I overlay the pages 1 and 2 (first one is not sitting exactly on one another) this is what I get: ![enter image description here](http://i.stack.imgur.com/FBUgI.png) Second one (pages 2 and 3 overlayed) is OK. Please help me to identify and solve the problem.


title: Creating a simple table article; multi line table headings, display date on same line as caption and double underlines

text: I have written my first LaTeX document, and although it broadly looks like how I want it to, I want to polish it further to give it a bit more of a profession look - alas, this si where I have come unstuck. I am trying to achieve the following things in my document:   1. Create a table header that continues across pages (I'm using the `longtable` package)   2. Set my column headings to specific widths (so that the text wraps in the column) instead of the table column width increasing with the length of the column heading text.   3. Display the date in the caption on the same line. Another nice to have would be to be able to format the date to something more like 18Apr12. However despite trying several online examples that use the `isodate` package - I was unable to get it to work.   4. Apply a double underline (of a different color) to a specific cell. This is what I have managed to get so far, after a day of trying:               \documentclass[english]{article}          \usepackage{times}     \usepackage{babel}     \usepackage{color}     \usepackage{ulem}     \usepackage{longtable}     \usepackage{datetime}     \usepackage[margin=0.5in]{geometry}     \input{rgb}          \begin{document}     \begin{center}     \begin{longtable}{|l|l|l|l|l|l|l|}     \caption{This is a long caption for table generated as at \today}\\     \hline     Surname & Column One & Column Two & Column Three & Column Four & Column Five & Column Six \\ \hline     Oliver & 1 & \color{green}2 & \color{red}\uuline{3} & 4 & 5 & 6 \\ \hline     \end{longtable}     \end{center}     \end{document}      I'd be grateful for some pointers/tips on how to fix the tex code above to resolve these issues.


title: Setting font size AFTER \documentclass

text: I've seen a few related questions, but can't find one that actually answers this question. What I want to do is to specify the font size AFTER `\documentclass`. I don't want to change the command line, nor have to define something like `\def\pointsize{12pt}` beforehand, and then use that in the `\documentclass[\pointsize]` as per Norman's solution to setting class options after documentclass. So, what I am looking for is the definition of `\SetFontSize` below so that it has the same effect as if I had said `\documentclass[12pt]{some_class}` in terms of text location and size:               \documentclass{some_class}     \SetFontSize{12pt}{15pt}      I am also not sure that 12,15 are the correct numbers to match with the `[12pt]` option. I tried the following, but this does not producing identical output as `\documentclass[12pt]{article}`:               \documentclass{article}     \fontsize{12pt}{15pt}\selectfont          \begin{document}     blah blah     \end{document}      Based on lockstep's link, I believe that the solution is:                 \let\savednewcommand\newcommand       \let\newcommand\renewcommand       \makeatletter       \input{size12.clo}       \makeatother       \let\newcommand\savednewcommand      This seems to be working for the {article} class. But according the same link this may not work for all classes.


title: Why can't the end code of an environment contain an argument?

text: Environments are allowed to have arguments, but reference to those arguments can only appear in the opening code of the environment, and not the closing code. What is the reason for this, and are there preferred ways around it? e.g.               \newenvironment{foo}[1]%     {some code #1} % allowed     {some code #1} % not allowed


title: Strange behaviour debugging a document with AUCTeX-GNUEmacs in math mode

text: When I try to compile this document               \documentclass{article}     \usepackage{amsmath}          \begin{document}     A simple fraction with an error $\frac{a}{b$     \end{document}      I obviously get an error because there is a missing `}` in the fraction and then the minibuffer says:               LaTeX errors in `*c:/Program Files/emacs-23.3/bin/debug_error output*'. Use C-c ` to display.      So I press `C-c `` and then the windows splits in half and I have two buffers: the lower is the expected TeX Help buffer and the upper is a strange empty buffer called MiKTeX 2.8 in Nroff mode. I also noticed that this happens when there are errors in math commands or something like that. How to prevent the MiKTeX 2.8 buffer appear? It would be nice to have a workaround. EDIT: After reading the documentation I found this: > `C-c ‘` should always stay in the current window, also when it finds a new > file.


title: How to add \hline to macro expansion?

text: I want to add one `\hline` to the macro expansion of this code, that is minimally modified version of David Carlisle's answer to Generating LaTeX tabular code during compilation. Compiling this with `latexmk -pdf main.tex` gives a nice tabular. I was able to add `\hline` to the macro expansion of the macro that generates most of the rows by adding `\def\hardline{\hline}` and `\expandafter\hardline` in `\def\xlistbody` in `g_orig_dest_tabular1_def.tex`. I was also able to add `\hline` in the beginning of the code by adding `\noexpand\hline` in `\def\tablestart` in the same file. But I was not able to find out how I could generate `\hline` between first and second row of this `tabular` array. It must be in `\def\listheadings` or in `\def\xlistheadings` in `g_orig_dest_tabular1_def.tex`. So how `\hline` could be added to the macro expansion that is used to create the first row of this `tabular` array? Thank you :) main.tex:               \documentclass[12pt]{article}          \usepackage[american]{babel}     \usepackage{graphicx}          \input{g_orig_dest_tabular1_def}          \begin{document}          \input{g_orig_dest_tabular1}          \end{document}      g_orig_dest_tabular1_def.tex:               \newcommand\connorigdestregionlist{ABC,DEF,GHI}          % hardline.     \def\hardline{\hline}          % listheadings.     \def\listheadings{%     \expandafter\xlistheadings\connorigdestregionlist,\relax,}          % xlistheadings.     \def\xlistheadings#1,{%     \ifx\relax#1%     \expandafter\\     \else     &\textbf{#1}%     \expandafter\xlistheadings     \fi}          % listbody.     \def\listbody{%     \expandafter\xlistbody\connorigdestregionlist,\relax,}          % xlistbody.     \def\xlistbody#1,{%     \ifx\relax#1%     \else     \textbf{#1}%     \gdef\thisrow{#1}%     \expandafter\xlistdata\connorigdestregionlist,\relax,%     \expandafter\hardline     \expandafter\xlistbody     \fi}          % xlistdata.     \def\xlistdata#1,{%     \ifx\relax#1%     \expandafter\\     \else     &\csname CONNorig\thisrow dest#1\endcsname     \expandafter\xlistdata     \fi}          % preamble.     \def\preamble{\expandafter\xpreamble\connorigdestregionlist,\relax,}     \def\xpreamble#1,{%     \ifx\relax#1%     \else     c%     \expandafter\xpreamble     \fi}          % tablestart.     \def\tablestart{%     \edef\temp{\noexpand\begin{tabular}{c\preamble}\noexpand\hline}%         \temp}      g_orig_dest_tabular1.tex:               \input{g_orig_dest_conn_def}          \tiny     \begin{table}         \scalebox{0.6}{         \tablestart         \listheadings         \listbody         \end{tabular}         } % end scalebox         \caption{Caption goes here.}         \begin{enumerate}             \item Item number one.              \item Item number two.         \end{enumerate}     \end{table}     \normalsize      g_orig_dest_conn_def.tex:               \def\CONNorigABCdestABC{ NA }     \def\CONNorigABCdestDEF{ from ABC to DEF }     \def\CONNorigABCdestGHI{ from ABC to GHI }          \def\CONNorigDEFdestABC{ from DEF to ABC }     \def\CONNorigDEFdestDEF{ NA }     \def\CONNorigDEFdestGHI{ from DEF to GHI }          \def\CONNorigGHIdestABC{ from GHI to ABC }     \def\CONNorigGHIdestDEF{ from GHI to DEF }     \def\CONNorigGHIdestGHI{ NA }


title: How can I convert the tables and math in a latex document to one of the markup languages supported by github's wiki?

text: I wrote some software documentation in Latex, but need to get it into a more lightweight format. I used pandoc to convert latex to markdown, but it did not do a very good job of converting tables. Here is minimal example of what I want to convert:               \documentclass[12pt,english]{article}     \usepackage{amsmath}     \begin{document}     \begin{table}       \begin{tabular}{lllp}         \hline         \textbf{do}   &  re &$\sqrt{\frac{1}{N}}$ &me  \\         \textbf{fa}   & so & $\frac{s}{\sqrt{n}}$& la\\         \hline       \end{tabular}     \end{table}     \end{document}      and this is the result of `pandoc -o foo.md foo.tex:               lllp          **do** & re &$\sqrt{\frac{1}{N}}$ &me\     **fa** & so & $\frac{s}{\sqrt{n}}$& la\      But this does not render as a table in markdown. Github's wiki supports all of the following markup languages (solutions for converting tables to markdown or languages in bold would be preferred):   * AsciiDoc    * Creole    * **Markdown**   * **Org-mode**   * Pod    * Rdoc    * **Textile**   * reStructuredText Is there a way to convert my latex tables to any of these (automagically, without having to re-typset the math)? I really do not want to use the embedded images as provided by `latex2html`.


title: Custom list labels in ConTeXt

text: I have just started learning ConTeXt and I have to say that I am pretty amazed by how intuitive it is to use. But I can't find a way yet to achieve automatically a list with the following labels.               C.1     C.2     C.3     .     .     .      What I have come up with so far is with the use of `\sym`:               \starttext     \startitemize[packed]     \sym{C.1} Three coins are tossed. In how many ways can at least 2 heads turn up?     \sym{C.2} If $\log_x 8^{1/2}=3/4$, what is $x$?     \sym{C.3} If $x:y=10:21$ and $y:z=28:9$, what is $x:y:z$?     \stopitemize     \stoptext      In LaTeX, with the `enumitem` package, it is easy to achieve this with the following minimal code:               \documentclass{article}     \usepackage{enumitem}     \begin{document}     \begin{enumerate}[label={C.\arabic*}]     \item ...     \end{enumerate}     \end{document}      Is there a way that I can automate the list in ConTeXt? I tried some of the ConTeXt manuals but all I have seen up to now are just the predefined lists. I also tried looking for a duplicate in this site using the `[context]` tag but I have been unsuccessful so far.


title: Indexing through texindy in imakeidx with custom .xdy style fails to produce desired order in index

text: I am trying to produce an index using `texindy` through the `imakeidx` make that follows the Sanskrit alphabetical order. I am working in XeLaTeX. I created a custom `.xdy` style file to be called as an option to `texindy`, which sets up letter groups for all of the (sequences of) Roman letters (many of which have diacritics), and defined the ordering of all letter groups with respect to one another, following the example at http://www.xindy.org/doc/tutorial-3.html (subsection 3.3). The index that is produced, however, simply seems to follow a standard Latin alphabetical order (though it indexes characters with diacritics before characters without diacritics. For instance, because "dh" is a distinct letter from "d", which follows "d" in Sanskrit, all words beginning with "dh" should follow all words beginning with "d" + any other letter. For example "drapsa-" should precede "dhanvan-" (NB that "h" is also a letter, but it is the final letter in the alphabet, so "dhanvan-" would follow "drapsa-" in any case, even in "dh" were not defined as a letter group). Please ask me if you need more detail about my expectation for the index, though I think that the text of my `.xdy` below should make my intentions reasonably clear. I give below here: 1) my `.tex` code with some example words to be indexed; 2) my `.xdy` file; 3) the text of my log relevant to the index as the `.tex` compiles. I suspect that the problem may lie with some of the automatic modules that are called for processing the index, but I don't know how to disengage them without also disengaging some components that are needed. 1)               \documentclass[titlepage,letterpaper,twoside,12pt]{book}     \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{fontenc}[utf8x]     \setmainfont{Brill}     \usepackage{imakeidx}     \makeindex[program=texindy, options=-M skt2]     \newcommand\IndexR[1]{#1\index{#1}}     \begin{document}               \IndexR{amhas-} \IndexR{ám̐has-}, \IndexR{áti}, \IndexR{āsúr-}, \IndexR{íṣṭa-},     \IndexR{krátu-}, \IndexR{devī́-}, \IndexR{devī́nām}, \IndexR{dhánvan-},     \IndexR{drapsá-}, \IndexR{áśva-}, \IndexR{ohas-}, \IndexR{itá-}, \IndexR{īhate}          \printindex     \end{document}      2)               (require "tex/inputenc/utf8.xdy")     ;; Here follow all letter-groups.          (define-letter-groups     ("ṃ" "m̐" " "ḥ" "a" "ā" "i" "ī" "u" "ū" "e" "o" "ai" "au" "r̥" "r̥̄" "k" "kh"      "g" "gh" "ṅ" "c" "ch" "j" "jh" "n͂" "t" "th" "d" "dh" "n" "ṭ" "ṭh" "ḍ" "ḍh"      "ṇ" "p" "ph" "b" "bh" "m" "y" "r" "l" "v" "ś" "ṣ" "s" "h"))          (define-letter-group "ṃ" :before "m̐")     (define-letter-group "m̐" :after "ṃ" :before "ḥ")     (define-letter-group "ḥ" :after "m̐" :before "a")     (define-letter-group "a" :after "ḥ" :before "ā")     (define-letter-group "ā" :after "a" :before "i")     (define-letter-group "i" :after "ā" :before "ī")     (define-letter-group "ī" :after "i" :before "u")     (define-letter-group "u" :after "ī" :before "ū")     (define-letter-group "ū" :after "u" :before "e")     (define-letter-group "e" :after "ū" :before "o")     (define-letter-group "o" :after "e" :before "ai")     (define-letter-group "ai" :after "o" :before "au")     (define-letter-group "au" :after "ai" :before "r̥")     (define-letter-group "r̥" :after "au" :before "r̥̄")     (define-letter-group "r̥̄" :after "r̥" :before "k")     (define-letter-group "k" :after "r̥̄" :before "kh")     (define-letter-group "kh" :after "k" :before "g")     (define-letter-group "g" :after "kh" :before "gh")     (define-letter-group "gh" :after "g" :before "c")     (define-letter-group "ṅ" :after "gh" :before "c")     (define-letter-group "c" :after "ṅ" :before "ch")     (define-letter-group "ch" :after "c" :before "j")     (define-letter-group "j" :after "ch" :before "jh")     (define-letter-group "jh" :after "j" :before "n͂")     (define-letter-group "n͂" :after "jh" :before "t")     (define-letter-group "t" :after "n͂" :before "th")     (define-letter-group "th" :after "t" :before "d")     (define-letter-group "d" :after "th" :before "dh")     (define-letter-group "dh" :after "d" :before "n")     (define-letter-group "n" :after "dh" :before "ṭ")     (define-letter-group "ṭ" :after "n" :before "ṭh")     (define-letter-group "ṭh" :after "ṭ" :before "ḍ")     (define-letter-group "ḍ" :after "ṭh" :before "ḍh")     (define-letter-group "ḍh" :after "ḍ" :before "ṇ")     (define-letter-group "ṇ" :after "ḍh" :before "p")     (define-letter-group "p" :after "ṇ" :before "ph")     (define-letter-group "ph" :after "p" :before "b")     (define-letter-group "b" :after "ph" :before "bh")     (define-letter-group "bh" :after "b" :before "m")     (define-letter-group "m" :after "bh" :before "y")     (define-letter-group "y" :after "m" :before "r")     (define-letter-group "r" :after "y" :before "l")     (define-letter-group "l" :after "r" :before "v")     (define-letter-group "v" :after "l" :before "ś")     (define-letter-group "ś" :after "v" :before "ṣ")     (define-letter-group "ṣ" :after "ś" :before "s")     (define-letter-group "s" :after "ṣ" :before "h")     (define-letter-group "h" :after "s")          (markup-letter-group :open-head "~n {\bf " :close-head "}")               ;;     ;; The sort-rules map all letters to their lowercase counterpart.     ;;          (sort-rule "A" "a")     (sort-rule "B" "b")     (sort-rule "C" "c")     (sort-rule "D" "d")     (sort-rule "E" "e")     (sort-rule "F" "f")      (sort-rule "G" "g")     (sort-rule "H" "h")     (sort-rule "I" "i")     (sort-rule "J" "j")     (sort-rule "K" "k")     (sort-rule "L" "l")     (sort-rule "M" "m")     (sort-rule "N" "n")     (sort-rule "O" "o")     (sort-rule "P" "p")     (sort-rule "Q" "q")     (sort-rule "R" "r")     (sort-rule "S" "s")     (sort-rule "T" "t")     (sort-rule "U" "u")     (sort-rule "V" "v")     (sort-rule "W" "w")     (sort-rule "X" "x")     (sort-rule "Y" "y")     (sort-rule "Z" "z")     ;; Accented Sorting     (sort-rule "á" "a")     (sort-rule "ā́" "ā")     (sort-rule "í" "i")     (sort-rule "ī́" "ī")     (sort-rule "ú" "u")     (sort-rule "ū" "ū")     (sort-rule "é" "e")     (sort-rule "ó" "o")     (sort-rule "ái" "ai")     (sort-rule "áu" "au")     (sort-rule "ŕ̥" "r̥")     (sort-rule "r̥̄́" "r̥̄")      3)               Reading indexstyle...     Loading module "/var/folders/1t/1by7npx95zdfkspc6fp0w8nm0000gn/T/jN96RZb09V"...     Loading module "lang/general/latin9-lang.xdy"...     Loading module "lang/general/latin9.xdy"...     Finished loading module "lang/general/latin9.xdy".     Finished loading module "lang/general/latin9-lang.xdy".     Loading module "tex/inputenc/latin.xdy"...     Finished loading module "tex/inputenc/latin.xdy".     Loading module "texindy.xdy"...     Loading module "numeric-sort.xdy"...     Finished loading module "numeric-sort.xdy".     Loading module "latex.xdy"...     Loading module "tex.xdy"...     Finished loading module "tex.xdy".     Finished loading module "latex.xdy".     Loading module "latex-loc-fmts.xdy"...     Finished loading module "latex-loc-fmts.xdy".     Loading module "makeindex.xdy"...     Finished loading module "makeindex.xdy".     Finished loading module "texindy.xdy".     Loading module "page-ranges.xdy"...     Finished loading module "page-ranges.xdy".     Loading module "word-order.xdy"...     Finished loading module "word-order.xdy".     Loading module "skt2.xdy"...     Finished loading module "skt2.xdy".     Finished loading module "/var/folders/1t/1by7npx95zdfkspc6fp0w8nm0000gn/T/jN96RZb09V".     Finished reading indexstyle.     Finalizing indexstyle... (done)          Reading raw-index "/var/folders/1t/1by7npx95zdfkspc6fp0w8nm0000gn/T/SQs8on3FCq"...     Finished reading raw-index.          Processing index... [10%] [20%] [30%] [40%] [50%] [60%] [70%] [80%] [90%] [100%]     Finished processing index.          Writing markup... [10%] [20%] [30%] [40%] [50%] [60%] [70%] [80%] [90%] [100%]     Markup written into file "./IndexTest2.ind".     (./IndexTest2.ind) [3] (./IndexTest2.aux) )     Output written on IndexTest2.pdf (3 pages).     Transcript written on IndexTest2.log.


title: Unwanted vertical space before tabular on title page

text: I worked on my title page, and there is some undesired vertical space before a tabular environment. I made two fboxes to illustrate the vertical distance I wanted to be the same 116 pt. But after the second box, a tabular environment starts and I assume it adds some vertical space before itself. This could be removed manually via \vspace*{-6pt}, but I am curious where does it come from?               \documentclass[a4paper, 12pt, headsepline, headings=small,]{scrreprt}     \overfullrule=1mm     \usepackage[onehalfspacing]{setspace}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[a4paper,showframe]{geometry}     \geometry{left=2cm,right=2cm,top=2cm,bottom=2cm}               \newenvironment{tightcenter}{%       \setlength\topsep{0pt}       \setlength\parskip{0pt}       \begin{center}     }{%       \end{center}     }          \begin{document}     % \topskip= x pt  % 12 pt in scrreprt     \vspace*{12 pt} % so in effect 24 pt     \begin{tightcenter}     Title \\     Title more info \\     Title more info \\     \fbox{\begin{minipage}{116 pt}  \hfill\vspace{116 pt}\end{minipage}}\\     %\vspace{116 pt}     \Large\textbf{\textrm{Huge Title Huge Title Huge Title Huge Title Title Huge}}      \fbox{\begin{minipage}{116 pt}\hfill\vspace{116 pt}\end{minipage}}     %\vspace{116 pt}     \end{tightcenter}      % \vspace*{-6pt}     \noindent\begin{tabular}{p{3cm}p{3.75cm}l}     & Advisor: & text text text\\      & More info: & text text text\\     & More info: & text text text\\     & More info: & text text text\\     \end{tabular}          \end{document}      Can I somehow remove this space other than using a negative vspace? Thanks.


title: Sans Serif headings, Serif Body text

text: I'm using ConTeXt, with XeTex. So I'm compiling my document: `texexec --xetex foo.tex` I would like to follow the convertion of having my headings all in Sans Serif, and my body text in Serif. I want to do this with my own fonts:               %&context     \definetypeface[BerlinSSDB][ss][sans][Berlin Sans FB Demi]     \definetypeface[Minion][rm][Xserif][Minion Pro]     \setupbodyfont[Minion, 12pt]          \setuphead[chapter][         style=\ss,         sectionnumber=yes         ]          \setuphead[section][         style=\ss,         sectionnumber=no         ]          \starttext          \chapter{Welcome}     A well known text, used to fill space.          \section{H. Rackham 1914}     But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness... But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?          \stoptext      Everything, headings, body and all is coming up in Minion Pro. This seems reasonable since no where have I told it what font to use, except to say "Use Minion". (I believe `\setupbodyfont`, uses the word body with a different meaning to what I have here.)


title: Different font for all headings

text: I am new to LaTeX and I am trying to use an Arial-like font for all the standard text but a different Sans-Serif font for all the headings. Can somebody please put me in the right direction or an easy-to-understand example? Many thanks!


title: LaTeX to HTML preserving code coloring from listings

text:
I'm trying to convert some LaTeX into HTML but my code listings don't preserve their code coloring. Why is that and how do I fix it? This is what it looks like: ![enter image description here](http://i.stack.imgur.com/SOmrX.png) Side note: I'm also wondering why the caption on the table was removed. **Edit** Here is an example listing with colors:               \documentclass{article}     \usepackage{color}     \usepackage{listings}     \lstset{         basicstyle=\footnotesize\ttfamily,         language=[Sharp]C,          keywordstyle=\color[rgb]{0,0,1.0}\bfseries,           commentstyle=\color[rgb]{0.133,0.545,0.133}\bfseries,     }          \begin{document}     \begin{lstlisting}     int x = 10;          // This is a comment     string str = "hello";     \end{lstlisting}     \end{document}      This produces the following HTML when doing: `htlatex myfile.tex`:               <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"         "http://www.w3.org/TR/html4/loose.dtd">             <title></title>      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">      <meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">      <meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">            <meta name="src" content="LaTeX4.tex">      <meta name="date" content="2012-07-20 12:30:00">      <link rel="stylesheet" type="text/css" href="LaTeX4.css">
int x = 10;

// This is a comment
string str = "hello";
                Which looks like this: ![enter image description here](http://i.stack.imgur.com/kXpLV.png) I would want the HTML result to look like this: ![enter image description here](http://i.stack.imgur.com/akC51.png)


title: Why are my hyper references pink?

text: I have this in the heading of my document:                 \usepackage[unicode=true,                   colorlinks=true,                   linkcolor=blue]{hyperref}      Yet the links look like this: ![enter image description here](http://i.stack.imgur.com/Hgk2t.png) Why the pink color when it says blue in the preamble? There are a number of other things in the full .tex document; I used Pandoc to create this from the original .Rmd file, so perhaps that helps explain it. In any case, I want a more conventional blue link color!


title: flalign and alignat break autonum

text: After yesterday's unsuccessful attempt, I am continuing in my attempts to find out the limits of `autonum`. It seems that `flalign` and `alignat` environments break `autonum`. Here is an MWE that works fine:               \documentclass[8pt]{article}     \usepackage{amsmath,amsthm,hyperref,cleveref,autonum}     \newtheorem{thm}{Theorem}     \crefname{thm}{theorem}{theorems}     \Crefname{thm}{Theorem}{Theorems}          %======================================     % MWE 1     \begin{document}     \begin{thm}\label{thm1}     This is a very important theorem.     \end{thm}          \begin{thm}\label{thm2}     Another very important theorem.     \end{thm}          The first theorem is \cref{thm1}, and the second is \cref{thm2}.          \end{document}      One which has an `alignat` (resp. `flalign`) environment, does not compile so smoothly:               \documentclass[8pt]{article}     \usepackage{amsmath,amsthm,hyperref,cleveref,autonum}     \newtheorem{thm}{Theorem}     \crefname{thm}{theorem}{theorems}     \Crefname{thm}{Theorem}{Theorems}     %======================================     % MWE 2     \begin{document}     \begin{thm}\label{thm1}     This is a very important theorem.     \end{thm}          %\begin{flalign}     %x &= y \implies & y &= x \label{eq4}\\     %y &= z \implies & z &= y \label{eq5}\\     %v &= w \implies & w &= v \label{eq6}     %\end{flalign}          \begin{alignat}{3}     x &= y \implies & y &= x \label{eq4}\\     y &= z \implies & z &= y \label{eq5}\\     v &= w \implies & w &= v \label{eq6}     \end{alignat}          \begin{thm}\label{thm2}     Another very important theorem.     \end{thm}          The first theorem, which appears before the \texttt{flalign} environment is \cref{thm1}, and the second, which appears after, is \cref{thm2}.     The first equation is \cref{eq4}.          \end{document}      My main problem then is that while `autonum` provides support for some math environments, it does not for all. I wonder if there is a workaround where I can use it for the math environments it does provide support for and not have it interact with labels in other environments. As before, my larger problem is to use `cleveref` with a package that numbers only referenced equations.


title: PSTricks at LyX (via pdflatex)

text: I'm using LyX (at Windows) and I'm trying to get pdf file output while I have PSTricks code (I put as `\ERT`.   I Try to write at the preamble things like: `\usepackage[off]{auto-pst-pdf} ` and `\usepackage[pdf]{pstricks}`, but it still don't compile to pdf file output. (also `ps4pdf` doesn't help...). Can you tell me how can I do it? Thank you! * * * Here is the code:                % Preview source code          %% LyX 2.0.5.1 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[twocolumn,english,hebrew]{article}     \renewcommand{\familydefault}{\rmdefault}     \usepackage[T1]{fontenc}     \usepackage[cp1255]{inputenc}     \setlength{\parindent}{0bp}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \def\@outputdblcol{%       \if@firstcolumn         \global \@firstcolumnfalse         \global \setbox\@leftcolumn \box\@outputbox       \else         \global \@firstcolumntrue         \setbox\@outputbox \vbox {%           \hb@xt@\textwidth {%           \kern\textwidth \kern-\columnwidth %**           \hb@xt@\columnwidth {%              \box\@leftcolumn \hss}%           \kern-\textwidth %**           \hfil           {\normalcolor\vrule \@width\columnseprule}%           \hfil           \kern-\textwidth  %**           \hb@xt@\columnwidth {%              \box\@outputbox \hss}%           \kern-\columnwidth \kern\textwidth %**         }%       }%       \@combinedblfloats       \@outputpage       \begingroup       \@dblfloatplacement       \@startdblcolumn       \@whilesw\if@fcolmade \fi       {\@outputpage         \@startdblcolumn}%       \endgroup       \fi     }     \@mparswitchtrue          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.     \usepackage{theorem}     \theorembodyfont{\upshape}     \newtheorem{theorem}{\R{משפט}}[section]     \AtBeginDocument{\make@lr\thetheorem}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage[crop=off]{auto-pst-pdf}     \usepackage{pstricks}          \makeatother          \usepackage{babel}     \begin{document}     \pscircle(0,0){1}     \end{document}


title: Custom and built in TikZ fill patterns

text: I can't find much information about creating TikZ fill patterns or even using the custom built-in patterns. Look to do all the common fills like lines, hatches, dots, stars, etc... I need to be able to control the scale, too. (The patterns I did end up finding were way to large.) Google doesn't seem to return much info on TikZ fill patterns.


title: Does LaTeX dislike putting floating figures within an enumerated list?

text: I have a big floating figure that is being shifted a little more far than the usual and I suspect it might be because LaTeX does not like to put figures within an enumerated list (which is filling up 0.75 of a page not far after the figure has been placed because it has quite a lot of text between items). Does somebody know if LaTeX is reluctant to break an enumerated list with a Figure?


title: Sudden problem with build in TeXnicCenter, works fine in MiKTeX

text: I have a peculiar problem. I'm quite new to LaTeX but have used TeXnicCenter with MiKTeX for a while now without any major issues. However today, when I try to compile a `.tex` document to `.pdf`, I get the errors shown in the image below. ![enter image description here](http://i.stack.imgur.com/W5TYg.png) The exact same files have been working fine ten days ago but now this. When I open the files directly in MiKTeX and "Typeset" them, they work fine. What is the problem?


title: Force an image to be centered alone on a page

text: I'm always facing problems with positioning images at specific places. I posted a question about one week ago and I got an answer for How do I place an image at the center of the page alone? Today I decided to replace the image with an another one. So I expected to get the same positioning but with the new one. It's sticking to the top of the page. I tried everything but still not working. Please check the link to see my code and the answer to it.


title: How to fit dot graph with dot2tex(i)

text: Currently I used the `dot -Tpng` to include graphs in my LaTeX document. However it produced sometimes suboptimal graphics I wanted to look into `dot2tex(i)`. The problem I encountered is that previously I could have something like:               \begin{figure}[h!]     \centering     \includegraphics[width=0.4\textwidth]{mygraph}     \caption{Description}     \label{fig:maxtoolchain}     \end{figure}      Now I tried               \begin{figure}[h!]     \centering     \begin{dot2tex}[dot]     \input{mygraph.dot}     \end{dot2tex}     \caption{Description}     \label{fig:maxtoolchain}     \end{figure}      However it produced very large graph - larger then the width of the page - even though the graph itself was very small. How to scale it back to `~0.4` of page width? (I've tried using `pgf` backend and it looks like `dot2tex` produce graph in bp units) **EDIT** Small (not) working example:                \documentclass[a4paper,9pt]{report}      \usepackage[english]{babel}      \usepackage{tikz}      \usepackage{fullpage}      \usepackage[pgf]{dot2texi}      \begin{document}           \begin{figure}[h!]      \centering      \begin{dot2tex}      digraph G {              A [label="XXXXXXXXXXXXXXX"];              B [label="XXXXXXXXXXXXXXXXX"];              C [label="XXXXXXXXXXXXXXXX", shape=box];              D [label="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"];              E [label="XXX", shape=box];              F [label="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"];              G [label="XXXXXXXXXXXXXXXXXXXXXXXXX"];              H [label="XXXXXXXXXXX", shape=box];              I [label="XXXXXXXXXXXXXXXXXXXX"];              A -> C;              B -> C;              C -> D;              D -> E;              E -> F;              F -> H;              G -> H;              H -> I;      }      \end{dot2tex}      \end{figure}           \end{document}


title: Two fractions with the same size

text: Can anyone tell me how I can make `$A=\frac{1}{a} \frac{1}{1+\frac{a}{b}}$` look the same? So I want `$a$` to be on the same height as the other denominator. MWE               \documentclass[11pt]{article}     \begin{document}       $A=\frac{1}{a} \frac{1}{\frac{a}{b}+1}$\\        $A=\frac{1}{a} \frac{1}{\frac{a}{\frac{b}{t}}+1}$      \end{document}      ![enter image description here](http://i.stack.imgur.com/KGyt2.png)


title: math/logic character \exists renders OK in editor, but faults when compiling

text: The fault message below: > lyx could not find command for character "$\exists$" (code point 0*2203) This character renders OK in lyx editor, I pick it from lyx math miscellaneous, it's the first character of second row in that category. ![enter image description here](http://i.stack.imgur.com/WZUTv.png) I try solve this by switch encoding to `UTF8` but no luck there. please help many thanks thx guys, problem solved, what I did is install amsmath package in miktex package manager, and reconfigure lyx.


title: url in footnote spans two pages

text: In my document LaTeX has chosen to continue a long footnote on the next page. That's usually just fine. But in this case the page break in the footnote is inside a url, so the whole second page is a clickable link in the pdf. I could probably avoid that with some rewriting, but a TeX solution would be nice. I hoped URL linebreak in footnote would provide help - no luck. Here's an MWE.               \documentclass{article}     \usepackage{hyperref}     \usepackage[textheight=1.4in, textwidth=5in]{geometry}          \begin{document}     Here's a sample of the kind of advice you can find on the web.     It's from Liz Pulliam Weston, writing for      MSN Money.          \begin{quotation}     Say you have a 10-year-old Honda that's worth \$4,000 in a     private-party sale and have a \$500 deductible. Your risk is \$3,500. If     your premiums for collision and comprehensive are more than \$350 a     year, it may be wiser to bank that money toward a newer car.%     \footnote{     \url{http://articles.moneycentral.msn.com/Insurance/InsureYourCarDumpTheInsuranceOnYourClunker.aspx}}     \end{quotation}          If we make a simple assumption we can think about this using     probabilities. Suppose that the only kind of accident to worry about     is one that totals the car. Then Weston's advice is reasonable if you     think that the probability that you'll have such an accident is less     than 10\%. Here's why. Imagine that the insurance policy is a lottery     ticket, which ``wins'' if you have an accident. A winning ticket is     worth \$3,500. If you think you have a 10\% chance of winning, then     the fair price (for you) is \$350. If you think your chance of     totaling your car is less than 10\% then the fair price is more than     \$350, so perhaps you shouldn't buy the insurance.     \end{document}


title: How to reduce the render of tikzpicture

text: How to reduce the size of the brace and to customize its color to red ? I'm just trying to reduce the render of the tikzpicture.               \documentclass[]{scrartcl}     \usepackage{tikz}     \usetikzlibrary{fit,calc,positioning,decorations.pathreplacing,matrix}          \begin{document}             \begin{tikzpicture}[decoration={brace},scale=2]      \node [rotate=90] (A) {A};      \node [fit=(A)] (fit) {};                   \draw [decorate,line width=1pt]        ([yshift=-5pt]fit.south west) -- ([yshift=5pt]fit.north west);     \end{tikzpicture}          \end{document}      Thanks in advance!


title: How to put the values of each bar in a pgfplots bar chart inside the bar itself?

text: I have this:               \begin{tikzpicture}     \begin{axis}[     ybar = 0.6,     width=1.2\textwidth,     height=0.4\textheight,     enlarge x limits = 0.2,     bar width=16pt,     title={Instance els19 with 1\% max error},     legend style={at={(0.5,-0.15)},     anchor=north,legend columns=0},     ylabel={Time in milisseconds},     symbolic x coords={s-HAS, s-cAS, CUDA-HAS},     xtick=data,     nodes near coords,     %nodes near coords align={horizontal},     ]     \addplot coordinates {(s-HAS,44.60) (s-cAS,71.90) (CUDA-HAS,8.67)};     \addplot coordinates {(s-HAS,4) (s-cAS,4) (CUDA-HAS,6)};     \addplot coordinates {(s-HAS,156) (s-cAS,334) (CUDA-HAS,18)};               \legend{Average 1\%,Best 1\%,Worst 1\%}     \end{axis}     \end{tikzpicture}      and this is generated: ![enter image description here](http://i.stack.imgur.com/Io0Cu.png) Is there any way i could put the bar values that are currently above each bar inside the bar? The bars could be wider. Also, the number could be rotated 90 degrees. I need this because on some other figures the numbers are really large, and they stay on top of each other, like this: ![enter image description here](http://i.stack.imgur.com/rkIwR.png) Also, any tip on how to make these charts look better is accepted.


title: Inkscape PDF resizing

text: I'm trying to include some PDF I saved in Inkscape and change the width and the height at the same time. Is this possible? I tried `\svgheight` and it did not take both values at the same time. This is what I do               \begin{figure}       \begin{center}         \def\svgwidth{0.75\columnwidth}          \input{illustration.pdf_tex}       \end{center}       \caption{Example}       \label{figillustration}     \end{figure}      In the past I had the option of doing this:               \begin{figure}       \begin{center}         \includegraphics[height=3.0in,width=3.8in,angle=0]{img_1.jpg}         \caption{Example}       \end{center}     \label{figgordon}     \end{figure}      (setting both the width and the height). How do I do this now?


title: How should one setup fontspec package to exploit best features of Pro fonts ?

text: Suppose that you have a Pro class fonts such as `Adobe Arno` which has several design sizes as described below:               Design    Size  Size Ranges                  Caption:   8    point 5–8.5 point     SmText:   10    point 8.6–11     Regular:  12    point 11.1–14 point     Subhead:  18    point 14.1–21.5 point     Display:  36    point 21.5+ point      Arno Pro is supplied as set of the following font files:               ArnoPro-Bold.otf     ArnoPro-BoldCaption.otf     ArnoPro-BoldDisplay.otf     ArnoPro-BoldItalic.otf     ArnoPro-BoldItalicCaption.otf     ArnoPro-BoldItalicDisplay.otf     ArnoPro-BoldItalicSmText.otf     ArnoPro-BoldItalicSubhead.otf     ArnoPro-BoldSmText.otf     ArnoPro-BoldSubhead.otf     ArnoPro-Caption.otf     ArnoPro-Display.otf     ArnoPro-Italic.otf     ArnoPro-ItalicCaption.otf     ArnoPro-ItalicDisplay.otf     ArnoPro-ItalicSmText.otf     ArnoPro-ItalicSubhead.otf     ArnoPro-LightDisplay.otf     ArnoPro-LightItalicDisplay.otf     ArnoPro-Regular.otf     ArnoPro-Smbd.otf     ArnoPro-SmbdCaption.otf     ArnoPro-SmbdDisplay.otf     ArnoPro-SmbdItalic.otf     ArnoPro-SmbdItalicCaption.otf     ArnoPro-SmbdItalicDisplay.otf     ArnoPro-SmbdItalicSmText.otf     ArnoPro-SmbdItalicSubhead.otf     ArnoPro-SmbdSmText.otf     ArnoPro-SmbdSubhead.otf     ArnoPro-SmText.otf     ArnoPro-Subhead.otf      > How should one setup `fontspec` package to exploit best features of these > fonts? Starting code is here:               \usepackage{fontspec}     \setmainfont[Renderer=Basic,Ligatures={TeX}]{ArnoPro}      Would it be sufficient? I am not sure that `Caption` version of these fonts will be invoked by the `\small` or `\footnotesize` switches. What should one add here? **Added at 2nd edit** I mean that in standard LaTeX classes font size declarations are bounded to optical sizes according to the following table:                declaration \ class option  10pt      11pt       12pt           \tiny                        5pt       6pt        6pt      \scriptsize                  7pt       8pt        8pt      \footnotesize                8pt       9pt       10pt      \small                       9pt      10pt       11pt      \normalsize                 10pt      11pt       12pt      \large                      12pt      12pt       14pt      \Large                      14pt      14pt       17pt      \LARGE                      17pt      17pt       20pt      \huge                       20pt      20pt       25pt      \Huge                       25pt      25pt       25pt      Hence, for `10pt` class option, `\tiny`, `\scriptsize`, `\footnotesize` should switch to Arno Pro Caption, `\small`, `\normalsize` to Arno Pro SmText, `\large` and `\Large` to Arno Pro, `\LARGE` and `\huge` to Arno Pro Subhead, and `\Huge` to Arno Pro Display. All these fonts are actually diffrent, when scaled to same size, so that Caption version looks better for `\footnosize` than Regular vesrion.


title: How do I add \textbf to a description in my class file?

text: I am not a tex guru, but I need to modify my existing command `\description` to include boldtext. Here is the command snippet:                   \def\description{\@ifnextchar[{\@describe}{\list{}{\labelwidth\z@     \labelsep=12pt\relax  %!!!!!!!!!     \leftmargini=12pt\relax  %!!!!!!!!!     \leftmargin=12pt\relax  %!!!!!!!!!     \itemindent-\leftmargin \let\makelabel\descriptionlabel}}}      Where and how and why do I insert `\bfseries` or `\textbf` to change the label to a bold version? * * * Additional information               % adjusted environment "description"     % if an optional parameter (at the first two levels of lists)     % is present, its width is considered to be the widest mark     % throughout the current list.     \def\description{\@ifnextchar[{\@describe}{\list{}{\labelwidth\z@     \labelsep=12pt\relax  %!!!!!!!!!     \leftmargini=12pt\relax  %!!!!!!!!!     \leftmargin=12pt\relax  %!!!!!!!!!     \itemindent-\leftmargin \let\makelabel\descriptionlabel}}}     %     \def\describelabel#1{#1\hfil}     \def\@describe[#1]{\labelsep=12pt\relax     \relax\ifnum\@listdepth=0     \setitemindent{#1}\else\ifnum\@listdepth=1     \setitemitemindent{#1}\fi\fi     \list{--}{\let\makelabel\describelabel}}     %


title: Translate and rotate an object in TikZ (2D)

text: Is there a way in Tikz to translate and rotate a, lets say, rectangle by an arbitrary distance/angle? As an example   1. Translation: 3 in x-direction, 5 in y-direction   2. Rotation: 45 degree Now my goal would be drawing a rectangle around the origin and then be able to first translate then rotate the object and vice versa via TikZ commands. So one could visually see, that the translation and the rotation do not commute. The translate first then rotate is easily done by hand but the other way around I need the help of a calculator.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}     \begin{tikzpicture}[scale = 0.5]     \draw [->](-5,0) -- (5,0); %x-axis     \draw [->](0,-5) -- (0,5); %y-axis     \draw[green] (1,1) -- (1,-1) -- (-1,-1) -- (-1,1) -- (1,1); %square around the origin     \draw[blue] ($ (3,{5+sqrt(2)}) $) -- ($ ({3-sqrt(2)},5) $) -- ($ (3,{5-sqrt(2)})  $) -- ($ ({3+sqrt(2)},5) $) -- ($ (3,{5+sqrt(2)}) $) ;  %Rotation first, then translated, values calculated by hand     \draw[green, rotate around={45:(0,0)}] (2,6) rectangle (4,4); %neat solution for the RT case     \end{tikzpicture}     \end{document}


title: Headings in report documentclass

text: > **Possible Duplicate:**   >  Headers in book format I am working with report documentclass. I have this in my preamble:               \documentclass[11pt,a4paper,oneside]{report}     \pagestyle{headings}      I would like to get lower case headings (except for the first letter of each word), like this: > Chapter 1. Literature Review What I have so far is: > CHAPTER 1. LITERATURE REVIEW


title: Goudy Old Style for LaTeX?

text: Is there any possibility to make use of the font " **Goudy Old Style** " in a LaTeX document? I haven't found it in the font packages.


title: customizing TOC

text: I'm new to latex, I'm thankful if someone can give me an example script to customize TOC that looks like Chapter 1.XXXXXX (1-15) 1.1 Introduction 1.2 xxxxxxxx 1.3 xxxxxxxxxx 1.4 xxxxxxx ............... Chapter 2.xxxxxxx 2.1 xxxxx ...... (16-30) because the (default) TOC appears to be very large for my book, since it arranges the section name row-by-row.


title: Remove parentheses for empty year field biblatex ieee style

text: By using biblatex ieee style, I found that the reference will display empty brackets even though the field "year" is undefined. How can I remove it without having to change the biblatex.bst?               \documentclass{article}          \usepackage[style=ieee,backend=bibtex]{biblatex}          \usepackage{filecontents}          \begin{filecontents}{\x.bib}     @ELECTRONIC{MEMSnet,       title = {What is {MEMS}?},       organization = {MEMSnet},       url = {http://www.memsnet.org/mems/what_is.html},       urldate = {Dec. 01, 2013}     }     \end{filecontents}          \addbibresource{\x.bib}          \nocite{*}          \begin{document}          \printbibliography          \end{document}      I got (). What is MEMS? MEMSnet, [Online]. Available: http://www.memsnet.org/mems/what_is.html. which is not a correct citation style. I would like to have: What is MEMS? MEMSnet, [Online]. Available: http://www.memsnet.org/mems/what_is.html. Many Thanks


title: How to place in a document a VCard using a psbarcode?

text: I would like to put a QRCode that contains contact information (VCard). However I don't know how to encode the newline character so VCard is correctly read. Here is a sample document with QRCode without newline chars ( **UPDATED:** I changed the example to one from de.wikipedia.org, because my iphone qrcode reader does not properly processes the example from en.wikipedia.org)):               \documentclass{article}     \usepackage{pst-barcode}               \begin{document}              \begin{pspicture}(1in,1in)         \obeylines         \psbarcode{%     BEGIN:VCARD     VERSION:3.0     N:Mustermann;Max     FN:Max Mustermann     ORG:Wikipedia     URL:http://de.wikipedia.org/     EMAIL;TYPE=INTERNET:max.mustermann@example.org     TEL;TYPE=voice,work,pref:+49 1234 56788     ADR;TYPE=intl,work,postal,parcel:;;Musterstraße 1;Musterstadt;;12345;Germany     END:VCARD     }{width=2.0 height=2.0}{qrcode}%         \end{pspicture}                \end{document}      I have found a similar question on tug.org, the conclusion was that you need to modify the generated PostScript. I wonder if there is another solution.


title: Change alignment for individual table rows

text: Is it possible to change alignment for individual rows? Example:               +------------+--------------+--------------+     | Left       |    Center    |        Right |     +------------+--------------+--------------+


title: pgfplots: correlation for data values from file works, but with errors

text: maybe I do not to see the wood for the trees, but I'm always getting error messages for compiling the following pgf code, while the output looks like the way it should. Does anyone see whats wrong with my code? (download tex-file and test.dat)               \documentclass[         a4paper,         DIV13,         12pt,         oneside,         onecolumn,     ]{scrbook}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[ngerman]{babel}          \usepackage{pgfplots}     \usepgflibrary{shapes.geometric}     \usetikzlibrary{patterns,arrows}     \pgfplotsset{%     compat=newest,         every axis legend/.append style={draw=none, font=\scriptsize, column sep=5pt},         ymajorgrids=true,     }          \begin{document}          \begin{figure}[htb]     \centering     \footnotesize     \begin{tikzpicture}     \begin{axis}[         enlargelimits=0.2,         ylabel=Altersgruppe,         xlabel=Lautanzahl pro 150 Wörter,         width=9cm,         height=9cm,         ymin=4,         xmin=460,         xmax=620,         enlarge x limits=0.07,         enlarge y limits=0.07         ]              \addplot [black, only marks, mark options={scale=1}, mark=*] file {test.dat};          \end{axis}     \end{tikzpicture}          \caption{correlation}     \label{correlation}     \end{figure}          \end{document}


title: Table of contents: section number and title overlapping

text: I have problem with creation of table contents. A part of my code:               \documentclass[a4paper]{amsbook}     \usepackage[cp1250]{inputenc}     \usepackage{polski}     \makeatletter     \renewcommand*\@seccntformat[1]{\csname the#1\endcsname.\enspace}     \makeatother     \usepackage[sf,bf,outermarks]{titlesec}           \begin{document}     \tableofcontents     \chapter*{Introduction}     \chapter{(Chapter 1 - Title)}     \section{Section  - Title}     \section{Section  - Title}     \subsection{Subsection - Title}     \subsection{Subsection - Title}     \section{Section  - Title}     \section{Section  - Title}     \section{Section  - Title}     \subsection{Subsection - Title}     \subsubsection{Subsection - Title}     \subsubsection{Subsection - Title}     \subsection{Subsection - Title}     \subsection{Subsection - Title}     \section{Section  - Title}     \begin{thebibliography}{1}     \bibitem{1} Bibliography 1     \end{thebibliography}     \end{document}      and it shows like this ![enter image description here](http://i.stack.imgur.com/s1Tvx.jpg) as you can see, text overlapping. How can I change this?   How can I add the number of chapter before number of section? [ Chapter 1. Title   1.1 Section title   1.2 Section title   .... Chapter 2. Title   2.1 Section title   2.2 Section title   ...]


title: About \include in LaTeX

text: When using `\include{file}`, if the including file is a complete LaTeX document, with `documentclass{}`, `\begin{document}`, etc., it generates an error. It doesn't generate the error if I remove everything except the content (those between `\begin{document}` and `\end{document}`). But isn't the very point of `\include` command to work separately from a long document? What's the point if I can't compile the including file separately (having no preamble, etc)? Is `\include` the best option for working on, say, a chapter of a long document separately?


title: TOC, LOF and LOT won't start on right

text: The Table of Contents, List of Figures and List of Tables won't start on the right page (recto) even though I put an `openright` `documentclass` option. I tried `\clearpage` before each one, didn't work. The chapters are working fine though. Preamble:                \documentclass[a4paper,twoside,12pt,openright,final,oldfontcommands]{memoir}      Body:               \input{Preamble.tex}          \begin{document}          \pagestyle{ruledsmallhd}          \pagenumbering{roman}     \maketitle          \clearpage     \maxtocdepth{subsection}     \tableofcontents          \clearpage     \listoffigures     \listoftables          \setlength{\parskip}{0.7cm}          \chapter              \end{document}


title: Can I use trig functions within polar coordinates

text: I am trying to use simple mathematical functions such as sin, cos, and sqrt within the declaration of a TikZ coordinate. I am finding that this works for cartesian coordinates, but breaks for polar coordinates:               \documentclass[tikz]{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          \begin{tikzpicture}     % \draw (0,0) -- (2,0) -- (45:1/0.707) -- (0,0); % <-- works     % \draw (0,0) -- (2,0) -- (45:{1/cos(45)}) -- (0,0); % <--doesn't work     \draw (0,0) -- (2,0) -- (1,{1/tan(45)}) -- (0,0); % <--works     \end{tikzpicture}          \end{document}      Is this just a known limitation, or is there some way to get around this?


title: Arch Linux: fontspec does not find system fonts

text: I am running an Arch Linux / Windows 7 dual boot laptop. The windows partition is mounted under arch and i made the windows fonts usable with `ln -s /windows/Windows/fonts/ /usr/share/fonts/WindowsFonts` This works, every program besides luaLaTeX with fontspec has acces to the fonts, e.g. libreoffice. But i am not able to use the fonts with:               \usepackage{fontspec}     \setmaintfont{Comic Sans MS}      The result is the font-not-found message from fontspec. Under the Windows 7 partition it works just fine. Any idea?


title: Alignment of tabular objects inside a horizontal box

text: How to align two tabulars of different height side by side so that both top rows are aligned with each other? Example:               \hbox{\vtop{\hbox{Foo}\hbox{Bar}}\enskip\hbox{Baz}}      produces               Foo Baz     Bar      Given two tabulars:               \def\tabi{%       \begin{tabular}{r}         Foo \\ Bar        \end{tabular}}          \def\tabii{%       \begin{tabular}{r}         Baz       \end{tabular}}      How do I get the same output? This:               \hbox{\tabi\tabii}      puts the second tabular at the centre of the horizontal box, which is not what I want.


title: List of figures / tables when using subfloat to combine a figure and a table

text: I want to have a plot and a table side by side which can be solved using the `subfig` package. However I'd like the table to appear in the list of tables and not in the list of figures. Is there a way to do this?               \documentclass[a4paper,11pt,titlepage]{article}          \usepackage{subfig}% http://ctan.org/pkg/subfig     \setcounter{lofdepth}{2} % we want subfigures in the list of figures          \begin{document}          \listoffigures     \listoftables          \begin{figure}[h]         \centering         \subfloat[text for list of figures][A figure left of a table]{             \rule{6.4cm}{3.35cm}         }         \subfloat[text for list of tables][A table right of a figure]{             \begin{tabular}[b]{cc}\hline                 Table head & Table head \\ \hline                 Some values & Some values \\                 Some values & Some values \\                 Some values & Some values \\                 Some values & Some values \\                 Some values & Some values \\                 Some values & Some values \\ \hline             \end{tabular}         }         \caption{A figure and a table, side-by-side}     \end{figure}          \end{document}      The result looks like this: ![enter image description here](http://i.stack.imgur.com/qd9Et.jpg)


title: splitbib and table of contents

text: I use the `splitbib` package to create two categories: primary literature and secondary literature. But I want to add in the table of contents an entry for each category, as if they are subsections or something like that. Moreover, I want also to split each category but the first in a new page. MWE:               \documentclass{article}          \usepackage[nottoc]{tocbibind}     \usepackage[export]{splitbib}          \begin{category}{Primary Literature}       \SBentries{samplea}     \end{category}          \begin{category}{Secondary Literature}       \SBentries{sampleb}     \end{category}          \begin{document}     \pagestyle{empty}          \tableofcontents          \begin{thebibliography}{99}            \bibitem[Sample, A]{samplea} Sample A.            \bibitem[Sample, B]{sampleb} Sample B.          \end{thebibliography}          \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/Bdljp.png) and I want to add in the table of contents, like a subsection, an entry for the category Primary Literature and Secondary Literature, and to split the second category (and third, fourth and so on) in a separated page. How can be this achieved?


title: Referencing theorems by numbers

text: I was wondering if there was a way that I could reference the numbers of the theorems in my document would actually having to write "theorem 1.11". So that if the numbering of my theorems change then my referencing of them automatically does as well? Thanks for any help


title: Controlling space between two words in the body of text

text: In my thesis I'll have equations that are labelled (1) through to (20). In the body of the text I'll refer to them as `Eq. (1),..., Eq. (20)`, for example. The problem is that LaTeX will change the spacing between `Eq.` and `(1)`, as it does with the spacing between any two separate words, in order to fill the margins. This looks ugly. How do I fix this?


title: How to use glossaries-package without need to print out the Glossary

text: I know that it doesn't make much sense to create a glossary and then not want to use it. I print the glossary in my main document. But now I have a presentation with beamer slides, where I just copy equations from the main document. In the equations, most variables are glossary entries. But it makes no sense for me to print a glossary in my presentation. Then I get all those warnings that an entry has been referenced but does not exist, which is very annoying. Is there any way to get around this?               \documentclass{beamer}     \usepackage{lmodern}     \usepackage{glossaries}          \newglossaryentry{bp}{%type=symbols, In the original there are 2 different types of glossaries     name={\ensuremath{BP}},sort=bp,description={Basispreis einer Option}}     \makeglossaries     \begin{document}          \frame{\gls{bp} has to give the output \ensuremath{BP}.}          %\printglossaries     \end{document}