title: Pie chart with values instead of percentage

text: First, I started using LaTeX way to late! and thanks for all the hints on this site. I looked at the answer of the following question. https://tex.stackexchange.com/questions/135393/how-to-draw-bar-pie-chart This chart uses the value 100 as maxvalue. I want to change it a bit, it should sum up all parameters and use that as the new 100% Example of a pie chart (sum of 922 as 100%)               \pie{Pie XYZ}     {337/div,196/drog,191/verm,118/gew,47/staa}      Here is the orginal script with my idea in the comment. To be frank I have never use tex-script before, but just with googling I couldn't manage to get what I want. Any help for a LaTeX noob higly appreciated.               \newcommand{\pie}[3][]{         \begin{scope}[#1]         \pgfmathsetmacro{\curA}{90}         \pgfmathsetmacro{\r}{1}         \def\c{(0,0)}         \node[pie title] at (90:1.3) {#2};          % Sum all parameters for max value        %   \newcounter{tmpSUM}     %   \foreach \v / \s in{#3}{         %       \setcounter{tmpSUM}{\v}     %   }              \foreach \v/\s in{#3}{     %       \pgfmathsetmacro{\deltaA}{\v / tmpSUM *360}             \pgfmathsetmacro{\deltaA}{\v / 100 *360}                  \pgfmathsetmacro{\nextA}{\curA + \deltaA}             \pgfmathsetmacro{\midA}{(\curA+\nextA)/2}                  \path[slice,\s] \c                 -- +(\curA:\r)                 arc (\curA:\nextA:\r)                 -- cycle;            \pgfmathsetmacro{\d}{max((\deltaA * -(.5/50) + 1) , .5)}                  \begin{pgfonlayer}{foreground}             \path \c -- node[pos=\d,pie values,values of \s]{$\v\%$} +(\midA:\r);             \end{pgfonlayer}                  \global\let\curA\nextA         }         \end{scope}     }


title: Latex Recall and Precision Table

