title: Suppressing line break in enumerate environment

text: I'm using the `gather` environment within the `enumerate` environment. After creating an item/before entering the `gather` environment, LaTeX adds a linebreak which I don't like.               \begin{enumerate}[(a)]      \item          \begin{gather*}         \text{substitution:}\\ % SHOULD BE ON THE SAME LINE AS (a)         \begin{align*}         \Rightarrow u(x) &= x  &\Rightarrow v'(x) &= \sin(x)&&\\         \Rightarrow v(x) &= -\cos(x) &\Rightarrow u'(x) &= 1&&         \end{align*}\\         \begin{split}         \int u(x) \cdot v'(x)  {\mathrm d}x &= u(x) \cdot v(x) - \int u'(x) \cdot v(x)  {\mathrm d}x \\             &= x \cdot -\cos(x) - \int  -\cos(x)  {\mathrm d}x         \end{split}\\         \end{gather*}     \item         \begin{gather*}         \text{substitution:}\\         \begin{align*}         \Rightarrow u(x) &= (x-2)  &\Rightarrow v'(x) &= {\mathrm e}^{2x}&&\\         \Rightarrow v(x) &= -\cos(x) &\Rightarrow u'(x) &= 1&&         \end{align*}\\         \begin{split}         \int u(x) \cdot v'(x)  {\mathrm d}x &= u(x) \cdot v(x) - \int u'(x) \cdot v(x)  {\mathrm d}x \\             &= x \cdot -\cos(x) - \int  -\cos(x)  {\mathrm d}x         \end{split}\\            \end{gather*}     \end{enumerate}      Used packages:               \usepackage{enumerate}     \usepackage{amsfonts,amsthm, mathtools}     \usepackage{amsmath}


title: Can't insert newlines in the code listing

text: I am currently trying to insert a batch file programming code in my report. I am using the code listing. I am not able to add new lines to format my code! I have following code example yet:                \begin{lstlisting}[escapechar=ä]      ä\colorbox{white}{\color{RoyalBlue}\texttt{Microsoft Windows [Version 6.2.9200]     (c) 2012 Microsoft Corporation. All rights reserved.}}ä      The output is like this in a single line which I don't prefer: Microsoft Windows Version 6.2.9200 2012 Microsoft Corporation. All rights reserved. The output I desire should be: > Microsoft Windows [Version 6.2.9200] > > (c) 2012 Microsoft Corporation. All rights reserved. I have tried to use inserting newline by using `\\\`, `\newline` etc. after first line, nothing helped me. Any suggestion from you are welcome. Please note that latex's code listing(Supported languages) doesn't support Batch file programming language syntax.


title: How to use pgfpages for creating sheets of labels

text: I am trying to create sheets of labels using `pgfpages` but, apparently, I'm doing it wrong. Here is what I have tried:               \documentclass{article}     \usepackage[paperwidth=2in,paperheight=2in,nohead,nofoot]{geometry}     \pagestyle{empty}          \usepackage{pgf}     \usepackage{pgfpages}          % Layout from http://www.onlinelabels.com/OL3016.htm     \pgfpagesdeclarelayout{OL3016}     {       \edef\pgfpageoptionheight{\the\paperheight}%       \edef\pgfpageoptionwidth{\the\paperwidth}%       \edef\pgfpageoptionborder{0pt}%       \edef\labelheight{2in}%       \edef\labelwidth{2in}%       \edef\labelmargin{0.25in}%       \edef\labelxsep{1in}%       \edef\labelysep{0.8333in}%     }     {       \pgfpagesphysicalpageoptions       {%         logical pages=12,%         last logical shipout=12,         physical height=\pgfpageoptionheight,%         physical width=\pgfpageoptionwidth,%         current logical shipout=1,%       }     %       \pgfpageslogicalpageoptions{1}       {%          %copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{1.25in}{1.25in}%       }%       \pgfpageslogicalpageoptions{2}       {%         copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{4.25in}{1.25in}%       }%       \pgfpageslogicalpageoptions{3}       {%         copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{7.25in}{1.25in}%       }%     %       \pgfpageslogicalpageoptions{4}       {%          copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{1.25in}{3.25in+\labelysep}%       }%       \pgfpageslogicalpageoptions{5}       {%         copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{1.25in+3in}{3.25in+\labelysep}%       }%       \pgfpageslogicalpageoptions{6}       {%         copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{7.25in}{3.25in+\labelysep}%       }%       %         \pgfpageslogicalpageoptions{7}       {%          copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{1.25in}{5.25in+2*\labelysep}%       }%       \pgfpageslogicalpageoptions{8}       {%         copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{4.25in}{5.25in+2*\labelysep}%       }%       \pgfpageslogicalpageoptions{9}       {%         copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{7.25in}{5.25in+2*\labelysep}%       }%       %         \pgfpageslogicalpageoptions{10}       {%          copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{1.25in}{7.25in+3*\labelysep}%       }%       \pgfpageslogicalpageoptions{11}       {%         copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{4.25in}{7.25in+3*\labelysep}%       }%       \pgfpageslogicalpageoptions{12}       {%         copy from=1,%         border code=\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=\labelwidth,%         resized height=\labelheight,%         center=\pgfpoint{7.25in}{7.25in+3*\labelysep}%       }%       }               \pgfpagesuselayout{OL3016}[letterpaper]          \begin{document}          This is my label 1.\clearpage     This is my label 2.\clearpage     This is my label 3.\clearpage     This is my label 4.\clearpage     This is my label 5.\clearpage     This is my label 6.\clearpage     This is my label 7.\clearpage     This is my label 8.\clearpage     This is my label 9.\clearpage     This is my label 10.\clearpage     This is my label 11.\clearpage     This is my label 12.\clearpage     This is my label 13.\clearpage          \end{document}      I was expection to have one sheet with 12 copies of the same label (because of the `copy from` option). What I am getting is the first physical page with label 1 -- 12 and the next with label 13 and eleven label 1. Can `pgfpages` be used to declare a layout with 12 copies of the same logical page on each physical page?


title: Why don't I see Latin Modern in my tex document?

text: a complete novice question: I have installed new version of TeX (>3.0) on my Mac (10.7.x). The packages `lm` and `lm-math` are installed (I have checked in TeX Live Utility) I have put the following code in my `.tex` Abstract document:               \usepackage{lmodern}     \usepackage[T1]{fontenc}       This should, according to everything I have read, do it. But when I compile the document, I do not see it in `Latin Modern`! It is just a normal font (I think `Times`). I have tested with commenting out the `\usepackage{lmodern}` line and it is the same font. I do not get any compile error. Now, my `/Library/fonts` folder does not contain any `lm` fonts. I am trying to copy those from `/usr/local/texlive/2007/texmf- dist/fonts/opentype/public/lm` to `/Library/fonts` but so far unsuccessful. Should I copy each of the about 50 `lm` fonts that are listed in this folder, to the fonts folder? Please help!


title: Strange movement of objects when highlighted item in beamer is uncovered

