title: Wrote a new package. Is there some standard place to share?

text: So I finished writing my package for typesetting Begriffsschrift. I think it marks a marked improvement over the package begriff, which is the only other package for the same purpose, that I can find out there. Since there might be the odd philosopher/logician out there that has a use for it, and I've already gone through the trouble of writing some documentation for it. I was wondering whether there is some standard place to share packages. I have a plain .sty file a .tex and .pdf documentation file, and a copy of GNU. (Since the package is partially based on the begriff package which was released under GNU, I better do the same.)


title: How to declare a new environment similar to abstract in a report?

text: Similar questions have been asked, but none have answered my particular problem. I am trying to declare in a report a new environment which would be similar to the `abstract` environment. I have looked at the code in `report.cls` and found the definition for the `abstract` environment:               \if@titlepage       \newenvironment{abstract}{%           \titlepage           \null\vfil           \@beginparpenalty\@lowpenalty           \begin{center}%             \bfseries \abstractname             \@endparpenalty\@M           \end{center}}%          {\par\vfil\null\endtitlepage}     \else       \newenvironment{abstract}{%           \if@twocolumn             \section*{\abstractname}%           \else             \small             \begin{center}%               {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%             \end{center}%             \quotation           \fi}           {\if@twocolumn\else\endquotation\fi}     \fi      In my document I have declared the `test` environment in the same fashion, and used it as I would use `abstract`:               \documentclass[]{report}          \newcommand\testname{Test}          \newenvironment{test}{%         \small         \begin{center}%             {\bfseries \testname\vspace{-.5em}\vspace{\z@}}%         \end{center}%         \quotation}         {\endquotation}          \begin{document}          \begin{test}     Test     \end{test}          \end{document}      This results in the following error:               ./test.tex:15: Undefined control sequence. [\begin{test}]     ./test.tex:15: Missing number, treated as zero. [\begin{test}]     If you can't figure out why I needed to see a number,:15: Illegal unit of measure . [\begin{test}]      I understand the problem comes from the `\z@` but I understand neither why nor how to fix this.


title: How to make written text within math mode appear using the font of the surrounding text in ConTeXt?

text: In some parts of my document, I have text inside of math mode, to position text, e.g.:               \math{         \overset{             \text{This text is above.}         }         {             \text{This text is below.}         }     }      I found that any text placed inside `\text{}` inside `\math{}` will appear using the Serif body font, even within environments defined as Sans Serif, e.g.:               \starttypescript[serif][stsong]         \definefontsynonym[stsong][name:stsong][features=chinese]     \stoptypescript          \starttypescript[sans][stheiti]         \definefontsynonym[stheiti][name:stheiti][features=chinese]     \stoptypescript          \starttypescript[serif][stsong]         \definefontsynonym[Serif][stsong][features=chinese]     \stoptypescript          \starttypescript[sans][stheiti]         \definefontsynonym[Sans][stheiti][features=chinese]     \stoptypescript          \definetypeface[stsong][rm][serif][stsong]     \definetypeface[stheiti][ss][sans][stheiti]          \setupbodyfont[stsong, 12pt]     \starttext         {\stheiti This is some text.\math{\text{This is some more text.}}This is yet some more text.}     \stoptext        * Placing font definitions inside `\text{}`, such as `\text{\stheiti Text.}` is not a good solution, because much of this text is in macros which can appear in different places, such as in San Serif chapter titles, or in the main Serif text of the document.   * Setting a single font for math mode will also not be suitable for the same reason. How can I set the font inside text mode inside math mode to the font of the text surrounding it?


title: How to prevent column break in multicols environment

text: I am typesetting a simple songbook and would like some songs to be displayed in two columns (I use the `multicol` package). However, I would like to prevent inserting a columnbreak within a stanza. It would be great to have something like a `samecol` environment. I tried to apply hints from Prevent column break in multicolumn index, but it didn't yield the expected result. I'd be grateful for any advice.


title: longtable package: Stretch height of last row on page

text: Consider the following code               \documentclass[a4paper]{article}     \usepackage{longtable}     \usepackage{lipsum}          \begin{document}         \begin{longtable}{|p{5cm}|}             \hline             \lipsum[5] \\\hline             \lipsum[7] \\\hline             \lipsum[1] \\\hline             \lipsum[1-2] \\\hline             \lipsum[5]\\\hline %no stretching here         \end{longtable}         some text below the table     \end{document}      which will lead to the result (minimal zoom level). ![screenshot](http://i.stack.imgur.com/1RioK.png) As you can see the space between the lower border of the column and the lower page border differs for each page (especially on the 2nd one), which doesn't look good for me. What I want is that each time a page break occurs the height of the last row is extended (stretched), so the distance from the lower line of the table to the bottom of the page is equal on each page. This should not occur for the last row of the table, because it will be embedded in other content. In the MWE I provided the last page therefore should just look as it does right now without any modification. Do you have any idea how this can be achieved? [Edit] A fake screenshot of how the example would look like ![enter image description here](http://i.stack.imgur.com/10mQ5.png)


title: Problem with abstracts in the jams-l document class

text: I am preparing a submission to the Journal of the American Mathematical Society, and I'm using the `jams-l` document class. However, the abstract always appears after the body of my article text. Anyone knows how to move the abstract to the front, or am I doing something wrong? Here's some sample code where it happens. Sorry for the long code but I tried to not to delete anything that might have caused it. To load it, one needs the `jams-l.cls` package.               \documentclass{jams-l}          \newtheorem{theorem}{Theorem}[section]     \newtheorem{lemma}[theorem]{Lemma}          \theoremstyle{definition}     \newtheorem{definition}[theorem]{Definition}     \newtheorem{example}[theorem]{Example}     \newtheorem{xca}[theorem]{Exercise}          \theoremstyle{remark}     \newtheorem{remark}[theorem]{Remark}          \numberwithin{equation}{section}          \begin{document}          \title{}     \author{}     \address{}     \curraddr{}     \email{}     \thanks{}          \author{}     \address{}     \curraddr{}     \email{}     \thanks{}          \subjclass[2010]{Primary }          \date{}          \dedicatory{}          \begin{abstract}     abstract abstract abstract     \end{abstract}          \maketitle          text of article text of article text of article          \bibliographystyle{amsplain}          \end{document}


title: Colors in Pseudocode matlab style

text: How do I get colours and more control over spacing in the `algorithmic` package like this: ![enter image description here](http://i.stack.imgur.com/bBUqB.png) I tried this which looks good, but has numbers:               \begin{enumerate}        \item Create the cumulative sum of probabilities for each care type, thus defining the interval width        \item \textcolor{blue}{for} jj=1:m \textcolor{gray}{\% where m is the number of nurses}        \item Choose care type        \item \hspace{3cm}Randomly select care length ($n$) based on care type          \item \item \textcolor{blue}{for} ii=1:n  \textcolor{gray}{\% where n is the sequence length}        \item\hspace{3cm} Generate a random number $w$       \item \hspace{3cm}Check into which cumulative probability interval $w$ falls and choose the corresponding surface category       \item update ii=ii+1       \item update jj=i+1       \item \textcolor{blue}{end}       \item \textcolor{blue}{end}     \end{enumerate}      **But using`algorithm`**               \documentclass{article}     \usepackage{color}     \usepackage{algorithmic}          \begin{document}            \begin{algorithmic}     \STATE\COMMENT{Create the cumulative sum of probabilities for each care type, thus defining the interval width}       \WHILE{jj=1:m} \% where m is the number of nurses       \STATE\COMMENT{Choose care type}             \STATE\COMMENT{Randomly select care length ($n$) based on care type}       \WHILE{ii=1:n} \% where n is the sequence length             \STATE\COMMENT{Generate a random number $w$}             \STATE\COMMENT{Check into which cumulative probability interval $w$ falls and choose the corresponding surface category}       \ENDWHILE       \ENDWHILE         \end{algorithmic}     \end{document}      Looks nasty, like this: ![enter image description here](http://i.stack.imgur.com/u5121.png)


title: Registered trademark symbol doesn't show in compiled PDF

text: I am trying to get the registered trademark symbol by doing:               \documentclass{article}     \usepackage{textcomp}          \begin{document}           Trying to put registered trade mark symbol in\textregistered          \end{document}      But when I compile my document with TeXniCenter and look at the PDF there is just blank white space where the symbol should be. Compilation method is LaTeX -> PS -> PDF. I am viewing with Adobe reader.


title: Shrink table to fit on a page, or keep it as it is

text: I am using               \resizebox{\columnwidth}{!}{% ... %}      to fit a table which might be too wide onto a page by scaling it down. However, my problem is that if the table is smaller than the column width, it gets scaled up, which looks really ugly, and, more importantly, it can then become too long to fit on the page. So how do I change above to either shrink it or keep it the same, but not scale it up? I need something along the lines of               \resizebox{min(\columnwidth,\originalwidth)}{!}{% ... %}


title: page break in the middle of a \cite

text: With pdflatex all my citation are pdf hyperlinks to the respective entry in the bibliography. This causes a problem when occasionally Latex decides to do a page break in the middle of a citation so that the citation starts on page n and and ends on page n+1. The problem then is that the footer of page n (containing page number) and the header of page n+1 (containing chapter name) are also included in the hyperlink. This looks especially ugly in pdf viewers that highlight such links (like evince). So far I have solved this problem by rewriting the text until the page break no longer coincides with a citation but is there a better solution? I don't mind citations spanning pages, I just don't want the header and footer to be included in the hyperlink.


How can I use color in a mathematical expression without losing horizontal spacing? ![enter image description here](http://i.stack.imgur.com/XDQvK.png)               \documentclass{article}     \usepackage{xcolor}     \definecolor{red}{HTML}{dd0000}     \begin{document}     \[3+(-5)-2+3\]     \[3+(-5){\color{red}-2}+3\]     \end{document}


title: Book - information page

text: I have a question regarding the latex book class. I want to add a page (in the frontmatter) with information regarding copyright, ISBN, edition information, publisher, number of copies, year of publication, place of print, etc. Is there a standard way of getting this information printed nicely?


title: Tikz - How to connect nodes

text: \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \begin{document}     \begin{tikzpicture}     \draw (0,2.5) node[minimum height=1cm,minimum width=3cm,draw] (A) {A};     \draw (5,0) node[minimum height=1cm,minimum width=3cm,draw] (B){B};     \draw (5,1.5) node[minimum height=1cm,minimum width=3cm,draw] (C) {C};     \draw (5,3) node[minimum height=1cm,minimum width=3cm,draw] (D) {D};     \draw (5,4.5) node[minimum height=1cm,minimum width=3cm,draw] (E) {E};          \draw[-latex] (A.east) |- (B.west);     \draw[-latex] (A.east) |- (C.west);     \draw[-latex] (A.east) |- (D.west);     \draw[-latex] (A.east) |- (E.west);     \end{tikzpicture}          \end{document}      With Stefan's help I manage to draw the lines that travel straight and make 90 turn. The output of that solution is on the left side of the attached image. My goal is to produce result as shown on the right side of the image. I already asked similar question earlier, check here Tikz Drawing Arrow between nodes ![alt text](http://i.stack.imgur.com/8FxwQ.jpg)


title: Writing Chapter Prefix for Chapter entries in TOC

text: I am looking for the code that allow me to append prefix "Chapter" to Chapter Entries only not for the front matter like Abstract, Declaration and also not for the Bibliography and appendices. Here below what I am looking for. I do not want Chapter to be printed before Candidate's Declaration, Abstract, Acknowledgment, LOF, LOT, List of abbreviations. I need it to be printed before Chapters only. Here is what I used               \makeatletter          % Per-section appendicies     \newcounter{Appx}     \numberwithin{Appx}{chapter}     \def\@Appx[#1]#2{     \refstepcounter{Appx}     \section*{%     \addcontentsline{toc}{section}{\appendixname\ \Alph{Appx}\quad#1}%     \appendixname\ \Alph{Appx}\quad#2}     }     \def\@@Appx#1{\@Appx[#1]{#1}}     \def\Appx{\@ifnextchar[\@Appx\@@Appx}          % "Chapter" prefix in ToC     \let\@@l@chapter\l@chapter     \def\l@chapter#1{\@@l@chapter{\chaptername\ #1}}          \makeatother      ![Table of Contents](http://i.stack.imgur.com/zb2XT.png)


title: Formatting acronym in tableofcontent

text: I got a problem with my `\tableofcontents` command. At first I post a simple example:               \documentclass[       12pt,       a4paper,       DIV13,       pdftex,            BCOR10mm,       smallheadings,       fleqn,       liststotoc,       bibtotoc,       cleardoubleempty       ] {scrbook}      \usepackage{acronym}       \begin{document}         \tableofcontents          \section{Acronyms}         \begin{acronym}[SQL]          \acro{CMS}{Content Management System}          \acro{SQL}{Structured Query Language}          \acro{Bash}{Bourne-again shell}         \end{acronym}         \listoffigures          \listoftables         \section{section1}         blablabla \ac{CMS} blablabla         \section{section2}         blablabla \ac{SQL} blabla \ac{SQL}     \end{document}      My problem is now, that the Headline of Acronyms got the same style as section1. But I want the same style as `\listoffigures` in my `\tableofcontents` and in the rest of the document. Can anybody help me, please?


title: How to move page number?

text: I want to change the position of the page number. I've read around here that some suggest to use the `fancyhdr` package, but I don't want to use it – I'm a beginner to LaTeX so I don't want to use a package that could change the margins and other specifications to the layout that I've already made. Does anyone have any idea how to, or possibly correct me if my concerns (in regard to `fancyhdr`) are unfounded?


title: How to add the citation keys to the bibliography?

text: How can I add the citation key to the bibliography? Let's take this entry as an example:               @book{Fowler1999,       address = {Boston, MA, USA},       author = {Fowler, Martin},       description = {AOEvolutionchapter short paper},       isbn = {0-201-48567-2},       publisher = {Addison-Wesley},       title = {Refactoring: Improving the Design of Existing Code},       year = 1999     }      I would now want the bibliography in my PDF document to look like this: [Fowler1999] Martin Fowler. _Refactoring: Improving the Design of Existing Code_. Addison-Wesley, Boston, MA, USA, 1999. ISBN 0-201-48567-2. Can someone please help me? I'm using **natbib** and bibliographystyle **plainnat**. And since it's the last day before deadline and I'm not that familiar with LaTeX, I'd prefer a solution where I don't need to change those two... **EDIT:** apparently I did not express myself well. I don't want those keys in the text. There I already have them. I want them to appear in my bibliography as well. Instead of: `Martin Fowler. Refactoring: Improving the Design of Existing Code. Addison- Wesley, Boston, MA, USA, 1999. ISBN 0-201-48567-2.` I want: `[Fowler1999] Martin Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston, MA, USA, 1999. ISBN 0-201-48567-2.` Note that Fowler1999 is the citation key I used.


title: Remove period at the end of subsubsection

text: I am using amsart. For specific isolated uses of subsubsection*, I would like to prevent the addition of a period at the end of the title. MWE:               \documentclass{amsart}     \usepackage{tikz}          \begin{document}          \subsubsection*{Don't fence me in}  Some text.          \subsubsection*{Or at least let me use pictures like} {\it \hspace{-.3cm}      $\begin{tikzpicture}[scale=0.2]     \draw[double] (0,0) -- (1,1) -- (1,0);     \end{tikzpicture}$ inside a title.}     Some more text.          \subsubsection*{Fine go ahead}  And a bit more.          \end{document}      In this example, in the second use of \subsubsection*, I would like to remove the period after `like'. As you can see, my real motivation is to be able to use tikz in a subsubsection heading, but in my circumstance, it seems the easiest workaround would just be to remove the period and fake the second half of the section title, as above.


title: Custom date format

text: I am trying to create a fancy date format as shown below: ![enter image description here](http://i.stack.imgur.com/xNPam.png) The following is a MWE of what I have so far. For some reason or the other I can't seem to get the right height. ![enter image description here](http://i.stack.imgur.com/Ovm34.png)               \documentclass[letterpaper]{article}     \usepackage{graphicx}     \usepackage{datetime}     \usepackage{calc}          \newlength{\dateboxheight}     \setlength{\dateboxheight}{%         \heightof{%             \parbox[b]{3em}{%                 May\\ %                 2014%             }         }     }     \newdateformat{squaredate}{%     \mbox{%     \resizebox{\dateboxheight}{!}{\THEDAY}~%     \parbox[b]{3em}{%             \monthname[\THEMONTH]\\ %             \THEYEAR%     }}}          \begin{document}     \squaredate\today     \end{document}      Any suggestions or improvements are welcomed. I know this can be done in TikZ; hence, I would consider it as a possible solution. Other improvement that are welcomed could be that the other months, like November, could be abbreviated so that they have the same width of May; that is, Nov. Probably an `\ifelse` case?


title: URL citation: Control breaks and add 'Accessed' as prefix text

text: Please consider the following BibTex reference output (source can be found below): ![enter image description here](http://i.stack.imgur.com/lHzR3.png) I am using `\bibliographystyle{plain}` as the output fits the requirements of a paper I'm writing. I tried `natbib`, but didn't come along with it as all bibliography styles have changed, even when using the `plainnat` style. What doesn't work good is the citation of referenced URLs that need to contain a date when they were accessed. All other citations (I do cite books, papers, etc. as well) work just like they should. 1) Is there any way to add the prefix 'Accessed:' before the dates (and only if they are present?), the first entry would look like               [1] Wikipedia, https://en.wikipedia.org, Accessed: March 2014      2) Is there any way to control the breaking of URLs in a way that it is prefered to not break them (in the examples [3] and [4] the URL could stay together if a linebreak was inserted before it, while the URL of example [5] is juts too long to stay within a single line)? 3) Is there an easier way to define a URL entry than I did (see below)? Here is the LaTex source:               \documentclass[a4paper]{scrartcl}         \bibliographystyle{plain}         \usepackage{url}         \usepackage{cite}         \begin{document}         \nocite{wiki-web1,wiki-web2,wiki-web3,wiki-web4,wiki-web5}         \bibliography{bibtex}     \end{document}      and the BibTex source:               @Other{wiki-web1,       Title                    = {Wikipedia},       HowPublished             = {\url{https://en.wikipedia.org}},       Month                    = mar,       Timestamp                = {2014.03.16},       Year                     = {2014}     },          @Other{wiki-web2,       Title                    = {Wikipedia},       Author = {Wikipedia Foundation},       HowPublished             = {\url{https://en.wikipedia.org/wiki/Main_Page}},       Month                    = mar,       Year                     = {2014}     },          @Other{wiki-web3,       Title                    = {Wikipedia},       Author = {Wikipedia Foundation (SF)},       HowPublished             = {\url{https://en.wikipedia.org/wiki/Main_Page}},       Month                    = mar,       Year                     = {2014}     },          @Other{wiki-web4,       Title                    = {Wikipedia},       Author = {Wikipedia Foundation (SF)},       HowPublished             = {\url{https://en.wikipedia.org/wiki/Main_Page}},       Month                    = mar,       Year                     = {2014}     },          @Other{wiki-web5,       Title                    = {Wikipedia},       Author = {Wikipedia Foundation (SF)},       HowPublished             = {\url{https://en.wikipedia.org/wiki/File:Camborne_Redruth_Community_Hospital_-_geograph.org.uk_-_716833.jpg#filehistory}},       Month                    = mar,       Year                     = {2014}     }


title: Listing Chapter/Section/Subsection numbers with the preview

text: After compiling all the content of the book, I use Adobe reader to preview the content. Note that the legend that I use to navigate through the book (the listing on the left (usually) with the option '+' on which one clicks, and it offers the content) only contains the Chapter/Section/Subsection names. How could I change this to include the numbering, i.e, such that the legend contains, e.g., '3 Chapter name' with '+' sign, and it opens to, e.g. '3.1 Section name'... I hope you understand what I'm asking.


title: How to Resolve Compilation Error in "tcolorbox.sty" File

text: I am trying to make a simple colorbox using the package `tcolorbox` but receiving a compilation error by just including the `tcolorbox.sty` file. Please consider the following code:               %\documentclass[12pt]{article}     \documentclass[dvipsnames,cmyk]{article}          % File Containing All the Control Settings     \usepackage{../../Style/mystyle}     \usepackage{../../Style/tcolorbox/tcolorbox}    ---> This line is giving compilation Error     \usetikzlibrary{matrix}     \begin{document}           \end{document}      Compilation Error:               ! Paragraph ended before \pgfkeys@@qset was complete.      The Offending lines in the `tcolorbox.sty` file are:               parskip/.style={before={\par\pagebreak[0]\noindent},after={\par}},     noparskip/.style={before={\par\smallskip\pagebreak[0]\noindent},after={\par\smallskip}},      Please guide me how to resolve this error.


title: Original date of publication in Biblatex

text: I am using a bibliography that contains items with the original date of publication, as well as the modern reprint. A typical entry, for instance is:               @book{Mill1965,       author = {Mill, John Stuart},       Location = {London},       Publisher = {Longmans},       Title = {A System of Logic, Ratiocinative and Inductive},       Subtitle = {Being a Connected View of the Principles of Evidence and the Methods of Scientific Investigation},       Year = {1965 [1843]}}      And the typeset bibliographic entry goes like this:               Mill, J.S. (1965 [1843]). A System of Logic, Ratiocinative and Inductive. Being a Connected View of the Principles of Evidence and the Methods of Scientific Investigation. London: Longmans.      The result of a cite command (`\cite{Mill1965}`) is:               Mill 1965 [1843]      I'm loading `biblatex` with the following options:               \usepackage[backend=biber,style=authoryear-comp,firstinits=true]{biblatex}      How can I adapt the default `biblatex` styles to actively use the `origdate` field, in order to show that value in the biblography ending?


title: Defining \xthinspace: Thin space only if not followed by certain characters

text: Following this 2005 thread from the XeTeX list, I’ve defined a `\spaceddash` command and assigned it to the Unicode em-dash character U+2014 “—”:               \documentclass{minimal}     \usepackage[utf8]{inputenc}     \DeclareRobustCommand{\spaceddash}%         {\unskip\nobreak\thinspace\textemdash\thinspace\ignorespaces}     \DeclareUnicodeCharacter{2014}{\spaceddash}          \begin{document}     meow — meow          meow—meow          — meow          meow —.     \end{document}      The document this produces looks something like this: > meow — meow   >  meow — meow   >  — meow   >  meow — . Notice the thin-space between the em-dash on the last line and the period afterward—I’d like to get rid of it. Following the example of xspace & xpunctuate, I’m trying to define a sort of `\xthinspace` command, one that will insert the `\thinspace` _except_ if the dash is followed by certain punctuation marks ( _e.g._ , period, comma, close- parenthesis, close-quote). How do I go about this?


title: Help With TikZ: Recreating Diagrams from e/m Ratio Experiment—Helmholtz Coils and Circuitry

text: I have two images I need to recreate in TikZ. The first is that of Helmholtz coils and their spacing in the experiment: ![enter image description here](http://i.stack.imgur.com/mqBG6.png) And the second being the wiring for the coils: ![enter image description here](http://i.stack.imgur.com/XMhhg.png) My (very) Minimal working example for the first picture is as follows:               \begin{figure}     \centering     \begin{tikzpicture}     \draw(1, 1) circle (170 pt);          \draw(7, 7) -- (9, 7);          \draw (8, 1) node {\Huge $d$};          \path[->,>=angle 90, thick](8, 2) edge (8,6.5);          \path[->,>=angle 90, thick](8, 0) edge (8, -4.5);          \draw(7, -5) -- (9, -5);          \draw[very thick] (-4.5, 7) rectangle (-2.5, -5);          \draw[very thick] (4.5, 7) rectangle (6.5, -5);          \draw[loosely dashed] (-3.5, 9) -- (-3.5, -7);          \draw[loosely dashed] (5.5, 9) -- (5.5, -7);          \draw (1, 1) node {\Huge $\frac{d}{2}$};          \path[->,>=angle 90, thick](0, 1) edge (-3.5, 1);          \path[->,>=angle 90, thick](2, 1) edge (5.5, 1);          \path[->,>=angle 90, very thick] (0, 3) edge (2, 3);          \end{tikzpicture}     \caption{Helmholtz Coil Geometry}     \label{Helmholtz}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/fbnda.png) And for the Second Image, which is even more minimal, I have                   \begin{figure}     \centering     \begin{tikzpicture}     \draw[thick] (0, 5) rectangle (7, 0);          \draw[thick] (-6, 7) rectangle (-2, -0.5);          \draw[thick]  (1, 4.2) circle (5 pt);          \draw[thick]  (3.5, 3.9) circle (5 pt);          \draw[thick]  (6, 4.2) circle (5 pt);          \draw[thick]  (1, 0.8) circle (5 pt);          \draw[thick]  (3.5, 1.1) circle (5 pt);          \draw[thick]  (6, 0.8) circle (5 pt);          \end{tikzpicture}     \caption{Wiring Diagram for Helmholtz Coils}     \label{Circuit}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/c2ITB.png)


title: Scale all TikZ images in a document by the same factor

text: Is it possible to scale all `TikZ` pictures in a document by the same factor globally? Something like `\usepackage[scale=0.9]{tikz}` doesn't work.


title: How to manipulate footer

text: I am trying to write a footer in every page, but the text in footer (only a few words), is too close to the text of the page. So I want the footer text to shift little bit to the end of the actual page so that the actual text and footer text is easily distinguishable.


title: Defining Extensible macros

text: ## Question: For a macro that has _only_ one parameter, are there any issues with defining it as follows:               \NewDocumentCommand{\MyMacro}{%         s%    #1 = starred variant            (*** unused as of yet ***)         O{}%  #2 = optional parameter         (*** unused as of yet ***)         O{}%  #3 = another optional parameter (*** unused as of yet ***)         m%    #4 = the mandatory parameter     }{%         \emph{#4}%     }%      Note that the first three parameters are unused and are intended for possible future enhancements. ## Notes:   * The example usage here is just for illustrative purposes. This is for more complex macros where enhancements which were not obvious at the time of creation may be needed in the future.   * I initially tried defining macros to hold each of the parameters as:              \def\GivenText{#1}%     \def\ColorToUse{#2}%      but found that this has its own issues (see Reference) if the macro that called this macro had used the same name, so have moved away from this approach. ## References:   * An example of why I do _not_ always use a `\def` to hold the value of the parameters is provided in What is the preferred way of defining a TikZ constant? ## Background: In the process of developing my macros, I noticed that I tend to start with something like:               \newcommand{\MyMacro}[1]{\emph{#1}}%      The I later realize that I want to add an optional parameter:               \newcommand{\MyMacro}[2][black]{\textcolor{#1}{\emph{#2}}}%      where I have to locate all the occurrences of `#1`, replace them with `#2`, which isn't too difficult, but gets more difficult with more mandatory parameters. Then later, I realize that I want to define a starred variant (or have more than one optional parameter) at which time I switch to using the `xparse`'s `\NewDocumentCommand`:               \NewDocumentCommand{\MyMacro}{%         s%         #1 = starred variant         O{black}%  #2 = optional parameter         m%         #3 = the mandatory parameter     }{%         \textcolor{#2}{%             \IfBooleanTF{#1}{%                 #3%             }{%                 \emph{#3}%             }%         }%     }%      ## Code:               \documentclass{article}     \usepackage{xcolor}     \usepackage{xparse}          %\newcommand{\MyMacro}[1]{\emph{#1}}%  Version 1          %\newcommand{\MyMacro}[2][black]{\textcolor{#1}{\emph{#2}}}% Version 2          \NewDocumentCommand{\MyMacro}{%  Version 3         s%         #1 = starred variant         O{black}%  #2 = optional parameter         m%         #3 = the mandatory parameter     }{%         \textcolor{#2}{%             \IfBooleanTF{#1}{%                 #3%             }{%                 \emph{#3}%             }%         }%     }%                    \begin{document}     Some \MyMacro*[red]{not so important text} and even less important text.     \end{document}


title: Italics/roman in BibTeX

text: I use a BibTeX style which automatically italicises booktitles (using `\emph`). I have certain entries which contain italicised words in the title. I would like these to appear non-italicised (in roman) in the final PDF output. Using any of `\emph` or `\textit` or `\textrm` on these items doesn't seem to make any difference -- the whole title still appears in italics. Minimal .bib entry               @PHDTHESIS{klein1974,     author = {Klein, Jared S.},     title = {The Particle \emph{u} in the {R}igveda},     school = {Yale},     year = {1974},     address = {New Haven, CT},     timestamp = {2009.12.04}     }      Minimal .bbl entry generated by `sp.bst`:               \bibitem[{Klein(1974)}]{klein1974}     Klein, Jared~S. 1974.     \newblock \emph{The particle \emph{u} in the {R}igveda}.     \newblock New Haven, CT: Yale dissertation.


title: How to get rid of this footer from the ACM template?

text: How can I remove the footer as is included in the ACM double column template? I created a screenshot of it: http://cdn.imghack.se/images/223c46062e6b28d6b0d9dc9500bf6098.jpg A minmal file producing this footer looks like this:               \documentclass{acmtog}          \acmVolume{28}     \acmNumber{4}     \acmYear{2009}     \acmMonth{September}     \acmArticleNum{106}     \acmdoi{10.1145/1559755.1559763}          \begin{document}     \title{a}     \author{a}     \maketitle     \end{document}      When I remove the following lines...               \acmVolume{28}     \acmNumber{4}     \acmYear{2009}     \acmMonth{September}     \acmArticleNum{106}     \acmdoi{10.1145/1559755.1559763}      ..then I get errors. I'm a beginner and confused why the template or more precisely the .cls file demands this information. I mean shouldn't it be possible to compile without having an ACM article number for example? The respective .cls file is from http://www.acm.org/publications/latex_style/ (v2-acmtog.zip)


title: Typesetting with "odd-shaped" margins

text: I am considering a poster presentation that I would like to design using nonstandard margin shapes. Current standard essentially puts elements inside a rectangle determined by page size, header and footer spacing, margin widths and likely other things I don't know. I think I can get the effect I want by specifying a slanted margin, e.g. specify spacing at the top of the page, and a slope for the left margin (separately for the right margin). Think of it as specifying typesetting for a trapezoidal sheet of paper. (Although slanted lines of text would be cool, I don't intend to use that: just slanted left and right margins. Knowing how to slant the text line (not the font) would be a bonus, though.) Is there a LaTeX package that would allow specification of slanted margins, especially on a per page basis? (Yes, I am considering different slopes for different pages.) Is there one which would allow a shaped margin? (I doubt I would use it for this project, but having the margin slope change halfway down the page might have its uses. Curves and more interesting effects would be a bonus.) Suppose I have use a package which lets me specify a slanted margin with slope 10 (so as I go down the page 10 inches, the margin slides over steadily until it is one inch further left). What are the readability issues in doing this? Is it a bad idea for a page with more than, say 30 lines of text?


title: LaTeX: C++ source code can be included with verbatim, but not with lstlisting

text: When trying to compile my .tex files, I can only include some of my C++ source code as "lstlisting"s, while other source code breaks compilation. The error I get is:               Extra }, or forgotten \endgroup.     <recently read> \egroup           l.99    m.             color.g = 0;     ?       As you can see, it also shows a seemingly random line of the C++ source code as being "wrong". Deleting this line from the lstlisting will just make the error point to the same line (which is then changed in content, but the error stays the same). This is in the appendix of my report. Concretely, this doesn't work:               \begin{lstlisting}[frame=single, caption=\lstinline|slam_karto.cpp|: The publish graph function is mostly outsourced to the solver.]     void SlamKarto::publishGraphVisualization() {         if(!got_map_)              return;              graphMutex.lock();              team_slam::TimeStampedMarkerArray marray;              visualization_msgs::Marker m;         m.header.frame_id = "map";         m.header.stamp = ros::Time::now();         m.id = 0;         m.ns = "karto";         m.type = visualization_msgs::Marker::SPHERE;         m.pose.position.x = 0.0;         m.pose.position.y = 0.0;         m.pose.position.z = 0.0;         m.scale.x = 0.1;         m.scale.y = 0.1;         m.scale.z = 0.1;         m.color.r = 1.0;         m.color.g = 0;         m.color.b = 0.0;         m.color.a = 1.0;         m.lifetime = ros::Duration(0);              visualization_msgs::Marker edge;         edge.header.frame_id = "map";         edge.header.stamp = ros::Time::now();         edge.action = visualization_msgs::Marker::ADD;         edge.ns = "karto";         edge.id = 0;         edge.type = visualization_msgs::Marker::LINE_STRIP;         edge.scale.x = 0.1;         edge.scale.y = 0.1;         edge.scale.z = 0.1;         edge.color.a = 1.0;         edge.color.r = 0.0;         edge.color.g = 0.0;         edge.color.b = 1.0;                   solver_->GetNodes(marray, m);         solver_->GetEdges(marray, edge);                   marray.header.stamp = ros::Time::now();              //ROS_INFO("vis mark published.");         marker_publisher_.publish(marray);              graphMutex.unlock();     }     \end{lstlisting}      While this works:               \begin{verbatim}     void SlamKarto::publishGraphVisualization() {         if(!got_map_)              return;              graphMutex.lock();              team_slam::TimeStampedMarkerArray marray;              visualization_msgs::Marker m;         m.header.frame_id = "map";         m.header.stamp = ros::Time::now();         m.id = 0;         m.ns = "karto";         m.type = visualization_msgs::Marker::SPHERE;         m.pose.position.x = 0.0;         m.pose.position.y = 0.0;         m.pose.position.z = 0.0;         m.scale.x = 0.1;         m.scale.y = 0.1;         m.scale.z = 0.1;         m.color.r = 1.0;         m.color.g = 0;         m.color.b = 0.0;         m.color.a = 1.0;         m.lifetime = ros::Duration(0);              visualization_msgs::Marker edge;         edge.header.frame_id = "map";         edge.header.stamp = ros::Time::now();         edge.action = visualization_msgs::Marker::ADD;         edge.ns = "karto";         edge.id = 0;         edge.type = visualization_msgs::Marker::LINE_STRIP;         edge.scale.x = 0.1;         edge.scale.y = 0.1;         edge.scale.z = 0.1;         edge.color.a = 1.0;         edge.color.r = 0.0;         edge.color.g = 0.0;         edge.color.b = 1.0;                   solver_->GetNodes(marray, m);         solver_->GetEdges(marray, edge);                   marray.header.stamp = ros::Time::now();              //ROS_INFO("vis mark published.");         marker_publisher_.publish(marray);              graphMutex.unlock();     }     \end{verbatim}      Note that in the same file, I can successfully include other source code excerpts that use special characters such as "%", "\" or "}". I really don't know what is special about this example I pasted above that won't let me include it.. any help? Since verbatim cannot format C++ source code nicely, I would really prefer to use lstlisting, if possible. I am also willing to try out alternatives that can do syntax highlighting.


title: Assigning Theorem number from ref

text: I would like to know if there is an easy way to the following. I have a statement in later part of an article, say `Theorem G` with `\label{Thm:G}`. In the introduction I would like to state this theorem as **Theorem G**   2 + 2 = 4. Is this possible? I would like to have **Theorem 2.1** in the Intro section.               %---- MWE     \documentclass{article}       \usepackage{amsthm}      \newtheorem{thm}{Theorem}[section]               \begin{document}       \section{Intro}          \section{body}      \begin{thm}\label{theorem G}     $2+2 = 4$.     \end{thm}          \end{document}


title: Unexpected axes labels in PSTricks plot

text: Consider the following example:               \documentclass{article}          \usepackage{pstricks-add}     \usepackage{expl3}          \ExplSyntaxOn       \cs_new_eq:NN \calc \fp_eval:n     \ExplSyntaxOff     \newcommand*\Angle{\calc{360/\NoNodes}}     \newcommand*\xMinAxes{\calc{\xCentre-\radius-0.5}}     \newcommand*\yMinAxes{\calc{\yCentre-\radius-0.5}}     \newcommand*\xMaxAxes{\calc{\xCentre+\radius+0.7}}     \newcommand*\yMaxAxes{\calc{\yCentre+\radius+0.7}}     \newcommand*\xMinPicture{\xMinAxes}     \newcommand*\yMinPicture{\yMinAxes}     \newcommand*\xMaxPicture{\calc{\xMaxAxes+0.35}}     \newcommand*\yMaxPicture{\calc{\yMaxAxes+0.4}}          \def\radius{3 }     \def\NoNodes{8}     \def\xCentre{1 }     \def\yCentre{2 }               \begin{document}          \begin{pspicture}(\xMinPicture,\yMinPicture)(\xMaxPicture,\yMaxPicture)       \psaxes{->}(\xCentre,\yCentre)(\xMinAxes,\yMinAxes)(\xMaxAxes,\yMaxAxes)[$x$,0][$y$,90]       \pnode(\xCentre,\yCentre){C}       \pscircle(C){\radius}       \qdisk(C){2pt}       \uput[45](C){$(\xCentre,\yCentre)$}       \multido{\r = 0+\Angle}{\NoNodes}{%         \psRelLine[angle = \r, linestyle = none](C)(!\xCentre \radius add \yCentre){1}{A}         \qdisk(A){2pt}}     \end{pspicture}          \end{document}      ![output](http://i.stack.imgur.com/cnxQS.jpg) I expected (in this particular case) the labels on the x-axis to range from -2 to 4 and the labels on the y-axis to range from -1 to 5; how do I achieve this?


title: transitions in Beamer

text: Why is this code not working i.e., not giving me the transitions               \begin{itemize}         \transdissolve             \item Large number of possible parameter-value combinations             \item Hard to find the optimal parameters             \item Which parameters should be changed and by how much.              \item muliticollinearity or high correlation between parameter values             \item Which criteria for evaluating the difference between observed and              simulated runoff.     \end{itemize}      Any help will be appreciated?


title: Drawing path diagrams with minimal effort?

text: I wonder how to draw such path diagrams with minimal effort. ![enter image description here](http://i.stack.imgur.com/CKQIT.png)


title: LaTeX Appendices: \chapter to \section, Appendix-numbers & Reset page-numbers

text: I found in the following question&solution the solution for using \chapter for appendices: Keep "Appendix #" in the appendix title, but remove the appendix from the table of contents               \makeatletter     \newcommand\appendixchapter{\if@openright\cleardoublepage\else\clearpage\fi                         \thispagestyle{plain}%                         \global\@topnum\z@                         \@afterindentfalse                         \secdef\@appendixchapter\@schapter}     \def\@appendixchapter[#1]#2{\ifnum \c@secnumdepth >\m@ne                              \refstepcounter{chapter}%                              \typeout{\@chapapp\space\thechapter.}%                              \addcontentsline{apx}{chapter}%NEW                                        {\protect\numberline{\thechapter}#1}%                         \else                           \addcontentsline{apx}{chapter}{#1}%NEW                         \fi                         \chaptermark{#1}%                         \addtocontents{lof}{\protect\addvspace{10\p@}}%                         \addtocontents{lot}{\protect\addvspace{10\p@}}%                         \if@twocolumn                           \@topnewpage[\@makechapterhead{#2}]%                         \else                           \@makechapterhead{#2}%                           \@afterheading                         \fi}     \makeatother      I'm trying to rewrite this as `\section`, because i do not use `\chapter` in `scrartcl`. The problem is: I don't know how, because i don't have enough experience in LaTeX coding. I want to use it in the following example:                   \documentclass[11pt, a4paper]{scrartcl}         \usepackage[utf8x]{inputenc}         \usepackage[T1]{fontenc}         \usepackage[ngerman]{babel}         \usepackage{geometry}          \usepackage{graphicx}          \usepackage{lmodern}          \usepackage{mathptmx}         \usepackage[scaled]{helvet}         \usepackage{setspace}         \usepackage{nameref}         \usepackage{glossaries}         \usepackage[toc,page]{appendix}         \usepackage{tocloft}         \usepackage{longtable}         \usepackage[hidelinks]{hyperref}         %%%%%%%%%%%%%%%%%%%%%%%%              %%%%%%%%%%%%%%%%%%%%%%%% SETUP APPENDICES LIST         % MY EARLIER SOLUTION         \newcommand{\listapxname}{Anlagenverzeichnis}         \newlistof{appendices}{apx}{\listapxname}         \newcommand{\apxsec}[1]{\section*{#1}\addcontentsline{apx}{section}{#1}}         \newcommand{\apxsubsec}[1]{\subsection*{#1}\addcontentsline{apx}{subsection}{#1}}               % original solution         \makeatletter         \newcommand\appendixchapter{\if@openright\cleardoublepage\else\clearpage\fi                             \thispagestyle{plain}%                             \global\@topnum\z@                             \@afterindentfalse                             \secdef\@appendixchapter\@schapter}         \def\@appendixchapter[#1]#2{\ifnum \c@secnumdepth >\m@ne                                  \refstepcounter{chapter}%                                  \typeout{\@chapapp\space\thechapter.}%                                  \addcontentsline{apx}{chapter}%NEW                                            {\protect\numberline{\thechapter}#1}%                             \else                               \addcontentsline{apx}{chapter}{#1}%NEW                             \fi                             \chaptermark{#1}%                             \addtocontents{lof}{\protect\addvspace{10\p@}}%                             \addtocontents{lot}{\protect\addvspace{10\p@}}%                             \if@twocolumn                               \@topnewpage[\@makechapterhead{#2}]%                             \else                               \@makechapterhead{#2}%                               \@afterheading                             \fi}         \makeatother          % my \section-try         %% DEFINE \APPENDIXCHAPTER HERE         %\makeatletter         %\newcommand\appendixchapter             %{                 %\if@openright                     %\cleardoublepage                 %\else                     %\clearpage                 %\fi                 %\thispagestyle{plain}                 %\global\@topnum\z@                 %\@afterindentfalse                 %\secdef\@appendixchapter\@schapter             %}         %\def\@apxsection[#1]#2             %{                 %\ifnum \c@secnumdepth > \m@ne                     %\refstepcounter{section}%                     %\typeout{\@chapapp\space\thesection.}%                     %\addcontentsline{apx}{section}                         %{\protect\numberline{\thesection}#1}                 %\else                     %\addcontentsline{apx}{section}{#1}                 %\fi                 %                 %\chaptermark{#1}                 %\addtocontents{lof}{\protect\addvspace{10\p@}}                 %\addtocontents{lot}{\protect\addvspace{10\p@}}                 %                 %\if@twocolumn                     %\@topnewpage[\@makechapterhead{#2}]%                 %\else                     %\@makechapterhead{#2}%                     %\@afterheading                 %\fi             %}         %\makeatother         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%              \catcode`_=12              \makeglossaries              % some glossaryetnry         \newglossaryentry{ABR}{name={abbreviation}, description={description}}              \geometry{a4paper, top=20mm, left=20mm, right=20mm, bottom=20mm,         headsep=10mm, footskip=12mm}              \clubpenalty=5000         \widowpenalty=5000         \displaywidowpenalty=5000               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Autoreninformationen             \title{conclusion project documentation by asd asd \#00000 S2014}             \author{asd asd}             \date{\today}         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                   \begin{document}                  \pagenumbering{Roman}             \thispagestyle{empty}                  \begin{titlepage}                 \begin{center}                          \Large                          \textbf{\LARGE Documentation\\ \vspace{0.5cm}                         \underline{ Cocnlusions project "`asd asd"' }}                          \vspace{2cm}                          \vspace{2cm}                      \end{center}             \end{titlepage}                  \newpage                  \tableofcontents                  \thispagestyle{empty}             \pagenumbering{arabic}                  \section{some section}             \subsection{some subsection}                  \newpage                  \section{Glossary}             \printglossary                  \newpage                  \appendix             \appendixpage             % The appendices don't get their number's automaticly             \listofappendices                  \newpage                  % i want to use the new \apxsection here, rewritten from \appendixchapter             \apxsec{A someA}             \apxsubsec{A.a someAa}                   \end{document}      ## The next problem I must set the page number after the list of appendices to 1. that means, the first appendix-page must have page 1, and the list of appendices must match to these page numbers. When I use `\setcounter{page}{1}` or `\pagenumbering{roman}` `\pagenumbering{arabic}` I get hyperref-warnings. How can I prevent the warnings?


title: Vertical spacing between equations and text

text: I'm running into an issue where if I add `\nomenclature{$a$}{A}%` after an equation it adds extra space. I have many equations and half of them require the `\nomenclature` command, however, those that don't have awkward spacing. I'm using MiKTeX 2.9 on Windows 7. I've tried using `\vspace{-\baselineskip}` and `\vspace{-\parskip}` to no avail. Using the example below you can skip between pages 2 & 3 and you can easily tell that the the bottom equation is being `pushed' downwards.               \documentclass{report}     \usepackage{amsmath}     \usepackage{nomencl}     \makenomenclature     \begin{document}     \printnomenclature     \cleardoublepage     \begin{equation}     a=     \begin{pmatrix}     1 & 0 \\     0 & 1 \\     \end{pmatrix}     \end{equation}     \begin{equation}     b=     \begin{pmatrix}     1 & 1 \\     1 & 1 \\     \end{pmatrix}     \end{equation}     \nomenclature{$b$}{Anything}%     \vspace{-    \parskip}     \begin{equation}     c=     \begin{pmatrix}     0 & 0 \\     0 & 0 \\     \end{pmatrix}     \end{equation}     \cleardoublepage     \begin{equation}     a=     \begin{pmatrix}     1 & 0 \\     0 & 1 \\     \end{pmatrix}     \end{equation}     \begin{equation}     b=     \begin{pmatrix}     1 & 1 \\     1 & 1 \\     \end{pmatrix}     \end{equation}     \begin{equation}     c=     \begin{pmatrix}     0 & 0 \\     0 & 0 \\     \end{pmatrix}     \end{equation}     \end{document}


title: Unwanted extra spaces are included before and after backslashes in biblatex URL

text: I have a biblatex reference with a URL field. However, every backslash is surrounded by spaces. I am using               \usepackage[sorting=nyt, citestyle=authoryear, bibstyle=authoryear, isbn=false, firstinits=true, url=false, terseinits=true, dashed=false, maxcitenames=3, maxbibnames=99, backref=true, doi=false]{biblatex}      What causes this, and how can I remove them? EDIT: MWE My biblatex .bib file is this:               @ONLINE{Soderberg2010,     author = {Soderberg, T},     title = {Section 5.1: The origin of the {NMR} signal.},     year = {2010},     url = {http://chemwiki.ucdavis.edu/Organic_Chemistry/Organic_Chemistry_With_a_Biological_Emphasis/Chapter__5%3A_Structure_Determination_II/Section_5.1%3A_The_origin_of_the_NMR_signal},     urldate = {2013-5-16}     }      This works:               \documentclass[11pt]{amsart}     \usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.     \geometry{letterpaper}                   % ... or a4paper or a5paper or ...      %\geometry{landscape}                % Activate for for rotated page geometry     %\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{epstopdf}     \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}     \usepackage{multicol}          \usepackage[sorting=nyt, citestyle=authoryear, bibstyle=authoryear, isbn=false, firstinits=true, url=false, terseinits=true, dashed=false, maxcitenames=3, maxbibnames=99, backref=true, doi=false]{biblatex}     \addbibresource{resourcename}               \title{Brief Article}     \author{The Author}     %\date{}                                           % Activate to display a given date or no date          \begin{document}     \maketitle     %\section{}     %\subsection{}          \begin{multicols*}{2}     \parencite{Soderberg2010}     \end{multicols*}{2}          \printbibliography          \end{document}       This doesn't work:               \documentclass[11pt]{amsart}     \usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.     \geometry{letterpaper}                   % ... or a4paper or a5paper or ...      %\geometry{landscape}                % Activate for for rotated page geometry     %\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{epstopdf}     \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}     \usepackage{multicol}          \usepackage[sorting=nyt, citestyle=authoryear, bibstyle=authoryear, isbn=false, firstinits=true, url=false, terseinits=true, dashed=false, maxcitenames=3, maxbibnames=99, backref=true, doi=false]{biblatex}     \addbibresource{resourcename}               \title{Brief Article}     \author{The Author}     %\date{}                                           % Activate to display a given date or no date          \begin{document}     \maketitle     %\section{}     %\subsection{}          \begin{multicols*}{2}     \parencite{Soderberg2010}     \end{multicols*}{2}          \begin{multicols*}{2}     \printbibliography     \end{multicols*}{2}          \end{document}      The only difference is that the second document has the reference list inside multicols.


title: How to colorize escaped math in syntax highlighted listings?

text: my listings are syntax highlighted using `\lstset` with `escapechar=$` and `commentstyle=\color[rgb]{0,0.5,0}`. Now my C-code looks like `int16_t speed; // calculated speed in $\(\frac{cm}{s}\)$` and the comment is printed green except the math-part: ![math no color](http://i.stack.imgur.com/7T4Ap.png) How do I apply the color on the escaped math-part? Thank in advance


title: Integral of volume

text: How i can correct the positioning of the limits of this integral ![enter image description here](http://i.stack.imgur.com/0hxb9.jpg) i would an effect like this...               \documentclass{article}     \usepackage{amsmath}     \begin{document}          \iiint \limits_{-\infty\ -\infty\ -\infty}         ^{\ \ \ +\infty\ +\infty\ +\infty}          \psi_{nlm}(r,\theta,\phi)\, dr\,d\theta\,d\phi          \end{document}      i have found the code below what do you think about it?               \documentclass{article}     \usepackage{amsmath}          \begin{document}     \begin{equation}     \int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} \psi_{nlm}(r,\theta,\phi)\, dr\,d\theta\,d\phi=1     \end{equation}     \begin{document}


title: Command line SVG2TikZ

text: (Apologies if this is too far from topic, but I thought it might be of interest to some here) I am writing a makefile to take a bunch of SVGs that I have drawn and turn them into TikZ pictures via SVG2TikZ, but not stand-alone `.tex` files as is the default - I will be `\include`ing these in another file. I have no issues with the makefile. The documentation for command line usage of SVG2TikZ however is sadly not quite up to scratch. The following code works to give a stand-alone file:                python tikz_export.py Tux.svg -o tux.tex      (taken from TeXample.net, using the Tux image linked to at the blog post, and also my own SVGs using appropriate substitutions). I could conceivably hack the code, but I'd rather not (the relevant bits are near the bottom). Can anyone see a way of calling from the command line and getting a TikZ picture?


title: loading .texsprofile into TexStudio

text: I'm keen to use the fantastic dark themes from this question but I can't get TexStudio to actually 'read' the colours from the `.texsprofile` file. I'm using `TexStudio 2.6.2` on Linux Mint 16. I also have a TexStudio installation on Windows 7 and I save the `.texsprofile` file by doing `Options > Save Settings...` But when I do `Options > Load Settings...` in my Linux installation, nothing changes. The colours are exactly as they were before! Can anyone help me get the themes from the above-mentioned question into my TexStudio installation?


title: title in graphic with pgfplots

text: I have the following code:               \documentclass[12pt,a4paper]{article}     \newcounter{conto}     \setcounter{conto}{\time}     \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{url}     \usepackage{amssymb}     \usepackage{ dsfont }     \usepackage[mathscr]{euscript}     \usepackage{booktabs}     \newcommand{\longto}{\longrightarrow}     \usepackage[a4paper,top=1cm,bottom=2cm,left=1cm,right=1cm]{geometry}     \usepackage{mathrsfs}     \usepackage{amsmath}     \usepackage{graphicx}     \newcommand*{\Scale}[2][4]{\scalebox{#1}{$#2$}}%     \newcommand*{\Resize}[2]{\resizebox{#1}{!}{$#2$}}%     \pagestyle{empty}     \usepackage{pgfplots}     \usepackage{eurosym}     \begin{document}     \section{graph}         \begin{tikzpicture}         \begin{axis}[             xmax=7.5, xmin=-5.5,             ymax=3.5, ymin=0,             axis x line=bottom,             axis y line=left,             axis x line=middle,             axis y line=middle,             axis equal image=true,             xlabel={\(a \in  \mathbf{Set}(\{\mathbf{mis}_i(X)\}_{i=1}^6 )\)},             ylabel={\(f_a^{\text{ass}}\)},             every axis x label/.style={                 at={(ticklabel* cs:1.05)},                 anchor=west,},             every axis y label/.style={                 at={(ticklabel* cs:1.05)},                 anchor=south,},             xtick={-4,-3,-2,-1,0,1,2,3,4,5,6},             ytick={0,1,2,3,4,5,6,7},                 ]         \addplot+[ycomb] plot coordinates             {(-2,1) (0,1) (1,1) (2,2) (4,1)};         \end{axis}         \end{tikzpicture}     \end{document}      and the output is ![enter image description here](http://i.stack.imgur.com/aPDPr.png) How can I do to have the following output: ![enter image description here](http://i.stack.imgur.com/s6kEl.png) or the following output: ![enter image description here](http://i.stack.imgur.com/SToqt.png) ????? Thanks in advance!


title: Transparent shade using TikZ

text: I wonder whether it is possible to create a transparent shading effect (like the one below) without an exact specification of the fill color. This solution is good until I have to change the background to a non-solid fill (demonstrated by the yellow block). Can I create the (almost, I want to see the yellow line) same effect somehow with a transparent shade? (Sorry for the brutal yellow, it is for demonstration purposes only.) ![enter image description here](http://i.stack.imgur.com/xX9A6.png)               \documentclass{article}     \usepackage{tikz}          \begin{document}     \parindent0pt       \null       \definecolor{orange}{RGB}{233,77,16}            \thispagestyle{empty}       \vspace{-1cm}       \vfill       \hfil       \begin{tikzpicture}[overlay]         \coordinate (gNE)                       at (+0.501\paperwidth,+0.501\paperheight);         \coordinate (gSW)                       at (-0.501\paperwidth,-0.501\paperheight);         \coordinate (titleN)                at (+0.000\paperwidth,+0.300\paperheight);         \coordinate (titleS)                at (+0.000\paperwidth,+0.100\paperheight);              \fill [color=orange] (gSW) rectangle (gNE);         \fill [color=yellow] (0.3\paperwidth,0.51\paperheight) rectangle (0.4\paperwidth,-0.5\paperheight);         \shade [left color=black, right color=orange] (titleS -| gSW) rectangle (titleN -| gNE);       \end{tikzpicture}       \vfill          \end{document}


title: Vertical space around table

text: I'm using tabu to create a table. I wish this to be center-displayed, so I am using it as follows:               Body of text preceding table.          \begin{center}     \begin{tabu}{llX}     text & text & text     \end{tabu}     \end{center}          Body of text following table.      I would like the space between the surrounding text and the table to match that of displayed equations, arrays, and theorems. I can add line breaks or \smallskips, but I think this is pretty unstable, and produces varying results from page to page. Any standard way of achieving this look? Incidentally, I'm only using tabu because I want an array where one of the entries "stretches" to the end of the line. Perhaps there's a better way to do that? Thanks.


title: How to use an underscore in a filename

text: With the commands `\openout` and `\write` I output text into a file. I want this file to have a name of containing an underscore (eg. `name_01.txt`), but I'm unable to get the underscore in the filename. My attempt (with `\_`):               \documentclass{article}     \begin{document}     \newwrite\tempfile     \immediate\openout\tempfile="name\_01.txt"     \immediate\write\tempfile{this is interesting}     \immediate\closeout\tempfile     \end{document}


title: How to create a group of minipages that can be spanned across columns but can't be broken in two pages?

text: I'm trying to diagram an exam for an educational purpose. I'm using the package `multicols` to display questions in two columns. Each question of this exam is divided in three blocks:   1. base text    2. wording    3. answers  I've grouped each of these blocks, separately, in a minipage, so they can be unbreakable. We want these blocks to be able to span columns on the same page but we're struggling to discover how to prevent one question being divided in two pages. Here is an example:               \documentclass[a4paper]{article}          \usepackage[utf8]{inputenc}     \usepackage[left=15mm,right=15mm,top=15mm,bottom=15mm]{geometry}     \usepackage[portuguese]{babel}     \usepackage{multicol}     \usepackage{blindtext}          \begin{document}          \begin{multicols*}{2}          \begin{minipage}{0.48\textwidth}     \noindent{\bf QUESTION 1}\\     \textbf{BASE-TEXT}\\     \blindtext     \end{minipage}     \vfill     \begin{minipage}{0.48\textwidth}     \textbf{WORDING}\\     \blindtext     \end{minipage}     \vfill     \begin{minipage}{0.48\textwidth}     \textbf{ANSWERS}\\     \blinditemize     \end{minipage}          \vfill          \begin{minipage}{0.48\textwidth}     \noindent{\bf QUESTION 2}\\     \textbf{BASE-TEXT}\\     \blindtext     \end{minipage}     \vfill     \begin{minipage}{0.48\textwidth}     \textbf{WORDING}\\     \blindtext     \end{minipage}     \vfill     \begin{minipage}{0.48\textwidth}     \textbf{ANSWERS}\\     \blinditemize     \end{minipage}          \vfill          \begin{minipage}{0.48\textwidth}     \noindent{\bf QUESTION 3}\\     \textbf{BASE-TEXT}\\     \blindtext     \end{minipage}     \vfill     \begin{minipage}{0.48\textwidth}     \textbf{WORDING}\\     \blindtext     \end{minipage}     \vfill     \begin{minipage}{0.48\textwidth}     \textbf{ANSWERS}\\     \blinditemize     \end{minipage}          \end{multicols*}     \end{document}      If you compile this code, you will note that the blocks of question 2 are spanned in the two columns, which is desirable (column constraint), but question 3 was broken in two pages (page constraint), which we cannot let happen. We tried to use `\samepage`, which has no effect. We tried also to add a `\nobreak` after first and second block. We haven't added a `\nobreak` after the third block since we do not want to inhibit a break at this point. This attempt holds page constraint, but broke column constraint, once every question was placed entirely in a column. Is there a way to hold these two constraints at the same time in LaTeX? Very best regards.


title: How to properly format number in denominator with siunitx

text: I'm discussing fuel efficiency in liters per 100 kilometers (`L/100 km`). My first thought was to do the following:               \si[per-mode=symbol]{\liter\per\num{100}\kilo\meter}}     % renders: L/100km      However, that omits the space between `100` and `km`. Appending whitespace to the end of `100` has no effect, as I expected. However, adding whitespace outside of `\num` does work:               \si[per-mode=symbol]{\liter\per\num{100} \kilo\meter}}     % renders: L/100 km      But that seems clunky. Is there a better way? Nothing in the docs is catching my eye: ftp://ftp.tex.ac.uk/ctan%3A/macros/latex/exptl/siunitx/siunitx.pdf


title: LaTeX file compiles on two computers but not on the third

text: I have tried to troubleshoot a problem for several days and cannot solve it. I have a LaTeX document that compiles on two computers but not on a third computer. (Other documents have compiled fine on the third computer, which is relatively new.) All three computers have the MikTeX 2.9 distribution that are all up to date, all use emacs 24.3.1, AUCTeX 11.86, and Windows 7. I have set MikTeX to download packages on the fly so I believe that I have identical packages downloaded. My master document brings in three files via \include. I am reading the files from a portable HD into all three computers. EDIT: Put differently, I am compiling the files on all three computers from files that reside on a single portable HD that I am moving to each computer. I cannot figure why the document does not compile on the third computer. I believe the problem relates to either the table of contents or section headings of the document because the .toc file is empty (size = 0) after compiling on this computer. The error message is: > >     ERROR: Missing control sequence inserted. >     --- TeX said --- >     <inserted text> >                    \inaccessible >      l.1 ...m \z@ {[1][-]}\futurelet \@let@token \let [ > > -]{chapter.14}{Economic Da... >     --- HELP --- >     This is probably caused by a \newcommand, \renewcommand, \newlength, >     or \newsavebox > command whose first argument is not a command name. >   The reference to Chapter 14 in the error message is one of the three files brought in via \include. I tried going through the log file and see some potential problems but I cannot interpret them. Attached is the log file and the issues I observe begin around line 1295. EDIT: This portion of the log is at the bottom. I believe the issue is probably some kind of TeX installation problem. I hope someone can point me in the right direction because I am stuck. Portion of Log:               (r:\writing_other\aicpa_forensicaccounting\book_fa_content\fa_wrap.aux     (r:\writing_other\aicpa_forensicaccounting\book_fa_content\fa_damages_content.a     ux     ! Extra }, or forgotten \endgroup.     l.11 ... wrong--perhaps a missing \protect \let }}                                                        } } } } }     I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Extra }, or forgotten \endgroup.     l.11 ...rong--perhaps a missing \protect \let }} }                                                        } } } }     I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Extra }, or forgotten \endgroup.     l.11 ...ng--perhaps a missing \protect \let }} } }                                                        } } }     I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Extra }, or forgotten \endgroup.     l.11 ...--perhaps a missing \protect \let }} } } }                                                        } }     I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Extra }, or forgotten \endgroup.     l.11 ...perhaps a missing \protect \let }} } } } }                                                        }     I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Extra }, or forgotten \endgroup.     l.11 ...rhaps a missing \protect \let }} } } } } }          I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Extra }, or forgotten \endgroup.     l.14 ...rong--perhaps a missing \protect \let  } }                                                        }     I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Extra }, or forgotten \endgroup.     l.14 ...ng--perhaps a missing \protect \let  } } }          I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Extra }, or forgotten \endgroup.     l.17 ...rong--perhaps a missing \protect \let  } }                                                        }     I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ! Extra }, or forgotten \endgroup.     l.17 ...ng--perhaps a missing \protect \let  } } }          I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.          ))


