title: Automatic hyphenation in verbatim text, with guidance

text: I would like to typeset verbatim text that can have linebreaks on certain text points. I know that `spverbatim` and `listings` can break at spaces, but sometimes this is not enough. Of course, no hyphenation engine can figure out hyphenation points within obscure commands of some programming language, so I am willing to guide the engine with possible break points, say `\?-`. Linebreaks at these break points would need a special hyphenation character, so the reader sees that this is not a break at some space. A picture is worth a thousand words: ![enter image description here](http://i.stack.imgur.com/VdWpC.png) I am pretty sure I have seen something like that in TeXy looking texts. **Is there a way to implement such a`\magicverb`?** (Or is it already implemented somewhere?) Code for the pic:               \documentclass{article}     \usepackage[margin=1cm]{geometry}     \usepackage[T1]{fontenc}          \usepackage{tabularx}     \usepackage{booktabs}     \usepackage{spverbatim}     \usepackage{listings}     \lstset{language=[LaTeX]TeX,aboveskip=-\ht\strutbox,belowskip=-\ht\strutbox}          \usepackage{dingbat}     \usepackage{etoolbox}     \makeatletter     \preto{\@verbatim}{\topsep=0pt \partopsep=0pt }     \makeatother     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}     \begingroup     \small     \centering     \begin{tabular}{>{\raggedright\arraybackslash}p{10.8cm}|>{\raggedright\arraybackslash}p{3cm}|}       approach & output \\       \midrule       \verb!\spverb{|\fontfamily{LinuxLibertineO-OsF} \selectfont|}!        & \spverb|\fontfamily{LinuxLibertineO-OsF} \selectfont|       \\       \addlinespace     \begin{verbatim}     \begin{lstlisting}[breaklines]     \fontfamily{LinuxLibertineO-OsF} \selectfont     \end{lstlisting}     \end{verbatim}      &      \begin{lstlisting}[breaklines]     \fontfamily{LinuxLibertineO-OsF} \selectfont     \end{lstlisting} \\     \addlinespace     \begin{verbatim}     \magicverb{\fontfamily{Linux\?-LibertineO-\?-OsF} \select\?-font}     \end{verbatim}      & \texttt{\textbackslash{}fontfamily\{Linux\carriagereturn{}\hspace{0pt}LibertineO-\carriagereturn{}\hspace{0pt}OsF\}\textbackslash{}select\-font}     \end{tabular}     \endgroup          \bigskip     \noindent{}Of course the last output was faked with     \begin{spverbatim}     \texttt{\textbackslash{}fontfamily\{Linux\carriagereturn{}     \hspace{0pt}LibertineO-\carriagereturn{}     \hspace{0pt}OsF\}\textbackslash{}select\-font}     \end{spverbatim}          \end{document}


title: Clickable hyperlink with \overset and XeLaTeX

text: I would like my document to have clickable hyperlinks inside `\overset` environments. I'm using XeLaTeX because of the fonts… This is a (rather) minimal example:               \documentclass[a4paper, 12pt]{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage[xetex, colorlinks=true, citecolor=blue, linkcolor=blue]{hyperref}          \begin{document}          \begin{equation}         a = b \label{eq} \tag{$\ast$}     \end{equation}          \[ \eqref{eq} \] % working hyperlink here.          \[ c = a \overset{\eqref{eq}}{=} b \] % existing but non-clickable hyperlink here.          \end{document}      Any help is greatly appreciated!


title: path with both mark connection node and arrow tip

text: I would like to use a `mark connection node` decoration on a line that also has an arrow tip. Unfortunately, using the decoration causes the arrow tip to point in the wrong direction (always straight up). For example:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}          \begin{document}     \begin{tikzpicture}       \node (A) at (0, 0) {A} ;       \node (B) at (3, 0) {B} ;       \draw [->, decorate, decoration={         markings,         mark connection node=label,         mark=at position .5 with {           \node (label) {label};         },       }]       (A) -- (B)       ;     \end{tikzpicture}     \end{document}      ![output showing incorrect arrow tip direction](http://i.stack.imgur.com/fq4OY.png) Notice the arrow tip, just to the left of node B, pointing up instead of to the right. The Tikz documentation mentions that “the decoration usually destroys the path. However, this is no longer the case when the [`mark connection node`] key is set.” If the path is not being destroyed, then why is the arrow tip oriented incorrectly? Is there any way to get arrow tips and `mark connection node` to coexist on the same path?


title: How can I import a picture of the format graphml into LaTeX?

text: I have to import a picture into LaTeX which is in the format `graphml` created using yEd. I would like to avoid converting it in a .pdf since then LaTeX would import the whole A4 page. Could you help me?


title: Which : \only or \onslide ? (Beamer)

text: In `beamer` v3.0 guide (slide 121) , I've found: > In case of subtle differences in the heights of replacements, `overlayarea` > and `overprint` environments can be used. But it's not clear to me. What are differences between `\only` and `\onslide` in Beamer ? How to decide, which to choose in particular case?


title: How to force section to not go to new page in article

text: I have a document like this:               \documentclass{article}          \begin{document}     \include{sect1}     \include{sect2}     \end{document}      Both files sect1.tex and sect2.tex begin with `\section{...}`. The output pdf file displays _section 1_ and _section 2_ on two different pages even though _section 1_ only occupies about 10 lines in the first page. Is there any way I can force _section 2_ to start right after _section 1_ one the same page?


title: How to load pstricks private header files under MiKTeX?

text: Under MikTeX, the method to load private header files containing custom postscript macros seems to have changed. What is the current preferred method for including such macros? For years I have included a private header file (mypstrix.pro) in my postscript documents. A minimal example of such a file is included below. This was loaded into the output postscript file by adding the following two lines to the file pstricks.con. Actually, uncommenting the first and adding the second to a **copy** of pstricks.con located in my private root.               \pstcustomize       \pstheader{mypstrix.pro}      Now the command chain: `latex -- dvips` would generate a postscript file with an embedded copy of mypstrix.pro. This has worked seamlessly for at least 9 years but stopped working late last week. I have asked a similar question in the PSTricks mailing list and the response I got suggested that this is probably a MikTeX issue. I'm using version MikTeX 2.9 with all packages up-to-date.               %% Begin mypstrix.pro %%       %!       % My own PostScript prologue for pstricks.tex. (Set flag in pstricks.con to use.)       % Version 2004       %       userdict begin %       /natBase {ENeperian} def %       /avg@ab {add 2 div} def % (a+b)/2       /dist@ab {sub abs} def % |a-b|       %%Hyperbolics       /sinh@t {dup natBase exch exp exch neg natBase exch exp sub 2 div} def %       end       %       %% End mypstrix.pro %%


title: attachfile does not work inside captions

text: In the caption of some figures I want to link to files using the attachfile2 package. But when I try to compile the following example with XeTeX, MiKTeX and TeXstudio I get the warning `** WARNING ** Unresolved object reference "atfi_obj_6" found!!!` for the first one and `some.pdf` isn't included. `another.pdf` is included in the resulting document, but twice. Does anyone have an idea how to fix this?               \documentclass{article}     \usepackage{caption}     \usepackage{attachfile2}     \usepackage{hyperref}          \begin{document}         \listoffigures         \begin{figure}             \caption[Custom Name]{Some Figure \textattachfile{some.pdf}{Link}}         \end{figure}              \begin{figure}             \caption{Another Figure \textattachfile{another.pdf}{Link}}         \end{figure}     \end{document}      The same problem appears for both figures if there is no `\listoffigures` at the beginning. **EDIT** I forgot to mention that I had a look at the `*.atfi` which contains checksums of the attached files or their paths as far as I understand. The checksums when using attachfile inside a caption (doesn't work) and when using outside a caption (works fine) are the same, so maybe there is some kind of timing problem? **EDIT 2** Based on Herberts answer I made up an command that leads to captions which look more like the default ones and entries in the list of figures that look like the default ones.               \documentclass{article}     \usepackage{caption}     \usepackage{attachfile2}          \def\mycaption#1#2#3{{\par\centering\refstepcounter{figure}%         \figurename\ \thefigure: #1 \textattachfile{#2}{#3}\par}%         \addcontentsline{lof}{figure}{\protect\numberline {\thefigure}{\ignorespaces #1}}}          \begin{document}         \listoffigures              \begin{figure}             \mycaption{Some Figure}{some.pdf}{Link1}                \end{figure}         \begin{figure}             \caption[Some Figure]{Some Figure}         \end{figure}          \end{document}      This results in the following entries in the `*.lof` file, so changes to the style of the list of figures should also apply to the entry produced by this command (I think so because they nearly look the same):               \contentsline {figure}{\numberline {1}{\ignorespaces Some Figure}}{1}{figure.1}     \contentsline {figure}{\numberline {2}{\ignorespaces Some Figure}}{1}{figure.caption.3}      The downside of this solution is that I have to define my custom caption style in two places (I didn't mention that because it wasn't necessary to reproduce my problem). So I would appreciate a solution which uses the default `\caption`-command. But for now this one does the job.


title: How to design and place different things in LaTeX?

text: Is it possible to design something in Scribus and then convert the Scribus document to an .tex-file? That would be nice. In Scribus (free alternative to InDesign and Quarkexpress) you can see your result as you work with it - that makes it faster (for me) to make nice layouts. But I prefer LaTeX. So is it possible to work in Scribus and then use magic to make a .tex-file?


title: Space after \textquotedblright

text: I am trying to put a text in "" using `\textquotedblleft` and `\textquotedblright`. It works perfectly fine except it does not put ANY space after `\textquotedblright`. In other words, `BEFORE \textquotedblleft TEXT \textquotedblright AFTER` comes out as BEFORE "TEXT"AFTER. Is there any way to fix it? One obvious way is using `BEFORE \textquotedblleft TEXT \textquotedblright \ AFTER`. I was wondering if there is any better way to fix this. Thanks


title: Package minted: \mint Command Not Working Inside tabularx Environment

text: The question, How to embed a minted environment inside a tabular environment?, addresses a similar issue, but I am using:   1. the `tabularx` package, and   2. the inline `\mint` command Is there a workaround available for this?               \documentclass[10pt]{article}     \usepackage[scaled]{beramono}     \usepackage[T1]{fontenc}     \usepackage{tabularx}     \usepackage{booktabs}     \usepackage{minted}               \begin{document}          \begin{tabularx}{\linewidth}{@{}lrX}          Type & Meaning & Size \\     \cmidrule(r){1-1} \cmidrule(lr){2-2} \cmidrule(lr){3-3}          \mint{c++}|float| & single precision floating point  & 6 significant digits \\                 &               & Typically represented in 32 bits \\             \mint{c++}|double| & double precision floating point  & 10 significant digits \\                 &               & Typically represented in 64 bits \\          \mint{c++}|long double| & extended precision floating point  & 10 significant digits \\                 &               & Typically represented in 96 or 128 bits \\                  \bottomrule                                                               \end{tabularx}                        \end{document}


title: using mathml in htlatex makes it lose the table p-width specification in generated html

