title: Does biblatex-chicago not support editortype "reviser"?

text: `biblatex` allows for the specification of multiple editorial roles through the availability of multiple editor keys `editor`, `editora`, `editorb`, coupled with editorial role values `translator`, `collaborator`, `reviser`, etc. linked to a series of editorial role keys `editortype`, `editoratype`, `editorbtype`. I use `biblatex-chicago` (notes). Consider the following MWE:               \documentclass{book}     \usepackage{xltxtra}     \usepackage{etoolbox}     \usepackage{etex}     \usepackage{keyval}     \usepackage{ifthen}     \usepackage{url}     \usepackage[style=american]{csquotes}     \usepackage{polyglossia}     \usepackage{verbatim}     \usepackage[notes]{biblatex-chicago}          \setdefaultlanguage{english}     \setmainfont[Ligatures=TeX]{Brill}     \addbibresource{season.bib}          \begin{document}          I cite.\autocite[55]{nec62lie}          \end{document}      And couple this with the following bibliography:               @book{nec62lie,        editor = {Neckel, Gustav},        editora = {Kuhn, Hans},        editoratype = {reviser},        title = {Die Lieder des Codex Regius nebst verwandten Denkmälern},        shorttitle = {Codex Regius},        edition = {3},        location = {Heidelberg},        publisher = {Winter},        year = {1962},        keywords = {primary}     }      I expect this to work. However, the output is >   1. Gustav Neckel, ed., Die Lieder des Codex Regius nebst verwandten > Denkmälern, 3rd ed., **cbyreviser** Hans Kuhn (Heidelberg: Winter, 1962), > 55. > If I change the value of `editoratype` from `reviser` to `collaborator`, it works beautifully. And yes, I have tried whether `biblatex-chicago` prefers the spelling "revisor". Does `biblatex-chicago` not support the role `reviser`? What can I do to make this work?


title: Looking for a more appropriate version of \cases