title: Pgfplots: how to fill bounded area under a curve using addplot and fill?

text: I am looking shade the bounded area under the graph of f(x)=x^2 from 0 to 1. For my other plots I was fine using the shading with coordinates because they were all polygons. I've come across a bunch of threads with similar situations but didn't see anything quite similar enough for me to copy and manipulate the code. I The image below is exactly how I want it with the clear exception of the shading outside the box. Thanks               \usepackage{pgfplots}     \pgfplotsset{width=7cm,compat=1.8}                    \begin{figure}[!h]      \centering      \begin{tikzpicture}          \begin{axis}[enlargelimits=0.1]         \addplot[domain=-.15:1.05,blue] {x^2};             \addplot [thick,color=blue,mark=o,fill=blue,                          fill opacity=0.05]coordinates {                 (1, 1)                  (1, 0)                 (0, 0)  };                 \node [rotate=48] at (axis cs:  .7,  .59) {$y=x^2$};                 \node [rotate=90] at (axis cs:  1.05,  .25) {$x=1$};         \end{axis}     \end{tikzpicture}       \caption{$R=\left\{(x,y) \ |  \ 0 \leq y \leq x^2, x\leq 1 \right\}$}      \end{figure} \\      ![Screen shot of current code](http://i.stack.imgur.com/PvhFN.png) **Edit:** The first and second answers below are perfect. What if I wanted the shaded area under the curve to stop at a certain y-value, instead of extending all the way down to the x-axis? Say, it goes down to y=.2?


title: Line break that doesn't work cumulative?

text: I'm looking for a way to write a macro that will add a line break after the text from the argument, but prevent that line break to add to another line break, if there is one following. If I use `\newcommand*\ask[1]{{\bf Q:} #1 \\}` and then use `\ask{How?} \\` I will have used two `\\` and thus get two vertical spaces. But I just want one line break, no further vertical space. The same holds for `\newline`, `\\*` and `\hfill\break`. Sorry, if my description sounds confusing, I may not have used the proper LaTeX terms. I hope you understand my question anyway.


title: How to refer to figures, tables, equations and sections

text: What is the correct way to refer to figures, tables, equations and sections? For example, should I write In Figure 1.1 we notice that.... or In fig. 1.1 we notice that.... or In figure 1.1 we notice that.... Same thing for tables. In Table/tab./table 1.1 we notice that.... In Eq./Equation/eq./equation (1.1) we notice that.... I've seen different approaches in various books and I don't know which is the typographically correct way. As we mentioned in Section/section/sec. 1.1 blah blah blah.... EDIT (clarification): I'd like to know what is the right look, not how to produce this result. I think I like the abbreviation with capital letter or the non abbreviated form but without capital letter. But I don't know which one is correct, if any. Also, I'm talking about a book or a thesis.


title: How to draw the unit hyperbola in LaTex?

text: I want to make a graph of the unit hyperbola, but I'm not sure how to make it appear using pgfplots. Basically, what I'm using is this:               \documentclass[12pt]{article}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}         \addplot[blue,domain=0:2pi,samples=201]{(cosh(x))^2-(sinh(x))^2=1};     \end{axis}     \end{tikzpicture}          \end{document}      What I really want is the right-hand hyperbola with its asymptotes sketched, as well. Any ideas?