text: It took me a while to find the cause of this. when giving `p{}` for table column width, and also using `mathml` option, then htlatex losses the width specs in the generated HTML table. It is very simple to reproduce. Below is the .tex files and the commands, and the HTML output. I need to use `mathml` since I am using mathjax in htlatex configuration to render the Latex math on the screen. Without using `mathml` then mathjax does not work. So this is a big problem because now all the tables I have where I specified width of columns are lost in the HTML version. Minimal working latex file               \documentclass{article}%     \begin{document}      \begin{tabular}{|p{3in}|p{1in}|p{1in}|}\hline        blablablaaablabla&blablablaaablabla&blablablaaablabla        \\\hline     \end{tabular}     \end{document}      This command works               htlatex index.tex "htm,p-width"      ![enter image description here](http://i.stack.imgur.com/pyFlm.jpg) This command does _not_ work               htlatex index.tex "htm,mathml,p-width"      ![enter image description here](http://i.stack.imgur.com/sygYP.jpg) The "p-width" option is important. See this for reference on it. it was added by Eitan in 2004 to support column widths in HTML. Again, I have to use mathml, and I also need to have tables of fixed width columns, or be able to specify the column width. Now I can't do both if I am to use MathJax with htlatx generated HTML. Any one knows of a work around please? TL 2012 debian package. ps. I actually would rather not use Mathjax, but without it, the generated math using .png does not look as good, and I have not figured out how to make it look better. So, may be I should spend more time on this. If I can get htlatex to generated good math using .png images, then I do not have to use Mathjax, and do not have to use the `mathml` option and the problem will be gone.


title: wrapping long python arrays in listings package

text: **NOTE** I have tried the following answer to a similar question , but it doesn't work: lstlisting line wrapping My problem is trying to put the following code in latex:               import matplotlib.pyplot as plt     import numpy as np          t=[0,30,60,1*60+30,2*60,2*60+30,3*60,3*60+30,4*60,4*60+30,5*60,5*60+30,6*60,6*60+30,7*60,7*60+30,8*60,8*60+30,9*60,9*60+30,10*60]          tai=[40.1,40.1,40.1,40.2,40.3,40.5,40.5,40.6,40.7,40.8,41.0,41.0,41.0,41.0,41.0,41.0,41.0,41.1,41.2,41.2,41.2]          tao=[26.4,26.4,26.4,26.4,26.3,26.3,26.3,26.3,26.2,26.1,26.2,26.1,26.1,26.1,26.1,26.0,26.0,26.0,26.0,26.0,26.0]          twi=[25.7,25.7,25.6,25.5,25.5,25.5,25.5,25.4,25.4,25.4,25.4,25.0,25.0,25.0,25.0,25.0,25.0,25.0,25.1,25.1,25.1]          two=[33.2,32.7,32.4,32.1,31.8,31.7,31.4,31.2,31.0,30.8,30.9,30.8,30.7,30.7,30.6,30.6,30.6,30.4,30.5,30.5,30.4]               ## this part of code by Joe Kington###########################     ax = plt.subplot(111)      fig = plt.figure()     ax = plt.subplot(111)          ax.plot(t,tai,'--',label="air in")     ax.plot(t,tao,'o-',label="air out")     ax.plot(t,twi,label="water in")     ax.plot(t,two,'*-',label="water out")     box= ax.get_position()     ax.set_position([box.x0, box.y0, box.width * 0.8, box.height])          # Put a legend to the right of the current axis     ax.legend(loc='center left', bbox_to_anchor=(1, 0.5))     plt.xlabel('Time in seconds')     plt.ylabel('Temperature in $^{o}C$')     #plt.show()     ######## End of code by Joe Kington #############################               print " \t The Averages \t"     print "The average of the temperature of inflow of air is %f \n"  %(np.mean(tai))          print "The average of the temperature of outflow of air is %f \n"  %(np.mean(tao))          print "The average of the temperature of inflow of water is %f \n"  %(np.mean(twi))          print "The average of the temperature of outflow of water is %f \n"  %(np.mean(two))      but like I said even putting in the option `breaklines=True` isn't helping. **Question** Is there any way to solve this problem via Latex directly and not via an indirect way?


title: Tikz flow chart questions?

text: I am totally new to the package tikz but I am going to make a flow chart for my poster. I used the template provided by this link I just modify some parts I can understand and the source code is                               % Author: Rasmus Pank Roulund         \documentclass{minimal}         \usepackage{tikz}         \usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%                 decorations.pathreplacing,decorations.pathmorphing,shapes,%                 matrix,shapes.symbols}              \tikzset{         >=stealth',             punktchain/.style={                 rectangle,                  rounded corners,                  % fill=black!10,                 draw=black, very thick,                 text width=10em,                  minimum height=3em,                  text centered,                  on chain},             line/.style={draw, thick, <-},             element/.style={                 tape,                 top color=white,                 bottom color=blue!50!black!60!,                 minimum width=8em,                 draw=blue!40!black!90, very thick,                 text width=10em,                  minimum height=3.5em,                  text centered,                  on chain},             every join/.style={->, thick,shorten >=1pt},             decoration={brace},             tuborg/.style={decorate},             tubnode/.style={midway, right=2pt},         }         \begin{document}         \begin{tikzpicture}             [node distance=.8cm,             start chain=going below,]                  \node[punktchain, join] (intro) {Raw Signal};                  \node[punktchain, join] (probf)      {Pre-pro1};                  \node[punktchain, join] (investeringer)      {pre-pro2};                  \node[punktchain, join] (perfekt) {feature extract};                  \node[punktchain, join, ] (emperi) {model fitting};            \node[punktchain, join,] (disk) {training};             \node[punktchain, join,] (makro) {testing};             \node (asym) [punktchain ]  {Abnormal};                          \begin{scope}[start branch=venstre,                         %We need to redefine the join-style to have the -> turn out right                         every join/.style={-, thick, shorten <=1pt}, ]                     \end{scope}                     \begin{scope}[start branch=hoejre,]                     \node (finans) [punktchain, on chain=going right] {Normal };                  \end{scope}                  % Now that we have finished the main figure let us add some "after-drawings"             %% First, let us connect (finans) with (disk). We want it to have             %% square corners.             %\draw[|-,-|,->, thick,] (finans.south) |-+(0,-1em)-| (disk.north);             % Now, let us add some braches.              %% No. 1                  %% No. 2             \draw[tuborg, decoration={brace}] let \p1=(disk.north), \p2=(makro.south) in                 ($(2, \y1)$) -- ($(2, \y2)$) node[tubnode] {Classification};             %% No. 3             \draw[tuborg, decoration={brace}] let \p1=(perfekt.north), \p2=(emperi.south) in                 ($(2, \y1)$) -- ($(2, \y2)$) node[tubnode] {Feature Selection};                 \draw[tuborg, decoration={brace}] let \p1=(probf.north), \p2=(investeringer.south) in                 ($(2, \y1)$) -- ($(2, \y2)$) node[tubnode] {Data Preprocessing};                  \end{tikzpicture}         \end{document}         %%% Local Variables:          %%% mode: latex         %%% TeX-master: t         %%% End:       And the output is ![enter image description here](http://i.stack.imgur.com/rdStS.jpg) Here are something I would like;   1. Centered the two boxes (normal) (abnormal)   2. Arrows from the upper boxes to (normal) and (abnormal)   3. Place box (training) and (testing) horizontally without arrow.   4. Other suggestions make it look professional: like color ... I draw a picture by hands to make my idea clear. Thanks. ![enter image description here](http://i.stack.imgur.com/S7pwz.jpg)


title: Why caption becomes a subcaption in the following case?

text: \documentclass[a4paper]{article}          \usepackage{tabularx}         \usepackage{caption}         \usepackage{subcaption}         \newcolumntype{Y}{>{\footnotesize\raggedleft\arraybackslash}X}         \setlength{\tabcolsep}{0pt}         \usepackage{booktabs}              \begin{document}                    \bigskip          \noindent               \begin{table}\begin{tabularx}{\textwidth}{YYYYYYYYYYYYY}     \toprule     $10^{-2}$ & 5373 & 4248 & 3137 & 2029 & 996 & 651 & 488 & 455 & 481 & 575 & 659 & 491 \\      (m) & 378 & 299 & 221 & 143 & 70 & 46 & 34 & 32 & 34 & 40 & 46 & 35 \\\midrule     $10^{-5}$ & --- & --- & 93712 & 59616 & 25353 & 9737 & 19597 & 37621 & 55079 & 72379 & 90438 & 84164 \\      (m) & & & 6591 & 4193 & 1783 & 685 & 1378 & 2646 & 3874 & 5091 & 6361 & 5920 \\\midrule     $10^{-8}$ & --- & --- & --- & --- & --- & 34076 & 69287 & --- & --- & --- & --- & ---\\      (m) & & & & & & 2397 & 4873 & & & & & \\\bottomrule     \end{tabularx}     \subcaption{a}                \begin{tabularx}{\textwidth}{YYYYYYYYYYYYY}     \toprule     $10^{-2}$ & 5373 & 4248 & 3137 & 2029 & 996 & 651 & 488 & 455 & 481 & 575 & 659 & 491 \\      (m) & 378 & 299 & 221 & 143 & 70 & 46 & 34 & 32 & 34 & 40 & 46 & 35 \\\midrule     $10^{-5}$ & --- & --- & 93712 & 59616 & 25353 & 9737 & 19597 & 37621 & 55079 & 72379 & 90438 & 84164 \\      (m) & & & 6591 & 4193 & 1783 & 685 & 1378 & 2646 & 3874 & 5091 & 6361 & 5920 \\\midrule     $10^{-8}$ & --- & --- & --- & --- & --- & 34076 & 69287 & --- & --- & --- & --- & ---\\      (m) & & & & & & 2397 & 4873 & & & & & \\\bottomrule     \end{tabularx}         \subcaption{b}              \caption{why I am a subcaption.}         \end{table}         \bigskip         \end{document}


title: The package to visualize graphs

text: What could be the packages to use for visualization of graphs? I tried Graphviz, but it's very hard to direct how the graphs should be shown. How can I make the graphs represented as is shown in the examples (excerpt from Graph Theory and Complex Networks: An Introduction). ![enter imagGraph Theory and Complex Networks: An Introductione description here](http://i.stack.imgur.com/Cvsdp.png) ![enter image description here](http://i.stack.imgur.com/zt8nU.png) ![enter image description here](http://i.stack.imgur.com/vbrQ6.png)


title: Frames around few line of code in a algorithm

text: I want to put a box around lines of code and to add comments inside the box. This is what I want it to achieve: ![enter image description here](http://i.stack.imgur.com/Dogti.png) This is the example of code I am using for the algorithm.               \documentclass{article}     \usepackage[margin=1in]{geometry}% http://ctan.org/pkg/geometry     \usepackage{lipsum}% http://ctan.org/pkg/lipsum     \usepackage{algorithm}% http://ctan.org/pkg/algorithm     \usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx     \usepackage{subcaption}% http://ctan.org/pkg/subcaption     \captionsetup{compatibility=false}     \DeclareCaptionSubType*{algorithm}     \renewcommand\thesubalgorithm{\thetable\alph{subalgorithm}}     \DeclareCaptionLabelFormat{alglabel}{Alg.~#2}     \begin{document}     \begin{table}%     \begin{subalgorithm}{.5\textwidth}     \begin{algorithmic}[1]       \Procedure{Euclid}{$a,b$}%\Comment{The g.c.d. of a and b}         \State $r\gets a\bmod b$         \While{$r\not=0$}%\Comment{We have the answer if r is 0}           \State $a\gets b$           \State $b\gets r$           \State $r\gets a\bmod b$         \EndWhile         \State \textbf{return} $b$%\Comment{The gcd is b}       \EndProcedure     \end{algorithmic}     \caption{Euclid’s algorithm}\label{algo1}     \end{subalgorithm}%     \begin{subalgorithm}{.5\textwidth}     \begin{algorithmic}[1]       \Procedure{Euclid}{$a,b$}%\Comment{The g.c.d. of a and b}         \State $r\gets a\bmod b$         \While{$r\not=0$}%\Comment{We have the answer if r is 0}           \State $a\gets b$           \State $b\gets r$           \State $r\gets a\bmod b$         \EndWhile         \State \textbf{return} $b$%\Comment{The gcd is b}       \EndProcedure     \end{algorithmic}     \caption{Euclid’s algorithm}\label{algo2}     \end{subalgorithm}     \captionsetup{labelformat=alglabel}     \caption{Two algorithms}%     \label{tab:1}%     \end{table}     \end{document}


title: How to put algorithm and figure side by side in two column document?

text: I want to put two figures and an algorithm side by side in a two-column document, and the figures and the algorithm should span two columns. I have surveyed previously asked questions such as How to put algorithm and figure(s) side by side? and How to put two figures side by side in a two- column document do not answer my question. The following is a MWE, which includes templates for figures and alorithm that I use. If you are trying to run the code, please re-name whatever `eps` figures you get to `xx.esp` and `yy.eps` in the same directory with the following document.               \documentclass[conference]{IEEEtran}          \usepackage[ruled]{algorithm}     \usepackage{algpseudocode}     %\usepackage{subfigure}     \usepackage{graphicx}     \usepackage{times}     \usepackage{amssymb}     \usepackage{url}     \usepackage{hyperref}     \usepackage{amsmath}     \usepackage{multirow}          \usepackage{graphicx}          \usepackage{setspace}     \usepackage{wrapfig}     \begin{document}          \title{xxx}               \maketitle               \begin{figure*}[!t]       \centering       \begin{minipage}[htp]{0.32\textwidth}         \centering         \includegraphics[width=1\textwidth]{xx.eps}         \vspace{-0.4cm}%         \caption{THis is figure xx}\label{fig:xx}       \end{minipage}       \begin{minipage}[htp]{0.32\textwidth}         \centering         \includegraphics[width=1\textwidth]{yy.eps}         \vspace{-0.4cm}%         \caption{This is figure yy.}\label{fig:yy}       \end{minipage}       \vspace{-0.6cm}%     \end{figure*}                    \vspace{-0.2cm}%     \alglanguage{pseudocode}     \begin{algorithm}[h]     \small     \caption{\small Insert item into Hash Table (with mCBF and aCBF)}     \label{Algorithm:insert_mCBF_aCBF}     \begin{algorithmic}[1]     \Procedure{$\mathbf{InsertItem}$}{item $x$}         \For {$i = 1 \to k$}                 \State $mCBF.C_{f_i(x)\%N}$ ++         \EndFor         \State $C_{min} = MAX\_VALUE$         %\Comment{Get minimum value of $k$ counters in mCBF}         \For {$i = 1 \to k$}             \If {$C_{min} > mCBF.C_{f_i(x)\%N}$}                 \State $C_{min} \gets mCBF.C_{f_i(x)\%N}$                 \State $j \gets f_i(x)\%N$                 \State $m \gets i$             \EndIf         \EndFor         %\State $C_{min} = min\{mCBF.C_{f_1(x)\%N},\cdot\cdot\cdot,mCBF.C_{f_k(x)\%N}\}$         %\State $i = \textbf{SubscriptOf}(C_{min})$         \State $B_j = B_j \cup x$         \Comment \emph{Insert $x$ into $B_j$}         \For {$i = 1 \to k$}                 \State $aCBF_m.C_{f_i(x)\%\textbf{LengthOf}(aCBF_m)}$ ++         \EndFor     \EndProcedure     \Statex     \end{algorithmic}       \vspace{-0.4cm}%     \end{algorithm}               \end{document}      I know that the asterisk (*) is meant to make the figures span two colums, but the inside `minipage` does not allow me to add the `algorithm`. Moreover, even if the `minipage` allows, the `algorithm` would be in a `figure` environment, which would conflict. Please help. Edit: I upload a picture that shows what I want looks like. The two figures and the algorithm are in the same line, but span two columns. ![enter image description here](http://i.stack.imgur.com/LIGJd.png)


title: Why does a negative after skip in \@startsection go weird if you fiddle with the everypar hook?

text: So, I'm trying to answer this question: Extended draft mode which includes source information for manual print-out to source synchronisation and I've run into a weird problem. Check out this example:               \documentclass{article}     \usepackage{everyhook,marginnote}     \newif\ifnotmarginhook     \notmarginhooktrue     \PushPreHook{par}{%       \ifnotmarginhook       \notmarginhookfalse       \smash{\marginnote{\small\ttfamily\the\inputlineno}}       \notmarginhooktrue       \fi     }     \makeatletter     % \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%     %                                     {3.25ex \@plus1ex \@minus.2ex}%     %                                     {1em}%     %                                     {\normalfont\normalsize\bfseries}}     \makeatother     \begin{document}          \section{This works}          Here is some text and it will go on and on     Here is some text and it will go on and on     Here is some text and it will go on and on          \subsection{This too}          Here is some text and it will go on and on     Here is some text and it will go on and on     Here is some text and it will go on and on          \paragraph{Broken!}          Here is some text and it will go on and on     Here is some text and it will go on and on     Here is some text and it will go on and on          \end{document}      ![broken!](http://i.stack.imgur.com/eJlHo.png) If you change the definition of `\paragraph` to have a positive value for afterskip (as in the commented out redefinition) then everything is fine. What is going on and how do I fix it? It looks like something is messing with boxes, but I don't understand what... It looks like there's some funny business going on: my guess is that the negative skip means that TeX does `\rlap` of the paragraph name, measures the text of the paragraph title, then puts that much space at the start of a noindent paragraph plus the afterskip amount. Is something like that going on? How can I stop it overlapping?


title: Set the "font-weight: lighter/ bolder"

text: I need to know how to set the "font-weight: lighter/ bolder" > font-weight: lighter/ bolder               \documentclass{article}      \usepackage{fontspec}     \begin{document}      \font\ta="Times New Roman":color=ff0000 at 10pt     \font\tenrm = cmr17 at 10pt          \font\scra="Charis SIL/m" at 12pt     \font\scrb="Charis SIL/b" at 12pt     \font\scrc="Charis SIL/bx" at 12pt     \font\scrd="Charis SIL/sb" at 12pt     \font\scre="Charis SIL/c" at 12pt               \font\scrTa="Times New Roman/m" at 12pt     \font\scrTb="Times New Roman/b" at 12pt     \font\scrTc="Times New Roman/bx" at 12pt     \font\scrTd="Times New Roman/sb" at 12pt     \font\scrTe="Times New Roman/c" at 12pt               \ta{font-weight: lighter/ bolder }          m Medium     b Bold     bx Bold extended     sb Semi-bold     c Condensed          \scra{am Medium}     \scrb{ab Bold}     \scrc{abx Bold extended}     \scrd{asb Semi-bold}     \scre{ac Condensed}               \scrTa{am Medium}     \scrTb{ab Bold}     \scrTc{abx Bold extended}     \scrTd{asb Semi-bold}     \scrTe{ac Condensed}               \afseries{ultralight}     \lfseries{light}     \sfseries{semibold}     \bfseries{bold}     \cfseries{black}     \xfseries{extra black}          \afseries ultralight     \lfseries light     \sfseries semibold     \bfseries bold     \cfseries black     \xfseries extra black          \tenrm{T1 classT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clasT1 clas }          \end{document}      Please help me. Thanks


title: Warning with Beamer in French

text: Whenever I create a presentation document with Beamer in French, the following warning comes up on the `\begin{document}` command:               Package frenchb.ldf Warning: Setting StandardEnumerateEnv=true for     (frenchb.ldf)                compatibility with enumerate package,     (frenchb.ldf)                 on input line 7.      Here is a minimal example:               \documentclass{beamer}          \usepackage[french]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \begin{document}     \frame{A}     \end{document}      What does this warning mean and how can I get rid of it?


title: Ditaa diagrams in TeX (LaTeX) document

text: I would like to make Diagrams in AsciiArt style. I've found Ditaa tool very usefull. I was happy to find, there is Eps output addoon for it. What the easiest, but clear and elegant way (following KISS principle) do you suggest to   * embed ditaa diagrams into Tex (LaTeX) documents? Makefile with eps->pdf conversion and than including such pdf. Keep asciiart diagrams separated or integrate it somehow with Tex/LaTex (for asciidoc, I've found it easy). I know it's more poweruser question, but related:   * Unfortunatelly, I can figure out how to make it working with newest ditaa 0.9 (it's distributed with ditaa 0.6b)  I am new to group, so please forgive (kindly remind, I can delete it) if question is not appropriate. I am Linux programmer, so command line, make, sed, awk and other tool can be combined.


title: Setting default overlay specification for itemize environment

text: # MWE               \documentclass{beamer}     \begin{document}     \begin{frame}     Some question ...          (a) Part a of question      \begin{itemize}[<+(1)->]       \item Step 1 of solution       \item Step 2 of solution     \end{itemize}          (b) Part b of question     \begin{itemize}[<+(1)->]       \item Step 1 of solution       \item Step 2 of solution     \end{itemize}     \end{frame}     \end{document}      # Question In Beamer, is there a way to make `[<+(1)->]` a default option for the `itemize` environment (and only this environment)? I would prefer not to use the `enumitem` package, for its compatibility issues with Beamer.


title: Adding a frame and background color to floats in ConTeXt

text: I am trying to decorate the floats in my thesis as follows:   * each float shall have a top/bottom frame in a custom color,   * the caption and content of each float are supposed to have the same background color. Basically, what I want it to look like is this: ![Float decorated with a frame and background color](http://i.stack.imgur.com/ApCrg.png) So far I've only managed to do this by embedding the float in a framed text like this:               \startframedtext[frame=off,topframe=on,bottomframe=on,framecolor=darkgray,background=color,backgroundcolor=lightgray]       \placefigure[here][figure:figure label]         {figure caption}         {figure content}     \stopframedtext      This works as long as the float is placed somewhere in the middle of a page. But as soon as they are the first element on a page, caption and content are moved out of the framed text and it looks a bit like this: ![Float decorated but content moved out of the frame](http://i.stack.imgur.com/CH5ag.png) I guess this has to do with the special way floats are placed by ConTeXt. Now, I wonder if there is a way to fix this. One way could be to not use floats at all and setup a custom enumerated environment with labels instead. Any ideas what else I could try? `\setupfloats` and `\setupcaptions` do have `before=`, `after=` and `inbetween=` options but I couldn't get them to create the desired decorations for me.


title: Remove space in empty node so that draw line is connected

text: I'm trying to remove the white space that appears between two lines as a result of going to an empty node. Specifically, I have a node drawing to the left of the empty node and then the empty node drawing to the a new full node. I've already used inner sep=0 and outer sep=0 on the node to reduce the empty gap. However,a small sliver still remains. I need to have the empty node there for space reasons. Image: ![empty location](http://i.stack.imgur.com/GuJVT.png) MWE:               \documentclass{article}     \usepackage{tikz}%pictures     \usetikzlibrary{shapes,arrows}     \begin{document}     \begin{tikzpicture}[auto,>=latex']          \tikzstyle{block} = [draw, shape=rectangle, minimum height=3em, minimum width=3em, node distance=2cm, line width=1pt]         \tikzstyle{sum} = [draw, shape=circle, node distance=1.5cm, line width=1pt, minimum width=1.25em]         \tikzstyle{connection}=[inner sep=0,outer sep=0]      %Creating Blocks and Connection Nodes     \node [block, right of=input] (h1) {$0.99$};      \node [right of=h1] (hsum) {};         \node [connection, right of=hsum] (cont) {};         \path (h1) -- coordinate (hmed) (h1);         %Connecting Blocks         \begin{scope}[line width=1pt]              \draw (input) -- (h1);\draw (h1) -- (cont);         \end{scope}      %Creating Blocks and Connection Nodes     \node [block, right of=cont] (m1) {$0.18$};\node [block, right of=m1] (m2) {$0.16$};      \node [right of=m2] (msum) {};         \node [connection, right of=msum] (output) {};         \path (m1) -- coordinate (mmed) (m2);         %Connecting Blocks         \begin{scope}[line width=1pt]              \draw (cont) -- (m1);\draw (m1) -- (m2);\draw (m2) -- (output);         \end{scope}      \end{tikzpicture}     \end{document}


title: pgfplots: plot line between two coordinates from file

text: I basically have a tab separate file with about 100 rows. In each row, there are three values: A, B, and C. I want to loop through each row in the data file, and plot a line between the coordinates: (A,B) and (A,C). The examples in the pgfplots documentation are unclear on how to do this. So for example, lets say I have the following data in a separate file: ## A, B, C 1, 2, 3   2, 2.5, 4 I want to take that file and loop through its rows, plotting separate lines in the process. In the first row, I want to plot a line from (1,2) to (1,3). In the second, a line from (2, 2.5) to (2, 4), and so on.


title: How to refine this tikz diagram?

text: I'm working on this diagram:               \documentclass[border=2mm]{standalone}     \usepackage{tikz}          \begin{document}         \begin{tikzpicture}             \clip (-0.1,-0.1) rectangle (5,3);             \draw[help lines,->] (0,0) -- (4.2,0);             \draw[help lines,->] (0,0) -- (0,3);% draw axis lines             \draw[gray,dashed] (0,2) -- (4.2,2); % draw asymptote             \draw[domain=0.1:4.6,very thick,red,->,samples=400] plot ({\x - 0.4},{1/(-\x) + 2} );% draw plot         \draw[help lines,->] (1,0) -- (1,1.2);         \draw[help lines,->] (2,0) -- (2,1.5);         \draw[help lines,->] (3,0) -- (3,1.65);         \draw[help lines,->] (4,0) -- (4,1.7);              % scale to fit marginfigure     \end{tikzpicture}     \end{document}      ![Asymptote drawing](http://i.stack.imgur.com/CHqkV.png) It gets the job done, more or less, but I'm wondering whether there's a cleaner or more elegant way to do it. Specifically, I'm wondering:   1. Is there a way to draw the curved line as a ray with an endpoint at (0,0)? The problem with drawing a demihyperbola and then clipping is that I want to label several points on that path (which is what the vertical arrows are for). I can't do that if I have to clip the diagram so closely.   2. Is there a way to describe the height of the vertical lines as relative to the curved plot (i.e., can I tell `tikz`, "Draw a vertical line, with an arrowhead, from (1,0) until it intersects the curved line")?


title: Table with 100 % width and vertical / horizontal alignment

text: I want to draw the following table in LaTeX. In the first column the text should be left aligned. The text in all other cells should be centered. The first problem occurs with D in the first row. If I write a `\centering` in front of `D`, I get a LaTeX error. The second problem is, that I want to vertically align the text in all cells but I don't know how. I have found a solution but it doesn't work if the width of the first column is specified.               \documentclass{article}     \usepackage{blindtext}     \usepackage{tabularx}          \begin{document}       \begin{tabularx}{\textwidth}{|p{4cm}|X|X|X|X|}         \hline                    & \centering A & \centering B & \centering C & D\\         \hline         \blindtext & 123 & 123 & 123 & 123\\         \hline       \end{tabularx}     \end{document}


title: reducing white space below tikz-qtree tree

text: I am including syntactic trees in my dissertation. Below each tree there is a tremendous amount of white space, which will cause the university's editorial office to scream and howl and moan, then ultimately to reject my dissertation until I fix it. How do I remove the superfluous white space below the tree? MWE:               \documentclass{article}     \usepackage{tikz-qtree,tikz-qtree-compat}     \usepackage{gb4e}     \tikzset{every tree node/.style={align=center, anchor=north}}     \begin{document}     The relevant structure in \ref{tree:opt-marker-verb-move} shows the necessary movement for the verb to precede the suffix. XP refers to some unknown structure to which the verb is drawn.          \begin{exe}     \ex     \leavevmode\vadjust{\vspace{-\baselineskip}}\newline %this command makes the example number line up with the top of the tree, rather than the bottom     \begin{tikzpicture}     \tikzset{every tree node/.style={align=center,anchor=north}}     \Tree [.XP \node(XP){};      [.\textsc{FocusP} =em      [.TP     [.vP {}      [.VP {}      [.V \node(VERB){puv}; ]      ] ] ] ] ]     \draw[->] (VERB) [in=-90,out=-90,looseness=1.5] to (XP);     \end{tikzpicture}\label{tree:opt-marker-verb-move}     \end{exe}          It is difficult to justify this verbal movement. First, we would have to identify a higher structure in a suitable relationship with the verb to motivate verbal movement. Then we would have to identify features to check that exist on both the new structure and the verb.     \end{document}


title: Change the name of a pdf bookmark

text: I have to put the table of contents into the table of contents. I do this with the following code. But the entry in the toc must have a roman section number and this section number appears in the toc of the pdf. Is there a way to add "II. Inhaltsverzeichnis" to the latex toc and "Inhaltsverzeichnis" to the pdf toc? In the pdf toc or bookmarks window I see:   * Abstract   * II. Inhaltsverzeichnis <-- Should be only Inhaltsverzeichnis   * Test The code:               \documentclass[12pt,a4paper]{scrartcl}     \usepackage[pdfpagelabels=true]{hyperref}     \begin{document}     % roman     \renewcommand{\thesection}{\Roman{section}}     \renewcommand{\theHsection}{\Roman{section}}     \section{Abstract}         Abstract.     % add toc to toc with section number     \renewcommand{\contentsname}{II. Inhaltsverzeichnis}     \addcontentsline{toc}{section}{II. Inhaltsverzeichnis}     \tableofcontents     % arabic and start with 1     \renewcommand{\thesection}{\arabic{section}}     \renewcommand{\theHsection}{\arabic{section}}     \setcounter{section}{0}     \section{Test}         Test.     \end{document}


title: Equation incl. number on the same line as theorem environment

text: I have this:               \begin{lemma}      \begin{equation}         L_b \circ L_a = L_{L_b(a)} \circ L_b.      \end{equation}     \end{lemma}      and I would like the equation to be on the same line as the lemma, with a number label.   Adding `\vspace{-\abovedisplayskip}` doesn't work.   How can it be solved?


title: How to define a macro to make a line of text red?

text: I'm looking for a way to make a new command that makes text on that and only that line red (or in another way clearly distinguishable). Like the % symbol comments out a line. Are commands that work like that at all possible. I want to make short comments that print and I don't want to have to open and close braces each time.


title: Using flowfram for creating several frames in landscape

text: How can I create the following frames in landscape, using `flowfram` package? The dashed lines should not be visible in the output; they are just drawn here to make the boundary of the frames clear. ![enter image description here](http://i.stack.imgur.com/q2PV3.jpg)


title: postscript code in psplot fails

text: the following code snippet doesn't work as expected               \documentclass{article}          \usepackage{pstricks,pst-plot}          \pagestyle{empty}     \thispagestyle{empty}          \begin{document}              \begin{pspicture}(10,10)                  \psplot{0}{10}{%             5 x le { x } if          }              \end{pspicture}          \end{document}      Especially with regard to the PostScript-code                5 x le { x } if      Simple postscripts without conditional executions or loops work fine. I have the sense that i might have to escape the curly braces, but escaping them with a slash doesn't work either. Maybe someone of you experts can me help to solve my little problem!? Let the wisdom be with you and best regards


title: pass a set of numbers to pgfplotsinvokeforeach <list>

text: Is it possible to pass a numeric set to the list argument of the `\pgfplotsinvokeforeach` command? I need something like this:               \newcommand{\a}{1,2,...,10}     \pgfplotsinvokeforeach{\a} {<...>}      Thank you


title: How to use the memoir package to make a custom title page

text: There's probably an easy way to do this, but how can I add a memoir title page style to an existing document? I have tried this code, but I still get the basic title page.               \documentclass[12pt,a4paper,twoside]{memoir}     \usepackage[T1]{fontenc}     \usepackage{geometry}     \usepackage{titlesec}  %needs recent version of »titlesec«     \usepackage{xcolor}               \newcommand*{\titleGM}{\begingroup% Gentle Madness     \drop = 0.1\textheight     \vspace*{\baselineskip}     \vfill     \hbox{%     \hspace*{0.2\textwidth}%     \rule{1pt}{\textheight}     \hspace*{0.05\textwidth}%     \parbox[b]{0.75\textwidth}{     \vbox{%     \vspace{\drop}     {\noindent\HUGE\bfseries Some\\[0.5\baselineskip]     Conundrums}\\[2\baselineskip]     {\Large\itshape Puzzles for the Mind}\\[4\baselineskip]     {\Large THE AUTHOR}\par     \vspace{0.5\textheight}     {\noindent The Publisher}\\[\baselineskip]     }% end of vbox     }% end of parbox     }% end of hbox     \vfill     \null     \endgroup}          \title{\Huge\textbf{ORTHODOX RULE OF PRAYER}}     \author{\Large\textbf{Father Thomas Moore, Michael Dykes}}     \date{\Large{\today}}          \begin{document}          \title{\Huge\textbf{ORTHODOX RULE OF PRAYER}}     \author{\Large\textbf{Father Thomas Moore, Michael Dykes}}     \date{\Large{\today}}          Towards evening, we stand before the holy icons (having lit a candle and        maybe some incense), with reverence and fear of God; we gather our thoughts, make the        Sign of the Cross, and say:          \end{document}      Thanks!!!


title: Display urls in the reference section

text: I want to know how I can display a url to a site as reference in LaTeX. I need to have them at the end so that I can cite them from the other pages.


title: Conflict between the packages titlesec and marginnote

text: In the following code, the use of the package `titlesec` modifies dramatically the formatting based on the package `marginnote`. The package `titlesec` is needed so as to use this. Is there one possibility to repair that ?               \documentclass[12pt]{article}         %\usepackage{titlesec} % << Uncomment to see the changes... >>         \usepackage{marginnote}         \usepackage{tikz}              \reversemarginpar % To put the margin pars on the left         \renewcommand*{\marginfont}{\sffamily\normalsize}              \usetikzlibrary{calc}         \usetikzlibrary{backgrounds}              \definecolor{colorDateGene}{RGB}{230,120,120}         \definecolor{colorDateToday}{RGB}{230,230,230}              \newcommand*{\Date}[4]{%             \begin{tikzpicture}[                 show background rectangle,                 inner frame sep=0pt,                 text width=1cm,                 align=center             ]                 \node [fill=colorDateGene]  at (0,0)                                (dayofweek)  {\footnotesize{#1}};                 \node [fill=colorDateToday] at ($(dayofweek)  +(0,-\baselineskip)$) (dayofmonth) {#2};                 \node [fill=colorDateToday] at ($(dayofmonth) +(0,-\baselineskip)$) (month)      {#3};                 \node [fill=colorDateGene]  at ($(month)      +(0,-\baselineskip)$) (dayofmonth) {\footnotesize{#4}};             \end{tikzpicture}         }              \usepackage{lipsum}               \begin{document}          \addcontentsline{toc}{section}{Mon. 28 Nov.}     \section*{One day \marginnote{\Date{Mon}{28}{NOV}{2011}}}          \noindent\lipsum[1]          \addcontentsline{toc}{section}{Wed. 30 Nov.}     \section*{One day \marginnote{\Date{Wed}{30}{NOV}{2011}}}          \noindent\lipsum[1]          \addcontentsline{toc}{section}{Fri. 2nd Dec.}     \section*{One day \marginnote{\Date{Fri}{2nd}{DEC}{2011}}}          \noindent\lipsum[1]          \newpage     \addcontentsline{toc}{section}{Mon. 5 Dec.}     \section*{One day \marginnote{\Date{Fri}{5}{DEC}{2011}}}          \noindent\lipsum[1]          \end{document}


title: Old Korean han'gŭl in XeLaTeX?

text: Does anybody know if it's possible to typeset old han'gŭl (Korean alphabet) in XeLaTeX? I'm referring to these letters: http://en.wikipedia.org/wiki/Old_Hangul It is not possible to type outright on a Mac, but these characters are included in Unicode: http://en.wikipedia.org/wiki/Hangul_Jamo_(Unicode_block) I cannot copy and paste the unicode straight into the document, since every syllabic han'gŭl block consists of 2-3 Unicode characters. Usually, the input editor does that assemblage for us, but the Mac input editor doesn't support syllabic blocks containing old han'gŭl. Minimal working example:               \documentclass[utf8,12pt,letterpaper]{article}          \usepackage{setspace}     \usepackage[fallback]{xeCJK}          \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}          \newcommand{\mainfont}[0]{Times New Roman}\newcommand{\mainfontCJK}[0]{Gulim}     \setmainfont{\mainfont}     \setCJKmainfont{\mainfontCJK}     \XeTeXlinebreaklocale "zh"     \XeTeXlinebreakskip = 0pt plus 1pt          \title{}     \author{}     \date{}     \begin{document}     \maketitle          ᆰᆀ           ᆱᅥ %Consonant + vowel combinations copied from http://en.wikipedia.org/wiki/Hangul_Jamo_(Unicode_block)                    \end{document}      ![enter image description here](http://i.stack.imgur.com/nHf6i.png)


title: Typesetting coordinates

text: I'm trying to typeset coordinates like: `(0 0 0)` or `(0, 0, 0)` I'm not sure if LaTeX offers a package which can make the notation a bit more professional than just manually inserting spaces between each coordinate.


title: Figure very poorly placed

text: I am using `pdflatex` with PDF images for figures. When I do not scale the image, the figure goes off the page. When I do scale the image, it is very poorly placed. A little too far to the right of the page. I know something is not correct, because not only does the placement look terrible, but when I put a frame around the float, the frame crosses the image. Here is a minimal working example. I'm not sure how to include the PDF image here. The image is a horizontally long image, not a standard size. I guess this might be the problem? How does one deal with this issue?               \documentclass{article}     \usepackage{graphicx}     \usepackage{float}     \begin{document}     \section{Section Title}     \begin{figure}[h]       \caption{Blah blah}       \includegraphics[scale=.4]{Graph.pdf}     \end{figure}     \end{document}


title: Biblatex Formating Bibliography

text: Following the comments I'll start from the beginning. I want to cite with superscore numbers and a list of references in the bibliography in the following format: **Book:** > Surname, Name: Title. Subtitle, Location Year **Journal:** > Surname, Name: Title. Subtitle. In: Journal, Release Date, Page Multiple authors should be divided by a backslash! So the bibliography should look like this. > Jobs, Steve/Gates, Bill: Steve Jobs. In Memory. In: Weekly Apple, 1999, > S.44-45 Here is the minimal example:               \documentclass[a4paper,11pt]{article}     \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[style = numeric,backend=biber,autocite = superscript]{biblatex}     \usepackage[babel,german=quotes]{csquotes}          %\usepackage[style = geschichtsfrkl,citeinit = true, mitvn = true, jahrkeineklammern = true, mits = true, ibidpages = true, sorting=nyt, sortcase = true, autopunct=true, url = true, date = long, backend=bibtex8]{biblatex}               \bibliography{Quellen}           \renewcommand*{\autorenschriftart}{}     \renewbibmacro{in:}{. In:}          \begin{document}     This is a super nice example \autocite{BlaBla:1999}          \printbibliography     \end{document}      And this is the bibliography file:               @Article{BlaBla:1999,       author = {Jobs, Steve and Gates, Bill},       title = {Steve Jobs},       subtitle = {In Memory},       journal = {Weekly Apple},       location = {Silicon Valley},       year = {1999},       volume = {1},       pages = {44--45},       month = {january}     }      Thank you very much in advance! Any help appreciated!


title: Creating my first command

text: I want to create a command that will format code in a certain way. In this case I want code to be italic and red. So instead of doing `\textcolor{red}{\textit code}` I want to make a function, if you will, to do it for me with less lines of code. My understanding of it so far is very... basic. I just started using latex, this is what I have so far.               \usepackage{color}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}          \newcommand{\code}[1]{\textcolor{ForestGreen}{\textit #1}}      But this only prints out the first letter in italic. The colour seems fine though. Any help and explanations would be wonderously helpful.


title: Unexpected text alignment in beamer with wrapfig

text: I'm trying to write a poster using beamerposter package. I'm getting a strange behaviour of text alignment when using wrapfig. I attached the result and i encircled the strange behaviour. On the left side text starts on the next line even if i didn't insert a `\par` neither a `\newline`. I expected the sentence starting with "The agent learns..." would have continued from the line above, after "..environment itself.". On the right side, in addition to the aforesaid wrong behaviour, the text goes to the next line without a reason. Here the code snippet:               \documentclass{beamer}     %\usepackage{ragged2e}     %\let\raggedright=\RaggedRight          \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     %     %\usepackage[adobe-utopia]{mathdesign}     %\usepackage[sc]{mathpazo}     %\linespread{1.05}         % Palatino needs more leading (space between lines)     \usepackage{newtxtext,newtxmath}     %\usepackage{mathptmx} %<-- font times     %\usepackage[urw-garamond]{mathdesign}     \usepackage[T1]{fontenc}     %     \usepackage{graphicx}     \usepackage{color}     \usepackage{tikz}     \usepackage{subfigure}     \usepackage{wrapfig}     \usepackage{fancybox}     \usepackage{microtype}     \usepackage{indentfirst}     \usepackage[numbers]{natbib} % <- bibliografia personalizzata     \usepackage[orientation=portrait,size=a1]{beamerposter}          \mode<presentation>     {     %\usetheme{PAI2012}     \usetheme{I6dv}     }               \begin{document}          \begin{frame}     \begin{columns}[t]          \begin{column}{.5\linewidth}          \begin{block}{Abstract}     The purpose of this work involves the application and the evaluation of a \alert{Reinforcement Learning (RL)} based approach to address the problem of controlling the steering of a vehicle. The car is required to drive autonomously on unknown tracks without never going out of the way. The problem has been solved by using a simple neural network with two neurons, and according to the \alert{ASE-ACE algorithm}. The evaluation has been carried out with referring to The Open Racing Car Simulator (TORCS).     \end{block}          \begin{block}{Background}     Reinforcement Learning (RL) is a learning paradigm for neural networks based on the idea of an agent which is placed into a certain environment and it is required it learns to take proper actions without having any knowledge about the environment itself. %     %     \begin{wrapfigure}{l}{.5\linewidth}     \centering %     \includegraphics[width=\linewidth]{../images/aseace}     \caption{The ASE-ACE neural model.}     \label{fig:aseace}     \end{wrapfigure}     %     The agent learns by trial and error: an entity called \emph{critic} observes the agent's behaviour and punishes or rewards the agent if it executes respectively wrong or proper actions; these kinds of judgements on the action taken are said \emph{reinforcements} \cite{michie1968boxes}.     %     A simple neural model for RL implementation is shown in \figname\ref{fig:aseace} and was proposed in \cite{barto1983neuronlike}.     %     This model is based \emph{only} on punishments: the critic never rewards the agent.     \end{block}          \begin{block}{The Problem Model}     The problem has been modelled as follows:     \begin{itemize}     \setlength{\parindent}{2em}      \item The car speed depends on an auxiliary control system, here modelled as a \emph{black-box} on which it is not actually possible to act or get information.     \item A set of proximity sensors (i.e. laser range-finders) are installed on the vehicle and each of them provides the distance from the sensor itself and the nearest track boundary into its range \cite{cardamone2008masterthesis}.     \item The steering control output is given by a real value in the range $[-1,1]$; positive values produce a steering left rotation, a right rotation the negative ones.     \item The steering control system does not have any kind of knowledge on the surrounding environment or the physical laws that regulate the car motion.     \end{itemize}          \end{block}          \end{column}          \begin{column}{.5\linewidth}               \begin{block}{Sensors and State Decoding}     The configuration used in this work uses only three sensors as shown in \figname{\ref{fig:msens}}: the front sensor is oriented as the major axis of the car, while the side ones have an orientation of respectively $\pm 45^{\circ}$ relative to the major axis of the car. %     %     \begin{wrapfigure}{l}{.5\linewidth}     \centering     \includegraphics[width=\linewidth]{../images/sensori}     \caption{Proximity sensors model.}     \label{fig:msens}     \end{wrapfigure}     %     The range of the front sensor is up to 100mt and that of the side sensors is up to 50mt.     Two non-linear staircase quantization function for the sensors signals were used, each of them with 5 thresholds: the former with "large" thresholds for the front sensor, the latter with an higher resolution for the side sensors.          \end{frame}          \end{document}      Here the actual result: ![poster](http://i.stack.imgur.com/VhAuv.png) Any idea? EDIT: the commented use of ragged2e package has been left on the example code because using \RaggedRight at the beginning of a beamer block, it results in giving a better hyphenation but seems to "resize" the lines above the figures, as they became narrower. The bundle of the latex project (which compiles) can be found here: http://dl.dropbox.com/u/9439473/postertest.zip Thank you in advance for your attention.


title: macro for empty nodes in tikz-qtree

text: I'm trying to define a macro for writing empty nodes in a binary tree using `tikz-qtree`. Referring to the code below, I want the string `\missing` in my code to be replaced by `\edge[draw=none]; {}` as-is (just like if I simply did a find and replace in my code). Is this possible and how can it be done? I don't want to paste `\edge[draw=none]; {}` every time there is an empty node in my binary tree.               \documentclass{article}     \usepackage{tikz}     \usepackage{tikz-qtree}               \newcommand{\missing}{ \edge[draw=none]; {} }     %intended usage inside tikzpicture enviornment:      %\Tree  [.3  1     %               \missing ]     %To producce the same result as code below but     %it gave me an error:     %! Undefined control sequence.     %\missing -> \edge      %                  [draw=none]; {}           \begin{document}          \begin{tikzpicture}     \Tree  [.3  1                    \edge[draw=none]; {} ]     \end{tikzpicture}          \end{document}


title: Newlfm class and indentation

text: I am trying to write cover letter using Latex, I found out about `newlfm` class, I almost got what I wanted, but I can't make him indent any paragraphs. What I want is to get first line of every paragraph indented. Is it possible to achieve something like that using this class?


title: How to avoid numbering the bibliography at the end, and the partial bibliography

text: in my thesis i've two problems   1. In the bibliography for each chapter, the header has the same number of the previous section: ![enter image description here](http://i.stack.imgur.com/r79d3.png)   2. is inserted into the chapter number in the bibliography. how can I do? ![enter image description here](http://i.stack.imgur.com/MEur5.png) Here there are the MWE


title: Manual line break in beamer \title adds spurious comma in \inserttitle

text: Currently I'm preparing a presentation with the beamer class. I want to add a manual line break (with `\\\`) to the title to make it look nicer. However, in the `\inserttitle` command (which I use in the footer), the line break adds a spurious comma. Is this a bug or a feature? How do I get rid of the comma?


title: Beamer and \foreach operator

text: This is my first figure trying to have it in the **beamer** with `\foreach`. For some of you may be it is work five minutes ... but for me it has consumed the whole morning ... **So my question:** How can I have separates `frame` for each image that produces from `\foreach` operator. The `\newframe` inside of `\foreach` does't work. **My goal** was to make it has motion (reverse counterclockwise) ... but do not entangle two questions together               \documentclass{beamer}%{book}     \usepackage[utf8x]{inputenc}     \usepackage{default}     \usepackage{tikz}     \usetikzlibrary{calc}      \usetheme{Warsaw}      \usecolortheme{whale}          \begin{document}     %     \begin{frame}{rotating - test}     %     \begin{center}     \begin{tikzpicture}[scale=2]     \draw[thin,gray,step=0.25] (-1,-1) grid (1,1);     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \draw[->] (-1.5,0)  -- (1.5,0) node[below]{$\phi_0$};     \draw[->] (0,-1.5)  -- (0,1.5) node[left]{$x$};     \draw[thick] (0,0) circle [radius=1];     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \coordinate (C1) at (1,0);     \coordinate (C2) at (0.86,0.5);     \coordinate (C3) at (0.7,0.7);     \coordinate (C4) at (0.5,0.86);     \coordinate (C5) at (0,1);     \coordinate (C6) at (-0.5,0.86);     \coordinate (C7)at(-0.7,0.7);     \coordinate (C8)at(-0.86,0.5);     \coordinate (C9) at (-1,0);     \coordinate (C10) at (-0.86,-0.5);     \coordinate (C11)at(-0.7,-0.7);     \coordinate (C12) at (-0.5,-0.86);     \coordinate (C13) at (0,-1);     \coordinate (C14) at (0.5,-0.86);     \coordinate (C15) at (0.7,-0.7);     \coordinate (C16) at (0.86,-0.5);     %      \foreach \Ctest in {(C1),(C2),(C3),(C4),(C5),(C6),     (C7),(C8),(C9),(C10),(C11),(C12),(C13),(C14),(C15),(C16)}{%     \draw [dashed] let \p1 = \Ctest           in         (\x1,\y1) -- (0,\y1)         (\x1,\y1) -- (0,0);     \draw [red,thick,->] let \p1 = \Ctest           in         (0,0) -- (0,\y1) node[left] {$x$};     \draw [red,thick] let \p1 = \Ctest,           \n1={atan2(\x1,\y1)}           in       (1,0) arc (0:\n1:1)       (0,0)--(0.251,0) arc (0:\n1:0.25)--cycle;     \draw[fill=red] \Ctest circle [radius=0.06];     % \newframe %<<================================================     };     \end{tikzpicture}     %     \end{center}     %     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/vhTMd.png) **1 Update:** After response of @Claudio Fiandrino and @Gonzalo Medina I have this figure. Τhe problem now is that I want the "orbit" of red body to have continuous increasing arc but the angle over 180 degrees do not defined ![enter image description here](http://i.stack.imgur.com/wuCAg.png)


title: texmaker 4.0.1 for OS X Pdf Viewer does not work

text: ![](http://i.stack.imgur.com/cw61s.png) With "external viewer" it works fine. But there is a problem with the pdf viewer that it shows the text too wide, there is something wrong with it. What should I do?


title: Convert color SVG / PDF to greyscale, using hatching patterns

text: I have a couple of charts which are in PDF or SVG format. I want to embed them as figures, but I want to replace colors with different types of hatching patterns. Is it possible to do this with LaTeX? If not, is anyone aware of an SVG → SVG or PDF → PDF conversion tool which can do this replacement? Unfortunately, Inkscape is totally unusable when it comes to patterns. Note that I do not want to convert the figures to bitmaps, they should remain in vector graphics format.


title: How to define a table column to always be a math equation, while others are text?

text: I'd like to typeset a table listing some equations, something like               Euler's formula  &    e^{i\phi} &= \cos\phi + i\sin\phi     Euler's identity & 1 + e^{i\pi} &= 0      Putting this in a `\begin{tabular}{l|rl}` environment, all formulas would need to be surrounded by `$`'s, while by using `array` the text has to be put into a `\text{...}`. Is there any way to define that one contain by default is text while another is in mathmode?


title: Smartdiagram error when compile

text: I want to use the _smartdiagram_ but by some reason a get a error:               ! Undefined control sequence. \smartdiagram      code #1#2->\StrCut {#1}{:}\diagramtype \option \IfNoValueTF {#... l.6 ...ram]     {Initiation,Planning,Execution,Closure} The control sequence at the end of      the top line of your error message was never \def'ed. If you have misspelled      it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox').      Otherwise just continue, and I'll forget about whatever was undefined.          ! Undefined control sequence. \smartdiagram     code ...\StrCut {#1}{:}\diagramtype \option \IfNoValueTF {#1}{... l.6 ...ram]     {Initiation,Planning,Execution,Closure} The control sequence at the end of      the top line of your error message was never \def'ed. If you have misspelled      it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox').      Otherwise just continue, and I'll forget about whatever was undefined.      Here are a the code I use.               \documentclass[12pt]{article}     \usepackage{smartdiagram}          \begin{document}         \begin{center}         \smartdiagram[circular diagram]{Initiation,Planning,Execution,Closure}         \end{center}     \end{document}


title: What is the typographically correct way to typeset name initials?

text: Sometimes I found that writing just "J. Doe" may lead, in a justified line with few words, to a big space between the initial and the surname. Using `J.\,Doe` looks ok but I would like to know if there is a general rule for spacing between initials and surnames.


title: biblatex-dw first name first in bibliography

text: How to reverse the order of Name, Firstname in the bibliography when using a *-dw style ? The xpatch trick does only work with built-in and some other styles, not biblatex-dw ones.


title: Double #s when defining a new command that uses \mint instead of using \mint directly

text: Why does `\dollarcom` give a different result than `\mint{bash}|$#|`?               \documentclass{article}          \usepackage{minted}          \newcommand{\dollarcom}{\mint{bash}/$#/}          \begin{document}          \dollarcom     \mint{bash}|$#|     \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/Rq19h.png) Reading from the `pdflatex` output it seems like `$#` is taken as an illegal parameter number. In this case, how can I define a command with the same output of `\mint{bash}|$#|`? Note: I absolutely do _not_ want to use `\mint{bash}|$#|` in my text because the non-escaped `$` breaks code highlighting in Kile and after that half of my LaTeX source looks green as if in math mode. **Update:** I found a hack to make Kile recognize a command as a `\verb` command. If you want to change the system's syntax highlightining open `/usr/share/kde4/apps/katepart/syntax/latex.xml`, if you want to add syntax highlighting only for your user open `~/.kde/share/apps/katepart/syntax/latex.xml`. If the latter does not exist create the missing directories and copy the system-wide file into it. Now modify the chosen file. In particular there is a section that looks like this:                 <!-- LaTeX command in text mode -->       <context name="ContrSeq" attribute="Keyword" lineEndContext="#pop">         <StringDetect String="verb*" attribute="Keyword" context="Verb"/>         <RegExpr String="(Verb|verb|lstinline)(?=[^a-zA-Z])" attribute="Keyword" context="Verb"/>         <DetectChar char="×" attribute="Bullet" context="#stay"/>         <RegExpr String="[a-zA-Z@]+(\+?|\*{0,3})" attribute="Keyword" context="#pop"/>         <RegExpr String="[^a-zA-Z]" attribute="Keyword" context="#pop" />       </context>       <context name="ToEndOfLine" attribute="Normal Text" lineEndContext="#pop">       </context>      Modify the line `<RegExpr String="(Verb...` to:               <RegExpr String="(Verb|verb|lstinline|mint|mint\{[a-zA-Z0-9=, ]+\})(?=[^a-zA-Z])" attribute="Keyword" context="Verb"/>      This will allow kile to highlight `\mint|text|` or `\mint{some,options}|text|` in the correct way. To make Kile highlight also the `minted` environments check for the section that looks like:                 <!-- filter the environment name and check the type -->       <context name="BeginEnvironment" attribute="Environment" lineEndContext="#stay">         <RegExpr String="(lstlisting|(B|L)?Verbatim)" attribute="Environment" context="VerbatimEnvParam"/>         <RegExpr String="(verbatim|boxedverbatim)" attribute="Environment" context="VerbatimEnv"/>      And change the last line to:                   <RegExpr String="(verbatim|boxedverbatim|minted)" attribute="Environment" context="VerbatimEnv"/>      Look for the section:                 <!-- parse verbatim text -->       <context name="Verbatim" attribute="Verbatim" lineEndContext="#stay">         <DetectChar char="×" attribute="Bullet" context="#stay"/>         <RegExpr String="\\end(?=\s*\{(verbatim|lstlisting|boxedverbatim|(B|L)?Verbatim)\*?\})" attribute="Structure"  context="VerbFindEnd"/>       </context>      And change the `RegExpr` line with:                   <RegExpr String="\\end(?=\s*\{(verbatim|lstlisting|boxedverbatim|minted|(B|L)?Verbatim)\*?\})" attribute="Structure"  context="VerbFindEnd"/>      Look for the section:                 <!-- end of verbatim environment -->       <context name="VerbFindEnd" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">         <RegExpr String="\s*\{" attribute="Normal Text" context="#stay"/>         <RegExpr String="(verbatim|lstlisting|boxedverbatim|(B|L)?Verbatim)\*?" attribute="Environment" context="#stay"/>         <DetectChar char="}" attribute="Normal Text" context="#pop#pop#pop#pop#pop" endRegion="block"/>       </context>      And Change the second `RegExpr` line to:                   <RegExpr String="(verbatim|lstlisting|boxedverbatim|minted|(B|L)?Verbatim)\*?" attribute="Environment" context="#stay"/>      After that Kile should correctly highlight the `minted` environments. I think there should be a way to add at least user-specific syntaxes, if not for each file, but I cannot find any `syntax` directory in `~/.kde/*`. Unfortunately this does not highlight "shortcuts", so you either have to add all of them manually, or you must use ``minted` with all the options every time.


title: Nesting custom `xparse` environments

text: I've defined two simple environments with `xparse`. Problem is when I try to nest `todominute` environment inside `minutes` environment:               \documentclass[a4paper, 10pt]{article}          \usepackage{polski}     \usepackage{xltxtra}     \usepackage{xparse}     \usepackage{booktabs}          \NewDocumentEnvironment {minutes} {} {%         \begin{table*}[h!]         \begin{tabular*}{\textwidth}{@{} p{0.25\textwidth} l p{0.4\textwidth} l @{}}             \textbf{Zadanie} & \textbf{Typ} & \textbf{Opis} & \textbf{Przydział} \\             \midrule     }{%         \end{tabular*}         \end{table*}     }          \NewDocumentEnvironment {todominute} {m O{}} {%         {#1} & \textsc{TODO} &     }{%         & {#2} \\     }          \begin{document}          \begin{minutes}         \begin{todominute}{Poprawki opisu produktu}[TC]             Zgodnie z opisem z paragrafu \ref{sec:opis_produktu}.         \end{todominute}         \begin{todominute}{Poprawki mapy pamięci}[MM]             Zgodnie z opisem z paragrafu \ref{sec:mapa_pamieci}.         \end{todominute}     \end{minutes}          \end{document}      All I get is somewhat unhelpful message:               ! Extra }, or forgotten \endgroup.     \@endpbox ...finalstrut \@arstrutbox \par \egroup                                                        \hfil      l.27 ...n{todominute}{Poprawki opisu produktu}[TC]      **EDIT:** After the reading the comments I understand the problem. Is there a simple way to achieve the desired behaviour? Can I declare a new command that could be used like that and as a result print whole rows for the table declared in `minutes` environment?               \begin{minutes}         \todominute{Poprawki opisu produktu}[TC]             Zgodnie z opisem z paragrafu \ref{sec:opis_produktu}.         \todominute{Poprawki mapy pamięci}[MM]             Zgodnie z opisem z paragrafu \ref{sec:mapa_pamieci}.     \end{minutes}


title: Bold face title and different font sizes in the same title

text: How could I make every character bold in the title? Also, is it possible to make "Faculty of Science" smaller size than the University's name at the same time? I'm new to TeX.               \documentclass{article}     \usepackage{titling}     \newcommand{\subtitle}[1]{%       \posttitle{%         \par\end{center}         \begin{center}\LARGE#1\end{center}         \vskip0.5em}%     }          \title{The University of Alberta     \\Faculty of Science}     \subtitle{(Paper Title)}     \author{(Author)}          \begin{document}          \maketitle          \end{document}


title: Section name with spaces

text: How do I create a section with spaces, and then properly close it?               \section{Name with Space}     .....     \Name with Space      I am getting an error. On the template I see               \section*{Bibliography}     ....     \bibliography{sample} % here the Bibliography is ended from above


title: Annotated Bibliography with achemso/ in ACS style

text: I am trying to make an annotated bibliography. The full citation should be followed by a short summary. The citation style should follow the ACS style, this is why I am using the `achemso` package. I am looking either for a way which automatically generates an annotated bibliography from the "annotate" field, or a way to include full references in text. I have seen the answer to this question, however, `\bibentry` or `\fullcite` don't seem to work with achemso. Is there a way to include full citations in the text with achemso? Or is there a better way to solve this problem?


title: Aligning subfigures both horizontally and vertically with memoir

text: I'm trying to place 4 subfigures of different sizes aligned. Here the box- _k_.pdf files contain boxes with marks at the midsides. The result has box-1 and box-3 aligned at the left margin, not centered (but the captions are centered). texlive-2012, as distributed for Fedora.               \documentclass{memoir}     \usepackage{pgf}     \usepackage{subfig}          \begin{document}       \begin{figure}[htbp]         \setbox1=\hbox{\pgfimage{box-1}}         \setbox2=\hbox{\pgfimage{box-2}}         \setbox3=\hbox{\pgfimage{box-3}}         \setbox4=\hbox{\pgfimage{box-4}}         \centering         \subfloat[Box 1]{           \begin{minipage}[c]{1.0\wd3}             \begin{center}               \copy1             \end{center}           \end{minipage}         }         \hspace{4em}         \subfloat[Box 2]{           \begin{minipage}[c]{1.0\wd4}              \begin{center}                 \copy2              \end{center}           \end{minipage}         }         \\[2ex]         \subfloat[Box 3]{           \begin{minipage}[c][1.0\ht4]{1.0\wd3}             \begin{center}               \copy3             \end{center}           \end{minipage}         }         \hspace{4em}         \subfloat[Box 4]{           \begin{minipage}[c]{1.0\wd4}             \begin{center}               \copy4             \end{center}           \end{minipage}         }         \caption{Some boxen}       \end{figure}     \end{document}


title: Odd/Even fancy headers with article class

text: Using `fancyhdr` and the `book` class, one can set different headers/footers for odd/even pages as               \fancyhdr[RO]{foo}     \fancyhdr[LE]{bar}      and so on. How can I achieve the same with an `article` class, where things are not two sided?


title: The package marvosym seems to clash with the moderncv class. What can I do?

text: I would like to use both the `marvosym` package and the `moderncv` package. LaTeX throws an error that `\fax` was already defined. While this isn't a problem on MikTeX, I'm currently editing a joint document on http://writelatex.com which will not proceed to compile the document.


title: Shifting nested tikz scopes with a command

text: I try to automate some things with tikz, and I am running into a problem that I do not understand. Nesting scopes with shifts defined as commands does not work as I was expecting. For example, this works perfectly :               \begin{tikzpicture}     \def\coord{(1,0)}     \begin{scope}[shift={\coord}]     \end{scope}     \begin{scope}[shift={\coord}]     \end{scope}     \end{tikzpicture}      and it works correctly, as one can see by adding some `\node[fill,circle] at (0,0) {};` inside and outside the scopes but the following fails :               \begin{tikzpicture}     \def\coord{(1,0)}     \begin{scope}[shift={\coord}]       \begin{scope}[shift={\coord}]       \end{scope}     \end{scope}     \end{tikzpicture}      However, this               \begin{tikzpicture}     \def\coord{(1,0)}     \begin{scope}[shift={(1,0)}]       \begin{scope}[shift={(1,0)}]       \end{scope}     \end{scope}     \end{tikzpicture}      indeed works. I do not understand what is happening. `pdflatex` returns               Package tikz Error: Cannot parse this coordinate.     See the tikz package documentation for explanation. ...      in the problematic case. The question is why does this happen ? I probably did something wrong, but I really do not see what. Notice that adding length units does not fix the problem. However, a similar problem with `xshift` and `yshift` does not seem to happen. Also notice that I tried to simplify the code as much as possible ; that's why it draws nothing. Thanks,


title: Table for Binary Operations

text: I am trying to build a table used for different binary operations, especially with thicker lines on the sides separating the elements in the set from the "products" of the operations. I know this question already exists, but I cannot find it anymore. Any help would be appreciated.


title: Special design of 3 plots with LaTeX

text: I wish design 3 plots (A, B and C) in the form of:               ------------------------+---------------+                             |               |               A             |               |                             |               |     ------------------------+        C      |                             |               |               B             |               |                             |               |     ------------------------+---------------+      I am using PGFPLOTS package, I check the groupplot section in the user's guide but I didn't figure out how to deal with this disposition.


title: How to add, subtract, multiply, and divide in plain TeX?

text: I find many cases where I need to calculate many numbers, using adding, subtracting, multiplying, and dividing, but it would save much time if TeX could simply compute these for me. This is a sample situation, which can calculate how many minutes or hours spend in lessons and how many of those minutes are spent in the laboratory.               \def\weeks{20} % term is twenty weeks     \def\lessonsperweek{3} % meets three times per week     \def\lessonduration{60} % meets for sixty minutes          \def\percentlectures{.5} % half the time is spent in lectures     \def\percentdiscussions{.2} % 20 percent of the time is spent in disucssions     \def\percentlab{1 - \percentdiscussions - \percentlectures} % remaining percent of time left to lab work          \def\totalduration{\lessonduration * \lessonsperweek * \weeks} % minutes spent in lessons          \def\totaldurationhours{\totalduration / 60}          \def\labduration{\totalduration * \percentlabs} % minutes spent in the lab          Total time in lab: \labduration minutes.          Total minutes in class: \totalduration minutes.          Total hours in class: \totaldurationhours hours.          \def\weeks{19} % these two values are changed later in the document     \def\lessonsperweek{2}          Total minutes in class: \totalduration minutes. % this value would be different because of the chagnes to \weeks and \lessonsperweek      When I compiled this, `+`, `-`, `*`, and `/` were just displayed in the document as symbols. How can I let TeX calculate these values?


title: Forcing separation of content in two columns

text: I've been using the `multicol` package lately because I was trying to typeset content in two columns and I like minimalist solutions. However I've been having trouble trying to force content to stay in one of the two columns only. But I've seen this behavior occurring:   * _If the left column is shorter than a page_ , using `\columnbreak` is enough and it will force the rest of the content to the right column. For example: How do I force a column-break in a multi-column page?   * _If the content is longer than a page_ , though, using this command won't bring any results (except for the last page/part of the content). The command is ignored, and the first column will use the second until the first condition is satisfied again, i.e. the content is shorter than a page. How can I force the content to stick to the first (left) column until `\columnbreak` (or a similar command) is issued and only then start at the top of the second column? Or am I using the wrong package for this sort of task?


title: Reversed name in shorthand division of bibliography

text: Using Biblatex with LyX I've managed to get a subdivided bibliography almost the the way I want it. The idea is to cite the key works with abbreviations that are conventional to my subject. For this I have used `shorthands` like this:               \printbibheading     \printshorthands[heading=subbibliography,title={Værker af Wittgenstein}]     \printbibliography[heading=subbibliography,title={Andre værker},notkeyword=witt]      This is an extract from the .bib file with one item with a `shorthand` entry and one without (I've given the `shorthand` items the keyword "witt", so that I can exclude them from being printed in the regular bibliography):               @BOOK{rorty_philosophy_1980,       title = {Philosophy and the Mirror of Nature},       publisher = {Princeton University Press},       year = {1980},       author = {Rorty, Richard},     }          @BOOK{wittgenstein_certainty_1979,       title = {On certainty},       publisher = {Blackwell},       year = {1979},       author = {Wittgenstein, Ludwig},       editor = {Anscombe, {G.E.M} and Wright, {G.H.} von and Paul, Denis},       address = {Oxford},       shorthand = {OC},       keywords = {witt},     }      The output is this: ![Output](http://i.stack.imgur.com/WgiW9.png) The only problem is that the names in the shorthands division aren't reversed "Surname, Name"-style like the other part of the bibliography. How would I go about changing that?


title: PGFplots axis with arrow tips at the end

text: By using the following code:               \begin{tikzpicture}     \begin{axis}[xmin=0,xmax=40,ymin=0, ymax=42, xlabel=Φρούτα,ylabel=Γάλα]      \addplot [color=Blue] coordinates {           (0 ,40)             (20, 30)        (30, 20)       (35, 10)     (39, 0)     };     \end{axis}     \end{tikzpicture}      I'm taking the following result ![enter image description here](http://i.stack.imgur.com/35hls.png) However, how could I achieve the following one? ![enter image description here](http://i.stack.imgur.com/1KcWx.png)


title: Autoconnecting tikz-matrix nodes

text: I have this flowchart:               \documentclass[tikz]{standalone}     \usetikzlibrary{shapes,arrows,matrix,decorations.markings}          \begin{document}     \tikzset{       base/.style={draw,minimum width=2cm,minimum height=1cm},       start/.style={base,rectangle},       test/.style={base,diamond,aspect=2},       end/.style={base,rectangle},       link/.style={->},       label/.style={link,%         postaction={decorate,transform shape,%           decoration={markings,mark=at position 0 with {\node #1;}}}},       true/.style={label={[rotate=90,left,anchor=north east]{T}}},       false/.style={label={[above,anchor=south west]{F}}},       acl/.style={matrix of nodes,column sep=1cm,row sep=1cm}     }     \begin{tikzpicture}          \matrix (href) [acl] {       \node [start] {href}; \\       \node [test] {Authenticated}; & & & & & \node [test] {Invert}; & \node [end] {Unauthorized}; \\       \node [test] {Member}; & & & \node [test] {Invert}; & \node [end] {Forbidden}; & \node [test] {Grant}; & \node [end] {Unauthorized}; \\       \node [test] {Invert}; & \node [test] {Grant}; & \node [end] {Forbidden}; & \node [test] {Grant}; & \node [end] {Forbidden}; & \node [end] {OK}; \\       \node [end] {Forbidden}; & \node [end] {OK}; & & \node [end] {OK}; \\     };          \draw [link] (href-1-1) to (href-2-1);          \draw [true] (href-2-1) to (href-3-1);     \draw [true] (href-3-1) to (href-4-1);     \draw [true] (href-4-1) to (href-5-1);     \draw [true] (href-4-2) to (href-5-2);     \draw [true] (href-4-4) to (href-5-4);     \draw [true] (href-3-4) to (href-4-4);     \draw [true] (href-3-6) to (href-4-6);     \draw [true] (href-2-6) to (href-3-6);          \draw [false] (href-2-1) to (href-2-6);     \draw [false] (href-2-6) to (href-2-7);     \draw [false] (href-3-1) to (href-3-4);     \draw [false] (href-3-4) to (href-3-5);     \draw [false] (href-3-6) to (href-3-7);     \draw [false] (href-4-1) to (href-4-2);     \draw [false] (href-4-2) to (href-4-3);     \draw [false] (href-4-4) to (href-4-5);          \end{tikzpicture}     \end{document}      ![flowchart](http://i.stack.imgur.com/ETYvg.png) and since I'm about to write many of these, I'd like to automate the process of drawing `[true]` and `[false]` paths, since every `[test]` node will connect with the first node below and the first node on its right.


title: Minion Math with unicode-math

text: This is a little bit off topic as it is not exactly related to TeX. I saw recently that Minion Math was updated to 1.020 which comes with math table support. Does any one had a chance to play with this font and use it with `unicode- math`, and in particular with the LuaTeX engine? I am very interested in purchasing a complete set of this nice fonts family. However I am concerned about its usability with the `unicode-math` package. Unlike `Cambria Math` or `XITS Math`, `Minion Math` does not come with a single font, instead it has 20 (4 weights 5 optical sizes) fonts. So it will be better to know how it works before spending 700 euro. In particular, say the following minimal document, will it use correct optical size of the fonts for each of the three formulas? I had trouble with using correct optical size of `Minion Pro` fonts with `fontspec`. I worked it out with the `SizeFeatures` and `OpticalSize`. However, I am not so sure if the same strategy will work for `Minion Math` with `unicode-math`. In addition, in `Cambria Math`, etc., the bold symbols and alphabets are chosen directly from the unicode math enabled fonts. But in `Minion Math`, from the glyph tables on their websites, there seems no bold alphabets in each font. So will the `mathbf` in the document below work out of box?               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Minion Pro}     \usepackage{unicode-math}     \setmathfont{Minion Math} % or what ever fonts name actually is          \begin{document}     \fontsize{5}{5}\selectfont     \[ \mathbf{E} = mc^2 \]     \fontsize{10}{10}\selectfont     \[ \mathbf{E} = mc^2 \]     \fontsize{36}{36}\selectfont     \[ \mathbf{E} = mc^2 \]     \end{document}


title: Repeat a previously labelled equation without changing the label

text: Somewhere in my document I have some equation:               \begin{equation}         \label{some_equation}         ...     \end{equation}      I would like to repeat this equation later (so that the reader does not have to flip back and forth between sections), but would like it to appear with the same label (e.g. if it was numbered as equation (1), I would like its "clone" to also appear with the numbering (1)). Is there an easy way to do this?


title: How to place two figures side by side in multicol

text: I would like to place two figures side by side in two column environment (Both figures fitting withing a single column) I have read the answers but it's not working for me. The figure is placed on the next page. ME:                  \documentclass[a0,portrait]{a0poster}        \usepackage[utf8]{inputenc}        \usepackage[T1]{fontenc}        \usepackage{multicol}        \columnsep=100pt         \columnseprule=3pt         \usepackage[czech, english]{babel}        \usepackage[svgnames]{xcolor}         \usepackage{palatino} % Uncomment to use the Palatino font        \usepackage{subfig}        \usepackage{graphicx}         \graphicspath{{figures/}} % Location of the graphics files        \usepackage{booktabs} % Top and bottom rules for table        \usepackage[font=small,labelfont=bf]{caption}        \usepackage{amsfonts, amsmath, amsthm, amssymb}         \usepackage{wrapfig} % Allows wrapping text around tables and figures        \usepackage{lipsum}             \begin{document}        \title{Morphological key at Afrilex 2014} % Poster             \begin{multicols}{2}         \section*{Introduction - Icelandic and Czech?}        \lipsum[3-6]       \begin{figure*}[b!]       \centering            \subfloat[Market revenue]{%       \includegraphics[width=10cm]{online_dict2.png}%       \label{fig:evaluation:revenue}%       }\qquad       \subfloat[Average price]{%       \includegraphics[width=10cm]{online_dict2.png}%       \label{fig:evaluation:avgPrice}%       }            \caption{Simulation results}       \end{figure*}            \subsection*{Types of Media}       \end{multicols}       \end{document}


title: How can I rotate and mirror a tikz picture in latex

text: I'm wondering if someone knows how to place one tikz picture cone face to the other in the horizontal position.               \documentclass[varwidth,margin=0.5cm]{standalone}     \usepackage{tikz}     \usepackage{amssymb}     \usetikzlibrary{shadings}          \begin{document}     \begin{tikzpicture}       \fill[top color=gray!50!black,bottom color=gray!10,middle color=gray,shading=axis,opacity=0.25] (0,0) circle (3cm and 0.5cm);       \fill[left color=gray!50!black,right color=gray!50!black,middle  color=gray!50,shading=axis,opacity=0.25] (3,0) -- (0,6) -- (-3,0) arc (180:360:3cm and 0.5cm);       \draw (-3,0) arc (180:360:3cm and 0.5cm) -- (0,6) -- cycle;       \draw[densely dashed] (-3,0) arc (180:0:3cm and 0.5cm);     \end{tikzpicture}     \end{document}      ![Output](http://i.stack.imgur.com/ZUK18.png)


title: How to fill area under plot using a color map?

text: I have one diagram showing a function f(x,y) like imshow does, and a second diagram that shows the probability distribution P(f). Find below an image of the situation. The code for the plot at the bottom is basically               \addplot[const plot,fill=black!20,very thin] file{hist.dat} \closedcycle;      To increase the visual connection between both images, I'd like to use the colormap from the first diagram in the second diagram: The currently gray area below the histogram plot should be filled with the colormap's gradient in x direction. I tried to achieve that with stuff like `fill=mapped color` and different plot types like `ycomb` and `ybar interval`, but it seems that, out of the box, only `mesh` and `scatter` support colormaps, and both are unsuitable for my scenario. ![Here is an image of the situation.](http://i.stack.imgur.com/GVMNp.png) EDIT: For completeness, here is my solution, derived from the accepted answer.               \def\defcolormapshading#1#2{%      \pgfplotscolormaptoshadingspec{#2}{50pt}\tempa%      \def\tempb{\pgfdeclarehorizontalshading{#1}{\paperheight}}%      \expandafter\tempb\expandafter{\tempa}%      \let\tempa\undefined\let\tempb\undefined%     }%      Put this in your preamble. Then, before the tikzpicture environment, say               \defcolormapshading{myshading}{mymap}      (replace "mymap" by the colormap name, and "myshading" by a descriptive name for the shading). Then give the key `shading=myshading` to `\addplot`. The use of `\pgfplotscolormaptoshadingspec` like in this snippet is detailed in the pgfplots manual.


title: IEEEtran conference with \maketitle - copyright notice (in a box with borders) at bottom of first page?

text: Searching for a way to add copyright statement into IEEEtran conference document I came across How to add copyright notice (in a box with borders) at bottom of first page? which concerns exactly my problem. Unfortunately the solution with `TikZ` does not work with `\maketitle` used in the document - it creates new page before title page. Removing `\maketitle` eliminates the problem. Any tip how to get copyright notice into the paper? I cannot add comment in the above question so I need to ask another one. The simplest example is:               %% bare_conf.tex     %% V1.4     %% 2012/12/27     %% by Michael Shell          \documentclass[conference]{IEEEtran}     \IEEEoverridecommandlockouts          % *** IEEE Copyright notice with TikZ ***     %      \usepackage{tikz}     \usepackage{textcomp}     \usepackage{hyperref}     \usepackage{lipsum}          \newcommand\copyrighttext{%       \footnotesize \textcopyright 2012 IEEE. Personal use of this material is permitted.       Permission from IEEE must be obtained for all other uses, in any current or future        media, including reprinting/republishing this material for advertising or promotional        purposes, creating new collective works, for resale or redistribution to servers or        lists, or reuse of any copyrighted component of this work in other works.        DOI: \href{<http://tex.stackexchange.com>}{<DOI No.>}}     \newcommand\copyrightnotice{%     \begin{tikzpicture}[remember picture,overlay]     \node[anchor=south,yshift=10pt] at (current page.south) {\fbox{\parbox{\dimexpr\textwidth-\fboxsep-\fboxrule\relax}{\copyrighttext}}};     \end{tikzpicture}%     }          \begin{document}     % *** IEEE Copyright notice with TikZ ***     %      \copyrightnotice          \title{Bare Demo of IEEEtran.cls for Conferences}          % make the title area     \maketitle          \begin{abstract}     The abstract goes here.     \end{abstract}          \section{Introduction}     \lipsum[1]          \subsection{Subsection Heading Here}     \lipsum[1-2]          \subsubsection{Subsubsection Heading Here}     \lipsum[1-2]          % that's all folks     \end{document}


title: natbib does not properly show author-year

text: I imported natbib properly:               \usepackage{natbib}      Now, when citing in the parenthetical style:               \citep[p. 12]{MyKey}      , where I am sure that my key exists and the author and year are set, in the pdf output it still shows               (1, p.12)      However, I would like to see               (Author Year, p.12)       Did I miss something? Also, doing               \usepackage[authoryear]{natbib}      doesn't help.


title: Twolined ovalbox in Beamer class

text: I would like to have a twolined Text which has a ovalbox around itself. I do it with               {\huge \Ovalbox{\textcolor{darkred}{Two lined \\ text}}}      LaTex is ignoring the `\\\` sign, how can it be accomplished?


title: cmtt as font in texttt

text: I am using libertine fonts and I would like to change the `texttt` command to use the `cmtt` font. I tried :               \renewcommand{\texttt}[1]{\fontfamily{cmtt}\selectfont{#1}}      but it seems to switch the font for all the text coming after the `texttt` command. If I type `before \texttt{center} after`, I want only `center` to be in `cmtt`. How to do that ?


title: Is there a way to get two pages in one with LaTeX?

text: I would like to have my document compiled with two pages in one using LaTeX, like what you see when you choose to print two pages in one. As my pages are "portrait", I need the page to be shown in landscape when the two pages are compiled in one, and If I could also include margins around each page, that would be wonderful. Does anyone know of any package(s) I can use to get the effect I am after?


title: change caption in list of tables

text: I would like to change the caption in the List of Tables in a way it is different from the caption in the corresponding table. How can I do that? Does there exist a command to do that?