text: Often-times I find myself wanting to write something like, ![](http://i.stack.imgur.com/ZK8xx.png) That is, a vertical brace followed by a table consisting of three columns, the first and the last are math, aligned where-ever _I_ like, and the middle one is text, right aligned. I have now found the solution that I want using `tabularx`:               \left\{     \begin{tabular}{>{$}r<{{}$}@{}>{${}}l<{$}r>{$}r<{{}$}@{}>{${}}l<{$}}     &\frac{n(x)}{1+j^2F^2} & for &  j&=0\\     2&\frac{\cos(jk)}{1+j^2F^2}f_j^{\FD}(n(x))& for & j&>0\\     2&\frac{\sin(jk)jF/\tau}{1+j^2F^2}f_j^{\FD}(n(x)) & for& j&<0      \end{tabular}     \right.      (I put the extra braces inside the column definition so that that operators near the alignment character remain relative, which is the usual intention) My question is two fold really:   1. Is there a package or a command that does this (I think that cases is supposed to but I still need to use `\text{}` which is annoying)?   2. What is the best way to turn this into an environment so that I can simply write              \begin{mycases}     &\frac{n(x)}{1+j^2F^2} & for &  j&=0\\     2&\frac{\cos(jk)}{1+j^2F^2}f_j^{\FD}(n(x))& for & j&>0\\     2&\frac{\sin(jk)jF/\tau}{1+j^2F^2}f_j^{\FD}(n(x)) & for& j&<0      \end{mycases}


title: Chapters in TeX

text: I've been writing in TeX for a few years, but this is my first time writing a long document. I have always used `\title` for the main title, and `\section` for smaller titles. It seems that it is only possible to use `\title` once. I therefore wonder what the standard procedure is for a title that is between the main title and a section. In particular, what should I use for titles of chapters?


title: How to highlight important pages in glossaries page number list

text: In some books, the keywords page not only has a list of pages the keyword was referenced, it also bold or emphasize page numbers where the keyword was defined or explained. How do I do that with acronym option in glossaries? With the MWE attached, the glossary page gives: > Fft fast Fourier transform. 1–3 I would like something akin to: > Fft fast Fourier transform. **2** , 1-3 or 1, **2** ,3 or similar. The best idea is to have a user field say user6 with a user defined label link such that in the acronym definition:               \newacronym[sort=FFT,user6={\pageref{link:fft}}]{FFT}{\textsc{Fft}}{fast Fourier transform}      I presume it may be quite an undertaking? MWE:               \documentclass[11pt,a4paper]{article}     \usepackage[acronym,shortcuts]{glossaries}      \newacronym[sort=FFT]{FFT}{\textsc{Fft}}{fast Fourier transform}     \makeglossaries          \begin{document}     \Ac{FFT} is widely used to compute Fourier transforms. For more information see p.\pageref{link:fft}     \newpage     \section{Fast Fourier Transform}\label{link:fft}     \Acf{FFT}, is a radix-2 algorithm implementing the discrete Fourier transform...........................................................%explanation     \newpage     \ac{FFT} %some other references     \newpage     \printglossary[type=\acronymtype]     \end{document}


title: Resize a tabular object to textwidth

text: I have a table which its width exceed the textwidth of the document, but I want reduce its size to fit the textwidth space. I have tried the resizebox command but it doesn't work at all.               \begin{table}[h!]       \centering       \resizebox{\textwidth}{!}{         \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}       \hline       One & Two &Three & Four & Five & Six & Seven & Eight & Nine & Ten & Eleven &       Twelve & Thirteen & Fourteen\\            \hline       \hline       $1.111$ & $2.222$ & $3.333$ & $4.444$ & $5.555$ & $6.666$ & $7.777$ &       $8.888$ & $9.999$ & $0.000$ & $1.111$ & $2.222$ & $3.333$ & $4.444$\\       \hline       \end{tabular}     }       \caption{Test Table}       \label{tab:label_test}     \end{table}      The table keeps the same width and exceed the border of the page. I want resize the table, scaling all the tabular object without touch the caption fontsize. How can I do that? If I copy the code of @HarishKumar: ![Width adjustbox command](http://i.stack.imgur.com/iNkOr.png)


title: current column width in a tabu table

text: Is there some way of getting the current column width in a tabu table in the same way that one can refer to `\columnwidth` in a multicol? For example, the following gallery works but its a bit ugly since the column content had to know its width. i.e. we had to specify `[width=.45\textwidth]` whereas we would prefer not to have to do that. If this were a multicol then we could have just used `[width=\columnwidth]` in its place. I searched through the tabu documentation looking for all occurrences of `width` but did not find it.               \documentclass{article}     \usepackage{graphicx}     \usepackage{tabu}          \begin{document}          \begin{tabu}{XX}     \framebox{\includegraphics[width=.45\textwidth]{myfig}} &     \framebox{\includegraphics[width=.45\textwidth]{myfig}} \\     Some text.  & Some more Text.  \\     \end{tabu}          \end{document}


title: "negative" font overlayed with a photo

text: I would like to write some text in latex, then replace the black of the letters by a transparent layer, and overlay on top of a PDF photo. I could do it by exporting to photoshop, but I would like a latex-only solution. Thanks!


title: To visualise Schematic Intersections of Sections over Parts

text: Assume you have Parts   * Exotoxins A-B   * Non-spore-forming Gr+ Some of exotoxins A-B bacteria belong too to non-spore-forming Gr+. I can visualise this by a venn diagram, however I would like show this kind of structure in colours too. Assume you have bacteria   * Clostridium (in both groups)   * P aeruginosa (in both groups)   * Listeria monocytogenes (not in exotoxins A-B group) The structure of my text               \documentclass{article}         \usepackage[framemethod=tikz]{mdframed}          %%%%%%%%%%%%%%%%%%%%%%%% Counter Section %%%%%%%%%%%%%%%%%%%%%%     \makeatletter       \def\@part[#1]#2{%         \ifnum \c@secnumdepth >\m@ne           \refstepcounter{part}%         \fi         \addcontentsline{toc}{part}{#1}%         {\parindent \z@ \raggedright          \interlinepenalty \@M          \normalfont          \LARGE \bfseries #2%          \markboth{}{}\par}%         \nobreak         \vskip 3ex         \@afterheading}     \@addtoreset{section}{part}         \makeatother     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}     % Start yellow bar on the left-hand-side margin for the Non-spore-forming     \part{Non-spore-forming}     \section{Listeria monocytogenes}     ....     % Start red bar on the left-hand-side margin to sign for Exotoxins     \part{Exotoxins A-B}     \section{Clostridium}     ...     \section{P aeruginosa}     ...     % End Red bar on the margin for exotoxins     % End yellow bar on the margin for non-spore-forming      **tikz** package comes to my mind only fro this visualisation. However, there can be better solutions. **How would you do the visualisation of the body and mark intersections?** I remember of seeing an elliptical curve visualisation for Table of Contents, where the writer added **tag** words to specific sections and then finally it created 2D elliptical curve visualisation about the relationships in the body. However, I cannot remember by which package he did it.


title: shortauthor and shorttitle displayed as (cit. shortauthor, shorttitle) enclosed in bibliography using biblatex

text: been trying too long now on this: I would like to enclose e.g. the following text: > (cit. Doe, Commercial Laws) _[name in smallcaps]_ in the end of each of my entries in the bibliography before the period, e.g.: > Doe John, Commercial Laws of Canada, Toronto 1999 (cit. Doe, Commercial > Law). _[name in smallcaps]_ Using biblatex and biber, I found the following and put in in the preamble of my *.tex file:               \renewbibmacro*{begentry}{        \printtext[parens]{        \unspace{cit. }\printnames{shortauthor}\addcomma\addspace\printfield{shorttitle}\unspace        \printnames{shorttitle}}     }      This generates (position in the beginning instead of the end!): > (cit. Doe, Commercial Laws) Doe John, Commercial Laws of Canada, Toronto > 1999. Does anyone have a solution to my problem? Also, is it possible to generate shortauthor and shorttitle with biblatex without defining these labels in the *.bib file?


title: Installing packages for linux on texworks

text: I am fairly new to ubuntu and I just installed TexWorks. Everything works fine but can someone give me step by step to install packages. With Windows I used the MikTex package manager but I am lost on how to install packages for linux. Please let me know the best and easiet solution. Thanks


title: I can't get minted package to work under Ubuntu (pygments error)

text: I'm currently using ubuntu13.10, TeXlive and Texmaker editor, and I found out that minted package is the best way to get source code highlighting on LaTeX. So I installed `python-pygments` via terminal (`sudo apt-get install python- pygments`), it actually installed correctly, but when I start Texmaker and type `\usepackage{minted}` the log displays: > ! Package minted Error: You must invoke LaTeX with the -shell-escape flag. > > ! Package minted Error: You must have `pygmentize' installed to use this > packag e. and it gives me this error as well: > LaTeX Error: File `mytexts.pyg' not found. I'd appreciate some help on that, I'm learning `C atm` and minted would be really helpful. EDIT: Mmm, I chek out tm settings>fast comp. and I have selected `latex + dvips + ps2pdf + see pdf` option, so I should add the -shell-escape line to dvips at settings>commands or to ps2pdf or both of them? That's what I'm not really getting, where I should add the shell escape lines... (python-pigments + texlive are already installed) thanks


title: \includegraphics -- file not found, even when in same directory

text: Here's the preamble:               \documentclass{report}     \usepackage{fullpage}     \usepackage{amssymb}     \usepackage[fleqn]{amsmath}     \usepackage{graphicx}     \usepackage{color}      ... And here's the call to `\includegraphics`:               \includegraphics[scale=0.5]{n6d.png}      The error on the log:               ! Package pdftex.def Error: File `n6d.png' not found.          See the pdftex.def package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.39 ...aph & \includegraphics[scale=0.5]{n6d.png}                                                    & \includegraphics[scale=...      Typing "H" just puts it into draft mode. The file 'n6d.png' is located in the same folder as the `.tex` file. I've tried putting just 'n6d' as the filename, but still have the same problem. Here's the command I'm calling to compile the PDF:               "C:\texlive\2012\bin\win32\pdflatex.exe" -output-directory "D:\Documents\School\Math3\Worksheets\3" "D:\Documents\School\Math3\Worksheets\3\wksht3_sols.tex"      There are other files in the `.tex` file that are having the same issue. Any ideas?


title: What is with the unsightly overlap at the top of the index pages in source2e.pdf?

text: I notice that in `source2e.pdf`, the Index section has a running header that intersects with the top of the main text on each page, like so: ![](http://i.stack.imgur.com/9Zv2u.png) (Actually, this seems to happen with some other sections, too, for example "Change History".) This occurs both in the current version at http://www.tug.org/texmf- dist/doc/latex/base/source2e.pdf (permalink http://www.webcitation.org/5viCxJBr7) and in the ones included with MiKTeX 2.8 and 2.9. What causes this -- is it something to do with the fact that these PDFs are using the A4 paper size rather than letter? (And of course it would also be nice if somebody fixed it at some point...)


title: TikZ: How to determine the vector between two co-ordinates

text: Given two co-ordinates say, `X.south east` and `X.south west`, is it possible to determine the length or the vector between the two? In the MWE the width, has been calculated using traditional TeX techniques, but is obviously a bit of a wasted effort as PGF probably did all these calculations already. ![enter image description here](http://i.stack.imgur.com/nfeQ2.jpg)               \documentclass{article}     \usepackage{pgf,tikz}     \makeatletter     \begin{document}     \def\convert@cx#1{\the#1}     \newlength\xheight@cx     \newlength\xlength@cx     \newlength\xdepth@cx     \newlength\xtotal@cx     \newsavebox{\fontbox}     %     \def\drawfontbox#1{%       {\upshape\Huge        \savebox{\fontbox}{#1}        \pgfmathsetlength{\xheight@cx}{\ht\fontbox}        \pgfmathsetlength{\xlength@cx}{\wd\fontbox}        \pgfmathsetlength{\xdepth@cx}{\dp\fontbox}        \pgfmathsetlength{\xtotal@cx}{\xdepth@cx+\xheight@cx}       \begin{tikzpicture}[scale=1]         \node[rectangle,draw,inner sep=0pt,outer sep=0pt] (X){#1};         \draw[red, line width=0.4pt] (X.text)  circle(1pt)[fill=red] -- (X.base east);         \draw[|<->|,>=latex] ([yshift=5pt] X.north west)            --([yshift=5pt] X.north east) node [above=-5pt,midway,            font={\tiny}]{width = \convert@cx{\xlength@cx}};         % draw the xheight         \draw[|<->|,>=latex]([xshift=-5pt]X.base west)               --([xshift=-5pt] X.north west)               node [left,midway,font={\tiny}] {x-height=\convert@cx{\xheight@cx}};     %   draw depth         \draw[-|,>=latex]([xshift=-5pt]X.base west)               --([xshift=-5pt] X.south west)               node [left,midway,font={\tiny}] {depth=\convert@cx{\xdepth@cx}};         \draw[<-,>=latex]([xshift=-5pt]X.south west)               --++(0,-8pt);     %   draw total height     %     \draw[|<->|,>=latex]([xshift=5pt]X.north east)               --([xshift=5pt] X.south east)               node [right,midway,font={\tiny}] {height=\convert@cx{\xtotal@cx}};       \end{tikzpicture}}     }     \drawfontbox{QWERTY}     \end{document}


title: TeXShop: Force spaces instead of tabs

text: Is there a way to make TeXShop insert an arbitrary number of spaces when I press the tab key instead of inserting a tab? This functionality is in TeXnicle and I really like it, but TeXShop is my favorite editor. A related question is how to easily indent multiple lines of code with spaces (not tabs) in TeXShop. When I think about it, I don't even know how to indent multiple lines of code with tabs! The setting in TeXnicle is shown in the following picture: ![TeXnicle Functionality: Replace Tab with Spaces](http://i.stack.imgur.com/ollon.png) ## Update I have put together some code which will add a single space (or more) in front of an arbitary number of selected lines in TeXShop. I need some help here, however. After I run the script, TeXShop deselects the original selection. **Why is this bad?** You cannot quickly rerun the script on the same selection. It wouldn't be efficient to make a key binding for this script.               (*BASIC STRUCTURE OF THIS SCRIPT*)     --repeat with each line in theselection     --do shell script "sed 's/^/ /'   --THIS THING JUST ADDS A SPACE IN FRONT OF EACH LINE OF INPUT          tell application "TeXShop"         --get the front document         set thisDoc to the front document         set mySel to selection of thisDoc         set selContent to content of selection of thisDoc         set outcome to do shell script "echo " & (quoted form of selContent) & "|sed 's/^/ /' "         set content of selection of thisDoc to outcome     end tell      Before: ![Selection Before Script](http://i.stack.imgur.com/EQ7MN.png) After: ![Result](http://i.stack.imgur.com/IJoBz.png) Is there a way to fix this script so that it leaves the selection selected after running?


title: How to draw a diagram with boxes of text inside each other and have them laid out automatically?

text: How do I make a diagram of the following structure where each element is a box with text and possibly sub-elements. Here is an example of the desired structure. The sizes and alignment of the boxes are arbitrary. ![Example](http://i.stack.imgur.com/TmO8M.jpg) I want the diagram to automatically align the boxes so that there is a bit of space between each. The order of the boxes does not matter, only which ones are inside which. Nice to have features:   * Text should be optional if the box contain other boxes   * The background color of each box can be specified. I'd prefer a TikZ solution, but other ways are good too if they do not depend on external programs and the structure would be easier to keep track of.


title: includegraphics stopped working after including another graphic

text: Currently using Texmaker and using this line of code:               \begin{figure}[h!]     \includegraphics[scale=.5]{Figures/Blah}     \caption{\label{Blah} BLAH BLAH}     \end{figure}      Everything worked with several other figures until I tried to add a new figure. Now I get these error messages for every figure despite deleting the new figure I added.               ! LaTeX Error: Not in outer par mode.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... \begin{figure}[h!]     ! Undefined control sequence.\@xfloat@LaTeX ...f \fi \global \setbox \@currbox\color@vbox \normalcolor \... \begin{figure}[h!]     ! Missing number, treated as zero      * * *               \documentclass[aps, prl, twocolumn, floatfix, final, letterpaper, citeautoscript, superscriptaddress]{revtex4}      \usepackage{graphicx}      \usepackage{subfigure}      \usepackage{natbib}      \usepackage{amsmath}


title: How to modify (default) Beamercolortheme?

text: I created a latex beamer presentation using "Montepellier" theme with default color theme. I need to modify this theme (I want to change the color of the upper and lower border of header - separately). So I copied "beamercolorthemedefault" to my project, renamed and included it (this is working!). But I can't change any colors - changing colors has no effect. I changed the default the this way (only the changed first lines):               \ProvidesPackageRCS $Header:                 /Users/joseph/Documents/LaTeX/beamer/base/themes/color/beamercolorthemedefault.sty,v d02a7cf4d8ae 2010/06/17 09:11:41 rivanvx $               \mode<presentation>          \definecolor{beamer@blendedblue}{rgb}{0.5,0.5,0.3} % changed this          \setbeamercolor{normal text}{fg=black,bg=white}     \setbeamercolor{alerted text}{fg=red}     \setbeamercolor{example text}{fg=green!50!black}          \setbeamercolor{structure}{fg=beamer@blendedblue}          \setbeamercolor{background canvas}{parent=normal text}     \setbeamercolor{background}{parent=background canvas}          \setbeamercolor{palette primary}{fg=yellow,bg=yellow} % changed this     \setbeamercolor{palette secondary}{use=structure,fg=structure.fg!100!green} % changed this     \setbeamercolor{palette tertiary}{use=structure,fg=structure.fg!100!green} % changed this      But all this changes have no effect?! (replacing the complete content by another theme works) So how to change any colors and how to change the borders of header?


title: Why subfigure are not centered

text: I'm using beamer with subfigure. I would center it but doesn't work. Why? A MWE follows:               \documentclass{beamer}     \mode<presentation>          \usetheme{Warsaw}     \usepackage[utf8]{inputenc}          \begin{document}             \begin{frame}                 \begin{figure}\centering                     \parbox{1.3in}{                         A                     }                     \qquad                     \begin{minipage}{1.3in}                         B                                \end{minipage}                 \end{figure}             \end{frame}      \end{document}


title: currvita - vertical distance between bullters

text: How to make smaller vertical distance between item bullets in one section only ?               \documentclass[a4paper,10pt]{article}     \usepackage[TextAligned,NoDate]{currvita}     \usepackage{fullpage}     \begin{document}     \begin{cv}{John Doe}          \begin{cvlist}{Sec1}     \item[2000-01--2012-12] x     \item[2000-01--2012-12] y     \item[2000-01--2012-12] z     \end{cvlist}          %how to change vertical distance between items in on section only, leaving other sections unaffected ?     \begin{cvlist}{Section that needs smaller vertical distance}     \item[2000-01--2012-12] A     \item[2000-01--2012-12] A     \item[2000-01--2012-12] A     \item[2000-01--2012-12] A     \item[2000-01--2012-12] A     \end{cvlist}          \begin{cvlist}{SecN}     \item[2000-01--2012-12] x     \item[2000-01--2012-12] y     \item[2000-01--2012-12] z     \end{cvlist}          \end{cv}     \end{document}


title: How can I decide whether a key has had .value forbidden applied?

text: Is there a way to decide whether a given key has had the `.value forbidden` handler applied? For example, I would like to write a handler `.only` that can be applied to keys to simulate Beamer's `\only` functionality. A first attempt would be               \pgfkeys{/handlers/.only/.code args={<#1>#2}{%       \only<#1>{\pgfkeysalso{\pgfkeyscurrentpath = {#2}}}}%     }      However, this fails for keys that have had `.value forbidden` applied. Running the following produces an error because `myred={}` is effectively what happens on slide 2.               \documentclass{beamer}     \usepackage{tikz}          \pgfkeys{/handlers/.only/.code args={<#1>#2}{%       \only<#1>{\pgfkeysalso{\pgfkeyscurrentpath = {#2}}}}%     }          \begin{document}       \begin{frame}         \begin{tikzpicture}[myred/.style={red}, myred/.value forbidden]           \draw [myred/.only=<2>] (0,0) circle (1.5cm);         \end{tikzpicture}       \end{frame}     \end{document}      If there was some way to decide whether `\pgfkeyscurrentpath` has had `.value forbidden` applied, then I could use that information to send a value of `\pgfkeysnovalue`, rather than `{}`, to `\pgfkeyscurrentpath`.


title: How to modfiy spacing for inline math?

text: I want to reduce spacing between operators in inline math. If I add the follwing lines to the peamble it affects both inline and display math modes.               \thinmuskip=0mu     \medmuskip=0mu     \thickmuskip=0mu      How can I limit the effect to inline math without using separate groups for each piece of text?


title: drawing a curve in latex with my own data

text: I would like to draw a curve in latex LaTeX with my own datahow . How please I can do that.? this This is my table that contains the data.... **EDIT** this is 2 new files               %test.dat             Num Min Moy Max     R1 100 100 100     R2 100 100 100     R3 250 250 250     R4 250 250 250     R5 500 500 500     R6 500 500 500     R7 750 750 750     R8 750 750 750     R9 1000 1000 1000     R10 1000 1000 1000      and this is his code               \begin{figure}[!h]     \centering     \begin{tikzpicture}[scale=1]       \begin{axis}[%           % Lengend position           legend pos = outer north east,           % We need a tick for every data           xtick = data,           % The ticks label are provided in the file as the column named Num           xticklabels from table = {test2.dat}{Num}]         % How the data are separated.        % \pgfplotstableset{col sep = tab}         % We need to simulate an x coord since it is litteral in the data file. I choose to index on the line.         \addplot table [x expr = \lineno, y = Min] {test.dat};         \addlegendentry{Min}         \addplot table [x expr = \lineno, y = Moy] {test.dat};         \addlegendentry{Moy}         \addplot table [x expr = \lineno, y = Max] {test.dat};         \addlegendentry{Max}       \end{axis}          \end{tikzpicture}     \caption{Pub Partagée avec des pages dont la politique est Tout le Monde et ayant un Nb Min, Moy Max d'amis}     \end{figure}


title: Why do hyperref and harvard not work together properly?

text: In my current work, I cannot seem to get the packages `harvard` and `hyperref` to work together properly. A small example:               \documentclass[12pt,a4paper]{scrreprt}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage{times}     \usepackage[hyphens]{url}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{graphicx}     \usepackage{rotating}     \usepackage{listings}     \usepackage{fancyhdr}     \usepackage{cite}          \usepackage{harvard}     \citationmode{abbr}     \bibliographystyle{dcu}          \usepackage{setspace}     \onehalfspacing          \usepackage[pdfborder={0 0 0},pdftitle={the document title},pdfauthor={the author}]{hyperref}     \hypersetup{colorlinks=false}               \begin{document}     test     \end{document}      The error message I get is:               ! LaTeX Error: Missing \begin{document}.      in the line right after `\usepackage[...]{hyperref}`. As soon as I either remove the `harvard` package, the document compiles flawlessly. The same happens when I remove the `hyperref` package. What bugs me: When I remove the options from `\usepackage[...]{hyperref}`, it also works. Does anybody know what problem I am facing? **EDIT:** Sometimes, reading the error log in more detail helps. Seems, that missing \begin{document} was not the root cause, but rather the error further down in the log:               ! LaTeX Error: Option clash for package hyperref.     See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...     l.43     The package hyperref has already been loaded with options:     [pdftex]     There has now been an attempt to load it with options     [pdfborder={0 0 0},pdftitle={the document title},pdfauthor={the author}]     Adding the global options:     pdftex,pdfborder={0 0 0},pdftitle={the document title},pdfauthor={the author}     to your \documentclass declaration may fix this.      I have no idea why, but the package seems to be loaded automatically, when I use pdflatex to compile my document. I ended up using               \usepackage{hyperref}          \hypersetup{colorlinks=false}     \hypersetup{pdfborder={0 0 0}}     \hypersetup{pdftitle={\thetitle}}     \hypersetup{pdfauthor={\theauthor}}      **EDIT 2** As per Marco Daniel's request:               *File List*     scrreprt.cls 2009/07/24 v3.04a KOMA-Script document class (report)     scrkbase.sty 2009/07/24 v3.04a KOMA-Script package (KOMA-Script-dependent ba     sics and keyval usage)     scrbase.sty 2009/07/24 v3.04a KOMA-Script package (KOMA-Script-independent     basics and keyval usage)     keyval.sty 1999/03/16 v1.13 key=value parser (DPC)     scrlfile.sty 2009/03/25 v3.03 KOMA-Script package (loading files)     tocbasic.sty 2009/06/08 v3.03b KOMA-Script package (handling toc-files)     scrsize12pt.clo 2009/07/24 v3.04a KOMA-Script font size class option (12pt)     typearea.sty 2009/07/24 v3.04a KOMA-Script package (type area)     inputenc.sty 2008/03/30 v1.1d Input encoding file     utf8x.def 2004/10/17 UCS: Input encoding UTF-8     ucs.sty 2004/10/17 UCS: Unicode input support     uni-global.def 2004/10/17 UCS: Unicode global data     times.sty 2005/04/12 PSNFSS-v9.2a (SPQR)     url.sty 2006/04/12 ver 3.3 Verb mode for urls, etc.     xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)     color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive     dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)     dvipsnam.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)     graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)     trig.sty 1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live     rotating.sty 2009/03/28 v2.16a rotated objects in LaTeX     ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)     listings.sty 2007/02/22 1.4 (Carsten Heinz)     lstmisc.sty 2007/02/22 1.4 (Carsten Heinz)     listings.cfg 2007/02/22 1.4 listings configuration     fancyhdr.sty     cite.sty 2009/08/29 v 5.2     harvard.sty     html.sty 1999/07/19 v1.38 hypertext commands for latex2html (nd, hws, rr     m)     setspace.sty 2000/12/01 6.7 Contributed and Supported LaTeX2e package     hyperref.sty 2009/10/09 v6.79a Hypertext links for LaTeX     ifpdf.sty 2009/04/10 v2.0 Provides the ifpdf switch (HO)     ifvtex.sty 2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)     ifxetex.sty 2009/01/23 v0.5 Provides ifxetex conditional     hycolor.sty 2009/10/02 v1.5 Code for color options of hyperref/bookmark (HO     )     xcolor-patch.sty 2009/10/02 xcolor patch     pd1enc.def 2009/10/09 v6.79a Hyperref: PDFDocEncoding definition (HO)     etexcmds.sty 2007/12/12 v1.2 Prefix for e-TeX command names (HO)     infwarerr.sty 2007/09/09 v1.2 Providing info/warning/message (HO)     hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive     kvoptions.sty 2009/08/13 v3.4 Keyval support for LaTeX options (HO)     kvsetkeys.sty 2009/07/30 v1.5 Key value parser with default handler support     (HO)     bitset.sty 2007/09/28 v1.0 Data type bit set (HO)     intcalc.sty 2007/09/27 v1.1 Expandable integer calculations (HO)     bigintcalc.sty 2007/11/11 v1.1 Expandable big integer calculations (HO)     pdftexcmds.sty 2009/09/23 v0.6 LuaTeX support for pdfTeX utility functions (     HO)     ifluatex.sty 2009/04/17 v1.2 Provides the ifluatex switch (HO)     ltxcmds.sty 2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO)     atbegshi.sty 2008/07/31 v1.9 At begin shipout hook (HO)     hdvips.def 2009/10/09 v6.79a Hyperref driver for dvips     pdfmark.def 2009/10/09 v6.79a Hyperref definitions for pdfmark specials     ot1ptm.fd 2001/06/04 font definitions for OT1/ptm.     ucsencs.def 2003/11/29 Fixes to fontencodings LGR, T3     nameref.sty 2007/05/29 v2.31 Cross-referencing by name of section     refcount.sty 2008/08/11 v3.1 Data extraction from references (HO)     minimalbeispiel.out     minimalbeispiel.out


title: Big integral sign

text: Is there a possibility to draw large integral signs? I have found the package `bigints` but I have the feeling it is not very professional... Any better idea?


title: Error Updating TexShop

text: I am currently running TeXShop Version 2.47 on OSX 10.9.2, and whenever I click `TeXShop > Check for Updates`, I receive the message "An error occurred in retrieving update information. Please try again later." Do I need to delete and reinstall TeXShop, or is there a better way to update?


title: "See also" in index entries

text: LaTeX's indexing packages `makeindex` and `xindy` provide good support for the basic features of an index: runs of pages, nested index sub-entries, and cross-references of the form: > Yurmurm-Peffifoss, Rudwooll, _see_ Peffifoss, Rudwooll Y. Well and good. However, my indexer also demands an additional type of index entry, the "see also". A see-also entry combines page references and cross- references into a single item: > Peffifoss, Rudwooll Y., 58–59, 65; _see also_ "The Preoccupation of Mr. > Peffifoss"; Thurber, James, nightmarish bureaucratic fantasies of Is there a ready-made command for such an entry?


title: How to put round cornered frame around an image

text: I want a nice colored frame around an image which has rounded corners. Here is my attempt, using **mdframed** , but, as you can see, the inner edge of the frame is a right-angle, and not rounded. I would like the inner edge of the frame to overlay (chop off) the corners of the image to produce a rounded inner edge. Is there a nice easy way to do this?               \documentclass{article}      \usepackage[framemethod=TikZ]{mdframed}      \usepackage{graphicx}          \begin{document}           \parindent=0pt     \baselineskip=0pt     \parskip=0pt               \def\myimage{c:/images/donald.png}          \begin{mdframed}[roundcorner=5pt, leftmargin=2cm,innertopmargin=0pt,innerbottommargin=0pt, innerleftmargin=0pt,innerrightmargin=0pt, innerlinewidth=0pt, middlelinewidth=0pt,outerlinewidth=10pt, outerlinecolor=red]%      \hsize=5cm\includegraphics[width=5cm, height=5cm]{\myimage}     \end{mdframed}%           \end{document}       ![Result](http://i.stack.imgur.com/9hcUm.png)


title: english documentation of tkz-euclid

text: I just can't find the english documentation of tkz-euclid. ftp://ftp.fu-berlin.de/tex/CTAN/macros/latex/contrib/tkz/tkz-euclide/README says > http://altermundus.fr (en franÃ§ais) or http://altermundus.fr (in english) > Documentation for printing will be ready soon. Can you point me to it?


title: How to use layers with blocks and columns?

text: I have on my frame two columns. First with three items and second withh three blocks:               \begin{frame}{myFrame}{subtitle}     \begin{columns}     \begin{column}{.5\textwidth}         \begin{enumerate}         \item<1->item 1         \item<2->item 2         \item<3->item 3         \end{enumerate}     \end{column}         \begin{column}<1->{.6\textwidth}             \uncover<1->{                 \begin{block}<1->{Block1}                   Text in block 1.             \end{block}             }         \uncover<2->{             \begin{block}<2->{Block2}               Text in block 2.             \end{block}          }         \uncover<3->{             \begin{block}<3->{Block3}               Text in block 3.             \end{block}          }          \end{column}     \end{columns}     \end{frame}      The effect I would like to get is when on the first layer only first item and block 1 is active, and other are grayed. On second leyer first and second item and block active and third grayed. On third layer everything active. That what I have now don't work. On first layer blocks 2 and 3 are invisible, on second and third blocks appear but they're greyed and only on the last layer they become active. I have used `\setbeamercovered{transparent}` Please help. :(


title: Putting a header above the cases in an equation

text: This question is best illustrated by an example. Consider the following code               Further we can show that     \begin{equation*}         P_{v}(T) =                                                                        \begin{cases}                 &\text{Reduction of $E$ at $v$:} \\                 1 - a_{v}T + q_{v}T^{2} &\text{good} \\                 1 - T &\text{split multiplicative} \\                 1 + T &\text{non-split multiplicative} \\                 1 &\text{additive.}             \end{cases}     \end{equation*}      This gives an equation, with a left-hand-side, and four options on the right hands side; the equality depending on the case we are in. These case do not really speak for themselves (they are the reduction types of elliptic curves). Therefore I want to put a header above them, nicely aligned with the cases. My current solution (as the code shows) is to put this header in the `cases` environment. However, this has as (obvious) result that the brace on the left hand side of the cases is also extended to this header. What do you suggest as a clean solution, such that only the four options are embraced, but the header is aligned with the descriptive text of the cases? * * * By the way, let me stress that I am looking for _clean solutions_. That is, anything involving manual spacing (e.g. `\hphantom{}`) is considered an _ugly hack_. If there is not a general solution (i.e. not depending on the particular content (and its width) of the equation), then I will fall back to such an _ugly hack_. But I would regret doing so.


title: How can I license my .tex files for open source?

text: I would like to release some .tex files to the open source community using the MIT license but am unsure of the implication. Specifically, I want to make sure that generated output (PDF/DVI) files don't need to have a license included with them. What license will allow end users the full freedom to modify and publish the source but doesn't require them to provide the license in their generated output?


title: how to remove additional space around \underbrace and justify the text under it

text: How do I   1. remove the additional space around \underbrace   2. justify the text under it, if the latter is longer than the text above it?  To illustrate the issue:               \documentclass{article}     \usepackage{amsmath}     \usepackage{mathtools}          \newcommand{\underbracewithoutspace}[2]{\mathrlap{\underbrace{\phantom{#1\strut}}_{#2}}#1}          \begin{document}          \begin{equation}     \underbrace{a+b}_{\text{a long blah blah blah}}+c     \end{equation}          % using the technique of      % http://tex.stackexchange.com/questions/24912/remove-additional-space-around-underbrace       \begin{equation}     \underbracewithoutspace{a+b}{\text{a long blah blah blah}}+c     \end{equation}          \end{document}      The first line (plain `\underbrace`) tries to center the text under the brace, while the second version (taken from this question: Remove additional space around \underbrace{…}) puts the brace under the wrong symbol.


title: Abbreviated syntax for CALS package

text: The **cals** package allows to create the tables with design capabilities which are available in Microsoft Word. This package is not based on **tabular** and has more bulky syntax than **tabular**. I'm try to write the macro to make the syntax more compact. This table has been created by **cals** package: ![cals table sample](http://i.stack.imgur.com/CSYdG.jpg) Total source text is too bulky, but the begin of the table is               \begin{calstable}     \makeatletter     \colwidths{{10mm}{25mm}{31mm}{60mm}{24mm}{40mm}}     \def\cals@framers@width{1.5pt}     \def\cals@framecs@width{1.5pt}     \def\cals@rs@width{0.5pt}      Suppose we're going to replace this by **tabbegin** macro:               \newcommand{\tabbegin}{     \makeatletter     \colwidths{{10mm}{25mm}{31mm}{60mm}{24mm}{40mm}}     \def\cals@framers@width{1.5pt}     \def\cals@framecs@width{1.5pt}     \def\cals@rs@width{0.5pt}}      However, if to do this, the tabular frame will be lost. What is the reason? The MVE includes only first five rows of the table which has been represented on the picture, but it's enough. Please use XeLaTeX to compile the MWE:               \documentclass[11pt,a4paper]{article}          \usepackage[BoldFont]{xeCJK}     \setCJKmainfont{MS PMincho}          \usepackage{polyglossia}     \setmainlanguage[babelshorthands=true]{russian}     \newfontfamily\russianfont{Calibri}          % --- 振り仮名 ---------------------------------------------------------------     \usepackage{ruby}     \renewcommand{\rubysep}{-0.1ex}          \usepackage{cals}          \oddsidemargin=-10.4mm     \topmargin=-35mm     \textwidth=190mm     \textheight=275mm          \usepackage{color}     \definecolor{ookiikanji}{rgb}{0.76,0.84,0.61}     \definecolor{onyomi}{rgb}{0.84,0.89,0.74}     \definecolor{kunyomi}{rgb}{0.92,0.95,0.87}          \newcommand{\tabbegin}{     \makeatletter     \colwidths{{10mm}{25mm}{31mm}{60mm}{24mm}{40mm}}     \def\cals@framers@width{1.5pt}     \def\cals@framecs@width{1.5pt}     \def\cals@rs@width{0.5pt}}               \begin{document}     \begin{calstable}     \tabbegin     % === 日 =================     % --- 音読み -------------         % --- ニチ     \brow \def\cals@bgcolor{ookiikanji}     \nullcell{ltr} \def\cals@borderL{0.75pt} \alignL\def\cals@bgcolor{onyomi}     \alignL\cell{\vfil \fontsize{12}{1} 日} \let\cals@borderL=\relax     \alignL\cell{\vfil \fontsize{11}{1} ニチ}     \alignL\cell{\vfil \fontsize{10}{1}\itshape день; солнце; Япония, японский} \def\cals@borderL{0.75pt}     \alignC\cell{\vfil \fontsize{12}{1} \ruby{日常}{にちじょう}の} \let\cals@borderL=\relax     \alignL\cell{\vfil \fontsize{10}{1}\itshape  повседневный, обычный} \erow \def\cals@rs@width{0.5pt}     % --- ニ     \brow \def\cals@bgcolor{ookiikanji}     \nullcell{lr} \def\cals@borderL{0.75pt} \alignL\def\cals@bgcolor{onyomi}     \alignL\cell{\vfil \fontsize{12}{1} 日} \let\cals@borderL=\relax     \alignL\cell{\vfil \fontsize{11}{1} ニ}     \alignL\cell{\vfil \fontsize{10}{1}\itshape день; солнце; Япония, японский} \def\cals@borderL{0.75pt}     \alignC\cell{\vfil \fontsize{12}{1} \ruby{日本}{にほん}} \let\cals@borderL=\relax     \alignL\cell{\vfil \fontsize{10}{1}\itshape Япония} \erow     % --- ジツ     \brow \def\cals@bgcolor{ookiikanji}     \nullcell{lr} \def\cals@borderL{0.75pt} \alignL\def\cals@bgcolor{onyomi}     \alignL\cell{\vfil \fontsize{12}{1} 日} \let\cals@borderL=\relax     \alignL\cell{\vfil \fontsize{11}{1} ジツ}     \alignL\cell{\vfil \fontsize{10}{1}\itshape день; солнце; Япония, японский} \def\cals@borderL{0.75pt}     \alignC\cell{\vfil \fontsize{12}{1} \ruby{末日}{まつじつ}} \let\cals@borderL=\relax     \alignL\cell{\vfil \fontsize{10}{1}\itshape последний день} \erow \def\cals@rs@width{0.75pt}     % --- 訓読み -------------         % --- ひ/び     \brow \def\cals@bgcolor{ookiikanji}     \nullcell{lr} \def\cals@borderL{0.75pt} \def\cals@bgcolor{kunyomi}     \alignL\cell{\vfil \fontsize{12}{1} 日} \let\cals@borderL=\relax     \alignL\cell{\vfil \fontsize{11}{1} ひ/び}     \alignL\cell{\vfil \fontsize{10}{1}\itshape день; солнце} \def\cals@borderL{0.75pt}     \alignC\cell{\vfil \fontsize{12}{1} \ruby{日切}{ひぎ}り} \let\cals@borderL=\relax     \alignL\cell{\vfil \fontsize{10}{1}\itshape расчёт по дням, график} \erow \def\cals@rs@width{0.5pt}     % --- が     \brow \def\cals@bgcolor{ookiikanji}     \nullcell{lrb}\alignC\spancontent{\vfil \fontsize{20}{1}\bfseries 日} \def\cals@borderL{0.75pt} \def\cals@bgcolor{kunyomi}     \alignL\cell{\vfil \fontsize{12}{1} 日} \let\cals@borderL=\relax     \alignL\cell{\vfil \fontsize{11}{1} か}     \alignL\cell{\vfil \fontsize{10}{1}\itshape день (соч.)} \def\cals@borderL{0.75pt}     \alignC\cell{\vfil \fontsize{12}{1} \ruby{二日}{ふつか}} \let\cals@borderL=\relax     \alignL\cell{\vfil \fontsize{10}{1}\itshape 2 дня} \erow \def\cals@rs@width{1pt}     \makeatother     \end{calstable}     \end{document}


title: Automatically reorder in-text citations based on numbering in bibliography

text: I'm using BibTeX to manage my bibliography, and have about 250 references. I cannot keep track of the order they were cited in, which leads to some funny formatting. To explain, consider this scenario... The first citation goes like this `\cite[ref1, ref2, ref3]`, and results in an in-text citation of "[1,2,3]", and also in a bibliography entry of:   1. Ref 1 details   2. Ref 2 details   3. Ref 3 details All normal so far. The difficulty occurs when I cite these again, but 'out of order', i.e., `\cite[ref3, ref2]`. This results in an in-text citation of "[3,2]". That looks very odd. What I'd like to do is tell LaTeX/BibTeX that order doesn't matter, and for it to automatically make the second citation appear in-text as "[2,3]". It seems like a petty request in this fake example, but for a full 'book' with over 250 references that are named by authors rather than numbers, there's no way I can do this ordering manually, particularly as references get added or deleted with revisions. I've tried adding in the command `\usepackage[sort&compress]{natbib}`, but it came up with this error: > ! Package natbib Error: Bibliography not compatible with author-year > citations. (natbib) l.287 ...and`\NAT@force@numbers{}\NAT@force@numbers` ? EDIT: Never mind, problem solved, it was as simple as adding `\usepackage{cite}`. Admins, feel free to delete this question.


I am trying to show 4 .jpg files in 2x2 format using the following:               \begin{figure}[htb]     \centering       \begin{tabular}{@{}cccc@{}}         \includegraphics[scale=0.26]{error1.jpg}          \includegraphics[scale=0.26]{afperror1.jpg} \\         \includegraphics[scale=0.26]{error2.jpg}          \includegraphics[scale=0.26]{afperror2.jpg}          \multicolumn{4}{c}{\includegraphics[width=.23\textwidth]}       \end{tabular}     \end{figure}      But I get the following error:               !Misplaced \omit.\multispan ->\omit@\multispan ...c}      which is strnage as the image renders fine when viewing the resulting pdf. what is causing this issue?


title: How to typeset tabularx with 34 columns? (Error message)

text: I want/need to typeset a very large table with >30 columns, which I created with `Excel2LaTeX`. I don't get it to compile, it only works if I really use 20 columns, however when I insert the 21st one, it fails:               \documentclass[11pt, a3paper, landscape]{scrartcl}     \usepackage{tabularx}     \begin{document}          \begin{tabularx}{\textwidth}{|p{2cm}|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|X|}     \hline          %with 20 columns it will work:      1 & 2 & 3 & 4 & 5 & 1 & 2 & 3 & 4 & 5 & 1 & 2 & 3 & 4 & 5 & 1 & 2 & 3 & 4 & 5 \\     %with more than 20 columns, it will fail:         %1 & 2 & 3 & 4 & 5 & 1 & 2 & 3 & 4 & 5 & 1 & 2 & 3 & 4 & 5 & 1 & 2 & 3 & 4 & 5 & 1 & 2 & 3 & 4 & 5  \\         \hline         \end{tabularx}         \end{document}      I'm sorry, I tried to use a large paper format to make everything visible, but at least when I compile it, the table gets larger than the visible "page" strangely. The logfile I get contains the following:                This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010) (format=pdflatex 2011.7.9)  22 SEP 2011 16:45     entering extended mode      \write18 enabled.      file:line:error style messages enabled.      %&-line parsing enabled.     **TabularXManyColumns.tex     (./TabularXManyColumns.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,      icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or     iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,      lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol     ish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, spani     sh, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded.     (/usr/local/texlive/2010/texmf-dist/tex/latex/koma-script/scrartcl.cls     Document Class: scrartcl 2011/04/02 v3.09 KOMA-Script document class (article)     (/usr/local/texlive/2010/texmf-dist/tex/latex/koma-script/scrkbase.sty     Package: scrkbase 2011/04/02 v3.09 KOMA-Script package (KOMA-Script-dependent b     asics and keyval usage)          (/usr/local/texlive/2010/texmf-dist/tex/latex/koma-script/scrbase.sty     Package: scrbase 2011/04/02 v3.09 KOMA-Script package (KOMA-Script-independent      basics and keyval usage)          (/usr/local/texlive/2010/texmf-dist/tex/latex/graphics/keyval.sty     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks14     )     (/usr/local/texlive/2010/texmf-dist/tex/latex/koma-script/scrlfile.sty     Package: scrlfile 2011/03/09 v3.09 KOMA-Script package (loading files)          Package scrlfile, 2011/03/09 v3.09 KOMA-Script package (loading files)                       Copyright (C) Markus Kohm          ))) (/usr/local/texlive/2010/texmf-dist/tex/latex/koma-script/tocbasic.sty     Package: tocbasic 2011/03/23 v3.09 KOMA-Script package (handling toc-files)     )     Package tocbasic Info: omitting babel extension for `toc'     (tocbasic)             because of feature `nobabel' available     (tocbasic)             for `toc' on input line 115.     Package tocbasic Info: omitting babel extension for `lof'     (tocbasic)             because of feature `nobabel' available     (tocbasic)             for `lof' on input line 116.     Package tocbasic Info: omitting babel extension for `lot'     (tocbasic)             because of feature `nobabel' available     (tocbasic)             for `lot' on input line 117.     Package scrartcl Info: You've used obsolete option `11pt'.     (scrartcl)             \KOMAExecuteOptions{fontsize=11pt} will be     (scrartcl)             used instead.     (scrartcl)             You may simply replace `11pt'     (scrartcl)             by `fontsize=11pt'.     Class scrartcl Info: File `scrsize11pt.clo' used to setup font sizes on input l     ine 1246.          (/usr/local/texlive/2010/texmf-dist/tex/latex/koma-script/scrsize11pt.clo     File: scrsize11pt.clo 2011/04/02 v3.09 KOMA-Script font size class option (11pt     )     )     (/usr/local/texlive/2010/texmf-dist/tex/latex/koma-script/typearea.sty     Package: typearea 2011/04/02 v3.09 KOMA-Script package (type area)          Package typearea, 2011/04/02 v3.09 KOMA-Script package (type area)                       Copyright (C) Frank Neukam, 1992-1994                       Copyright (C) Markus Kohm, 1994-          \ta@bcor=\skip41     \ta@div=\count79     Package typearea Info: You've used standard option `landscape'.     (typearea)             This is correct!     (typearea)             Internally I'm using `paper=landscape'.     (typearea)             If you'd like to set the option with \KOMAoptions,     (typearea)             you'd have to use `paper=landscape' there     (typearea)             instead of `landscape', too.     \ta@hblk=\skip42     \ta@vblk=\skip43     \ta@temp=\skip44          Package typearea Warning: Bad type area settings!     (typearea)                The detected line width is about 117%     (typearea)                larger than the heuristically detected line width.     (typearea)                You should e.g. decrease DIV, increase fontsize     (typearea)                or change papersize.          Package typearea Info: These are the values describing the layout:     (typearea)             DIV  = 10     (typearea)             BCOR = 0.0pt     (typearea)             \paperwidth      = 1195.01587pt     (typearea)              \textwidth      = 836.51111pt     (typearea)              DIV departure   = -117%     (typearea)              \evensidemargin = 106.98239pt     (typearea)              \oddsidemargin  = 106.98239pt     (typearea)             \paperheight     = 845.04694pt     (typearea)              \textheight     = 595.80026pt     (typearea)              \topmargin      = -25.16531pt     (typearea)              \headheight     = 17.0pt     (typearea)              \headsep        = 20.40001pt     (typearea)              \topskip        = 11.0pt     (typearea)              \footskip       = 47.60002pt     (typearea)              \baselineskip   = 13.6pt     (typearea)              on input line 1138.     )     \c@part=\count80     \c@section=\count81     \c@subsection=\count82     \c@subsubsection=\count83     \c@paragraph=\count84     \c@subparagraph=\count85     \abovecaptionskip=\skip45     \belowcaptionskip=\skip46     \c@pti@nb@sid@b@x=\box26     \c@figure=\count86     \c@table=\count87     \bibindent=\dimen102     ) (/usr/local/texlive/2010/texmf-dist/tex/latex/tools/tabularx.sty     Package: tabularx 1999/01/07 v2.07 `tabularx' package (DPC)          (/usr/local/texlive/2010/texmf-dist/tex/latex/tools/array.sty     Package: array 2008/09/09 v2.4c Tabular extension package (FMi)     \col@sep=\dimen103     \extrarowheight=\dimen104     \NC@list=\toks15     \extratabsurround=\skip47     \backup@length=\skip48     )     \TX@col@width=\dimen105     \TX@old@table=\dimen106     \TX@old@col=\dimen107     \TX@target=\dimen108     \TX@delta=\dimen109     \TX@cols=\count88     \TX@ftn=\toks16     )     (./TabularXManyColumns.aux)     \openout1 = `TabularXManyColumns.aux'.          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.     LaTeX Font Info:    ... okay on input line 6.          ./TabularXManyColumns.tex:13: Dimension too large.     \TX@arith ...\ifdim \TX@old@table =\wd \@tempboxa                                                        \TX@col@width \TX@old@col ...     l.13    \end{tabularx}          ? x          Here is how much of TeX's memory you used:      1284 strings out of 493763      19629 string characters out of 3144955      99667 words of memory out of 3000000      4640 multiletter control sequences out of 15000+200000      6379 words of font info for 23 fonts, out of 3000000 for 9000      715 hyphenation exceptions out of 8191      35i,8n,44p,233b,186s stack positions out of 5000i,500n,10000p,200000b,50000s     No pages of output.     PDF statistics:      0 PDF objects out of 1000 (max. 8388607)      0 named destinations out of 1000 (max. 500000)      1 words of extra memory for PDF output out of 10000 (max. 10000000)      How can I fix that table and make it compile with all its columns?


title: Fit a table into one page

text: I have a table that is very wide. Now I want to force it into one landscape page. I already set the page orientation to landscape but now I don't know how to force it into one page with scaling. Any hints?


title: Suppress warning from natbib/multibib with silence

text: I fail to suppress the warning               Package natbib Warning: Citation `Entry' multiply defined.      using the `silence` package when using natbib and multibib. This is my MWE:               % arara: pdflatex     % arara: bibtex     % arara: bibtex: {files: [Other]}     % arara: pdflatex     % arara: pdflatex          \documentclass{article}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}         @article{Entry, Title="Title"}     \end{filecontents}          \usepackage{natbib}          \usepackage{multibib}     \newcites{Other}{Other}          \usepackage{silence}     % does not compile:     %\WarningFilter*{natbib}{Citation `#1     % works, but unwanted:     %\WarningFilter*{natbib}{Citation `}     % does not work:     \WarningFilter*{natbib}{Citation `\#1' multiply defined}          \begin{document}         \let\myjobname\jobname              \cite{Entry}         \citeOther{Entry}              \bibliographystyle{plainnat}         \bibliographystyleOther{plainnat}              \bibliography{\myjobname}         \bibliographyOther{\myjobname}     \end{document}      Note that you have to run `bibtex` on `Other.aux` manually if you do not use `arara`. Am I perhaps doing something wrong with the escaping of `#1`? **Edit:** I should have been a little more specific. I would like to use the starred version of the the `WarningFilter` so I can suppress this message for different bibtex entries. I just need to know how to teach `silence` to work with `#1`.


title: How to write things on two columns?

text: I am going to try to explain my situation. I have a document that has a small font and prints in code. Unfortunately it only uses one side of the document, leaving a big white space on the other. I am trying to fill the other side up to save space. Here is a sample                \documentclass[10pt]{article}           \textwidth = 520pt \textheight = 700pt \voffset = -90pt \oddsidemargin      = -10pt \usepackage{listings} \usepackage{color}           \usepackage{lmodern}           \usepackage{scrextend} \changefontsizes[8pt]{8pt}           \definecolor{dkgreen}{rgb}{0,0.6,0}      \definecolor{gray}{rgb}{0.5,0.5,0.5}      \definecolor{mauve}{rgb}{0.58,0,0.82}           \lstset{frame=tb,   language=Java,   aboveskip=0mm,   belowskip=0mm,        showstringspaces=false,   columns=flexible,        basicstyle={\small\ttfamily},   numbers=none,        numberstyle=\tiny\color{gray},   keywordstyle=\color{blue},        commentstyle=\color{dkgreen},   stringstyle=\color{mauve},        breaklines=true,   breakatwhitespace=true   tabsize=90 }           \begin{document}           \begin{lstlisting}           public void selectionSort(int[] numbers) {              int min, temp;           for (int x = 0; x < numbers.length; x++) {               min = x;                 for (int y = x; y < numbers.length; y++) {          if (numbers[y] > numbers[min]) {         min = y;}                }                temp = numbers[x];               numbers[x] = numbers[min];               numbers[min] = temp;             }   }           \end{lstlisting}       \end{document}      If you compile, you will find that the entire RHS is white space. I want to fill that space with other text. Below is a quick screenshot of what is going on ![enter image description here](http://i.stack.imgur.com/5WSE2.png)


title: Table does not align properly after \newgeometry settings

text: I have a huge longtable and used \newgeometry to make it fit the page. After the table there is a short text (which I could align successfully) but another small table that comes after the text won't align properly (see picture, I made a vertical line that indicates the beginning of the small table). How can I make this table align left (like the text)? Thanks for your help! Here is the picture: ![enter image description here](http://i.stack.imgur.com/o5PQw.png) Here is the code: (the small table in question is at the end of it)               \documentclass[12pt,a4paper,fleqn]{article}     \usepackage{mathpazo}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{latexsym}     \usepackage{graphicx}     \graphicspath{{./eps/}}     \usepackage{longtable}     \usepackage{natbib}     \usepackage{array}     \usepackage[applemac]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[UKenglish]{babel}     \usepackage[UKenglish]{isodate}     \usepackage{geometry}     \usepackage{booktabs}     \usepackage{rotating}     \usepackage{tabularx}     \usepackage{array}     \usepackage{lscape}     \usepackage{siunitx}     \newcommand{\oneS}{\ensuremath{{}^{\textstyle *}}}     \newcommand{\twoS}{\ensuremath{{}^{\textstyle **}}}     \begin{document}               \newgeometry{left=1.5cm,right=1.5cm,top=1.5cm,bottom=1.5cm}     \begin{landscape}     \scriptsize     \thispagestyle{empty}     \scriptsize     \begin{longtable}{l S[table-format=-1.4] S[table-format=-1.4] S[table-format=-3.2] S[table-format=-5.2] S[table-format= 7.2] S[table-format=-3.2] S[table-format=-3.2] S[table-format=-3.2] S[table-format=-3.2]  @{\hspace{0.8cm}} r r r r }      \caption{Summary statistics}\\     \toprule     {Future e.g. underlying asset}  & \multicolumn{5}{l}{Daily returns on long-only      positions} &  \multicolumn{4}{l}{Ljung-Box } & \multicolumn{2}{l}{Avg. vol. (\$ mil.)}      & \multicolumn{2}{l}{Avg. open interest} \\     \cmidrule(r){2-6} \cmidrule(r){7-10} \cmidrule(r){11-12} \cmidrule(r){13-14}     &  { Mean (\%) } & { Std. (\%) } & { Skew. (\%) }  & { Kurt. (\%) } & { Jarque-Bera }      & { (5) } & { (20) } & { (60) } & { (120) } & {2000} & {2014} & {2000} & {2014} \\      \midrule     \endfirsthead     \toprule     {Future e.g. underlying asset}  & \multicolumn{5}{l}{Daily returns on long-only      positions} &  \multicolumn{4}{l}{Ljung-Box } & \multicolumn{2}{l}{Avg. vol. (\$ mil.)}      &         \multicolumn{2}{l}{Avg. open interest} \\      \cmidrule(r){2-6} \cmidrule(r){7-10} \cmidrule(r){11-12} \cmidrule(r){13-14}     &  { Mean (\%) } & { Std. (\%) } & { Skew. (\%) }  & { Kurt. (\%) } & { Jarque-Bera } &     { (5) } & { (20) } & { (60) } & { (120) } & {2000} & {2014} & {2000} & {2014} \\      \midrule     \endhead     \bottomrule \multicolumn{14}{r}{\emph{Continued on next page}}     \endfoot     \bottomrule     \endlastfoot     Frozen Concentrated Orange Juice    &   -0.0184 &   1.8845  &   -8.68       &   764.51       \twoS   &   3170.82 \twoS   &   20.61   \twoS   &   43.77   \twoS   &   98.60   \twoS        &   150.82  \oneS   &   88  &   37  &   25727   &   16991   \\     \end{longtable}          \noindent {\emph Notes:} The Jarque-Bera statistic tests the null hypothesis that the      daily returns are normally distributed. The Ljung-Box statistic tests the null      hypothesis that daily return residuals exhibit no autocorrelation for a fixed number of     lags (L). The average dollar volume is the notional value of contracts for all maturity     months traded on an average day, defined as: number of contracts traded x futures price      x multiplier x exchange rate. The reason that there is no volume and open interest data      for the currency futures is because they were constructed as forwards from spot      exchange rates and the country specific interest rate term structure. Also there was no     volume and open interest data available for contracts from the London Metals Exchange      (LME) before September 2004.           % SMALL TABLE     \begin{tabular}{ |  r @{\hspace{0.1cm}} l }       * & Indicate statistical significance at the 5\% level. \\       ** &  Indicate statistical significance at the 1\% level. \\     \end{tabular}          \thispagestyle{empty}     \end{landscape}     \restoregeometry               \end{document}


title: TeX evaluates 'document' code in preamble

text: I have the error               ! LaTeX Error: Missing \begin{document}.     See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...     l.30 \AddDemo{text}{Sample Text}      in the following code               \documentclass{scrbook}          \makeatletter          \providecommand\AddDemo[2]{%       % #1 : package/identifier       % #2 : content       \providecommand{\demo@content@#1}{#2}%     }          \AddDemo{text}{Sample Text}%     \makeatother     \listfiles          \begin{document}     %\PrintDemo{text}     \end{document}      which I do not understand. Basically I want to save (large) text parts which shall be printed on request as a combination of latex and listings.


title: subsection without section's number

text: Hello i'm trying to write subsection without section's number.And I need to write section's number in roman numeral(i already found this one using `\renewcommand{\thesection}{\Roman{section}}`) But when i using these, roman numeral appears in front of subsections number how do I write subsection without sections number but section and subsections number appears in `\tableofcontents`?


title: Keeping URLs clickable while decorating?

text: I want URLs in the rendered PDF to appear as follows:               <http://website/blah>      I have declared the URLS in my document using the 'url' package, in the form:               \url{https://tex.stackexchange.com/}      Then, I have the following command:               \DeclareUrlCommand\url{\def\UrlLeft{<}\def\UrlRight{>}%     \urlstyle{tt}}      The problem, is that while this adds the chevrons, the URL is no longer clickable in the final PDF. What is the right way to add the triangular brackets and have the URL clickable?


title: How to move TeX Live to another partition (/data)

text: I'm a LyX user. Can I move all (or most) of the TeX related files/folders to another (Linux) partition (`/data`) and so reuse that partition for LyX-TeX after OS re-install, as well as share that TeX partition between two distros (Lubuntu and Mageia LXDE)?


title: A problem with thmtools and cleveref

text: I am trying to use `thmtools` and `cleveref` and I am getting a quite peculiar error. Here's a minimal example.               \documentclass{article}          \usepackage{thmtools}     \usepackage{cleveref}          \declaretheorem[name=Lemma,Refname={Lemma,Lemmas}]{lem}     \declaretheorem[name=Proposition,Refname={Proposition,Proposition}]{prop}     \declaretheorem[name=Theorem,Refname={Theorem,Theorems}]{thr}          \begin{document}            \begin{lem}\label{lem1}         A lemma.       \end{lem}            \begin{prop}\label{prop1}         A proposition.       \end{prop}            \begin{thr}\label{thr1}         A theorem.       \end{thr}            \Cref{lem1}, \Cref{prop1} and \Cref{thr1}.          \end{document}      When I run `pdflatex` (using a fresh default installation of TeXLive 2011) I receive a message:               LaTeX Warning: Cref  reference format for label type `prop' undefined on input line 24.      and the final sentence is rendered in the pdf file as "Lemma 1, ?? 1 and Theorem 1." The weird thing is that if I use only two `\declaretheorem` definitions, then everything is fine. If I change the order of definitions, then it is always the second one that yields a warning. Any ideas about what is happening here and how to fix it?


title: How to reduce font size automatically to prevent new line in cell

text: I use tabularx environment, where `\begin{tabularx}{\linewidth}{XXXXXXXXXXXXXXX}`. When I inserted in every tabulars long numbers, cell splits for two lines and my table looks like very ugly. This long numbers will be inserted automatically. Is it possible to recalculate font size automatically If cell value is longer and doesn't fit ? Here my source               \begin{tabularx}{\linewidth}{XXXXXXXXXXX}     0&1 &2 &3 &4 &5 &6 &7 &8 &9 &10\\     \hline     4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444\\     \hline     4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444\\     \hline     4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444 &4444444\\     \end{tabularx}


title: Create alternative uppercase text automatically with accsupp

text: This is a follow-up question to Is it possible to provide alternative text to use when copying text from the PDF?. I am essentially trying to redefine `textsc`/`scshape` in order to use `accsupp` automatically, i.e. that the copied text is in uppercase automatically. I've been playing around with the `textcase` package, but without success:               \documentclass{article}     \usepackage{accsupp}          \RequirePackage{textcase}          \begin{document}          \newcommand{\newsc}[1]{         {\scshape{%         \BeginAccSupp{method=escape,ActualText=#1}%         \MakeTextLowercase{#1}%         \EndAccSupp{}}%         }}          \newsc{This could be} the beginning of a chapter          But there is a \newsc{mysterious} whitespace          \end{document}      What I would want is to wrap `ActualText=#1` into something like `ActualText=\MakeTextUppercase{#1}`, but that does not work as I get a `Generic error: undefined control sequence`. There are a few more issues:   * there is a whitespace before text wrapped in the `\newsc` command    * I am unsure how to redefine the small caps commands to incorporate the new feature (hence I created a new command in the MWE)   * In the quoted answer Ulrike mentions something like `\expandafter\PDFreplace\expandafter{\USA}` to make the text selectable for each character. How would that work with my example? **Edit** : I just realised that this approach breaks completely when trying to use accsupp in headings in conjunction with hyperref. The error is:               ! Extra \else.     \KV@split ...errx {\@tempa \space undefined}\else                                                        \ifx \@empty #3\@empty \KV...     l.27 ...This could be} the beginning of a chapter}


title: newcommand with argument produces unwanted extra space within tikzpicture

text: I am creating some pictures I want to use within nodes. When I use a `\newcommand` with an argument, extra space is added and I can't get rid of it.               \documentclass{article}     \usepackage{tikz}     \begin{document}          \newcommand{\foo}[1][3]{     \begin{tikzpicture}         \foreach \x in {0,1,...,#1}             \filldraw (\x,0) circle (0.2cm);     \end{tikzpicture}     }          \newcommand{\test}{     \begin{tikzpicture}         \foreach \x in {0,1,...,3}             \filldraw (\x,0) circle (0.2cm);     \end{tikzpicture}     }          \begin{tikzpicture}         \node at(0,0)    [draw, rectangle, inner sep=0] {\foo};         \node at(0,-0.5) [draw, rectangle, inner sep=0] {\test};     \end{tikzpicture}     \end{document}


title: Position of nodes in TikZ matrix

text: I would like to be able to put a comment below an element in the last row of a TikZ matrix. I thought that the MWE below would allow me to do that, but it does not. To be specific, I thought the MWE below would print "hello" below element 9.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix}     \begin{document}     \begin{tikzpicture}       \matrix       {         \node {8}; &[2mm] \node{1}; &[-1mm] \node {6}; \\         \node {3}; &      \node{5}; &       \node {7}; \\         \node {4}; &      \node(a){9}; &    \node {2}; \\       };       \node (a.south) {hello};     \end{tikzpicture}     \end{document}      How can I get this to work?


title: "Torn page" decoration for Beamer

text: I am Basilio, I've been using stackexchange for a while and it's of course really useful. Here's my first question: in the thread Alternatives to the horizontal line in fancyhdr the user Gonzalo Medina introduces the "torn page" decoration developed by JLDiaz. Is it possible to use it for the title of a slide in beamer as well? Thank you very much, Basilio


title: Good general LaTeX style practice

text: I just created my first document in LaTeX (a resume) and while I'm familiar with good practices in programming, I'm not familiar with what constitutes good practices in a markup language like LaTeX. Below is the code for my resume (content edited for privacy). I'd like to know which style/formatting practices I used are good, and which are bad. For example, I'm guessing that using `$\bullet$ .... \\` instead of an `itemize` is not good practice, but I wasn't sure how to embed an `itemize` within `cvlist` without creating an extra space between the list and the content above the list.               \documentclass[11pt,a4paper,oneside]{report}     % margins     \usepackage[top=1in, bottom=1in, left=0.5in, right=0.5in]{geometry}     % arranging headers spacing     \newcommand\textbox[1]{\parbox{.333\textwidth}{#1}}     \usepackage[NoDate, LabelsAligned]{currvita}     \usepackage{enumitem}          \begin{document}          % remove page number     \pagestyle{empty}          \begin{cv}{}     % distance between labels and body     \setlength{\cvlabelwidth}{22mm}          % heading     \noindent\textbox{Term Address:\hfill}\textbox{\hfil \LARGE \textbf{Name}\hfil}\textbox{\hfill Home Address:}\\     \noindent\textbox{Street \hfill}\textbox{\hfil email@email.com \hfil}   \textbox{\hfill Street}\\     \noindent\textbox{City \hfill}\textbox{\hfil (555)-555-5555 \hfil}\textbox{\hfill Address}          % horizontal line     \noindent\rule{\textwidth}{0.3mm}          % Education     \begin{cvlist}{}     \item[\textbf{Education}]     \textbf{School} \hfill Cambridge, MA\\     \textit{Candidate for Bachelor of Science in Everything} \hfill June 2099 (expected)\\     Relevant Coursework: Cooking (Fall `13), Puppetry \hfill GPA: 5.0/5.0\\     for Fun (Fall `13), Probability and Stuff (Fall `13),\\     Differential Differentiation     \end{cvlist}          % Experience     \begin{cvlist}{}     \item[\textbf{Experience}]     \textbf{Company} \hfill City\\     \textit{Position} \hfill June - August 2015\\     $\bullet$ Task\\     $\bullet$ Task          \textbf{Company} \hfill City\\     \textit{Position} \hfill January - May 1908\\     $\bullet$ Task\\     $\bullet$ Task\\     $\bullet$ Task     \end{cvlist}          %Leadership     \begin{cvlist}{}     \item[\textbf{Leadership}]     \textbf{Organization} \hfill City\\     \textit{Position} \hfill August 2000 - present\\     $\bullet$ Task\\     $\bullet$ Task          \textbf{Program} \hfill City \\     \textit{Position} \hfill August 2055 - present\\     $\bullet$ Task\\     $\bullet$ Task          \textbf{Organization} \hfill City\\     \textit{Position} \hfill December 1856 - June 2010\\     $\bullet$ Task\\     $\bullet$ Task\\     $\bullet$ Task     \end{cvlist}          %Skills     \begin{cvlist}{}     \item[\textbf{Skills}]      Everything, \LaTeX     \end{cvlist}          \end{cv}          \end{document}


title: How to comment references in a bibliography

text: I hope i'm in the right place to ask you my question! I've already gone through many posts but I can't find a solution to my problem. I'm currently writing a case study and i've been asked to comment my references/sources. In other words, I need to explain why I chose to use every single source in my bibliography. So, I was hoping it was possible with bibtex to write the reference, then write a few sentences to describe it. Example: > [1] Doe, J. The Title. The Journal. >   >   >     This source is really interesting because it doesn't have a real title. >   > > [2] Another Doe, J. The new Title. The Same Journal. >   >   >     This second source is also really interesting because it contains words.   >   I can't find a way to do it, anybody got a solution? Thanks everybody :)


title: Linebreak at itemize

text: My MWE is the following:               \documentclass{article}          \begin{document}          \begin{itemize}          \item[about] Foo\\     Lorem ipsum dolor sit amet, consectetur, adipisci velit          \item[about] sort rules(...)     \begin{sloppypar}Lorem ipsum dolor sit amet, consectetur, adipisci velit\end{sloppypar}          \end{itemize}          \end{document}      and it looks as follows ![mwe](http://i.stack.imgur.com/eMVU5.jpg) As you can see, I want a line break after the `\item[customize]`. Both work fine, but at the second one, there is a small extra space between the "customize" and the text... That looks very well, I think. But there must be another way to do this, instead of using `\begin{sloppypar}` all the time, or?


title: Removing section separation line just if on top of page

text: I have horizontal lines separating my subsections and I would like to remove them only if they are on top of the page. Anybody can help me? Thanks! Here is the code snippet of the header of the subsection.               \titleformat{\subsection}[block]     {\titlerule[.4pt]\vspace{-2ex}\hspace{-\LeftMargin}\normalfont\sffamily\large\bfseries}     {\thesubsection}{1em}{}     \titlespacing{\subsection}{0pt}{2em}{0pt}


title: Horizontal alignment with align and cases

text: I have a `cases` environment inside an `align` environment, and I'm trying to align part of one line of the `align` environment with part of the `cases` environment via an ugly `\phantom` command. Here's a MWE:               \documentclass{article}     \usepackage{amsmath,mathtools}     \begin{document}     \begin{align}     f(x)&=\mathrlap{2}\phantom{\begin{cases}1&\\0&\end{cases}}\text{if }x>0\\     g(x)&=\begin{cases}1&\text{if }x>0\\0&\text{if }x<0\end{cases}     \end{align}     \end{document}      I'd like the 'if's to be horizontally aligned, and I don't understand why they're not - maybe something to do with the spacing that LaTeX puts around a `cases` environment. Can anyone see a fix (other than just doing it 'by hand' with `\vspace`)?


title: How can I apply different styles to different classes of identifiers?

text: I am creating a custom style for the `lstlisting` package, with some custom colors for certain words. I am trying to define different "classes" of words, where each class has a certain property, like color, etc. Like this: name: class1   Keywords: for, int, cout   style: red, underlined name: class2   keywords: double, std   style: blue, bold From what I was able to understand from other discussions, the `\lstset` command has to be used, with the `emph`keyword. I have two problems:   1. How do I define multiple classes, where each has different keywords and properties?    2. How do I highlight things like `#include` or `<iostream>`, without clashing with other parts of the code (for example in loops where there is usually a `<`) ? What I have so far is the following:               \documentclass[a4paper]{article}          \usepackage{listings}     \usepackage{color}                    %Custom Colors     \definecolor{plainText}{RGB}{74,131,31}     \definecolor{comments}{RGB}{74,131,31}     \definecolor{strings}{RGB}{180,54,34}     \definecolor{numbers}{RGB}{44,45,211}     \definecolor{keywords}{RGB}{160,49,158}     \definecolor{preprocessorStatements}{RGB}{109,75,48}     \definecolor{classNames}{RGB}{101,63,165}               \lstset{frame=tb,       language=C++,       aboveskip=3mm,       belowskip=3mm,       showstringspaces=false,       columns=flexible,       basicstyle={\small\ttfamily},       numbers=left,       numberstyle=\tiny\color{plainText},       keywordstyle=\color{keywords},       commentstyle=\color{comments},       stringstyle=\color{strings},       breaklines=true,       breakatwhitespace=true       tabsize=4     }                    \begin{document}          \lstinputlisting[tabsize=4]{main.cpp}          \end{document}      As an example you can use this               #include <iostream>          using namespace std;          int main() {              double var1 = 3.2;         int var2 = 3;              for (int i=0; i<var2; i++) {             cout << i << endl;         }              return 0;     }       Thanks in advance


title: Figure caption replace default ":" with a space

text: How can I replace the usual ":" with a space in the Figure captions.               > Figure 3: Blah blah.....................      with               > Figure 3 Blah blah.....................