title: The numbering of and references to the subsections of a given section should only use subsection numbers

text: I have an article with multiple sections. Say Section 1 and Section 2, with subsections for each. But I want one section, say Section 2 here, to be treated specially. This question has two parts.   1. For section 2, I want the counter to just return the subsection number, i.e. instead of 2.3 I just want 3.   2. I want the section numbering to also only use the subsection numbers. The reason for this is that this is a Notes section, so is treated specially. See the illustration below.               \documentclass{article}     \begin{document}          \section{Section one}\label{one}          See Note~\ref{note.three}. % First part of question. How can I make this read "See Note 3." not "See Note 2.3."?          \section{Notes}\label{notes}     \subsection{First note}\label{note.one} % Second part of question. How can I make this read "1 First note" not "2.1 First note"?     Some text.     \subsection{Another note}\label{note.two} % Ditto     Some more text.     \subsection{Yet another note}\label{note.three} % Ditto     Yet more text.     \end{document}


title: "improper alphabetic constant" with hyperref and bidi packages

text: I'm getting an "improper alphabetic constant" error in xelatex which appears to be due to an interaction between the bidi and hyperref packages, when I redefine the \section cmd. Here's an MWE:               \documentclass{report}     \usepackage[unicode]{hyperref}     \usepackage{bidi} %Must be loaded after hyperref pkg     \makeatletter     \renewcommand\section{\@startsection{section}{1}{0pt}{0pt}{0pt}{}}     \makeatother     \begin{document}     \section{\RL{foo}}     \RL{bar}     \end{document}      It's important that the text \RL{bar} be the first non-whitespace after the \section{}, otherwise the error is not triggered. I've checked the suggested "Similar Questions," and don't see anything quite like this. Suggestions?


title: \subsubsubsection, \paragraph and \subparagraph count not reset when starting a new section, subsection, etc

