title: How to resolve the error "processes exited with error(s)" in PdfLatex?

text: I am preparing a poster (a0 size,landscape) for presentation using **TeXstudio**. This is the code for the poster               \documentclass[final,hyperref={pdfpagelabels=false}]{beamer}     \usepackage{grffile}     \mode<presentation>{\usetheme{drexel}}          \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage{amsmath,amsthm,amssymb,latexsym}     \usefonttheme[onlymath]{serif}          \usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}          \usepackage{array,booktabs,tabularx}     \newcolumntype{Z}{>{\centering\arraybackslash}X} % centered tabularx columns     \newcommand{\pphantom}{\textcolor{ta3aluminium}} % phantom introduces a vertical space in p formatted table columns??!!          \title{\huge Drexel University Poster Template\\An Example}     \author{\href{http://www.cs.drexel.edu/~eas28/}{Evan A.~Sultanik}}     \email{\href{mailto:eas28@cs.drexel.edu}{\texttt{eas28@cs.drexel.edu}}}     \institute[Drexel University]{Department of Computer Science, Drexel University, Philadelphia, PA, USA}     \date[April 16th, 2010]{April 16th, 2010}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \newlength{\columnheight}     \setlength{\columnheight}{105cm}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}     \begin{frame}     \noindent\begin{columns}     % ---------------------------------------------------------%     % Set up a column      \begin{column}{.49\textwidth}       \begin{beamercolorbox}[center,wd=\textwidth]{postercolumn}         \begin{minipage}[T]{.95\textwidth}  % tweaks the width, makes a new \textwidth           \parbox[t][\columnheight]{\textwidth}{ % must be some better way to set the the height, width and textwidth simultaneously             % Since all columns are the same length, it is all nice and tidy.  You have to get the height empirically             % ---------------------------------------------------------%             % fill each column with content                         \begin{block}{Introduction}                                 non dolor.                  \end{block}             \vfill             \begin{block}{Problem Description}                                  nisl aliquam condimentum.                  \end{block}             \vfill             \begin{block}{Related Work}                                et urna tempor bibendum.                  \end{block}             \vfill             \begin{block}{Approach}                                  neque dictum.                  \end{block}           }         \end{minipage}       \end{beamercolorbox}     \end{column}     % ---------------------------------------------------------%     % end the column          % ---------------------------------------------------------%     % Set up a column      \begin{column}{.49\textwidth}       \begin{beamercolorbox}[center,wd=\textwidth]{postercolumn}         \begin{minipage}[T]{.95\textwidth} % tweaks the width, makes a new \textwidth           \parbox[t][\columnheight]{\textwidth}{ % must be some better way to set the the height, width and textwidth simultaneously             % Since all columns are the same length, it is all nice and tidy.  You have to get the height empirically             % ---------------------------------------------------------%             % fill each column with content                  \begin{block}{The Algorithm}                                 potenti. Vestibulum vel urna vitae neque tincidunt               pellentesque.                  \end{block}             \vfill             \begin{block}{Empirical Analysis}               elem                  \end{block}             \vfill             \begin{block}{Future Work}                                  ultricies nunc.                  \end{block}             \vfill             \begin{block}{Conclusions}                                  adipiscing sapien risus a leo.                  \end{block}           }           % ---------------------------------------------------------%           % end the column         \end{minipage}       \end{beamercolorbox}     \end{column}     % ---------------------------------------------------------%     % end the column       \end{columns}     \end{frame}     \end{document}      I got the error > process exited with error(s) Any help to get rid of the errors.


title: Bulletin and Fliers, looking for templates

text: I need to make a few standard fliers to hang up on our department wall, the kind where you slap together a heading and an abstract and a picture. I could put together something myself but I could see this being a project that would easily consume more time then I'd prefer (being nit-picky about typographical style, and obsessing over spacings). Are there any style-sheets or packages you've come across that produce good-looking, minimal fuss fliers in LaTeX?


title: TOC Page Numbers, A-pagenum left aligned, S-pagenum centered

text: I have customized some page numberings. My adviser wanted appendix pages labeled as A-pagenum. So that was accomplished with `\renewcommand{\thepage}{A-\arabic{page}}` while my supporting info labeled with S-pagenum, so `\renewcommand{\thepage}{S-\arabic{page}}`. However, looking at my TOC, it appears that my A pages are left aligned when the pagenum switches from single to double digits. But my S pages are maybe...centered? It looks off, and I have no clue why the S centers, and the A does not. Seems like one of those gotcha things that maybe I'm not aware of, or overlooking. But I would like the S pages to also be left-aligned like the A ones. Here is a MWE (which is a bit longer, because it is a MWE for a related post)               \documentclass{memoir}     \setlength{\parskip}{12pt plus2pt}     \def\baselinestretch{1.6}     \linespread{1.3}     \usepackage{titletoc}          \begin{document}     \tableofcontents*     \setsecnumdepth{subsection}     \maxsecnumdepth{subsection}     \settocdepth{subsection}         \chapter{Chap1}     \section{Chap1Sec1}     \section{Chap1Sec2}     \chapter{Chap2}     \section{Chap2Sec1}     \section{Chap2Sec2}     \subsection{Chap2Sec2Subsec1}     \chapter{Chap3}     \settocdepth{section}     \renewcommand{\thesection}{\thechapter-\Roman{section}}     \renewcommand{\thesubsection}{\thechapter-\Roman{section}.\arabic{subsection}}     \renewcommand{\thepage}{S-\arabic{page}}     \section{Chap3Sec1}     \clearpage     \section{Chap3Sec2}          \startcontents     \printcontents{}{2}{\addtocontents{ptc}{\setcounter{tocdepth}{2}}}     \subsection{Chap3Sec2Subsec1}     \subsection{Chap3Sec2Subsec2}     \subsection{Chap3Sec2Subsec3}     \subsection{Chap3Sec2Subsec4}     \stopcontents     \section{Chap3Sec3}\clearpage     \section{Chap3Sec4}\clearpage     \section{Chap3Sec5}\clearpage     \section{Chap3Sec6}\clearpage     \section{Chap3Sec7}\clearpage     \renewcommand{\thepage}{A-\arabic{page}}     \setcounter{page}{9}     \chapter{Chap4}     \settocdepth{subsection}     \section{Chap4Sec1}\clearpage     \section{Chap4Sec2}\clearpage     \subsection{Chap4Sec2Subsec1}     \end{document}


title: Sectioning created via titlesec have wrong \label

text: I have created the following custom sectioning using the titlesec package.               % in the preamble          \newcounter{phase}     \titleclass{\phase}{straight}[\section]     \titleformat{\phase}{\bfseries\sffamily}{Phase~\thephase:}{1mm}{}     \renewcommand{\thephase}{\arabic{phase}}          \newcounter{task}[phase]     \titleclass{\task}{straight}[\phase]     \titleformat{\task}{\bfseries\itshape}{Task~\thephase.\thetask:}{1mm}{}     \renewcommand{\thetask}{\arabic{task}}               % within the document          \phase{Target selection and testbed preparation} % outputs Phase 1: Target selection and testbed preparation     \label{sec:phase-selection}          ...          \task{Identification of target systems} % outputs Task 1.1: Identification of target systems     \label{sec:phase-selection:task-identification}               % later on in the document (ISSUE!)          Task~\ref{sec:phase-selection:task-identification} % outputs Task 1 rather than Task 1.1      Why doesn't the label contain the correct counter?


title: Identifying Mystery "R" Symbol

text: Does anybody know how to typeset the "R" looking symbol on the very left of the image below in latex? I used Detexify and looked through the comprehensive list with no luck. ![](http://i.imgur.com/FYzYiCC.png) It appears in a table in Knuth's Art of Computer Programming, Volume 4, page 47. The meaning is given on the right.


title: TikZ node positioning in Beamer ignores x coordinate

text: I have the following `frame` in `beamer`:               \begin{frame}{Language}     \begin{block}{}         \begin{align*}         \onslide<1->{             &\text{Types} & T &::= B | T \to T \\         }         \onslide<2->{                 &\text{Terms} & E &::= A | E\ E | \ldots |             \tikz[baseline]{                 \node (term-mon) [anchor=base,fill=blue!20]                 {$\mathsf{mon}^{f, g}_h(E)$};             }             \onslide<3> {                 \tikz[baseline]\node [fill=blue!20] (term-mon-expl) at ($(term-mon) + (1,2)$)                 {Comments};             }         }             \end{align*}     \end{block}     \end{frame}      Basically, I want to highlight a part of the formula and display an additional node nearby on the next slide. However, for some reason TikZ ignores my 1cm shift towards x-axis and only shifts the `term-mon-expl` node towards y-axis, placing it right next to the `term-mon` node. Why?


title: Set ticklabels for colorbar

text: With the risk of sounding foolish, but I can't seem to find the answer anywhere. How can I set the ticklabels for the colorbar? Let's say I have the following code:               \documentclass{report}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}         \begin{figure}                       \begin{tikzpicture}                      \begin{axis}[%                     xmin=1, xmax=2,                     ymin=1, ymax=2,                     colorbar,point meta min=0.3,point meta max=5.5]                 \addplot [color=black]                 coordinates{(1,1)(2,2)};                 \end{axis}             \end{tikzpicture}         \end{figure}     \end{document}      You'll notice the labels for the colorbar are 1, 2, 3, 4 and 5. What if I would want for instance the random 0.3, 0.6, 1, ... , 5.5? Cheers!


title: Biblatex: citation appears with different reference marks

text: I'm writing a report and using `biblatex` with the `biblatex-chem` package, and using the `\fullfootcite` command because of the integration with footnotes. However I've noticed that   1. If the same reference is called more than once, it will appear with different reference numbers and twice in the footer;   2. despite me using the `autopunct=true` option, the citation in the text still appears before the comma and not after as it should be.              \documentclass[11pt,a4paper]{memoir}     \usepackage[backend=biber,style=chem-acs,subentry,minnames=3,maxnames=100,autopunct=true]{biblatex}     \bibliography{bibli}          \begin{document}     A procedure\footfullcite{Harjani:2009hd}, which was reported. The same procedure\footfullcite{Harjani:2009hd} applied with another product.     \end{document}


title: How to show tilde in superscript

text: I would like to show a tilde in the superscript of a letter. For example               F^{\tilde{}}      But it does not look good. Any suggestions? Thanks and regards!


title: Why do i have error by removing this `>{\stepcounter{tfno}\thetfno.}`

text: i followed the instructions by this link: Remove the automatic generation of number? and happily satisfied when it really prevented the automatic numbering of the text. But why is when i changed the document class to `\documentclass{exam}` it suddenly provides me eror. i have this code here:               \documentclass{exam}     \usepackage{amssymb,graphicx}     \usepackage{array}      \usepackage{longtable}     \newcounter{tfno}     \renewcommand\arraystretch{2}     \newcommand{\mybox}{\resizebox{.5cm}{!}{\raisebox{-.5ex}{$\Box$}}}          \newenvironment{truefalse}{%     \setcounter{tfno}{0}     \setlength\LTleft{0pt}     \setlength\LTright{0pt}      \begin{longtable}{cp{.5\textwidth}@{\extracolsep{\fill}}cc}     \multicolumn{1}{r}{}&  & \fbox{\parbox{.75cm}{True}} & \fbox{\parbox{.75cm}          {False}}  \\     }{%     \end{longtable}     }     \newcommand\tfquestion[1]{ & #1 & \mybox  & \mybox  \\}     \begin{document}     \begin{questions}     \begin{truefalse}     \question\tfquestion{This is a sample text.}      \question\tfquestion{This is another sample short text.}       \question\tfquestion{This is a long line containing text and wrapping into       second line without hitting the boxes}     \end{truefalse}      \end{questions}     \end{document}      How can I fix the error?


title: How to typeset Tibetan in XeLatex with correct linebreaks?

text: I am trying to typeset Tibetan language in a document, but the text does not wrap at the margin. I think this could be easily fixed if I tell XeLaTeX to recognise the Tibetan tsheg character ('TIBETAN MARK INTERSYLLABIC TSHEG' U+0F0B) as a soft hyphen. Is there any way to set the soft hyphenation character within an environment? Example code:               \documentclass{article}           \usepackage{fontspec}      \defaultfontfeatures{Mapping=tex-text}     \usepackage{xunicode}      \usepackage{xltxtra}      % \usepackage{polyglossia}          \setmainfont{Cambria}      \setsansfont{Calibri}          % \setotherlanguages{tibetan}     \newfontfamily\tibetanfont[Script=Tibetan,Scale=MatchUppercase]{MicrosoftHimalaya}          \usepackage{geometry}      \geometry{letterpaper}           \begin{document}          Test.          \begin{tibetanfont}     \noindent     ༈ རང་གི་མདུན་གྱི་ཐད་དྲང་གི་ནམ་མཁའི་གནས་སུ་སེངྒེ་ཆེན་པོ་བརྒྱད་ཀྱིས་བཏེག་པའི་རིན་པོ་ཆེའི་ཁྲི་མཐོ་ཞིང་ཡངས་པའི་སྟེང་ཁར་སྣ་ཚོགས་པད་ཟླ་ཉི་མའི་དཀྱིལ་འཁོར་གྱི་གདན་ལ་ངོ་བོ་རང་གི་དྲིན་ཅན་རྩ་བའི་བླ་མ་ཡིན་པ་ལ་རྣམ་པ་རྒྱལ་བ་ཤཱཀྱ་ཐུབ་པ་སྐུ་མདོག་གསེར་བཙོ་མ་ལྟ་བུ་དབུ་གཙུག་ཏོར་དང་ལྡན་པ་ཞལ་གཅིག་ཕྱག་གཉིས་གཡས་ས་གནོན། གཡོན་མཉམ་བཞག་གི་སྟེང་ན་བདུད་རྩིས་གང་བའི་ལྷུང་བཟེད་བསྣམས་པ། སྐུ་ལ་ཆོས་གོས་ངུར་སྨྲིག་གོ་མདོག་ཅན་གསོལ་བ། མཚན་དཔེས་བརྒྱན་པའི་དྭངས་གསལ་འོད་ཀྱི་རང་བཞིན་ཅན་སྐུ་ལས་སྐྱེད་པའི་འོད་ཀྱི་ཕུང་པོའི་དབུས་ན་ཞབས་གཉིས་རྡོ་རྗེ་སྐྱིལ་ཀྲུང་གིས་བཞུགས་པ། དེ་ཉིད་ཀྱི་མཐའ་སྐོར་དུ་དངོས་དང་བརྒྱུད་པའི་བླ་མ་ཡི་དམ་སངས་རྒྱས་བྱང་སེམས་དཔའ་བོ་མཁའ་འགྲོ་ཆོས་སྐྱོང་སྲུང་མའི་ཚོགས་རྣམས་ཀྱིས་བསྐོར་ནས་བཞུགས་པ། དེ་དག་རང་རང་གི་མདུན་ན་གདན་ཁྲི་ཕུན་སུམ་ཚོགས་པ་ལ་རང་རང་གིས་གསུངས་པའི་ལུང་གི་ཆོས་རྣམས་འོད་ཀྱི་རང་བཞིན་ཅན་གྱི་པུ་ཏིའི་རྣམ་པར་ཡོད་པ།     \end{tibetanfont}          Test.          \end{document}


title: Skipping blank fields for address labels using datatool and envlab

text: I am trying to process the following into Avery 5160 mailing labels, using the `\skipblank` code that someone else posted on this site to suppress blank lines: * * *               \documentclass[10pt]{letter}       \usepackage[avery5160label,noprintbarcodes]{envlab}       \usepackage{datatool}       \usepackage{makerobust}       \makeatletter       %commands to skip blank or missing fields       %* version replaces with space only           \newcommand\skipblank{\@ifstar\@spskip\@nlskip}           \newcommand\@nlskip[1]{\ifthenelse{\DTLiseq{#1}{}}{\relax}{#1\\}}           \newcommand\@spskip[1]{\ifthenelse{\DTLiseq{#1}{}}{\relax}{#1\space}}       \MakeRobustCommand{\@nlskip}       \MakeRobustCommand{\@spskip}       \makeatother            \makelabels     \begin{document}     \startlabels          \DTLsetseparator{|}     \DTLloadrawdb{maillist}{sitemailmerge.csv}               \DTLforeach{maillist}    {\name=Contact,\site=SiteName,\addra=Addressa,\addrb=Addressb,\addrc=Addressc,\city=City,\st=StateProv,\zip=PostCode,\country=Country,\role=Role,\fname=Firstname,\lname=Lastname,\tit=Title}{%                 \mlabel{       \skipblank*{\name},\ \skipblank*{\role}\\       \skipblank{\site}       \skipblank{\addra}       \skipblank{\addrb}       \skipblank{\addrc}       \city\ \st\ \zip\ \ \country                }       }            \end{document}      * * * But I keep getting the following LaTeX error:               "     ! Missing control sequence inserted.     <inserted text>                     \inaccessible     l.43 }          ?     ! Missing { inserted.     <recently read> }          l.43 }          ?     ! Missing } inserted.     "      It was my understanding that unmatched `}` errors were related to fragile commands, hence the use of `\MakeRobustCommand{}`, but this doesn't seem to help. It is extremely frustrating. Would appreciate any suggestions.


title: How do I optimize the output for ebooks?

text: In ps2pdf there is a `-dPDFSETTINGS=/ebook` option to control the nature of the pdf output. Is there an analogous setting in pdflatex to do the same thing?


title: How to prevent the paragraphs to spread out over the page?

text: I have a problem. I have several large equations within the text. And when LaTeX does not manage to put the equation on the same page and moves it to the next one, he spreads the paragraphs of the text in the first page. How could I prevent this? I know about `\pagebreak` and `\newpage`, but I do not want to force the `\newpage`, as the text may move (if I add something later or so on) and the pagebreaks may not be valid. I would like to make LaTeX not to spread the paragraphs over a page automatically. Is it possible? I tried to make an example:               \documentclass[a4paper,12pt,twoside]{book}     \usepackage{amsmath}     \begin{document}          LaLaLa\\\          LaLaLa\\\          LaLaLa\\\          LaLaLa\\\          \begin{eqnarray}     123&+&123 \\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     \end{eqnarray}          LaLaLa\\\          LaLaLa\\\          \begin{eqnarray}     123&+&123 \\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     123&+&123 \nonumber\\\     \end{eqnarray}          \end{document}


title: How to reduce vertical spacing between section headings and paragraphs?

text: I have a problem in reducing vertical spacing between text and section/subsection headings. There is a lot of spacing between them. May be it is due to lot of graphics i am using. But anyhow, i could not fix it. Thanks in advance


title: Spacing going crazy

text: > **Possible Duplicate:**   >  How to prevent the paragraphs to spread out over the page? When I try to put some tables in my document I get lots of white space between the section (which I am guessing its because latex is trying to adjust positioning of the tables). Sometimes I get tables appearing on a single page by themselves. Is there a way to avoid this? Below is an image of a page showing the ugly spacing. (The boxes represent text areas)![enter image description here](http://i.stack.imgur.com/LYAFk.png)


title: Float goes to bottom of page even with forced 'H' placement

text: I have a certain document with a few tables one after another. Each table is in its own subsubsection. The peculiar thing about these tables is that two tables can fit on a page with a subsubsection title, but only one can fit with the section, subsection and subsubsection. With just one table:               \documentclass{book}     \usepackage{graphicx}     \usepackage{float}     \usepackage{array}          \begin{document}     \section{Section}     \subsection{Subsection}          \subsubsection*{Table 1}     \begin{table}[H]     \centering     \scalebox{0.65}{     \begin{tabular}{|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}         \hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline     \end{tabular}     }     \caption{Table 1 Caption}     \end{table}               \end{document}      I get a perfectly fine output: ![just one table](http://i.stack.imgur.com/tTeG6.jpg) However, as soon as I have multiple tables:               \documentclass{book}     \usepackage{graphicx}     \usepackage{float}     \usepackage{array}          \begin{document}     \section{Section}     \subsection{Subsection}          \subsubsection*{Table 1}     \begin{table}[H]     \centering     \scalebox{0.65}{     \begin{tabular}{|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}         \hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline     \end{tabular}     }     \caption{Table 1 Caption}     \end{table}          \subsubsection*{Table 2}     \begin{table}[H]     \centering     \scalebox{0.65}{     \begin{tabular}{|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}         \hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline     \end{tabular}     }     \caption{Table 2 Caption}     \end{table}          \subsubsection*{Table 3}     \begin{table}[H]     \centering     \scalebox{0.65}{     \begin{tabular}{|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}         \hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline      & & & & & & & & & & \\\hline     \end{tabular}     }     \caption{Table 3 Caption}     \end{table}          \end{document}      The pages look like this: ![three tables page one](http://i.stack.imgur.com/ql4P7.jpg) ![three tables page two](http://i.stack.imgur.com/sqkWS.jpg) I want the first page to stay exactly the same way as it was before. I found one solution, i.e. adding a '\clearpage' just after the first '\end{table}', which gives me: ![three tables with clearpage page one](http://i.stack.imgur.com/wgHwG.jpg) ![three tables with clearpage page two](http://i.stack.imgur.com/a4li0.jpg) However, this solution is not elegant enough for me, since it involves doing something specifically for the first table, whereas the tables are, in all other ways, equivalent. Is there a solution which automatically adjusts(forces) the tables to stay on top of the page and not 'gravitate' towards its following tables? I already tried \vfill{} and \vspace{\fill} with no success!


title: How to prevent book class from vertically justifying the contents?

text: If we use the `book` class, the output looks like the following screenshot. ![enter image description here](http://i.stack.imgur.com/7ZmX5.png) But if we use the `article` class, the output looks better as follows. ![enter image description here](http://i.stack.imgur.com/Q4wQJ.png) The MWE is given as follows. Note: please enable `-shell-escape`!               \documentclass[12pt]{article}% please change to article and compare the output.          \usepackage{filecontents}     \begin{filecontents*}{"article sample.tex"}     \documentclass{article}     \usepackage{lipsum}     \begin{document}     \lipsum[1-20]     \end{document}     \end{filecontents*}          \usepackage{showexpl}          \lstset     {         breaklines=true,         breakindent=0pt,         tabsize=2,         columns=flexible,         language={[LaTeX]TeX},         basicstyle=\small\ttfamily\hbox{},     }          \newcount\x          \newcommand\MyLTXinputExample[2][2mm]{%     % #1: length of gap,     % #2: filename with .tex,          \lstinputlisting[caption=\url{#2.tex}]{"#2.tex"}         \bgroup             \parskip=#1\relax             \fboxsep=0pt             \pdfximage{#2.pdf}%             \x=0             \loop                 \ifnum\x<\pdflastximagepages                     \advance\x by 1                     \noindent\hfill                     \fbox{\includegraphics[width=0.5\dimexpr\linewidth-4\fboxrule-#1\relax,page=\x]{"#2"}}%                                      \ifnum\x<\pdflastximagepages                     \advance\x by 1                     \hfill                     \fbox{\includegraphics[width=0.5\dimexpr\linewidth-4\fboxrule-#1\relax,page=\x]{"#2"}}%                 \fi                     \hfill\null\par             \repeat         \egroup     }          \PassOptionsToPackage{obeyspaces}{url}     \usepackage{hyperref}          \begin{document}     \immediate\write18{pdflatex "article sample"}     \MyLTXinputExample{article sample}     \end{document}      How to prevent `book` class from vertically justifying the contents? In other words, I want to use the `book` class but its output (only the justification is under consideration) must look like the output that `article` class produces.


title: Problems with two sided print in Latex

text: I am trying to enable even and odd margins in latex. When I use `\documentclass[12pt, twoside]{report}`, the structure of report becomes very bad. I am attaching a screenshot of a page. ![enter image description here](http://i.stack.imgur.com/RxrTs.png) There is unwanted spacing between heading, text and image. It works fine when I use `\documentclass[12pt]{report}`. Is there a way to get rid of these spaces?


title: getting latex to vertically align all text blocks on a page instead of vertically justifying them

text: I'm typesetting a book (documentclass = book) and every page compiles so that the first line is aligned with the top of the latex page and the last line is aligned with the bottom of the page - but this means that there's variable whitespace between paragraphs. Is there a parameter I can change to force latex to not change the whitespace between paragraphs (I don't mind having differently positioned last lines on every page even though this is usually typographically verboten)? There is a suggestion elsewhere on Stackoverflow to try removing the rubber from /parskip but this doesn't work (the whitespace is still variable). I am trying to figure out how to include an MWE that isn't the entire book; will update. If anyone has any thoughts in the meantime, I'd be much obliged.


title: How can I make bash-code look good both in LaTeX and HTML?

text: As I am new to Latex and this kind of typing in general, I find myself in need of some basic guidelines when it comes to how to make things look good in text. I have a document that looks good when typeset into a .pdf, but when I compile it to .html using `htlatex` the text loses its color, making it more difficult to distinguish from the surrounding text. How can I write bash text so that it looks good when compiled into an html- file? Is there a commonly used method that makes bash look good? Right now I use an environment every time:               \newenvironment{vtim}     {\color{magenta}     \begin{tt}     \fontsize{11pt}{11pt}\selectfont}     {\end{tt}}      And then, when I want bash in text:               \begin{vtim}     \$ Text text text text text     \end{vtim}


title: Where can I find the manual for the standard class article of LaTex?

text: I have been looking for THE manual for using class 'article' in LaTex. The official CTAN package site points to some documentation which actually is 'an introduction to writing classes and packages for LATEX'; it does not cover how to use the article package. I need to, for instance, check what is the command for inserting affiliations, or to place in-text references, among other typical tasks you will do while preparing a scientific paper. I would like to have the official way to do that at hand. Looking in Google for those commands returns disparate solutions relying on additional packages. And that is something I must avoid because of editorial regulations. Can you please provide the link to a standard manual?


title: Creating a camera-ready paper - keep text within specified area at bottom of page

text: I have to create a camera-ready paper. This means that I have to follow specific guidelines regarding text size. Of course I am using `geometry` package to specify the text area but I am running in a problem. I checked if text was typeset correctly, using `showframe` option and I found out that it is typeset outside of the text area. Not only horizontally, for which I don't really care, as I am getting an hbox warning, but vertically too. I mean that on some cases letters on the last line like "p", "g" etc are being typeset below the frame. How can I prevent TeX from typesetting text outside the specified area? Should I tackle this problem case by case starting from the beginning? Would tweaking some TeX variables (constants is a proper name?) would help? If that is the case, which variables should I change? ## Edit Here is an example. The lines are drawn by the geometry package. I'll try to make a mwe and I will upload it. ![Example](http://i.stack.imgur.com/1BLxc.png)


title: Strange compilation problem using adjustwidth environment from changepage package

text: The following code gives a compilation error.               \documentclass{report}          \usepackage{changepage}          \begin{document}          \chapter{Text1}          \begin{adjustwidth}{1cm}{2cm}          \section{Text2}          Text3          \begin{quote}     Text4     \end{quote}          \end{adjustwidth}          \end{document}      The error says: "Something's wrong--perhaps a missing \item." in the line of `\begin{quote}`. The error disappears when I remove either of   * the line `\chapter{Text1}`   * the line `\section{Text2}`   * the line `Text3`   * the `adjustwidth` environment How can this be?


title: keyreader: How to save choice key value to a macro

text: Why does a `choice` key not save it’s value to a macro as a `cmd` key and as the corresponding `xkeyval` `\define@choicekey` do? In the following example I have to define `my@key` manually by using the callback.               \documentclass{article}          \usepackage{keyreader}          \krddefinekeys*{CL}[my]{%        choice/keya/one/           one,two,three/\def\mykeya{#1};        choice/keyb/aa/           aa,bb,cc,dd;     }          \begin{document}     \mykeya% works     and     %\mykeyb% doesn't work     \end{document}      * * * With `xkeyval` it is possible to define a `bin` i.e. a macro that saves the value:               \define@choicekey*{CL}{keyc}[\mybin]{alpha,beta,gamma,epsilon}[alpha]{}      an later `\mybin` holds the value of `keyc`


title: tikz: connecting to a rectangle split shape

text: I want to draw a simple diagram using `tikz` to show the structure of a compiler front end. The compiler is being represented with a node using rectangle split shape containing three parts. The input and output are being represented by rectangles node and should connect to the left of the first and to the right of the last parts of the split shape, respectively. I have written the document below, but it is not working.               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{shapes.multipart,positioning}          \begin{document}          \begin{tikzpicture}[thick, data/.style={rectangle,fill=red!12}]       \node[rectangle split,rectangle split parts=3,draw,anchor=center] (compiler) {         lexical analysis\nodepart{two}         syntatic analysis\nodepart{three}         semantic analysis       };            \node[data] (src) [left=of compiler.text,align=center] {source code};       \node[data] (obj) [right=of compiler.three,align=center] {intermediate code};            \draw [->] (src.east) -- (compiler.text west);       \draw [->] (compiler.three east) -- (obj.west);     \end{tikzpicture}          \end{document}      ![compiler front end](http://i.stack.imgur.com/rBx6C.png) How should it be modified to work as expected?


title: Customizable inclusion of frames-slides from a huge Beamer presentation

text: I have one master-huge `beamer` presentation having lots of frames. Depending on the audience I wish to customize, say, for lay audience I will just include basic slides, for experts I wish to include advanced slides. Not sure if there is such facility in Beamer already, but wish it could be as simple as :   * I will label each frame, with say, BASIC, ADVANCED , keywords like that...   * I should be able to compile, by saying `\includeonly{BASIC}`. This should include all slides marked BASIC.   * If I say `\includeonly{ADVANCED}`, only advanced slides should get compiled.   * Additionally, if I say, `\includeonly{BASIC, ADVANCED}`, everything will be included.


title: Dynamically hide LaTeX beamer frame based on tags

text: I guess I'm in a configuration that will ring the bell to many: in the context of a project that run for many years, I developed a very large Beamer presentation featuring a lot of slides. The LaTeX sources are split in many files and as I have to often redo the presentation of the project, I include (or nor) these files in the main document depending on the time / audience. Now I would like to somehow automate the generation of the presentation by controlling the frame I wish to include. It seems to be possible statically with the `<handout:0|beamer:0>` parameters upon frame definition:               \begin{frame}     Hello.     \end{frame}          % this frame won't be included     \begin{frame}<handout:0|beamer:0>       Hidden     \end{frame}      I would like to render the approach more generic. Thus i was thinking about the possibility to   * associate a [set of] tag upon frame definition   * decide later (in some way) about the set of tags to use when compiling the presentation such that only the frame having this tag are considered (and the other are thus hidden).  Does anybody knows a way to do that?


title: How to create /usr/texbin?

text: I am a mac user but I have installed the TeX Live distribution without the help of MacTeX. The directory `/usr/texbin` is missing and TeXShop or TeXworks won't compile. I know that I can change the path to the bin in these applications, but I would prefer creating a `/usr/texbin` (is it a symbolic link?) similar to the one created by MacTeX. PS : Why do I am in this situation ? I wanted to update my installation to 2013. So, I downloaded the big `.iso` file of the TeXLive distribution. But, TeXShop was still accessing the 2012 folder... So I removed this one, etc.


title: Example of matrix node in trees in tikzpicture

text: I'm trying to recreate this image ![enter image description here](http://i.stack.imgur.com/7N8Tl.gif) using tikz matrices in a tree. I can create the first node and can hook up to children, but I can't get the syntax for including more matrices as child nodes of the first matrix node. Can anyone give an example of a matrix node as a child in a tikzpicture?


title: Using ShareLatex my Bibliography crashed

text: I learned Latex using ShareLatex. So far, everything went just fine up until some point when suddenly my latex document gave me error messages that my citations cant be found. I really need help with this problem.


title: How to continue a framed box which is defined in floating environment

text: I have defined a floating environment. It defines a framed box using \mdframe. Here is the code I used.               \documentclass{article}          \usepackage{mdframed}     \usepackage{lipsum}     \usepackage{caption}     \usepackage{newfloat}          \usepackage{float}     \DeclareFloatingEnvironment[fileext=frm,placement={!ht},name=Frame]{myfloat}          \begin{document}     \begin{myfloat}[tb]     \begin{mdframed}     \caption{Lipsum Frame}          \lipsum     \end{mdframed}     \end{myfloat}               \end{document}      The text content in the mdframed box is too large to fit in a single page. But on executing this code, I miss the text content which exceeds the first page's limit. The framed box abruptly stops at the end of first page. How to continue my framed box on the next page?


title: How does this TeX code generate automatic \hline's in tabular environments?

text: @AlexeyMalistov gave an answer to make LaTeX draw a \hline between each line in tabular without using \hline? in StackOverflow before TeX.SE existed. The same question was later asked on TeX.SE: Tabular with automatic \hline. Malistov's answer, which successfully generates a line between each row of a table, is to add this before `tabular`:               \catcode`@=11     \let \savecr \@tabularcr     \def\@tabularcr{\savecr\hline}     \catcode`@=12      I think this redefines the newline character within the tabular environment, so that an `\hline` is inserted, but the code is still mostly just voodoo to me. Would someone be willing to explain how it works? Thanks.


title: How to avoid widows and orphans in ToC?

text: I want the chapter's author name being shown in the ToC. So I have modified the chapter to add the author there and use it in the page header as follows:               \documentclass[10pt,twoside]{memoir}     \usepackage[german]{babel}     \usepackage{blindtext}     \usepackage[ansinew]{inputenc}           \renewcommand{\thesection}{\arabic{section}}     \setcounter{secnumdepth}{3} % Subsection mit Zähler (1.1) versehen          %%     % Kolumnentitel     %%     \renewcommand{\chaptermark}[1]{ \markboth{#1}{}  } % Stil der Kopfzeile zurücksetzen     \renewcommand{\sectionmark}[1]{ \markright{#1}{} } % Stil der Kopfzeile           % Page style     \makepagestyle{mystyle}     \makeevenhead{mystyle}{\thepage}{\small\chapterauthor}{}     \makeoddhead{mystyle}{}{\slshape\leftmark}{\thepage}     \pagestyle{mystyle}          %%     % Inhaltsverzeichnis     %%     \renewcommand*{\cftchapterdotsep}{\cftdotsep}     \settocdepth{chapter}     \renewcommand{\cftchapterfont}{\normalfont}     \renewcommand{\cftchapterpagefont}{\normalfont}          \makeatletter     \DeclareRobustCommand\authortoctext[1]{%     {\addvspace{10pt}\nopagebreak\leftskip0em\relax     \rightskip \@tocrmarg\relax     \noindent\itshape#1\par\addvspace{-7pt}}}     \makeatother     \newcommand\authortoc[1]{%       \gdef\chapterauthor{#1}%       \addtocontents{toc}{\authortoctext{#1}}}          %%     % Dokumentenbeginn     %%     \begin{document}     \tableofcontents*      \authortoc{Walter von der Vogelweide}     \chapter{Ich sass uf eynem Steine?}     \section{Und dachte Bein mit Beine}     \Blindtext\Blindtext\Blindtext\Blindtext          \authortoc{Hartman von Aue}     \chapter[Was auch immer]{So gebt nur mehr und immer mehr}     \section{Moralische Quellen der Irrationalitat}     \Blindtext\Blindtext\Blindtext\Blindtext     \end{document}      Everything works as expected, but I have the problem that sometimes author's name and chapter's title are split up by the page break. So that the first become an orphan and the latter a widow. How to avoid that?


title: Remove leading 0 in siunitx

text: I am trying to create a big table without leading zeros using siunitx `\num{}`. Namely, I have a bunch of number formated like this:               0.001     0.1     1.000      and I want to remove the 0. part. So the output would be:               .001     .1     1.000      It should be the opposite of add-integer-zero option (something like remove- integer-zero). I have triyed lots of `\sisetup` configuration without luck. All question in tex exchange seems to be the opposite to what I want. Any idea of it is possible? Thanks in advance.


title: Beamer Block: White Space When Using Math

text: I want to reduce the white space (above and below) when I insert an equation environment in a beamer block.               \documentclass{beamer}     \usetheme{Antibes}     \usepackage{amsmath}          \begin{document}          \begin{frame}          \begin{block}{Separation of variables}     \setlength\abovedisplayskip{0pt}     \begin{equation}     1 + 2 = 3     \end{equation}     \end{block}          \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/XZXcY.png) I searched the web of course but the solutions I found do not seem to work (like `\setlength\abovedisplayskip{0pt}`). What I found and should have worked:   * One   * Two


title: Listing items with specific alignment

text: How do I do list items so that the number is adjacent to the first item? For example:               1. a. Eggs        b. Feathers          2  a. Mention two...             b. How can we...             c. List three...      With good spacing and also maybe if multiple choice question of choice large capital letters, like               1. What is the name given....        A. Hen        B. cock             D. None of the above


title: drawing back propagation neural network

text: ![Back propagation neural network](http://i.stack.imgur.com/pOR6t.png) I would like to get this network eventually but so far after referring to this Diagram of an artificial neural network I still can't seem to back the feedback arrow. Help please Here is my attempts so far               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix,chains,positioning,decorations.pathreplacing,arrows}     \tikzstyle{block} = [draw, rectangle, text width=3em, text centered, minimum height=8mm,     node distance=2.3em]     \tikzstyle{line} = [draw]     \begin{document}         \begin{tikzpicture}[         plain/.style={           draw=none,           fill=none,           },         net/.style={           matrix of nodes,          nodes={            draw,             circle,         inner sep=10pt         },       nodes in empty cells,       column sep=2cm,       row sep=-9pt       },       >=latex      ]     \matrix[net] (mat)     {      |[plain]| \parbox{1cm}{\centering Input\\layer} & |[plain]| \parbox{1cm}{\centering     Hidden\\layer} & |[plain]| \parbox{1cm}{\centering Output\\layer} \\     & |[plain]| \\     |[plain]| & \\     & |[plain]| \\     |[plain]| & |[plain]| \\     & & \\     |[plain]| & |[plain]| \\     & |[plain]| \\     |[plain]| & \\     & |[plain]| \\     };     \foreach \ai [count=\mi ]in {2,4,...,10}       \draw[<-] (mat-\ai-1) -- node[above] {Input \mi} +(-2cm,0);     \foreach \ai in {2,4,...,10}     {\foreach \aii in {3,6,9}       \draw[->] (mat-\ai-1) -- (mat-\aii-2);     }     \foreach \ai in {3,6,9}       \draw[->] (mat-\ai-2) -- (mat-6-3);     %\draw[->] (mat-6-3) -- node[above] {Ouput} +(2cm,0);     \node[above of=mat-6-3, yshift=5em](error){Error back propagation};     \path [line] node{error} -- (mat-1-1);     \end{tikzpicture}fg


title: Changing font does not work

text: I would like to change to a font with sans serif (for example Helvetica or computer modern sans serif). The following code does not change the font:               \documentclass{article}          \usepackage[english,ngerman]{babel}     \usepackage[T1]{fontenc}     \newcommand{\changefont}[3]{     \fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}          \changefont{phv}{m}{n}          \begin{document}     THIS IS A TEST.      this is a test.\\          \begin{tabular}{lr} \hline      ABCD & 1234       \\     abcd & 1234,567   \\     UVWXY & 1,234,567 \\     uvwxy & 1,234,567 \\ \hline     \end{tabular}          \end{document}      I get a pdf-file with serif. There are no errors and warnings. I'm using Windows 7, MikTex, TeXnicCenter. Does anyone have an idea why this does not work?


title: Clarification on old Comment

text: This post has a very nice answer from Martin Scharrer Fancy Chapter Headings The OP responds saying that he added a ~ after chapter and number for a nicer layout. What does he mean?


title: Axes for bivariate normal distribution with tikz

text: I got the following figure: ![enter image description here](http://i.stack.imgur.com/hUyPI.png) with this code:               \documentclass{standalone}     \usepackage{pgfplots}          \begin{document}          \def\centerx{2}     \def\centery{-1}     \begin{tikzpicture}         \begin{axis}         \addplot3[surf,domain=-2:6,domain y=-5:3]              {exp(-( (x-\centerx)^2 + (y-\centery)^2)/3 )};         \node[circle,inner sep=1pt,fill=blue,pin=90:$\mu$]              at (axis cs:\centerx,\centery,1) {};         \end{axis}     \end{tikzpicture}     \end{document}      I wonder how to get this figure without some axes as below: ![enter image description here](http://i.stack.imgur.com/XnWKP.png)


title: Output two sided, but only on recto page -- occasional images on verso

text: I am preparing a thesis. In order to reduce the number of physical sheets of paper, I need to print certain figures/tables on the verso side. However the university regs state that, while figs/tables may appear on the verso, the body text must appear on the recto side. I would like to therefore output the vast bulk of the work on the recto page, but with occasional verso pages. Ideally they would be numbered as a "subpage" of the preceeding recto page (e.g. 131, 131a, 132...) or similar. The approach which I will tentatively adopt is to use a "twoside" flag, then have "empty" and non-numbered verso pages until a page with content is required. I'm sure I'm not the first person to have had a similar issue, but am unable to imagine other ways of posing the question.


title: How to left align lstlisting code with text

text: I'm using `listings` package to include sample code to my document and the `frame` option to surround the code inside a box. The problem is that I got too much white space between the left rule of the frame and the code (see pic below). The problem seems not to be the frame itself, but the left alignment of the code. I tried to update the `xleftmargin` option, but nothing happened. The only way I can decrease the white space is to give a negative length to the left rule of the frame with the `framexleftmargin` option, but I don't like it since I want the frame width to be of the same width of the text. I just want to decrease the left white space to take advantage of the full line and get less broken lines within the code. This is my current configuration.               \lstset{language=Java,         keywordstyle=\color{RoyalBlue},         basicstyle=\scriptsize\ttfamily,         commentstyle=\ttfamily\itshape\color{gray},         stringstyle=\ttfamily,         showstringspaces=false,         breaklines=true,         frameround=ffff,         frame=single,         rulecolor=\color{black}     }       Please help me to solve this problem. I'm stuck on it for hours. Thank you. EDIT: Provided a minimal working example, as required.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{listings}     \usepackage{xcolor}          \definecolor{RoyalBlue}{cmyk}{1, 0.50, 0, 0}          \lstset{language=Java,         keywordstyle=\color{RoyalBlue},         basicstyle=\scriptsize\ttfamily,         commentstyle=\ttfamily\itshape\color{gray},         stringstyle=\ttfamily,         showstringspaces=false,         breaklines=true,         frameround=ffff,         frame=single,         rulecolor=\color{black}     }          \begin{document}         \begin{lstlisting}             public static class FirstMapper extends Mapper<LongWritable, Text, LongWritable, LongWritable> {                 LongWritable mkey = new LongWritable();                 LongWritable mval = new LongWritable();                      public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {                     String line = value.toString();                     StringTokenizer tokenizer = new StringTokenizer(line);                     long src, dst;                          if (tokenizer.hasMoreTokens()) {                         src = Long.parseLong(tokenizer.nextToken());                         if (!tokenizer.hasMoreTokens())                             throw new RuntimeException("Invalid edge line: " + line);                         dst = Long.parseLong(tokenizer.nextToken());                              mkey.set(src);                         mval.set(dst);                         context.write(mkey, mval);                         context.write(mval, mkey);                     }                 }             }         \end{lstlisting}     \end{document}      ![Trouble with listing and frame](http://i.stack.imgur.com/S9Wm9.jpg)


title: Itemize in tabular // minipage resulting in `Missing \endcsname inserted` error

text: The **`minipage`** solution of this accepted answer is also what I'm looking for, that is, * * * **_this one_** :-) ![enter image description here](http://i.stack.imgur.com/1oE6X.png) **_not** this one_ :-( ![enter image description here](http://i.stack.imgur.com/Wo9MP.png) * * * The commented-out part of the **MWE** below tries to implement that `minipage` solution, but throws an **`Missing \endcsname inserted`** error. I doesn't have to be `minipage` for me, as long as it works and is equally simple and elegant :) **MWE** :               \documentclass[a4paper]{article}           \newlength{\mymyrandomlength}           \settowidth\mymyrandomlength{hello world}          \usepackage{tabularx}          \begin{document}          \begin{tabularx}{\textwidth}{@{}*{1}{p{\mymyrandomlength}}|*{1}{X}@{}}          ABCDEFG     &          \begin{itemize}     \item bla bla bla     \item hello hello goodbye          \strut     \end{itemize}          \\          %\begin{minipage}[t]     %\begin{itemize}     %\item bla bla bla     %\item hello hello goodbye          %\strut     %\end{itemize}     %\end{minipage}     %\\          %\end{tabularx}          \end{tabularx}          % Missing \endcsname inserted.          \end{document}      Cf. also this Q&A which seems related.


title: Big indent when using long enumeration label

text: I started out with LaTeX today and already got my first question. I want to create a question document using enumerations. However when I give the first enumeration level a long label like "Question 1.", the a), b), c) on the next level are indented so they are behind the Question 1. Is there a way to disable this feature so less space is wasted? Also, the compiler directly puts "a)" behind Question 1. if I don't write something behind question 1. How can I fix that one? Here's the code:               \documentclass[a4paper]{article}          \begin{document}          \begin{enumerate}     \renewcommand{\labelenumi}{\Large \bfseries Question \theenumi.}     \renewcommand{\labelenumii}{\Large \theenumii)}     \renewcommand{\labelenumiii}{\large (\theenumiii)}         \item blub         \begin{enumerate}             \item blub             \begin{enumerate}                 \item blub             \end{enumerate}         \end{enumerate}          \end{enumerate}     \end{document}


title: change header to part name (classicthesis)

text: I would like to change the header from chapter without number (left) and section with number (right) to part without number (left) and chapter with number (right):               \documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude,         footinclude=true,cleardoublepage=empty,         BCOR=5mm,paper=a4,fontsize=10pt]{scrbook}     \usepackage{lipsum}          \usepackage[parts,beramono,eulerchapternumbers,%     listings,manychapters,%     floatperchapter]{classicthesis}           \begin{document}     \pagestyle{scrheadings}     \part{Introduction}     \chapter{First chapter}     \section{First section}     \lipsum[1-18]     \section{Second section}     \lipsum[1-12]     \end{document}


title: PGF Math Error: Could not parse input

text: Trying to plot a BER vs SNR function using erf function. However I get an error saying " Package PGF Math Error: Could not parse input '' as a floating point number, sorry. The unreadable part was near ''. (in '0.5-0.5*erf(sqrt(10**(x/10)))') "               \documentclass[convert={density=400,outext=.png}]{standalone}     \usepackage{pgfplots}     \usepackage{tikz}     \pgfplotsset{     label style={anchor=near ticklabel},     xlabel style={yshift=0.8em},     ylabel style={yshift=-2em},     tick label style={font=\bfseries\small },     label style={font=\bfseries\small},     legend style={font=\bfseries\small},     }     \begin{document}     \begin{tikzpicture}[     declare function={erf(\x)=%       (1+(e^(-(\x*\x))*(-265.057+abs(\x)*(-135.065+abs(\x)%       *(-59.646+(-6.84727-0.777889*abs(\x))*abs(\x)))))%       /(3.05259+abs(\x))^5)*(\x>0?1:-1);},     declare function={erf2(\x,\y)=erf(\x)+erf(\y);}     ]     \begin{axis}[xdomain:0:30,     width=\textwidth,     enlargelimits=false,     grid=major,     ]     \addplot {0.5-0.5*erf(sqrt(10**(x/10)))};     \end{axis}     \end{tikzpicture}     \end{document}


title: Which LaTeX distribution should I use on OSX?

text: Which LaTeX installation would you recommend using on OSX? Ideally I'd want the installation to contain as many packages as possible as I'll be using my Macbook offline mostly.


title: Drawing a data flow diagram in LaTeX

text: Would it be possible to draw a data flow diagram in LaTeX as follow? if so, how? (actually I am only puzzled with the bounding box). Thanks a lot ![A dataflow diagram](http://i.stack.imgur.com/FcLTO.jpg) Edit: the following code will get me everything except the bounding box can anyone pls help?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows}          \begin{document}     \begin{center}     \begin{tikzpicture}[       font=\rmfamily\footnotesize,       every matrix/.style={ampersand replacement=\&,column sep=2cm,row sep=.6cm},       source/.style={draw,thick,rounded corners,fill=yellow!20,inner sep=.3cm},       process/.style={draw,thick,circle,fill=blue!20},       sink/.style={source,fill=green!20},       datastore/.style={draw,very thick,shape=datastore,inner sep=.3cm},       dots/.style={gray,scale=2},       to/.style={->,>=stealth',shorten >=1pt,semithick,font=\rmfamily\scriptsize},       every node/.style={align=center}]            % Position the nodes using a matrix layout       \matrix{         \node[source] (a) {A}; \& \& \\          \& \& \node[source] (b) {B};\\          \node[source] (c) {C}; \& \node[source] (d) {D};\\          \& \& \node[source] (e) {E};\\          \node[source] (f) {F}; \& \& \\             };            % Draw the arrows between the nodes and label them.       \draw[to] (a) -- node[midway,above] {raw events}           node[midway,below] {level 0} (c);       \draw[to] (c) -- node[midway,right] {raw event data\\level 1} (f);       \draw[to] (f) to[bend right=20] node[midway,above] {events}           node[midway,below] {level 1} (d);       \draw[to] (d)-- node[midway,above] {events}           node[midway,below] {level 1} (b);       \draw[to] (d) -- node[midway,above] {events}           node[midway,below] {level 1} (e);     \end{tikzpicture}     \end{center}     \end{document}


title: biblatex puts comma after bibliography entry

text: This is driving me crazy, biblatex decided for some reason to put a comma after one of my entries, in my bibliography. My entry is:                 @mvbook{Kepler,       author={Kepler, Johannes},       editor={Frisch, Ch.},       title={Joannis Kepleri astronomi opera omnia edidit Ch. Frisch},       volume={I},       address={Frankofurti a. M. et Erlangae},       publisher={Heyder \& Zimmer},       pages={XIV + XV--XVI + 1--672},       date={1858},       language={latin}     }      but here is how it looks (note the comma after 1858): ![enter image description here](http://i.stack.imgur.com/HDjki.png)


title: Examples of great presentations and alternatives to Beamer

text: I am familiar with beamer and have used it extensively but I was blown off when I saw this: http://online.redwoods.cc.ca.us/instruct/darnold/linalg/latex/project_latex.pdf I would like to know how such a thing can be done, if there are pre-existing packages like beamer, and some neat examples like this. Does anyone know?


title: Compiling Problem after using migration assistance of IO's

text: I bought a new computer and sent all my files and programs using the migration assistance of IO's from my old computer. All the programs work fine BUT TeXworks. When i try to compile it says: Program "pdflatex" not found and some instructions to download MacTex. It also happen when i try to compile using Bibtex or every other program. I tried downloading MacTex and reinstall everything but it keep saying the same thing. Does someone know what to do? Thanks a lot.


title: How to properly scale a TikZ/PGF picture which has a `\begin{axis}...\end{axis}`

text: Applying a scale option to a TikZ picture works great. It keeps the text the proper size and scales everything else. I would like to have the same behavior when using a `\begin{axis}...\end{axis}`. Consider the following in which the first graphic does not use the `{axis}` environment. Changing the scale works great. However, try changing the scale option of the second `\begin{tikzpicture}` to `scale=1.5`. This has the effect that the x and y axis labels are moved far away form the axis. Furthermore, I can see no apparent change in the scale option applied to `\begin{axis}`. I don't see any error messages complaining about it, so it must be a valid option.               \documentclass{article}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}[scale=1.0]     \draw [->][gray, thin](-3,0) -- (3,0)         node[blue, right] {$x$};           \draw [->][gray, thin] (0,-3) -- (0,3)         node[blue, above] {$y$};     \end{tikzpicture}          \begin{tikzpicture}[scale=1.0]     \begin{axis}[scale=1.5 % Has no effect         minor tick num=0,          axis y line=center,          axis x line=middle,          xmin=-3,         xmax=3,          ymin=-3,         ymax=3,         xlabel=$x$,         ylabel=$y$         ]     \end{axis}     \end{tikzpicture}     \end{document}      Also, one other minor nit-pick now that I posted this: How do I got about getting the x,y labels within `{axis}` to be to the right and on top as in the first example?


title: Missing $ inserted - referring to bibliography?

text: I'm getting               ! Missing $ inserted.<inserted text>$ ...y[prenote=myprenote,title={Bibliography}]      The respective line is               \printbibliography[prenote=myprenote,title={Bibliography}]      Is there something off in that line or must the fault lie with the bibliography itself? The bib contains underscores in URLs, which according to some search results here may cause problems. But does that also count for bibliographies?


title: Table Header with vertically centered alignment

text: I'm creating table header using latex code mentioned below:               \begin{center}     \begin{tabular}{|c|l|c|c|c|c|}     \hline     $\textbf{Q }$&$\textbf{Header one}$&$\textbf{Test} $&$\textbf{Test1}$&$\textbf{Test2}$&$\textbf{Test3}$\\     $ $&$ $&$\textbf{Text4} $&$\textbf{Text5}$&$\textbf{Text6}$&$\textbf{Text7}$\\     $ $&$ $&$ $&$$&$$&$\textbf{Text8}$\\     \hline     \end{tabular}     \end{center}$      can you please suggest, how can i arrange this vertically aligned centrally? [Note: I'm looking for option to centrally align text inside header, which is currently spread across three lines.]


title: How to find the previously printed character?

text: Is there a way to find the previously printed character in LaTeX? E.g:               \newcommand{\th}{%       \ifthenelse%         {\equal{\previouscharacter}{1}}%         {st}%         {th}%     }          4\th and 21\th % would like to yield "4thand 21st"


title: pgfplotstable manage strings and values

text: I like the pgfplotstable package for reading and plotting tables but handling of strings and values (especially when strings contain spaces) drives me crazy... I often use a table as shown here:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=1.8}     \usepackage{pgfplotstable}     \usepackage{booktabs}     %     \begin{filecontents*}{table.dat}     a   b   c   d   e   f   g     1   Item1   alpha   m   1   1   10     2   Item2   beta    s   1.0 11  20     3   Item3   gamma   kg  10.0    111 30     4   Item4   omega   deg 10.00   1111    40     5   Item5   xi  \%  10.99   11111   50     \end{filecontents*}     \begin{document}     \begin{figure}[hp]     \pgfplotstableread{testMod.dat}\loadTestTable     \pgfplotstabletypeset[     %   header=false,         brackets/.style={%             postproc cell content/.append style={/pgfplots/table/@cell content/.add={\relax[}{]}},         },         greek/.style={%             postproc cell content/.append style={/pgfplots/table/@cell content/.add={\textbackslash}{}},         },         column type=r,         columns/a/.style={string type},         columns/b/.style={string type,column type=l},         columns/c/.style={string type,column type=l},         columns/d/.style={string type,column type=l},         columns/c/.append style={greek},         columns/d/.append style={brackets},         fixed,         fixed zerofill,         precision=2,     %   dec sep align,         every head row/.style={%             output empty row,             before row={%                 \toprule                 No. & Item & Symbol & Unit & Column1 & Column2 & Column3\\                 },             after row=\midrule,             },             every last row/.style={%                 after row=\bottomrule}]{table.dat}     \end{figure}     \end{document}      I need to have two things:   1. spaces in strings, i.e. 'Item of first row'   2. set greek symbols automatically (comment out line 'columns/c/.style={string type,column type=l},' did not work Thanks for any advice! Paul


title: Concatenate two strings to make a new command

text: I took some habits with my sciences reports so I developed some personalized commands. First, I define in the preamble all the variables that I need like this:               \newcommand{\cvba}{Cv_{\beta/\alpha}}     \newcommand{\za}{z_{\alpha}}     ...      Then I begin all my equation labels by "eq:" like in this example :               \begin{equation}       \za = \frac{1000.-T}{34}       \label{eq:za}     \end{equation}      And finally, I set a command which allows me to make a reference from a variable to its definition inside the environment equation :               \newcommand{\eref}[2]{\hyperref[eq:#1]{#2}}      In this example, `za` will point to the previous equation :               \begin{equation}       \cvba = \eref{za}{\za}+12       \label{eq:cvba}     \end{equation}      My problem is that I would like to make my new command `eref` a little bit easier and lighter to use such as it takes only one parameter. I tried to define it like this :               \newcommand{\eref}[1]{\hyperref[eq:#1]{\#1}}      Obviously it doesn't work because the `\\#` is understood as a specific character. So my question is : "How could I concatenate two strings to make a new command?" If it can helps, the names of my variables can change, for example they could be `\var_varname` such as he new command would looks like :               \newcommand{\eref}[1]{\hyperref[eq:#1]{\var_#1}}


title: dvips: ! Bad PK file

text: Here is my latex code:                 \documentclass{ctexart}     \begin{document}     中文宏包测试     \end{document}      I install the ctex and zhmetrics with Texlive, but I still get the error message:   `dvips: ! Bad PK file /home/jerry/texmf/fonts/pk/modeless/zhmetrics/gbksong/gbksong51.9640pk: unexpected eof`   I cannot find the where it goes wrong. Thanks for your time.


title: How to disable the prompt on error?

text: When `pdflatex` can't compile a file, it drops me to a prompt. I've never used it and always try to get away from there as quickly as possible, usually generating a `q.log` file in the process. Is there any way to avoid this behavior and let `pdflatex` drop back to command-line on error?


title: Can't get my head around enumitem's spacing parameters

text: Maybe it's my terrible lack of sleep but I can't get my head around `enumitem`'s horizontal spacing parameters. What I want is a decription enviroonment in which the first line of each item (where the item title is) is aligned to same left-margin as the the serrounding text and all lines below it are indented by the "normal" amount. Like so;               --------     Some test          **Some Item** item description        continues here on indented line          **Another Item** item description        continues here on indented line     --------      Can anyone show me how to get this result with `enumitem`'s 5-10 spacing parameters (labelmargin,itemindent, labelsep,labelwidth,labelindent, ...)? MWE:               \documentclass{article}          \usepackage{parskip} %to disable paragraph indentation but still keep paragraphs separated (with \parskip)     \setlength{\parskip}{2.75ex plus 0.5ex minus 0.2ex}          \usepackage{enumitem}          \usepackage{lipsum}            \begin{document}          \lipsum[1]     \begin{description}%[WHAT SHOULD I PUT HERE?]     \item Some Item: item description        continues here on indented line        when the description is long          \item Another Item: item description        continues here on indented line        when the description is long     \end{description}     \end{document} With this code the "item titles" are slightly indented, which is what I don't want.


title: Expansion in \numexpr...\relax versus \pdfstrcmp

text: The `\numexpr...\relax` construction in eTeX allows to evaluate numerical expressions, and it expands tokens fully as it goes. The `\pdfstrcmp{...}{...}` construction in pdfTeX lets us compare two lists of tokens after full expansion and conversion to a string (with `\detokenize`). Are there specific token lists (parameter-less macros) `\foo` such that `\the\numexpr\foo\relax` correctly produces an integer, but `\pdfstrcmp{\foo}{}` causes a TeX error? It seems that the expansion behaviour is the same in both cases, but one converts its argument to an integer, and the other one to a string.


title: Labeling a Footnotemark

text: Is there a way to label a `\footnotemark` instance (without redefining the `\footnotemark` macro)? Labeling the `\footnotemark` has no effect (it labels whatever environment the command is invoked from) and labeling its corresponding `\footnotetext` is not guaranteed to produce the correct number (it merely returns the current value of the default footnote counter). See below:                   \documentclass{article}         \usepackage[colorlinks=true,urlcolor=red,hyperfootnotes=false]{hyperref}         \begin{document}         This text is footnoted\footnotemark\label{fnm:1} \footnotemark\label{fnm:2}         \footnotetext{Footnote `1'\label{fnt:1}.}%         \footnotetext{Footnote `2'\label{fnt:2}.}%              The numbers of the labels: %         \{\ref{fnm:1}, \ref{fnt:1}, \ref{fnm:2},  \ref{fnt:2}\}              The sequence should read: \{1, 1, 2, 2\}          \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/tm2gv.png) Labeling a `\footnote` is trivial as one can simply call the `\label` command from within the footnote environment. However, LaTeX does not appear to support labeling of a `\footnotemark`. Please advise if there is an efficient solution to label a `\footnotemark`. Thank you.


title: beamer: More elegant way to uncover list items starting on the second slide?

text: Using LaTeX and `beamer`, I'm using the shorthanded notation `<+->` and its variants (e.g. `<+-| alert@+>`, etc.) to have list items uncovered so that I do not have to manually enter a specific number for each slide, and can insert a new list item without having to renumber everything. However, sometimes I want to display some text that appears before the first list item is shown. The way I have done this is to create an invisible item (called `\noitem` below) and insert that as my first list item. It is admittedly a kludge ... and, furthermore, it forces the insertion of some vertical space between the text shown initially and the list. Is there a more elegant way to do this? Ideally, it should not require extra vertical space either. Here's a MWE:               \documentclass{beamer}           \newcommand{\noitem}{\item[{\color{white} blank}] {\color{white} blank}}          \begin{document}          \begin{frame}{Test}     Some text displayed initially.         \begin{itemize}[<+->]         \noitem  % invisible item shown on first slide         \item First item, uncovered on second slide         \item Second item, uncovered on third slide.          \end{itemize}     \end{frame}          \end{document}


title: text wrapping and \DTLdisplaydb from datatool

text: I'm trying to adjust width column of `tabular` generated by `\DTLdisplaydb` from `datatool` package like here for `tabular` environment. But I didn't come up with any solution. I tried something pretty bad:               \documentclass[10pt,a4paper,landscape]{report}     \usepackage{datatool}     \usepackage[small,compact]{titlesec}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}  % utf8x causes problem with accents in header columns     \usepackage[frenchb]{babel}     \usepackage[margin=1in]{geometry}          \DTLloaddb{mydb}{db.csv}          \let\oldtabular\tabular     \let\endoldtabular\endtabular     \newcolumntype{M}{>{\begin{varwidth}{8cm}}l<{\end{varwidth}}} %M is for Maximal column     \renewenvironment{tabular}{\tabular[|M|]}{\endtabular}          \begin{document}       \begin{table}\footnotesize         %\begin{minipage}{0.9\textwidth} %Useless here         \DTLdisplaydb{mydb}         %\end{minipage}       \end{table}     \end{document}      I got the following error:               ! TeX capacity exceeded, sorry [input stack size=5000].     \tabular ->\tabular                          [|M|]      l.67  \DTLdisplaydb{mydb}      Here is a sample DB:               entete,entete,entete,     1,"big string paragraph with a lot of charachter like that. I don't know what to say.. blablablablablablablablablabla... ", "reblabla"     2,"text","text"      Surely, there is another way.


title: How to expand keyval options immediately

text: I am trying to build up a macro that creates other macros depending on `kvoptions`' options. But then, the outcoming macros are dependent on the actual state of the options instead of their state at the runtime of the creation macro. Here's a minimal example:               \documentclass[openany]{scrbook}     \usepackage{kvoptions}          \makeatletter     \SetupKeyvalOptions{family = fam, prefix = fam@}     \DeclareStringOption[]{prename}          \newcommand{\greetingsetup}[3]{%             \setkeys{fam}{#3}             \expandafter\newcommand\csname greeting#1\endcsname{Hallo \fam@prename, I am #2.}     }          \makeatother     \greetingsetup{john}{Johnny}{prename=Mike}     \greetingsetup{mark}{Mark}{prename=Michaela}          \begin{document}          \greetingjohn               \end{document}      **What I want** : Writing `\greetingsetup{john}{Johnny}{prename=Mike}` creates a macro `\greetingjohn` which writes "Hallo Mike, I am Johnny." **What it does** : It creates a macro `\greetingjohn` which writes "Hallo xyz, I am Johnny." with xyz being replaced with the actual state of option prename. In the example LaTeX writes "Hallo Michaela, I am Johnny.". Does anyone know how I can get just the bare _string_ from the option `\fam@prename` written to the new macro `\greeting`...?


title: Difference between \newcommand and \pgfmathsetmacro used in TikZ \coordinate

text: Consider the following code:               \documentclass{article}     \usepackage{tikz}     \begin{document}      \begin{tikzpicture}       \newcommand{\MA}{4}       \pgfmathsetmacro{\MB}{4};       \coordinate (V11) at (0,0);       \coordinate (V44) at (4,4);       \draw[black] (V11) rectangle (V\MA\MA);      \end{tikzpicture}     \end{document}      This works. However changing the `\draw` command to:                  \draw[black] (V11) rectangle (V\MB\MB);      produces the following error: > ! Package pgf Error: No shape named V4 is known . Why is `\newcommand` working here, when `\pgfmathsetmacro` fails?


title: \num with parameters in siunitx table

text: I have a couple of different methods to solve a diven problem and I want to compare them in a table. My aim is it to automatically add the relative deviation. I got some problems using `siunitx` within a table, but I solved it using this. Now my problem is, that my last column should have an explicit (plus) sign. When I use something like (did not use my automatic calculation in here, as the error occurs even without it)...               \documentclass{article}     \usepackage{siunitx}           \begin{document}                  \begin{tabular}{lSSS}      \hline     \hline     \textbf{Type} & \textbf{before} & \textbf{after} & \textbf{change}\\     & $\left[\frac{m^3}{h}\right]$ & $\left[\frac{m^3}{h}\right]$ & $\left[\%\right]$\\     \hline     Method A & 10.05 & 22.84 & \num[explicit-sign=+]{127.26}     \hline     \hline     \end{tabular}          \end{document}        ...I get the following error message.               > Argument of \num has an extra }.      Does anybody has an idea, why it did not work? Or what to do to make it work? I cannot use `explicit-sign=+` within `\sisetup` as I only want my last column to have the explicit sign. Thanks for your help.


title: Best and easy-to-master free softwares for drawing geometric figures in math papers?

text: I'm not very familiar with how to draw geometric figures (say circles, rectangles, surfaces of different genera and cusps etc.). I'd like your opinion on softwares that I can use for this purpose. Are these softwares freely downloadable from internet? As suggested, I should be more specific. I'm trying to draw: 1) The unit circle and several small circles tangent to it from the inside, and also joining those points of tangencies, I'm looking to draw the part of the circles that intersect the unit circle perpendicularly, so the "hyperbolic geodesics", so to say. 2) Surfaces of genus 1 (torus), and 2, 3, or higher (so double or triple torus or surfaces with "handles"). These surfaces could have "cusps" (imagine putting a hole on the surface and fit an infinitely long tube on that hole whose other end become narrow and narrow and gets close to zero as we walk away to infinity) I'm not trying to PLOT them, I'm just trying to draw them by hand using may be a pencil in the software. Thanks!


title: URL for "article" (and other) entries of the .bib file?

text: My `.bib` file contains the following entry:               @Article{ LM11,     title = "Name of paper",     author = "Author A and Author B",     journal = "Arxiv",     year = "2011",     url = "http://arxiv.org/PS_cache/arxiv/pdf/..."      The problem: when compiling, the title/author/journal shows ok, the URL does not appear at all. Same goes with similar entry types (e.g. book) The bibliography is included in the following two lines:               \bibliography{bib_filename}     \bibliographystyle{plain}


title: URL of cited web site in bibliography

text: I am using `natbib` und the `chicago` style as bibliography style. I am trying to cite a web site, but in the bibliography the URL (given in the BibTeX entry) is not printed. Is there a simple solution to this matter? What am I doing wrong? ok, as a little example (the entries are generated via Mendeley)               @misc{Carlson2011,        author = {Carlson, Nicholas},       booktitle = {Businessinsider.com},       title = {{How Many Users Does Twitter REALLY  Have?}},       url = {www.businessinsider.com/chart-of-the-day-how-many-users-does-twitter-really-have-2011-31/3},       year = {2011}     }      and the output in chicago-style looks like this: > Carlson, N. (2011). How Many Users Does Twitter REALLY Have?


title: How to add "date accessed" or "date retrieved" in BibLaTeX?

text: I have the following in `.bib` file:               @online{solarfarm,      author = {Buckley, Alastair and nee Hall, Lisa Clark and {Colantuono, Giuseppe Everard}, Aldous},      file = {:Users/Desktop/Downloaded/85c4687c.html:html},      title = {{The Sheffield Solar Farm}},      Howpublished = {\url{http://www.sheffieldsolarfarm.group.shef.ac.uk/solar-panel-data}},      url = {\url{http://www.sheffieldsolarfarm.group.shef.ac.uk/solar-panel-data}},      urldate = {16/5/2013}      }      but I can't get the `date retrieved` or `date accessed` to work, it never shows up in references. MWE:               \documentclass[12pt,a4paper]{report}     \begin{document}     \renewcommand\bibname{References}      \bibliographystyle{abbrv}         \bibliography{library}       \end{document}


title: Reference to URL not showing up

text: > **Possible Duplicate:**   >  URL of cited web site in bibliography I want this reference to a URL to show up, but it doesn't. This is how I add the entry in the bib file. I've also tried it as webpage and as url, but it doesn't show up in the references. It only shows the author and title. How do I make it show the URL?               @misc{vlsibackp_t,      Author = {Mariusz Bernacki},      Date-Added = {2010-12-21 15:37:30 -0600},      Date-Modified = {2010-12-22 12:21:00 -0600},      Lastchecked = {December 22, 2010},      Title = {Backpropagation},      Url = {http://home.agh.edu.pl/~vlsi/AI/backp_t_en/backprop.html},      Bdsk-Url-1 = {http://home.agh.edu.pl/~vlsi/AI/backp_t_en/backprop.html}}      Any help is appreciated. EDIT: The OP is using the `plain` BibTeX style.


title: How to add link to referecne?

text: I am writing a thesis and I would like to add link to references. Below sample code from file "references.bib":               @article{simpleLink,     author = {},     journal = {},     number = {},     pages = {},     title = {},     url = {www.wikipedia.com},     volume = {},     year = {}     }      The problem is that this link is not visible when I compile the file. In document I see author, title, journal, etc. ,but I can't see url (link -> www.wikipedia.com). How can I solve it? Thanks. This is the template, which I am using: https://drive.google.com/file/d/0BwyOySLlDTB_a3R5aFZQNzVFRG8/edit?usp=sharing


title: Error : Too many unprocesssed floats, multiple figures single page

text: I am trying to include 3 figures on a single page. I tried the following code:               \begin{figure}[t!]     \begin{center}     \includegraphics[scale=0.5]{images/Figure1.pdf}     \caption{Figure 1.}     \label{fig1}          \includegraphics[scale=0.5]{images/Figure2.pdf}     \caption{Figure 2.}     \label{fig2}          \includegraphics[scale=0.5]{images/Figure3.pdf}     \caption{Figure 3.}     \label{fig3}     \end{center}     \end{figure}      However, this code produces an error on compiling.               ! LaTeX Error: Too many unprocessed floats.      When I remove the 3rd figure out of the figure environment and put it in a new figure environment, then it works. But it then goes to multiple pages, only the first 2 figures stay on the same page. Then I searched other similar questions and saw this one : Arranging multiple figures How to arrage multiple figures? . Here they talk about using subfigure package, so I just gave in the top of my latex document.               \usepackage{subfig}      When I compile this, I get another error.               ! LaTeX Error: Command \c@subfigure already defined.                    Or name \end... illegal, see p.192 of the manual.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.113 \newcounter{subfigure}                                 [figure]      Any suggestions for getting around this ?


title: Vertical spacing around a parbox

text: Given this:               \documentclass{article}     \usepackage{lipsum}     \usepackage{setspace}     \setstretch{1.5}     \setlength{\parindent}{0pt}          \newlength{\len}     \newcommand{\arrowed}[1]{%       % draw an arrow, then a parbox that's exactly       % the remaining width of the line       \settowidth{\len}{$\rightarrow$}%       \addtolength{\len}{-2\len}%       \addtolength{\len}{\textwidth}%       $\rightarrow$\parbox[t]{\len}{#1}%     }          \begin{document}     \lipsum[2]     \arrowed{\lipsum[4]}     \lipsum[6]     \arrowed{But this is OK, since it's only one line.}     \lipsum[2]     \end{document}      It's double-spaced, except for immediately after the big parbox. How do I fix that? (I know there are other ways to achieve the same result as what I did here, but it's part of something else that is using the parbox in a list item label, and the problem that I'm having is that the spacing after the parbox is wrong if the contents are more than one line long.) * * * Edit: Thanks for the suggestions. Here is some more complete code that shows how I'm using the parbox as part of a list item label, as mentioned. I've tried to incorporate your suggestions: @Werner's suggestion (marked 1 in the code) gives `You can't use \prevdepth in restricted horizontal mode`, while @Steven's suggestion (marked [2]) doesn't seem to have any effect. I've tried a few variations of those but haven't had any luck.               \documentclass{article}     \usepackage{setspace,lipsum}     \makeatletter     \newcommand\singlelipsum[1]{%       \begingroup\let\lips@par\relax\csname lipsum@\@roman{#1}\endcsname     \endgroup }     \newlength{\argwidth}     \newcommand{\argparams}[1]{%       \parbox[t]{\argwidth}{%         \setstretch{1.5}%         #1)%         %\par\xdef\tpd{\the\prevdepth}%  [1]         %\strut%  [2]       }%       %\par\prevdepth\tpd%  [1]       %\\\strut\ignorespaces%   [2]     }     \newcommand{\argfunc}[1]{\textbf{#1}(}     \newcommand{\argitem}[2]{       \settowidth{\argwidth}{\argfunc{#1}}%       \addtolength{\argwidth}{-2\argwidth}%       \addtolength{\argwidth}{\textwidth}%       \item[\argfunc{#1}\argparams{#2}]%     }     \newcommand{\argitemlabel}[1]{%       \@tempdima\linewidth%       \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}%     }     \newenvironment{arglist}{       \begin{list}{}{%           \setlength\labelwidth{\leftmargin}           \setlength\labelsep{0pt}           \setlength\rightmargin{0pt}           \let\makelabel=\argitemlabel%         }%     }{\end{list}}     \makeatother     \begin{document}     \setstretch{2}     \begin{arglist}     \argitem{function}{args} body     \argitem{function}{\singlelipsum{4}} \singlelipsum{2}     \end{arglist}     \end{document}      ![problem](http://i.stack.imgur.com/kar07.png) By the way, the approach I'm using is based on the `sphinx.sty` used by Sphinx-doc. I think they don't have the problem because it's single spaced there.


title: list environment to set different paragraphs within an item

text: I'm trying to create a document with exercies and solutions. Since exercises often come in different parts (such as (a), (b) and so on), I want to use lists for the solutions. However, solutions are often complicated and need some formatting to be well understable. Therefore I need a list environment with flexible formatting such as stetting different paragraphs within an item. I am using `enumitem`, but the inline list environment `enumerate*` doesn't accept paragraphs and seems to cause other minor problems. What alternatives do I have? Here is a piece of code:               \begin{solution}       \begin{enumerate*}[label=(\alph*)]         \item {Text with, separated by an empty line              to set a new paragraph}       \end{enumerate*}     \end{solution}      An this is the output I get: ![no paragraph is set](http://i.stack.imgur.com/qlCbe.png) Here is a full minimal example:               \documentclass{scrreprt}          \PassOptionsToPackage{amsmath,thmmarks,thref}{ntheorem}     \PassOptionsToPackage{inline}{enumitem}          \usepackage{amsmath,MnSymbol}        \usepackage{ntheorem,thmtools}     \usepackage{         enumitem,     }          \declaretheoremstyle{plain}     \declaretheorem[style=plain,numbered=no,name=Proof]{proof}          \begin{document}          \begin{proof}       \begin{enumerate*}[label=(\alph*),mode=unboxed]              \item {A text                separated by an empty line}       \end{enumerate*}     \end{proof}          \end{document}      Again, here is my output: ![no inserted paragraph](http://i.stack.imgur.com/llCqj.png)


title: Compile separate document chapters into book w/o duplicate references?

text: I am trying to collect a set of independent documents, each with its own preamble and `begin{document}` and `\end{document}` lines into a book. I have looked into the `subfiles` package and tried `\include` but all of these require me to assemble a common preamble into a `main.tex` and then `\include` each of the file separately. The problem with this is that I lose the ability to **independently** compile each of the separate chapters because each chapters' preamble had to be removed as it was consolidated into `main.tex`. Thus, if I later want to compile each chapter separately, I have to replace the preamble and then compile. I would like to avoid doing this by hand because there are a lot of chapters. Another problem is that each of the separate chapters has labels such as `fig:figure1`. There is no ambiguity when compiling each chapter separately, but when you combine them into one book they become ambiguous. Is there a way around these problems?


title: LaTeX Syntax Highlighting in Google Drive

text: I like the LaTeX syntax highlighting in emacs through AUCTeX, but for various reasons like to write my LaTeX documents in Google Drive. I wanted to write a Google Script to do LaTeX syntax highlighting directly in my Google Drive LaTeX documents. I've looked around online to see if people have attempted this. I've seen the source code for latex-lab, which is a standalone online editor, that reads from Google Drive. I would prefer writing directly in Google Drive itself. The code uses codemirror, and has a latexparser JavaScript that seems like it shouldn't be too painful to port to Google Script. My main question is: does this sound feasible? I don't want to dedicate the time if it's just going to turn out too slow, or if someone has already written such a script.


title: How to resize a graphic attached to LTXinputExample?

text: I want to attach a PDF output of a source code using `graphic` option of `LTXinputExample`. Shortly speaking, how to resize the attached graphic? ![enter image description here](http://i.stack.imgur.com/OdyD3.png)               \documentclass{article}     \usepackage{filecontents}     \begin{filecontents*}{source.tex}     \documentclass[tikz]{standalone}     \begin{document}     \tikz \draw (0,0) circle (1);     \end{document}     \end{filecontents*}          \immediate\write18{pdflatex source}          \usepackage{showexpl}     \lstset     {         frame=single,     }          \begin{document}     \LTXinputExample[graphic=source,pos=b]{source.tex}     \end{document}      Edit: I don't want to change the width of the formatted source code.


title: Right flush text in math environment

text: In my align* environment I have a bunch of lined up equations, but I would like to put some explanations of the steps done to the right of the equations. Currently it looks bad:               \begin{align*}       P(X_l=x_l,\ldots ,X_{l+k}=x_{l+k}) &= \int_0^1 f(x_l)\cdots f(x_{l+k})dp\\                         &= \int_0^1 \prod_{i=1}^k p^{1\{x_i=1\}}(1-p)^{1\{x_i=0\}}dp\\                         &= \int_0^1 p^t(1-p)^{k-t}dp\\                         &= \int_0^1 p^{t+1-1}(1-p)^{k-t+1-1}dp\\                         &= \dfrac{\Gamma(k-t+1)\Gamma(t+1)}{\Gamma(k+2)}\int_0^1\dfrac{\Gamma(k+2)}{\Gamma(k-t+1)\Gamma(t+1)} p^{t+1-1}(1-p)^{k-t+1-1}dp\\                         &= \dfrac{\Gamma(k-t+1)\Gamma(t+1)}{\Gamma(k+2)} \text{ \; term on right is a $\Gamma(t+1,k-t+1)$}\\                         &= \dfrac{t!(k-t)!}{(k+1)!} \text{ \; Since $k$ is an integer}     \end{align*}      How would you make this look better? More specifically I think the text would look nice if it was all flushed to the right. EDIT: How do I make the Latex show up?


title: Bifurcating a PDF: choosing a "Plan B" during a talk

text: I think this is a greenhorn's question, but anyway. It is sometimes difficult to measure time for a talk, according to unknown places and audiences.By this and other reasons I'd like to subtly launch a _hidden "Plan B"_ (or, why not, a longer _plan C_ ) during my talk. Specifically > Question: Is it possible to generate a PDF that allows one to take decisions > when giving a talk. That is, if at some point of the talk, one notices that > one ran out of time, to manually choose a shorter sequence of slides? (The optimal solution may be having enough practice giving talks - not my case)


title: Grouped bar chart

text: I'm trying to construct a grouped bar chart and have three questions I can't seem to find the answer to: 1) How do I modify the spacings between the groups? Or at least make sure that no bars are outside the chart? 2) How do I remove the spacing between bars in a group? 3) How do I in the legend add a single space between each symbol and description?               \documentclass[12pt,a4paper,onecolumn, openright]{report}     \usepackage{xcolor}     \usepackage{pgfplots}     \usepackage{tikz}          % Define bar chart colors     %     \definecolor{bblue}{HTML}{4F81BD}     \definecolor{rred}{HTML}{C0504D}     \definecolor{ggreen}{HTML}{9BBB59}     \definecolor{ppurple}{HTML}{9F4C7C}               \begin{document}     \begin{tikzpicture}         \begin{axis}[             width  = 0.85*\textwidth,             height = 8cm,             major x tick style = transparent,             ybar,             bar width=14pt,             ymajorgrids = true,             ylabel = {Run time speed},             symbolic x coords={EgyptHD,Hover,Navi},             xtick = data,             scaled y ticks = false,         ]             \addplot[style={bblue,fill=bblue,mark=none}]                 coordinates {(EgyptHD, 1.0) (Hover,1.0) (Navi,1.0)};                  \addplot[style={rred,fill=rred,mark=none}]                  coordinates {(EgyptHD,1.123) (Hover,0.85) (Navi,1.09)};                  \addplot[style={ggreen,fill=ggreen,mark=none}]                  coordinates {(EgyptHD,0.92) (Hover,0.56) (Navi,0.95)};                  \addplot[style={ppurple,fill=ppurple,mark=none}]                  coordinates {(EgyptHD,0.74) (Hover,1.07) (Navi,1.23)};                  \legend{No vectorization,TreeScore $>2$,TreeScore $>3$,TreeScore $>4$}         \end{axis}     \end{tikzpicture}     \end{document}      ![](http://i.stack.imgur.com/th0Nj.png)


title: newcommand for hvfloat

text: Using the hvfloat package:               \documentclass[pdftex,10pt,b5paper,twoside]{report}      \usepackage[showframe,lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}     \usepackage[demo]{graphicx}     \usepackage{hvfloat}          \begin{document}          \appendix     \chapter{Test chapter}          \hvFloat[%     floatPos=htb,%     capVPos=c,%     rotAngle=90,     objectPos=c]{figure}{\includegraphics[width=353pt,height=290pt]{image}}%     [Commercial crude oil inventories, SPX excess returns, S\&P GCSI excess return time series]{Commercial crude oil inventories calculated as the logarithm of the current value divided by the mean of same weekly values over the past 5 years, Log excess returns on the S\&P Goldman Sachs Commodity Index,  Log excess returns on the S\&P 500 index.}{fig:test}          \end{document}      can I in any way write a function that automatically rotate the "object" (rotAngle), depending on if the figure is on a even or odd page: Have tried:               \usepackage{ifthen}     \newcommand{\currentside}{\ifthenelse{\isodd{\thepage}}{270}{90}}          rotAngle = \currentside      But can't get i to work.. Anyone have a suggestion?


title: Move table to the left of the page

text: As I run the TeX, it seems that table is exceeded the page. How I can move it to the left of the page so that the table is positioned nicely at the middle of the page? Here is my code:-                 \documentclass{article}            \usepackage{amsmath}       \usepackage{amsfonts}       \usepackage{amssymb}       \usepackage[demo]{graphicx}            \begin{document}            \begin{center}       \includegraphics{ftab.png}           {\Large \textbf{F Table for $ \alpha = 0.025 $ }}{\normalsize ($\frac{1}{3}$})           \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}      \hline  \textbf{df2/df1} & \textbf{1} & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} & \textbf{8} & \textbf{9} \\       \hline  \textbf{1}  & 647.7890& 799.4822   & 864.15    & 899.5833  & 921.8479  & 937.1111  & 948.2169  & 956.6562  & 963.2846 \\      \hline  \textbf{2}  & 38.5063 & 39.0000    & 39.166    & 39.2484   & 39.2982   & 39.3315   & 39.3553   & 39.3730   & 39.3869  \\      \hline  \textbf{3}  & 17.4434 & 16.0442    & 15.439    & 15.1010   & 14.8848   & 14.7347   & 14.6244   & 14.5399   & 14.4731  \\      \hline  \textbf{4}  & 12.2179 & 10.6491    & 9.9792    & 9.6045    & 9.3645    & 9.1973    & 9.0741    & 8.9796    & 8.9047   \\       \hline  \textbf{5}  & 10.0070 & 8.4336 & 7.7636    & 7.3879    & 7.1464    & 6.9777    & 6.8530    & 6.7572    & 6.6811   \\      \hline \textbf{6}  & 8.8131     & 7.2599   & 6.5988    & 6.2271    & 5.9876    & 5.8197    & 5.6955    & 5.5996    & 5.5234   \\      \hline  \textbf{7}  & 8.0727    & 6.5415   & 5.8898    & 5.5226    & 5.2852    & 5.1186    & 4.9949    & 4.8993    & 4.8232   \\      \hline  \textbf{8}  & 7.5709    & 6.0595   & 5.4120    & 5.0526    & 4.8173    & 4.6517    & 4.5285    & 4.4333    & 4.3572   \\      \hline  \textbf{9}  & 7.2093    & 5.7147   & 5.0781    & 4.7181    & 4.4844    & 4.3197    & 4.1970    & 4.1020    & 4.0260   \\       \hline  \textbf{10} & 6.9367    & 5.4564   & 4.8256    & 4.4684    & 4.2361    & 4.0721    & 3.9498    & 3.8549    & 3.7790   \\       \hline  \textbf{11} & 6.7241    & 5.2559   & 4.6300    & 4.2751    & 4.0440    & 3.8806    & 3.7586    & 3.6638    & 3.5879   \\      \hline  \textbf{12} & 6.5538    & 5.0959   & 4.4742    & 4.1212    & 3.8911    & 3.7283    & 3.6065    & 3.5118    & 3.4358    \\      \hline  \textbf{13} & 6.4143    & 4.9653   & 4.3472    & 3.9959    & 3.7667    & 3.6043    & 3.4827    & 3.3880    & 3.3120   \\      \hline  \textbf{14} & 6.2979    & 4.8567   & 4.2417    & 3.8919    & 3.6634    & 3.5014    & 3.3799    & 3.2854    & 3.2093 \\      \hline  \textbf{15} & 6.1995    & 4.7650   & 4.1528    & 3.8043    & 3.5764    & 3.4147    & 3.2934    & 3.1987    & 3.1227 \\      \hline  \textbf{16} & 6.1151    & 4.6867   & 4.0768    & 3.7294    & 3.5021    & 3.3406    & 3.2194    & 3.1248    & 3.0488\\        \hline  \textbf{17} & 6.0420    & 4.6189   & 4.0111    & 3.6648    & 3.4380    & 3.2767    & 3.1556    & 3.0610    & 2.9849\\       \hline  \textbf{18} & 5.9781     & 4.5597   & 3.9539    & 3.6083    & 3.3820    & 3.2209    & 3.0999    & 3.0053    & 2.9291 \\      \hline  \textbf{19} & 5.9216     & 4.5075   & 3.9034    & 3.5587    & 3.3327    & 3.1719    & 3.0509    & 2.9564    & 2.8801 \\     \hline  \textbf{20} & 5.8715     & 4.4612   & 3.8587    & 3.5147    & 3.2891    & 3.1284    & 3.0074    & 2.9128    & 2.8365 \\     \hline  \textbf{21} & 5.8266     & 4.4199   & 3.8188    & 3.4754    & 3.2501    & 3.0895    & 2.9686    & 2.8740    & 2.7977 \\      \hline  \textbf{22} & 5.7863     & 4.3828   & 3.7829    & 3.4401    & 3.2151    & 3.0546    & 2.9338    & 2.8392    & 2.7628 \\      \hline      \end{tabular}           \end{center}     \end{document}      Thank you for the concern and help.


title: Making subsections be numbered with A,B,C,

text: I'm using the `book` class. My chapters are numbered with 1,2,3,... I have already managed to have my sections be numbered with only 1,2,3,... (they reset upon a new chapter). How can I number my subsections with A,B,C,... such that they reset to A upon new sections/chapters?