title: How to display a number with many decimals and year correctly

text: I have a table in "import_csv_2.csv" as follows:               No. Year    W(G)     1   2010    0.02110333     2   2008    0.02082747     3   2006    0.02037291     ...               \pgfplotstabletypeset[         col sep=comma,     columns/Subject/.style={string type},      %   columns/Math/.style={string type},     %   columns/Lit/.style={string type},         %draw the line among head rows          every head row/.style={             before row = \toprule,             after row = \midrule         },         every last row/.style={after row=\bottomrule}     ]{import_csv_2.csv}      After I compiled, I got the "Year" displays as "number" (for e.g : 2010 displays as 2,010). And my 3rd column display with scientific notation (for e.g : 0.02110333 displays as 2.11*10-2). How can I tell Latex display my tables exactly as same as it looks like in my .csv format? Thanks in advance.


title: Error with struktex making a Case

text: I am writing a document with TeX using TexLive (Ubuntu), I already installed `struktex`, it works fine with `if` and `assing`, but when i try to make a `case` statement throw an error. This is the code:               \documentclass[a4paper,11pt,spanish]{book}          \usepackage{babel}     \usepackage[latin1]{inputenc}          \usepackage[margin=0.75in]{geometry}     \usepackage{courier}     \usepackage{xcolor}     \usepackage{listings}          \usepackage{struktex}          \begin{document}          \begin{struktogramm}(95,30)         \case[10]{4}{3}{Signum(x)}{-1}             \assign{\(a \gets - \frac{1}{x}\)}         \switch{0}             \assign{Output: Division by 0}         \switch{1}             \assign{\(a \gets \frac{1}{x}\)}         \caseend     \end{struktogramm}          \end{document}      And the errors: > >     ./TestCase.tex:23:Argument of \language@active@arg~ has an extra } > \switch{0} >     ./TestCase.tex:23:Paragraph ended before \language@active@arg~ was > complete \switch{0} >     ./TestCase.tex:25:Argument of \language@active@arg~ has an extra } > \switch{1} >     ./TestCase.tex:25:Paragraph ended before \language@active@arg~ was > complete \switch{1} >


title: Equations with several identities

text: I want to write a simple single line equation of this kind: `a = b + c = d + e + f`. However, when I try to add the second identity ( = ), everything on its right side does not appear in the results. Following a piece of code here I used the `&=` for either the second identity or both the first and the second. Still I am doing something wrong. Here follows the code I am trying to use               \begin{equation}     \hat{{\varphi}_{it} (i_{it}, k_{it})} &= \hat{y_{it}} - \hat{{\beta}_{l}} l_{it} - \hat{{\vartheta}_{1}} X_{it} - \hat{{\vartheta}_{2}} Z_{it} &= \hat{{delta_{0}} + \sum{\sum{{\delta}_{ij} k_{t}^{i} i_{t}^{j}}} - \hat{{\beta}_{l}}l_{it} - \hat{{\vartheta}_{1}} X_{it} - \hat{{\vartheta}_{2}} Z_{it}     \end{equation}      I get the 3 following error messages exactly, attributed to the line after the command `\end{equation}`:                Paragraph ended before \mathaccent\/ was complete      Missing $ inserted      Display math should end with $$


title: Getting arguments underneath \min in an align environment

text: I am wondering how can I ensure that an argument gets placed underneath \min when I use an align environment. When I use math mode and write               \[     min_{x_1,\dots x_T}      \]      the `{x_1,\dots x_T}` is placed directly underneath min. However when I use an align environment and write               \begin{align*}       min_{x_1\dots x_T}      \end{align*}      the `{x_1,\dots x_T}` is placed to the bottom left of `\min`.


title: Revert (reverse) \numberwithin effect

text: How can I revert the action of `\numberwithin{mycounter}{section}` so that `mycounter` does not reset with a new section? **Example:** (This is not exactly my case but this is easy to understand.) I would like to have `equation` numbered within a section in the first part of the document, so I use `\numberwithin{equation}{section}`. But in the next part to number it directly. Like               Section 1       equation (1.1)       equation (1.2)     Section 2       equation (2.1)       equation (2.2)       equation (2.3)     \SomeCommandToPutHere{equation}     Section 3       equation (1)       equation (2)       equation (3)


title: List of publications by specific author

text: I want to be able to process my CV LaTeX file and know that it has a nice list of all of my publications. I keep my global `.bib` file updated with all sorts of publications I'm interested in, and my own publications. I don't want to manually insert my publications into my `.bib` file AND to my CV LaTeX file. How can I **automatically** create a publication list for a certain author? Ideally I'd use `\cite{author=my_name}` and have all of my publications.


title: How do I switch page styles with scrpage2?

text: I want to use two different footers with `scrpage2`: one with no `\pagemark` (page number) on the first page; and then one that includes a `\pagemark` on all following pages. How do I perform the switch between the two page styles? What I have below renders the first page footer correctly, but the rest are blank. I feel like this is more a general LaTeX header question than KOMA, as I found the KOMA documentation unclear on this question.               \documentclass[11pt,letterpaper]{scrartcl}          %%% Load metadata          \usepackage{myinfo} % \myauthor, \mytitle, and others come from here          %%% Select typefaces          \usepackage{fontspec}      \usepackage{xunicode}     \usepackage{xltxtra}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont [Ligatures={Common},Numbers={OldStyle}]{Linux Libertine O}     \setsansfont{Linux Biolinum O}     \setmonofont[Scale=0.8]{Inconsolata}          %%% Define header and footer with scrpage2          \usepackage{scrpage2}     \setkomafont{pagehead}{\footnotesize\scshape}     \clearscrheadfoot     \ofoot[\MakeLowercase{\myauthor · Curriculum Vitae} · \pagemark]{\MakeLowercase{Curriculum Vitae · Last updated \today}}          %%% Define section headings          \setkomafont{section}{\normalfont\Large\sffamily}      \setkomafont{subsection}{\normalfont\normalsize\scshape}          %%% Custom hanging indent for items in C.V.          \newenvironment{cvdatum}         {\noindent\par\leftskip=1em \parindent=-\leftskip}         {\par}          %%% Define PDF metadata          \usepackage[xetex, bookmarks, colorlinks, breaklinks, pdftitle={\myauthor’s \mytitle}, pdfauthor={\myauthor}]{hyperref}       \hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=blue}          \begin{document}          \thispagestyle{scrheadings}          \section*{Education}          \begin{cvdatum}        blah     \end{cvdatum}          \section*{Publications}          \begin{cvdatum}       blah     \end{cvdatum}          \pagestyle{plain}          \section*{Works in progress}          \end{document}


title: Draw an arc over 360 degrees

text: I have the following problem with tikz: I want to draw some circular arcs, but unfortunately these arcs have degrees which pass the 360° line. I would like to be able to draw these arcs with one single command, but I can't figure out how to do it. If I give the arc commands two angles where the first is larger than the second, tikz will simply interchange the angles before drawing them.               % radius, two angles, node attribute/name     \newcommand{\drawarc}[5]     {     \draw[gray, very thin] (0,0) --  (#2:#1);     \draw (#2:#1) arc(#2:#3:#1);     \draw[gray, very thin] (0,0) --  (#3:#1);     \draw({(#2+#3)/2}:#1) node[#4] {#5};     }          \begin{tikzpicture}[scale=4]          \drawarc{1cm}{80}{100}{above}{1};          \drawarc{0.9cm}{60}{110}{below}{2};          \drawarc{0.75cm}{20}{85}{below left}{4};          \drawarc{0.8cm}{95}{150}{below right}{3};          \drawarc{1cm}{105}{200}{above}{5};          % I would like to replace these 2 commands     % by one, drawing an arc from 195 to 75 degrees     \drawarc{1.2cm}{195}{360}{above}{6};     \drawarc{1.2cm}{0}{75}{}{};          \drawarc{1.3cm}{160}{280}{left}{8};          \drawarc{0.9cm}{140}{190}{right}{7};          % and the same here     \drawarc{1cm}{260}{360}{above left}{9};     \drawarc{1cm}{0}{40}{}{};     \end{tikzpicture}      I am bounding every arc by lines from/to (0,0), so if I draw multiple arcs where I only need one, the additional lines look somewhat crappy.


title: Numbered mdframed environment but without using theorem hacks

text: I'm trying to make an mdframed environment for numbered multi-page boxes. The problem I'm having is that I can't seem to make the formatting and the numbering work as I want it to. I've tried the following two approaches. ## mdtheorem The following code gives me the correct labelling behaviour, but I can't use the mdfdefinestyle frametitle commands to make a nice shaded box like in this example. Even worse, it won't split the box over multiple pages!               %% Define box environment as a mock theorem     % Give the box style     \mdfdefinestyle{boxstyle}{%         linewidth=2pt,%         innertopmargin=\topskip     }          % Define the theorem style with amsthm     \newtheoremstyle{box}% <name>     {3pt}% <Space above>     {3pt}% <Space below>     {}% <Body font>     {}% <Indent amount>     {\bfseries}% <Theorem head font>     {\\}% <Punctuation after theorem head>     {.5em}% <Space after theorem headi>     {#1 #2: #3}% <Theorem head spec (can be left empty, meaning `normal')>          % Define the new environment     \theoremstyle{box}     \mdtheorem[style=boxstyle]{infobox}{Box}[chapter]               % Example usage:      %  - xrefs works as expected     %  - formatting not ideal     %  - box won't break across multiple pages     Box~\ref{box:mybox}     \begin{infobox}[Box title]     blah blah     \end{infobox}      ## newmdenv Alternatively if I try to define a newmdenv, the numbering doesn't want to work and I can't get the label in the right place. I can't post images but I basically get the counter on Box 1.0 and the xref on Box 1.1, and the "Box 1.0" part is outside of the frame.               \documentclass{book}     \usepackage{xcolor}     \usepackage{mdframed}     \usepackage{blindtext}     \usepackage{color}          %% set the counter for your environment     \newcounter{infobox}[chapter]     \renewcommand{\theinfobox}{\thechapter.\arabic{infobox}}          %% define the style     \mdfdefinestyle{boxstyle}{%         linewidth=2pt,%         frametitlerule=true,%         frametitlebackgroundcolor=gray!20,%         innertopmargin=\topskip,     }          %% setup the environments     \newmdenv[%         style=boxstyle,%         settings={\global\refstepcounter{infobox}},%         frametitlefont={\bfseries Box~\theinfobox\quad},%     ]{infobox}          \begin{document}     \chapter{Section One}     Box~\ref{box:infobox} but compare with \theinfobox     \begin{infobox}[frametitle=Some Headlinetext]     \label{box:infobox}         \blindtext     \end{infobox}          \end{document}      It seems like I should be able to do this with some version of the second template. After all, a framed box isn't a theorem.


title: Define my own short-verb like macro?