text: I am trying to use subsection, subsubsection, subsubsubsection, paragraph and subparagraph on my article, and I using a code that was given below. How to add an extra level of sections with headings below \subsubsection The solution was posted below: \subsubsubsection count not reset when starting a new section, subsection, etc But I am still unable to get proper numbering. I admit that I am using article class because I am new to Latex and dont know much about other classes. Also, some would argue that I dont need so many indentations but in my reports I unfortunately have 9 levels of indentation that I want to show in ToC. Below is my MWE               \documentclass{article}     \usepackage{titlesec}     \usepackage[utf8]{inputenc}     \usepackage[hidelinks]{hyperref}     \titleclass{\subsubsubsection}{straight}[\subsection]          \newcounter{subsubsubsection}[subsubsection]          \renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}     \renewcommand\theparagraph{\thesubsubsubsection.\arabic{paragraph}}     \renewcommand\thesubparagraph{\theparagraph.\arabic{subparagraph}}          \titleformat{\subsubsubsection}       {\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}     \titlespacing*{\subsubsubsection}     {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}          \makeatletter     \renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%       {3.25ex \@plus1ex \@minus.2ex}%       {-1em}%       {\normalfont\normalsize\bfseries}}     \renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}       {3.25ex \@plus1ex \@minus .2ex}%       {-1em}%       {\normalfont\normalsize\bfseries}}     \def\toclevel@subsubsubsection{4}     \def\toclevel@paragraph{5}     \def\toclevel@paragraph{6}     \def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}     \def\l@paragraph{\@dottedtocline{5}{10em}{5em}}     \def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}     \makeatother          \makeatletter     \@addtoreset{subsubsubsection}{section}     \@addtoreset{subsubsubsection}{subsection}     \makeatother          \setcounter{secnumdepth}{6}     \setcounter{tocdepth}{6}          \author{Author}     \title{Title}     \date{2014}          \begin{document}     \maketitle     \newpage     \tableofcontents     \newpage     \section{Section 1}     \subsection{subsection 1}     \subsubsection{subsubsection 1}     \subsubsubsection{Subsubsubsection 1}     Some description here     \paragraph{paragraph 1}     Some description here     \paragraph{Paragraph 2}     Some description here     \subsubsubsection{subsubsubsection 2}     Description here     \subsubsubsection{subsubsubsection 3}     description here     \subsubsubsection{subsubsubsection 4}     description here     \paragraph{paragraph 1}      Some description here     \paragraph{paragraph 2}     some description here     \paragraph{Paragraph 3}     \subsubsubsection{subsubsubsection 5}     description here          \end{document}      ![PDF Result](http://i.stack.imgur.com/W5R4k.jpg) As you can see from ToC, paragraph 1 under subsubsubsection 4 started from 1.1.1.4.3 (I want it to start from 1.1.1.4.1) Similarly paragraph 2 under subsubsubsection 4 should be 1.1.1.4.2 respectively.


title: tikz and colorboxes in plain tex

text: I recently discovered that I could use `tikz` in my plain tex documents using `\input tikz`. I'm happy with it and began to experiment the drawing of some pictures. But, when trying to compile some documents, I discovered that all the `\colorbox` were now fill with black. The following example gives a black rectangle instead of a gray one with "some text" written in it :               \input eplain          \beginpackages\usepackage{color}\endpackages          \input tikz          \colorbox{gray}{some text}          \bye      Is this a known problem ? Is there a way to get back `\colorbox` working properly with `tikz` ?


title: How to add custom entry types to moderncv?

text: I use the `moderncv` document class. I would like to add two new sections:   * Conferences    * Mandates I would like to know the best way to add those two sections. Should I use BibTeX or `biblatex` like for publications (books, scientific articles etc.)? Or should I use another way, if yes what should I do? By conferences I mean that I’d add to add some information about the conference I give, such as:   * Date   * Name of the congress   * Title of my presentation   * Place (city, country)   * Etc. By mandate I mean information like:   * Date   * Names of the writers (me and colleagues)   * Name of the person who gives the mandate   * Name of the company   * Title of the mandate   * Small description of the mandate


title: A Matrix with labels, dashed lines

text:
I'm trying to TeX the following matrix, from Guillemin and Pollack (1.4 #13) ![enter image description here](http://i.stack.imgur.com/KdKbv.png) The best I've been able to do is get the dashed lines with               \[ \left( \begin{array}{c:c} B &  C \\ \hdashline     D & E \end{array} \right) \]
      If you want to test this try               \documentclass[11pt]{article}     \usepackage{arydshln}     \begin{document}     \[ \left( \begin{array}{c:c} B &  C \\ \hdashline     D & E \end{array} \right) \]
     \end{document}      Output looks like this: ![enter image description here](http://i.stack.imgur.com/ISyLe.png)


title: Table desturbingly floats into align environment functions

text: this is my code               \begin{align}         S(\Theta)&=\ln\left|\nu(\Theta)\right|\label{eq:S_theta}\\     \intertext{where $\nu(\Theta)$ is the determinant of the covariance matrix of the responses, which are defined as:}         \nu_{ij}(\Theta)&=\sum_{u=1}^n \left[Y_{iu}-f_{iu}(\Theta)\right]\cdot\left[Y_{ju}-f_{ju}(\Theta)\right]\label{eq:nu_ij}      \end{align}      I am using the align environment (from `amsmath`) to align my equations. Since my equations are at the lower and of my page after compiling the page break is after the first equation. This would not desturb me so much, although I would like to have the equations all on one page. But now also a table gets positioned on the top of my next page so that I see the first equation on one page, then the table, then my intertext, and finally my second equation. Does anybody have an idea how to solve this issue? Thanks a lot


title: \hhline double line imperfection

text: Using the `\hhline` command i found some imperfection in the double line. How can i fix it? ## Imperfection ![Imperfection](http://i.stack.imgur.com/riu4X.png) ## Table               \documentclass[11pt]{amsart}     \usepackage{amssymb}     \usepackage{hhline}                      \usepackage{siunitx}     \sisetup{output-decimal-marker={.}, group-separator={\,}}     \usepackage{eurosym}     \usepackage{dcolumn}                     \usepackage{multirow}                    \begin{document}          \begin{table}[htbp]     \begin{center}     \begin{tabular}{|lr|lr l|} \hline               H       & 5             & $W_N$ & 250       & \si{\gram}        \\     L       & 26            & $W_L$ & 241       & \si{\gram}        \\     P       & \num{3000}    & $C_u$ & 3E{-4}    & \euro/\si{\gram}  \\     $n_C$   & \num{142506}  & $c_0$ & 2E-01     & \euro/pack        \\     $\delta$& 1             & $c_1$ & 5E-01     & \euro/h           \\     \hhline{=====}               &   \multicolumn{2}{c}{$r.s_{std}$} &   \multicolumn{2}{c|}{$r.s_{iter}$} \\          \hhline{=====}          Media(W)    &   \multicolumn{2}{D{.}{.}{3.4}}{245.9463}                                                 &   \multicolumn{2}{D{.}{.}{3.4}|}{245.9459}\\     DevStd(W)   &   \multicolumn{2}{D{.}{.}{3.4}}{3.9932}                                                   &   \multicolumn{2}{D{.}{.}{3.4}|}{3.9939}\\     \emph{f.o}  &   \multicolumn{2}{D{.}{.}{3.4}}{0.27395}                                                  &   \multicolumn{2}{D{.}{.}{3.4}|}{0.27395}\\     $n_B$       &   \multicolumn{2}{D{.}{.}{3.4}}{3000}                                                     &   \multicolumn{2}{D{.}{.}{3.4}|}{3000}\\     $t_{tot}$   &   \multicolumn{2}{D{.}{.}{3.4}}{2612.22}                                                  &   \multicolumn{2}{D{.}{.}{3.4}|}{6906.10}\\          \hhline{=====}          Config.     &   \multicolumn{2}{c}{10 20 40 50 200}                                                     &   \multicolumn{2}{c|}{40 130 130 220 220}\\ \hline          \end{tabular}     \begin{footnotesize}     \caption{Confronto $r.s_{std}$ Vs $r.s_{iter}$ [$C_u > 0$]}     \label{tab:Confronto_rs_C_mag_0}     \end{footnotesize}      \end{center}     \end{table}          \end{document}


title: Coloring text between pauses in beamer

text: I use a lot of pauses. I would like to set something globally so that the most recent slide highlights (by bolding, making red, etc) the text that just appears. These lectures have many slides to them and I really don't want to have to use the alert command over and over. For example:               \documentclass{beamer}          \begin{document}          \begin{frame}     This is a test. \pause     This is another test \pause     This is a third test.     \end{frame}          \end{document}      I would like for the first slide to have only the first sentence appearing, in red. The second slide would have the first sentence in black and the second sentence in red. The third slide would have the first and second sentence in black and the third in red. Again, I know this can be done using the alert commands, but upon the last 'grep' of my most recent slides, I have 138 pauses. I was hoping for a silver bullet. Any suggestion would be appreciated. M


title: Pass key option inside a macro to a TikZ drawing command

text: I define a command with one optional key parameter. This command makes some calculations and them draws a `tikzpicture`. How can made my command to accept all the keys that a `\draw` command accept and pass them?               \newlength{\gl@blgskip}     \pgfkeys{/lineskip/.cd,                        .default=\baselineskip,                        .store in = \gl@blgskip@macro     }               \newcommand{\baselinegrid}[1][]     {             \pgfkeys{lineskip,#1}        % set length to optional parameter lineskip        \setlength{\gl@blgskip}{\gl@blgskip@macro}            %%% Do some calculations ...                 \begin{tikzpicture}         \draw (0,0) -- (0,5cm);       \end{tikzpicture}      Now I can call my commands as `\baselinegrid[lineskip=3cm]`. I want to do thing like `\baselinegrid[lineskiip=3cm, color=red]` and pass the option `color` to the `\draw` command.


Where I can find the source code of pdflatex.exe? ## Edit 1 This is quoted from the link given by @TH. > pdfTeX is built on top of TeX, written by Donald Knuth cum suis (Liang and > so), and eTeX, written by Peter Breitenlohner cum suis; part of the > paragraph optimization is inspired by the work of Hermann Zapf. Does it imply that the source code of `pdflatex.exe` will invoke `TeX` and `eTeX` ?


title: Elven font with TeX or LaTeX

text: > **Possible Duplicate:**   >  What package allows Elvish in TeX? It is possible to write in elven language using TeX as it is on the background of this page?


title: Placing the appendices after the backmatter in a thesis

text: This question points out that in the book class, as soon as the `\backmatter` command appears, the chapter numbering ceases to work properly. Thus, one is essentially forced to put the bibliography after the appendices. In principle, I agree with this ordering. However, my university's administration requires that the contents of my thesis appear in the following order:   * Intro and so forth   * Body   * Bibliography   * Appendices It is causing me a major headache to get the numbering of the appendix chapters to appear at all. Any suggestions for a workaround?


title: How to position fancyhdr[R]?

text: I cant get the right header/footer on the right position. It should be positioned 3cm from right page end. How can i achieve that? Sample Document:               \documentclass[12pt,a4paper]{scrartcl}          % includes (they are maybe currently not needed, but later)     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{ngerman}     \usepackage{pageslts}     \usepackage[hyphens]{url}     \usepackage[colorlinks=false]{hyperref}     \usepackage{floatflt}     \usepackage{fancyhdr}     \usepackage{blindtext}     \pagestyle{fancy}          % Layout anpassen     \setlength{\hoffset}{0.46cm}     \setlength{\voffset}{-0.04cm}     \setlength{\marginparwidth}{0pt}     \setlength{\oddsidemargin}{0pt}     \setlength{\marginparsep}{0pt}     \setlength{\textwidth}{15cm}     \setlength{\topmargin}{0pt}     \setlength{\headsep}{17pt}     \setlength{\textheight}{227mm}     \setlength{\footskip}{29pt}          % Kopf/Fußzeile     \fancyhf{}     \fancyhead[R]{Rechts}     \fancyhead[L]{Links}     \fancyfoot[R]{Rechts}     \fancyfoot[L]{Links}     \renewcommand\headrule{\rule{\textwidth}{1pt}}     \renewcommand\footrule{\rule{\textwidth}{1pt}\\}          \pagenumbering{arabic}          \begin{document}      \section{Ein Titel}     \Blindtext     \end{document}


title: Problem with generating Reference list (no bbl file generated?)

text: I am just starting with LaTeX so I am sure I have made a bunch of silly mistake on the way. But as of yesterday I am stuck with no solution. So here is a bit of background: Win7, installed MikeTex (with auto-installed package setting) and using TexMaker for editing, and installed JabRef for creating bib-files. So I have created a .bib file with several entries, and put it in the same directory as my .tex file. And yet when I try to generate the reference list by invoking /cite{...}, the result list it is empty, and there was warning of: > LaTeX Warning: Citation `Duffie2001' on page 1 undefined on input line 8.   >  No file foo.bbl. Here is the test .tex file:               \documentclass[a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[applemac]{inputenx}               \begin{document}          This is my first document with a bibliography generated by Bib\TeX. Now I cite an article by Duffie\cite{Duffie2001}.          \bibliographystyle{plain}     \bibliography{foo}              \end{document}      I also tried `\nocite` to find the whole list but to no avail. All I got was just an empty reference list. I read some of the older posts here with similar problem and I used a minimal- application to test out my bib, foo.tex to try to work with it. And I encountered similar problem. I have also read that for everytime the .bib is read into the TexMaker, an aux file will be introduced with the citation appended to it. And indeed there is such file, but I still can't generate .bbl file. Please help. Here is the foo.bib file generated by Jabref > % This file was created with JabRef 2.6.   >  % Encoding: Cp1252 > > @ARTICLE{Bjork2008,   >  author = {Bjork, Tomas},   >  title = {{Topics in Interest Rate Theory}},   >  journal = {Handbooks in OR \& MS},   >  year = {2008},   >  volume = {15},   >  pages = {377-435},   >  timestamp = {2011.03.09} } > > @BOOK{Duffie2001,   >  title = {{Dynamic Asset Pricing Theory}},   >  year = {2001},   >  author = {Duffie, Darrell},   >  edition = {3}   >  } > > @BOOK{Oksendal2003,   >  title = {{Stochastic Differential Equations - An Introduction with > Applications}},   >  year = {2003},   >  author = {Oksendal, Bernt},   >  edition = {6}   >  } here is the .aux file that's generated: > \relax   >  \citation{Duffie2001}   >  \bibstyle{plain}   >  \bibdata{foo} I have attached several files(MWA that was used here before, log file, and the bib file) Here is the screen-cap of the setting and quick-build screen: http://i.stack.imgur.com/A4YtB.png   http://i.stack.imgur.com/fCWYu.png


title: Removing hline when producing latex code for table in R with Hmisc package

text: I have been struggling with this for some time and can't really find an answer. By default the `latex` command in `Hmisc` package cab generate code for table with `hline` on top, below header row and after the last row. Is there a way to customize this? E.g. I do not want any horizontal line in the table. Is that possible?


title: How to unselect the current section

text: I'm trying to set a bibliography on the end of a presentation and to unselect the current section which is the last one. How to unselect the current section please? Thanks a lot!


title: How to use APA 6 with elsarticle.cls

text: First, let me tell you that I am a total newbie in Latex. I am trying to use APA 6 with elsarticle. As far as I get, elsarticle has natbib pre-loaded. Does anyone help me use APA with elsarticle? elsarticle has elsarticle-harv and elsarticle-num bibliography styles. How can I use a different style (APA in my case)?


title: Short vowel symbol, as in "kızların"?

text: How do I typeset the short `i` vowel, as in this Turkish word, `kızların`?


title: Custom caption text

text: How do you set the caption name to say foo instead of figure? I have tried using a custom environment but am encountering several issues.


title: Redefine marginpar with \renewcommand

text: So I was trying to modify the default `marginpar` command by making the margin text appear in italic. Now the following alone didn't work:               \renewcommand{\marginpar}[1]{\marginpar{\textit{#1}}}      Which to me would seem straight forward. Renew the `\marginpar{}`command with the same `\marginpar{}` that is defined by default and expand it by the italic part with the argument. As I mentioned, that didn't work. This however did work:               \let\oldmarginpar\marginpar     \renewcommand{\marginpar}[1]{\oldmarginpar{\textit{{#1}}}}      So my question is, why is this step necessary to define a command that refers to `marginpar` and then redefine that alternate command with `renewcommand`. This process makes no sense to me.


title: How to create up arrow with two heads?

text: With `\twoheadrightarrow` we can get arrow with two heads. Is there any command for getting two heads with up arrow?


title: Hyperref boxes around links ARE MISSING in TeXShop

text: I was using TeXShop 2.26 on Mac OS 10.5.8. Switched today to TeXShop 3.36 on Mac OS 10.9.4. In all my LaTeX files, the `hyperref` red green cyan boxes around the links don't show up anymore. The links work, but the boxes are not there. Happens both with dvips and pdflatex. By changing the `hyperref` options, I can make the link texts colored, but cannot make the boxes visible. Thinking that MacTeX changed the default, I tried `[hidelinks=false]`, but the compiler says "unusual option for `hyperref`, ignored". Any idea what happened and how I could get the boxes back? I doubt that this is relevant, but besides `hyperref`, I'm also calling the following packages:               \usepackage{amssymb,amsmath,amsthm,amsfonts,mathrsfs}     \usepackage{wrapfig}     \usepackage{psfig}     \input epsf.sty     \input labelfig.tex     \usepackage{showlabels}     \usepackage[usenames,dvipsnames]{color}     \usepackage{psfrag}


title: The problem with the command: titleformat it is important

text: This is my first post here. I am using a few commands and packages to make the titles behave according to my thesis specifications but when I used the `\titleformat` I get an error:               ! Package titlesec Error: Entered in horizontal mode.          See the titlesec package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.24 \section{THE ZEROS OF $\zeta(s)$}      How can I solve this? This is my code:               \documentclass[a4paper,12pt]{article}     \usepackage{amssymb,amsmath,amsthm}     \usepackage[cp1250]{inputenc}     \usepackage{indentfirst}     \usepackage{titlesec}     \newtheorem{pro}{Proposition}[section]     \renewcommand{\thesection}{\arabic{section}.}     \titleformat{\section}{\textsc}     \renewcommand{\theequation}{\thesection\arabic{equation}}          \begin{document}     ...     \begin{center}     \section{THE ZEROS OF $\zeta(s)$}     \end{center}     \setcounter{equation}{0}     ...     \end{document}


title: How to format a multi-line statement with a label

text: I am trying to format a multi-line statement with a label.               \documentclass{article}          \usepackage{amsmath}     \usepackage[showframe,pass]{geometry}          \begin{document}          Let $P(n)$ denote the statement that     \begin{equation}     \text{The sum of the natural numbers less than or equal to $n$ is given by the formula }     0 + 1 + \cdots + n = \frac{n(n+1)}{2}.     \tag{P(n)}     \end{equation}          \end{document}      ![code output](http://i.stack.imgur.com/SOYeG.png) Unfortunately, the statement overflows the right margin. I don't think using the `align`, `multline` or the `gather` environments would be suitable because the horizontal alignment would not be correct. How should I format the mathematical statement? **Things I would like:**   * I would like the statement to be indented as in the `quote` environment.   * I want the label to be "P(n)" rather than "(P(n))" as is currently in the output


title: Two \maketitles in one page

text: If I wanted to include two titles in one page, what can I do?   I've seen the titling package as this QA suggested, but the titles came out in separate pages.               \documentclass[twocolumn]{article}     \usepackage{titling}     \begin{document}     \title{First title}      \author{Author1, Author2}      {\let\newpage\relax\maketitle}     \title{Second title}     \author{Author1, Author2}     {\let\newpage\relax\maketitle}     Some text     \end{document}      What I want is: ![](http://i.imgur.com/fCKT8TM.png)


title: How to force text condensation

text: I have a title, that's written in font family with no condensed face. But I still want to bring letters closer to each other due to typographical reason. I find couple of ways to change letterspacing:   1. Use a `soulutf8` package:              \sodef\cond{}{.01em}{.01em}{.01em}        2. Use `fontenc` and redefine font parameters:              \newfontfamily\headingfontcond[LetterSpace=.01]{MyFont-Bold}      Both of this ways works if letter space is greater than one. But if I try to make text narrower, but not wider, it just doesn't change anything. BTW, I unable to use `microtype` package because I render text with XeLaTeX.


title: Shaded triangle arrow with text

text: I have been trying to recreate a similar version of the arrow shown in the image below. ![enter image description here](http://i.stack.imgur.com/ZHihA.gif) And this is what I manage to get so far: ![enter image description here](http://i.stack.imgur.com/dLOjb.png) I am a complete beginner when it comes to `TikZ` and after multiple failed attempts, I had to resort to drawing a shaded rectangle and then using `right=of rectangle` to append a triangle. However, obviously, the approach is awful. There's also a gap between the "arrowhead" and the line. Initially, I tried using using `triangle 90`,`triangle 45` and so forth, but I the height of the arrowhead seemed to be dependent on the length of the line (which I did not like), and also I could not figure out how to add text within the line. Here's what I have: # MWE               \documentclass[border=5mm]{standalone}     \usepackage{tikz}     \usetikzlibrary{arrows,positioning,shapes}          \begin{document}     \begin{tikzpicture}[font=\large]       \tikzset{         node distance=0cm,         buffer/.style={           shape border rotate=270,           regular polygon,           regular polygon sides=3,           minimum height=2cm,           fill=blue!50,         }       }            \node (therectangle) at (0,0) [shade,shading=axis,left color=white,right color=blue!50,minimum width=2.5cm,minimum height=1cm,] {Codes for};            \node [buffer,right=of therectangle] {};     \end{tikzpicture}%          \end{document}      What I want is an arrow like shown in the picture, giving me the ability to:   * Add text within.   * Make it shaded.   * Be able to use `below=of <whatever>` etc.   * Retain the ability to use `shorten <= <whatever>` etc.   * (Optional) Start the shading from the arrowhead. Could someone help with this?


title: How to fully left justify text in algorithmicx when not using line numbers

text: I'm using the `algorithmicx` package and would like to fully left justify the text when not using line numbers. Here's an example: ![enter image description here](http://i.stack.imgur.com/aFGxG.png) Notice how only the `Require` and `Ensure` clauses are fully pushed to the left. How can I make the rest of the code be fully left justified as well? Here's a minimal example:               \documentclass[a4paper,11pt]{article}          \usepackage{algorithmicx}     \usepackage{algorithm}     \usepackage{algpseudocode}     \usepackage{amsmath}          \begin{document}          \begin{algorithm}     \caption{Algorithm Name}     \begin{algorithmic}     \Require some input     \Ensure some output     \Statex     \State \textbf{something}     \State more text     \begin{enumerate}         \item list item 1         \item an equation             \begin{equation*}                 f(n) = \begin{cases}                 1 & i = 1\\                 f(n-1) + f(n-2) & i > 1                       \end{cases}             \end{equation*}          \item third item      \end{enumerate}       \State last line     \end{algorithmic}     \end{algorithm}          \end{document}


title: Left and right aligned minipages, with table layout

text: I am trying to create a layout with two "columns," where the right-hand column itself has two columns, which are right and left aligned, respectively. For instance:               This is some text in the first                Label  Foo     column.                               Another Label  Foo Bar Baz      I am familiar with the technique to create left and righ aligned text on the same line via `minipage` environments, so extending that idea I've setup the right-hand column to contain a `tabular` to line up its labels and text. Here's what I have:               \documentclass[letterpaper,12pt]{report}     \usepackage[margin=1in]{geometry}     \begin{document}          \noindent     \begin{minipage}[t]{.49\textwidth}     \flushleft     Some long testing text to illustrate the alignment problem.     \end{minipage}     %     \hfill     %     \noindent     \begin{minipage}[t]{.49\textwidth}     \flushright     \begin{tabular}{r l}     \textbf{Some Long Label} & Bar \\     \textbf{Another Long Label} & Foo Bar Baz \\     \end{tabular}     \end{minipage}          \end{document}      This compiles and _mostly_ works, except for one problem: the top of the text in the table appears somewhat higher than the top of the text in the left minipage. I believe this is due to the fact that `tabular`'s naturally have some extra vertical space before and after them, but I do not know how to fix the problem. My question is either, how can I fix my code to have the lines of text in each `minipage` line up vertically or, alternatively, is there some cleaner way of creating this layout without using `tabular`?


title: Displaying "Appendix" in a section inside subappendices environment

text: I am using scrreprt from KOMA packages, the `appendix` package, and the `arsclassica` package. I'd like to add "Appendix" before the number of an appendix to a chapter. If I use `scrreprt` and the `appendix` package this can be done. Unfortunately, `arsclassica` package redefines the `\section` command in some way that the `appendix` package cannot add "Appendix" to the title. This also cannot be changed with the `appendixprefix` option of KOMA script. I found something that almost works (full code at the end):               \begin{subappendices}          \begingroup     \def\thesection{Appendix \arabic{chapter}.\Alph{section}}          \section{Appendix one}          \section{Appendix two}     \endgroup          \end{subappendices}      The only problem is that this way an "Appendix" is added to the name at the ToC, which then is not properly aligned (it runs over the title of the appendix). My question is then: is there a way to turn off the behavior only for the ToC, while keeping the extra "Appendix" display inside the `subappendices` environment? Here is the full code that has an issue of not displaying "Appendix" in the title of the section:               \documentclass[11pt,letterpaper,twoside=false,openright,titlepage,fleqn,%                headinclude=false,footinclude=false,BCOR=12.7mm,DIV=9,%                numbers=noenddot,cleardoublepage=empty,%                listof=totoc,%                captions=tableheading]{scrreprt}          \usepackage{makeidx}     \usepackage[title,titletoc]{appendix}          \usepackage[eulerchapternumbers,beramono,listings,%                     eulermath,pdfspacing]{classicthesis}          \usepackage{arsclassica}          \begin{document}          \tableofcontents          \chapter{Bla}          \begin{subappendices}     \section{Foo}     \end{subappendices}          \end{document}


title: How to uppercase heavily customised sections (sectsty+fontspec)?

text: I am trying to customise the aspect of a `scrbook` to look like a book I have. In my case, sections should be formatted as follows: the font face should be `Conques Demi`, the font size `26 pt`, the font colour a particular shade of dark red (CMYK: 0% 87% 87% 50%) with a `1 pt` thick line rule of the same colour that is large the width of a column, the label should be in upper case and aligned to right. Since I have not managed to realise how to draw coloured line rules with KOMA scripts, I tried to abstain that results with other packages. If you know how to get the exact result that I described above, please feel free to show me how in KOMA! Thanks in advance! Anyway I managed to mimic the font face, size and colour, the rule and the alignment, but I started to experience problems when I tried to make the label uppercase. Note that the problem persists even if I remove any reference to the `fontspec` package and all its commands. Consider the following _minimal working example_ :               \documentclass[twocolumn]{scrbook}          \usepackage{xcolor}     \usepackage{sectsty}     \usepackage{fontspec}          \setcounter{secnumdepth}{0}     \definecolor{darkred}{cmyk}{0.0,0.87,0.87,0.50}     \newfontfamily\myfont[]{Conques}     \sectionfont{\raggedleft\myfont\Huge\color{darkred}\sectionrule{0pt}{0pt}{-2pt}{1pt}} %          \begin{document}     \mainmatter     \section{A Section} % (fold)     \label{sec:a_section}     Lorem ipsum dolor sit amet, consectetur adipisicing elit.     % section a_section (end)     \end{document}      As other answers (to simpler cases) suggest, in order to uppercase the section's label, I am expected to add `\uppercase` to the end of the `\sectionfont{...}` command. If I do so, however, I am warned that a `{` is missing and that `\begin{document}` is closed by `\end{DOCUMENT}`. If I open the resulting `.pdf`, all the document is uppercase except for an additional `A Section` the appear just below the first occurrence and the rule is gone. This is due to the fact, I think, that `\uppercase` is a _parametric_ command while here it is used as an _"absolute"_ statement. In my opinion, in fact, the second occurrence of `A Section` is due to `\uppercase` messing with the definition of the section's headings for the table of content, which in turn becomes empty. According to my researches, there is no such _"absolute"_ `\uppercase` equivalent. Some answers suggest to use `\MakeUppercase` instead as in some cases it is more _"respectful"_ of the surrounding environment. If I do so, however, I get the following result: the string `[0pt][r]` at the beginning of an empty line with a rule that is finishing out of the vertical column border; the proper section's label appears below, not uppercased, with no rule, but correctly moved to the right. Even if this might suggest to reorder the commands within `\sectionfont{...}`, no permutation actually works. I have even tried with the `textcase` package and its `\MakeTextUppercase` command as well, with no luck at all. Can someone please tell me where I am wrong and how to fix the issue? * * *


title: Can I put a logo in the header using memoir?

text: Part of our corporate standard is to place a small logo graphic at the top right of each page. It looks like `fancyhdr` handles this quite easily, but I'm using the `memoir` class, and it doesn't seem to be compatible with `fancyhdr`.


title: pgfplots: I do not know the key '/tikz/nodes near coords' error

text: I'm trying to create a simple plot using `pgfplots`. I have a problem though that drives me crazy. I'm working on a debian installation and had installed the tex-live version from the repositories. The code below was giving me the following error               ! Package pgfkeys Error: I do not know the key '/tikz/nodes near coords' and I am going to ignore it. Perhaps you misspelled it.      I though that the package was outdated and since there was no way to update it otherwise i removed the repo version of tex-live and install the one from their website (version 2011). I'm still getting the same error message though. I have to mention that the same code compiles correctly in my windows installation. Any idea why this might happen? **Code:**               \documentclass{article}     \usepackage[a4paper]{geometry}     \usepackage{fancyhdr}     \usepackage{lastpage}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{caption}     \usepackage{pgfplots}          \pagestyle{fancy}     \chead{\footnotesize {header title} }     \cfoot{\footnotesize Page \thepage\ of \pageref{LastPage}}          \title{my title}     \author{me}               \begin{document}     \renewcommand{\labelenumi}{[\arabic{enumi}]}     \fontsize{11}{12}     \selectfont          \begin{center}     \begin{tikzpicture}       \begin{axis}       [         ybar,         bar width = 1cm,         xmin=1, xmax=1,         xticklabels={,,},         enlargelimits=0.15,         xlabel={OpenCL implementation},         ylabel={time (sec)},         xtick=data,         nodes near coords       ]            \addplot coordinates {(1, 24.0)}; \addlegendentry{Version 1}         \addplot coordinates {(1, 14.5)}; \addlegendentry{Version 2}         \addplot coordinates {(1, 10.0)}; \addlegendentry{Version 3}         \addplot coordinates {(1,  9.6)}; \addlegendentry{Version 4}       \end{axis}     \end{tikzpicture}     \captionof{figure}{Figure caption}     \label{fig:example_caption}     \end{center}          \end{document}


title: Problem with custom auxiliary file and tex4ht

text: I have a LaTeX file that's working very well with `pdflatex`. I want to turn it into HTML, so I'm using `tex4ht` (under MiKTeX 2.9 on Windows 7). I've already gotten around some problems (the old graphics issue, for instance), but I have a couple of problems still. This is about the strangest one. I have some rough-and-ready code to create a custom auxiliary file and read it back in, to consolidate key points from throughout the document into a list. I do this using `\openoutputfile`, `\addtostream` and `\closeoutputstream`. My problem comes where some of the points written to it include a percentage. The code for these has the `%` backslashed, of course, as `\%`. When running `pdflatex`, the auxiliary file gets the code complete with backslash. When running `xhlatex`, the backslash gets stripped. Only in the case of the percentage, mind you - other commands are passed through fine. So, when this is read back, everything after the first `%` gets ignored (as it's all wrapped in `\textbf` as well) Minimal (as best I can make out) example:                \documentclass[a4paper,11pt,titlepage]{report}          \usepackage{newfile}     \usepackage{ifthen}          % stuff for automatic building of recommendation list     % Use \recommend{blah} for recommendations to appear in the key recommendations list. It also insets it in-place     %  with bold face.     % Use \reclist to insert the stored list. This should be done either before or after all \recommend commands in the document.     \newoutputstream{rec}     \newboolean{recstreamopen}     \setboolean{recstreamopen}{false}     \newcommand{\openrecstream}{%     \ifthenelse{\not\boolean{recstreamopen}}{     \openoutputfile{\jobname.rec}{rec}     \setboolean{recstreamopen}{true}}{}%     }     \newcommand{\closerecstream}{%     \ifthenelse{\boolean{recstreamopen}}{     \closeoutputstream{rec}     \setboolean{recstreamopen}{false}     }{}%     }     \newcommand{\reclist}{     \closerecstream     \begin{itemize}     \input{\jobname.rec}     \end{itemize}     }     \newcommand{\recommend}[1]{%     \openrecstream%     \textbf{#1}%     \addtostream{rec}{\noexpand\item \textbf{#1}}%     }     \newcommand{\reclistonly}[1]{%     \openrecstream%     \addtostream{rec}{\noexpand\item \textbf{#1}}%     }     \AtEndDocument{\closerecstream}          \begin{document}          \reclist          \recommend{This is recommendation one, with no percentage.}          \recommend{The is recommendation two, 74.3\% of statistics are made up on the spot.}          \recommend{This is recommendation three.}          \end{document}      As it's rough-and-ready, you may need to create an empty filename.rec file to persuade it to run. pdflatex does what's expected, xhlatex removes the backslash from the % in the .rec file. Anyone got any ideas at all?


title: ctable width of column, \tnote and pos.

text: Have two problems regarding ctable.   * Have multiple `ctable`s and would like the first column in the tables to have a fixed width (also the tables to have the same total width)?   * When I add a `\tnote[]{}` to the `ctable`, the table is always placed to the center of the page. If i remove the `\tnote`, it is placed according to `pos=`. EDIT: don't know if it is the `\tnote` which mess things up, but if i have these two tables:               \ctable[caption=Second OLS regression table, doinside=\small \renewcommand\arraystretch{1.2}, pos=ht]{lrrrr}{\tnote[]{OLS regression}}{      \toprule      \multicolumn{5}{c}{OLS Regression} \\      & Estimate & Std. Error & t value & Pr($>$$|$t$|$) \\        \midrule     (Intercept) & -0.13 & 0.07 & -1.76 & 0.08 \\        reserves & -0.29 & 0.54 & -0.54 & 0.59 \\        gsci & -0.52 & 0.32 & -1.62 & 0.11 \\        L.logprem40 & 0.06 & 0.08 & 0.71 & 0.48 \\        q1 & -0.18 & 0.10 & -1.83 & 0.07 \\        q2 & -0.18 & 0.11 & -1.75 & 0.08 \\        q3 & -0.20 & 0.13 & -1.51 & 0.13 \\      \bottomrule     }               \ctable[caption=Second quantile regression table I, doinside=\small \renewcommand\arraystretch{1.2},pos=ht]{lrrrrrrr}{\tnote[]{Resulte form the second quantile regression on the crude oil inventory, GSCI and lagged premiums 40. Standard errors are bootstrapped with 500 repetitions}}{     \toprule     \multicolumn{8}{c}{Quantreg} \\     variable & $1-\alpha$ & Coefficient & Std.Error & t-stat & Pr$>$$|t|$ & \multicolumn{2}{c}{95\% CI} \\        \midrule     Inventory & 0.01 & -0.79 & 0.63 & -1.27 & 0.21 & -1.81 & 0.98 \\         & 0.05 & -1.24 & 0.27 & -4.60 & 0.00 & -1.52 & -0.68 \\         & 0.1 & -0.42 & 0.23 & -1.87 & 0.06 & -0.84 & -0.13 \\         & 0.5 & -0.55 & 0.16 & -3.47 & 0.00 & -0.86 & -0.20 \\         & 0.9 & 0.37 & 0.18 & 2.04 & 0.04 & 0.06 & 0.63 \\         & 0.95 & 0.01 & 0.29 & 0.04 & 0.97 & -0.51 & 0.75 \\         & 0.99 & 0.49 & 0.40 & 1.22 & 0.22 & -1.77 & 1.06 \\        GSCI & 0.01 & -0.30 & 0.35 & -0.88 & 0.38 & -1.33 & 0.54 \\         & 0.05 & -0.62 & 0.25 & -2.46 & 0.01 & -0.99 & 0.04 \\         & 0.1 & -0.11 & 0.20 & -0.56 & 0.58 & -0.47 & 0.27 \\         & 0.5 & -0.55 & 0.14 & -3.86 & 0.00 & -0.82 & -0.23 \\         & 0.9 & -0.45 & 0.19 & -2.33 & 0.02 & -1.01 & -0.14 \\         & 0.95 & -0.85 & 0.37 & -2.33 & 0.02 & -1.85 & -0.05 \\         & 0.99 & -2.18 & 0.46 & -4.79 & 0.00 & -3.59 & 0.02 \\        LPremium40 & 0.01 & 0.17 & 0.09 & 1.98 & 0.05 & -0.05 & 0.36 \\         & 0.05 & 0.16 & 0.05 & 2.89 & 0.00 & 0.09 & 0.27 \\         & 0.1 & 0.13 & 0.04 & 2.93 & 0.00 & 0.07 & 0.20 \\         & 0.5 & 0.08 & 0.03 & 2.61 & 0.01 & 0.02 & 0.13 \\         & 0.9 & -0.07 & 0.05 & -1.38 & 0.17 & -0.13 & 0.05 \\         & 0.95 & -0.10 & 0.06 & -1.67 & 0.10 & -0.25 & 0.01 \\         & 0.99 & -0.08 & 0.07 & -1.14 & 0.25 & -0.21 & 0.11 \\         \bottomrule        }      Only the first table is placed on top of the page, with the second table on the middle of the next...... Do not understand why?


title: Writing complexity classes in LaTeX

text: Is there anyone who knows which package/style should I use to write a complexity class like this? You can see the highlighted word below, this is an all-caps word, but some letters are slightly bigger than the others. How to do this exactly in LaTeX? ![complexity](http://i.stack.imgur.com/Nboho.jpg)


title: Make hyperref's \autoref output in Bulgarian

text: I'm trying to use `hyperref` for references, but by default it outputs them in English like "chapter 2". According to Hyperref ignores \setdefaultlanguage from polyglossia, doing               \usepackage[bulgarian]{hyperref}      Should do the trick, but this gives me a cryptic error:               ! Package xkeyval Error: `bulgarian' undefined in families `Hyp'.          See the xkeyval package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.4319 \ProcessKeyvalOptions{Hyp}      Note that it works for `german`. Here is my styling:               \ProvidesPackage{style}          \usepackage{fontspec}     \setmainfont[Ligatures=TeX]{DejaVu Serif}     \setsansfont[Ligatures=TeX]{DejaVu Sans}     \setmonofont[Ligatures=TeX]{DejaVu Sans Mono}     % \newfontfamily{\TelSubstFont}[Ligatures=TeX]{Cantarell}          \usepackage{polyglossia}     \setmainlanguage{bulgarian}     \setdefaultlanguage{bulgarian}          \usepackage{minted}          \usepackage[bulgarian]{hyperref}     \hypersetup{pdflang=bg}          \usepackage[numbers]{natbib}      P.S. I'm still new to LaTeX, using XeLaTeX to compile the document.


title: bibtex error Texshop

text: I have the following files my main file:               \documentclass[11pt]{scrartcl}     \usepackage{geometry}                       \geometry{a4paper}                         \usepackage{wutzi}               \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}          \makeindex     \begin{document}     \hypersetup{colorlinks=false,     citecolor=Violet,     linkcolor=Red,     urlcolor=Blue}     \title{Vorlage}     \author{Wutzi}     \date{\today}        \maketitle          \begin{center}\\ \\ \\ \\ \\     {\Huge \color{red} \textbf{ DON'T PANIC}}     \end{center}          \newpage     \tableofcontents     \newpage            \cite{tipler}          \bibliographystyle{jurabib}          \begin{thebibliography}     \bibliography{bib}     \end{thebibliography}     \end{document}        The package wutzi looks like this:               \ProvidesPackage{wutzi}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{epstopdf}     \usepackage[latin1]{inputenc}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage{ulem}     \usepackage{enumitem}     \usepackage{stmaryrd}     \usepackage{makeidx}     \makeindex     \usepackage{amsmath}     \numberwithin{equation}{section}     \usepackage{hyperref}     \usepackage{underlin}     \usepackage{wasysym}     \pagestyle{headings}     \usepackage{color}     \usepackage{fancyhdr}     \pagestyle{fancy}     \usepackage{ifsym}     \usepackage[round]{natbib}     \renewcommand{\baselinestretch}{1.5}          %convenience  Definitions   %%%%%%%%     \renewcommand{\L}{\mathcal L}%%%%%%     \renewcommand{\R}{\mathbb R}%%%%%%     \renewcommand{\C}{\mathbb C}%%%%%%     \renewcommand{\H}{\mathcal H}%%%%%%     \renewcommand{\N}{\mathbb N}     \renewcommand{\grad}{\operatorname{grad}}%%%%%%     \renewcommand{\div}{\operatorname{div}}%%%%%%%%     \renewcommand{\rot}{\operatorname{rot}}%%%%%%%%     \renewcommand{\phi}{\varphi}%%%%%%%%%%%%%     \renewcommand{\<}{\langle}%%%%%%%%%%%%%%     \renewcommand{\>}{\rangle}%%%%%%%%%%%%%%     \renewcommand{\rho}{\varrho}%%%%%%%%%%%%%     \renewcommand{\lag}[2]{\frac{\partial #1}{\partial {#2}_j} - \frac{d}{dt}\frac{\partial #1}{\partial \dot {#2}_j}}%%%%%%%%%%%%%     \renewcommand{\done}{\begin{flushright}$\square$ \end{flushright}}     \renewcommand{\scalar}[2]{\< {#1},{#2}\>}     \renewcommand{\Int}[2]{\int\limits_{#1}^{#2}}     \renewcommand{\DGL}{Differentialgleichung }     \renewcommand{\epsilon}{\varepsilon}     \renewcommand{\LT}{Legendre-Transformation }     \renewcommand{\brac}[2]{#1^{(#2)}}     \renewcommand{\HJG}{Hamilton-Jacobi-Gleichung }     \renewcommand{\d}{\operatorname{d}}     \makeatletter     \newcommand{\rmnum}[1]{\romannumeral #1}     \newcommand{\Rmnum}[1]{\expandafter\@slowromancap\romannumeral #1@}     \makeatother     %%%%%%%%%%%%%%%%%%%%%%%%%%%%      That's the bib.bib file:               @book{Landau,     Author = {E.M. Lifschitz, Lew Davidowitsch Landau},     Date-Added = {2011-06-07 22:38:33 +0200},     Date-Modified = {2011-06-07 22:40:47 +0200},     Keywords = {Landau Theorie},     Publisher = {NAUKA Verlag},     Read = {1},     Title = {Lehrbuch der theoretischen Physik},     Year = {1988}}          @book{metzler,     Author = {J.Grehn, J.Krause(Hrsg.)},     Date-Added = {2011-06-07 22:37:04 +0200},     Date-Modified = {2011-06-07 22:38:10 +0200},     Keywords = {metzler Physik},     Publisher = {Metzler},     Title = {Physik},     Year = {1998}}          @book{LineareAlgebra,     Author = {Albrecht Beutelspacher},     Date-Added = {2011-06-07 22:34:00 +0200},     Date-Modified = {2011-06-07 22:36:53 +0200},     Keywords = {Lineare Algebra},     Publisher = {Vieweg+Teuber},     Read = {1},     Title = {Lineare Algebra},     Year = {2003}}          @book{tipler,     Author = {Paul A. Tipler},     Date-Added = {2011-06-07 22:31:58 +0200},     Date-Modified = {2011-06-07 22:33:44 +0200},     Keywords = {Tipler Physik},     Publisher = {Spektrum Akademischer Verlag},     Read = {1},     Title = {Physik},     Volume = {1.Auflage},     Year = {2000}}      And finally the aux file:               \relax      \catcode`"\active     \providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}     \HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined     \global\let\oldcontentsline\contentsline     \gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}     \global\let\oldnewlabel\newlabel     \gdef\newlabel#1#2{\newlabelxx{#1}#2}     \gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}     \AtEndDocument{\ifx\hyper@anchor\@undefined     \let\contentsline\oldcontentsline     \let\newlabel\oldnewlabel     \fi}         \fi}     \global\let\hyper@last\relax      \gdef\HyperFirstAtBeginDocument#1{#1}     \providecommand\HyField@AuxAddToFields[1]{}     \select@language{ngerman}     \@writefile{toc}{\select@language{ngerman}}     \@writefile{lof}{\select@language{ngerman}}     \@writefile{lot}{\select@language{ngerman}}     \citation{tipler}     \bibstyle{jurabib}      When I run bibtex - after I ran pdftex at least two times - I get an error:               This is BibTeX, Version 0.99d (TeX Live 2010)     The top-level auxiliary file: Vorlage.aux     The style file: jurabib.bst     I found no \bibdata command---while reading file Vorlage.aux     Warning--I didn't find a database entry for "tipler"     (There was 1 error message)      If I check the aux file I can see, that there is no \bibdata command, but why and how do i get it to be there. Have I done anything wrong? I'm using Texshop and Bibdesk to create my files. The Texdistribution in Mactex 2010 (Texlive).


title: Control ulines for cloze text

text: @Martin Scharrer suggested me the following amazing solution to make cloze texts: http://tex.stackexchange.com/a/16004/4011               \documentclass{article}     \usepackage[normalem]{ulem}          \makeatletter     \def\UL@putbox{\ifx\UL@start\@empty \else % not inner       \vrule\@width\z@ \LA@penalty\@M       {\UL@skip\wd\UL@box \UL@leaders \kern-\UL@skip}%         \phantom{\box\UL@box}%       \fi}     \makeatother          \begin{document}          Some text \uline{some text to complete some  text to complete     some  text to complete some  text to complete some  text to complete some    text     to complete some  text to complete} some more text.          \end{document}      Now I have some follow up questions about this approach:   1. How can I adjust this such that I can choose all the "underline styles" offered by the ulem package `\dotuline`, `\dashuline`, `\uwave` and`\uuline`?   2. How can I adjust the vertical space between the phantom text and the underline?   3. Is it possible to get a normal working version of `\uline` at the same time? (Call it for example `\Uline`, `\Uuline` etc.).


title: Shift Odd Page in Duplex Print

text: This is more a printer problem, but I have no way to solve it on the printer side. When printing a two sided document, the sides do not match vertically. That means for example the line of `\pagestyle{fancy}` is not continuous from the left to the right page but shifted by 2 mm (0.08 inches). Is there a way take this into account when generating the file? `\addtolength{\voffset}{-2mm}` shifts all pages, not only the e.g. odd ones.               \documentclass{book}     \usepackage{lipsum}     \usepackage{fancyhdr}     \pagestyle{fancy}          \usepackage[a4paper]{geometry}     \addtolength{\voffset}{-2mm}          \begin{document}          \lipsum          \end{document}


title: Placing a .pdf file in the center with \multirow

text: The following is my code               \begin{sidewaysfigure}     \centering     \scalebox{0.9}{\begin{tabular}{c|c|cc}           \emph{}&\emph{a}&\emph{b}&\emph{c}\\      \hline     \rotatebox{90}{text}&\multirow{2}{*}{                            \includegraphics[width=0.35\textwidth]      {a.pdf}} &        \includegraphics[width=0.35\textwidth]{b.pdf} &        \includegraphics[width=0.35\textwidth]{c.pdf}\\             \rotatebox{90}{text}&  &        \includegraphics[width=0.35\textwidth]{a1.pdf} &        \includegraphics[width=0.35\textwidth]{b1.pdf}\\     \end{tabular}      }     \caption[]          {}     \end{sidewaysfigure}      I 'm trying to place a.pdf in the central part of the first column (currently, it's placed in the second row). In addition, I would like to have a line between the two rows, but the line should not go into a.pdf. Could this be achieved?


title: modern cv layout

text: I have a question concerning my CV. The following is my header:                   \documentclass[11pt,a4paper,sans]{moderncv}          \usepackage[latin1]{inputenc}                        \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{tabularx}               \moderncvtheme[red]{classic}                \usepackage[scale=0.8]{geometry}          \AtBeginDocument{\recomputelengths}                             \makeatletter     \renewcommand*{\makecvtitle}{%       % recompute lengths (in case we are switching from letter to resume, or vice versa)       \recomputecvlengths%       % optional detailed information box       \newbox{\makecvtitledetailsbox}%       \savebox{\makecvtitledetailsbox}{%         \addressfont\color{color2}%         \begin{tabular}[b]{@{}r@{}}%           \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%           \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}}% if \addresstreet is defined, \addresscity will always be defined but could be empty           \ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile}%           \ifthenelse{\isundefined{\@phone}}{}{\makenewline\phonesymbol\@phone}%           \ifthenelse{\isundefined{\@fax}}{}{\makenewline\faxsymbol\@fax}%           \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%           \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%           \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%         \end{tabular}}%       % optional picture box       \newbox{\makecvtitlepicturebox}%       \savebox{\makecvtitlepicturebox}{%         \ifthenelse{\isundefined{\@photo}}%         {}%         {%           \hspace*{\separatorcolumnwidth}%           \color{color1}%           \setlength{\fboxrule}{\@photoframewidth}%           \ifdim\@photoframewidth=0pt%             \setlength{\fboxsep}{0pt}\fi%           \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%       % name and title       \newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%       \newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%       \ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)         {\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitledetailswidth-\makecvtitlepicturewidth}}%         {}%       \begin{minipage}[b]{\makecvtitlenamewidth}%         \namestyle{\@firstname\ \@familyname}%         \ifthenelse{\equal{\@title}{}}{}{\\[1em]\titlestyle{\@title}}%       \end{minipage}%       \hfill%       % detailed information       \llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced       {\par\color{color2!50}\rule{\textwidth}{.25ex}\par}% <----- ADDED RULE       % optional photo       \usebox{\makecvtitlepicturebox}\\[1.5em]%       % optional quote       \ifthenelse{\isundefined{\@quote}}%         {}%         {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%       \par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle     \makeatother                         \firstname{xy}     \familyname{z}     \title{\textcolor{red}{\textsc{Curriculum Vit\ae}}}                 \address{...}{...}         \mobile{...}                        \phone{...}                           \email{...}                               %\photo[96pt]{picture}                             \quote{\hbox to 0pt{\hss  here comes the quote \hss}     \vspace{-2mm}\begin{flushright} -author-\end{flushright}}           \nopagenumbers{}                                                \begin{document}          \makecvtitle      Now I have a nice header with a line dividing my personal data and the quote. So good so far. But if I include a picture, this picture is included beneath the line, above the quote. This is not that pretty. So: Can somebody help me with that? Maybe to rearrange the page, such that the quote is leftbounded, and to its right is the picture? I think that would look pretty. Otherwise I think the picture would look good in the headline next to my personal data, but ABOVE the line! I appreciate if someone helps, first layout with quote on the left and picture on the right would be much nicer!


title: (ConTeXt) Changing to garamond or other typefaces

text: As far as I understood changing the typeface from the default is hard in ConTeXt. Here is my example of using not the default typeface - first question: Is this the correct way?:                   \mainlanguage   [de]          %\usetypescript[Garamond][default]     %\setupbodyfont[Garamond,15pt]          \definepapersize[MyBook][A5]     \setuppapersize[MyBook][A5] % Prints on paper the size of MyBook     %\setuppapersize[MyBook][A4]          % Fonts & Typography     \definefontfeature[default][default][expansion=quality,protrusion=quality]     \setupalign[hz,hanging]          \usetypescript[palatino]     \setupbodyfont[palatino,10pt]     \setupbodyfontenvironment   [default][em=italic] % use italic as em, not slanted          \setuplayout[location=middle,       topspace=1cm,       bottomspace=1.5cm,       width=middle,       cutspace=2.6cm,       backspace=1.3cm,       height=fit,       rightmargin=2cm,       leftmargin=1cm,       rightmargindistance=0.4cm,       leftmargindistance=0.2cm,       footer=1.2cm,       grid=yes]          \starttext     This is a test text.     \stoptext      Now if I change from palatino to garamond by setting               \usetypescript[garamond]         \setupbodyfont[garamond,10pt]      then ConTeXt goes back to its Standard Computer Modern, how to change to garamond?


title: Font problem in pdftex

text: I am designing a cover page for an online publication, and apparently, the pdf (created with pdftex from the file pasted in below) does not display correctly for some users. Part of the second line of the title are missing.               \documentclass[extrafontsizes,14pt]{memoir}     \usepackage{graphicx}     \usepackage{humanist}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage[T1]{fontenc}     \usepackage{vmargin}     \setmarginsrb{4cm}{5cm}% left, top     {4cm}{6cm} %right, bottom     {1cm}{0.7cm}%head height, sep     {0cm}{0cm}% foot height, sep     \usepackage{fourier-orns}     \begin{document}     \pagestyle{empty}     \noindent{\Huge\bfseries\hminfamily\color{red} Title of the Book\bigskip\\second line of title}\vspace{1.2cm}\\     {\small edited by}\medskip\\     {\large Name of the author}\vspace{1cm} \\\begin{center}     \includegraphics[width=2.2in]{cover1.jpg}     {\small     Somewhere 2012}\medskip\\{\color{Brown}\rule{2.5cm}{1pt}\aldine\rule{2.5cm}{1pt}}\bigskip\\     {\normalsize     Series title}     \end{center}     \end{document}      I would be very grateful for any help with the matter. Does this have anything to do with embedding fonts? The page looks fine here, and also other users who don't have the humanist font installed can view it without problems. I have heard from someone that the text displays correctly on the Acrobat Reader, but not on Foxit (on the same machine).


title: How to use amssymb's \blackbox symbol

text: I have following problem - I want to use `\blackbox` in my file, which is provided by `amssymb` package. I use the following packages: `babel`, `[T1]{fontenc}`, `[latin2]{inputenc}`, none of which allows `\blackbox`. As if I try to add `amssymb` to list of packages and then compile the file, an error occurs. Can anyone suggest some way to overcome this problem?


title: How to make htlatex split large html file into sub-documents

text: I've used HEVEA and HACHA in the past to make web-pages from TEX sources. The result is a separate web page for each \section{} of the original manuscript. My latest manuscripts are more complex and HEVEA can't cut it. However, using HTLATEX, I can convert the manuscript to a single webpage. Is there any way to get HTLATEX to automagically split the output into sub- documents for easier navigation?


title: printglossary makes abbreviations ending with periods

text: I use the `glossaries` package for my glossary and some acronyms:               \usepackage{datatool}     \usepackage[ngerman]{translator}     \usepackage[nonumberlist,acronym,toc,section]{glossaries}          \makeglossaries          ...          /% Glossary     \printglossary[style=altlist,title=Glossar]          /% Acronyms     \deftranslation[to=German]{Acronyms}{Akronyme}     \printglossary[type=\acronymtype,style=long]      Curiously, glossaries makes a period after each acronym. **Screnshot:** ![enter image description here](http://i.stack.imgur.com/zaXaP.png) How can you change that?


title: Remove (a), (b) from subfigure numbering, but keep the subfigure caption?

text: I've a question on the labels in the subfigure environment. I would like to remove the (a) and (b) and insert something else instead. This 'new' caption is different for every subfigure and not a logical counter (so not i, ii or so). Can any body help me? I've added a figure showing the current situation (top) and how I would like it to be (bottom). ![The top row in the figure is how I have got it now, the bottom row is how I would like it to be!](http://i.stack.imgur.com/eMBrL.gif)


title: How to compile a file in ConTeXt, but output the results to a text file?

text: I have some files which contains data with ConTeXt syntax, e.g. containing macros and instructions for special symbols, but no preamble, sections, or other features tying the data to any particular place on a page. I need to compile these files, but instead of creating a PDF, simply convert the files to a UTF-8 text file. E.g., a file might contain the following data:               \quotation{Do you want to go to the caf\acutee?}     \quotation{No, it costs 30\percent more than it did before.}      After compiling it with ConTeXt, it is converted to this:               "Do you want to go to the café?"     "No, it costs 30% more than it did before."      Is there any way I can compile these files using ConTeXt, but output to a UTF-8 text file?


title: Package natbib: change in-text citation [Johnson 1990] to [Joh1990]

text: I'm using `natbib` and I'd like to change the in-text citation. If author and year are Johnson 1990 the output should be [Joh1990], I want `natbib` to print the first three letters of the author and the year without space. But I do not know how to set the command to shorten the names.               \documentclass[a4paper,parskip,11pt,listof=totoc,bibliography=totoc,openright]{scrbook}     % Kopf- und Fußzeile mit Separationslinie     %\usepackage[automark,footsepline,plainfootsepline,headsepline,plainheadsepline]{scrpage2}      \usepackage[automark,footsepline,plainfootsepline,headsepline]{scrpage2}      % Seitenränder einstellen     \usepackage[left=2.5 cm, right=2.5 cm, top=2.5 cm, bottom=3 cm]{geometry}     % Seitenstil definieren     \pagestyle{scrheadings}     % Kapitel bzw. Unterkapitel in Kopfzeile     \automark[section]{chapter}           % ngerman = Deutsch (bspw. table of contents übersetzen) + neue Rechtschreibung (sonst german)     \usepackage[ngerman]{babel}      % inputenc = ä,ö,ü wird erkannt % Dokument ist utf8-kodiert, nicht latin wie vorgegeben!      \usepackage[utf8]{inputenc}       \usepackage[T1]{fontenc}     % beinhaltet u. a. \usepackage{array} % für Tabellen     \usepackage{amsmath}       % positioniert die Tabellen (und Bilder?) an den Anfang der chapter (sonst sind sie da, wo Platz ist)     \usepackage[section]{placeins}       %für Bilder     \usepackage{graphicx}          % Beispieltext     \usepackage{blindtext}          % Zitationsstil laden, Verzeichnisname auf chapter-Ebene setzen (für Inhaltsverzeichnis und Kopfzeile)     \usepackage[sectionbib,square]{natbib}     % Kurzzitatverwendung:     \newcommand{\shortcite}[1]{\cite{#1}} % XXX weiter: gucken was man verändern muss für shortcite in .bib     %Einbindung deutsche Klammern     \usepackage[babel,german=guillemets]{csquotes}     % Abkürzungsverzeichnis     \usepackage[printonlyused]{acronym}     %Inkludieren von pdf     \usepackage{pdfpages} % Befehl: \includepdf[pages={5,8,10-14}]{Dokumentname.pdf}     % vollkommen leere Seiten     \usepackage[clearempty]{titlesec}     %Fußnoten durchgängig nummerieren, nicht kapitelweise      \usepackage{chngcntr}      \counterwithout{footnote}{chapter}     % \usepackage{hyperref} % klicken und springen     %package glossaries     \usepackage{glossaries}     % alt:  \newglossary[slg]{symbolslist}{syi}{syg}{Symbolverzeichnis}     \newglossary[slg]{symbolslist}{syi}{syg}{Symbolverzeichnis}     % den Punkt am Ende jeder Beschreibung deaktivieren     \renewcommand*{\glspostdescription}{}     % Glossar-Befehle anschalten     \makeglossaries                \begin{document}               text text text [Vgl. \cite{Wittgruber2002}, S. 131].  % [LLL Wittgruber S. 131]     text text text [Vgl. \cite{Etschberger1994}, S. 1]. \\ % [LLL Etschberger S. 1]. XX hier also:           \bibliographystyle{natdin}     %\bibliographystyle{natbib}     %Einbinden der BiBTex-Datei "literaturverzeichnis3" (Muss im selben Verzeichnis liegen wie .tex-Datei)- An die Stelle, wo das LV hin soll     % wenn neue Datei: hier F7, dann Ausgabe->BibTex, dann noch 2x F7. Falls es nicht funktioniert Style ändern     \bibliography{literaturverzeichnis3}                \end{document}               % entries of bib-file literaturverzeichnis3:     %     %@book{Etschberger1994,      %author = {Etschberger, Konrad},      %year = {1994},      %title = {{C}ontroller-{A}rea-{N}etwork ; {G}rundlagen, {P}rotokolle, {B}austeine, {A}nwendungen},      %address = {M{\"u}nchen [u.a.]},      %edition = {2},      %publisher = {Hanser},      %isbn = {3446175962}     %}     %     %     %@book{Wittgruber2002,      %author = {Wittgruber, Friedrich},      %year = {2002},      %title = {{D}igitale {S}chnittstellen und {B}ussysteme: {E}inf{\"u}hrung f{\"u}r das technische {S}tudium ; mit 8 {T}abellen},      %address = {Braunschweig and Wiesbaden},      %edition = {2},      %publisher = {Vieweg},      %isbn = {9783528174361},      %series = {{S}tudium {T}echnik}     %}


title: graphic does not appear

text: The problem is the following: I have included a graphic (png) and get no error message, but the picture does not appear on the pdf? The .png file is correct, I do not know what could be wrong? Here is my code:               \documentclass{book}          \usepackage[ngerman]{babel}     \usepackage{mathptmx}     \usepackage{color}     \usepackage[final]{pdfpages}      \usepackage{xcolor,bookmark}     \usepackage{scrextend}     \usepackage{titlepic}     \usepackage{shorttoc}     \usepackage{courier}     \usepackage{type1cm}              \usepackage{zref-abspage}     \usepackage{makeidx}                   \usepackage{graphicx}        % standard LaTeX graphics tool                                  % when including figure files     \usepackage{multicol}        % used for the two-column index     \usepackage[bottom]{footmisc}% places footnotes at page bottom     \usepackage{shadethm}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{xcolor}     \usepackage{marginnote}     \usepackage{mdframed}     \makeindex             % used for the subject index                            % please use the style svind.ist with                            % your makeindex program          \definecolor{shadethmcolor}{rgb}{.9,.9,.95}%     \definecolor{shadethmcolor2}{rgb}{1,.925,.545}%          \newtheoremstyle{mystyle}       {\topsep}{\topsep}{}{}%       {\bfseries}{:}{.5em}{}%          \theoremstyle{mystyle}          \newmdtheoremenv[hidealllines=true,backgroundcolor=shadethmcolor,skipabove=\topsep,     skipbelow=\topsep]{beispiel}{Beispiel}          \newmdtheoremenv[hidealllines=true,     backgroundcolor=shadethmcolor2,skipabove=\topsep,     skipbelow=\topsep]{formel}{Formel}               \begin{document}     \begin{figure}[H]     \includegraphics[scale=1]{Zinsrechnung.png}     \caption{geometrisches Mittel}\label{fig:zins}     \end{figure}     \end{document}


title: Makeindex error when ! used in \index in align environment

text: See MWE below. The symbol `!` in the `\index` causes an error. This is only the case in `align` environments (not in `equation`). So it seems to have to do something with `amsmath`. If `!` is put in an `\mbox` there is no error. But then of course the font size is not adjusted to subindices. Curiously enough, `\index{$C_{K!!}$}` (two exclamation marks) doesn't cause any error. * * *               \documentclass{article}     \usepackage{amsmath}     \usepackage{imakeidx}     \makeindex     \begin{document}     \begin{align}     y\index{$C_{K!}$}     \end{align}     \printindex     \end{document}      * * * Any solutions suggested?


title: Table inside enumeration: How to align vertically when using booktabs' \toprule?

text: I want to display a table inside an `enumerate` environment such that the first row aligns with the item label. My current code is the following:               \documentclass{article}     \usepackage{enumitem}     \usepackage{booktabs}          \setenumerate{listparindent=\parindent, parsep=0pt}          \begin{document}     \begin{enumerate}[align=left, label=\large\sffamily\bfseries \alph*)]       \item       \begin{tabular}[t]{cccc}         \toprule         $m$ & $P(R=a,M=m)$ & $P(R=b,M=m)$ & $P(R=c,M=m)$ \\         \midrule         1 & 0.1 & 0.2 & 0.3 \\         2 & 0.2 & 0.1 & 0.1 \\         \bottomrule       \end{tabular}            \item       \(          \displaystyle         P(0) = P(0|B) P(B) + P(0|G) P(G)       \)     \end{enumerate}     \end{document}      Unfortunately (despite using the `t` option of the `tabular` environment), the alignment is not as expected due to the `\toprule` command. If I remove it, everthing is fine. How may I solve this? Furthermore, how can I center the table horizontally within the current line? I tried to use a floating table by surrounding it with `\begin{table}\end{table}`, but this changed the vertical placement even more.


title: How to calculate the width for placing 2 big images side by side?

text: I'm trying to put 2 images in a row with this code, and runs well, but... don't adapt the size of the last 2 images in a row.               \documentclass[12pt,a4paper]{article}     \usepackage{graphicx}     \usepackage{subcaption}     \begin{document}     \includegraphics[width=\linewidth]{example-image-a}          \includegraphics[width=7.5cm]{example-image-b}          and now 2          \begin{figure}     \centering     \subcaptionbox{A cat\label{cat}}     [.45\linewidth]{\includegraphics{example-image-a}}     \subcaptionbox{An elephant\label{aaa1}}     [.45\linewidth]{\includegraphics{example-image-b}}     \caption{Two animals}\label{aaa2}     \end{figure}     \end{document}


title: Japanese practise paper (Genkou Youshi)

text: I'm trying to figure out a way of creating a Japanese character practice sheet. The type that I'm looking to create looks a little like the Genkou Youshi that this question was looking to cover. Except that a Japanese character is inserted into the topmost 4-5 boxes of a row, where the instances of the character after the first are printed in a progressively lighter shade until they have faded away completely. Here's an example of what I'm looking to create: ![enter image description here](http://i.stack.imgur.com/1Rw3V.png) Is this possible to do? If so, where should I start? I'm a bit of a beginner to TeX, but am willing to learn. I'm currently using:   * TexMaker 3.5   * TexLive 2011   * Windows 7 (But I can move over the Debian if needed)   * This answer from the previously mentioned question.


title: Nested tabularx doesn't work with ltablex

text: This works:               \documentclass{article}     \usepackage[a5paper]{geometry}     \usepackage{array}     \usepackage{tabularx}     \setlength{\parindent}{0cm}     \begin{document}     \begin{tabularx}{\textwidth}{ |X|}       \hline       \multicolumn{1}{|@{}c@{}|}{\begin{tabularx}{\dimexpr\hsize-2\arrayrulewidth\relax}             {X}             text \\           \end{tabularx}}\\       \hline     \end{tabularx}     \end{document}      Giving this: ![enter image description here](http://i.stack.imgur.com/68yjv.png) But when I add `\usepackage{ltablex}` to the preamble, pdflatex starts to give an error:               ! Extra alignment tab has been changed to \cr.     <template> \endtemplate           l.16 \end{tabularx}      How to fix? Or, at least, use nested tables in multipage tables?


title: Highlight referenced equation number

text: I have to give a talk, and I am using a LaTeX paper that I will write onto the blackboard. However, it is quite annoying to write all equation numbers on the blackboard, but I do want to have them all in my document. Thus disabling all unreferenced numbers is not an option. My qestion is: is there a way to define another style for equations that are referred to than those that are not? Let's say I want normal formula numbers in upright and if they are referenced in italics. By this way I can see which numbers are necessary to be written on the blackboard.


title: Add \vrule to parcolumns

text: I try to find best solution to simulate long table with auto breaking cells at the end of page. I use `\usepackage{parcolumns}`. Everything is fine, but I need to add left and right vertical lines and top and bottom vertical lines to imitate table. Is this possible to do with this package? Or does it exist work around? Here my source code               \begin{parcolumns}[colwidths={1=6.2cm}, rulebetween]{2}     \colplacechunks{}     \hrule          \colchunk{\hspace{0.4cm} \subsubsection {Little text}}     \colchunk{ \\         Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nulla augue, ultricies vestibulum auctor vitae, scelerisque sit amet tellus. Etiam adipiscing elementum pellentesque. Pellentesque ac nulla libero, quis venenatis augue. Donec ut egestas nisi. Sed non ligula at purus molestie blandit quis quis eros. Phasellus venenatis ante quis ligula molestie semper ornare est sollicitudin. Ut lacus ipsum, dictum vitae malesuada eget, luctus sed tortor. Curabitur a augue ipsum. Quisque accumsan odio et ipsum euismod volutpat. Praesent porta nunc adipiscing justo convallis nec tempor augue auctor. Nam magna nibh, gravida ut placerat nec, posuere et sem. Sed tincidunt, justo vel euismod pretium, enim tortor fermentum augue, iaculis bibendum nunc mi vel quam. Donec nec gravida ligula. Vivamus dictum libero eget elit scelerisque sit amet accumsan mi mollis.                  Phasellus eros magna, posuere facilisis sollicitudin dignissim, tincidunt ac eros. Vestibulum non vestibulum elit. Donec dictum vulputate nisl sed iaculis. Suspendisse ut ipsum arcu, ac molestie odio. Vivamus dapibus convallis arcu non ultricies. Sed id aliquet mi. Mauris vel nisi orci. Aenean pulvinar nulla et est rhoncus vestibulum. Morbi interdum, leo vel semper commodo, lectus velit blandit ipsum, quis euismod ante metus at nisl. Donec interdum scelerisque elit, auctor vestibulum elit mattis ultrices.                  Nam a velit dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce et augue vel augue pulvinar rhoncus laoreet quis dolor. Cras id dolor enim, non bibendum nisi. In ac nisl velit, ut lobortis dui. Etiam dapibus, lectus nec consectetur aliquam, sapien diam sagittis lorem, nec pellentesque ante ante vel libero. Fusce dapibus eros non metus condimentum placerat. Nam sem mi, sollicitudin eu molestie non, scelerisque ut velit. Morbi ultrices quam et tortor tempor quis interdum mauris ornare. Maecenas sit amet arcu massa, ut adipiscing leo. Ut fermentum elit vel ante bibendum et semper augue ullamcorper. Sed ac sapien felis.                  Aenean suscipit, quam nec condimentum ullamcorper, ante metus rhoncus nisl, sit amet vulputate est leo ac lectus. Cras pulvinar eleifend enim. Fusce sapien est, tristique a aliquam auctor, tempus vel turpis. Praesent dapibus vehicula rutrum. Sed ac felis felis. Proin vitae dui ac ligula hendrerit feugiat id malesuada felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus vel ante nibh. Donec ut metus sed ipsum luctus posuere et sed mauris. Suspendisse posuere libero nec tortor elementum tincidunt. Duis rhoncus mollis sodales. Mauris sit amet quam eget enim pulvinar facilisis. Duis porttitor eros quis lorem molestie egestas. Nam sagittis erat vitae metus consequat ornare. Suspendisse et nisl ligula. Aenean sed tellus dolor, eu lacinia ipsum.                  Aenean suscipit, quam nec condimentum ullamcorper, ante metus rhoncus nisl, sit amet vulputate est leo ac lectus. Cras pulvinar eleifend enim. Fusce sapien est, tristique a aliquam auctor, tempus vel turpis. Praesent dapibus vehicula rutrum. Sed ac felis felis. Proin vitae dui ac ligula hendrerit feugiat id malesuada felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus vel ante nibh. Donec ut metus sed ipsum luctus posuere et sed mauris. Suspendisse posuere libero nec tortor elementum tincidunt. Duis rhoncus mollis sodales. Mauris sit amet quam eget enim pulvinar facilisis. Duis porttitor eros quis lorem molestie egestas. Nam sagittis erat vitae metus consequat ornare. Suspendisse et nisl ligula. Aenean sed tellus dolor, eu lacinia ipsum.     }     \colplacechunks{}     \hrule     \colchunk{Little text}     \colchunk{          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nulla augue, ultricies vestibulum auctor vitae, scelerisque sit amet tellus. Etiam adipiscing elementum pellentesque. Pellentesque ac nulla libero, quis venenatis augue. Donec ut egestas nisi. Sed non ligula at purus molestie blandit quis quis eros. Phasellus venenatis ante quis ligula molestie semper ornare est sollicitudin. Ut lacus ipsum, dictum vitae malesuada eget, luctus sed tortor. Curabitur a augue ipsum. Quisque accumsan odio et ipsum euismod volutpat. Praesent porta nunc adipiscing justo convallis nec tempor augue auctor. Nam magna nibh, gravida ut placerat nec, posuere et sem. Sed tincidunt, justo vel euismod pretium, enim tortor fermentum augue, iaculis bibendum nunc mi vel quam. Donec nec gravida ligula. Vivamus dictum libero eget elit scelerisque sit amet accumsan mi mollis.             Phasellus eros magna, posuere facilisis sollicitudin dignissim, tincidunt ac eros. Vestibulum non vestibulum elit. Donec dictum vulputate nisl sed iaculis. Suspendisse ut ipsum arcu, ac molestie odio. Vivamus dapibus convallis arcu non ultricies. Sed id aliquet mi. Mauris vel nisi orci. Aenean pulvinar nulla et est rhoncus vestibulum. Morbi interdum, leo vel semper commodo, lectus velit blandit ipsum, quis euismod ante metus at nisl. Donec interdum scelerisque elit, auctor vestibulum elit mattis ultrices.             Nam a velit dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce et augue vel augue pulvinar rhoncus laoreet quis dolor. Cras id dolor enim, non bibendum nisi. In ac nisl velit, ut lobortis dui. Etiam dapibus, lectus nec consectetur aliquam, sapien diam sagittis lorem, nec pellentesque ante ante vel libero. Fusce dapibus eros non metus condimentum placerat. Nam sem mi, sollicitudin eu molestie non, scelerisque ut velit. Morbi ultrices quam et tortor tempor quis interdum mauris ornare. Maecenas sit amet arcu massa, ut adipiscing leo. Ut fermentum elit vel ante bibendum et semper augue ullamcorper. Sed ac sapien felis.             Aenean suscipit, quam nec condimentum ullamcorper, ante metus rhoncus nisl, sit amet vulputate est leo ac lectus. Cras pulvinar eleifend enim. Fusce sapien est, tristique a aliquam auctor, tempus vel turpis. Praesent dapibus vehicula rutrum. Sed ac felis felis. Proin vitae dui ac ligula hendrerit feugiat id malesuada felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus vel ante nibh. Donec ut metus sed ipsum luctus posuere et sed mauris. Suspendisse posuere libero nec tortor elementum tincidunt. Duis rhoncus mollis sodales. Mauris sit amet quam eget enim pulvinar facilisis. Duis porttitor eros quis lorem molestie egestas. Nam sagittis erat vitae metus consequat ornare. Suspendisse et nisl ligula. Aenean sed tellus dolor, eu lacinia ipsum.             Aenean suscipit, quam nec condimentum ullamcorper, ante metus rhoncus nisl, sit amet vulputate est leo ac lectus. Cras pulvinar eleifend enim. Fusce sapien est, tristique a aliquam auctor, tempus vel turpis. Praesent dapibus vehicula rutrum. Sed ac felis felis. Proin vitae dui ac ligula hendrerit feugiat id malesuada felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus vel ante nibh. Donec ut metus sed ipsum luctus posuere et sed mauris. Suspendisse posuere libero nec tortor elementum tincidunt. Duis rhoncus mollis sodales. Mauris sit amet quam eget enim pulvinar facilisis. Duis porttitor eros quis lorem molestie egestas. Nam sagittis erat vitae metus consequat ornare. Suspendisse et nisl ligula. Aenean sed tellus dolor, eu lacinia ipsum.     }     \colplacechunks{}     \hrule     \end{parcolumns}      Thank you!


title: Using setspace package breaks footnotes link

text: The following code created a footnote, the problem is that in the produced pdf file clicking footnote reference `1` doesn't jump to footnote definition`1` in bottom of the page, instead, it jumps to the beginning of the pdf file. But if I remove the "\usepackage{setspace}" line everything works. Why is this and how to make it work as I expected? Thanks in advance.               \documentclass[11pt]{article}     \usepackage{hyperref}     \tolerance=1000     \usepackage{setspace}     \title{temp}     \hypersetup{       colorlinks,%       citecolor=black,%       filecolor=black,%       linkcolor=blue,%       urlcolor=black     }     \begin{document}          \maketitle     \tableofcontents          \section{Section 1}     \label{sec-1}     TeX is a computer program for typesetting documents, created by Donald Knuth. It     takes a suitably prepared computer file and converts it to a form which may be     printed on many kinds of printers, including dot-matrix printers, laser printers     and high-resolution typesetting machines. LaTeX is a set of macros for TeX that     aims at reducing the user's task to the sole role of writing the content, LaTeX     taking care of all the formatting process. A number of well-established     publishers now use TeX or LaTeX to typeset books and mathematical journals. It     is also well appreciated by users caring about typography, consistent     formatting, efficient collaborative writing and open formats.          \section{Section 2}     \label{sec-2}     TeX is a computer program for typesetting documents, created by Donald Knuth. It     takes a suitably prepared computer file and converts it to a form which may be     printed on many kinds of printers, including dot-matrix printers, laser printers     and high-resolution typesetting machines. LaTeX is a set of macros for TeX that     aims at reducing the user's task to the sole role of writing the content, LaTeX     taking care of all the formatting process. A number of well-established     publishers now use TeX or LaTeX to typeset books and mathematical journals. It     is also well appreciated by users caring about typography, consistent     formatting, efficient collaborative writing and open formats.          \section{Section 3}     \label{sec-3}     TeX is a computer program for typesetting documents, created by Donald Knuth. It     takes a suitably prepared computer file and converts it to a form which may be     printed on many kinds of printers, including dot-matrix printers, laser printers     and high-resolution typesetting machines. LaTeX is a set of macros for TeX that     aims at reducing the user's task to the sole role of writing the content, LaTeX     taking care of all the formatting process. A number of well-established     publishers now use TeX or LaTeX to typeset books and mathematical journals. It     is also well appreciated by users caring about typography, consistent     formatting, efficient collaborative writing and open formats.          \section{Test footnotes}     \label{sec-4}     This text has a footnote \footnote{See section \ref{sec-1}}     \end{document}


title: How to create a document containing forms?

text: Is it easy to make a PDF document containing forms in LaTeX? I tried to use TextFields but a friend of mine said that it won't work on every operating system PDF readers?


title: Set a minimum space above and below displayed math

text: **NOTE:** This question is specifically about adding vertical space that increases to compensate for tall symbols. Thus, it is not a duplicate of How can I change the whitespace above and below math displays?. I'm trying to revise my university's thesis class to produce spacing with displayed math that works a little bit better with double spacing (which is required). What I have in mind is this:   1. The distance above and below a displayed math environment should be the same as the distance between the top of a typical line of text and the bottom of the preceeding line. In particular, symbols that go even slightly above the "usual" height should lower the baseline.   2. Within a multiline displayed math environment such as `align` or `eqnarray`, the distance between baselines should be the same as `\baselineskip` unless this would cause the distance between symbols to go below (say) `6pt`, in which case the baseline should be lowered so that the distance between symbols is exactly `8pt`. For instance, in the document below, the space between the two `Z=` lines needs to be increased, and the space below the bottom math line needs to be increased even more. ![enter image description here](http://i.stack.imgur.com/SS3T9.png) How can this be accomplished? (By changing settings in the preamble; I'm writing a document class, not playing with specific pieces of math.) Here's what I've got so far:               \documentclass[10pt]{article}          %Code that belongs in the class file:     \makeatletter         \RequirePackage[doublespacing]{setspace}         \AtBeginDocument{%     %        \lineskiplimit=0pt%     %        \lineskip=\dimexpr\baselineskip-\f@size pt\relax%             \abovedisplayshortskip=0pt%             \belowdisplayshortskip=0pt%             \abovedisplayskip=0pt%             \belowdisplayskip=0pt%             \jot=0pt%         }     \makeatother          %Code that belongs in the preamble:     \usepackage{amsmath}     \usepackage{lipsum}          \begin{document}     \lipsum*[2]     \begin{align*}     f \colon X &\to Y \\     x &\mapsto y \\     Z &= \left\lfloor\frac{\mathcal E \hat{} \otimes \mathcal E}{g\mathcal E \hat{} \otimes \mathcal E} \right\rfloor \\     Z &= \left\lfloor\frac{\mathcal E \hat{} \otimes \mathcal E}{g\mathcal E \hat{} \otimes \mathcal E} \right\rfloor     \end{align*}     \lipsum*[2]     \end{document}


title: How exactly is spacing in and around a multiline math environment determined?

text: I've tried reading various sources (in particular Tex By Topic; I don't have a copy of the TeXBook) and experimenting on my own, but I'm still unclear as to how exactly the line spacing in and around a multiline math environment is determined by the parameters   * `\abovedisplayskip`, `\belowdisplayskip`, `\shortabovedisplayskip`, `\shortdisplayskip`   * `\lineskip`, `\lineskiplimit`   * `\jot` Can someone explain exactly how the skips are computed? (Ideally it should include a description of what happens if one or more of these parameters is made negative.) I'm especially interested in `\lineskip` and `\lineskiplimit`, since I've seen some strange results from playing with these. For a MWE, see the example given in Set a minimum space above and below displayed math


title: Two \cite commands with different colored links?

text: I'm writing a grant proposal (whee) and I was given a suggestion to make two different citations with two different colors. So it would be something like:               In the PI's prior work~\citeme{mycoolpaper} he proved a cool theorem;      subsequent follow-up work by others~\cite{otherpaper} provided empirical      validation on several benchmark data sets.      In the formatting `\citeme{}` would be colored red, and `\cite{}` blue, using `\hypersetup{}` or something like that. I know that one can do this with \href, but I wasn't sure if you could specify a custom `\cite` command. I feel like some combination of the `cite` and `hyperref` and maybe `biblatex` would do it?


title: How to underline a section's title without using the sectsty package (memoir class)?

text: Can anyone tell me how to underline a section's title without using the `sectsty` package please? Indeed I am using the `memoir` class which prohibits this package. Thank You.


title: How to fill logic gates in circuitikz?

text: How can you specify a `fill` color for logic gates in `circuitikz`? It does not work as I would have expected:               \documentclass{standalone}     \usepackage{circuitikz}          \begin{document}     \begin{circuitikz} \draw     (0,2) node[or port, fill=red] (myor) {}          (myor.in 1) node[left =.2cm] (a) {A}     (myor.in 2) node[left =.2cm] (b) {B}     (myor.out)  node[right=.2cm] (c) {C}          (myor.in 1) -- (a)     (myor.in 2) -- (b)     (myor.out)  -- (c);     \end{circuitikz}     \end{document}      The output still shows a transparent gate instead of a red one: ![transparent gate](http://i.stack.imgur.com/mvN0E.png)


title: GSView Open file's Error: /invalidfileaccess in /findfont

text: I use GSview to open a `.ps` file and got errors as:               GSview 5.0 2012-01-17     GPL Ghostscript 9.05 (2012-02-08)     Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.     This software comes with NO WARRANTY: see the file PUBLIC for details.     Displaying non DSC file G:/My_Daily Sync/20120404 JSICE/20120402 JSICE2011/JSICE2011.ps     Loading NimbusRomNo9L-Medi font from %rom%Resource/Font/NimbusRomNo9L-Medi... 3650488 2223609 4329624 3024112 2 done.     Loading NimbusRomNo9L-ReguItal font from %rom%Resource/Font/NimbusRomNo9L-ReguItal... 3650488 2276491 4349808 3041337 2 done.     Loading NimbusRomNo9L-Regu font from %rom%Resource/Font/NimbusRomNo9L-Regu... 3650488 2328328 4390176 2553455 2 done.     Loading CenturySchL-BoldItal font from %rom%Resource/Font/CenturySchL-BoldItal... 3711040 2393187 4390176 2574118 2 done.     Loading NimbusSanL-Regu font from %rom%Resource/Font/NimbusSanL-Regu... 3771592 2445797 4390176 2748035 2 done.     Scanning c:\psfonts for fonts... 0 files, 0 scanned, 0 new fonts.     Error: /invalidfileaccess in /findfont     Operand stack:        GothicBBB-Medium-83pv-RKSJ-H     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   false   1   %stopped_push   1926   1   3   %oparray_pop   1925   1   3   %oparray_pop   1909   1   3   %oparray_pop   1803   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   1884   1   7   %oparray_pop     Dictionary stack:        --dict:1176/1684(ro)(G)--   --dict:0/20(G)--   --dict:84/200(L)--   --dict:206/300(L)--   --dict:43/200(L)--   --dict:95/160(L)--   --dict:8/85(L)--     Current allocation mode is local          --- Begin offending input ---     21 mt 4152  121 L     1069 3204 mt 4152 3204 L     4152 3204 mt 4152  121 L     1069 3204 mt 1069  121 L     1069 3204 mt 4152 3204 L     1069 3204 mt 1069  121 L     1069 3204 mt 1069 3173 L     1069  121 mt 1069  152 L     %%IncludeResource: font GothicBBB-Medium-83pv-RKSJ-H     /GothicBBB-Medium-83pv-RKSJ-H 240 FMS     985 3514 mt     (0) s     2611 3204 mt 2611 3173 L     2611  121 mt 2611  152 L     2413 3514 mt     (0.5) s     4152 3204 mt 4152 3173 L     4152  121 mt 4152  152 L     4068 3514 mt     (1) s     1069 3204 mt 1100 3204 L     4152 3204 mt 4121 3204 L     867 3314 mt     (0) s     1069 2587 mt 1100 2587 L     4152 2587 mt 4121 2587 L     639 2697 mt     (0.2) s     1069 1971 mt 1100 1971 L     4152 1971 mt 4121 1971 L     639 2081 mt     (0.4) s     1069 1354 mt 1100 1354 L     4152 1354 mt 4121 1354 L     639 1464 mt     (0.6) s     1069  738 mt 1100  738 L     4152  738 mt 4121  738 L     639  848 mt     (0.8) s     1069  121 mt 1100  121 L     4152  121 mt 4121  121 L     867  231 mt     (1) s          1069  121 mt 4152  121 L     1069 3204 mt 4152 3204 L     4152 3204 mt 4152  121 L     1069 3204 mt 1069  121 L          --- End offending input ---     file offset = 97280     gsapi_run_string_continue returns -101      My system is Japanese version Windows 7 64bit with TeXnicCenter + MiKTeX + GSview + GhostScript. Could you give me any help? I will appreciate for any comments.