title: beamerposter output pdf size

text: I am making a poster using a university poster template which is a slight modification of the beamerposter package (to include logo and some box styles). I haven't done this before, hence my questions:   1. For some reason the style file is designed so that it produces a pdf file which is not A0. How can I properly convert that PDF file with the given size to A0 file for print? Does it have to be in A0 format when I take it to store, or when printing we can just choose the option A0 for printing? tools such as "convert" do not work.   2. What's the best way to make figures for a poster? what font size? is it better to include them using \includegraphics or just process tikz files using \input directly? is it possible that if the final PDF poster file is scaled from a given size to A0, figures change as well? Thanks


title: Access minus symbol of postscript font in textmode

text: Do postscript fonts such as `libertine` (from the `libertine-legacy` package) or mathpazo have a minus sign that can be accessed when in text mode? What I am trying to do is substitute the normal dash with a minus symbol, following this answer from David Carlisle. His solution works perfectly when using open type fonts as most of them have a minus character that can be easily accessed:               \def\yyy{%       \bgroup\uccode`\~\expandafter`\string-%       \uppercase{\egroup\edef~{\noexpand\text{\char"2212\relax}}}%       \mathcode\expandafter`\string-"8000 }      However, my attempts to do something similar with `pdfLaTeX` and Libertine or Pagella have been futile. Using a symbol like hyphen (`\textendash`) works perfectly:               \def\yyy{%       \bgroup\uccode`\~\expandafter`\string-%       \uppercase{\egroup\edef~{\noexpand\text{\llap{\textendash}\relax}}}%       \mathcode\expandafter`\string-"8000 }      But is not exactly what I want. How can I access the minus symbol of that font? Or, if that is not possible, is it possible to resize the hyphen to "fake" a minus symbol? **Edit** : egreg provided the solution below. Embedded into my framework the code is:               \def\yyy{% Thanks to egreg       \begingroup\uccode`~=`-       \uppercase{\endgroup\def~}{\mathbin{\text{\llap{\textminus}}}}       \mathcode`-="8000 }


title: abs undefinded control structure

text: have a strange prob with `\abs`. Even a simple term like `\abs{x}` does not work. It does not work out. `Undefined control structure` will be displayed when using pdflatex. `amsmath`-package was used. `.aux` files were deleted. math mode `$ $` was used. Do you have any advice?


title: (semi)-Automatic pluralization around a citation

text: In my document, I will write something like this (using `natbib`, but that shouldn't matter too much):               \citet{reference} show that .....      which would render as > Jones et al (1990) show that.... (`\citet` in `\natbib` creates an 'author-list (year)' reference style) Of course if `{reference}` was a single individual, I should have written               \cite{reference} shows that ....      rendering as > Jones (1990) shows that.... Since I'm lazy and can't take the extra 5 seconds to search the reference to see if it's a single author or not, is there conceivably an automated way to do pluralization ? Or some relatively simple macro that would look like `\IfRefIsPlural{reference}{show}{shows}`


title: TikZ: plot data files with spaces in path

text: I tried to plot a data file with spaces is the file path.               \draw[line width=0.4mm] plot[] file{/home/schlumpf/test folder/daten.txt};      My problem is the space in the file path. How can I plot this file without copying the file to another folder?


title: How do I right align certain cells in a (booktabs) table?

text: I'm very new to LaTeX, and I'm currently waist deep in my first project using it. I'm trying to right align some text in cells in a table. I am using booktabs, not sure if that changes anything (I'm still trying to figure out how packages work, to be honest). ![Here is the output](http://i.imgur.com/0jM2v.png) Here is my code:               \begin{table}[H]       \begin{center}         \caption{A comparison of statistics for forest and trailside ash saplings}         \begin{tabular}{lll}         \toprule          Statistic & Forest & Trailside \\ \midrule             \rowcolor[gray]{.9} Sample size (trees)       & 243            & 257            \\             Mean (mm)               & 133.19 & 139.39 \\              \rowcolor[gray]{.9} Median (mm)            & 93             & 100            \\              Standard deviation (mm) & 110.36  & 117.96 \\              \rowcolor[gray]{.9} Standard error (mm)    & 7.08   & 7.36   \\         95\% Confidence intervals (mm) &  ~ & ~ \\         \makebox[2.4cm][r] Upper bound & 147.07 & 153.81 \\         \makebox[2.4cm][r] Lower bound & 119.31 & 124.96 \\         \bottomrule         \end{tabular}       \end{center}     \end{table}      As you can see, I am currently using `\makebox[2.4][r]` to hack it in, but if there's a more elegant way to accomplish this I'd love to know it.


title: Shift title and author text up?

text: What is the best way to shift the title text 'up' in a LaTeX document compiled with pdftex? When I do this:               \documentclass[12pt,letterpaper, onecolumn]{article}     \setlength{\topmargin}{0in}     \title{Blah Blah Cool}     \date {}          \begin{document}         \maketitle         \section{Foo}         foobar foobar foobar...     \end{document}      There is a quite a bit of space between the very top of the page and the title ("Blah Blah Cool"). How can I decrease/remove this space?


title: How to get element position in LaTeX?

text: I have a test with check boxes made in LaTeX for result recognition in queXF. This works fine, but if I change something in source boxes are being relocated and queXF recognition boxes are becoming invalid. Is it possible to make output of absolute box element position and sizes to external file? For example, I have the following code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \newcommand{\checkBox}[1]{         \begin{tikzpicture}[color=black, line width=0.2mm]             \draw (0,0) rectangle (5mm,5mm);         \end{tikzpicture}     }     \begin{document}         Question:\\         \checkBox{Q1A}~Answer A\\         \checkBox{Q1B}~Answer B\\         \checkBox{Q1C}~Answer C\\         \checkBox{Q1D}~Answer D\\     \end{document}      Output is: ![enter image description here](http://i.stack.imgur.com/cQIXe.png) And I want to get information about box positions and sizes (if possible) according to their IDs. Maybe something like this:               \Q1A{3cm}{2cm}{5mm}{5mm}     \Q2B{3cm}{2.5cm}{5mm}{5mm}      Or in any other format that could be parsed. Any ideas are greatly appreciated.


title: lgrxenc.def not nound

text: Yesterday I've finally reinstalled my TeXLive to the version of 2014. While compiling, I have the following error: > fontec.sty Package fontenc Error: Encoding file `lgrxenc.def' not found > \ProcessOptions* What can in mean and how do I fight it?


title: Using \citeauthor in custom bibliography style

text: I am using the following bibliography style for my journal article: https://github.com/bopaper/bopaper/blob/master/bmc_article.bst I want to be able to use `\citeauthor`. If I use is just like that it gives me an error saying `!Undefined control sequence` If I do `\usepackage{natbib}`, it gives me some more errors;               Runaway argument?     ]{author2007}     ! Paragraph ended before \@citex was complete      How can I use `\citeauthor` for my current bibliography style?


title: How do you make a paragraph indent within a table?

text: I can manually try and indent, but it only works on the first 'paragraph' within the cell, and the \hspace won't even work with the second paragraph. Is there an easier way?               \ctable[         cap= A short caption,         caption= This is a longer caption,         ]{lp{2in}p{2in}}{}{\FL         title1 & title2 & title3\ML         label &         \hspace{1em} This is paragraph one.  This is paragraph one.\newline         \hspace{1em} This is paragraph two.  This is paragraph two.&         \hspace{1em} This is paragraph one.  This is paragraph one.\newline         \hspace{1em} This is paragraph two.  This is paragraph two.\NN         label2 &         \hspace{1em} This is paragraph one.  This is paragraph one.\newline         \hspace{1em} This is paragraph two.  This is paragraph two.&         \hspace{1em} This is paragraph one.  This is paragraph one.\newline         \hspace{1em} This is paragraph two.  This is paragraph two.\LL         }      As an alternative, I might try simulating a table with minipages, but after briefly trying that, it seems like this should be e


title: Why doesn't pdfTeX support PStricks directly?

text: I am sorry, I have to remove the previous question. I didn't realize I had messed up everything (from my other questions) here. The hidden idea was actually as follows, but I had simplified it in a wrong way. I should say the question as follows. LaTeX allows us to use PSTricks code in the input file. Why does pdfTEX not directly support this feature also? Note: `auto-pst-pdf` can allow us to use PSTricks in an input file compiled with pdfTeX but with limited features such as   1. we cannot use PSTricks to draw objects on JPEG, PNG, PDF images   2. we can use PSTricks to add annotation on equations with `\label{}` but the cross-reference no longer works.


title: Citation formatting

text: I'm not sure how to fix my citation output - BibTex is generating a citation that, when rendered, looks like: Brain and Cognition, 55(1):30 - 40, 2004. <ce:title>Development of Orbitofrontal Func- tion</ce:title>. How can I get rid of the "ce:title" tags? The referenced .bib file is               @article{Bechara200430,     title = "The role of emotion in decision-making: Evidence from neurological patients with orbitofrontal damage ",     journal = "Brain and Cognition ",     volume = "55",     number = "1",     pages = "30 - 40",     year = "2004",     note = "<ce:title>Development of Orbitofrontal Function</ce:title> ",     issn = "0278-2626",     doi = "http://dx.doi.org/10.1016/j.bandc.2003.04.001",     url = "http://www.sciencedirect.com/science/article/pii/S0278262603002859",     author = "Antoine Bechara"     }      Here is a sample document:               \documentclass[british]{article}          \usepackage[T1]{fontenc}          \usepackage[latin9]{inputenc}          \usepackage{babel}          \begin{document}          This is the misformatted citation \cite{Bechara200430}\\          \bibliographystyle{plain}          \bibliography{oberdiek-bundle,/Users/Kevin/Downloads/science}          \end{document}


title: How should I code two authors in a bibtex file as "Author1 WITH Author2"?

text: So I have a book written by Author1 "with the collaboration of Author2". Of course standard method would be just to cite: > @book{Death:2004vg, title = {{Death and Time}}, author = {Author1}, > publisher = {None}, year = {2039} } However, the situation is not so clear since Author2 is keen to have her name included. As she is a reviewer for this article, I better comply. That being said, it is not accurate to express that as an AND relationship. Is there any nice solution?


title: How do I customize the \footcite command in the Historische-Zeitschrift style?

text: I am trying to customise the `\footcite` command of the Historische- Zeitschrift Style so that I can use a special citation-type. Here's what I need:   1. When I have a bibliographic entry with something in custom `usera` field, and I use `\footcite`, my citation needs to look like this:  > See Athanasius Alexandrinus, Epistula ad Marcellinum de interpretatione > psalmorum, in: PG 27, S. 56.   2. When I use `\footcite` for the second time for the same entry directly after this one, it needs to produce: > See ebd., S. 22.   3. When I use `\footcite` for the third time for the same entry, but somewhere else in the text, it needs to produce: > See Ath., ep. Marcell. (Wie Anm. 1 ), S. 56.   4. If I don't have anything in that field, the default citation needs to be used. It would look like this: > See Iustinus Martyr, Iustini Martyris dialogus cum Tryphone, in: Miroslav > Marcovich (Hrsg.). Bd. 47. (Patrologiae cursus completus: Series Graeca.) > Berlin/New York 1997, S. 22. Now, I managed to get all this, except for thing, for which I can't figure out why it happens. You can see what I am talking about on this picture: ![enter image description here](http://i.stack.imgur.com/OCbSU.png) So where the number 2 is, should be 1. It points not at the original footnote where the entry was quoted the first time, but instead at the last repeated entry. Can someone please help me with this? Thanks in advance for your answers! Here is my MWE:               \documentclass[a4paper,11pt]{scrartcl}     \usepackage[latin1]{inputenc}     \usepackage{csquotes}     \usepackage{blindtext}     \usepackage{filecontents}     \usepackage{hyperref}     \hypersetup{         colorlinks,          citecolor=black,          filecolor=black,          linkcolor=black,          urlcolor=black     }     \begin{filecontents}{\jobname.bib}      @incollection{athanasius1857,             Address = {Parisiis},             Author = {{Athanasius Alexandrinus}},             Booktitle = {Patrologiae cursus completus: Series Graeca},             Editor = {Jacques Paul Migne},             Pages = {37-40},             Usera = {PG},             Publisher = {Accurante J.-P. Migne},             Shortauthor = {Ath.},             Shorttitle = {ep. Marcell.},             Title = {Epistula ad Marcellinum de interpretatione psalmorum},             Volume = {27},             Year = {1857}}      @incollection{iustinus1997,             Address = {Berlin/New York},             Author = {{Iustinus Martyr}},             Title = {Iustini Martyris dialogus cum Tryphone},             Editor = {Miroslav Marcovich},             Publisher = {Walter de Gruyter},             Series = {Patrologiae cursus completus: Series Graeca},             Shortauthor = {Iust.},             Shorttitle = {De Tryph.},             Volume = {47},             Year = {1997}}     \end{filecontents}     \usepackage[ngerman]{babel}     \usepackage[style=historische-zeitschrift, maxnames=2, hyperref=true, backref=true, backrefstyle=none, backend=bibtex,idemtracker=true]{biblatex}     \bibliography{\jobname}     %     \makeatletter     \renewbibmacro*{footcite}{%       \global\boolfalse{cbx@loccit}%       \global\boolfalse{cbx@seenote}% NEW!       \ifciteseen         {\iffieldundef{shorthand}            {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}               {\usebibmacro{footcite:ibid}}               {\usebibmacro{footcite:note}}}            {\usebibmacro{footcite:shorthand}}}            {\iffieldundef{usera}              {\usebibmacro{footcite:full}}{\printnames{author}%            \setunit{\addcomma\space}%            \printfield{title}\isdot%              {\setunit{\addcomma\space}%               \usebibmacro{in:}%               \printfield{usera}%               \setunit*{\addspace}%               \printfield[default]{volume}}}}          \usebibmacro{footcite:save}}     \makeatother     %     \begin{document}     \blindtext\footcite[See][S. 56]{athanasius1857}     \blindtext\footcite[See][S. 22]{athanasius1857}     \blindtext\footcite[See][S. 22]{iustinus1997}     \blindtext\footcite[See][S. 56]{athanasius1857}     \printbibliography          \end{document}


title: "Abstract" in caps font for article class

text: I'm submitting a paper that must be written using the article class. But I prefer the way the word "abstract" in the all caps font I've seen in some papers. Is there a way to replicate this? Here's an example of what I'm talking about: http://www.siam.org/students/siuro/vol6/S01125.pdf


title: Modify chapter command (and KOMA-script addchap)

text: Is there something like `etoolbox`'s `\appto`, that also works for `\chapter` and `\addchap`? edit: I intend to use it to re-enable page numbering (which may or may not be disabled using `\renewcommand\thepage{}`) after each chapter's first page, but if page numbering is already enabled the chapter's first page should also be numbered. edit2: I am tryng to create a command, that disables page numbering until next chapter, including the first page of next chapter. I was going to do this by using `\renewcommand\thepage{}` at first and adding some code to `\chapter` that checks if page numbering has been disabled (using a toggle) and if it is sets chapter's first page's style to `plain` and re-enables page numbering.


title: How I could insert an accented word in a new command?

text: I have the following command               \newcommand{\startsection}[4]{     \gdef\classname{#2}     \subsection*{\label{#3}{\bf {\sc #1} #2}}{     \rule[1em]{\hsize}{4pt}\vskip -1em     \vskip .1in      #4     }%     }      I use it in the following way               \startsection{Anotaci\'on}{Lazy}{l0}      But my results is the following Anotaci n Lazy and my desired outpur would be something like this Anotación Lazy How I could solve it? Thanks


title: Beamer - enumerate

text: I would like to make enumerate not overlay-aware.               \begin{enumerate}          \begin{frame}           \item one           \end{frame}          \begin{frame}          \item two     \pause     \item three     \end{frame}          \begin{frame}          \item four          \end{frame}          \end{enumerate}      The problem is the pause that increase the numbering.


title: table badly too wide

text: I got a bad problem with the width of my table. I can't get the point why its so wide. I'm using `latexmk`. Here's my code:               \documentclass[final,12pt,abstracton,oneside,a4paper,     bibliography=totocnumbered,     listof=totoc]{scrreprt}               % my imports     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage[babel,german=quotes]{csquotes}     \usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage{geometry}     \usepackage{lastpage}     \usepackage[usenames,dvipsnames]{color}     \usepackage[ngerman, num]{isodate}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{pdfsync}     \usepackage{enumerate}     \usepackage{listings}     \usepackage[square]{natbib}     \usepackage{setspace}     \usepackage{rotating}          % import from used template     \usepackage{amsfonts}     \usepackage{tabularx}     \usepackage[right]{eurosym}     \usepackage[printonlyused]{acronym}     \usepackage{paralist}     \usepackage{parskip}     \usepackage[titles]{tocloft}     \usepackage[pdfpagelabels=true]{hyperref}          % define paper geometry     \geometry{a4paper, left=20mm, top=27mm, right=20mm, bottom=27mm, headsep=10mm,bindingoffset=10mm}          \fancypagestyle{plain}{       \lhead{}        \renewcommand{\headrulewidth}{0.4pt}       }          \pagestyle{fancy}     \lhead{\leftmark}     \chead{}     \rhead{\thepage}     \cfoot{}          \begin{document}     % titlepage toc tof and so on...     \begin{table}[h]       \begin{tabularx}{\textwidth}{lX}       \hline         Event & Description \\       \hline         \texttt{SomeOfMyEvents} & Description of the events goes here...         large large texts should be here line 1         large large texts should be here line 2         large large texts should be here line 3         large large texts should be here line 4         large large texts should be here line 5         large large texts should be here line 6         large large texts should be here line 7         large large texts should be here line 8         large large texts should be here line 9         large large texts should be here line 10         large large texts should be here \\       \hline       \end{tabularx}       \caption{caption}       \label{tab:cap}     \end{table}     % ...     \end{document}      and my result looks like this: ![enter image description here](http://i.stack.imgur.com/PKBwl.png) The rule wit the romic II is my textwidth. How you can see this table is much wider than textwidh. If I try to set the width to `0.5\textwidth` only the hline's of the table will be as half as long, the columns stay the same. I even tried wit package `tabulary`, `tabu`, and `tabular*` with `p{4cm}p{4cm}` didn't work either. I'm running out of ideas. I hope some one has a better idea on this purpose. ## EDIT: I added more real code. Now only the name of the events and the content of my description varies. ## EDIT #2: Due to comments i added the complete preamble of my document. The picture i show is the output of my code shown above.


title: TikZ: Blurring Effect

text: As you know, in Burrows-Wheeler Transform the matrix of all the rotations is but conceptual, and what matters is the last column. I wanted to convey this idea in the picture               \documentclass{standalone}     \usepackage{tikz}          \usetikzlibrary{matrix,positioning}          \begin{document}          \begin{tikzpicture}         \begin{scope}                 \matrix (B) [matrix of nodes, ampersand replacement = \&]{                     {} \&  {} \&  {} \&  {} \&  {} \&  {} \&  {} \&  {} \&  {} \&  {} \&  {BWT} \& {SA} \\                     \hline                     {a} \& {n} \& {k} \& {u} \& {k} \& {l} \& {u} \& {k} \& {s} \& {k} \& {l} \& {9} \\                     {k} \& {l} \& {a} \& {n} \& {k} \& {u} \& {k} \& {l} \& {u} \& {k} \& {s} \& {7} \\                     {k} \& {l} \& {u} \& {k} \& {s} \& {k} \& {l} \& {a} \& {n} \& {k} \& {u} \& {2} \\                     {k} \& {s} \& {k} \& {l} \& {a} \& {n} \& {k} \& {u} \& {k} \& {l} \& {u} \& {5} \\                     {k} \& {u} \& {k} \& {l} \& {u} \& {k} \& {s} \& {k} \& {l} \& {a} \& {n} \& {0} \\                     {l} \& {a} \& {n} \& {k} \& {u} \& {k} \& {l} \& {u} \& {k} \& {s} \& {k} \& {8} \\                     {l} \& {u} \& {k} \& {s} \& {k} \& {l} \& {a} \& {n} \& {k} \& {u} \& {k} \& {3} \\                     {n} \& {k} \& {u} \& {k} \& {l} \& {u} \& {k} \& {s} \& {k} \& {l} \& {a} \& {10} \\                     {s} \& {k} \& {l} \& {a} \& {n} \& {k} \& {u} \& {k} \& {l} \& {u} \& {k} \& {6} \\                     {u} \& {k} \& {l} \& {u} \& {k} \& {s} \& {k} \& {l} \& {a} \& {n} \& {k} \& {1} \\                     {u} \& {k} \& {s} \& {k} \& {l} \& {a} \& {n} \& {k} \& {u} \& {k} \& {l} \& {4} \\                 };                 \filldraw[semitransparent] (B-1-1.north west) rectangle (B-12-10.south east);         \end{scope}     \end{tikzpicture}          \end{document}      The effect I would like to achieve is to somehow "blur" the contents of the matrix except for the last column. Do I have to play around with postactions in the matrix options? I could have, of course, explicitly set the relevant elements of the matrix with paler colours, so that the overall blurred effect would be achieved, but is there any way to _blur_ entire regions?