text: I'm trying to define shorthand macros for `\texttt` that are a bit like the `\verb` ones. The end result is to do `+asdf+` and this have the same effect as `\texttt{asdf}`. This is like the `DefineShortVerb` command in the `fancyvrb` package, but instead of verbatim I want `texttt` as the underlying command. First, I can obtain a macro like `\ttt+asdf+` via the `xparse` package:               \documentclass[a4paper]{article}     \usepackage{xparse}     % want \ttt[delimiter]#1[delimiter] for \texttt{#1}:     \NewDocumentCommand\ttt{v}{%         \texttt{#1}%     }     \begin{document}     \ttt+asdf+     \end{document}      This works. Is there some way to take the next step and use `[delimiter]asdf[delimiter]` to mean `\texttt{asdf}`? For example, if I were using `fancyvrb` I'd use `DefineShortVerb`:               \documentclass[a4paper]{article}     \usepackage{fancyvrb}     \DefineShortVerb{\+}     \begin{document}     +asdf+ % typesets a verbatim 'asdf'     \end{document}      My question is: **Is there any way I can emulate this behaviour but using`\texttt` as the base command as opposed to `\verb`?**. It doesn't have to be as sophisticated as providing a `DefineShortVerb` macro; I'd just like the `[delmiter]text[delimiter]` functionality. (Another way to go about it - is there some way I can override a `fancyvrb` command to use `\texttt` instead of `\verb` as the base command?) cheers.


title: A table with square cells

text: A friend is trying to make some auto-generated bingo boards, and LaTeX seems like an obvious choice - nothing fancy, just a 5x5 table with square cells, centered text, and line wrapping if necessary. After some searching, I'm at a bit of a loss on setting the vertical height of cells, though. How can I do this? Given the length of the terms to put in the squares (e.g. "Speech Language Pathologist") I don't think it's reasonable to go for anything but a full sheet of letter paper. (They'll be printed, special paper would be a pain, and two on a sheet is pretty small for that.) Otherwise there aren't really any hard formatting requirements - a legible size, and might as well fill the page as long as you've got it. I'm sure I can adjust details, in any case.


title: Modify the legend-style in pgfplots

text: I have a question concerning `pgfplots`. I made a minimal example which is related to the example in the `pgfplots` manual (page 182):               \documentclass{standalone}          \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[legend image post style={mark=*}]          \addplot+[mark=*, color=blue, very thin, only marks, mark size=0.8pt]{-x*(x-2)};     \addlegendentry{Measurment}     \end{axis}     \end{tikzpicture}          \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/v1HBW.png) I want to modify the symbol of the legend (here: {mark=*}) in such a way, that I have a line in the legend. Have a look on this example:               \documentclass{standalone}          \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[legend image post style={mark=}]               \addplot+[mark=*, color=blue, very thin, mark size=0.8pt]{-x*(x-2)};     \addlegendentry{Measurment}     \end{axis}     \end{tikzpicture}          \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/9kTa2.png) Here, the legend is a line, exactly how I want to have it. But I do not want to have line in the diagram itself. How can I solve this problem?


title: Change pin node style in pgfplots

text: With pgfplot, how can I change the style of a "pin node" to have a thicker line? I saw posts here how to change the "text label" part of the pin node.. but not this little line beneath it.


title: Is there a way to compile tikz graphics outside a document?

text: As my document grows, so does the number of drawings. I am using PGF/TikZ and each drawing is what is enclosed between `\begin{tikzpicture}` and `\end{tikzpicture}`. Every time the document is compiled, so is each of the drawings. I have recently noticed in connection with using the `Lindenmayersystems` library that memory is an issue! There must be a way of compiling drawings outside a document and have the document refer to the result of that compilation, instead of having the drawing's source code reside in the document. This would allow complex drawings to be compiled, with all available resources brought to bear on compiling that one drawing. Also, how could one have a large document with hundreds of drawings and not have a problem with memory? I am using Windows 7, MiKTeX 2.9, TeXMaker 3.3.1.


title: How to painlessly create a custom layout for the title page for pdflatex?

text: For my thesis my university has only a Word template with font sizes and "window" specifications to position title, name, date, etc. What is the easiest way to layout such thing, if I'm not an expert in creating custom classes and only a basic user of pstricks and tikz?


title: How to cite organization's name with space between words

text: I need to cite an article by the World Bank. However latex interpreted it as a person's name. My bib entry is               @book{wb,         author={World Bank},         year={1993},         title={{The East Asian miracle: economic growth and public policy}},         publisher={Oxford University Press},         address={New York, N.Y},              keywords={Economic conditions; Economic policy},         isbn={0195209931, 9780195209938},         language={English},}      And I get "Bank, W (1993)..." on my reference list. I used package `apacite` and `\bibliographystyle{apacite}`. So I need something like "World Bank. (1993)..." (with the space between the words). Any help is appreciated. Cheers, Long


title: pgfplots: "nodes near coords" on xbar chart is off

