title: cleveref: configure symbol §/§§ for all sectioning types once time

text: I want to configure the section symbol § (singular and plural form §§) indistinctly for all types of sections (part, chapter, section, subsection, paragraph and so on). I use the `cleveref` package, but I don't want this type of customization:               \crefname{part}{\S}{\S\S}     \crefname{chapter}{\S}{\S\S}     \crefname{section}{\S}{\S\S}     \crefname{subsection}{\S}{\S\S}     ...      How can I configure § and §§ for all calls to `\cref`, irrespective of the type of reference? I've been searching in the `cleveref` documentation but I haven't found/understood how I can do this.


title: How to split text from one cell on several pages?

text: > **Possible Duplicate:**   >  How to create a table that spans over multiple pages, breaking single rows I have a `longtable`. One of cells has a very long list which which doesn't fit on one page. As such I get a PDF where the table is out of frame (some part of cell is out of the page, and it is impossible to see it). It seems like the cell can not be transfered on to the next page. Can somebody help me?


title: How to put a blank space having dimensions equal to some text

text: > **Possible Duplicate:**   >  How to replace a large block of text by an empty block of the same size? A friend of mine is preparing some teaching materials. In the version for the lecturer there will be proofs, solutions etc. In the version for students, such parts should be omitted. But he wants the page numbers to match, so it would probably be best to leave blank spaces where the proofs/solutions are in the "lecturer" version. Setting text color to white is a bad idea, since the text is still there and can be copypasted or exported. Is there any better solution? One that comes to my mind is to put the relevant portions into a box, set width/height/depth of a void box to its dimensions and put it there; the obvious drawback is that a box can't be split between pages. Another one is converting the whole document to bitmaps; it's rather short, so this is indeed a viable option (however stupid it may seem). I was wondering, though, whether there is a ready-made solution to such a problem, so that we won't reinvent the wheel. Note: I _know_ this is not going to be _beautiful_. Aesthetics is not the point of my question, but I'd equally welcome other (than huge blank spaces) solutions to the general problem of somehow "interlinking" two versions of a document, one of which is an abridged version of the other (and hyperlinking etc. is not an option, since this is going to be printed). Note 2: I'd also be thankful for suggestions of some meaningful tags for this question;).


title: Custom environment to accept \item

text: How can I create an environment that takes items in a way similar to lists? Example:               \begin{myEnv}     \item{AAA}{BBB}     \item{CCC}{DDD}     \end{myEnv}      I'd like the above do something like               \begin{tabular}{|l|l|l|l|}     \hline     header1 & header2 & header3 & header4 \\ \hline     AAA & BBB & & \\ \hline     CCC & CCC & & \\ \hline     \end{tabular}


title: avoid underfull \hbox (badness 10000) in paragraph because of linebreak

text: It seems to be a common question, but the other werent adressing my code.               \begin{table}[ht!]     \centering     \small     \caption{Absolute and relative frequencies }      \label{FreqFair}     \renewcommand{\arraystretch}{1}     \setlength{\tabcolsep}{1pt}     \scalebox{1}{     \begin{tabular}{p{0.2\textwidth}p{0.15\textwidth}p{0.15\textwidth}p{0.15\textwidth}p{0.15\textwidth}p{0.1\textwidth}} \\ \toprule%{L C R}      & \multicolumn{5}{c}{Stated importance} \\      &Very\linebreak important&Important&Moderately\linebreak important&Not\linebreak     important&Total \\ \midrule     \end{tabular}     }     \normalsize     \end{table}      I guess using the line break in the first row is not the best idea, but then it looks exactly how I want it.


title: Customizing the Weak limit

text: Using the command `\displaystyle \lim_{\Lambda \uparrow \mathbb{Z}^2}` I can produce the limit that I desire. But I like to write the above limit as in the photo below. Could you help me? Thanked. Ps. Correct me if I'm wrong about the Tags. ![enter image description here](http://i.stack.imgur.com/y1wWL.jpg)


title: hyperref, smfbook, and bibliographies

text: I am writing a paper/book for a French journal, which requires use of the package "smfbook." Everything seems to work fine, except that hyperref, smfbook, and the bibliography do not seem to work well together (although each of the three pairs by themselves seems to work fine). As an example, consider the following file:               \documentclass[english]{smfbook}      \usepackage{hyperref}     \begin{document}          By~\cite{Wiles}.          \bibliographystyle{smfplain}     \bibliography{mybibliography}     \end{document}      Assume that mybibliography.bib is perfectly formatted. If I don't use hyperref, everything compiles perfectly. If I change "smfbook" to "amsbook", everything compiles perfectly. However, if I use smfbook and hyperref together, I get the following errors when I have a bibliography:               ! Use of \H@old@schapter doesn't match its definition.     \NR@schapter #1->\H@old@schapter {                                       #1}\begingroup \let \@mkboth \@gobbletwo \...     l.10 \begin{thebibliography}{1}          ?      ! Extra }, or forgotten \endgroup.     \NR@schapter #1->\H@old@schapter {#1}                                          \begingroup \let \@mkboth \@gobbletwo \...     l.10 \begin{thebibliography}{1}      Unfortunately, this is gobbledygook to me (and presumably points to some conflicts between the smfbook style and whatever hyperref does, rather than something I did). Given I am forced to work with smfbook, are there any suggestions?


title: How to center text without adding space AND not altering alignment of surrounding text?

text: In normal text, how do I center part of a sentence (it happens to be the end of a sentence) but leave the text in the rest of the paragraph unaltered? Also, no vertical space should be added before or after the centered text. In a word processor, I would add a new line just before the text to be centered and then "center" the text on the next line. I tried doing things similar to this with various LaTeX commands, but nothing worked. This is what I want it to look like:               This is a really long sentence as an example.  The second half of this                                    sentence should be centered.


title: Add text around footnote mark in beamer

