title: Bug in Bjornstrup style of fncychap (the second line does not stretch until the end)?

text: I am using the `\usepackage[Bjornstrup]{fncychap}`. The problem I encountered is shown in figure ![attachment](http://i.stack.imgur.com/m60QI.png). How can I fix it? I tried changing the style file from:               409   \addtolength{\mylen}{-2\myhi}      to               409   \addtolength{\mylen}{1.7\myhi}      and it fixes the problem, but it is ugly and can potentially have side affects. Is there a better way? Using texlive 2012 on mac. **Update:** I am using a template there I found that some settings in the margins might be causing this. Working example:               \documentclass[12pt,twoside]{book}     \usepackage[Bjornstrup]{fncychap}          \oddsidemargin 5mm     \evensidemargin 5mm     \textwidth 150mm     \topmargin 0mm     \headheight 0mm     \textheight 225mm          \begin{document}     \chapter{Chapter title}     lorem impsum.          \end{document}


title: Ellipsis positioning when drawing large graphs in Tikz

text: I tried to use Tikz to draw large graphs with specific toologies and I am running into some problems. Since not all nodes can be represented explicitly, I am forced to use an ellipsis. I tried to define this ellipsis as a node, but the dots appear horizontally and not as shown in figure, i.e., it would be great if the ellipsis are three adjacent points on the circumference of the circle where other nodes rest. The same problem arises even when I have a complete graph. Can someone help me out with this? Thanks! ![Star](http://i.stack.imgur.com/5M51n.jpg) ![Complete](http://i.stack.imgur.com/r1yWh.jpg) Code so far:               \begin{tikzpicture}[->,>=stealth', shorten>=1pt, auto, node distance=2.8cm, semithick]      \tikzstyle{peer}=[draw,circle,violet,bottom color=\lav, top color= white, text=violet, minimum width=8pt]      \tikzstyle{superpeer}=[draw, circle, burntorange, left color=\oran, text=violet, minimum width=25pt]       \node[superpeer] (A) {$0$};       \node[peer]         (B)  at ($ (A) + (20:4) $) {$1$};       \node[peer]         (C)  at ($ (A) + (-52:4) $) {$2$};       \node[peer]         (D)   at ($ (A) + (-124:4) $){$3$};       \node[draw=none] (F)  at ($ (A) + (-176:4) $){$\cdots$};         \node[peer] (E) at ($ (A) + (92:4) $) {$N$};            \path (A) edge [color=blue, sloped] node[]{$\lambda_{01}, \mu_{01}$} (B);       \path (A) edge [color=blue, sloped] node[] {$\lambda_{02}, \mu_{02}$} (C);       \path (A) edge [color=blue, sloped] node[] {$\lambda_{03}, \mu_{03}$}(D);       \path (A) edge [color=blue, sloped, below] node[] {$\lambda_{0N}, \mu_{0N}$} (E);       \path (B) edge [color=blue, sloped] node[] {$\lambda_{10}, \mu_{10}$}(A);       \path (C) edge [color=blue, sloped] node[] {$\lambda_{20}, \mu_{20}$}(A);       \path (D) edge [color=blue, sloped] node[] {$\lambda_{30}, \mu_{30}$}(A);       \path (E) edge [color=blue, sloped, above] node[] {$\lambda_{N0}, \mu_{N0}$}(A);     \end{tikzpicture}


title: Removing vertical lines from the table header

text: This is what I already have, but for the moment. In the left corner and the right corner there are two little vertical lines, I don't want them, but I don't know how to delete them. Anyone who can help me please?               \documentclass{standalone}     \usepackage[utf8]{inputenc}     \usepackage[math]{iwona}     \usepackage{eurosym}     \begin{document}         \begin{tabular}{|c l l r|}               & \huge{\textsterling} & \Large{\EUR{}} & \$ \\ \hline             \textsterling & 10 & 8,9 & 6,2 \\ \hline \hline             \EUR{} & 11,3 & 10 & 7,0 \\ \hline \hline             \$ & 16,2 & 14,3 & 10 \\ \hline         \end{tabular}     \end{document}      * * * ![Example](http://i.stack.imgur.com/1APNy.png) This is what I need to become. So it are just the two little lines in each corner that I need to delete. But I don't know how :( And as you can see, I really need the horizontal lines, because it is an exercise...


title: Problem with placement of subfigure captions

text: I am using the `subcaption` package and I want to know how to place the captions of the subfigures in the bottom center of each subfigure.               \documentclass[12pt,a4paper]{article}     %     %     \usepackage{utopia}      \usepackage{enumitem}     \usepackage[usenames,dvipsnames]{color}     \usepackage[superscript,ref,nomove]{cite}     \usepackage{textcomp}      \usepackage{verbatim, amsmath, amsfonts, amssymb, amsthm}      \usepackage[british]{babel}      \usepackage{float}     \usepackage{graphicx}      \usepackage{booktabs,longtable,rotating}      \usepackage{array,warpcol}      \usepackage{multirow}      \usepackage{fixme}      \usepackage[section,verbose]{placeins}     \usepackage{gensymb,units}     \usepackage{fancyhdr}      \usepackage{setspace}      \usepackage{microtype}      \usepackage{stfloats}     %     \usepackage[width=11cm,font=footnotesize,labelfont=bf%     ,format=hang,labelformat=parens,labelsep=endash,%     justification=raggedright,singlelinecheck=on]{caption} % Captions.     \usepackage{subcaption}     \captionsetup[sub]{width=6cm,font=scriptsize,labelfont=bf%     ,format=hang,labelformat=parens,labelsep=endash,%     justification=centering,singlelinecheck=on}     %     \usepackage{fixltx2e}     \usepackage{varwidth}     \usepackage{todonotes}     \usepackage[pageanchor=true,plainpages=false,pagebackref=false%     ,hyperindex=true,hyperfootnotes=true,linktocpage=false%     ,colorlinks=true,citecolor=blue,menucolor=red,bookmarks=true%     ,bookmarksnumbered=true,pdftitle={Latitude and Month Correction},pdfauthor={Muhammad Hamdy Al-bassoussi},pdfkeywords={Cooling Load},pdfdisplaydoctitle=true,pdffitwindow=true,pdfmenubar=true%     ,pdftoolbar=true,pdfwindowui=true,pdfpagelayout=OneColumn]{hyperref}     %     \graphicspath{{./Figures/}} %To set the first directory to search for images in.     %     %\setlength{\parindent}{0pt}     \setlength{\parskip}{2ex plus 0.5ex minus 0.2ex}     %\parindent0em     %\parskip\medskipamount     %     \renewcommand{\baselinestretch}{1.25}     %     \pagestyle{fancy}     \fancyhf{}     \cfoot{\bfseries{\thepage}}     \rfoot{\scriptsize\bf{Latitude \& Month Correction}}     \lfoot{\scriptsize\bf{M. Hamdy}}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0.5pt}     %\addtolength{\headheight}{0pt} % make space for the rule     \fancypagestyle{plain}{%     \fancyhead{} % get rid of headers on plain pages     \renewcommand{\headrulewidth}{0pt} % and the line     %\fancyfoot{}     %\renewcommand{\footrulewidth}{0pt}     }     %     \renewcommand{\arraystretch}{1.5} % To edit the height of the rows of a table.     %               \begin{document}                    \begin{figure}[H]     \begin{subfigure}{0.3\textwidth}     \centering     \includegraphics[height= 6cm, width=12cm]{W80_32N_Sep_S}     \caption{Wall no.(80): 32$^\circ$N - September - South orientaion}     \label{fig:w80}     \end{subfigure}%          \begin{subfigure}{0.3\textwidth}     \centering     \includegraphics[height= 6cm, width=12cm]{W17_56N_Apr_NE}     \caption{Wall no.(17): 56$^\circ$N - April - NourthEast orientaion}     \label{fig:w17}     \end{subfigure}%     \qquad     \caption{Comparing Corrected CLTDs Resulting from Equations~(\ref{eq:corr}) and~(\ref{eq:corr_ash}) with the Calculated CLTDs for Two Different Wall Constructions, Locations, Months, and Orientations.}\label{fig:corr}     \end{figure}           \end{document}      ![The image](http://i.stack.imgur.com/7l9jJ.png)


title: Inadvertent effect of figure numbering style change

text: I need to insert **(above)** or **(below)** between some figure numbers and the following colon, to produce, e.g., **Table 0.1 (above):** instead of the more usual **Table 0.1:** (there’s a good typographic reason). What is a sensible way of doing this? My method—redefining `\thefigure`—has the unintended consequence of adding **(above)** and **(below)** to the output of `\ref` too. I need `\ref` to output just the number, e.g., **0.1** in the example below. * * *               \documentclass{report}          \begin{document}          Calling the figure number ``0.1'' also summons ``(above)'':          \verb|\ref{label}| = \ref{label}          \begin{figure}     .\\     ..\\     ...\\     ....     \renewcommand\thefigure{\thechapter.\arabic{figure} (above)}         \caption{This is the caption\label{label}}     \end{figure}          \end{document}


title: Measure a very large \vbox

text: I would like to measure the total height of a `\vbox` even for boxes which are larger than `\maxdimen`. It would be enough, if the code would compute the total height correctly only for small boxes. For very large boxes, a **'is very large'** statement would be enough. I followed the suggestions given in the answer to Long frames in mdframed and made the following test code which is able to measure a `\vbox` correctly in this sense for a total height up to 4 times of `\maxdimen`.               \documentclass{article}          \usepackage{blindtext}          \begin{document}          \newbox\largebox     \newdimen\measuredHeight          \newcommand*{\measureBox}[1]{%       \chardef\previousinteractionmode=\interactionmode%       \batchmode%       \measuredHeight=\dimexpr\ht#1+\dp#1\relax%       \ifdim\measuredHeight<0pt\relax%         \measuredHeight=\maxdimen%       \else\ifdim\measuredHeight=0pt\relax%         \ifdim\ht#1>0pt\relax%           \measuredHeight=\maxdimen%       \fi\fi\fi%       \interactionmode\previousinteractionmode%     }          \newcommand*{\blindtexttest}[1]{%       Blindtext[#1]:       \setbox\largebox\vbox{\blindtext[#1]}%       \measureBox{\largebox}%       total height       \ifdim\measuredHeight<\maxdimen\relax         \the\measuredHeight%       \else%         \the\maxdimen\ or larger%       \fi%       \par%     }          \newcount\mytest     \mytest=0     \loop       \advance\mytest by 1       \blindtexttest{\the\mytest}     \ifnum\mytest<550\repeat          \end{document}      ![enter image description here](http://i.stack.imgur.com/iNNpK.png) ... ![enter image description here](http://i.stack.imgur.com/JRqi5.png) On the negative side, this code produces a lot of `! Arithmetic overflow` and `! Dimension too large` messages in the log file. These messages are correct but annoying. So, my first question is: How could I suppress these messages? How can I make the `\measureBox` command as silent as possible? My general question is: Can you give me a better code for `\measureBox`? This macro takes a box register as parameter and saves the computed or guessed total height into `\measuredHeight`. A better code would give less annoying messages and, if possible, would measure boxes which are larger than 4 times `\maxdimen`.


title: Why does an environment's label have to appear after the caption?

text: \documentclass{article}     \usepackage{algorithm}          \begin{document}     \setcounter{section}{54}     \section{A section with no label}     \begin{algorithm}     \label{myalg}     \caption{An algorithm with the label `myalg'.}     \end{algorithm}     Reference to myalg: \ref{myalg}.     \end{document}      With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1). Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


title: Hyper References in Latex

text: I am using `hyperref` package for referencing but when i do references it gives me the chapter number instead of the label name and don't know why it is doing this as I am new to lateX. I searched a lots of example but nothing is working. Here is my code               \begin{figure}     \includegraphics[width = 150mm]{flowChart.jpg}          \label{Figure:1}     \end{figure}      And for referencing               ~\ref{Figure:1}      after this in PDF I am getting chapter number as 2.


title: Referencing figures doesn't work

text: > **Possible Duplicate:**   >  Where to put the \label on a figure environment? I'm having a problem with referencing figures in LaTeX. I have the following text:               \begin{figure}[H]     \center     \label{fig:enn1015}     \includegraphics[scale=0.40]{imagens/outputs/ENN_10_15.eps}     \caption{ENN unbalanced 10\%}     \end{figure}          The figure \ref{fig:enn1015} (...)      For some reason, the figure caption is:               Figure 3.5 Enn unbalanced 10%      But the text is:               The figure 3.2.1 (...)      Instead of:               The figure 3.5      It is printing the chapter.section.subsection the figure is in, and not the figure. Can anybody help me?


title: Why are my reference numbers to labels disappearing?

text: > **Possible Duplicate:**   >  Why does an environment's label have to appear after the caption? In the following example, there are no reference numbers to the figures when I compile using pdflatex:               \documentclass[12pt]{article}          \usepackage{amsmath}     \usepackage[normalem]{ulem}     \usepackage{float}     \usepackage{graphicx}     \usepackage{sidecap}     \usepackage{wrapfig}     \usepackage{grffile}     \usepackage[cm]{fullpage}     \usepackage{fixltx2e}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{indentfirst}     \usepackage[hidelinks]{hyperref}     \usepackage{glossaries}          %debugging package for figuring out why my figure references keep disappearing     %\usepackage{refcheck}          \begin{document}          \begin{figure}     \label{bob}     \caption{Bob}     \end{figure}          \begin{figure}     \label{jane}     \caption{Jane}     \end{figure}          Bob is reference \ref{bob}. Jane is reference \ref{jane}.          \end{document}      Any idea why?


title: Adding labels to two side by side tables

text: I've places two tables side by side, but I can't get the labels right.               \begin{table}[ht]     \begin{minipage}[b]{0.45\linewidth}\centering     \begin{tabular} {l | l | l}             a & a & a             \end{tabular}             \label{tab:NotreDame}             \caption{Training on Yosemite dataset and testing on Notre-Dame dataset}             \end{minipage}     \hspace{0.5cm}     \begin{minipage}[b]{0.45\linewidth}     \centering         \begin{tabular} {l | l | l}             b & b & b             \end{tabular}             \label{tab:Liberty}             \caption{Training on Yosemite dataset and testing on Liberty dataset}     \end{minipage}     \end{table}      When I compile my code, I get question marks instead of correct references.


title: Latex: Reference label individual images within figure

text: > **Possible Duplicate:**   >  Why does an environment's label have to appear after the caption? I currently have:               \begin{wrapfigure}{R}{0.3\textwidth}         \vspace{-20pt}         \begin{center}             \includegraphics[width=0.3\textwidth]{images/accumstatic}             \label{accumst}         \end{center}         \vspace{-20pt}         \caption{Accum static picture}         \vspace{10pt}         \begin{center}             \includegraphics[width=0.3\textwidth]{images/accumdynamic}             \label{accumdy}         \end{center}         \vspace{-20pt}         \caption{Accum dynamic picture}     \end{wrapfigure}      This creates a page that looks something like:               lorum ipsum trees freasa lorum ipsum trees freasa     lorum ipsum trees freasa lorum ##################     lorum ipsum trees freasa lorum #                #     lorum ipsum trees freasa lorum #     Fig.1      #     lorum ipsum trees freasa lorum #                #     lorum ipsum trees freasa lorum ##################     lorum ipsum trees freasa lorum #                #     lorum ipsum trees freasa lorum #     Fig.2      #     lorum ipsum trees freasa lorum #                #     lorum ipsum trees freasa lorum ##################     lorum ipsum trees freasa lorum ipsum trees freasa      I then reference it using the cleverref package: `\paragraph{blah blah blah \cref{accumst}, blah blah blah \cref{accumdy}}` Unforutantely `accumdy` references the top image (Fig.1) and `accumst` references the previous section number... How do I get \label{} to see that wrapfigure contains two images?


title: Tables always auto ref to Table 1.2

text: When referencing a table with `\autoref{}`, instead of the table's correct reference I always get `Table 1.2`. This is quite strange, because clicking in the reference sends me to the correct table on the pdf. Here's a sample table:               \begin{table}[ht]     \centering         \begin{tabular}{c c c c c c}         \hline         Region & Facebook & Twitter & Google+ & Instagram & Pintrest \\         \hline         North America         & 55\% & 24\% & 17\% & 12\% & 16\% \\         Middle East \& Africa & 52\% & 28\% & 31\% & 10\% & 8\% \\         South America         & 51\% & 25\% & 24\% & 11\% & 6\% \\         Asia-Pacific (APAC)   & 48\% & 27\% & 26\% & 8\% & 5\% \\         Europe                & 43\% & 18\% & 16\% & 6\% & 3\% \\         \hline              \end{tabular}     \label{table:social-share-by-region}     \caption{Social network share by region, excluding China\cite{InstagramIsTheFastestGrowingSocialSiteGlobally}}     \end{table}      I reference it as usually:               \autoref{table:social-share-by-region}      What could be wrong? Edit: forgot to mention; this sample table is Table 1.6, the reference (as indicated) shows Table 1.2 Edit: just tried it; `\ref{table:social-share-by-region}` is still `1.2`...


title: label for table

text: > **Possible Duplicate:**   >  Where to put the \label on a figure environment? I've got the table numberin with sections:               \numberwithin{table}{section}      The following table is 2.1. for example:               \begin{table}     ...     \label{thelabel}     \end{table}      But when I reference this table using `\ref{thelabel}` I only get the 2, not the whole table number. How to get the label and the table number right?


title: Different number in image caption and in ref to figure

text: I have figure with image like this:               \begin{figure}[h!]     \centering     \label{fig:controlsOpacity}     \includegraphics[width=120mm]{img/image_01.png}     \caption{some text}     \end{figure}      then I am referencing to this image in text by this:               \ref{fig:controlsOpacity}      Number in caption of that image is 4.4 (I think because it's forth image in that chapter) but in text I am referencing to number 4.6 (it's number of section in which I have both, ref and figure with image). What am I doing wrong? Thanks


title: Reference to the table does not appear

text: Although I have a valid label for a table, the reference to that label does not appear in the PDF file, or sometimes appear as `??` if I put a tilde before `\ref`. The code is the following:               \documentclass{article}          \begin{document}          \begin{table}[!t]     \footnotesize     \parbox{.50\linewidth}{     \centering     \begin{tabular}{l|l}     Example plot \\ \hline     A & 22 \% \\      B & 54 \% \\     \end{tabular}     }     \label{tab:example}     \caption{Example plot}     \end{table}          Looking the table \ref{tab:example}               \end{document}      Any thought?


title: When I try to reference figures, eg "see Figure~\ref{lattice1}", the output it "Figure ??". Did I label it wrong?

text: \documentclass{article}      \begin{document}          \begin{figure} %          \begin{subfigure}[b]{0.30\textwidth}     \centering          \begin{tikzpicture}[       decoration={         markings,         mark=between positions 0 and 1 step 25pt with { \draw [fill] (0,0) circle [radius=2pt];}       }     ]     \path[postaction={decorate}] (0,4) to (4,4);     \path[postaction={decorate}] (0,3) to (4,3);     \path[postaction={decorate}] (0,2) to (4,2);     \path[postaction={decorate}] (0,1) to (4,1);     \path[postaction={decorate}] (0,0) to (4,0);     \draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65);     \draw [dashed] (0, 1.5) -- (4,1.5);     \draw [dashed] (0, 2.5) -- (4,2.5);     \end{tikzpicture}      \label{lattice1}     \caption{A lattice of sources. Equation~(\ref{G01}) is the field generated by the central row.}     \end{subfigure} %     \begin{subfigure}[b]{0.30\textwidth}     \centering     \begin{tikzpicture}[       decoration={         markings,         mark=between positions 0 and 1 step 25pt with { \draw [fill] (0,0) circle [radius=2pt];}       }     ]     \path[postaction={decorate}] (0,4) to (4,4);     \path[postaction={decorate}] (0,3) to (4,3);     \path[postaction={decorate}] (0,2) to (4,2);     \path[postaction={decorate}] (0,1) to (4,1);     \path[postaction={decorate}] (0,0) to (4,0);     \draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65);     \draw [dashed] (1.25,0) -- (1.25,4);     \draw [dashed] (2.25,0) -- (2.25,4);     \end{tikzpicture}     \label{lattice2}     \caption{A lattice of sources. Equation~(\ref{F0}) is the field generated by the central column.}     \end{subfigure} %     \begin{subfigure}[b]{0.30\textwidth}     \centering     \begin{tikzpicture}[       decoration={         markings,         mark=between positions 0 and 1 step 25pt with { \draw [fill] (0,0) circle [radius=2pt];}       }     ]     \path[postaction={decorate}] (0,4) to (4,4);     \path[postaction={decorate}] (0,3) to (4,3);     \path[postaction={decorate}] (0,2) to (4,2);     \path[postaction={decorate}] (0,1) to (4,1);     \path[postaction={decorate}] (0,0) to (4,0);     \draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65);     \draw [dashed] (1.25,0) -- (1.25,4);     \draw [dashed] (2.25,0) -- (2.25,4);     \draw [dashed] (0, 1.5) -- (4,1.5);     \draw [dashed] (0, 2.5) -- (4,2.5);     \end{tikzpicture}      \label{lattice3}     \caption{A lattice of sources. Equation~(\ref{G0}) is the field generated close to the central source.}     \end{subfigure} %     \label{lattice}          \end{figure}          \end{document}


title: Figure numbers appearing wrongly within the text

text: I am new to Latex and I am facing a lot of problems with Figure numbers. They appear correctly next to the figure in Arabic numericals. But when I refer to any figure within the text, it shows a wrong Roman numeral upon compilation instead of the appropriate figure number. Kindly help me sort this out.


title: Where to put the \label on a figure environment?

text: > **Possible Duplicate:**   >  Why does an environment’s label have to appear after the caption? I noticed that when I put the `\label` command before the `\caption` command in a figure environment, I get wrong `\ref` results for this figure. When I put the label in or after the `\caption`, the `\ref` will work fine. In the first case, I will get a `\ref` to the enclosing section (or subsection). Why is that so? And is there some documentation which tells me how to label a figure correctly?


title: Using \label within a figure float

text: > **Possible Duplicate:**   >  Where to put the \label on a figure environment? My question is rather simple. I have noticed that when I use `\label` like this               \begin{figure}[h]     \centering     \includegraphics[width=0.5\textwidth]{Leslie_Lamport}     \label{fig:LL}     \caption{Leslie Lamport}     \end{figure}      and then refer to this label it refers rather to the section number than to the figure (I've seen it been refered as `section.figurenumber` but that was due to a package I believe - possibly `hyperref`). But when using it after the caption               \begin{figure}[h]     \centering     \includegraphics[width=0.5\textwidth]{Leslie_Lamport}     \caption{Leslie Lamport}     \label{fig:LL}     \end{figure}      it really refers to the figure number. Can someone explain the mechanic behind \label to me?


title: Fancyref using wrong table number

text: I am currently working on my thesis and I discovered a nasty problem. I use the following code to reference a table:               \fref{tab:alternatives}      Now I defined the table like this:               \begin{table}[h]         \centering         \begin{tabular}{l|*{10}{c}}         %removed the content         \end{tabular}     \label{tab:alternatives}     \caption{Comparing functionalities}     \end{table}      Now when I generate the pdf fancyref produces the following: "First in table 2.2" but the table is called: "Table 2.1.: Comparing functionalities" How can this be?


title: Figure counter and figure label issues

text: i ve got an issue with Figure counting and, i think, labeling. Though I set the counter for figures at 0, my first figure, that I d like to have counted as 'Fig.1' and that is labeled as `\label{graf1}`, appears in Chapter 2, Subsubsection 2.2.3.1 and is captioned when compilated as 'Fig 2.1'. Moreover, while it is referred to in the text as '(\ref{graf1})' the reference looks as 'figure (2.2.3.1)', that is the subsubsection number... Does anybody see what seems to be the problem? My header is below. Many thanks!               \documentclass[12pt]{thesis}%{book}%{%          \usepackage[numbers]{natbib}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{amsmath}      \usepackage{amssymb}      \usepackage{makeidx}      \usepackage{graphicx}     \usepackage{epigraph}     \usepackage{pdfpages}     \usepackage{url}      \usepackage{breqn}     \usepackage{setspace}     \usepackage{dsfont}     \usepackage{eurosym}     \usepackage{setspace}          \onehalfspacing          \setcounter{secnumdepth}{4}     \setcounter{tocdepth}{4}     \setcounter{figure}{0}          \theoremstyle{plain}     \newtheorem{thm}{Theorem}%[section]     \newtheorem{defin}{Definition}     \newtheorem{prop}{Proposition}          \newcommand{\eqbydef}{\overset{def}{=}}          \begin{document}      .....      \begin{figure}[htb]\label{graf1}      \begin{center}      \includegraphics[height=8cm,width=11cm]{c3.eps}      \caption{This shuould be Figure 1}      \end{center}      \end{figure}           \end{document}


title: Reference links to algorithm but shows?

text: I am using `algorithm2e` when I reference an algorithm it shows `??` which links to the correct algorithm, but it should show something like 1.1. Any suggestions as to how I can fix this? Here is an mwe:               \documentclass[12pt, a4paper, oneside, english]{Thesis}          \usepackage[boxed, ruled, ruled, algoruled]{./algorithm2e}     \usepackage{babel}          \begin{document}          \ref{alg:Stage1.2} shows the algorithm.          \begin{algorithm}[!htp]     \label{alg:Stage1.2}      \caption{Stage1.2}     \end{algorithm}     \clearpage          \end{document}


title: Different numbers in \label and \ref

text: I want to reference an image in my LaTeX document. In order to do this, I wrote following code:               \begin{figure}[h!]     \centering     \includegraphics[scale=0.25]{img/2016_02_16_history_site_1.png}     \label{fig:history_site_1}     \caption{Some caption bla-bla}     \end{figure}          See image \ref{fig:history_site_1}.      When I compile the document, the caption under the image has number 6.3 ( _Fig. 6.3: Some caption bla-bla_ ), but the reference has number 6.8 ( _See image 6.8._ ). How should I modify the code in order for the number to be equal in both caption and the reference?


title: Numbering of \ref within the list environment

text: This took me a while to find an answer for, and I couldn't find an answer on here, so I thought I'd post and answer my own question. Somewhere in a latex file, we might have some figures, like so                   \begin{figure}[h]             \centering             \includegraphics{foo.png}             \label{foo}             \caption{bar}         \end{figure}      If we then use a list, such as `enumerate`, `itemize` or `description` and then reference that figure from within the list, ie                   \begin{enumerate}             \item As seen in Figure~\ref{foo}         \end{enumerate}      We come across a strange problem where the the figure is numbered in relation to all other figures, how we would want, ie. Figure 2.15. But the number given in "As seen in Figure #" is related to where it is in the list, in this case giving "Figure 1."


title: \ref not working with tikz and externalize lib

text: > **Possible Duplicate:**   >  Why does an environment's label have to appear after the caption? I am using `tikz` with its externalize library. I create figures with the following coding style:               \begin{figure}     \centering     \begin{tikzpicture}       code code code..     \end{tikzpicture}     \label{fig:label}     \caption{Blah blah blah text.}     \end{figure}      when I use `\ref{fig:label}` it does not display the correct number. Another notable and bizarre behavior is that the number is in the format, e.g 5.2.1 and not 5.2; has anyone encountered this? Also by trying to create a MWE I could not make the thing to even appear. I am not trying to do complex stuff, just to say "in the figure x.x ...". Anyway, here is the not working MWE:               \documentclass[a4paper,10pt]{report}     \usepackage{tikz} %pgf-tikz pakcage     \usepackage{pgfplots}     \usepackage{hyperref}          \hypersetup{         colorlinks=true,linkcolor=blue,linktocpage,bookmarksopen=true     }          \begin{document}          \begin{figure}     \begin{tikzpicture}          \draw[fill = blue,fill opacity = 0.3](0,2) rectangle (1.5,3.5);     \draw[fill = yellow,fill opacity = 0.3](0.5,2.5) rectangle (1,3);          \draw[->] (0.75,0.75) -- (0.75,2.75);     \end{tikzpicture}     \label{fig:stuff}     \end{figure}          Hello \ref{fig:stuff} world     \end{document}


title: LaTeX figure cross reference label using RStudio and knitr

text: > **Possible Duplicate:**   >  Why does an environment’s label have to appear after the caption?   >  Where to put the \label on a figure environment? When using RStudio to write a .Rnw file, I find that when inserting a plot, the cross reference is not expected. For example, in section 5.3 I insert a plot using the following commands:               \begin{figure}[!htb]     \begin{center}\label{fig:testplot}     \includegraphics[scale=0.8]{testplot.pdf}     \caption{I'm caption}     \end{center}     \end{figure}      In the text, I write "In Figure~`\ref{fig:testplot}`" to reference this plot. However, after clicking Compile PDF, I find that what produced is "In Figure 5.3" --> it is the section number, not the desired figure number (it should print out Figure 4 since three figures already existed in the text). What went wrong? Thank you very much!


title: More than one table per subsubsection is referred to by section number

text: > **Possible Duplicate:**   >  Table reference   >  Why does an environment's label have to appear after the caption? If you compile the LaTeX below, you get section numbers for some references instead of table numbers. This happens after the first two. Code to reproduce:               \documentclass[11pt]{article}     \usepackage[utf8]{inputenc}     \begin{document}     \subsubsection{Example}     \label{sec-2-4-1}         (see tables \ref{doc-1} and \ref{doc-2})     \begin{table}[htb]     \caption{document 1}      \label{doc-1}     \begin{center}     \begin{tabular}{llr}     \end{tabular}     \end{center}     \end{table}     \begin{table}[htb]     \caption{document 2}        \label{doc-2}     \begin{center}     \begin{tabular}{llr}     \end{tabular}     \end{center}     \end{table}         (see table \ref{doc-extracted}).     \begin{table}[htb]       \label{doc-extracted}     \caption{extracted}      \begin{center}     \begin{tabular}{llr}     \end{tabular}     \end{center}     \end{table}         (see table \ref{doc-sum})         (see table \ref{doc-avg}).     \begin{table}[htb]       \label{doc-sum}     \caption{sum}      \begin{center}     \begin{tabular}{lr}     \end{tabular}     \end{center}     \end{table}     \begin{table}[htb]       \label{doc-avg}     \caption{average}      \begin{center}     \begin{tabular}{lr}     \end{tabular}     \end{center}     \end{table}     \end{document}      Would anyone know how to fix this?


title: How to number figures continuously in documentclass{article}

text: Currently my document labels figures in a continuous manner (figure 1, figure 2, etc.) but references to these same figures have the section, subsection, etc. number in front of it (3.1.1 for a figure in the 3rd section and 1st subsection). I want the references to my figures to number in the same continuous fashion as the figures themselves (i.e. figure 1, figure 2, no matter what section the figures are in). I tried using `\counterwithout{figure}{section}` and `\counterwithout{figure}{subsection}` but the 3.1.1 style of figure referencing continues. Here is a minimum working example that reproduces the problem:               \documentclass{article}     \usepackage{chngcntr}     \counterwithout{figure}{section}     \counterwithout{figure}{subsection}          \usepackage{graphicx}                         \begin{document}     \section{section}     \subsection{subsection}          Figure~\ref{fig:foo}     \begin{figure}     \label{fig:foo}     \includegraphics[width=6in]{foo.ps}     \caption{sample text}     \end{figure}          \end{document}


title: Referencing an environment before it is labelled

text: Using the package hyperref I'm noticing that I can't reference things properly. It seems that \autoref actually references the latest section, table, equation or figure (in short environment) before a label. Is this right? and what am I doing wrong?               \subsection{One one}          I want to write: `\autoref{tab:one}' shows such and such:          \begin{table}         \caption{some bumpf}         \label{tab:one}     \end{table}      Gives me: I want to write subsection 1.1 shows such and such. **EDIT** I have caption I forgot it in this instance. The question I'm asking is why my reference is to something that is not labelled? Eg, why do I get a reference to a subsection if the label is clearly in the figure environment or table environment? Is it really always because I may have forgotten the order of label after caption somewhere?


title: Cross-referencing with label inside document

text: I have an issue with referencing inside the text, i use the `\label` for every figure I have and Table, but when i state in my text that see `Figure \ref` instead of giving me Figure 5 (or etc) it gives me Figure 4.1 which represent the section that the table of figure is written in.               \documentclass[authoryear,preprint,review,12pt]{elsarticle}     \usepackage{graphicx}     \usepackage{float}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{mathtools}     \usepackage{adjustbox}           \usepackage{lineno}          \begin{document}          \begin{flushleft}     \begin{figure}[H]\label{East}     \includegraphics[width=1.3\textwidth,keepaspectratio]{figures/2.pdf}     \caption{mesh }     \end{figure}     \end{flushleft}          The part of the text that tell that you have to see Figure \ref{East}                           \end{document}      Is there a way to cross reference my text and have the actual numbers of Figures of tables that i cross reference


title: Cleveref breakup on figure references

text: Consider this MWE:               \documentclass[a4paper]{article}          \usepackage{graphicx}     \usepackage[dvips]{hyperref}     \usepackage[noabbrev,nameinlink]{cleveref}          \begin{document}     \section{Abc}     \begin{figure}     \label{fig:a}     \centering     \rule{20mm}{20mm}     \caption{abc}     \end{figure}     In \cref{fig:a} $\ldots$     \end{document}      From this example you expect an expansion of the sentence > In \cref{fig:a} $\ldots$ into > In Figure 1 ... however on my system this compiles to either `??` (for unknown reference) or gets a chapter, section or subsection 1 reference depending on other labels used in the text. However other types of `cref` references like references to a table, section, listing, etc work as expected even when used with other classes and compilers. Is this a bug in `cleveref`, are there solutions, or is their an error in my setup?


title: \ref{figures} goes to the part, not the figure

text: I'm using Latex for a Report about signal processing and I've a lot of figures. SoI putted them into minipages to display them side by side. It's fine but the references doesn't work. Here is an example:               \part{Figures}     \section{Question 2}     \begin{figure}[ht]     \begin{minipage}[b]{0.45\linewidth}         \centering         \includegraphics[width=\textwidth]{21comp.eps}         \label{fig:21comp}         \caption{Comparaison des réponses impulsionnelles des filtres $h_1[m]$ et $h_2[m]$}     \end{minipage}     \hspace{0.5cm}     \begin{minipage}[b]{0.45\linewidth}         \centering         \includegraphics[width=\textwidth]{21comp2.eps}         \label{fig:21comp2}         \caption{Comparaison des filtres $h_1[m]$ et d'un filtre passe-bas parfait}     \end{minipage}     \end{figure}      For me it seems to be fine but when I try to use a reference like \ref{fig:21comp}, it displays only A (the part) and not 1 for the figure number. What am I doing wrong ? Is it related with my minipages ? Thanks.


title: Mistakes in the figure numeration

text: > **Possible Duplicate:**   >  Figure numbers using the section number   >  Why does an environment’s label have to appear after the caption? I have two figures in my document. Figure 1 is correctly entitled and referred, but figure 2 is entitled Fig 2, but referred as Fig 6.               \begin{figure}[!ht]       \label{ExperimantalSetup}       \caption{Block-scheme of the experimental setup}       \centering       \includegraphics[width=\columnwidth]{setup}     \end{figure}      I checked:   * no duplicate labels,    * no errors or warnings(excepting the image size) in compilation   * the only list which has #6 at that point of the document is the Todo list. (But I used the same Todo package before, and had no problems with it).   * references are not hyperlinked (not clickable). Perhaps, there is a settings error, could you advice what to change? Any ideas why this problem can be?


title: Referencing table

text: I have a big problem with referencing my tables. Below is how I do it. The pdf seems to know which table I refer to (the reference links me to the right table), but instead of a number it writes "??". Table \ref{medaltable} summarizes the results               \begin{table}     \label{medaltable}     \caption{The summary of the performance of the algorithms in terms of the number of    nodes activated during the information diffusion}     \center     \begin{tabular}{ | l | c | c | c | c | }     \toprule     \textit{algorithm} & \textit{first} & \textit{second} & \textit{third} & \textit{total}     \\ \hline     GR & 4 & 4 & 2 & 22  \\     SHALG & 4  & 3 & 4 & 22  \\      CUST2 & 4 & 4 & 1 & 21 \\      \bottomrule     \end{tabular}     \end{table}


title: Reference to listing not working

text: I have the following code:               \documentclass{article}          \usepackage{hyperref}     \usepackage{minted}          \begin{document}          A nice paper has the following things:          \begin{listing}       \begin{minted}{haskell}       data RCPoint = RCPoint {         _rcp_si :: Integer       }       \end{minted}       \label{ch1}       \caption{The RCPOINT Listing}     \end{listing}          \begin{equation}       \label{eq:eqn1}       x^2 - 2 x     \end{equation}          I like my equation in \ref{eq:eqn1}.          I also like my code in Listing \ref{ch1}.          \end{document}      which compiles normally, to produces:: ![PDF - Notice no listing number](http://i.stack.imgur.com/sFaJ3.png) The reference to the listing in the final line is missing. I get a warning for the final line of output:               (/usr/share/texmf-dist/tex/latex/amsfonts/umsb.fd)          Package hyperref Warning: Suppressing empty link on input line 55.          [1] (./nice-org-paper.aux) )     Output written on nice-org-paper.pdf (1 page).     Transcript written on nice-org-paper.log.      How do I get the reference to work?


title: Table reference

text: I wrote a long table with a label in a tex file and `\input` it into my main tex file. The reference in the main tex file to the table, however, does not show the numbering of the table but the one of the next table that are written directly in the main tex file. All long tables that are written directly in the main tex file have correct references. How to fix my problem? Must the label be defined in the same tex file as its reference? The label is `\label{tab:yy}`, and the reference is `\ref{tab:yy}`, and every table has a distinct label.


title: Reference to a figure uses the section's number

text: One of my sections seems to be using the section number rather than the appropriate figure number for \ref's that point to figures. (Theorems and the like work fine.) As far as I can tell, there's nothing differentiating the problematic section from the other sections, but there must be as the problem doesn't go away when I compile that section on its own. Any ideas? Edit: an example of a broken figure. (Every figure in the section is broken.)               \begin{example}       Figure~\ref{fig: hasse} depicts ...     \begin{figure}[htbp]\label{fig: hasse}     \begin{center}     \begin{tikzpicture}         \tikzstyle{every node}=[draw,circle,fill=black,minimum size=4pt,                                 inner sep=0pt]         [bunch of lines for the picture]         \end{tikzpicture}     \caption{Hasse diagram}     \end{center}     \end{figure}     \end{example}      This particular instance had the figure inside the example, but that doesn't make a difference.


title: Table number in ref inconsistent with actual table caption

text: > **Possible Duplicate:**   >  Why does an environment’s label have to appear after the caption? For convenience of readers, Table~\ref{table_abbreviation} lists the abbreviations and their full meaning, as used in this report.               \begin{table}[ht]     \label{table_abbreviation}     \caption{Abbreviations used in this paper}     \centering     \begin{tabular}{l l}     \hline     Abbreviations & Full definition \\     \hline     P2P & Peer-to-peer  \\      DDM & Distributed Data Mining  \\     [1ex]     \hline     \end{tabular}     \end{table}      The above is a latex code portion from a document I am writing. I am expecting `~\ref{table_abbreviation}` to give the same number as shown next to the caption of table. However, while the caption says "Table 1", in the content it is referred as 1.3. Perhaps, the numbering would be clear if I give the whole code, but I was under the impression, the numbering will be consistent no matter where they are used.


title: \ref{} does not find my \label in LaTeX

text: > **Possible Duplicate:**   >  Why does an environment's label have to appear after the caption? I have a problem using `\ref{}` to reference table floating object. In my document, I have a table area like this:               \begin{table}     \label{tab:gstexp}     \begin{tabular}{l l p{7.5cm}}     \hline     \hline     \textbf{Nr.}    & \textbf{Name}                     & \textbf{Comment} \\     \hline        %Contents     \hline     \hline     \end{tabular}     \caption{just a table}     \end{table}      In my text, I reference it using `Table~\ref{tab:gstexp}` The ref is before the label in my text but this should be indifferent. But if I compile my code in the PDF it renders "Table ??" instead of "Table 1". I am using MacTeX and texmaker to compile my documents.


title: Cleveref reference table as section

text: I am using `cleveref` for my references, and I just noticed that a reference to a table is actually resolved by `cleveref` into “section”. Is that indended behaviour? Is there maybe something wrong with my `TeXLive`? This looks very odd to me: ![Very messed up references.](http://i.stack.imgur.com/JdZe6.png)               \documentclass{article}          \usepackage{cleveref}          \begin{document}     \section{Top section}     \subsection{Lower section}\label{sec:lower}     This is a reference to my \cref{tab:test} and to my \cref{sec:lower}.     Also, a reference to a second \cref{tab:test2}          \begin{table}[hbtp]       \centering       \begin{tabular}{rr}         Case          & One \\       \end{tabular}       \label{tab:test}       \caption{This is a table.}     \end{table}          \begin{table}[hbtp]       \centering       \begin{tabular}{rr}         Case          & One \\       \end{tabular}       \label{tab:test2}       \caption{This is a table.}     \end{table}          \end{document}


title: Why does ref link to section instead of label?

text: I want to refer to a figure within a section (say 1.2), using `\ref{fig:xyz}` Section:               \section{XYZ}      Figure:               \begin{figure}         \includegraphics[width=1\linewidth]{xyz.jpg}         \label{fig:xyz}         \caption[XYZ]     \end{figure}      When I add \ref{label:001} to my document, it does not link to the figure, but to the section (1.2). What can I get it right?


title: Figure 2 is referred to as Figure 3

text: The caption of Figure 2 (label: `F:mnDiagram`) is printed correctly, but when I use `\ref{F:mnDiagram}`, the output I get is 3 (instead 2). What could be wrong?


title: Referencing figures when compiling with pdfLaTeX

text: I had a problem in referencing figures, which now I solved, thanks to an old answer by Werner. To be precise, in my case the reference was working properly (the hyperlink was pointing to the correct figure), but I couldn't manage to substitute the double question mark with the correct figure number. Why does the relative placement of `\label` and `\caption` matter, shouldn't the double compilation of the LaTeX code suffice? Is there a technical reason for this behaviour?   I noticed that it occurs only when compiling with pdfLaTeX, not with LaTeX. Thanks in advance!


title: Properly reference figure?

text: > **Possible Duplicate:**   >  Figure numbers using the section number I have a figure inside a section, like:               \subsection{Something}     \begin{figure}[htbp]         \centering          \includegraphics[height=2in]{pictures/mathematic/vn_vicinity.pdf}         \hspace{1.5in}\parbox{5in}{\caption{Representación gráfica Vecindad de Von Neumann}}         \label{fig:VecindadVonNeumann}     \end{figure}      When I want to reference the figure:               This is my all awesome figure \ref{fig:VecindadVonNeumann}      I get the reference number from the section, not from the figure itself. This is my section number ![Section Number](http://i.stack.imgur.com/OKBFz.png) This is my Figure, shows 2.1 as number ![Figure Number](http://i.stack.imgur.com/S3cDg.png) This is the number that I'm getting in my `\ref` ![2.1.4](http://i.stack.imgur.com/F6zI0.png) Is this normal ? Shouldn't I get `2.1` in my reference ?


title: Wrong reference for figures?

text: > **Possible Duplicate:**   >  Why does an environment's label have to appear after the caption?   >  Where to put the \label on a figure environment? I use `\documentclass{llncs}`, when I reference an image labelled for example "img1" using `\ref{img1}` I get the number of the section instead of the number of the image ! After that I added `\usepackage[compatibility=false]{caption}` because I need it for another problem, and I see now that if I do `\ref{img1}` I get nothing else "??" !


title: Is there a \renewtheorem equivalent of \renewcommand, using amsthm and not ntheorem?

text: Suppose I have a theorem that is defined a certain way, as follows.               \newtheorem*{mytheorem}{Foo}      And I want to redefine it another way further down in my document, as below.               \newtheorem*{mytheorem}{Bar}      What is the easiest way to go about this? I would like something like this, but I get `undefined control` sequence on `\renewtheorem`.               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsthm}          \begin{document}     \theoremstyle{definition}     \newtheorem*{thmTemp}{Foo}     \begin{thmTemp} First one.  \end{thmTemp}          \renewtheorem*{thmTemp}{Bar}     \begin{thmTemp} Second one.  \end{thmTemp}     \end{document}      When I run `pdflatex` on this, I get the following:               ! Undefined control sequence.     l.10     \renewtheorem                       *{thmTemp}{Bar}      I am avoiding `ntheorem` because it does not preserve the theorem styles defined by `amstheorem`, even when the `amsthm` option is passed to it, and I would prefer not to redefine those styles.


title: LyX TeX Table too big

text: I am including a TeX file into a LyX document using Insert -> Child Document. The Table looks fine on the LyX screen but when I preview the PDF it is 10 times too big. Not sure how to fiddle with the magnification to make it look right. Or is using the child document route wrong? Here is the MWE:               \begin{table}     \caption{Regression table}\label{tab1}     \centering          \smallskip     \begin{tabular}{@{}l cccccc @{}}     \toprule     & \multicolumn{2}{c}{Model 1}     & \multicolumn{2}{c}{Model 2}     & \multicolumn{2}{c@{}}{Model 3}\\     \cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(l){6-7}     & Coef. & SE & Coef. & SE & Coef. & SE\\     \midrule     Variable 1 & 12.758 & * &  13.822 & *** & 2.123 & *\\     \midrule[\heavyrulewidth]     \multicolumn{7}{@{}l}{* $p < 0.05$, ** $p < 0.01$, *** $p < 0.001$.}\\     \end{tabular}     \end{table}      When I add this as an input to my LyX Beamer presentation the slide magnifies the table 5-10 times making it unreadable.


title: How can I define a new environment which limits the scope of \newtheorem commands?

text: I am attempting to make an environment out of the command given in one of the answers to this question: Customizing theorem name.               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsthm}          \newenvironment{namedtheorem}[1]{     \theoremstyle{definition}        \newtheorem*{thmTemp}{#1}     \begin{thmTemp}}{\end{thmTemp}}          \begin{document}          \begin{namedtheorem}{foo}         This is a named theorem bar.     \end{namedtheorem}          \begin{namedtheorem}{bar}         This is a named theorem bar.     \end{namedtheorem}          \end{document}      Unfortunately, my invocation of `\newtheorem*{thmTemp}{#1}` seems to be scoping beyond the current environment, causing an error when the environment is used a second time. How can I fix my environment to avoid this problem?


title: Is it possible to have a Bézier curve with 3 control points in TikZ?

text: In TikZ, it is possible to draw a Bézier curve of degree 3 with 2 control points p0, p1, p2, and p3 as follows:               \draw(p0)..controls (p1) and (p2)..(p3);      I am wondering whether there is a way to draw a Bézier curve with 5 points where 3 of them work as control points. That would then look like:               \draw(p0)..controls (p1) and (p2) and (p3)..(p4);      It looks like it is not available.


title: How to change the stroke opacity of the grid?

text: I need transparent grids on the top of other graphic objects. I know that the option `strokeopacity` can be used to change the stroke opacity of path. I have made a try as follows, but it cannot work for grid. Could you tell me how to achieve my goal? ![enter image description here](http://i.stack.imgur.com/hXW59.png)               \documentclass{article}     \usepackage{pstricks}          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{pspicture}     \PreviewBorder=12pt               \newpsstyle{mygridstyle}{         strokeopacity=0.5,         subgriddiv=4,         gridlabels=5pt,         gridlabelcolor=red,         gridfont=Verdana,         gridcolor=magenta!50,         subgridcolor=gray!50,         gridwidth=2pt,         subgridwidth=1pt,     }               \begin{document}     \begin{pspicture}(3,3)     \psset{linewidth=10pt,strokeopacity=0.5}     \psline[linecolor=blue](3,3)     \psline[linecolor=red](3,0)(0,3)     \psgrid[style=mygridstyle]     \end{pspicture}     \end{document}


title: How to draw the "parallel circuits" sign "//"?

text: I remember seeing the notation "R1 // R2" in electronics books, meaning "(R1^-1 + R2^-1 )^-1", i.e. the resistance of R1 and R2 connected in parallel. What is the correct way of typesetting the "//" sign? I don't think it's the same as `\parallel`, but I couldn't find any example of the sign.


title: Minted+Inconsolata: Straight Quotes

text: I am using `minted` to display my source code and the Inconsolata package to set the output font. Unfortunately, this produces the following ugly result (note the direction of the quote marks: ![Example string with badly-shaped quote marks](http://i.stack.imgur.com/Zcung.png) Figuring this was a bad attempt on LaTeX's part to use smart quotes, I tried using the `upquote` package. This produced the following: ![Example string which erroneously displays no quotes, using Inconsolata font](http://i.stack.imgur.com/OEjvS.png) Using this MWE:               \documentclass{article}     \usepackage{minted}     \usepackage{inconsolata}     \usepackage{upquote}     \begin{document}          \begin{minted}{matlab}         disp('This string should have straight quotes!');     \end{minted}     \end{document}      Removing the Inconsolata package produces a typographically-acceptable result, but, alas, not in the Inconsolata font: ![Example string with straight quotes, using tt font](http://i.stack.imgur.com/Nwg2S.png) I'm not sure what's going on. Why can't I have the font I want AND the appropriate quotes? Any thoughts?


title: Syntax: De-highlighting Certain Commands in TexShop

text: There seem to be commands of various quality. A command like `\section` has some structural effects and differs considerably from commands like `\dots` or author-defined shortcuts (for example `\eg` for "for example") that rather affect the textual content than the documents layout and that are distracting when scattered all over the document. Nevertheless, both are highlighted very similar. My question: Is there a(n easy) way to de-highlight pre-defined commands like `\dots` and author-defined commands like `\eg` in TexShop?


title: How can I make a graph of a function?

text: I'm trying to implement a function to LaTeX but i don't know how. I'm compiling using this page: docs.latexlab.org


title: Nested foreach inside a TikZ matrix for both rows and columns

text: I'm trying to create a matrix using nested `\foreach` loops. I tried following the example I found in a previous question, but I keep getting errors. Here is the code I tried to run:               \documentclass{article}     \usepackage{etoolbox}     \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}     \let\mymatrixcontent\empty     \newcommand{\row}[1]{       \foreach \i in {0,...,5} {         \xappto\mymatrixcontent{\expandonce{           \node {\i}; &          }}       }       \xappto\mymatrixcontent{\\}     }     \row{1}          \begin{tikzpicture}       \matrix[matrix of nodes]{         \mymatrixcontent       };     \end{tikzpicture}     \end{document}      I'm getting an error:               ! Undefined control sequence.     \\  ->\let \reserved@e                             \relax \let \reserved@f \relax \@ifstar {\let \reserv...     l.16 \row{1}      I noticed that this error occurs only after adding the new row after the `\foreach` loop. Is there a way to avoid it? **EDIT** : I completed the example.


title: What's the minimum distance between two Bézier curves?

text: We are solving How to get intersection point(s) of two glyphs? and if we could find minimum distance between two Bézier curves analytically, it would be computationally effective. It would be much better method than bisection method we quite often use in typography. A mathematician told me that this approach could lead into a horrible system of equations. That's likely reason we use numerical methods instead. One of my (poor) ideas is to convert Bézier curves to spiral curves (see application in FontForge), but it might lead us into an even worse situation (from mathematical point of view). My next idea is to split up Bézier curves into smaller parts, but it's probably not improving a thing. I'm sorry I'm not providing MWE, please feel free to delete/close my question.


title: Change fancy header on one specific page

text: I have a problem with my thesis. I use fancy header as environment in my document. Code:               \pagestyle{fancy}     \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \fancyfoot[EL]{\thepage}     \fancyfoot[OR]{\thepage}          \fancyhead[EL]{\fontsize{10}{10}\selectfont     \textcolor{black!60}{\textbf{\leftmark}}      }     \fancyhead[OR]{\fontsize{10}{10}\selectfont     \textcolor{black!60}{\textbf{\rightmark}}     }      So, on the left pages up top I have the chapter, on the right the section. In general that is fine. My problem is, one chapter has no sections. It has 2-3 pages and therefore the right page (or odd numbered) has no header at all. Can I set a new fancyhdr for this specific page with the chapter (thus \leftmark) on the single OR page?


title: Subfig package: Undefined control sequence \includegraphics

text: I want to use subfig to put multiple pictures under one caption. However, the error mentioned in the title occurs.               \documentclass[conference]{IEEEtran}     \usepackage{cite}     %\usepackage[caption=false]{caption}     %\usepackage[font=footnotesize]{subfig}     \usepackage[caption=false,font=footnotesize]{subfig}     \usepackage{url}     \usepackage{amssymb}     \usepackage{amsmath}          \newcommand{\sH}{{\sf H}}     \newcommand{\veceps}{{\boldsymbol{\varepsilon}}}     \newcommand{\isdef}{\stackrel{\rm def}{=}}          \newtheorem{theorem}{Theorem}     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{corollary}[theorem]{Corollary}          \begin{document}          \title{title}          \author{\IEEEauthorblockN{Peter Pan}     \IEEEauthorblockA{Peter Pan Holding\\     who knows\\     Email: pp@pan.com}     \and     }          \maketitle          \begin{abstract}     %\boldmath     bla.     \end{abstract}          \IEEEpeerreviewmaketitle          \begin{figure}[!ht]         \subfloat[First sub-figure\label{subfig-1:dummy}]{%           \includegraphics[width=0.45\textwidth]{gfx/tau_enrollment-aging1-SRAM}         }         \hfill         \subfloat[First sub-figure\label{subfig-2:dummy}]{%           \includegraphics[width=0.45\textwidth]{gfx/tau_enrollment-aging1-SRAM}         }         \caption{Dummy figure}         \label{fig:dummy}     \end{figure}}               \bibliographystyle{IEEEtran}          \bibliography{references}          \end{document}


title: trouble with inputenc package

text: im having a hard time with TeXnicCenter 2.0 (with MikTex) on Windows 7. I set up a quite simple code. But the letters äüö seem to appear when they want to. I got a project file with another file bounded with `\input`. In both files I wrote some ö or ä to chek which package can deal with it. But apparently nither one can. Here is my code:               \documentclass[a4paper,11pt]{report}          \usepackage[ngerman]{babel}          \usepackage[T1]{fontenc}          %\usepackage[latin1]{inputenc}           %\usepackage[utf8]{inputenc}             %\usepackage[ansinew]{inputenc}          \begin{document}          \input{LaTeX1}          test ö               \end{document}      in the file LaTeX1.tex I just wrote `text ä` So if i use:               \usepackage[latin1]{inputenc}  -> no errors, but "test ö" is not shown     \usepackage[utf8]{inputenc}   ->  one error. no "ä" is not shown. "test ö" is shown correctly     \usepackage[ansinew]{inputenc} -> no errors. "text ä" is shown, "test ö": shown with stange signs      Im a LaTex beginner so please dont answer to complicated :) Thanks for your answers! Vicky


title: Changing math fonts for Greek letters

text: My QUESTION amounts to: is it possible to use `mathpazo` for everything, except for Greek math fonts in `euler`?


title: Guidelines for customizing biblatex styles

text: Suppose I've just made the switch to `biblatex`. I have chosen one of the built-in styles (`numeric`, `alphabetic`, `authoryear`, `authortitle`, `verbose`) or of the custom styles available at CTAN, and I've figured out how to sort/compress citations. The bibliography and the in-text-citations look approximately like I want, but need to be tweaked. I've taken a look at the `biblatex` documentation for advice, but it is somewhat daunting. How do I get started? To add some focus, customization in the following areas would come in handy:   * Suppressing of specific BibTeX fields (e.g., `publisher`);   * Formatting of fields for specific entry types (e.g., titles of articles not inside quotation marks);   * Formatting of citation postnotes (i.e., getting rid of "p."/"pp.");   * Spacing and punctuation in the bibliography (e.g., commas instead of periods as unit separators);   * Order of first names and last names of authors/editors in the bibliography;   * Order of certain fields in the bibliography (e.g., swapping `location` and `publisher`);   * Language-specific terms (e.g., replacing "References" with "Works Cited"). Finally, assuming that I'll want to use my style adjustments in a multitude of documents: Where do I put the relevant macro stuff?


title: What to do to switch to biblatex?

text: Because of the great answers posted around in the site, I'm finally considering to do the switch and move to `biblatex`. So, the question is what do I have to do? To give the question some focus, assume that I already have a somewhat largish `.bib` file and a bunch of documents using `natbib` for my references. What do I have to change in my existing `.bib` and `.tex` files? And what about coauthors? Would it be reasonably simple to instruct them how to work with the new documents using `biblatex`? Do they have to install new software/packages as well?


title: Biblatex guide?

text: > **Possible Duplicate:**   >  What to do to switch to biblatex? It seems like biblatex is the way of the future for handling references in latex. The biblatex documentation file is a massive 288 pages, and not an easy read for beginners. Are there any walk-through or general guides out there on how to use biblatex? I have not found any.


title: Citation styles

text: > **Possible Duplicate:**   >  What to do to switch to biblatex?   >  Guidelines for customizing biblatex styles I've been using Latex for a while now and I'm very happy with the results. However, there is one exception, namely bibliography. I often have to write papers for different institutions and every institute has its own citation critiria. So far I have tried natbib, jurabib and several others, but none of them could produce satisfying results. Therefore, I gave up after several days of frustration. What I do now is writing each footnote and every item in my bibliography by hand. Don't ask: it is timeconsuming and error-prone. This has worked so far, because I only had to write papers with 15 pages and 15-20 bibliography items. Now that I have to start writing larger papers, I wanted to revise Latexs capabilities. I have read that Biblatex is the new kid on the block. Can it solve my problems? How hard would it be to write my own citation style? After all, it is just a concatenation of strings, right? And if Biblatex is the solution for my problems: Can someome point me to a 'how to get started' tutorial? The manual seems to be too extensive.


title: Comments destroyed the equation's shape

text: I need to make some comments for every part of the equation. The result (the upper part of the figure) shown that the structure/shape/position of the equation is destroyed by the comments. Can some one plz help me to get something which is similar to the down part of the figure by some examples or updating/fixing my code. Cheers S.l. ![enter image description here](http://i.stack.imgur.com/Rz6Mz.jpg)               \begin{eqnarray*}     3.0 = x + y\\     1.5 = 2x - y\\     0.2 = x - y     \end{eqnarray*}     \begin{eqnarray*}     \underbrace {     \begin{bmatrix}     3.0 \\     1.5 \\     0.2      \end{bmatrix}     }_\text{Obs. Vector $\mathop L\limits_{n,1}$}     =     \underbrace{     \begin{bmatrix}     1 & 1\\     2 & -1\\     1 & -1     \end{bmatrix}     }_\text{\minibox{Matrix with coefficients of linear function model \\ Coefficient matrix or design matrix $\mathop A\limits_{n, \nu}$}}     \underbrace{     \begin{bmatrix}     x\\Y     \end{bmatrix}     }_\text{vector of unknown $\mathop X\limits_{\nu ,1}$}     \end{eqnarray*}


title: IEEEtran \title{ * } does not show

text: I'm practicing LaTeX with `IEEEtran.cls`. I'm am slowly filling in the information, but I am getting stuck from the beginning.               \documentclass[12pt, journal, compsoc]{IEEEtran}     \begin{document}          \title{ This is my practice document}     \author{Yui}          \begin{abstract}     Abstract content goes here.     \end{abstract}     \end{document}      From the above simple `.tex` file, after compilation in the PDF, I can see the Abstract content. However, I don't see either title or author.


title: bibliography author-year style, without hyperlinks

text: I an confused by the vast BibTeX bibliography styles available in LyX. I can't find the style that fits the requirements of my university. I currently use the "natbib" citation style, and the "plainnat" bibliography style. The citations in my document are author-year style (which is good), but the bibliographic entires containe full hyperlinks and DOI numbers (which is against my university policy). I tried to switch from "plainnat" to "plain" or to other styles in the LyX menu, but it appeared to be incompatible with the "author-year" style. How can I find the style that allows both author-year and removing the links?


title: Removing urls froms reference list in natbib

text: I'm using JabRef to manage my references, the `natbib` package and `jpe` bibliography style. When I use the `\bibliography{ }` command to generate the reference list, the urls of the documents cited also appear by default, but I dont want them to show. I'm not sure if its an issue with JabRef, `natbib`, or the bibliography style. Any idea of how to remove them?


title: Indent chapter titles in memoir

text: I am using `memoir` with `section` as chapter style. I want to indent chapter style to the right. Right now I have:               Chapter 1              Text of first paragraph (first line)     Text of first paragraph (rest of paragraph)      But I want:                   Chapter 1              Text of first paragraph (first line)     Text of first paragraph (rest of paragraph)      What parameter should I change? Edit: Here is MWE:               \documentclass[12pt,a4paper,oneside]{memoir}               \usepackage{indentfirst}     \parindent 1.25cm     \chapterstyle{section}     \secindent\parindent\relax          \renewcommand{\thechapter}{\arabic{chapter}.}     \renewcommand{\thesection}{\thechapter\arabic{section}}          \begin{document}          \chapter{Chapter}     \par     test test test test test          \section{Section}     \par     test test test test test          \end{document}      @Francis If I use your idea it works but for section title!


title: How put together rotated table and paragraphs in a same page in LATEX?

text: I use "rotating" package to rotate my table in LATEX. It rotates my table in a page lonely. I want to put paragraphs in right side of the rotated table. Is there any solution? my used code is:               \usepackage{rotating}          \begin{sidewaystable*}[!htbp]          \caption{...}          \begin{tabular}{ccc}          ..... data          \end{tabular}          \end{sidewaystable*}


title: Justified Itemized List

text: i would like to have a justified list, so that each item in the list is justified within a specified column. For example, if i had the list                1. Lorem ipsum dolor sit amet      2. cu sed laoreet debitis evertitur      it would format it so that it would be something like:                1.Lorem   ipsum  dolor  sit   amet      2.cu sed laoreet debitis evertitur      I'm currently just used the `\itemize` command.


title: Setting TEXINPUTS for pdflatex in Ubuntu

text: I have a set of files that are commonly used as inputs in my tex files, so I put them in a directory and set the path in the TEXINPUTS environment variable (in Ubuntu). This works fine when compiling files with the _latex_ command, but if I compile them with _pdftex_ , it gives the following error message:               ! I can't find file `{header.tex}'.     l.1 \input{header.tex}      As far as I can tell, _pdftex_ is completely ignoring the TEXINPUTS environment variable. Does it use a different environment variable? How can I get it to recognise a path?


title: Floats that span the text width and the margin

text: What is the correct way of placing floats that span the text width and the margin? If the width of the float content is increased, ConTeXt does not reserve space in the margin which leads to overlapping content. At the moment I adjust the vertical placement manually using `\godown`, but that can't be the right way.               \startplacefigure [location=margin]       \godown [7cm]       \externalfigure [dummy] [width=\marginwidth]     \stopplacefigure      Here the example code.               \useMPlibrary [dum]          \setupfloat       [figure]       [location=inner]          \showframe     \starttext          \startplacefigure       \externalfigure [dummy]         [height=4cm,          width=\dimexpr\textwidth+\rightmargintotal\relax]     \stopplacefigure          \startplacefigure [location=margin]       \externalfigure [dummy] [width=\marginwidth]     \stopplacefigure          \stoptext      ![result](http://i.stack.imgur.com/VBjcn.png)


title: Why should I buy a TeX/LaTeX guide book?

text: I am relatively new to TeX/LaTeX and so far learnt all about it using online documentation or question-and-answer websites like this one. Should I consider buying a LaTeX guide book though? What would be your advices for doing so?


title: How to set up psgraph to get the same output produced by pspicture plus psaxes?

text: In order to get a more balanced diagram (of a certain specified metric size, `width` times `height`), I usually also specify some offsets or adjustment values around the canvas (aka picture) and axes as follows. Note the annotations are added only to ease our discussion. ![enter image description here](http://i.stack.imgur.com/W2ele.png) `POT` and `AOT`, for example, stand for **P** icture **O** ffset (aka canvas offset) and **A** xes **O** ffset, respectively. Canvas size and all offsets are usually in centimeter. The following is my MWE. The annotation related codes have been removed for the sake of simplicity.               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-eucl,pstricks-add}     \usepackage[nomessages]{fp}     \newcommand\const[3][3]{%         \expandafter\FPeval\csname#2\endcsname{round(#3:#1)}%         \pstVerb{/#2 \csname#2\endcsname\space def}%     }          % User defined data:     \def\f(#1){2.5*cos(2*#1)}% function to plot          \const{Width}{8}% total width in cm     \const{Height}{7}% total height in cm           \const{POL}{-1.00}% pspicture left offset in cm     \const{POR}{ 0.75}% pspicture right offset in cm     \const{POB}{-1.00}% pspicture bottom offset in cm     \const{POT}{ 0.75}% pspicture top offset in cm          \const{AOL}{-0.50}% axis left offset in cm     \const{AOR}{ 0.75}% axis right offset in cm     \const{AOB}{-0.50}% axis bottom offset in cm     \const{AOT}{ 0.75}% axis top offset in cm          \const{DomL}{-2*pi}% domain left      \const{DomR}{pi}% domain right      \const{DomB}{-3}% domain bottom      \const{DomT}{ 3}% domain top          \const[0]{TrigLabelBase}{2}% denominator for a fraction of pi          % Internal used constants:     \const{XUnit}{(Width-POR+POL-AOR+AOL)/(DomR-DomL)}     \const{YUnit}{(Height-POT+POB-AOT+AOB)/(DomT-DomB)}          \const{PicL}{(POL+AOL)/XUnit+DomL}     \const{PicR}{(POR+AOR)/XUnit+DomR}     \const{PicB}{(POB+AOB)/YUnit+DomB}     \const{PicT}{(POT+AOT)/YUnit+DomT}          \const{AxiL}{AOL/XUnit+DomL}     \const{AxiR}{AOR/XUnit+DomR}     \const{AxiB}{AOB/YUnit+DomB}     \const{AxiT}{AOT/YUnit+DomT}          \const{DeltaX}{pi/TrigLabelBase}          \psset{xunit=\XUnit,yunit=\YUnit,algebraic,plotpoints=500}               \begin{document}     \begin{pspicture}(\PicL,\PicB)(\PicR,\PicT)         \psplot[linecolor=blue]{\DomL}{\DomR}{\f(x)}         \psaxes         [             trigLabels=true,             linecolor=gray,             labelFontSize=\scriptscriptstyle,             tickcolor=gray,             ticksize=-1.5pt 1.5pt,             xlabelsep=3pt,             arrowscale=1,             trigLabelBase=\TrigLabelBase,             dx=\DeltaX,% must come before xunit to avoid getting a strange output!           ]{->}(0,0)(\AxiL,\AxiB)(\AxiR,\AxiT)[$x$,0][$y$,90]     \end{pspicture}     \end{document}      Now I know that `psgraph` can do scaling automatically based on the specified metric size (in centimeter, e.g.) of canvas on which graphs and axes are drawn. The problem is how to setup the `psgraph` to get the same result as what I already got above with `pspicture` and `psaxes`? `psgraph` seems to be a promising syntactical sugar that can reduce more keystrokes!


title: Included PDF as first page creates empty page before it

text: For my thesis I have to use a specific first page, which is only available as Word. I filled it and saved it as PDF and included it with my thesis with               \includepdf[pages=-,templatesize={145mm}{210mm},noautoscale=true,offset=-20 -190]{Frontpage.pdf}      The problem which occurs is that I have an empty first page befor the wanted first page. On Google I found solutions like How to include PDF pages without a newpage before the first page? But even with something like "pagecommand={\section{Frontpage}\thispagestyle{empty}}" the only result is, that I have another entry in my table of contents. How can I make this thing work? Antoher solution which would work for me would be a Word to LaTeX converter which converts the Word Document as it is. Everthing I found in this direction had problems with positions and graphics of the Word Document. **Edit** : I found out, that the problem is because of my used documentclass. For my thesis I use this one:     * Thesis.xls http://pastebin.com/yavTC0mu   * Example: http://pastebin.com/fyRKADmf   * Result: http://files.liebich.co/test_Thesis.pdf The Result with this looks like this: With documentclass book it is working correct:   * Example: http://pastebin.com/VC9TCFve   * Result: http://files.liebich.co/test_Book.pdf Greetings   Sören


title: How do I stop a table where the margin falls, rather than using the textwidth command?

text: I've been having some problems with nesting tables in the tabularx environment. Basically, I would like each table to stop at the margin. Ordinarily, I would achieve this with `\textwidth` as the width setting, however, when I nest tables, because each tabularx adds white space before and after the table (and I don't want to just delete the white space), the text "overflows". Here is a MWE:               \documentclass{article}     \usepackage[letterpaper,margin=2in]{geometry}     \usepackage{tabularx}          \begin{document}     \noindent     Here is a bunch of text to demonstrate where the margin naturally falls. Note that the vertical lines around the tables show where each level has it's ``break''.          \noindent     \begin{tabularx}{\textwidth}{X|}     This is the first level of the nested tables. It roughly goes to where the margin is, which is good.\\     {\begin{tabularx}{\textwidth}{X|}     This is where the second level of the nested tables is. Unfortunately, it goes ``too far'' before the text wraps around.     {\begin{tabularx}{\textwidth}{X|}     And here is the third level. As can be seen, the problem gets worse and worse with each level.     \end{tabularx}}     \end{tabularx}}     \end{tabularx}     \end{document}      Basically I would like something that tells tabularx to wrap each line at the margin. Anyone know how to do this? Edit: Solved the initial problem (Thanks, Werner!) but then realized that using \linewidth doesn't account for space added before the tabularx. MWE:               \documentclass{article}     \usepackage[letterpaper,margin=2in]{geometry}% http://ctan.org/pkg/geometry     \usepackage{tabularx}% http://ctan.org/pkg/tabularx          \begin{document}     \noindent     Here is a bunch of text to demonstrate where the margin naturally falls. Note that the vertical lines around the tables show where each level has it's ``break''.          \bigskip          \noindent     \begin{tabularx}{\textwidth}{X|}     This is the first level of the nested tables. It roughly goes to where the margin is, which is good. \\     {\begin{tabularx}{\textwidth}{X|}     This is where the second level of the nested tables is. Unfortunately, it goes ``too far'' before the text wraps around. \\     {\begin{tabularx}{\textwidth}{X|}     And here is the third level. As can be seen, the problem gets worse and worse with each level.     \end{tabularx}}     \end{tabularx}}     \end{tabularx}          \bigskip          \noindent     \begin{tabularx}{\linewidth}{X|}     This is the first level of the nested tables. It roughly goes to where the margin is, which is good. \\     {\begin{tabularx}{\linewidth}{X|}     This is where the second level of the nested tables is. Unfortunately, it goes ``too far'' before the text wraps around. \\     {\begin{tabularx}{\linewidth}{X|}     And here is the third level. As can be seen, the problem gets worse and worse with each level.     \end{tabularx}}     \end{tabularx}}     \end{tabularx}          \vspace{1em}     The second set of nested tables seems to work great, but then it runs into problems when I add space before the nested tables, which I would like to be able to do.     \vspace{1em}          \hspace{30pt}     \begin{tabularx}{\linewidth}{X|}     This is the first level of the nested tables. It roughly goes to where the margin is, which is good. \\     {\begin{tabularx}{\linewidth}{X|}     This is where the second level of the nested tables is. Unfortunately, it goes ``too far'' before the text wraps around. \\     {\begin{tabularx}{\linewidth}{X|}     And here is the third level. As can be seen, the problem gets worse and worse with each level.     \end{tabularx}}     \end{tabularx}}     \end{tabularx}          \end{document}      Anyone know how to fix this?


title: How to shorten first name in a .bib list?

text: I have a .bib file which is a mix (due to historical reason) of several styles of brevity (I am sure I am not the first to have this problem). One thing which I find quite annoying is that some entries have just the first letter of the first name and others have full first name. Is there a way to shorten the first name, through the .tex bib command, so that the lowest common denominator is chosen among all these entries (i.e. always first letter of first name)? I do wish there was a way to actually expand the first names appropriately, but that is of course somewhat of a SciFi...


title: How to make self style enumerate list?

text: I would like to have a list like this:               a) Aha     b) Bla     Look at a) and b).      I write some code like this               \documentclass{article}          \renewcommand{\theenumi}{\alph{enumi}}     \renewcommand{\labelenumi}{\theenumi)}     %\makeatletter     %\renewcommand{\p@enumi}{\theenumi)}     %\makeatother     \usepackage{hyperref}     \begin{document}     \begin{enumerate}       \item \label{item:1} Aha       \item \label{item:2} Bla     \end{enumerate}     Look at~\ref{item:1} and~\ref{item:2}.     \end{document}      It works fine except the printed ref is not correct. I have tried the commented code, however it does not work.


title: Why are my margins ignored?

text: Based on this code, I added a title but now I face the problem that the margins are ignored when I use book or scrbook with the twoside option.               \documentclass[a4paper,12pt,twoside]{book}               \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage{multicol}     \setlength{\columnsep}{-2pt}          \usepackage{tikz}     \usepackage[framemethod=tikz]{mdframed}               \tikzset{titregris/.style = {draw=gray, thick, fill=white, text=black, rectangle, rounded corners, right, minimum height=.7cm}}          \makeatletter     \mdfdefinestyle{exercisestyle}{%       outerlinewidth=1em,outerlinecolor=white,%       leftmargin=-1em,rightmargin=-1em,%       middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray,       backgroundcolor=black!10,       skipabove={0.2pt},       innertopmargin=\baselineskip,       needspace=3\baselineskip,       frametitlefont=\sffamily\bfseries,       singleextra={%           \node[titregris,xshift=1cm] at (P-|O) %              {~\mdf@frametitlefont{Text}\hbox{~}};        },       firstextra={%           \node[titregris,xshift=1cm] at (P-|O) %              {~\mdf@frametitlefont{Test}\hbox{~}};        },     }     \makeatother                    \makeatletter     \let\old@page@sofar\page@sofar     \let\old@box\box     \let\old@rlap\rlap     \def\page@sofar{%     \let\box\colorcolumn     \def\rlap{\let\box\old@box\old@rlap}%     \old@page@sofar     }     \def\colorcolumn#1{%     \ifnum#1=\mult@rightbox     \def\zz{\begin{mdframed}[skipabove={11.5pt},innertopmargin=\baselineskip,linecolor=gray,middlelinewidth=1.2pt,roundcorner=5pt,leftline=false,backgroundcolor=black!10]}%     \fi     \ifnum#1=\numexpr\mult@rightbox+2\relax      \def\zz{\begin{mdframed}[style=exercisestyle, rightline=false]}%     \fi     \ifnum#1=\numexpr\mult@rightbox+4\relax       \def\zz{\begin{mdframed}[skipabove={11.5pt},innertopmargin=\baselineskip,linecolor=gray,middlelinewidth=1.2pt,rightline=false,leftline=false,backgroundcolor=black!10]}%     \fi            \kern\dimexpr-15pt\relax             {\let\box\old@box\vtop{%               \zz{%                \hbox{\box#1\llap{\phantom p}}}%                \end{mdframed}}}%             \kern\dimexpr-15pt\relax     }          \makeatother          \begin{document}     \begin{multicols}{2}     \blindtext\blindtext     \end{multicols}          \begin{multicols}{2}     \blindtext\blindtext\blindtext\blindtext     \end{multicols}          \end{document}      What's going wrong here or better what does I need to do to make it working?


title: Synonyms for \bfseries and \itshape and such?

text: Seeing as it is quite confusing for non-TeX expert to know how to specify _italic_ or _bold_ font, and the names such as `\bfseries` are not straightforward... Is there a package that defines synonyms like `\bold` and `\italic`, so one can just do:               {\bold\italic My text}      If not - why? Just curious.


title: Possible incompatibility between biblatex and hyperref's pdfmark?

text: I am trying to use `biblatex`'s `\citetitle` inside a `\pdfmark` so that the title of a citation pops up as a tooltip in PDFs. Code looks like this:               %% A tooltip macro using pdfmark          \newcounter{tooltip}     % Creates a tooltip text.     %  arg #1 : the text to display     %  arg #2 : the text to show in the tooltip     \newcommand\tooltip[2]{%       \pdfmark[#1]{%         pdfmark=/ANN,%         Subtype=/Widget,%         Raw={%           /TU (#2)/T (tooltip \thetooltip)%           /FT/Btn/Ff 65536/H/N%         }%       }\protect\addtocounter{tooltip}{1}%     }      Now I can use the tooltip macro with regular text and with commands I create, for example:               % will show "some text" with "tooltip text" as tooltip on mouseover     \tooltip{some text}{tooltip text}           % will show "Tooltip tooltip" as tooltip     \newcommand{\test}[1]{Tooltip #1}     \tooltip{some text}{\test{tooltip}}      However, if I use `\citetitle`, it does not expand:               % will show "\citetitle{key}" as tooltip     \tooltip{some text}{\citetitle{key}}      I tried adding some `\expandafter` at some places to no avail. Also, inside my tooltip macro `\citetitle` gets expanded (e.g., if I use `#2` outside `\pdfmark`). It seems that only inside the RAW argument it does not get expanded. On the other hand, my simple command gets expanded also in the RAW. Since I do not know much about TeX, I was not able to debug the problem further, but it seems like some incompatibility between RAW and the way `biblatex` defines its macros. Any help?


title: Compiling from within any file in a project in WinEdt

text: I have a `*.tex` file open in `WinEdt` which `input`s a few other `.tex` files. Previously, I was able to compile my files by hitting `F9` from within any of the files in the Tree panel. But now after any change, I have to go to the main file (at the top of the Tree) and compile from there, which is a bit cumbersome. Any ideas how I can get WinEdt (version 8.0) to compile from anywhere by hitting `F9`?


title: Place the sender address on the left side in moderncv cover letter

text: In Germany it's common to place both the sender and recipient on the left side of a letter and the date on the right side. Is there a possibility that I can change the cover letter layout accordingly?               \recipient{Stack Overflow GmbH}{Stack Überflut Straße-71234-Codehausen}          \date{04 Oktober 2013}     \opening{Sehr geehrte Frau XYZ,}     \closing{Mit freundlichen Grüßen}     \makelettertitle          bla bla bla blu blu blu          \makeletterclosing      So that my address appears over the recipient address on the left side?


title: How to make \section start automatically in new page, except first in a chapter

text: I am working in `report` class. I would like to redefine `\section` so that it starts on a new page, except for the first section in every chapter. It seems I should just put code from this answer Start new page with each section together with some conditional like `\if not firstsection then...` but I do not know how to do that properly. Any help is very appreciated.


title: Are there efforts to develop a standard for (La)TeX-like math syntax?

text: One of the reasons many people in technical disciplines start using LaTeX in the first place is for the ease of typesetting mathematical formulas with it. In some circles, LaTeX-like syntax has become a de facto language for communicating math formulas in emails and other electronic communication. In the past few years, there have been several efforts to implement non-TeX based intepreters for this "language." The most notable of these is probably MathJax (and its predecessor jsMath), but there are others; for instance, WordPress has a system for including math using TeX-like syntax. Although there are a number of different interpreters for this "markup language" of TeX-style mathematics, there does not seem to be any standard for what such an interpreter should be able to do. Certainly it should not be required to provide the full functionality of (La)TeX, since this would be incompatible with settings such as Markdown and HTML. The lack of a standard seems likely to result in a number of different variations on TeX-like syntax that all vary in important details. On the other hand, if there were a standard, then it might be possible for browsers to start providing native implementations that run faster and produce higher-quality results. **Have there been any efforts to develop a standard for "TeX-like syntax" as a mathematics markup language?**


title: Rename existing Latex commands

text: I have to merge two repository where each one contains a lot of LaTeX files. Each repository contains a lot of macros files. Some macros are shared between the repositories. However, in these shared macros, some don't display the same thing. Since there are a lot of files, I'd like to know if there is an easy way to rename conflicted macros without doing some ugly search-replace. For the same reason, the solution listed here would be very time-consuming, so I'd like to avoid it.


title: How do I resize the text of bibliography entries without changing the heading (with BibTeX)?

text: I'm using BibTeX to create my bibliography with the final command               \bibliographystyle{mn2e}     \bibligraphy{biblio}      I'd like the entries to be `footnotesize` so I use               {\footnotesize     \bibliographystyle{mn2e}     \bibligraphy{biblio}}      but this also resizes the heading "Bibliography". How do I resize the text but not the heading? I realize one workaround is to compile the bibliography with BibTeX and put the `\footnotesize` command in the `bibliography` block. But can I automate this?


title: How can I set the inner margins of a Beamer block?

text: I've worked myself into a rut. A very, _very_ hacky, plain-TeX-y rut. I'm creating a poster with `beamerposter`. Content is split logically into `block` environments, and customization is done through the hooks beamer provides (`\addtobeamertemplate`). That's where the LaTeX ends. Here is my code:               \documentclass{beamer}          \usepackage[english]{babel}     \usepackage[orientation=portrait,size=a0]{beamerposter}     \mode<presentation>{%       \usetheme{Frankfurt}%     }          \title[short]{Looonnger!!}     \author{me}     \institute{grubby}     \date{\today}          % needed to stretch out title box cleanly, but likely the root of my problem     \setbeamersize{text margin left = -5pt, text margin right = -5pt}          \addtobeamertemplate{block begin}       {}       {\vspace{1ex plus 0.5ex minus 0.5ex} % Pads top of block          % separates paragraphs in a block        \setlength{\parskip}{24pt plus 1pt minus 1pt}        \addtolength{\leftskip}{1em}   %%% awful hack for left/right padding        \addtolength{\rightskip}{1em}} %%% that doesn't even work right     \addtobeamertemplate{block end}       {\vspace{2ex plus 0.5ex minus 0.5ex}}% Pads bottom of block       {\vspace{10ex plus 1ex minus 1ex}} % Seperates blocks from each other          \addtobeamertemplate{description item}       {\hspace{2em}} % trying to compensate for the awful hack       {}          \usepackage{mwe}          \begin{document}     \begin{frame}[t]{}       \vspace{-8pt}       \begin{beamercolorbox}{}         \maketitle       \end{beamercolorbox}       \vspace{10ex}            \begin{block}{Block A}         \lipsum              \begin{description}[longest label]         \item[short] Short stuff         \item[long] Longer stuff         \item[longest label] Longest stuff (insert cat)         \end{description}               \begin{itemize}          \item I'd like to change the margins here, as well.          \item The macros \texttt{\textbackslash leftskip} and friends            don't work very well for environment-heavy \LaTeX{} document            classes such as \texttt{beamer}          \item Also, for some reason, using \texttt{\textbackslash verb}            kills \emph{everthing}.          \end{itemize}         \end{block}     \end{frame}     \end{document}      and what it produces:   ![hack](http://i.stack.imgur.com/blMfc.png) Note that the bullets/balls for the `itemize` environment are flush with the left margin. Description environment would do the same thing if it weren't for the explicit customization. All text also goes way too close to either side; amenable through `\leftskip` but not `\rightskip`. It's an absolute mess. My immediate goal is to be able to set the right margin so text doesn't go to close. My 'better' goal is to set inner padding for block contents so that I won't have to set the margins for each environment individually, which will quickly get out of hand. And finally, as I said in a comment in the code, I believe the root of my problem is how I stretch out the title to give it a cleaner look (not just a colored block on a white background), but I'm pretty sure that'd be a separate question. * * * _From the comments:_   Briefly, I was aiming for (nothing special) a title whose color spans the entire top of the page and content in blocks where the content is padded by about 2 or 3em to taste.


title: Put all package options into one command

text: The title might not be perfect, but what I want to achieve is: Inside my own package `mypackage.sty`, I would like to have a command, say `\allpackageoptions`, which should have stored the entire package option string. Like this: ## Example Code Document (`mydocument.tex`):               \usepackage[Lorem Ipsum Dolor]{mypackage}      Package (`mypackage.sty`):               [...]     \allpackageoptions % shoud output 'Lorem Ipsum Dolor'     [...]      ## Background What I would like to achieve with this is to write a small package that simplifies the use of svn keywords. (I know there are some packages out there, but I want something really tiny and simple). SVN can automatically insert a string containing version information whereever I want whenever I commit the file. Look at this:               \documentclass{article}          \def\svn $Id: #1 #2 #3-#4-#5 #6${%         This file is revision r#2.     }          \begin{document}          \svn $Id: somefile.tex 259 2013-04-20 13:22:00Z ralfix $         %This string inside $$ is automatically updated by SVN          \end{document}      The output of this example code is obviously `This file is revision r259`. My package would provide this interface:               \usepackage[$Id: somefile.tex 259 2013-04-20 13:22:00Z ralfix $]{mysvn}      and should provide a command `\svnrevision` which outputs `259`.


title: Font size of \url in footnote

text: I use this `\renewcommand{\UrlFont}{\normalsize}` for make the fontsize smaller. I will like to make somthing similar for making only the `\url` smaller and only when it is used in a footnote. Text in `\url` when it is placed in a footnote need to have the same fontsize as the the rest of the footnote. **MWE:**               \documentclass[a4paper,11pt]{memoir}     \usepackage{url}     \usepackage{hyperref}     \usepackage[svgnames]{xcolor}     \hypersetup{       colorlinks,       urlcolor=Blue}          \renewcommand{\UrlFont}{\normalsize}          \begin{document}          Text Text Text Text Text\footnote{WWW: \url{http://www.google.com/}}     Text Text Text Text Text Text Text\footnote{Homepage: \url{Homepage}}  Text Text Text Text Text Text TextText Text Text Text Text Text TextText Text Text Text Text Text Text \url{Text}          \end{document}


title: Problem with \usepackage{glossaries}

text: \documentclass{report}     \usepackage{datatool}     \usepackage{glossaries}          \makeglossaries     \begin{document}     \chapter{Hello}     \section{First Section}      Hello World     \newglossaryentry{electrolyte}{name=electrolyte,     description={solution able to conduct electric current}}     \printglossaries     \end{document}      For the following example it will generate the following error ![enter image description here](http://i.stack.imgur.com/KdaTX.jpg) I suspect that the package didn't install properly, but I could not find anywhere in TexNicCenter to reinstall package. Anyone know how I can fix this problem? **UPDATE 1** I found where I could uninstall the package. The problem wasn't with the install of the package though. I still need help to fix this problem! **UPDATE 2** It compiles now, but the glossary page is not generated. Anyone that could help with it?


title: How to split slide in Beamer table of contents page?

text: I created a standard table of contents page in Beamer               \AtBeginSubsection[] {         \begin{frame}{Outline}             \tableofcontents[currentsection,currentsubsection]         \end{frame} }      I have a lot of sections and this leads to the contents being cut out. How can I split the page in two (something like `minipage`) or in the worst case continue in the next slide ?


Is it possible to use `lualatex`'s DVI output with `fontspec` without getting font-related errors? I want to use the (eps-based) output of `sagetex` with a `lualatex` generated document with `fontspec`. As `sagetex` uses eps graphics, the only way I can use it in a document is if I use `lualatex`'s DVI output. As I **also** want to use `fontspec` with it (to load Helvetica and use that as the font for text in my document), can I get lualatex to produce DVI output that is compatible with `fontspec`.


title: rectangles in beamer background canvas

text: I am trying to create a custom title page in Beamer, and I've tried many things, but I'm just helpless with all the solutions I found. I would like to create only in the title page, the following structure: A wide rectangle on top (from side to side) with blue color (width=slidewidth, hight 3 cm), then should come my presentation text and other info, and in the bottom I wan to put the same rectangle ... (width=slidewidth, hight 3 cm). I would like the rectangle to be part of the canvas, so I could insert the institute logo overlaid above the bottom rectangle. Any help would be appreciated. Oz UPDATE: I managed to insert the fancy rectangels, but they are inside the text space, and I can't put them yet inside the footer and headers ... here is what I did:                \setbeamertemplate{title page}        {        \begin{beamercolorbox}[ht=2cm,wd=\paperwidth]{title in head/foot}        \usebeamerfont{title in head/foot}     % {\centering \hskip3.5cm \includegraphics[scale=0.15]{FZD_LOGO.png}}     % \vskip1.25cm     \end{beamercolorbox}%            \centering{         {         \usebeamerfont{title}\usebeamercolor[fg]{title}         \inserttitle         }          }     %     \vskip5cm     \vskip1.cm     \begin{beamercolorbox}[ht=2cm,wd=\paperwidth]{title in head/foot}     \usebeamerfont{title in head/foot}     {\centering \hskip3.5cm \includegraphics[scale=0.15]{FZD_LOGO.png}}     \end{beamercolorbox}%     % \end{minipage}     }      Sample output: ![sample output](http://i.stack.imgur.com/a2qtO.png)


title: New figure environment

text: I am writing my PhD thesis. In my manuscript I have Figures in the text and Photographic plates (a figure of figures) in the annexes. The two elements are different and I would like create a new environment of Plate that follows the same structure of the Figure environment. Where can I find the Figure environment to modify it? The new environment table should have exactly the same structure than the figure environment but replacing the word figure by the word Planche (in French).