title: How to pass a LaTeX argument verbatim to lua?

text: I would like to pass an argument verbatim from LaTeX to lua including LaTeX commands and end of line characters. The example below takes care of the former issue, but not of the latter. Is there a way of addressing both issues simultaneously, perhaps by using `\obeylines` to address the second problem? If so, how? _There is a solution to a similar question atIn LuaLaTeX, how do I pass the content of an environment to Lua verbatim? but it still prints output in addition to passing the argument._ **Thanks!**               \documentclass[12pt]{article}          \usepackage{luacode}          \directlua{dofile("myluaprogram.lua")}     \newcommand{\myluaroutine}[1]        {\directlua{myluaroutine("\luatexluaescapestring{\detokenize{#1}}")}}          \begin{document}          \myluaroutine{     I     want     to      have every line     separate     in     lua     without     expanding     off     \latexcommands     }          \end{document}


title: Biblatex bibilographic data in the main file

text: I have been using Bibtex. When I send a source file to a journal I always put the bbl file into it. I am looking into Biblatex and it looks like that will not work. Is there a way to get bibliographic data into the main LaTeX file with Biblatex, or do you have to send separate files? Would the answer change if I used Biber with it?


title: Bold list item for entire list

text: How do I make it such that all text in my list are bold by default? Is repeating the many lines of `\textbf` the only way to achieve this?               \begin{enumerate}[label=\arabic*, parsep=10pt, font=\bfseries]          \item \textbf{List Item}     \item \textbf{List Item}     \item \textbf{List Item}     \item \textbf{List Item}     \item \textbf{List Item}          \end{enumerate}


title: Page layout design in KOMA script

text: This is follow up of the previous question, Document class for designing a book. Majority of respondents suggested that I design the the page layout using the class I was using for writing the text, in my case `scrbook`. I have, of course studied the KOMA script manual and I find page layout settings pretty cumbersome. The page is divided into _n_ columns and _n_ rows, of which outer two, inner one, bottom two and top one are margins. On the other hand, I have the following instructions from the book designer:               page dimensions: 210 x 245 mm2     inner margin: 25 mm     outer margin: 10 mm     upper margin: 10 mm     bottom margin: 25 mm     text block width: 120 mm      My calculation from data above:               marginal notes width: 55 mm      I also attach the sample of the required layout, created in non-LaTeX program. Please, advice me how to do this layout in scrbook class. In this moment, I am interested in **page layout only** , as I have solved some of other design problems myself or with other people's help already. Thanks. ![enter image description here](http://i.stack.imgur.com/sC2h2.png)


title: How to add the footnote in the right down corner with the background color(only page)&change time background color