text: Can anyone explain to me why there is this strange "shift" of objects when passing from the first to the second slide in the below MWE?               \documentclass{beamer}     \usepackage{beamerthemeshadow}     \usepackage{mathtools}     \usepackage{tikz}     \usetikzlibrary{shadows,shapes.arrows}          \tikzset{         invisible/.style={opacity=0,text opacity=0},         visible on/.style={alt=#1{}{invisible}},         alt/.code args={<#1>#2#3}{%           \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}          },         beameralert/.style={alt=<#1>{fill=red!30,rounded corners,inner sep=1pt}{},anchor=base},     }          \newcommand*{\tikzarrow}[2]{%       \tikz[         baseline=(A.base),                   ]\node[         single arrow,                          single arrow head extend=2pt,          draw,                                  inner sep=2pt,                         top color=white,                       bottom color=#1,                       drop shadow                          ] (A) {#2};%     }          \begin{document}          \begin{frame}       \begin{block}{Theorem}     Assume:     \begin{itemize}       \item Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.     \end{itemize}          \tikzarrow{yellow}{Then} \tikz[baseline=(A.base)] \node[beameralert=2] (A) {$a+b+c+d+e+f+g=47$.};       \end{block}     \end{frame}          \end{document}      PS: The question is, in a sense, a follow-up of the accepted answer in Highlighting in beamer using TikZ nodes.


title: tableofcontents too large

text: I would like to insert `\tableofcontents[currentsection]` in my presentation. Unfortunately I have not so many sections, so the space between the "items" is too much. I don't wont to change the `\documentclass[compress, 10pt]{beamer}` option at the beginning because otherwise it will change the dimension of all the document that is ok for me. Is it possible to reduce the space? And how?


title: Shifting text section to the right

text: I have a large picture on the left side of the page and text referring to the picture on the right side. My problem is that the code as it is atm makes the text overlap the figure. It looks like this:               \newpage         \begin{wrapfigure}{l}{0.5\textwidth}         \vspace{-2cm}          \includegraphics[width=0.8\textwidth]{pics/dummy.png}         \vspace{-100cm}         \end{wrapfigure}         \section{Test}         text referring to picture         text referring to picture         text referring to picture         \end{document}


title: Margin floats and hyperlinks

text: I read Margin Figures/captions and the answers within. I have stripped the definition of the `marginfloats` from the `tufte` documentclass into the MWE below. Can the definition of `\@tufte@margin@floatbox` be tweaked so that the hyperlink goes to the top of the figure, and not below the caption?               \documentclass{article}     \usepackage[left=6cm,right=1cm,showframe=true,                 asymmetric=true]{geometry}                    \usepackage{placeins}     \usepackage{hyperref}          \reversemarginpar     \setlength{\marginparwidth}{5cm}          \makeatletter     % Margin float environment     \newsavebox{\@tufte@margin@floatbox}     \newenvironment{@tufte@margin@float}[2][-1.2ex]%       {\FloatBarrier% process all floats before this point so the figure/table numbers stay in order.       \begin{lrbox}{\@tufte@margin@floatbox}%       \begin{minipage}{\marginparwidth}%         \def\@captype{#2}%         \hbox{}\vspace*{#1}%         \noindent%       }       {\end{minipage}%       \end{lrbox}%       \marginpar{\usebox{\@tufte@margin@floatbox}}%       }          % Margin figure environment     \newenvironment{marginfigure}[1][-1.2ex]%       {\begin{@tufte@margin@float}[#1]{figure}}       {\end{@tufte@margin@float}}          % Margin table environment     \newenvironment{margintable}[1][-1.2ex]%       {\begin{@tufte@margin@float}[#1]{table}}       {\end{@tufte@margin@float}}          \makeatother          \begin{document}          This is a hyperlink to Figure \ref{fig:test}          \newpage          \begin{marginfigure}      \centering      \rule{30pt}{20pt}      \caption{Figure in margin}      \label{fig:test}     \end{marginfigure}          \end{document}


title: Move section anchors generated by tex4ht

text:
When compiling a file with `tex4ht`, the sections are transformed with header HTML tags with anchor. So, if I compile               \documentclass{article}     \usepackage[xhtml,mathml]{tex4ht}     \begin{document}     \section{Hello}     \end{document}      with `latex`, `tex4ht`, I obtain the following html code
[...]Hello
      Is it possible to move the anchor tag to the end, and to make it non empty? Specifically, I would like something like:
[...]Hello¶
      Is that possible?


title: How to have an itemize inside a tabularx

text: I am trying to have an `itemize` inside one of the columns in a `tabularx`, but when trying to compile this code:               \begin{table}     \begin{tabularx}{\linewidth}{>{\setlength\hsize{.2\hsize}}X|>{\setlength\hsize{1.8\hsize}}X|>{\setlength\hsize{0.3\hsize}}X}     \textbf{Req.} & \textbf{Description} & \textbf{Priority} \\ \hline \hline     \textbf{FR1} & \textbf{Starting application and logging in:}The user has to be able to start the application and authorize himself against an authorizing mechanism. & High \\ \hline     \textbf{FR2} & \textbf{Send a message to another user:}The user has to be able send a simple message via regular email protocols to a recipient of own choice. & High \\ \hline     \textbf{FR3} & \textbf{Browse received messages:} The user has to be able to browse all messages he has received. & High \\ \hline     \textbf{FR4} & \textbf{Browse sent messages:} The user has to be able to browse all messages he has sent, and see the status of a sent message, where the relevant statuses are “message delivered” and “message read”. & High \\ \hline     \textbf{FR5} & \textbf{Viewing address book:} The user has to be able to view the address book with all contacts, so that he is able to choose a recipient from a list when he wants to send a message. & High \\ \hline     \textbf{FR6} & \textbf{Marking messages with a grade of importance:}The user has to be able to set Security Label, Message Priority and Message Type on a message, so that the receiver of the message knows who the message is intended for, how important it is and in what environment it is is of interest. The Message Priority will decide how intrusive XOXOmail is, that is, how much ihe app takes over the phone in order to show the user that a message has arrived.  & High \\ \hline     \textbf{FR7} & \textbf{Sending and receiving message with attachments:}The user has to be able to add an attachment to the message, so that the recipient gets the attachment as well as the message. By opening the message, the attachments will also show. & Medium \\ \hline     \textbf{FR8} & \textbf{Answer, delete and forward messages:}The user has to be able to, by clicking on a message, choose if he wants to answer, delete or forward the message, and be brought to the correct screen for doing the selected action. & Medium \\ \hline     \textbf{FR9} & \textbf{Send instant message:}The user has to be able to, via very few screen interactions, send an instant message with a predefined security label and priority, to a predefined list of recipients. & Medium \\ \hline     \textbf{FR10} & \textbf{Settings menu:}The user has to be able to alter the following settings:      \begin{itemize}     \item{}Change default values of dropdown menus in the New Message window.     \item{}What the lowest security priority is before the message is sent via SMS     \item{}Setting text size in GUI, e.g. on received message text.     \end{itemize}  & Low     \end{tabularx}     \caption{Functional requirements} \label{tab:functionalreq}     \end{table}      I'll get this error message: > ! LaTeX Error: Something's wrong--perhaps a missing \item. I would really appreciate some help!


title: Page number shifted to the left

text: I am writing a report with different geometry settings for the title page, so after finishing the latter with `\end{titlepage}`, I specified the new settings for the rest of the document using `\restoregeometry` and then `\newgeometry{letterpaper,textwidth=7in,textheight=9.5in}`. Nevertheless, I am experiencing an issue with the page numbers: they are slightly shifted to the left. I can clearly see this by writing a centered number just over the page number (see the image below). How can I fix that?               \documentclass[12pt]{article}           \usepackage[letterpaper,textwidth=6.5in,textheight=9in]{geometry}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \fancyfoot[c]{--~\thepage~--}          \begin{document}          \begin{titlepage}     \begin{center}     Title page here     \end{center}     \end{titlepage}          \restoregeometry     \newgeometry{letterpaper,textwidth=7in,textheight=9.5in}          \section*{Introduction}     \vfill     \begin{center}     1     \end{center}          \end{document}      ![enter image description here](http://i.stack.imgur.com/UBYGT.png)


title: Problem with libertine font for pretty big quotes

text: The following code, that I used with success, does not work with the last TeX LIve distribution. I don't know why.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \begin{document}         {\fontsize{32}{32}\selectfont''}         {\fontfamily{fxl}\fontsize{32{32}\selectfont''}     \end{document}      Here is what is produced. ![](http://i.stack.imgur.com/pDiD6.png) How can I continue to have pretty quotes ?


title: Changing Margins in Stockton Beamer Theme

text: I am creating a presentation with `beamer` using `Stockton` theme. You can find `tex` file here I have two questions to ask. How can I change the margins of a slide? For the example below, I would like to change the margins following the black lines. ![enter image description here](http://i.stack.imgur.com/Z0epM.jpg)


title: Exercise list using enumitem: how control indentation and labeling of sublists?

text: For a book project, I want to define exercises in each chapter, having printed labels like **Exercise 1.1** and TeX labels like `lab:1.1` that can be referenced as `"see Exercise \ref{lab:1.1}"`. [I've read the discussion of some similar questions, but haven't been able to adapt them to my needs.] A lot of this has already been written using ordinary, nested enumerate lists. I'd like to use the following sort of markup to make conversion easier:               \begin{Exercises}       \exercise Here's the first exercise: Make it longer to see line wrap. Now the        question: How many angels can dance on the head of a pin?        \begin{enumerate}           \item Why are they laughing?           \item In a random sample of $n=30$ pins, how many angels do you expect, on average?        \end{enumerate}     \end{Exercises}      to produce output like this:               Exercise 1.1: Here's the first exercise: Make it longer to see line wrap. Now the         question: How many angels can dance on the head of a pin?              (a) Why are they laughing?         (b) In a random sample of $n=30$ pins, how many angels do you expect, on average?      I tried to do this using the enumitem package as shown in the example test file below, and I've gotten the labels and references to work, but the parts of an exercise are labeled 1., 2., etc., and the formatting I get looks like this:               Exercise 1.1: Here's the first exercise: Make it longer to see line wrap. Now the                   question: How many angels can dance on the head of a pin?                        1. Why are they laughing?                   2. In a random sample of $n=30$ pins, how many angels do you expect, on average?      I can get the parts labeled (a), (b), ... by explicitly using `\begin{enumerate}[label=(\alph*)]` for the parts of each exercise, but I'd prefer to have that happen automatically. Here is my current test file:               \documentclass{report}     \usepackage{enumitem}     \usepackage{lipsum}          % Test a list style for exercises in chapters, allowing references.          \newlist{exercises}{enumerate}{2}     \setlist[exercises]{label=\textbf{Exercise \thechapter.\arabic*:},leftmargin=*}     % why doesn't this work for exercise parts?     \setenumerate[2]{label=(\alph*)}          \newcounter{exercise}[chapter]     \renewcommand{\theexercise}{\thechapter.\arabic{exercise}}     \newenvironment{\Exercises}{%       \begin{exercises}[leftmargin=*]       }%       {%       \end{exercises}       }          \newcommand{\exercise}{%       \refstepcounter{exercise}%       \label{lab:\theexercise}%       \item%         }     \newcommand{\labref}[1]{Exercise~\ref{#1}}          \begin{document}          \chapter{One}\label{ch:one}     This is chapter \ref{ch:one}.     \lipsum[2]          \begin{\Exercises}          \exercise Here's the first exercise: Make it longer to see line wrap. Now the question: How many angels can dance on the head of a pin?         \begin{enumerate}             \item Why are they laughing?             \item In a random sample of $n=30$ pins, how many angels do you expect, on average?         \end{enumerate}          \exercise How many chucks can a woodchuck chuck?         \begin{enumerate}[label=(\alph*)]             \item Discuss: Can a woodchuck really chuck wood?             \item If a woodchuck \emph{can} chuck 3 cubits per hour, how many hours would it take             to chuck a mega-cubit forest?         \end{enumerate}          \exercise Why can't I make the parts of exercises labeled as (a), (b), ... without setting [label=] manually?          \end{\Exercises}          We can reference Exercise \ref{lab:1.1}.     What about Exercise \ref{lab:1.2}?     And also using the shorthand, \labref{lab:1.2}?          \chapter{Two}\label{ch:two}     This is chapter \ref{ch:two}. That's all there is.          \begin{\Exercises}          \exercise Here's the first exercise: How many angels can dance on the head of a pin?         \begin{enumerate}             \item Why are they laughing?             \item In a random sample of $n=30$ pins, how many angels do you expect, on average?         \end{enumerate}          \exercise How many chucks can a woodchuck chuck?  Refer to \labref{lab:1.2} for details.     \end{\Exercises}          Can we reference Exercise \ref{lab:2.1}?     Why not \labref{lab:2.2}?          \end{document}


title: Use of Tikzpicture and Includegraphics

text: The following codes output only the line but the figures are disappeared. Could anybody suggest how to force both the drawn line and the figures in the output? Many thanks!               \begin{figure}[ht!]     \begin{picture}(300,570)(0,80)     \begin{tikzpicture}     \put(0,440){\includegraphics[width=5.8in]{s1cbymax}}     \put(0,330){\includegraphics[width=5.8in]{s1f0bymax}}     \put(0,220){\includegraphics[width=5.8in]{s1f1bymax}}     \put(0,110){\includegraphics[width=5.8in]{s1f2bymax}}     \put(0,0){\includegraphics[width=5.8in]{s1f3bymax}}     \put(-10,360){\begin{sideways}\small$y^*$\end{sideways}}     \put(210,75){\small$\bar{u}/u_c$}          \put(210,75){\draw (30,0)--(30,5);}          \end{tikzpicture}     \end{picture}     \caption[$Set\:1$: Velocity profile normalized by maximum velocity]{$Set\:1$: Velocity profile normalized by maximum velocity.}     \label{s1profilebymax}     \end{figure}


title: Sorting preamble packages thematically while accounting for compulsory load orders

text: Within a document's preamble (or a custom "preamble" package), at times there's the need to take compulsory load orders for certain packages into account. Most packages must be loaded before the `hyperref` package, some packages (e.g. `glossaries`, `ellipsis`) must be loaded after `hyperref`, and then there's the `cleveref` package which _"basically[...] must be loaded **last** "_ (manual, section 2). A (small) document accounting for all this may look like               \documentclass{report}          \usepackage{varioref}% Must be loaded before hyperref     \usepackage{hyperref}     \usepackage{ellipsis}% Must be loaded after hyperref     \usepackage{cleveref}% Must be loaded after any packages that modify     %     LaTeX's referencing system          \begin{document}          \chapter{foo}\label{chap:foo}          Some text~\dots\ and some more.          \chapter{bar}          See \vref{chap:foo}.          \end{document}      However, I'd prefer a preamble that is sorted thematically, e.g.               \documentclass{report}          % Special characters and symbols     \usepackage{ellipsis}          % Cross-referencing     \usepackage{varioref}     \usepackage{cleveref}          % Hyperlinks     \usepackage{hyperref}          \begin{document}          [...]      (I didn't round out the above code snippet to a complete MWE because it would result in unresolved references.) I understand that sorting by compulsory load order is no big deal for small- to-medium preambles, but at some point (say, 20+ packages) it becomes confusing. Is it possible to sort preamble packages thematically, but still to account for compulsory load orders?


title: Longtable continues into footer

text: I am using the longtable package to span tables across multiple pages. However sometimes (to me randomly, however so far only i quite complex documents) the longtable doesn't break like intended, but continues into the footer. ![Longtable penetrating the footer instead of breaking correctly \(image\)](http://i.stack.imgur.com/KehJe.png) I tried to come up with a simple minimal example, but the tex files contained in Example1.7z file (link below) was the best i could do. Example tex files (deep link)


title: Need Header Example - For Mirror page (two side print)

text: Can anyone send example for this code?               \fancyhead[LE]{\leftmark}      \fancyhead[RO]{\rightmark}      \fancyhead[CE,CO]{\thepage}      \renewcommand{\headrulewidth}{0.4pt}      \renewcommand{\footrulewidth}{0pt}


title: Having the same amount of space with and without multicol when using with titlesec and itemize

text: I am trying to use `multicol` and `itemize` to spread a list over several columns. I am also using `titlesec` to style my headings. One part of my document uses multicol and the other does not and both have different vertical spacing, which looks odd. I've searched here on stack exchange and all the questions are about reducing the space before the multicol environment, while in my case, I want to increase it so that it is the same as that without multicol. Also, the problem arises only when I use the `titlesec` package. I think I need to set the `multicolsep` value but to what?               \documentclass{article}     \usepackage{multicol}     \usepackage{enumitem}     \usepackage[compact]{titlesec}          \begin{document}          \section*{Section}     \setlength\multicolsep{0pt}          \begin{multicols}{3}     \begin{itemize}[leftmargin=*, nosep]     \item Item 1     \item Item 2     \item Item 3     \item Item 4     \end{itemize}     \end{multicols}          \section*{Section}     \begin{itemize}[leftmargin=*, nosep]     \item Item 1     \item Item 2     \item Item 3     \item Item 4     \end{itemize}          \end{document}      So, I want the vertical distance between 'Section' and 'Item 1' to be the same in both the cases. The differene in vertical spacing is especially pronounced when I use the `compact` option of `titlesec` like `\usepackage[compact]{titlesec}`. Any ideas on making the spacing equal?


title: Citations overflowing

text: I'm having an odd problem with the citations. Whenever I call the, after rendering, I get odd formats like: > [Subramanian et al(2006)Subramanian, Ramamoorthy, Stone, and Kuipers] It's supposed to say only Subramian et al and the year. And the text is overflowing the paragraph structure (it isn't aligned with the paragraph). Any idea where could I look into to fix this. The style used is spbasic.bst. And I'm giving the input as a ".bib" file


title: What is citation_key in BibTeX notation?

text: What is citation_key in BibTeX notation: @ARTICLE{citation_key, required_fields [, optional_fields] } We have many articles written by our academic staff on our website.We want to put the BibTeX citation for each of articles . can i use the article id as citation_key ?


title: Subdividing structured abstracts

text: I am trying to produce a structured abstract, i.e. with subdivisions. For that purpose, the `\paragraph` command would produce the perfect output since I would like no line break after the subtitle of the abstract, but it seems not to work directly in the `abstract` environment (without being under `\section`). An empty `\section` could solve the problem, but produces a lot of white space. Does any of you have s solution to this problem?               \documentclass{article}     \usepackage[english]{babel}     \usepackage{blindtext}          \begin{document}          \begin{abstract}      \section*{}     \paragraph*{Lorem}     \blindtext[1]     \paragraph*{Ipsum}     \blindtext[1]          \end{abstract}           \end{document}      This produces too much space between the abstract title and the text body. Without `\section, however, the document will not compile. Are there any ghost sections?


title: adding notes below the table

text: I want to add a note below the table. I referred the following link: Add notes under the table. But the code given :               \documentclass{article}     \usepackage{booktabs,caption,fixltx2e}     \usepackage[flushleft]{threeparttable}     \begin{document}          \begin{table}       \begin{threeparttable}         \caption{Sample ANOVA table}          \begin{tabular}{lllll}           \toprule             Stubhead & \( df \) & \( f \) & \( \eta \) & \( p \) \          \midrule             & \multicolumn{4}{c}{Spanning text} \            Row 1 & 1 & 0.67 & 0.55 & 0.41 \            Row 2 & 2 & 0.02 & 0.01 & 0.39 \            Row 3 & 3 & 0.15 & 0.33 & 0.34 \            Row 4 & 4 & 1.00 & 0.76 & 0.54 \          \bottomrule         \end{tabular}         \begin{tablenotes}           \small           \item This is where authors provide additional information about           the data, including whatever notes are needed.         \end{tablenotes}       \end{threeparttable}     \end{table}     \end{document}      doesn't work(it doesn't compile and gives me 42 errors). I want to achieve a table something like this: ![enter image description here](http://i.stack.imgur.com/21WTJ.png)


title: \the\year in Roman and \the\month in text

text: I would like to get the month in text e.g., `June` and the year in Roman, e.g. `MMXIV` when I call `\the\month` and `\the\year` I also would like to avoid using any external package (I found some related questions, but all seem to be based on the `datetime` package): \today month as text Month Name in Upper case How do I "unprotect" an argument? Change \the\year


title: Why doesn't LaTeX provided ACS style contain article titles

text: I have tried both:               \usepackage[style=chem-acs]{biblatex}      and               \bibliographystyle{achemso}      and nether one gives titles of articles. However the ACS Style guide clearly specifies that this information should be there. Is this not the style that these packages are trying to provide or am I missing something else? * * * ## Example refs.bib:               @BOOK {KandR, AUTHOR  = "Kernighan, Brian W. and Ritchie, Dennis M.", TITLE   =     "{The C Programming Language Second Edition}", PUBLISHER = "Prentice-Hall,     Inc.", YEAR = 1988 }      @ONLINE {CUEDCplusplus, AUTHOR  = "Love, T.P.", TITLE   =     "{CUED C++}", URL = "http://www-h.eng.cam.ac.uk/help/tpl/languages/C++.html",     URLYEAR = 2010, PRESORT="aa" }      @article{Akamatsu:2011dz, Abstract = {The     physicochemical properties of candidate compounds play important roles in the      design of new pesticides. Pesticides must be absorbed by pests, be transported     to the target site, and then interact with proteins. Hydrophobicity is very     important for these processes. Log P, where P is the partition coefficient in     the 1-octanol/water system, is commonly used as a hydrophobic descriptor and      correlates with membrane permeation and transport. It was recently reported     that permeability by the parallel artificial membrane permeation assay (PAMPA)     could be used to predict human oral absorption of passively transported     compounds. PAMPA, which is a rapid high-throughput screening system, may be     useful to predict pesticide absorption because PAMPA permeability can be     calculated using log P and other parameters. Electronic and structural     properties as well as hydrophobicity are important factors for protein-ligand     interaction. To show the importance of physicochemical properties, the classic     QSAR and CoMFA of neonicotinoids and prediction of bioavailability of     pesticides in terms of membrane permeability in comparison with drugs are      described.},    Author = {Akamatsu, Miki}, Date-Added = {2012-07-06 13:37:41     +0200}, Date-Modified = {2012-07-06 13:37:41 +0200}, Doi = {10.1021/jf102525e},     Journal = {J Agric Food Chem}, Journal-Full = {Journal of agricultural and food     chemistry}, Mesh = {Anabasine; Animals; Biological Availability; Cell Membrane     Permeability; Drug Design; Humans; Imidazoles; Insecticides; Nitro Compounds;     Pesticides; Physicochemical Phenomena; Quantitative Structure-Activity     Relationship; Receptors, Nicotinic},    Month = {Apr}, Number = {7}, Pages =     {2909-17}, Pmid = {20879794}, Pst = {ppublish}, Title = {Importance of     physicochemical properties for the design of new pesticides}, Volume = {59},     Year = {2011}, Bdsk-Url-1 = {http://dx.doi.org/10.1021/jf102525e}}      test.tex:               \documentclass{article}      \usepackage[style=chem-acs]{biblatex}     \defbibnote{books}{Only books!}     \bibliography{refs}      \begin{document}      foo\cite{Akamatsu:2011dz}     \printbibliography[prenote=books, type=book]      \printbibliography      \end{document}      ![What is looks like](http://i.stack.imgur.com/osy6d.png)


title: Missing \item problem with enumerate

text: I get an error when trying to build my PDF in Texmaker, I have following lines of code giving me an issue despite working this morning:               \begin{enumerate}[a)]     \item Some text     \item Some text     \item Some text \\     \end{enumerate}      I get the following message: ![enter image description here](http://i.stack.imgur.com/UzUeh.png) As there are many issues that are similar I've tried the answer on this question to see if my enumerate was bugging due to the `\\\` and it wasn't the case. The strange thing is when I type the following it works perfectly:               \begin{enumerate}     \item Some text     \item Some text     \item Some text \\     \end{enumerate}


title: Horizontally align inference rules

text: I'm using the `bussproofs` package to write some inference rules, but i'd like to horizontally align them. I tried to write them within a two-columned table (one rule in the left cell and the other in the right), but it doesn't work. Any suggestions, please? Code producing the error, below:               \begin{tabular}{cc}     {\begin{prooftree}     \AxiomC{$\Gamma, A \vdash B$}     \RightLabel{\scriptsize{\emph{$\Rightarrow_\mathcal{I}$}}}     \UnaryInfC{$\Gamma \vdash A\Rightarrow B$}     \end{prooftree}} & {} \\     \end{tabular}      The second inference rule is missing from the code.


title: Table of contents misaligned with Tufte book symmetric

text: Usually when I try to create a document using the Tufte-latex classes, which table of contents could extents in more than one page, I find with the trouble of the composition of the table of contents. I can't find the way of get a right table of contents using a symmetric layout. In this case, the second page of the table of contents look like that. My MWE could be:               \PassOptionsToPackage{usenames,dvipsnames,table}{xcolor}     \documentclass[symmetric,marginals=raggedouter]{tufte-book}     \usepackage{etex}     \usepackage[TS1,T1]{fontenc}     \usepackage[utf8]{inputenx}     \usepackage[spanish,activeacute,mexico]{babel}     \usepackage[sc,osf]{mathpazo}     \usepackage{epigraph}     \usepackage[caption=false]{subfig}     \usepackage{graphicx,tikz,pgfplots}     \graphicspath{{./imagen/}}         \usepackage[colorinlistoftodos,spanish,textsize=footnotesize]{todonotes}     \usepackage{hyperref}     \clubpenalty=10000     \widowpenalty=10000          \parskip0.4\baselineskip          \setcounter{tocdepth}{1}     \setcounter{secnumdepth}{1}          \author{Me}     \title{The four agreements}          \begin{document}     \frontmatter          \maketitle          \chapter{introduction}          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \tableofcontents          \mainmatter          \chapter{First}          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \chapter{Second}          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \end{document}      I need to create well the table of contets, in the configuration I show is impossible. I'm using TeXLive 2013 updated on Ubuntu 14.04. Regards


title: How does one create, caption, label and refer to a subfigure?

text: So its a fairly simple question to a problem people normally experience. I have a rough idea of what to do, but I am looking for the correct way of doing things. So in the solution I will include what would be the bare minimum requirements I think would get this problem solved. I am looking for feedback and corrections though. So please tell me, how does one go about creating subfigures within a figure. After that, caption it. Then label it for reference and then refer to it in the text?


title: rebuild tree in Winedt once open a tex file

text: How to automatically rebuild tree panel once a tex file is opened in Winedt? I tries and put BuildTree;TreeSelectBranch('TOC');TreeAutoSelect(1,'TOC',1,2,0,2); in the "Open Document (After)", but it does not work!


title: Irregular behaviour when mixing \pagestyle and \newpage and \marginenote

text: This might be a newbie question, but I have been struggling for hours to find out what is going on and still it does not make any sense. I managed to create a MWE, but when I gradually transfer to the actual case everything falls apart. I am using a relative complicated Latex in multiple files. Please consider the following master: http://pastebin.com/CCXJJzpR                   \documentclass[a4paper,twoside,12pt,british]{report}          %DEBUG variable will be used to provide extra information as a margin note!     \newif\ifDEBUG      \DEBUGtrue          \author{MEEE }     %\title{Minimal PhD}     \title{\ifDEBUG\marginnote{DE-BUG mode!!!!}[1cm]\fi Big title}          \usepackage[LGR,T1]{fontenc}     \usepackage[utf8]{inputenc}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}               \usepackage[a4paper]{geometry}     \usepackage{marginnote}               \usepackage{subfiles} %for multiple files     %\usepackage[sectionbib]{chapterbib}          \usepackage{syntonly}     %\syntaxonly %when commented out, it DOES produce pdf file.               \usepackage{xcolor,graphicx,epstopdf} %for colour in images, for images, for auto-conversion     \usepackage{ifpdf}               \usepackage{color}     \usepackage[UKenglish, british]{babel}     \usepackage{hyphenat} %to hypen words in the text, use \hyp{} instead of direct -     \usepackage{verbatim}     \usepackage{nomencl}     % the following is useful when we have the old nomencl.sty package     \providecommand{\printnomenclature}{\printglossary}     \providecommand{\makenomenclature}{\makeglossary}     \makenomenclature          \usepackage[unicode=true,pdfauthor={meee}, pdftitle={ pdffffftitle },  pdftex,  bookmarks=true, bookmarksnumbered=true, bookmarksopen=true, bookmarksopenlevel=1, breaklinks=true,pdfborder={0 0 1}, colorlinks=true, backref=page]{hyperref}          \newif\ifpdf     \ifx\pdfoutput\undefined         \pdffalse     \else         \pdfoutput=1         \pdftrue     \fi          \ifpdf       % put here packages only for the PDF:       \DeclareGraphicsExtensions{.pdf,.png,.jpg,.mps}          \DeclareGraphicsRule{.eps}{pdf}{.pdf}{`epstopdf #1} %\includegraphics[width=7in]{result_1} %without extension       \hypersetup{linkcolor=blue}     \else     % put here packages only for the DVI:         \hypersetup{linkscolors=black}     \fi          \makeatletter              %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.         \DeclareRobustCommand{\greektext}{%           \fontencoding{LGR}\selectfont\def\encodingdefault{LGR}}         \DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}}         \DeclareFontEncoding{LGR}{}{}         \DeclareTextSymbol{\~}{LGR}{126}         %% Because html converters don't know tabularnewline         \providecommand{\tabularnewline}{\\}              %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.         \newcommand{\lyxaddress}[1]{         \par {\raggedright #1         \vspace{1.4em}         \noindent\par}         }              \@ifundefined{showcaptionsetup}{}{%         \PassOptionsToPackage{caption=false}{subfig}}         \usepackage{subfig}     \makeatother                              %headers          \usepackage{fancyhdr}     \pagestyle{headings}          %\pagestyle{myheadings} % use page headers     % puts headers on both pages alternating even and odd numbers.  \markboth{even-text}{odd-text}     %\markboth{Modular Examples for LaTeX, August 2008, Assad Ebrahim}{(Odd Numbered Pages), (Additional Text), (Final Text)}          %     %\makeatletter     %\def~\ref{\clearpage%     %\if@twoside     %\ifodd\c@page\else     %\vspace*{\fill}     %\hfill     %\begin{center}     %This page intentionally left blank.     %\end{center}     %\vspace{\fill}     %\thispagestyle{empty}     %\newpage     %\if@twocolumn\hbox{}\newpage\fi     %\fi     %\fi     %}     %\makeatother               %second version of intentially empty page     \newcommand*{\blankpage}{%         \vspace*{\fill}%         %\centering          \textit{This page is intentionally left blank for formatting purposes.}%         \vspace{\fill}%     }          \makeatletter%         \renewcommand*{\cleardoublepage}{             \clearpage             \if@twoside                 \ifodd                     \c@page                 \else                     \blankpage                 %   \thispagestyle{empty}                     \newpage                     \if@twocolumn                         \hbox{}                         \newpage                     \fi                 \fi             \fi             \pagestyle{headings}         }     \makeatother                    \newcommand*\NewPage{%     \newpage\null\thispagestyle{empty}\newpage%     }               \newcommand*\myblankpage{         \newpage         \thispagestyle{empty}         \textit{This page is intentionally left blank for formatting purposes.}%         \null         \pagebreak          }          %\newcommand*\NewPage{\newpage\null\thispagestyle{empty}\newpage}          \begin{document}               \maketitle                              \myblankpage                              \begin{center}     Dissertation (Full Time PhD)\\     \vspace{4cm}          \par\end{center}          \begin{center}     {\LARGE{}Meeeeee}\vspace{4cm}          \par\end{center}          \begin{center}     Supervised by     \par\end{center}          \begin{center}     Somebody     \bigskip{}          \par\end{center}          \begin{center}     Date of initial registration: past     \par\end{center}          \begin{center}     Date of Review Meeting: \textbf{now}     \par\end{center}               \lyxaddress{\begin{center}     Venue: \textbf{10:00am in space}      \par\end{center}}          \newpage{}               Month... 2014          \newpage{}                         \begin{flushright}     2014     \par\end{flushright}          \newpage{}                         \subsection*{Declaration}          This dissertation is the result of my own work and othe stuff     \vspace{2cm}                                        \newpage{}               \section*{Acknowledgements}          The research has been carried out somewhere          \newpage{}          \subfile{abstract}          \newpage{}          \tableofcontents{}     \listoffigures     \listoftables          \newpage{}          \settowidth{\nomlabelwidth}{EUROCONTROL}     \printnomenclature{}          \newpage{}                              \subfile{phd_1_problem_description}          \subfile{phd_2_literature_review}          \subfile{phd_3_technical_report}          \subfile{phd_4_methodology_families}          \subfile{phd_5_applications}          \subfile{phd_6_conclusions}               \appendix     \addcontentsline{toc}{chapter}{Appendix}     \subfile{appendix_1}     \subfile{appendix_2}          \newpage{}          \bibliographystyle{plain}     \phantomsection\addcontentsline{toc}{chapter}{\bibname}\bibliography{biblio}          \end{document}      and just the abstract: http://pastebin.com/X0fxdQRH                   \documentclass[phd_dissertation_master2.tex]{subfiles}                         \begin{document}              \begin{abstract}                             \ifDEBUG             \marginnote{Problem Description}[0cm]         \fi              any random text any random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textvvvvvvvv                   \ifDEBUG             \marginnote{How to address the problem}[0cm]         \fi              random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textany random textvvvvvvvv                                       \end{abstract}              \end{document}      Everything compiles fine on pdflatex, but the final output is not quite right. More precisely, the margin notes intersect with the main text body when I include the command \newline. I accidentally found this out by trial and error from the MWE. If I do not use it, then everything is fine. If it is included, then the aforementioned error appears. All I was trying to do is to create a command that will leave a message on the even pages (the standard message 'this page was left intentionally blank'). ![enter image description here](http://i.stack.imgur.com/5WKHz.png) I am satisfied with the rest of the document, I only needed to include that minor behaviour. Unfortunately, it has a massive effect and destroys my structure. I believe that the problem comes from the mix of packages: fancyhdr marginnote subfiles but from their description there wasn't any known bad behaviour. any suggestions? I was trying to print any boxes around each element of the text, but I couldn't find that, either. After following Jared's advice, the print layouts are: ![enter image description here](http://i.stack.imgur.com/ORBBZ.png) ![enter image description here](http://i.stack.imgur.com/OfHHT.png) They seem perfectly fine to me. UPDATE: The code below is more minimal and still reproduces the bad behaviour. As is it delivers overalaped output. If you comment out the \newpage and comment in the \cleardoublepage, it seems to work fine.                   \documentclass[a4paper,twoside,12pt]{report}              \newif\ifDEBUG          \DEBUGtrue         %\DEBUGfalse              \usepackage[a4paper]{geometry}         \usepackage{marginnote}              \usepackage{layout}               \usepackage[LGR,T1]{fontenc}         \usepackage[utf8]{inputenc}               \usepackage{subfiles}               \usepackage[UKenglish]{babel}               \newcommand*{\blankpage}{%             \vspace*{\fill}%                  \textit{This page is intentionally left blank more complicated}%             \vspace{\fill}%         }              \makeatletter             \renewcommand*{\cleardoublepage}{                 \clearpage                 \if@twoside                     \ifodd                         \c@page                     \else                         \blankpage                         \thispagestyle{empty}                         \newpage                         \if@twocolumn                             \hbox{}                             \clearpage                         \fi                     \fi                 \fi                 \pagestyle{headings}             }         \makeatother                        \begin{document}          \layout          \cleardoublepage                   \ifDEBUG             \marginnote{BEFORE Abstract first marginnote for demonstration}[0cm]         \fi                   some random text some random text some random text some random text some random text some random text some random text some random text some          random text some random text some random text some random text some random text some random text some random text some random text some random              \newpage              %\cleardoublepage              \begin{abstract}              \ifDEBUG             \marginnote{in Abstract first marginnote for demonstration}[0cm]         \fi              some random text some random text some random text some random text some random text some random text some random text some random text some          random text some random text some random text some random text some random text some random text some random text some random text some random              \end{abstract}              \cleardoublepage              Start main text              \ifDEBUG             \marginnote{first marginnote in MAIN for demonstration}[0cm]         \fi              some random text some random text some random text some random text some random text some random text some random text some random text some          random text some random text some random text some random text some random text some random text some random text some random text some random                   \ifDEBUG             \marginnote{second marginnote in MAIN for demonstration}[0cm]         \fi              some random text some random text some random text some random text some random text some random text some random text some random text some          random text some random text some random text some random text some random text some random text some random text some random text some random              \cleardoublepage              \ifDEBUG             \marginnote{third marginnote in MAIN for demonstration}[0cm]         \fi              some random text some random text some random text some random text some random text some random text some random text some random text some          random text some random text some random text some random text some random text some random text some random text some random text some random              \end{document}      Any comment/advice is more than welcome. Many thanks in advance, C.


title: How do I separate items within a line so that the separator automatically does not appear at either end, and items are not line-broken?

text: In my CV, I have lists that look like this: wizardry \tdot fluid dynamics \tdot applied bear wrangling \tdot calculus \tdot [...] where \tdot is a \textperiodcentered character along with some hspace. This type of separation is entirely insensitive to the line wrapping, so if space runs out in a line, then according to chance   * an item might be divided, even hyphenated,   * or there might be \tdot's standing at the end of one or beginning of the next line These two together don't leave any ambiguity, you always know where one item ends and the other begins. However, they are also somewhat ugly. Here's an image: ![typeset example with problem zones highlighted](http://i.stack.imgur.com/Pb17P.png) Is there a way that I can make them both disappear? That would imply   * Defining groups of words that do not break   * Having a dividing thing that knows not to appear just before or just after an automatic line break Edit: Here is a MWE of how it was done originally.               \documentclass{report}     \makeatletter     \makeatother          \newcommand{\entrylabel}[1]{\mbox{#1}\hfil}          \newenvironment{CV}       {\begin{list}{}     {\renewcommand{\makelabel}{\entrylabel}     \setlength{\labelwidth}{77pt}     \setlength{\leftmargin}{84pt}       }}       {\end{list}     }          \newcommand{\tdot}{\hspace{0.4em}\textperiodcentered\hspace{0.6em}}          \begin{document}          \pagestyle{empty}          \begin{CV}     \item[Experimental] mechanics \tdot fluid dynamics \tdot thermodynamics \tdot waves \tdot electromagnetism \tdot optics \tdot atomic physics \tdot nuclear physics \tdot particle physics \tdot astrophysics \tdot astroparticle physics, methods and detectors \tdot cosmology \tdot neutrino astronomy \tdot accelerator physics and technology \tdot statistics and data analysis     \end{CV}          \end{document}


title: How should I add a file in my LaTeX document?

text: I am creating my BE project report using LaTeX and in that I have to add my sponsorship letter. Is there any solution to do this?


title: Limit pdflatex execution time

text: Is there any way to limit pdflatex execution time ? It would be nice if the value could be added to the texmf file.


title: The distance is far too big between the text and marginal notes

text: \documentclass[10pt,a4paper]{book}          \usepackage{ledmac}     \usepackage{ulem}          \begin{document}          \beginnumbering     \pstart          A \ledsidenote{\textit{big car}}          \pend          \endnumbering          \end{document}      The distance is huge between the text and the sidenote.


title: Error after exiting pdf in Texmaker and SumatraPdf

text: After compiling the document below:               \documentclass[letterpaper]{article}     \usepackage{background}     \usepackage{lipsum}     \newcommand{\edpeercopyright}[2]{%           {\small\color{black}Copyright \copyright\ 2013 edpeer.org \textregistered. Unauthorized photocopying is prohibited.}\quad{\color{#1}\rule{#2}{3pt}}%         }     \backgroundsetup{%                     contents={\edpeercopyright{red}{5cm}},                     angle=90,                     position={-1.5,-5},%                     opacity=1,                     scale=1                     }     \begin{document}     \lipsum[2]     \end{document}      I get the following error upon exiting the pdf file generated:               ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@CA1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state - .\mupdf\source\pdf\pdf-interpret.c:3044: Ignoring errors during rendering ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@ca1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@CA1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@ca1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@CA1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state - .\mupdf\source\pdf\pdf-interpret.c:3044: Ignoring errors during rendering ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@ca1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@CA1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@ca1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state      Why is this? Something tells me its the command `\edpeercopyright`.


title: Skim Inverse Search Problem with Sublime Text 2

text: Skim Inverse Search doesn't work for me(Mac OS 10.9) Everything works fine for Sublime Text 2 with LaTexTools, building etc. Skim pops out, fine. Test PDF looks good. I set up sync in Skim wish to have inverse search, unfortunately, doesn't work. Please note: I have also set up Sublime Text 2, LaTexTools, Sumatra PDF viewer in windows before as well. Everything works perfect. I double-click on a line in pdf and sublime text navigates to my desired location. So does the inverse search in Skim works in the same gesture manner as Sumatra does? Or I need extra configuration in Mac OS? Thanks in advance! My version of app:(all application installed in default location and settings) Mac os 10.9 Sublime Text 2.02 LaTexTools release 2014-3-12 Skim 1.4.8(82) My Skim sync setup in the picture: ![Sync setup](http://i.stack.imgur.com/t1wSj.png)


title: Numbering a group of footnotes differently

text: Consider you have two group of footnotes: first group are normal footnotes and other one are a group of related notes. How can number second group with different style? (for example: 1,2,3,... and (1),(2),(3)...) **Update:** How can I number them like this: 1,2,3,(4),5,6,(7),... . Second group have parentheses.


title: Custom citation keys

text: I am preparing a publication list in LaTeX in which I'd like to have custom keys to differentiate between paper types. For instance, if I originally I have:   * [1] journal publication 1   * [2] journal publication 2   * [3] conference publication 1   * [4] conference publication 2   * [5] workshop publication 1 I'd like to turn it into something like:   * [J1] journal publication 1   * [J2] journal publication 2   * [C3] conference publication 1   * [C4] conference publication 2   * [W5] workshop publication 1 Of course the same keys would appear in the reference list and in the text. I could not find any easy way to do that with LaTeX/BibTeX. Do you have any suggestions?


title: node at sloped path and/or not respecting every path/.style

text: I'm producing a schematic Nyquist plot, and I want to create an arc between the x-axis and a straight line, which should be denoted `PM` (phase margin). I use the `intersections` library to find the intersections between a circle `path` around the origin and the negative x-axis and the straight line. So far so good. But when I want to place a node on the `\draw[bend right]` `path`, the text is way too large (see pic) and it looks like it's anchored to the origin, not the path drawn between `(P1)` and `(P2)`. I suspect that the circle `path` used to generate the intersections are the source of my problem. My intention is to produce a `PM` that is perpendicular left of the midway of the arc: `node[sloped,left,midway] {$\PM$};` What's going on here? I have removed a lot of stuff in the plot to produce the MWE. The `\PM` code works like a charm other places in the plot, just not at the `bend right` path. MWE:               \documentclass{standalone}     \usepackage{tikz, amsmath}     \usetikzlibrary{intersections, calc}     \newcommand{\GM}{\text{GM}}     \newcommand{\PM}{\text{PM}}     \begin{document}     \begin{tikzpicture}[scale = 3.5,         every path/.style = {thin, font=\footnotesize, >={stealth}},         ]              % Generating axes         \draw[step=0.5cm, gray, very thin] (-1.2,-1.2) grid (1.2,1.2) ;             \draw[dashed, name path=circle] (0,0) circle[radius=1] ;             \draw[->, name path=Re] (-1.2,0) -- (1.2,0) node[right] {$\Re$} coordinate(x axis) ;             \draw[->] (0,-1.2) -- (0,1.2) node[above] {$\Im$} coordinate(y axis) ;             \foreach \x/\xtext in {-1/,-.5/,.5/\frac{1}{2}, 1}                 \draw[xshift=\x cm] (0pt,1pt) -- (0pt,-1pt) node[below,fill=white] {$\xtext$};             \foreach \y/\ytext in {-1, -.5/-\frac{1}{2}, .5/\frac{1}{2}, 1}                 \draw[yshift=\y cm] (1pt,0pt) -- (-1pt,0pt) node[left,fill=white] {$\ytext$};              % Curved line         \draw[name path=line] (0,0) .. controls (-0.25,0.5) and (-1,0) .. (-1.0,-1.0)              node[at end, above right] {$L(i\omega)$};              % Straight line         \path[name intersections={of=line and circle}];         \draw[->, name path=PM] (0,0)--(intersection-1) ;              % Generating coordinates for the arc         \path[name path=circle] circle (0.3) ;         \path[name intersections={of=circle and Re}] ;         \coordinate (P1) at (intersection-2) ;              \path[name intersections={of=circle and PM}] ;         \coordinate (P2) at (intersection-1) ;              % Drawing the arc             \draw[bend right] (P1) to (P2) node[left,sloped,midway] {$\PM$} ;     \end{tikzpicture}     \end{document}      Result: ![enter image description here](http://i.stack.imgur.com/fJ4hK.png)


title: how to include existing pdf slides into my beamer?

text: are there any ways to incorporate some slides in existing beamer file into my beamer? Say, I want to put slide 2 in file A (a beamer pdf file) into my beamer presentation, can this be done? PS: `file A` is a pdf and does not have bounding box.


title: Wireframes for Webdesign with tikz

text: I am searching for information about using tikz to draw wireframes for websites. Is there any particular workflow around? Does somebody know some sort of packages I can use? Here is a link to explain the term "wireframe".


title: Multiplying a length by a factor

text: I am trying to create a package that will use grid typesetting (in the humanities, so not much of a problem) but that should allow the user to freely set the `\baselinestretch`. I am using the `memoir` class as a basis. In order to do so, I have defined some font sizes, and calculated the amount of space which I should add, for instance after a `\Large` heading, so as to preserve the vertical alignment; then I am setting the lengths accordingly. So, for instance:               \renewcommand{\baselinestretch}{1.1}\selectfont     \renewcommand*{\normalsize}{\fontsize{12}{14.5}\selectfont}     \renewcommand*{\Large}{\fontsize{17}{22}\selectfont}     \def\addto@Large{7.7pt}          \setlength{\beforechapskip}{\addto@Large}     \addtolength{\beforechapskip}{\baselineskip}      It works so far, but I would like to be able to change `\baselinestretch` at will. In order to do that, I basically need to define my `\addto@Large` command for a stretch factor of one (so that would be `7pt` here), and then multiply it by the `\baselinestretch` factor. Is it possible, and if so, how can I do that?


title: Problem with pgf-pie and \newcommand use

text: I am currently using pgf-pie package and I face a problem when I write the pgf-pie content using `\newcommand` instruction. The following MWE               \documentclass{standalone}     \usepackage{pgf-pie}     \usetikzlibrary{shadows}     \begin{document}          \newcommand{\testpie}{10/ A , 20/ B , 30/ C , 40/ D}          \begin{tikzpicture}          \begin{pie}[       text = inside,       scale font,       style = drop shadow     ]     {       \testpie     }     \end{pie}     \end{tikzpicture}          \end{document}      generates the following error               ! Package PGF Math Error: Unknown function `A' (in '10/ A , 20/ B , 30/ C , 40/D').      The final goal is to automatically generate the "fraction" sequence by reading a pgfplotstable. **Edit:** Going back to initial code I have something like that               \documentclass{standalone}          \usepackage{pgfplotstable}     \usepackage{pgf-pie}     \usepackage{xstring}          \pgfplotstableread[col sep=comma]{       Year,TB,B,AB,P,NA       2008/2009,15,38,15,0,31       2009/2010,13,25,38,0,25       2010/2011,17,50,8,17,8     }{\mention}          %% Feel free to improve the next lines     \newcommand{\pieplot}[1]{%       \pgfplotstableforeachcolumnelement{Year}\of{#1}\as\cell{%         \IfStrEq{\cell}{2008/2009}{%           \pgfplotsforeachungrouped \x in {TB,B,AB,P,NA}{%             \pgfplotstablegetelem{\pgfplotstablerow}{\x}\of{#1}             \pgfmathtruncatemacro\val{\pgfplotsretval}             \ifnum\val=0             \else             \val / \x             \IfStrEq{\x}{NA}{}{,}             \fi           }         }       }     }          \begin{document}       \pieplot{\mention}     \end{document}      which generates the right "fraction" sequence but fails when I use `\pie` command even with `\mypie` command.


title: How to customize the page header and the page number of classicthesis?

text: I am using the classicthesis package and would like to customize the **page headers** and the **page numbers**. Here is a test project that shows the problem.               \documentclass[dottedtoc, headinclude, footinclude=true]{scrreprt}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[pdfspacing]{classicthesis}     \usepackage{lipsum,kantlipsum} % Generates dummy text.          \begin{document}     \pagestyle{plain}     \tableofcontents          \pagestyle{scrheadings} % <--- Affects the page header and page number in the footer.          \part{Liechtenstein}     \chapter{Liechtenstein}\kant[1-6]\clearpage          \part{Germany}     \chapter{Germany}\kant[1-3]\clearpage     \section{Bavaria}\kant[1-6]\clearpage     \section{Hesse}\kant[1-6]          \end{document}      When I add `\pagestyle{scrheadings}` the page number jumps to the header as shown in the screenshot. I want the page numbers to stay at the footer. Nevertheless, I want a page header that shows the current _chapter_ respectively the _section_. Please compile my example to recognize that some chapters do not have sections. It would be best, when I could manually decide whether the _chapter_ name should be displayed on all pages of the chapter or whether the _section_ names should appear. ![Wrong page header](http://i.stack.imgur.com/c57dc.png) This following screenshots show how a page looks like _with_ or _without_ `scrheadings` enabled. ![With or Without scrheadings](http://i.stack.imgur.com/kdlzE.png) **Desired layout:**   * Page number always in the footer.   * Chapter name or section name in the header.   * Total page numbers in the footer. (optional)   * Manual configuration whether chapter or section name is shown in the header. (optional)


title: Algorithm2e caption above code

text: I can't seem to figure out how to place a caption at the beginning of an `algorithm2e` pseudo code. I know it's possible with the `ruled` environment, but I don't want those lines at the top and the bottom. How can I move the algorithm caption above the code?


title: Adding a postscript (not referring to a file type!) section at the end of a document

text: I'm trying to add a section at the end of a document, and indicate the late edit by calling the section "Postscript." Is there a style or package for this that does this nicely? Or should I just do it manually?


title: hypcap is not fixing hyperref links

text: `Hyperref` is not linking to the correct location of the `figure`. Using the `hypcap` package didn't help. I keep getting the error :" you have forgotten to use `\caption`" .. The document class is available at this link: Below is the MWE:               \documentclass[12pt,letterpaper,doublespaced,ETD,proposal]{thesis}     \bibfiles{refs,strings}     \usepackage{graphicx, subfig}     \usepackage{hyperref}          %Needed to Generate the figures page     \figurespagetrue               \begin{document}     \contents %Generates the figures list.          \begin{figure}[htb]            \centering       \centerline{\includegraphics[width=6cm]{graphics.png}}          \caption{fig1}      \label{fig1}     \end{figure}     \end{document}      Thanks a lot.


title: subcaption color with the subfigure package

text: To define the caption color in my document, I am using               \usepackage{caption}     \usepackage[font={small,color=ocre}]{caption}      Which works perfectly, but currently facing the following two problems:   1. Subcaptions are not colored (I am using the subfigure package, so I can't use the same code as above) ![enter image description here](http://i.stack.imgur.com/QXaGV.jpg)   1. When a citation is included in the figure caption , it is not colored. ![enter image description here](http://i.stack.imgur.com/ZKkLL.jpg) Does any one have some solutions or hints? After the request, here is a minimum working example:               \documentclass[a4paper]{article}      \usepackage{amsmath}      \usepackage[numbers,square]{natbib}       %The following is uesd to make the caption colored     \usepackage{xcolor}     \definecolor{ocre}{RGB}{1,160,233}     \usepackage{caption}     \usepackage[font={small,color=ocre}]{caption}     \usepackage{graphicx,subfigure}     \usepackage[hidelinks]{hyperref}  % hyperlinks           \usepackage[hidelinks]{hyperref}  % hyperlinks           \hypersetup{                colorlinks=true,                allcolors=black,                         citecolor=black,               linkcolor=black,           }          \usepackage{filecontents}          \begin{filecontents*}{\jobname.bib}       @book{Knu86,         author = {Knuth, Donald E.},         year = {1986},         title = {The \TeX book},       }     \end{filecontents*}          \bibliography{\jobname} % if you’re using BibTeX               \begin{document}           \begin{figure}[hb]     \centering     %%% not \center     \boxed{\subfigure[Subfigure One]{\label{fig:SubfigureOne}\includegraphics[width=0.4\textwidth]{../../Desktop/StackExchange/Test.pdf}}}          \boxed{\subfigure[Subfigure Two]{\label{fig:SubfigureTwo}\includegraphics[width=0.4\textwidth]{../../Desktop/StackExchange/Test.pdf}}}          \caption{Comparison between Subfigure One and Subfigure Two. \autoref{fig:SubfigureOne} shows the difference for the complete data range, and \autoref{fig:SubfigureTwo} as displayed in \cite{Knu86}}     \label{fig:OverAllFigure}     \end{figure}          \end{document}


title: a beginner trying out beamer, can't get it to itemize

text: I can't get this to itemize, I just want a couple bullet points in my block sorry for the lengthy header its my professors lol               %A.DOCUMENTCLASSes.     %The document class produces a style for the document. %Most papers work fine with the next one.     %For letter style see the letter document on the website.     % For presentations, see a beamer document on the website. %     %\documentclass[10pt]{article}      \documentclass[blue]{beamer}      %\documentclass[10pt]{letter}     %B.PACKAGES to ADD     %The next commands are for latex packages which we sometimes use. %     \usepackage[ansinew]{inputenc}     \usepackage{color}     \usepackage{enumerate,latexsym}     \usepackage{amsmath,amssymb}     \usepackage{graphicx}     \usepackage{amsxtra}     \usepackage{amsfonts}     \usepackage{enumerate}     \usepackage{amsthm}     %COMMENT: The next 2 software packages are only for presentations. %     \usepackage{beamerthemeshadow}     \setbeamertemplate{navigation symbols}{}     %C. PAGE LAYOUT.     %The following commands are not for presentations!     %These commands are for creating margins, text width, text length %and double spacing for papers.     %     %\setlength{\oddsidemargin}{10pt} \setlength{\evensidemargin}{10pt} %\setlength{\textwidth}{430pt}     %\textwidth 15cm     %\oddsidemargin .2cm \evensidemargin .2cm     %\textheight 20cm     %\topmargin -.3cm     %\renewcommand{\baselinestretch}{2}     %D.COLORS.     %These commands are for colors for papers and presentations. %Note that \rrr makes RED, %\bbb makes BLUE,     %\ppp makes PURPLE and \ggg makes GREEN.      \definecolor{b}{rgb}{.1,.1,.7}     \definecolor{rr}{rgb}{.8,0,.3}     \definecolor{g}{rgb}{0,.5,0}     \definecolor{pp}{rgb}{.5,0,.7}     \definecolor{r}{rgb}{.6,0,.3} \definecolor{y}{rgb}{.9,.99,.9} \newcommand{\rrr}{\textcolor{rr}} \newcommand{\bbb}{\textcolor{b}} \newcommand{\ppp}{\textcolor{pp}} \renewcommand{\ggg}{\textcolor{g}} \newcommand{\grr}{\ggg} \newcommand{\bbl}{\bbb}     %E.ABBREVIATIONS.     %The next commands are abbreviations used frequently % especially in multi-variable calculus.     %     \newcommand{\vr}{{\ppp{\bf r}}} \newcommand{\va}{\ppp{\bf a}} \newcommand{\vi}{{\rrr{\bf i}}} \newcommand{\vj}{{\rrr{\bf j}}} \newcommand{\vk}{{\rrr{\bf k}}} \newcommand{\vu}{\rrr{\bf u}} \newcommand{\vb}{\bbb{\bf b}} \newcommand{\vv}{\bbl{\bf v}} \newcommand{\vn}{{\ppp{\bf n}}} \newcommand{\vw}{\ppp{\bf w}} \newcommand{\rR}{\rrr{\bf R}} \newcommand{\rA}{{\rrr{\bf A}}} \newcommand{\rrth}{{\bf \rR}^{\bf 3}} \newcommand{\rrtw}{{\bf \rR}^{\bf 2}} \renewcommand{\v}{\overset{\longrightarrow}}     %F.NEGATIVE SPACE     %The next 3 commands are for negative spacing and are %used frequently in presentations. \newcommand{\vsp}{\vspace{-.1cm}} \newcommand{\vs}{\vspace{-.2cm}} \newcommand{\vspa}{\vspace{-.3cm}}     %G. NUMBERED THEOREMS, DEFINITIONS,...     %These commands are for papers only.     %(for presentations, they need to be commented out).     %They create numbered theorems and other numbered objects like definitions % The ``section'' part produces numbering by section.     %If you remove that part, then the section number %where the "theorem" is located will not appear     %in the numbering of the statement of the "theorem". %     %\newtheorem{theorem}{Theorem}[section] \newtheorem{definition}[theorem]{Definition} %\newtheorem{definition}{Definition}[section]     %G'.     %Some commands mostly for presentations. %     \newtheorem{conjecture}{Conjecture} \newtheorem{history}{\large History} \newtheorem{question}[theorem]{Question} \newtheorem{Case}{Case} \newtheorem{notation}{Notation}     %H.SHORTHANDS \def and \newcommand.     %The command \def is used create abbreviations for     %frequently used symbols like the math symbol for capital R     %that we use to denote the real numbers or the Greek letter theta.     %     %For longer abbreviations or commands, we usually use the command %\newcommand. For example, instead of typing \end{document}     %I usually type \ed instead.     %     %It may not be a good idea to use too many of     %these abbreviations if someone else (a coauthor) is     %reading your tex document, they may not understand.     %     \def\R{\mathbb{R}}     \def\t{\theta}     \def\rth{\mathbb{R}^3}     \newcommand{\ben}{\begin{enumerate}} \newcommand{\bit}{\begin{itemize}} \newcommand{\een}{\end{enumerate}} \newcommand{\eit}{\end{itemize}} \newcommand{\ed}{\end{document}}     %X. GRAY shaded BLOCKS in presentations.     %The next 2 commands are for creating gray shaded blocks in presentations. \newcommand{\bblock}{\begin{block}} \newcommand{\eblock}{\end{block}}                    \begin{document}          \begin{exampleblock}{Example (This is a very popular midterm exam problem)}     Find an \textcolor{b}{equation of the plane} which contains the points \\     $P(-1,2,1)$, $Q(1,-2,1)$, and $R(1,1,-1)$.     \end{exampleblock}     \begin{block}{Solution:}     \bf\Large Method 1     \begin{itemize}     \item A     \item B     \item C     \end{itemize}     \end{block}          \end{document}


title: Problems with \addtocontent and \addcontentsline

text: I am trying to add a heading in the list of figures and list of tables. I found a solution here: Include chapters in List of Figures with titletoc? However, this looks pretty complicated and I after some more googling I found this webpage: http://www.personal.ceu.hu/tex/toc.htm which show how to add a single line to toc, lof and lot using just 1 command. This seemed to be my solution however when I add the following line:               \addtocontents{lof}{Heading}      I get an error message: ! LaTeX Error: Something's wrong--perhaps a missing \item. I googled and found this webpage which shows a solution for this problem: https://groups.google.com/forum/?fromgroups=#!topic/comp.text.tex/2IE68-IJJ6U I tried different approaches such as:               \addtocontents{lof}{\protect\contentsline{chapter}{Heading 1}{}}     \addtocontents{lof}{\protect\contentsline{figure}{Heading 2}{}}          \addcontentsline{lof}{chapter}{\protect\numberline{}{Heading 3}}     \addcontentsline{lof}{figure}{\protect\numberline{}{Heading 4}}      The one which looks closest to what I want is the first command ...{Heading 1} However, using this command latex adds an extra line or extra vertical space so that there is a new line after Heading 1 in the lof. This would be fixed by using:               \addtocontents{lof}{\textbf{Heading}}      However, as already written this results in an error. I don't understand why this simple command results in an error even though I am quite sure I got the syntax right. So just to clarify how I would like to have my `lof` here is a short example:               \textbf{1 Chapter}               1.1 Figure 1               1.2 Figure 2          \textbf{2 Chapter}               2.1 Figure 3               2.2 Figure 4      Can anyone help? Here is my working example:               \documentclass[10pt,DIV=12,a4paper,numbers=noenddot]{scrreprt}     \begin{document}          \tableofcontents     \listoffigures          %      \addtocontents{lof}{\protect\contentsline{figure}{Heading 1}{}}     \addcontentsline{lof}{chapter}{\protect\numberline{}{Heading 2}}     \addcontentsline{lof}{figure}{\protect\numberline{}{Heading 3}}          % Closest to what I would prefer     \addtocontents{lof}{\textbf{Heading 4}\protect\par}     \addtocontents{lof}{\protect\contentsline{chapter}{Heading 5}{}}          \chapter{Introduction}     \section{s1}          \begin{figure}     \caption{figure 1}     \end{figure}          \begin{figure}     \caption{figure 2}     \end{figure}          \section{s2}          \chapter{Content}     \section{c1}     \section{c2}          \end{document}      I basically want the lof to look like the toc. There is no newline after "1 Introduction" and "2 Content". I also just realized that the font for "Heading 4" and "Heading 5" looks different. So I think I would prefer the font of "Heading 5" which I think is the one used in the toc. So "Heading 5" would be perfect if there would not be a newline afterwards. Is it possible to somehow suppress this newline?


title: texlive.js possible?

text: I just found about emscripten, texlive.js is it really a converted version of texlive in JavaScript or a server as Scribtex and many others? Is this really possible?


title: Fading of horizontal lines is impossible?

text: The path fading option in TikZ is obviously not working for horizontal lines. For plotting constant functions as well as for drawing a line between two points. Making them slightly tilted solves the problem. Is this a know error and is there some way to work around? Here is a minimal example               \documentclass[a4paper,11pt]{article}     \usepackage{tikz,pgfplots}     \usetikzlibrary{fadings}     \begin{document}     \begin{tikzpicture}[>=stealth]       \begin{axis}[scale=3, domain=-1.1:6.5, xmin=-1, xmax=6.5,ymax=2, axis lines=none]             \addplot+[no marks,red,dashed,domain=-1:6.5] {0.7};        \addplot+[no marks,red,dashed,domain=-1:6.5,path fading=east] {0.8}; %not working                  \draw[red,dashed,path fading=east] (axis cs:-1,0.9) -- (axis cs:6.5,0.9); %not working        \draw[red,dashed,path fading=east] (axis cs:-1,0.9) -- (axis cs:6.5,1);            \end{axis}          \end{tikzpicture}     \end{document}


title: How can I start the numbering of my appendices by "B" (instead of "A")?

text: Let us consider the following example :               \documentclass[12pt,twoside,a4paper]{book}      \usepackage[left=.45in,right=.45in,top=.50in,bottom=.50in]{geometry}          \usepackage{fancyhdr,amsthm}     \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \fancyhead{}     \fancyfoot{}     \fancyhead[LE,RO]{\thepage}     \fancyhead[LO]{\slshape\leftmark }      \fancyhead[RE]{\slshape Basic Algebraic Topology and its Applications}                  \newtheoremstyle{myplain}% name     {3pt}% Space above     {3pt}% Space below     {\itshape}% Body font     {}% Indent amount     {\bfseries}% Theorem head font     {}% Punctuation after theorem head     {.5em}% Space after theorem head     {}% Theorem head spec (can be left empty, meaning `normal')               \theoremstyle{myplain}          \newtheorem{thm}{Theorem}[section]     %\theoremstyle{proposition}     \newtheorem{prop}[thm]{Proposition}     %\theoremstyle{definition}     newtheorem{defn}[thm]{Definition}     \newtheorem{example}[thm]{Example}     \newtheorem{lemma}[thm]{Lemma}               \newtheoremstyle{mytheorem}% name     {3pt}% Space above     {3pt}% Space below     {\itshape}% Body font     {}% Indent amount     {\bfseries}% Theorem head font     {.}% Punctuation after theorem head     {.5em}% Space after theorem head     {}% Theorem head spec (can be left empty, meaning `normal')               \theoremstyle{mytheorem}      \newtheorem{remark}{Remark}      \newtheorem*{remark*}{Remark}           \newtheorem{cor}{Corollary}      \newtheorem*{cor*}{Corollary}                \begin{document}      \setcounter{page}{0}\mbox{}\newpage      \thispagestyle{plain}      \def\chapternum{2}      \setcounter{chapter}{1}      \chapter{}       This is my second chapter.      \section{Section}      \begin{thm}       First Theorem.      \end{thm}           \appendix      \chapter{Chapter in appendix}      Text here           \section{Section}      \begin{defn}       Definition      \end{defn}                \end{document}        This produces : ![enter image description here](http://i.stack.imgur.com/Y1XZw.png) ![enter image description here](http://i.stack.imgur.com/8anK1.png) But I would like to produce the following : ![enter image description here](http://i.stack.imgur.com/BWNsX.png) ![enter image description here](http://i.stack.imgur.com/iwKV3.png) That is I want to get the appendix number as in my choice. Is there any command like `\setcounter` (already I have used) that will change appendix number/name? I have faced another problem : when I compile this program, I get the following warning: > \headheight is too small (12.0pt): make it at least 14.49998pt'. But whenever I put '14.49998pt' also shows a warning: > 'Unused global option(s):[14pt]'. Can anyone tell me how can I fix these problems?


title: How to set this content into the header properly, when ihead & markright did not work well / at all

text: After creating my headline here How to arrange / align / place pictures and text, to form a given headline? I guessed, I would just place it into the header with `\ihead` and `\thispagestyle{scrheadings}` - but NO. Problem is, the following text is placed uppon my header. And when I try to use `markright` I get eighter compile errors or no header at all. I read some infos about using `\protect`, but it did not help eighter. I am guessing, that my constuct itself is simply not that easy to migrate into a header. I hope I can solve this on my own, but maybe someone else seeks a challange too :) Here is the code, the images to it are available through the link before:               \documentclass[         pdftex,         a4paper,         11pt,         DIV15,         BCOR20mm,         parskip,         numbers=noenddot]{scrbook}         \usepackage{graphics}          \usepackage[pdftex]{graphicx}         \usepackage{scrpage2}         \usepackage{setspace}      \begin{document}     \thispagestyle{scrheadings}             \noindent            \ihead{             \textsf{             \begin{singlespace}                  \raisebox{-0.5\height}{\rlap{\includegraphics[scale=0.5]{left_demo.png}}}                 \hfill                 %\includegraphics[height=60px]{center_demo.png}                 %\hfill                 \raisebox{-0.15\height}{\llap{                 \scriptsize %                 \begin{tabular}[c]{@{}r@{}}                       somedemo txt abcdefghij,\\                       texttextte txt texttexttextetscter\\                       \\                       demodemode demodemode                 \end{tabular}}}                 \raisebox{-0.525\height}{\includegraphics[height=45px]{right_demo.png}}             \end{singlespace}}}             \huge{text}     \end{document}      I do really appreciate any help on this, thanks! _Edit:_ Here is what's wrong: ![enter image description here](http://i.stack.imgur.com/Erq4Q.png) the `text` in the red circle should not be that high (used `ihead` here)


title: Import elements of XML-Files in LyX/Latex

text: I have a software which creates XML-Files with a structure looking like this:               <model>     <dims>         <dim type="attr" name="foo">             <def>Insert Definition of the Dimension 'foo'</def>             <hiers>                 <hier name="foo">                     <def>Insert Definition of the Hierarchy 'foo'</def>                     <lvlrol lname="bar"/>                 </hier>             </hiers>             <lvls>                 <lvl tag="bar" name="bar">                     <def>Insert Definition of the Level 'bar'</def>                 </lvl>             </lvls>         </dim>         <dim type="attr" name="baz">             <def>Definition of baz</def>             [...]         </dim>     </dims>     </model>      Now I want to import the definitions (`<def>`) from every `<dim>` and every `<hier>` in Lyx, or at least in Latex. The Lyx-Document should have a (sub-)chapter for every `<dim>` in which all corresponding `<hier>`s are explained. These chapters shall solely be created from the definitions of the XML-File. How do I do that? I know how to put a whole XML-File into Latex ( Including XML file into LaTeX ) but I just want to import all definitions in a row.


title: How to use \polishhook symbol

text: I need to insert polish hook into latex document. Using comprehensive package I found, what `\polishhook{E}` is supported by wsuipa font package and `\polhk{E}` is supported by `mathscinet` package. There are problems with both (for me at least). I want to use cm-super font package, not wsuipa, and I have to use T2A font encoding while `mathscinet` supports OT1 only. Is there any solution of this problem?


title: How to configure the dictionary-path for TeXworks @ TeX Live portable?

text: I want to use spell-checking with TeXworks under TeXlive (portable) under Windows XP.   1. Is it possible to use the dictionaries of Mozilla, e.g. `en-GB.aff` and `en-GB.dic`?   2. Where do I place the dictionaries? Maybe C:\TeXlive2011\tlpkg\texworks\dictionaries\ ?   3. How do I configure TeXworks to use these dictionaries? a) adding `TW_DICPATH=C:\TeXlive2011\tlpkg\texworks\dictionaries\` to `texworks-setup.ini` did not work b) adding it in `TeXworks > Preferences > Typesetting > Paths` did not work c) adding it in `Start > configuration > control > system > expanded > environmental variables > user variables` did not work d) `... > system variables` did not work


title: How can I align section titles and list environments in the left margin?

text: I was wondering if you could help me with some alignment issues. I've search both here and Google but haven't really found a decent solution. This is what I have (LaTeX default):               1 First section            1. Apple       2. Banana       3. Cherry          1.1 First subsection            - Foo       - Bar      This is what I want:                 1  First section            1. Apple       2. Banana       3. Cherry          1.1  First subsection            -  Foo       -  Bar      Notice how everything lines up in the margin in the second example. I think this makes the rhythm of the document flow much better. A great example of what I want can be found in the documentation for the `microtype` package.


title: sfmath: bug or feature? Tildes are wrongly displayed

text: If I compile the following code (TeXLive 2011; Mac OS X 10.7.2, latexmk 4.26), I get wrongly placed tildes (in the middle of the letters instead of on top of them). Is this a bug?               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage{lmodern}     \renewcommand{\familydefault}{\sfdefault}     \usepackage[lm,T1experimental]{sfmath}     \usepackage[american]{babel}          \begin{document}         $\tilde{\psi}$ $\tilde{A}$     \end{document}


title: Increasing TeX's main memory

text: I have a plot with a lot of measurement datapoints. I exported this plot from Matlab2tikz. When I wanted to compile this, it said that the memory was exceeded. Now I found this, How to expand TeX's “main memory size”? (pgfplots memory overload). It tells me that I can export different tikzpictures to different files. This unluckely didn't help me since I only got 1 tikzpicture and it is already causing the problem. So I actually tried to increase the memory of TeX. I went to `/usr/share/texlive/texmf/web2c` then in `texmf.cnf` I changed `main_memory = 3000000` to `main_memory = 5000000`. Then I ran `texhash` and tried to compile my TeX file again. My problem is that after I increased the memory limit I again get the same error. `! TeX capacity exceeded, sorry [main memory size=3000000].`. However I did just changed it to `5000000`. So I presume that I did something wrong when increasing the memory limit? -edit-  Eventually I just used lualatex. This is due to the fact that I think there is something wrong with my texlive install, it is installed twice on my system for some reason. I think however that the answer of @Heiko Oberdiek is correct hence mark his question as the correct one.


title: What does a number followed by " in" mean?

text: The TeX syntax highlighter that I use colors all occurrences of a number followed by " in", e.g. `0 in` or `32 in` in a dangerous bright red, in almost all contexts. Why?


title: How to output the choices of the questions inside a box?

text: I plan to create a command where I can use to output the choices inside the box and above the list of questions but its a know how. This is a sample output of what i am saying. I will use the `\question` command to output the questions. ![choices are in the box](http://i.stack.imgur.com/xg2rz.png)


title: Bibtex "didn't find a database entry"

text: I'm having issues creating citations in my document. My text file states:               \documentclass[11pt]{article}          \usepackage[round]{natbib}          \begin{document}          Their long-term aid \citet{Haggarty:01}          \bibliographystyle{plainnat}     \bibliography{Quotes}          \end{document}      My bibtex file is:               \begin{thebibliography}          \bibitem[Haggarty and Pepin(2001)]{Haggarty:01}     L. Haggarty and B. Pepin.     \newblock An Investigation of Mathematics Textbooks and their use in English, French and German Classrooms.     \newblock \emph{Proceedings of the British Society for Research into Learning Mathematics}, 21\penalty0 (2):\penalty0 117--125, 2001.          \end{thebibliography}      When I latex, bibtex, latex, latex I get the following warning:               Warning--I didn't find a database entry for "Haggarty:01"      I've creating references like this before a long time ago, so I can't remember if there's anything else I should be doing. I've tried deleting the .aux file before running a fresh but nothing seems to help. Where am I going wrong?


title: apacite+bibtopic: how not to print heading

text: I need to give multiple bibliography list in tex file in APA style. Here's an example code:               \documentclass[letterpaper, 12pt, draft]{report}     \usepackage[english]{babel}     \usepackage{apacite}     \usepackage{bibtopic}          \begin{document}          \chapter{FIRST CHAPTER}          \begin{btSect}[apacite]{bibfile}         \section{First citation list}         \btPrintAll     \end{btSect}     \end{document}      If I'm using `plain` style, there's no "References" above the citation list (default behavior of `bibtopic`). But using `apacite` style the "Reference" cannot be avoided. Any help would be appreciated.


title: Typeset source code with tcolorbox

text: I want to typeset source code with `tcolorbox` package. How is possible in this package not to create static boxes but rather boxes that adjust according to the width of the code I write both vertically and horizontally? Also I want if a line is too long to break into a new line. Can I do that?


title: Section Counter: 0.1 steps, starting at 1.1

text: I'm using `\part*` and `\section` in order to formate my file. The problem is now, that `\section` just countrs from 1 to _n_. But what I actually need is the sections counting from 1.1 to 1. _n_ , and then, after the second `\part` start over as 2.1 to 2. _m_. I use `\part` and `\section` instead of `\section` and `\subsection` because of the fontsize. If there is a possibility to have `\section` displayed as large as `\part`, and `\subsection` as large as `\section`, this would also be a way to solve the problem. Any suggestions?


title: Change Citestyle to give Doe, J. (2013a) instead of Doe, J. (2013)a

text: I'm currently searching for a way to adjust the citestyle to fit my university's requirements. Currently I get as footnote `See John, D. (2013)a` when multiple books with same author and year exist. How can I change it, so have the letter inside the brackets? EDIT: Here the minimal example:               \documentclass[12pt, a4paper]{scrartcl}     \usepackage[citestyle=dhbw_ibim]{biblatex}     \bibliography{bibliography}     \begin{document}     foo\footcite[See][2]{test1}     bar\footcite[See][5]{test2}     \end{document}      The citestyle-file is available at: https://github.com/schocco/DHBW-stgt- template/blob/master/src/dhbw_ibim.cbx The bib used is:               @misc{test1,     author = {Doe, John},     year = {2013}     }           @misc{test2,     author = {Doe, John},     year = {2013}     }       Finally, I'm compiling with:               pdflatex mini.tex | biber mini | pdflatex mini.tex      EDIT2: \listfiles               *File List*     scrartcl.cls    2012/07/29 v3.11b KOMA-Script document class (article)     scrkbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent basics and keyval usage)     scrbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent basics and keyval usage)     keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     scrlfile.sty    2012/06/15 v3.12 KOMA-Script package (loading files)     tocbasic.sty    2012/04/04 v3.10b KOMA-Script package (handling toc-files)     scrsize12pt.clo    2012/07/29 v3.11b KOMA-Script font size class option (12pt)     typearea.sty    2012/07/29 v3.11b KOMA-Script package (type area)     biblatex.sty    2013/07/15 v2.7a programmable bibliographies (PK/JW/AB)     biblatex2.sty    2013/07/15 v2.7a programmable bibliographies (biber) (PK/JW/AB)     etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX     etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     logreq.sty    2010/08/04 v1.0 xml request logger     logreq.def    2010/08/04 v1.0 logreq spec v1.0     ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.     blx-dm.def     dhbw_ibim.dbx     biblatex-dm.cfg     blx-compat.def    2013/07/15 v2.7a biblatex compatibility (PK/JW/AB)     biblatex.def     standard.bbx    2013/07/15 v2.7a biblatex bibliography style (PK/JW/AB)     numeric.bbx    2013/07/15 v2.7a biblatex bibliography style (PK/JW/AB)     dhbw_ibim.cbx    2013/07/15 v2.7a biblatex citation style (PK/JW/AB)$Id:dhbw_ibim.cbx,v 0.1 2011/06/08 Rocco Schulz $     biblatex.cfg     english.lbx    2013/07/15 v2.7a biblatex localization (PK/JW/AB)     mini.bbl      Thanks in advance!