text: I am trying to make an xbar chart using pgfplots, and I'd like to add the bar's value to the bar. Simply using "nodes near coords" positions the value for a ybar chart, which isn't correct here. What's the best way to position these nodes? ![enter image description here](http://i.stack.imgur.com/fUw16.png) My code:               \documentclass[letterpaper]{article}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{filecontents}{my.dat}     Label     value       num     992       70          1     993       120         2     994       30          3     995       330         4     999       50          5     988       50          6     989       50          7     983       50          8     \end{filecontents}     \begin{document}          \begin{tikzpicture}     \begin{axis}[         xbar,         xlabel=My value,         ylabel=Label here,         xmajorgrids=true,         ytick=data,         yticklabels from table={my.dat}{Label},         nodes near coords,     ]         \addplot table [x=value, y=num]         {my.dat};     \end{axis}          \end{tikzpicture}


title: Table appears always before conclusion section

text: I draw a table, after the table I have a conclusion to write, but the conclusion comes always before the table while it must appear after it instead.      Here is the code I used for the table:                 \begin{table}[!h]     \centering     \begin{tabular}{| l |l |l|}     ......     \end{tabular}     \caption{Activity highlights }     \label{internshipheadlines}     \end{table}      For the conclusion:               \section{Conclusion}      How can I resolve this problem ? I even did `\newpage` after the table but it did not work. **UPDATE:**                   \begin{table}[H]         \centering         \begin{tabular}{| l |l |l|}         \hline         \textbf{Date}&\textbf{Main task}&\textbf{Description}\\         \hline         \multirow{2}{*}{March 3$^{\hbox{\tiny{rd}}}$ - March 07$^{\hbox{\tiny{th}}}$}&\multirow{2}{*}{Discovering HTTPCS}&I accustomed myself with HTTPCS  \\         && scanner and what might be its needs.\\          \hline         \multirow{4}{*}{March 10$^{\hbox{\tiny{rd}}}$ - April 04$^{\hbox{\tiny{th}}}$}&\multirow{4}{*}{CMS security assessment}&Security assessment of various CMS\\         &&types to track their vulnerabilities \\         && some of which were published.\\         \hline             \end{tabular}        \caption{Activity highlights }        \label{internshipheadlines}        \end{table}      And the conclusion:               \section{Conclusion}     Once activity highlights has been done, the following third and fourth chapters will be fully dedicated to the two major tasks I fulfilled and that I choosed to talk about.


title: Adjust the font of scrlttr2 to the serif font of moderncv

text: I'm a newby in LaTeX & trying to make my cv with it. I'm almost finished, the last thing is ... I made my cv with `moderncv`, the letter with `scrlttr 2` and the cover with `scrartcl`. this 3 have different font. how can I adjust the font of scrlttr2 & scrartcl to modern cv. Code               \documentclass[a4paper,11pt]{scrartcl}     %     % -------------------------------------------------     % character encoding     % -------------------------------------------------     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \RequirePackage{lmodern}     \usepackage{marvosym}     \usepackage{graphicx}     \usepackage{color}     \usepackage{framed}     \usepackage{blindtext}      %     \pagestyle{empty}     %     % -------------------------------------------------     % adjust the page margins     % -------------------------------------------------     \usepackage[scale=1]{geometry}     \setlength{\parindent}{0pt}     \addtolength{\parskip}{0pt}     \setlength{\footskip}{0pt}     \setlength{\headheight}{15pt}     \setlength{\topskip}{0pt}     %     % -------------------------------------------------     % Positionierung der Textelemente     % -------------------------------------------------     \usepackage[absolute]{textpos}     \setlength{\TPHorizModule}{1cm}     \setlength{\TPVertModule}{\TPHorizModule}     %     % -------------------------------------------------     % personal data     % -------------------------------------------------     \def\firstname{Max}     \def\familyname{Mustermann}     \def\FileAuthor{\firstname \familyname}     \def\FileSubject{Deckblatt}     %     % -------------------------------------------------     % Font     % -------------------------------------------------     \renewcommand{\ttdefault}{pcr}     %     % -------------------------------------------------     % Aus der moderncvstylecasual.sty:     % -------------------------------------------------     \definecolor{blau}{rgb}{0.20,0.40,0.65}     \definecolor{hellblau}{rgb}{0.25,0.50,0.75}     \definecolor{orange}{rgb}{0.95,0.55,0.15}     \definecolor{gruen}{rgb}{0.30,0.65,0.15}     \definecolor{rot}{rgb}{0.95,0.20,0.20}     \definecolor{dunkelgrau}{rgb}{0.35,0.35,0.35}     \definecolor{hellgrau}{rgb}{0.45,0.45,0.45}     \definecolor{schwarz}{rgb}{0,0,0}     \newcommand*{\firstnamefont}{\fontsize{25}{27}\sffamily\mdseries\upshape}     \newcommand*{\familynamefont}{\firstnamefont}     \newcommand*{\titel}{\fontsize{25}{27}\mdseries\upshape}     \newcommand*{\inhalt}{\fontsize{15}{17}\mdseries\upshape}     %     \begin{document}     \sffamily     %     % -------------------------------------------------     % Titel     % -------------------------------------------------     \begin{textblock}{10}(1,2)     \color{dunkelgrau}{      \bfseries \begin{Large}\titel{BEWERBUNGSUNTERLAGEN}\end{Large}}     \end{textblock}     %     % -------------------------------------------------     % Inhaltsverzeichnis     % -------------------------------------------------     %\renewcommand{\labelitemi}{}          \begin{textblock}{10}(12.9,16.999)     \color{blau}{\inhalt{         \begin{itemize}\setlength{\itemsep}{-1pt}             \item Anschreiben             \vspace{0.1cm}             \item Lebenslauf             \vspace{0.1cm}                   \item Notenbogen bzw. Vordiplom             \vspace{0.1cm}                   \item Empfehlungsschreiben             \vspace{0.1cm}                   \item Abiturzeugnis         \end{itemize}     }}     \end{textblock}     %     % -------------------------------------------------     % Vertikaler Strich oben     % -------------------------------------------------     \begin{textblock}{1}(13.5,0)         \color{hellblau}{\vrule width 2pt height 17cm}     \end{textblock}               % -------------------------------------------------     % Vertikaler Striche Mitte     % -------------------------------------------------          %\begin{textblock}{1}(13.5,17.3)     %\color{hellblau}{\vrule width 2pt height 0.5cm}     %\end{textblock}     %     %\begin{textblock}{1}(13.5,18.16)     %\color{hellblau}{\vrule width 2pt height 0.5cm}     %\end{textblock}               % -------------------------------------------------     % Vertikaler Strich Unten     % -------------------------------------------------          \begin{textblock}{1}(13.5,12)     \color{hellblau}{\vrule width 2pt height 0.5cm}     \end{textblock}               %     % -------------------------------------------------     % Passfoto     % -------------------------------------------------     \begin{textblock}{3}(10.9,21.9)         %\fbox{\includegraphics[width=2cm]{foto}}     \end{textblock}     %     % -------------------------------------------------     % Anschrift     % -------------------------------------------------     \begin{textblock}{9.7}(1,8)         \begin{flushleft}             \vspace{-3.5cm}             {\bfseries \begin{large}\firstnamefont{\color{hellgrau}{\firstname}}~\familynamefont{\color{dunkelgrau}{\familyname}}\end{large}}\\[.35ex]             \huge\itshape%             straße\\             plz ort\\[.35ex]             \Telefon~+tel\\             \Letter~{mail}         \end{flushleft}     \end{textblock}     %     % -------------------------------------------------     % Hintergrundbild     % -------------------------------------------------     % \begin{textblock}{13.5}(0,0)     %   \includegraphics[width=13.5cm, height=\textheight]{firma}     % \end{textblock}     %          \end{document}      LETTER               \documentclass{scrlttr2}      \usepackage[ngerman]{babel}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{cmbright}     \usepackage{lmodern}     \renewcommand*\familydefault{\sfdefault}          \usepackage{color}               % Aus der moderncvstylecasual.sty:     %BLAU:     \definecolor{blau}{rgb}{0.20,0.40,0.65}     %ORANGE:     \definecolor{orange}{rgb}{0.95,0.55,0.15}     %GRÜN:     \definecolor{gruen}{rgb}{0.30,0.65,0.15}     %ROT:     \definecolor{rot}{rgb}{0.95,0.20,0.20}     %GRAU:     \definecolor{grau}{rgb}{0.35,0.35,0.35}                    \KOMAoptions{     fromalign=right,      fromrule=aftername,      addrfield=true,      backaddress=on,      pagenumber=botright,      foldmarks=false,      fromphone=true,      fromemail=true      }               \LoadLetterOption{KOMAold}               \setkomavar{fromname}{Vorname Nachname} \setkomavar{fromaddress}{Hauptstr. 12\\ 12345 Ort} \setkomavar{fromemail}{name@mail.de}      \setkomavar{fromphone}{555 9873}      \setkomavar{signature}{Vorname Nachname}                \begin{document}           \begin{letter}{Mega-Firma\\                    Schlossallee 12\\                    23456 Hauptstadt}                %Der Betreff soll blau + fett gedruckt werden:     \opening{\bfseries{\textcolor{blau}{Ihre Stellenanzeige in der FAZ}}}                Lieber Personalmensch, \\          blabla          \closing{Mit freundlichen Grüßen}           \vspace*{2cm}     \encl{      Lebenslauf\\     Zeugnisse}          \end{letter}      \end{document}          }      CV               \documentclass[12pt,a4paper]{moderncv}          \moderncvtheme[blue]{casual} %[blue, green, orange, red, grey]{casual, classic}                    %Wenn cventry genutzt wird entfernt es die Punkte     %     %\renewcommand*{\cvline}[7][.25em]{%     %  \cvitem[#1]{#2}{%     %    {\bfseries#3}%     %%   \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}% I changed this line (with comma) ...     %    \ifthenelse{\equal{#4}{}}{}{ {\slshape#4}}% ... into this one (without comma).     %    \ifthenelse{\equal{#5}{}}{}{, #5}%     %    \ifthenelse{\equal{#6}{}}{}{, #6}%     %    .\strut%     %    \ifx&#7&%     %      \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}               \usepackage{lmodern}     \usepackage[ngerman]{babel}     \usepackage{amsmath}     \usepackage[utf8]{inputenc}     %%änderung der Spaltenbreite des Datum     \usepackage[scale=0.85]{geometry}     \setlength{\hintscolumnwidth}{3.1cm}         \firstname{Bob}     \familyname{Marley}     \title{Lebenslauf}     \address{bla}{bla}     \mobile{0176/ 10044015}     %\phone{09876/ 5 43 21}          %\photo[4cm]{}     \begin{document}     \maketitle                    %\cvline{}{}{}{}{}{}     \section{Studium}     \cvline{4/2013--aktuell}{\textbf{Allgemeiner Maschinenbau M.Sc.} \newline RWTH-Aachen University, \emph{Note: 1,9}.}                                   Berlin, \today     \end{document}


LaTeX noob here. Basically I get the following message in sharetex:                main.tex: File ended while scanning use of \\definition.     <inserted text> \par <*> main.tex I suspect you have forgotten a `}', causing me to read past where you wanted me to stop. I'll try to recover; but if the error is serious, you'd better type `E' or `X' now and fix your file. ! Emergency stop. <*> main.tex *** (job aborted, no legal \end found).      I think I have pinpointed the region where I get the error message, as when I put `\end{document}` before this region it compiles but when I put it after it doesn't. Please could you see if there's any mistake?               \begin{definition}{1.08}     Suppose $f : X\longrightarrow Y$ is a function, and $A\subseteqX$, $B\subseteqY$.     \\*\item[(i)] We define the image set of f, denoted im(f), by im(f)=$\{f(x) \vert x\inX\}$.     \item[(ii)] We define the image set of A under f, denoted f(A), by f(A)=$\{f(x) \vert x\in A\}$.     \item[(iii)] We define the inverse image set of B under f, denoted $f^{-1}(B)$, by $f^{-1}(B)=\{x\inX \vert f(x)\in B\}$.     \end{definition}.


title: How to draw nodes and arcs across centered text

text: I have been trying to draw something for a while now and can't seem to find a way to do it the way I want to have it. I wanna draw something similar to this:               (1)               ACGT                        |                    ----------                    |        |     (2)          ACGT      ACGT                             |                         -----------                         |         |     (3)      ACGT      ACGT      ACGT                         |                   ------------                   |          |     (4)  ACGT    ACGT       ACGT       ACGT      Ideally, each line would be CENTERED. I'd very much appreciate a solution that does not require ANY absolute positioning. I have tried various packages, like qtree and tikz, but I can't seem to get what I want :). The thing I am missing is how to center TikZ nodes. Thanks for your help!


title: CSVToTabular Mixing CSV entries across tables

text: I've had this on a number of tables in the past, and it usually only occurs on the last table in the file. It seems as though the final table that is generated will pull entries from previous tables. Here are examples of two tables:               %DISTANCE BETWEEN TEAMS     \begin{landscape}     \thispagestyle{plain}     \begin{table}[h]     \caption{Distance Between Teams and Their Nearest Competitor by Year and Stadium}     \scriptsize     \label{tb:Distance}     \centering     \CSVtotabular{"Tables/DistancesBetweenTeams.csv"}{l l l l l l}{%      \toprule Team & Stadium Name & Location & Years & Nearest Competitor & Distance  \\ \hline}{%     \insertbyname{Team} & \insertbyname{Stadium} & \insertbyname{Location} & \insertbyname{Years} & \insertbyname{Nearest} & \insertbyname{Distance}  \\}{%     \insertbyname{Team} & \insertbyname{Stadium} & \insertbyname{Location} & \insertbyname{Years} & \insertbyname{Nearest} & \insertbyname{Distance}  \\ \bottomrule}      \parbox{7in}{\textit{Notes:} $\dagger$Because Los Angeles and Chivas USA share a stadium, their distance variable is restricted to 10 miles}     \end{table}     \end{landscape}          %%OLS RESULTS     \begin{table}[h]     \caption{Ordinary Least Squares for Average Attendance, Team Controls Suppressed}     \label{tb:OLS}     \centering     \CSVtotabular{"Tables/LocationResults.csv"}{l r @{} l r @{} l}{%      \toprule Variables & \multicolumn{2}{c}{Estimate 1 (Std. Dev)} &  \multicolumn{2}{c}{Estimate 2 (Std. Dev)}   \\ \hline}{%     \insertbyname{variables} & \insertbyname{ols1} & \insertbyname{sig1} & \insertbyname{ols2} & \insertbyname{sig2}  \\}{%     \insertbyname{variables} & \insertbyname{ols1} & \insertbyname{sig1} & \insertbyname{ols2} & \insertbyname{sig2}   \\ \bottomrule}      \parbox{5in}{\textit{Notes:} Both regressions include controls for team, but are mostly suppressed.  \newline       $*$ 10\% significance level \\ $**$ 5\% significance level \\ $***$ 1\% significance level}     \end{table}      The result is that the final column in the last table is filling in blank cells on one sheet (LocationResults.csv) with cells from the first column of the previous table (DistanceBetweenTeams.csv) ![enter image description here](http://i.stack.imgur.com/V6pIY.png) The only fix I've found is to open the CSV file in TextWrangler and manually add a comma at the end to indicate it's the end of the line. This is fine, until I want to edit the CSV file, which then overwrites the changes I made and adds the new line.


title: beamer and ams symbols

text: I would like to use some ams symbol in my presentation, like arrows or aother kind of symbol. When I use the command \ding with the relative code for display the symbol, I receive an error during the compile procedure:               ! Undefined control sequence.     \beamer@doifinframe ...ne & n. \\ \midrule A\ding     {221}B\ding {221}C\ding {2...     l.40 \end{frame}     The control sequence at the end of the top line     of your error message was never \def'ed      My code is:               \documentclass[xcolor=table, t]{beamer}          \usepackage{booktabs}     \usepackage{tikz}      \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \title{my presentation}     \author{name}          \begin{document}          \begin{frame}     \maketitle     \end{frame}          \begin{frame}     \frametitle{title}          \begin{table}[]%\footnotesize     \centering     \medskip     \begin{tabular}{lr}     \toprule     Transizione & n. \\      \midrule     A\ding{221}B\ding{221}C\ding{221}A & 54 \\     D\ding{221}C\ding{221}B\ding{221}C\ding{221}D & 30 \\     D\ding{221}C\ding{221}B\ding{221}C & 23 \\     \bottomrule     \end{tabular}     \end{table}     \end{frame}          \end{document}      thanks in advance for the help


title: As an expert, can you always use TeX for (nearly) any kind of document?

text: I am just beginning to learn TeX. Coming from web-development, I find separating content from style very sensible, and I like the logic behind it. To me it looks that having control over formatting is very convenient and it makes TeX superior to other Word processing programs like OpenOffice or Word, even when making 'simple' documents. As I am just a beginner, I am wondering what the experts do when having to write a simple letter, or any small document that really does not require any advanced typesetting. Do you fall back to a Word processing program, or do you stick with TeX, even though it might implicate a bit more hassle to get your final document? In other words, do you find TeX can replace any type of document creation in everyday use, or is it overkill for simple documents?


title: Vertical spacing of captions in booktabs

text: Both `\abovetopsep` and `\belowbottomsep` are 0.0pt. But for some reason there's extra space between the bottom rule and "my second caption" in the table below. Q: What is that space? Where does it come from? Ultimately, I'd like to do the following:               \setlength{\abovetopsep}{<the width between the bottom rule and "my second caption">}      so that there's some uniformity in the vertical placement of captions above and below tabulars. Q: Is there another, maybe more standard, method for doing this?               \documentclass{article}     \usepackage{booktabs}     \begin{document}     \begin{table}       \centering       \caption{my first caption}       \begin{tabular}{ll}         \toprule         foo & bar \\         \midrule         baz & bog \\         \bottomrule        \end{tabular}       \caption{my second caption}     \end{table}     \end{document}       ![tab1](http://i.stack.imgur.com/CIARa.jpg)


title: Two column table, enumerate first column but not second

text: I need to have a two column table, where the first column contains enumerations and the second take plain text. For example,               Column 1           Column 2     1. Step 1          Reason 1     2. Step 2          Reason 2      I've tried a couple couple combinations of tabular with the enumerate environment, but nothing works. Can someone show me how to do this?


title: What is the best way to scan over a list of somethings?

text: It seems that a common operation needed when defining new commands is to scan over a list of arguments (separated e.g. by a comma, but maybe by something else) and do something with each argument in the list, find the last one, or whatever. For example to write commands that look like `\Command{a,b,c}` or `\Command{c.d.e}` and do something with each `a`, `b`, and `c`. See e.g. questions on defining a list of operators and ignoring even numbered inputs. Some solutions have been posted there, but what would be the best idiom to perform such kind of operations? LaTeX's `\@for` looks very nice, but is it possible to use it to scan anything other than comma-separated lists?


title: How to get title of a citation?

text: Is there some way to get the title of a citation shown in the normal text instead of the key? I need the titles of some papers I cite in the normal text, so typing them by hand seems to be superfluous if I already have them in my bibtex file. Is there any way to do this?


title: No hyper refs from citation to bibliography using BiBTeX, hyperref and harvard

text: I am trying to get internal hyperrefs from citation to the bibliography page. I am using BiBTeX, the harvard package, the hyperref package with optional [hidelinks]. The latter works fine to me on the TOC and sections refs. I read in hyperref package help that it is designed to work with the harvard package. Yet, there is no further explanation on how to make it work. Here is a MWE:               \documentclass[a4paper,11pt]{report}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{fullpage}     \usepackage[frenchb]{babel}     \usepackage{cite}     \usepackage[abbr]{harvard}     \citationstyle{dcu}     \usepackage[hidelinks]{hyperref}     \begin{document}     This is a test \cite{test}     \clearpage     \bibliographystyle{dcu}     \bibliography{test}     \end{document}      with test.bib being :               @article{test,     title = "Testing and tests",     author = "Test {Tester}",     journal = "Journal of tests",     volume = "1",     pages = "1",     year = "2012",     }      I am using an up to date Texmaker editor, running on an up to date TeX Live 2011 distribution, on MS Win7.


title: Catchwords and marginpars

text: I am trying to make a document both with catchwords (first words from the next page) and with margin notes. Is it possible to make `fwlw` and `marginpar` work together? Sometimes catchwords disappear, sometimes marginpars move or disappear. MWE follows:               \documentclass[twoside]{article}     \usepackage[cp1251]{inputenc}      \usepackage[T2A]{fontenc}     \usepackage[russian]{betababel}     \usepackage{fwlw}     \usepackage[a5paper, textwidth=7cm]{geometry}     \usepackage{fancyhdr}     \usepackage{mparhack}     \newcommand{\klm}{\marginpar[\hfill{}111]{222}}          \begin{document}     \fontsize{18}{24}\selectfont     \pagestyle{fancy}     \fancyfoot[R]{\unhbox\NextWordBox}     однажды в студеную{\klm} зимнюю пору я из лесу вышел был сильный мороз 1     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 2     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 3     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 4     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 5     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 6     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 7     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 8     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 9     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 10     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 11     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 12     однажды в студеную зимнюю пору я из {\klm}лесу вышел был сильный мороз 13     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 14     однажды в студеную зимнюю пору я из лесу вышел был сильный мороз 15     \end{document}


title: Stable alternative for http://docs.latexlab.org/

text: I'm looking for an alternative for http://docs.latexlab.org/ which is stable. Is there any?


title: \hyperref: footnote links not active and color not changing

text: I'm using `\hyperref` and encountering two problems. First: footnote links are not active; second: I cannot seem to change the color of links or to go from colored links to links with borders. Below is an example (using colored links, not borders):               \documentclass[11pt]{article}     \usepackage{setspace}     \usepackage{amssymb, natbib}     \usepackage[tbtags]{amsmath}     \usepackage{rotating}     \usepackage{ctable}     \usepackage{sectsty}     \usepackage{fancyhdr}     \usepackage{caption}     \usepackage{comment}     \usepackage{appendix}     \usepackage{verbatim}     \usepackage[margin=1.1in]{geometry}           \usepackage[pdftex, pdftitle={}, pdfauthor={}, colorlinks=true, urlcolor=green, linkcolor=green, citecolor=green, raiselinks=false, hyperfootnotes=true]{hyperref}      Any help would be greatly appreciated! * * * Sorry, here is, what I think, is a MWE.               \documentclass[11pt]{article}     \usepackage{setspace}     \usepackage{amssymb, natbib}     \usepackage[tbtags]{amsmath}     \usepackage{rotating}     \usepackage{ctable}     \usepackage{sectsty}     \usepackage{fancyhdr}     \usepackage{caption}     \usepackage{comment}     \usepackage{appendix}     \usepackage{verbatim}     \usepackage[margin=1.1in]{geometry}           \usepackage[pdftex, pdftitle={Mongolia games paper}, pdfauthor={Daniel Rubenson, Peter Loewen \& Richard Sawyer}, colorlinks=true, urlcolor=green, linkcolor=green, citecolor=green, raiselinks=false, hyperfootnotes=true]{hyperref}          \usepackage{hypernat}          \newcommand{\revertstretch}{\setstretch{1.3}}     \revertstretch          % THEOREM Environments ---------------------------------------------------      \newtheorem{thm}{Theorem}%[subsection]      \newtheorem{cor}[thm]{Corollary}      \newtheorem{lem}[thm]{Lemma}      \newtheorem{thma}{Theorem}%[subsection]      \newtheorem{lema}[thm]{Lemma}      \newtheorem{prop}[thm]{Proposition}     % \theoremcontact{definition}      \newtheorem{defn}[thm]{Definition}     % \theoremcontact{remark}      \newtheorem{rem}[thm]{Remark}      \newtheorem{hypo}{Hypothesis}     % \numberwithin{equation}{subsection} % MATH ------------------------------------------------------------------- %     \DeclareMathOperator{\IM}{Im} % \DeclareMathOperator{\ess}{ess}      \newcommand{\eps}{\varepsilon}      \newcommand{\fn}{\footnote}      \newcommand{\To}{\longrightarrow}      \newcommand{\h}{\mathcal{H}}      \newcommand{\s}{\mathcal{S}}      \newcommand{\A}{\mathcal{A}}      \newcommand{\J}{\mathcal{J}}      \newcommand{\M}{\mathcal{M}}      \newcommand{\W}{\mathcal{W}}      \newcommand{\X}{\mathcal{X}}      \newcommand{\BOP}{\mathbf{B}}      \newcommand{\BH}{\mathbf{B}(\mathcal{H})}      \newcommand{\KH}{\mathcal{K}(\mathcal{H})}      \newcommand{\Real}{\mathbb{R}}      \newcommand{\Complex}{\mathbb{C}}      \newcommand{\Field}{\mathbb{F}}      \newcommand{\RPlus}{\Real^{+}}      \newcommand{\Polar}{\mathcal{P}_{\s}}      \newcommand{\Poly}{\mathcal{P}(E)}      \newcommand{\EssD}{\mathcal{D}}      \newcommand{\Lom}{\mathcal{L}}      \newcommand{\States}{\mathcal{T}}      \newcommand{\abs}[1]{\left\vert#1\right\vert}      \newcommand{\set}[1]{\left\{#1\right\}}      \newcommand{\seq}[1]{\left<#1\right>}      \newcommand{\norm}[1]{\left\Vert#1\right\Vert}      \newcommand{\essnorm}[1]{\norm{#1}_{\ess}}     %%% ----------------------------------------------------------------------     \newenvironment{changemargin}[2]{%      \begin{list}{}{%       \setlength{\topsep}{0pt}%       \setlength{\leftmargin}{#1}%       \setlength{\rightmargin}{#2}%       \setlength{\listparindent}{\parindent}%       \setlength{\itemindent}{\parindent}%       \setlength{\parsep}{\parskip}%      }%     \item[]}{\end{list}}                                   \title{title}     \author{author}     \date{\today}     \begin{document}     \pagenumbering{roman}     \maketitle     \singlespace     \begin{abstract}     \noindent Abstract     \end{abstract}          \clearpage     \doublespace     \pagenumbering{arabic}          \section{Introduction}          \href{a_link}{a link}          An example.\footnote{An example.}          \end{document}


title: TikZ: Calculate "pre length" based on path length

text: I would like to automatically calculate the `pre length` value for a line decoration to be "centered". Let me explain it by this example:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{decorations.shapes}          \begin{document}     \begin{tikzpicture}[foo/.style={decorate,decoration={         shape backgrounds,shape=circle,shape sep=2.5cm,pre=moveto,pre length=#1}}]       \node at (0cm,0cm)  [label=below:0]  {};       \node at (5cm,0cm)  [label=below:5]  {};       \node at (9cm,0cm)  [label=below:9]  {};       \node at (10cm,0cm) [label=below:10] {};       \draw[foo=0cm]    (0cm,0cm) -- (10cm,0cm); % line 1       \draw[foo=0cm]    (0cm,5mm) -- ( 9cm,5mm); % line 2       \draw[foo=0.75cm] (0cm,1cm) -- ( 9cm,1cm); % line 3     \end{tikzpicture}     \end{document}      _~~(How can I add a compiled version of the code? Do I have to manually compile and upload it as a image?)~~_ ![compiled version](http://i.stack.imgur.com/9NzVg.png)   * `line 1` (bottom) is what I want: Circles from the start of the line (0,0) to its end (10,0).   * `line 2` (middle) shows the problem: If the paths length is not a multiple of `shape sep`, the first circle is at the paths start and there is nothing between the last circle and the paths end.   * `line 3` (top) shows how the problem should be handled: By setting `pre length` to the right value (or by some other method, if you have a better idea), the distance between the paths start and the first circle is the same as the distance between the last circle and the paths end. Now my question is: How can I set `pre length` to ~~`(path length - shape sep)/2`~~`(path length - (number of circles - 1) * shape sep) / 2` (thanks to Altermundus for the correction)? Or is there a better solution to this?


title: siunitx: localisation not working

text: I have just discovered the `siunitx` package and want to use it in a German language document. Unfortunately, I can't get the German word 'bis' instead of 'to' with the `\SIrange` command:               \listfiles     \documentclass{beamer}     \usepackage[ngerman]{babel}     \usepackage{siunitx}          \begin{document}     \begin{frame}       $\dot{V}=\SIrange{0}{650}{\litre\per\hour}$     \end{frame}     \end{document}      What's wrong?


title: Using endfloat with Chapters [ Figure X about here] has incorrect numbering

text: * Using endfloat and graphicx package.   * I place a figure in chapter 1. Which is assigned the figure number 2.1.    * A box in the position reads: `[ Figure 1 about here ]`   * How can we make the box read the correct figure number? It is not figure 1.    * Secondly, how can we make the figure take the correct figure number of 1.1. Since the figure is in chapter 1, not chapter 2? Originally, it was figure 2.1. But we wish to change to the correct figure 1.1. Example:               \documentclass[a4paper,12pt,twoside]{book}     \usepackage{graphicx}     \usepackage[nolists]{endfloat}               \begin{document}     \chapter{This is Chapter 1}     Some text in chapter 1.  See my figure \ref{fig:MyFigure}.          \begin{figure}             \centering             \includegraphics{Figures/MyFigure.JPG}             \caption{My caption for this figure}             \label{fig:MyFigure}     \end{figure}          \let\cleardoublepage\clearpage     \chapter{This is Chapter 2}     Some text in chapter 2.           \end{document}


title: Center aligning chapters

text: I'm using the following to center align chapters. Heres the code                \newcommand{\cchapter}[1]{\chapter[#1]{\centering #1}}      And using `\cchapter` to format chapters. But the chapter heading for eg. "Chapter 1" is not getting center aligned. How can I achieve that?


title: List of mathematical notation / abbreviations

text: In my article, I would like to create a section "Mathematical Notation" that lists all the arcane mathematical symbols I'm using. This is similar to an index or a list of figures. An example of what I have in mind is given by the section "Standard Notations" in the following book. I'm not aware of a standard way to do create such a list, however. Any recommendations? _Disambiguation:_ I'm not asking for a list of mathematical symbols and their LaTeX counterparts. Not that Google would listen to me.


title: Consistent cover design regardless of inner pages

text: This is a series of books, the margins, page sizes are all identical. Depends on the content, the design of inner pages are slightly different, i.e. different type sizes, leading, etc. The question is: I would like to set a consistent cover design through out the series with simple title and author. Here is how I did it:               \clearpage     \pagestyle{empty}     \begin{center}     \fontsize{17pt}{19pt}\rmfamily The Metamorphosis     \vspace*{8pt}     \fontsize{14pt}{14.5pt}\it Franz Kafka     \vfill{}     \end{center}     \pagebreak{}      the typography aspect:               \usepackage{ebgaramond}     \usepackage[T1]{fontenc}          \input{glyphtounicode}     \pdfgentounicode=1      However, I found a small inconsistency in the author alignment—it is just a fractional difference across the series, very annoying. Please see the blue line. I thought I had not refer to any preamble so that such design will be independent, but somehow there is something that still exerts influence on the typeset. Wondered if anyone can spot it? The document class is `Book, KOMA Script`. ![leading difference](http://i.stack.imgur.com/LOVSQ.png) **Update A:** The problem seems to be caused by certain combination of letters in both title and author. Please find the following example, once I introduced certain letters, the leading is changed by the system. ![enter image description here](http://i.stack.imgur.com/WABVA.png)


title: Import LaTeX File into a Template?

text: I have the following Task todo: I have made me a default structure for lecture notes and now I want to compile my notes into separate PDFs for learning. So my goal is to have for every course a separate tex file, and have only one single template file. The problem is that I just can't do a `\input{myfile}` because I want to set the title, fancy page heads and stuff like that. Or is this also possible with the `\input{}` function? Or is there another way to go?


title: Tcolorbox sidebyside right side "top align" problem

text: When a tcolorbox is inside the right side of a sidebyside tcolorbox, it is vertically centered. Using "\vfill" or "align = top" don't put the tcolorbox at the top of the right side. The space between the tcolorbox and the upper part of the right side is variable. Is there a way to put the tcolorbox at the right side top ? Tcolorboxes in the right side: centered.               \documentclass[]{article}          \usepackage[skins,listings,breakable,listingsutf8,theorems,hooks,fitting]{tcolorbox}%          \begin{document}          \begin{tcolorbox}[adjusted title= First Outer Box,sidebyside]     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     \tcblower     Variable vertical space     \begin{tcolorbox}[adjusted title=First Box Right Side]     Inside 1st box     First Outer Box     \end{tcolorbox}     \begin{tcolorbox}[adjusted title=Second Box Right Side]     Inside 2nd box     First Outer Box     \end{tcolorbox}           \end{tcolorbox} % first outer box          \begin{tcolorbox}[adjusted title= Second Outer Box,sidebyside]     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     Left side of Outer Box\\     \tcblower     Variable vertical space.     \begin{tcolorbox}[adjusted title=First Box Right Side]     Inside 1st box     Second Outer Box     \end{tcolorbox}     \begin{tcolorbox}[adjusted title=Second Box Right Side]     Inside 2nd box     Second Outer Box     \end{tcolorbox}      \end{tcolorbox} % first outer box     \end{document}      ![enter image description here](http://i.stack.imgur.com/llCDO.png)


title: Problems compiling antiquated code using the epic and eepic packages

text: I was given an extremely large tex file I need to compile, but when trying to compile it, I repeatedly get a non-pdf special ignored error followed by the document without any of the figures included. After some research, I have come to the conclusion that it must be the packages epic and eepic, but I am unable to figure out a workaround so that it will still compile properly without rewriting hundreds of lines of code. Below is a typical example of what is causing me fits: EDIT: Updated the sample code so that it can compile with all the errors I am experiencing.               \documentclass[12pt,amsfonts]{book}     \usepackage{amssymb,amsmath}     \usepackage{stmaryrd}     \usepackage{amsfonts}     \usepackage{graphics}     \usepackage{epic,eepic}     \begin{document}          \date{}          \begin{figure}[h] % This is Figure 1.1     \begin{picture}(440,480)(-230,-280)     \setlength{\unitlength}{0.3pt}     \drawline(-388,898)(564,-887)     \drawline(1200,77)(-1200,77)     \drawline(-36,-900)(-36,900)     \drawline(714,897)(-636,-903)     \drawline(1194,605)(-1191,-667)     \drawline(600,-899)(-747,897)     \drawline(388,-898)(-564,887)     \put(-660,-259){\circle{1248}}     \put(-20,-99){\circle{32}}     \put(-88,105){\circle{104}}     \put(-16,-63){\circle{40}}     \put(484,-363){\circle{1040}}     \put(-60,-91){\circle{48}}     \put(120,209){\circle{312}}     \put(-12,5){\circle{144}}     \put(-216,-63){\circle{280}}     \put(288,-175){\circle{504}}     \put(84,437){\circle{720}}     \end{picture}     \end{figure}               \end{document}


title: Wonky diagrams in tikz

text: I'm trying to make a commutative diagram (without the package tikz-cd) with nodes of different sizes. I'm skipping nodes like this                 &   & A &   &   \\       & B &   & C &   \\     D &   & E &   & F \\      and would like to add diagonal arrow e.g. `A -- B -- D`, but for some reason they don't run in a straight line. I'm already using `column sep = [fixed value]` to straighten it up, but the diagonal arrows a still a little wonky. What should I do to straighten them out? * * * Here's my full code:               \begin{tikzpicture}[baseline=-2.6pt,description/.style={fill=white,inner sep=2pt}]     \matrix (m) [matrix of math nodes, column sep=3em]     {     && A_1 && \\     & A_1 && A_1 \oplus A_2 & \\     A_1 && A_1 \oplus A_2 && A_2 \\     };     \path[-stealth,line width=.5pt,font=\scriptsize]     (m-1-3) edge node[above] {$id$} (m-2-2)     (m-1-3) edge node[above] {$i_1$} (m-2-4)     (m-2-2) edge node[above] {$id$} (m-3-1)     (m-2-2) edge node[above] {$i_1$} (m-3-3)     (m-2-4) edge node[above] {$id$} (m-3-3)     (m-2-4) edge node[above] {$p_2$} (m-3-5)     ;     \end{tikzpicture}


title: ConTeXt: How do you create your own commands?

text: There seems to be a Current and Standard way to define new (core) commands in ConTeXt. For example, an e-mail by Wolfgang states: > Many of the \define... and \setup... commands are now auto generated from > \installcommandhandler which generates only one setup-command which can be > used for global (i.e. \setup…[..,..=..,..]) and local (i.e. > \setup...[...][..,..=..,..]) settings. For backward compatibility you can > find things like this: \let\setupnotes\setupnote I cannot wrap my head around the source code, and I cannot find any documentation on the commands involved. For example, the code that creates `\startnarrower` and `\setupnarrower`, from spac-hor.mkiv:               \installcorenamespace{narrower}     \installcorenamespace{narrowermethod}          % ... (some code skipped)     \installcommandhandler \??narrower {narrower} \??narrower          \appendtoks        %% this means: \def\startmynarrower{\spac_narrower_start{mynarrower}}        \setuevalue{\e!start\currentnarrower}{\spac_narrower_start%          {\currentnarrower}}%        %% this means: \def\startmynarrower{\spac_narrower_stop}        \setuevalue{\e!stop \currentnarrower}{\spac_narrower_stop}%     \to \everydefinenarrower          % \??narrowermethod is the narrowermethod corenamespace?     \unexpanded\def\installnarrowermethod#1#2%       {\setvalue{\??narrowermethod#1}{#2}}          % ...          \installnarrowermethod \v!left  {\global\advance\s_spac_narrower_left%         \narrowerparameter\c!left  \relax}     \installnarrowermethod \v!middle{\global\advance\s_spac_narrower_mid%         \narrowerparameter\c!middle\relax}      So, what do these commands do/mean?   * `\installcorenamespace`   * `\??...`   * `\installcommandhandler`, and possibly its buddies defined in mult-aux.mkiv and elsewhere: `\installswitchcommandhandler`, `\installautocommandhandler`, `\installsimplecommandhandler`, `\installframedautocommandhandler`, etc.   * `\setuevalue`


title: How to wrap the 90 degrees rotated text in a table cell

text: in Microsoft word I have a table which has the following structure. ![enter image description here](http://i.stack.imgur.com/BmCXU.png) Now, I need to make a similar table in LaTex to submit a publication, I tried with the following code,               %%***************************************************************     \documentclass[twoside,12pt]{article}%                         *     \usepackage{graphicx}%                                           *          \begin{document}     %===============Table Starts====================================     Table 1. This is a table      \begin{center}%[htbp]     \begin{tabular}{l rrrrrrrr}\hline     \rotatebox{90}{Number of      Married Years}  & \rotatebox{90}{Observed Frequency (Year 1)}   & \rotatebox{90}{Expected Poisson Frequency (Year 1)} &      \rotatebox{90}{Expected Binomal Frequency (Year 1)} & \rotatebox{90}{Expected Normal Frequency (Year 1)}    & \rotatebox{90}{Observed Frequency (Year 2)} & \rotatebox{90}{Expected Poisson Frequency (Year 2)} & \rotatebox{90}{   Expected Binomial     Frequency (Year 2) } & \rotatebox{90}{Expected Normal Frequency (Year 2)}\\\hline                 0     & x     & y     & z     & a     & b     & c     & d     & e \\                 1     & x     & y     & z     & a     & b     & c     & d     & e \\                 2     & x     & y     & z     & a     & b     & c     & d     & e \\                 3     & x     & y     & z     & a     & b     & c     & d     & e \\\hline     \end{tabular}     \label{tab1}     \end{center}      \end{document}      This code produces a table like the below, ![enter image description here](http://i.stack.imgur.com/G1M5y.png) It would be a great help if you could guide me in wrapping the rotated text in the first row of the table.


title: Best way to draw a chevron diagram using Tikz

text: I want to visualize the transition from a state A to B by doing different operations x,y,z. I want to achieve something similar like this:                ________                        ________     |        |   ____ _____ ____    |        |     |        |  |    \     \    \   |        |     |   A    |  |  x  |  y  | z  |  |    B   |     |        |  |____/_____/____/   |        |     |________|                      |________|      I know how to draw this blocks in tikz, but I'm not sure if there is already some existing functionality providing an easy way to do this. I want to remove/add/style blocks in a simple way. I also want to put this in a rounded rectangle:                __________________     (   \    \    \    )     (___/____/____/____)      A circular chain of arrows would also be nice to have. If there is no existing solution I'm interested in suggestions how to create a good and reusable solution for this problem.


title: Customized equation number not in same line in Beamer

text: I have the following code beamer, but I can not understand why the number of my equations are not on the same line when using \ tag. The column are "plenty" of space.               \documentclass{beamer}          \usepackage{mathtools,cleveref}     \usepackage[american]{circuitikz}          \begin{document}          \begin{frame}{Ohm and Kirchhoff Laws}          \begin{block}{}         \only<1>{The Ohm and Kirchhoff laws -- a simple test.}         \only<2>{\par A simple electric circuit.}         \only<3>{\par From Ohm's law we got \cref{eq:ohm-1}~to~\cref{eq:ohm-3}.}         \only<4>{\par The \texttt{LKC} applied to each node implies \cref{eq:lkc-1}~to~\cref{eq:lkc-4}, but they are not a system of equations linearly independent.}         \only<5>{\par And finaly \texttt{LKT} applied to the single mesh gives the equation \cref{eq:lkt}.}     \end{block}          \begin{columns}              \column[b]{.5\textwidth}                  \only<2->{%                 \begin{block}{}                     \begin{circuitikz}[scale=.7, transform shape]                         \draw                             (0,0) to [V,l=$v_s$,i>=$i_s$,*-*] (0,3)                             to [short] (6,3)                             to [R,l=$R_l$,v=$v_l$,i>^=$i_l$,*-*] (6,0)                             to [R,l=$R_c$,v>=$v_c$,i^<=$i_c$,*-*] (3,0)                             to [R,l=$R_1$,v=$v_1$,i^>=$i_1$,*-*] (0,0)                          ;                     \end{circuitikz}                 \end{block}%             }              \column[b]{.5\textwidth}                  \only<3>{%                 \begin{block}{}                     \begin{align}                         v_1 &= i_1R_1\tag{2.1}\label<3>{eq:ohm-1}\\                         v_c &= i_cR_c\tag{2.2}\label<3>{eq:ohm-2}\\                         v_l &= i_lR_l\tag{2.3}\label<3>{eq:ohm-3}                     \end{align}                 \end{block}%             }                  \only<4>{%                 \begin{block}{}                     \begin{align}                         i_s-i_1 &= 0\tag{2.1.1}\label<4>{eq:lkc-1}\\                         i_1+i_c &= 0\tag{2.1.2}\label<4>{eq:lkc-2}\\                         -i_c-i_l &= 0\tag{2.1.3}\label<4>{eq:lkc-3}\\                         i_l-i_s &= 0\tag{2.1.4}\label<4>{eq:lkc-4}                     \end{align}                 \end{block}%             }                  \only<5>{%                 \begin{block}{}                     \begin{equation}                         v_l-v_c+v_1-v_s=0\tag{2.4}\label<5>{eq:lkt}                     \end{equation}                 \end{block}%             }          \end{columns}          \end{frame}          \end{document}


title: How to align frame title of mdframed on custom place?

text: `mdframed` has an option of `frametitlealignment`, but the manual does not list possible values. I wonder if it accepts values other than `left`, `right` and `center` (apart from derivatives like `raggedleft`). Is it possible to place the title in a custom place (e.g. 30% from left)? If not, how to set padding (margin) for the title? I simply moved the title by               frametitle=\hspace{1em}Title      but the problem is that I use the title in the page header, and do not want this `hspace` there. **EDIT:** MWE for clarification of the problem.               \documentclass{article}          \usepackage{mdframed}     \usepackage{lipsum}     \makeatletter     \mdfdefinestyle{example}{settings={\@mkboth{\mdf@frametitle}{\mdf@frametitle}}}     \makeatother     \pagestyle{headings}     \begin{document}          \begin{mdframed}[style=example,frametitle=\hspace*{0.30\linewidth}Some Title 1]     \lipsum[1]     \end{mdframed}     \end{document}      ![enter image description here](http://i.stack.imgur.com/8zM3f.png) ![enter image description here](http://i.stack.imgur.com/lVRun.png) As can be seen, by adding `\hspace` to the `frametitle`, not only the `frame title` shifts, but also the `page header` will do. I need to customize the position of frame title, but not the page header. In fact, I cannot alter `frametitle`, as its value is exactly used in the page header. I need to align the frame title with `frametitlealignment`.


title: Behavior of \, in both text and math mode

text: > The command `\,` can be used in both text and math mode, where it has the > same behavior. Well, this is not strictly true, of which I can give a > wonderful proof, but comments are too short to contain it. --- @egreg The above remark was given by @egreg in an answer that I posted. Since it is too long for a comment, could someone elaborate on this?


title: Creating a form without submit action

text: I'm trying to create a AcroForm using LaTeX. I also want to use `pdftk` to merge many PDFs. The problem is that `pdftk` does not behave well when it encounters it and the fields are hidden, as well as their value. If I go in Acrobat and optimize the PDF, discarding form submission, import and reset actions, then all go well, even after being merged with pdftk. My question is : is there a way to tell `hyperref` to not create form actions? Or is there a way to create fillable forms as easy as `hyperref`, and which do not create form actions.


title: pgfplots: enlarge x limits abs value and date coordiantes

text: Enlarging x limits of date coordinates by an absolute value used to work with pgfplots 1.4, but it gives me an error with the newer version 1.8. Can anyone suggest a working solution to the minimal example below?               \documentclass{article}     \usepackage{pgfplots}     \usepgfplotslibrary{dateplot}     \begin{document}     \begin{tikzpicture}     \begin{axis}[     date coordinates in=x,     xtick=data,     xticklabel style=     {rotate=90,anchor=near xticklabel},     xticklabel=\day. \hour:\minute,     date ZERO=2009-08-18,% <- improves precision!     enlarge x limits={abs=2009-08-18 06:00},     ]     \addplot coordinates {     (2009-08-18 09:00, 050)     (2009-08-18 12:00, 100)     (2009-08-18 15:00, 100)     (2009-08-18 18:35, 100)     (2009-08-18 21:30, 040)     (2009-08-19,       020)     (2009-08-19 3:00,  000)     (2009-08-19 6:0,   035)     };     \end{axis}     \end{tikzpicture}     \end{document}


title: How to get single curved quotation marks in math mode

text: I know I can get these fancy quotes               `abc'      ![enter image description here](http://i.stack.imgur.com/ziv51.png) I want to get those quotes separately. I know how to get the left one:               {`}a      ![enter image description here](http://i.stack.imgur.com/ahHBx.png) But when I try just the right one, I get a different quote then when used together:               abc{'}      ![enter image description here](http://i.stack.imgur.com/DaVYs.png) How can I get the right curved one alone in math mode? I am using `pdflatex`.


title: TexMaker - "File not found" when selecting section in structure view

text: I'm currently having a problem using TexMaker. When I'm selecting a section of the document in the structure view, TexMaker jumps to this specific section within the tex document but also displays the error "File not found" and closes the pdf preview in the internal viewer. This seems to be due to the fact that I'm using a subdirectory for the output files - but I don't seem to be able to find an option fixing this problem. Any help would be greatly appreciated!


title: Suppress running (Fancy) header on first page (of Glossary)

text: in an earlier question I asked to format the Glossary headings to match the chapter heading which was solved by Nicola Talbot thru Formatting of heading 'Glossary" to match chapter and index heading link for which I am really thankful. However, another small problem cropped up that when it was done, now the running header shows 'Glossary' on first page as well which should not show anything (just like chapter first page). I have posted the MWE for this code. I need to submit my thesis asap and this is the last glitch I am working on for which I would appreciate your help.               \documentclass[12pt]{report}     %%%%%%%%%%%%%% For page header/footer       \usepackage{fancyhdr}     \pagestyle{fancyplain}      \fancyhf{}     \setlength{\headheight}{15pt}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}     \lhead{\bfseries{\rightmark}}     \rhead{\bfseries{\thepage}}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage{makeidx}     \usepackage{sectsty}     \allsectionsfont{\bfseries}     \chapterfont{\centering\Large}      \sectionfont{\normalsize}     \subsectionfont{\normalsize}     \usepackage[subfigure]{tocloft}     \usepackage{tocloft}     \renewcommand{\cftchappresnum}{Chapter }     \renewcommand{\cftchapaftersnum}{:}     \renewcommand{\cftchapnumwidth}{7em}     \newcommand*\updatechaptername{%     \addtocontents{toc}{\protect\renewcommand*\protect\cftchappresnum{Appendix }}     }     \makeindex     \usepackage[nogroupskip,nonumberlist,acronym]{glossaries}      \newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols}     \makeglossaries       % Code provided by Nicola Talbot to make heading of  List of Acronyms and     % List of Symbols same as heading of List of Tables.      \renewcommand{\glossarysection}[2][\theglstoctitle]{%       \def\theglstoctitle{#2}%       \vspace{\cftbeforelottitleskip}%       \par\noindent       {\cftlottitlefont #2}{\cftafterlottitle}%       \vskip\cftafterlottitleskip     }     % % % % % % % % % % % % Glossary Entries  % % % % % % % % % % % %      \newacronym{sa}{SA}{sample acronym}     \newglossaryentry{Pi}{     name=$\pi$,     description={A mathematical constant whose value is the ratio of any circle's circumference to its diameter.},     sort=symbpi, type=symbolslist     }     \newglossaryentry{glos:ia}{     name=Integer Ambiguity,     description={The unknown number of whole carrier phase cycles between the user and the satellite at the start of tracking (Sometimes ambiguity for short).}      }     % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %     \usepackage{subfigure}     \begin{document}     \tableofcontents     \clearpage     \listoftables     \clearpage     \printglossary[type=\acronymtype,style=long,title=List of Acronyms \& Initialisms]     \clearpage     \printglossary[type=symbolslist,style=long] %Print list of symbols     \include{Sample}     \chapter{Sample}     This is my \gls{sa} and I can use it again. This is a symbol \gls{Pi}. This document\index{document} also has an index\index{index}.     \begin{table}      \caption{Sample Table}     \end{table}     \updatechaptername     \clearpage     \glsaddall     \printglossary[] % Print list of symbols     \clearpage     \printindex     \end{document}


title: Hexagon composed of equilateral triangles

text: Here's a nifty question! I would like to create a similar diagram to the one below, but I do not have the slightest clue how. Latex is all very new to me but I have managed to use Tikz to scribe number lines and basic commutation diagrams. Any answer will be gratefully received. ![enter image description here](http://i.stack.imgur.com/jhZeR.jpg)


title: Pgfplotstable for journals

text: a) Most journal have old LaTeX distribution or do not want to bother with “complicated” packages such as those derived from `pgf` (see Using TikZ in journal articles). I have build a table using `pgfplotstable` and I would like the editors to reproduce its formatting. However, due to remark a), I suppose it will be better not to include the corresponding code in my submission but something that _self-compile_. Is there a way to include my table in a fashion similar to externalization with `TikZ`? Not including another _non-standard_ package would be better; the definition of _non-standard_ being rather dependent on the targeted journal. In any case, I suppose the editors would have the table rekeyed to fit their style. How do you suggest to provide them with the data of the table?


title: Remove vertical space at start of latex document

text: I have this test file which is supposed to put `Hello there.` near the top of the page but it does not work in so far as there is still tons of vertical space at top. How can I fix this?               \documentclass{article}     \begin{document}     \vspace{-10cm}     Hello there.     \end{document}


title: Creating complex tables with multicolumn on different lines on latex

text: Can someone help me creating this table, I can't figure out how `\multicolumn` work. I can get to the first two rows of the table but no further. Please help. Thanks ![enter image description here](http://i.stack.imgur.com/cDWdx.jpg)


title: What are the possible positions can be used with the background package?

text: I can't find the possible positions documented anywhere. I am looking for positions like `current page.south west`, etc. Anyone knows where I can find complete list of the possible positions? The problem I am having is that I am using the `background` package and the `\SetBgPosition` takes a position. I am having hard time figuring out how to place the text in the center bottom of the page.


title: How can I add acknowledgements on the title page as a numbered footnote?

text: I was asked to add acknowledgements to the right of the author name as the first footnote. (So the footnote should be numbered as "1" but for some reason it only shows asterisk "*".) Could anyone help me?               \documentclass[12pt,letterpaper,leqno,pdftex]{article}     \title{AAAAA}     \author{BBBBB\footnote{CCCCC} \\DDDDD University }     \date{\today}     \begin{document}     \begin{titlepage}     \maketitle     \begin{abstract}     EEEEEE     \end{abstract}     \end{titlepage}     \end{document}


title: How to format source to take advantage of VCS?

text: Building on _What are good working practices for VCS with LaTeX documents?_ , are there best practices for **formatting** (La)TeX source files to take advantage of version-control systems? I keep my résumé in LaTeX form in a git repository, for example, saving various job-offer–specific tweaks in branches. When I update the formatting or basic information on the main branch, I try to rebase the tweaked branches to fit, but the operation tends not to apply cleanly. I don’t have this problem with my C code, so I’m wondering how I might do better with LaTeX source.


title: csvsimple and more filters

text: how do I use csvsimple (or what else? pgfplotstable?) with more than 1 condition as filter (i need about 7) to show a filtered csv-file as table? I tried things like:               filter=\equal{\gender}{m} and \equal{\grade}{5.0}      but that does not work. Example see below. Thanks.               \documentclass{article}     \usepackage{csvsimple}     \usepackage{filecontents}          \begin{filecontents*}{testdata.csv}     name,gender,grade     Hans,m,1.0     Anna,f,2.3     Anton,m,5.0     Hilde,f,5.0     \end{filecontents*}               \begin{document}          \begin{tabular}{lc}     \csvreader[head to column names,filter=\equal{\gender}{m}]{testdata.csv}{}     {\\\name & \grade}      \end{tabular}          \begin{tabular}{lc}     \csvreader[head to column names,filter=\equal{\grade}{5.0}]{testdata.csv}{}     {\\\name & \grade}      \end{tabular}          \begin{tabular}{lc}     \csvreader[head to column names,filter=\equal{\gender}{m} and \equal{\grade}{5.0]{testdata.csv}{}     {\\\name & \grade}      \end{tabular}          \end{document}


title: Reference multiple subfloated figures using \ref{X,Y,Z} to give Fig. 1a,1b,1c in text

text: I want to reference labels in the sentence, as above in the code: like this - \ref{X,Y,Z} to give "Fig. 1a,1b,1c" or "Fig. 1a-c" in text.               \documentclass{article}          \usepackage{subfig}     \usepackage{cite}     \usepackage{hyperref}          \begin{document}         ...in the three statistically favoured models (Fig.~\ref{fig:LocalPoly1_residual,        fig:IDW2_residual, fig:RBF_residual}) discussed below and not as well in the case of      GlobalPoly5 (Fig.~\ref{fig:GlobalPoly5_residual}).          \begin{figure}[h!]       \centering       \subfloat[GlobalPoly5]{\label{fig:GlobalPoly5_residual}\includegraphics[width=0.25\textwidth]{"Data Analysis Files/GlobalPoly5_residual"}}                       \subfloat[LocalPoly1]{\label{fig:LocalPoly1_residual}\includegraphics[width=0.25\textwidth]{"Data Analysis Files/LocalPoly1_residual"}}       \subfloat[IDW2]{\label{fig:IDW2_residual}\includegraphics[width=0.25\textwidth]{"Data Analysis Files/IDW2_residual"}}       \subfloat[RBF]{\label{fig:RBF_residual}\includegraphics[width=0.25\textwidth]{"Data Analysis Files/RBF_residual"}}       \caption{Residual plots of each of the interpolators.}       \label{fig:residualplot}     \end{figure}          \end{document}      @Leo Liu : it gives a lower case "f" for "figs." - do you know how make it uppercase "F" for consistency with my labelling elsewhere?


title: Darker fonts for TeX output to PDF

text: Sources for darker fonts for math fonts and AMS math symbols for PDF output via, say, dvipdfm.exe? * * * (1st response -- copied from by moderator) Many thanks for the help. I'm just using TeX and not LaTeX. Yes, I should have said "heavier" fonts instead of "darker" fonts. The fonts I am using are just the standard Computer Modern as in Knuth's 'The TeXBook' except occasionally I get a symbol from an AMS collection of symbols. I also occasionally make use of the Euler fonts from the AMS for math symbols. My screen preview program is YAP, and it has an option to make the fonts on the screen heavier. That option saves me. If Adobe's Acrobat had an option like that, then I would not have asked this question or be concerned about fonts. For printing on paper, I use an old HP 4p 600 dot per inch laser printer: On paper, the characters ('glyphs'?) from TeX are reasonably heavy. The main problem is that when using the program DVIPDFM.EXE to convert TeX dvi output to PDF, the characters are not heavy enough as displayed on my screen by Adobe's Acrobat reader. So, Acrobat could use a darker option like YAP has. I looked at 'A Survey of Free Math Fonts for TeX and LaTeX' by Steven J. Hartke at http://www.ctan.org/tex-archive/info/Free_Math_Font_Survey/survey.pdf and on page 3 saw the footnote: "When on screen, the fonts are usually anti-aliased, often into a gray blur because the stems are not thick enough to fill a pixel. When printed with a high-resolution laser printer, the fonts are shown accurately, but I think are too thin. With a medium-resolution printer like an inkjet, there’s enough resolution to show the form of the letters (unlike on screen), but the low- resolution "bulks up" the letters compared to a highresolution laser printer, with the letters thus appearing darker." That paragraph explains well what I am seeing and the cause of the problem I'm trying to solve. That is, my question was not really asking to change from the Computer Modern fonts in TeX but to change how these fonts are displayed when converted to PDF and viewed with Acrobat. That is, it would appear that I could just leave everything about TeX alone, get DVI files as at present, and just have DVIPDFM.EXE use slightly heavier Adobe Type 1 fonts for what TeX is using. My TeX setup is ProTeX 1.2. I tried a more recent version, but it seemed to want to go directly to PDF and have me use Acrobat for screen preview instead of going to just to DVI and using YAP for screen preview. I would much rather use YAP for screen preview. So, after some days of struggle trying to make it work, I removed the later version of ProTeX and installed ProTeX 1.2 from the ZIP file I still had. So, that's where I am: Just TeX, just the standard TeX fonts, just the old ProTeX 1.2, YAP for screen preview, fonts heavy enough when printed on paper, but as in Hartke's footnote fonts too light as the Adobe Type 1 versions are displayed on a computer screen with Adobe Acrobat. Maybe a solution could be obtained just by adjusting some 'hints' or some such in the Adobe Type 1 definitions? From Hartke's footnote, it appears that my problem is from common up to nearly universal: Any font will look lighter on a computer screen in Acrobat than on 600 dot per inch paper. So, there should be enough interest for a solution. * * * (2nd response -- copied from by moderator) The responses were good and showed a lot of effort. It was time for me to respond. From the reference in your response, I extracted a quote that showed that the problem I was trying to solve will have to be nearly universal among users of TeX and LaTeX. While you did not like my response, in fact I responded in the only way permitted by the software at the Web site. In particular, your: "The space below each answer is for comments on those answers." does not correspond to anything I see on my screen from my recent copies of Internet Explorer and Firefox. For the question, net, I don't really need to change fonts in TeX and, instead, just change the Adobe Type 1 versions of the standard TeX fonts and used by Acrobat. That actually was essentially the way my question was stated. For my response, I responded as needed the only way permitted on the Web site. But you or someone voted down my careful, clear, illuminating response thanking everyone. So, in this response I will omit a "Thank you". And I will minimize my use of Stack Exchange in the future.


title: Prevent wrapfigure from wrapping the next section

text: Code:               \documentclass{article}     \usepackage[a5paper]{geometry}     \usepackage{wrapfig}     \usepackage{lipsum}     \begin{document}     \begin{wrapfigure}{l}{0.5\textwidth}       \rule{4cm}{12cm}     \end{wrapfigure}     \lipsum[1]          \section{Hello}          Hello section text     \end{document}      Prints: ![enter image description here](http://i.stack.imgur.com/VEurD.png)   1. How can I make it shift `\section{Hello}` to the left?   2. And more generally: never wrap any text in the new section, following wrapfigure?


title: Getting error while using top, and right braces in a listing

text: I am showing right and top braces, whereas while attempting to add overbraces using a new function called 'AddNoteOver', I am getting this error: _"Package tikz Error: + or - expected ...sting-1-start}{listing-1-end}{overbrace!.}"_ , my file is interpreted, though!.               \documentclass[english,a4paper,12pt]{report}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{lipsum}     \usepackage{tikz}     \usepackage{listings}     \usetikzlibrary{decorations.pathreplacing,calc}     \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}          \newcommand*{\AddNote}[4]{%         \begin{tikzpicture}[overlay, remember picture]             \draw [decoration={brace,amplitude=0.7em},decorate, thick,black]                 ($(#3)!([yshift=1.5ex]#1)!($(#3)-(0,1)$)$) --                   ($(#3)!(#2)!($(#3)-(0,1)$)$)                     node [align=center, text width=3cm, pos=0.5, anchor=west] {#4};         \end{tikzpicture}     }%          \newcommand*{\AddNoteOver}[3]{%     \begin{tikzpicture}[overlay, remember picture]         \draw [decoration={brace,amplitude=0.5em},decorate, thick,black]                 {($($(#1).north west$)-(0,-0.3)$) -- ($($(#2).north east$)-(0,-0.3)$) node [align=center, text width=3cm, pos=0.5, anchor=west,above=3mm] {#3}};     \end{tikzpicture}     }%          \begin{document}          \lipsum[1]          \begin{lstlisting}[     basicstyle={\fontsize{7}{8}\ttfamily},mathescape,     identifierstyle={\color{black}},     tabsize=2,     language=Java,     numbersep=1pt,     numbers=left,     xleftmargin=0.5cm,frame=tlbr,framesep=2pt,framerule=0pt,     morekeywords ={class,run}     ]     public  $\tikzmark{listing-1-start}$ PersistentJournal(PrevaylerDirectory directory)  $\tikzmark{listing-1-end}$      throws IOException {             PrevaylerDirectory.checkValidJournalSuffix(journalSuffix); $\tikzmark{listing-4-end}$             _monitor = monitor;             _directory = directory;             _directory.produceDirectory();s;             _journalSuffix = journalSuffix;                            $\tikzmark{listing-7-end}$         }     \end{lstlisting}          \AddNote{listing-4-end}{listing-7-end}{listing-4-end}{Right Brace!.}     \AddNoteOver{listing-1-start}{listing-1-end}{overbrace!.}          \end{document}      ![enter image description here](http://i.stack.imgur.com/zTqp2.gif)


title: automatic resizing of edges with long labels

text: I would like to know if there is a way to automatically resize edges when they have long labels. For example, the following code               \documentclass[10pt]{article}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}          \begin{tikzpicture}        \node (a) [draw] {a};        \node (b) [draw, right=of a] {b};        \node (c) [draw, below right=of b] {c};        \draw [-stealth] (a) -- node[above]{\scriptsize very long label} (b);        \draw [-stealth] (b) -- node[below,sloped]{\scriptsize another long label} (c);     \end{tikzpicture}          \end{document}      produces labels which are longer than the corresponding arrows: ![result picture](http://imgur.com/xp4gH.png) I would like to know if there is a way to automatically resize each edge so that its label fits (not too loosely) between the endpoints of the edge. I want to do this independently of the length of the label. In particular, I do not want to manually set the separation between nodes as a specific numerical distance (e.g. 2 inches). This question can easily be translated to other drawing packages/programs. I would also like to know whether it is possible to implement a similar mechanism in metapost. EDIT: I have added a non-horizontal arrow to generalize the question, and better reflect my intent.


title: Suppress page number from Chapter side titlesec

text: I'm struggling with removing/suppressing the page number from pages with chapter headings. When using `\usepackage[pagestyles]{titlesec}` and                \newpagestyle{mystylep}{          \setfoot{}{}{}}      the page number on pages with only text is suppressed, but still appears on pages with chapter headings.. The pagestyle is used fro the Preface and Problem Description, right before the Abstract.. for the main text i use:               \newpagestyle{mystyle}{          \sethead[][][\chaptertitle]{\chaptertitle}{}{}          \setheadrule{.4pt}          \setfoot{}{\thepage}{}}      and for the appendix:               \newpagestyle{mystylea}{          \setfoot{}{\thepage}{}      I only like to take away the page number on pages with chapter heading in mystylep pages.. EDIT:               \titleformat{\chapter}[block]          {\normalfont\huge\bfseries}{\thechapter}{20pt}{\Huge}      \titlespacing*{\chapter}{0pt}{50pt}{40pt}           %Main     \newpagestyle{mystyle}{          \sethead[][][\chaptertitle]{\chaptertitle}{}{}          \setheadrule{.4pt}          \setfoot{}{\thepage}{}}           %App     \newpagestyle{mystylea}{          \setfoot{}{\thepage}{}}           %Pre     \newpagestyle{mystylep}{          \setfoot{}{}{}}      and:               \documentclass[pdftex,10pt,b5paper,twoside]{report}     \usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}     \usepackage{hyperref}     \usepackage[pagestyles]{titlesec}          \begin{document}     \pagenumbering{alph}     \pagestyle{mystylep}     \assignpagestyle{\chapter}{empty}     %\maketitle     \hypersetup{pageanchor=false}     \include{problem}     \include{abs}     \hypersetup{pageanchor=true}     \pagenumbering{roman}                    \pagestyle{mystyle}     \tableofcontents     \listoffigures     \listoftables     \end{document}      problem.tex               \chapter*{Problem Description}          Text text text text text ..............          \vspace{1in}          \noindent     Assignment given: date     \\     Supervisor: NAME      abs.tex               \begin{abstract}     text text text text ........     \end{abstract}


title: Partial ToC over the chapter title

text: I want to create something similar to that on a chapter page:                 _____________________________       |                            |       |         Section 1 .... 3   |       |         Section 2 .... 5   |       |                            |       |                            |       |   Chapter Title            |       |                            |       |____________________________|


title: Old ligatures in Siṇhala

text: I am trying to reproduce a term from an old Siṇhala-English dictionary. I have checked several fonts and the best candidates for the job seemed coming from the Bhashitha font family. The font contains some ligatures. The question is how to get them automatically? I've tried to typeset **nimnasthaana** with the help of Lexilogos. The term is mentioned on page 289 in the book (it's page 597 of 1676 in the PDF file), the ligatures are the second and the third letter. I am getting line one in the example below. I know that the first consonant in consonant conjuncts is without virama, therefore instead of **nimnasthaana** I used **nimanasathaana** (m -> ma and s -> sa). I am getting the second line and I am closer to the wanted visual form, but I am pretty far from getting those two ligatures. ![example-input](http://i.stack.imgur.com/tuKS8.png) I cannot copy glyphs directly from the PDF file, we would get _^Saaeoftos?_ , it is a result of OCR containing only Latin letters. If we run:               otfinfo -s BhashitaComplex.ttf        we are getting this information:               sinh            Sinhala       sinh.zz01       Sinhala/<unknown language>        I've tried several way to turn on **zz01** (as a language, script, feature, rawfeature), but it didn't help me much with getting ligatures. My problem seems to be more general. It is likely that some old ligatures are not present in the font, so I tried to get **mra** (ම්‍ර). When I tried `m+ra` or `ma+ra`, I am getting two separate glyphs. If I copy the final glyph from Lexilogos, the typesetted result is all right. Also, if I use `\char"E168`, the glyph is there as well. It's likely there is a better font and/or way for this task, the Bhashitha font family is the Level 3 font, it's probably the best font we could get these days. Still, my next step would be to check fonts from http://www.kaputa.com/sinhalaunicode/sinhalafonts/, but it's hard to say if I can improve my current state. **Edit:** I've checked those fonts manually and it looks none of them is the Level 3 font. The biggest file in size is [Thara](http://www.kaputa.com/sinhalaunicode/sinhalafonts/fonts/THARA.zip; 930 KB), but even that font contains only a basic set of glyphs. I am enclosing an example and a preview of my efforts. The first preview is from `xelatex`, the second picture is a result without compositions/ligatures after running `lualatex`. My last screenshot is a proof that some old ligatures are present in the font.               % run: xelatex or lualatex mal-sinhala.tex     \documentclass[a4paper]{article}     \pagestyle{empty}     %\usepackage{xltxtra}     %\usepackage{luatextra}     \usepackage{fontspec}     \setmainfont[Language=Sinhala]{BhashitaComplex.ttf}        % BhashitaComplex.ttf       % iskpota.ttf     \parindent=0pt     \begin{document}     නිම්නස්ථාන (nimnasthaana) \par     නිමනසථාන (nimanasathaana) \par       ම්ර-මර-ම්‍ර-\char"E168\ (mra-mara-mra/correct)     \end{document}      ![example-output-xelatex](http://i.stack.imgur.com/WICWE.png) ![example-output-lualatex](http://i.stack.imgur.com/JVMeD.png) ![fontforge-presence of ligatures](http://i.stack.imgur.com/8ap1o.png) **Update:** I've changed `Language=Sinhala` to `Script=Sinhala` and the output from `lualatex` is equal to the one from `xelatex`.


title: Improved fake small caps

text: Fonts that do not have real small caps simply scale down capital letters when you use `\textsc`. This looks unbalanced, as the letters are too thin. Can this be improved?


title: Creating a custom character that automatically adjusts size in math mode?

text: After a lot of searching, I finally found the .pdf's for the elusive Griffiths script r character used in his ubiquitous undergraduate electrodynamics book. I made a simple package that allows me to use the figures as math characters:               \NeedsTeXFormat{LaTeX2e}[1999/12/01]     \ProvidesPackage{scriptr}[2014/06/18 Griffiths' Script r Character]     \RequirePackage{graphicx}          \def\rcurs{{\mbox{$\resizebox{.101in}{.08in}{\includegraphics{C:/Program Files/MiKTeX 2.9/tex/latex/scriptr/ScriptR.pdf}}$}}}     \def\brcurs{{\mbox{$\resizebox{.104in}{.08in}{\includegraphics{C:/Program Files/MiKTeX 2.9/tex/latex/scriptr/BoldR.pdf}}$}}}     \def\hrcurs{{\mbox{$\hat \brcurs$}}}      There are two issues with it that I'd like to fix.   1. I would like to make it so that the character automatically adjusts its size in the main body of a document depending on the size of the font. For example, in 12pt font it looks like this: ![enter image description here](http://i.stack.imgur.com/GAKHT.png) In this case it looks as though it fits in perfectly with the rest of the text. However, in a smaller font size such as 10pt, it looks a little too big compared to its adjacent characters. In fact, it almost looks like capital letter: ![enter image description here](http://i.stack.imgur.com/pRebz.png)   2. A similar problem persists whenever working with the character in math mode. When used with \frac, the character looks fine: ![enter image description here](http://i.stack.imgur.com/mlRLv.png) But when used with \tfrac, the character looks far too big compared to what's in the numerator: ![enter image description here](http://i.stack.imgur.com/2ZHRf.png) What's the best way for me to make it behave more like an actual character in math mode?


title: Debub .bbl for missing right brace

text: I have a long .bbl which is generating an error when compiling with LaTeX. The error message is               ERROR: Paragraph ended before \name was complete.          --- TeX said ---     <to be read again>                         \par      l.1166           --- HELP ---     A blank line occurred in a command argument that shouldn't contain     one. You probably forgot the right brace at the end of an argument.      `l.1166` refers to the last line of my .bbl file.               ...     1161      \endverb     1162    \endentry     1163  \endsortlist     1164 \endrefsection     1165 \endinput     1166       But how can I easily identify the problematic bibliographic entry without try to remove them one at a time and rerun LaTeX each time?


title: Write a macro with \command, {, and } in argument

text: I understand that TeX macro arguments can be parsed using proper delimiters. And as the classic example goes in The TeXbook, ![enter image description here](http://i.stack.imgur.com/VFXYK.png) Along the same line, I tried to define a macro (for some special purpose, the following is actually a much simpler scenario of my situation),               \documentclass{article}          \def\mycommand\cone\bgroup#1\egroup\ctwo #2.#3\end{#1:#2:#3}          \begin{document}          \mycommand\cone{One}\ctwo Two.Three\end          \end{document}      Where, `\cone` and `\ctwo` are used/system defined macros, and I am not interested in these definitions, rather I would like to ignore them. My points of interest are the three arguments. Now, when I try compile the above file, I get the error message,               ! Use of \mycommand doesn't match its definition.     l.10 \mycommand\cone{                          One}\ctwo Two.Three      This is where I get stuck. Please note that the "`\cone{One}\ctwo Two.Three`" part is rather unalterable. So, any suggested change will have to be in the definition of `\mycommand`. I know that as has been pointed out also in The TeXbook, the parameter list can not contain any braces. To circumvent this, I tried using `\bgroup` and `\egroup`.


title: How to add a copyright page to the report class.

text: How do I add a copyright page, just after the title page in the report or book class? (Like in standard books about a block of a copyright license at the bottom of the page).