title: How to create simple causal chains with TikZ

text: I have a problem trying to create a simple causal chain, as it can be seen on the attached file: List of available TikZ libraries with a short introduction. I'm having two main issues:   1. I would like to remove the "clouds" from X and Y.   2. The arrow from Z should hit perpendicularly the arrow from X to Y.  I have spent hours trying to solve them, but without luck. Here is my MWE so far:               \documentclass{article}      \usepackage{tikz}     \usepackage{pgf}     \usetikzlibrary{shapes,arrows}     %     \begin{document}      %        \tikzstyle{line} = [draw, -latex']     \tikzstyle{cloud} = [draw, ellipse, node distance=3cm, minimum height=2em]      \begin{tikzpicture}[node distance = 3cm, auto]       \node [cloud] (init) {Z1};             \node [blank, below of=init] (sup) {};       \node [cloud, left of=X1] (X1) {X1};       \node [cloud, right of=Y1] (Y1) {Y1};           \path [line] (X1) -- (Y1);       \path [line] (init) -- (sup);     \end{tikzpicture}     %     \end{document}      Here is the output: ![enter image description here](http://i.stack.imgur.com/JMVKO.png) The wanted image should appear like this: ![hand drawn image](http://i.stack.imgur.com/EAiVK.jpg)


title: Is it more common to type period inside dollars or outside?

text: Which one is more common way to type LaTeX or are there any standards?               Thus $x=2$.      or               Thus $x=2.$


title: How to make math symbols bigger?

text: Is there a way to make math symbols bigger? Reason: I've used `\sfrac{q}{m}`, and those symbols appear far to small, so I would like to make them a bit bigger. **edit:** I just thought that `\sfrac{q}{m}` should look nicer if it is bigger when it is followed by `=`. **edit 2:** Context:               some text     \[       \dfrac{q}{m} \propto \frac{4\pi{r^2}}{\frac{4}{3}\pi{r^3}}\       \propto 3{r^\alpha}\text{, \quad gdje je\quad}\;\alpha = -1 \text{.}     \]     some text


title: \cite only returning link to bibliography and not author details

text: I'm new to LaTeX, and I'm having some issued with `\cite`. When I use `\cite`, the only thing that appears in the text is a number in squared-brackets with a link to the bibliography page. E.g: `\cite{Reference1}` \--> [1] Why isn't it printing out the author's name(s)?               \usepackage[square, numbers, comma, sort&compress]{natbib}      * * *               \label{Bibliography}     \lhead{\emph{Bibliography}}     \bibliographystyle{apalike}     \bibliography{Bibliography}       Do I need to compile something else? Or am I missing some file?


title: How to mark a node in a graph with a pattern

text: I would like to mark my nodes in a graph without using colors because it will be printed in black and white. For example by drawing a vertical line in the first vertex, a horizontal line in the second, two lines in the third,... . Or if there is a better way to do this, I would like to here it. Thank you for your time.               \documentclass[a4paper,11pt,titlepage]{article}     \usepackage{tikz}     \usetikzlibrary{arrows}          \begin{document}          \begin{figure*}[h!]     \centering     \begin{tikzpicture}[node distance=1.5cm,>=stealth',bend angle=45,auto]         \node[minimum size=0.5cm, draw,circle,font=\sffamily\Large\bfseries,fill=red!20,inner sep=0.05cm] (1) {$v_{1}$};         \node[minimum size=0.5cm, draw,circle,font=\sffamily\Large\bfseries,fill=green!20,inner sep=0.05cm, below of=1, xshift=2cm] (2) {$v_{2}$};         \node[minimum size=0.5cm, draw,circle,font=\sffamily\Large\bfseries,fill=cyan!20,inner sep=0.05cm,right of=2, xshift=1cm] (3) {$v_{3}$};         \node[minimum size=0.5cm, draw,circle,font=\sffamily\Large\bfseries,fill=purple!30,inner sep=0.05cm,below of=2, xshift=1.5cm] (5) {$v_{5}$};         \node[minimum size=0.5cm, draw,circle,font=\sffamily\Large\bfseries,fill=red!20,inner sep=0.05cm,below of=2, xshift=-2cm] (4) {$v_{4}$};          \end{tikzpicture}     \end{figure*}          \end{document}


title: Increasing error bar in Pgfplots?

text: I read data from a table to create a plot in Pgfplots:               x    y   sigma     1    2    0.3     2    4.1  0.4      where sigma is the standard error associated with y. Since y and sigma together are are standard normal estimators, the range [y-sigma,y+sigma] can be interpreted as a 68.3% confidence interval. ([1.7,2.3] in the example.) This is the range for which the standard "error bar" is shown if you add errors to the data points in PGFplots. Now, I would like to instead show the range [y-1.96*sigma,y+1.96*sigma], corresponding to the 95% confidence interval. One easy way would be to add a row to the table:               x    y   sigma  r95     1    2    0.3   0.588 %=1.96*0.3     2    4.1  0.4   0.784 %=1.96*0.4      and then use r95 as variable for the errors. But in my case, that would be a lot of work. Is there a way to accomplish the same from within PGFPlots, without changing the tables? My current PGF plots is something like:               \begin{axis}[     height=6cm,     width=8cm,     grid=major,     title=Figure title,     xlabel=The $x$ axis,     ylabel=The $y$ axis,     legend pos=north west,     ]     \addplot+[only marks,mark=asterisk,error bars/.cd,y dir=both,y explicit]        table [x=x,y=y,y error = sigma] {data.txt};     \legend{$S$}     \end{axis}


title: How to make a diagram composed of superimposed layers where the viewer can make each layer visible or invisible independently of the other layers?

text: > **This question led to a new package:**   >  `ocgx` (I have edited the question as **ocgtools** looks like it is the right package to use, rather than **animate**.) I am trying to use **LaTeX** with the **TikZ** package to make a diagram composed of four layers. The specifications require that the viewer can make any of the layers present or absent, so each layer will need its own on/off switch. The **animate** package gives one set of control buttons and is suited to an application where layers are to be added in a predetermined order. Early attempts at making my diagram tried to use one **animateinline** environment for each layer so that each would have it's own set of control buttons. I tried a test case of two layers using two **animateinline** environments, each displays only a blank canvas or one layer, and each has its own set of control buttons. Various attempts were unsatisfactory, including Attempt 1: Inside of a figure environment, nesting an animateinline environment inside another one. This caused a compilation warning that when ignored resulted in no output. Attempt 2: Two separate animateinline environments inside of one figure environment - each set of radio buttons operates independently. To ensure that the second layer is superimposed on the first, using \vspace I manually shifted the second graphic to the same location on the page as the first. Unfortunately the second graphic completely covers the first with its white background, so it appears that the first set of radio buttons doesn't work just because the first layer can't be seen! This attempt has various problems: it requires manual fiddling to superimpose the layers, needs the layers to be made transparent somehow, and even doing that would mean the control buttons are superimposed, so it's necessary to find a way of changing the location of one set of control buttons. An answer posted now indicates that the **ocgtools** will give a framework that doesn't require manual fiddling, allows for transparent layers and which allows the diagram creator to place links that can make each individual layer visible or invisible. Once I have determined that the suggestion works for my needs, I will report back and make this question more concise. Below is some code for the unsatisfactory attempt 2 made using **animate**. Uncommenting the vspace command shows the problem of the opaque second layer sitting on top of and obscuring the first layer.               \documentclass{article}     \usepackage{color,tikz,fancyvrb,animate}      \usetikzlibrary{matrix,fit,calc}      \begin{document}          % An experiment to get diagram layers that can be controlled individually, not just presented sequentially as I've done in "animate".     % I think this could be a passable solution if I could get the layers to be transparent rather than the top one blocking the bottom one.       \begin{figure}      \centering      % Sample_timeline determines the sequence in which frames are added      \begin{VerbatimOut}{Sample_timeline}      ::0x0      ::1x0      \end{VerbatimOut}          \begin{animateinline}[      step,controls,timeline=Sample_timeline,       begin={%        \begin{tikzpicture}%         \useasboundingbox (-0.5,-0.5) rectangle (6,5.5);%         },       end={\end{tikzpicture}}        ]{1} %although not relavant (option `step') fps is required argument              \draw[blue] (-0.5,-0.5) rectangle (4,4.5);              \newframe              \draw[blue] (0,0) circle(0.2) node (circcentre) {layer 1};          \end{animateinline}           % Having this command uncommented causes a problem as the second graphic covers the first - so it appears that the buttons for the first graphic don't work.       %   This destroys the illusion of two layers which can be turned on and off independently of each other. Maybe the problem can be       %     resolved if the "layers" can be made transparent.           %\vspace{-5.5cm}           % Sample_timeline2 determines the sequence in which frames are added     \begin{VerbatimOut}{Sample_timeline2}     ::0x0     ::1x0     \end{VerbatimOut}           \begin{animateinline}[      step,controls, timeline=Sample_timeline2,      begin={%       \begin{tikzpicture}%        \useasboundingbox (-0.5,-0.5) rectangle (6,5.5);%         },        end={\end{tikzpicture}}        ]{1} %although not relavant (option `step') fps is required argument            \draw[orange, line width=3pt] (-0.5,-0.5) rectangle (4,4.5);            \newframe            \node[draw,red] (reccentre)  at +(2,2){layer 2};       \end{animateinline}           \end{figure}      \end{document}


title: Why does LaTeX longtable start on next page?

text: I have a 3-column-longtable that spans over several pages, there's no problem with that. The thing is that there's some text before the longtable. Instead of starting right under the text, LaTeX leaves a blank space and table starts on next page. Any idea on why this may be happening? Here's some code:               \begin{longtable}{|c|c|c|}          \hline          Title1 & Title2 & Title3 \\          \hline \hline          \endhead          \multicolumn{2}{c}{Continued on next page...}          \endfoot          \endlastfoot          \hline        {Sth1} &          {Sth2} &  {Sth3}          %%% etc...     %%% etc...          \hline          \end{longtable}


title: How to create custom beamer template

text: I want to create a custom beamer template, for the slides to look something like this ![enter image description here](http://i.stack.imgur.com/RHELY.png). How can I go about it? Thanks


title: the problem of using "~\\" and blank line

text: Recently,I found the code that cotains the`"~\\"` and `blank line` always shows the warning imformation "Underfull \hbox (badness 10000) in paragraph at lines"               \documentclass{ctexart}     \usepackage{color}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{epstopdf}     \hfuzz=\maxdimen               $(A \pm  B)^{-1} \neq A^{-1} \pm B^{-1}$,$(A \pm  B)^* \neq A^* \pm B^*$~\\          $|(A^*)^*|=|A|^{n^2-2 n+1}$~\\          \end {document}      I add the code:               \tolerance=10000     \hbadness=10000     \begin{document}      However,fail to solve it!


title: tikz-cd error: Single ampersand used with wrong catcode

text: I'm trying to draw a diamond-shaped commutative diagram using the tikz-cd package. Below is my LaTeX source:               \documentclass{amsart}           \usepackage{tikz}      \usepackage{tikz-cd}          \begin{document}          \[\begin{tikzcd}      & A \arrow{dl}\arrow{dr} &\\     B \arrow{dr} & \arrow{dl} C\\     & D &      \end{tikzcd}\]          \end{document}      When I compile this using pdflatex, I get the error:               Package pgfbasematrix Error: Single ampersand used with wrong catcode.      I've looked around on this site, in the documentation and online, and I've only seen this error arise before when using Beamer or trying to define a newcommand. Since I'm doing neither, I'm at a loss as to what's going on.


title: Where can I find documentation on biblatex 1.7 (or other older versions of packages)?

text: I have just updated my `MikTeX 2.9` (I'm using `Windows 7`)... and surprise! My citations don't work any more and I get cryptic error messages. Panic! After a few minutes of frantic and more or less random trial and (inevitably) error attempts, I decided to read the manual. (Yep, should have started with that one!) So I learn that `biblatex 2.0` uses `biber` as back-end and I need to specify explicitly that I want to force it to use the old `bibtex` back-end. Works fine, thanks! Still, the documentation also says that if the back-end is `bibtex`, `biblatex` will revert to version 1.7. So my question is: **where do I find the documentation for`biblatex 1.7`?** (Googling didn't help...) **Or for that matter documetation for older versions of LaTeX packages?** **P.S.** Don't tell me to switch to `biber`! I intend to do that... in due time. For now I have a large document that still needs some serious editing and absolutely no urge to experiment... Thanks for your understanding! `:)`


title: How Can I reduce the fontsize of footnotes in LaTeX beamer?

text: I use footnotes for image-references in my LaTeX beamer presentation. Is it possible to reduce the `footnotesize` for thoses references? Is it also possible to have two different footnotesizes on the same slide - one for image-references and one for references to the literature?


title: memoir: spacing changed in new version

text: I just updated from memoir 3.6g to 3.6j and it broke spacing in my documents. In 3.6g, I used:               \setlength{\parindent}{0em}     \setlength{\parskip}{0.6\baselineskip}          \setbeforesecskip{1.5ex}     \setaftersecskip{0.5ex}     \setbeforeparaskip{0.5ex}      In 3.6g, this gave me about a line's worth of spacing between `\paragraph` and between `\section` and `\begin{itemize}`. In 3.6j, the spacing between `\section` and `\begin{itemize}` is the same, but between `\section` and `\paragraph` or two `\paragraph`s is very small. In order to restore the spacing between `\section` and `\paragraph` or `\paragraph`s in 3.6j, I changed it to:               \setbeforesecskip{3ex}     \setaftersecskip{2ex}     \setbeforeparaskip{2.5ex}      but now there's too much space (approximately 2 lines) between `\section` and `\begin{itemize}`. How can I put the spacing back the way it was?


title: minted Environment Inside minipage Environment

text: I am having to use the `minted` environment inside a `minipage` environment quite often in my document. I wanted to write a new environment for doing this, but since `minted` isn't designed to be included inside other environments, I decided to write a small patch using `minted internals`, based on Using minted to define a new environment and am including this patch in my main document. However, it still doesn't seem to work. Error message: `Paragraph ended before \FV@BeginScanning was complete \begin{cppcode}[10.7cm]` Can someone help me figure out what I'm doing wrong? Here is the code for the "patch". It re-defines the `\newminted` shortcut command to incorporate the `minipage` environment in the custom `minted` environments, using a couple of nested conditionals to check whether an optional `minipage` width has been provided or not.               \makeatletter     \DeclareDocumentCommand \newminted {o m m}     {       \IfNoValueTF {#1} % check if custom env. name is provided, and create new env. accordingly        {\def\minted@envname{#2code}}        {\def\minted@envname{#1}}       \DeclareDocumentEnvironment {\minted@envname} {o} % default env.        {  % begin definition          \IfNoValueTF {##1}           {  % minipage width not provided                  \VerbatimEnvironment\begin{minted}[#3]{#2}                   }          {  % minipage width provided                  \VerbatimEnvironment             \minted@resetoptions             \setkeys{minted@opt}{#3}             \centering             \begin{minipage}{##1}                 \begin{VerbatimOut}{\jobname.pyg}               }        }        {  % end definition          \IfNoValueTF {##1}          {  % minipage width not provided                  \end{minted}               }          {  % minipage width provided                  \end{VerbatimOut}              \minted@pygmentize{#2}             \DeleteFile{\jobname.pyg}             \end{minipage}               }           }             \DeclareDocumentEnvironment {\minted@envname *} {m o}    % custom env. name        { % begin definition          \IfNoValueTF {##2}          {  % minipage width not provided                  \VerbatimEnvironment\begin{minted}[#3,##1]{#2}               }          {  % minipage width provided                  \VerbatimEnvironment             \minted@resetoptions             \setkeys{minted@opt}{#3,##1}             \centering             \begin{minipage}{##2}                 \begin{VerbatimOut}{\jobname.pyg}               }         }                { % end definition             \IfNoValueTF {##2}             {   % minipage width not provided                      \end{minted}                  }             {   % minipage width provided                      \end{VerbatimOut}                 \minted@pygmentize{#2}                 \DeleteFile{\jobname.pyg}                 \end{minipage}                  }            }     }     \makeatother      Here is the MWE using the above code:               \documentclass[10pt]{article}          \usepackage{xparse}              % Page layout     \usepackage[landscape,margin=0.5in]{geometry}     \usepackage{multicol}              % Code     \usepackage{minted}     \definecolor{col}{HTML}{F5EAB5}          \input{minted_patch2.tex} % CONTAINS THE PATCHED CODE          \usemintedstyle{trac}     \newminted{cpp}{bgcolor=col, linenos=true}     \newcommand{\keyw}[1]{\texttt{\textbf{#1}}}              \title{}     \author{}     \date{}          \begin{document}     \begin{multicols}{2}     \maketitle          \section{Primitive Built-in Types}          \subsection{Literals}          Every literal has a type determined by its \textit{form} and \textit{value}          \subsubsection{Integer \& Floating Point Literals}          Integer literals can be represented using \textbf{decimal}, \textbf{octal}, or \textbf{hexadecimal} notations. Integer     literals that begin with \texttt{0} (zero) are interpreted as octal. Those that begin with either     \texttt{0x} or \texttt{0X} are interpreted as hexadecimal:          % Minipage width specified. NO on-the-fly options          \begin{cppcode}[10.7cm]     20 /* decimal */ 024 /* octal */ 0x14 /* hexadecimal */     \end{cppcode}          By default, decimal literals are signed. whereas octal and hexadecimal literals can either  be signed or unsigned. Decimal literal has the smallest type of \keyw{int}, \keyw{long}, or \keyw{long long} in which the value fits. Octal and hexadecimal literals have the smallest type of \keyw{int}, \keyw{unsigned int}, \keyw{long}, \keyw{unsigned long}, \keyw{long long}, or \keyw{unsinged long long}          Floating-point literals include either a decimal point or an exponent specified using scientific notation. Using scientific notation, the exponent is indicated by either E or e:          % Minipage width specified. WITH on-the-fly options          \begin{cppcode*}{linenos=false}[6cm]     3.14159 3.14159E0 0. 0e0 .001     \end{cppcode*}           \end{multicols}     \end{document}


title: \fbox command destroys margin

text: I included a graphic the following way:               \includegraphics[width=1\textwidth]{questionnaire1.png}      Then I changed it so that a frame is drawn around the graphic:               \fbox{\includegraphics[width=1\textwidth]{questionnaire1.png}}      But now, the whole graphic with the border is move 1-2 cm to the right side of the page so that is not in line with the other content. How can I change this?


title: How do I make email address centered under the contact information in the address?

text: \documentclass[margin]{res}      \textwidth=5.2in % increase textwidth to get smaller right margin     \begin{document}           \name{{Ccccc Habcdefghijkl}} % the \\[12pt] adds a blank line after name     \address{2586 12th Ave SE \\ Dfhij Lmno, TX 23456 \\ (111) 111-1111\\ abcdefijklmnopqrst@abcd.com }     \begin{resume}       \section{Objective}      To gain exposure to the      \section{Education}      \end{resume}      \end{document}


title: Draw a nice question mark

text: I am writing my thesis presentation and would like to put an image of a question mark at the end for questions. Can anyone give me some code for a nice question mark drawing. Requirements:   * Coded in Pgf/Tikz   * Nice looking   * Highly customizable   * Not too informal I can draw in Tikz, however I don't know how to do big nice drawings, but I'm able to slightly modify code. EDIT: I said not too informal, but I also want it not to be too formal. Something along the lines of this, but it doesn't have to be in 3D.


title: LaTeX installation: latex not playing nice (at all)

text: So i've been trying for a long, long time to install and use latex on my mac. I started, about a year ago, by installing MacTeX: it didn't work then. I was given a sample file by a colleague and the file wouldn't compile with Pdflatex on texworks. I mailed the file to a friend and it worked perfectly. So i uninstalled all my tex stuff and reinstalled it again. I saw that an option on my settings that says TeX distribution switched from 2012 (Universal) to 2013 (Intel). Yet, the same problem arises, and I can't compile anything. I get this error in my latest try:               2014-01-29 22:54:58.845 LaTeXiT[343:507] 10.4-style     NSNumberFormatter method called on a 10.0-style formatter, which doesn't work.     Break on _NSNumberFormatter_Log_New_Methods_On_Old_Formatters to debug.     This message will only be logged once.      Any insight?


title: How to get the Reinforced symbols?

text: Recently, An asistant asked me a question that how to get the Reinforced symbols? ![enter image description here](http://i.stack.imgur.com/KxuAq.jpg) I can not find it in symbols-a4.pdf. Maybe it is not universal notation.


title: Redefining a command and special character

text: I am trying to redefine \v command (wedge above character) to do what \vec does in mathmode and preserve \v in a command called, say \hac. This code works perfect               \documentclass{article}     \let\hac\v%     \renewcommand{\v}[1]{\ensuremath{\vec{#1}}}%     \begin{document}     line 1: š č ř          line 2: \hac{s} \hac{c} \hac{r} \v{s} \v{c} \v{r}     \end{document}      (line 1 does not print ''š č ř'' as it does not recognize the characters). However, when I add                \usepackage[cp1250]{inputenc}%      into the preamble, the first line prints ''s c r'' with a \vec over them. I do not understand where this behaviour is coming from and how to fix it. (Line 2 is always correct, first ''s c r'' is with a wedge and the second is with a \vec). Can anyone please explain? Alternative way to achieve what I am trying to achieve is to find out syntax of the \v command. I did this using \showcmd in show2e package, finding ''> \v=macro: ->\OT1-cmd \v \OT1\v . \v '', but do not understand the syntax. Thank you, J


title: Trouble with setting up TeXlipse

text: I have installed TeXlipse in past on several machines, however it seems like something is wrong this time. The only thing different this time is that I am using Windows 8. I have downloaded MiKTeX and am able to compile LaTeX documents using it. However, TeXlipse is not able to generate the document correctly. The following basic code:               \documentclass[a4paper]{article}     \begin{document}     \section{Title}     \subsection{Subtitle}     Plain text.     \subsection{Another subtitle}     More plain text.     \end{document}      gives two errors, one warning, and the pdf generated has the following text:               [a4paper]article     document     Title     Subtitle     Plain text.     Another subtitle More plain text.      The same code works just fine in MiKTeX editor! Here is the list of errors and warnings:               Description Resource    Path    Location    Type     Undefined control sequence:  \documentclass (followed by: {article})    document.tex    /Net-Thesis line 3  Texlipse Build Error     cannot open font map file] )    document.tex    /Net-Thesis Unknown Texlipse Build Error     Undefined control sequence:  \begin (followed by: {document})   document.tex    /Net-Thesis line 5  Texlipse Build Error


title: Misplaced \omit when using \multicolumn within \multirow

text: I'm trying to put a \multicolumn within a \multirow environment in the following manner:               \documentclass{article}          \usepackage{multirow}     \usepackage{array}     \usepackage{mwe}          \begin{document}         \begin{tabular}{|p{.03\textwidth}|p{.73\textwidth}|p{.03\textwidth}|p{.15\textwidth}|}             Test1 & Test2 & Test3 &             \multirow{1}{*}{\multicolumn{1}{m{\linewidth}}{\includegraphics[width=\linewidth]             {example-image}}}         \end{tabular}     \end{document}      For clarification, I have multiple rows in the table (6) and the multirow spans those 6 rows. The inner multicolumn is so that the image is centered within the multirow. However, I get the error:               Misplaced \Omit      Does anyone have any idea why this is happening? Thanks! ## Update: See Christian's answer for fixing the error. But latex was still having trouble centering the picture vertically when one of the rows was had multi line text. As a workaround, I increased the number of rows the multirow is spanning even though there are actually 6. This is admittedly an ugly hack and one I'm not particularly happy with, but it works for now. If anyone has any better solution, I'm open to suggestions. ## Update 2: Ok so update 2. See Christian's revised solution and comments for two possible ways to get around this problem. Thanks Christian for all the help!


title: Pass the contents of an \input command to a macro

text: I am having some difficulty with the expansion of LaTeX. I would like to expand the contents of an `\input` command before passing them to macro, in a pattern similar to the following:               \outer{\inner}      Essentially, what I would like to do is expand the contents of the macro (`\inner`) before running the macro (`\outer`), in a pattern similar to the following:               \macro{\input{../path/to/file.tex}}      The file referenced by the `\input` command has to be run through `\macro` in order to run properly, but at present it returns the same error as it would if it had not been run through `\macro`. I have been trying to apply a number of expansion methods, but have been unsuccessful. As I understand it, `\expandafter\a\b` will expand `\b` before `\a`. I would like to achieve a similar effect with the contents of a macro.


title: How to use the current value of a KOMA option?

text: I want to temporarily change a KOMA option. I want to first save the current value of the option to be able to return back to it.


title: Redefining contentsline using hyperref

text: I'm using LaTeX writing my bachelor thesis and I have some issues with the `hyperref` package. I use a LaTeX document provided by my university that has a lot of stuff regarding citation styles, listings, numbering etc. already predefined according to university's guidelines. Trying to use `hyperref`, I ran into a problem with captions in float environments like tables and figures. Error message is:               ! Argument of \reserved@a has an extra }.      I tried to make a minimal example reproducing the error, spend a few hours on google and here on stackexchange and the problem seems to be the redefinition of `\contentsline` and `\numberline` provided by my university:               \let\jbcontentsline\contentsline     \renewcommand{\contentsline}[3]{\jbcontentsline{##1}{##2}{##3}\vspace{0.25\baselineskip}}     \let\jbnumberline=\numberline%     \renewcommand{\numberline}[2]{\jbnumberline{Abbildung ##1:}{##2}}      So, as far as I understood, this redefinitions do not work because `hyperref` also redefined those commands. Is there a way to adapt the code to make it work with `hyperref`?


title: Auto-complete feature for Texmaker citations

text: I have Texmaker 4.1.1 and autocomplete feature for citations doesn't work in it. I have my .bib file in the correct directory (the same as my .tex file), use biblatex, have added the command \addbibresource{} in the correct place in the .tex file, and have already tried refreshing bibliography from Edit menu. Could you suggest some way to fix this?


title: Hyphenation of words containing slash

text: How can I tell LaTeX to automatically split up the german word               Kontrast/Rausch-Verhältnis       into `Kontrast/Rausch-|Ver|hält|nis` LaTeX complains that "/" is not a letter.


title: Versions package producing unexpected behavior

text: I want to create a package for formatting problem sets. Also, I want an easy way to produce versions with the problem statement and the solutions and versions with only the problem statements. I have something almost like what I want (see below). The only thing going wrong is that I don't get the "Begin Solution ... End Solution" when I include the solutions (I do get the "solution text goes here"). Note that I want the problem environment to change based on whether the solutions are included or not, which is why I had my own `\IncludeSolutions` command wrapped around the `\includeversion` command. Any suggestions on how to make this work? I'm also not particularly attached to this approach, so let me know if there is a superior way of approaching the problem. I myself thought of a better way to do this would be to use `kvoptions` to pass an argument to my package, and then define my problem/solution environments based on the argument, rather than using a separate command to redefine the problem environment, but I couldn't get this to work, either. I define the commands in MyProblemSet as follows.               \ProvidesPackage{MyProblemSet}          \RequirePackage{versions}          \newenvironment{problem}     {         \textbf{Begin Problem (without solution)}:\\     }     {         \\\textbf{End Problem (without solution)}\\     }          \newenvironment{solution}     {         \textbf{Begin Solution}:\\     }     {         \\\textbf{End Solution}\\     }     \excludeversion{solution}          \newcommand{\IncludeSolutions}     {         \renewenvironment{problem}         {             \textbf{Begin Problem (with solution)}:\\         }         {             \\\textbf{End Problem (with solution)}\\         }         \includeversion{solution}     }      Here is an example of how I would like to use them.               \documentclass{article}         \usepackage{MyProblemSet}         \IncludeSolutions          \begin{document}          \begin{problem}     problem text goes here     \end{problem}     \begin{solution}     solution text goes here     \end{solution}          \end{document}


title: Switch between box and color links with hyperref

text: How can I have both boxed and color links in the same document? I know I can use `\usepackage[colorlinks]{hyperref}` and have colored links instead of boxes, but how do I have both in the same document. The MWE below yields: ![enter image description here](http://i.stack.imgur.com/bAkhn.png) ## Notes:   * This is intended for use only in the review version of the document where I want to be able to distinguish different types of links. In the final version there will be a single style. ## Code:               \documentclass{article}     \usepackage{hyperref}          \begin{document}     \href{www.google.com}{The Google}           \hypersetup{colorlinks=true, urlcolor=blue}     \href{www.google.com}{The Google}           \hypersetup{colorlinks=false}     \href{www.google.com}{The Google}      \end{document}


title: extra "]" displayed when using htlatex in TL 2013 with \usepackage{hyperref}

text:
I noticed I am getting a new char displayed on the HTML page which did not exist when I was using TL 2012 with htlatex. I narrowed it down to including `\usepackage{hyperref}` This extra "]" shows only in the HTML, not in the PDF               \documentclass[12pt]{article}%     \begin{document}     text     \section{example using Table[Plot...]}     text     \end{document}      gives expected output ![enter image description here](http://i.stack.imgur.com/URCdA.jpg) Now adding `\usepackage{hyperref}` gives this:               \documentclass[12pt]{article}%     \usepackage{hyperref}     \begin{document}     text     \section{example using Table[Plot...]}     text     \end{document}      ![enter image description here](http://i.stack.imgur.com/hWUU5.jpg) Notice the extra "]" there. Command used and part of the display on the screen:               >htlatex foo5.tex     This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode     LaTeX2e <2011/06/27>          (/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/auxhook.sty          Package auxhook Warning: Cannot patch \document,     (auxhook)                using \AtBeginDocument instead.          ) (/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/kvoptions.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/hyperref/pd1enc.def)     (/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/hyperref.cfg)     (/usr/local/texlive/2013/texmf-dist/tex/latex/url/url.sty)          Package hyperref Message: Stopped early.          )          Package hyperref Message: Driver: htex4ht.          [1 file foo5.html      file foo5.css      file foo5.tmp     ]     Execute script `foo5.lg'     ----------------------------     t4ht.c (2012-07-25-19:28 kpathsea)     t4ht -f/foo5.tex      (/usr/local/texlive/2013/texmf-dist/tex4ht/base/unix/tex4ht.env)     Entering foo5.lg     Entering foo5.css     Entering foo5.tmp     >      The HTML generated is               <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"         "http://www.w3.org/TR/html4/loose.dtd">             <title></title>      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">      <meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">      <meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">            <meta name="src" content="foo5.tex">      <meta name="date" content="2013-06-22 21:56:00">      <link rel="stylesheet" type="text/css" href="foo5.css">
text        ]
1    example using Table[Plot...]

text              New installation of TL2013, on Linux mint 15               >which htlatex     /usr/local/texlive/2013/bin/i386-linux/htlatex          >latex -v     pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)     kpathsea version 6.1.1     Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.5.16; using libpng 1.5.16     Compiled with zlib 1.2.7; using zlib 1.2.7     Compiled with xpdf version 3.03     >          >tex4ht     ----------------------------     tex4ht.c (2012-07-25-19:36 kpathsea)


title: Cite a song using apa6, apacite, and bibtex

text: I'm using apaciteThe `apacite` package documentation indicates I need the `apacdoc` package to cite songs, so I've included that as well. What's not clear to me is which bibtex fields should be added for the album and recording date. dessa.bib:               @misc{mineshaft,       author="Dessa",       title="Mineshaft"       year="2010",     }      dessa.tex:               \documentclass[man,12pt,apacite]{apa6}     \usepackage{apacite}     \usepackage{apacdoc}     \usepackage{url}          \title{The Title}     \shorttitle{Title}     \author{Insyte}     \affiliation{My School}     \note{\today}          \begin{document}     \maketitle          Dessa is a Minneapolis native ``underrated writer, overrated rapper''     \citesong{mineshaft} who performs with the alt-hip-hop collective, Doomtree.          \bibliography{dessa}     \end{document}      The output I get from that is this: > Dessa is a Minneapolis native “underrated writer, overrated rapper” Dessa > who performs with the alt-hip-hop collective, Doomtree. Note the citation consists of just the string "Dessa," without parenthesis or the rest of the citation. Any idea what I'm doing wrong?


title: TikZ: Drawing an ellipse through two points

text: I am trying to construct a portion of an ellipse that connects point `P1` and `P2` but I don't know anything about the ellipse besides that `F` is one of the foci. All I know is that an elliptic arc connects the two points. I tried using `\draw let ...` and then specifying the start and end angle but I don't what the x radius and y radius would be nor the orientation of the ellipse. Any ideas on how to construct this? I have a similar question which never received a definitive answer since it was more restrictive. That post can be found here ellipse intersecting a circle but I was just winging it there.                 \documentclass{article}       \usepackage{tikz, intersections}       \begin{document}       \begin{tikzpicture}[         every label/.append style = {font = \small},         dot/.style = {outer sep = +0pt, inner sep = +0pt,           shape = circle, draw = black, label = {#1}},         dot/.default =,         small dot/.style = {minimum size = 2pt, dot = {#1}},         small dot/.default =,         big dot/.style = {minimum size = 4pt, dot = {#1}},         big dot/.default =,         line join = round, line cap = round, >=triangle 45         ]              \node[scale = .75, fill = black, big dot = {below: \(F\)}] (F)         at (0, 0) {};         \node[scale = .75, fill = black, big dot = {below: \(P_1\)}] (P1)         at (2, 0) {};         \node[scale = .75, fill = black, big dot = {above, right = .25cm: \(P2\)}]         (P2) at (-2, 2) {};         \draw[-latex] (F) -- (P1) node[scale = .75, fill = white, inner sep = 0cm,         shape = circle, pos = .5] {\(\mathbf{r}_1\)};         \draw[-latex] (F) -- (P2) node[scale = .75, fill = white, inner sep = 0cm,         shape = circle, pos = .5] {\(\mathbf{r}_2\)};         \draw (-1, 0) -- (F);         \draw let           \p0 = (F),           \p1 = (P1),           \p2 = (P2),           \n1 = {atan2(\x1 - \x0, \y1 - \y0)},           \n2 = {atan2(\x2 - \x0, \y2 - \y0)},           \n3 = {.4cm}         in (F) +(\n1:\n3) arc [radius = \n3, start angle = \n1, end angle = \n2]         node[scale = .75, pos = .5, above = .4cm] {\(\Delta\nu\)};         \draw (P1) -- (P2) node[scale = .75, fill = white, inner sep = 0cm,         shape = circle, pos = .5] {\(c\)};       \end{tikzpicture}       \end{document}      ![enter image description here](http://i.stack.imgur.com/LiG7I.png)


title: Is there a way to use T1 font for math and main font (with some T2A Cyrillic letters) in document compiled by XeLaTeX?

text: Here is my code (utf8):               \documentclass{article}     \usepackage[no-math]{fontspec}     \usepackage[utf8]{inputenc}     \usepackage[T1,T2A]{fontenc}     \usepackage{anttor}     \begin{document}     text $math$          Russian: Щ     \end{document}      The problem is, "math" is still the CM font; and the Cyrillic font does not appear.


title: Custom itemize environment which takes color as argument

text: Using beamer, I would like to change the color of the itemize bullet according to a passed argument, something like                \begin{myitemize}         \item[red] no         \item[green] yes      \end{myitemize}      Is there any way to achieve it? I have been googling but with no success...


title: Define different heights for head and foot

text: is it possible to define different `\headerheight` for head and foot respectively? For example, there is a logo image in the header which needs a large `\headerheight` and only text is in foot which needs a small `\headerheight`. Or does it have two variables to control the heights of foot and head respectively?


title: What would you like to change about TeX/LaTeX/XeTeX/etc.?

text: Like the title says, is there anything about the system you're using that you would like to change? Some annoyance that should be fixed, some feature that could be improved or added?


title: How to draw counter-ions using chemfig package?

text: For my thesis I need to draw this: ![enter image description here](http://i.stack.imgur.com/oqYBQ.jpg) With this code I could get everything except for the counter-ion (shown with red arrow, I do not need the red arrow and the line on the figure).               \documentclass[12pt,a4paper]{article}     \usepackage{graphicx}     \usepackage{chemfig}     \begin{document}     \begin{figure}[h]     \centering     {     \setatomsep{2em}     \chemname{\chemfig{[:90]Ir?[o](-[,2]N*6(-=-=-(-*6(=*6(-=-=-)-=-=?[o,{<:}]-))=))([:-90]-[,2]N*6(-(-*6(-?[o,{<}]=-=*6(-=-=-)-=))=-=-=-))([:30]<:[,2]N*6(-(-*6(=N?[o,{<}]-=-(-([:30]-)(-)([:-90]-))=-))=-(-([:90]-)(-)([:-30]-))=-=))}}{1}     }     \end{figure}     \end{document}      Could you help me to find a way to solve this problem? It there only one way to do it with TikZ environment or is there a simpler way?


title: hyperref problem not working using dvi-ps and ps-pdf

text: I have problem using the package hyperref. When I compile my tex using dvi-ps and ps-pdf, the link is created but nothing happened when I click on the link. However, it works when I use pdflatex. I have tried to define the driver dvips but it is still not working.               \documentclass{book}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage[]{hyperref}     \begin{document}     \frontmatter     \tableofcontents     \clearpage     \addcontentsline{toc}{chapter}{Foreword}          \Blindtext     \clearpage          \addcontentsline{toc}{chapter}{Dummy entry}     {\huge {\bf Dummy entry}}          \mainmatter     \chapter{First Chapter}     \end{document}


title: Breaking and aligning equations

text: I have the following MWE               \documentclass[10pt, a4paper]{article}     \usepackage{amsfonts, amsmath, amssymb, amsfonts}     \begin{document}     \begin{align}     \sum_i{ c_i}           &= \cos \sin\cos \sin\cos \sin\cos \sin\cos \sin \\     \sum_i{ c_i}           &= \delta \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \\                             &\hphantom{{}=} \delta^2\sin\cos \cos \sin\cos \sin\cos \cos      \end{align}     \end{document}      How do I align the last equation with the two above it? I have previously had success with `phantom`, but doesn't work here.


title: \item that starts with a number doesn't work with style=nextline

text: I've got a list of items and use `style=nextline`. Problem is, when a list- item starts with a number, the `nextline` doesn't work:               \begin{example}[style=nextline]     \item[3D]         Doesn't line-break before this text.     \item[Three D]         Line-breaks before this text.     \end{example}      Any ideas?


title: Can I tab inside of align environment?

text: I currently have this ugly equation: ![enter image description here](http://i.stack.imgur.com/Hjffv.png) The green alignment is just like I want it. The Red one is what I would like to get, but I don't know how. Here is my MWE:               \documentclass[a4paper]{scrartcl}     \usepackage{amssymb, amsmath} % needed for math     \usepackage[utf8]{inputenc}   % this is needed for umlauts     \usepackage[ngerman]{babel}   % this is needed for umlauts     \usepackage[T1]{fontenc}      % this is needed for correct output of umlauts in pdf          \begin{document}     \begin{align}         f_1(x) &= a \left (x - \frac{b}{3a} \right )^3 + b \left (x-\frac{b}{3a} \right )^2 + c \left (x-\frac{b}{3a} \right ) + d\\                &= a \left (x^3 - 3 \frac{b}{3a}x^2 + 3 (\frac{b}{3a})^2 x - \frac{b^3}{27a^3} \right )                  +b \left (x^2 - \frac{2b}{3a} x + \frac{b^2}{9a^2} \right )                  +c x - \frac{bc}{3a} + d\\                 &= ax^3 - bx^2 + \frac{b^2}{3a}x - \frac{b^3}{27 a^2}\\                 & \;\;\;\;\;\;+ bx^2 - \frac{2b^2}{3a}x + \frac{b^3}{9a^2}\\                 & \;\;\;\;\;\;\;\;\;\;\;\; + c x - \frac{bc}{3a} + d\\                 &= ax^3 + \frac{b^2}{3a}\left (1-2+c \right )x + \frac{b^3}{9a^2} \left (1-\frac{1}{3} \right )- \frac{bc}{3a} + d     \end{align}     \end{document}


title: How to show navigation bullets in customized Beamer them?

text: I've made my own beamer theme to provide my some resources. I have this code so far:               \mode<presentation>          \usetheme{Malmoe}      \usecolortheme{orchid}     \beamertemplatenavigationsymbolsempty     \setbeamerfont{title}{series=\bfseries}          % Command for including frame number in the format #     \newcommand{\framenumber} {     \newcommand*\oldmacro{}%     \let\oldmacro\insertshorttitle%     \renewcommand*\insertshorttitle{%       \oldmacro\hfill%       {\insertframenumber}}     }          \mode<all>          \RequirePackage[T1]{fontenc}     \RequirePackage[utf8x]{inputenc}     \RequirePackage{graphicx}     \RequirePackage{xcolor}     \RequirePackage{natbib}     \RequirePackage{ifthen}     \RequirePackage{amsmath}     \RequirePackage[]{subfig}          \setbeamertemplate{headline}     {%       \leavevmode%       \@tempdimb=2.4375ex%       \ifnum\beamer@subsectionmax<\beamer@sectionmax%         \multiply\@tempdimb by\beamer@sectionmax%       \else%         \multiply\@tempdimb by\beamer@subsectionmax%       \fi%       \ifdim\@tempdimb>0pt%         \advance\@tempdimb by 1.825ex%         \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{section in head/foot}%           \vbox to\@tempdimb{\vfil\insertsectionnavigation{.5\paperwidth}\vfil}%         \end{beamercolorbox}%         \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{subsection in head/foot}%           \vbox to\@tempdimb{\vfil\insertsubsectionnavigation{.5\paperwidth}\vfil}%         \end{beamercolorbox}%       \fi%     }          % Command to specify two logos     \newcommand{\logos}[2][]{     \setbeamertemplate{sidebar left}{        \vfill        \rlap{\hskip0.1cm              \icon[0.5cm]{#1}}        \vskip2pt%      }      \setbeamertemplate{sidebar right}{%         \vfill        \llap{\icon[0.5cm]{#2}\hskip0.1cm}%         \vskip2pt     }     }      This gives me something like this: ![enter image description here](http://i.stack.imgur.com/w0npx.png) I would like to show bullets for each frame of a section in the black side of the headline, aligned with the section title. I'm not using the `\subsection` command, so I'm also setting, in the begin of the beamer tex file:               \usepackage{remreset}     \makeatletter     \@removefromreset{subsection}{section}     \makeatother     \setcounter{subsection}{1}      However, I can't see any navigation bullet so far. Any help would be appreciated. Thank you.


title: Chapter headings at different heights

text: I'm completely new to LaTeX - just started this morning, and I've come up agaisnt an annoying problem. For some reason when I compile my LaTeX code the vertical position of the Chapter 1 heading is higher than all my subsequent Chapter headings. Below is a copy of the master file I'm using as well as               \documentclass[12pt,a4paper]{report}     \usepackage{setspace}     %%%%%%%%%%%%%%%%     %%  Document  %%     %%%%%%%%%%%%%%%%     \begin{document}     %%%%%%%%%%%%%%%%%%     %%  Title Page  %%     %%%%%%%%%%%%%%%%%%     \begin{titlepage}     \begin{center}     \vspace*{1in}     {\LARGE Quantifying rates of landscape evolution in carbonate terrains using U-Pb dating of speleothems}     \par     \vspace{1.5in}     {\large Christopher James Martin Smith}     \par     \vfill     A dissertation submitted to the University of Bristol in accordance with the requirements for award of the degree of Doctor of Philosophy in the Faculty of Science.     \par     \vspace{0.5in}     School of Geographical Sciences     \par     \vspace{0.5in}     University of Bristol     \par     \vspace{0.5in}     September 2014     \end{center}     \end{titlepage}     %%%%%%%%%%%%%%%%%%%%%%%%%     %%  Preface Numbering  %%     %%%%%%%%%%%%%%%%%%%%%%%%%     \pagenumbering{roman}     %%%%%%%%%%%%%%%%%%%     %%  Declaration  %%     %%%%%%%%%%%%%%%%%%%     \newpage     \label{declaration}     \addcontentsline{toc}{chapter}{Declaration}     \chapter*{Declaration}     \par     I declare that the work in this dissertation was carried out in accordance with the requirements of the University's Regulations and Code of Practice for Research Degree Programmes and that it has not been submitted for any other academic award. Except where indicated by specific reference in the text, the work is the candidate's own work. Work done in collaboration with, or with the assistance of, others, is indicated as such. Any views expressed in the dissertation are those of the author.     \\     \\     \\     \\     \par     SIGNED:     \\     \\     \par     DATE:     %%%%%%%%%%%%%%%%%%%%%%%%     %%  Acknowledgements  %%     %%%%%%%%%%%%%%%%%%%%%%%%     \newpage     \label{acknowledgements}     \addcontentsline{toc}{chapter}{Acknowledgements}     \chapter*{Acknowledgements}     \par     Text here.     %%%%%%%%%%%%%%%%     %%  Abstract  %%     %%%%%%%%%%%%%%%%     \newpage     \label{abstract}     \addcontentsline{toc}{chapter}{Abstract}     \chapter*{Abstract}     \par     Text here.     %%%%%%%%%%%%%%%%%%%%%%     %%  Contents Pages  %%     %%%%%%%%%%%%%%%%%%%%%%     \tableofcontents     \newpage     \label{listoffigures}     \addcontentsline{toc}{chapter}{List of Figures}     \listoffigures     \newpage     \label{listoftables}     \addcontentsline{toc}{chapter}{List of Tables}     \listoftables     \newpage     \label{nomeclature}     \addcontentsline{toc}{chapter}{Nomenclature}     \chapter*{Nomenclature}     \newpage     %%%%%%%%%%%%%%%%%%%%%%%%%     %%  Preface Numbering  %%     %%%%%%%%%%%%%%%%%%%%%%%%%     \pagenumbering{arabic}     %%%%%%%%%%%%%%%%%     % Chapter Title %     %%%%%%%%%%%%%%%%%     \chapter{Introduction}     \label{ch:intro}               %%%%%%%%%%%     % Spacing %     %%%%%%%%%%%     \doublespacing               %%%%%%%%%%%%     % Sections %     %%%%%%%%%%%%     \section{Subsection}     \subsection{Sub-subsection}     \par                   %%%%%%%%%%%%%%%%%     % Chapter Title %     %%%%%%%%%%%%%%%%%     \chapter{Literature Review}     \label{ch:litrev}               %%%%%%%%%%%     % Spacing %     %%%%%%%%%%%     \doublespacing               %%%%%%%%%%%%     % Sections %     %%%%%%%%%%%%     \section{Radioactive Decay}     \subsection{Law of radioactivity}     \par          \bibliographystyle{plain}     \bibliography{thesis}     \end{document}      As you can see, the format of the called chapters is exactly the same, so why would Chapter 1 appear to be higher on the page (when compiled and viewed as a pdf) than Chapter 2? Could it be something to do with the page numbering code that occurs before calling the chapter sections? Also, I don't know if it's relevant, but I'm using TexMaker to compile my code. Many thanks, Chris


title: How to create inner section like environment with sub-table of contents?

text: Is there an easy way to create a inner section like environment that can produce a sub-table of contents at a preferred location? The sub-table does not necessarily need to give page numbers, but it should set links to the inner subsection items. What I have in mind looks somewhat like this               \section{Lorem Ipsum}     \myinnersec_subtable          \myinnersec{InnerSubSectionOne}\label{InnerSubSectionOne}     ....     \myinnersec{InnerSubSectionTwo}\label{InnerSubSectionTwo}     ....      and should produce something like ![Inner subsections with sub-table](http://i.stack.imgur.com/HzbTL.png)


title: How to define an environment with a colored tikz node included

text: I would like to define a new environment like               \begin{mybox}       some text     \end{mybox}      that would automatically expand to something like               \begin{tikzpicture}       \node[fill=red!0.5] {some text};     \end{tikzpicture}      I tried to define an environment with the following code in the preamble:               \newenvironment{mybox}{\begin{tikzpicture}\node[fill=red!0.5]\bgroup}{\egroup;\end{tikzpicture}}      but the color option is not fully working. If `fill=red` is used it works correctly, but if a mixed color like `fill=red!0.5` it doesn't. What can be done to mix colors? **EDIT:** The questions contains an error. It should be `red!50` instead of `red!0.5`. Anyway, the answers below can be helpful as alternatives to generate a colorful text box.


title: Replacing footnotes with sidenotes in Classicthesis

text: I'm planning to use `classicthesis` for my PhD research, and I would like to know if there is a way to replace footnotes with sidenotes (with hyperlinks, etc). Thanks for your attention!


title: Tikz: Drawing a line from a focus to the edge of an ellipse

text: This question is similar to Tikz: connecting two vectors from the focus of an ellipse to the edge but not the same. In this instance, I want the the length of line to be a specific distance. If there was a circle center at the origin, my lines to the edge will only be in the 1st and 2nd quadrants. I want to construct a line of unit length from F to the edge of the ellipse. I don't know what angle would have this length though. For the second line, I want it to be of length `1.524`. These lengths are labelled `rone` and `rtwo` respectively. One more caveat, the angle between `rone` and `rtwo` should be `107` degrees which is labelled `deltanu`.               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[scale = 1.5,         every label/.append style = {font = \small},         dot/.style = {outer sep = +0pt, inner sep = +0pt,           shape = circle, draw = black, label = {#1}},         dot/.default =,         small dot/.style = {minimum size = 2.5pt, dot = {#1}},         small dot/.default =,         big dot/.style = {minimum size = 5pt, dot = {#1}},         big dot/.default =         ]         \pgfmathsetmacro{\e}{0.2768}         \pgfmathsetmacro{\etilde}{0.6789}         \pgfmathsetmacro{\rone}{1}         \pgfmathsetmacro{\rtwo}{1.524}         \pgfmathsetmacro{\deltanu}{107}         \pgfmathsetmacro{\a}{1.36}         \pgfmathsetmacro{\am}{1.1442}         \pgfmathsetmacro{\b}{\a * sqrt(1 - \e^2)}         \pgfmathsetmacro{\btilde}{\a * sqrt(1 - (\etilde)^2)}         \pgfmathsetmacro{\c}{sqrt(\a^2 - \b^2)}         \pgfmathsetmacro{\ctilde}{sqrt(\a^2 - (\btilde)^2)}         \node[scale = .75, fill, big dot = {below: \(F\)}] (F) at (0, 0) {};         \node[scale = .75, fill = none, big dot = {below: \(F^*\)}] (FS)         at (-2 * \c cm, 0) {};         \draw (-\c,0) ellipse (\a cm and \b cm);         \draw[red, thick] (0, 0) circle (1.523679cm);         \draw[blue, thick] (0, 0) circle (1cm);       \end{tikzpicture}     \end{document}      My guess would be the intersection library but I don't know how that would be implemented. ![enter image description here](http://i.stack.imgur.com/ZVSRf.jpg) ![enter image description here](http://i.stack.imgur.com/CsRqX.jpg) ![enter image description here](http://i.stack.imgur.com/V2enf.png)


title: Cleveref and named theorems

text: Is it possible with Cleverref to reference not only the number of an environment but the "name" (the thing that is passed to it in square brackets? In the following example I want to replace the line enter code here > >     Now since \Cref{boringLemma} we have that \Cref{awesomeTheorem} directly > follows. >   with something such that I do not get > >     Now since Lemma 1.1 we have that Theorem 1.2 directly follows. >   but something like > >     Now since Boring Lemma (1.1) we have that Awesome Theorem (1.2) directly > follows. >                 \documentclass{article}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage[amsmath]{ntheorem}     \usepackage{cleveref}          \newtheorem{thm}{Theorem}[section]     \newtheorem{lemma}[thm]{Lemma}          \crefname{lemma}{lemma}{lemmas}     \Crefname{lemma}{Lemma}{Lemmas}     \crefname{thm}{theorem}{theorems}     \Crefname{thm}{Theorem}{Theorems}          \begin{document}     \section{Boring and Awesome stuff}          \begin{lemma}[Boring Lemma]\label{boringLemma}     This is some boring statement.     \end{lemma}          \begin{thm}[Awesome Theorem]\label{awesomeTheorem}     This is a really awesome statement.     \end{thm}          Now since \Cref{boringLemma} we have that \Cref{awesomeTheorem} directly follows.          \end{document}


title: ChangingTikz Node Style works only once in Beamer

text: I am trying to change the node style of a Tikz-node twice in Beamer but the second time the change is not done. What needs to be fixed in my MWE to make it work?               \documentclass{beamer}     \usepackage{tikz}          \begin{document}     \begin{frame}[label=fooFrame]{You Will Be Amazed.}     \tikzstyle{empty} = [shape=rectangle, draw=green, fill=green, inner sep=0pt, minimum size=4mm]     \tikzstyle{wip} = [shape=rectangle, draw=red, fill=red, inner sep=0pt, minimum size=4mm, label={center:?}]     \tikzstyle{done} = [shape=rectangle, thick, draw=blue!50, inner sep=0pt, minimum size=4mm, label={center:$\checkmark$}]          \tikzstyle{mynode} = [empty]     \only<2>{\tikzset{mynode/.style={wip}}}     \only<3>{\tikzset{mynode./style={done}}}          \begin{tikzpicture}     \node[mynode] {};     \end{tikzpicture}     \end{frame}     \end{document}      The result is that the style `empty` is applied on the first slide, the style `wip` in the second slide but then `empty` is applied again in the last slide, where I would expect `done` to appear. Note:   1. Also I could not replace the use of `\tikzstyle{}` with `\tikzset` on the first slide.   2. Using `\only<1>{...}` also doesn't help.


title: How (La)TeX makes use of font related files, i.e., .fd, .map, .enc, .def,etc when selecting fonts?

text: What are the usage of these font related files: `.fd`, `.map`, `.enc`, `.def`, etc? What's the sequence of using them when `(La)TeX` converts tokens to generate a `pdf` output(assuming `pdftex` is the engine)? By the way, would you please provide me with some documentations that covers this topic?


title: Is there a straight-forward means of determining dependencies between packages

text: I was reading about creating coordinate systems in the `pgfmanual` and was surprised to see the use of `\define@key` in one of the examples               \makeatletter     \define@key{cylindricalkeys}{angle}{\def\myangle{#1}}     \define@key{cylindricalkeys}{radius}{\def\myradius{#1}}     \define@key{cylindricalkeys}{z}{\def\myz{#1}}     \tikzdeclarecoordinatesystem{cylindrical}%     {%     \setkeys{cylindricalkeys}{#1}%     \pgfpointadd{\pgfpointxyz{0}{0}{\myz}}{\pgfpointpolarxy{\myangle}{\myradius}}     }     \begin{tikzpicture}[z=0.2pt]     \draw [->] (0,0,0) -- (0,0,350);     \foreach \num in {0,10,...,350}     \fill (cylindrical cs:angle=\num,radius=1,z=\num) circle (1pt);     \end{tikzpicture}      I copied and pasted this into a document whose class was `article` and only loaded one package, `tikz`. Everything compiled fine. So I added a line to list the files:               \documentclass{article}     \usepackage{tikz}     \listfiles     \begin{document}          \makeatletter     \define@key{cylindricalkeys}{angle}{\def\myangle{#1}}     \define@key{cylindricalkeys}{radius}{\def\myradius{#1}}     \define@key{cylindricalkeys}{z}{\def\myz{#1}}     \tikzdeclarecoordinatesystem{cylindrical}%     {%     \setkeys{cylindricalkeys}{#1}%     \pgfpointadd{\pgfpointxyz{0}{0}{\myz}}{\pgfpointpolarxy{\myangle}{\myradius}}     }     \begin{tikzpicture}[z=0.2pt]     \draw [->] (0,0,0) -- (0,0,350);     \foreach \num in {0,10,...,350}     \fill (cylindrical cs:angle=\num,radius=1,z=\num) circle (1pt);     \end{tikzpicture}          \end{document}      I discovered that the following key value packages loaded:                 keyval.sty    1999/03/16 v1.13 key=value parser (DPC)      pgfkeys.sty          pgfkeys.code.tex     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)      I assumed (rather incorrectly, apparently) that it was the `pgfkeys` package loading these dependencies. But, when I made a document which only used `pgfkeys`, the listed files were only:                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)      pgfkeys.sty          pgfkeys.code.tex      ***********      I could continue in this manner of loading only one package at a time and listing its package dependencies. But that's rather tedious. Is there in general a less tedious way to better discover how the various packages are depending upon one another? Note: I'm not asking just about `tikz` or `pgf`. It was only via playing with those two packages that this question arose. **Update** It looks like How to design a command inquiring internally required packages? provides something of a solution. Though the answer provided @HeikoOberdiek only seems to list the dependencies the first time they're encountered. If a subsequent packages _requires_ a package that has already been required, then it's not printed out a second time.


title: Could significant speedups be gained from package code minification?

text: > Wikipedia: Minification is (also minimisation or minimization), in computer > programming languages and especially JavaScript, is the process of removing > all unnecessary characters from source code without changing its > functionality. These unnecessary characters usually include white space > characters, new line characters, comments, and sometimes block delimiters, > which are used to add readability to the code but are not required for it to > execute. Minification is ubiquitous in web-development, especially for Javascript and CSS. I was just wondering whether the same principle might be valuable for (La)TeX package files. My first instinct was 'no', and I'm still leaning in that direction. JS / CSS files benefit from minification because it speeds up their downloads. The speedup in parsing may be negligible. Still, TeX files, like Javascript files, are interpreted again and again. I figure a small speedup might add up over time. And Javascript files are cached, so the download speedup isn't _that_ great over the long term. Also, a LaTeX minifier could perform some nifty tricks, especially if it was allowed to assume that csnames containing a `@` or starting with `__` are never referred to outside of the file. So I think it's a question worth asking. Has anyone ever tried anything like this?


title: Accent's problem with LaTeX update

text: I have updated my TeX distribution using MacTeX 2013 and I have now a problem on my TeX documents: The accents are not understood by Texmaker anymore. Here is a screenshot of what I get: ![enter image description here](http://i.stack.imgur.com/CbeTj.png) Here is a copy of the code:               \documentclass{article}     \usepackage{times}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage[latin1]{inputenc}     \usepackage[francais]{babel}     \usepackage[mode=buildnew]{standalone}     \usepackage{subcaption}     \usepackage[a4paper]{geometry}     \usepackage{here}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{matrix}          \usepackage{amsmath}     \usepackage{pgfplots}     %\pgfplotsset{compat=1.9}           \begin{document}          J'ai tent� deux approches pour l'imagerie 3D, la premi�re consiste � d�couper le volume � imager en voxels, puis � calculer le retard de chaque antenne$(i,j)$ du r�seau de fa�on � focaliser sur la sc�ne voxel apr�s voxel. C'est une technique tr�s gourmande en temps de calcul, mais facile � comprendre.          \end{document}      It looks like an encoding problem, I have tried with UTF8 and different ISO but no way to transform those � in accents ... If I try to modify my file with accents, it works fine. Any clue?


title: How do I examine a token?

text: > ... let me count the ways.   >  I can test it with `\if` and `\ifx`   >  and `\show` its `\meaning` And there I stop, both in my knowledge and my poetic ability (though some might argue that the latter never started). **Background:** I'm still trying to get my head around the statement of what `\noexpand` does: > `\noexpand` _temporarily_ sets the next token to `\relax`. The purpose of setting it to `\relax` seems to be that since `\relax` is not expandable, the next token does not get expanded the next time that TeX tries to expand it. But it _does_ get expanded the time after that, so that seems to be the meaning of "temporarily". But is the fact that it is temporarily set to `\relax` detectable? To test this, I want to examine what TeX thinks `\noexpand\foo` is, but that "temporarily" keeps getting in the way: it's all a bit quantum since the act of observing a `\noexpand\foo` seems to change it in some way. Anyway, so I want to build a test suite to see if the value of `\noexpand\foo` is detectable in a significant way and for that, I need to know all the ways that I can get at its value, such as conditionals and `\show`. And that's my question. **Question:** What ways are there of examining a macro or active token in TeX which reveal something about what it points/expands to?


title: Enumerated description list

text: How can a list be created, whose items are both   * enumerated (a,b,c,d,...)    * and allow for setting a description via `\item[texthere]` ? Im am using MikTex on Windows.


title: ConTeXt: How to align a delimitedtext?

text: I'm using pandoc's default `ConTeXt` template, and it uses the following setup for `blockquotes`:               \setupdelimitedtext       [blockquote]       [before={\blank[medium]},        after={\blank[medium]},        indentnext=no,        align=middle       ]      Then, any quoted text is entered as               \startblockquote      Quoted text     \stopblockquote       Now I want to have this quoted text centered on the page, but `setupdelimitedtext` does not seem to have that option (adding `align=middle` has no effect). This surprises me, as it seems like a reasonable expectation, and makes me suspicious that perhaps I'm going about it all wrong. Is there a more _ConTeXt-idiomatic_ way to do this? Also, I can't find documentation for the `setupdelimitedtext` command in the `ConTeXt` manual. Is it been deprecated or something?


title: Center flow chart horizontally

text: I have the following flow chart but it appears uncentered. How can I center it?               \documentclass{article}     \usepackage{pstricks}     \usepackage{pst-node}     \usepackage{pst-blur}     \pagestyle{empty}          \begin{document}     \begin{center}     \psframebox[linearc=5mm,cornersize=absolute]{%     \begin{psmatrix}[rowsep=0.6,colsep=0.5]     \psovalbox[fillstyle=solid]{Begin} &     \psframebox[]{ChIP-seq} &     \psframebox[]{align to genome} &     \psdblframebox[framearc=.4,fillstyle=solid]{Find peaks} &     \psdblframebox[framearc=.4,fillstyle=solid]{Thresholding} &     \psdblframebox[framearc=.4,fillstyle=solid]{Analysis} &     \psframebox[]{stop}      \ncline{->}{1,1}{1,2}     \ncline{->}{1,2}{1,3}     \ncline{->}{1,3}{1,4}     \ncline{->}{1,4}{1,5}     \ncline{->}{1,5}{1,6}     \ncline{->}{1,6}{1,7}     \end{psmatrix}}     \end{center}          \end{document}


title: Sentence alignment for dual-line bilingual paragraph translation in LaTeX

text: I would like to make a translation of entire paragraphs at a time for a large document, with the start of the new sentences aligning. The following is almost what I want done, though it doesn't yet do the alignment for new sentences.               \documentclass{article}     \usepackage[margin=1in, paperwidth=8.5in, paperheight=11in]{geometry}     \usepackage[utf8]{inputenc}     \usepackage{url}     \usepackage{setspace}     \begin{document}          \def\english{In the heart of the forest lived three little pigs who were brothers. The wolf always was chasing them in order to eat them. In order to escape the wolf, the pigs decided to make a house each. The smallest made his from straw, to finish first and go out to play. The middle one constructed a cottage from wood. Seeing that his little brother had finished already, he hurried to go and play with him. The oldest worked on his house of brick. 'You'll soon see what the wolf does with your houses,' he scolded his brothers but they were having a great time.}          \def\spanish{En el corazón del bosque vivían tres cerditos que eran hermanos. El lobo siempre andaba persiguiéndoles para comérselos. Para escapar del lobo, los cerditos decidieron hacerse una casa. El pequeño la hizo de paja, para acabar antes y poder irse a jugar. El mediano construyó una casita de madera. Al ver que su hermano perqueño había terminado ya, se dio prisa para irse a jugar con él. El mayor trabajaba en su casa de ladrillo. - Ya veréis lo que hace el lobo con vuestras casas - riñó a sus hermanos mientras éstos se lo pasaban en grande.}          \begin{minipage}[t][0pt]{\linewidth}         \setstretch{3}         \english     \end{minipage}          \begin{minipage}[t]{\linewidth}         \setstretch{3}         \spanish     \end{minipage}          \end{document}      ![Sample of dual line translation](http://i.stack.imgur.com/KfYy3.png) How can I automatically align new sentences? For bonus points, how can I modify this method to manually indicate when one sentence in english aligns to two in spanish? I would like the paragraph to flow naturally, I don't want to add a line break after each sentence or use a package that essentially does that.


title: LaTeX style or macro for detailed response to referee report

text: Is there a suitable macro (or even style) for responses to referees and editor? These often entails several points to that need to be addressed. It would be nice to, say, quote the original text (possibly numbered) and the show the response slightly indented, as in > a) Spell foo as bar > >> We opted to follow the ABC style of ... > > b) Include reference to Really, Important and Stuff (2010) > >> Section 2 has been updated and the discussion ...


title: BibTeX -- how to write more information in the output

text: I have a nice detailed bib file, but the output shows more less, than I want.               @book{konstruktionselemente,       title={{Konstruktionselemente des Maschinenbaus~2: Grundlagen von Maschinenelementen f{\"u}r Antriebsaufgaben}},       author={\textsc{Steinhilper}, Waldemar and \textsc{Sauer}, Bernd},       series={6. Auflage},       publisher={Springer-Lehrbuch}       year={2008},       isbn={978-3-540-76653-7},       url={http://www.springer.com/engineering/mechanical+eng/book/978-3-540-76653-7},       pages={30-45}}      What should I do, to write out all informations from the bib file? How can I controll what should be visible?


title: Is there a way to make standard LaTex PDF output look good *on screen* as well

text: While LaTeX-based PDFs are generally very good when printed, I find most of them really hard and annoying to read on-screen when viewing the full page. Most line widths are very small, which results in badly rendered screen fonts or e.g. boxes with some non-displayed lines. Documents produced with other software don't suffer so much from this. For example:   * try reading this letter on screen in a PDF reader such as Adobe Reader.    * or see the box in this document on page 2, at certain zoom levels the left line of the box is not shown) Besides zooming in in the PDF reader (I don't like that, because I loose overview), or changing the default Latex font, is there an easy way to make LaTeX PDFs more on-screen readable? (PS: I use Windows)


title: Strange behaviour using roman pagenumbering

text: I am using `pagenumbering{roman}` for my titlepage tables and `pagenumbering{arabic}` for the rest. My problem is, that the part with roman numbering behaves strange, I try to explain it as follows:               first page/titlepage: no numbering     second page:          i     third page:           no numbering     fourth page:          iii     fifth page:           no numbering     sixth page:           v     seventh page:         no numbering     eighth page:          no numbering     ninth page:           viii      What I would like is an uninterrupted numbering from i to viii. Can someone help me with that? P.S.: This is a shortened version of my preamble:               \documentclass[a4paper,12pt]{report}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[ansinew,latin1]{inputenc}     \usepackage{setspace}     \usepackage{geometry}     \onehalfspacing     \setcounter{secnumdepth}{4}     \setcounter{tocdepth}{1}          \begin{document}          \pagestyle{empty}     \clearpage     \pagenumbering{roman}          \begin{titlepage}     \newgeometry{margin=3cm}     \centering          Some text          \end{titlepage}               \tableofcontents     \cleardoublepage     \newpage     more text     \newpage     some more text          \newpage     some more text          \newpage     some more text          \newpage     some more text          \newpage     some more text          \pagestyle{plain}     \clearpage     \pagenumbering{arabic}     main document               :     :     \end{document}


title: matlab2tikz does not capture legend title?

text: I generate a plot in MATLAB using the code below (MWE):               x = [1:100];     y = x.^0.5;     [hLine1]=semilogx(x,y);     hleg1 = legend(sprintf('%.4f',0.4334));     set(get(hleg1,'title'),'string','test');     set(hleg1, 'EdgeColor', 'w');     set(hleg1,'Location','NorthWest');      ![sample matlab plot.](http://i.stack.imgur.com/2JlI7.png) (The legend title seems to not be factored in when using `set location Northwest` but that is a question for the MATLAB S.E...) I slide the legend to a different position in the plot and then convert it to a .tikz. It is compiled in latex with:               \documentclass[11pt,a4paper]{report}     \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}          \begin{figure}     \centering         \input{fig1.tikz}         \caption{...}     \end{figure}          \end{document}      This creates the following plot: ![latex graph](http://i.stack.imgur.com/5IDlX.png) the legend's title has disappeared. I can not find it anywhere in the .tikz created file. So this may be a glitch with matlab2tikz but any workaround? Thanks. Edit: So this is probably a matlab2tikz issue. Leaving that bit, I managed to get a legend title in tikz using some code I found. But it does not center the title over the line + text, just the text. Full MWE to show the problem:               \documentclass{article}     \usepackage{pgfplots}     % and optionally (as of Pgfplots 1.3):     \pgfplotsset{compat=newest}     \pgfplotsset{plot coordinates/math parser=false}     \newlength\figureheight     \newlength\figurewidth     \begin{document}          \begin{tikzpicture}          \begin{axis}[%     width=4.52083333333333in,     height=3.565625in,     scale only axis,     xmode=log,     xmin=1,     xmax=100,     xminorticks=true,     ymin=1,     ymax=10,     legend style={at={(0.03,0.97)},anchor=north west,draw=none,legend cell align=left}     ]     \addlegendimage{legend image code/.code=}   %These two lines add the title to the legend     \addlegendentry{example}                    %But I would like it centered over the line and the text     \addplot [color=blue,solid]       table[row sep=crcr]{1 1\\     2   1.4142135623731\\     3   1.73205080756888\\     4   2\\     5   2.23606797749979\\     6   2.44948974278318\\     7   2.64575131106459\\     8   2.82842712474619\\     9   3\\     10  3.16227766016838\\     };     \addlegendentry{0.4334};     \end{axis}     \end{tikzpicture}%     \end{document}      ![legend title example](http://i.stack.imgur.com/Voz8H.png) How could I center the legend title? Thanks


title: How to view pdf on Windows 7 using Vim with latexsuite plugin?

text: I sometimes use a Windows 7 laptop and I'm trying to set up Vim and latexsuite. I can compile with `\ll` and then go view the PDF by manually opening it. I would like to set it up like I've done with Mac and Ubuntu where `\lv` opens the file in the viewer. preferably in sumatra pdf, but only because I hear that it is light weight and refreshes open compile. I've tried suggestions on Google without luck. Is there something major that I'm missing? I don't typically use Windows. I tried to manually set it to sumatra pdf, also. I don't get errors, I just see the latex viewer call in the menu bar (`:call Tex_ViewLaTeX`). Here's my _vimrc:               " general     set columns=80     set lines=40     set nu     set expandtab     set smartindent     set tabstop=4     set shiftwidth=4          " for vim-R-plugin2     set nocompatible      syntax enable      let vimrplugin_conqueplugin = 0     let vimrplugin_conquevsplit = 0     let vimrplugin_vimpager = "no"          " for vimlatexsuite (and Vim-R-plugin)     " REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.     set shellslash     filetype plugin on          " IMPORTANT: grep will sometimes skip displaying the file name if you     " search in a singe file. This will confuse Latex-Suite. Set your grep     " program to always generate a file-name.     set grepprg=grep\ -nH\ $*          " OPTIONAL: This enables automatic indentation as you type.     filetype indent on          " OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to     " 'plaintex' instead of 'tex', which results in vim-latex not being loaded.     " The following changes the default filetype back to 'tex':     let g:tex_flavor='latex'          " to get default compile to pdf     let g:Tex_DefaultTargetFormat = 'pdf'     let g:Tex_MultipleCompileFormats='pdf, aux'          " ser pdf viewer (for windows only)     " let g:Tex_ViewRule_pdf = 'c:/Program Files\ (x86)/SumatraPDF/SumatraPDF'


title: How to change certain pages into landscape/portrait mode

text: How can I change some pages into document into landscape mode, while leaving the others in portrait mode (or vice versa)?


title: Portrait to Landscape page

text: > **Possible Duplicate:**   >  How to change certain pages into landscape/portrait mode How to change the page from Portrait to Landscape? Page 1 should be in Portrait then Page 2-3 is in Landscape..


title: How to switch from portrait to landscape page orientation?

text: \documentclass[12pt,a4paper]{article}  \documentclass[12pt,a4paper]{article}     \usepackage{amsmath}\usepackage{amssymb}     \usepackage{graphicx}          \usepackage[left=1.25in, right=1.0in, top=1.25in, bottom=1.0in]{geometry}          \newcommand{\piRsquare}{\pi r^2}                  \title{{\bf Your Research Title}}     \author{Your Name }          \date{December 17, 2013}                         %     \begin{document} \baselineskip=22pt     \maketitle     %     \begin{abstract}     You have to write the abstract here.     \end{abstract}       %     \tableofcontents          %     \section{Introduction}     Albert Einstein (/ˈælbərt ˈaɪnstaɪn/; German: [ˈalbɐt ˈaɪnʃtaɪn] ( listen); 14 March 1879 – 18 April 1955) was a German-born theoretical physicist who developed the general theory of relativity, one of the two pillars of modern physics (alongside quantum mechanics).[2][3] While best known for his mass–energy equivalence formula E = mc2 (which has been dubbed "the world's most famous equation"),[4] he received the 1921 Nobel Prize in Physics "for his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect".[5] The latter was pivotal in establishing quantum theory.     Near the beginning of his career, Einstein thought that Newtonian mechanics was no longer enough to reconcile the laws of classical mechanics with the laws of the electromagnetic field. This led to the development of his special theory of relativity. He realized, however, that the principle of relativity could also be extended to gravitational fields, and with his subsequent theory of gravitation in 1916, he published a paper on the general theory of relativity. He continued to deal with problems of statistical mechanics and quantum theory, which led to his explanations of particle theory and the motion of molecules. He also investigated the thermal properties of light which laid the foundation of the photon theory of light. In 1917, Einstein applied the general theory of relativity to model the large-scale structure of the universe.[6]     \begin{figure} \centering \includegraphics[scale=0.60]{333.png} % d3.png: 900x400 pixel, 72dpi, 31.19x14.29 cm, bb=0 0 884 405 \caption{ MSCI Sector performances.} \label{Fig:16} \end{figure}       \end{document}      I want to switch from portrait to landscape page orientation. How can I do it? ![enter image description here](http://i.stack.imgur.com/Uw0ik.png) The texts have been rotated but the image. What else to do for the image?


title: How do I combine formatted page numbers in an index

text: If I format page numbers in an index, they show up in addition to non- formatted numbers. This minimal example:               \documentclass{article}     \usepackage{makeidx} \makeindex \begin{document} page 1         \index{foo}        % normal page number     \index{foo|textbf} % bold page number     \index{bar}        % normal page number         \pagebreak page 2     \index{bar|textbf} % bold page number     \printindex \end{document}      Creates the following index bar, 1, **2**   foo, 1, **1** But I would prefer to combine a normal page number and a formatted page number as bold page number and also allow formatted page number in page sequences: bar, 1- **2**   foo, **1** Maybe page sequences are too complicate, for instance if page 1 and 3 are normal, but page 2 is formatted. But at least the duplicated single page number (in this example "1, **1** ") should not be there. More precise I do not use `textbf` but a custom `bfhref` for hyperlinked page numbers, but this should not be the issue               \newcommand{\bfhref}[1]{\textbf{\hyperpage{#1}}}


title: How to put footnote in the lower navigation bar?

text: > **Possible Duplicate:**   >  beamer: footnote text collides with navigation symbols I know `beamer` discourages the usage of footnotes. But I think for academic presentations, we always need to mark the resource of figures, or theories. Thus citation (or some simple explanation) is really in need. I plan to incorporate it into the lower navigation bar, where normally are the presentation title or name of presenter (I think it is not necessary, except the audience comes in the middle of your presentation).


title: How to put citations in footnote using square bracket style?

text: I would like the simple command `\cite` produces an entry in the bibliography (at the end of the doc) and in the footnote, using the format:               bla bla bla~\cite{myref} bla bla.      whose result is: bla bla bla [1] bla bla. * * * [1] author, journal, year * * * I have found this : Biblatex cite with footnote only once, with use of brackets [edit]: It is almost what I need, but without the superscript and with less information in the footnote (only author, journal, year, volume, page). But I have no idea how to do that. [edit2]: I cannot find a solution. As I should send my thesis very soon, I am asking for help, once again. Many thanks. Thanks for your help!


title: Page layout and margins

text: My CV is currently the image on the left, but how would I shift my name up and make the format (structure of the page etc.) of my CV which is on the left of the image below, like the cv on the right of the image below? My latex code (my cv on the left image) is below. ![enter image description here](http://i.stack.imgur.com/y3Tk0.jpg)               \documentclass[10pt]{article}     \usepackage{array, xcolor, lipsum, bibentry}     \usepackage[margin=3cm]{geometry}          \title{\bfseries\Huge John Doe}     \author{}     \date{}          \definecolor{lightgray}{gray}{0.8}     \newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}     \newcolumntype{R}{p{0.8\textwidth}}     \newcommand\VRule{\color{lightgray}\vrule width 0.5pt}               \begin{document}     \maketitle     \vspace{1em}     \begin{minipage}[ht]{0.48\textwidth}     Address Line 1\\     Address Line 2\\     Address Line 3\\     Address Line 4\\     Address Line 5     \end{minipage}     \begin{minipage}[ht]{0.48\textwidth}     Mobile: 123-456789\\     Email: myemail@gmail.com\\     Date of Birth: 01/01/2012\\     Citizenship: My citizenship     \end{minipage}     \vspace{20pt}          \section*{Education}     \begin{tabular}{L!{\VRule}R}     2008--2012&MSc in Computer Science, Great University, Country.\vspace{5pt}\\     2006--2008&BSc in Life Science, Great University, Country.\\     \end{tabular}          \section*{Employment}     \begin{tabular}{L!{\VRule}R}     2011--today&{\bf Company Name.} Head of Department. Add my job description here. Add my job description here. Add my job description here. Add my job description here.\\     &\begin{itemize}     \item Add my job description here.     \item Add my job description here.Add my job description here.Add my job description here.     \item Add my job description here.Add my job description here.Add my job description here.Add my job description here.     \item Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.Add my job description here.     \end{itemize}      \end{tabular}          \section*{Awards and Achievements}     \begin{tabular}{L!{\VRule}R}     2008&Gold medal.\vspace{5pt}\\     2006&Silver medal.\\     \end{tabular}          \section*{Organisational Experience}     \begin{tabular}{L!{\VRule}R}     2008&This event.\vspace{5pt}\\     \end{tabular}               \section*{Languages}     English, Spanish, French, German               \end{document}


title: Table: vertical alignment with variable height

text: I have the following code               \usepackage{tabularx}     \begin{document}          \begin{table}[t]     \begin{center}     \renewcommand{\arraystretch}{1.3}     \begin{tabularx}{\textwidth}{crX}     \hline     \textbf{Chapter} & & \textbf{Reference} \\     \hline \\ \vspace{-11mm} \\     1 & \small{a} & \small{text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text} \\     \\ \vspace{-12mm} \\ \hline \\ \vspace{-12mm} \\     2 & \small{b} & \small{text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text} \\     \\ \vspace{-12mm} \\ \hline \\ \vspace{-12mm} \\     3 & \small{c} & \small{text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text} \\     \\ \vspace{-12mm} \\ \hline \\ \vspace{-12mm} \\     \end{tabularx}     \end{center}     \end{table}          \end{document}      which produces this ![enter image description here](http://i.stack.imgur.com/KY8gQ.png) Now, in the first column, I'd like to have "1" aligned at the top, "2" aligned at the center, and "3" aligned at the bottom. How can I obtain this? Thanks in advance.


title: How can I combine endfloat and chngcntr?

text: Is there any way to combine the packages `endfloat` and `chngcntr`? I would like to have all tables at the end of the document (with `endfloat`) and a numbering that includes the section number (e.g., 1.1.). The example below produces "3.1" (even though it should be "1.1"), since I guess `endfloat` builds a new section at the end of the document? Thanks so much for any ideas! MWE:               \documentclass[11pt, a4paper]{article}     \usepackage[nolists, fighead, tabhead]{endfloat}          \usepackage{chngcntr}                    \counterwithin{table}{section}                     \begin{document}          \section{test1}     \begin{table}[!htp]     \caption{This should be table 1.1}     \end{table}          xx          \section{test2}     \section{test3}     \end{document}


title: Including section titles in fancyhf headers

text: I would like to include the section name of the page's displayed section in my header tags in the fancyhdr package, something like               \fancyhf[HR]{SECTION NAME}     \fancyhf[HL]{SUBSECTION NAME}      How can I go about doing this?


title: Chemnum/PSfrag - Replacement of Characters in eps

text: Using the chemnum package, I encounter problems with replacing temporary labels in eps files. I first thought that it is a chemnum problem, but the result is the same using psfrag instead of chemnum. The problem is: Not only my temporary labels are replaced (correctly) but also other characters present in the eps just vanish (but not all). Attached you see on the left my eps and on the right what I get in the PDF which is produced by PDFlatex. Thanks for any help! ![enter image description here](http://i.stack.imgur.com/XASYu.png) I think the problem is the setting of the font. If you have in the preamble only               \renewcommand{\familydefault}{\sfdefault}      everything seems fine. adding               \renewcommand{\sfdefault}{phv}      or also using               \usepackage{helvet}      gives strange character-replacement in the eps. So probably the more exact question is: how can I set my font to a sans-serif font with psfrag working?               \documentclass[a4paper]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc}          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts} \usepackage{amstext} \usepackage{amsthm} \usepackage[babel]{csquotes} \usepackage{fancybox}          \usepackage[hang,center,nooneline,labelfont=bf]{caption}          \usepackage{kvoptions} \usepackage[plainpages=false, pdfpagelabels,pdftex]{hyperref}          \usepackage{siunitx}          \usepackage{varioref}          \usepackage{endnotes} \usepackage{booktabs} \usepackage{supertabular}          \usepackage{picinpar} \usepackage{graphicx} \usepackage{auto-pst-pdf} \usepackage{psfrag} \usepackage{chemnum} \setchemnum{replace-tag=temp}          \usepackage[version=3]{mhchem}          \usepackage{geometry}          \usepackage{textcomp}          \usepackage{listings}          \renewcommand{\sfdefault}{phv} \renewcommand{\familydefault}{\sfdefault}          \linespread{1.05}          \makeindex          \usepackage[backend=biber,style=chem-angew]{biblatex} \addbibresource{references.bib}          \usepackage{floatrow} \newfloat{scheme}{htbpH}{test}%[section] \floatname{scheme}{Scheme}          \begin{document}          \begin{figure}[H]     \replacecmpd{alc}     \replacecmpd{Br} \begin{center} \includegraphics[scale=0.75]{test.eps} \label{test} \caption{test} \end{center} \end{figure}          \end{document}


title: Footer in Warsaw theme

text: I have the following code, but can't get a footer to work:               \documentclass{beamer}          \usepackage{textpos}     \usetheme{Warsaw}          \addtobeamertemplate{frametitle}{\vskip-9ex}{\vskip-4ex}          \makeatother          \title{The Title}          \author{The }          \institute{The Institute}               \definecolor{WSUG}{RGB}{0,100,90}          \definecolor{WSUY}{RGB}{255,225,122}          \setbeamercolor*{palette primary}{use=structure,fg=white,bg=WSUG}          \setbeamercolor*{palette quaternary}{fg=WSUG,bg=WSUY}          \usepackage{amsmath}          \usepackage{amssymb}          \usepackage{amsthm}          \usepackage{wasysym}          \usepackage{parskip}          \usepackage{fullpage}          \usepackage[ansinew]{inputenc}          \newcommand*\Eval[3]{\left.#1\right\rvert_{#2}^{#3}}          \usepackage{graphicx}               \begin{document}               \addtobeamertemplate{frametitle}{}{          \begin{textblock*}{100mm}(-2.45cm,-.15cm)          \includegraphics[height=1.3cm]{../PresentEssay/W2}          \end{textblock*}}                    \begin{frame}{Masters Essay Presentation}          \begin{center}     \textbf{{\Large PROBABLILTY LOSS MODELS}}     \\*[4ex]     {\Large by}     \\*[4ex]     \textbf{{\large RANDY GOLDSWORTHY}}     \\*[4ex]     \textbf{{\large SUPERVISOR: PROFESSOR YIN}}     \\*[4ex]     \end{center}          \end{frame}          \begin{frame}{Introduction}          \end{frame}          \end{document}


title: Displaying in-text citations in a compressed way (e.g. [1-3]) instead of the default one [1]-[3] using cite package inside IEEEtran/journal mode

text: I have been trying to display the in-text citations in the following format: **[1-3], or [1, 6-8]** which looks like it is the default one inside the `cite` package, but what I get is: **[1]-[3]** Specifically, I'm using the `IEEEtran` template (`bare_jrnl` to be more precise) and the bibliography is built in the following way:               \bibliographystyle{IEEEtran}     \bibliography{IEEEabrv,mybib}      The `cite` package is obviously loaded. I have looked the documentation of both `IEEEtran` and `cite`, but I have not been able to find a solution.


title: \foreach problem

text: I have the following problem I want to avoid a `\foreach` loop in a macro if not necessary, but I don't know how to do a test in a tikz picture, I undersand why \ifthenelse can not work. In my example I don't want the foreach loops if graduation are set to 0.               \documentclass[tikz]{standalone}          \pgfkeys{/tikz/.cd,       CylCol/.store in=\CylCol,       CylCol=gray,       CylFillCol/.store in=\CylFillCol,       CylFillCol=blue,       CylFill/.store in=\CylFill,       CylFill=0,       CylRatio/.store in=\CylRatio,       CylRatio=.08,         CylGrad/.store in=\CylGrad,       CylGrad=5,       CylSecondGrad/.store in=\CylSecondGrad,       CylSecondGrad=0,        }          \newcommand{\TikzCylindre}[1][]{%         \begin{scope}[#1]         % Grisé des surfaces du cylindre.         \shade[left color=\CylCol!30, right color=\CylCol!5]%              (-1,1)--(-1,0) arc (180:360:1 and \CylRatio) --(1,0) -- (1,1);         \shade[left color=\CylCol!5, right color=\CylCol!30]%             (0,1) ellipse (1 and \CylRatio);         \draw[\CylCol!50] (1,0) arc (0:180:1 and \CylRatio)--(-1,0) ;              % Remplissage du cylindre         \shade[left color=\CylFillCol!40, right color=\CylFillCol!10]%              (-1,\CylFill)--(-1,0) arc (180:360:1 and \CylRatio) --(1,0) -- (1,\CylFill);         \fill[color=\CylFillCol!25] (0,\CylFill) ellipse (1 and \CylRatio);         \draw[\CylFillCol!50!black!50] (1,0) arc (0:180:1 and \CylRatio)--(-1,0) ;         \draw[\CylFillCol!50!black!50] (0,\CylFill) ellipse (1 and \CylRatio) ;              % dessin des bords du cylindre         \draw[semithick] (-1,1)--(-1,0) arc (180:360:1 and \CylRatio)--(1,0)--(1,1);         \draw[semithick] (0,1) ellipse (1 and \CylRatio);                     \begin{scope}[shift={(0,-\CylRatio)}]         \pgfmathtruncatemacro\CylMaxGrad{\CylGrad-1}         \foreach \y in {1,2,...,\CylMaxGrad}                 {\draw[semithick] (0,\y/\CylGrad)                     arc (270:260:1 and \CylRatio) ;                 \draw[semithick] (0,\y/\CylGrad)                     arc (270:280:1 and \CylRatio) (0.2,\y/\CylGrad)                     node[right,yslant=\CylRatio](\y){\footnotesize\y};                 };              \pgfmathtruncatemacro\CylMaxGrad{\CylSecondGrad-1}         \foreach \y in {1,2,...,\CylMaxGrad}             {\draw(0,\y/\CylSecondGrad) arc (270:265:1 and \CylRatio) ;             \draw (0,\y/\CylSecondGrad) arc (270:275:1 and \CylRatio) ;             };             \end{scope} ;              \end{scope}         }          \begin{document}          \begin{tikzpicture}              \TikzCylindre[x=1.5cm,y=4cm,CylFill=.8,CylSecondGrad=10] ;          \end{tikzpicture}          \end{document}      Any other inprovments are welcome. ![enter image description here](http://i.stack.imgur.com/IdViS.png)