text: I've been trying to change the behavior of the footnotes in beamer. I can change the "footnote" template fine, but I'm having trouble changing the marker in both places. Ideally, I'd like to have flexible control, but here's a simple example. If I want to use `[1]` instead of `^1`. After seeing how-do-i-change-footnote- font-size-in-beamer-presentation, this is what I tried:               \documentclass{beamer}     \usepackage{etoolbox}     \makeatletter     \patchcmd{\@makefnmark}{\insertfootnotemark{#1}}{\insertfootnotemark{[#1]}}{}{}     \makeatother     \setbeamertemplate{footnote}{%         [\insertfootnotemark] \insertfootnotetext     }          \begin{document}          \begin{frame}{Footnote test}         Hello World.\footnote{Hello Back}     \end{frame}          \end{document}      but the output from pdflatex didn't seem to change. I've seen lots of folks messing with the color (see adding-color-to-the-footnote-mark-in-beamer), but not too much with the style from what I've looked at.


title: Adding custom image in title slide

text: I use `beamer` with the `warsaw` style to create presentation. I would like to insert an image in the title slide as part of customization. An image that fills the whole breadth of the slide but limits to half height. How to do it. Couldn't find proper direction from `beamer` user guide


title: Execute own command in listing

text: I create an own command like this               \newcommand{\hostname}{this.is.my.hostname}      Now I want to use this command in normal text (no problem) and inside of a listing               Nun kann die Funktionsweise überprüft werden:          \begin{lstlisting}[language=BashGriduser]     su -l griduser     globus-url-copy gsiftp://\hostname:2811/home/share/test file:///home/share/test2     \end{lstlisting}      In the text, the command is executed without any problems. Inside the listing it is printed as `\hostname`. How can I execute this inside the listing or pass this as parameter or something like that.


title: Why is LaTeX used as the defacto standard for math equations?

text: In almost every application I've ever seen that uses math equations, it always supports LaTeX. If LaTeX does so much more than just math equations, why is it the defacto standard for math equations? Isn't that akin to everyone deciding to use Microsoft Word's Math Editor for math equations? Related question: Is there a name for the subset of LaTeX that deals specifically with math equations?


title: Transforming coordinates, so (0,0) from tikzpicture is put in the desired place of the page

text: In tikz I can perform absolute positioning, e.g. `(current page.center)`, but how I can specify/transform the coordinates, so `(0,0)` within tikzpicture will end in well-defined place like center of the page or at the location of the node used in previous tikzpicture? It's possibly very simple to obtain, but I skimmed PGF manual and cannot find it there.


title: A warning and an unknown command (XeTeX)

text: Why does `\T{foo}` yield `LaTeX Warning: Command \m invalid in math mode on input line 456.`? And what _is_ `\C`, which yields `LaTeX Error: Command \C unavailable in encoding EU1.`? What is that `\m` the warning mentions?               \documentclass[a4paper,draft]{report}     \usepackage{fontspec,xltxtra,xunicode}     \usepackage{hyperref}          \begin{document}     $$\~{}\T{}$$     \C     \end{document}


title: Background images for code listings

text: I've been searching around but I can't find any info for adding an image background for my code listing using the `listings` package. Is there a way to do this?


title: Linear B font problem

text: I've installed the `archaic` package and I've included `\usepackage{linearb}` in my document. I needed a stick figure symbol so I want to use this package which has a symbol `\BPman` satisfying my needs. But when I use this symbol by command `\textlinb{\BPman}`, an error occurs `!pdfTeX error: pdflatex (file linb10): Font linb10 at 720 not found` How to resolve this?


title: Sidewaystable together with longtable?

text: I've a massive sidewaystable (code below). I've been trying different combinations of `longtable`, `supertabular`, `lscape`, `rotating`, `sidewaystable`, `table`, etc, and I can't get it to be sideways and also run over 2 pages without screwing up the margins. Thanks for any help!! ![http://i50.tinypic.com/2hz4ao0.png](http://i.stack.imgur.com/YQBXg.png)               \documentclass[a4paper,11pt]{article}     \usepackage{color,amsmath,amsfonts,amssymb}     \usepackage[english]{babel}     \usepackage{graphicx}     \usepackage{natbib}     \usepackage{rotating}     \usepackage{colortbl}     \usepackage{booktabs,dcolumn,caption}     \usepackage{expdlist}  %expanded list environment     \usepackage{pdflscape} %landscape single pages     \usepackage{longtable} %multipage table          \captionsetup{labelsep=newline,singlelinecheck=false} % optional     \newcolumntype{d}[1]{D{.}{.}{#1}} % "decimal" column type     \renewcommand{\ast}{{}^{\textstyle *}} % for raised "asterisks"          \oddsidemargin 0.5cm %     \evensidemargin 0.5cm %     \textwidth 15cm %     \topmargin  -0.2in  %     \textheight 23.5cm %     \headheight 15pt %               \doublerulesep2pt          \begin{document}     \renewcommand{\baselinestretch}{1.1}          \fontsize{11}{16pt} \selectfont     \definecolor{Gray}{gray}{0.9}               \begin{sidewaystable}[h]     \footnotesize     \caption{\footnotesize Table heading}     \label{turns}     \colorbox{Gray}{ \begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}d{4}d{4}d{4}d{4}d{4}d{4}d{4}d{4}d{4}@{}}     \toprule      & \multicolumn{3}{c}{AAA} & \multicolumn{3}{c}{BBB} & \multicolumn{3}{c}{CCC} \\      & \multicolumn{1}{c}{OLS} & \multicolumn{1}{c}{POLS} & \multicolumn{1}{c}{PWLS} &  \multicolumn{1}{c}{OLS} & \multicolumn{1}{c}{POLS} & \multicolumn{1}{c}{PWLS} & \multicolumn{1}{c}{OLS} & \multicolumn{1}{c}{POLS} & \multicolumn{1}{c}{PWLS}  \\     \midrule     \multicolumn{4}{l}{\emph{Heading1}} & & &  & & & \\     Var1 & -0.086 & -0.082 & -4.525 & -0.028 & -0.022 & 2.441 & -0.092 & -0.099 &     -3.837\ast \\        & (0.107) & (0.110) & (3.948) & (0.087) & (0.091) & (4.346) & (0.076) & (0.070) &     (1.505) \\     Var2\textsuperscript{a}  & 0.012 & 0.012 & -0.007 & 0.004 & 0.003 & 0.046 & 0.000 &     -0.002 & 0.465\ast \ast \\        & (0.009) & (0.009) & (0.319) & (0.007) & (0.007) & (0.351) & (0.006) & (0.006) &     (0.120) \\     Var3\textsuperscript{b} & -0.006 & -0.005 & 0.452 & 0.001 & 0.003 & -0.204 & 0.003 &     0.009 & -0.082 \\        & (0.007) & (0.007) & (0.247) & (0.005) & (0.006) & (0.272) & (0.007) & (0.006) &     (0.132) \\     Var4\textsuperscript{c} & -0.333\ast \ast & -0.333\ast \ast & 15.347\ast \ast &     -0.179\ast \ast & -0.180\ast \ast & -8.593\ast \ast & -0.050 & -0.013 & -3.678\ast \ast \\        & (0.078) & (0.080) & (2.87) & (0.063) & (0.066) & (3.160) & (0.053) & (0.049) &     (1.049) \\         Var5\textsuperscript{d} & -0.037 & -0.010 & -2.073\ast \ast & -0.066\ast \ast &     -0.035\ast & 2.166\ast \ast & -0.161\ast \ast & -0.043\ast & -0.834 \\        & (0.021) & (0.021) & (0.761) & (0.017) & (0.017) & (0.838) & (0.023) & (0.021) &     (0.451) \\       Var6 & \multicolumn{1}{c}{Yes\textsuperscript{**}} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} \\       R-squared & 0.151 & 0.146 & 0.191 & 0.111 & 0.07 & 0.086 & 0.151 & 0.013 & 0.187 \\       & & & & & & & & & \\            \multicolumn{4}{l}{\emph{Heading2}} & & &  & & & \\     Var1 & -0.086 & -0.082 & -4.525 & -0.028 & -0.022 & 2.441 & -0.092 & -0.099 &     -3.837\ast \\        & (0.107) & (0.110) & (3.948) & (0.087) & (0.091) & (4.346) & (0.076) & (0.070) &     (1.505) \\     Var2\textsuperscript{a}  & 0.012 & 0.012 & -0.007 & 0.004 & 0.003 & 0.046 & 0.000 & -0.002 & 0.465\ast \ast \\        & (0.009) & (0.009) & (0.319) & (0.007) & (0.007) & (0.351) & (0.006) & (0.006) & (0.120) \\     Var3\textsuperscript{b} & -0.006 & -0.005 & 0.452 & 0.001 & 0.003 & -0.204 & 0.003 & 0.009 & -0.082 \\        & (0.007) & (0.007) & (0.247) & (0.005) & (0.006) & (0.272) & (0.007) & (0.006) & (0.132) \\     Var4\textsuperscript{c} & -0.333\ast \ast & -0.333\ast \ast & 15.347\ast \ast & -0.179\ast \ast & -0.180\ast \ast & -8.593\ast \ast & -0.050 & -0.013 & -3.678\ast \ast \\        & (0.078) & (0.080) & (2.87) & (0.063) & (0.066) & (3.160) & (0.053) & (0.049) & (1.049) \\     Var5\textsuperscript{d} & -0.037 & -0.010 & -2.073\ast \ast & -0.066\ast \ast &     -0.035\ast & 2.166\ast \ast & -0.161\ast \ast & -0.043\ast & -0.834 \\        & (0.021) & (0.021) & (0.761) & (0.017) & (0.017) & (0.838) & (0.023) & (0.021) & (0.451) \\         Var6 & \multicolumn{1}{c}{Yes\textsuperscript{**}} & Yes^{**} & Yes^{**} &     Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} \\         R-squared & 0.151 & 0.146 & 0.191 & 0.111 & 0.07 & 0.086 & 0.151 & 0.013 & 0.187 \\        & & & & & & & & & \\            \multicolumn{4}{l}{\emph{Heading3}} & & &  & & & \\     Var1 & -0.086 & -0.082 & -4.525 & -0.028 & -0.022 & 2.441 & -0.092 & -0.099 & -3.837\ast \\        & (0.107) & (0.110) & (3.948) & (0.087) & (0.091) & (4.346) & (0.076) & (0.070) &     (1.505) \\     Var2\textsuperscript{a}  & 0.012 & 0.012 & -0.007 & 0.004 & 0.003 & 0.046 & 0.000 & -0.002 & 0.465\ast \ast \\        & (0.009) & (0.009) & (0.319) & (0.007) & (0.007) & (0.351) & (0.006) & (0.006) & (0.120) \\     Var3\textsuperscript{b} & -0.006 & -0.005 & 0.452 & 0.001 & 0.003 & -0.204 & 0.003 & 0.009 & -0.082 \\        & (0.007) & (0.007) & (0.247) & (0.005) & (0.006) & (0.272) & (0.007) & (0.006) & (0.132) \\     Var4\textsuperscript{c} & -0.333\ast \ast & -0.333\ast \ast & 15.347\ast \ast & -0.179\ast \ast & -0.180\ast \ast & -8.593\ast \ast & -0.050 & -0.013 & -3.678\ast \ast \\        & (0.078) & (0.080) & (2.87) & (0.063) & (0.066) & (3.160) & (0.053) & (0.049) & (1.049) \\     Var5\textsuperscript{d} & -0.037 & -0.010 & -2.073\ast \ast & -0.066\ast \ast & -0.035\ast & 2.166\ast \ast & -0.161\ast \ast & -0.043\ast & -0.834 \\        & (0.021) & (0.021) & (0.761) & (0.017) & (0.017) & (0.838) & (0.023) & (0.021) & (0.451) \\         Var6 & \multicolumn{1}{c}{Yes\textsuperscript{**}} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} & Yes^{**} \\         R-squared & 0.151 & 0.146 & 0.191 & 0.111 & 0.07 & 0.086 & 0.151 & 0.013 & 0.187 \\        & & & & & & & & & \\       No. 1 & \multicolumn{1}{c}{219\textcolor{Gray}{ss}} & \multicolumn{1}{c}{219} &     \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} &     \multicolumn{1}{c}{219} & \multicolumn{1}{c}{445} & \multicolumn{1}{c}{445} & \multicolumn{1}{r}{445\textcolor{Gray}{s}} \\       No. 2 & \multicolumn{1}{c}{219\textcolor{Gray}{ss}} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{445} & \multicolumn{1}{c}{445} &     \multicolumn{1}{r}{445\textcolor{Gray}{s}} \\       No. 3 & \multicolumn{1}{c}{219\textcolor{Gray}{ss}} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{445} & \multicolumn{1}{c}{445} & \multicolumn{1}{r}{445\textcolor{Gray}{s}} \\       days 1 & \multicolumn{1}{c}{219\textcolor{Gray}{ss}} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{445} & \multicolumn{1}{c}{445} & \multicolumn{1}{r}{445\textcolor{Gray}{s}} \\       days 2 & \multicolumn{1}{c}{219\textcolor{Gray}{ss}} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{219} & \multicolumn{1}{c}{445} & \multicolumn{1}{c}{445} & \multicolumn{1}{r}{445\textcolor{Gray}{s}} \\     \midrule[\heavyrulewidth]     \end{tabular*}}     \vspace{0.12cm}          {Dependent variables have been scaled by a factor of 10. Standard errors in parentheses. *Significant at 5\%; **Significant at 1\%.     \begin{description}\compact{             \item[\small \textsuperscript{a}] Description 1.         \item[\small \textsuperscript{b}] Description 1.         \item[\small \textsuperscript{c}] Description 1.             \item[\small \textsuperscript{d}] Description 1. }     \end{description} }     \end{sidewaystable}          \end{document}


title: authblk footnote marks before/atop commas

text: The `authblk` package, in footnoted mode, puts footnote marks inside commas ("Alice1,") which is bad typography. Is there any way to persuade it to put the footnote marks outside the commas ("Alice,1"), or even better, on top of them? Example:               \documentclass{article}     \usepackage{authblk}     \begin{document}     \title{A Demonstration of Bad Punctuation Placement}     \author[1]{Alice}     \author[2]{Bob}     \author[3]{Peggy}     \author[4]{Trent}     \affil[1]{}\affil[2]{}\affil[3]{}\affil[4]{}     \date{}     \maketitle          Better: $\mbox{Alice,}^1$ $\mbox{Bob,}^2$ $\mbox{Peggy,}^3$     and $\mbox{Trent}^4$          Even better: $\mbox{Alice\rlap{,}}^1$ $\mbox{Bob\rlap{,}}^2$     $\mbox{Peggy\rlap{,}}^3$ and $\mbox{Trent}^4$          \end{document}      (Ignore everything but the "Alice, Bob, Peggy, Trent" lines.)


title: Left-middle-right delimiters and unicode-math

text: Consider the rendering of `\middle|` in the code below:               \documentclass[12pt,a4paper]{article}     \usepackage{unicode-math}     \setmathfont{xits-math.otf}     \begin{document}     \[ \left\lbrace p_{i,j} \, \middle| \, 1 \le i \le k_j, 0 \le j \le N \right\rbrace \]     \[ N \left[ f \right] = \left\lbrace x \in N \, \middle| \, f \cdot x = 0 \right\rbrace \]     \end{document}      XeTeX produces the following output: ![XeTeX](http://i.stack.imgur.com/Gf1zA.png) On the other hand, LuaTeX produces this: ![LuaTeX](http://i.stack.imgur.com/YyNpQ.png) It's not hard to see that XeTeX renders only the first line correctly while LuaTeX renders only the second line correctly. A similar problem happens if I swap Asana Math for XITS, so it seems to be an engine problem rather than a font problem. The problem disappears if I change from `unicode-math` to `mathspec`, so it appears to be specific to `unicode-math`. Clearly, there is an execution path which makes `\middle` work correctly (in the sense of being consistent with `\left` and `\right`: how do I force `\middle` to be rendered that way when using `unicode-math`?


title: Adding a header to the right hand top corner from a specific page

text: This is how my page looks: ![enter image description here](http://i.stack.imgur.com/hkX4k.jpg) What I want to do is, add a header to the blackened portion in this image: ![enter image description here](http://i.stack.imgur.com/OAuFg.jpg) These are the settings that I am already using:               \documentclass[letter, 10pt]{report}\normalsize     \usepackage{amsmath,utopia}     \usepackage{titlesec}     \usepackage{graphicx}     \usepackage{geometry}     \usepackage{epsfig}     \usepackage[hidelinks]{hyperref}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{setspace}     \usepackage{footnote}     \usepackage{rotating}     \usepackage{needspace}     \makesavenoteenv{tabular}     \textwidth 7.5in     \addtolength{\oddsidemargin}{-0.75in}     \textheight 9.5in     \pagestyle{plain}     \addtolength{\topmargin}{-0.75in}     \setlength{\parindent}{0pt}     \setlength{\parskip}{0.73cm}     \topskip 0in     \usepackage{tabularx}     \usepackage{fancybox}     \newenvironment{boxedlaw}[1]       {\begin{Sbox}\begin{minipage}{#1}\centering}       {\end{minipage}\end{Sbox}\begin{center}\fbox{\TheSbox}\end{center}}     \usepackage{cutwin}     \opencutright               \usepackage{background}     \usepackage{lipsum}     \usetikzlibrary{calc}          \SetBgScale{1}     \SetBgAngle{0}     \SetBgColor{brown}     \SetBgContents{     \begin{tikzpicture}[overlay,remember picture]         \draw [line width=3pt,rounded corners=0pt]             ($ (current page.north west) + (0.4in,-0.4in) $)             rectangle             ($ (current page.south east) + (-0.4in,0.4in) $);     \end{tikzpicture}     }          \usepackage{listings}     \usepackage{xcolor}          \definecolor{mycolor}{HTML}{F8E0E0}          \titleformat{\chapter}[display]       {\normalfont\bfseries\LARGE}       {\chaptertitlename~\thechapter}{0.5pc}       {{\color{brown}\titlerule[2pt]}\vspace{0.1pc}\MakeUppercase}     \titleformat{name=\chapter,numberless}[display]       {\normalfont\bfseries\LARGE}{}{0.5pc}       {\MakeUppercase}      The header will be some static text. Not section names or page numbers. However I want it to start from the point I want. That is, I dont want that header on the first few pages. And I want it on every page after that. Is there a simple way to do it?


title: How can I change the font size of headings using mwcls?

text: I use `\documentclass mwrep`.   I want to change:   `chapter` to have font size 14pt bold   `section` to have font size 13pt bold   `subsection` to have font size 12pt bold italic


title: a5paper setting not taking effect

text: I would like to set the page size to the European A5. I wrote the following:               \documentclass[a5paper]{article}     \usepackage{fontspec}     \begin{document}     ...      And process it with:               xelatex main.tex      The PDF that comes out doesn't look right. The actual printed area appears to be A5 but the size of the physical page is the US letter page. Any ideas on what I'm doing wrong? Thanks


title: Top alignment of itemize in columns of beamer

text: I do not know what is wrong but the top alignment of the itemize environments in the two columns are different. I could not find a reason for this.               \documentclass[10pt,fleqn,t]{beamer}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{kpfonts}     \begin{document}     \begin{frame}{titre}     \begin{columns}%     \begin{column}[t]{0.45\textwidth}%     text text text     \begin{itemize}     \item 1     \item 2     \end{itemize}     \end{column}     \begin{column}[t]{0.45\textwidth}%     text text text     \begin{itemize}     \item 1     \item 2     \end{itemize}     \end{column}     \end{columns}     \end{frame}     \end{document}


title: Nested block comments?

text: Is there any way to get nestable block comments in LaTeX? I am using the `comment` package to get block comments, but nesting one comment inside another with `\begin{comment}...\begin{comment}...\end{comment}...\end{comment}` doesn't seem to work. (I get an error "\begin{document} ended by \end{comment}".) When writing and revising papers, it would be useful to me to be able to comment out arbitrary blocks of text, even if they already have commented-out blocks within them. I'm aware that there are editor-based solutions. What I'm asking is if there is a way to do this within the source of my LaTeX document.


title: Enumerated list with square brackets

text: I want to make an enumerated list in the following format:               [1] foo foo     [2] foo foo     ...       How I can do that using enumerated lists? I have tried the following:               \begin{enumerate}[\left[ 1 \right]]      but it does not work.


title: PLoS Comp Bio Biblatex style

text: PLoS Comp Bio, I think similar to the other members of the PLoS family, has a simple citation/bibliography style. Citations are numbered [1], and the bibliography is formatted with little punctuation and no italics. >   1. Fine P, Clarkson J (1986) Individual versus public priorities in the > determination of optimal vaccination policies. Am J Epidemiol 124: > 1012–1020. > They provide a bst style file but I'm trying to use `biblatex` because it supports `\citet` commands in numbered citation formats. I've tried hacking away at `biblatex` commands to get the right formatting but I'm struggling. If anyone knows of a `biblatex` style file for PloS (or similar) I'd be most interested.


title: Redefining \and spacing in \author

text: How can one redefine the spacing that the `\and` command puts between authors in `\author` within the standard `article` class? I have a document with three authors whose names are _just_ too long to fit on one line with the standard spacing. I feel like this should probably be doable with a `\setlength` command, but I have no idea what length to set. For the record, I'm aware of packages like `authblk` (which I may ultimately use for my purposes), but am more interested in how to modify this spacing directly.


title: How can I include a custom titlepage in my document?

text: How can I do title page like ![this\]\(http://min.us/mchibO5\)](http://i.stack.imgur.com/BFa9t.png)? I'm using the `mwrep` document class. Or could it be simpler, and it is possible to include a `pdf` with this title page to `pdf` generated by LEd? How can I disable page number on title page? How can I make title page not count into numbering (next page would have number 1)?


title: Why are unplaced part titles creating empty pages in ConTeXt?

text: I made a book which is divided into parts, with `\part{}`. I want these parts to appear in the table of contents, but do not need them to appear within the document itself. I added `\placehead=no` to the `\setuphead` settings, which makes the title not appear, however, when `\setuppagenumbering` is set to `alternative=doublesided`, two completely empty pages are created.               \setuphead[part][number=no, placehead=no]     \setuplist[part][alternative=c]     \setuplist[title][alternative=c]     \setuppagenumbering [alternative=doublesided]     \starttext         \definecombinedlist[content][part,chapter]         \placecontent         \part{Animals}             \chapter{Birds}             \chapter{Snails}         \part{Plants}             \chapter{Flowers}             \chapter{Mushrooms}     \stoptext      The `\part` commands seem to be creating empty pages at page 2, 3, 8, and 9. Without the `\part` titles, these pages disappear. How can I have parts in my document which are invisible, but not in the table of contents, and which also do not create blank pages in the document?


title: Indent all but first lines of paragraph.

text: Inside of a table column with a width determined by a p{5in} tag, I want all but the first line of text to be indented. Is there any way to achieve this? Doing it by hand would make later edits overly cumbersome. Thanks!


title: How to highlight a single element in a matrix?

text: I am trying to write out the LU decomposition of a matrix A. I am able to highlight the pivot column with elements below the pivot element except when I get to the last column. Does anyone know how I can highlight the last element, 2, in the same format? Or do you have suggestions of other ways that I could do this? Here's what I'm trying to do.                \documentclass[12pt,letterpaper]{report}               \usepackage{amsmath}     \usepackage{color}     \usepackage{arydshln}     \usepackage{tikz}     \usetikzlibrary{arrows,matrix,positioning}     \usetikzlibrary{fit}     \tikzset{%      highlight/.style={rectangle,rounded corners,fill=blue!30,draw,      fill opacity=0.2,thick,inner sep=0pt}      }     \newcommand{\tikzmark}[2]{\tikz[overlay,remember picture,      baseline=(#1.base)] \node (#1) {#2};}      %     \newcommand{\Highlight}[1][submatrix]{%     \tikz[overlay,remember picture]{     \node[highlight,fit=(left.north west) (right.south east)] (#1) {};}     }                    \makeatletter     \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%     \hskip -\arraycolsep     \let\@ifnextchar\new@ifnextchar     \array{#1}}     \makeatother          \begin{document}               \begin{align*}     A =     \left[      \begin{array} {*4{c}}      \tikzmark{left}{2}& 1 & -1 & 4 \\      -4 & -3 & 6 & -3 \\      2 & -3 & 20 & 23 \\      \tikzmark{right}{4} & 2 & 13 & 7     \end{array}     \right]      \Highlight[first]     \sim      \begin{matrix}      \\      \mbox{$R_2+2R_1$} \\      \mbox{$R_3-R_1$} \\     \mbox{$R_4-2R_2$}     \end{matrix}     &\left[      2 & 1 & -1 & 4 \\      0 & \tikzmark{left}{-1} & 4 & 5 \\      0 & -4 & 21 & 19 \\     0 & \tikzmark{right}{0} & 15 & -1     \end{matrix}     \right]     \Highlight[first] \\     \sim     \begin{matrix}      \\      \\      \mbox{$R_3-4R_2$} \\     \mbox{ }     \end{matrix}     &\left[      \begin{matrix}      2 & 1 & -1 & 4 \\      0 & -1 & 4 & 5 \\      0 & 0 & \tikzmark{left}{5} & -1 \\     0 & 0 & \tikzmark{right}{15} & -1     \end{matrix}     \right]     \Highlight[first]\\     \sim     \begin{matrix}      \\      \\      \\     \mbox{$R_4-3R_3$}     \end{matrix}     &\left[      \begin{matrix}      2 & 1 & -1 & 4 \\      0 & -1 & 4 & 5 \\      0 & 0 & 5 & -1 \\     0 & 0 & 0 & 2     \end{matrix}     \right]     =U     \end{align*}                    \end{document}      I need the last element, 2, to be highlighted just like the other pivot columns. I am new user so I am not allowed to post an image but I hope someone can help with this.


title: How do I place a simple javascript in the resulting PDF?

text: I would like to use LaTeX to produce a PDF document with forms with the following features: -One or two user-modifiable text fields -One output text field -A "run" button that, when pressed, will take the first fields, run calculations on it using a javascript function, and put the result in the output field. So what packages would I need (I presume insdljs, but would I need anything else), where can I get them, and what would be the actual program to put into LaTeX. Thanks.


title: Showing definition of macros with custom characters?

text: Consider the following MWE:               \documentclass{book}          \usepackage{biblatex}          \begin{document}          \typeout{1.=\meaning\usebibmacro}     \typeout{2.=\meaning\usebibmacro{name:first-last}}          \makeatletter     \typeout{3.=\meaning\abx@macro@name:first-last}          \typeout{4.=\meaning \csname abx@macro@name:first-last \endcsname}     \typeout{5.=\expandafter\meaning \csname abx@macro@name:first-last \endcsname}     \typeout{6.=\expandafter\expandafter\expandafter\meaning \csname abx@macro@name:first-last \endcsname}     \makeatother          \end{document}      Running this with `pdflatex`, results with:               1.=\protected macro:#1->\ifcsundef {abx@macro@\detokenize {#1}} {\blx@error {Bi     bliography macro '\detokenize {#1}' undefined} {Use '\string \newbibmacro ' to      define this macro}} {\csuse {abx@macro@\detokenize {#1}}}          2.=\protected macro:#1->\ifcsundef {abx@macro@\detokenize {#1}} {\blx@error {Bi     bliography macro '\detokenize {#1}' undefined} {Use '\string \newbibmacro ' to      define this macro}} {\csuse {abx@macro@\detokenize {#1}}}{name:first-last}          3.=undefined:first-last          4.=\csnameabx@macro@name:first-last \endcsname           5.=\relax          6.=\relax      ... which is to say, the closest I can get to the definition of `\abx@macro@name:first-last` here is `\relax`; but I'm pretty sure that is not the case, because: Even if `\abx@macro@name:first-last` is not defined verbatim under that name in `biblatex.sty`, look what `texdef` reports:               $ texdef -t latex -c book -p biblatex abx@macro@name:first-last  -f     \abx@macro@name:first-last first defined in "biblatex.sty".          \abx@macro@name:first-last:     macro:#1#2#3#4->\usebibmacro {name:delim}{#2#3#1}\usebibmacro {name:hook}{#2#3#1}\ifblank {#2}{}{\mkbibnamefirst {#2}\isdot \bibnamedelimd }\ifblank {#3}{}{\mkbibnameprefix {#3}\isdot \ifpunctmark {'} {} {\ifuseprefix {\bibnamedelimc }{\bibnamedelimd }}}\mkbibnamelast {#1}\isdot \ifblank {#4}{}{\bibnamedelimd \mkbibnameaffix {#4}\isdot }      ... which is exactly what I was looking for! One would think the `\protect` here (as in macros - How can I see the "implementation" of the \LaTeX command? - TeX - LaTeX) would be appropriate - yet I cannot see that `\abx@macro@name:first-last` is protected; the only thing I can see as problem is use of colon character in name ( _which should then be handled by the`\csname`/`endcsname` approach, but isn't_). Can anyone point out, how can I list this `\abx@macro@name:first-last` macro (and similar ones) from within Latex?


title: Bold calligraphic typeface

text: I know `\mathcal{ABC...}`, but can't seem to bold these - thanks for help - PMF


title: Numbering of assumptions

text: Suppose I would like to have a title of assumption being `Assumption 1-$\mathcal F$.`, `Assumption 2-$\mathcal F$.` and so on to be further called in the text with symbols different from `$\mathcal F$`. Let me give you an example:               \documentclass[10pt, a4paper]{amsart}     \usepackage{amsmath}                      {           \theoremstyle{plain}           \newtheorem{assumption}{Assumption}       }     \begin{document}     \section{The first section}     \subsection{The first subsection}     There are three classes of interest: $\mathcal a$, $\mathcal b$ and $\mathcal c$.     Let $\mathcal f$ be a symbolic variable which takes its values      from the set $\{\mathcal a,\mathcal b,\mathcal c\}$.          \begin{assumption}-$\mathcal f$\label{as:1}       The class $\mathcal f$ is not empty.     \end{assumption}          \begin{assumption}-$\mathcal f$\label{as:2}       The derivative $\mathrm d(\mathcal f)$ is positive.     \end{assumption}          Examples of using the assumptions above are as follows:     \begin{itemize}       \item By saying that Assumption \ref{as:1}-$\mathcal a$ is satisfied,     we mean that the class $\a$ is not empty.       \item By saying that Assumption \ref{as:2}-$\mathcal c$ is satisfied,     we mean that the derivative $\mathrm d(\mathcal c)$ is positive.     \end{itemize}     \end{document}      ![enter image description here](http://i.stack.imgur.com/A9wUr.png) * * * In this example everything is fine but the titles of assumptions. Currently they are `Assumption 1. -$\mathcal F$` whereas I need `$\mathcal F$` to be the part of the title. As below. However, whenever I use `\ref` in the body text, the reference is of the form `Assumption 1.1` rather than `Assumption 1`. In fact, the numbering does not work well: it seem to depend only on the number of section/subsection where the assumption was defined as here.                 {           \theoremstyle{plain}           \newtheorem*{assumption1f}{Assumption 1-$\mathcal f$}           \newtheorem*{assumption2f}{Assumption 2-$\mathcal f$}       }     \begin{document}     \section{The first section}     \subsection{The first subsection}     There are three classes of interest: $\mathcal a$, $\mathcal b$ and $\mathcal c$.     Let $\mathcal f$ be a symbolic variable which takes its values      from the set $\{\mathcal a,\mathcal b,\mathcal c\}$.          \begin{assumption1f}\label{as:1}       The class $\mathcal f$ is not empty.     \end{assumption1f}          \begin{assumption2f}\label{as:2}       The derivative $\mathrm d(\mathcal f)$ is positive.     \end{assumption2f}          Examples of using the assumptions above are as follows:     \begin{itemize}       \item By saying that Assumption \ref{as:1}-$\mathcal a$ is satisfied,     we mean that the class $\mathcal a$ is not empty.       \item By saying that Assumption \ref{as:2}-$\mathcal c$ is satisfied,     we mean that the derivative $\mathrm d(\mathcal c)$ is positive.     \end{itemize}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ZkJho.png) * * * Is there any way to fix that? As suggested by egreg, I've implemented the following code. The titles are now fine, as above - but the numbering is still not ok: instead of `Assumption 1-$\mathcal A$` that refers to the first assumption, I necessarily get $\mathcal F$ in the reference.               \newtheorem*{assumption*}{\assumptionnumber}     \providecommand{\assumptionnumber}{}     \makeatletter     \newenvironment{assumption}[2]      {%       \renewcommand{\assumptionnumber}{Assumption #1-$\mathcal{#2}$}%       \begin{assumption*}%       \protected@edef\@currentlabel{#1-$\mathcal{#2}$}%      }      {%       \end{assumption*}      }     \makeatother          \begin{document}     \section{The first section}     \subsection{The first subsection}          There are three classes of interest: $\mathcal a$, $\mathcal b$ and $\mathcal c$.     Let $\mathcal f$ be a symbolic variable which takes its values      from the set $\{\mathcal a,\mathcal b,\mathcal c\}$.          \begin{assumption}{1}{F}\label{as:1}       The class $\mathcal f$ is not empty.     \end{assumption}          \begin{assumption}{2}{F}\label{as:2}       The derivative $\mathrm d(\mathcal f)$ is positive.     \end{assumption}          Examples of using the assumptions above are as follows:     \begin{itemize}       \item By saying that Assumption \ref{as:1}-$\mathcal a$ is satisfied,     we mean that the class $\mathcal a$ is not empty.       \item By saying that Assumption \ref{as:2}-$\mathcal c$ is satisfied,     we mean that the derivative $\mathrm d(\mathcal c)$ is positive.     \end{itemize}     \end{document}      ![enter image description here](http://i.stack.imgur.com/nKJcB.png) * * * To summarize: in the first version references are the way I want, but titles are not. In the other two (my own attempt, and the code suggested by @egreg) the titles are good, but the references differ from the first case.


title: multiple column align equation environments

text: Can I get this three column arrangement in the equation environment without using three align environments? The problem I am having is the amsmath error "erroneous nesting of equations" occurs and I want to avoid that error/warning. I also don't want to have to write out all the first lines together, then all the second lines etc. etc. because that would get confusing when editing the equations later on. The following MWC is complex on purpose. It illustrates how confusing it would get if I had to write all the lines as described above. thanks.               \documentclass[]{article}     \usepackage{amsmath}     \begin{document}          \begin{equation*}     \begin{align}     P_{S}   &= V_{S} \times I_{1} \times cos(\phi) \\             &=  \times  \times cos(\phi) \\     \therefore \     cos(\phi)_{1A}  &= \frac{}{ \times } \\                 &=  \\     I_{S}           &= I_{1} \sqrt{1+THD^{2}} \\     \therefore \      THD     &= \frac{I_{S}}{I_{1}} - 1\\                 &= \frac{}{} - 1 \\             &=  \\     df      &= cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} \\                            &=  \times \frac{1}{\sqrt{1+^{2}}} \\             &=           \end{align}     \begin{align}     P_{S}   &= V_{S} \times I_{1} \times cos(\phi) \\         &=  \times  \times cos(\phi) \\     \therefore \     cos(\phi)_{1A}  &= \frac{}{ \times } \\                 &=  \\     I_{S}           &= I_{1} \sqrt{1+THD^{2}} \\     \therefore \      THD     &= \frac{I_{S}}{I_{1}} - 1\\                 &= \frac{}{} - 1 \\             &=  \\     df      &= cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} \\                            &=  \times \frac{1}{\sqrt{1+^{2}}} \\             &= \\     \end{align}     \begin{align}     P_{S}   &= V_{S} \times I_{1} \times cos(\phi) \\         &=  \times  \times cos(\phi) \\     \therefore \     cos(\phi)_{1A}  &= \frac{}{ \times } \\                 &=  \\     I_{S}           &= I_{1} \sqrt{1+THD^{2}} \\     \therefore \      THD     &= \frac{I_{S}}{I_{1}} - 1\\                 &= \frac{}{} - 1 \\             &=  \\     df      &= cos(\phi) \times \frac{1}{\sqrt{1+THD^{2}}} \\                            &=  \times \frac{1}{\sqrt{1+^{2}}} \\             &= \\     \end{align}     \begin{equation*}          \end{document}


title: Fancy tables in LaTeX

text: I am terrible at LaTeX tables. I managed to produce a table, but it looks so basic. How do I make it fancier? Here is the table's code:               \begin{table}         \begin{tabular}{|l|l|l|l|l|}              \hline                  Models    & A  & B  & C  & D  \\ \hline                  Model $X$ & X1 & X2 & X3 & X4 \\ \hline                  Model $Y$ & Y1 & Y2 & Y3 & Y4 \\              \hline         \end{tabular}     \end{table}


title: Is it possible to reduce the file size of generated PDF by clipping the included images with \includegraphics' viewport?

text: I noticed that clipping images with `\includegraphics`' `viewport` does not reduce the file size of generated PDF output. I might miss other settings. Is it possible to reduce the file size of generated PDF by clipping the included images with `\includegraphics`' `viewport`? Minimal Working Example might look like below:               \documentclass{article}     \usepackage{graphicx}     \graphicspath{{Images/}}     \begin{document}     \includegraphics[viewport=2cm 3cm 9cm 9cm,clip]{mb}     \end{document}


title: Wrong positioning of images inside tikzpicture with XeLaTeX

text: Consider following code:                  \tikzstyle{box}=[draw, fill=brown!40, text width=7em,             text centered, minimum height=7em, rounded corners]         \tikzstyle{usb}=[draw, fill=blue!40, text width=3em,             text centered, minimum height=3em]         \pgfdeclareimage[width=10em]{smarthomes}{smarthomes}         \pgfdeclareimage[width=10em]{ekg}{ekg}         \pgfdeclareimage[width=10em]{quadro}{quadro}              \begin{tikzpicture}             \node (and) [box] {first device};             \path (and)+(5.5em,0) node (usb) [usb] {USB};             \path (and)+(11em,0) node (mk) [box,fill=green!40] {second device};                       \path (and)+(25em,10em) node (home) [] {\pgftext{\pgfuseimage{smarthomes}}};             \path (and)+(25em,0) node (quadro) [] {\pgfbox[center,center]{\pgfuseimage{quadro}}};             \path (and)+(25em,-10em) node (ekg) [] {\pgfbox[center,center]{\pgfuseimage{ekg}}};                  \draw [thick] (mk.east) to ($(home) - (5em,0)$);             \draw [thick] (mk.east) to ($(quadro) - (5em,0)$);             \draw [thick] (mk.east) to ($(ekg) - (5em,0)$);             \end{tikzpicture}      When I use PDFLaTeX all is right, but if I use XeLaTeX images in appropriate nodes are not positioned.


title: Can I rotate a marker with a scatter source?

text: I'd like to be able to use `pgfplots` to show a skier going down a ski slope. Here is what I have done so far.               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7}     \makeatletter     \pgfkeyssetvalue{/pgf/shapes/ski/ski length}{1cm}     \pgfkeyssetvalue{/pgf/shapes/ski/ski radius}{.075cm}     \pgfkeyssetvalue{/pgf/shapes/ski/leg length}{.3cm}     \pgfkeyssetvalue{/pgf/shapes/ski/leg angle}{140}     \pgfkeyssetvalue{/pgf/shapes/ski/back length}{.5cm}     \pgfkeyssetvalue{/pgf/shapes/ski/head radius}{.1cm}     \pgfdeclareplotmark{skimark}{%         % ski         \pgfpathmoveto{\pgfpoint{-.5\pgfkeysvalueof{/pgf/shapes/ski/ski               length}}{-\pgfkeysvalueof{/pgf/shapes/ski/leg length}}}         \pgfpathlineto{\pgfpoint{.5\pgfkeysvalueof{/pgf/shapes/ski/ski               length}}{-\pgfkeysvalueof{/pgf/shapes/ski/leg length}}}         \pgfpatharc{-90}{0}{\pgfkeysvalueof{/pgf/shapes/ski/ski radius}}         \pgfsetlinewidth{.5mm}         \pgfusepath{stroke}         % body         \pgfpathmoveto{%           \pgfpoint{+0pt}{-\pgfkeysvalueof{/pgf/shapes/ski/leg length}}}         \pgfpathlineto{\pgfpointorigin}         \pgfpathlineto{%           \pgfpointpolar{\pgfkeysvalueof{/pgf/shapes/ski/leg angle}}{%             \pgfkeysvalueof{/pgf/shapes/ski/leg length}}}         \pgfpathlineto{\pgfpointadd{%             \pgfpointpolar{%               \pgfkeysvalueof{/pgf/shapes/ski/leg angle}}{%               \pgfkeysvalueof{/pgf/shapes/ski/leg length}}}{%              \pgfpoint{%               \pgfkeysvalueof{/pgf/shapes/ski/back length}}{+0pt}}}         \pgfsetroundjoin         \pgfsetlinewidth{1mm}         \pgfusepath{stroke}         %         \pgfpathcircle{%           \pgfpointadd{%             \pgfpointpolar{%               \pgfkeysvalueof{/pgf/shapes/ski/leg angle}}{%               \pgfkeysvalueof{/pgf/shapes/ski/leg length}}}{%              \pgfpoint{%               \pgfkeysvalueof{/pgf/shapes/ski/back length}}{+0pt}}}{%           \pgfkeysvalueof{/pgf/shapes/ski/head radius}}         \pgfusepath{fill}     }     \makeatother     \begin{document}     \begin{tikzpicture}       \begin{axis}[domain = 0:5,         ]         \addplot+[mark = skimark,                   only marks,                   forget plot,                   scatter,                   scatter src = {-exp(-x)}] gnuplot[samples=5] {exp(-x)};         \addplot+[no markers] gnuplot[samples=30] {exp(-x)};       \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/cd9y9.png) How can I use the scatter source information to rotate the markers so that the skier's skis are parallel to the slope (a bit of shifting would be good as well since I made a design error not defining the origin on the skis...) ? Note: I can provide a `ski` shape as well.               \pgfdeclareshape{ski}{%       \anchor{center}{\pgfpointorigin}       \savedanchor\bottomleg{%         \pgfpoint{+0pt}{-\pgfkeysvalueof{/pgf/shapes/ski/leg length}}}       %       \backgroundpath{%         % ski         \pgfpathmoveto{\pgfpoint{-.5\pgfkeysvalueof{/pgf/shapes/ski/ski               length}}{-\pgfkeysvalueof{/pgf/shapes/ski/leg length}}}         \pgfpathlineto{\pgfpoint{.5\pgfkeysvalueof{/pgf/shapes/ski/ski               length}}{-\pgfkeysvalueof{/pgf/shapes/ski/leg length}}}         \pgfpatharc{-90}{0}{\pgfkeysvalueof{/pgf/shapes/ski/ski radius}}         \pgfsetlinewidth{.5mm}         \pgfusepath{stroke}         % body         \pgfpathmoveto{\pgf@process{\bottomleg}}         \pgfpathlineto{\pgfpointorigin}         \pgfpathlineto{\pgfpointpolar{\pgfkeysvalueof{/pgf/shapes/ski/leg               angle}}{\pgfkeysvalueof{/pgf/shapes/ski/leg length}}}         \pgfpathlineto{\pgfpointadd{%             \pgfpointpolar{%               \pgfkeysvalueof{/pgf/shapes/ski/leg angle}}{%               \pgfkeysvalueof{/pgf/shapes/ski/leg length}}}{%              \pgfpoint{%               \pgfkeysvalueof{/pgf/shapes/ski/back length}}{+0pt}}}         \pgfsetroundjoin         \pgfsetlinewidth{1mm}         \pgfusepath{stroke}         %         \pgfpathcircle{%           \pgfpointadd{%             \pgfpointpolar{%               \pgfkeysvalueof{/pgf/shapes/ski/leg angle}}{%               \pgfkeysvalueof{/pgf/shapes/ski/leg length}}}{%              \pgfpoint{%               \pgfkeysvalueof{/pgf/shapes/ski/back length}}{+0pt}}}{%           \pgfkeysvalueof{/pgf/shapes/ski/head radius}}         \pgfusepath{fill}         %       }     }


title: TeX Live 2011 vs Ubuntu TeX Live

text: Is it worth the effort to manually install TeX Live 2011 on Ubuntu? Has so much changed since 2009? I am a new Ubuntu user coming from windows and have very limited knowledge of Linux environment. I have read contradictory things about how to set up TeX Live 2011 in an Ubuntu environment and all the instructions I have found contains part that are obscure to me. Thus, I am somehow compelled to `sudo apt-get texlive`. If I only have t manually install a few package in my `~/texmf` to resolve some occasional bugs that have been fixed since 2009 that would be all right, at least until I know better. But I am wondering if I might not end up doing this a lot?


title: Biblatex: Suppress shorthand in a selection of documents

text: My problem is this: I use one biblatex-file as a source for a number of documents. In the biblatex-file I used `shorthand` in every entry. The problem is that in some documents I need to cite the references fully rather than the short form. My question: Is there something a command that I could add to my preamble in order to suppress the shorthand entry and to get full title output?


title: Bold small caps with mathpazo

text: I was using `tgpagella` but it doesn't have automatic old style numbers without resorting to `fontspec`. I was directed to use `mathpazo` like so:               \usepackage[sc,osf]{mathpazo}      How do I format `mathpazo` with **BOLD SMALL CAPS**? Here's some of my example code:               \textbf{\textsc{question:}}     \textsc{\textbf{question:}}     {\sc{\textbf{question:}}}     {\sc{\bf{question:}}}      ![enter image description here](http://i.stack.imgur.com/BLVfK.png)               \textbf{\sc{question:}}     {\bf{\sc{question:}}}      ![enter image description here](http://i.stack.imgur.com/Zx0cA.png)


title: How to install tkz-2d in TeXLive 2010?

text: How to install tkz-2d in TeXLive 2010? My directory is /usr/local/texlive/2010 but i do not know which folder to place and even how to active.


title: How can I center text/math inside a list environment?

text: When using math (display) mode in conjunction with a list environment, the displayed material is not truly centered on the page; it is only centered with respect to the indentation of the item. Consider the following example:               \begin{itemize}     \item The quadratic formula     \[     x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}     \]     \item The freshman's dream     \[     (a+b)^n=a^n+b^n     \]     \end{itemize}      How can I get the displayed math to be centered horizontally with respect to the margins of the _page_?? Of course, this question is not specific to centering a displayed equation. The same question is valid for the use of `\begin{center} text \end{center}` inside a list environment.


title: Is there a way to fix the following errors?

text: I am trying to compile a .tex file using pdflatex and I get the following two kinds of errors:               Package natbib Warning: Citation `give-citation' on page 14 undefined on input line 41.          ! Undefined control sequence.     <argument> ...e \NAT@cmt \fi \if \relax \NAT@date \relax \else \NAT@@close \...      l.46 ... information is available \cite{}      It works smoothly with pdflatex on my mac. Another error that I get on this linux box (again using pdflatex) is:                ! LaTeX Error: Unknown graphics extension: .eps.           See the LaTeX manual or LaTeX Companion for explanation.      Type  H <return>  for immediate help.      ....      l.12 ...\includegraphics[width=4.2in]{tree.eps}      These errors appear quite frequently, they are all over the document. Is it possible to fix them?


title: Can you employ \unskip to automatically place a non-breaking space before \cite or \ref?

text: It is recommended to place a non-breaking space before `\cite`, `\ref`, inline math and perhaps at few other locations. The question is whether you can design an improved version of `\cite` (say) which would gobble all the preceding spaces, insert a non-breaking space, and then proceed to calling the original `\cite`?


title: Bibliography and URLs in references

text: The functions in the end are defined in my `.bst` file. What they do is, when I add the field               webpage={http://xxx.xxx.xxx...../}      to a bibitem, it displays at the end of the reference in the bibliography the text:               ... URL: http://xxx.xxx.xxx...../      (where the three first dots indicate the rest of the reference: authors, title, journal, etc..) What I would like is that instead of **showing** the actual url, it became a link of the text _URL_. This way the reference would only show the text _URL_ at the end (and **not** the url itself) which I could click and go to that link. Is this possible? **FUNCTIONS**               ENTRY       { address         ...         webpage         year        ...       }               FUNCTION {format.webpage}     {        webpage "webpage" bibinfo.check     duplicate$ empty$ 'skip$     { new.block       bbl.availableat " \url{" * swap$ *  "}" *     }     if$     }          FUNCTION {bbl.availableat}     { "URL: " }          FUNCTION {new.block}     { output.state before.all =     'skip$     { after.block 'output.state := }      if$     }          FUNCTION {bibinfo.check}     { swap$       duplicate$ missing$     {       pop$ pop$       ""     }     { duplicate$ empty$         {           swap$ pop$         }         { swap$           pop$         }       if$     }       if$     }      * * * # Edit I tried Mico's suggestion and changed the `webpage`function like so:               FUNCTION {format.webpage}     {        webpage "webpage" bibinfo.check     duplicate$ empty$ 'skip$     { new.block           " \href{" * swap$ *  "}{URL}" *     }     if$     }      my bibfile contains only one item:               @ARTICLE{Dummy2012,       author = {{Vink}, J.~S. and {Gr{\"a}fener}, G.},       title = {{The Transition Mass-loss Rate: Calibrating the Role of Line-driven Winds in Massive Star Evolution}},       journal = {APJL},       year = {2012},       volume = {751},       pages = {L34},       month = jun,       eid = {L34},       adsnote = {Provided by the SAO/NASA Astrophysics Data System},       archiveprefix = {arXiv},       doi = {10.1088/2041-8205/751/2/L34},       eprint = {1205.0394},       keywords = {stars: early-type, stars: evolution, stars: mass-loss, stars: winds,outflows },       primaryclass = {astro-ph.SR},       webpage = {http://adsabs.harvard.edu/abs/2012ApJ...751L..34V}     }      And upon compiling I get the error:               You can't pop an empty literal stack for entry Dummy2012      and the `.bbl` file looks like this:               \begin{thebibliography}{1}     \expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi          \bibitem[{{Vink} y {Gr{\"a}fener}(2012)}]{Dummy2012}     {\sc {Vink}, J.~S.} y {\sc {Gr{\"a}fener}, G.}     \newblock {The Transition Mass-loss Rate: Calibrating the Role of Line-driven       Winds in Massive Star Evolution}.     \newblock {\em APJL\/}, vol. 751, p\'agina L34,     \newblock http://adsabs.harvard.edu/abs/2012ApJ...751L..34V \href{2012}{URL}.          \end{thebibliography}


title: Have \cleardoublepage working in oneside scrreprt

text: That seems quite elementary, but I didn't find the answer. How can I have the `\cleardoublepage` command work in a oneside environment? That seems kind of odd to ask for that, but I have to send an application file with a bunch of documents added to a `.tex` file via pdfpages. And I don't know whether it will be seen only on screen, printed on a one-sided printer or printed on a two-sided printer. So I want the layout to be one-sided for the file not to look too odd on a computer screen or if printed onesidedly. But I also want new parts of the document to start on an odd page, so that my id card is not printed on the back of my research statement in case of two-sided printing. Here is an example :               \documentclass[oneside,openright]{scrreprt}     \begin{document}     Foo1.     \newpage     Foo2.     \cleardoublepage     Foo3.     \cleardoublepage     Foo4     \end{document}      I would like "Foo4" to be on page 5, as it is in twoside mode.


title: Using em unit instead of cm in text width shifts node label

text: When `em` unit is used in `text width` style directive, resulting label shifts ever so slightly to the left from its center position directed by preceeding `text centered`. When using `cm` unit, label is exactly centered. What am I doing wrong? MWE with `em`:               \documentclass[10pt]{article}     \usepackage{tikz}     \usetikzlibrary{trees}     \tikzstyle{every node}=[draw=black, thin, minimum height=3em, font=\small]          \begin{document}          \begin{tikzpicture}[         supervisor/.style={%             text centered, text width=12em,             text=black         },         teammate/.style={%             text centered, text width=12em,             text=black         },         subordinate/.style={%             grow=down,             xshift=-3.2em, % Horizontal position of the child node             text centered, text width=12em,             edge from parent path={(\tikzparentnode.205) |- (\tikzchildnode.west)}         },         level1/.style ={level distance=4em,anchor=west},         level2/.style ={level distance=8em,anchor=west},         level3/.style ={level distance=12em,anchor=west},         level4/.style ={level distance=16em,anchor=west},         level 1/.style={%             edge from parent fork down,             sibling distance=14em,             level distance=5em         }     ]         \node[anchor=south,supervisor](super){Supervisor\\Supervisory position\\Location}[]              child{node [teammate] {Teammate6\\Position4\\Location4}             child[subordinate,level1] {node {Subordinate1}}             child[subordinate,level2] {node {Subordinate2}}}         % - why is this comment required for proper rendering of the tree???         child{node [teammate] {Teammate7\\Position5\\Location5}             child[subordinate,level1] {node {First\\Subordinate}}             child[subordinate,level2] {node {Subordinate2}}             child[subordinate,level3] {node {Third\\Teammate}}             child[subordinate,level4] {node {Longtext-\\teammate}}};          \end{tikzpicture}     \end{document}      MWE with `cm`:               \documentclass[10pt]{article}     \usepackage{tikz}     \usetikzlibrary{trees}     \tikzstyle{every node}=[draw=black, thin, minimum height=3em, font=\small]          \begin{document}          \begin{tikzpicture}[         supervisor/.style={%             text centered, text width=4cm,             text=black         },         teammate/.style={%             text centered, text width=4cm,             text=black         },         subordinate/.style={%             grow=down,             xshift=-3.2em, % Horizontal position of the child node             text centered, text width=4cm,             edge from parent path={(\tikzparentnode.205) |- (\tikzchildnode.west)}         },         level1/.style ={level distance=4em,anchor=west},         level2/.style ={level distance=8em,anchor=west},         level3/.style ={level distance=12em,anchor=west},         level4/.style ={level distance=16em,anchor=west},         level 1/.style={%             edge from parent fork down,             sibling distance=14em,             level distance=5em         }     ]         \node[anchor=south,supervisor](super){Supervisor\\Supervisory position\\Location}[]              child{node [teammate] {Teammate6\\Position4\\Location4}             child[subordinate,level1] {node {Subordinate1}}             child[subordinate,level2] {node {Subordinate2}}}         % - why is this comment required for proper rendering of the tree???         child{node [teammate] {Teammate7\\Position5\\Location5}             child[subordinate,level1] {node {First\\Subordinate}}             child[subordinate,level2] {node {Subordinate2}}             child[subordinate,level3] {node {Third\\Teammate}}             child[subordinate,level4] {node {Longtext-\\teammate}}};          \end{tikzpicture}     \end{document}      **Edit:** This is sounding like a bug, as if I add different font sizes to the label as follows: `{Teammate6\\\\\scriptsize Position4\\\\\scriptsize Location4}` then line spacing varies too.


title: How to color the characters in LaTeX2e logo?

text: I want to get the LaTeX2e logo but with each character having a different color. I know that `\LaTeXe` produces the logo, but how do I give a color to each character?


title: What is the simplest way to make a command that produces a quadratic expression?

text: I want to have a command that accepts 1 optional argument and 3 mandatory ones. Example:   1. `\qe{a}{b}{c}` produces ax^2+bx+c   2. `\qe[y]{-1}{0}{-c}` produces -y^2-c How to make this command?


title: FancyVerb error for Sweave output in Beamer

text: I'm having trouble including Sweave output in my Beamer file. Specifically, the `Soutput` environment is causing problems (it runs if I comment those lines out, but, of course, the table is not presented as a single row and in standard font). Here is the basic file:               \documentclass{beamer}     \usepackage{Sweave}     \begin{document}          \begin{frame}{Comparison}     \begin{Schunk}     \begin{Soutput}       Gender Admitted Rejected     1 Female        6        6     2   Male        6        6     \end{Soutput}     \end{Schunk}     \end{frame}          \end{document}      And the error in its gory detail:               ERROR: FancyVerb Error:          --- TeX said ---       Extraneous input `Gender Admitted Rejected 1 Female 6 6 2 Male 6 6 \end {Soutput} \end {Schunk} \end {beamer@frameslide}\ifbeamer@twoscreenstext \beamer@dosecondscreennow {{Comparison} \begin {Schunk} \begin {Soutput} Gender Admitted Rejected 1 Female 6 6 2 Male 6 6 \end {Soutput} \end {Schunk} }\fi \ifbeamer@anotherslide \advance \beamer@slideinframe by 1\relax \relax \expandafter \iterate \fi \let \iterate \relax \beamer@writeslidentry \beamer@reseteecodes ' between \begin{Soutput}[<key=value>] and line end     .     \FV@Error ... {FancyVerb Error:     \space \space #1     }          l.13 \end{frame}          --- HELP ---     From the .log file...          This input will be discarded. Hit <return> to continue.      Thanks for any assistance that you can provide.


title: Remove math from command parameter to get only the letters

text: I use a little command, which prints new defined terms in bold, adds a label and adds them to the index. `\newcommand*{\defined}[1]{{\bf #1}\label{#1}\index{#1}}` Now if I do `\defined{$G$-invariant}` the label isn't working and the index entry is ordered in the wrong place. I think that's got to do with the math dollar sign. Is there a way to strip this and get for label and index just the G?


title: bib entry for open source project

text: I tried to use any of the available bib entries for adding open-source projects to my CV, but none of them are of my liking. Is there a way to add this functionality to bibtex? I would be interested in somehow a nice formatting of a project (instead of everything showing up on a single line), where I could add the project title, type of license, url, etc. I use the cv template found in [http://www.latextemplates.com/template/medium- length-professional-cv] (this link). A bibtex record looks like the following:               @electronic{CPCPL:AESA_v1_0,         Author = {Alejandro M. Arag{\'o}n},         Date-Added = {2014-08-13 09:40:31 +0000},         Date-Modified = {2014-08-13 09:50:19 +0000},         Howpublished = {Programming language: {\C++}; Code license: GNU Lesser GPL; Catalogue identifier: AESA\_v1\_0; Distribution format: tar.gz},         Note = {Revisions:},         Title = {cpp-array, from \textit{\uppercase{C}omput. \uppercase{P}hys. \uppercase{C}ommun.} \href{http://dx.doi.org/10.1016/j.cpc.2014.01.005}{185(2014)1681}},         Url = {http://cpc.cs.qub.ac.uk/summaries/AESA_v1_0.html},         Bdsk-Url-1 = {http://cpc.cs.qub.ac.uk/summaries/AESA_v1_0.html}}      This is what I have so far, but I'm not happy with it: ![enter image description here](http://i.stack.imgur.com/ERnDq.png)


title: Line spacing in parcolumns environment

text: Is it possible to change the line spacing within a `colchunk` in a `parcolumns` environment? I tried the following without success:               \documentclass{article}     \usepackage{parcolumns}            \begin{document}          \renewcommand{\baselinestretch}{1.5}\normalsize          \begin{parcolumns}[nofirstindent]{2}     \colchunk[1]{bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla}     \colchunk[2]{\renewcommand{\baselinestretch}{1.1}\footnotesize This works not. This works not. This works not. This works not. This works not. This works not. This works not. This works not. This works not. This works not. \par}     \colplacechunks     \end{parcolumns}          {\renewcommand{\baselinestretch}{1.1}\footnotesize This works fine. This works fine. This works fine. This works fine. This works fine. This works fine. This works fine. This works fine. This works fine. This works fine. \par}          \end{document}


title: On mac, wrapfig.sty not found, but I already installed it

text: I'm on OS X, running Mavericks. I installed MacTex Basic a few days ago. I installed wrapfig with the command               sudo tlmgr install wrapfig      and it installed it. When I use the command               tlmgr list      I can see the list of every available package, and a little "i" is next to wrapfig, indicating that it IS installed. I'm on Sublime Text 2, using Skim with it, and when I try to build it, it says LaTeX Error: File `wrapfig.sty' not found. What is going on here? Where do I look to find where it installed it?


title: Looking for a style guideline to put many references in a table

text: I'm trying to create tables with references like shown. ![example tables](http://i.stack.imgur.com/zCAM9.png) Basically to nearly every entry I'd like to put a reference. The references are to the same group of explanations. But my final tables can be a half page large. So the explanation sometimes is no longer on the same page as the table. I wonder are there guidelines how to achieve something like this. So far I decided to go for footnotemarks as fully written references will use much more than the original number. I also need to use exponential number therefore I decided to use symbols instead of counters.


title: Customizing moderncv numbering pages style

text: So, I was doing something like this: `\cfoot{\color{color2}\itshape John~~Doe}` to get my name centered on bottom of each page. Now I'd like to have it in one line with page number. Now it looks like that:                                PAGE/PAGE     John Doe      And I'd like to look it like this:               John Doe         PAGE/PAGE      My name, and numbered page in one line. With `\lfoot` or `\cfoot` I can't achieve that. Also, how to start page numbering from page 2? `\setcounter{page}{2}` does not works. Thanks in advance. Minimal working example (`\newpage`'s were added ONLY to force page numbers - I don't use them in original document!):               \documentclass[11pt,a4paper]{moderncv}     \moderncvstyle{classic}     \moderncvcolor{orange}     \usepackage[scale=0.75]{geometry}     \usepackage{fontspec}          \firstname{John}     \familyname{Doe}     %\title{}     \address{street}{postcode city}     \mobile{+4~(11)~311~111}     %\phone{+2~(345)~678~901}     %\fax{+3~(456)~789~012}     \email{mail@yahoo.com}     %\homepage{www.johndoe.com}     \extrainfo{additional info}     \photo[64pt][0.4pt]{picture.png}     %\quote{}          \cfoot{\color{color2}\itshape John~~Doe}          \begin{document}          \section{Expirience}          \subsection{My work}     \cvcomputer{One}{Bla, Bla, Bla}{Two}{Bla,Bla,Bla}          \newpage          \section{Foreign Languages}     \cvitemwithcomment{English}{Fluent}{Some description here}          \newpage          \section{Other Skills}     \cvitemwithcomment{Computers}{Very good}{Some description here}          \end{document}


title: Can you make chemical structure diagrams in LaTeX?

text: Can you create diagrams of chemical structures in LaTeX? Example(s) of "chemical structure diagrams": ![Example 1](http://i.stack.imgur.com/ZlM8n.png) ![Example 2](http://i.stack.imgur.com/uvwd5.png)


title: subfloatrow: centering single subfigure

text: In the example below, how can I center the third figure (C)?               \documentclass[a4paper,12pt]{article}     \usepackage{tikz}     \usepackage{floatrow}     \usepackage{subfig}          \begin{document}     \begin{figure}[htbp]       \floatsetup{objectset=centering}       \ffigbox{%         \begin{subfloatrow}%           \ffigbox{\begin{tikzpicture}                 \draw[fill=blue] (0,0) rectangle (4,4);               \end{tikzpicture}}{\caption{A}}%         \ffigbox{\begin{tikzpicture}                 \draw[fill=blue] (0,0) rectangle (4,4);               \end{tikzpicture}}{\caption{B}}%       \end{subfloatrow}       \begin{subfloatrow}%          \ffigbox{\begin{tikzpicture}             \draw[fill=blue] (0,0) rectangle (4,4);               \end{tikzpicture}}{\caption{C}}%           \end{subfloatrow}     }{\caption{}}     \end{figure}     \end{document}      omitting the second subfloatrow gives me centering, however, I leave the subcaption numbering.


title: What are TeXLive's four different texmf folders?

text: Could someone please explain to me what the purpose of the four different texmf folders are in Mac? E.g. there is:   1. `/usr/local/texlive/2011/texmf`   2. `/usr/local/texlive/2011/texmf-config`   3. `/usr/local/texlive/2011/texmf-dist`   4. `/usr/local/texlive/2011/texmf-var` Also, when installing fonts and packages, do I place them in `/texmf` or `/texmf-dist`?


title: add "tag" to every page containing mdframed

text: Suppose I have an `mdframed` that spans several pages. Each `mdframed` will have a title but because one frame may span many pages what actually is under discussion in the frame may be lost by the reader when quickly searching for information. So, what I would like to do is add a sort of "header" to each page(just like many books put the chapter title and/or section somewhere on the page. The "header" though, is really the frame title or some other similar text that is placed on every page the `mdframed` is on except possibly the first(since it may already exists as the `frametitle`). The text probably will be vertical if on the left and right margins and horizontal if at the top and bottom. Is there any way to add this to an `mdframed`? Basically it just needs some intelligence to not add itself the first time and to do something different at the end of the frame else it will just put itself in the same place every time along the border of the frame. Update: The code demonstrates the issue/"bug" with mdframed. A frame title appears at the end of a frame but the first thing on a new page(in my case it is opposite in that it I get a frametitle without any content(on the same page) at the start instead of at the end due to the type of content I'm using. Basically the frame should end on the previous if it's content, on that page, is empty. (or in my case the frame should start on the next page (in my case I can use \newpage to fix the problem if I can put it in the right spots, which is difficult)) Also notice how rounded corners in subsequent frametitles on the same frame look bad. Roundcornershould be 0 on subsequent intra-frametitles.               \documentclass{book}               \usepackage{tikz, pgffor}     \usepackage[framemethod=TikZ]{mdframed}          \newcommand{\myframe}[2]{     \begin{mdframed}[rightline=true,     frametitlerule=true,frametitlerulecolor=blue,     frametitlebackgroundcolor=gray,repeatframetitle=true,     align=center,linecolor=gray, middlelinewidth=2pt,roundcorner=10pt, innerbottommargin=0.5cm, innertopmargin=0.05cm, frametitleaboveskip=8.5pt, skipbelow=10pt,frametitlealignment={\hspace*{0.25cm}},frametitle={#1}]#2\end{mdframed}     }%               \begin{document}               \foreach \l in {1,2,3,4,5,6,7,8,9} {\myframe{Title}{Frame \l{} content \hrule \vspace{8cm}     \hrule}}               \end{document}      ![Example](http://i.stack.imgur.com/gpuvT.png)


title: Forcing page numbers with IEEEtran

text: The `IEEEtran` document class is hiding page numbers from my document! Is it possible to force page numbers to appear in the document? EDIT: Sorry I should have mentioned that I am using conference mode!


title: Inserting the MacTeX logo into a document

text: What is the MacTeX equivalent of `\LaTeX`? `\MacTeX` doesn't work.


title: Replication of Header

text: I would like to replicate the header as shown on the pic. My problem is related to the fact that I do not manage to center the headline exactly in the middle of that 3cm range and I have difficulties with 5 units of space between the page number and the headline itself. I would be very grateful for any possible help. Thank you very much! ![enter image description here](http://i.stack.imgur.com/VjIDz.jpg)


title: What is a good way to typeset dot-separated acronyms?

text: I am trying to find a good appearance for typesetting "C.A.T.A.P.U.L.T.". When I type it as is, it appears to me that P.U.L. are bunched up together while the other letters are well apart. Perhaps this is unavoidable. I was wondering if there is a way other than the default way to produce a better result.               \documentclass[border=2pt]{standalone}          \begin{document}     C.A.T.A.P.U.L.T.     \end{document}      ![enter image description here](http://i.stack.imgur.com/hsxk5.png)


title: List of People analog to Bibliography

text: In my document I emphasize names that are mentioned and now I want to provide some additional information about them in an appendix. Currently I do something like:               \documentclass{scrartcl}     \usepackage{fontspec}     \setmainfont[Ligatures=TeX]{STIXGeneral}     \def\name#1{{\texorpdfstring{\smaller\MakeUppercase{#1}}{#1}}}     \begin{document}         Look at the works of \name{Alexandrov} and \name{Atkinson}.         \clearpage         \begin{section}*{Index of People}             \begin{itemize}                 \item \name{Alexandrov}: Па́вел Серге́евич Алекса́ндров (Pavel Sergeyevich Alexandrov), \mbox{1896-05-07} – \mbox{1982-11-16}                 \item \name{Atkinson}: Frederick Valentine Atkinson, \mbox{1916-01-25} – \mbox{2002-11-13}             \end{itemize}         \end{section}     \end{document}      Is it possible to keep the information about the people in some database file like it is done with bibliographies and have it automatically formatted? Are there any tools available or can it be done with `bibtex`? JLDiaz's answer seems like a good point to start. To be a bit more concrete, the data file should look something like:               @person{alexandrov,         name = {Па́вел Серге́евич Алекса́ндров},         latin = {Pavel Sergeyevich Alexandrov},         birthdate = {1896-05-07},         deathdate = {1982-11-16}     }      And it may certainly happen, that more fields will be added (e.g. profession, places of birth and death, nationality). So it seems whether I am using `bibtex` or the `gloss` package, I have to define my own style file. What is the difference between those two approaches? As for defining the custom entry type I found Biblatex and custom bibtex entries - is it possible?, but the explanation there does not seem well structured / complete and possibly outdated. Maybe somebody can elaborate on that.


title: After making a mistake while citing, BibTex doesn't run anymore

text: Sometimes I make an error while trying to cite in LaTeX (I use TeXstudio and MiKTeX 2.9). After this, LaTeX generally doesn't want to create any output. I tend to solve this by deleting all files in the folder I'm working from that are not .tex or .bib (sometimes just deleting .bbl and .blg is enough). This time, however, I typed `\\[for an extensive overview]citet{matthewson2004}` instead of `\citet[for an estensive overview]{matthewson2004}`. After this, no output was generated. I tried running latex then bibtex then latex then latex, after running bibtex I get the following message:               >Process started: bibtex.exe "Proposal"     >     >This is BibTeX, Version 0.99d (MiKTeX 2.9)     >The top-level auxiliary file: Proposal.aux     >I found no \bibdata command---while reading file Proposal.aux     >I found no \bibstyle command---while reading file Proposal.aux     >(There were 2 error messages)     >     >Process exited normally      This is a part of my code:               \documentclass{article}     \usepackage[top=2cm, bottom=2cm]{geometry}     \usepackage[natbibapa]{apacite}     \usepackage{tipa}      \usepackage{gb4e}     \usepackage[font=small]{caption}          \begin{document}     \title{Preliminary thesis proposal}     \author{Me}     \date{\today}     \maketitle     \tableofcontents          \section*{Introduction}     Blablabla \citep{aikhenvald2004evidentiality}. Blabla.          \bibliography{Aymarabib}     \bibliographystyle{apacite}          \end{document}


title: TeX Installation on USB

text: I would like to install LaTeX on a Uberstudent (Ubuntu) distro. The problem is that I only have a USB drive and the Uberstudent machine doesn't have internet access due to a lack of a wifi card. I do however have a USB drive but I can't figure out how to get LaTeX on it so that I can simply install it on the other machine. Any tips?


title: Problem with persian-bib package

text: I have a document where the main language should be English with only some Arabic text. In my references I have English as well as Arabic references. The main direction of the document should be from left to right, except Arabic text. The persian-bib package is working nicely but I have only one problem: I have `\begin{latin}` after `\begin{document}` and `\end{latin}` before `\end{document}` and inbetween I use `\rl{some arabic text}` but for the references I have to add `\rl{}` for all entries of a bibtex reference to show the Arabic text and also the text is still aligned from left to right because the environment as a whole is still latin. Thus the reference appears like this: برنامج .عزيزة مبارك العلوني، مريم عبد الرحمن السهلي، مهرة فارس المطيري [ 1 تعليمي الكتروني في تنمیة بعض من مهارات الاستعداد للقراءة لدى أطفال 2011 ,رسالة ماجستير غير منشورة .ما قبل المدرسة Where the text is truncated in a wrong way, making fields overlap and text discontinue because of alignment. Please tell me what I can do to solve my problem.


title: Converting greek utf letters to latex symbols

text: I have a collection of notes on my iPad, written using a markdown editor/viewer (trunk notes) that does not understand latex, but does display greek. Is there a simple way to convert the greek letters (e.g. convert the UTF-8 symbol 0xCEB1, α) to their latex equivalents (`\alpha`)? I am using pandoc for the conversion, which is pasting a LaTeX header onto the output before conversion to TeX or ConTeXt.


title: How can I allow lists to appear on odd page?

text: \documentclass[12pt,a4paper,openright]{mwrep}     \usepackage[top=2cm,bottom=2cm,left=3cm,right=2cm,twoside]{geometry}     \usepackage[section]{minted}     \usepackage{lipsum}          \begin{document}     \tableofcontents     \listoffigures     \listoflistings          \chapter{c1}     \lipsum     \begin{figure}     .     \label{f1}     \caption{figure}     \end{figure}     \lipsum     \begin{listing}     .     \label{l1}     \caption{listing}     \end{listing}          \chapter{c2}     \lipsum     \end{document}      In this MWE I want to start each chapter at even page. I want to make an exception for `\listoffigures` and `\listoflistings`. How can I do that?


title: TeX equivalent to #line

text: In C there is `#line` which allows stating the origin of a particular line of code. This is useful for autogenerated C source files: The (unreadable) code in the generated file is mapped back to the original source. All subsequent lines will inherit the file name from the last `#line` directive and advance the line counter. Here's a completely artificial example: Source file `input.in`:               a <- b* c     c <- (a)      Autogenerated C source `input.in.c`:               #line 1 "input.in"     while (b) do_b();     #line 1 "input.in"     do_c();     #line 2 "input.in"     do_open_paren();     #line 2 "input.in"     do_a();     #line 2 "input.in"     do_close_paren();      Is there something similar in TeX? What would have to be done to make TeX think that it is in a particular line of a particular source file, effective from the beginning of the next line? The purpose of this exercise is to have SyncTeX refer to the original file instead of the autogenerated code. Autogenerated TeX files appear when you knit R, and also if you Replace \input{fileX} by the content of fileX automatically. Of course, the code generator will have to emit the `#line` equivalent into the generated code.


title: Special characters in bibliography with natbib

text: I'm trying to generate a bibliography using the package natbib. Everything works fine if I use the style plainnat provided with natbib. But when I change the style file (for example Ecology or APA) I get such log messages :               Invalid UTF-8 byte or sequence at line 290 replaced by U+FFFD.     Missing character: There is no � in font [lmroman10-regular]:mapping=tex-text      And special characters like Å are disapearing. I use Xelatex for compilation. Thanks for any help !               \documentclass[11pt,a4paper]{article}          \usepackage[english]{babel}     \usepackage{fontspec}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{textcomp}     \usepackage{graphicx}     \usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}     \usepackage[colorlinks=true, citecolor=blue]{hyperref}     \usepackage{multirow}     \usepackage[round]{natbib}      Sample of my .bib file In this case the first letter of the surname of the first author               @article{ARRHENIUS_2004_PRE,      title = {Predictability of the mixture toxicity of 12 similarly acting congeneric inhibitors of photosystem {II} in marine periphyton and epipsammon communities},      volume = {68},      url = {sciencedirect.com/science/article/pii/S0166445X04001298},      number = {4},      urldate = {2013-05-29},      journal = {Aquatic Toxicology},      author = {Arrhenius, Åsa and Grönvall, Frederick and Scholze, Martin and Backhaus, Thomas and Blanck, Hans},      year = {2004},      pages = {351–367}     }


title: Check if compiled using MiKTeX or TeX Live?

text: > **Possible Duplicate:**   >  Is there a way to detect from inside a package that MikTeX is used? We have multiple people writing on the same project. Since some of us are TeX Livers and other MiKTeXers, I was curious if there was some way to check within a TeX file, with which LaTeX/pdfLaTeX distribution one is compiling? I have been fairly successful using `ifplatform` to remove some issues between Linux and Windows compilations, but am still facing some problems between MiKTeX and TeX Live. Although, in my opinion a cross platform and cross TeX system compatible compilation may be a bit over the top...


title: Export Graphs from OriginPro with LaTeX Typesetting

text: I've looked online for an answer to my question, but I was wondering if it's possible to export graphs from OriginPro for inclusion into a LaTeX document using LaTeX typesetting? I'm using `PDFLaTeX` when compling my document. If not, could anyone recommend a suitable alternative?


title: Mapping from Unicode character to LaTeX-Symbol for BibTeX?

text: I'm writing a little BibTeX exporter for the publication database of my institute. We do have a lot of authors with all kind of weird characters in their names, which get the "WTF is Unicode?"-treatment from BibTeX. As I have to preprocess author names and titles before exporting anyway, I thought that I could replace as much unicode characters as possible with their LaTeX equivalent. There's an image with such a mapping on bibtex.org: ![mapping](http://i.stack.imgur.com/lPA0t.png) But that image is   1. incomplete (e.g. capital German umlauts are missing) and    2. not of much use to me in this form. Does someone know of such a mapping that is as complete as possible and available in a machine-readable format? **Edit** : Juan's XML is probably as complete as it gets (I'll post a Python dictionary reduced to unicode and LaTeX on github). But in the meantime, I also found the mapping that Zotero uses. It can be found in their SVN- Repository. **Edit2** : OK, the Python dictionary can be found here, and the XSL Style Sheet to convert Juan's XML into a Python dictionary is here.


title: How to display the font size in use in the final output

text: How can I display the font size in use at a particular point of the document. For example, in the following code, I produced a PDF file showing the fonts actually used for each shape and size,               \documentclass{article}          \usepackage{fontspec}     \usepackage{pgffor}     \usepackage{xcolor}          \definecolor{mred} {cmyk}{0,1,1,0.6}     \definecolor{mblue}{cmyk}{1,1,0,0.2}          \setmainfont{Minion Pro}          \long\def\testfont{       \foreach \size in       {normalsize, Large, Huge}       {\csname\size\endcsname\testshape}}          \long\def\testshape{       \vskip\baselineskip       \csname\size\endcsname\size       \vskip\baselineskip       \foreach \shape in {up, it, sc, bf}       {\par\csname text\shape\endcsname         {           \textcolor{mred}{\directlua{tex.print(font.fonts[font.current()].fullname)}}           \textcolor{mblue}{\shape}         }}       \vskip\baselineskip}          \begin{document}       \pagestyle{empty}       \flushleft       \rmfamily\testfont\vfill     \end{document}      This will produce the following. (as you see `fontspec` or `luaotfload` does not select correct optical fonts, see my answer for Using MinionPro for the main font and Fontspec for the monospaced font of how to workaround this) My question is that, instead of print "normalize", "Large", "Huge", I would like to print things like "10pt" or just "10", so I can see the actual font size, just like in this example I can see the actual fonts used. I know this can be done with things like Acrobat. But in that way, one has to click numerous times of his mouse to examine the fonts. I would prefer a more automatically way, similar to the way I print the fonts names in the example. Many thanks in advance. ![fonttest](http://i.stack.imgur.com/xim8Z.png)


title: AMSTeX table of contents

text: I'm using the docoumentclass `amsart`. Two things I don't like:   1. The table of contents (TOC) looks kind of poor, is there an easy way to change it? I like it from `article` more.   2. If I use `\section*{bla}` it still appears but without number in the TOC. How can I make a section that does not appear in the TOC?


title: How can I draw this Venn-like diagram using rectangles in TikZ?

text: I have been looking into TikZ figures and can somewhat adapt them. To create one that has the capabilities that I would like is another matter. For my thesis I am looking to create this figure![Company overview](http://i.stack.imgur.com/BvpV6.png) I know it is a simple one but I am struggling with the alignment So i have been fiddling a bit the result is not bad, but id like to line out the green boxes This is my MWE:                   \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning, fit, calc, shapes, arrows}     \renewcommand{\figurename}{Figure}          \begin{document}          \begin{figure}[!htb]         \centering         \begin{tikzpicture} [             title/.style={font=\fontsize{18}{18}\color{black!45}},             capt/.style={font=\fontsize{18}{18}\color{black!45},node distance=10em,anchor=west},             firm/.style={rectangle, draw, fill=blue!23, rounded corners, minimum width=6em,fill opacity=0.5},             industry/.style={rectangle, draw, fill=green!23, rounded corners, minimum width=25em,fill opacity=0.3},             region/.style={rectangle, draw, fill=red!23, rounded corners, minimum height=2em,fill opacity=0.3},             ]             % Place nodes             \node (dummy) {};             \node [title] (in)[right=2cm of dummy] {India};             \node [title] [below=5mm of in] (infy) {Infosys};                  \node [title] (wp) [below=1.5cm of in]  {WiPro};             \node [firm] (InIt) [draw=black!50, fit= (infy) (wp)] {};                            \node [title] (eur) [right=2cm of in] {Europa};                     \node [title] (cap) [below=5mm of eur] {Cap};             \node [title] (Ts)  [below=1.5cm of eur] {Tsystems};             \node [firm] (EuIt) [draw=black!50, fit= (cap) (Ts)] {};                            \node [capt] (its) [below=1.25cm of dummy] {IT Services};             \node [capt] (ph) [below=3.5cm of dummy] {Pharmaceutical};                  \node [industry][draw=black!50, fit=(its)(InIt)(EuIt)]{};              \node [title] (ran) [below=3cm of in]  {Ranbaxy};             \node [title] (cip) [below=4cm of in]  {Cipla};             %\node [draw=black!50, fit=(ph)(wp)(cap)]{};                   \node [title] (nov) [below=3cm of eur]  {Novartis};             \node [title] (gsk) [below=4cm of eur]  {GSK};             \node [firm] (EuPh) [draw=black!50, fit= (nov) (gsk)]  {};             \node [firm] (InPh) [draw=black!50, fit= (ran) (cip)]  {};                  \node [region] [draw=black!50, fit=(eur)(EuPh)]{};              \node [region] [draw=black!50, fit=(in)(InPh)]{};              \node [industry] [draw=black!50, fit=(ph)(InPh)(EuPh)]{};               \end{tikzpicture}         \caption{Clients graph}     \end{figure}          \end{document}


title: How can I save any sentence using short-cut key for future use?

text: Using the tool 'macro' in MS-word we can save any text 'word' or 'sentences'through a short cut key and use them using that key. As for example, I want to create a short cut key of the sentence `This is a macro tool.`to use later. In MS word we can save this sentence using 'Ctrl+K'(say).If I want to get the sentence ``This is a macro tool'' I have to press 'Ctrl+K'. Is there any such way in Latex ?


title: How to find intersections between line and rectangle with rounded corners

text: I'm trying to display a line "under" a rectangle. For this I tried using the intersections package, but somehow I the line doesn't stop:               \documentclass[a4paper]{article}     \usepackage{tikz}     \usetikzlibrary{intersections}     \begin{document}          \begin{tikzpicture}     % rectangle     \fill[name path=hrectangle, fill opacity=.5, rounded corners=1ex, shift={(-4cm,0cm)}, rotate=-30] ( -1,-.5) rectangle ( 1,.5);          % line     \draw[name path=x axis, <->, dashed] (7,0) -- (-4,0);          % intersection     \path[name intersections={of= x axis and hrectangle}];     \foreach \i in {1,...,2}         \fill [color=red] (intersection-\i) circle (2pt) ;          \end{tikzpicture}     \end{document}      When I compile I get the error :               Package pgf Error: No shape named intersection-1 is known.     Package pgf Error: No shape named intersection-2 is known.      Is there any other way I can do it? Edit: The problem appears when I add the rounded corner of the rectangle...


title: How to type geographical coordinates in LaTeX tables?

text: I am trying to type geographical coordinate such as:               N 52° 58.110'     E 00° 40.070'      in table. Please excuse me for that I have start leaning about LaTeX just three weeks ago. I would appreciate your help. Thanks


title: multiple legends in pgfplot

text: The problem: I have plots with 8 lines, and need to put the legend for all 8 lines into the plot. The document format is IEEE, and the plots need to fit in the single column. The current solution: I've been able to split the plots by creating two axis, like so:               \begin{tikzpicture}       \begin{axis}[xlabel=Average Degree, ylabel=Total Weight, legend style={at={(.95,.69)}, label={[font=\footnotesize]left:K/Y+R}, font=\footnotesize, anchor=south east}, legend columns=2, cycle list name={four-1-0}]         \addplot+[grt] table  [x=links, y=star-red]{\averageone};         \addplot+[grt] table  [x=links, y=star-red]{\averagetwo};         \addplot+[grt] table  [x=links, y=star-red]{\averagethree};         \addplot+[grt] table  [x=links, y=star-red]{\averagefour};         \addplot+[inv] table [x=links, y=mat-red]{\averageone};         \addplot+[inv] table [x=links, y=mat-red]{\averagetwo};         \addplot+[inv] table [x=links, y=mat-red]{\averagethree};         \addplot+[inv] table [x=links, y=mat-red]{\averagefour};         \legend{(120),(120),(480),(960)}       \end{axis}       \begin{axis}[axis x line=none,axis y line=none, legend style={at={(.95,.68)}, label={[font=\footnotesize]left:DGMM+R}, font=\footnotesize, anchor=north east}, legend columns=2, cycle list name={four-0-1}]         \addplot+[inv] table  [x=links, y=star-red]{\averageone};         \addplot+[inv] table  [x=links, y=star-red]{\averagetwo};         \addplot+[inv] table  [x=links, y=star-red]{\averagethree};         \addplot+[inv] table  [x=links, y=star-red]{\averagefour};         \addplot+[bls] table [x=links, y=mat-red]{\averageone};         \addplot+[bls] table [x=links, y=mat-red]{\averagetwo};         \addplot+[bls] table [x=links, y=mat-red]{\averagethree};         \addplot+[bls] table [x=links, y=mat-red]{\averagefour};         \legend{,,,,(120),(120),(480),(960)}       \end{axis}     \end{tikzpicture}      The first axis is visible, the second is invisible. The `[inv]` style creates a line with no line, the `[grn]` and `[bls]` tags generate the orange and blue lines, and the cycle lists `four-0-1` and `four-1-0` set the marks on the invisible lines to `none`. There are orange lines with circles of the same color as the squares on the blue lines in the bottom two lines, but they are hard to see in this picture. The macros are defined as follows:               \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage{pgf}     \usepackage{tikz}     \pgfplotstableread{plts/experiment8b1_av.tab}\averageone     \pgfplotstableread{plts/experiment8b2_av.tab}\averagetwo     \pgfplotstableread{plts/experiment8b3_av.tab}\averagethree     \pgfplotstableread{plts/experiment8b4_av.tab}\averagefour     \pgfplotscreateplotcyclelist{four-1-0}{%       every mark/.append style={fill=teal}\\%       every mark/.append style={fill=green}\\%       every mark/.append style={fill=orange}\\%       every mark/.append style={fill=pink}\\%       every mark/.append style={fill=none}\\%       every mark/.append style={fill=none}\\%       every mark/.append style={fill=none}\\%       every mark/.append style={fill=none}\\%     }     \pgfplotscreateplotcyclelist{four-0-1}{%       every mark/.append style={fill=none}\\%       every mark/.append style={fill=none}\\%       every mark/.append style={fill=none}\\%       every mark/.append style={fill=none}\\%       every mark/.append style={fill=teal}\\%       every mark/.append style={fill=green}\\%       every mark/.append style={fill=orange}\\%       every mark/.append style={fill=pink}\\%     }     \tikzstyle{bls}=[blue, solid, mark=square*]     \tikzstyle{grt}=[red, solid, mark=*]     \tikzstyle{inv}=[draw=none]      Obviously, this won't compile unless you have the relevant data files, but the output looks like this: ![graph](http://i.stack.imgur.com/EN45X.png) The question: Is there an elegant way to accomplish something very similar to this without building two axis? In some of the other plots I have the two legends have to be in completely different parts of the plot in order to fit them in.


title: Per mille symbol in classicthesis style

text: I need the _per mille_ (`\textperthousand`) symbol in math mode and text in a `classicthesis` style document. Instead, in the PDF, I get a percent symbol followed by a small, black square. For example, this LaTeX code               For example, for carbon-13,     \[     \delta^{13}{\textrm C} =     \left(     \frac{ \left( \frac{^{13}\textrm C}{^{12}\textrm C} \right) _{sample}- \left(\frac{^{13}\textrm C}{^{12}\textrm C}\right)_{standard}}%     {\left(\frac{^{13}\textrm C}{^{12}\textrm C}\right)_{standard}}%     \right) \times 1000 \qquad\textperthousand     \]     This value, represented by a delta ($\delta$) prefixing the mass number and symbol for the element, is in parts per thousand or \emph{permil} (\textperthousand).      produces correct output when typeset using PDFLaTeX or XeLaTeX using the `article` style but not when typeset using PDFLaTeX with the `classicthesis` style. Is there something I can do to obtain the correct symbol?


title: Setting single row height with multirow

text: I have a table in LyX document. And I'm using multirow to span text across multiple rows. For example I might want the text to span across 2 rows, the problem occurs when it doesn't fit, then it just goes over the cell border (to third cell). Is there a way to set row height manually for single row? Or even better could is there a way to update multirow such that it will automatically enlarge cells when text inside them is too big? This is the Lyx source for it:               \begin{tabular}{|c|c|}     \hline      a & b\tabularnewline     \hline      \hline      \multirow{2}{2cm}{Text spanning over two fields} & \tabularnewline     \cline{2-2}       & \tabularnewline     \hline      \end{tabular}