text: I want to draw follow table on a latex but I have spend over a day now but yet to get anything close to it. I am attaching a screen short it would be great if I can get latex command to build this table.![enter image description here](http://i.stack.imgur.com/kYGdC.png)


title: Updating Bibtex fields through DOI

text: I have a big Bibtex, which has been created by Mendely. However, Mendeley has a habit to strangely format the journal name. As soon as I have updated one references by DOI lookup in Mendely, just the first character of the journal name has been capitalized. Any solutions as provided by Mendely for a workaround would not help here (e.g. re-writing cite style). I am looking for a way to iterate over all my bibtex items and, if a DOI field is available for the related bibtex item, overwrite the journal name with the one from crossref.org/dx.doi.org fetching result. Does anyone know such kind of tool/script, which is able to handle this? Is maybe someone aware of a suitable Jabref plugin?


title: Error with IJCA article

text: I am writing an conference paper for IJCA. I did the initial steps. But I am getting some errors which I am not able to unerstand. I am attaching the code below. Can somebody help me out.               \documentclass{ijcaArticle}          \begin{document}          \title{Image Compression}     \author{xxx}     \maketitle     \begin{abstract}     image is an important method          \end{abstract}     \end{document}      I am getting some errors when compiling               ! Undefined control sequence.     \headingtable ...Name } \\ {Volume \ \@ijcaVolume     \ - No.\ \@ijcaNumber , \@...     l.12 \end{document}     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.


title: How to format multiple authors separated by \and?

text: I have a document class for theses which, up until now, only accepted one author name. But now, due to a change in the university's regulation, the document will have to accept more than one author name. Currently, I am using the standard `\author{}` command to get the author name . My question is: how can I get the separate author names in order to apply the correct formatting to them? Are there different variable names for each one? I know multiple authors are separated by `\and` and, after I am able to get each author name, I would like to put them one below the other, in a centered position (just like the example below, but with each additional author name below the previous one). Here I have the code of my `\maketitle` command, which is the only one that uses the author names. In the image below, I show the resulting title page.               \renewcommand{\maketitle}{     \clearpage % clears pages just to be sure     \thispagestyle{empty} % this page has no numbering     \begin{center} %text is centered     \textbf{ % and bold     \MakeUppercase{\@institution}\\[\baselineskip] % institution name     \MakeUppercase{\@author} % author name     \vfill     \MakeUppercase{\@title}\ifthenelse{\isundefined{\@subtitle}}{}{:\@subtitle}} % title and optional subtitle     \vfill     \@city\\ % city     \number\year %year     \end{center}     }      ![Here's an image of how it looks now](http://i.imgur.com/h4EQmZ6.png) ## Clarifying Update I believe I wasn't clear before, but now I have additional information regarding the issue. Following the recent answer, I decided to forget about `\and` and try to separate author names with `\\\` so they could each go in a separate line, but it seems that `\MakeUppercase{}` does not allow for line breaks to be inserted inside it. Any advice? So you see, my issue is not related to the `\and` command in itself, but rather with a way to break a string in many lines while keeping it in uppercase. I guess an example of what I'm trying to do, but which is not working, is the following:               \documentclass{report}     \author{Doug \\ Lou}          \begin{document}     \MakeUppercase{\@author}     \end{document}      ## End result update Just for posterity, I will add here the end result, after using the chosen solution from this post.               \def\and{\\} % redefine so it is compatible with other classes          \renewcommand{\maketitle}{     \clearpage % clears pages just to be sure     \thispagestyle{empty} % this page has no numbering     \begin{center} %text is centered     \textbf{ % and bold     \MakeUppercase{\@institution}\\[\baselineskip] % institution name     \uppercase\expandafter{\@author} % uppercase author names!!     \vfill     \MakeUppercase{\@title}\ifthenelse{\isundefined{\@subtitle}}{}{:\@subtitle}} % title and optional subtitle     \vfill     \@city % city     \number\year % year     \end{center}     }


title: MinionPro and Searchability/Encoding

text: I'm using pdflatex with the MinionPro package. The PDF looks fine, but apparently some characters (specifically "W" and the "Th" ligature) are put in the PDF in a way that breaks searchability. For example, if a document contains the text "A Wedge", then searching for "A Wedge" will not yield a hit. If I copy and paste this string into a text file, the result is "AWedge". With "Th" it's similar: "A Thing" becomes "AThing" when copied into a text file. As mentioned in the MinonPro manual, I'm using               \input glyphtounicode     \pdfgentounicode=1      but this doesn't solve the problem. Here's an example:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{MinionPro}     \input glyphtounicode     \pdfgentounicode=1     \begin{document}     A Wedge A Thing     \end{document}      Any ideas?


title: latex code in bibtex entries

text: Suppose you have a mathematical paper titled > All functions are $C^\infty$ What is the best way to deal with such a situation when citing such a title in bibtex? Does bibtex cope with mathematics in entries?


title: Reduce vertical space between chapter name and multi-line chapter title

text: I am trying to make my thesis satisfy my grad school's requirement. The titles of my chapters are long. What they suggest and I quote is "Entire chapter titles must be single spaced. For example, on page 6 the line Between “Chapter 2” and “A loooooooong” should have the same single line spacing as between the lines “A loooooooong” and “multi-line title that I have”." I have tried titlesec. But it keeps putting "nin]0.0.0.0.0.0 5.87494pt" on my first page. So it would be great if this problem can be fixed in some other way. Here is my MWE                   \documentclass[12pt]{report}         \usepackage{amsmath,amsthm,amssymb,latexsym,amscd}         \usepackage{setspace}         \usepackage{titlesec}              \begin{document}              \chapter{A loooooooooooooooong multi-lines title that I have}              \end{document}


title: Pgfplots: date range and integers as input data

text: I have a data table that looks something like:               Week,value     2010-01-03 - 2010-01-09,0     2010-01-10 - 2010-01-16,0     2010-01-17 - 2010-01-23,0     2010-01-24 - 2010-01-30,0     2010-01-31 - 2010-02-06,0     2010-02-07 - 2010-02-13,0     2010-02-14 - 2010-02-20,0     2010-02-21 - 2010-02-27,0     2010-02-28 - 2010-03-06,0     ...      How do I include this to render a simple x/y plot using `pgfplots`? I'd like the dates on the x-axis and the values on the y-axis. I've tried this, but it is not working (fails to parse the dates):               \begin{tikzpicture}     \begin{loglogaxis}[         title=Trends,         xlabel={Date},         ylabel={Searches},     ]     \addplot table {data/trends.dat};     \end{loglogaxis}     \end{tikzpicture}


title: Forloop macro does not work with other macro in condtion

text: This is my primative code:               \documentclass{article}     \usepackage{xstring}     \usepackage{ifthen}     \usepackage{pgfkeys}          \newcommand{\setvalue}[1]{\pgfkeys{/variables, #1}}     \newcommand{\getvalue}[1]{\pgfkeysvalueof{/variables/#1}}     \newcommand{\declare}[1]{%      \pgfkeys{       /variables/#1.is family,       /variables/#1.unknown/.style = {\pgfkeyscurrentpath/\pgfkeyscurrentname/.initial = ##1}      }%     }        \declare{}     \begin{document}     \setvalue{varL = \StrLen{Hellow}}     \newcounter{loop}     \forloop{loop}{1}{\value{loop}< \protect\getvalue{varL}}{{\arabic{loop}}}     \end{document}      This is just the start of my bigger macro, but LaTeX does not like this command:               \value{loop}< \protect\getvalue{varL}      I need to send to \fooloop macro length of the word, which is changeable. How I can solve the problem? Thank you in advanced.


title: How to make itemize/enumerate/description environment robust to missing \item elements?

text: Is there any way to make LaTeX tolerate empty itemize/enumerate (i.e. no \item)? Specifically, I would welcome any package/elegant hack that would gracefully "cancel" a list if no elements are found (instead of firing up a Latex Error). Before jumping to the obvious answer (which I expect would be something along the lines of "don't use itemize if you don't have items to put in" ;)) please consider my use-case:   * I want to format remotely stored elements (say, bibliographic items), which I can only access as an XML file.              <elems>       <bibelem><title>Cool result 1</title><author>joe</author></bibelem>       <bibelem><title>Cool result 2</title><author>jim</author></bibelem>     </elems>        * I have a python script that downloads/parses the XML and outputs its content in a file `bib.tex` as a list of Latex macros-decorated data              \BibElem{Cool result 1}{joe}     \BibElem{Cool result 2}{jim}        * Now, I want to grant the end-user complete control over the styling of her/his produced document, so the intended usage within Latex is something like              \documentclass{article}     \begin{document}       \newcommand{\BibElem}[2]{\item {\em #1} by {#2}}       \begin{itemize}         \input{bib.tex}       \end{itemize}     \end{document}      The rationale behind this design choice is that the user should be restricted as little as possible in her/his styling choices. For instance, the user may either want to display the bibelems within a list as shown in the example, or may prefer a fancy-formatted tabular. On the other hand, the user should design the latex document once, and should be able to run it regardless of the amount of data produced by the source. Therefore, the python script cannot make any assumption regarding the context in which its latex product will be included, and it should be up to the user to deal with empty bibliographies, i.e. with empty lists. How could one possibly do that? **Update:** Werner proposed a nice solution that redefines the list environment to make Latex oblivious of the fact he is currently in a list. However, this only seems to work if the empty list is the last list in the document, as revealed by the following mwa:               \documentclass{article}     \makeatletter     \newenvironment{myitemize}       {\itemize}       {\@newlistfalse\enditemize}     \makeatother     \begin{document}       % Empty Itemize       \begin{myitemize}       \end{myitemize}       % Next non-nested itemize environment (can be itemize/enumerate/description)        \begin{myitemize}         \item Arghh!       \end{myitemize}     \end{document}


title: Accented letters messed up in PDF readers navigator with LuaLaTeX

text: I have something like this:               \documentclass{beamer}     \usepackage{fontspec}     \begin{document}        \section{é}        \begin{frame}           test        \end{frame}     \end{document}      Problem is that the section name is messed up into the navigation bar of any PDF reader I tried (Okular on Linux, Acrobat Reader on Win, etc.). On the other hand the section name is printed correctly into the PDF itself (i.e. into the . table of contents, etc.) ![enter image description here](http://i.stack.imgur.com/PKFWE.jpg) Is there something I can do (in LaTeX) to fix this?


title: TikZ - Placing several numbers in one cell of a Sudoku grid

text: I've put at the end of this post one code coming from this page which is a pretty easy way to display Sudoku grid. I would like to have help so as to add the possibility to indicate several entries in one cell like in the following screenshot ? This is to indicate how to solve the sudoku without giving the answer. ![enter image description here](http://i.stack.imgur.com/hrxyx.png) **My question is about one TiKz way to produce at least the first preceding case with nine possibilities.** ## Code, from TeXample.net, that displays a Sudoku grid               \documentclass{article}         \usepackage{tikz}              \newcounter{row}         \newcounter{col}              \newcommand\setrow[9]{             \setcounter{col}{1}             \foreach \n in {#1, #2, #3, #4, #5, #6, #7, #8, #9} {                 \edef\x{\value{col} - 0.5}                 \edef\y{9.5 - \value{row}}                 \node[anchor=center] at (\x, \y) {\n};                 \stepcounter{col}             }             \stepcounter{row}         }               \begin{document}          \begin{tikzpicture}[scale=.5]       \begin{scope}         \draw (0, 0) grid (9, 9);         \draw[very thick, scale=3] (0, 0) grid (3, 3);              \setcounter{row}{1}         \setrow { }{2}{ }  {5}{ }{1}  { }{9}{ }         \setrow {8}{ }{ }  {2}{ }{3}  { }{ }{6}         \setrow { }{3}{ }  { }{6}{ }  { }{7}{ }              \setrow { }{ }{1}  { }{ }{ }  {6}{ }{ }         \setrow {5}{4}{ }  { }{ }{ }  { }{1}{9}         \setrow { }{ }{2}  { }{ }{ }  {7}{ }{ }              \setrow { }{9}{ }  { }{3}{ }  { }{8}{ }         \setrow {2}{ }{ }  {8}{ }{4}  { }{ }{7}         \setrow { }{1}{ }  {9}{ }{7}  { }{6}{ }              \node[anchor=center] at (4.5, -0.5) {Unsolved Sudoku};       \end{scope}            \begin{scope}[xshift=12cm]         \draw (0, 0) grid (9, 9);         \draw[very thick, scale=3] (0, 0) grid (3, 3);              \setcounter{row}{1}         \setrow { }{2}{ }  {5}{ }{1}  { }{9}{ }         \setrow {8}{ }{ }  {2}{ }{3}  { }{ }{6}         \setrow { }{3}{ }  { }{6}{ }  { }{7}{ }              \setrow { }{ }{1}  { }{ }{ }  {6}{ }{ }         \setrow {5}{4}{ }  { }{ }{ }  { }{1}{9}         \setrow { }{ }{2}  { }{ }{ }  {7}{ }{ }              \setrow { }{9}{ }  { }{3}{ }  { }{8}{ }         \setrow {2}{ }{ }  {8}{ }{4}  { }{ }{7}         \setrow { }{1}{ }  {9}{ }{7}  { }{6}{ }              \node[anchor=center] at (4.5, -0.5) {Solved Sudoku};              \begin{scope}[blue, font=\sffamily]           \setcounter{row}{1}           \setrow {4}{ }{6}  { }{7}{ }  {3}{ }{8}           \setrow { }{5}{7}  { }{9}{ }  {1}{4}{ }           \setrow {1}{ }{9}  {4}{ }{8}  {2}{ }{5}                \setrow {9}{7}{ }  {3}{8}{5}  { }{2}{4}           \setrow { }{ }{3}  {7}{2}{6}  {8}{ }{ }           \setrow {6}{8}{ }  {1}{4}{9}  { }{5}{3}                \setrow {7}{ }{4}  {6}{ }{2}  {5}{ }{1}           \setrow { }{6}{5}  { }{1}{ }  {9}{3}{ }           \setrow {3}{ }{8}  { }{5}{ }  {4}{ }{2}         \end{scope}       \end{scope}     \end{tikzpicture}          \end{document}


title: \newline causing TeX capacity exceeded error

text: I'm rigging up some code so that I get the references cited on a slide displayed directly in the `footline` of my beamer presentation, and I've run into an error that mystifies me. The code I have (which works) is this:               \def\framerefs{}     \def\interframerefs{}     \def\clearframerefs{\gdef\framerefs{}\gdef\interframerefs{}}          \def\cite#1{\xdef\framerefs{\framerefs\interframerefs#1}\gdef\interframerefs{~}}     \defbeamertemplate{footline}{footline refs}{         \hbox{\begin{beamercolorbox}[wd=\paperwidth,dp=1ex]{refs in foot}%             \framerefs         \end{beamercolorbox}}%         \clearframerefs     }     \setbeamerfont{footline}{size=\normalsize}     \setbeamertemplate{footline}[footline refs]      But if I want each reference on a separate line, and change `\cite` to be:               \def\cite#1{\xdef\framerefs{\framerefs\interframerefs#1}\gdef\interframerefs{\\}}      The compilation fails with a capacity exceeded error:               ! TeX capacity exceeded, sorry [main memory size=3000000].     <argument> ...le }\framesubtitle }\framesubtitle }                                                       \framesubtitle }\framesubt...      I find it a bit odd that having a space be the separator works fine but newlines explode (same thing happens with `\newline`). Does someone know what's wrong (or a better way to do the newline-separated list thing I want to do?


title: Different space between \align and \equation

text: Why produce the `align` and the `equation` environment different space between the text. And what can I do, that it have the same?               \documentclass{article}     \usepackage{amsmath}          \begin{document}          Long Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text          \begin{align}      1+1=2     \end{align}          Again a long text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text          \begin{equation}      1+1=2     \end{equation}          Another Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text, Text          \end{document}


title: How to cite a section of a Constitution

text: My question is pretty much what the title says. I'm using biblatex and having a very tough time figuring out what the proper way is to cite a particular article, section, etc of the Constitution (I'm actually working on the California Constitution, but it's the same question). None of the biblatex entry types seem to ask for the proper information.


title: Tikz-cd and snake lemma: "loseness" and centered figures

text: I have to draw a snake lemma, as here: snake lemma. The code is               \documentclass{article}         \usepackage{tikz-cd}         \usepackage{amsmath}         \DeclareMathOperator{\Tor}{Tor}         \begin{document}         \begin{tikzcd}                   \cdots \rar   & \Tor_3^A(A, M) \rar & \Tor_3^A(K,M) \rar & \Tor_3^A(K/A,M) \ar[out=0, in=180, looseness=2]{dll}   & \\                         & \Tor_2^A(A, M) \rar & \Tor_2^A(K,M) \rar & \Tor_2^A(K/A,M) \ar[out=0, in=180, looseness=2]{dll}   & \\                         & \Tor_1^A(A, M) \rar & \Tor_1^A(K,M) \rar & \Tor_1^A(K/A,M) \ar[out=0, in=180, looseness=2]{dll}   & \\                         & A \otimes_A M  \rar & K \otimes_A M \rar & K/A\otimes_A M \rar                    & 0             \end{tikzcd}     \end{document}      The resulting diagram is shifted on the very right side of the page. The more I increase the value of looseness the more the figure is shifted. How can I center the figure?


title: Modifying \title without recursion problem

text: ## EDIT: Much shorter problem definition Having defined a title by               \title[short]{long}      how can I later add something to the title? The simple assumption               \title[\insertshorttitle]{\inserttitle plus x}      obviously does not work due to recursion. I managed to get a version working using \expandafter with only the full title:               \expandafter\title\expandafter{\inserttitle plus x}      But so far I haven't found out how to also include the short title in this. Also, adding something before \inserttile does not seem to work either, only after inserttitle. ## Original Question: In our group, we are required to use a given beamer class for presentations. Unfortunately. the vertical placement of the title is bad for titles that use two lines. As we cannot modify the beamer class itself, we use a slightly dirty hack to move the title into an appropriate position with a vspace. I would like to automate this hack and make it transparent to the other users. So far, I have come up with the following solution that can be included at the beginning of a presentation (as a package for example):               \newlength{\ITI@titleheight}     \newcommand{\ITI@computeheight}{...}     \newcommand{\ITI@titleoffset}{\vspace*{\ITI@titleheight}}     \g@addto@macro\beamer@lastminutepatches{\ITI@computeheight\expandafter\title\expandafter{\expandafter\ITI@titleoffset\inserttitle}}      Basically the following happens: At the beginning of the beamer presentation, the macro \ITI@computeheight is expanded and computes an offset height \ITI@titleheight. I have left out the details of the macro as they are not important. Then, \title is redefined, basically only a \vspace command is added to the previous title. My current problem is that with the redefinition of the title, the short title gets lost. And I have no clue how to correctly use \expandafter or other commands to make it work. The following code works when using a predefined short title (1 in this case):               \g@addto@macro\beamer@lastminutepatches{\ITI@computeheight\expandafter\title\expandafter[\expandafter1\expandafter]\expandafter{\expandafter\ITI@titleoffset\inserttitle}}      But when actually using \insertshorttitle, Latex gets into an infinite loop as it wants to expand the new short title over and over again:               \g@addto@macro\beamer@lastminutepatches{\ITI@computeheight\expandafter\title\expandafter[\expandafter\insertshorttitle\expandafter]\expandafter{\expandafter\ITI@titleoffset\inserttitle}}


title: garamond (main) and mathpple (greek symbols)

text: i'm using GARAMOND font. But i would like some greek symbols to take from MATHPPLE. I think it's enough to write a command like "\DeclareMathSymbol{\Pi}{\mathalpha}{Letters}{5}". But i coldn't find the correct command. maybe there are similar answers but i couldn't use them. Thanks in advance.


title: Figures not appearing in preview pane

text: I am using gummi 0.6.5 and the preview pane does not show eps files Example               \documentclass{article}     \usepackage[dvips]{graphicx}          \begin{document}     \begin{figure}     \includegraphics[width=1\hsize]{./fig1.eps}     \caption{sds}     \label{fig1}     \end{figure}          \end{document}      Build log is ok (no errors) but the figure does not show in the preview pane. Compilation steps are Tex - Dvi- PS- PDF


title: \lstinputlisting of a whole java project

text: I'd like to print the complete source code of my java project, which has multiple `.java` files in several packages (i.e. folders), many `.properties` files and many `.xml` files, and others. I want to use `\lstinputlisting` from the `listings` package but I don't want to add these commands one by one to the document. The alternative would be to write some script that generates a file with those `\lstinputlisting` commands for all files, however I'd rather want to know if such a program already exists.


title: How to create tagged PDF?

text: How to create tagged PDF such that they will be:   1. good enough for PDF/UA   2. "reflowable" on smaller screens and ebook readers Any syntax & any engine will do. Preferably using LaTeX with [Xe|pdf]latex engines.


title: Create a command for 'menu sequences'

text: I'm trying to create an extendable command that can take in a single argument (possibly in the following form):               \menuentry{File:New:Class}      And generate something like:               \texttt{File -> New -> Class}       The issue is that the arguments have to be flexible. I should be able to provide any depth of menus. The reason for doing this is that I might want to change the formatting later on and I don't want to have to replace all the `texttt`s manually.


title: TeXnicCenter and MiKTeX

text: I am using MiKTeX 2.9 and TeXnicCenter and it really worked fine. Unfortunately, without any obvious reason I cannot TeX files anymore. The following error occurs: > Bibtex couldn't find `xxx.aux` Has anyone had the same problem? What goes wrong?


title: Wrong location image in EPS file

text: I produce an EPS figure with Gnuplot, with the command:               set term post solid rounded enhanced  color 'Helvetica, 16'     replot      I need to plot this figure on a poster which I am writing with LaTeX. I am writing the poster with the multicolumn environment, which doesn't recognise the command `\begin{figure}` (probably this is not essential to answer my question). I am able to upload the figure, but I have the following problem: the image appears only in a corner of the figure, the remaining part of the figure is empty. I think it is a problem with the EPS file, as I find the same problem when I try to print directly the EPS file from the printer: when I open the file, the image correctly covers the whole "paper", but when I print it the image is located in a small corner of the A4 paper. Can anyone help me? It's one day I am trying to solve this problem!!


title: Best practices references

text: What resources (online or otherwise) exist that give good advice on _best practices_ for TeX, etc.? I'm looking particularly for things that assume you already know TeX or LaTeX, and aim to help you achieve better results, with rationales explained. Resources with some specific focus are welcome. I'll start a list with two suggestions of my own so you can see what I mean. Somewhat to my surprise I haven't found this question asked here already. (Please point me to it if I'm wrong!) Note that what I'm asking is somewhat different from What is the best book to start learning LaTeX? and What are other good resources on-line for information about TeX, LaTeX and friends?, although there's lots of room for overlapping answers.


title: In WinEdt 6, how do I highlight a block of just typed text with no effect on the compiled document?

text: I hope WinEdt6 is recognised as one of the best LaTeX's friends. I write my latex stuff, and when a para is considered done, I want to \done{the completed para text} so that it differ from what I type next in say ink and background color. When the next para is done I do \done{another completed para text} and so on. I define \done as "doing nothing" command \newcommand{\done}{} as I do not want any changes to my compiled document - only to ease my writing by visually separating the "done" from "yet to be done". How do I do that with WinEdt 6, perhaps using switches? Any ideas?


title: "and" in Author Name

text: I was sure to find the answer to this rightaway, but somehow it didn't show up. I'm trying to add an organization as an author with "and" inside the name. Like:               @MISC{secfindings,         author = {Securities and Exchange Commission (SEC)},     }      this should show up as: Securities and Exchange Commission (SEC). (2011). etc... I'm using the apacite package.


title: Size of the appendix title for report

text: Is there any way I can reduce the font size of the Appendix title. Default one is creating the font size of the chapter.               \documentclass[12pt,twoside,onecolumn]{report}      \usepackage[toc,page]{appendix}      \begin{document}            Some text: abcdef             \appendix             \chapter{Appendix A: blah1}                          has some equations whose numbering should be A.1            \chapter{Appendix B: blah2}                          has some equations whose numbering should be B.1          \end{document}      My current issue is I defined the appendix with \chapter and this is giving the chapter font. So I wanted to reduce this font. a) Using local sizing using \small \LARGE are actually working. However, the header of the page is assigning to the same \small or \LARGE font size. b) When I use \section{Appendix A} , I am getting the quation numbers as 0.1.1, etc. Your inputs are greatly appreciated.


title: Number of intersection points

text: In this examle from pgfmanual p 132, how to use `\t` the number of intersections point outside `\fill` command. I tried `\def\Nb{\t}` but it dosen't work.               \begin{tikzpicture}     \clip (-2,-2) rectangle (2,2);     \draw [name path=curve 1] (-2,-1) .. controls (8,-1) and (-8,1) .. (2,1);     \draw [name path=curve 2] (-1,-2) .. controls (-1,8) and (1,-8) .. (1,2);     \fill [name intersections={of=curve 1 and curve 2, name=i, total=\t}]           [red, opacity=0.5, every node/.style={above left, black, opacity=1}]           \foreach \s in {1,...,\t}{(i-\s) circle (2pt) node {\footnotesize\s}};     \end{tikzpicture}


title: How to add references to images in beamer

text: I need to add references to some images included in my beamer presentation (via `pgfuseimage`) as these images are not mine but taken from some other sources. Which ways are there to do this, what would be the best practice? Of course I can try to manually add footnotes or manually put some `\cite` commands near the images. But I'd like to have a better solution that gives consistency throughout the presentation. And that preferably allows for later tweaking of the appearance, e.g. changing from references in the footnote to references in captions etc. Are there way to do this or packages that might help? The references would need to show up on the very frame the image is used, not in some bibliography list at the end of the talk.


title: Accessing the logic values of a TikZ coordinate

text: In TikZ accessing the coordinate values of a node can be done using the `let` syntax of the `calc` library or using the PGF command `\pgfpointanchor`. However, this values are dimensions/lengths in points and not the values of the used coordinate system. For example, I like to label certain points and nodes in the graph with their logical coordinate values, e.g. in a standard `tikzpicture`, i.e. with `x=1cm,y=1cm` in effect, a point at `(1,2)` should be labeled with `(1,2)` not with `(28.4527pt,56.9055pt)`. The nodes are not positioned manually, but using the various relative positioning techniques of TikZ, so I don't know the coordinates myself. This is about normal 2-D XY coordinate systems with orthogonal X and Y axes. The way I do this at the moment is to get the length of a unit vector in points and divide the coordinate lengths with it to calculate the corresponding value of the used coordinate system. This works OK, but of course results in rounding errors, e.g. 1.9998 instead of 2. I then use the `\num` function of `siunitx` to round the numbers to a fitting number of digits. _My question:_ Is there a better way to achieve this for arbitrary TikZ coordinates?   I mean something more user-friendly and maybe provided by TikZ itself (I didn't found anything in the manual). Especially: Can TikZ/PGF round the number as well without an extra package? A guess TikZ converts coordinates always quickly to length, so that rounding errors are unavoidable (except using `x=1pt,y=1pt` maybe). Here my proof-of-concept solution. It is very inflexible at the moment because it only works for nodes.               \documentclass[png]{standalone}     \usepackage{tikz}     \usetikzlibrary{intersections}     \usepackage[round-mode=places]{siunitx}          \makeatletter     \newcommand\xcoord[2][center]{{%         \pgfpointxy{1}{1}%         \@tempdima=\pgf@x         \pgfpointanchor{#2}{#1}%         \@tempdimb=\pgf@x         \pgfmathparse{\@tempdimb/\@tempdima}%         \num{\pgfmathresult}%     }}     \newcommand\ycoord[2][center]{{%         \pgfpointxy{1}{1}%         \@tempdima=\pgf@y         \pgfpointanchor{#2}{#1}%         \@tempdimb=\pgf@y         \pgfmathparse{\@tempdimb/\@tempdima}%         \num{\pgfmathresult}%     }}     \makeatother          \begin{document}     \begin{tikzpicture}         \draw [help lines] (0,0) grid [step=1] (2,4);         \draw [name path=A] (0,0) -- (2,4);         \draw [name path=B] (2,0) -- (0,4);         \draw [name intersections={of=A and B}]             (intersection-1)             node [right] {(\xcoord{intersection-1},\ycoord{intersection-1})}             circle (2pt);     \end{tikzpicture}     \end{document}      ![Result](http://i.stack.imgur.com/O3HbU.png)


title: Prevent line breaking in inline math, but allow flexible spacing

text: How can I easily tell Latex to **prevent line-breaks inside a part of an inline formula, without affecting inter-word spacing**? * * * Writing something like `$ab(c+d)$` in Latex is bad: Latex might put a line break after `+`. But I do _not_ want to disable line breaks after a `+` globally; it is perfectly fine to have a line break in `$abc+def$`. Therefore I have followed the approach mentioned in this thread: simply **add extra braces**. In principle, this is great. I can write things like `${ab(c+d)}$` and `$abc+{de(f+g)}$` to control which parts of an inline equation are "atomic" in the sense that Latex must not add line breaks inside them. Unfortunately, there seems to be an unwanted side effect: Latex typesets `${a+b}$` and `$a+b$` in the middle of a fully-justified line of text in different ways. If I write `$a+b$`, Latex seems to add **"flexible" spaces** around `+`: just like regular inter-word spaces, Latex can slightly adjust the spacing so that a fully-justified paragraph looks good. However, if I write `${a+b}$`, Latex seems to use fixed-width spaces around `+`. This answer mentions that one possible approach is to write something like `$a+\nobreak b$`, but this gets tedious and error-prone, even with some macros. I would like to "mark" a certain part of an inline equation as a "nobreak-zone". How can I do that, with the least amount of extra code? Ideally, I would like to write something like `$abc + \x{de(f+g)}$`, where `\x` is a macro that prevents line breaks but allows flexible spacing. * * * An example:               \documentclass[a4paper]{article}          \begin{document}         Foobar $aaaa+bbbb+cccc+dddd+eeee+ffff+gggg$ foobar foobar foobar foobar         foobar $aaaa+bbbb+cccc+dddd+eeee+ffff+gggg$ foobar foobar foobar.              Foobar ${aaaa+bbbb+cccc+dddd+eeee+ffff+gggg}$ foobar foobar foobar foobar         foobar ${aaaa+bbbb+cccc+dddd+eeee+ffff+gggg}$ foobar foobar foobar.          \end{document}      Produces: ![example](http://i.stack.imgur.com/SkLh8.png)


title: How to access package internal values?

text: Please feel free to change the title of this question since I'm not sure if it's fitting. For example, I'd like to draw a rule with the same height as the thickness of a frame line of a standard `tcolorbox`. I had a look at the `tcolorbox` package code, and I assume that the line `leftrule/.store in=\kvtcb@left@rule` is somehow essential for what I want. But if I try               \documentclass{article}          \usepackage{tcolorbox}          \begin{document}          \noindent\rule{\textwidth}{\kvtcb@left@rule}          \end{document}      it doesn't work and LaTeX returns the error `! Undefined control sequence.`. So my more general question is: How can I access package internal values like this to use them in my document?


title: marginfix makes KOMA's \marginline flush towards the outside, rather than the inside?

text: The `marginfix` package seems to do something funny to KOMA's `\marginline` command. Here is an MWE:               \documentclass[mpinclude=true]{scrbook}     \usepackage{lipsum}     \usepackage{marginfix}     \newcommand\mnote[1]{\marginpar{\ifthispageodd{\raggedright}{\raggedleft} #1}}     \begin{document}     \lipsum[1]     \marginline{Hereabouts is some text}     \mnote{Hereabouts is some text}     \lipsum[3-4]     \vspace{4\baselineskip}     \lipsum[5]     Notes here     \marginline{Hereabouts is some text}     \mnote{Hereabouts is some text}     \end{document}      Comment out `\usepackage{marginfix}` and things are flushed left on odd pages, right on even pages like I expected them to be. `marginfix` seems to reverse this behaviour (things are flushed away from the text block). Is this a bug? The same thing happens in `scrarctcl`: marginfix makes things flush right instead of flush left. What's weird is that if you define your own command to do more or less exactly what `\marginline` is supposed to do like so:               \newcommand\mnote[1]{\marginpar{\ifthispageodd{\raggedright}{\raggedleft} #1}}      Then things work as expected. What is going on? ![marginfix notes aligned wrong](http://i.stack.imgur.com/zFrHO.png) Looking at the image closely, the marginfix version isn't even aligned! In case this is just a package version conflict thing, here's a `\listfiles`:                *File List*      scrbook.cls    2009/07/24 v3.04a KOMA-Script document class (book)     scrkbase.sty    2009/07/24 v3.04a KOMA-Script package (KOMA-Script-dependent basics and keyval usage)      scrbase.sty    2009/07/24 v3.04a KOMA-Script package (KOMA-Script-independent basics and keyval usage)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     scrlfile.sty    2009/03/25 v3.03 KOMA-Script package (loading files)     tocbasic.sty    2009/06/08 v3.03b KOMA-Script package (handling toc-files)     scrsize11pt.clo    2009/07/24 v3.04a KOMA-Script font size class option (11pt)     typearea.sty    2009/07/24 v3.04a KOMA-Script package (type area)       lipsum.sty    2005/01/26 v1.0 150 paragraphs of Lorem Ipsum dummy text     marginfix.sty    2010/08/28 v0.9.1 Fix Margin Paragraphs      ***********


title: Which are your "favourite" confusing error messages?

text: This question: \addvspace can't replace \vspace shows a situation in which an error message can be confusing. If `\addvspace` is used when not in vmode the error message obtained is               ! LaTeX Error: Something's wrong--perhaps a missing \item.      which can be seen, for example, compiling the following simple example               \documentclass{article}     \begin{document}     a\addvspace{3em}     \end{document}      in this case, the error message is not really descriptive and could be misleading. The definition of `\addvspace` (Section **16.5 Vertical spacing** in `source2e`) explains what's going on:               \def\addvspace#1{%       \ifvmode         \if@minipage\else           \ifdim \lastskip =\z@             \vskip #1\relax           \else           \@tempskipb#1\relax             \@xaddvskip           \fi         \fi       \else         \@noitemerr       \fi}      so when \addvspace is used not in vmode, `\@noitemerr` is called producing the mentioned error message, as can be seeing in `lterror.dtx`.               \gdef\@noitemerr{%     <!autoload> \@latex@error{Something's wrong--perhaps a missing %     <!autoload> \protect\item}\@ehc}     <autoload> \@autoerr\@noitemerr}        Which other situations have you encountered in which the error message obtained seems confusing and (apparently) not related to the problem originating the error? I would suggest to accompany each answer with the textual error message, a minimal example code producing the error, and a brief explanation of why that is the error message.


title: white space before \citep Macro

text: I am working on big book and need to ensure that all citations have a white space before them. I tried                \let\citep ~\citep      But that does not seem the right thing to do. Could you please help. Cheers


title: How do you keep track of your code snippets?

text: If you've been working with LaTeX for any amount of time, I'm sure you've picked up several little tricks and snippets of code that you want to reuse. For example, a particular way to set up a package like `listings` or `hyperref` just the way you like it. Or a little trick for modifying some aspect of the formatting (One of my personal favourites is this trick). Now, you don't want to keep going back to an old `.tex` file to try to find how to do something. The question is: how do you keep track of all these snippets?


title: Big table with rotated column labels using booktabs

text: I'm trying to get a big table to fit into my document using the booktabs package, but it is too wide. An example of a couple of rows of the table is given below. I'm using the `\noindent\makebox[\textwidth]{%` line because that seemed to work for me before, but its not helping now. Example:               \usepackage{graphicx}       \usepackage{booktabs}            \begin{document}            \begin{table}       \small       \begin{center}       \noindent\makebox[\textwidth]{%       \begin{tabular}{lcccccccccccccccccc}       \toprule       Event & \multicolumn{2}{c}{Counts}& \multicolumn{8}{c}{Genres} &\multicolumn{8}{c}{Genres blabla} \\       \cmidrule(r){1-1} \cmidrule(r){2-3} \cmidrule(r){4-11}\cmidrule(r){12-19}       &&&&&&&&&&&&&&&&&&\\       \midrule       Test1 & 138 & 8 & 0 & 0 & 60 & 4 & 61 & 4 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 16 & 0\\       Test2 & 162 & 136 & 0 & 0 & 71 & 63 & 89 & 72 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 2 & 1\\       Test3 & 161 & 120 & 0 & 0 & 66 & 40 & 85 & 77 & 0 & 0 & 0 & 0 & 0 & 0 & 6 & 3 & 4 & 0\\       Test4 & 122 & 109 & 0 & 0 & 55 & 48 & 63 & 61 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 3 & 0\\       Test5 & 126 & 3 & 1 & 0 & 45 & 1 & 36 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 43 & 1\\       \bottomrule     \end{tabular}     }     \end{center}     \end{table}          \end{document}      And secondly, on the `&&&&&&&&&&&&&&&&&&\\\` line, I need to add the column names. But these are quite long, so i would like to have them rotated about 45 degrees and close to eachother. I tried `\rotatebox{45}{sentence1} & \rotatebox{45}{sentence2} & ... ,` but that doesn't do exactly what I want. Using `\rotatebox`, the head of `sentence2` will start where the tail of `sentence1` ended. I would like the head of `sentence2` to be right next to the head of `sentence1`. Below is an example of what i mean. When this code is compiled, there is a big spacing between the 3 headings. I would like the word "this" of the second heading to be right next to the "this" of the first one. etc.               \documentclass[12pt]{article}     \usepackage{graphicx}          \begin{document}      \begin{table}       \begin{tabular}{ccc}     \rotatebox{45}{This is a very long heading} & \rotatebox{45}{This is a very long heading} & \rotatebox{45}{This is a very long heading}     \end{tabular}     \end{table}     \end{document}      I hope that makes sense


title: How to write a book in LaTeX?

text: I wish to turn several of my blog article series into a PDF e-book but I have never used LaTeX before for creating books. For example, I want to take my Awk One-Liners Explained article series, improve it and turn it into a book. I'll probably start with this guide that I found - http://www.math.mun.ca/~edgar/thesis.html But that is just a small template. Any other tips, tricks and suggestions for doing it?


title: Full width text shifts all marginfix-ed floats off the page to the right

text: I'm using `marginfix` to fix the positioning of sidenotes in some Tufte documents, but whenever a page contains any text in a fullwidth environment, all marginal material on that page is shifted to the right, so that while it is positioned "correctly" relative to the full width text, it overflows the page and is shifted away from all regular width text:               \documentclass[]{tufte-handout}     \usepackage{marginfix}     \begin{document}     This is text before some full width text. The footnote that goes with it is way over there.\footnote{This note goes with the text before the full width text.}     \begin{fullwidth}This is some full width text. Its presence on a page using \texttt{marginfix} pushes all notes to the right off the page.\end{fullwidth}     This is some other text, after the full width text, and its note is also way over there.\footnote{This note goes with the text after the full width text.}     \end{document}      Is there a way to prevent this behavior when using `marginfix`, perhaps by patching Tufte or wrapping the fullwidth environment?


title: Regular Expression AST with forest or qtree

text: I would like to represent an abstract syntax tree over a regular expression. Preferable in the form of the following tree:                                           <regexp>                                    |                                    |                                    |                       (seq <regexp> <regexp>)                              /          \                             /            \                            /              \     (seq <regexp> <regexp>)                (seq <regexp> <regexp>)             |        |                             |        |             |        |                             |        |             |        |                             |        |         (atom 1)  (atom 2)                     (atom 3)  (atom 4)      I have looked at both `tikz-qtree` and `forest`, but while the last package looks very powerful I'm not quite sure how I'd make it do what I want. Any tips or ideas on how tackle this?


title: What is "%&-line parsing enabled"?

text: My `latex` logs begin with                %&-line parsing enabled      What does it mean?


title: reduce vspace after section header

text: I am currently using the the scrartcl document class and glossaries for acronyms:               \documentclass[12pt,a4paper,headsepline,notitlepage,parskip=half]{scrartcl}      \usepackage[nonumberlist,acronym]{glossaries}      Further in the document I am using this               \section{Abkürzungen}     \glossarystyle{longheaderborder}     \printglossary[type=\acronymtype,title={}]      to have a numbered Section "Abkürzungen" in the table of contents. This works ok so far. However the spacing between the Section "Abkürzungen" and the listing of the acronyms is too large. I reduce this spacing by using \vspace*{-15mm} but I think there must be a better way. Is there a way to reduce the space after the section heading by the exact space which is normally used for spacing headers and text (I don't know how to achieve that in latex)? **Edit:** I think I wasn't clear enough on what I want to achieve: For the section "Abkürzungen" _only_ , the vspace is too large. For all other sections, scrartcl's vspace is fine. I would like to reduce the vspace between the section heading and the text for just one section. I know that by using an empty title `\printglossary[type=\acronymtype,title={}]` I effectively get an empty title (and it seems it is using the space even though it is empty), but I couldn't figure out how to put a title in `\printglossary` which is also visible as a numbered section in the table of contents.


title: Asymptote generates different output whether running in interactive mode or from pdflatex

text: I would like to make 3d pictures and put them side-by-side. I can do that nicely creating a file `example.asy`:               settings.render=1;     import graph;     import graph3;     import contour3;          material reds =  material(diffusepen=0.7red,ambientpen=red,emissivepen=0.3*red,specularpen=0.95white,shininess=0.95);     material blues = material(diffusepen=0.7blue,ambientpen=blue,emissivepen=0.3*blue,specularpen=0.95white,shininess=0.95);          int numberlines=8;          defaultrender.merge=true;     defaultrender.tessellate=true;     defaultrender.compression=Low;          picture p1,p2;     size(p1,100);     size(p2,100);          real f(real x, real y, real z) {return y^2+x-2;}     real c(real x, real y, real z) {return 2*x+2*z -2;}          draw(p1,surface(contour3(f,(-3,-3,-3),(3,3,3),numberlines)),reds);     draw(p1,surface(contour3(c,(-3,-3,-3),(3,3,3),numberlines)),blues);     draw(p2,surface(contour3(f,(-3,-3,-3),(3,3,3),numberlines)),reds);     draw(p2,surface(contour3(c,(-3,-3,-3),(3,3,3),numberlines)),blues);          currentprojection=orthographic(camera=(9,10,4),up=Z,target=O,zoom=1);     add(p2.fit(currentprojection),(0,0),W);     currentprojection=orthographic(camera=(0,7,7),up=Z,target=O,zoom=1);     add(p1.fit(currentprojection),(0,0),30E);      The result is the same 3d image from two different points of view: ![enter image description here](http://i.stack.imgur.com/NlflG.png) However, if I try to reproduce that in a LaTeX document, I get two repeated copies of the second image (in this case the projection with camera at (0,7,7)): ![enter image description here](http://i.stack.imgur.com/Hz1iN.png) This is the LaTeX code I'm using:               \documentclass{article}          \usepackage[inline]{asymptote}          \begin{asydef}     settings.outformat="png";     settings.render=1;     import graph;     import graph3;     import contour3;          material reds =  material(diffusepen=0.7red,ambientpen=red,emissivepen=0.3*red,specularpen=0.95white,shininess=0.95);     material blues = material(diffusepen=0.7blue,ambientpen=blue,emissivepen=0.3*blue,specularpen=0.95white,shininess=0.95);          int numberlines=8;          defaultrender.merge=true;     defaultrender.tessellate=true;     defaultrender.compression=Low;     \end{asydef}          \begin{document}     \begin{asy}         picture p1,p2;         size(p1,100);         size(p2,100);              real f(real x, real y, real z) {return y^2+x-2;}         real c(real x, real y, real z) {return 2*x+2*z -2;}              draw(p1,surface(contour3(f,(-3,-3,-3),(3,3,3),numberlines)),reds);         draw(p1,surface(contour3(c,(-3,-3,-3),(3,3,3),numberlines)),blues);         draw(p2,surface(contour3(f,(-3,-3,-3),(3,3,3),numberlines)),reds);         draw(p2,surface(contour3(c,(-3,-3,-3),(3,3,3),numberlines)),blues);              currentprojection=orthographic(camera=(9,10,4),up=Z,target=O,zoom=1);         add(p2.fit(currentprojection),(0,0),W);         currentprojection=orthographic(camera=(0,7,7),up=Z,target=O,zoom=1);         add(p1.fit(currentprojection),(0,0),30E);     \end{asy}     \end{document}      This is with asymptote 2.15.2. How can I get, from LaTeX, the same output I got by running `asy -V` from the command line?


title: Tikz Stacked Bar Chart with Text

text: I have the following stacked bar chart and want to put some text behind each bar element and some text into each of the colored areas. ![Stacked Bar Chart](http://i.imgur.com/6pZ1rY2.png) Do you have some ideas, how I could achieve that? The following latex example shows, how the figure can be generated:               \documentclass{article}          \usepackage{xcolor}     \usepackage{tikz}     \usepackage{pgfplots}          \definecolor{findOptimalPartition}{HTML}{D7191C}     \definecolor{storeClusterComponent}{HTML}{FDAE61}     \definecolor{dbscan}{HTML}{ABDDA4}     \definecolor{constructCluster}{HTML}{2B83BA}          \begin{document}     \begin{figure}     \centering     \begin{tikzpicture}     \begin{axis}[         xbar stacked,         legend style={         legend columns=4,             at={(xticklabel cs:0.5)},             anchor=north,             draw=none         },         ytick=data,         axis y line*=none,         axis x line*=bottom,         tick label style={font=\footnotesize},         legend style={font=\footnotesize},         label style={font=\footnotesize},         xtick={0,100,200,300,400,500,600},         width=.9\textwidth,         bar width=6mm,         xlabel={Time in ms},         yticklabels={A, B, C, D, E, F},         xmin=0,         xmax=600,         area legend,         y=8mm,         enlarge y limits={abs=0.625},     ]     \addplot[findOptimalPartition,fill=findOptimalPartition] coordinates     {(20,0) (108,1) (5,2) (3,3) (108,4) (20,5)};     \addplot[storeClusterComponent,fill=storeClusterComponent] coordinates     {(1.4,0) (2,1) (5,2) (3,3) (2,4) (1,5)};     \addplot[dbscan,fill=dbscan] coordinates     {(288,0) (358,1) (5,2) (3,3) (358,4) (288,5)};     \addplot[constructCluster,fill=constructCluster] coordinates     {(6,0) (54,1) (5,2) (3,3) (54,4) (6,5)};     \legend{S, T, Q, R}     \end{axis}       \end{tikzpicture}     \caption{X}     \label{fig:stats}     \end{figure}     \end{document}


title: Want to make the following shape function in TikZ?

text: Want to make the following shapes function in TikZ![enter image description here](http://i.stack.imgur.com/JoayO.jpg)               \begin{tikzpicture}     \tikzstyle{every node}=[draw,shape=circle];     \draw (0,0)  --   (0,1)  node {1};     \draw (0,1)  --   (1,1)  node {2};     \draw (1,1)  --   (1,0)  node {3};     \draw (1,0) --    (0,0)  node {4};     \end{tikzpicture}     \begin{tikzpicture}     \tikzstyle{every node}=[draw,shape=circle];     \draw (0,0)  -- ++  (1,1)  node {1};     \draw (1,1)  -- ++  (1,-1) node {2};     \draw (0,0)  --  ++ (2,0)  node {3};     \end{tikzpicture}


title: Changing border colors of all tables in a document

text: I have a document full of tables (think 8-10 tables) - already written. Some are tabulars, others are longtables. I do not want to substantially change the existing code. What is the fastest way (in terms of markup) to convert the colors of border and frame lines from black to a specified color? I have xcolor loaded? This is for a class file, and if a single redefinition of the internals of tabular or longtable could do it, that would be perfect. MWE:               \documentclass{article}     \usepackage{longtable}     \usepackage{xcolor}     \usepackage{lipsum}     \usepackage{hyperref}          \begin{document}          \lipsum[1]          \begin{tabular}{llll}\hline     Some & Thing & Here & Now \\\hline     1 & 2 & 3 & 4 \\\hline     \end{tabular}          \lipsum[2]     \begin{longtable}[l]{|p{2.5cm}|p{5.5cm}|p{6cm}} \hline     Word & Play & Table \\\hline     This & is & now \\\hline     That & was & then \\\hline     \end{longtable}          \lipsum[2]          \end{document}


title: How to connect relative polar coordinates in TikZ

text: I am trying to connect two points that are defined relatively to another point by polar coordinates. Consider the figure below. The goal is to connect B and C by the black line. However, my code does not achieve the correct result.               \begin{tikzpicture}[>=latex]         \coordinate (fov) at (0, 2);         \fill[red] (fov) circle (2pt) node[anchor=east] {A};         \draw[red] (fov) -- ++(295:2cm);         \draw[red] (fov) -- ++(335:2cm);         \fill[red] (fov)++(295:2cm) circle (2pt) node[anchor=east] {B};         \fill[red] (fov)++(335:2cm) circle (2pt) node[anchor=south] {C};         \draw (fov)++(295:2cm) -- (fov)++(335:2cm);      \end{tikzpicture}       ![enter image description here](http://i.stack.imgur.com/FPiQy.png) What am I doing wrong? NB: the final goal is to fill the triangle ABC.


title: bibtex fails with error: "document.blg: Forbidden to open for writing"

text: I am using a Windows Vista system. From the command line,               pdflatex ...document      works fine, with the expected errors about missing citations. It also reports: > No file document.bbl which I assume is ok, because I think document.bbl is to be created by bibtex. However, when I run bibtex I get the error > document.blg: Forbidden to open for writing I couldn't open file > ...document.blg I thought bibtex created and wrote its own log file (.blg); so I am confused about how to proceed.


title: Getting natbib to use numerical keys when the bibliography will be in a separate file.

text: I am using the `natbib` package in a collaborative (which means I can't jettison the use of natbib entirely) document. I want to get citations in numeric form in both the text and bibliography, i.e I'd like a reference to Jones et al to appear as `[15]` in the text and `[15] Jones et al ...` in the bibliography. Using the `numbers` option to natbib gets me the former, but with the `plainnat` or `abbrvnat` bibliography style I'm unable to get the latter. In fact I have to use `abbrv` and deal with some minor warnings. While I can get what I want to work, I'm wondering if I'm just not doing the right thing to get the desired behavior without kludging. **Update** : In response to the comment, I tried to create an MWE, and realized that the problem is possibly coming from a different source. This is part of a grant proposal, and so the references need to be separated from the main text. So the original document called `a.tex` contains               \documentclass{article}     \usepackage[numbers]{natbib}          \begin{document}     \citep{something}          \bibliographystyle{plainnat}     \bibliography{bibfile.bib}     \end{document}      and the file `references.tex` contained               \documentclass{article}          \begin{document}     \input{a.bbl}        \end{document}       If I compile a.tex directly to PDF, the referencing works fine. But if I compile it, and then compile references.tex to PDF, I get an author-year bibliography listing in references.pdf. I'll reiterate that there are other ways to do this (for example, I use the `pdfpages` package in my own documents to strip out the references). But for now I'm stuck with this setup, so I'd like to solve the problem with minimal change in workflow.


title: One symbol like \omegaup

text: Please see the below image, what is the TeX code for the left most symbol? It is like `\omegaup`, but looked thinner and a little italic. I have looked it through the file `symbols-a4.pdf` and didn't find it. If it is really in the file, please point it out and forgive my careless. ![one symbol like omegaup](http://i.stack.imgur.com/qdBdy.jpg)


title: Beamer \pause with TikZ

text: Is there a way to introduce parts of a `tikzpicture` with `\pause` or similar in Beamer without resorting to incrementally redrawing the `tikzpicture` over multiple frames? Intercalating TikZ draw commands with `\pause` commands creates new frames, but introduces (or in my case, using `\setbeamercovered{highly dynamic}`, fades in) the entire `tikzpicture`, which sort of makes sense, as the interior of a `tikzpicture` is not the normal environment for `\pause` commands.


title: Use hyperref to make bookmarks; how to include superscript

text: I used `hyperref` to make bookmarks. After reading `hyperref`'s manual, I got this example and it worked:               \section{Pythagoras:  \texorpdfstring{$ a^2 + b^2 = c^2 $}{ a\texttwosuperior\ + b\texttwosuperior\ =  c\texttwosuperior}}        Referring to this example, I used the following but it didn't work:               \subsection{Wind load \texorpdfstring{$\mathsf{Z^{STAAD}}$ -- Direction}{Z\textsuperscript{STAAD} -- Direction}}      Is anything wrong with my code or is there any other method to include superscripts in bookmarks, or is it impossible at all?


title: Using tilde `~` in csname in Beamer

text: In `beamer`, I would like to be able to use the tilde character `~` in the name of a command sequence. I tried with adjusting catcodes. While this was successful with the standard `article` class, it failed with `beamer`: Working `article` example:               \documentclass{article}     \begin{document}          \section{cs with tilde}          \catcode`\~=12%          \expandafter\def\csname cswith~\endcsname{foo}     cs value:\csname cswith~\endcsname.          \catcode`\~=13%          \end{document}      Beamer example producing `Missing \endcsname inserted` error:               \documentclass{beamer}     \begin{document}          \begin{frame}{cs with tilde}          \catcode`\~=12%          \expandafter\def\csname cswith~\endcsname{foo}     cs value:\csname cswith~\endcsname.          \catcode`\~=13%          \end{frame}     \end{document}      What am I doing wrong?


S himpunan. A(S)=\{f:S \to S \mid\text{f pemetaan satu-satu dan pada}\}, T\subsetneq{S}, H =\{f(t) \in{A(S)} \mid f(t) \in{T}; \forall{t \in{T}\}.      the output it doesnt work and there are information "missing $ inserted"... i dont know where is incorrect thank you


title: Remove numbering from `thebibliography` header

text: So I realize I'm asking for trouble with this question because of its unknown document class, but... I'm using my university's document class for my dissertation (a requirement), and thus it's not a standard class, such as `article` (it's `pittetd`). I'm using the package `natbib` and the command `thebibliography` for my references, and I've been told I need to get rid of the section number (it reads "4.0 Bibliography" currently, but should read "Bibliography" only). I've seen work-arounds that use `\chapter*` (or `\section*`) to suppress the numbering, but it doesn't work with this document class. It just ignores the asterisk, and the number remains. Two thoughts: 1) Is there a way to figure out the inner workings of the `pittetd` document class so as to find out how to suppress the numbering? 2) Should I use something other than `thebibliography` to be able to achieve this without having to worry about the document class? (Although I wouldn't want to use this option if it meant I had to go through my whole document and change the citation and reference styles.)


title: Beginner: Drawing using Tikz

text: I was quite impressed by the figures generated by TikZ and wanted to try TikZ to generate a few figures (please see the attached image drawn using an external WYSWYG program). When I tried to reproduce the figures myself using TikZ I found it very difficult to control the shapes in required positions. What is the simplest method to draw!these figures using TikZ? ![enter image description here](http://i.stack.imgur.com/meyE4.jpg)


title: Preparing a beamer poster: how to create a border box?

text: I am preparing a poster with LaTeX using `beamerposter`, following the examples of the beamerposter site. In these examples, the title is _themed_ with a background color. I would like to have the title framed in a box with a double border, each border with a different color. The following picture should explain it (zoom of the upper left corner of the poster): ![example header](http://i.stack.imgur.com/igKaX.png) In order to achieve this, I tried with a `beamercolorbox` or an `\fcolorbox`, but I could not create a border like above.                 \setlength{\fboxrule}{4pt}       \setlength{\fboxsep}{1pt}       \fcolorbox{white}{blue}{         \colorbox{white}{           Hello test         }       }      How can I create a box with a _configurable_ border? I say _configurable_ because I would like to control its thickness and color. * * * **Update** I have managed to _almost_ do this with tikz box, a minipage and another box. I think this might be a over-complicated solution. The question remains open since I am still having trouble with the border to the right, it disappears due to the width of the minipage.               \definecolor{ltsiBlue1}{rgb}{0.0,0.4,1.0}     \tikzstyle{titleouterbox} = [draw=ltsiBlue1, fill=white, line width=3pt,         rectangle, inner sep=3pt, inner ysep=3pt]     \tikzstyle{titleinnerbox} = [draw=white, fill=ltsiBlue1, line width=3pt,          text=white, rectangle, inner sep=13pt, inner ysep=13pt]     \begin{tikzpicture}     \node [titleouterbox] (box){%         \begin{minipage}{1.0\textwidth}           \begin{tikzpicture}             \node [titleinnerbox] (box){%               \begin{minipage}{1.0\textwidth}                 hello test               \end{minipage}             };           \end{tikzpicture}         \end{minipage}     };     \end{tikzpicture}%


title: Make a pdf with all references in a bibtex file

text: I have a Bibtex file and I am trying to get a pdf file that contains all the references without any text. My intention is to use it as a list of relevant literature. Of course I can just use `\nocite{ev, ery, thing}` but then I always have to add items as something changes in the bibtex file. Is there an easy way to tell latex to list all the items from my bibtex file? Thanks! :)


title: Combining two custom commands

text: I came across a problem when typing my report. I do not know how to fix this. The problem is as follows: I have two custom commands defined like this:               \newcommand{\slr}[1][n]{\ensuremath{{\bf SL}(#1,\mathbb{R})}}          \newcommand{\lie}[1][G]{\ensuremath{{\bf L}(#1)}}      So that the first command gives an output like `${\bf SL}(n,\mathbb{R})$` and the second command gives the output like `${\bf L}(G)$`. Here `$n$` and `$G$` are respectively the default arguments. Now when I use these two commands together, I hope to get               $${\bf L}({\bf SL}(2,\mathbb{R}))$$      However, for some reason what I am getting is               $$ {\bf L}({\bf SL}(2),\mathbb{R})$$      Any ideas of what is going on here?


title: How to define a parshape command with LaTeX?

text: I want to typeset a book with some `\parshape` command, for example:               \documentclass{article}     \usepackage{lipsum}          \begin{document}     \parshape=4     0.2\textwidth 0.8\textwidth     0.2\textwidth 0.8\textwidth     0.2\textwidth 0.8\textwidth     0pt \textwidth     \lipsum     \end{document}      But since the lines and width may changes frequently, so I want to define a command like this               \newcounter{foo}     \setcounter{foo}{0}     \newcommand{\MyParShape}[3]     {     \parshape=#1     \loop     #2\textwidth #3\textwidth      \addtocounter{foo}{1}     \if\thefoo<#1-1\repeat     0pt \textwidth     }      So I can call it like               \MyParShape{5}{0.5}{0.5}      or               \MyParShape{10}{0.8}{0.2}      But this does not work, I'm not an expert of TeX primitives, can somebody help?


title: Natbib: How can I generate the bibliography like this: Last name, First name.

text: I use natbib package to generate the bibliography, but I found the package put the first name of the author first, like L.H. Han. I hope the format can be in this way: Han, L.H. How can I change the format? Thanks! sample.bib:               @article{han2003experimental,       title={{An experimental study and calculation on the fire resistance of concrete-filled SHS and RHS columns}},       author={Han, L.H. and Yang, Y.F. and Xu, L.},       journal={Journal of Constructional Steel Research},       volume={59},       number={4},       pages={427--452},       issn={0143-974X},       year={2003},       publisher={Elsevier}     }      sample.tex               \documentclass[letterpaper, 12pt, titlepage, oneside, final]{report}     \usepackage{ifthen}     \usepackage{nomencl}     \usepackage{amsmath,latexsym,amssymb,amsbsy}     \usepackage[colon,sort&compress]{natbib}     \usepackage{float}     \usepackage[pdftex]{graphicx}     \usepackage{epsfig,subfigure}     \usepackage{epstopdf}          \begin{document}          Test\citet{han2003experimental}          \bibliographystyle{plainnat}     \renewcommand{\bibname}{Bibliography}     \bibliography{BibFile}     \addcontentsline{toc}{chapter}{\textbf{Bibliography}}     %----------------------------------------------------------------------     \end{document}


title: Beamer: Remove subsection bar in header

text: In the Antibes `beamer` theme, I want to remove the bar in the header where the name of the subsection is shown, since I have no subsections in my presentation. Does anyone have any idea how to do this?


title: LaTeX for netbook OSes

text: I'm considering buying a netbook for the express purpose of writing maths notes/articles (so as to not heft my Macbook around), hence (La)TeX is a must. The most obvious choice is to work with Linux, but failing that I was wondering if there is a LaTeX distribution for Chrome. And as I'm unfamiliar with the version/s of windows that appear on netbooks, would the usual distributions (MikTeX, say) work for them?


title: How to add a shift to tikz baseline.

text: I use the following code to draw a tikz image between some text:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{     calc     }          \begin{document}     Hello\tikz[baseline=(current bounding box.north)]\draw(0,0) circle (10pt);\LaTeX.     \end{document}      Then I want to add a little shift to it, for example               \tikz[baseline=(current bounding box.north)-5pt]\draw(0,0) circle (10pt);      But this have no effect. I also tried `yshift` or `transform canvas`, both does not work. Does anyone know how to solve this? thanks.


title: Minipage for two descriptions

text: I am attempting to use minipage to put two descriptions side by side. I have successfully used minipages for figures and tables, but for some reason this one won't work. Here is the code.               \begin{description}     \begin{minipage}{0.45\linewidth}     \item Risk Score Policy A     \begin{enumerate}     \item Maximum of four patients of rank 2     \item All remaining patients of rank 1     \end{enumerate}     \item Risk Score Policy A Alternate 1     \begin{enumerate}     \item Maximum of four patients of rank 2     \item All remaining patients of rank 1     \item Alternate patients of ranks 1 and 2     \end{enumerate}     \item Risk Score Policy A Alternate 2     \begin{enumerate}     \item Maximum of four patients of rank 2     \item All remaining patients of rank 1     \item All rank 2 patients first then all remaining rank 1     \end{enumerate}     \end{minipage}          \hspace{0.5cm}          \begin{minipage}{0.45\linewidth}     \item Risk Score Policy B     \begin{enumerate}     \item Maximum of two rank 3 patients     \item Maximum of two rank 2 patients     \item All remaining patients rank 1     \end{enumerate}     \item Risk Score Policy B Alternate 1     \begin{enumerate}     \item Maximum of two rank 3 patients     \item Maximum of two rank 2 patients     \item All remaining patients rank 1     \item Alternate rank 2+ patients with rank 1 patients     \end{enumerate}     \item Risk Score Policy B Alternate 2     \begin{enumerate}     \item Maximum of two rank 3 patients     \item Maximum of two rank 2 patients     \item All remaining patients rank 1     \item All rank 2+ patients first followed by all rank 1 patients     \end{enumerate}     \end{minipage}     \end{description}


title: How to avoid large margins around Matlab plot in PDF

text: I am preparing image files to be included in a latex document. The image file is generated by printing a Matlab plot. If I print the plot in eps format, the content of the eps file is fully occupied with the plot; if I print the plot in pdf format, then there are big margins above and below the plot in the pdf file; if I use ps2pdf to convert the eps file into a pdf file, the big margins will be added above the plot. I would like to use pdflatex, so I prefer pdf format of image files. I was wondering how I can save the plot in pdf format without the big margin above and below the plot?


title: \ifmmode self-contradictory in amsmath (OK in just LaTeX)

text: File:               \documentclass[11pt]{article}        \usepackage{amsmath}      \newcommand{\argghhh}{\relax\ifmmode\bar\else\expandafter\=\fi}          \begin{document}           $ \argghhh a $           \end{document}      produces error (but NOT if `\usepackage{amsmath}` is commented out):               LaTeX Warning: Command \= invalid in math mode on input line 7.          ! Please use \mathaccent for accents in math mode.     \add@accent ...@spacefactor \spacefactor }\accent                                                        #1 #2\egroup \spacefactor ...     l.7 $ \argghhh a                      $      Clearly this is math mode. But it chooses (1) `\=`, hence NOT math mode, then (2) complains about `\=` in math mode!


title: Poorly formatted newlistof with memoir

text: I am having trouble adding a `newlistof` to a memoir file. My example follows the memoir answer example very closely, but I get an ugly "List of Comments" -- spacing across the page and returns are wrong. Minimal TeX example below. As an uncredentialed user, I don't seem to be able to attach an image of the PDF. The appearance I get is a space after the comment number, the comment title, then no space and the comment page number; followed by no CR/LF between the first and second entry. I want the List of Comments to look much like the List of Figures. Running TexShop.               \documentclass[11pt,letterpaper,openany]{memoir} % for a short document           % Comment command     \newcommand{\listcommentname}{List of Comments}     \newlistof{listofcomments}{loc}{\listcommentname}     \newcounter{Comment}[chapter]     \renewcommand{\theComment}{\arabic{Comment}}     \newcommand{\Comment}[1] {         \refstepcounter{Comment}             \par\noindent\textbf{Comment \theComment.  #1.}         \addcontentsline{loc}{Comment}{\protect\numberline{\theComment}#1}\par}           \begin{document}     %     \frontmatter          \tableofcontents*\clearpage     \listoffigures\clearpage     \listofcomments\clearpage          \chapter*{Foreword}     \addcontentsline{toc}{chapter}{Foreword}          \mainmatter     \chapter{Introduction \& so on}     \Comment{Silly comment}     Here is a test comment.          \section{Example section}     And here is some text          \begin{figure}     \centering\mbox{Just text to generate a lof entry.}     \caption{Test figure}     \end{figure}          \clearpage          \Comment{Another silly comment}     Here is a second test comment, on a different page.          \end{document}


title: How to change font size in Index in memoir class?

text: Each time I build the index with `makeindex` I have to insert `\footnotesize` after `\begin{theindex}` in book.ind file. I use `memoir` class. Is there an automatic way to do this?


title: foreach within \draw, without giving the first point explicitly

text: I am plotting line given by y(x) expression evaluated at regularly spaced points, e.g.               \def\ffIiC{+0.0436275-1.18778*\x^1+0.542693*\x^2}     % ...     \draw (0,0.0436275) \foreach\x in {0,.1,...,4}{ -- ({\x},{\ffIiiC}) };     %     ^^^^^^^^^^^^^      However, I always need to specify the first point explicitly. Is there a way to avoid that?


title: Location of EPS file while inserting into LaTeX file

text: Where should my files be located for inserting them into LaTeX document. Please help me.               \begin{figure}       \centering       \includegraphics[scale=.87]{Plot_Left_Right.eps}         \caption{Banknote Left vs Right}     \end{figure}


title: Table of displayed formulae

text: I'm trying to make a table of formulae. I've tried a bunch of different approaches (including `\parbox`, `align`, `eqnarray`, etc.), but none of these satisfy all of the requirements:   * `\hline` (or something equivalent) can still be used.   * Vertical lines can be put between columns   * Every cell can contain a formula in `\displaystyle`   * Formulae are centered both horizontally and vertically. Does anybody know an environment that does this?


title: How do I wrap text that doesn't use SPACE character to segment word

text: As you know, there are many languages out there that don't use a SPACE character for word segmentation. For such language, special non-printable characters are used, such ZERO WIDTH NON JOINER or ZERO WIDTH SPACE characters. It seems XeTeX or XeLaTeX depends on SPACE characters only for the wrapping behavior. Is there a way to change this behavior? Are there packages out there that may help in this? Say, be able to specify characters that Tex can use to determine where to wrap text? If not, I wonder if this is something one can develop? Any pointers would be much appreciated!


title: How to refer to a chapter with a word

text: I would like to refer to my chapters with the notation "First Chapter", "Second Chapter" etc, rather than "Chapter 1", "Chapter 2", etc. How can I do this?               \documentclass{scrreprt}          \usepackage[english]{babel}      %Loaded here: microtype,graphicx,booktabs,caption,tabularx,hyperref,amsmath     \usepackage{classicthesis-preamble}     \usepackage{classicthesis}          % A personalization of description environment     \renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\small\textsc{#1}}          \begin{document}     \chapter{MyChapter}     \label{ch:first}          \begin{description}     \item [In the \ref{ch:first}] I yada yada yada     \end{description}          \end{document}


title: Keep float elements together

text: I have three tables in latex and I'm trying to put them right below each other. The first and the second table is displayed correctly but the third will go to another page. The code I have is this:               \floatsep -0.2pt plus 0.2pt minus 0.2pt     \begin{table}[ht]     \centering  % used for centering table     \begin{tabular}{|c |c| c| c| c|} % centered columns (4 columns)     \hline\hline                        %inserts double horizontal lines     \textbf{Atributo} & \textbf{Descripción} & \textbf{Tipo} & \textbf{Nulo} & \textbf{Clave primaria}\\ [1ex] % inserts table      %heading     \hline                  % inserts single horizontal line     Id & Identificador interno del objeto & INT & NO & SI \\ % inserting body of the table     \hline     Nombre & Nombre del cliente & VARCHAR(255) & NO & NO \\     \hline     Apellido1 & Primer apellido del cliente & VARCHAR(255) & NO & NO \\     \hline     Apellido2 & Segundo apellido del cliente & VARCHAR(255) & NO & NO \\     \hline     DIrección & Dirección donde reside el cliente & VARCHAR(255)  & NO & NO\\     \hline     Localidad & Localidad del cliente & VARCHAR(255)  & NO & NO\\     \hline     Provincia & Provincia del cliente & VARCHAR(255)  & NO & NO\\     \hline     Teléfono & Teléfono fijo del cliente & VARCHAR(9) & NO & NO\\     \hline     Móvil & Teléfono móvil del cliente & VARCHAR(9)  & NO & NO\\     \hline     Email & Dirección de correo del cliente & VARCHAR(255) & NO & NO\\     \hline %inserts single line     \end{tabular}     \label{Riesgos} % is used to refer this table in the text     \caption{Entidad:\textbf{ Cliente}} % title of Table     \end{table}     %\setlength{\floatsep}{0.6pt plus 0.6pt minus 0.6pt}      \floatsep -0.2pt plus 0.2pt minus 0.2pt     \begin{table}[ht]     \centering  % used for centering table     \begin{tabular}{|c |c| c| c| c|} % centered columns (4 columns)     \hline\hline                        %inserts double horizontal lines     \textbf{Atributo} & \textbf{Descripción} & \textbf{Tipo} & \textbf{Nulo} & \textbf{Clave primaria}\\ [1ex] % inserts table      %heading     \hline                  % inserts single horizontal line     Id & Identificador interno del objeto & INT & NO & SI \\ % inserting body of the table     \hline     Nombre & Nombre del cliente & VARCHAR(255) & NO & NO \\     \hline     Apellido1 & Primer apellido del cliente & VARCHAR(255) & NO & NO \\     \hline     Apellido2 & Segundo apellido del cliente & VARCHAR(255) & NO & NO \\     \hline     DIrección & Dirección donde reside el cliente & VARCHAR(255)  & NO & NO\\     \hline     Localidad & Localidad del cliente & VARCHAR(255)  & NO & NO\\     \hline     Provincia & Provincia del cliente & VARCHAR(255)  & NO & NO\\     \hline     Teléfono & Teléfono fijo del cliente & VARCHAR(9) & NO & NO\\     \hline     Móvil & Teléfono móvil del cliente & VARCHAR(9)  & NO & NO\\     \hline     Email & Dirección de correo del cliente & VARCHAR(255) & NO & NO\\     \hline %inserts single line     \end{tabular}     \label{Riesgos} % is used to refer this table in the text     \caption{Entidad:\textbf{ Cliente}} % title of Table     \end{table}     \floatsep -0.2pt plus 0.2pt minus 0.2pt     \begin{table}[ht]     \centering  % used for centering table     \begin{tabular}{|c |c| c| c| c|} % centered columns (4 columns)     \hline\hline                        %inserts double horizontal lines     \textbf{Atributo} & \textbf{Descripción} & \textbf{Tipo} & \textbf{Nulo} & \textbf{Clave primaria}\\ [1ex] % inserts table      %heading     \hline                  % inserts single horizontal line     Id & Identificador interno del objeto & INT & NO & SI \\ % inserting body of the table     \hline     Nombre & Nombre del cliente & VARCHAR(255) & NO & NO \\     \hline     Apellido1 & Primer apellido del cliente & VARCHAR(255) & NO & NO \\     \hline     Apellido2 & Segundo apellido del cliente & VARCHAR(255) & NO & NO \\     \hline     DIrección & Dirección donde reside el cliente & VARCHAR(255)  & NO & NO\\     \hline %inserts single line     \end{tabular}     \label{Riesgos} % is used to refer this table in the text     \caption{Entidad:\textbf{ Cliente}} % title of Table     \end{table}


title: Compiler crashes after making each mistake

text: I am trying to make tables in LaTeX. However, each time I make a mistake the compiler crashes even by removing the mistake with the following message: > Runaway argument? {lof ! File ended while scanning use of \@writefile. \par > l.19 \begin{document} Then, I have to delete all files except the `.tex` file and compile the program again. Would somebody please help me to solve it?


title: How can I write a long equation in multi line scaled to text width?

text: I want to write a long equation over several lines, but result looks highly irregular. How can write this equation better, preferably with all equation occupying the same wide?               \documentclass[12pt]{book}     \usepackage[]{breqn}          \usepackage{lipsum}     \begin{document}     How can I write equation beatifull. I want all equation the same of text width     \lipsum[1]     \begin{equation*}     \begin{split}     &+\left[ {{T}_{44}}\left( 1,2 \right) \right.+2{{T}_{44}}\left( 5,2 \right)+\left. {{T}_{44}}\left( 2,2 \right) \right]\frac{{{\partial }^{4}}{{w}^{b}}}{\partial {{\eta }^{4}}}+\left[ {{T}_{44}}\left( 1,3 \right) \right.+2{{T}_{44}}\left( 5,3 \right)\\     &+\left. {{T}_{44}}\left( 2,3 \right) \right]\frac{{{\partial }^{4}}{{w}^{b}}}{\partial {{\xi }^{3}}\partial \eta }+\left[ {{T}_{44}}\left( 1,4 \right)+2{{T}_{44}}\left( 5,4 \right)+{{T}_{44}}\left( 2,4 \right) \right]\frac{{{\partial }^{4}}{{w}^{b}}}{\partial \xi \partial {{\eta }^{3}}}\\     &+\left[ {{T}_{44}}\left( 1,5 \right)+2{{T}_{44}}\left( 5,5 \right)+{{T}_{44}}\left( 2,5 \right) \right]\frac{{{\partial }^{4}}{{w}^{b}}}{\partial {{\xi }^{2}}\partial {{\eta }^{2}}}+\left[ {{T}_{43}}\left( 1,1 \right) \right.+2{{T}_{43}}\left( 5,1 \right)\\     &+\left. {{T}_{43}}\left( 2,1 \right) \right]\frac{{{\partial }^{3}}{{w}^{b}}}{\partial {{\xi }^{3}}}+\left[ {{T}_{43}}\left( 1,2 \right)+2{{T}_{43}}\left( 5,2 \right)+{{T}_{43}}\left( 2,2 \right) \right]\frac{{{\partial }^{3}}{{w}^{b}}}{\partial {{\eta }^{3}}}\\     &+\left[ {{T}_{43}}\left( 1,3 \right)+2{{T}_{43}}\left( 5,3 \right)+{{T}_{43}}\left( 2,3 \right) \right]\frac{{{\partial }^{3}}{{w}^{b}}}{\partial {{\xi }^{2}}\partial \eta }++\left[ {{T}_{43}}\left( 1,4 \right) \right.+2{{T}_{43}}\left( 5,4 \right)\\     &+\left. {{T}_{43}}\left( 2,4 \right) \right]\frac{{{\partial }^{3}}{{w}^{b}}}{\partial \xi \partial {{\eta }^{2}}}+\left( {{T}_{42}}\left( 1,1 \right)+2{{T}_{42}}\left( 5,1 \right)+{{T}_{42}}\left( 2,1 \right) \right)\frac{{{\partial }^{2}}{{w}^{b}}}{\partial {{\xi }^{2}}}\\      &+\left[ {{T}_{42}}\left( 1,2 \right)+2{{T}_{42}}\left( 5,2 \right)+{{T}_{42}}\left( 2,2 \right) \right]\frac{{{\partial }^{2}}{{w}^{b}}}{\partial {{\eta }^{2}}}+\left[ {{T}_{42}}\left( 1,3 \right)+ \right.2{{T}_{42}}\left( 5,3 \right)\\     &\left. +{{T}_{42}}\left( 2,3 \right) \right]\frac{{{\partial }^{2}}{{w}^{b}}}{\partial \xi \partial \eta }+\left[ {{T}_{41}}\left( 1,1 \right)+2{{T}_{41}}\left( 5,1 \right)+{{T}_{41}}\left( 2,1 \right) \right]\frac{\partial {{w}^{b}}}{\partial \xi }\\     &\left. +\left[ {{T}_{41}}\left( 1,1 \right)+2{{T}_{41}}\left( 5,1 \right)+{{T}_{41}}\left( 2,1 \right) \right]\frac{\partial {{w}^{b}}}{\partial \eta } \right\}-2\mu {{\tau }^{s}}\left\{ \left[ {{T}_{44}}\left( 1,1 \right)+ \right.2{{T}_{44}}\left( 5,1 \right) \right.\\     &+\left. {{T}_{44}}\left( 2,1 \right) \right]\frac{{{\partial }^{4}}{{w}^{b}}}{\partial {{\xi }^{4}}}+\left[ {{T}_{44}}\left( 1,2 \right) \right.+2{{T}_{44}}\left( 5,2 \right)+\left. {{T}_{44}}\left( 2,2 \right) \right]\frac{{{\partial }^{4}}{{w}^{s}}}{\partial {{\eta }^{4}}}+\left[ {{T}_{44}}\left( 1,3 \right) \right.     \end{split}     \end{equation*}          \end{document}      Here is an example output of the code above: ![enter image description here](http://i.stack.imgur.com/XnQZE.jpg)


title: Make some equation numbers bold

text: I would like to make some equation numbers (that will be defined _ad hoc_ ) **bold** , while others are not. I can only figure out how to make all **bold** or unbold, not what I am looking for.               \documentclass[leqno]{book}     \usepackage{amsmath,amssymb,amsthm, amscd}     \usepackage[a4paper, textwidth=39cm, margin=1.2in, vmargin=3cm, marginparsep=20pt, marginparwidth=.6in,]{geometry}      \usepackage{fancyhdr}     %\renewcommand\theequation{\bfseries\thesection.\arabic{equation}}     \begin{document}          \begin{equation}     x-y=z     \end{equation}          \begin{equation}     a+b=c     \end{equation}          \end{document}


title: installing URW Classico on Mac OS texlive 2010

text: I have downloaded the zip file from `http://mirror.ctan.org/fonts/urw/classico/uop.zip` and unzipped the content into `/usr/local/texlive/texmf-local/` and then run:               $ sudo texhash     texhash: Updating /usr/local/texlive/2010/../texmf-local/ls-R...      texhash: Updating /usr/local/texlive/2010/texmf/ls-R...      texhash: Updating /usr/local/texlive/2010/texmf-config/ls-R...      texhash: Updating /usr/local/texlive/2010/texmf-dist/ls-R...      texhash: Updating /usr/local/texlive/2010/texmf-var/ls-R...      texhash: Done.      Followed by:               $ sudo updmap-sys --enable Map=uop.map     updmap: This is updmap, version $Id: updmap 17423 2010-03-11 17:53:34Z karl $     updmap: using transcript file `/usr/local/texlive/2010/texmf-var/web2c/updmap.log'     updmap: initial config file is `/usr/local/texlive/2010/texmf-config/web2c/updmap.cfg'     updmap: configuration (updmap.cfg) unchanged. Map files will not be recreated.      However when I try using `\renewcommand*\sfdefault{uop}` I get:               [...]     kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 0+432/600 --dpi 432 uopr8r     mktexpk: don't know how to create bitmap font for uopr8r.     mktexpk: perhaps uopr8r is missing from the map file.     kpathsea: Appending font creation commands to missfont.log.          !pdfTeX error: pdflatex (file uopr8r): Font uopr8r at 432 not found     ==> Fatal error occurred, no output PDF file produced!     [...]      It feels wrong that updmap-sys said: `configuration (updmap.cfg) unchanged. Map files will not be recreated.` But I feel that I have followed the instructions and don't know what I can do differently. Can anyone help me with this?


title: enumitem-zref: reference items automatically

text: I am trying to use the enumitem-zref package in order to reference automatically all item of an enumeration. Here is a simple example (found on the Internet, but seems to agree with the documentation):               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage{hyperref}     \usepackage{enumitem,enumitem-zref}          \begin{document}          \begin{enumerate}[start=34,label=(\arabic*),name=thelist]     \item stuff     \item more stuff \label{more stuff}     \item yet more     \end{enumerate}          This is \refitem{thelist,35} or \refitem{thelist{35}}     and this is also \refitem{more stuff}          \end{document}      Unfortunately, I can't make it work; I get the following error (extract of the log from pdflatex):               ...     Package zref Info: New property list: zen@list on input line 108.     Package zref Info: New property: zen@ on input line 110.     Package zref Info: New property: zen@page on input line 117.     ...     Package zref Info: New property: zen@counter on input line 135.     ! Package zref Error: Property `zen@default,zen@page,zen@type,zen@depth,zen@lis     tctr,zen@listname,zen@index,zen@label,zen@ref,zen@starlabel,zen@parents,zen@ref     item,zen@commaref,zen@item,zen@currentlabel,zen@counter' does not exist.     See the zref package documentation for explanation.     Type H <return> for immediate help.      I tried small changes (including zref explicitly, changing order of inclusions...), without success. I don't know if the problem can come from my configuration (pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Arch Linux)). I could not find any equivalent package, and neither could I write a simple workaround (I'm quite new to LaTeX). All I want is to be able to write something like:               \begin{enumerate}[name=mylist,label=\arabic*.]        \item First item;        \item Second item;           \begin{enumerate}[label=(\alph*)]             \item first subitem,             \item second subitem,             \item third subitem;           \end{enumerate}        \item Third item.     \end{enumerate}      all items being automatically referenced (for example by `item:mylist.1`, `item:mylist.2`, `item:mylist.2.1`, `item:mylist.2.2`, etc.), so that `\ref{item:mylist.2.3}` displays an hyperrlink "2.(c)", or something similar. Thanks for your help.


title: Font type changes after using the command dvipdf dummy.dvi

text: When I try to change my document type from dvi to pdf, font type changes. To show this change, hereby I put two pictures from the dvi and pdf files, respectively. ![enter image description here](http://i.stack.imgur.com/ElHdU.png) ![enter image description here](http://i.stack.imgur.com/nctjm.png) ![enter image description here](http://i.stack.imgur.com/IWghd.png) I use this preamble in my document:               \documentclass[12pt,a4paper]{report}       \usepackage{OkanFBEStyle}       \usepackage{graphicx}       \usepackage{subfigure}       \usepackage{srcltx}       \usepackage{boxedminipage}       \usepackage{enumerate}       \usepackage{cite}       \usepackage{wrapfig}       %\usepackage{natbib}       %\usepackage{FBEbib}       \pdfminorversion=5       %  \usepackage[T1]{fontenc}       %  \usepackage{winfonts}       %      \usepackage[none]{hyphenat}        There are more packages, however I could not type here because of the letter constraint. I hope this information is enough to identify the problem. Can anybody help me on this please?


title: From a list of words to listed words

text: I would like to go from a list of words through a dedicated command, for instance `\listofwords{one word;one longer word;word and word}` to the expanded list of the same words, ie:               \begin{list}{}     \item one word     \item one longer word     \item word and word     \end{list}      and the initial list could store more (or less) semicolon-separated words. **Edit** The following may be more challenging: how to go from two different lists, `\listofwords{word;wordd;worddd}` and `\listofterms{term;termm;termmm}` to               \begin{list}{}{}     \item word term     \item wordd termm     \item worddd termmm     \end{list}      where `worddd` (or any other of the lists above) could store several space- separated words. Based on the previous answers, I had a look at the `xparse` and `etoolbox` packages but could no find any useful solution :(


title: How can I get text underneath an underbrace?

text: I am looking to do something of the following: ![formula with underbrace](http://i.stack.imgur.com/kfOoO.jpg) To get text underneath the underbrace. Is it involving `\stackrel` or some sort of similar command?


title: Custom line breaking

text: I have a long line, which could be a url but is not always a url so I cant use url/burl package. I want to specify where to break (at '&'), and how to do it. Long line:               long-example-url.com/foo.php?foofighter=bar&session=89c371a38aa60a9a59f46c9bbdc9fb2d&fun=yes      not long line:               long-example-url.com/foo.php?foofighter=bar\       &session=89c371a38aa60a9a59f46c9bbdc9fb2d&fun=yes      insert a '\' at the end of the line and indent at the next to indicate the break. How do I do this? (the text is inside a framed and is using verbatim environment) MWE:               \documentclass[11pt]{article}     \usepackage{framed}          \begin{document}          \begin{framed}       \begin{verbatim}         Example:              long-example-url.com/foo.php?foofighter=bar&session=89c371a38aa60a9a59f46c9bbdc9fb2d&fun=yes       \end{verbatim}     \end{framed}          \end{document}


title: siunitx: How do I unset options previously set with \sisetup?

text: In the `siunitx` package (v1.3), I know that I can set various options with the `\sisetup` command. But what if I want a particular option to apply to only a small section of my document, with default behaviors for the rest of the document? How can I "unset" an option I have set and return to defaults? Here is essentially what I'm trying to do:               Some text with SI units using default options.     \sisetup{prespace}     Some text with SI units using prespace option.     \sisetup{undo prespace, reset to default}     Some more text with SI units using default options.      Is this possible?


title: Skip to absolute position on line

text: Is there a way to skip to a fixed position on a line? (a specific tab position) Example:               The quick \skiptoposition{1.5cm} brown \skiptoposition{2.5cm}fox      which would put "brown" 1.5cm and "fox" 2.5cm from left margin?


title: How to typeset data structures?

text: I am using `algpseudocode` for typesetting my algorithms. However, I am missing support for typesetting data structures, such as structs, classes or similar things. Can `algpseudocode` or some other package I can use alongside do this? A small example of what I want to typeset:               struct {         float x,y,z;     } Vec3f;      Something like this. It should fit in at least slightly with the visual of the `algpseudocode` package. The latter has only commands for imperative controls like for, while, if and generic states. But no data structure support. The syntax above is C, but I don't insist on that. Pseudocode is good enough.


title: minitoc: \parttoc does not work for several chapters

text: I have another problem with minitoc package (and command parttoc). I have 3 parts in the document, asking for a content within each part. LaTex actually places three contents, but they are all the same (for part 1). I was trying to simulate the example, it does not give me exactly the same thing, but it does not work neither. I have Part* at the begining, and Chapters* within the Parts. As it was advised I have added `\addstarredpart{ }` but it does not help. Do you have any suggestions how to fix the above code?               \documentclass{book}          \usepackage{minitoc}          \begin{document}               \doparttoc     \tableofcontents               \part*{Part Zero}\addstarredpart{Part Zero}          \part{First Part}     \parttoc          \chapter{Part1 Chapter1}     \section{Part1  Section1}     \subsection{Part1 Subsections3}          \part{Second Part}     \parttoc          \chapter{Part2 Chapter1}     \section{Part2  Section1}     \subsection{Part2 Subsections3}          \part{Third Part}     \parttoc          \chapter{Part3 Chapter1}     \section{Part3  Section1}     \subsection{Part3 Subsections3}          \end{document}


title: Change align of a single cell in tabular

text: > **Possible Duplicate:**   >  Aligning inside tabular environment, specific cell I have a simple table with a given align. I want to know if there is a way to specify a different align for a cell. For example, in the following table, how can I make Item 3 align right?               \begin{table}         \begin{tabular}{|l|r|}             \hline             Header1 & HeaderX \\ \hline             Item1   & X1      \\              Item2   & X2      \\              Item3   & X3      \\             \hline         \end{tabular}     \end{table}


title: Accent commands (e.g. \'e) don't work in a tabbing environments

text: How to write international accent like é or è in LaTeX? I've tried every possible combination using `\'e`, `\'{e}`, within `\textbf` or alone, but absolutely **nothing** works. Below is the code I've tried               \documentclass{res}     \begin{document}     \begin{resume}     \section{EDUCATION \& CERTIFICATION}     \begin{tabbing}     \textbf{Imperial College}, London, UK \= \hspace{1.6in} \= Sep 2013 \\     Master in Economics \\[2ex]     \textbf{Ecole Sup\'erieure}, Paris, France \> \> Sep 2012 \\     Master of Sciences\\[2ex]     \bf{Ecole Sup\'erieure}, Paris, France \> \> Sep 2012 \\     Master of Sciences\\[2ex]     Ecole Sup\'erieure, Paris, France \> \> Sep 2012 \\     Master of Sciences\\[2ex]     \textbf{Ecole Sup\'{e}rieure}, Paris, France \> \> Sep 2012 \\     Master of Sciences\\[2ex]     \end{tabbing}     \end{resume}     \end{document}       Unfortunately, LaTeX doesn't process the accent and returns this: ![Processing of accent in LaTeX](http://i.stack.imgur.com/bpHB4.jpg) Is there anyway to write the letter é in LaTeX? If yes, can someone tell me how to do it? Thanks,


title: Draw a diagonal arrow across an expression in a formula to show that it vanishes

text: Would like to find a way to cross out a term in a mathematical expression with a diagonal arrow pointing from lower left to upper right and with a little "zero" next to the pointy end of the arrow. :)


title: How to write crossed-out math in LaTeX?

text: > **Possible Duplicate:**   >  Draw a diagonal arrow across an expression in a formula to show that it > vanishes As you might know from my other questions, I am still a newbie at LaTeX, so please don't expect me to know anything. How would I write crossed-out math in LaTeX, which is similar to ~~this~~ , but the line is oblique. Is that possible?