title: Numbering in algorithmicx

text: 1. I have simple code:              \documentclass{article}          \usepackage{algorithm}      \usepackage{algpseudocode}          \begin{document}          \begin{algorithm}       \caption{Examples}\label{alg:Examples}       \begin{algorithmic}[1]       \State $X=45$       \State $X=45$       \State $X=45$       \State $X=45$       \State $X=45$            \end{algorithmic}     \end{algorithm}                  \end{document}      ![enter image description here](http://i.stack.imgur.com/3azAg.png) How to put a point after the number of the algorithm?   2. I use chapters in `report`:              \documentclass[a4paper,12pt]{report}          \usepackage{algorithm}      \usepackage{algpseudocode}          \begin{document}          \chapter{Chapter 1}          \begin{equation}     X_2=4     \end{equation}          \begin{algorithm}       \caption{Examples}\label{alg:Examples}       \begin{algorithmic}[1]       \State $X=45$       \State $X=45$       \State $X=45$       \State $X=45$       \State $X=45$            \end{algorithmic}     \end{algorithm}          \end{document}      ![enter image description here](http://i.stack.imgur.com/dtKYV.png) How to change the numbering to take into account the chapters?


title: Unusual custom math accent

text: I want to introduce a new type of math accent that is basically an overbar, but also has small (scriptscriptsize?) text set to the right of the bar. Basically something like               $\bar{A}^{\mathrm{co}}$      but I'd like the text to be set higher---preferably centered vertically on the bar. And I'd like to not have to tweak the height because I'll be making arbitrarily many of these. Is this feasible? The context is: I'm working on some math that requires an unusually large number of operations similar to complex conjugation. There is no consensus in the literature on which symbols to use for which operations (Hermitian dagger, overbar, overtilde, overset smiley, etc.), which is endlessly confusing. I want to introduce a new notation. My goal is to use an overbar for everything, but also have a short string describing which type of conjugate this is. The string will always be just two or three characters; `co` in the example above.


title: How can I get TikZ to work within a \tabularx environment?

text: I'm putting together a poster for a conference using beamer. In one column, the poster has some text next to which I want to put a neuron diagram-style figure next to some text. Pictures embed in this with without a problem. But when I include my TikZ code it doesn't work. The preamble includes:                   \begin{block}{BlockTitle}          \begin{columns}                     \begin{column}{.80\textwidth}     \begin{itemize}     \item[] TEXT     \end{itemize}                          \end{column}                     \begin{column}{.20\textwidth}               \centering      \begin{tabularx}{\linewidth}{r}          {\begin{tikzpicture}       \matrix[mymx, amperstand replacement=\&] (mx) {         \& C_1 \\         |[plain]|  \&\& |[selroute]|E_1 \\         \& C_2  \\          |[plain]| \&\& |[plain]|\phantom{E} \\         \& C_3 \\       };       {[route]              \foreach \y in {1,3,5} {           \draw (mx-\y-2) -- (mx-2-3);            }          \end{tikzpicture}}     \\     \includegraphics[width=.80\linewidth]{PICTURE.jpg}     \\           \end{tabularx}                     \end{column}                   \end{columns}                   \vskip-1ex                   \end{block}      The preamble includes:                 \usepackage{tikz}     \usetikzlibrary{scopes,matrix,positioning}     \tikzset{       mymx/.style={matrix of math nodes,nodes=myball,column sep=4em,row sep=-1ex},       myball/.style={draw,circle,inner sep=0pt},       mylabel/.style={midway,sloped,fill=white,inner sep=1pt,outer sep=1pt,below,         execute at begin node={$\scriptstyle},execute at end node={$}},       plain/.style={draw=none,fill=none},       sel/.append style={fill=green!10},       prevsel/.append style={fill=red!10},       route/.style={-latex,thick},       selroute/.style={route,blue!50!green}     }      Does anybody have any suggestions?


title: Setting a new counter to be nested under Chapter number

text: In my thesis, I'm using a hack in a `sty` file that adds margin notes with entries in the Index, like so:               \newcommand{\thenota}{\thechapter.{\it \alph{notas}}.}     \newcommand{\nota}[1]{\stepcounter{notas}\marginpar{%         \scriptsize \thenota\ #1%         \index{%             Nota de margem!{\thenota}%             }%         }%     }      This one works fine when I add `\newcounter{notas}[chapter]` after `\begin{document}`: Entries appear in the Index as "Nota de margem 4.a." as expected. After a while, I decided to add another class of sidenotes, with the following definition:               \newcommand{\themudanca}{\thechapter.{\it \alph{mudanca}}.}     \newcommand{\mudanca}[1]{\stepcounter{mudanca}\marginpar{%         \scriptsize \themudanca\ #1%         \index{%             Alteração no texto!{\themudanca}%             }%         }%     }      But when I add `\newcounter{mudanca}[chapter]`, the output I get is "Alteração no texto 1" and I get multiple page entries, one for each first `\mudanca{}` in each chapter. A MWE would be something like               \documentclass{book}     \usepackage[utf8x]{inputenc}          \newcommand{\thenota}{\thechapter.{\it \alph{notas}}.}     \newcommand{\nota}[1]{\stepcounter{notas}\marginpar{%         \scriptsize \thenota\ #1%         \index{%             Nota de margem!{\thenota}%             }%         }%     }     \newcommand{\themudanca}{\thechapter.{\it \alph{mudanca}}.}     \newcommand{\mudanca}[1]{\stepcounter{mudanca}\marginpar{%         \scriptsize \themudanca\ #1%         \index{%             Alteração no texto!{\themudanca}%             }%         }%     }          \begin{document}     \newcounter{notas}[chapter]     \newcounter{mudanca}[chapter]               \chapter{First}     \nota{aaa}     \mudanca{bbb}     \nota{aaa}     \mudanca{bbb}     \chapter{Second}     \nota{aaa}     \mudanca{bbb}     \end{document}      Why do they behave differently if they are coded exactly the same? Clearing `aux` files didn't solve. Thanks in advance.


title: Nesting "tikzpicture" within "tikzpicture" elements - Good or bad practice?

text: I often nest a `tikzpicture` within a `tikzpicture` element, such as a node, to treat subparts as unity and then place it as such relative to other parts of the picture. However, I'm wondering whether it is considered good or bad practice to nest `tikzpicture`s. I'm also interested of knowing the disadvantages, if any, of nesting `tikzpicture`s. For example, in my latest figure, I've used nesting to achieve the following: ![enter image description here](http://i.stack.imgur.com/4Yjbi.png)               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning}          \colorlet{shade1}{black! 10}     \colorlet{shade2}{black! 20}     \colorlet{shade3}{black! 35}          \begin{document}     \begin{tikzpicture}[%         function/.style={%           draw,           circle,           minimum size=0pt,           inner sep=2pt,           outer sep=0pt,           node distance=0pt,         },         function argument/.style={%           function,           fill=shade3,         },         gpgpu kernel/.style={%           function,           fill=shade2,         },         invoker/.style={%           function,           fill=shade1,         },         label/.style={%           rectangle,           inner sep=0pt,           outer sep=0pt,           node distance=6pt,         },       ]            % Functions       \node [invoker, inner sep=-2pt] {%         \begin{tikzpicture}           \node [gpgpu kernel] (gpgpu_kernel) {%             \begin{tikzpicture}               \node [function argument] (func_arg) {%                 \begin{tabular}{@{}c@{}}                   C \\                   function                 \end{tabular}               };               \node [label, below=of func_arg] {GPGPU kernel};             \end{tikzpicture}           };           \node [label, below=of gpgpu_kernel] {Invoker};         \end{tikzpicture}       };     \end{tikzpicture}     \end{document}


title: In LyX, how to change section headings from Arabic to Roman

text: I'm relatively new to LyX. I'm writing an article and would need to change the numbering of sections from Arabic to Roman. Would anyone know how to do this? (e.g. by means of ERT?) Also, the subsections, I would need to change, to alphabetical (without reference to the section, so, e.g. section "A" rather than section "2.A"). Thanks very much in advance.


title: How to scale a tikz picture?

text: I am using                \documentclass[slidestop,compress,mathserif,12pt,xcolor=dvipsnames]{beamer}     \graphicspath{{images/}}     \definecolor{LHCblue}{RGB}{4, 114, 255}     \usecolortheme[named=LHCblue]{structure}     \usepackage[bars]{beamerthemetree} % Beamer theme v 2.2     \usepackage{kerkis}     \usepackage{multimedia}     \usepackage{subfigure}     \mode<presentation>     %frame     \newcommand*\oldmacro{}%     \let\oldmacro\insertshorttitle%     \renewcommand*\insertshorttitle{%          \oldmacro\hfill%       \insertframenumber\,}%/\,\inserttotalframenumber     \setbeamertemplate{footline}[frame number]     %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     \setbeamercovered{higly dynamic}     \usetheme[watermark=ntua-logo.jpg]{Ilmenau} % Beamer theme v 3.0     \useoutertheme[subsection=true]{smoothbars}%Beamer Outer Theme-circles on top          \useinnertheme{circles} %rectangle bullet points instead of circle ones     \usepackage{beamerthemebars}     \setbeamercolor{navigation symbols dimmed}{fg=red!80!black}     \setbeamercolor{navigation symbols}{fg=red!80!black}     %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     \title[July 2012 H4 Test Beam\hspace{3cm} Stony Brook, NYC]{July 2012 H4 Test Beam}     \author[Stamatopoulos N. Athanasios\hspace{2.5cm}{athanasios.stamatopoulos@cern.ch}]        {Stamatopoulos N. Athanasios}     \institute{NTUA/CERN}     \logo{%       \makebox[0.99\paperwidth]{%         \includegraphics[width=1cm,keepaspectratio]{cern_logo_white.jpg}%         \hfill%         \includegraphics[width=1cm,keepaspectratio]{ntua-logo.jpg}%       }%     }          \usepackage{textpos}     \usepackage{tikz}     \usetikzlibrary{%     calc,%     fadings,%     shadings%     }          \usetikzlibrary{arrows,snakes,shapes}     %\usepackage{enumitem}     %\usepackage{paralist}             \begin{document}          \begin{frame}     \def\scl{0.6}%scaling factor of the picture     \begin{tikzpicture}[       scale=\scl,       controlpanels/.style={yellow!30!brown!20!,rounded corners,draw=black,thick},       screen/.style={green!50!black!60!,draw=black,thick},       trace/.style={green!60!yellow!40!, ultra thick},       smallbutton/.style={white,draw=black, thick},       axes/.style={thick}]       \fill[green!30!blue!30!,rounded corners,draw=black,thick](0,0)        rectangle (27.75,13.25);       \fill[fill=black!40!,draw=black,thick,rounded corners](0.25,0.25)         rectangle (27.5,13.00);       % Screen, centered around the origin then shifted for easy plotting       \begin{scope}[xshift=7cm,yshift=8cm,samples=150]         \fill[black!60!,rounded corners,draw=black,thick](-5.3,-4.3)           rectangle (5.3,4.3);         \fill[screen] (-5.0,-4.0) rectangle (5.0,4.0);         \draw[trace] plot(\x,{1+2.4*sin((2.5*\x +1) r)}); % r for radians...         \draw[trace] plot(\x,{-1+1.25*sin((0.75*\x) r});         \draw[thin] (-5.0,-4.0) grid (5.0,4.0);         \draw[axes] (-5,0)--(5,0); % Time axis         \draw[axes] (0,-4)--(0,4);         \foreach \i in {-4.8,-4.6,...,4.8} \draw (\i,-0.1)--(\i,0.1);         \foreach \i in {-3.8,-3.6,...,3.8} \draw (-0.1,\i)--(0.1,\i);       \end{scope}       % Feet       \fill[black!70!,rounded corners,xshift=2cm] (0,-.5) rectangle (2,0);       \fill[black!70!,rounded corners,xshift=23.75cm] (0,-.5) rectangle (2,0);       % Lower left panel       \fill[controlpanels] (0.6,0.5) rectangle (13.5,3.0);       \path (0.8,0.9) node[scale=\scl,right]{$\mathbf{TeXtronics\,1 - v.1.01}$};       % Lower right panel       \fill[controlpanels] (13.7,0.5) rectangle (27.1,6.2);       %Channels       % CH I       \draw[thick] (14.8,1.5) circle (0.7cm);       \fill[gray,draw=black,thick] (14.8,1.5) circle (0.5cm);       \fill[white,draw=black,thick] (14.8,1.5) circle (0.3cm);       \node[scale={1.5*\scl}] at (14.8,2.5) {CH I};       \draw[thick] (16.2,1.5) circle (0.4cm);       \fill[black!60!] (16.2,1.5) circle (0.3cm);       \draw[thick] (16.6,1.5) --(17,1.5)--(17,1.0);       \draw[thick] (16.7,1.0)--(17.3,1.0);       \draw[thick] (16.8,0.85)--(17.2,0.85);       \draw[thick] (16.9,0.70)--(17.1,0.70);       \draw[thick] (26.0,1.5) circle (0.7cm);       % CH II       \fill[gray,draw=black,thick] (26,1.5) circle (0.5cm);       \fill[white,draw=black,thick] (26,1.5) circle (0.3cm);       \node[scale={1.5*\scl}] at (26,2.5) {CH II};       \draw[thick] (24.6,1.5) circle (0.4cm);       \fill[black!60!] (24.6,1.5) circle (0.3cm);       \draw[thick] (24.2,1.5) --(23.7,1.5)--(23.7,1.0);       \draw[thick] (23.4,1.0)--(24.0,1.0);       \draw[thick] (23.5,0.85)--(23.9,0.85);       \draw[thick] (23.6,0.70)--(23.8,0.70);       \draw[thick] (26.0,1.5) circle (0.7cm);       % Y-pos       \fill[smallbutton] (14.8,4.9) circle (0.3cm);       \node[scale={\scl}] at (14.8,5.5) {Y-pos I};       \fill[smallbutton] (26.0,4.9) circle (0.3cm);      \node[scale={\scl}] at (26.0,5.5) {Y-pos II};       % Volt/div the foreach loop draws the two buttons       \foreach \i / \b in {18/75,22.5/345}{       %Second parameter of the loop is the angle of the index mark        \begin{scope}[xshift=\i cm,yshift=3.8cm,scale=0.85]         \node[scale=\scl] at (0,2.3) {Volts/Div};         \node[scale=\scl,black] at (-1,-2.4) {V};         \node[scale=\scl,blue]  at (1,-2.4) {mV};         \clip[rounded corners] (-2,-2) rectangle (2,2);         \fill[black!30!,rounded corners,draw=black,thick] (-2,-2)           rectangle (2,2);         \fill[blue!50!black!20!,draw=black,thick]           (30:1.1)--(30:3)--(3,-3)--(-90:3)--(-90:1.1) arc (-90:30:1.1);          \draw[very thick,rounded corners](-2,-2) rectangle (2,2);        \draw[thick] (0,0) circle (1.0);         \foreach \i in {0,30,...,330}           \draw[thick] (\i:1.2)--(\i:2.5);         \foreach \i/\j in {15/50,45/.1,75/.2,105/.5,135/1,165/2,195/5,225/10,           255/20,285/5,315/10,345/20} \node[scale=\scl,black] at (\i:1.7) {\j};         \fill[blue!30!black!60!,draw=black,thick] (0,0) circle (0.8cm);         % Here you set the right Volts/Div button         \draw[ultra thick,red] (\b:0.3)--(\b:1.2);       \end{scope}}     % Upper right panel       \fill[controlpanels] (13.7,6.5) rectangle (27.1,12.75);       %On-Off button       \draw[rounded corners,thick,blue] (13.9,10.5) rectangle (15.9,12.5);       \fill[fill=red,draw=black,thick,rounded corners] (14.4,10.8) rectangle (15.3,11.2);       \node[scale=\scl] at (14.8,12) {\textbf{Power}};       \node[scale=\scl] at (14.8,11.5) {\textbf{On/Off}};       % Focus-Intensity buttons       \draw[rounded corners,thick,blue] (13.9,7.0) rectangle (15.9,10.0);       \fill[smallbutton] (14.9,7.5) circle (0.3cm);       \node[scale=\scl] at (14.9,8.2) {\textbf{Focus}};       \fill[smallbutton] (14.9,9) circle (0.3cm);       \node[scale=\scl] at (14.9,9.6) {\textbf{Intens}};       % X-pos       \fill[smallbutton] (24.5,9.9) circle (0.3cm);       \node[scale={\scl}] at (24.5,10.5) {X-pos};       % Time/Div       \begin{scope}[xshift=21cm,yshift=9.5cm,scale=1]         \node[scale={1.25*\scl}]  at (0,2.4) {Time/Div};         \clip[rounded corners] (-2.2,-2) rectangle (2.2,2);         \fill[black!30!,rounded corners,draw=black,thick] (-2.2,-2) rectangle (2.2,2);         \fill[blue!50!black!20!,draw=black,thick]           (45:1.1)--(45:3)--(3,-3)--(-90:3)--(-90:1.1) arc (-90:45:1.1);         \fill[green!50!black!40!,draw=black,thick]           (45:1.1)--(45:3) arc(45:207:3) --(207:1.1) arc (207:45:1.1);         \draw[very thick,rounded corners](-2.2,-2) rectangle (2.2,2);         \node[scale={1.25*\scl}] at (-1.6,-1.6) {$s$};         \node[scale={1.25*\scl}] at (1.6,-1.6) {$\mu{}\,s$};         \node[scale={1.25*\scl}] at (-1.6,1.6) {$m\,s$};         \draw[thick] (0,0) circle (1.0);         \foreach \i in {-72,-54,...,262} \draw[thick] (\i:1.15)--(\i:1.35);         \foreach \i/\j in {-72/.5,-54/1,-36/2,-18/5,0/10,18/20,36/50,54/.1,72/.2,90/.5,           108/1,126/2,144/5,162/10,180/20,198/50,216/.1,234/.2,252/.5}           \node[scale=\scl,black] at (\i:1.7){\j};         \fill[blue!30!black!60!,draw=black,thick] (0,0) circle (0.8cm);         % Here you set the Time/Div button         \draw[ultra thick,red] (-18:0.3)--(-18:1.2);             % X-pos       \end{scope}     \end{tikzpicture}     \end{frame}     \end{document}      The output I get is something like that ![](http://i.imgur.com/abJ9F.png) I also tried to play with variable scl but the output is really ugly... ![](http://i.imgur.com/zCWmy.png) ![](http://i.imgur.com/8Dh3F.png) I also tried to put it in a `figure` enviroment with `includegraphics[scale=...]{begin{tikzpicture}...{\end{tikzpicture}}` but it isn't working... Any ideas guys on how to scale it down and keep it pretty at the same time?


title: Full justification fails

text: I am now writing my thesis and have a problem occurring in some pages. The problem regards full justification of text. LaTeX sometimes fails to fully justify text and break lines. In other words, the text steps into the right margin. Please, how to solve this troubling problem? Any help is greatly appreciated.


I am pretty new to LaTeX. With windows, Miktex/Texmaker pretty-much takes care of package installation whenever needed, but on Ubuntu I have been downloading needed packages from CTAN and installing them manually. So today I installed three packages on my Ubuntu 9.10: xfor, datatool and etoolbox. For some reason I get this weird error on quick build:               (/usr/share/texmf/tex/latex/datatool/datatool-base.sty     Package: datatool-base 2012/07/18 v2.10 (NLCT)     (/usr/share/texmf/tex/latex/etoolbox/etoolbox.sty     Package: etoolbox 2011/01/03 v2.1 e-TeX tools for LaTeX     \etb@tempcnta=\count97     ! LaTeX Error: Command \AtBeginEnvironment already defined.     Or name \end... illegal, see p.192 of the manual.     See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...      Can anyone help me fix this error ? I am actually writing my thesis using a cls file provided by my university. I am using Texmaker editor.


title: Suitable table (latex-code) for recording experimental results by hand

text: I am preparing a document for students to record their experimental results. What is a suitable table for the recording of results in particular? Suitable tables should have large cells for handwriting. In my case only two columns (many rows) are required, one column is attempt # and the other one is speed or reaction time.


title: Unicode selection from other font

text: ## How can i choose the `char"EB40` also from other font and for every chapter separately?               \documentclass[a4paper,12pt]{book}     \usepackage{fontspec}     \usepackage{titlesec}          \newfontface\cmaiusc[LetterSpace=40,WordSpace=2,RawFeature={+swsh,+dlig}]{lmromancaps10-regular.otf}               \newcommand{\Chapter}[4][]{%        \chapter[\if\relax\detokenize{#1}\relax#2\else#1\fi]{%     %     \makebox[\textwidth][c]{\includegraphics[width=6in]{#4}}\\          #2,\\\large #3\\\char"EB40}        \begin{center}          \textit{\cmaiusc capitolo\ \roman{chapter}.}        \end{center}     }     \titleformat{\chapter}[display]%        {\centering\bfseries\huge}%        {}%        {-40pt}%        {}     \titlespacing*{\chapter}       {0pt}{0pt}{5pt}               \begin{document}     \Chapter{Analysis mathematica}{principia.}{}     \end{document}


title: Indenting part of paragraph after \\ in a list

text: MWE:               \documentclass{article}     \begin{document}     A list:          \begin{itemize}     \item \texttt{abc def ghi}\\     This needs to be indented.     \item \texttt{jkl mno pqr}\\     This needs to me indented, too.     \item \texttt{stu vwx yz}\\     But this musn't be indented.     \end{itemize}     \end{document}      I need to indent a little a text after `\\` in `\item`. I need it not to be global change because some of texts (maybe in another list) must not be indented. **EDIT:**               \documentclass{article}     \usepackage{enumitem}     \setlist{parsep=0pt,listparindent=\parindent}          \begin{document}     A list:     \begin{itemize}     \item \texttt{abc def ghi}          This needs to be indented.     \item \texttt{jkl mno pqr}          This needs to me indented, too. It is a very long text and I need it to be moved right, not only the first line.     \item \texttt{stu vwx yz}\\     But this musn't be indented.     \end{itemize}     \end{document}      I said earlier something different that I meant. I don't want an indent (that moves first line right). I want to move all lines right.


title: How do I slant variables when using eulervm?

text: Using fontspec and xetex, when in text mode I can define:               \renewcommand{\textsl}[1]{{\fontspec[FakeSlant=0.2]{Neo Euler} #1}}      and I get slanted characters using Neo Euler (to fake the missing italics). I want to do the same thing with eulervm in math mode, and redefine plain math variables to be slanted. Before even specifying that I want variables to use that format, I can't even get to use fontspec in math mode, e.g.:               \newcommand{\mathsl}[1]{{\fontspec[FakeSlant=0.5]{Neo Euler} #1}}      Does not produce a slanted font when I have $\mathsl{x}$. Any suggestions on how to get slanted text in math mode? Once that's done, how would I go about requesting that all scalar variables be typeset in that format in math mode? (presumably using \DeclareMathAlphabet, but not sure how) Thanks!


title: Acronyms in section names with classic thesis

text: I have troubles using _acronym_ package with _classicthesis_ package when I put an acronym in a section name. The least reproducible example I could come up with is this:               \documentclass{scrreprt}          % If I remove the option 'pdfspacing' I got this error:     %     % ! Argument of \@acl has an extra }.     % <inserted text>     %                 \par     %l.21 \section{\acl{GRASP}}          \usepackage[pdfspacing]{classicthesis}          \usepackage{acronym}          \begin{document}          \tableofcontents{}          \chapter{Algorithms}          Details about algorithms.          \section{\acl{GRASP}}          Initial solutions are constructed using \ac{GRASP}.          \chapter{Acronyms}          \begin{acronym}       \acro{GRASP}{Greedy Randomized Adaptive Search Procedure}     \end{acronym}          \end{document}      If I run Latex (three times) I got this warning:               ...          Package acronym Warning: Acronym `grasp' is not defined on input line 25.               LaTeX Font Warning: Font shape `OT1/pplj/bx/sc' undefined     (Font)              using `OT1/pplj/bx/n' instead on input line 25.          [2]     Chapter 2.     [3] (C:\Users\claudio\Desktop\text\thesis.aux)          LaTeX Font Warning: Some font shapes were not available, defaults substituted.          )     (see the transcript file for additional information)pdfTeX warning (dest): name     {GRASP} has been referenced but does not exist, replaced by a fixed one          ...      And in the PDF the section title says `grasp!`, while other entries are correctly replaced with the acronym. ![enter image description here](http://i.stack.imgur.com/NYrWe.png) The only related line I found in the log file (is that the transcript file?) says this:               Package acronym Info: Label `acro:GRASP' newly defined as it shall be overridden     although it is yet undefined on input line 27.      But I have no idea how to fix it. If I comment out the two classicthesis related lines everything is fine.


title: TiKZ-picture fitted to page edge

text: Using TiKZ, I'm trying to create an image that fits the margin of odd-sided pages (a water stamp of sort) for an A6 booklet. My idea was at first to create an image that is exactly the same size as an A6 page, compile to PDF and then use `eso-pic` to set it as the background of the booklet document. However, I've realized I want to use commands such as `\thesection` to show information in the margin, so I'd rather do this in a way where everything fits in the same document. An example of what I want to accomplish can be seen here, where the document shows an A4 with eight A6 pages, the first one being odd-numbered. ~~I can't figure out how to scale the`tikzpicture` to fit the page exactly. Some parts of the image should be fitted to the page edge, so I need it to scale exactly, without margins. You could say I'm trying to do this, only the opposite.~~


title: How do I draw Extendible Hashing/Skip List diagrams using Tikz Library?

text: I need to draw Extendible hashing(directory and block diagrams;like this) and skip list(and like this diagrams using Tikz library. I tried to find some examples on the internet, but couldn't find any.


title: Undesirable alignment in series of 'enumerates'

text: (I'll preface this question by saying that there seem to be quite a few question on tex.se with keywords 'align' and 'enumerate', but it seems as if they all deal with questions regarding alignment within the enumerate environment or combining the the align and enumerate environments - so I don't believe that my question is redundant.) Here's the gist of what I am doing and what issue has come about. I am typing up solutions to a, say, three-part (math) question, the parts being enumerated as (i),(ii), and (iii). After stating each part, I wish to write the solution right underneath. So it should look like (i) Q A (ii) Q A (iii) Q A Perhaps it's not the most efficient way of typing it up (by all means, feel free to recommend something else) but I've done this as               \begin{enumerate}[(i)]     \item question 1     \end{enumerate}     answer 1          \begin{enumerate}[(ii)]     \item question 2     \end{enumerate}     answer 2          \begin{enumerate}[(iii)]     \item question 3     \end{enumerate}     answer 3      However, the way it comes out has (iii) shifted further right than (ii), which is shifted further right than (i). Can anyone tell me why this happens and how to remedy it?


title: pgfplots and backgrounds library

text: When I use `framed` option from `backgrounds` tikz library for axis environment, this example works ok:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{backgrounds}     \begin{document}     \begin{tikzpicture}          \begin{axis}[grid=both]     \end{axis}          \begin{axis}[xshift=2cm,yshift=3cm,width=4cm,framed]     \end{axis}          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/PG68L.png) but for more complicated background styles, like `background rectangle/.style={draw=red,fill=white},show background rectangle` nothing happend (howewer frame around subplot still appears). If I use wrapping of `axis` environment into additional `tikzpicture` like this one:               \begin{tikzpicture}          \begin{axis}[grid=both]     \end{axis}          \begin{tikzpicture}[background rectangle/.style={draw=red,fill=white},         show background rectangle]       \begin{axis}[xshift=2cm,yshift=3cm,width=4cm]       \end{axis}     \end{tikzpicture}          \end{tikzpicture}      backgound ok, but positioning fails. How could I use backrounds with pgfplots? Similar question: how to use backgrounds for several axis together (it's useful for different right and left axis in one plot).


title: Savebox equivalent of \csname?

text: I would like to define a command which would increment a counter, and create a new savebox whose name is generated from the counter value. Something like:               \documentclass{article}          \newcounter{mycounter}     \newcommand{\mycommand}[1]{%         \addtocounter{mycounter}{1}%         \newsavebox{\csname foobox\roman{mycounter}\endcsname}%         \savebox{\csname foobox\roman{mycounter}\endcsname}{#1}%         }          \begin{document}              \mycommand{This is the content of fooboxi.}         \mycommand{This is the content of fooboxii.}         \usebox{\fooboxi}         \usebox{\fooboxii}          \end{document}      My Google-fu has been too weak for me to find a way to code this. Any pointers?


title: Underlined blank that wraps

text: I'd like to create an "answer blank" in a document. It should basically look like an underline with nothing above it. I found a question about it ( How does one TeX a blank? ), but that doesn't deal with the main problem I'm having, which is that I want the blank to wrap normally to the text width. The solutions using \hspace or \rule cause the line to extend into the margin. I'm looking for something that wraps just like normal text and so won't extend into the margin. It should be an underlined blank that has a specified length, but that length might be wrapped across multiple lines in the output document.


title: adding an image to latex

text: I am very new in Latex. I would like to add an image to my dokument, but I have no success:               \usepackage{graphicx}     \begin{document}          \begin{figure}     \includegraphics[ angle=30]{D:/MA/Bilder/AC-TSPlot-Pos-Neg}     \end{figure}          \end{document}      it is a `.png` image. I get this error:               ! LaTeX Error: File `D:/MA/Bilder/AC-TSPlot-Pos-Neg ' not found.      the image is in this folder


title: Make some extra space when using TikZ fit package

text: I'm using the `fit` package to wrap nodes inside a rectangle, as the code shown below. Is there any way to make some extra space between the node `client 3` and the bottom edge of the box? Code:               \usetikzlibrary{positioning, fit, calc, shapes, arrows}     \renewcommand{\figurename}{Figure}     \begin{figure}[!htb]         \centering         \begin{tikzpicture} [title/.style={font=\fontsize{18}{18}\color{black!45}},             server/.style={rectangle, draw, fill=blue!23, rounded corners, minimum height=8em},             client/.style={rectangle, draw, fill=green!23, rounded corners, minimum height=2em},             dot/.style={circle, fill=black, minimum size=2pt, inner sep=0pt, outer sep=2pt}]             % Place nodes             \node [title] (frontend) at (0, 10) {Clients};             \node [client] (client1) at (0, 9.25) {Client 1};             \node [client] (client2) at ($(client1) + (270:1.15)$) {Client 2};             \node [client] (client3) at ($(client2) + (270:1.15)$) {Client 3};             \node [draw=black!50, fit={(frontend) (client1) (client2) (client3)}] {};         \end{tikzpicture}         \caption{Clients graph}     \end{figure}


title: why is texmaker backward synctex search not working if the .tex file's dir name contains chinese characters?

text: I found a strange thing when I use texmaker. When my tex file's directory name is in english, the backward search is OK. While if the directory name contains chinese, the backward search is disabled. How to deal with this problem, if my directory name must contain chinese character?


title: LaTeX error! Too many }'s. \color@endbox ->\color@endgroup

text: I am trying to input r code using the listing package. However, at the moment my file will not compile and returns the following error:               ! Too many }'s.     \color@endbox ->\color@endgroup \egroup      I have worked backwards and figured out that the error only occurs when I use a style file given to us by my department. I have copied the .sty file that causes the error and I have also attached an example that shows the error in action. You will notice if you take out the \usepackage[y4project]{edmaths} that the error will disappear. I have searched but couldn't get the following fix to work. http://www.latex- community.org/forum/viewtopic.php?f=45&p=18575 Here is the MWE (IF YOU RUN THIS IT WILL PRODUCE THE ERROR):               \documentclass[12pt]{report}     \usepackage{amssymb,amsmath,amsthm}     \usepackage[y4project]{edmaths} %%%% REMOVE THIS TO FIX ERROR          \usepackage{listings}     \usepackage{color}     \definecolor{mygreen}{rgb}{0,0.6,0}     \definecolor{mygray}{rgb}{0.5,0.5,0.5}     \definecolor{mymauve}{rgb}{0.58,0,0.82}     \lstset{ %       backgroundcolor=\color{white},   % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}       basicstyle=\footnotesize,        % the size of the fonts that are used for the code       breakatwhitespace=false,         % sets if automatic breaks should only happen at whitespace       breaklines=true,                 % sets automatic line breaking       captionpos=b,                    % sets the caption-position to bottom       commentstyle=\color{mygreen},    % comment style       deletekeywords={...},            % if you want to delete keywords from the given language       escapeinside={\%*}{*)},          % if you want to add LaTeX within your code       extendedchars=true,              % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8       frame=single,                    % adds a frame around the code       keepspaces=true,                 % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)       keywordstyle=\color{blue},       % keyword style       language=Octave,                 % the language of the code       morekeywords={*,...},            % if you want to add more keywords to the set       numbers=left,                    % where to put the line-numbers; possible values are (none, left, right)       numbersep=5pt,                   % how far the line-numbers are from the code       numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers       rulecolor=\color{black},         % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))       showspaces=false,                % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'       showstringspaces=false,          % underline spaces within strings only       showtabs=false,                  % show tabs within strings adding particular underscores       stepnumber=2,                    % the step between two line-numbers. If it's 1, each line will be numbered       stringstyle=\color{mymauve},     % string literal style       tabsize=2,                       % sets default tabsize to 2 spaces       title=\lstname                   % show the filename of files included with \lstinputlisting; also try caption instead of title     }          %  End of preamble          \author{TESTING }     \title{TEST FILE}     \begin{document}     \maketitle     \tableofcontents     \chapter{Introduction}               \begin{table}[h]     \centering         \begin{tabular}{clll}         Sig. level      & 1$\%$ & 5$\%$ & 10$\%$ \\ \hline         $\tau$ & -3.90 & -3.34 & -3.04  \\ \hline         \end{tabular}     \end{table}          \begin{lstlisting}     #include <stdio.h>     #define N 10     /* Block      * comment */     int main()     \end{lstlisting}          \end{document}      Here is the .sty file for edmaths:               %%  Package `edmaths' (26.8.2008)     %%     \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{edmaths}[2007/02/05 Edinburgh maths thesis/report style v0.95]          \RequirePackage{calc,ifthen,setspace,amsmath,amsthm,amscd,amssymb}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Set up the page size and margins %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \setlength{\paperheight}{297mm}    % A4 Paper     \setlength{\paperwidth}{210mm}     %     \setlength{\oddsidemargin}{14.6mm} %  Left/Inside: 4.0cm (rel. -1in)     \setlength{\evensidemargin}{-.4mm} %  Right/Outside: 2.5cm (rel. -1in)     \setlength{\topmargin}{-17.4mm}    % \     \setlength{\headheight}{6mm}       % | Top: 2.0cm (rel. -1in), out of which 6mm for the header     \setlength{\headsep}{6mm}          % /     \setlength{\textwidth}{145mm}      % Margins: 2.5cm + 4cm     % Textheight delayed until we know the line spacing.          % The following is removed in favour of the `report' class options "oneside/twoside".     %\@twosidefalse \@mparswitchfalse  % Single-sided by default               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Provide some fancy option        %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \newboolean{with-fourier}           % Use the `fourier' package for Adobe Utopia font     \newboolean{with-hyperref}          % Use the `hyperref' package for clickable links and bookmarks, all black     \newboolean{with-colour}            % Add sane colours to the hyperref links     \newboolean{with-fancyhdr}          % Use the `fancyhdr' package to provide header and footer          \ifthenelse{\isundefined{\degreetext}}{\newcommand{\degreetext}{Specify a degree option!}}{}     \ifthenelse{\isundefined{\stretchfactor}}{\newcommand{\stretchfactor}{1}}{}     \DeclareOption{fourier}{\setboolean{with-fourier}{true}}     \DeclareOption{hyperref}{\setboolean{with-hyperref}{true}}     \DeclareOption{colour}{\setboolean{with-colour}{true}}     \DeclareOption{fancyhdr}{\setboolean{with-fancyhdr}{true}}          \DeclareOption{phd}{\renewcommand{\degreetext}{Doctor of Philosophy}}     \DeclareOption{firstyear}{\renewcommand{\degreetext}{First-Year Report\\Graduate School of Mathematics}}     \DeclareOption{secondyear}{\renewcommand{\degreetext}{Second-Year Report\\Graduate School of Mathematics}}     \DeclareOption{thirdyear}{\renewcommand{\degreetext}{Third-Year Report\\Graduate School of Mathematics}}     \DeclareOption{y4project}{\renewcommand{\degreetext}{Year 4 Project\\School of Mathematics}}     \DeclareOption{masterph}{\renewcommand{\degreetext}{Master of Philosophy}}     \DeclareOption{mastersc}{\renewcommand{\degreetext}{Master of Science by Research}}          \DeclareOption{single}{\renewcommand{\stretchfactor}{1}}     \DeclareOption{onehalf}{\renewcommand{\stretchfactor}{1.5}}     \DeclareOption{double}{\renewcommand{\stretchfactor}{2}}          %\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}  % Single-sided by default     %\DeclareOption{twosides}{\@twosidetrue \@mparswitchtrue}          \ProcessOptions          \ifthenelse{\boolean{with-fourier}}       { \RequirePackage{cmap}         \RequirePackage{fourier}         \RequirePackage[T1]{fontenc}         \RequirePackage{microtype}       } {}          \ifthenelse{\boolean{with-hyperref}}       {         \RequirePackage[dvipsnames]{xcolor}         \RequirePackage[pdftitle={\@title}, pdfauthor={\@author}, pdfcreator={PDFLaTeX with edmaths}, pdfpagelayout=OneColumn, colorlinks=true, linkcolor=black, urlcolor=black, citecolor=black]{hyperref}       \ifthenelse{\boolean{with-colour}}         {           \hypersetup{linkcolor=Sepia, urlcolor=NavyBlue, citecolor=Sepia}         } {}       } {}          \ifthenelse{\boolean{with-fancyhdr}}       {         \RequirePackage{fancyhdr}         \pagestyle{fancy}         \fancyhf{}         \fancyhead[RO,LE]{\thepage}         \fancyfoot[RO,LE]{\thepage}         \fancyhead[LO]{\it\@title}         \fancyhead[RE]{\@author}         \fancyfoot[RE,LO]{}       } {}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Set up the text body height      %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          % For the text height, we calculate the largest number of lines that gives us no more than 4cm bottom margin.     % This depends on the line spacing, which we need first.          \setstretch{\stretchfactor}          % Debug only: In the next line, \XXXfactor contains the number of lines on a text-only page.     %\newlength{\XXXunit}\setlength{\XXXunit}{1pt}\newlength{\XXXfactor}\setlength{\XXXfactor}{1pt + ((672pt - \topskip) / \baselineskip) * \XXXunit}     \newlength{\scratchlength}\setlength{\scratchlength}{\topskip + ((672pt - \topskip) / \baselineskip) * \baselineskip + \baselineskip}     \setlength{\textheight}{\scratchlength}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Make the title page etc          %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \renewcommand{\maketitle}{%       \begin{titlepage}         \singlespacing         \addtolength{\oddsidemargin}{-0.75cm}         \begin{center}         \null\vskip 4.1cm         \begin{minipage}[t][7.6cm]{10.5cm}           \begin{center}           {\LARGE\textbf{\@title}\par}\vfill           {\Large\textit{\@author}\par}           \end{center}         \end{minipage}         \vfill         {\Large\degreetext \par University of Edinburgh \par\@date \par}         \end{center}       \end{titlepage}       \if@twoside         \thispagestyle{empty}         \cleardoublepage       \else         \addtocounter{page}{1}       \fi     }          \newcommand{\declaration}{%       \chapter*{Declaration}       \begin{singlespace}       I declare that this thesis was composed by myself        and that the work contained therein is my own,        except where explicitly stated otherwise in the text.       \end{singlespace}            {\raggedleft\vspace{2cm}(\textit{\@author})            }     }          \renewenvironment{abstract}{\chapter*{\abstractname}}{\addcontentsline{toc}{chapter}{\abstractname}}          \newcommand{\dedication}[1]{%       \clearpage       \thispagestyle{plain}       \vspace*{7cm}       \begin{center}         \Large\it #1       \end{center}     }          %% A special declaration for Year 4 reports     \newcommand{\yfourdeclaration}[1]{%      \vfill      \noindent      This project report is submitted in partial fulfilment of the requirements for the degree of      \textit{#1}.     }


title: Cannot use xgreek in XeLatex with Fedora

text: I am trying to enable greek hyphenation in a XeLatex document. But when I do I get:               |Package `xgreek' version 2.4 by Apostolos Syropoulos     |! Undefined control sequence.     |\ds@monogreek ->\language \l@monogreek     l.445 \ExecuteOptions{monogreek}     ?     |! Emergency stop.     |\ds@monogreek ->\language \l@monogreek     |l.445 \ExecuteOptions{monogreek}      Here is a snippet to reproduce it:               \documentclass{article}     \usepackage{xgreek}     \begin{document}     \end{document}      For what is worth I'm using Fedora and my XeTex version is 3.1415926-2.5-0.9999.3 (TeX Live 2013). If I recall correctly I didn't have issues with other Linux distributions, so this may be a distribution-specific issue ?


title: Placing figures adjacent to exam choices

text: In the following mwe, I'd like the circular ohm formula figure to be positioned further to the right and the bottom of the figure lined up with choice D of question 4. I don't want the blank space between the questions. Moving the `\includegraphics` command without and within the list environment does odd things too. I've tried               \newlength{\oldparindent} \setlength{\oldparindent}{\parindent}% Save   \parindent     \setbox0=\hbox{\includegraphics[width=0.17\textwidth]{ohm_law}}% Original image     \noindent\begin{minipage}[t]{0.6\textwidth}     \end{minipage}\hfill     \begin{minipage}[t]{0.17\textwidth}     \raisebox{-\ht0}{\usebox0}% Insert image     \end{minipage}      which I found somewhere. It brings the figure to the right, spaces the questions apart, leaving whitespace at the left. I believe the solution is minipage but how? Here is the mwe:               \documentclass[12pt,letterpaper,addpoints]{exam}     \usepackage{geometry}     \usepackage{float}     %\usepackage[scaled=1.05,proportional,lightcondensed]{zlmtt}     \usepackage{graphicx} %needed to include pictures (png)     \usepackage{tabularx}%\usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage{inconsolata}     \renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style          \extraheadheight[-1.25in]{-0.25in}     \extrafootheight{-1in}     \begin{document}          %\printanswers    %uncomment and re-compile to print answer key          \pagestyle{headandfoot}     \runningheadrule     \lhead{}     \chead[]{Electrical Systems 20 Exam(continued)}     \rhead{}          \title{Electrical Systems 20 \\\textsc{Exam}}     \date{}     \maketitle     \textsc{NAME}\enspace\makebox[3in]{\hrulefill}     \textsc{DATE}\enspace\makebox[1.5in]{\hrulefill}     \fullwidth{}     \vspace{0.1in}     %\fullwidth{\large \textbf{1) Multiple Choices}}     \begin{center}     \fbox{\fbox{\parbox{5.5in}{\centering     \textsc {Choose the \emph{most correct} answer from the choices given.}}}}     \end{center}     \vspace{0.1in}          \begin{questions}     \boxedpoints     \pointsinrightmargin     \question[1]Automotive wiring diagrams include     \begin{choices}     \choice A series of colour coded diagrams     \choice Specific symbols to identify components     \choice Wire gauge sizes     \correctchoice All of the above     \end{choices}          \question[1]When soldering an electrical connection, use     \begin{choices}     \choice Acid core flux     \correctchoice Rosin core flux     \choice A or B     \choice Neither A or B     \end{choices}          \question[1]An electrical component that allows current to flow in one     direction only is called     \begin{choices}     \choice Watt     \choice Anode     \choice Cathode     \CorrectChoice Diode     \end{choices}               \question[1]Ohm's law states that     \includegraphics[width=2.0cm]{ohm_law} %started with this     \begin{choices}     \choice $1\ volt = 1\ amp \times 1 \Omega$     \choice $1\ amp = \frac{1\ volt}{1 \Omega}$     \choice $1 \Omega = \frac{1\ volt}{1\ amp}$     \CorrectChoice All of the above are true.     \end{choices}          \question[1] In a parallel circuit,     \begin{choices}     \choice the voltage is the same throughout the circuit, but the     current is divided.     \choice The total circuit resistance is always less than the smallest     resistor in the circuit.     \choice there is more than one path for current to flow.     \CorrectChoice All of the above are true.     \end{choices}          \question[1] An electronic device which acts like a high speed switch     is a     \begin{choices}     \choice triode     \choice diode     \choice monode     \correctchoice transistor     \end{choices}          \end{questions}     \end{document} here


title: outline package, how to change enumeration style?

text: I'm working with the `outlines` package. I want to change the 2nd level enumeration style from small letters ( _a b c_ ) to small roman letters ( _i),ii),iii)..._ ). In other words, I want to exchange the 2nd and 3rd level enumeration styles. I tried reading the documentation of the package but I didn't quite understand if I have to write my own code or just apply what's suggested in the doc. I think it may involve `\renewcommand{\outlineii}{style}` but what do I put in place of _style_ , `roman`? I'd like this change to affect all 2nd-level items.               \documentclass[a4paper, 12pt]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[italian]{babel}          \usepackage{amssymb, amsmath, amsfonts}      \usepackage{outlines}          \begin{document}          \section{First section}      \subsection{First subsec}      \begin{outline}[enumerate]          \1 Calculate $ E_{th} $.     \2 Write $f= f_{electr} + f_{elast}$:     \2 Apply Euler-Lagrange method      \2 Calc each ``piece'' of the 2nd degree diff eq       \3 first this       \3 then the double derivative       \2 Simplify \dots          \end{outline}     \end{document}


title: First paragraph in environment without indent or space

text: I'm trying to create an environment that does not indent the very first paragraph of the text inside the environment. My latest attempt and the corresponding output are shown below. As you can see, the first environment added some small horizontal space to the first non- indented paragraph. The second environment did not, but I could only achieve this by adding a `%` character after `\begin{env}`, which should not be needed. How can I omit this unwanted space without an explicit `%` character? ![Result of minimal example](http://i.stack.imgur.com/H5l8j.jpg)               \documentclass{minimal}          \newenvironment{env}{%         \noindent%     }{%     }%          \begin{document}     Some text. Some text. Some text. Some text. Some text. Some text.     Some text. Some text. Some text. Some text. Some text. Some text.     Some text. Some text. Some text. Some text. Some text. Some text.          \begin{env}         First paragraph inside environment.              Second paragraph inside environment.     \end{env}          \begin{env}%         First paragraph inside environment.              Second paragraph inside environment.     \end{env}     \end{document}


title: How to handle unnecessary whitespace leading to widows/orphans?

text: I'm working on my paper using TexMaker and this is what's happening: ![enter image description here](http://i.stack.imgur.com/MPb9P.png) I'm getting unnecessary whitespace before paragraph 'B'. As a result of the unnecessary whitespace I have a widow/orphan of an equation reference at the start of the next page. I'm pretty much at my wits end wondering what is the problem here. Here is the LaTeX code for the paragraph and the corresponding equation section:               \subsection{Computing Tester/Developer Payoffs}     \label{subsec:payoffs}          In a security game defenders may employ mixed strategies i.e., selecting a     particular action with some probability as opposed to a deterministic     choice. This distribution decreases predictability of choice of     actions that may be exploited by an adversary. For our testing game we     refer to the set of distributions as a \textit{coverage vector}, $C$     that gives the probability, $c_t$, that a particular test suite $t$,     covering a particular requirement will be executed. We then compute     the expected payoffs for the testers and developers as shown in     Equations~\eqref{eqn:tC-EU} through ~\eqref{eqn:attack-set}          \begin{IEEEeqnarray}{c}         \label{eqn:tC-EU} U_\tester(t,C) = c_t \cdot \testercovered + (1-c_t)\cdot \testeruncovered \\         \label{eqn:CA-EU} U_\tester(C,\reqvector) = \sum_{t \in T} \attackprob \cdot (c_t \cdot \testercovered + (1-c_t)\cdot \testeruncovered) \\         \label{eqn:attack-set} \Gamma (C) = \{t:U_\dev(t,C) \geq U_\dev(t',C)\, \forall t' \in T\}     \end{IEEEeqnarray}     %...remaining text      There is nothing out of the ordinary in the code IMO. Why does this happen and how should I fix it (whitespace + widow/orphan)? This abruptly started happening after editing the paper. I'm guessing it's something to do with auto layout of LaTeX and not really something in the code. PS: If it's of any use, here's the code for the table in the screenshot above:               {\begin{table*}[!t]     \caption{Compact representation of game showing tester and developer utilities}     \label{table:game}     \renewcommand\arraystretch{1.5}     \begin{tabular}{*{11}{|c}|}     \cline{2-11}     \multicolumn{1}{c|}{}& \multicolumn{2}{c|}{Requirement 1} & \multicolumn{2}{c|}{Requirement 2} & \multicolumn{2}{c|}{Requirement 3} & \multicolumn{2}{c|}{Requirement 4} & \multicolumn{2}{c|}{Requirement 5}\\ \cline{2-11}     \multicolumn{1}{c|}{}& Covered & Uncovered                & Covered & Uncovered                & Covered & Uncovered                & Covered & Uncovered                & Covered & Uncovered               \\ \hline     Tester's utility     & 2 & -10                            & 7 & -4                             & 6 & -1                             & 9 & -9                             & 9 & -9                            \\ \hline     Developer's utility  & -7 & 4                             & -1 & 3                             & -6 & 5                             & -3 & 7                             & -10 & 3                           \\ \hline     \end{tabular}     \end{table*}}


title: conflicting options errors

text: I have in the preamble:               \documentclass{article}     \usepackage{amssymb,amstext,amsmath,latexsym,mathtools}     \usepackage[italian,british]{babel}     \usepackage{pdfpages}     \usepackage[utf8,latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{csquotes}             \usepackage{cmbright}     \usepackage{setspace}     \usepackage{pdfpages}     \usepackage{hyperref}     \usepackage[style=authoryearcomp,firstinits=true,maxcitenames=2,maxbibnames=99]{biblatex}     \DeclareNameAlias{sortname}{last-first}     \DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}     \renewcommand*{\multinamedelim}{\addcomma\space}     \renewcommand*{\finalnamedelim}{\addcomma\space}     \renewbibmacro{in:}{}     \addbibresource{trybib.bib}          \nocite{*}      I get these two errors:               conflicting options     'firstinits' conflicts with'uniquename=true'      and               Data encoding is 'latin1'     Use backend=bibtex8 or backend=biber      I need all these packages, how can I fix these errors?


title: Making a table with several lines in each box

text: I'm trying to make a large table where each of the boxes has several lines of text underneath each other. I have tried `\newline` and `\linebreak` to get onto a new line, but neither work. The command `\\` does give a new line, but it ends the entire line in the whole table. Can anyone suggest how I might get a new line, or perhaps a better package to use?


title: pgfplots externalize with hyperref

text: I'm using pgfplots with externalize because my document has a lot of plots which causes problems with memory limitation in LaTeX. In one of my plots I have a reference to an equation. In the file main-figure0.pdf the reference shows up correclty with the hypertext link from the hyperref package. But the hypertext link doesn't show up in the main.pdf file. My MWE:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}          \usepgfplotslibrary{external}     \tikzexternalize[shell escape=-shell-escape]          \usepackage{hyperref}          \begin{document}     \begin{equation}         a=b         \label{eq}     \end{equation}     \ref{eq}     \begin{figure}[htbp]         \centering         \begin{tikzpicture}             \node[draw, rectangle] (block) at (0,0) {\ref{eq}};         \end{tikzpicture}         \caption{test1}         \label{fig:test1}%     \end{figure}     \end{document}      I compile with:               pdflatex -shell-escape -synctex=1 -src-specials main.tex     pdflatex -shell-escape -jobname "main-figure0" "\def\tikzexternalrealjob{main}\input {main}"     pdflatex -shell-escape -synctex=1 -src-specials main.tex      How do I get the hypertext link to show up in the actual document?


title: Random scale of square makes a rectangle

text: Why does this code generates a rectangle, not a square?               \documentclass{standalone}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}         \draw[scale=rnd] (0,0) rectangle (1,1);     \end{tikzpicture}     \end{document}


title: Font messed up in print, but looks good on the screen?

text: Okay, so I turned in this assignment a few days ago. It looked great on my machine (and I've had it tested on other machines too) but it looked DREADFUL once I printed it. The fist page, using bookman (provided by title.tex) looks fine, but the remaining pages (provided by main.tex) don't have the baskervald font properly embedded. This means the font was substitued by a default one (in the printer? The printer software?) and thereby losing it's proper spacing and ligatures... I've enclosed something more than a MWE because I suspect maybe a package clash is to blame. The only noteworthy thing I left out below is the university title page, which was a PDF (that I had to fix up in Gimp). I hope someone can tell me what went wrong -- I certainly don't want it to happen again! **Compile chain:**               pdflatex title          pdflatex main     biber main     pdflatex main     pdflatex main      main.tex               \documentclass[a4paper,12pt]{report}     \usepackage[style=historian,style=verbose-ibid,isbn=false,backend=biber,bibencoding=utf8]{biblatex}      \bibliography{biblio.bib}      \DefineBibliographyStrings{danish}{%       bibliography = {Litteraturliste},       references = {Litteraturliste},     }     \usepackage{pdfpages}     \usepackage[danish]{babel}     \usepackage[utf8]{inputenc}     \usepackage{microtype}     \usepackage{xcolor}     \usepackage[T1]{fontenc}     \usepackage{baskervald}     \usepackage{csquotes}     \usepackage{fancyhdr}     \pagestyle{fancy}     \lhead{\small{\textsc{My Name\\Number: 12345}}}     \chead{\textbf{Exam\\Course}}     \rhead{\small{\textsc{My Number\\Afl. 20/1 2014}}}     \cfoot{\thepage}     \setlength{\headheight}{27.5pt}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     \linespread{1.3}     \usepackage[bottom,flushmargin,hang,multiple]{footmisc}     \usepackage{titlesec}     \definecolor{gray75}{gray}{0.75}     \newcommand{\hsp}{\hspace{.5em}}     \titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{white}{}\hsp}{0pt}{\Huge\bfseries}     \titlespacing*{\chapter}{0cm}{-\topskip}{0pt}[0pt]          \usepackage[hidelinks]{hyperref}          \begin{document}          \includepdf{title}      \tableofcontents      \thispagestyle{empty}      \pagestyle{fancy}     \raggedbottom     This here is the text. Here is a reference\footcite[19]{myt} and here is another\footcite[2]{oldstories}     \newpage     \appendix     \addcontentsline{toc}{chapter}{Litteraturliste}     \printbibliography           Brief final statement.     \end{document}      title.tex               \documentclass[a4paper,12pt,oneside]{report}     \usepackage{bookman}     \usepackage[demo]{graphicx}     \usepackage{fix-cm}     \newcommand{\bigsize}{\fontsize{35pt}{20pt}\selectfont}     \begin{document}     \begin{titlepage}     \centering     \vspace{3em}     {\Huge \textsc{Course}}     \vspace{3em}     \includegraphics[width=.8\textwidth]{eck2}\\     \footnotesize{\textit{A pretty picture.}     \vfill     \begin{flushleft}     \large     My University\\     My Number\\     \vspace{1em}     My Name\\     Studienummer\\     Date     \end{flushleft}     \end{titlepage}     \end{document}      biblio.bib               @book{myt,         address = {London},         author = {Barthes, Roland},         publisher = {Paladin Books},         title = {Mythologies},         translator = {{A}nnette {L}avers},         year = {1986},         note= {Første gang udgivet i 1957}     }          @inbook{oldstories,         address = {New York og London},         author = {Elkins, James},         isbn = {9780415939430},         publisher = {Routledge},         title={Old Stories},         booktitle = {Stories of {A}rt},         pages={39-55},         year = {2002}     }      **Edit:** Added output of pdffonts:               name                                 type              encoding         emb sub uni object ID     ------------------------------------ ----------------- ---------------- --- --- --- ---------     JJEBPO+URWBookmanL-Ligh              Type 1            Custom           yes yes no      19  0     GXGNTC+URWBookmanL-LighItal          Type 1            Custom           yes yes no      22  0     OWGWHH+BaskervaldADFStd-Bold         Type 1            Custom           yes yes no      34  0     BXKZQI+BaskervaldADFStd-Regular      Type 1            Custom           yes yes no      35  0     FGJHAQ+BaskervaldADFStd-Italic       Type 1            Custom           yes yes no      38  0     BXKZQI+BaskervaldADFStd-Regular      Type 1            Custom           yes yes no      48  0


title: Titling package

text: In the footer of a page, _footnotes_ and _thanks_ are not correctly aligned. How to get the expected alignment? * * * In the following example, the commands `\thanks{}` are typeset using numbers, as expected:               \documentclass[a4paper,12pt]{article}     \usepackage{titling}     \thanksmarkseries{arabic}     \continuousmarks          \author{A. U. Thor\thanks{Is grateful\dots}}     \title{Nice paper\thanks{Indeed\dots}}          \begin{document}          \maketitle          This paper deals with\footnote{See also\dots}     \end{document}


title: Including package to create MATLAB labels using LaTeX

text: When using LaTeX as the interpreter to typeset labels in MATLAB it would be great to be able to include packages to customize appearance. Is this possible? As of now I know no method to create non italic greek letters in the legends.


title: copy/pastes odd chars from a document written using hangul package

text: Recently i've been involved in writing document in Korean. I've managed to install the hangul package and write the following statement :               \usepackage{hangul} % pretty simple      everything was fine until I tried to print the document I wrote : All the korean characters went like shuffled ascii chars (unreadable indeed). If I try to copy/paste from the pdf to a notepad instance, the character are as if they were printed (therefore something really similar to that : _"öÎÇoe¿e@/¾úò¶|ÎÇoD¥2ÎÇoDÐ Wu|{èà"_ \- don't feel insulted). I'm not used with fontenc and inputenc & co. Where should i focus my figuring- out ? I have the following settings :   * MiKTeX 2.9   * Using TeXstudio   * My document is UTF-8 (from TeXstudio editor options, not using any statements of input encoding in the document) The structure of my document is as follow :               \documentclass{article}          \usepackage{hangul}          \begin{document}     안녕, 한국어 이해할 수 있습니까?     \end{document}


title: biblatex-chicago \fullcite

text: I am trying to get full, bibliography-style citations in line using biblatex- chicago with `biber` as the backend (I'm using XelaTeX; biblatex 2.9a; biblatex-chicago 2014.1.31). I understand this is normally done with the `\fullcite` command, but when I enter this command, I get the exact same output as I do when I replace `\fullcite` with `\cite`, i.e., a citation that puts parentheses around the publisher, address, and date. (Actually, there is one difference between `\fullcite` and `\cite` in my document: `\fullcite` prevents the reference from being abbreviated if it has appeared previously in the document.) When I use `\printbibliography`, the citations appear correctly, in bibliography format. I don't know if it matters, but I am using `\documentclass{article}` (nothing changes if I change the class to, say, `{book}`). I am also using some unusual code to format CJK bibliography entries, copied from a post by Audrey here at stackexchange (for which I am eternally grateful, by the way! Chicago-style citations of CJK documents (e.g. American Oriental Society): Name order; transcribed/translated titles). I do not understand this code, and so don't know whether it might be responsible for the behavior of \fullcite. A minimal working example is as follows:               \documentclass{article}     \usepackage{xltxtra}     \usepackage[fallback]{xeCJK}     \usepackage[backend=biber,bibencoding=utf8]{biblatex-chicago}     \addbibresource{C:/dissertate/Dissertation.bib}          \setmainfont[Mapping=tex-text, Ligatures={Common, Contextual, TeX}]{Times New Roman}     \setCJKmainfont[Scale=0.9]{仿宋}          \XeTeXlinebreaklocale "zh"     \XeTeXlinebreakskip = 0pt plus 1pt               \forcsvlist{\listadd\nameaffixlist}{Junior,Senior}          \newcommand{\ifnameaffix}[1]{%       \ifboolexpr{ test {\ifrmnum{#1}} or test {\ifinlist{#1}{\nameaffixlist}} }}          % Based on definitions from biblatex.def          \newbibmacro*{name:cjk}[3]{%       \usebibmacro{name:delim}{#2#3#1}%       \usebibmacro{name:hook}{#2#3#1}%       \mkbibnamelast{#1}%       \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}}%       \ifblank{#3}{}{\bibnamedelimd\mkbibnameaffix{#3}}}          \DeclareNameFormat{first-last}{%       \ifboolexpr{ test {\ifblank{#7}} or test {\ifnameaffix{#7}} }         {\iffirstinits            {\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}            {\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}         {\usebibmacro{name:cjk}{#1}{#3}{#7}}%       \usebibmacro{name:andothers}}          \DeclareNameFormat{last-first}{%       \ifboolexpr{ test {\ifblank{#7}} or test {\ifnameaffix{#7}} }         {\iffirstinits            {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}            {\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}}         {\usebibmacro{name:cjk}{#1}{#3}{#7}}%       \usebibmacro{name:andothers}}          \DeclareNameFormat{last-first/first-last}{%       \ifboolexpr{ test {\ifblank{#7}} or test {\ifnameaffix{#7}} }         {\ifnumequal{\value{listcount}}{1}            {\iffirstinits               {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}               {\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%             \ifblank{#3#5}               {}               {\usebibmacro{name:revsdelim}}}            {\iffirstinits               {\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}               {\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}}         {\usebibmacro{name:cjk}{#1}{#3}{#7}}%       \usebibmacro{name:andothers}}          % Based on definitions from biblatex-chicago's notes.cbx          \DeclareFieldFormat[book]{title}{%       \mkbibemph{#1}%       \iffieldundef{titleaddon}{\isdot}{\nopunct}}          \DeclareFieldFormat{booktitle}{%       \mkbibemph{#1}%       \iffieldundef{booktitleaddon}{}{\nopunct}}          \DeclareFieldFormat{maintitle}{%       \mkbibemph{#1}%       \iffieldundef{maintitleaddon}{}{\nopunct}}          \DeclareFieldFormat[article]{title}{%       \iffieldundef{title}{}{\mkbibquote{#1}}%       \iffieldundef{titleaddon}{\isdot}{\nopunct}}          \DeclareFieldFormat{usere}{\mkbibparens{#1}}               \begin{document}          \fullcite{ChengShankai}     \fullcite{Dudbridge}     \printbibliography          \end{document}      Edit: Apologies for not including the bibliographic reference. Both CJK and normal references included here.                   @book{ChengShankai,         author = {Cheng, 成善楷, Shankai},         title = {Du shi jianji},         titleaddon = {杜诗笺记},         publisher = {BaShu shudian},         address = {Chengdu},         year = {1989}     }          @book{Dudbridge,        author = {Dudbridge, Glen},        title = {Lost Books of Medieval China} ,        publisher = {The British Library},        address = {London},        year = {2000},     }      The result is as follows. As you can see, it is in citation, rather than bibliography, style: ![enter image description here](http://i.stack.imgur.com/vUFKe.png)


title: Citation completion in vim latex-suite on Windows 8.1 Update

text: This is potentially a duplicate of this tex.se question, but I tried all the advice with still no solution. I am on 64-bit Windows 8.1 Update with gvim 7.4, Python 2.7.7 (Anaconda 2.0.1 32-bit), and pywin32-214. I think the pywin is a little dated, but works best with my vim-R-plugin for use with R. When I type `\cite{Fama}` and press `F9` I get a flash, and it looks like it goes from normal back to insert, but I get neither an error nor a lower half split with matched .bib file entries. But my `\ref{}` completion works great. I use the *latexmain file setup, but the problem (i.e., no citation completion) works whether I do this or some MWE. I have the following in my _vimrc file.               set grepprg=grep\ -nH\ $*     let g:Tex_BIBINPUTS='C:/Users/richa_000/texmf/bibtex/bib/library.bib'      I also have GNUgrep in path and `:!grep -V` returns the following.               C:\windows\system32\cmd.exe /c (grep -V)     GNU grep 2.5.4          Copyright (C) 2009 Free Software Foundation, Inc.     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>     This is free software: you are free to change and redistribute it.     There is NO WARRANTY, to the extent permitted by law.          Hit any key to close this window...      I also have Python in path and `:python import sys; print(sys.version)` returns the version listed above. I also vim-pandoc and can get citation completion there with `<C-x> <C-o>`. Any idea how to fix this? Thanks!


title: Cross reference with ordinal numbers

text: I'm writing a document in a latex. In a part of this document I would like to use ordinal numbers for cross-referencing chapters and parts. For example i would like that the code               ... in the \ref{ch:firstPart} part ...      Would result in               ... in the first part ...      and not               ... in the I part ...      I'm not interested in modifying globally how the cross references are managed because I would like to use ordinal numbers only in part of the document. The solution proposed in How to refer to a chapter with a word works only for chapters. Is there a package or another solution for doing it?


title: Set same font in letter as in moderncv

text: I created i cv using the package `moderncv`. I also would like to create a letter. So far i used `scrlttr2` package, but it uses a different font than `moderncv`, so it looks inconsistent. So my question is how do i set the same font.


title: Yipes! pdflatex command placing graphs in wrong place

text: Doxygen can be setup to produce HTML reports and LaTeX reports because Doxygen commands are embedded in computer source code. It creates documentation of computer progams. The two types of reports produced should be identical except being in different formats (HTML versus LaTeX). I've been able to produce the HTML reports with graphs appearing in the right place. By right place, I mean graphs appear directly under the Doxygen text referencing them. But, with the latex file version of the report, I run the "pdflatex" against them to produce a PDF report. The problem is the graphs in this PDF report usually appear much later in the report than the text referencing them. This is very sloppy! I can't change the text referencing the graphs because Doxygen produces the text. Question: Do you have any suggestions on how I can fix this problem. (I find that questions such as this are too difficult for the general Doxygen community.) Thank you,


title: BibTeX & TexMakerX 2.2 SVN

text: Why i get the error below with this settings? > ## I use: > > TexMakerX 2.2 SVN > > TeXLive 2012 > > Windows               \documentclass{book}          \usepackage[italian]{babel}     \usepackage[babel]{csquotes}     \usepackage{biblatex}     \bibliography{bibliography}               \begin{document}          \cite{bringhurst:elementi}          \printbibliography          \end{document}      * * * bibliography.bib               @book{bringhurst:elementi,     author = {Bringhurst, Robert},     title = {Gli Elementi dello Stile Tipografico},     publisher = {Sylvestre Bonnard},     year = {2001},     location = {Milano}     }      * * * Bibtex command (into the preferences of the editor):               bibtex  %      * * * output               Process started          Process exited with error(s)      * * * .blg file               This is BibTeX, Version 0.99d (TeX Live 2012/W32TeX)     Capacity: max_strings=35307, hash_size=35307, hash_prime=30011     The top-level auxiliary file: dummy.aux     I found no \citation commands---while reading file dummy.aux     I found no \bibdata command---while reading file dummy.aux     I found no \bibstyle command---while reading file dummy.aux     You've used 0 entries,                 0 wiz_defined-function locations,                 83 strings with 484 characters,     and the built_in function-call counts, 0 in all, are:     = -- 0     > -- 0     < -- 0     + -- 0     - -- 0     * -- 0     := -- 0     add.period$ -- 0     call.type$ -- 0     change.case$ -- 0     chr.to.int$ -- 0     cite$ -- 0     duplicate$ -- 0     empty$ -- 0     format.name$ -- 0     if$ -- 0     int.to.chr$ -- 0     int.to.str$ -- 0     missing$ -- 0     newline$ -- 0     num.names$ -- 0     pop$ -- 0     preamble$ -- 0     purify$ -- 0     quote$ -- 0     skip$ -- 0     stack$ -- 0     substring$ -- 0     swap$ -- 0     text.length$ -- 0     text.prefix$ -- 0     top$ -- 0     type$ -- 0     warning$ -- 0     while$ -- 0     width$ -- 0     write$ -- 0     (There were 3 error messages)


title: biblatex: mismatched quotation marks (italic/roman)

text: The _Chicago Manual of Style_ says punctuation and quotation marks should match the surrounding rather than the enclosed font (i.e. roman or italic), unless they form part of a title, in which case they take on the font of the title (§§ 6.2, 6.5; cf. 14.102). I take this to mean that in _Book Title "Including a Second Title,"_ the opening and closing quotation marks should both be in italic. What to do with the comma is another issue. Now, if I do exactly what the `biblatex-chicago` example bibliography does in this sort of situation -- i.e. format my bibliography in accordance with this answer \--, I end up with an italic opening quotation mark and a roman closing quotation mark. It looks fine in the `biblatex-chicago` example PDF, but I suspect that's because the font used makes little or no difference between italic and roman quotation marks. When I recompile it with Computer Modern, I find it hard to tell a difference, again because it seems not to have very distinct italic quotes. But if I substitute the Cardo font, say, the closing quote is clearly roman where I imagine it should be italic like its peer. XeLaTeX MWE:               \documentclass{book}     \usepackage{fontspec}     \usepackage{polyglossia}     \usepackage[style=american]{csquotes}     \usepackage[notes]{biblatex-chicago}          \setmainfont[Ligatures=TeX]{Cardo}     \setmainlanguage{english}     \begin{filecontents}{book.bib}     @book{key1,        author = {David Byrne},        title = {This Book Title Ends in \mkbibquote{Quotation Marks}},        location = {Oxford},        publisher = {Oxford University Press},        year = {2012}     }     \end{filecontents}     \addbibresource{book.bib}          \begin{document}          Here I cite a book whose title ends in a closing quotation mark\autocite[55]{key1}.     \printbibliography          \end{document}      ![mismatched quotes](http://langeslag.org/images/sx/italicquote.png) I've tried adding `\setpunctfont\emph`, but no difference. Any ideas?


title: More sophisticated page breaks within aligned equations

text: This is my current method of allowing page breaks between my aligned equations               {\allowdisplaybreaks     \begin{align*}     left &= right1 \\          &= right2.     \end{align*}}      It works, but it doesn't behave like I want it to. Suppose the above example breaks between pages. The first line (on the first page) will come out correctly, because it centers based on the whole of "left = right1". However, **I want the second line (on the second page) to be centered with respect to only "= right2".** (By default, it is centered taking the "left =" on the previous page into account, which doesn't look natural - the line appears to be more to the right than it should be.) How can I accomplish this?


title: wide table in a two-column document

text: I have a two-column LyX document. I want to add a table that will be as wide as the entire page, so that it will not have to be squeezed into a single column. I found some suggestions: table too wide for twocolumn-mode document Page-wide table in two-column mode , however, I have no idea how to implement them in LyX...


title: Specify arabic numerals in \ref{}

text: I've two documents, `doc1` references lists in `doc2` through package `xr`. In `doc2` the lists are numbered with arabic numbers, but when referenced in `doc1` using `\ref{tag}` they show up as roman numbers. How can I change this? I'd like to use arabic numbers always. Minimal example:               \documentclass[a4paper,12pt,onecolumn,final]{ProjectStyle}     \renewcommand{\labelenumi}{\arabic{enumi}.}     \renewcommand{\labelenumii}{\labelenumi\arabic{enumii} }          \begin{document}     \renewcommand{\theenumi}{\arabic{enumi}.}     \renewcommand{\p@enumii}{\theenumi.\theenumii}          \setcounter{page}{1}     \pagenumbering{arabic}     \pagestyle{plain}               \begin{enumerate}     \item \textbf{Convites para conferencias, coloquio e SOC}         \begin{enumerate}         \item {\label{inv_leiden} Comprovante para \emph{Fine Tunning Stellar Population Models} (Leiden, 2006)}         \item {\label{inv_iau} Comprovante para \emph{XII Latin American Regional IAU Meeting} (Isla Margarita, 2007)}         \end{enumerate}     \end{enumerate}     Ref: \ref{inv_leiden}          \end{document}      And this is what I get: enumii0..   1. Convites para conferencias, coloquio e SOC 1.1 Comprovante para Fine Tunning Stellar Population Models (Lei- den, 2006) 1.2 Comprovante para XII Latin American Regional IAU Meeting (Isla Margarita, 2007) Ref: 1a


title: Creating tables with borders in IEEE conference two column format

text: I'm new to LaTex. I'm trying to find some sample code that shows how to create a single column table with borders (and if possible a grey header row) in a two column paper.


title: siunitx won't recognise options and new macros

text: I seem to be having some weird problems with the package `siunitx`. The package itself works but almost everything I try to add to it in the preamble doesn't work, e.g.:               \usepackage[load-configurations={abbreviations,binary}]{siunitx}      or               \sisetup{load-configurations = abbreviations}      or               \DeclareSIUnit[per-mode=symbol,per-symbol=p]{\Bps {\byte\per\second}      all result in errors of the type:               The option `load-configurations' was not declared in package `siunitx', ...      or               Undefined control sequence      Does anyone have an idea what's happening here?


title: Using \usebox inside a \newcommand

text: I have this code:               %Abstracts     \newcommand{\@spanishabstractname}{{\bfseries Resumen}}     \newsavebox\@sabstract     \newenvironment{spanishabstract}{%         \lrbox\@sabstract\minipage{1\textwidth}\selectlanguage{spanish}\itshape}%         {\endminipage\endlrbox\normalfont}          \newcommand{\@englishabstractname}{{\bfseries Abstract}}     \newsavebox\@eabstract     \newenvironment{englishabstract}{%         \lrbox\@eabstract\minipage{1\textwidth}\selectlanguage{english}\itshape}%         {\endminipage\endlrbox\normalfont}          %Making Title     \newcommand{\maketitle}{%         \twocolumn[%         {\centering \@spanishabstractname\par}\linespace         \noindent\usebox{\@sabstract}\par\linespace         \@skeyw\par\onecmskip         {\centering \@englishabstractname\par}\linespace         \noindent\usebox{\@eabstract}\par\linespace         \@ekeyw         ]     }      But when I use the command `\maketitle` in the document, not shows the boxes `\@sabstract` and `\@eabstract`, as follows. ![Using maketitle](http://i.stack.imgur.com/kScgG.jpg) If I put the code definition of `\maketitle` in a `\AtEndDocument`:               \AtEndDocument{%         \twocolumn[%         {\centering \@spanishabstractname\par}\linespace         \noindent\usebox{\@sabstract}\par\linespace         \@skeyw\par\onecmskip         {\centering \@englishabstractname\par}\linespace         \noindent\usebox{\@eabstract}\par\linespace         \@ekeyw         ]     }      Everything works perfectly! ![enter image description here](http://i.stack.imgur.com/p6nkF.jpg) How I can fix this? Why wrong? Thanks!


title: Display PDF page with sidewaysfigure in landscape

text: I want to have a landscape figure with the same portrait page geometry as the rest of the document. Additionally, I want _only_ that page to be _displayed_ in landscape in the PDF and the figure to float correctly. This has very nearly been answered by: Answer 1 and Answer 2. I am currently using a sidewaysfigure environment. This works perfectly i.e., the resulting PDF document prints exactly as required; also the figure floats correctly. However, I would like the page which the figure is on to _display_ in landscape when the PDF is viewed electronically. I have tried using an afterpage environment as:               \afterpage{%         \begin{landscape}             \begin{figure}                 FIGURE HERE             \end{figure}         \end{landscape}     }% end afterpage      However, this breaks the floating of the figure.


title: Force printing of parentheses around a single character in math mode

text: Although this is not strictly mathematical notation, I would like to denote an object with a calligraphy capital T and subscript non-italic P. I have this:               \newcommand{\timeP}{$\mathcal{T}_\mathsf{P}$}      That works fine, `\timeP` gives me TP. Now I need a variant where the `P` is surrounded by parentheses. But this:               \newcommand{\timePVirt}{$\mathcal{T}_{(\mathsf{P})}$}      just produces the same result as above. The desired result is T(P). Any ideas? A special escape character? My document uses package `amsmath`. **EDIT** Indeed the commentators are right---the parentheses should be there. It seems the problem is caused by the combination of these imports:               \usepackage{MnSymbol}          % --- Font choice     %     nightmare! leave alone for your own sanity     %     first choice roman is mathptmx - nice!     \usepackage{mathptmx}      The second one `mathptmx` was in some document later imported through `\input` of the thesis template I was using, whereas I added `MnSymbol` directly to the `cls` file. Now when I reverse their order:               \usepackage{mathptmx}     \usepackage{MnSymbol}      ...the parentheses come back. I think I got the meaning of the comment `nightmare!`.


title: Auctex preview: How to suppress opening a new window?

text: I have emacs+gtk installed on Ubuntu11. I'm just new to Auctex but very interested in it. When completed my .tex document, command `C-c,C-c` compiles successfully. But repeating `C-c,C-c` yields option `Command:(default View)` So I prompt the default, which further yields `View command: xdvi myfile.tex`. It opens a new window. But I want it to be shown in a split window of myfile.tex so that I can edit and preview simultaneously. Any way to suppress the new window? Thanks.


title: Punctuation between authors in bibliography?

text: I am finalizing my doctoral dissertation in LaTeX, and before printing my university has some very specific requirements regarding the formatting of the references section. Using `makebst` I have been able to reproduce most of them, but one thing has me baffled. My university requires that author names be separated by dashes, like so: > Feeny, David F. – Willcocks, Leslie P. (1998) Core IS capabilities for > exploiting information technology. _Sloan Management Review_ , Vol. 39 (3), > 9–21. How can I edit my custom `.bst` file so that it will separate authors by `-` instead of by commas?


title: Tilde in author field changes S letter with Estonian babel

text: Bibtex generates fallowing code to bbl file.               \bibitem{Bell_1964}     J.~S. Bell, \enquote{On the {Einstein-Podolsky-Rosen} paradox,} Physics     \textbf{1}.      and similarly               \bibitem{BellSpeakableAndNot}     J.~S. Bell, \emph{Speakable and Unspeakable in Quantum Mechanics; 2nd ed.}     (Cambridge Univ. Press, Cambridge, 2004), chap. Introduction to the     Hidden-Variable Question, pp. 37--38, Collected papers on quantum philosophy.      Problem is that S is replaced with Š in the output and I don't know why nor how to fix it. I've tried different bibtex formats, encodings and `{}` placements but problem remains. I know you could work around this with directly removing ~ in front of S in bbl file or formatting all the name as `{J. S. Bell}`, but I have lots of references in my thesis and I'd like clean solution. I have googled a whole day and I really hope you know how to help me. EDIT: As it turned out, it was babel package shortcuts which is to blame. So now I know minimal example to reproduce the error is as fallows:               \documentclass[12pt]{article}     \usepackage[estonian]{babel} % Estonian babel!     \usepackage[utf8]{inputenc}          \usepackage{filecontents} % Just of infile .bib data     \begin{filecontents*}{\jobname.bib}     @article{Bli74,       author = {Blinder, Alan S.}     }     \end{filecontents*}          \begin{document}          \section{Foobars}      barbarbar \cite{Bli74}     \bibliographystyle{plain}     \bibliography{\jobname}     \end{document}      And corresponding output will be after latex + bibtex + latex + latex: > 1 Foobars   >  barbarbar [1] > > Viited   >  [1] AlanŠ. Blinder.


title: Why is TeXnicCenter incorrectly loading my template files?

text: In my template .tex file (encoded as UTF-8), if I open it in TeXnicCenter, it displays correctly, and last line of the document is (line 136) `\end{document}` as one would expect from a .tex file. Opening the .tex file using a regular text editor also yields the same correct document. However, if I actually use File -> New -> File from Template and select my template, the opened document displays the following last lines: (line 136) `\end{document` (line 137) `NUL` (line 138) `NUL` Not only are there two new lines (with Null characters) formed when I create a new file from template, but the curly brace to close the .tex document is missing! What is going on here? I currently have to manually add the curly brace and delete the null characters every time I want to use my template. EDIT: I should mention that I am using TeXnicCenter 2.0 Beta 1. I know, I know, I should update, but I would like to know whether this is a fundamental bug with my version or whether it is something I'm doing wrong.


title: footnote inside mbox

text: I know very similar questions have been asked, but I couldn't find a solution to my problem. My original problem started using the `glossaries` package, using an acronym inside the `framed` environment, something like this:               \begin{framed}     bla bla \gls{Y2K} bla bla     \end{framed}      The expected behaviour was that next to Y2K should be a footnote, that footnote linking the acronyms, and the explaining text of the footnote at the bottom of the page. Now I know the problem is not exactly with `glossaries` and `framed`, but with footnote and `\mbox` or `\fbox`. Here's a minimal example that shows the problem:               \documentclass[11pt]{report}     \usepackage[pdftex,pagebackref]{hyperref}     \usepackage[acronym,toc,section=chapter,style=indexgroup,sanitize={name=false,description=false,symbol=true}]{glossaries}     \glsdisablehyper          \defglsdisplayfirst[main]{#1#4\protect\footnote{#2}}     \makeglossaries          \newglossaryentry{Y2K}{name=Y2K,description={Bla bla bla}}          \begin{document}     % Bla bla  \gls{Y2K} bla bla % Works fine     \fbox{Bla bla  \gls{Y2K} bla bla} % doesn't work as expected          \newpage     \printglossaries     \end{document}      I use `pdflatex`, `makeglossaries`, `pdflatex` to compile. So, the thing is that I need to use a footnote inside `\fbox`, because `framed` uses `\fbox` and `glossaries` uses footnote. I already tried using this but didn't do anything:               \usepackage[stable]{footmisc}     \usepackage{footnote}      One last thing, this piece of code:               \defglsdisplayfirst[main]{#1#4\protect\footnote{#2}}      I got it from here, maybe it could be tweaked to solve this problem. **EDIT 06-DEC-2013** After a long time I've found a problem with this solution. Instead of fbox I'm using the framed enviroment. When I use the first boxedgls inside framed there's no problem. If I use another framed enviroment after, it also generates the footnote (whether there is or not a gls inside). MWE:               \documentclass[11pt]{report}     \usepackage{etoolbox}     \usepackage{framed}     \usepackage[pdftex,pagebackref]{hyperref}     \usepackage[acronym,toc,section=chapter,style=indexgroup,sanitize={name=false,description=false,symbol=true}]{glossaries}     \glsdisablehyper          \defglsdisplayfirst[main]{#1#4\protect\footnote{#2}}     \makeglossaries          \newglossaryentry{Y2K}{name=Y2K,description={Bla bla bla}}          \newcommand\glsdoafterbox{}          \let\orgfbox\fbox     \def\fbox#1{\orgfbox{#1}\glsdoafterbox\def\glsdoafterbox{}}          \newcommand{\boxedgls}[1]{%        \glstext{#1}%        \ifglsused{#1}{}%        {%          \footnotemark          \gappto\glsdoafterbox{\footnotetext{\glsentrydesc{#1}}\glsunset{#1}}%        }%     }          \begin{document}          \begin{framed}     Bla bla \boxedgls{Y2K} bla bla     \end{framed}          \newpage     \begin{framed}     Nothing here     \end{framed}          \newpage     \printglossaries     \end{document}


title: Warning Message

text: I was wonder why I receive the following message.               Warning line 1 No Society specified, using generic APS style.       Here is my code:               \documentclass[apl, aps4, twocolumn, superscriptaddress]{revtex4}      As far as I know I have specified apl style.


title: Customize footer in the Szeged Beamer theme

text: I am using the Szeged theme in Beamer. I would like to modify the footer so that it contain, beside my short name and the institute in short, the frame number and the total number of frames on the right side of the footer. I have tried with the code below, but the footer only contains my name, the institute in short; an additional, undesired effect is that the colour of footer area is changed. Is there a way of achieving this?               \documentclass[12pt, dvips, dvipsnames]{beamer}          %NOTES:     \setbeameroption{show notes}     %\setbeameroption{hide notes}               %PACKAGES     \usepackage[english]{babel}               %THEMES     \usetheme{Szeged}          \useinnertheme{default}          \usefonttheme{serif}     \usecolortheme{dolphin}               %TEMPLATE     \setbeamertemplate{navigation symbols}{}          \setbeamertemplate{note page}[compress]          \setbeamertemplate{itemize items}[default]     \setbeamertemplate{enumerate items}[default]               %TOC     \setbeamertemplate{section in toc}[sections numbered]     \setbeamertemplate{subsection in toc}[subsections numbered]     \setbeamerfont{subsection in toc}{size=\small, shape=\itshape}               %FOOTER:     \makeatletter     \setbeamertemplate{footline}     {     \leavevmode%     \hbox{%       \begin{beamercolorbox}[width=0.333\paperwidth, ht=2.5ex, dp=1ex, center]{author in head/foot}%            \usebeamerfont{authour in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}       \end{beamercolorbox}%       \begin{beamercolorbox}[width=0.333\paperwidth, ht=2.5ex, dp=1ex, center]{title in head/foot}%            \usebeamerfont{title in head/foot}\insertshorttitle       \end{beamercolorbox}%       \begin{beamercolorbox}[width=0.333\paperwidth, ht=2.5ex, dp=1ex, center]{title in head/foot}%            \usebeamerfont{title in head/foot}\insertframenumber/\inserttotalframenumber\hspace*{2ex}       \end{beamercolorbox}}%     \vskip0pt%          }     \makeatother          \begin{document}     \section{Section 1}     \begin{frame}\frametitle{My Frametitle}     A frame!     \end{frame}     \end{document}


title: Referring to nested tikz nodes - works with pdflatex but not with latex

text: I am trying to achieve a box within another box in tikz and then drawing an edge from the inner box to an outer node. I stumbled upon this solution When I compile it using pdflatex, I get the desired output(just like the answerer mentioned): ![Proper output](http://i.stack.imgur.com/UYsQs.jpg) However, compiling with latex and subsequently with dvips and ps2pdf(or dvipdf), I get this: ![Improper output](http://i.stack.imgur.com/3rpf2.jpg) I want to know what is causing this and can it be corrected, since I **need** to use latex and not pdflatex. Thanks in advance.


title: Cannot generate hyphen

text: I am new to TEX and am using scribtex as an online latex editor. My problem is that when I put hyphen in my text it sometimes appears and sometimes doesn't appear. What can be the reason for this and how do I fix this? The code for example I am putting in is:                 \documentclass[12pt,oneside]{amsart}       \usepackage{amssymb}       \theoremstyle{plain}       \newtheorem{theorem}{Theorem}[section]       \newtheorem{lemma}[theorem]{Lemma}       \newtheorem{corollary}[theorem]{Corollary}       \theoremstyle{definition}       \newtheorem{definition}[theorem]{Definition}       \theoremstyle{remark}       \newtheorem{remark}[theorem]{Remark}       \newcommand{\R}{{\mathbb R}}       \newcommand{\nil}{\varnothing}       \begin{document}       Reissener–Nordstrom        Reissener – Nordstrom        \end{document}       The output I get is "ReissenerNordstrom Reissener Nordstrom" whereas I expect "Reissener-Nordstrom Reissener-Nordstrom". Thanks


title: how do you put caption on figures in sweave

text: I have this sweave code. I need to add caption to the figures. I am doing this but it looks like I see the figure before the section{Data ANALYSIS}:                   \documentclass[letter,12pt]{article}               \usepackage{amsmath}     \usepackage{amscd}     \usepackage{ifthen}     \usepackage{hyperref}     \usepackage[utf8]{inputenc}     \usepackage[top=1.0in, bottom=1.0in, left=0.2in, right=0.2in]{geometry}     \usepackage{float}      \usepackage{rotating}     \usepackage{longtable}     \usepackage{tabularx}          \begin{document}     \SweaveOpts{concordance=TRUE}     \setlength\parindent{2pt}     \setkeys{Gin}{width=1\textwidth}     \title{THI IS A TEST DOCUMENT}          \maketitle     \pagebreak     \tableofcontents     \pagebreak          <<LBY, echo=FALSE>>=     library(zoo)     library(scales)     library(ggplot2)     library(xtable)     library(forecast)     library(data.table)     library(xtable)     library(RODBC)     library(chron)     library(xts)     library(grid)     @               \section{SAMPLE REPORT}          \subsection{PLOT1}               \begin{figure}     \begin{center}          <<fig=TRUE,echo=FALSE, width=15, height=10>>=     plot(1:5)          @               \caption{PLOT1.}     \end{center}     \end{figure}               \begin{figure}     \begin{center}          <<fig=TRUE,echo=FALSE, width=15, height=10>>=          plot(100:1000)          @          \caption{PLOT2.}     \end{center}     \end{figure}                    \end{document}      I am not sure what's happening here. I need to add caption to the figures. Any idea why PLOT1 is showing up before the section {SAMPLE REPORT}?


title: Replace characters in string based on preceding and following character

text: The following two strings are the result of the expansion of a biblatex citation command: > Unicom Computer Corp. (in re), 13 F.3d 321, 30 Collier Bankr. Cas. 2d 655, > 25 Bankr. Ct. Dec. 152 (9th Cir. 1994) > > Personal Property Security Act (P.E.I.), R.S.P.E.I. 1988, c. P-3.1 What I want to do is wrap the biblatex citation command in a macro that will replace all dots, with a replacement character determined by the following condition set:   1. If the character to the right of the dot is not a number, the dot should be removed entirely.   2. If the character to the right of the dot is a number, and the character to the left of the dot is a number, the dot should be replaced by a dot, that is the dot should be kept in place.   3. If the character to the right of the dot is a number, and the character to the left of the dot is not a number, the dot should be replaced by a space. Applying the conditions on the example strings above, the macro should yield the following results: > Unicom Computer Corp (in re), 13 F 3d 321, 30 Collier Bankr Cas 2d 655, 25 > Bankr Ct Dec 152 (9th Cir 1994) > > Personal Property Security Act (PEI), RSPEI 1988, c P-3.1 It should be noted that the dots in the examples are already in the entries in the bibtex file. The reason that the dots are in there are that certain legal citation styles require the punctuations, whereas others require they are not present, the biblatex style I am writing should have an option to turn punctuation on or off, and it seems way easier to remove dots automatically but to add them automatically. I have looked into the `xstring` package, but I was not able to find an appropriate macro in there. Furthermore, I would prefer being able to do that in plain TeX, so that the resulting style can be used without too many dependencies.


title: Scaling components in CircuiTikz

text: I would like to know how to scale a single component in CircuiTikZ. There are several possibilities to scale paths, a hole diagram, etc., but I didn't find a way to do so with a single component. _Note_ : I'm trying to scale a voltage source.


title: Independent left and right columns

text: I'm trying to write something with two columns that spans multiple pages. I want to put one thing in the left side and one in the right side. Is there ``proper'' way of doing this, or should I just try and bodge it with tabular/table?