title: pstricks and tikz packages conflicting with other packages?

text: Why is it that whenever I add \usepackage{pstricks} or \usepackage{tikz}, I always get the error below? > Latex Error: /usr/local/texlive/2013/texmf- > dist/tex/latex/xcolor/xcolor.sty:60 TeX capacity exceeded, sorry [parameter > stack size=10000]. > > Latex Error: /usr/local/texlive/2013/texmf- > dist/tex/latex/xcolor/xcolor.sty:60 ==> Fatal error occurred, no output PDF > file produced! However, if I try to compile a document with (only) those packages in a separate file, no problem! It seems as if these packages conflict with my existing packages (listed below). Any ideas would be very much appreciated! Thanks a lot.                \usepackage{graphicx}      \usepackage{gb4e}       \usepackage{tipa}       \usepackage{setspace}      \usepackage[T1]{fontenc}      \usepackage{multirow}      \usepackage{lscape}      \usepackage{slashbox}      \usepackage{arydshln}      \usepackage[T1]{fontenc}      \usepackage{float}      \usepackage{makeidx}      \usepackage{enumitem}      Here is the code that produces the problem (with all other text removed)               \documentclass[11pt,a4paper]{book} \setcounter{secnumdepth}{4}          \usepackage{graphicx} \usepackage{gb4e} \usepackage{tipa} \usepackage{setspace} \usepackage[T1]{fontenc} \usepackage{multirow} \usepackage{lscape} \usepackage{slashbox} \usepackage{arydshln} \usepackage[T1]{fontenc} \usepackage{float} \usepackage{makeidx} \usepackage{enumitem} %\usepackage{pstricks} %\usepackage{tikz} \setcounter{part}{-1} \setcounter{subsection}{0} %%%% LaTeX209: %\documentstyle[a4,11pt,gb4e]{article} %% \def\bs{$\backslash$} \frenchspacing\parskip1.2ex \parindent0pt \def\bit{\vskip.05\baselineskip\hspace*{1em}\hangindent4em\hangafter1} \title{A grammatical description of Muylaq' Aymara} \author{Matt Coler} \date{} \makeindex \begin{document}          %\begin{tikzpicture} %{\usebox{\test}}; %\end{tikzpicture}          \color{white} %\color{black} % activate to see bounding box \fboxsep=0pt                % this figure is 50mm by 50mm             \newsavebox{\gaussians}             \savebox{\gaussians}{             \begin{tikzpicture}              \psset{unit=1mm}             \color{black} % for text             \draw (-1,0) -- (-0.5,1.5);             \draw (-0.47,1.6) node{$\sigma$};             \draw (-0.5,1.5) -- (-0.2,0.5);             \draw (-0.2,0.5) -- (-0.6,0);             \end{tikzpicture}             }             \newsavebox{\gaussianss}             \savebox{\gaussianss}{             \begin{tikzpicture}              \psset{unit=1mm}             \color{black} % for text             \draw (-1,0) -- (-0.3,1.5);             \draw (-0.27,1.6) node{$\sigma$};             \draw (-0.3,1.5) -- (-0.2,0.45);             \draw (-0.2,0.45) -- (-0.6,0);             \end{tikzpicture}             }             \newsavebox{\gaussiansss}             \savebox{\gaussiansss}{             \begin{tikzpicture}              \psset{unit=1mm}             \color{black} % for text             \draw (-1,0) -- (-0.5,1.5);             \draw (-0.47,1.6) node{$\sigma$};             \draw (-0.5,1.5) -- (-0.2,0.5);             \draw (-0.2,0.5) -- (-0.65,0);             \draw (-0.2,0.5) -- (-0.4,0);             \draw (-0.2,0.5) -- (0.5,0);             \draw (-0.2,0.5) -- (1.8,0);             \draw (-0.2,0.5) -- (2.4,0);             \end{tikzpicture}             }             \newsavebox{\oneline}             \savebox{\oneline}{             \begin{tikzpicture}              \psset{unit=1mm}             \color{black} % for text             \draw (-1,0) -- (-0.5,1.5);             \draw (-0.47,1.6) node{$\sigma$};             \end{tikzpicture}             }             %\tikz\draw (1,1) node{$\sigma$} -- (2,2) node{B};             \begin{tikzpicture}             \draw (0,0) node {\usebox{\gaussians}};             \draw (0.7,0) node {\usebox{\gaussians}};             \draw (2.3,0) node {\usebox{\gaussians}};             \draw (3.75,0) node {\usebox{\gaussians}};             \draw (5.2,0) node {\usebox{\oneline}};             \draw (6.35,0) node {\usebox{\gaussianss}};             \draw (9.5,0) node {\usebox{\gaussiansss}};             \end{tikzpicture}                  \begin{picture}(100,100)             \color{black} % for text              \put(-3,93){\Large{/mun}(a)}             \put(52,93){\Large{+}}             \put(68,93){\Large{t'(a)}}             \put(95,93){\Large{+}}             \put(110,93){\Large{k(a)}}             \put(137,93){\Large{+}}             \put(153,93){\Large{t}}             \put(165,93){\Large{+}}             \put(183,93){\Large{t(i)/}}              \put(232,93){\Large{[mun + t'+k+t+t]}}              \end{picture}             %\begin{tikzpicture}              %\psset{unit=1mm}             %\color{black} % for text             %\draw (-4.4,1.4) node{/mun};             %%\draw node{/mun(a) + t'(a) + k(a) + t + t(i)/};             %%\draw (7.6,0) node{[mun + t' + k + t + t]};             %\end{tikzpicture}          \end{document}


title: How it is possible to make a vertical space between first paragraph with top of a page?

text: Look at this               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[margin=1in]{geometry}     \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}     \newcommand{\Hrule}{\rule{\linewidth}{0.3mm}}          \makeatletter% since there's an at-sign (@) in the command name     \renewcommand{\@maketitle}{%       \parindent=0pt% don't indent paragraphs in the title block       \centering       {\Large \bfseries\textsc{\@title}}       \HRule\par%       \textit{\@author \hfill \@date}       \par     }          \makeatother% resets the meaning of the at-sign (@)          \title{Statement of Purpose}     \author{Sina Gholizadeh}     \date{Ph.D. Applicant}          \begin{document}       \maketitle% prints the title block     \section*{}     \section*{}     \paragraph*{}     This is an example.               \end{document}      This is a sop sample I found in tex.stackexchange, I want to increase a vertical space between first paragraph and the what are in top of the page? I used               \section*{}      for tow time to make space but I'm sure there is more effective way too.


title: How can I place a line/arrow on an enlarged node's edge?

text: I'd like to connect the nodes by their edges, meaning getting the arrow on abc's end to touch the rectangle's left margin. It worked flawlessly with `wordsa` but I haven't been successful in finding the right method for `abc`. ![enter image description here](http://i.stack.imgur.com/G7mbi.png) **MWE**               \documentclass[     11pt     ]{scrartcl}     \usepackage{     tikz,     relsize,     tgheros     }          \usetikzlibrary{         calc,trees,shadows,positioning,arrows,chains,shapes.geometric,         decorations.pathreplacing,decorations.pathmorphing,shapes,         matrix,shapes.symbols,patterns,intersections%,fit         }          \pgfdeclarelayer{background layer}     \pgfdeclarelayer{foreground layer}     \pgfsetlayers{background layer,main,foreground layer}          \tikzset{         rolle/.style=         {             rectangle,             drop shadow={opacity=0.5},             minimum width=4em,             minimum height=4em,             text width=4cm,             draw=black!80,             very thick,             fill=black!40,             font=\sffamily\bfseries,             align=center         },         einheit/.style=         {             rectangle,             rounded corners,              minimum height=2em,             minimum width=4em,         draw=black!80,             fill=black!20,         font=\sffamily         },     }          \begin{document}     \begin{center}     \begin{tikzpicture}[font=\sffamily\small,node distance=0.5cm]         \matrix (m) [             matrix of nodes,             nodes in empty cells,             row sep=7mm,             column sep=3mm,             inner sep=7pt         ] {         %         \node[rolle] {123}; & \node[rolle] {456}; & \node[rolle] {789}; \\         %         \node[einheit] {words}; & & \node[minimum width=3cm] (abc) {}; \\         %         & \node[einheit] (wordsa) {wordsa}; & \\         %         & \node[einheit] (wordsb) {wordsb}; & \\         %         & \node[einheit] {companies}; & \\         %         \node[einheit] {thing}; & & \node[minimum width=3cm] (xyz) {};\\         };         %         \draw[thick] (current bounding box.north west) rectangle (current bounding box.south east);         \draw[thick,fill=black!20] (current bounding box.north west) rectangle ([yshift=1cm]current bounding box.north east) node[midway] {Something Important};         %         \draw[einheit] (abc.north east) rectangle (xyz.south west) node[midway] (new) {abc};         %         \draw[thick,dashed,<->] (new.west) -- (wordsa.east);         %     \end{tikzpicture}     \end{center}     \end{document}


title: margin note left of an equation?

text: How is it possible to place a margin note left of an equation? I'm using `scrartcl` from `KOMAScript`. I set `\reversemarginpar`, then I tried with `\marginnote` from the package `marginnote` and also with Latex's own `\marginpar` and with `\marginline` from `KOMAScript`:               \documentclass{scrartcl}          \usepackage{mathtools}     \usepackage{marginnote}          \reversemarginpar          \begin{document}     \marginnote{test} \begin{align*}       a &= b \\       c &= d     \end{align*} \marginnote{test2}     \end{document}      The first marginnote (test) is left of the line before the align and the test2 note is next to line after the align. A margin note in the align gives errors. I know I can adjust the vertical offset with marginnote, but that means I have to do it manually (what is not a very good solution IMHO). How can I place a margin note next to an equation?


title: To kern double em-dashes

text: In Virginia Woolf's novels, she used double em-dashes quite often. In Latin Modern, the two dashes closely set together without gap. However, In `ebgaramond` there is a little gap which is quite unpleasant. I found online this will do the trick:               \newcommand{\dmd}{{{---\kern-1pt---}\penalty\exhyphenpenalty}}      However, it doesn't do it for me, my code is the following in LyX Preamble with document class of `Book KOMA-SCRIPT`:               \usepackage{ebgaramond}      \usepackage[T1]{fontenc}     \newcommand{\dmd}{{{---\kern-1pt---}\penalty\exhyphenpenalty}}      The text in concern: > This one, thanks to the hospitality of the host, had lasted far into the > afternoon. The beautiful October day was fading and the leaves were falling > from the trees in the avenue as I walked through it. Gate after gate seemed > to close with gentle finality behind me. Innumerable beadles were fitting > innumerable keys into well-oiled locks; the treasure-house was being made > secure for another night. After the avenue one comes out upon a road---I > forget its name---which leads you, if you take the right turning, along to > Fernham. But there was plenty of time. Dinner was not till half-past seven. > One could almost do without dinner after such a luncheon. It is strange how > a scrap of poetry works in the mind and makes the legs move in time to it > along the road. Those words------ ![double-em-dashes](http://i.stack.imgur.com/9KiGp.png)


title: Add bibsection to toc (biblatex)

text: I used biblatex with sucess in Problems with biblatex to obtain multiple bibliographies by chapter and a global bibliograhy. But i need add the bibsection to the toc                 Contents       List of figures       List of tables       1. Name of the chapter one ..................... 1          1.1 Introduction ...........................  2          1.2 Other introduction .....................  3          References to the chapter one...............  4       2. Name of the chapter two ..................... 5          2.1 Introduction ...........................  6          2.2 Other introduction .....................  7          References to the chapter two...............  8            Global references .............................  10            --------------------------------            Chapter 1            Name of the chapter one            1.1 Introduction       Bla bla (Someone, 2012)            1.2 Other introduction (Someone, 2010)       Bla bla            References       Someone, 2012, Title, IEEE.       Someone, 2010, Title, Elsevier.


title: paper edition of my university facebook

text: I'm trying to make the paper edition of the face-book of my university. I got some constraints; for example, I have to do very small margins.               \documentclass[a5paper,twoside]{book}          \usepackage[french]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[inner=7mm,outer=5mm,vmargin=5mm]{geometry}          \pagestyle{empty}          \setlength{\parindent}{0em}          \usepackage{forloop}          \begin{document}     \newcounter{ct}          \forloop{ct}{1}{\value{ct} < 20}{%     \framebox{ \parbox{0.15\linewidth}{photo}%     \parbox{0.25\linewidth}{John \bsc{Doe}}%     \parbox{0.60\linewidth}{\tiny Développé sur Internet par des milliers d’informaticiens bénévoles et salariés, Linux fonctionne maintenant sur du matériel allant du téléphone mobile au superordinateur. Il existe de nombreuses distributions Linux indépendantes, destinées aux ordinateurs personnels et aux serveurs informatiques, pour lesquels Linux est très populaire. Elles incluent des milliers de logiciels issus de la communauté du logiciel libre et fréquemment quelques logiciels propriétaires. Linux est également populaire sur système embarqué[1]. La mascotte de Linux est le manchot Tux. \thepage}     \vspace{1em}     }     }          \end{document}      I would like a tree-column layout. How could I do? Why the margin don't work?


title: Flushing right the pagebackrefs in the bibliography with hyperref

text: I'd like to flush the back references to pages in my bibliography to the right. I have a solution for the `citeref` package, see the MWE. But how can I achieve this when using `hyperref`?               \documentclass{article}          %% This works fine:     \usepackage{citeref}     \makeatletter     \@ifpackageloaded{citeref}{     \def\bibitempages#1{\newblock \hglue\fill\mbox{[#1]}}}     \makeatother          %% But how to flush the pagerefs right with hyperref?     % \usepackage[pagebackref]{hyperref}               \begin{document}          Citing~\cite{Test2013}.          \bibliographystyle{alpha}     \begin{thebibliography}{TT13}            \bibitem[TT13]{Test2013}       Test, Arthur, and Test, Betsy.       \newblock \emph{Some obscure ramblings}.       \newblock Nature       \textbf{1}: 1--13, 2013          \end{thebibliography}          \end{document}


title: How to refine links in LOF entries (in memoir)?

text: I would like to abuse the LOF as a kind of bibliography for foreign figures. For that it would be very nice to change the linking of the LOF entries. The default links entry names to figures but hyperlinks introduced with `\href` override them. The problem is that they are indistinguishable without hovering over them with the mouse and so the hyperlinks do not stand out enough (at least with my formatting of links). My conceived solution disables the links to the figures in the entry names and adds links to them in the page number blocks instead. Hyperlinks done with `\href` should still work normally in the entry names. I have looked into memoir's definition of \l@figure but apparently I would need to do some voodoo with hyperref too? And I don't even know where to start... Below is the promised MWE. In the generated .pdf "0.1 By AAuthor, from " should not be a link to the figure but the 1 at the end should be, and "ASource" should still link to http://example.com.               \documentclass{memoir}          \makeatother          \usepackage[pagebackref]{hyperref}     \hypersetup{         citebordercolor=0 0 0,         filebordercolor=0 0 0,         linkbordercolor=0 0 0,         menubordercolor=0 0 0,         urlbordercolor=0 0 0,         pdfborderstyle={/S/U /W 0.2}, % stroke, underline, width 0.2     }          \begin{document}          \begin{figure}[ht]     \centering     figure A     \caption[By AAuthor, from \href{http://example.com}{ASource}]{ACaption.}     \end{figure}          \listoffigures          \end{document}


title: Convenient way to pass package options and \setup like commands

text: I want to be organized in my code. In order to pass options to packages, i developped my own macros :               \makeatletter          \newcommand*\Option{%       \@ifstar{\@Option}{}}          \newcommand*\@Option[3]{%       \PassOptionsToPackage{#2}{#1}}          \makeatother      One example of use, in preamble:               \Option*{babel}{frenchb}{french babel language}      #1 is the package name   #2 is the option   #3 is a short description   The star indicates that we effectively want to use the option.   The package name is the first argument so that i can sort them alphabetically. The starred version works. But the unstarred version, code:               \Option{babel}{frenchb}{french babel language}      produces the error:               ! LaTeX Error: Missing \begin{document}      To go further with the frenchb package, frenchb provides a command to globally change the aspect of the document : \frenchbsetup{} I want to manage that the same way:               \makeatletter          \newcommand*\Frenchb{%       \@ifstar{\@Frenchb}{}}          \newcommand*\@Frenchb[2]{%       \AtBeginDocument{%         \@ifpackagewith{babel}{frenchb}          {\frenchbsetup{#1}}          {}}}          \makeatother      The starred version doesn't work, and the unstarred version produces the same error as \Option. * * * Here is the full document:               \documentclass{report}          \makeatletter          \newcommand*\Option{%       \@ifstar{\@Option}{}}          \newcommand*\@Option[3]{%       \PassOptionsToPackage{#2}{#1}}          \newcommand*\Frenchb{%       \@ifstar{\@Frenchb}{}}          \newcommand*\@Frenchb[2]{%       \AtBeginDocument{%         \@ifpackagewith{babel}{frenchb}          {\frenchbsetup{#1}}          {}}}          \makeatother          \Option{babel}{frenchb}        {french babel language}     \Frenchb{CompactItemize=false} {don't make compact itemize}          \usepackage{babel}     %\frenchbsetup{CompactItemize=false}          \begin{document}            \part{Introduction} % checking babel/frenchb              \begin{itemize} % checking CompactItemize=false           \item item 1           \item item 2         \end{itemize}          \end{document}


title: Print from TeX to labels that have odd-sized pages

text: Is it possible to generate PDF files in TeX that can be printed to odd-format printers, e.g. the DYMO LabelWriter 450? This label maker prints to a roll of labels with page/label sizes such as, e.g. 1-1/8" x 3-1/2". My first thought is a package such as EnvLab or labels, however both those packages seem to support only standard sized pages with multiple labels on the page in a grid. I couldn't find a package that supported non-standard sized pages. My second thought is to use the geometry package, but I'm not sure if that's a plausible or the best solution. I'd be very grateful for thoughts and suggestions.


title: Kile autocompletion not working

text: I am using Kile Version 2.9.60 on Windows. For some reason the autocompletion of environments does not work anymore, i.e. when you press enter after typing `\begin{enviroment}` nothing happens besides going to the next line ... I have checked settings->configure kile->enviroments-> Automatically complete `\begin{env}` with `\end{env}`.


title: CM fonts with T1 fontenc

text: I noticed one odd thing and I'm curious to understand it. I typeset my document with `\usepackage[T1]{fontenc}` but without loading the Latin Modern fonts as I usually do. This resulting PDF is undistinguishable when viewed on- screen (using Evince on Linux) but when printed on an HP printer the fonts look "thicker". Both using the default font encoding or loading the Latin Modern fonts bring back the usual "thin" look of the CM fonts. What is the reason for the different rendering? I should say that the slight "thicker" look is not bad (except that the math fonts do not really match). There are other free fonts with superb math companion that I should try?


title: moderncv : \homepage - can't handle a tilde

text: I'm using the latest version of `moderncv` from CTAN. When I set :               \homepage {homepage: my.homepage.url/~username/}      The tilde doesn't show up. So I tried:               \usepackage{textcomp}     \homepage {homepage: my.homepage.url/{\texttildelow}username/}      But.. that causes an infinite loop:               Package hyperref Warning: Option `baseurl' has already been used,     (hyperref)                setting the option has no effect on input line 54.               Package hyperref Warning: Option `pdfpagemode' has already been used,     (hyperref)                setting the option has no effect on input line 54.               Package hyperref Warning: Option `pdfstartpage' has already been used,     (hyperref)                setting the option has no effect on input line 54.          ! TeX capacity exceeded, sorry [input stack size=5000].     \font@name ->              \U/mvs/m/n/14.4      l.55 \maketitle      Any Ideas how to fix this?


title: pgfplots - axis xmode/ymode in user-defined style

text: I would like to specify xmode and ymode for the axis with \pgfplotsset (or any other way, so that the mode can be changed by an if statement) The error message which I get is:               ! Package pgfplots Error: Sorry, you can't change `/pgfplots/xmode' in this con     text. Maybe you need to provide it as \begin{axis}[/pgfplots/xmode=...] ?.      Here is a minimal working example:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=1.5}          \def\someoption{1} % change this to zero to see the error          \ifcase\someoption % this is the reason why I want to define xmode with styles     \pgfplotsset{/pgfplots/mystyle/.style={                      /pgfplots/xmode=log, % this is not working                      /pgfplots/ymode=log % this too                     }}     \else     \pgfplotsset{/pgfplots/mystyle/.style={}}     \fi          \begin{document}          \section*{with style: (not working)}          \begin{tikzpicture}     \begin{axis}[/pgfplots/mystyle]     \addplot coordinates {(10, 100) (100, 15) (2000, 200)};     \end{axis}     \end{tikzpicture}          % how it should look like          \section*{with hard-coded axis properties:}          \begin{tikzpicture}     \begin{axis}[xmode=log,ymode=log]     \addplot coordinates {(10, 100) (100, 15) (2000, 200)};     \end{axis}     \end{tikzpicture}          \end{document}      This is related to Axis limits in user-defined style, but this doesn't help in this case.


title: git LaTeX and branches workflow

text: I'm getting more and more comfortable with git, and I'm learning how to use it with my LaTeX documents. However, I'm not at all a git wizard and thus I'm looking for further advices. One can find many hints and tips around (also in TeX.SE) but I would like to focus on the issue of branching in the context of a TeX document. I currently I find the model of one-repository-one-document optimal for my needs. By a document lets consider an article for instance. Furthermore, let's assume that the repository is also pushing to a remote location which is shared with collaborators. My question is: **When and How should I branch and merge?** I came up with an idea what should be the workflow, but I'm not sure whether it is good enough, or did I miss something. See my answer.


title: Adobe Reader and xcolor within a table breaks the line render

text: I'm using the `xcolor` package to colour the top row in a table. This is displayed properly using PDF viewers such as Preview or Skim (Mac). But using Adobe Reader 10.1.3 (either Windows or Mac) doesn't display the table line properly. But removing the colouring for the table fixes it. Here is the example that works as expected:               \begin{table}     \caption{Table showing Feature 5's Functional Tests}     \hspace*{-0.5in}     \begin{tabular}[h!]{|p{0.6cm}|p{4cm}|p{5cm}|p{4cm}|p{1.5cm}|}     \hline     {\bf Test ID } & {\bf Task } & {\bf Expected} & {\bf Actual} & {\bf Outcome} \\     \hline        5.1 & Something &  Something & Something &  Success \\     \hline        5.2 & Something &  Something & Something &  Success \\     \hline        5.3 & Something &  Something & Something &  Success \\     \hline        5.4 & Something &  Something & Something &  Success \\     \hline     \end{tabular}      \end{table}      And here is the example with a coloured row:               \begin{table}     \caption{Table showing Feature 5's Functional Tests}     \hspace*{-0.5in}     \begin{tabular}[h!]{|p{0.6cm}|p{4cm}|p{5cm}|p{4cm}|p{1.5cm}|}     \hline     \rowcolor{gray!25}     {\bf Test ID } & {\bf Task } & {\bf Expected} & {\bf Actual} & {\bf Outcome} \\     \hline        5.1 & Something &  Something & Something &  Success \\     \hline        5.2 & Something &  Something & Something &  Success \\     \hline        5.3 & Something &  Something & Something &  Success \\     \hline        5.4 & Something &  Something & Something &  Success \\     \hline     \end{tabular}      \end{table}      Removing the `\rowcolor{}` command replacing it with `\cellcolor{}` creates the same view. Any idea how to fix this? I've tried printing it out of Adobe and the lines print fine, but as this will be read on as a soft copy it's pretty important. Here is a gallery to show the out of of the LaTeX code. Any idea how to fix this?


title: LaTeX table rules disappear when using Adobe Reader

text: I created a PDF document using LaTeX (TeXShop on a Mac) and used the LaTeX command \cellcolor to create colored cells in tables. When I view the document with the Adobe Reader some table rules of colored cells dissapear. This is not the case when using Preview on a Mac. The lines become visible when I zoom into the document (>300%) and when I print from Adobe Reader. Hence, it seems to be a problem with the rendering that Adobe Reader does. According to various disscussions on the internet many people seem to have similar problems. However, nobody provided a good solution for it. Any suggestions to solve the problem? I know that increasing the rule width is one option but I do not want to do it because it changes all the page breaks in my document. Thanks in advance, Sebastian **Edit:** @ChrisS, Jesse, Werner, moewe, Adam: As I mentioned in the original post I do not want to change the rule width. Therefore               \setlength\arrayrulewidth{0.6pt}      is not an option for me. Adobe Reader screen shot: ![Adobe Reader screen shot](http://i.stack.imgur.com/8TJQf.png) Preview screen shot: ![Preview screen shot](http://i.stack.imgur.com/DXgGa.png)


title: Missing lines when shading cells

text: I cannot figure out why lines are not being showed on the shaded columns. Can I get a little help finding what is wrong? ![There should be lines on the shaded columns](http://i.stack.imgur.com/rgfIR.png) EDIT: The MWE follows:               \documentclass[12pt, a4paper]{article}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage {setspace} \doublespacing      \usepackage{fullpage}     \usepackage{graphicx, pdflscape}     \usepackage{tikz}     \usepackage{colortbl}    %for shading*     \usepackage{pifont}    %for pointing hand     \usepackage{arydshln}    %for dashed lines     \begin{document}          \begin{center} \renewcommand*\arraystretch{1.2}     \scalebox{1}[1]{\begin{tabular}[t]{|rrl||c|c|c|} \hline      \multicolumn{3}{|c||}{kesaks} & CF & CS & F \\[0.5ex]     \hline \hline a. & \ding{43} & kesaks & $\ast$$\ast$ & \cellcolor{lightgray} & \cellcolor{lightgray} \\     \hline b. & & gesaks & $\ast$$\ast$$\ast$! & \cellcolor{lightgray}$\ast$ & \cellcolor{lightgray}$\ast$ \\     \hline c. & & gezaks & $\ast$$\ast$$\ast$!$\ast$ & \cellcolor{lightgray}$\ast$$\ast$ & \cellcolor{lightgray}$\ast$$\ast$ \\     \hline d. & & gezags & $\ast$$\ast$$\ast$!$\ast$$\ast$ & \cellcolor{lightgray}$\ast$$\ast$ & \cellcolor{lightgray}$\ast$$\ast$$\ast$ \\     \hline  e. & & gezagz & $\ast$$\ast$$\ast$!$\ast$$\ast$$\ast$ & \cellcolor{lightgray} & \cellcolor{lightgray}$\ast$$\ast$$\ast$$\ast$$\ast$ \\     \hline \end{tabular}} \renewcommand*\arraystretch{1} \end{center}          \end{document}


title: How to print any command on the PDF document exactly like in the TeX file?

text: \documentclass{article}     \begin{document}      My text.     \end{document}      Here 'My text' is the output.But I want to get the following output:               \begin{document}      My text      \end{document}       Is there any way to get this output ?


title: Entry options in biblatex

text: Following the guidelines in the biblatex documentation p. 68, I am adding `useauthor`, `useditor`, and `usetranslator` to the `options` field of an entry in my `.bib` file:               @book{sweet1871,         AUTHOR = "{Pope Gregory I}",         TITLE = "King {A}lfred's {W}est-{S}axon version of {G}regory's {P}astoral {C}are",         YEAR = "1871",              EDITOR = "Henry Sweet",         LANGUAGE = "Old English",         LOCATION = "London",         NUMBER = "45",         OPTIONS = "useauthor = false, useeditor = true, usetranslator = false",         ORIGLANGUAGE = "Latin",         PAGETOTAL = "xlii + 509",         PUBLISHER = "N. Tr{\char"00FC}bner",         SERIES = "{E}arly {E}nglish {T}ext {S}ociety",         SUBTITLE = "With an {E}nglish translation, the {L}atin text, and an introduction",         TRANSLATOR = "{King Alfred}"     }      My `.tex` file looks like this:               \documentclass[a4paper, 12pt, onecolumn, oneside, notitlepage]{article}     \usepackage{fontspec,xunicode,xltxtra} % XeLaTeX     \defaultfontfeatures{Mapping = tex-text} % support TeX conventions like ``--''     \usepackage{polyglossia}     \setdefaultlanguage[variant = american]{english}     \setmainfont{Linux Libertine O}     \usepackage{csquotes} % for language-specific quotation marks     \usepackage[style = numeric, sorting = none, language = american, abbreviate = true, backend = biber]{biblatex}     \addbibresource{ReferencesBiblatex.bib} % my catalog of references          \begin{document}          \cite{sweet1871}          \printbibliography          \end{document}      The output, however, does not come out right: ![enter image description here](http://i.stack.imgur.com/oES3P.png) Not only are my specifications in the `options` field ignored, but it's also not rendering the information about the original language correctly. Here is my console output warnings:               Package biblatex Warning: Ignoring undefined option 'useauthor '     (biblatex)                at entry 'sweet1871'.          Package biblatex Warning: Ignoring undefined option 'useeditor '     (biblatex)                at entry 'sweet1871'.          Package biblatex Warning: Ignoring undefined option 'usetranslator '     (biblatex)                at entry 'sweet1871'.          Package biblatex Warning: Bibliography string 'fromLatin' undefined     (biblatex)                at entry 'sweet1871' on input line 158.      My question is - what I am doing wrong?


title: Are there any server-side LaTeX to HTML-CSS converters?

text: I'm looking for something equivalent to MathJax, but that does the conversion(s) from MathML or LaTeX to HTML-CSS on the server backend as my site is rendering the page, rather than relying on something client-side like a traditional install of MathJax. Ideally, this would be written in Python, but other languages or commandline tools would be acceptable as well. There seem to be some out there (latex2html, plastex) but the output quality is much, much lower than what's produced my MathJax. I've seen some mumblings of node.js + MathJax for this purpose, but with much grumblings from the MathJax maintainers.


title: Geometric constructions with tikz

text: Is it possible to do basic geometric using tikz like angle bisectors, bisection of line segments, inscribed circles, circumscribed circles etc.? More in detail I want a command which takes three points (not on one line) as argument and gives me the (inscribed) circumscribed circle of the triangle defined by this points. Analogously I want a command which takes two points and gives me the bisection of the line segment defined by those points, similar in the case of angle bisection.


title: building a dictionary

text: sometimes when I am not sure about a term, I would like to write it somewhere with the subsequent definition to be able to re-read it from time to time and then remember it forever. I think I am going to start now using Latex. Should I use the glossary package? I just want something like `\word{term}{definition}` and when compiling, the alphabetical order should be respected. Thanks


title: How to draw a double-color line with tikz

text: I would like to draw a rectangle with a double color border: the border should be a line dashed with two alternating colors (blue and red, for example). Is it possible?


title: Unwanted line-breaking of hyphenated word in bibliography

text: In .bib file:               @article{Kurahashi_Yokota2004,     author = "Kurahashi, M. and Yokota, A.",     title = "Agarivorans albus gen. nov., sp. nov., a $\gamma$-proteobacterium isolated from marine animals",     journal = "International Journal of Systematic and Evolutionary Microbiology",     volume = "54",     year = "2004",     pages = "693--697"     }      Output: ![enter image description here](http://i.stack.imgur.com/owc9t.jpg) See that the `\gamma` proteobacterium word is broken up. I want to keep the gamma together on the same line as proteobacterium.


title: Add paragraph styling only in certain sections

text: I am writing my Masters thesis in LaTeX. I'm using the university template which is quite complex so I haven't tweaked it much as I'm new to LaTeX. My problem is that the paragraph style here seems to be the default one for latex that uses indentations without any vertical spacing between the paragraphs. I like my paragraphs to not have indents but be separated with some spaces between them. So, I inserted the following in the preamble.               \setlength{\parindent}{0.0in}     \setlength{\parskip}{0.1in}      It worked alright but I ran into an unexpected problem. It kind of screwed my Abstract pages, TOC etc which are defined in the sty file that I don't want to mess around with. So, I would like for this style to occur only from my Introduction "section" and beyond not in the frontmatter. How can I have only the sections and subsections etc have this style without touching that on the other parts like abstract page, preface, TOC, reference etc.


title: Revtex 4.1 multiple affiliations

text: **EDITED:11-23-2010** In case anyone stumbles upon this question and has a similar problem. The Ubuntu/Debian repositories have an old version of revtex that exhibit this bug. Until the repos are updated, there is a .deb file available in the bug report that installs the new version of revtex **--** I'm Trying to get multiple affiliations for the author list when using revtex-4.1 The default behavior is to group the authors together according to affiliation as so: ![alt text](http://i.stack.imgur.com/Rt1Dz.png) However, this requires you to group authors together in an unnatural way, and usually in a way that conflicts with authorship politics. Even if you switch to superscriptaddress mode, the requirement on grouping still remains. For example, If I want to have two authors share an affiliation, but have one of the authors have a second affiliation, the whole thing ends up ignoring the first affiliation of the second author: e.g.               \author{J. T. Ripper}     \affiliation{Bethlem Royal Psychiatric Hospital}     \author{Bugs Bunny}     \affiliation{Looney Tunes}     \author{Daffy Duck}     \affiliation{Looney Tunes}     \affiliation{Warner Brothers}      Gives you the following ![alt text](http://i.stack.imgur.com/LBHA7.png) If you try to remove bug's affiliation then they both end up inheriting both affiliations. Like so:               \author{J. T. Ripper}     \affiliation{Bethlem Royal Psychiatric Hospital}     \author{Bugs Bunny}     \author{Daffy Duck}     \affiliation{Looney Tunes}     \affiliation{Warner Brothers}      ![alt text](http://i.stack.imgur.com/52xbp.png) What I want it to do is to give Daffy two superscripts, and Bugs bunny only one. The picture gets even harrier if (for example) I try to put J Ripper in between bugs and daffy. Then the numbers get even more screwed up. Using alt affiliations doesn't solve the problem because the alt affilliation goes into a footnote. There used to be a "feature" in revtex-4, that if you used `\address` instead of `\affiliation` , then the whole thing behaves as expected. However, it seems that the latest version of revtex4-1, has patched this "bug", and now even old documents that worked fine, have broken affiliations. e.g.: With Revtex 4: ![alt text](http://i.stack.imgur.com/bddnS.png) With Revtex 4-1: ![alt text](http://i.stack.imgur.com/dPkDW.png) Ignore the style differences (the first one was typeset by arxiv with a prl instead of an api style).The latex behind the two is identical. Full Disclosure: I'm one of the twenty co-authors


title: Passing nodes as parameters to a macro in TikZ

text: I would like to define a macro which would take two nodes as arguments and "connect" them using a third, predefined node. Like this:               \documentclass{minimal}          \usepackage{tikz}     \usetikzlibrary{shapes,positioning,fit}          \newcommand{\diamondconn}[3]{       \node[diamond, draw, innter sep=2pt] (diamond) { #1 };       % get the references to #2 and #3 and position them       % on the left and right side of the `conn' node     }          \begin{document}          % instead of writing this...     \begin{tikzpicture}       \node[diamond, draw, inner sep=2pt] (diamond) { conn };       \node[draw, left=0pt of diamond.west] { foo };       \node[draw, circle, right=0pt of diamond.east] { bar };     \end{tikzpicture}          % I would like to write this:     \begin{tikzpicture}       \diamondconn{conn}{         \node[draw, rectangle] { foo };       }{         \node[draw, circle] { bar };       }     \end{tikzpicture}          \end{document}      I know I could do it backwards, i.e. define a macro for the connecting node and insert it when needed, I am just curious if the first option is possible as well.


title: Strange indent using tabular in titlingpage

text: I need to create a simple problem description page for my thesis. This will also be the title page of the document. I'm using the `memoir` class. I tried to use the `tabular` environment to align some fields, but it produces some annoying indentation I'm not able to remove. Here's an illustration of what I mean ![enter image description here](http://i.stack.imgur.com/TYcYE.png) and here's a minimal working example               \documentclass[a4paper,11pt]{memoir}          \begin{document}          \begin{titlingpage}          \begin{tabular}{p{5cm}l}     Project title:          & Title \\     Student's name:         & Name\\     Problem description:    & \\     \end{tabular}          \vspace{4ex}     Lorem ipsum dolor sit amet...     \vspace{4ex}          \begin{tabular}{@{}p{5cm}l}     \noindent Assignment given:     & 01.01.2012 \\     \noindent Supervisor:           & Name\\     \noindent Co-Supervisor:        & Name  \\     \end{tabular}          \end{titlingpage}          \end{document}


title: Hyphenation exceptions not loaded when using babel with multiple languages

text: When I use babel with more than one language loaded, my hyphenation exceptions are not used. Here is an example: ====== hy.tex =======               \hyphenation{para-dichloro-diphenyl-trichloro-ethane}      ====== test.tex ======               \documentclass{article}     \usepackage[english,french]{babel}     \selectlanguage{english}     \input{hy}          \begin{document}     paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane paradichlorodiphenyltrichloroethane      \end{document}      My hyphenation exception is not respected. If I remove `\selectlanguage`, however, the hyphenation exception works.


title: TikZ: pgfutil-common: pgfutil@in@ - how does it work?

text: Having been writing small lib for TikZ, I tried to use this macro in order to search for `@`. Code compiled, but the result was `false`, despite that I was sure it was in tested string. So, I decided to look into an implementation of this macro, but it breaks my brain by self-recursive usage of `pgfutil@in@` and `pgfutil@in@@`. Could someone explain how that manages to work? And, furthermore, if it can be changed to make search for `@` applicable?               % pgfutil@in@          \newif\ifpgfutil@in@          % Usage:     % \pgfutil@in@{one}{three two one}     % \ifpgfutil@in@     %   -> will be true!     % \else     % \fi     %     % \pgfutil@in@{,}{1234,456567}     % \ifpgfutil@in@     %   -> will be true!     % \else     % \fi     \def\pgfutil@in@#1#2{%      \def\pgfutil@in@@##1#1##2##3\pgfutil@in@@{%       \ifx\pgfutil@in@##2\pgfutil@in@false\else\pgfutil@in@true\fi}%      \pgfutil@in@@#2#1\pgfutil@in@\pgfutil@in@@}      I expect that there must be some way to tweak it by means of `catcode`... **EDIT** : Usage example:               \edef \pgf@marshal{\noexpand \pgfutil@in@{@}{\tikz@temp}}%     \pgf@marshal%      **EDIT 2** : I discovered that using `\pgfutil@in@{@}{\tikz@temp}` from document context with set `\makeatletter` I don't encounter any problems even with searching for `@` directly. Having investigated into how TikZ includes libraries, I found that it saves category code for `@`, sets it to `11`, includes library, then restores the category code for `@`. So it's ok to define macroses with `@` in the name. But before executing `\pgfutil@in@{@}{\tikz@temp}` (now inside some macros in my library) I do:               \c@pgf@counta = \catcode`\@%     \showthe \c@pgf@counta%      and see that `pdflatex` outputs `12`. Hmmm... I guess this is due to that macroses in my library are just read and saved for later use. They're executed inside the `document` environment, when the category code for `@` is already `12`. Made such a suggestion I tried to put `\makeatletter` just before the `\begin{document}` and it worked like a charm! So, is there a way to somehow alter the category code for `@` just in place where it should be `11` by the time of execution? Another suggestion is that by the time the macros is read the category code for `@` is `11`, but when being executed, the expanded value of `\tikz@temp` contains `@` of category code `12`. So, they will never match, unless I do `\makeatletter` at the document context.


title: Average width of popular TeX fonts

text: I know I have seen a table of average font widths. I am not sure whether this was for popular LaTeX fonts such as Computer Modern and I can not remember where it was. Does anyone know of such a listing somewhere? I find myself trying to save trees and squeezing things in on one page. I am wondering if a times new roman clone is what I am limited to or if there are any alternatives in my LaTeX distribution...


Which Unicode fonts are available with grades/optical sizes comparable to Donald Knuth's awesome eight grades in Computer Modern Roman? It would be great to get at least 3 options! This question is a logical follow-up question to this popular question. Although this question is not targeting a specific problem, I think it will provide some really valuable answers for XeLaTeX and LuaLaTex users. Finding out that Computer Modern Unicode does not have the optical sizes / grades of Computer Modern Roman was disappointing. As a linguist, using unicode characters makes things much easier. My options are as follows:   1. Use a unicode font that has many optical sizes / grades (like CM Roman)   2. Use CM Roman and hope for the best   3. Create a custom command for all instances of unicode input/output (e.g. phonetic transcripts) **Option 1 is the best option!**


title: Frame over multicol columnbreak

text: Hello everybody out there using TeX, Is there a possibility to draw a frame over a columnbreak when using for example the `multicol` package? I've already tried several possibilities and done extensive websearch. Interestingly, there seem to be several people having this problem, but there's no solution available in the web. Unfortunately, the `framed` and `mdframed` package don't work with the `multicol` package according to their manuals. The listings package, seems to have a bug: it does split text on different columns correctly, but the colour highlights wrong sections:               \documentclass[landscape,a4paper]{article}     \usepackage{color,lipsum,listings,multicol}     \lstset{%       backgroundcolor=\color{green},       escapechar={\%}     }     \begin{document}        \begin{multicols*}{4}          \colorbox{green}{          \begin{lstlisting}            %            \section{First section}            \lipsum            %          \end{lstlisting}          }        \end{multicols*}     \end{document}      I would be very grateful for any hints towards a solution. One additional step in the right direction might be the `boites` package:               \documentclass[a0,landscape]{a0poster}     \usepackage{boites,color,lipsum,multicol}     \begin{document}     \begin{multicols}{4}     \begin{breakbox}     \lipsum     \end{breakbox}     \end{multicols}     \end{document}      But this does not allow for background colouring using pdflatex.


title: Math indentation environment

text: I'd often like to set formulas like ![enter image description here](http://i.stack.imgur.com/NFPx7.png) Is there some other way than doing this by manually inserting whitespace (with `\quad` etc.), i.e., something like               \begin{align*}     f( & 1 + g( & 2 + \\        &        & 3), \\        & 4 + 5 + 6 + 7)     \end{align*}      So in the first line which contains an `n`th `&` symbol, its horizontal position should be remembered. When a subsequent line contains an `n`th `&` symbol, the text should continue at the remembered position. Afaik `align` etc. can't do this because `2 +` and `3` would be moved to the right because `4 + 5 + 6 + 7)` occupies too much space.


title: Page numbers in landscape

text: I use `report` class, and now I need to change page orientation (portrait/lanscape) for some pages in my document. I have tried `pdflscape` for that, but there is a problem: page numbers preserve original orientation, instead of being rotated as I have expected. I had tried `lscape` and faced with the same problem. What may cause this strange behavior? Here is an example:               \documentclass{report}     \usepackage{indentfirst}     \usepackage{pdflscape}          \begin{document}          \chapter{Main chapter}     \section{Ut convallis pharetra augue at aliquet.}          It's all portrait. Some text Lorem ipsum dolor sit amet, consectetur adipisci veliturea     adipiscing elit. Ut convallis pharetra augue at aliquet.          %% Landscape area      \begin{landscape}      It's all landscape. Some text Lorem ipsum dolor sit amet, consectetur adipisci veliturea      adipiscing elit. Ut convallis pharetra augue at aliquet.     \end{landscape}          \end{document}


title: How to modify outer theme infolines to include the title and section in the header beamer?

text: I am using the CambridgeUS beamer theme for a presentation and would like to modify the header to include the title of the presentation on the left and the section on the right, as I do not have many subsections. A modification to the infolines command seemed like the way to go, but this is apparently not possible without modifying the sty file itself. Does anyone have a fix?


title: How to share a counter for a subfloat

text: I am trying to make a listing float containing 3 subfloats. I have managed to to make the actual float by combining the answers from question1 and question2. Now I only need to make mylisting use the same counter as listings so the three programs are named Program 1, Program 2 and Program 3.               \documentclass[a4paper,article,oneside]{memoir}     \usepackage{subfig}     \let\newfloat\undefined %for working with memoir          \usepackage{floatrow}     \usepackage{filecontents}     \usepackage{listings}     \lstset{     columns=flexible,     basicstyle=\footnotesize\ttfamily,     showstringspaces=false,     tabsize=3,     numberbychapter=false,     frame=single,     extendedchars=true,     }          %% Declare mylisting     \DeclareNewFloatType{mylisting}{placement=htbp,fileext=lol,name=Program}     \floatsetup[mylisting]{style=Plaintop}          %% Rename "List of listings" to "Programmer"     \floatname{lstlisting}{Program}     \renewcommand{\lstlistoflistings}{        \begingroup          \listof{lstlisting}{Programmer}        \endgroup      }          \begin{document}     \lstlistoflistings     \chapter{}          \begin{filecontents*}{dangling.hun}     if <expression> then     <statement>     if <expression> then     <statement>     <else>     <statement>     \end{filecontents*}          \lstinputlisting[caption={A program}]{dangling.hun}          \begin{mylisting}[htbp]       \caption{These are my subfloats}       \subfloat[First]{\begin{minipage}{0.28\linewidth}     \lstinputlisting[label=dangling,nolol]{dangling.hun}\end{minipage}}       \hfill       \subfloat[Second]{\begin{minipage}{0.32\linewidth}     \lstinputlisting[label=dangling1,nolol]{dangling.hun}\end{minipage}}       \hfill       \subfloat[Third]{\begin{minipage}{0.32\linewidth}     \lstinputlisting[label=dangling2,nolol]{dangling.hun}\end{minipage}}     \end{mylisting}          \lstinputlisting[caption={Another program}]{dangling.hun}                    \end{document}      **Update** I have sort of fixed it by using `calc` by making the following change. However, I'm interested in a cleaner way to do it.               \begin{mylisting}[htbp]     ...     \end{mylisting}      to               \begin{mylisting}[htbp]     \setcounter{mylisting}{\value{lstlisting}}     \setcounter{lstlisting}{\value{mylisting}+1}     ...     \end{mylisting}


title: "%" symbol in BibTex - Latex

text: I want to refer an url which contains % symbols, using BibTex. If I just write %, the rest of the line becomes a comment. If I write \%, then the slash also appears.                   @MISC{ref,           title="title",           note="\url{http://www.abc.com/a%20b\%20c}"         }      Help? Is there any macro for "%"?


title: how to use MnSymbol along with other packages

text: I'm writing a file about algebraic topology, which means that I need all sorts of mathematical symbols, along with many various packages. I tried to use `MnSymbol` for its various arrows, only to find out that it is incompatible with `amssymb` and `amsfonts`. Cutting out those two packages introduces new problems: `\mathbb{..}` doesn't work. How is a mathematician supposed to use MnSymbol? Currently, I am using the following packages: `etex`, `babel`, `inputenc`, `fontenc`, `charter`, `MnSymbol`, `amsmath`, `ntheorem`, `framed`, `tikz`, `bookmark`, `hyperref`, `xy`, `mathtools`, `graphicx`, `animate`, `color`, `subfigure`, `caption`, `verbatim`, `multirow`, `longtable`, `wrapfig`, `cancel`, `enumitem`, `tocloft`, `geometry`, `stmaryrd`, `ulem`, `titlesec`, `fix-cm`.


title: pgfplots axis cs nodes inside a scaled tikzpicture

text: I would like to join a node inside a pgfplots axis to a node belonging to a different tikzpicture. I can do this with an overlay from inside the axis. However, if I scale the tikzpicture that encloses the axis, the overlay breaks. For example, the following works fine:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}[remember picture]         \node (n1) {n1};     \end{tikzpicture}          \begin{tikzpicture}[remember picture]      %\begin{tikzpicture}[remember picture, scale=0.85, transform shape]         \node (n2) {n2};         \draw[overlay, green] (n1) -- (n2);         \begin{axis}[right of=n2, name=plot, clip=false]         \addplot coordinates {(0,0) (2,3) (4,2)};         \draw[overlay, red] (n1.east) -- (axis cs:2,3);         \end{axis}     \end{tikzpicture}     \end{document}      When I add a scale parameter (e.g. `scale=0.85` with `transform shape`) to the tikzpicture outside the axis (and run pdflatex twice), the red line no longer starts from the node `(n1)`: ![without scale](http://i.stack.imgur.com/g0OjZ.png) ![with scale](http://i.stack.imgur.com/8myuW.png) Everything works fine if the scale is a parameter of the axis, but I would like to scale the whole tikzpicture. Is there a way to make this work correctly?


title: How much time does it take to learn LaTeX?

text: I have always used Word to write my papers. I am now interested in LaTeX. Is it hard to learn LaTeX? How much time may it require to convert my `.doc` to LaTeX (say about 30 pages)?


title: How to put a quotation box wrapped in text?

text: What is the easiest way to put a box for quotation wrapped within text as we do for `figure` with `wrapfig`. Like half-sized box of text in magazines. I am trying `float`, but I am not sure if it is the best choice for this purpose. I am looking for a flexible solution: When the box content is long, split the box in two pages (continues to the next page along with the main text).


title: Need some hints to start with the package amsthm

text: I want to highlight my proposition and i don't need the enumeration for now. The source file is the following:               \usepackage{amsmath, amssymb, amsthm}          \begin{document}          \begin{theorem}          ... bla bla bla, not so interesting ...          \end{theorem}          \end{document}      To compile I use pdflatex, and the reported error is "Environment theorem is undefined". You have to know that I'm sure that the other math packages are installed (amsmath, amssymb), and secondly my proposition isn't highlighted in the final document. EDIT: For highlighting, I wish that the reader can understand almost without reading that a block of text is a theorem, a proposition, and so on... So, what I want is for example, that all the propositions have the same style, all the theorems have the same style (but different from the style of the propositions). And I think that using this package is fast and handy.


title: \#\#\#\# becomes "##" in printout

text: I want to refer to a url using "####" as a stand-in for the many four digit codes which could take it's place. But this ...               \documentclass{scrartcl}       \usepackage{url}       \usepackage{hyperref}          \begin{document}       \url{\#\#\#\#}       \end{document}      ... is printing this "##". `\detokenise{####}` does the same. Without `hyperref` it prints "####" as I want. Why? and How to fix?


title: Why does amsmath use fraktur for real and imaginary parts?

text: > Edit: When writing this I was under the impression that this was amsmath's > choice. It has now been bought to my attention that it is Knuth's. When was it decided that amsmath would have the real part notation as an uppercase fraktur variation R rather than a Re? (same question for the imaginary parts). What was the motive for this? IMPO the bottom line looks better and more readable. ![enter image description here](http://i.stack.imgur.com/SuchU.jpg) Also is it not the case that the latter are far more common? Why would amsmath want writers to keep redefining the latter? The `\Re` and `\Im` are convinient but return the former.


title: Absolute path for pgf externalisation

text: The graphic externalisation works well when it is done in a subfolder of my TeX files with the command               \tikzsetexternalprefix{figures/}      However, I get an error message when I try to set a different folder (not a subfolder of my TeX files), such as               \tikzsetexternalprefix{H:/figures/}      When I compile the document, I only get in the `.log` file (in `H:/figures/BELI.log`) the following error               ! I can't write on file `H:/figures/BELI.dpth'.


title: Blank page disappeared between chapters after chapter 2 in latex

text: I use Latex with the document class 'book'. I´d like a blank page between chapters but it works only after chapter 1. I've tried to force a blank page with \newpage, \clearpage and \cleardoublepage and nothing happens. How can I add a blank page? Why are they not included automatically after chapters? Here is my document.tex:               \documentclass[a4paper,11pt]{book}          \usepackage{./estilos/estiloBase}      \usepackage{./estilos/colores}       \usepackage{./estilos/comandos}          \graphicspath{{./imagenes/}}          \begin{document}          \pagestyle{empty}     \input{portada.tex}     \cleardoublepage          \input{primerahoja.tex}     \cleardoublepage     \pagestyle{plain}          \frontmatter           \input{previo.tex}     \cleardoublepage          \tableofcontents     \listoffigures     \listoftables          \mainmatter           \chapter{Introducción}     \label{cap:introduccion}     \input{cap1.tex}          \chapter{Descripción general del proyecto}     \label{cap:descripcion}     \input{cap2.tex}          \chapter{Contexto}     \label{cap:contexto}     \input{cap3.tex}     ...          \appendix     \cleardoublepage     \addappheadtotoc     \appendixpage     \chapter{Manual de usuario}     \label{cap:manusuario}          \backmatter          \chapter*{Software utilizado}     \addcontentsline{toc}{chapter}{Software utilizado}     \input{programas.tex}          \cleardoublepage          \addcontentsline{toc}{chapter}{Bibliografía y referencias}     \bibliographystyle{unsrt}     \bibliography{bibliografia}          \input{fdl-1.3.tex}     \end{document}


title: \cite[page]{book} inside \caption[...]{...}

text: Is it somehow possible to put a citation including page specification, as in `\cite[page]{book}`, inside the list-of-figures-relevant caption of a figure, i.e. `\caption[*HERE*]{...}`? I can do               \caption[\protect\cite{book}]{other text}      but               \caption[\protect\cite[page]{book}]{other text}      yields `book] other text` as the caption in the first run and produces an error "Argument of \NAT@@cite has an extra }" in the second LaTeX run. I'm using pdfLaTeX and natbib.


title: How to make a figure with moving arrows?

text: How could I make the following figure? ![enter image description here](http://i.stack.imgur.com/DqjKm.jpg) ![enter image description here](http://i.stack.imgur.com/N2ZzI.png) My code so far is:               \documentclass[12pt,a4paper]{article}     \usepackage[english,greek]{babel}     \usepackage{ucs}      \usepackage[utf8x]{inputenc}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tikz}     \begin{document}     \begin{center}     \begin{tikzpicture}     \draw[->, very thick](0,0)--(6,0) node[below]{$Q$};     \draw[->, very thick](0,0)--(0,6) node[left]{$P$};     \draw[-, JungleGreen] (5,0) node[below]{$200$}--(0,5) node[left] {$50$};     \draw[dotted] (0,1) node[left]{$10$}--(4,1);     \draw[dotted] (4,1)--(4,0) node[below]{$160$};     \node[above right] at (4,1) {$A$};     \draw[dotted] (0,3) node[left]{$30$}--(2,3);     \draw[dotted] (2,3)--(2,0) node[below]{$80$};     \node[above right] at (2,3) {$B$};     \end{tikzpicture}     \end{center}     \end{document}


title: BibTeX, citing a podcast

text: What's the best way to cite a podcast using BibTeX, to match the Chicago Manual of Style? My guesses are: `online`, `misc`, `audio`, `music`. It's a recorded lecture, if that matters.


title: How to embed output of one tex into another tex as figures?

text: I'd like to embed the slides of one of my tex files with `documentclass` `beamer` as thumbnails into another tex file with `documentclass` `scrbook`. For example: the slides of the beamer file shall be arranged in two columns on one or two pages of the second tex file. How can I achieve that?


title: How to place figure relatively to other figure in ConTeXt?

text: I have two figures. I need to place first figure with `width=10cm` and then place second figure with same width but it's center must be shifted to right by 9cm and down by 5cm relatively to center of first picture. I also need the text do not cross with pictures, i.e. I need this construction behaves just like one usual picture. Is there a way to do that?


title: Subcaptions for TikZ pictures

text: I'd like to put (sub)captions under the diagrams on the right hand side of the equation in the following code. For example, I'd like to label them (a) through (e). Thanks in advance for any help!               \documentclass[11 pt]{amsart}     \usepackage{tikz}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{subfig}          \usetikzlibrary{calc}     \tikzstyle{hackennode}=[draw,circle,inner sep=0,minimum size=4pt]     \tikzstyle{hackenline}=[line width=3pt]          \begin{document}          \begin{figure}[h]     {\Large     \[     \begin{tikzpicture}[baseline=-0.65ex,scale=0.5]         \draw[densely dashed] (-1,-1) -- (3,-1);         \node[hackennode] (0) at (0,-1) {};         \node[hackennode] (1) at (0,0) {};         \node[hackennode] (2) at (0,1) {};         \node[hackennode] (3) at (0,2) {};         \draw[hackenline,blue] (0) -- (1) {};         \draw[hackenline,red] (1) -- (2) -- (3) {};         \node[hackennode] (10) at (1,-1) {};         \node[hackennode] (11) at (1,0) {};         \node[hackennode] (12) at (1,1) {};         \node[hackennode] (13) at (1,2) {};         \draw[hackenline,blue] (10) -- (11) {};         \draw[hackenline,red] (11) -- (12) -- (13) {};         \node[hackennode] (20) at (2,-1) {};         \node[hackennode] (21) at (2,0) {};         \node[hackennode] (22) at (2,1) {};         \draw[hackenline,red] (20) -- (21);         \draw[hackenline,blue] (21) -- (22);     \end{tikzpicture}     =     \left \{         \begin{tikzpicture}[baseline=-0.65ex,scale=0.5]             \draw[densely dashed] (-1,-1) -- (3,-1);             \node[hackennode] (10) at (1,-1) {};             \node[hackennode] (11) at (1,0) {};             \node[hackennode] (12) at (1,1) {};             \node[hackennode] (13) at (1,2) {};             \draw[hackenline,blue] (10) -- (11) {};             \draw[hackenline,red] (11) -- (12) -- (13) {};             \node[hackennode] (20) at (2,-1) {};             \node[hackennode] (21) at (2,0) {};             \node[hackennode] (22) at (2,1) {};             \draw[hackenline,red] (20) -- (21);             \draw[hackenline,blue] (21) -- (22);         \end{tikzpicture}     \tikz[baseline=-0.65ex,scale=0.5] \node[inner sep=0] at (0,-1) {,\,};     \begin{tikzpicture}[baseline=-0.65ex,scale=0.5]         \draw[densely dashed] (-1,-1) -- (3,-1);         \node[hackennode] (0) at (0,-1) {};         \node[hackennode] (1) at (0,0) {};         \node[hackennode] (2) at (0,1) {};         \node[hackennode] (3) at (0,2) {};         \draw[hackenline,blue] (0) -- (1) {};         \draw[hackenline,red] (1) -- (2) -- (3) {};         \node[hackennode] (10) at (1,-1) {};         \node[hackennode] (11) at (1,0) {};         \node[hackennode] (12) at (1,1) {};         \node[hackennode] (13) at (1,2) {};         \draw[hackenline,blue] (10) -- (11) {};         \draw[hackenline,red] (11) -- (12) -- (13) {};         \node[hackennode] (20) at (2,-1) {};         \node[hackennode] (21) at (2,0) {};         \draw[hackenline,red] (20) -- (21);     \end{tikzpicture}     \middle |     \begin{tikzpicture}[baseline=-0.65ex,scale=0.5]         \draw[densely dashed] (-1,-1) -- (3,-1);         \node[hackennode] (0) at (0,-1) {};         \node[hackennode] (1) at (0,0) {};         \node[hackennode] (2) at (0,1) {};         \draw[hackenline,blue] (0) -- (1) {};         \draw[hackenline,red] (1) -- (2)  {};         \node[hackennode] (10) at (1,-1) {};         \node[hackennode] (11) at (1,0) {};         \node[hackennode] (12) at (1,1) {};         \node[hackennode] (13) at (1,2) {};         \draw[hackenline,blue] (10) -- (11) {};         \draw[hackenline,red] (11) -- (12) -- (13) {};         \node[hackennode] (20) at (2,-1) {};         \node[hackennode] (21) at (2,0) {};         \node[hackennode] (22) at (2,1) {};         \draw[hackenline,red] (20) -- (21);         \draw[hackenline,blue] (21) -- (22);     \end{tikzpicture}     \tikz[baseline=-0.65ex,scale=0.5] \node[inner sep=0] at (0,-1) {,\,};     \begin{tikzpicture}[baseline=-0.65ex,scale=0.5]         \draw[densely dashed] (-1,-1) -- (3,-1);         \node[hackennode] (0) at (0,-1) {};         \node[hackennode] (1) at (0,0) {};         \draw[hackenline,blue] (0) -- (1) {};         \node[hackennode] (10) at (1,-1) {};         \node[hackennode] (11) at (1,0) {};         \node[hackennode] (12) at (1,1) {};         \node[hackennode] (13) at (1,2) {};         \draw[hackenline,blue] (10) -- (11) {};         \draw[hackenline,red] (11) -- (12) -- (13) {};         \node[hackennode] (20) at (2,-1) {};         \node[hackennode] (21) at (2,0) {};         \node[hackennode] (22) at (2,1) {};         \draw[hackenline,red] (20) -- (21);         \draw[hackenline,blue] (21) -- (22);     \end{tikzpicture}     \tikz[baseline=-0.65ex,scale=0.5] \node[inner sep=0] at (0,-1) {,\,};     \begin{tikzpicture}[baseline=-0.65ex,scale=0.5]         \draw[densely dashed] (-1,-1) -- (3,-1);         \node[hackennode] (0) at (0,-1) {};         \node[hackennode] (1) at (0,0) {};         \node[hackennode] (2) at (0,1) {};         \node[hackennode] (3) at (0,2) {};         \draw[hackenline,blue] (0) -- (1) {};         \draw[hackenline,red] (1) -- (2) -- (3) {};         \node[hackennode] (10) at (1,-1) {};         \node[hackennode] (11) at (1,0) {};         \node[hackennode] (12) at (1,1) {};         \node[hackennode] (13) at (1,2) {};         \draw[hackenline,blue] (10) -- (11) {};         \draw[hackenline,red] (11) -- (12) -- (13) {};     \end{tikzpicture}     \right \} \]     }% End group with \Large     \caption{}     \end{figure}          \end{document}


title: How can I open a file in "append" mode?

text: Could not find anything in the TeXBook, but this could be just me. I guess it is always possible to open the file for reading, copy its content to another file, and then continue writing to that file. Finally, you could escape to shell to remove the original file and rename the newly generated file to the file you have just created.


title: Simple un-obfuscation of some LaTeX internals

text: Here's an example of some code from LaTeX's `\DeclareFontFamily`:               \def\reserved@a{#3}     \global     \expandafter\let\csname #1+#2\expandafter\endcsname            \ifx \reserved@a\@empty              \@empty            \else \reserved@a            \fi      I could be wrong, but to me this looks identical to:               \expandafter\gdef\csname#1+#2\endcsname{#3}      Now, the source for this code comments: > We compare `\reserved@a` with `\@empty` If these two are the same we `\let` > the ‘extra’ macro equal to `\@empty` which is not the same a doing a `\let` > to `\reserved@a` — the latter would blow one extra memory location rather > then reusing the one from `\@empty`. But if we're not re-using the contents of `\reserved@a` after this point (which we're not, as far as I can see), there's no reason to go this roundabout route, right?


Writing a presentation frame and its corresponding narration at the same time can help us to reduce the complexity. In other words, I need a mechanism as follows (it is a pseudo-code)               \begin{frame}{Introduction}     \begin{slide}     %slide content to show     \end{slide}     \begin{narration}     %narration goes here.     \end{narration}     \end{frame}          \begin{frame}{Definition}     \begin{slide}     %slide content to show     \end{slide}     \begin{narration}     %narration goes here.     \end{narration}     \end{frame}          %etc...      Is there a package to write slide and narration contents at the same time but produces each separately at the final?


title: Vertical alignment of molecules

text: \begin{scheme}[h]     \centering      %\setcrambond{3pt}{1pt}{1pt}     %\setbondoffset{3pt}      \scriptsize\chemfig{(-[::60]R_1)(=[::180]O)-[::-60]O-[::-60]-[::60](-[::60]O-[::-60](-     [::60]R_2)(=[::-60]O))-[::-60]-[::60]O-[::-60](=[::60]O)(-[::-60]R_3)} + H_2O      \chemrel{<->}      \scriptsize\chemfig{(-[::60]R_1)(=[::180]O)-[::-60]O}      \chemsign{+}      \scriptsize\chemfig{(-[::60]R_1)(=[::180]O)-[::-60]O}      \chemsign{+}      \scriptsize\chemfig{(-[::60]R_1)(=[::180]O)-[::-60]O}      \chemsign{+}      \scriptsize\chemfig{(-[::60]R_1)(=[::180]O)-[::-60]O}      \caption{reaction}      \label{sn:reaction}      \end{scheme}      ![enter image description here](http://i.stack.imgur.com/7DrOQ.jpg) How can I achieve that vertical alignment? I looked through the manual however there seemed no special command to mark the branch or molecule which everything else should align at. Also, why is the O italic? I saw a solution with invisible arrows but it seems like it doesn't work here. `\arrow{0}[,0]` will result in `[,0]` being written before my equation.


title: Union of paths in asymptote

text: I am trying to get the union of four circles in asymptote:               unitsize(1mm);     import graph;     pair o1 = (0, 0);     pair o2 = (10, 0);     pair o3 = (10, 10);     pair o4 = (0, 10);     path c1 = Circle(o1, 10);     path c2 = Circle(o2, 10);     path c3 = Circle(o3, 10);     path c4 = Circle(o4, 10);     draw(c1^^c2^^c3^^c4, black);      Apparently this is not the right way: ![enter image description here](http://i.stack.imgur.com/KHYC2.png) Using inkscape I can get the desired effect: ![enter image description here](http://i.stack.imgur.com/edYGW.png) @g.kov 's answer partially solves the problem, but if the paths are not consecutively intersecting, then `buildcycle` will not work:               unitsize(1mm);     import graph;     pair o1 = (0, 0);     pair o2 = (10, 0);     pair o3 = (10, 10);     pair o4 = (0, 10);     path c1 = Circle(o1, 8);     path c2 = Circle(o2, 8);     path c3 = Circle(o3, 1);     path c4 = Circle(o4, 1);          guide[] gg=c1^^c2^^c3^^c4;     guide g=gg[0];     for(int i=1;i<gg.length;++i){       g=buildcycle(g,gg[i]);     }          draw(g,black);      This outputs nothing, while what I wanted is this (output from inkscape): ![enter image description here](http://i.stack.imgur.com/WLBji.png) The reason I am checking out asymptote is that it's a programming language and should be much more powerful when the number of paths increase to a higher order.


title: arara: problem with spaces in the name of .tex files?

text: I know that there is a problem with spaces in the name of `.bib` files. Nonetheless, the following MWE compiles perfectly fine if one does the normal `latex` -> `bibtex` -> `latex` -> `latex` compilation sequence by hand, _regardless of whether there are spaces in the name of the **`.tex`** file_.               % arara: pdflatex     % arara: bibtex     % arara: pdflatex     % arara: pdflatex          \documentclass{article}          \usepackage{natbib}          \begin{document}          \citet{friederici1993}          \bibliographystyle{apalike}     \bibliography{master}          \end{document}      However, as soon as one tries to compile this MWE with `arara` and _**if** there are spaces in the name of the **`.tex`** file_, it will **not** work. It seems to be a problem with reading from the `.aux` file, as per the error message: > >     Running BibTeX... >   >     I couldn't open file name `"2014-01-24 Friederici et al 1993 > Presentation.aux".aux' >     FAILURE >   Is there are a workaround, or is this unavoidable? Does one _have_ to use file names without spaces for **`.tex`** files if one is using `arara` to compile?


title: Table formatting

text: I am working on the table               \documentclass{article}     \pagestyle{empty}     \usepackage[landscape]{geometry}     \usepackage{multirow}     \usepackage{booktabs}     \newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}     \begin{document}          \begin{table}       \centering       \ra{1.5}       \caption{Caption}       \begin{tabular}{@{}clllclll@{}}         \hline           File         &\multicolumn{2}{c}{\textbf{Logistic Regression}} &\phantom{abc}         &\multicolumn{2}{c}{\textbf{Support Vector Machine}} &\\         \cline{2-4} \cline{6-8}          & sensitivity & specificity & total accuracy && sensitivity          & specificity & total accuracy\\         \hline        $100$ & 0.0790 & 0.1692 & 0.2945 && 0.3670 & 0.7187 & 3.1815 \\        $101$ & -0.8651& 50.0476& 5.9384&& -9.0714& 297.0923& 46.2143\\        $102$ & 124.2756& -50.9612& -14.2721&& 128.2265& -630.5455& -381.0930\\        $103$ & 0.0357& 1.2473& 0.2119&& 0.3593& -0.2755& 2.1764\\        $104$ & -17.9048& -37.1111& 8.8591&& -30.7381& -9.5952& -3.0000\\        $105$ & 105.5518& 232.1160& -94.7351&& 100.2497& 141.2778& -259.7326\\        \hline      \end{tabular}     \end{table}     \end{document}      And the output is ![enter image description here](http://i.stack.imgur.com/qvyor.jpg) I have these problems in formatting the table   1. (Done) Put a name for the first column   2. (Done) Center the words for "logistic reg" and "support vector machine"   3. Output with very small margin like a picture.   4. Other suggestions making the table looks professional.    5. How to insert two extra columns to right of first column   6. (Done)Center "File" with respect to "logistic regression" and 'sensitivity, spe....' Thanks for your help!


title: pdflatex not producing .pdf file

text: I have been using latex and running it through `TexMaker` now all of a sudden running latex will, `pdflatex` or `PS->PDF` will not produce a `.pdf` file. I have tried to delete all output files and run with no luck Then I get no errors on running `pdflatex` and there are no output files like the `.log` file so cant even check errors


title: Why is a page break added at the end of a column set in ConTeXt?

text: I have a document containing some 1-column and 2-column passages, mixed, e.g.:               This sentence has no column-     s.          This part of   are balanced     the document   such that t-     has two col-   he lines are     umns which     equal.          This part of the document     has no columns. The text is     like normal.      I am using a code like this:               \definecolumnset[customcolumns][n=2]     \starttext         This sentence has no columns.         \startcolumnset[customcolumns]         This part of the document has two columns which are balanced such that the lines are equal.         \stopcolumnset         This part of the document has columns. The text is like normal.     \stoptext      When I compile this code, the last paragraph is placed on a new page, but it seems there should be enough space that it can appear on the same page.   * How can I ensure that no page break is added at the end of the column set?


title: Tikz and wrapfig

text: I've used the solution shown in this link as a way to select some paragraphs from a text. However, this solution doesn't seem to work with wrapfig. In the following MWE, if I want to select the first 2 paragraphs I can have 2 options:   * Put the \Startsquiggly command before the wrapfig but it uneccesarily adds extra space.   * Put it just before the 1st paragraphs but then it's a total disaster.              \documentclass[12pt,a4paper,twoside]{article}     \usepackage{eurosym}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \DeclareUnicodeCharacter{20AC}{\euro}     \usepackage{microtype}     \usepackage[spanish,english]{babel}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \definecolor{gray}{RGB}{102, 102, 102}     \usepackage{tabularx}     \newcolumntype{L}[1]{>{\hsize=#1\hsize\raggedright\arraybackslash}X}     \newcolumntype{R}[1]{>{\hsize=#1\hsize\raggedleft\arraybackslash}X}     \usepackage{multirow}     \usepackage{graphicx}     \usepackage[hang]{footmisc}      \usepackage{lettrine}     \usepackage{wrapfig}     \usepackage{comment}     \usepackage{ulem} %alternativa a "soul"     \usepackage{tikz}     \usetikzlibrary{shapes.symbols}     \usetikzlibrary{decorations.pathmorphing,calc}     \usepackage[framemethod=TikZ]{mdframed}     \pdfminorversion=6     \usepackage[       margin=2cm,       includehead,       headheight = 17mm,       footskip = \dimexpr\headsep+\ht\strutbox\relax,       tmargin = 0mm,       bmargin = \dimexpr17mm+2\ht\strutbox\relax,     ]{geometry}     \usepackage{parskip}     \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0pt}     \fancyhf{}     \fancyfoot[R] {\thepage}     \usepackage{verbatim}     \usepackage{textpos}     \usepackage[hyphens]{url}     \usepackage{hyperref}          %http://tex.stackexchange.com/questions/175755/vertical-line-next-to-a-block-with-no-margins/     \newcounter{tmp}     \newcommand\tikzmark[1]{%       \tikz[overlay,remember picture] \node (#1) {};}          \def\separacionBarraInicial{.51}     \def\separacionBarraFinal{.53}          \newcommand\Startsquiggly{%       \stepcounter{tmp}%       \tikzmark{a}\label{a\thetmp}%       \ifnum\getpagerefnumber{a\thetmp}=\getpagerefnumber{b\thetmp} \else           \begin{tikzpicture}[overlay, remember picture]             %\draw [decoration={coil,aspect=0},decorate,ultra thick,gray]             \draw [decorate,ultra thick,black]               let \p1 = (a.north), \p2 = (b), \p3 = (current page.center) in               ( $ (\x3,\y1) + (\separacionBarraInicial\textwidth,1ex) $ ) --               ( $ (\x3,\y1) + (\separacionBarraFinal\textwidth,1ex) $ ) --                 ( $ (\x3,\y3) + (\separacionBarraFinal\textwidth,-0.51\textheight) $ );           \end{tikzpicture}%       \fi%     }               \newcommand\Endsquiggly{%     \tikzmark{b}\label{b\thetmp}       \ifnum\getpagerefnumber{a\thetmp}=\getpagerefnumber{b\thetmp}           \begin{tikzpicture}[overlay, remember picture]             %\draw [decoration={coil,aspect=0},decorate,ultra thick,gray]             \draw [decorate,ultra thick,black]               let \p1 = (a.north), \p2 = (b), \p3 = (current page.center) in               ( $ (\x3,\y1) + (\separacionBarraInicial\textwidth,1ex) $ ) --                ( $ (\x3,\y1) + (\separacionBarraFinal\textwidth,1ex) $ ) --                 ( $ (\x3,\y2) + (\separacionBarraFinal\textwidth,-0.75ex) $ ) --               ( $ (\x3,\y2) + (\separacionBarraInicial\textwidth,-0.75ex) $ );           \end{tikzpicture}%       \else           \begin{tikzpicture}[overlay, remember picture]             %\draw [decoration={coil,aspect=0},decorate,ultra thick,gray]             \draw [decorate,ultra thick,black]               let \p1 = (a.north), \p2 = (b), \p3 = (current page.center) in               ( $ (\x3,\y3) + (\separacionBarraFinal\textwidth,.495\textheight) $ ) --                ( $ (\x3,\y2) + (\separacionBarraFinal\textwidth,-0.75ex) $ ) --               ( $ (\x3,\y2) + (\separacionBarraInicial\textwidth,-0.75ex) $ );           \end{tikzpicture}%       \fi     }          \newcommand\Squ[1]{\Startsquiggly#1\Endsquiggly}          \selectlanguage{English}     \begin{document}     \section{Examen oral 2}     \colorbox{red}{\textbf{\Large\color{white}Time}}          \href{http://content.time.com/time/world/article/0,8599,2000511,00.html#ixzz0yhJt0elU}{\textbf{\Large Mexico: Where Bullets Are Intimidating the Ballot}}          \textcolor{gray}{\small By Ioan Grillo / Mexico City | Tuesday, Jun. 29, 2010}          \Startsquiggly % --> doesn't work well here, it puts too much extra space     \begin{wrapfigure}{R}{0.50\textwidth}     \centering     \vspace{-1em}     \begin{tabularx}{0.47\textwidth}{X}         \includegraphics[width=0.445\textwidth]{360_rodolfo_torre_0628.jpg} \\         \hfill {\color{gray}EPA / STR} \\         Forensic experts inspect the site in Ciudad Victoria, Mexico, where Rodolfo Torre Cantu, a candidate for governor in the northeastern Mexican state of Tamaulipas, was assassinated on June 28, 2010 \\     \end{tabularx}     \end{wrapfigure}          %\Startsquiggly --> total disaster!     Last Friday, June 25, gubernatorial candidate Rodolfo Torre raised both his arms to the sky in front of 15,000 cheering white-shirted supporters in a baseball stadium minutes from the Rio Grande. After he promised security in his violence-ridden border state of Tamaulipas, the crowd erupted to his campaign anthem, sung to the catchy tune of the smash hit ``I Gotta Feeling'' by U.S. pop band Black Eyed Peas. They had reason for celebration. Opinion polls all concurred that the mustachioed physician would win the July 4 election by a landslide of more than 30 points. But on Monday, as Torre left the state capital to conclude his campaign, assailants showered his convoy with gunfire from automatic rifles and heavy-caliber weapons, killing him instantly. Army commanders said the attack bore all the signs of the Zetas, a paramilitary drug gang that was born in the state.          Mexico's highest-profile political assassination since the 1994 murder of presidential candidate Luis Donaldo Colosio was a blow not only to Torre's supporters but to the nation's entire ailing democracy. On July 4, voters will choose governors in 12 of 31 states in a ``Super Sunday'' of local elections. The ballots come almost exactly a decade after the nation voted to end 71 years of one-party rule. But rather than showcasing the success of multiparty democracy, the campaigns have highlighted its hazards. Races have been dampened by arrests of candidates on racketeering charges, leaked tapes of organized vote buying and a succession of violent attacks. After the Torre killing, some politicians asked for half of the races to be suspended. ``This is extremely worrying,'' says political scientist Maria Eugenia Valdes. ``If there is fear and violence, there is no freedom. And if there is no freedom, we cannot have fair elections.''     \Endsquiggly               A key problem is that many of the polls are in the states hardest hit by the relentless drug war, including Chihuahua, home to Ciudad Juárez, which has a reputation for being one of the most dangerous cities in the world, and Sinaloa, the cradle of Mexican organized crime. Tamaulipas, a state that shares a border with Texas and has three of the busiest land cargo-crossing points into the U.S., has this year been engulfed by bloody battles between the Zetas and their old masters in the Gulf cartel. Back in the 1990s, the cartel founded the Zetas, recruiting defectors from the army special forces to be its brutal enforcers. But the Zetas broke away to smuggle their own drugs as well as carry out rampant extortion and kidnapping. The fighting has littered the Tamaulipas streets with hundreds of bodies and led to prolonged shoot-outs that have shut down schools and workplaces.          The Zetas have also suffered ? hit heavily by arrests, firefights with the army and the actions of rival gangs in other states, including Sinaloa, where 28 of their alleged members were slaughtered in a prison riot. Such devastating losses could have led them to lash out against the establishment.          The violence in Tamaulipas has scarred all the major political parties. Last month, triggermen silenced a mayoral candidate from the conservative National Action Party (PAN) of President Felipe Calderón, gunning him and his son down in his farm-supplies store in the town of Valle Hermoso. In nearby Nuevo Laredo, assassins wiped out two people close to the mayoral candidate of the leftist Democratic Revolution Party (PRD), then strung up banners warning, ``This is what happens to everyone who supports these f\_\_\_\_\_\_ people.'' Gubernatorial candidate Torre had been a lifelong member of the centrist Institutional Revolutionary Party (PRI), which currently controls Tamaulipas. While focusing on law and order, the 46-year-old former federal deputy had made no radical or controversial proposals.               As politicians of all stripes rushed to Tamaulipas to condemn the murder, Calderón called for a united front against narco-butchery. ``I'm convinced today more than ever that we need dialogue and unity,'' he said from his presidential palace. ``Because together, Mexicans can defeat and will defeat this common enemy, which threatens to destroy not only our tranquillity but also our democratic institutions.'' Electoral officials said the Tamaulipas election would go on as scheduled, and PRI leaders promised a substitute candidate, saying they would not be intimidated.          However, the campaigns have led to some fierce mudslinging among the parties. When the PRD gubernatorial candidate in the state of Quintana Roo was arrested for allegedly working with the Zetas, party leaders accused the federal government of framing him in a political persecution. Later, following leaked tapes of alleged electoral shenanigans by the PRI, its governors lashed out at the federal government for wiretapping them. PRI Senator Adolfo Toledo then blamed bad blood for creating a hostile environment that was conducive to Monday's murder. ``What has happened is terrible, but it is the result of the heated confrontations supported by the PAN and the federal government that finally ended in the first victim,'' Toledo told TIME.          Voter turnout will be a key barometer of how intimidated the electorate has become, with some likely to stay at home in the same way many avoided the polls in war-torn Iraq and El Salvador. Electoral observers say the intimidation and corruption will probably lead to the courts' ultimately ruling on the results of up to half of the races. ``We are seeing more and more elections being decided by judges,'' says Francisco Abundis of the polling firm Parametria. ``That is a very bad sign.'' Looking ahead, pundits fear that the problems bedeviling these votes may be a mere taste of those that could ravage the country's next presidential election, due in 2012.          \textit{-- With reporting by Dolly Mascareñas / Oaxaca}     \end{document}      Any possible solution?


title: How to increase the table row height for furigana(ruby) in XeLaTeX?

text: The **ruby** package provides phonetic guide (really, it's possible to use in any language), however, if to use ruby inside the table, the row height will not increased for ruby: ![Ruby inside table](http://i.stack.imgur.com/VIf4y.png) I also used the **bigstrut** package, it wasn't help. Is it possible to increase the row height for ruby? The MWE is               \documentclass[11pt]{article}           \usepackage{xeCJK}     \setCJKmainfont{MS PMincho}          \usepackage{polyglossia}     \setmainlanguage[babelshorthands=true]{russian}     \newfontfamily\russianfont{Calibri}          \usepackage{array}     \usepackage{bigstrut}          \usepackage{ruby}     \renewcommand{\rubysep}{-0.1ex}          \begin{document}          \begin{tabular}{|m{25mm}|m{57mm}|} \hline     \multicolumn{2}{|l|}{Институт/Руководящая должность} \bigstrut \\ \hline     \ruby{国}{くに}/\ruby{首長}{しゅちょう} & \emph{страна}/\emph{премьер-министр} \bigstrut \\ \hline     \ruby{都道府県}{とどうふけん}/\ruby{知事}{ちじ} & \emph{префектура}/\emph{губернатор} \bigstrut \\ \hline     \ruby{市}{し}/\ruby{市長}{しちょう} & \emph{город}/\emph{мэр} \bigstrut \\ \hline     \ruby{町}{まち}/\ruby{町長}{ちょうちょう} & \emph{район}/\emph{глава района} \bigstrut \\ \hline     \ruby{村}{むら}/\ruby{村長}{そんちょう} & \emph{деревня}/\emph{староста} \bigstrut \\ \hline     \end{tabular}          \end{document}      You will not see the "Bad box" warning in this MWE, however, I saw it in my source document.


title: How to fill an area bounded by grid lines and axes?

text: With `pgfplots` one can for `axis` use the options `minor xtick` and `minor ytick` together with `grid=minor` to manually produce grid lines. If one use such grid lines one may want to emphasize a certain region bounded by the grid lines and the axes by filling it with some color. Is this possible? Here is an example to illustrate the problem. Say that I have the following               \documentclass{article}          \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}       \begin{axis}[         minor ytick={2},         minor xtick={2},         grid=minor         ]         \addplot{x};       \end{axis}     \end{tikzpicture}          \end{document}      which produces ![Plot produced by example code](http://i.stack.imgur.com/gPtPP.png) and say that I want to emphasize upper right region that is bounded by the grid lines and the axes. How can I do this? That is, to produce something like the following: ![Plot with filling in region bounded by the grid lines and the axes](http://i.stack.imgur.com/ErUS2.png)


title: No horizontal bar in table for space between column

text: I'm trying to create a table with underlined column groupings. I have an extra space between the groupings using `@{\hskip 1cm}`, but I don't want the underlining to extend over this extra space. Is there an easy way to fix this? I'd prefer not to add an extra column to my table as a work-around? Also, second question - how does one do multiple lines with `\cline`?               \documentclass[authoryear,letterpaper,english,11pt]{article}          \RequirePackage{amsthm,amsmath,amsfonts,amssymb,color,graphicx,babel,natbib,booktabs,geometry,comment, import,rotating,array}     \begin{document}          \begin{sidewaystable}[htbp]\centering \small     \caption{Ranking by parameters \label{stats_rank}}     \begin{tabular*}{\hsize}{@{\hskip\tabcolsep\extracolsep\fill}r*{4}{>{\raggedleft\arraybackslash}m{1cm}} @{\hskip 1cm} *{4}{>{\raggedleft\arraybackslash}m{1cm}} @{\hskip 1cm} *{4}{>{\raggedleft\arraybackslash}m{1cm}} }\hline      & \multicolumn{4}{c}{Alpha} & \multicolumn{4}{c}{Epsilon} & \multicolumn{4}{c}{Nu} \\ \cline{2-5}        Year &    Q1 &    Q2 &    Q3 &    Q4 &    Q1 &    Q2 &    Q3 &    Q4 &    Q1 &    Q2 &    Q3 &    Q4\\ \hline        1994 &    0.33 &    0.49 &    0.64 &    1.00 &    2.04 &     4.25 &      9.28 &     29.77 &    0.68 &    0.92 &    1.22 &    1.77\\        1995 &    0.35 &    0.50 &    0.67 &    1.00 &    1.96 &     3.91 &      8.32 &     29.21 &    0.66 &    0.93 &    1.23 &    1.82\\        1996 &    0.34 &    0.49 &    0.64 &    1.00 &    2.01 &     4.56 &     10.55 &     33.16 &    0.66 &    0.94 &    1.24 &    1.83\\     \hline     \end{tabular*}     \end{sidewaystable}     \end{document}


title: matlab2tikz imagesc TikZ/pgfplots equivalent

text: I'm using `matlab2tikz` to export `imagesc` figures into `TikZ`/`pgfplots` code. This process gives me a `TikZ` file and a rasterized png version of the image with colours matching the colourbar at the time of execution. The file produced by `matlab2tikz` is as follows:               \begin{tikzpicture}       \begin{axis}[         axis on top,         xmin=75,         xmax=575,         xlabel={$x$},         y dir=reverse,         ymin=-0.045,         ymax=0.955,         ylabel={$y$},         colorbar,         point meta min=0,         point meta max=80000000]            \addplot graphics [xmin=75,xmax=575,ymin=-0.045,ymax=0.955] {p.png};       \end{axis}     \end{tikzpicture}%      The problem is that because I'm doing this for multiple figures, I need to be able to switch the colourbar upper and lower bounds. Therefore, the rasterized png images do not match the modified colourbar. The output I'd like to get is: ![enter image description here](http://i.stack.imgur.com/NcWAy.png) I was wondering whether it is possible to produce the exact same figure (ticks centered on the square etc.) with `TikZ`/`pgfplots`, while retaining the ability to change the colour of each square to match the colourbar --- ideally, the colour will be determined by the value loaded from a text file and the colourbar ranges. **Edit:** Sample data can be found here. First two columns are the x and y axes and the fourth column (or third) will be what decides the colour of the square.


title: How can I set the part name and title on the same line?

text: How can I set part name and title on the same line. Now (at default) , the Part number is at one line, and the name of part is one line below... For example, instead of > **PART I   >  This is my title** I want > **PART I   This is my title** Here is a simple code:               % Preview source code          %% LyX 2.0.5.1 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{article}     \renewcommand{\familydefault}{\rmdefault}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{babel}     \begin{document}          \part{why this line is one line down?}          How can I make the the name of part one will be at the same line at     the PDF output.     \end{document}      * * * Edit: Here is my document preamble:               % Preview source code          %% LyX 2.0.5.1 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english,hebrew]{article}     \renewcommand{\familydefault}{\rmdefault}     \usepackage[T1]{fontenc}     \usepackage[cp1255]{inputenc}     \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=3cm}     \setlength{\parindent}{0bp}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage[all]{xy}     \PassOptionsToPackage{normalem}{ulem}     \usepackage{ulem}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.     \usepackage{theorem}     \theorembodyfont{\upshape}     \newtheorem{theorem}{\R{משפט}}[section]     \AtBeginDocument{\make@lr\thetheorem}     \newenvironment{proof}%     {\R{\textbf{הוכחה:}}}%     {\hfill\rule{2mm}{2mm}\par\vspace{2mm}}     \newtheorem{claim}[theorem]{\R{טענה}}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{cancel}     \usepackage{pifont}     \usepackage{keystroke}     \usepackage{bbding}     \makeatletter     \newcommand{\xyR}[1]{%     \makeatletter     \xydef@\xymatrixrowsep@{#1}     \makeatother     } % end of \xyR     \makeatletter     \newcommand{\xyC}[1]{%     \makeatletter     \xydef@\xymatrixcolsep@{#1}     \makeatother     } % end of \xyC     \def\thepart{\alph{part}}     \usepackage{etoolbox}% http://ctan.org/pkg/etoolbox     \makeatletter     % \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}     \patchcmd{\@part}{\par}{\quad}{}{}     \patchcmd{\@part}{\Large}{\huge}{}{}     \makeatother          \makeatother          \usepackage{babel}     \begin{document}      When I adding the code above to this, it's doesn't work... * * * Here is my document preamble:               % Preview source code          %% LyX 2.0.5.1 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english,hebrew]{article}     \renewcommand{\familydefault}{\rmdefault}     \usepackage[T1]{fontenc}     \usepackage[cp1255]{inputenc}     \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=3cm}     \setlength{\parindent}{0bp}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage[all]{xy}     \PassOptionsToPackage{normalem}{ulem}     \usepackage{ulem}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.     \usepackage{theorem}     \theorembodyfont{\upshape}     \newtheorem{theorem}{\R{משפט}}[section]     \AtBeginDocument{\make@lr\thetheorem}     \newenvironment{proof}%     {\R{\textbf{הוכחה:}}}%     {\hfill\rule{2mm}{2mm}\par\vspace{2mm}}     \newtheorem{claim}[theorem]{\R{טענה}}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{cancel}     \usepackage{pifont}     \usepackage{keystroke}     \usepackage{bbding}     \makeatletter     \newcommand{\xyR}[1]{%     \makeatletter     \xydef@\xymatrixrowsep@{#1}     \makeatother     } % end of \xyR     \makeatletter     \newcommand{\xyC}[1]{%     \makeatletter     \xydef@\xymatrixcolsep@{#1}     \makeatother     } % end of \xyC     \def\thepart{\alph{part}}     \usepackage{etoolbox}% http://ctan.org/pkg/etoolbox     \makeatletter     % \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}     \patchcmd{\@part}{\par}{\quad}{}{}     \patchcmd{\@part}{\Large}{\huge}{}{}     \makeatother          \makeatother          \usepackage{babel}     \begin{document}      When I adding the code above to this, it's doesn't work...


title: Useful shortcuts or key bindings or predefined commands for emacs+AUCTeX

text: On of the problems I've encountered with `emacs` in general, and with the defaults key bindings in particular, is the _diversity_. There are simply so many of them, that sometimes, at the end of the day, you simple don't know that you should look for something which is already there. Are you aware of a place where these can be found? I'm not referring to a listing of _all_ possible key bindings etc. (which can probably be found in AUCTeX documentation), rather then sort of the top 10-20-50 or so. If something like this is not around, maybe having a wiki here would be a nice idea. Well... Now its your turn...


title: TikZ: add "alt tag/caption/invisible text" for accessibility

text: I'm using this amazing tex.sx answer tikz star macro for rendering a x-out- of-y stars graphic for my skills on my resumé. The resume is done with xelatex and exported to pdf. Because it is a resumé, I'm concerned about it being machine readable. Is there any way to add some alt tag/caption/label/invisible text to the output of the tikz, so it can be obtained when doing copy paste of the pdf? Also, related question: Is there something like blind friendly latex? I tried \pdftooltip from the \pdfcomment package, but didn't work out.


title: Can i automatically load chapters and sections based on the filesystem?

text: I was interested in knowing if i can load chapters and sections of my book based on the filesystem. For example:               Chapter 1/       Section 1.tex       Section 2.tex       Section 3.tex     Chapter 2/       Section 1.tex       Section 2.tex     Chapter 3/       Section 1.tex       Section 2.tex       Section 3.tex      I'm using scrbook.


title: Autocomplete current environment

text: Is there a keyboard shortcut in TeXnicCenter to complete the current environment? In other words, it should add the appropriate `\end{....}`.