title: Numbered paragraphs with optional titles

text: I am trying to define numbered paragraphs `\mypar` which can admit an optional `<title>`. I did the following:               \newcounter{paranum}[section]     \renewcommand{\theparanum}{\thesection.\arabic{paranum}}     \newcommand{\mypar}[1][]{\bigskip%     \noindent%     \refstepcounter{paranum}\textbf{\theparanum\quad#1}}     % Above defines a custom paragraph numbering scheme.      This more of less did the job. The only deficiency is that when I have a title for the paragraph, the spacing following the title (and before the content) is just the usual amount of spacing between words in normal text. However, given that this is the title of the paragraph, I would like there to be some extra spacing following it to separate it from the following normal text. I tried adding the `\quad`:               \newcounter{paranum}[section]     \renewcommand{\theparanum}{\thesection.\arabic{paranum}}     \newcommand{\mypar}[1][]{\bigskip%     \noindent%     \refstepcounter{paranum}\textbf{\theparanum\quad#1\quad}}     % Above defines a custom paragraph numbering scheme.      This works fine when the title is present; however, it also puts unnecessary extra space even when there isn't a title for the paragraph. How may I define the command to make sure that there is only one `\quad` (instead of two) between the paragraph number and the normal-text content when there _isn't_ a title; but also when there _is_ a title, one `\quad` between the paragraph number and the title, and another `\quad` between the title and the normal-text content? Any help appreciated!


title: XOR and II (concatenation) summation symbols

text: In Latex, in math mode, if I want to express summation over a range I can use the following expression `\sum_{from}^{to}`. I can do the same for the product. What is the name of the symbol that does this for XOR or concatenation? If I do:               \oplus_{i=0}^7      I don't get the `i=0` and `7` parts below and above the symbol, respectively, but to the right instead, like this: ![bulkxor](http://i.stack.imgur.com/VECFr.png) With summation (`\sum_{i=0}^7`), that is not the case - they appear below and below in the output: ![bulksum](http://i.stack.imgur.com/1HbaF.png) How can I make XOR, or concatenation (II) larger and with indices below and above the symbol?


title: Specify vertical space between outlines (enumerate) levels

text: I'm using the `outlines` package, and I'm curious to know how to modify the vertical spacing between entries/items in the outline. I'm happy with using `\onehalfspacing` for the vertical spacing between lines in a single entry/item. But how can I set the space between different entries/items to something else (for example to doublespacing)? Here is a working example in which the line spacing is set to onehalf. How can I modify it so that the entries/items in the outline are more than onehalf spaced apart? (This working example has some customizations with which the currently-requested solution would need to be compatible.)               \documentclass[11pt,a4paper]{article}             \usepackage{setspace}          % Outlines configurations     \usepackage{outlines}     \usepackage{enumitem}     \setenumerate[1]{label=\Roman*.}     \setenumerate[2]{label=\Alph*.}     \setenumerate[3]{label=\roman*.}     \setenumerate[4]{label=\alph*.}     \makeatletter     \newenvironment{myoutline}[1][]{%       \ifthenelse{\equal{#1}{}}{}{\renewcommand{\ol@type}{#1}}%       \ol@z%       \newcommand{\0}{\ol@toz\ol@z}%       \newcommand{\1}{\ol@toi\scshape\bfseries\LARGE\ol@i\item}%       \newcommand{\2}{\ol@toii\normalfont\Large\bfseries\ol@ii\item}%       \newcommand{\3}{\ol@toiii\normalfont\normalsize\ol@iii\item}%       \newcommand{\4}{\ol@toiiii\normalfont\normalsize\ol@iiii\item}%     }{%       \ol@toz\ol@exit%     }     \makeatother          \begin{document}          \onehalfspacing          \begin{outline}[enumerate]     \1 Mathematics         \2 The study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers $\ldots$         \2 Often, mathematics is conceptually divided into two camps: applied and pure mathematics.  In reality, however, mathematics does not rigidly abide by this dichotomy.     \1 Computer Science         \2 Computer Science (abbreviated CS or CompSci) is the scientific and practical approach to computation and its applications. It is the systematic study of the $\ldots$             \3 Famous computer scientists                 \4 Charles Babbage                 \4 Donald Knuth             \3 History of computer science     \end{outline}               \end{document}      Ideally, I'm looking for a solution where I can just modify a single scalar value, such as something like:                 \newcommand{\outlinespacingscalar}{1.5}      so that I can adjust this scalar to get the look and feel that seems best for a given document.


title: How do I locate and install a missing font?

text: I manually installed the CJK package, and I seem to be missing a font. I get the following error message: `! Font C70/mj/m/n/9/b0=uwmjb0 at 9.0pt not loadable: Metric (TFM) file not foun d.` How do I find out which package I need to install, and how do I install it?


title: Using pstool with latex auxilary directory

text: In my main pdflatex compilation I am using `-aux-directory=C:\Windows\Temp` I am using pstool and was trying to see if there was any way to generate the output pdf (and hopefully other files) in the same aux-directory. I thought that it might be possible with some settings like:               \usepackage[latex-options={-aux-directory=C:\Windows\Temp -output-directory=C:\Windows\Temp}]{pstool}      ...but couldn't figure it out. Any ideas on whether this is possible? (I am trying to find a workaround for the issue of having psfragfig figures in separate directory - not necessary sub-directories).


title: Does \newenvironment have a \provideenvironment cousin, as \newcommand has \providecommand?

text: To avoid the problem of having to decide whether to use `\newcommand` or `\renewcommand`, LaTeX has the option of `\providecommand`. Is there something corresponding to this for environments? I'd like to be able to type `\provideenvironment` (or similar) rather than first using `\newenvironment` and then using `\renewenvironment`.


title: Too much space after sections when I change parskip

text: I changed the `parident` and `parskip` of my document. But now there is a huge empty space after the sections. How can I reduce the space after a section?               \documentclass[12pt,a4paper]{scrartcl}     \begin{document}     \setlength\parindent{0pt}     \setlength{\parskip}{\baselineskip}     \section{Test}     \subsection{Test}     Test test test test.          Test test test test.          \subsection{Test}     Test test test test.          Test test test test.     \end{document}


title: How do I alternate graphics in LaTeX beamer

text: I'm trying to alternate graphics on a slide:               \frame{     \frametitle{Verkette Liste Beispiel}      \begin{figure}         \includegraphics<1>[scale=0.7]{pics/List-0.pdf}         \includegraphics<2>[scale=0.7]{pics/List-1.pdf}         \caption<1>{Hallo}         \caption<2>{Welt}     \end{figure}     }      My problem is I don't get alternating captions. I get something like this: http://public.kungi.org/main-faulty.pdf I tried the solution from this question: http://stackoverflow.com/questions/1088761/how-to-change-an-image-on-a-slide- in-latex but it did not work for me. What am I doing wrong?


title: How does one publish/promote a new package?

text: I just took all the wonderful information supplied here, and wrote a small package that makes it possible to use Unicode characters for section, subsection, subsubsection, paragraph, subparagraph and item. I think it makes the text look neat, and it might be very useful for RTL users.               \NeedsTeXFormat{LaTeX2e}     \ProvidesPakcage{usection}         {2011/02/07 Unicode characters instead of section, subsection, etc.}     \newcommand*{\toEolnCommand}[2]{%       \newcommand*{#1}{%         \begingroup%         \escapechar=`\\%         \catcode\endlinechar=\active%         \csname\string#1\endcsname%       }%       \begingroup%       \escapechar=`\\%       \lccode`\~=\endlinechar%       \lowercase{%         \expandafter\endgroup         \expandafter\newcommand\csname\string#1\endcsname##1~%       }{\endgroup#2\space}%     }          \toEolnCommand\toEolnSection{\section{#1}}     \toEolnCommand\toEolnSubsection{\subsection{#1}}     \toEolnCommand\toEolnSubsubsection{\subsubsection{#1}}     \toEolnCommand\toEolnParagraph{\paragraph{#1}}     \toEolnCommand\toEolnSubparagraph{\subparagraph{#1}}          \catcode"2022=\active \newcommand•{\item}         % Bullet     \catcode"B6=\active  \newcommandf¶{\@xparagraph} % ¶: U+00B6 PILCROW SIGN     \catcode"A7=\active  \newcommand§{\@xsection}       % §:  U+00A7 SECTION SIGN               \newcommand\@xparagraph{%           \@ifnextchar ¶ {%                     \expandafter                     \toEolnSubparagraph                     \@discardNextChar           }{%                   \toEolnParagraph           }%     }          \newcommand\@xsection{%       \@ifnextchar§{% Two or more § were found.           \expandafter           \@sub@or@subsub@section           \@discardNextChar%        }{% Single § found.           \toEolnSection       }     }          \newcommand\@sub@or@subsub@section{           \@ifnextchar§{%             \expandafter             \toEolnSubsubsection             \@discardNextChar           }{%               \toEolnSubsection           }%     }               \newcommand\@discardNextChar#1{}      So, (a) do you think I should publish this, and if yes, (b) how should I do so? **EDIT** I correct my question to make it useful to the general public: (a) What are the cirteria to be applied in considering a package worthy of publications and (b) which steps should be taken to realizing such a decision?


title: Sans serif font with distinguished capital I for math.

text: I work a lot with matrix algebra. I also give a lot of presentations. It'd be nice to have a good sans serif font to use for both. Currently, my choice is the bitstream vera sans with math package: arev. The problem with most sans serif fonts for matrix algebra is that they do not have a good capital I. In these presentations, 'I' really needs to have it's tails, even in a sans serif font. (It's the all important identity operator after all.) Hence my question:   * Are there other sans serif packages that have a 'I' with tails? (I know about arev and lxfonts. I like arev, but it's pretty wide when using the matching text font. lxfonts is even worse.) Other desirable features are i, j, and l characters with a bit of a swish. I have not been able to find any that are miktex packages.   * Is there a reasonable combination of letters I could use to patch an existing font with this behavior? And if so, how?  This seems to be a recurring question (see http://groups.google.com/group/latexusersgroup/browse_thread/thread/6f3853c13e295538/32fc03a336b8afd5 and http://thedailyreviewer.com/compsys/view/distinguished-capital-i-for-sans- serif-font-113312512)


title: Fill the left 1/3 of the title page with color?

text: This is my first time to try and write documentation by using LaTeX. The generated PDF is quite impressive, but there is one thing I have no idea of how to do it: I would like to have the left 1/3 of my title page (created by `titlepage`) filled with color (no left and top, bottom margin), and then put the title text on it. The title will be centered, so its left part could overlap with the colored left 1/3 of the page. Is it doable? What is the best way? Can the `picture` environment do this? (The documentclass is `[a4paper]{report}`.)


title: pgfplotstabletypeset verticle alignment of cell contents, plus horizontal lines

text: I am using `pgfplotstabletypeset` to read contents of a csv file and typeset (In the MWE below instead I copy/pasted the contents of csv file, to make it easier to test the MWE). I have some content that spans multiple lines in some cells. I use `\makecell` to achieve that. As a consequence, when a cell on the same row with a multiline cell has single line content I see empty spaces above and below it. Obviously default vertical alignment is centering in this case. When typeset, the rows are not easily separated visually anymore. To remedy that, a) I want all cells (except header cells) to be vertically aligned to top. b) And/or (depends on how it will look) I may want horizantal cell borders to be visible, as in putting `\hline`s between each row in normal `tabular` environment.               \documentclass{article}     \usepackage{pgfplotstable}     \pgfplotsset{compat=1.8}     \usepackage{float}     \restylefloat{table}     \usepackage{cite}     \usepackage{lscape}     \usepackage{lineno}     \usepackage{makecell}     \title{A}     \author{E}     \date{}     \begin{document}     \maketitle               \begin{table}[H]     \caption{Coefficient Generated Table}          \label{tab:Data}          \centering         \pgfplotstabletypeset[           col sep=semicolon,           string type,           every head row/.style=             {before row=\hline,after row=\hline},           every last row/.style=             {after row=\hline},        ]{         Name;W;aaaa         s;\makecell{400, 300 \\ 500, 200 \\ 2, 32, 532};23         d;124 234;234     }     \end{table}               \end{document}      ![enter image description here](http://i.stack.imgur.com/mEPfg.png)


title: Hyperref: how to correctly redefine `\@currentlabel`?

text: I am using my own solution to this question to create custom cross-references.               \documentclass{article}          \usepackage{hyperref}     \usepackage{lipsum}          \title{My notes for Bla}     \author{myself}          \newcommand{\thingnamestyle}[1]{\textsc{#1}}     \newcommand{\thingnamerefstyle}[1]{[\textsc{#1}]}     % This works, but is unnecessarily complicated     % \newcounter{thing}     %     \newcommand{\thing}[1]{%     %       \thingnamestyle{#1}%     %        \renewcommand{\thething}{\thingnamerefstyle{#1}}%     %        \refstepcounter{thing}%     %     }     \makeatletter     \newcommand{\thing}[1]{%       \thingnamestyle{#1}%       \def\@currentlabel{\thingnamerefstyle{#1}}%     }     \makeatother          \begin{document}     \section{Bla}     \lipsum[1]       \thing{thing-Quick} \label{quick}     \lipsum[1]       \thing{Task-Brown}  \label{brown}     \lipsum[1]     And \ref{quick} has been completed.     \end{document}      This works but `hyperref` inserts the wrong link in the `\ref`: clicking on it would jump to the section title, which, I suppose, is the last thing that sets `\@currentlable` other than my `\thing` macro. If one defines `\thing` using ref counters as in the commented code above, the link seems to work properly. **What's missing to make`\thing` compatible with `hyperref`?**


title: The output of eps fig is rotated by itself

text: I am trying to use an `.eps` figure for my paper, but the problem comes when I got weird output. I use this command:               \begin{figure}[!ht]     \centering       \includegraphics[scale=0.2]{A.eps}     \end{figure}        But on the output, the figure is rotated by itself. `A.eps` is a landscape figure, but it came out as a portrait figure. I tried to rotate it so it might be come out as I want, but it did not work. Can anybody help me, please?


title: lstlistings in defined Tikz box

text: I have created a box using `\newcommand`, based on TikZ named "mybox". The equation easily insertable in it. But I want to insert a `\lstlisting` environment in it. But it doesn't work. How can I do it? Here is my code:               \documentclass{minimal}          \usepackage{times}          \usepackage{tikz}          \usepackage{listings}          \newcommand*\mybox[1]{\centering\tikz{\node [text width=15cm,rounded corners,fill=orange!50,inner sep=0.5ex,midway](char){#1};}}          \begin{document}          \mybox{          \begin{equation}          \int_S \mathbf{B}\cdot d\mathbf{s}          \end{equation}          }          \mybox{          \begin{lstlisting}[frame=single,language=PHP,caption=Php info\label{php_info}]     <?php     phpinfo();     ?>          \end{lstlisting}          }          \end{document}


title: Add website in the bibliography

text: I try to use the following code. It works. But the true address is `http://en.wikipedia.org/wiki/Matrix_exponential`. So if I use `Matrix_exponential`, it does not work.                myref.bib            @misc{ exp,            author = "Wikipedia",            title = "Matrix exponential",            year = "2014",            url = "\url{http://en.wikipedia.org/wiki/Matrixexponential}",            note = "[Online; accessed 12-May-2014]"          }      my.tex                   \bibliographystyle{alphadin}          \bibliography{myref}


title: tikz-qtree: Beginners Problems

text: Hello im not a Linguist and have some trouble with trees.               \begin{tikzpicture}[grow'=up]             \Tree [.a                      [.b                          [.c [.d e]]                         [.f g]                     ]                                        ]     \end{tikzpicture}      Why wouldn't this work? Im running into problems only when i want to let a node have on single node from which the tree then branches out farther like:                 /  b        a       \  c      is okay but:                     /  c     a - b            \  d      is not


title: Bug? LaTeX misparses nested optional arguments

text: LaTeX seems to be having problems handling nested optional arguments. I've included a minimal code example that generates the error:               \documentclass[12pt,oneside]{book}     \begin{document}          \newcommand{\termbad}[2][]{#2#1}     \newcommand{\termgood}[2][]{#2#1}          \newcommand{\up}[1]{#1}     \newcommand{\dd}[1][]{#1}          \termgood{\up{Tart}}{Pop}     \termbad[\up{Tart}]{Pop}              \termgood{\dd[Tart]}{Pop}     \termbad[{\dd[Tart]}]{Pop}     %\termbad[\dd[Tart]]{Pop}               \end{document}      If you run this code, it works. If you remove the `%` in the second to last line, it fails with:               Runaway argument?          Tart{Pop} \par \par \end {document}          !File ended while scanning use of \dd.      After further tinkering, I have discovered the problem: LaTeX is reading the `]` for the inner optional argument as the end of the outer optional argument and then passing a malformed argument in. So it is passing in `\dd[Tart` as the optional argument to `\termbad` instead of `\dd[Tart]`. This still feels like a bug to me. Nesting braces in arguments works, brackets should as well. The following are workarounds:   * Enclose the inner optional argument in braces (as in the line before `%`).   * Redefine your inner function to require its argument instead of using optional arguments.   * Redefine your outer function to require its argument instead of using optional arguments. Any one of the three works around the issue. (Reposted here; question was originally posted to stackexchange and then closed instead of being migrated.)


title: ADDING white space to an image?

text: I'm new to beamer and am trying to make a presentation. When inserting an image, the output is satisfactory, except when I try to insert a `.pdf`! The white space in the image disappears. Initially, the image was a `.ps`, so I used `ps2pdf14` to convert it to `.pdf` and then `pdfcrop` to add the amount of white space I desire. I can convert the `.pdf` to `.png` and it works fine, but the quality isn't good enough for big pictures. Is there a way to restore the white space when inserting the `.pdf` image? I apologize if this is a trivial question, or if I've simply over looked something. Here's an example code to illustrate the problem               \documentclass[xcolor=svgnames,mathserif,serif]{beamer}     \usetheme{default}     \setbeamertemplate{navigation symbols}{}     \setbeamertemplate{frametitle}[default][center]     \definecolor{myblue}{RGB}{47,94,142}     \setbeamercolor{background canvas}{bg=myblue}     \usefonttheme{structuresmallcapsserif}     \setbeamercolor{title}{fg=white}     \setbeamercolor{titlelike}{fg=white}     \setbeamercolor{normal text}{fg=white}     \title{Sample Title}     \author{\large{Me}}     \institute{\small{University}}     \date{\small{Today's Date}}     \begin{document}          \begin{frame}     \titlepage     \end{frame}          \begin{frame}{Sample Title}     \begin{center}     \includegraphics[width=3in]{1.pdf} %why isn't white space appearing?     \end{center}     \end{frame}          \end{document}


title: Figure on A3 page within A4 document

text: In my dissertation, I got some diagrams that don't fit a single (horizontal) A4 page. Hence I decided to print them on A3 pages that might be unfolded when reading. I followed the instructions in several posts, including this one: Insert foldable A3 pages in an A4 document with active references My first attempt looks like this:               \newpage     \begingroup     \pdfpagewidth=2\pdfpagewidth     \noindent%\makebox[0pt][l]{%     \begin{figure}     %graphics go here     \caption{foo}     \end{figure}     \newpage     \endgroup      When replacing the figure with plain text, I indeed get a A3 landscape page within my document. Unfortunately, this doesn't seem to work for the figure- environment, since neither the graphics, nor the caption are displayed. Please note that I want to reference the figures, hence `pdfpages` might not be an option.


title: How to avoid confusion between special characters and delimiters or separators?

text: Some countries use `,` instead of `.` in a decimal. Unfortunately, a 2D coordinate, for example `(2,3,4)`, becomes ambiguous for readers. How to avoid this?


title: Header, including the first page

text: I have a short existing document formatting with the `article` class. What is the best way to include a header on each page (including the first) with my name and academic affiliation? The options I have looked at do not include the first page.


title: sidesubfloats.... why does this errored code work and my "correct" code doesnt?

text: I use the following code to get a 3 x 3 figures with automated labels that range from a-i. As you can see there is an error in the code, I use `sufloatrow` instead of 'subfloatrow' a few times. However, the labels are correct. While in my second "corrected" box the labels are wrong and are a,b,c for each row while they should also range from a-i. Aswell there seems to be something wrong with the numbering of the figure captions as it starts at 3... Anyone care to help me out abit with all this? since i'm getting abit frustrated here :P               \documentclass{article}             \usepackage{floatrow}             \usepackage[demo]{graphicx}             \usepackage{subfig}             \usepackage{caption}             \begin{document}       \clearpage     \begin{figure}[H]     \ffigbox      {\begin{subfloatrow}     \raggedright         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 1]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 2]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 3]{sec_struc_pec_red.pdf}}%         \end{subfloatrow}     \begin{sufloatrow}           \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 4]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 5]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 6]{sec_struc_pec_red.pdf}}%         \end{subfloatrow}     \begin{sufloatrow}           \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 7]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 8]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 9]{sec_struc_pec_red.pdf}}%         \end{subfloatrow}}     {\caption{...}}     \end{figure}               \clearpage     \begin{figure}[H]     \ffigbox      {\begin{subfloatrow}     \raggedright         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 1]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 2]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 3]{sec_struc_pec_red.pdf}}%         \end{subfloatrow}     \begin{subfloatrow}          \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 4]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 5]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 6]{sec_struc_pec_red.pdf}}%         \end{subfloatrow}     \begin{subfloatrow}          \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 7]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 8]{sec_struc_pec_red.pdf}}%         \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 9]{sec_struc_pec_red.pdf}}%         \end{subfloatrow}}     {\caption{...}}     \end{figure}              \end{document}


title: Writing HTML code directly from LaTeX?

text: At exporting a LaTeX file to HTML via `tex4ht` I have to write some HTML comments to the HTML source. So I would like to write the HTML code in the LaTeX file and let `tex4ht` export it directly. How can I achieve this? Are there some special LaTeX commands to do this?


title: "note environment" with mdframed

text: Here is what I have: ![enter image description here](http://i.stack.imgur.com/OcJpG.png) And here is what I would like: ![enter image description here](http://i.stack.imgur.com/3AAks.png) * * * The code to get what I currently have:               \documentclass[a4paper, 11pt]{article}          \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{xcolor}     \usepackage[framemethod=default]{mdframed}          \global\mdfdefinestyle{exampledefault}{%     linecolor=lightgray,linewidth=1pt,%     leftmargin=1cm,rightmargin=1cm     }          \begin{document}          \begin{mdframed}[style=exampledefault, frametitle={Note}]     This is my note.     \end{mdframed}          \end{document}


title: Do all starred commands have anything in common?

text: `\section*` produces an unnumbered section, `align*` makes the environment unnumbered, which is comparable in a way. `\newcommand*` doesn't accept `\par` in its argument, which is different. Stefan Kottwitz wrote: > Commonly, a star symbol `*` means a version of a command that behaves > differently from the original. That often means suppressing numbering but > could also refer to special features. This might answer my question, but perhaps there's more to say (and it's nice to have it as a separate question). Is there anything all starred commands have in common? Why would one define a starred command as opposed to another, differently named command indicating their semantic difference in the names? It seems that their definitions are usually entirely independent from each other. Further reading:   * Defining starred versions of commands   * TeX FAQ: Commands defined with * options


title: subequations customize arabic numbering in aligned environment

text: i've a rather simple problem for the experts out there! :) using subequations, it automatically enumerates the subequations in alphabetic order. is there a way to obtain instead an arabic-enumeration? like > Eq: ... (1) > > Eq: ... (2) > > Eq: ... (3.1) > > Eq: ... (3.2) > > Eq: ... (4) ... and so on Here is my MWE:               \documentclass[10pt,twoside]{article}         \usepackage{chadstyle} % Loads my formatting      \usepackage{url}      \usepackage{hyperref}      \usepackage{amssymb}      \usepackage{amsthm, etoolbox}      \usepackage[title,titletoc]{appendix}      \usepackage{pdflscape}      \usepackage{mathtools}      \usepackage{multirow}      \usepackage{tabularx}      \usepackage{placeins} % rotating Tables      \usepackage{rotating} % coloring table columns and rows      \usepackage{colortbl}          \newcolumntype{a}{>{\columncolor[gray]{.8}}c}      \newcolumntype{b}{>{\columncolor{white}}c}          \patchcmd{\subequations}{\def\theequation{\theparentequation\alph{equation}}}%      {\def\theequation{\theparentequation.\arabic{equation}}}{}{}          %some shortcut commands ....          \begin{document}          \section{Model}          \begin{subequations}      \begin{align} Y_m &= X P_m^{-\sigma_x} \label{eq:Demand_Yg} \\      Y_s &= X P_s^{-\sigma_x} \label{eq:Demand_Ys}      \end{align}      \end{subequations}          \end{document}      Would it be possible to embed the patch within this chadstyle package? As you see, I've already put in the beginning. Thanks!               %  chadstyle.sty   Chad Jones, 5/1/08     %     %  Chad's style file for nice paper format.     %  Various ideas for this style are taken from     %    -- Matthias Doepke and Michele Tertilt     %    -- Tony Roberts          \special{papersize=8.5in,11in}     %\usepackage{palatino,amssymb,amsfonts,amsmath,latexsym,setspace}     \usepackage{utopia,amssymb,amsfonts,latexsym,setspace}          \usepackage{amsthm, etoolbox}     \patchcmd\subequations     {\theparentequation\alph{equation}}     {\subequationsformat}     {}{}          \newcommand{\subequationsformat}{\theparentequation.\arabic{equation}}          \usepackage[dvips]{graphicx}     \usepackage{fancyhdr}     \usepackage[longnamesfirst]{natbib}               % example file to change the style of LaTeX     % Tony Roberts May 2004     % first colour for latex or pdflatex     \ifx\pdfoutput\@undefined\usepackage[usenames,dvips]{color}     \else\usepackage[usenames,dvipsnames]{color}     % and fix pdf colour problems     \IfFileExists{pdfcolmk.sty}{\usepackage{pdfcolmk}}{}      \fi          % Chad's colors:     % See http://web.njit.edu/~kevin/rgb.txt.html for possibilities     \definecolor{ChadDarkBlue}{rgb}{.1,0,.2}       \definecolor{ChadBlue}{rgb}{.1,.1,.5}       \definecolor{ChadRoyal}{rgb}{.2,.2,.8}       %\definecolor{ChadGreen}{rgb}{0,.35,.1}     %\definecolor{ChadGreen}{rgb}{0,.5,.25}  % Too bright     %\definecolor{ChadGreen}{rgb}{0,.4,.2}    % Still too bright     \definecolor{ChadGreen}{rgb}{0,.4,0}    % Dark Green     %\definecolor{ChadRed}{rgb}{.8,.1,.2}    % Too bright     \definecolor{ChadRed}{rgb}{.5,0,.5}  % purple          %%% HYPERLINKS %%%%%%%%%%%%%%%%%%%%%     \usepackage[colorlinks,breaklinks,      bookmarks=false,      pdfstartview=Fit,  % for fitting entire page; FitW just fits width      pdfview=Fit,       % after traversing a hyperlink      linkcolor=ChadRed,      urlcolor=ChadGreen,      citecolor=Black,      hyperfootnotes=false          ]{hyperref}     \usepackage[figure,table]{hypcap} % Correct a problem with hyperref     \urlstyle{rm} %so it doesn't use a typewriter font for url's.          %%%%%%%%%%%%%%%%%%%%%               % Fix title, sections, etc.          \let\LaTeXtitle\title     \renewcommand{\title}[1]{\LaTeXtitle{\color{ChadBlue}{\LARGE #1}}}     \renewcommand{\abstractname}{\color{ChadBlue}Abstract}     \renewcommand{\figurename}{\color{ChadBlue}Figure}     \renewcommand{\tablename}{\color{ChadBlue}Table}          \let\LaTeX@startsection\@startsection      \renewcommand{\@startsection}[6]{\LaTeX@startsection%     {#1}{#2}{#3}{#4}{#5}{\color{ChadBlue}\raggedright #6}}           % Fix periods at end of section numbers      %\renewcommand \thesection {\@arabic\c@section.}     %\renewcommand\thesubsection   {\thesection\@arabic\c@subsection.}     %\renewcommand\thesubsubsection{\thesubsection \@arabic\c@subsubsection.}               % Margin, Paragraph Setup     \onehalfspacing     \textheight=23cm \textwidth=17cm \topmargin=-8.5mm      %default: \textheight=22cm \textwidth=16cm \topmargin=-6.5mm     \oddsidemargin=3mm \evensidemargin=3mm     %\setlength{\parindent}{0em}      %\setlength{\parskip}{1.5ex plus0.5ex minus0.5ex}     %\setlength{\parsep}{0pt}      \setlength{\parskip}{0pt}          % This is how to control linespacing using setspace     % (\singlespacing or doublespacing just call this command)     \setstretch{1.4}          %% Setting up page headers     \pagestyle{fancy}     \rhead[]{\thepage}     \lhead[\thepage]{}     \cfoot[]{}      \renewcommand{\headrulewidth}{0pt}          \newcommand{\runningheads}[2]{     \chead[\color{ChadGreen}{\uppercase {\footnotesize #1}}]  % Author page header     {\color{ChadGreen}{\uppercase {\footnotesize #2}}}  % Short title     }          % Make hyperlinks jump more accurately     \makeatletter     \newcommand\org@hypertarget{}     \let\org@hypertarget\hypertarget     \renewcommand\hypertarget[2]{%     \Hy@raisedlink{\org@hypertarget{#1}{}}#2%     } \makeatother                % Spacing in Tables and Figures     %\renewcommand{\tabcolsep}{1pt}   % space between columns     \renewcommand{\arraystretch}{1.5} % space between rows     \addtolength{\textfloatsep}{0pt} % space between floats and text     \addtolength{\abovecaptionskip}{0pt} % space above caption     \addtolength{\belowcaptionskip}{.15in} % space below caption          \newcommand{\spc}[0]{\vspace{.1in}}     \newcommand{\fignote}[2]{\begin{center}\parbox[c]{#1}{\footnotesize #2} \end{center}}     \newcommand{\tabnote}[2]{\begin{center}\parbox[c]{#1}{\footnotesize #2} \end{center}}      Dear all, I've found the solution to the problem using chadstyle package. I've simply included the command within the subequation environment:                \documentclass[10pt,twoside]{article}      \usepackage{amsthm, etoolbox}      .      .      .      \begin{document}      .      .      .      \begin{subequations}      \newcommand{\subequationsformat}{\theparentequation.\arabic{equation}}       \begin{align}         a = b \\         c = d       \end{align}      \end{subequations}      .      .      .      \end{document}      Thanks for your time and all the suggestions! Best, E


title: How to a fill the bounded regions between two non-closed paths?

text: I have two paths -- crucially, not closed; and I would like to shade just the bounded regions between them. Trying to close the paths using fill and clip, I've had trouble not creating new regions that are bounded. My paths are just series of straight lines, so of course I could calculate the areas I need to fill exactly, but I want to iterate this shifting the two regions slightly. More precisely, my current code gives me this: ![Shifting Partitions](http://i.stack.imgur.com/cj1eO.jpg) Which is not what I want. I'll explain a bit what's going on. One of my two paths is the outer boundary of the partition; the other path is the outer boundary shifted. So, the bottom right square, the outer boundary has shifted one square to the left, and the red squares are the squares in between these two lines. Moving to a drawing to the left or up, shifts the other boundary to the left or up, respectively. So the picture on the bottom start being incorrect at the third in from the right -- the large colored red regions are not actually bounded between the two boundary of the partitions, but are rather an artifact of trying to close up the paths for filling and clipping. Here's what my two paths look like in that square: ![Two lines](http://i.stack.imgur.com/cnYiR.jpg) And here's what I want that square to look like: ![Correct coloring](http://i.stack.imgur.com/1MjXI.jpg) My code for this is not intelligent, and not my first try, but it's what I have at hand:               \begin{tikzpicture}[scale=.1]     \foreach \x in {1,2,...,7}        \foreach \y in {0,1,...,5}         {        \begin{scope}[xshift=-10*\x cm, yshift=10*\y cm]        \draw[clip] (0,5)--(2,5)--(2,4)--(3,4)--(3,2)--(4,2)--(4,1)--(7,1)--(7,0)--(0,0)--  cycle;      \draw[fill=red] (0,5)--(2,5)--(2,4)--(3,4)--(3,2)--(4,2)--(4,1)--(7,1)--(7,0)--(0,0)--cycle;     \draw[fill=white] (-\x, \y + 20) |- ++(2,-15) |- ++(1,-1) |- ++(1,-2) |- ++(3,-1) |- ++(13,-1) -- ++(\x,-\y) -| ++(-13,1) -| ++(-3,1) -| ++(-1,2) -| ++(-1,1) -| ++(-2,15) -| ++(40,-40) -| (-\x, \y + 20);     \draw[very thin, gray] (0,0) grid (8,8);     \end{scope}     }     \end{tikzpicture}


title: Exemple block and equations (Beamer)

text: I got an error with the exempleblock environment:               \documentclass{beamer}     \usetheme{PaloAlto}          \begin{document}     \begin{frame}\frametitle{Title}     \begin{exampleblock}     \[     t = \frac{1}{\lambda}\mbox{ln}\left(\frac{N(t)-D(t)}{N(t)}\right)     \]     \end{exampleblock}     \end{frame}     \end{document}      Latex says "exempleblock environment undefined." Where is the problem?


title: two (or more) columns navigation in beamer sidebar

text: I have a long presentation which basically is a collection of exercises. Each excercise has its own subsection, shown in the sidebar, like this:               \documentclass{beamer}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usetheme[hideothersubsections,left,width=1.4cm]{Goettingen}          \begin{document}      \begin{frame}       \frametitle{Start page}      \end{frame}      \begin{frame}        \section{section 1}       \subsection{1}       \subsection{2}       \subsection{3}       \subsection{4}       \subsection{5}       \subsection{6}       \subsection{7}      \end{frame}     \end{document}       eventually I got this:![enter image description here](http://i.stack.imgur.com/Votpr.png) After a certain number the sidebar is filled and some numbers end outside of the frame. What I would like is a two (or more) columns sidebar navigation, so that I can add more exercises. Looks like a similar problem was solved here, but I'm not skilled enough to adapt that solution to a vertical sidebar. Any help is much appreciated. ## Followup#1 Now i've got to this point: ![enter image description here](http://i.stack.imgur.com/rMj0o.png)   What I can't still do is: 1) exclude sections from the multicol environment, i.e. the section 2 should be in the first row, not the second 2) the first subsection of the second column should be horizontally aligned with the first subsection of the first column, i.e. 1.5 should be aligned to 1.1. This is the code, I just added a multicol environment at the end of the `\insertverticalnavigation` definition:               \documentclass{beamer}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{multicol}          \usetheme[hideothersubsections,left,width=1.4cm]{Goettingen}               \makeatletter     \def\insertverticalnavigation#1{%       \vbox{%         \def\sectionentry##1##2##3##4##5{%           \ifnum##5=\c@part%           \def\insertsectionhead{##2}%           \def\insertsectionheadnumber{##1}%           \def\insertpartheadnumber{##5}%           \hbox{{%             \usebeamerfont{section in sidebar}\usebeamercolor[fg]{section in sidebar}%               \hyperlink{Navigation##3}{%               \ifnum\c@section=##1%                 \ifnum\c@subsection=0\relax%                   {\usebeamertemplate{section in sidebar}}%                 \else%                   \ifx\beamer@nav@css\beamer@hidetext%                     {\usebeamertemplate{section in sidebar}}%                   \else%                     {\usebeamertemplate{section in sidebar shaded}}%                   \fi%                 \fi%               \else                 {\usebeamertemplate{section in sidebar shaded}}%               \fi}}}%           \beamer@currentsubsection=0\relax\fi}%         \def\slideentry##1##2##3##4##5##6{}%         \def\beamer@subsectionentry##1##2##3##4##5{%           \ifnum##1=\c@part%           \def\insertpartheadnumber{##1}%           \def\insertsectionheadnumber{##2}%           \def\insertsubsectionheadnumber{##3}%           \def\insertsubsectionhead{##5}%            \beamer@tocifnothide{\ifnum\c@section=##2\ifnum\c@subsection=##3\beamer@nav@css\else\beamer@nav@oss\fi\else\beamer@nav@ooss\fi}%           {\hbox{{%             \usebeamerfont{subsection in sidebar}\usebeamercolor[fg]{subsection in sidebar}%               \hyperlink{Navigation##4}{%               \ifnum\c@section=##2%                 \ifnum\c@subsection=##3%                   \ifnum\c@subsubsection=0\relax%                     {\usebeamertemplate{subsection in sidebar}}%                   \else%                     {\usebeamertemplate{subsection in sidebar shaded}}%                   \fi%                 \else%                   {\usebeamertemplate{subsection in sidebar shaded}}%                 \fi%               \else%                 {\usebeamertemplate{subsection in sidebar shaded}}%               \fi}}}%           }%           \fi}%         \def\beamer@subsubsectionentry##1##2##3##4##5##6{%           \ifnum##1=\c@part%           \def\insertpartheadnumber{##1}%           \def\insertsectionheadnumber{##2}%           \def\insertsubsectionheadnumber{##3}%           \def\insertsubsubsectionheadnumber{##3}%           \def\insertsubsubsectionhead{##6}%           \beamer@tocifnothide{\ifnum\c@section=##2\ifnum\c@subsection=##3\beamer@nav@css\else\beamer@nav@oss\fi\else\beamer@nav@ooss\fi}%           {\hbox{{%             \usebeamerfont{subsubsection in sidebar}\usebeamercolor[fg]{subsubsection in sidebar}%               \hyperlink{Navigation##5}{%               \ifnum\c@section=##2%                 \ifnum\c@subsection=##3%                   \ifnum\c@subsubsection=##4%                     {\usebeamertemplate{subsubsection in sidebar}}%                   \else                     {\usebeamertemplate{subsubsection in sidebar shaded}}%                   \fi%                 \else%                   {\usebeamertemplate{subsubsection in sidebar shaded}}%                 \fi%               \else%                 {\usebeamertemplate{subsubsection in sidebar shaded}}%               \fi}}}%                }%                   \fi}%            \hspace*{0.1em}\parbox[c][1cm][c]{1cm}{              %%%%%%%%%%%%%%%%            \begin{multicols}{2}                                 % multicol     %             \dohead\end{multicols}                               % code         %            }                                                    %%%%%%%%%%%%%%%%       }%     }     \makeatother               \begin{document}       \section{1}       \subsection{1.1}      \frame{test}        \subsection{1.2}      \frame{test}        \subsection{1.3}      \frame{test}        \subsection{1.4}      \frame{test}        \subsection{1.5}      \frame{test}        \subsection{1.6}      \frame{test}        \subsection{1.7}      \frame{test}        \section{2}       \subsection{2.1}      \frame{test}        \subsection{2.2}      \frame{test}      \end{document}


title: PDF Merge of pdfs with differing page size

text: Can a single PDF file, which is the result of a merge, contain pages of different sizes, e.g. A4 and Letter? If so, can you point me to merge tools that preserve page size?


title: \hline initialises first cell

text: \hline initialises the first cell with being empty. This results in having the vertical lines being draw.               \documentclass[12pt]{report}          \usepackage{graphicx} %Used for importing grapics     \usepackage{bookmark} %This will create the digitale bookmarks of the resulting pdf     \usepackage[top=1.25in, bottom=1.5in, left=1in, right=1in]{geometry} % setting the margins of the paper               \newcounter{versionnumber}          \newcommand{\version}[3]{     v.\theversionnumber .0 &     #1 &        % parameter 1     #2 &        % parameter 2     #3 \\       % parameter 3     \hline      %draw line under each version          \stepcounter{versionnumber}     }          \newenvironment{changelist}     { \begin{tabular}{         |  m{0.10\textwidth}        % set static column width         || m{0.28\textwidth}         |  m{0.12\textwidth}         |  m{0.40\textwidth} | }     \hline     \textbf{Version}    &     \textbf{Author}     &     \textbf{Date}       &     \textbf{Change log} \\     \hline      % Draw horizontal line under column titels     & & & \\    % Leave some whitespace     }     { \end{tabular} }               \begin{document}     \setcounter{versionnumber}{1}          \begin{changelist}     \version{A name}{A date}{some explanation}     \end{changelist}          \end{document}      Can someone help me out? I have no idea why the vertical line of the first cell of the second row are being drawn. When giving with a value. This value gets put on the first cell and the same problem occurst with the cell next to it.


title: Exact height of \hbox

text: I have problems controlling the exact height of an `\hbox`; what is wrong with this example?               \documentclass{article}          \newcommand{\mybox}[2]{     \fbox{ \vbox to #1cm{            \vfil\hbox to 1cm {\hfill #2 \hfill}            \vfil}}}          \begin{document}          \renewcommand{\arraycolsep}{-0.1pt}     $$\begin{array}{cc}     \mybox{2}{a} &      \begin{array}[b]{c}     \mybox{1}{b}\\[-0.65pt]     \mybox{1}{c}     \end{array}     \end{array}$$          \end{document}      I expected the total height of the two boxes on the right to be the same as the height of the left box, namely 2cm. However, there seem to be a hidden height which is added. How can I control this? * * * ### Update Thanks for the quick and detailed replies, it helped a lot! However, there is still another problem:               \documentclass{article}     \usepackage{color}     \usepackage{calc}     \newlength\mylenA     \newlength\mylenB               \newcommand{\myarray}[4][t]{         \renewcommand{\arraycolsep}{-#3pt}         \begin{array}[#1]{#2}#4\end{array}}          \newcommand\mybox[4][t]{%         \setlength\mylenA{#3ex-2\fboxrule-2\fboxsep}%         \setlength\mylenB{#3ex-2\fboxrule-2\fboxsep}%         \fcolorbox{black}{#2}{\parbox[#1][\mylenA][c]{\mylenB}{\centering #4}}}          \begin{document}          \[\left(     \myarray{ll}{0.1}{          \myarray{ll}{0.15}{        \mybox{yellow}{4}{A}&\mybox{green}{4}{B}\\[-5.15pt]      & \mybox{blue}{4}{C}     }     & \mybox{red}{8}{D}     }     \right)\]          \end{document}      The left and right brackets are way to large; does anyone see what goes wrong? And, second, is there a more elegant way of setting arraycolsep and the newline               \\[-5.15pt]      automatically to the correct value? I want the boxes to be as close as possible, vertically and horizontally.


title: How to refer to a (La)TeX counter early in the document?

text: I am programmatically typesetting a long document from database contents. For reasons of efficiency, I would like to output all generated LaTeX code as early as possible. I would also like to provide a title page for the report which quotes the number of entries reported _and_ have the title page appear as the first page of the generated pdf. In principle, what I'm doing right now looks roughly like this:               \documentclass[a4paper]{article}     \newcounter{entrycount}     \begin{document}          \stepcounter{entrycount} helo world\par     \stepcounter{entrycount} here are\par     \stepcounter{entrycount} some entries\par     \stepcounter{entrycount} from the database\par          \clearpage\centering          Title          This report lists \theentrycount\ entries.          \end{document}      here I refer to the counter _after_ the rest of the document has been printed out; obviously, in order to make it so that the title page can come first I'd have to (1) use a command that inserts the title page into the front of the other pages (not sure whether that is possible) or (2) somehow refer to the counter's final value _before_ it is available (certainly possible, at least when running LaTeX several times?). I'm aware there are other solutions, including moving the title in the printed stack manually to the top and counting DB entries before outputting any LaTeX code; however, such a simple thing must be possible to do within LaTeX, no? I tried references but didn't hit upon a workable solution so far. **Update** Having looked up the link provided by @Werner, I tried               This report lists \ref{ec} entries.          \section{helo world         }\label{ec} \par     \section{here are           }\label{ec} \par     \section{some entries       }\label{ec} \par     \section{from the database  }\label{ec} \par      which sort of works (never mind the fact the output isn't right—the principle apparently is). But when I do               \stepcounter{entrycount}\label{ec} helo world\par     \stepcounter{entrycount}\label{ec} here are\par     \stepcounter{entrycount}\label{ec} some entries\par     \stepcounter{entrycount}\label{ec} from the database\par      I get nothing but a blank in the output. My guess is I'd have to promote my counter to act specially so it'll get captured by the labels. But how?


title: How to use Multiple-Master-Font-instances for HZ/microtype instead of horizontal scaling? (ConTeXt)

text: # Question I would like to use a **Multiple Master font** with a **width axis** for the **HZ** -program (=Herman Zapf Programm, equivalent to the **microtype** -package of LaTeX) In standard configuration, ConTeXt (and microtype) stretches fonts horizontally to fit into a line. I want ConTeXt not to stretch the font, but to use different font files with different widths, which I provide. **One font file for each width.** What do I have to do to make ConTeXt use my Open Type Fonts instead of stretching? # Multiple Master font for you to test For this first test, I created 21 instances of a multiple master font (Adobe Serif, comes with Adobe Reader for free) with different widths. The instances are called `AdobeSerifMM_400_500.otf` to `AdobeSerifMM_400_700.otf`. The first number in each filename, 400, is the weight, which is constant. The last number is the width, going from 500 (3-7% narrower) over 600 (normal) to 700 (3-7% wider) in +10-steps. I suppose, I am not allowed to share the fonts, but I can share the way to create them:   * find and copy `zy______.*` files from Adobe Reader folder   * create afm-file with `pfm2afm.exe zy______.pfm` from the pfm2afm-package from ctan   * create instances, running width from 500 to 700 `mmpfb --weight=400 --width=600 --precision=0 ZY______.PFB > AdobeSerifMM_400_600.pfb` with LCDF-Typetools (http://www.lcdf.org/type/)   * create empty kerning tables `t1rawafm.exe < AdobeSerifMM_400_600.pfb > AdobeSerifMM_400_600.afm`   * convert these Type1-fonts to OTF-format. I used http://www.freefontconverter.com/. For the future I plan using offline tools like this: http://www.adobe.com/devnet/opentype/afdko/topic_overview.html   * now you have Open Type Font Instances of the same font with different widths FYI: Here are four PDF-files with the four extreme instances of AdobeSerifMM. https://www.dropbox.com/sh/dpi4ok0yl17tchn/4hWB2LwJ9X


title: How to change cleveref references to 'verbal' varioref style?

text: I would like to use **cleveref**'s automatic ref target type recognition but with the more verbal page reference of **varioref**. This is my MWE:               \documentclass{report}     \usepackage{varioref}            %\usepackage{cleveref}     % note cleveref package changes type of ref..                                % and style of references to last/next page     \begin{document}                  % This figure appears on page 1.             \begin{figure}[!htb]               \centering               \rule{24pt}{24pt}               \caption{The famous black square}               \label{OneBlackSquare}             \end{figure}                  % This sentence appears on page 2.             \clearpage             The non-color black is shown in \vref{OneBlackSquare}.          \end{document}      It produces a nice to read verbal reference when using the _varioref_ package: ![varioref verbal description](http://i.stack.imgur.com/beqX0.png) The only thing missing is the automatic target type. Enabling the _cleveref_ package adds this very good feature but also overrides all verbal behavior of _varioref_. Regardless of the space to the target all references are located by page number instead of "on next page". ![cleveref automatic type recognition](http://i.stack.imgur.com/h0A4b.png) But how can I combine them to get:   1. the automatic target type like figure or equation of _cleveref_ and   2. the verbal description of the target's position if it is on the last/next page to improve the reader's flow? * * * **Edit after a week:** I received no solution proposal and both documentation do not solve my problem. Hence I stick with varioref and write the type of floating object hard coded in the text.


title: Draw molecule structure with torsion angles in TikZ

text: I am trying to reproduce this figure in LaTeX: ![Torsion angles](http://i.stack.imgur.com/3sqT7.png) The packages that I have seen for annotating chemical structures do not seem to accomplish what I want (not to mention that my knowledge on chemical notation has vanished long time ago). So, any hint on how to perform this with TikZ/Asymptote/similar package?


title: Installing TeX Live 2013 on Linux

text: I have installed TeX Live 2013 full install on a Linux Mint installation (so it is Ubuntu, basically). Now, I cannot use `beamer` or most packages, because all my editors like Gummi seek the 2012 path. On Windows I use TeX Live 2013 with Texworks without issue. **What is the correct way step by step to get a working TeX Live 2013 installation on Linux**? What I have done (perhaps it is wrong, yes?):   1. Insert DVD   2. Open DVD folder in terminal   3. `sudo ./install-tl`   4. Enter password   5. `I`   6. `Enter` [it installs] But I cannot use most packages and cannot install Gedit LaTeX plugin because it says I have broken packages. `Synaptic` package manager says I have TeX Live 2012 installed, which is wrong. EDIT: after trying various things, I am not sure how to proceed. Did I need to set different install directories (different from default) when installing? If so, I do not know how to change my TeX editor to look for everything in those directories. (I am not a master in Linux Mint.) What worked for people here, if they have TeXLive2013 on linux? If there is an easier way to with certainty get TexLive2013 working with correct install method with Gummi or gedit TeX plugin as editor, how can I unfully install my current TeXlive2013 so I can reinstall it correctly?


title: Why each section is shown in one page rather than in the same page when I use \onecolumn?

text: I don't know why each section is shown in one separate page when I use \onecolumn rather that the normal (two columns) format.               \onecolumn     \section{Goals}      some text


title: Content messed up when removing two lines

text: after wanting to change my report from B5 format to A4 format I did some slight modifications in the standard .sty file (from my university). All in all a nice result in A4 format. However, my only problem seems to be that my content suddenly appears as this: ![Content](http://i.stack.imgur.com/nWOmd.jpg) This is caused by this piece of code in the .sty file:               \addtolength{\parskip}{\baselineskip}     \setlength{\parindent}{0pt}      Unfortunately I am not an expert in LaTeX but I was hopeing you would be able to help get my content back on track such that I can enjoy the A4 format. Regards


title: Beamer: Using sans serif numbers in math mode together with LuaLaTeX and the fontspec package

text: This is a follow up on my last question. I want to produce a `beamer` presentation using the font `Helvetica Neue`. I am using this MWE:               \documentclass[]{beamer}          \usepackage{fontspec}     \setsansfont[       BoldFont=HelveticaNeueLTCom-Md,       ItalicFont=HelveticaNeueLTCom-LtIt,        SmallCapsFont=TeXGyre Heros,       SmallCapsFeatures={Letters=SmallCaps},     ]{HelveticaNeueLTCom-Lt}          \begin{document}          \begin{frame}{Test 1 2 3}          \begin{itemize}     \item \textit{italic}     \item \textbf{bold}     \item normal     \item numbers: 1, 2, 3 and 4     \item math     \begin{align}     a^2 + b^2 &= c^\text{2} \text{ (used \texttt{\textbackslash text} to produce sans serif 2 for $c$)}\\     \alpha^2 + \beta^2 &= \gamma^2     \end{align}     \item \textsc{SmallCaps}     \item Dash -- Dash     \end{itemize}          \end{frame}          \end{document}      With the following result: ![enter image description here](http://i.stack.imgur.com/Z6ksv.png)   1. How do I change the font with is used for numbers in math mode? I can use `\text` all the time but this is not a clever solution.   2. Is the code ok that way? I didn't use the `\usefonttheme{professionalfonts}` beamer command because I think this is not useful in my case.   3. The dash `\--` does not work. How can that be fixed?   4. The SmallCaps font look too thick in combination with the thin main font. Has anybody a suggestion for a better SmallCaps replacement? I looked here http://www.gust.org.pl/projects/e-foundry/tex-gyre/ and it also says that  > TeX Gyre Heros can be used as a replacement for a popular font Helvetica * * * **Update** Following Mico's advice leads to missing greek letters such like `\alpha` and `\beta`. I removed the `greek` and `Greek` option but the letters are still missing:               \setmathfont[range=\mathup/{latin,Latin,num}]{HelveticaNeueLTCom-Th}     \setmathfont[range=\mathit/{latin,Latin,num}]{HelveticaNeueLTCom-ThIt}     \setmathfont[range=\mathbfup/{latin,Latin,num}]{HelveticaNeueLTCom-Roman}     \setmathfont[range=\mathbfit/{latin,Latin,num}]{HelveticaNeueLTCom-It}      ![enter image description here](http://i.stack.imgur.com/agjlE.png) The warnings in the log file look like:               *************************************************     * fontspec warning: "icu-feature-not-exist-in-font"     *      * OpenType feature 'Style=MathScript' (+ssty) not available for font     * 'HelveticaNeueLTCom-ThIt' with script 'Math' and language 'Default'.     *************************************************     luaotfload: font no 25 (HelveticaNeueLTCom-ThIt) does not define feature ssty fo     r script latn with language dflt     luaotfload: no font with id 25     *************************************************     * fontspec warning: "icu-feature-not-exist-in-font"     *      * OpenType feature 'Style=MathScriptScript' (+ssty) not available for font     * 'HelveticaNeueLTCom-ThIt' with script 'Math' and language 'Default'.     *************************************************      Using `\usefonttheme{professionalfonts}` or not does not have an effect on the output (as far as I can see).


title: Bracket problem with \newtheorem

text: \documentclass[a4paper, 11pt, notitlepage]{report}     \usepackage{amsthm}     \theoremstyle{plain}     \newtheorem{thm}{Theorem}[section] % reset theorem numbering for each chapter     \theoremstyle{definition}     \newtheorem{props}[thm]{Proposition}          \begin{document}     \begin{props} [[1], p. 180]     \end{props}     \end{document}      The result would be: > Proposition 0.0.1 ([1). , p. 180] How do I make it like this: > Proposition 0.0.1 ([1], p. 180) I'm using TeXStudio with XeLaTeX.


title: export Tikz figures to PDF

text: I am in the process of writing my master thesis and i am using Tikz to generate few graphs. Unfortunately, the input file for the graphs are not so small, so i already faced the problem that space limitation (solved). Nevertheless, it will take a long time to generate those plots. My question is whether it is possible to save the generated Tikz figures into a file and to load the file instead? Since the problem is always that the labels do not have the right font size… PS. I am using scrbook and pdflatex, I would have no problem to change to something else if it will solve my problem.


title: mdframed font option is not working

text: Although the `mdframed` manual (v1.3a) mentions the general option `font`, it is not being obeyed, as can be verified with the test document below.               \documentclass{standalone}     \usepackage{mdframed}     \usepackage{lipsum}          \begin{document}          \begin{mdframed}[font=\sffamily\slshape]       \lipsum[88]     \end{mdframed}          \end{document}      The typeset document looks like the following: ![test document](http://i.stack.imgur.com/KfBH8.png) Notice how the body of the `mdframed` environment is not typeset in a sans serif slanted font, as requested in the source document. Is this a bug with `mdframed`?


title: Problem importing Octave Plot using TiKZ - pgfkeys Error on gpcolor

text: I am trying to include a set of Octave generated plots in a report, however I am constantly receiving the same error from pgf about it not recognizing \gpcolor A MWE would be               \documentclass{article}          \usepackage{pgf}     \usepackage{pgfplots}     %\usepackage{tikz}     \usepackage{gnuplot-lua-tikz}          \begin{document}          \begin{tikzpicture}[gnuplot]     \gpcolor{gp lt color border}     \end{tikzpicture}          \end{document}      While this doesn't do anything in particular, it still produces the same error which is:               Package pgfkeys Error: I do not know the key '/tikz/global gp lt color border      This is even happening with other documents which have worked fine previously. I'm using Debian Jessie, with the texlive-full package installed, along with texstudio


title: beamer doesn't compile

text: This is a LyX question... I updated my LyX to the latest 2.1.0 and since then it does not compile the PDF file when I use `beamer` (other files it compiles fine). I get the following error message:               !pdfTeX error: pdflatex (file mathkerncmssi8): Font mathkerncmssi8 at 600 not found      I tried to re-install LyX with the complete MiKTeX environment (bundle) and it still doesn't work. i updated MiKTeX too and still doesn't work. I would be very grateful for any help. Please note that I am a complete anti- tech, I know nothing about LaTeX (hence LyX!), so please write your answer accordingly.


title: Making the "Part 1" disappear in \part format

text: I am making a bank of exercises for a course. To do this, I use the exam class, which uses the same sectioning as the article class. To do this, I have a separate .tex files with the questions, inside sections, subsections that uses the exam class format. The main .tex file consists only of a \Part{Questions} \input{questions.tex} and a \Part{Answers} \input{questions.tex}. When the \part is printed, it gives the following: **Part I** **Questions** I would like to remove the Part 1 header. @Werner has a solution in this question, where the report class had been used. Using is solution seems to work, but LaTeX gives me a undefined control sequence for each \part I have. Here is a MWE without Werner's solution               \documentclass[12pt]{exam}     \usepackage{lmodern}     \usepackage[T1]{fontenc}         \usepackage[utf8]{inputenc}          \usepackage{amsfonts,amsmath,amssymb,amsthm,mathrsfs}      \usepackage{sectsty}     \pagestyle{headandfoot}     \firstpageheadrule     \firstpageheader{Probabilités}{}{MAT-1720}                                  \firstpagefooter{}{}{\thepage}     \firstpagefootrule     \runningheadrule     \runningheader{Probabilités}{}{MAT-1720}       \runningfooter{Nom du professeur}{}{\thepage}     \runningfootrule     \title{Banque d'exercices pour MAT-1720}     \author{Nom du professeur - Institut}     \date{Automne 2014}     \begin{document}     \maketitle     \thispagestyle{headandfoot}     \tableofcontents     \newpage     \part{Questions}     \noprintanswers     \begin{questions}     \newcounter{NombredeQ}     \setcounter{NombredeQ}{1}     \newcounter{NombredeR}     \setcounter{NombredeR}{1}     \section{ Dénombrement  }     \subsection{Principes de dénombrement}     \question \ifthenelse{\boolean{printanswers}}{\label{R:\theNombredeR}}{\label{Q:\thequestion}}  Ceci est une question test. Quel est le sigle du cours probabilités à l'UdeM?      \\\ifthenelse{\boolean{printanswers}}{\textbf{Retour à la question \ref{Q:\theNombredeQ}.}\stepcounter{NombredeQ} \stepcounter{NombredeR}}{\textbf{Voir la \hyperref[R:\thequestion]{solution} à la question.  }}     \begin{solution}     Le sigle est MAT-1720.     \end{solution}     \subsection{Permutations et Combinaisons}     \question \ifthenelse{\boolean{printanswers}}{\label{R:\theNombredeR}}{\label{Q:\thequestion}}      Ceci est une autre question test. Quel est le nom du cours qui a pour sigle MAT-1720 à L'UdeM?      \\\ifthenelse{\boolean{printanswers}}{\textbf{Retour à la question \ref{Q:\theNombredeQ}.}\stepcounter{NombredeQ} \stepcounter{NombredeR}}{\textbf{Voir la \hyperref[R:\thequestion]{solution} à la question. }}     \begin{solution}     Le cours est probabilité.     \end{solution}     \newpage     \part{Solutions}     \qformat{\shadowbox{\textbf{Solution à l'exercice} \theNombredeQ}  \hfill}     \printanswers     \section{ Dénombrement  }     \subsection{Principes de dénombrement}     \question \ifthenelse{\boolean{printanswers}}{\label{R:\theNombredeR}}{\label{Q:\thequestion}}  Ceci est une question test. Quel est le sigle du cours probabilités à l'UdeM?      \\\ifthenelse{\boolean{printanswers}}{\textbf{Retour à la question \ref{Q:\theNombredeQ}.}\stepcounter{NombredeQ} \stepcounter{NombredeR}}{\textbf{Voir la \hyperref[R:\thequestion]{solution} à la question.  }}     \begin{solution}     Le sigle est MAT-1720.     \end{solution}     \subsection{Permutations et Combinaisons}     \question \ifthenelse{\boolean{printanswers}}{\label{R:\theNombredeR}}{\label{Q:\thequestion}}      Ceci est une autre question test. Quel est le nom du cours qui a pour sigle MAT-1720 à L'UdeM?      \\\ifthenelse{\boolean{printanswers}}{\textbf{Retour à la question \ref{Q:\theNombredeQ}.}\stepcounter{NombredeQ} \stepcounter{NombredeR}}{\textbf{Voir la \hyperref[R:\thequestion]{solution} à la question. }}     \begin{solution}     Le cours est probabilité.     \end{solution}     \end{questions}     \end{document}      And now the same code with Werner's code               \documentclass[12pt]{exam}     \usepackage{lmodern}     \usepackage[T1]{fontenc}         \usepackage[utf8]{inputenc}          %\usepackage[francais]{babel}     \usepackage{amsfonts,amsmath,amssymb,amsthm,mathrsfs}      \usepackage{sectsty}     \usepackage{hyperref}      \makeatletter     \def\@part[#1]#2{%         \ifnum \c@secnumdepth >-2\relax           \refstepcounter{part}%           \addcontentsline{toc}{part}{#1}%         \else           \addcontentsline{toc}{part}{#1}%         \fi         \markboth{}{}%         {\centering          \interlinepenalty \@M          \normalfont          \Huge \bfseries  #2\par}%         \@endpart}     \makeatother     \pagestyle{headandfoot}     \firstpageheadrule     \firstpageheader{Probabilités}{}{MAT-1720}                                  \firstpagefooter{}{}{\thepage}     \firstpagefootrule     \runningheadrule     \runningheader{Probabilités}{}{MAT-1720}       \runningfooter{Nom du professeur}{}{\thepage}     \runningfootrule     \title{Banque d'exercices pour MAT-1720}     \author{Nom du professeur - Institut}     \date{Automne 2014}     \begin{document}     \maketitle     \thispagestyle{headandfoot}     \tableofcontents     \newpage     \part{Questions}     \noprintanswers     \begin{questions}     \newcounter{NombredeQ}     \setcounter{NombredeQ}{1}     \newcounter{NombredeR}     \setcounter{NombredeR}{1}     \section{ Dénombrement  }     \subsection{Principes de dénombrement}     \question \ifthenelse{\boolean{printanswers}}{\label{R:\theNombredeR}}{\label{Q:\thequestion}}  Ceci est une question test. Quel est le sigle du cours probabilités à l'UdeM?      \\\ifthenelse{\boolean{printanswers}}{\textbf{Retour à la question \ref{Q:\theNombredeQ}.}\stepcounter{NombredeQ} \stepcounter{NombredeR}}{\textbf{Voir la \hyperref[R:\thequestion]{solution} à la question.  }}     \begin{solution}     Le sigle est MAT-1720.     \end{solution}     \subsection{Permutations et Combinaisons}     \question \ifthenelse{\boolean{printanswers}}{\label{R:\theNombredeR}}{\label{Q:\thequestion}}      Ceci est une autre question test. Quel est le nom du cours qui a pour sigle MAT-1720 à L'UdeM?      \\\ifthenelse{\boolean{printanswers}}{\textbf{Retour à la question \ref{Q:\theNombredeQ}.}\stepcounter{NombredeQ} \stepcounter{NombredeR}}{\textbf{Voir la \hyperref[R:\thequestion]{solution} à la question. }}     \begin{solution}     Le cours est probabilité.     \end{solution}     \newpage     \part{Solutions}     \printanswers     \section{ Dénombrement  }     \subsection{Principes de dénombrement}     \question \ifthenelse{\boolean{printanswers}}{\label{R:\theNombredeR}}{\label{Q:\thequestion}}  Ceci est une question test. Quel est le sigle du cours probabilités à l'UdeM?      \\\ifthenelse{\boolean{printanswers}}{\textbf{Retour à la question \ref{Q:\theNombredeQ}.}\stepcounter{NombredeQ} \stepcounter{NombredeR}}{\textbf{Voir la \hyperref[R:\thequestion]{solution} à la question.  }}     \begin{solution}     Le sigle est MAT-1720.     \end{solution}     \subsection{Permutations et Combinaisons}     \question \ifthenelse{\boolean{printanswers}}{\label{R:\theNombredeR}}{\label{Q:\thequestion}}      Ceci est une autre question test. Quel est le nom du cours qui a pour sigle MAT-1720 à L'UdeM?      \\\ifthenelse{\boolean{printanswers}}{\textbf{Retour à la question \ref{Q:\theNombredeQ}.}\stepcounter{NombredeQ} \stepcounter{NombredeR}}{\textbf{Voir la \hyperref[R:\thequestion]{solution} à la question. }}     \begin{solution}     Le cours est probabilité.     \end{solution}     \end{questions}     \end{document}      It gives the intended results, but leaves an error.


title: Evaluate typographical beauty of a document (widow, orphans, hyphens, etc) in order to optimize the page geometry

text: When finalizing documents, one of the last things I do is usually to play with the page geometry to improve the overall layout: get rid of a few orphans or widows, reduce the number of hyphenations, etc. I usually start by designing my documents with an acceptable or imposed/suggested page geometry, say               \usepackage[scale=0.75]{geometry}      but more often than not (if not always), I can actually replace that `0.75` (as an example) by anything in between `0.73` and `0.77` (because even when the page geometry is supposedly "mandatory", most people won't notice the difference...). My process so far is however manual, tedious and quite subjective, basically trying out different `scale` options and picking the one most pleasing to my eye... A better process would be to have TeX output a few typographical indicators or, better, a global "badness" indicator for the whole document, and then use a small script to optimize the `scale` factor based on this. So here are my few related questions:   1. a) Is it possible to have TeX output such typographic quality indicators such as:     * The number of widows,     * The number of orphans,     * The number of hyphens,     * The standard and maximum inter-word spacing,     * The number of lines with inter-word spacing greater than twice the standard value, and     * Any other relevant typographic quality indicator you believe is useful? (I am assuming cardinal sins like overfull boxes have been dealt with in all cases). b) For widows, orphans, hyphens and similar relevant grave sins, would it be possible to modify TeX's output routine to identify where they happen? Either directly inside the document, as a _Warning_ in the log, or both at choice (as happens for over- and under-full `hbox`s).   2. Is it possible to get TeX to output a global quality / badness indicator for the whole document? I know TeX works with a system of penalties internally; is it possible to output the penalty total for the whole document, and would that be an appropriate metric for my optimization desire? (Note: the answer does not have to work on every engine; in particular, Lua code is perfectly acceptable as I guess the question draws to some of the stated objectives of `luatex` to _"open up the internals of TeX"_ )


title: Vertical bar appearing except on top of page

text: I want a command `\shybar` which prints a `\textbar` _except_ if it would be the first character on the page. In this case, it should do nothing. Because of this question, I tried the following code:               \documentclass{memoir}          \newcommand*\shybar{\leaders{\mbox\textbar}}          \begin{document}     \shybar This bar should not be printed, but \shybar this one should.     \end{document}      I inserted an `\mbox` because `\leaders` asked for a box. Anyway, it did not work; it still asks for boxes. How can I solve this problem?


title: Pascal's triangle in tikz

text: I would like to typeset the top part of Pascal's triangle. To get the triangle with the names of the binomial coefficients, i.e., `{n \choose k}`, I used the following code               \begin{tikzpicture}     \foreach \n in {0,...,4} {       \foreach \k in {0,...,\n} {         \node at (\k-\n/2,-\n) {${\n \choose \k}$};       }     }     \end{tikzpicture}      The result is this ![enter image description here](http://i.stack.imgur.com/5Xbge.png) Now I want to be equally lazy and do something like this for the values of the binomial coefficients, i.e., replace `{\n \choose \k}` in the node label with `\CalculateBinomialCoefficient{\n}{\k}` where `\CalculateBinomialCoefficient` is a hypothetical macro that calculates the binomial coefficient. Has anyone done something like that? The result should look like this: ![enter image description here](http://i.stack.imgur.com/P0qWM.png)


title: Pascal's triangle in LaTeX, with pointing arrows

text: > **Possible Duplicate:**   >  Pascal's triangle in tikz I tried making this in a tabular, and it sort of worked. But I was not able to insert any arrows. Is there any simple way to make the image below in LaTeX? I.e., to make a version of Pascal's triangle in LaTeX, with arrows showing how the next row is made ![Example of Pascal's triangle, desired output](http://i.imgur.com/jJ97V.png)


title: Pascal's triangle style

text: > How to create Pascal's triangle like this: ![enter image description here](http://i.stack.imgur.com/bncVg.png)


> **Possible Duplicate:**   >  Pascal's triangle in tikz How can i write the code of Pascal's triangle? Pleae help me.Thank you.


title: How can I draw a different version of Pascal's triangle?

text: > **Possible Duplicate:**   >  Pascal’s triangle in tikz I know that, at Pascal's triangle in tikz, we have discussed about the code of the pascal's triangle. Please, help me to get the following way of visualizing the Pascal triangle. ![enter image description here](http://i.stack.imgur.com/XhchI.gif)


title: Overfull hbox in a custom section title

text: I use custom section headings, which for long titles occasionally create an overfull \hbox. Explicit hyphenation does not help. Per this answer I insert `\\\` to break the section title, but then the first line is not justified and what is worse, the corresponding TOC entry also includes the line break. Is there a better way to address this issue? Here is the example:               \documentclass{memoir}     \usepackage[margin=20mm]{geometry}     \usepackage{lipsum}     \usepackage{fourier}     \usepackage[explicit]{titlesec}          \makeatletter     \define@key{mosquito}{subtitle}{\def\mosquito@subtitle{#1}}     \newcommand\sectionsubtitlefont{\normalfont\huge}          \titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{-5pt plus 5pt}          \titleformat{\section}       { \rmfamily \scshape}{}{0em}{{%       % subtitle       \ifx\mosquito@subtitle\@empty\else     {\sectionsubtitlefont\mosquito@subtitle}     \vskip\medskipamount     \leaders\vrule width \textwidth\vskip0.4pt     \vskip\medskipamount     \nointerlineskip       \fi       % title       {\HUGE\bfseries{\MakeTextUppercase{#1}}}       \ifx\mosquito@subtitle\@empty         \vskip\medskipamount     \leaders\vrule width \textwidth\vskip0.4pt       \vskip\medskipamount     \nointerlineskip     \else     \vspace{0.15in}       \fi     }%       }     \newcommand{\Section}[1][]{%       \setkeys{mosquito}{subtitle={},#1}%       \section}     \makeatother          \setsecnumdepth{book}          \begin{document}     \tableofcontents     \vspace{0.4in}          \Section{This is a very long title, whose string overflows (v1)}     \lipsum[4]          \vspace{0.2in}     \Section[subtitle={This is a subtitle}]{This is a very long title, whose string overflows (v2)}     \lipsum[4]          \vspace{0.2in}     \Section{This is a very long title, whose\\ string overflows (v3)}     \lipsum[4]          \end{document}      ![enter image description here](http://i.stack.imgur.com/HZS7y.png)


title: All lines itemized when mark is active

text: In AUCTeX I would like the behaviour of `LaTeX-environment` and/or `LaTeX- insert-item` to create multiple items for _every_ line when called with mark active.


title: Forcing a new line after an enumerated list

text: I've got a bit of a silly problem. Here is a picture: ![enter image description here](http://i.stack.imgur.com/ESl9E.png) All I want is to have the "Of these two solutions to not have an indent, (I've got no idea why latex does this). I generally fix the problem by using `\\\` to start a new line. Unfortunately I keep getting the following error: ![enter image description here](http://i.stack.imgur.com/4CmL6.png) Here is the code:               \begin{enumerate}     \item The first solution would be to find the solution to the first minimization problem mentioned in the subsection Situation 1 and then given the $\theta$ matrix calculated there, use that matrix for the minimization problem found in Subsection 2.     \item The second solution is to perform the two minimization problems concurrently. i.e perform the minimization for both $\theta$ and $X$.      \end{enumerate}     \\     Of these two solutions, the solution mentioned in the second point is the most optimal one.      Seriously have a) No idea why is complaining and b) how to fix it. Anyone please help!


title: Acronym package and UTF-8

text: Are there support of UTF-8? I'm trying to write `\ac{ОС}` (Russian acronym inside) but got strange error               Missing \endcsname inserted      Here is what in my header:               \usepackage[english,russian]{babel}     \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[footnote,printonlyused,withpage]{acronym}      Here is a full example (UTF-8 encoding): http://pastebin.com/TGdwxEBX


title: TeXmaker and polish letters

text: I have a problem with encoding polish letters in TeXmaker. What I mean by this is that:   * when I write Polish letters in TeXmaker they are visible as Polish letters: ą, ę, ć and so on    * yet after compilation what I get in dvi or pdf are just question marks    * similarly, If I open tex file written in TeXmaker and containing polish letters in WinEdt, what I get are question marks as well    * if I produce a file containing polish letters in TeXmaker, close it and re-open in TeXmaker -- again question marks  I know there must be some problem with encoding, yet I have no idea how to solve it. > The question has been marked as duplicate, however the original answer which > was pointed to me does not concern the problem of polish signs in TeXmaker > and in a source file. `texenthusiast's` answer below helped me to solve that > problem as well.


title: How to get APS BibTeX style file to work

text: I just started to use BibTeX and have found it amazingly convenient. So far I have tried to use the style file `h-physrev.bst` from arXiv, and copied the BibTeX information directly from the site of inspire. It works well since it produced the closest reference style that I wanted. However, I still am facing two problems:   1. The field `archiveprefix` was not handled correctly, I have to manually add arXiv to the field eprint to have the proper output, eg, `arXiv:1001.1001`.   2. In fact, sometimes I don't want to display the `eprint` field. Since I knew very little about BibTeX so I was really confused by looking at the content of the the bst file. It seems to take an expert to the modify it in order to achieve what I wanted above. On the other hand, I understood that RevTeX provides certain BibTeX style files that suit the corresponding journals. So I downloaded the RevTeX package, from it I found several style files and used `aipauth4-1.bst` in the place of `h-physrev.bst`. However, I get some really strange results. I tried to use MiKTeX in windows (and also TeXLive in linux, the later compiles well when I used `h-physrev.bst`), but it doesn't work as desired, I got some uninterpreted TeX markup in the reference section of the resulting `.dvi`/`.pdf` file. To sum up my configurations:   1. MiKTeX in Windows   2. BibTeX style file aipauth4-1.bst   3. BibTeX information are directly from the inspire site   4. I used the following in my LaTeX file head section:  `\documentclass[secnumarabic, graphics,floatfix, nofootinbib,tightenlines,nobibnotes, aps, prl, 12pt]{revtex4}`   5. I use the following to call invoke the BibTeX style file `\bibliographystyle{h-physrev}` I would like to know how to get the style file `aipauth4-1.bst` to work?


title: Lines and circles are not visible. Why not?

text: I'm running TeXworks and MikTeX on Microsoft Windows and within a document I have the code you see below. Compiling results in a pdf file in which I can see the text within this picture but I can't see the line or the circles. Nonetheless when I print it the line and the circles are there. Is there something I can do differently to make the line and the circles visible?               \setlength{\unitlength}{0.66mm}          \begin{picture}(100,100)(0,0)          \label{picture of bitangent plane}          \put(40,50){\circle{60}}      % left big circle          \put(140,50){\circle{60}}     % right big circle          \put(122,74){\circle*{2}}     % dot at e^{i\theta} on right circle          \put(122,26){\circle*{2}}     % dot at e^{-i\theta} on right circle          \put(58,26){\circle*{2}}      % dot at e^{-i\theta} on left circle          \put(70,50){\circle*{2}}      % dot at -1 on left circle          \put(38,11){\line(4,3){104}}  % line          \put(140,80){\circle*{2}}     % dot at i on right circle          \put(140,20){\circle*{2}}     % dot at -i on right circle          \put(170,50){\circle*{2}}     % dot at 1 on right circle          \put(110,50){\circle*{2}}     % dot at -1 on right circle          \put(10,50){\circle*{2}}      % dot at 1 on left circle          \put(40,80){\circle*{2}}      % dot at i on left circle          \put(40,20){\circle*{2}}      % dot at -i on left circle          \put(58,74){\circle*{2}}      % dot at e^{i\theta} on left circle          \put(116,76){$e^{i\theta}$}   % right          \put(115,19){$e^{-i\theta}$}  % right          \put(62,76){$e^{i\theta}$}          \put(59,19){$e^{-i\theta}$}   % left          \put(173,49){$1$}  \put(5,49){$1$}          \put(101,49){$-1$} \put(72,49){$-1$}          \put(140,83){$i$}  \put(40,83){$i$}          \put(137,14){$-i$} \put(35,14){$-i$}          \put(70,5){\text{The bitangent plane.}}          \end{picture}


title: Using acmsmall document class,

text: Using `acmsmall` document class, below is the minimal working example (you need `acmsmall.cls` in the folder):               \documentclass[prodmode,acmtkdd]{acmsmall}            \markboth{Jenkinson et al.}{Optimal Search for Data Patterns}            \title{Optimal Search for Data Patterns\thanks{This work       was supported by Marine Institute and by European Union       under Grant No. 3000.}}            \author{ABRAM JENKINSON and CHRISTIAN ANDERSON       \affil{University of Great Britain}}            \acmformat{Abram Jenkinson and Christian Anderson. 2014.       Optimal Search for Data Patterns}          \begin{document}       \maketitle     \end{document}      The text in `\thanks` does not appear anywhere, but the small `1` appears like if it would be "..Data Patterns1". How to make it appear?


title: How to vertically align the captions for sub figures in subfigure?

text: This is my tikz code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes,shapes.geometric,arrows,fit,calc,positioning,automata,}     \usepackage{amsmath}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}          \begin{figure}[t]     \centering     \begin{subfigure}{.5\textwidth}       \centering       \begin{tikzpicture}[shorten >=1pt,auto,node distance=5 cm, scale = 0.4, transform shape]     \tikzstyle{int}=[draw, minimum size=4em]     \tikzset{every edge/.append style={font=\Large}}     \tikzset{every node/.append style={font=\Large}}            \node[initial,state] (A)                                  {$q_0$};       \node[state]         (B) [right of=A]                 {$q_1$};       \node[state]         (C) [right of=B,node distance = 8 cm]        {$q_2$};       \coordinate [right=4cm of B] (b1) {};       \node[state]         (D) [below of =b1,node distance = 5 cm]              {$q_3$};       \node[state]         (E) [below  of=C,node distance = 10 cm]                  {$q_5$};       \node[state]         (F) [below  of=B,node distance = 10 cm]                  {$q_4$};       \node[int]           (G) [left of=F]                  {Sender for seq. no. $1$};            \path[->] (A) edge [above]        node [align=center]         {$+ \rightarrow$ \\ $[x = 0]$} (B)             (B) edge [loop above]   node [align=center]             {$0 \rightarrow$ \\ $[x = x.1]$ }   (B)             edge [bend right,above] node [align=center]         {$1 \rightarrow$ \\ $[x = x.1]$ }   (C)             edge [left]         node [align=center]         {$\$  \rightarrow$ \\  $[x = x.0.\mathbf 0.\#]$ } (D)         (C) edge [loop above]       node [align=center]         {$0 \rightarrow$ \\ $[x = x.0]$ }   (C)                 edge [bend right,right]     node [above,align=center]       {$1 \rightarrow$ \\ $[x = x.0]$}   (B)             edge [above]            node [pos=0.6,align=center]         {$\$ \rightarrow$\\ $[x = x.1.\mathbf 1.\#]$ } (D)         (D) edge [bend left,right]  node [pos=0.25,align=center]            {$0 \rightarrow$ \\ $[x = x.0]$} (E)             edge [bend left,right]  node [pos=0.85,align=center]        {$1 \rightarrow$ \\ $[x = x.1]$} (F)         (E) edge [bend left,above]  node [pos=0.45,align=center]        {$0,1 \rightarrow$ \\ $[w = w.3.\#.1.\$]$} (D)         (F) edge [bend left,left]   node [pos=0.5,align=center]     {$0 \rightarrow$ \\ $[w = w.2.\#.3.\$]$} (D)             edge [above]        node [align=center]         {$1 \rightarrow$ \\ $\begin{bmatrix} w = w.y\\x = \epsilon \end{bmatrix}$} (G)         (G) edge [right]        node [align=center]         {${ack}_{0} \rightarrow$ \\ $\begin{bmatrix} w = w.s\\x = x \end{bmatrix}$} (A);                    \end{tikzpicture}       \caption{fig 1}       \label{fig:1}     \end{subfigure}%     \begin{subfigure}{.5\textwidth}       \centering       \begin{tikzpicture}[shorten >=1pt,auto,node distance=5.5 cm, scale = 0.4, transform shape]     \tikzset{every edge/.append style={font=\Large}}     \tikzset{every node/.append style={font=\Large}}     %  \tikzstyle{every state}=[fill=white,draw=none,text=black]       \node[initial,state] (E)                  {$r_0$};       \node[state]         (A) [below left of=E]            {$r_1$};       \node[state]         (B) [below right of=E]           {$r_2$};       \node[state]         (C) [below of=A]             {$r_3$};       \node[state]         (D) [below of=B]             {$r_4$};                 \path[->] (E) edge  [left]        node [pos = 0.3,align=center]           {$0 \rightarrow$\\$[y = y.1]$} (A)             (E) edge  [right]       node [pos = 0.3,align=center]           {$1 \rightarrow$\\$[y = y.0]$} (B)             (A) edge  [loop left]   node [align=center]         {$0 \rightarrow$\\$[y = y.2]$} (A)             (A) edge  [bend left, above]    node [align=center]     {$1 \rightarrow$\\$[y = y.3]$} (B)             (A) edge  [bend right, left]    node [align=center]     {$\# \rightarrow$\\$[y = y.0]$} (C)             (B) edge  [loop right]  node [align=center]         {$0 \rightarrow$\\$[y = y.2]$} (B)             (B) edge  [bend left, above]    node [align=center]         {$1 \rightarrow$\\$[y = y.3]$} (A)             (B) edge  [bend left, right]    node [pos = 0.5,align=center]       {$\# \rightarrow$\\$[y = 2]$} (D)             (C) edge  [loop left]   node [align=center]         {$0 \rightarrow$\\$[y = 3]$} (C)             (C) edge  [bend left, below]    node [align=center]         {$1 \rightarrow$\\$[y = 2]$} (D)             (C) edge  [right]   node [pos = 0.25,align=center]      {$\$ \rightarrow$\\$\begin{bmatrix} y = 3\\z = z.x.\$\end{bmatrix}$} (E)             (D) edge  [loop right]  node [align=center]         {$0 \rightarrow$\\$[y = 4]$} (D)             (D) edge  [bend left, below]    node [align=center]         {$1 \rightarrow [y = 5]$} (C)             (D) edge  [left]    node [pos = 0.25,align=center]      {$\$ \rightarrow$\\$\begin{bmatrix}y = \epsilon\\ z = 3\end{bmatrix}$} (E) ;     \end{tikzpicture}       \caption{fig 2}       \label{fig:1}     \end{subfigure}     \caption{Figure}     \label{fig:modeling}     \end{figure}                    \end{document}      This is the output: ![enter image description here](http://i.stack.imgur.com/dzN2T.png) I have some questions:   1. How to vertically align the captions `fig1` and `fig2`?   2. The figure looks too dense. Any suggestions on making it more (ans easily) readable? I don't have extra space, so I have to put them side by side.   3. The format doesn't support `subcaption` package, as it gives a warning on compilation. Any alternative for that? But I want it to be one figure. I can't use `minipage` as it makes it two independent figures. I don't want that. I want one figure with two subfigures (a) and (b).


title: Table: Can I shift a column by half the height of a row?

text: This question is best explained by giving the usecase: I have a table where I list some data and I would like to add a column to the right which gives the ratio of two adjacent rows. Now to make it more obvious the ratio of which rows this is I would like to shift the column which the ratios by half the height of a row so that each of the ratio values sits to the right of the two columns which it was calculated from. E.g. instead of this                A    ratio     ------------      3      2      6      3     18      imagine the same table but the numbers in the right column shifted down by half a row. Is this even possible?


title: Is it possible to collect hyperref's \hypersetup argument?

text: Suppose you want to set, in a `.sty` or `.cls` file, some `hyperref`'s options in case the end user loads this package. Because that's only at the begin of the document you know if `hyperref` has been loaded, you have to use something like:               \AtBeginDocument{%       \@ifpackageloaded{hyperref}{%         \hypersetup{%           ⟨my advised hyperref's options⟩%         }%       }{%       }%     }%      This has already been discussed in use hypersetup in own package. But a drawback of this method is that if the end user has different tastes and inserts `\hypersetup{⟨another hyperref's options⟩}` in its preamble, the `\AtBeginDocument{\hypersetup{...}}` from the `.sty` or `.cls` file will overwrite his setup. In order to circumvent this problem, the end user may specify its own `\hypersetup` choices not in the preamble but in the document's body. But suppose you'd like to not distract the end users with such complication, would it be possible to collect hyperref's `\hypersetup` argument? The idea is to get, at the begin of the document, the possible options that have been specified either at the `\usepackage` level (this is easy with `\@ifpackagewith` macro) or as `\hypersetup` argument, and not overwrite them.


title: Writing and Managing Thesis in LaTeX

text: I'm in the process of thesis writing. I'm LaTeX newbie and have its limited knowledge and experience. I'm thinking to use LaTeX or LyX for my thesis. Which one is better for thesis write up? If I go with LaTeX then how can I use it more efficiently. In case of LaTeX I'd like to have separate `.tex` file for each chapter and each chapter will have its own bibliography. Then how can I combine all chapters and other issue would of cross references. I have to my Univ. template for thesis write up. I'd highly appreciate if someone provide me general guidelines to manage and write a long document like thesis in LaTeX.


title: Setting Text on a Path

text: Using LuaLaTeX, I want to create an effect where text begins as a footnote but curves upward and ends up in front of the body text. Sort of hard to describe, but picture the body text ending prematurely on a page (with full pages of body text preceding and after it) and the footnote text tilting upward on a path to eventually "become" the rest of the body text. Is this something that can only be achieved via something like TikZ, or could I hack the geometry settings for this particular page to achieve it? Sorry, no MWE here because I don't know where to start.


title: Custom table with mdframed and parcolumns: LaTeX Error: Something's wrong--perhaps a missing \item

text: I am building my own table environment using parcolumns and mdframed.               \documentclass{report}          \usepackage{parcolumns}     \usepackage{mdframed}          \newenvironment{mytable}[1]        {\begin{mdframed}[splittopskip=0pt,frametitle={},frametitlerule=true,frametitlebelowskip=0pt,frametitleaboveskip=0pt,roundcorner=0pt,skipabove=0pt,leftline=true,rightline=true,innertopmargin=-4pt,innerleftmargin=0pt,innerrightmargin=0pt,middlelinewidth=0pt,innerbottommargin=0pt,everyline=true,splitbottomskip=0pt]         \hspace{0pt}         \begin{parcolumns}[rulebetween,sloppy]{#1}}        {\end{parcolumns}         \end{mdframed}}     \begin{document}     \begin{mytable}{2}     \colchunk{Some text}\colchunk{Some more text}\colplacechunks     \hrule     \colchunk{Yet more text}\colchunk{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.}\colplacechunks     \end{mytable}     \end{document}      It properly handles long paragraphs within table cells, which none of the existing table libraries do (please correct me, I would love to be wrong here). The following things are not clear to me:   * If I define the environment header as `\begin{mdframed}[...]\begin{parcolumns}[...]` (i.e. without the `\hspace`), I get `! LaTeX Error: Something's wrong--perhaps a missing \item.` Why is this?   * Adding `\hspace{0pt}` stops the error, but causes the top border of the mdframed to be about 4pt too high, hence why I need `innertopmargin=-4pt`. Does hspace have a height? Is there a different invisible character I could use for this purpose? p.s. I am aware of the lipsum package but do not have it installed, hence the pasted text.


title: continuous numbering of theorems for the whole article

text: In the code               \newtheorem{thm}{Theorem}[section]      what should stand in place of _section_ to get continuous numbering (simply Theorem 1, Theorem 2, etc.) for the whole text?


title: Insert a video in a PDF

text: I put a video in a PDF with the command:               \href{run:primo.avi}{\includegraphics[scale=0.15]{Screenshot.jpg}}       If my PDF is not in fullscreen mode it works, but if I put the pdf in fullscreen mode, when I push with the mouse on the video the PDF jumps to the next page. Is there any solution to prevent this?


title: Biblatex/biber fails with a strange error about missing recode_data.xml file

text: I'm trying to use `biblatex` and when I compile my document I get an error like the following: **Windows**               data source C:\Users\<username>\AppData\Local\Temp\par-5061756c\     cache-890efc00b3ca6b775c7d44a325c1349fb2a3a3bd\inc\lib/Biber/LaTeX/recode_data.xml not found in .      **Mac**               data source /var/folders/v2/rld0ls7d2935gkvqv5hfr1x00000gn/T/par-616c616e/     cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/LaTeX/recode_data.xml not found in .      **Linux**               data source /tmp/par-6963617269756d/cache-f37ab610b7d79b2720a8ee3732849c6821705520     /inc/lib/Biber/LaTeX/recode_data.xml not found in .