text: My question can be seen as follows ![right down corner&background color](http://i.stack.imgur.com/l0g4j.jpg) My question is   1. put the footnote in the right down corner and change color to the background    2. change time background color(may be solved by the question 1) My code is （forgive me by using the Werner MWE）               \documentclass[14pt]{beamer}% http://ctan.org/pkg/beamer     \let\Tiny\tiny% http://tex.stackexchange.com/q/58087/5764     \usetheme{Berkeley}     \usepackage[timeinterval=1]{tdclock}     \makeatletter     \beamer@headheight=1.5\baselineskip     \makeatother     \setbeamercolor{normal text}{bg=black!10}          \setbeamertemplate{footline}      {     \leavevmode%     \hbox{%     \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%     \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}     \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}      \end{beamercolorbox}}%     \vskip0pt%     }               \begin{document}     \title[Title]{My title}     \subtitle{Subtitle}     \author{Author}     \institute[Institute]{My institute}     \date[\initclock\tdtime]{\today}     \logo{\color{blue!50}\scalebox{2}{\TeX}} % you can % it     \begin{frame}       \titlepage     \end{frame}          \section{A section}     \subsection{A subsection}     \begin{frame}       \frametitle{Frame title}       \framesubtitle{frame subtitle}       Some text     \end{frame}          \begin{frame}       Some more text     \end{frame}          \section{Another section}     \subsection{Another subsection}     \begin{frame}       Some final text     \end{frame}     \end{document}


title: reference style avoid omitting author name

text: I tried Harvard, urst, JF, still have the following references ![enter image description here](http://i.stack.imgur.com/HXyIU.png) I would like to show the same authors' names again instead of using the long line to replace them. How should I do this?


title: Tikz externalization and directory questions

text: I store my exercices in the following way :   * Super directory `Base_Exos` on witch points the `$TEXINPUTS` variable.   * Sub-directories, one by class level.   * Sub-Sub-directies, one by chapter   * Sub-Sub-Sub-directories, one by exercice. This S-S-S-directory contains the text called `texte.tex` with eventually the correction called `corrige.tex` and eventually some pictures. I can use any exercice in a main.tex file witch is far from `Base_Exos` by :               \input{3_eme/Droites/exo-002/texte}      if this `texte.tex` contains a picture reference, it is :               \includegraphics{3_eme/Droites/exo-002/picture-1}      Now, I want to use `external tikz library` and it has still compatible with my Personal Directory System and I don't want to externalize all tikzpicture, just the heavy ones. That means, that want that the pdf picture produced by the externalization procedure are produced in the same directory than witch the `texte.tex` file is stored, not in the directory where `main.tex` is. So far, I did in `main.tex` :               My pranbule     \usetikzlibrary{external}     \tikzexternalize % activate     \tikzexternaldisable % disable for most pictures     \begin{document}     \input{3_eme/Droites/exo-002/texte}     \end{document}      in `3_eme/Droites/exo-002/texte` file               ...     \tikzexternaldisable     \begin{tikzpicture}     ...     \end{tikzpicture}     \tikzexternaldisable     ...      But the pdf is produced in the `main.tex` file directory instead of in the `texte.tex` one. **Questions**   1. How to set the multiple option command to produce the pdf file in the `texte.tex` directory ?   2. How to have this pdf files independant from the `main.tex` file, ie if I include the same `texte.tex` in two different `main.tex`, no new pdf file will be produced, then no second loss of time ?


title: Getting the current value of a global variable into a prop list

text: This is a more or less direct follow up to this question. The problem there was to get the current value of a global variable into a LaTeX3 prop list. The trick was to use the `V` variant to get the _value_ rather than to record the token list corresponding to the name of the variable. Now the problem is the same, except instead of the value of a variable, I need the _output of a calculation_. I've tried playing around with `V`s and `x`s in various places in the following MWE, but I can't get the right thing out.               \documentclass{article}     \usepackage{expl3,xparse}     \ExplSyntaxOn     \int_new:N \g_seamus_foo_int     \int_new:N \l_seamus_tmpa_int          \cs_new:Npn \seamus_set_int #1 {       \int_set:Nn \g_seamus_foo_int {#1}     }          \cs_new:Npn \seamus_modify_int #1 {       \int_set:Nn \l_seamus_tmpa_int {         \int_mod:nn {\g_seamus_foo_int + #1}{60}       }       \int_gset_eq:NN \g_seamus_foo_int \l_seamus_tmpa_int     }          \cs_new:Npn \seamus_return_int #1 {       \int_compare:nNnTF {\g_seamus_foo_int} > {#1} {Big (\int_eval:n{\g_seamus_foo_int})} {Small (\int_eval:n{\g_seamus_foo_int})}     }          \prop_new:N \g_seamus_prop_list          \cs_new:Npn \seamus_set_value #1#2 {       \prop_gput:NnV \g_seamus_prop_list {#1}{#2}     }          \cs_new:Npn \seamus_get_value #1 {       \prop_get:Nn \g_seamus_prop_list {#1}     }          \NewDocumentCommand\Marker{m}{       \seamus_set_value{#1}{         \seamus_return_int{30}       }     }          \NewDocumentCommand\ReturnMark{m}{       #1: \seamus_get_value{#1}     }     \NewDocumentCommand\SetNumber {m} {       \seamus_set_int{#1}     }          \NewDocumentCommand\ChangeNumber{m}{       \seamus_modify_int{#1}     }          \NewDocumentCommand\PrintNumber{}{       \seamus_return_int{30}     }     \ExplSyntaxOff     \begin{document}     Set at 12: \SetNumber{12}\PrintNumber\\     Add 7: \ChangeNumber{7}\PrintNumber\ (Marker foo) \Marker{foo}\\     Add 12: \ChangeNumber{12}\PrintNumber (Marker bar) \Marker{bar}\\     Add 30: \ChangeNumber{30}\PrintNumber\\     \ReturnMark{foo}\\     \ReturnMark{bar}          \end{document}      This is as minimal as I could make the example. The actual use case is more complex still. The main idea is that the `\Marker{foo}` command should save the current value of what `\seamus_return_int` outputs in the prop list `\g_seamus_prop_list` with `foo` as the key. So the desired output is that `\ReturnMark{foo} should give "foo: Small (19)" and`bar` should be "bar: Big (31)". However, `\ReturnMark` seems to use the value of `\g_seamus_foo_int` when called, rather than the value saved when `\Marker` was called. I'm sure there's some expansion-fu I am not understanding...


title: SWOT Table - how to convert to an article?

text: I need a SWOT analyse in color, and I found this one at http://www.mostlycolor.ch/2013/10/colored-blocks-in-beamer.html : ![enter image description here](http://i.stack.imgur.com/fk2Hi.png) Can someone help me by converting the beamer, so I can use it in an article? My preamble and document look like this:               \documentclass[a4paper,12pt,oneside]{article}     \usepackage[english]{babel}     \usepackage{tikz}     \usepackage{pgf}     \usetikzlibrary{shapes,arrows,positioning,calc,threeparttable}      \usepackage{tabu}     \usepackage{hyperref}     \usepackage{longtable}     \usepackage{array}     \usepackage{multirow,tabularx,booktabs}          \newenvironment<>{problock}[1]{          \begin{actionenv}\#2     \def\insertblocktitle{#1}     \par     \mode<presentation>{     \setbeamercolor{block title}{fg=white,bg=green!50!black}     \setbeamercolor{block body}{fg=black,bg=green!10}     \setbeamercolor{itemize item}{fg=red!20!black}     \setbeamertemplate{itemize item}[triangle]     }     \usebeamertemplate{block begin}}     {\par\usebeamertemplate{block end}\end{actionenv}}     \newenvironment<>{conblock}[1]{          \begin{actionenv}#2     \def\insertblocktitle{#1}     \par     \mode<presentation>{     \setbeamercolor{block title}{fg=white,bg=red!50!black}     \setbeamercolor{block body}{fg=black,bg=red!10}     \setbeamercolor{itemize item}{fg=green!20!black}     \setbeamertemplate{itemize item}[triangle]     }     \usebeamertemplate{block begin}}     {\par\usebeamertemplate{block end}\end{actionenv}}          \begin{document}          \section{SWOT}     \begin{frame}{SWOT Matrix}     \begin{columns}[t]     \begin{column}{.5\textwidth}     \begin{problock}{\textsc{strengths}}     \begin{itemize}     \item Business     \begin{itemize}     \item revenue: \$10 B     \item market share: 70\%     \end{itemize}     \item Product     \begin{itemize}     \item 32-bit color     \item written in OpenCL     \end{itemize}     \end{itemize}     \end{conblock}     \end{column}     \begin{column}{.5\textwidth}     \begin{conblock}{\textsc{weaknesses}}     \begin{itemize}     \item Business     \begin{itemize}     \item very expensive     \item gold plating issues     \end{itemize}     \item Product     \begin{itemize}     \item requires at least 128 cores     \item no gamut mapping     \end{itemize}     \end{itemize}     \end{problock}     \end{column}     \end{columns}     \begin{columns}[t]     \begin{column}{.5\textwidth}     \begin{problock}{\textsc{opportunities}}     \begin{itemize}     \item Business     \begin{itemize}     \item everybody wants color     \item clouds love rainbows     \end{itemize}     \item Product     \begin{itemize}     \item cameras deliver 14 bits per pixel     \item big data is pervasive     \end{itemize}     \end{itemize}     \end{conblock}     \end{column}     \begin{column}{.5\textwidth}     \begin{conblock}{\textsc{threats}}     \begin{itemize}     \item Business     \begin{itemize}     \item pursue low hanging fruit     \item people do not care about color quality     \end{itemize}     \item Product     \begin{itemize}     \item competitors use CIELAB     \item spectral is a new trend     \end{itemize}     \end{itemize}     \end{problock}     \end{column}     \end{columns}     \end{frame}          \end{document}


title: special cite-style i need to confirm

text: (this is my first post in this forum, so i'am trieng to stick to the guideline) I need to quote in a special Form, showed as desktop-picture here: ![enter image description here](http://i.stack.imgur.com/dKKYR.png) I searched the web and found this:               \usepackage[authoryear]{natbib}     \bibliographystyle{plainnat}     \setcitestyle{square,aysep={}}      So if I write all Authors in capitals, it kinda look alike, but not entirely. Above all the first letter of the Author's name, is a bit bigger then the rest of the name, which i can't fix in my code. I know that you can design a own cite-style somehow, but if i look at the guides there is no way i can do that as a tex-novice. So I would like to ask if there is an easy way or some kind of tex-command to fullfill that design, especially with this slightly bigger first letter. Here is my flawed design for comparison: ![enter image description here](http://i.stack.imgur.com/26Bht.png) (I didn't find an existing thread helping myself with a lack of tex-skills. I hope this thread confirms to the forum-rules, thanks beforehand.)


title: Double index in the same documents

text: I have a question about a problem that I am facing. I have a document composed by two different and independent parts in two where the second parts refers to just some elements of the first one. Both the parts shares a common information as for example bibliography. What I would like to generate is a document where the numbering of each parts start from 1 (also Figures, Table etc. follow the same numbering...). For example: > **Part I** > > _Chapter 1_ Section 1.x Sub Section 1.x.y > > _Chapter 2_ Section 2.x Sub Section 2.x.y -->Fig. 2.x.1 > > etc. > > **Part II** > > _Chapter 1_ Section 1.x Sub Section 1.x.y > > _Chapter 2_ Section 2.x Sub Section 2.x.y -->Fig. 2.x.1 > > etc. As I said, the second part refers somehow to elements in the first one. Therefore, inside the Part II -Chapter 2 -Section 2.x, I can have for example, a reference to Section 2.x of Part I (lets say Fig. 2.x.1) Is it possible to do?


title: "Failed to find ...x.pdf" error message in Texstudio

text: I have been using Miktex for years and now wish to use Texstudio as it looks much easier and faster. To do so, I set up Texstudio on my PC and wrote a very simple code to start off. However, the code working in Miktex is not working in Texstudio. The error message launched is "Failed to find ...x.pdf" and the code is as follows,                \documentclass[a4paper, 11pt]{article}      \begin{document}      Hello World!     \end{document}      I would be happy if you let me know what I am doing wrong Any help would be greatly appreciated Cheers Günal


title: What's wrong with the fading of this TikZ node's shadow?

text: I'm trying to add a shadow with a faded edge to nodes. With the following document I only get a grey circle, with a hard edge, slightly below right of the node. This is a snippet form my code. What am I doing wrong?               \documentclass[a4paper,10pt]{article}          \usepackage{tikz}     \usetikzlibrary{shapes,fadings}          \begin{document}     \maketitle          \begin{center}         \begin{tikzpicture}[scale=4, transform shape]              \node[circle,fill=white,draw=black,thick,preaction={fill=black,opacity=.3,transform canvas={xshift=1mm,yshift=-1mm,path fading=circle with fuzzy edge 20 percent}}] (1) at (0,0) {1};         \end{tikzpicture}     \end{center}     \end{document}


title: Meter signature in text

text: I want to mention musical piece meter directly in the text, like: _This piece is written in 4/4._ Is there a way to get time signature (4/4) in form of fraction with no fraction bar? I tried `musixtex` package but when I do: `\begin{music}\meterfrac44\end{music}` The fraction is much bigger than the rest of the text. Of course I can try to make it smaller to fit the text but maybe there's a simpler way to do this?


title: TikZ change matrix cell color background

text: I have a TikZ code that generates this: ![enter image description here](http://i.stack.imgur.com/wC3cH.png) using something along the lines of the following snippet. The full code corresponding to this snippet can be obtained from the answer to question tikz-two-blocks-matrix:                   \pgfmathparse{\y-\x<1?"draw":""}         \node[\pgfmathresult](mynode-\x-\y) at (\y,-\x) {$\times$};      but I would like to instead have the following theme for those selected nodes. The code where this example originates from can be found in the answer to this other question tikz-marking-several-blocks-in-a-matrix and uses matrix array definition rather than painting everything using TikZ: ![enter image description here](http://i.stack.imgur.com/HPSK6.png) How can I do that using TikZ? it means to basically not have a border line but rather change the background of the square to a specific color ... UPDATE: the following code and output is self-contained and shows the existing Tikz graph I have to which I would like to add the background color changes.               \documentclass{standalone}         \usepackage{tikz}              \usetikzlibrary{calc,fit,matrix,arrows,automata,positioning}     \begin{document}     \begin{tikzpicture}     [zeros/.style={},transform shape]     \foreach \y in {1,...,4}{         \foreach \x in {1,...,5}{         \ifnum\x>\numexpr\y+1         \node[zeros] (mynode-\x-\y) at (\y,-\x) {0};         \else         \pgfmathparse{\y-\x<1?"draw":""}         \node[\pgfmathresult](mynode-\x-\y) at (\y,-\x) {$\times$};         \ifnum\x<5         \ifnum\x<\y\draw[<-] (mynode-\x-\y) -- +(0,-0.7);\fi         \ifnum\x=\y\draw[<-] (mynode-\x-\y) -- +(0,-0.7);\fi         \ifnum\y<4\draw[<-] (mynode-\x-\y) -- +(0.7,-0.7);\fi         \fi         \fi         }     }     \node[fit=(mynode-1-1)(mynode-5-4),draw,thick,red,label=90:{Conquer diagonal}]{};          \begin{scope}[xshift=5.2cm]         \foreach \x[remember=\x as \lastx] in {1,...,5}{             \node (myvecs1-\x) at (0,-\x) {$\times$};             \node (myvecs2-\x) at (1,-\x) {$\times$};             \node (myvecs3-\x) at (2,-\x) {$\times$};             \node (myvecs4-\x) at (3,-\x) {$\times$};             \node (myvecs5-\x) at (4,-\x) {$\times$};             \node (myvecsn-\x) at (5,-\x) {$\times$};             \ifnum\x>1             \draw[->] (myvecs1-\x) -- (myvecs1-\lastx);             \draw[->] (myvecs2-\x) -- (myvecs2-\lastx);             \draw[->] (myvecs3-\x) -- (myvecs3-\lastx);             \draw[->] (myvecs4-\x) -- (myvecs4-\lastx);             \draw[->] (myvecs5-\x) -- (myvecs5-\lastx);             \draw[->] (myvecsn-\x) -- (myvecsn-\lastx);             \fi             }     \node[fit=(myvecs1-1)(myvecsn-5),draw,thick,green,label=90:{Apply as deep as possible}] {};     \end{scope}     \end{tikzpicture}     \end{document}      The resulting output is: ![enter image description here](http://i.stack.imgur.com/2A2G2.png)


title: 3D helix torus with hidden lines

text: ![Torus wrapped with helix](http://i.imgur.com/BKQnv.png) How can I generate the above image using `TikZ` (possibly other methods will work if they produce better looking results)?   I would like to have a nicely shaded (not so dark image) _without_ gridlines and possibly enough opacity on the torus to see the hidden part of the helix. The image given is very close to what I want though and I would just try to make it visually a little better.


title: Let chapter number be distinct in mainmatter and ToC

text: I would like the chapter number to be different in mainmatter and ToC. In the ToC I would like to see :               chapter 1 ...         bla bla bla               chapter 2 ...         bla bla bla      But if I did :               \renewcommand{\thechapter}{chapter \arabic{chapter}}      In the text, when I do a crossref to a figure, for example, the figure number is `chapter 1.3` for figure 3. And I do not like that. I tried to use `titletoc` package without success. Here is a short example :               \documentclass{book}     \renewcommand{\thechapter}{Serie \arabic{chapter}}     \renewcommand{\thesection}{\textrm{\Roman{section}}}          \title{titre}          \usepackage{titlesec}     \titleformat{\chapter}[display]{\filcenter\sffamily}      {\textit{\LARGE\@title}\\     \vspace{5mm}     {\Large\thechapter}     }%     {1pc}%     {\titlerule\vspace{1pc}\Huge}%     [\vspace{1pc}\titlerule\thispagestyle{plain}]          \RequirePackage{titletoc}     \titlecontents{chapter}[1cm]{\vspace*{2ex}}{\bfseries\contentslabel{3em} : }{}    {\hfill\bfseries\contentspage}          \begin{document}          \tableofcontents          \chapter{Rappels}     \section{Section}     \begin{figure}[h]     \centering\fbox{A figure}     \caption{A caption}      \end{figure}          \begin{table}[h]     \centering     \begin{tabular}{ccc}     \hline     aaa & bbb & ccc \\     \hline     \end{tabular}     \caption{A caption}      \end{table}          \end{document}      I would like to keep the "serie" in the ToC but not in the figure and table number. Here is a solution which work without the babel package following the answer of gonzalo medina. I redefined `\chaptername` instead of manually add "serie" because all of this is in a class file and it is easier to change the name of the "serie" if it is defined from a variable.               \documentclass{book}          \renewcommand{\chaptername}{Serie}          \usepackage[titles]{tocloft}          \newlength\mylen     \renewcommand\cftchappresnum{\bfseries \chaptername~}     \settowidth\mylen{\bfseries\cftchappresnum\cftchapaftersnum}     \addtolength\cftchapnumwidth{\mylen}     \renewcommand\cftchapaftersnum{:}     \renewcommand{\thesection}{\textrm{\Roman{section}}}          \usepackage{titlesec}     \titleformat{\chapter}[display]{\filcenter\sffamily}      {\textit{\LARGE\@title}\\\vspace{5mm}     {\Large\chaptername~\thechapter}}%     {1pc}{\titlerule\vspace{1pc}\Huge}%     [\vspace{1pc}\titlerule\thispagestyle{plain}]          \begin{document}          \tableofcontents          \chapter{Rappels}     \section{Section}     \begin{figure}[h]     \centering\fbox{A figure}     \caption{A caption}      \end{figure}          \begin{table}[h]     \centering     \begin{tabular}{ccc}     \hline     aaa & bbb & ccc \\     \hline     \end{tabular}     \caption{A caption}      \end{table}          \end{document}      If I use the `\babel` package with the `francais` option, `\chaptername` is defined by babel at the beginning of the document. Thus I have to add this in the preamble :               \usepackage[francais]{babel}          \AtBeginDocument{\renewcommand{\chaptername}{Serie}}      But it does not work for the ToC. In the ToC there is still chapter instead of "serie". Thus I defined a new variable and I use it instead of chapter name.               \documentclass{book}          \usepackage[francais]{babel}          \newcommand{\seriename}{Serie}          \usepackage[titles]{tocloft}          \newlength\mylen     \renewcommand\cftchappresnum{\bfseries \seriename~}     \settowidth\mylen{\bfseries\cftchappresnum\cftchapaftersnum}     \addtolength\cftchapnumwidth{\mylen}     \renewcommand\cftchapaftersnum{:}     \renewcommand{\thesection}{\textrm{\Roman{section}}}          \usepackage{titlesec}     \titleformat{\chapter}[display]{\filcenter\sffamily}      {\textit{\LARGE\@title}\\\vspace{5mm}     {\Large\seriename~\thechapter}}%     {1pc}{\titlerule\vspace{1pc}\Huge}%     [\vspace{1pc}\titlerule\thispagestyle{plain}]          \begin{document}          \tableofcontents          \chapter{Rappels}     \section{Section}     \begin{figure}[h]     \centering\fbox{A figure}     \caption{A caption}      \end{figure}          \begin{table}[h]     \centering     \begin{tabular}{ccc}     \hline     aaa & bbb & ccc \\     \hline     \end{tabular}     \caption{A caption}      \end{table}          \end{document}


title: svmono array padding

text: The svmono class (available here) butchers spacing inside arrays; compare               \documentclass{svmono}     \begin{document}          $\begin{array}{|l|}     text     \end{array}$          \end{document}      to the same in the `article` class. There is very little space between the left line of the array and the text. Does anyone know which length might be involved?


title: Question mark in knitr code getting quote marks

text: I'm trying to use question marks in a code block using knitr, but in the compiled pdf always puts quotes around it, so, for example               <<helpCode, eval=FALSE>>=      ?rnorm      @      comes out as               '?'rnorm      Is there a way to keep this from happening?


title: LaTeX Compilation Problem: revtex4-1.cls Not Found

text: I'm using TeXmaker with MikTeX2.9 on Windows 7. Recently I've installed revtex4-1 according to the instructions in the README file. However when I tried to compile the sample `.tex` file using TeXmaker, I got the error "revtex4-1.cls", when this file was indeed present in the folder which I had included in the MiKTeX search paths. I've tried to install TeXLive (a LaTeX editor) as suggested by someone on the web, but I couldn't get it installed for some reasons. So what's wrong with my REVTeX installation?


title: How to do a table with multiple multirows_

text: I've just started to work with latex. I'm aware of the post How to get multiple multirows in a table? but still with it I don't manage to do with my table what I'd like. Basically I'd like to get two multirow cells, one at the beginning and one at the end. It'd also be great if I could vertically center the text and align it to the left (if I set the width I don't know how to do this). There's a last thing I'd also like to do but it's not so important. This is to remove the exterior lines of the only empty cell in my table. This is the code I've been working with:               \begin{center}     \begin{tabular}{ | p{3cm} | p{3cm} | p{3cm} | p{5cm} |}     \hline         &          Text1 &          Text2 &          Notes \\      \hline         \multirow{2}{*}         {Multirow two} &         Soil &         Water &         This should also be multirow (like the first column) \\         \hline         &         Water retention curve $\sin$150g &         Water retention curve $\sin$200 g          & \\     \hline         This is ok &         ok &         ok &         ok \\     \hline     \end{tabular}     \end{center}


title: How to use citation in a figure

text: Goal: Use \cit{...} e.g. in a circle or box, etc., when drawing a figure. And then include this figure and compile it with pdflatex. With Xfig, we can do similar things with math mode, but how to do it with cite? Is there another tool supporting cite in bibtex style? (Please note: This question is about to cite a paper within a figure, NOT about using label and ref to cite the figure. Nor do I mean to cite in the figure caption.) Thanks!


title: Consolidating common information BibTeX

text: I have a growing BibTeX file which has problems with consistency. For example, since I have copied BibTeX references from many places, I often have works by the same author, but with different names because one of them used an abbreviation or the middle name while the other did not. I'd like to go through my file and find the common names and make them separate entities with a specific key, and then reference that key as the author's name in all of the references by that author, eliminating problems with formatting inconsistency. Is there any way to do this? I use `biblatex`.


title: What packages do people load by default in LaTeX?

text: I'm getting the impression from reading the answers written by some of the real experts here that there are quite a few little packages that just tweak LaTeX2e's default behaviour a little to make it more sensible here and there. Rather than try to pick these up one by one as I read answers to questions (and thus risk missing them), I thought I'd ask up front what LaTeX2e packages people load by default in (almost) every document. As this is a "big list" question, I'm making it CW. I don't know if there are standard rules across all SE/SO sites for such questions, but on MathOverflow the rule is generally: one thing (in this case, package) per answer. I guess that if a couple of packages really do go together then it would be fine to group them. This is perhaps a little subjective and a little close to the line, so I'll not be offended if it gets closed or voted down! (But _please_ explain why in the comments.) Also see our community poll question: “I have used the following packages / classes”


> **Possible Duplicate:**   >  What packages do people load by default in LaTeX? As subject. What are the most popular LaTeX packages?


title: Most essential packages

text: The question is very simple: what are the ten most fundamental LateX packages we can't live without? Say, packages that cover 95% or so of all LaTeX documents? EDIT: It's not a matter of personal usage or preferences. For example, microtype doesn't seem essential at all. It is there more to embellishing. We can do well without it. I think of beamer, tikz, biblatex, amsmath. Babel is an essential package too for non-english speaking people, for instance. And inputenc, and fontenc. What are the last three?


title: raw gnuplot in pgfplots

text: I have a problem with the gnuplot environment in pgfplots. I already set "-- enable-write18" in the argument of pdfLaTeX and added the path of gnuplot.exe to the PATH-variable in the advanced system options. My problem now is that I can pass code in gnuplot (see picture), below are the 3 lines which I can't pass in the raw-gnuplot-environment in the tikzpicture (see code). What do I wrong? Can someone help, please? pdfLaTeX-code:               \documentclass[a4paper]{scrartcl}          \usepackage[paperwidth=27cm,paperheight=17cm,margin=0in,showframe]{geometry}          \usepackage{tikz,pgfplots}               \begin{document}                    \centering     \begin{tikzpicture}         \begin{axis} [width=21cm, height=14cm,         tick label style={font=\large},         xmin=7700, xmax=7810,         ymin=0, ymax=0.05,         axis x line=box,         axis y line=box         ]         \addplot gnuplot [raw gnuplot, id=test, mark=none]{         set xrange [7700:7810];         set yrange [0:0.05];         plot "test.txt" using ($1):($2) with lines;         };              \end{axis}     \end{tikzpicture}                    \end{document}      gnuplot-picture: ![gnuplot, works](http://i.stack.imgur.com/O0XEe.png) and finally my data-file: http://www.file- upload.net/download-7764417/test.txt.html Thank you in advance for your answer!


When trying to compile any document containing the line:               \usepackage[brazilian]{babel}      I get the following error:               ! Package babel Error: Unknow option `brazilian'. Either you misspelled it     (babel)                or the language definition file brazilian.ldf was not fo     und.      Additional info:   * I get an analagous error when replacing `brazilian` by anything other than `english`.   * I'm running texlive on Windows, so my way of managing packages is through `tlmgr`   * Tried to uninstall and reinstall babel package and got nothing.   * I sense something is wrong since babel is looking for the file "brazilian.ldf" but this is my output to `tlmgr search --global --file "brazilian"`:               tlmgr.pl: package repository http://mirror.jmu.edu/pub/CTAN/systems/texlive/tlnet     biblatex:             texmf-dist/tex/latex/biblatex/lbx/brazilian.lbx     biblatex-apa:             texmf-dist/tex/latex/biblatex-apa/brazilian-apa.lbx     dvdcoll:             texmf-dist/tex/latex/dvdcoll/dcl/brazilian.dcl     minitoc:             texmf-dist/tex/latex/minitoc/brazilian.mld      So, no brazilian.ldf here... **UPDATE:** Looking at the comments and searching for `portuges.ldf` file, the following package install command solved the problem here:               tlmgr install babel-portuges      _(ps: had to remove old .aux files)_


title: Drawing function in tikz

text: I need to make a graphs as you can see in the picture, but I try many ways and I cannot get what I want. Any of you could help me?![enter image description here](http://i.stack.imgur.com/c016X.png)


title: Color Itemize inside tabular or minipage

text: What I'm trying to do is actually introducing a column in a beamer mode the as the second one next to it is in grey (transparent effect). But it will color only what is before the itemize. Suggestions?                \documentclass{beamer}      \usetheme{Berlin}      \usecolortheme{beaver}      \usepackage[utf8]{inputenc}      \usepackage[T1]{fontenc}       \renewcommand{\sfdefault}{cmss}           \title{3D-Lithography}      \begin{document}      \begin{frame}      \noindent\begin{minipage}{.45\textwidth}      Basic Problems of Single-Photon Polymerization:      \begin{itemize}      \item layer-by-layer type of manufacturing (limits possible geometries)      \item suppression through undesired quenching of radicals      \item diffraction limits      \end{itemize}      \end{minipage}      \begin{minipage}{.45\textwidth}      \color{gr}      Two-Photon Polymerization:      \begin{itemize}      \item kdkd      \item dkdkd      \end{itemize}      \end{minipage}      \end{frame}      \end{document}


title: wrapfig with {R} remains left and keeps white space to the right

text: I am using `wrapfig` inside normal text (no lists or anything), with the `{R}` option to make it float right. However, some of the figures end up being aligned left, with all the space to their right being empty (i.e. the text does not wrap around). I have tried reproducing this with the `lipsum` package (the document is sensitive, unfortunately), but could not reproduce the error. It is definitely not due to the images (like bounding box issues etc.), as they work fine for the `lipsum`example. The figures are of the form               \begin{wrapfigure}{R}{.47\textwidth}       \centering       \includegraphics[width=.45\textwidth]{file.pdf}       \caption{{\bf Description.} Rest of the caption.}       \label{fig:figlabel}     \end{wrapfigure}      I've put up an example on Google Drive. Has anyone experienced something similar?


title: Label an angle in xypic

text: I am frequently (i.e. about once per quarter, right before the end) set upon by the need to draw a diagram in which various lines are drawn and the angles between them labeled. I've been using xy-pic for my diagrams, and would like to continue, but in a small diagram, the right location for the name of the angle to appear doesn't correspond to any particular spot on the grid. Is there a nice way to do this? I give an example of the sort of diagram I have in mind.               \documentclass{article}     \usepackage{xypic}     \begin{document}     \diagram     &&&&&*\\     &&*\ar[-1,3]\ar[-1,0]&&&\\     \enddiagram     \end{document}


title: Remove List of [newfloat] from TOC

text: I'm using the package newfloat and I've added a new figure:               \DeclareFloatingEnvironment{dirfigure}      Now when I use `\listofdirfigures` - the list is added to the Table of Contents. With normal figures, I can use `\listoffigures*` (with `*`) to not list it in TOC, however `\listofdirfigures*` doesn't work. How to not list List of Dirfigures in TOC? Minimal example:               \documentclass[a4paper,twoside]{memoir}     \usepackage{newfloat}     \DeclareFloatingEnvironment{dirfigure}          \begin{document}     \tableofcontents*     \listoffigures*     \listofdirfigures          \chapter{bah}     \begin{dirfigure}     bah     \caption{bah}     \end{dirfigure}     \begin{figure}     bah     \caption{bah}     \end{figure}     \end{document}      Thanks


title: How can I create a Chicago Manual of Style formatted document in LaTeX?

text: I have an assignment which requires me to use CMS formatting, double spaced, in 12pt font. I'd rather avoid using the much inferior "Word" or "Writer" programs -- in particular I like how LaTeX inserts line breaks and such. However, there doesn't seem to be an easy way to force LaTeX to produce such a document. Is there a document class floating around which would allow the production of such a document using LaTeX?


title: Passing options to a macro

text: **Background** We're developing an automated graph drawing framework for TikZ with LuaTeX. The TeX interface on the pgf layer is nearly done, the next step will be the TikZ Layer. The maker of TikZ, Till Tantau, gives us a lot of help, but he has very little time. The most work is done, but some little sugar is missing. The algorithms work, passing the nodes to lua and shipping them out back later works, with edges too. As I'm proceeding with the pgf layer, I got a problem with passing arguments to macros. **Problem** Some graph drawing algorithms need options like the root node of a tree or in which style the nodes should be arranged. Saving the options after `\node[options]` is no problem, but how to implement such an option handling by myself? I've read the particular pgfkeys section of the TikZ manual and done a lot of googeling, but not found yet what I need. The idea is something like this (it's very simplified for showing what I want!) We have some interface functions on the TeX level to select algorithms and so on.               \def\pgfgdsetalgorithm...{..call some lua functions here..}      Some algorithms, say the tree drawing algorithm, needs an explicit root node. The call could now be something like this               \pgfgdsetalgorithm[rootnode=nodexy]{treedrawing}      After the examples I've read I now know it's very comfortable for users to use the options, but very hard to implement them. Does anyone got a simple example or maybe a good tutorial so I can proceed? Thanks in advance!


title: Ligatures in Hoefler with XeTeX?

text: Using XeLaTeX on OS X 10.6 (texlive installed with MacPorts) I'm not getting any ligatures with Hoefler. Example code:               \documentclass[10pt]{article}     \usepackage{fontspec,xltxtra}     \setromanfont[Mapping=tex-text]{Hoefler Text}     \begin{document}     ff fl fi ffl ffi     \end{document}      Gives: ![enter image description here](http://i.stack.imgur.com/rX1wC.png) From my understanding Hoefler ought to have ligatures, but they're not showing up. Am I missing something?


title: How can I center horizontally but not vertically?

text: This centers both horizontally and vertically, but I do not want vertical centering. I want the grid to be at the top of the page. (The geometry package works well at defining margins though).               \documentclass{article}     \usepackage[margin=5pt,nohead]{geometry}     \usepackage{tikz}     \usepackage{caption}          \begin{document}     \begin{figure}[ht]      \begin{centering}             \begin{tikzpicture}[scale=(3/10)]                \draw[help lines] (0,0) grid (670mm,700mm);              \end{tikzpicture}            \caption{some caption here}            \end{centering}     \end{figure}     \clearpage     \end{document}      Thanks


title: How to prepare coordinates for 3D surface plot using pgfplots

text: I'm trying to plot a Pareto front on 3 dimensions, using pgfplots. However, although I expect a nice surface to appear (since it is a Pareto front), pgfplots does not produce the result I want (yet). I have the feeling that I need to (somehow) sort or transform my collecion of coordinates to a matrix. However, I could not find any information in the pgfplots manual regarding this. I know there are plots available that do not require a matrix (the one in the MWE f.i.) but here the order really matters. Any help on how to preprocess my data is appreciated. The best I got so far as an MWE with the actual data I'm using.               \documentclass[tikz]{standalone}     \usepackage{pgfplots}       % Charts in LaTeX, or, even better, in TikZ!!!     \usepgfplotslibrary{patchplots}     \pgfplotsset{compat=1.10}     \begin{document}     \begin{figure}       \begin{tikzpicture}         \begin{axis}[title={3D plot of Pareto front},           width=.75\textwidth,           xlabel={Precision},           ylabel={Replay Fitness},           zlabel={Generalization},           view/h=-60,         ]         \addplot3+         [patch,patch type=biquadratic, shader=faceted interp,patch to triangles,patch refines=3,mark=none]            file {data.txt};         \end{axis}       \end{tikzpicture}       \caption{3D plot of Pareto front.}     \end{figure}      \end{document}       Which results in: ![Current result of plot](http://i.stack.imgur.com/VZMDN.png) with data.txt as:               1.000000 0.419383 0.968689     1.000000 0.592352 0.968670     1.000000 0.746263 0.968656     1.000000 0.867638 0.968467     0.920836 0.968086 0.968154     0.639138 0.968335 0.968148     0.834616 0.972716 0.968135     1.000000 0.959536 0.968100     0.925890 0.968086 0.968100     0.843374 0.972253 0.968100     0.624724 0.994175 0.965305     0.592214 0.998805 0.965289     0.753481 0.993391 0.965285     0.740626 0.993727 0.965278     0.871820 0.993727 0.965277     0.785909 0.994025 0.965277     0.953650 0.993698 0.965273     0.805640 0.998855 0.965273     0.523510 0.999667 0.965029     0.564376 0.999738 0.965023     0.711429 0.999266 0.965001     0.879139 0.993727 0.964992     0.723471 0.999266 0.964992     0.659416 0.999528 0.964697     0.668084 0.999423 0.964666     0.677879 0.999423 0.964656     1.000000 0.979768 0.964530     0.450423 0.999843 0.954335     0.528080 0.999843 0.952593     0.843906 0.996905 0.950163     0.854689 0.993826 0.945594     0.738809 0.999266 0.945594     0.707177 0.999723 0.943947     0.544764 0.999778 0.943905     0.884787 0.993826 0.942041     0.757883 0.999266 0.942041     0.784359 0.999108 0.940599     0.604841 0.999778 0.939674     0.810387 0.998584 0.939038     0.482403 1.000000 0.938628     0.716901 0.999723 0.936281     0.559973 1.000000 0.935840     0.818384 0.997063 0.934713     0.725681 0.999557 0.926138     0.957708 0.980431 0.925825     0.819722 0.997010 0.921207     0.749411 0.999557 0.920465     0.596822 1.000000 0.917863     0.737162 1.000000 0.916918     0.824987 0.997010 0.899531      **Update 1:** I have found an answer to a related question, and I'm trying to get GNUplot to triangulate my data such that I obtain a plane. However, I think my question is still valid since I do not want a full plane from the min and max of the three axis, but only a surface connecting my concrete observations.


title: How to present TeX documents directly from the iPad on a projector?

text: Now that there are useful authoring environments for TeX documents available on the iPad, I would wish to be able to present their results (e.g., a beamer document) directly from an iPad via the VGA connector to a "physical" beamer (or Television set) instead of using a laptop. So my question is, are there possibilities and if so which? My limitation right now is that I have an iPad1; I think the newer hardware can mirror the iPad screen. However, even for newer hardware app-based video output might be preferable to screen mirroring as this allows the app to suppress option buttons etc on the video screen.


title: Quality of embedded bitmaps using eps2pdf

text: I am compiling a single file using REVTEX 4.1. My image files are .eps files, and epstopdf is converting them on compilation. I load the following packages,               \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{epstopdf}      and this all works fine, except for the quality of bitmaps embedded in the images is terrible. They appear to be heavily compressed. I suspect I need to set an option for epstopdf, but I don't know what. I tried               \epstopdfsetup{quality=100}      and got the error Package keyval Error: quality undefined. This; http://ctan.mirrorcatalogs.com/macros/latex/contrib/oberdiek/epstopdf.pdf has no mention of quality. This is not something I can render using a vector based format. Also, eps is the preferred format for this particular journal. Can anyone help? Edited to add: I use CorelDraw, and export an .eps. If I inspect the .eps by loading it back into CorelDraw, it looks fine. if I inspect the eps-converted- to.pdf in a similar way, it looks very bad. See below - left is before epstopdf, right is after. ![graphs of different quality](http://s24.postimg.org/7gyif4g91/example.png) Edited further to add: The following link: http://www.latex- community.org/forum/viewtopic.php?f=5&t=3025 reccomends the following;               \DeclareGraphicsExtensions{.eps,.pdf}     \DeclareGraphicsRule{.eps}{pdf}{.pdf}{`epstopdf --gsopt="-dPDFSETTINGS=/prepress -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -sColorImageFilter=FlateEncode -sGrayImageFilter=FlateEncode -sCompressPages=false -dPreserveHalftoneInfo=true" #1}      This is not a solution I fully understand, and in any case, it doesn't work - epstopdf fails to run at all. The solution further down the page:               \epstopdfsetup{update,prepend,verbose,suffix=-generated} % use suffix because you don't want to accidentally overwrite a file that might have been a pdf source. The epstopdf package manual has more on that.          \DeclareGraphicsExtensions{.eps,.pdf}     \epstopdfDeclareGraphicsRule{.eps}{pdf}{.pdf}{epstopdf --gsopt="-dPDFSETTINGS=/prepress -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -sColorImageFilter=FlateEncode -sGrayImageFilter=FlateEncode -sCompressPages=false -dPreserveHalftoneInfo=true" #1 --outfile=\OutputFile}      sends the compilation into an unbreakable loop of some kind. I'm using TeXnicCenter, if that makes any difference.


title: Apply command to list of elements separated by \and

text: I am trying to build a command similar to the `\author` command. It takes one argument with is actually a list of arguments separated by `\and`. The command needs to apply another command like `\underline` or `\emph` to each element of the list. My current approach is               \documentclass{minimal}     \newcommand{\mylist}[1]{%         \def\and{\noexpand\endgroup \noexpand\underline\noexpand\begingroup}%         \edef\myinternallist{\noexpand\underline\noexpand\begingroup #1\noexpand\endgroup}%         \show\myinternallist%         \myinternallist%     }     \begin{document}         \mylist{Element1 \and Element2}     \end{document}      and `\show\myinternallist` yields               > \myinternallist=macro:     ->\underline \begingroup Element1 \endgroup \underline \begingroup Element2\endgroup .      which looks ok to my untrained eye. However, the above code does'nt compile and I have no clue why it does'nt. The expected result looks like this: ![enter image description here](http://i.stack.imgur.com/HcyuI.png)


title: How can I skip a subfigure caption

text: ![Subfigures](http://i.stack.imgur.com/oDnaj.png) i suppressed the caption for the first subfigures so the rest of figures are starting with subsequent label ((b), (c), (d), (e). I want the order as (a), (b) (c), (d)               \begin{figure}[H]     \centering         \setlength\figureheight{4cm}         \setlength\figurewidth{5cm}     \subfigure{       \includegraphics{legendbr.png}     \label{fig:subfig1}}     \subfigure[S]{       \input{SNM.tikz}     \label{fig:subfig1}}     \subfigure[S]{       \input{SM.tikz}     \label{fig:subfig2}}     \subfigure[S]{       \input{SD.tikz}     \label{fig:subfig2}}     \subfigure[S]{       \input{SSep.tikz}     \label{fig:subfig2}}     \caption{In adversary.\label{IN}}     \end{figure}


title: \footnotetex one page after \footnotemark for title page

text: The guidelines for title pages at my department prescribe that acknowledgements should be placed on the page following the title page. The reason for this seems to be that the title page may be removed to allow papers to compete anonymously, while preserving any information relevant to the thesis (like acknowledgements). Until now, I used to redefine `\thefootnote` to look like a symbol of my choice, then reset everything afterwards. Thus, the following code for my name and acknowledgements:               {\renewcommand{\thefootnote}{\fnsymbol{footnote}}     \setcounter{footnote}{1}     \textbf{My name}\footnote{     The author is indebted to Lorem ipsum dolor sit amet, consectetur adipiscing elit. Estne, quaeso, inquam, sitienti in bibendo voluptas? Ergo instituto veterum, quo etiam Stoici utuntur, hinc capiamus exordium. Hoc non est positum in nostra actione. Quare obscurentur etiam haec, quae secundum naturam esse dicimus, in vita beata; Sed id ne cogitari quidem potest quale sit, ut non repugnet ipsum sibi. Hoc tu nunc in illo probas. Duo Reges: constructio interrete. An quod ita callida est, ut optime possit architectari voluptates?     }     \setcounter{footnote}{0}      Now that acknowledgements are required to go on the subsequent page, I am wondering whether there is a simple extension to this piece of code that would achieve this. EDIT: I am aware of e.g. this post, but I want to change footnote behavior at one instance only, not for the entire document.


title: Test equality between number of the current page and the one of one reference indicated

text: In the following code, I have one problem with the test `\ifthenelse{\equal{\pageref{#1}}{\thepage}}{...}{...}`. Why doesn't this detect the equality hoped if the reference is in the same page where it is used and defined ?               % Sources :      %   * http://tex.stackexchange.com/questions/35095/special-footnotes-for-url/35097#35097     %   * http://tex.stackexchange.com/questions/35043/how-to-reference-different-places-to-the-same-footnote     %   * http://forum.mathematex.net/latex-f6/forcer-le-retour-a-la-ligne-dans-texttt-t13246.html#p127511     %   * http://tex.stackexchange.com/questions/33465/changing-the-catcode-of-in-one-command          \documentclass[10pt]{article}         \usepackage[svgnames]{xcolor}         \usepackage{manyfoot}         \usepackage{xifthen}         \usepackage{hyperref}         \usepackage{varioref}          % Cosmetic         \hypersetup{urlcolor=blue}         \definecolor{urlColor}{named}{DarkRed}              \newcommand{\urlText}[2][0]{%             \textcolor{urlColor}{%                 \ifthenelse{\equal{#1}{0}}{%                     \textbf{#2}%                 }{%                     #2%                 }%             }%         }          % Special footnote         \newfootnote{Url}              \newcounter{footnoteUrl}         \newcommand{\footnoteUrl}{%     %       \renewcommand\thefootnoteUrl{\Alph{footnoteUrl}}             \stepcounter{footnoteUrl}%             \Footnotemark{\urlText{\#\thefootnoteUrl}}\FootnotetextUrl{}%         }          % New url         \newcommand{\newUrl}[2][0]{%             \urlText{http://link/}%             \ifthenelse{\equal{#1}{0}}{%                 \footnoteUrl{\, \url{#2}}%             }{%                 \footnoteUrl{\,\label{#1} \url{#2}}%             }%         }          %%%%%%%%%%%%%%%%%%%%%%%%%%     % THE PROBLEM IS HERE... %     %%%%%%%%%%%%%%%%%%%%%%%%%%          % Old url         \newcommand{\oldUrl}[1]{%             \urlText{http://link/\textsuperscript{\ref{#1}}}%             \ifthenelse{\equal{\pageref{#1}}{\thepage}}{}{%                 \urlText[1]{(cf.\,page\,\pageref{#1})}%             }%         }              \usepackage{lipsum}               \begin{document}          Let's try to indicate one URL \newUrl[linkGoogle]{http://www.google.fr/}     and another \newUrl{http://tex.stackexchange.com/}.     Let's try to indicate one old URL \oldUrl{linkGoogle}.     and one more \newUrl{http://tug.org/texlive/pkginstall.html}     and another \newUrl[ctan]{http://www.ctan.org/}      and then the same \oldUrl{ctan}.     I would like to indicate something \footnote{... but here !}.          \lipsum          Just only old URLS \oldUrl{linkGoogle} and \oldUrl{ctan}.     I would like to indicate something \footnote{... but here !}.     \lipsum          Just only old URLS \oldUrl{linkGoogle} and \oldUrl{ctan}.     I would like to indicate something \footnote{... but here !}.          \end{document}


title: pgfpages add page number

text: I'm creating a handout for my beamer presentation using the `4 on 1` layout for `pgfpages`. I'd like each physical page (which contains four "pages" of the handout) to have a page number bottom centre of the page. Adding `\pagestyle{plain}` puts a page number on every logical page (thus, four page numbers per physical page). Is there a simple solution to this? It hardly seems worth providing an MWE, but here goes:               \documentclass{beamer}     \usepackage{pgfpages}     \pgfuselayout{4 on 1}[landscape]     \begin{document}     \frame{foo}     \frame{bar}     \frame{baz}     \frame{bazbarfoo}     \end{document}      I'd like a page number bottom centre of the page.


title: Preventing caption stoppers from appearing in references in ConTeXt

text: I would like to prevent caption stoppers from appearing in references in ConTeXt. Here is a minimal example:               \starttext     \setupcaptions[numberstopper=.~---~, distance=0em]     \placefigure[][cow]{A Cow}{\externalfigure[cow]}     \in{Figure}[cow] shows a cow.     \stoptext      How can I remove that `numberstopper` from the `\in` command?


title: Bar from bar chart without value

text: I would like to add a single bar to my chart, but without any value. Unfortunately when I skip adding proper value with label x in coordinates, it (bar with label x) disappears from chart.               \begin{tikzpicture}     \begin{axis}[        width=\textwidth,        ybar,        enlargelimits=0.10,        legend style={at={(0.5,-0.2)},        anchor=north,legend columns=-1},        symbolic x coords={A,B,C},        xtick=data,        nodes near coords,        nodes near coords align={vertical},        x tick label style={rotate=45,anchor=east},        ]       \addplot coordinates {(B,5) (C,7)};     \end{axis}     \end{tikzpicture}      In this example bar A (and label A) will not appear on the chart. Anybody knows how to put this x label to chart?


title: Only get filename and extension of listing, not whole path

text: I am trying to add the file name as caption. I was able to do this setting               caption=\lstname      but this shows the full path. I am now trying to get the name of the file and extension to show only. I was trying to use the `\filename@parser`, but no luck. This is how the code look like:               \ifdefined\docdefined     \else     %   \documentclass[a4paper,twoside,12pt, openright]{report}         \input{include_start}         \begin{document}     \fi          \definecolor{dkgreen}{rgb}{0,0.6,0}     \definecolor{gray}{rgb}{0.5,0.5,0.5}     \definecolor{mauve}{rgb}{0.58,0,0.82}          % START DOCUMENT     \begin{appendices}     \makeatletter          \lstset{language=C,      numbers=left,      frame=single,      commentstyle=\color{dkgreen},      basicstyle={\scriptsize\ttfamily},      keywordstyle=\color{blue},      %identifierstyle=\color{blue},      stringstyle=\color{mauve},     captionpos=t,     showstringspaces=false,     breaklines=true,     breakatwhitespace=true,     tabsize=3,     caption={\protect\filename@parse{\lstname}\protect\filename@base\text{.}\protect\filename@ext},     }          \begin{frame}     % LIST FILES HERE:               \lstinputlisting{C:/Users/x/Project/trunk/User/Drivers/ADC.h}          \lstinputlisting{C:/Users/x/Project/trunk/User/Drivers/ADC.c}               \end{frame}     \end{appendices}          % END DOCUMENT     \ifdefined\docdefined     \else         \input{include_end}         \end{document}     \fi      I am pretty sure the syntax is wrong here:                  caption={\filename@parse{\lstname}\filename@base}      I am trying to parse `\lstname` and get the base.


title: Blank page appears before title page

text: I am writing my thesis paper in `LaTeX`. I wrote the title page like below. But whenever I compile the `.tex` file one extra blank page is added before the title page. I can't figure out why is it happening. Any help?               %%%%%%%%%%%%%%%%%%%%%%%          \documentclass[12pt, twoside, makeidx,a4paper]{report}          \pagestyle{headings}     \usepackage{latexsym,amsfonts,amssymb}     \def\baselinestretch{1.6}     %\usepackage[dvips]{graphicx}     \usepackage{graphicx}     \usepackage{makeidx,paralist,verbatim,psfrag}     \usepackage {amssymb,amsmath,amsfonts}     \usepackage{psfrag}     \usepackage{multirow}     \usepackage{float}     \usepackage{mathtools}     \restylefloat{table}          %%%%%%%%%%%%%%%%%%%%%%               %\usepackage{latexsym,amsfonts,amssymb}     %\usepackage{graphicx,amssymb,}                    \def\baselinestretch{1.6}     %\parskip=5pt          \def\squareforqed{\hbox{${\cal Q.E.D.}$}}               %modified     \def\qed{\ifmmode\squareforqed\else{\unskip\nobreak\hfil     \penalty50\hskip1em\null\nobreak\hfil\squareforqed     \parfillskip=0pt\finalhyphendemerits=0\endgraf}\fi     \vskip 10pt}               %\topmargin=-.5cm     %\leftmargin=0true cm     %\oddsidemargin=-.5true cm     %\evensidemargin=-.5true cm          \topmargin=-.5cm \leftmargin=.5true cm \oddsidemargin=0true cm     \evensidemargin=0true cm          \textwidth=17cm     \textheight=23cm               \newcounter{linenumber}     \newenvironment{listprog}{%             \begin{list}{%                     \footnotesize\arabic{linenumber}}{%                        \usecounter{linenumber}%     %                   \setlength{\baselineskip}{14pt}                        \setlength{\itemsep}{0pt}%                        \setlength{\parsep}{0pt}}}%             {\end{list}}               \newcommand{\namelistlabel}[1]{\mbox{#1}\hfil}     \newenvironment{listing}[1]{%             \begin{list}{*}{%                     \let\makelabel\namelistlabel                      \settowidth{\labelwidth}{#1}%                      \setlength{\leftmargin}{1.1\labelwidth}%                      \advance \leftmargin by 18pt                       \setlength{\labelsep}{5pt}%                        \setlength{\itemsep}{0pt}%     %                   \setlength{\parsep}{0pt}%                        \setlength{\topsep}{5pt}%     %                   \setlength{\parskip}{0pt}%     }%     }{%     \end{list}}               \newcommand{\bta}{\hspace{7pt}}     \newcommand{\btb}{\hspace{14pt}}     \newcommand{\btc}{\hspace{21pt}}     \newcommand{\btd}{\hspace{28pt}}     \newcommand{\bte}{\hspace{35pt}}     \newcommand{\btf}{\hspace{42pt}}     \newcommand{\btg}{\hspace{49pt}}     \newcommand{\bth}{\hspace{56pt}}     \newcommand{\bti}{\hspace{63pt}}     \newcommand{\btj}{\hspace{70pt}}     \newcommand{\btk}{\hspace{77pt}}     \newcommand{\btl}{\hspace{84pt}}     \newcommand{\btm}{\hspace{91pt}}     \newcommand{\btn}{\hspace{98pt}}     \newcommand{\bto}{\hspace{150pt}}     \newcommand{\btp}{\hspace{160pt}}     \newcommand{\btq}{\hspace{170pt}}     \newcommand{\btr}{\hspace{180pt}}     \newcommand{\bts}{\hspace{190pt}}     \newcommand{\btt}{\hspace{200pt}}     \newcommand{\btu}{\hspace{210pt}}     \newcommand{\btv}{\hspace{220pt}}     \newcommand{\btw}{\hspace{230pt}}     \newcommand{\btx}{\hspace{240pt}}     \newcommand{\bty}{\hspace{250pt}}     \newcommand{\btz}{\hspace{260pt}}               \newcommand{\Begin} {{\bf begin}}     \newcommand{\End}   {{\bf end}}     \newcommand{\If}    {{\bf if }}     \newcommand{\Then}  {{\bf then }}     \newcommand{\Else}  {{\bf else }}     \newcommand{\For}   {{\bf for }}     \newcommand{\To}    {{\bf to }}     \newcommand{\DownTo}    {{\bf downto }}     \newcommand{\Do}    {{\bf do }}     \newcommand{\While} {{\bf while }}     \newcommand{\Repeat}{{\bf repeat }}     \newcommand{\Until} {{\bf until}}     \newcommand{\Procedure} {{\bf Procedure }}     \newcommand{\Function} {{\bf Function }}     \newcommand{\Return} {{\bf return }}     \newcommand{\Integer} {{\bf integer}}     \newcommand{\Boolean} {{\bf Boolean}}               \newcommand{\boxbox}{\rule{3mm}{3mm}}          \newcounter{tmp}     \newcommand{\setcount}[2]{\setcounter{#1}{\arabic{#2}}}     \newcommand{\num}[2]{\setcounter{tmp}{\arabic{#1}}\addtocounter{tmp}{#2}{\arabic{section}.\arabic{tmp}}}     \newcommand{\fdeg}{$f$-degree }     \newcommand{\bound}[1]{$#1$-bounded}     \newcommand{\dBound}[1]{$(d_f,#1)$-partition}     \newcommand{\DBound}[1]{$(\Delta,#1)$-partition}     \newcommand{\class}{${\cal C}$}     \newcommand{\Delt}{\Delta_{f}}     \newcommand{\chr}{\chi^\prime}     \newcommand{\case}[1]{\noindent{\em Case} #1: }     \newcommand{\Case}[1]{\noindent{\em Case} #1: }     \newcommand{\minvp}{\min\{\#\varphi,\#\psi\}}               \newtheorem{lemma}{Lemma}[section]     %\newtheorem{theorem}{Theorem}%[section]     \newtheorem{theorem}[lemma]{Theorem}     \newtheorem{corollary}[lemma]{Corollary}     \newtheorem{fact}[lemma]{Fact}     \newcommand{\proof}{\noindent {\bf Proof.} \ \ }     %\newcommand{\proofend}{\begin{flushright${\cal Q.E.D.}$\end{flushright}}     %\newcommand{\proofend}{     %       {\hfill{${\cal Q.E.D.}$}}     %     %                   \ }     \newcommand{\dvgraph}{divided vertex graph}     \newcommand{\wrt}{with respect to }               \newcommand{\A}{{\cal A}}     \newcommand{\D}{{\cal D}}     \newcommand{\E}{{\cal E}}     \newcommand{\F}{{\cal F}}     \newcommand{\G}{{\cal G}}     \renewcommand{\H}{{\cal H}}     \newcommand{\I}{{\cal I}}     \renewcommand{\L}{{\cal L}}     \newcommand{\LC}{L^*}     \newcommand{\aaa}{{\"a}}     \newcommand{\pp}{{\prime\prime}}     \newcommand{\ppp}{{\prime\prime\prime}}     \newcommand{\Eq}[1]{(\ref{#1})}     \newcommand{\lsup}{\beta_{\rm sup}}          \newcommand{\color}[1]{\lceil (#1+2)^2/2\rceil}     \newcommand{\gcolor}{\lceil 72(g(G)+2)^2/5\rceil}          \newcommand{\newsubset}{$\subseteq$\hspace{-7pt}{$_{_/}$}}          \renewcommand{\bibname}{References} % without this line the Refenrence will be replaced by bibliography          \makeindex     \makeglossary                    \begin{document}     \bibliographystyle{plain}     \def\baselinestretch{1.1}     \title{{\large B.Sc. Engg. Thesis}\\     \vspace{2cm}      \textbf{On Cover Contact Graphs}}     \author{ By \\      Md. Taufique Hussain \\      Student No. 0805050 \\      Shohedul Hasan \\      Student No. 0805060\\      \vspace{2cm}      \\     { Submitted to}\\      {Department of Computer Science and Engineering} \\       { in partial fulfilment of the requirements for the     degree of}\\     \vspace{3cm}     { Bachelor of Science in Computer Science and Engineering}\\     %\vspace{3cm}     %{(Preliminary version)}\\     { Department of Computer Science and Engineering}\\     { Bangladesh University of Engineering and Technology (BUET)}\\     \vspace{1cm}     { Dhaka-1000}             }          \date{June 13, 2014}     \maketitle     \pagenumbering{arabic}               %\input board.tex \newpage          %\input declaration.tex \newpage                         \def\baselinestretch{1.55}          \normalsize{          \tableofcontents \newpage     \listoffigures \newpage     \listoftables      \newpage     }                              \def\baselinestretch{1.6}     \normalsize{     %\input Acknowledgement.tex \newpage          %\input Abstract.tex \newpage     }               \def\baselinestretch{1.8}               %\input Chap_1.tex %introduction     %\input Chap_2.tex %preliminery     %\input Chap_3.tex %CCG of convex point sets     %\input chap4.tex %CCG of non-convex point sets     %\input Chap_5.tex %Conclusion     %\input chap6.tex     %\input publication.tex     %\input references.tex                         %     %\input conclusion.tex     %          %\bibliography{Book,PhDThesis,Journal,Proceeding,Report,Manuscript,Zhou,Zhou.world}     %     %\newpage     %  \printmypapers     %     %     %     \newpage     \printindex     %     %\newpage     %\printglossary          \end{document}


title: addmargin, enumerate and align* miss an overfull hbox

text: The following document compiles as expected, and looks as expected:               \documentclass{article}          \usepackage{scrextend}     \usepackage{amsmath}     \usepackage{lipsum}          \begin{document}         \lipsum[1]              \begin{addmargin}[1cm]{0mm}             \lipsum[2]                  \begin{enumerate}             \item                 \lipsum[3]                  \item                 \begin{align*}                     abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmn                 \end{align*}             \end{enumerate}         \end{addmargin}     \end{document}      The content of the `align*` environment overflows the normal text area. However, there is no "overfull hbox" warning. Making the text even longer eventually produces the warning, but it's too late - depending on the nesting, the warning only occurs if the text is shifted far out of the page. How can I make sure to be warned in such situations?


title: BibTeX suddenly failed mysteriously

text: This is my first question here. I have a problem that bibtex just suddenly failed me. I get the following error message in the console but it doesn't help me much. What does "This operation is supported only when you are connected to the server" mean? > This is BibTeX, Version 0.99d (MiKTeX 2.9) The top-level auxiliary file: > biblatex_ex.aux The style file: biblatex.bst > > bibtex.EXE: Windows API error 1251: This operation is supported only when > you are connected to the server. > > bibtex.EXE: Data: \dustaff\home\kss\Documents\PaperI\texbib:bibPaper1.bib > texify: "C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\bibtex.EXE" failed for > some reason. Thankful for any help.


title: white text on black background in entire table

text: I am looking for a way have white text on black background in the PDF output of PDFLaTeX applied to a document containing a basic table with dividing lines and some colored links. Using               \usepackage{xcolor}     \pagecolor[rgb]{0.,0.,0.}     \color[rgb]{1,1,1}      I gain the desired effect but only outside of the table. I can put               \color[rgb]{1,1,1}      in every cell, but that is not practical and table lines are still black and hence do not show up. EDIT: Here is a MWE; the `tabular` makes room for a paragraph and lcr specification.               \documentclass[11pt,letterpaper]{article}     \usepackage[table]{xcolor}     \usepackage{array}     \begin{document}     \begin{table}[H]       \caption{Caption}       \label{Table1}       \begin{center}         \arrayrulecolor{white}         \newcolumntype{B}{>{\columncolor{black}\color{white}}c}         \begin{tabular}{  B  l   | B  p{6in}   }           \hline\hline           Text 1 & Text 2 \\           \hline\hline           Text 3 & Text 4 \\           \hline         \end{tabular}       \end{center}     \end{table}     \end{document}


title: Different outputs from two different syntax that should produce the same output

text: A node `A` will be constructed by using 2 syntax.   * `\pnode(!2 3 0 p2c exch 3 add exch 2 add){A}`   * `\pnode[3,2](!2 3 0 p2c){A}` Each constructs the node `A` by translating a point `(!2 3 0 p2c)` (which is on an _basic_ ellipse) 3 unit rightward and 2 unit upward. ## First Syntax               \pnode(!2 3 0 p2c exch 3 add exch 2 add){A}      And the output is as follows. ![enter image description here](http://i.stack.imgur.com/ZLV9L.png)               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pstricks-add}     \pstVerb{/p2c {dup 3 1 roll cos mul 3 1 roll sin mul} bind def}% b a t p2c --> x y     \begin{document}          \begin{pspicture}[showgrid=bottom](6,4)         \pnode(3,2){center}         \pnode(!2 3 0 p2c exch 3 add exch 2 add){A}         \pnode(!2 3 0 p2c exch 3 add exch 2 add){B}         \pscustom[origin={center},fillstyle=solid,fillcolor=cyan]         {             \psellipticarc(center)(3,2){(A)}{(B)}             \lineto(center)             \closepath         }        \end{pspicture}          \end{document}      ## Second Syntax               \pnode[3,2](!2 3 0 p2c){A}      And the output is as follows. ![enter image description here](http://i.stack.imgur.com/qWchI.png)               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pstricks-add}     \pstVerb{/p2c {dup 3 1 roll cos mul 3 1 roll sin mul} bind def}% b a t p2c --> x y     \begin{document}          \begin{pspicture}[showgrid=bottom](6,4)         \pnode(3,2){center}         \pnode[3,2](!2 3 0 p2c){A}         \pnode(!2 3 0 p2c exch 3 add exch 2 add){B}         \pscustom[origin={center},fillstyle=solid,fillcolor=cyan]         {             \psellipticarc(center)(3,2){(A)}{(B)}             \lineto(center)             \closepath         }        \end{pspicture}          \end{document}      Why are the outputs different? ## Edit: I noticed that the problem will be fixed only if both `A` and `B` are expressed in the same syntax, either                   \pnode(!2 3 0 p2c exch 3 add exch 2 add){A}         \pnode(!2 3 0 p2c exch 3 add exch 2 add){B}      or                   \pnode[3,2](!2 3 0 p2c){A}         \pnode[3,2](!2 3 0 p2c){B}      But I still don't understand why the output is different for the given examples above (before the Edit section)?


title: Side by side pie chart?

text: **Is there a way to get pie charts side by side?** I have tried with the minipage method, but I can only get it to work for images, and not with the code I have used for a pie chart. The code I have used for a pie chart works fine seperately. My code is as follows when it goes wrong with the minipage method:               \newcommand{\slice}[4]{ \pgfmathparse{0.5*#1+0.5*#2} \let\midangle\pgfmathresult          % slice \draw[thick,fill=black!10] (0,0) -- (#1:1) arc (#1:#2:1) -- cycle;          % outer label \node[label=\midangle:#4] at (\midangle:1) {};          % inner label \pgfmathparse{min((#2-#1-10)/110*(-0.3),0)} \let\temp\pgfmathresult \pgfmathparse{max(\temp,-0.5) + 0.8} \let\innerpos\pgfmathresult \node at (\midangle:\innerpos) {#3}; }          \begin{figure}[ht] \begin{minipage}[b]{0.45\linewidth} \begin{tikzpicture}[scale=3]          \newcounter{a} \newcounter{b} \foreach \p/\t in {21/ , 5/ CDO, 2/ CMBS, 53/RMBS, 18/SME, 1/WBS} { \setcounter{a}{\value{b}} \addtocounter{b}{\p} \slice{\thea/100*360} {\theb/100*360} {\p\%}{\t} }          \centering \caption{default} \label{fig:figure1} \end{minipage} \hspace{0.5cm} \begin{minipage}[b]{0.45\linewidth} \begin{tikzpicture}[scale=2.1] \newcounter{a}{0} \newcounter{b}{0} \foreach \p/\t in {21/ , 5/ CDO, 2/ CMBS, 53/RMBS, 18/SME, 1/WBS} { \setcounter{a}{\value{b}} \addtocounter{b}{\p} \slice{\thea/100*360} {\theb/100*360} {\p\%}{\t} }          \centering \caption{default} \label{fig:figure2} \end{minipage} \end{figure}


title: Highlighting text for review

text: I am looking for a way to highlight sections, sentences, etc for review without breaking the paragraphs up. I have tried the package `todonotes`, but I couldn't get the underlining to work with sentences spanning multiple lines.


title: Harvard referencing

text: I am using natbib and agsm for harvard style referencing. My related code is               \usepackage{natbib}          \bibliographystyle{agsm}               \bibliography{bibliography/bibliography}      Even I could get the reference list....how to do that? I am using the Imperial College template. But I used this `\bibliographystyle{plainnat}` except this `\bibliographystyle{agsm}`. Then only I got this file. I want to get haravard references. ex: in `bibliography.bib` file               @article{Roberts95b,       author = {A. J. Roberts and A. Cronin},       journal = {Physica A},       pages = {867--878},       title = {Unbiased estimation of multi-fractal       dimensions of finite data sets},       volume = 233,       year = 1996,      }      output: > A. J. Roberts and A. Cronin. Unbiased estimation of multi-fractal dimensions > of finite data sets. _Physica A_ , 233:867-878, 1996


title: Margin changes in converting DVI to PDF

text: I have a 1 inch top margin in all the pages that I have in my DVI file. When I convert this to PDF however the top margin reduces! I am not sure why this is happening. Could someone tell me how to ensure a top margin of at least 1 inch in the PDF?


title: Font "AGaramondPro-semibold" cannot be found

text: I have a document [CV template taken from Paul Gessler. I am having difficulty finding AGaramondpro-Semibold font from fontspec package. I have already upgraded the fontspec package from package repositories. I dont have a problem when I replace all the AGaramondPro-Semibold occurances to Georgia. MWE:               \documentclass[12pt,letterpaper]{article}          \def\myauthor{Paul Gessler}     \def\mytitle{pdg-vita}     \def\myemail{paul.gessler@marquette.edu}     \def\myweb{pdgessler}     \def\myphone{414-241-1627}     \def\mykeywords{       paul gessler,        resume,        curriculum,        vita,        curriculum vita,        cv,        paul,        gessler,        pdg     }          \setlength\parindent{0pt}          \newenvironment{itemize*}%     {\begin{itemize}%       \setlength{\itemsep}{0pt}}%     {\end{itemize}}          \usepackage{url}     \usepackage{fancyhdr}     \usepackage{lastpage}     %\usepackage{ocgtools}     \usepackage{enumitem}     \setlist{nolistsep,leftmargin=0.15in}     \usepackage[log-declarations=false]{xparse}     \usepackage{fontspec}     \usepackage{microtype}     \usepackage[margin=1.125in,right=1in,left=2in]{geometry}     \usepackage[strict]{changepage}     \usepackage[       ocgcolorlinks,       urlcolor={[rgb]{0,0,0.54}},       unicode,       plainpages=false,       pdfpagelabels,       pdftitle={\mytitle},       pdfauthor={\myauthor},       pdfkeywords={\mykeywords}     ]{hyperref}          % fix ocgcolor link breaking; thanks due to Benjamin Lerner (http://goo.gl/VZKR7M)     \makeatletter     \AtBeginDocument{%       \newlength{\temp@x}%       \newlength{\temp@y}%       \newlength{\temp@w}%       \newlength{\temp@h}%       \def\my@coords#1#2#3#4{%         \setlength{\temp@x}{#1}%         \setlength{\temp@y}{#2}%         \setlength{\temp@w}{#3}%         \setlength{\temp@h}{#4}%         \adjustlengths{}%         \my@pdfliteral{\strip@pt\temp@x\space\strip@pt\temp@y\space\strip@pt\temp@w\space\strip@pt\temp@h\space re}}%       \ifpdf         \typeout{In PDF mode}%         \def\my@pdfliteral#1{\pdfliteral page{#1}}% I don't know why % this command...         \def\adjustlengths{}%       \fi       \ifxetex         \def\my@pdfliteral #1{\special{pdf: literal direct #1}}% isn't equivalent to this one         \def\adjustlengths{\setlength{\temp@h}{-\temp@h}\addtolength{\temp@y}{1in}\addtolength{\temp@x}{-1in}}%       \fi%       \def\Hy@colorlink#1{%         \begingroup           \ifHy@ocgcolorlinks             \def\Hy@ocgcolor{#1}%             \my@pdfliteral{q}%             \my@pdfliteral{7 Tr}% Set text mode to clipping-only           \else             \HyColor@UseColor#1%           \fi       }%       \def\Hy@endcolorlink{%         \ifHy@ocgcolorlinks%           \my@pdfliteral{/OC/OCPrint BDC}%           \my@coords{0pt}{0pt}{\pdfpagewidth}{\pdfpageheight}%           \my@pdfliteral{F}% Fill clipping path (the url's text) with current color           \my@pdfliteral{EMC/OC/OCView BDC}%           \begingroup%             \expandafter\HyColor@UseColor\Hy@ocgcolor%             \my@coords{0pt}{0pt}{\pdfpagewidth}{\pdfpageheight}%             \my@pdfliteral{F}% Fill clipping path (the url's text) with \Hy@ocgcolor           \endgroup%           \my@pdfliteral{EMC}%           \my@pdfliteral{0 Tr}% Reset text to normal mode           \my@pdfliteral{Q}%         \fi         \endgroup       }%     }     \makeatother     % end fixes          \newcommand{\ML}{\textsc{Matlab}}     \newcommand{\Simu}{Simulink}     \newcommand{\MLS}{\ML{}/\Simu{}}     \newcommand{\apdl}{\textsc{APDL}}     \newcommand{\ansys}{\textsc{Ansys}}     \newcommand{\fluent}{\textsc{Fluent}}     \newcommand\CPP{C/C\ensuremath{+}\ensuremath{+}}     \newcommand{\Star}{\textsc{Star-CCM\ensuremath{+}}}          \newcommand{\mhead}[1]{\leavevmode\marginpar{\sffamily\footnotesize #1}}     \newcommand{\rdate}[1]{{\addfontfeature{Numbers=OldStyle} \hfill #1}}     \renewcommand{\date}[1]{{\addfontfeature{Numbers=OldStyle} #1}}     \renewcommand{\labelitemi}{-}           \setmainfont[       Ligatures={TeX,Common},       BoldFont={AGaramondPro-Semibold},     ]{Adobe Garamond Pro}     \setsansfont[       Ligatures={TeX,Common},       Letters=SmallCaps,       Color=660000,     ]{Adobe Garamond Pro}     \setmonofont{FontAwesome}          \begin{document}     \pagestyle{fancy} \setlength\headwidth{6.5in}     \rhead{\textsc{paul d.~gessler—r\'{e}sum\'{e}—\thepage{} of \pageref*{LastPage}}} \cfoot{}     \thispagestyle{empty}     \begin{adjustwidth}{-1in}{}     {\Huge       {\textsc{%         {\addfontfeature{Style=TitlingCaps}P}\kern-1.5ptaul          {\addfontfeature{Style=TitlingCaps}D}\kern-2pt.~%         {\addfontfeature{Style=TitlingCaps}G}essler}       }     }     \hfill\hfill\hfill     {       \begin{minipage}[b]{1.6in}         \flushleft \footnotesize          2040 West Wisconsin Avenue \\          Apartment S406A \\          Milwaukee, WI~~53233-2098       \end{minipage}       \hfill       \begin{minipage}[b]{1.6in}         \flushright \footnotesize          \href{tel:\myphone}{\myphone} \\ %\texttt{}~         \href{mailto:\myemail}{\myemail} \\         \href{https://www.github.com/\myweb}{\texttt{}}~\href{https://www.linkedin.com/in/\myweb}{\texttt{}~\myweb}       \end{minipage}     }\par     \hrulefill     \end{adjustwidth}       \reversemarginpar      \setlength\marginparwidth{0.85in}     \medskip     \mhead{Education}%     \textbf{Marquette University,} Milwaukee, Wisconsin \newline     \emph{Master of Science, \href{http://www.marquette.edu/engineering/mechanical/}{Mechanical Engineering}} \rdate{2012–2014}     \begin{itemize*}       \item Cumulative GPA: 3.60/4.00; \href{http://www.marquette.edu/engineering/mechanical/grad_study.shtml}{Energy Systems Specialization}       \item Thesis: One-Dimensional Model of a Refrigeration Cycle Compressor Test Block       \item Advisor: Dr.~Margaret M.~Mathison     %  \item Coursework:\newline     %    \begin{tabular}{ll}     %      \addlinespace\toprule     %      Advanced Engineering Mathematics & Transport Phenomena \\     %      Approx.~Methods in Engineering Analysis & Advanced Fluid Mechanics \\     %      Intermediate Thermodynamics & Sustainable Engineering \\     %      Statistical Thermodynamics & Combustion \\     %      \bottomrule     %    \end{tabular}     \end{itemize*}          \medskip     \textbf{Milwaukee School of Engineering,} Milwaukee, Wisconsin \newline     \emph{Bachelor of Science, \href{http://www.msoe.edu/community/academics/mechanical-engineering-department/mechanical-engineering}{Mechanical Engineering}} \rdate{2008–2012}     \begin{itemize*}       \item Cumulative GPA: 3.56/4.00; \href{http://www.msoe.edu/community/academics/minors/page/1448/mathematics-minor}{Mathematics Minor}       \item Senior Project: \href{https://dl.dropbox.com/u/10724484/resume/ME492_2012_Design_Report_PulseWaterJet.pdf}{Modeling of Pulsed Jet Impingement on Brittle Materials}       \item Advisors: Prof.~Thomas J.~Labus and Dr.~Vincent C.~Prantil     %  \item Selected Coursework:\newline     %    \begin{tabular}{ll}     %      \addlinespace\toprule     %           %      \bottomrule     %    \end{tabular}     \end{itemize*}          \end{document}      ERROR : ![Error related to Fontspec and AGaramondPro- Semibold](http://i.stack.imgur.com/RXML1.png)


title: How can I finish this about LTE diagram using filldraw rectangle

text: This is an picture from 3GPP "LTE Resource Guide" called {LTE Uplink Subframe with Normal Cyclic Prefix} ![enter image description here](http://i.stack.imgur.com/rNYwX.png) I have done               \documentclass{standalone}     \usepackage{tikz}     \usepackage{verbatim}     \usepackage{scalefnt}     \begin{document}     \thispagestyle{empty}     \begin{tikzpicture}     \filldraw[fill=blue] (4.5,6)rectangle (1,0.5);%PUCCH-ACK/NACK/SRI     \filldraw[fill=orange] (3.5,6) rectangle (0.5,0.5);%PUCCH-CQI     \filldraw[fill=white!50!blue](3,6) rectangle(0.5,0.5);%Demodulation RS     \filldraw[fill=orange] (2.5,6) rectangle (1,0.5);%PUCCH-CQI     \filldraw[fill=orange] (2,6) rectangle (0.5,0.5);%PUCCH-CQI     \filldraw[fill=white!50!blue] (1,6) rectangle (0.5,0.5);%Demodulation RS     \filldraw[fill=white!50!blue] (4,0.5) rectangle (4,0.5);%Demodulation RS     \filldraw[fill=white!50!blue] (0,6) rectangle (0.5,0.5);     \filldraw[fill=orange] (0,6) rectangle (0.5,0.5);%PUCCH-CQI     \filldraw[fill=orange] (0,6) rectangle (0.5,0.5);%PUCCH-CQI     \filldraw[fill=black!30!green] (2,0.5) rectangle (5,5.5);%PUSCH-Data     \filldraw[fill=black!30!green] (0,0.5) rectangle (1.5,5.5);%PUSCH-Data     \filldraw[fill=white!50!blue] (2.5,0) rectangle (1,0.5);%Demodulation RS     \filldraw[fill=blue] (3,0) rectangle (1,0.5);%PUCCH-ACK/NACK/SRI     \filldraw[fill=blue] (0,0) rectangle (1,0.5);%PUCCH-ACK/NACK/SRI     \filldraw[fill=white!50!blue] (0,1) rectangle (1.5,5);%Demodulation RS     \draw[step=0.5,thick] (0,0) grid (8,6);%resource grid     \end{tikzpicture}     \end{document}      now my problem is how to add little grid on the right side of this figure. maybe you probably have a question about why not use this figure. my answer is my teacher just accepts painting own and I just know LaTeX can accept the file eps format


title: Change fonts for units in siunitx

text: In the rules of typography for my language there is a rule, that units (only units, not numbers) should be displayed in _different_ font than the rest of the text. E.g. if all of the text has serif font, units should be in sans serif font. It is pretty unclear from the manual if something like that could be achieved. Also (this is perhaps breaking the rules, but it is waste of time and space post two so similar questions separately): siunitx displays `\SI{0.5}{\per\s}` as `0.5/s`. This is wrong, ISO 80000 requires displaying `0.5 s$^{-1}$`. I would like to have `{\m\per\s}` displayed as `m/s` and `{\per\s}` as `s$^{-1}$`. Is that possible? Thanks for help.


title: Table of Values

text: How can something like this be done in MacTex: ![enter image description here](http://i.stack.imgur.com/KyhyX.png)


title: Asymptote default renderer problem after upgrading to TeX Live 2013

text: I just upgraded my TeX Live installation on Ubuntu 64-bit from 2012 to 2013. After the upgrade, when I tried to render some simple 3D drawings I was not getting the default rendering window to come up. So from the Asymptote manual I added the following lines:               import settings;     outformat="";     render=-1;      I get the following error:               $ asy -V 3test.asy      /usr/local/texlive/2013/texmf-dist/asymptote/three.asy: 2906.13: runtime: to support onscreen rendering, please install glut library, run ./configure, and recompile      In TeX Live 2012, even without the suggested configuration options, a command such as the one used above would go right into the OpenGL renderer. Any suggestions as to what is going on? I am thinking that perhaps the Asymptote that is compiled into TeX Live 2013 is compiled without the glut libraries? Do I need to compile Asymptote directly from source?


title: Pop-ups for a preview of raster images (.jpg,.tiff etc.) as they are while writing LaTeX code

text: I usually have a lot of figures to comment in my latex document sometimes for me would be helpful have a look to the figures as they are (not a preview of the final formatted results) just a very fast thumbnail or a popup to remember how they look and check if I placed the right one in the right place. I know that I can compile only a part of code but I'm searching for a faster trick. Are there any editors able to do that? Thanks a lot.


title: How to generate a full width table of contents (tufte-book)?

text: fullwidth environment causes trouble across pages. mdframed option too does not work well. The mdframed answer was suggested by the author for normal text here , How to switch between two margin sizes?               \documentclass[nols,a4paper,twoside,symmetric,justified,marginals=raggedouter]{tufte-book}          \hypersetup{colorlinks} % Comment this line if you don't wish to have colored links          \usepackage{lipsum,mdframed,fontspec}     \definecolor{secnum}{RGB}{13,151,225}     \definecolor{ptcbackground}{RGB}{212,237,252}     \definecolor{ptctitle}{RGB}{0,177,235}          % TOC       \usepackage{titletoc}       \usepackage{etoolbox}       \setcounter{tocdepth}{1}       \pretocmd{\tableofcontents}{\begin{mdframed}[backgroundcolor=ptcbackground,outermargin=\dimexpr-\marginparwidth-\marginparsep\relax,innermargin=0pt,hidealllines=true]\let\cleardoublepage\relax}{}{}       \apptocmd{\tableofcontents}{\end{mdframed}}{}{}          \begin{document}     \tableofcontents     \chapter{Questions of Design}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Drawing}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Technique}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Design}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Drawing}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Technique}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Design}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Drawing}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Technique}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Design}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Drawing}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \chapter{Questions of Technique}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \end{document}


title: How should I typeset the physical dimensions of quantities?

text: As an example: The Newton's Law gives               F=ma      vs.      dim F=MLT^{-2}      My question is: Should I typeset the "MLT" in `\mathit` shape? You can contrast               \[\mathit{LT}\mathit{LT}\mathit{LT}\mathit{LT}\]     \[\mathit{L}\mathit{T}\mathit{L}\mathit{T}\mathit{L}\mathit{T}\mathit{L}\mathit{T}\]      the latter is more close together. Is there some tricks on using `\mathit` shape? Or I should choose the `\mathrm` family, or even just the default math font?


title: pythontex3.py does not compile very simple xelatex file

text: I have the following environment LinuxMint 15 (which has python2.7 and 3.3 as part of its install. I installed Texlive, Texworks, Pygments for 2.7 and 3. Working with Texworks and creating xelatex tex file, generating pdf does not give issues. I installed pythontex 0.11beta according to the instructions in the pdf. (a version I have been using on windows without issues). In `pythontex3.py` I changed `#/usr/bin/env python` to `/usr/bin/env python3`. Texworks generates pythontex intermediate files without showing errors. Minimal sample code (I commented even all python code and error still occurs)               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8          \documentclass{article}          % specific for pythontex:     \usepackage{fancyvrb}     \usepackage{etex}     \usepackage{etoolbox}     \usepackage{xstring}     \usepackage{pgfopts}     \usepackage{newfloat}     \usepackage{pythontex}          \begin{pycode}     #!/usr/bin/env python3     # -*- coding: utf-8 -*-     #f_aut = open('myfile.txt', encoding='utf-8', mode='w')     \end{pycode}          \begin{document}     aapnootmies          % cleanup pythontex/python     \begin{pycode}     #!/usr/bin/env python3     # -*- coding: utf-8 -*-     #f_aut.close()     \end{pycode}          \end{document}      The error given: This is PythonTeX v0.11beta               ----  Errors and Warnings for py:default:default  ----       Traceback (most recent call last):     * PythonTeX code error.  Error line cannot be determined.       Error is likely due to system and/or PythonTeX-generated code.         File "pythontex-files-troep/py_default_default.py", line 8, in <module>           sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict')       AttributeError: 'file' object has no attribute 'buffer'      I can not figure out why but to me it seems there is still a mismatch going on between python 2.7 and 3 and/or pygments (as there is no python code at all in the resulting intermediate files as I commented it out)?


title: how to plot the functions in TikZ?

text: I would like to plot a linear function as y=40-0.2x and an hyperbola as y=5/x. How could I make it? I've tried, a code from this document in p. 160, but the curve wasn't in the same page with the axes. **EDIT:** Having used the Tikz method mentionned below, I would like to make a graph for y=5/(x-1)+1. The result as it is shown in Microsoft Mathematics is: ![enter image description here](http://i.stack.imgur.com/QvGAx.png) However, using LaTeX, I don't have the same result. My code is:               \documentclass[tikz,border=3mm]{standalone}     \usepackage[english,greek]{babel}     \usepackage{ucs}      \usepackage[utf8x]{inputenc}     \begin{document}     \begin{tikzpicture}[xscale=0.08,yscale=0.09,domain=0.140:60,samples=800]         \draw[->] (0,0) -- (65,0) node[below] {$x$};         \draw[->] (0,0) -- (0,35) node[left] {$y$};         \foreach \i in {10,20,...,50} {             \draw (\i,1) -- (\i,-1) node[below] {$\i$};         }         \foreach \i in {5,10,...,30} {             \draw (1,\i) -- (-1,\i) node[left] {$\i$};         }         \draw[green] plot (\x,{5/(\x-1)+1});     \end{tikzpicture}     \end{document}      Where is my fault?


title: Currency/number formatting in ConTeXt

text: I am stuck trying to format numbers particularly currency. I assume I need to define something so that I can say `\mynum{$234234}` and this is then typeset as `$ 234 234.00` for instance. From what I could find out LaTeX has `\numprint` etc. I can't seem to find a ConTeXt module or I have no idea how to begin defining my own mynum. Could someone give me directions to define my own function/macro (not sure what they are called).


title: Change paper format for scrbook class (using package typearea)

text: I try to use scrbook class, and play with basic options - **paper size**. I know that is based on KOMA script and for these reasons I should use package `typearea` instead package geometry. See MNWE:               \documentclass{scrbook}     \usepackage[paper=b4paper]{typearea}          \usepackage{lipsum}          \begin{document}       \lipsum[2-8]     \end{document}      I got Latex error: Option clash for package typearea! So I try this               \documentclass[paper=b4paper]{scrbook}     %\usepackage[paper=b4paper]{typearea}          \usepackage{lipsum}          \begin{document}       \lipsum[2-8]     \end{document}      This leads to Latex warning: Unused global option(s): [paper=b4paper]


title: Correct \newgeometry retaining preamble settings

text: I am writing a 350-400 page document using the report document class. The entire document uses the oneside flag as per regulations however I need the document to switch to twoside at a certain point. Mainly at the introduction of appendices. I am using `\newgeometry`; however as per the doc this removes all geometry formatting used in the preamble. I would like to keep all margin definitions or settings such as `headheight` or `headsep` and simply switch to `twoside`. I have just tried               \newgeometry{a4paper,      twoside,      top=20mm,      inner=40mm,      outer=25mm,      bottom=40mm,      headheight=15pt,      headsep=5mm,      footnotesep=5mm,      footskip=20mm - 1em}      This correctly switched to two side however it destroyed setting such as `openright` which I can only set in the preamble.


title: How can I contribute to CTAN?

text: I have create a template and some macros I would like to share. How can I contribute them to CTAN?


title: Can I create music sheets with LaTeX?

text: If so, how? Do I need any additional software?


title: Is there an automatic process to create index creation?

text: Certainly, there must be some way to somewhat create a list of words suggested to be included in an index.


title: Is it possible to use sql database for BibTeX?

text: I have and extensive database with references in form of an SQL database. How can I use this information in BibTeX?


title: How can I test if a command is followed by an argument?

text: Imagine I have two commands defined as               \def\witharg#1{something with #1}     \def\without{something without arg}      and I want to define a new command `\mycmd` that behaves as `\witharg` if it's followed by an argument (not necessarily enclosed in braces), and behaves like `\without` if it is not followed by an argument. In fact, the later case can only be true if `\mycmd` is followed by the token `}`. To make things slightly more clear, I want               {\mycmd\token\mycmd}      to expand to something similar to the expansion of               {\witharg{\token}\without}      How can I achieve this? Note that, in fact, trying to evaluate something like `{\witharg}` fails with TeX complaining that there is an extra `}`, i.e. the argument to `\witharg` is missing.


title: lock spacing in math mode

text: Is it possible to "lock", or protect, the spacing of a math formula displayed in-text, so that latex will not stretch and squeeze the formula? I would _not_ like to do this globally for all formulas, but I have one formula ($(-+++)$) that appears repeatedly. Is it possible force latex to always display it with the same spacing? **Update:** I now realise that the problem in rendering $(-+++)$ was not due to stretching/squeezing in a paragraph, but due to the special role of + and - in latex formulas. The first - and + are presumably treated as delimiters between terms in a formula, and the latter two two are rendered differently with a shorter spacing. The solution $({-}{+}{+}{+})$ given by cgnieder solves this spacing problem, and gives equal spaces between all +:s and -:s. How to remove such spaces has been asked before: Removing spaces between "words" in math mode.


title: Inserting a table made with ERT into a float in LyX

text: Is it impossible to insert a table made with ERT into a float in LyX 2.0 such that I can edit the height and placement of the table in my document?