title: What is happening to the quotes?

text: Here is my MWE:               %!TEX TS-program = xelatex     \documentclass[a4paper]{report}     \usepackage{xltxtra}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont{Times New Roman}          \begin{document}     ``abcde''     \end{document}      This produces: ![enter image description here](http://i.stack.imgur.com/0Kg9w.png) If I comment out the `\defaultfontfeatures` line, the result is: ![enter image description here](http://i.stack.imgur.com/Rc3QX.png) If I remove both that and the use of `xltxtra` (and obviously the `\setromanfont`), I get: ![enter image description here](http://i.stack.imgur.com/zu9SY.png) So the question is: what is happening to the quotation marks? What does `xltxtra` do to them and what does `\defaultfontfeatures` do?


title: How I can delete title after pagebreak in mdframed box?

text: How I can delete frametitle after pagebreak in mdframed box? I try to make a box with the title "Summary" by mdframed package. With the code I attach, the title "Summary" appears in the second page after pagebreak. But I think it seems not good looking. How I can delete the title "Summary " after pagebreak?               \documentclass{book}          \usepackage[framemethod=pgf]{mdframed}     \usepackage{lipsum}          \tikzstyle{titlebox} = [draw=black,white,fill=white,text=black,right, minimum height=.5cm]          \makeatletter     \renewrobustcmd\mdfcreateextratikz{%         \node[titlebox,xshift=\tmplen,anchor=center] at (P-|O) {\raisebox{3\depth}{\mdf@frametitlefont{ Summary }}};}          \newlength\tmplen          \mdfdefinestyle{myboxstyle}{%     outerlinewidth=.4pt,     innerlinewidth=0pt,     roundcorner=0pt,     linecolor=black,     innertopmargin=1.5\baselineskip,     innerbottommargin=.5\baselineskip,     skipabove=4.5ex,     skipbelow=3ex,     needspace=3\baselineskip,     frametitlefont=\sffamily\bfseries,     leftmargin=-.5em,     rightmargin=-.5em,     settings={\tmplen=\dimexpr\linewidth-\leftmargin+\rightmargin-2\mdf@outerlinewidth@length\relax\tmplen=.5\tmplen},     }     \makeatother          \begin{document}     \lipsum[3]          \begin{mdframed}[style=myboxstyle]     \lipsum[1]     \lipsum[1]     \lipsum[1]     \end{mdframed}          \end{document}


title: Adjustbox ate my newlines

text: Apologies for the long MWE. Wanted to understand what I was doing wrong here. Trying to shrink this as part of a longer exercise in producing some slides. (This is the legend for a graphic referenced elsewhere on the site). Why is adjustbox doing this? How can I stop it.               \documentclass[10pt,landscape]{article}     %\usepackage{preamble}     \usepackage[left=0.5in,right=1in,top=2in,bottom=1.5in]{geometry}     \usepackage{tikz}     \usepackage{textpos}     \usepackage{adjustbox}     \usepackage{marvosym}     \usepackage{anyfontsize}     \usepackage{xcolor}     \PassOptionsToPackage{table}{xcolor}     \PassOptionsToPackage{kernelfbox}{xcolor}          \usetikzlibrary{positioning,shapes.geometric,shapes,arrows,chains,mindmap,trees,backgrounds}     \setlength{\TPHorizModule}{1in}\setlength{\TPVertModule}{1in}               \definecolor{ablue1}{RGB}{0,79,182}     \definecolor{agrey1}{RGB}{164,174,181}     \definecolor{ablue2}{RGB}{0,169,224}     \definecolor{agrey2}{RGB}{81,98,111}     \definecolor{ablue3}{RGB}{114,199,231}     \definecolor{agreen1}{RGB}{89,179,55}     \definecolor{ayellow1}{RGB}{255,184,28}     \definecolor{agreen2}{RGB}{39,89,55}     \definecolor{ablue4}{RGB}{194,222,234}     \definecolor{agreen3}{RGB}{0,121,52}     \definecolor{agreen4}{RGB}{169,220,146}     \definecolor{aorange}{RGB}{229,114,0}     \definecolor{ayellow2}{RGB}{248,234,142}          \def\Mgt{\textcolor{agrey2}{\Gentsroom}}     \def\Inveq{\textcolor{ayellow1}{\Gentsroom}}     \def\Invfi{\textcolor{ayellow2}{\Gentsroom}}     \def\Rel{\textcolor{agreen1}{\Gentsroom}}     \def\Rem{\textcolor{ablue2}{\Gentsroom}}     \def\Adm{\textcolor{aorange}{\Gentsroom}}     \def\Rsk{\textcolor{agrey1}{\Gentsroom}}     \def\Bzd{\textcolor{ablue4}{\Gentsroom}}     \def\Sup{\textcolor{agreen3}{\Gentsroom}}          \usepackage{helvet}     \renewcommand{\familydefault}{\sfdefault}          \begin{document}          \begin{textblock}{2}[0,0](0,-2)     \begin{minipage}[r][0.5\textheight][b]{0.25\paperwidth}     \adjustbox{scale={0.75}}{     {\Mgt} {\scriptsize Msldfk} \par      {\Bzd} {\scriptsize Bsadlfsj} \newline     {\Rsk} {\scriptsize Rwelj} \tabularnewline     {\Rem} {\scriptsize Rweld} \\     {\Adm} {\scriptsize Afddsf} \\     {\Rel} {\scriptsize Refsdfd} \\     {\Invfi} {\scriptsize Fikjlkjklj} \\     {\Inveq} {\scriptsize Ejknsdfd}\\     {\Sup} {\scriptsize Support}\\     }     \end{minipage}     \end{textblock}          \end{document}


title: Problem with sans serif font in Komascript

text: I want to make a complex, custom titlepage with graphics etc. (I don't see that using the default template is an option). I want to use the "TeX Gyre Pagella" serif font (-> http://www.tug.dk/FontCatalogue/tgpagella/) for the "normal" text and a sans serif font for the title page (maybe also for chapter, section names etc.). If I load the Gyre Pagella font a sans serif version of this font is also loaded, right? The problem is that I want the title text bold and in sans serif but it doesn't work (I can't get it bold). Is such a case not "defined" in the font definition file? Is it possible to use another sans serif font in Komascript?               \documentclass{scrbook}     \usepackage{tgpagella}     \usepackage[T1]{fontenc}          \usepackage{blindtext}          \begin{document}     \begin{titlepage}     \begin{center}     \vspace{5cm}     \textsf{     \textbf{\fontsize{30}{30}\selectfont A very long title}\\[2cm]     Mr. Author\\     \vspace{2cm}     2013     }     \end{center}     \end{titlepage}          \chapter{Some text using a serif font}          \blindtext          \end{document}


title: customized caption and label for adjustbox

text: The question is a follow up of the question posted here how to make adjustbox work correctly .               \documentclass{scrartcl}     \usepackage{adjustbox}     \usepackage{wrapfig}     \usepackage{lipsum}     \usepackage{tikz}     \newenvironment{bluebox}{%         \noindent         \adjustbox{innerenv={varwidth}{\dimexpr\linewidth-2\fboxsep-0.45cm\relax},         margin=\fboxsep+.25cm \fboxsep+.2cm,bgcolor=blue!10,frame,center}\bgroup     }{%         \egroup     }     \begin{document}     \lipsum[3-5]     \begin{wrapfigure}{L}{3.00in}     \begin{bluebox}      { \bf{Box 1: My caption here}}\\     \tikz \draw[line width=.1cm, red] (0,0) -- (\linewidth,0);     \lipsum[4]     \end{bluebox}     \end{wrapfigure}     \lipsum[3-5]     \end{document}      This is rendered as follows: ![enter image description here](http://i.stack.imgur.com/VGt0m.png) If it is not an overkill then is it possible that Box 1 becomes the label and the text following it is the caption.


title: Is a three-column footnote layout possible?

text: I'm contemplating the idea of a document layout where citations are author- year-style, but given as footnotes. That is, those notes would be (for the most part) very short, which is a bad match for the one-column footnote layout of the standard classes. One possible remedy is to consolidate footnotes into a single paragraph per page, as done (e.g.) by the `para` option of the `footmisc` package:               \documentclass{article}          \usepackage[para]{footmisc}          \begin{document}          \null\vfill% just for the example          Some text.\footnote{Author 2001} Some more text.\footnote{Buthor 2002}         And some more.\footnote{Cuthor 2003} Does this text ever end?\footnote{Duthor 2004}         Yes.\footnote{Euthor 2005}          \end{document}      ![enter image description here](http://i.stack.imgur.com/4hNHz.jpg) Another option is to typeset footnotes in two columns (with the running text still one-column). This can be achieved with the `dblfnote` package:               \documentclass{article}          \usepackage{dblfnote}     \DFNalwaysdouble% no attempt to fit footnotes into a single column          \begin{document}          \null\vfill% just for the example          Some text.\footnote{Author 2001} Some more text.\footnote{Buthor 2002}         And some more.\footnote{Cuthor 2003} Does this text ever end?\footnote{Duthor 2004}         Yes.\footnote{Euthor 2005}          \end{document}      ![enter image description here](http://i.stack.imgur.com/xReP2.jpg) What I'm looking for is a layout similar to that of `dblfnote`, but with footnotes typeset in _three_ columns. Can this be done with reasonable effort? (I'm hoping for a clever hack of either `dblfnote`'s macros or of the typesetting routines of the `multicol` package.) Notes: `multicol`-like column balancing is not required, and I'm indifferent as to whether column breaks within footnotes should be permitted or not (`dblfnote` offers both options).


title: Left column with a figure to the right (Beamer)

text: I can't understand how to make a column to the left with a figure to the right: Here is one example of what I did:                \documentclass{beamer}         ...      \begin{frame}\frametitle{Title}      \begin{columns}      \begin{column}{\textwidth}      Composition:      \begin{itemize}      \item first item      \end{itemize}      \end{column}       \end{columns}           \begin{figure}      \includegraphics[scale=0.25]{fig}       \caption{}      \end{figure}      \end{frame}      The figure compares in the middle, how flush it to the right?


title: Different type of captions

text: I have four tables. The first table has a caption of `Table A: Title`. The other three tables have captions of `Table 1: Title`, `Table 2: Title`, and `Table 3: Title`. When I use                \caption{Title}      it gives me `Table 1: Title`, `Table 2`, `Table 3`, and `Table 4`, but I don't want this format.


title: Bookmark level unknown for first usage of newtheorem

text: The MWE below produces the following message in the log: > Package hyperref Info: bookmark level for unknown thm defaults to 0 on input > line 12 How can I prevent this?               \documentclass{article}          \usepackage{amsmath}     \usepackage[amsmath,hyperref]{ntheorem}          \newtheorem{thm}{Theorem}          \usepackage{hyperref}          \begin{document}       \begin{thm}         $1+1=2$       \end{thm}            \begin{thm}         $1-1=0$       \end{thm}     \end{document}      Note that the message does not appear for the second theorem. So I suppose it has something to do with intialisation ... PS: If anyone thinks the `theorems` tag is inappropriate, feel free to delete it!


title: Report with three numbered levels, inline text on

text: I'm new to latex so please forgive me if this question has already been asked/is obvious. I'm looking to have a document look like: **1. Chapter** **1.1 Section** 1.1.1 Paragraph text here in the 'subsection' The problem being that the subsection pushes the text down to the next line and is bold etc., basically acts as it should (a subsection). Is there a common method of making the subsection act and appear as a paragraph? My latex document currently looks like               \documentclass[12pt,a4paper,twoside]{memoir}     \chapterstyle{hangnum}     \begin{document}     \setcounter{secnumdepth}{3}     \chapterstyle{section}     \chapter{something}     \section{blah}     \subsection{}     This is offset on the next line, it should be on the same line.     \end{document}


title: In Lyx, how to change the "Part" section to "Chapter"?

text: I am using the default Lyx document "article". My sections range from "Part" to "Subsubsection". When I compile my pdf, I would like to replace " **Part** 1 Title1", "Part 2 Title2", etc by " **Chapter** 1 Title1", "Chapter 2 Title2", etc. Any idea how to do that? Many thanks in advance!


title: Reference Page of Float Object only if Page isn't actual page

text: Is it possible to tell LaTeX only use \pageref if the referenced object isn't on actual page?               if \pageref{fig:hello_world} != self.page then       \pageref{fig:hello_world}     end


title: Plotting a function when date coordinates are used (pgfplots)

text: I want to plot a simple function on a plot where date coordinates are used in x but it seems that pgfplots cannot accept both. Here's a MWE of what I'm trying to achieve:               \documentclass{standalone}       \usepackage{pgfplots}       \usepgfplotslibrary{dateplot}       \pgfplotsset{compat=1.9}          \begin{document}      \begin{tikzpicture}       \begin{axis}[date coordinates in=x,date ZERO=2013-08-18,                    xticklabel=\month-\day,ymin=0,ymax=10000]        \addplot coordinates {         (2013-08-18, 14)         (2013-08-25, 245)         (2013-08-31, 3412)         (2013-09-04, 4567)         (2013-09-05, 5001)         (2013-09-12, 6891)         (2013-09-13, 7456)         (2013-09-15, 8234)         (2013-09-21, 9456)        };        \addplot [red] expression {1/(1+exp(-x))};  % <-- fails if uncommented       \end{axis}      \end{tikzpicture}     \end{document}      From what I understand, pgfplots cannot accept a domain when date coordinates are used because they are not really numbers. So `domain=2013-08-18:2013-09-21` won't work, not even when each date is surrounded by braces. `samples at` was not effective either. I wonder if it is possible to use a dynamically set domain--the Unix epoch of `date ZERO`, via Lua perhaps? Or is not possible at all to combine dates and have a domain for a function?


title: Problem in adjusting contour label color and numbr of samples in pgfplot

text: I am trying to create a contour plot using TikZ. I have two questions:   1. How can I change the contour labels color to all black?   2. Is it normal that gnuplot responds slow for creating smoother contour lines? what is the best way of creating a smooth contour line? The code that I used is as follows:               \begin{tikzpicture}         \begin{axis}[             title = {$\omega_\phi\left(x, \sigma\right) = \frac{\Gamma}{\pi{R_c}^2}\exp\left[-\frac{\left(x-x_0\right)^2+\left(\sigma-R_0\right)^2}{{R_c}^2}\right]$},             xmin=1.5, xmax=3.5,             ymin=1.5, ymax=3.5,             view={0}{90},         ]         \addplot3[             contour gnuplot = {contour label style={draw=black},},             samples=10,             contour/draw color={black},             ]         {1/3.1415/0.25^2*exp(-((x-2.5)^2+(y-2.5)^2)/0.25^2)};         \end{axis}     \end{tikzpicture}      When I want to create a smoother plot by using for example 200 samples, It takes a long time to respond. Is this normal? Because I have a super powerful computer. Even with 200 sample points, it does not produce the smooth contour line that I want. I am thinking of using 1000 sample points which takes forever. Everytime I want to compile my paper, I have to wait for a long time for a figure to see the whole PDF of my paper. Is there a better and faster way of creating a smooth contour lines? Also, the label colors are mapped. I tried to force it to black but it used mapped color. The following is result of the above code using 10 samples. ![enter image description here](http://i.stack.imgur.com/TylAP.png) Could someone help me?


title: What is the difference between 'fil' and 'fill'?

text: TeX provides the commands `\vfil` and `\vfill` (and their corresponding horizontal versions `\hfil` and `\hfill`). These commands are actually defined as:               \vskip 0cm plus 1fil     \vskip 0cm plus 1fill      where 'fil' and 'fill' (and in fact `filll`) are units of infinite glue with increasing orders of infinity. Here's a quote from the TeXBook (p. 71): > TeX actually recognizes several kinds of infinity, some of which are “more > infinite” than others. You can say both `\vfil` and `\vfill`; the second is > stronger than the first. In other words, if no other infinite stretchability > is present, `\vfil` will expand to fill the remaining space; but if both > `\vfil` and `\vfill` are present simultaneously, the `\vfill` effectively > prevents `\vfil` from stretching. You can think of it as if `\vfil` has one > mile of stretchability, while `\vfill` has a trillion miles. This much I know, at least in theory, and I also know that I can use the `fil` and `fill` versions of the spacing commands with different effects. What I'm less clear on, is why the commands work the way they do, and what the whole concept of "infinite glue" actually means. So can someone help to elucidate the Knuth quote a bit?


title: algorithmicx: shorten algorithm

text: My algorithms takes up too much space in the document. I would like to do 2 things:   * set the width bigger, so the lines which does not fit to a single line would do   * remove lines with `end` keywords (i.e. closing tags or whatever they are called) Are these things possible? Sorry if these question are lame, but I'm pretty new to TeX, I use LaTeX only for algorithms, I'm writing my document in another format. **UPDATE:** Example: Complete document:               \documentclass{article}     \usepackage{algorithm}     \usepackage{algpseudocode}     \usepackage{amsmath}     \begin{document}          \begin{algorithm}          \begin{algorithmic}[1]          \Function {NMS3D}{$T : array[1..w, 1..h, 1..d], n: int$}         \State \Comment $(2 n +1) \times (2 n +1) \times (2 n +1)$ szomsz\'eds\'gban keress\"uk a lok\'alis maximumokat          \State label \textbf{mainloop:}         \ForAll {$(i, j, k) \in \{ n, 2n+1, ... \}^3 \cap [1..w - n] \times [1..h - n] \times [1..d - n] $}             \State \textbf{initialize:} $(i_{max}, j_{max}, k_{max}) \gets (i, j, k)$             \ForAll {$(i_2, j_2, k_2) \in [i, i+n] \times [j, j+n] times [k, k+n]$}                 \If {$T[i_2, j_2, k_2] > T[i_{max}, j_{max}, k_{max}]$}                     \State $(i_{max}, j_{max}, k_{max}) \gets (i_2, j_2, k_2)$                 \EndIf             \EndFor             \ForAll {$(i_2, j_2, k_2) \in [i_{max}-n, i_{max}+n] \times [j_{max}-n, j_{max}+n] \times [k_{max}-n, k_{max}+n]                  - [i, i+n] \times [j, j+n] \times [k, k+n]$}                 \If {$T[i_2, j_2, k_2] > T[i_{max}, j_{max}, k_{max}]$}                     \State \textbf{continue} mainloop                     \State \Comment a maximum jel\"olt t\'ul k\"ozel van egy m\'asik maximumhoz, elvetj\"uk                 \EndIf             \EndFor                      \State $list_{max} \stackrel{add}{\longleftarrow} (i_{max}, j_{max}, k_{max})$         \EndFor         \State \textbf{return} $list_{max}$     \EndFunction               \end{algorithmic}     \end{algorithm}     \end{document}      Here is the result, corrected with red, on what I would like to be changed (with MS Paint, yeah I do have some epic Paint skillz right?): ![](http://i.stack.imgur.com/Rnxhb.png) Comments are in Hungarian, don't mind that


title: Overlapping material

text: In another question, Harald showed how to make vertical leaders. Armed with this knowledge, I set sail to answer another question, but as I've tried to put such leaders into a page with other material as well, the leaderfill always takes up the whole page. Is there a general way to typeset something onto a page, which then would be handled by TeX as if nothing had been typeset at all (i.e., it wouldn't take any kind of space away from other material)? Example:               \newbox\needlebox\setbox\needlebox=\vbox{\hsize=2em$\cdot$}     \def\needlefill{\cleaders\copy\needlebox\vskip0pt plus 1fill}     \llap{\hbox to 2em{\vbox to\vsize{\hsize=2em\needlefill}}} Blah     \bye      (The "Blah" goes to second page)


title: Change the color of background of code of Matlab

text: I use the following code in LaTeX to input the code Matlab there but I want to change the color of the background:                 \usepackage{textcomp}       \usepackage{listings}       \lstdefinestyle{customc}{       belowcaptionskip=1\baselineskip,       breaklines=true,       frame=L,     xleftmargin=\parindent,      language=Matlab,       showstringspaces=false,      basicstyle=\footnotesize\ttfamily,      keywordstyle=\bfseries\color{green!40!black},      commentstyle=\itshape\color{purple!40!black},      identifierstyle=\color{blue},     stringstyle=\color{orange},      }            \lstdefinestyle{customasm}{      belowcaptionskip=1\baselineskip,      frame=L,       xleftmargin=\parindent,        language=[x86masm]Assembler,       basicstyle=\footnotesize\ttfamily,       commentstyle=\itshape\color{purple!40!black},         }             \lstset{escapechar=@,style=customc}      How can I do that to look like that in LaTeX report? ![output](http://i.stack.imgur.com/5Ilun.jpg)


title: biblatex, [AuthorYY] citations instead of numerical citations like [5]

text: I'm using `biblatex` and I would like citations to have the form [AuthorYY] instead of [number]. How can I do that?


title: \headheight Problem

text: I'm using LuaLaTeX of latest TexLive 2014 on Windows 7. I want to overlap headers (page numbers) and documents. My code is as below:               \documentclass[a4, 10pt]{article}     \usepackage{fancyhdr}          \setlength{\headheight}{\0mm}     \setlength{\headsep}{\0mm}          \pagestyle{fancy}     \rhead{\thepage{}}          \begin{document}     test1     \clearpage     test2     \end{document}      When I typeset the code, 2 pages are generated.   But these layouts are different.   "test1" is above the header line, but "test2" is below. How can I raise the text after 2nd page?


title: How to change \textsc font to small caps?

text: I'm trying to change `\textsc` to produce small caps from a different font. The font `pajp` is used for the main text, but it doesn't have small caps. The font `paj` contains small caps, but I don't want to use anything else from that font. The current and edited MWE:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{pdftexcmds}          \renewcommand{\sfdefault}{paj}          \makeatletter     \let\scshape\relax % to avoid a warning     \DeclareRobustCommand\scshape{%       \not@math@alphabet\scshape\relax       \ifnum\pdf@strcmp{\f@family}{\familydefault}=\z@         \fontfamily{paj}%       \fi       \fontshape\scdefault\selectfont}     \makeatother          \begin{document}          % This font contains small caps that I want to use     % Shows T1/paj/m/sc is defined     \usefont{T1}{paj}{m}{sc}     \fontsize{14pt}{1em}\selectfont     Lorem ipsum dolor (small caps)          % This font is used for everything else and doesn't contain small caps     % Shows T1/pajp/m/n is defined     % When using this \scshape and \textsc don't work     \usefont{T1}{pajp}{m}{n}     \fontsize{14pt}{1em}\selectfont     Lorem ipsum dolor (regular)\\          % Set the default family     \renewcommand{\familydefault}{pjap}     \fontfamily{\familydefault}\selectfont          % This doesn't work     %\fontfamily{pajp}\selectfont          %This is the standard small caps font:     %{\fontshape\scdefault\selectfont Small Caps}          This is the new one: {\scshape Small Caps}          This is the new one: \textsc{Small Caps}          \sffamily          Let's try \textsc{Small Caps}     \end{document}      The first image is from the MWE as above. It works. The second image is produced if I use commented out `\usefont{T1}{pajp}{m}{n}` or `\fontfamily{pajp}\selectfont` to select the regular font. It doesn't have the correct font as the small caps one. ![Working](http://i.stack.imgur.com/Ehlnv.png) ![Non working](http://i.stack.imgur.com/7p9bZ.png) In the latter case the error messages are:               LaTeX Font Warning: Font shape `T1/pajp/m/sc' undefined     (Font)              using `T1/pajp/m/n' instead on input line 41.          LaTeX Font Warning: Font shape `T1/pajp/m/sc' undefined     (Font)              using `T1/pajp/m/n' instead on input line 43.


title: Negating \ifeof

text: Trying to typeset lines from a file:               \openin0=MyFile          \loop       \read0to\linein       \linein       \ifeof0              % Fails here     \repeat      Clearly, I want to test for _not_ \ifeof, but I don't see a boolean negation operator in Ch 20 of the TeXBook. Can I do this in plain TeX?


title: How can I merge a few rows in one column of a Tikz table?

text: I wonder how to merge three consecutive rows of the first column in a table. I also need help in aligning the headers of the table. ![enter image description here](http://i.stack.imgur.com/QmuHd.png)               \documentclass[preview]{standalone}     \usepackage[dvipsnames,table]{xcolor}     \usepackage{array}     \usepackage{environ}     \usepackage{tikz}     \usepackage{caption}               \newsavebox{\tablebox}     \definecolor{tablecolor}{named}{gray}          \NewEnviron{rndtable}[1]{%       \addtolength{\extrarowheight}{1ex}%       \rowcolors{2}{tablecolor!20}{tablecolor!40}%       \sffamily%       \newcommand{\header}[1]{%         \multicolumn{1}{c}{%           \cellcolor{tablecolor}\color{white}\bfseries##1}}       \savebox{\tablebox}{%         \begin{tabular}{#1}%           \BODY%         \end{tabular}}%       \begin{tikzpicture}         \clip[rounded corners=1ex] (0,-\dp\tablebox) -- (\wd\tablebox,-\dp\tablebox) -- (\wd\tablebox,\ht\tablebox) -- (0,\ht\tablebox) -- cycle;         \node at (0,-\dp\tablebox) [anchor=south west,inner sep=0pt]{\usebox{\tablebox}};         \draw[tablecolor,very thick,rounded corners=1ex] (0,-\dp\tablebox) -- (\wd\tablebox,-\dp\tablebox) -- (\wd\tablebox,\ht\tablebox) -- (0,\ht\tablebox) -- cycle;       \end{tikzpicture}     }          \begin{document}     \noindent     \begin{center}     %\captionof{table}{Your caption here}          \begin{rndtable}{l p{2.5cm}}       \header{Name} &       \header{\parbox[t]{2cm}{Experience in Number of Years}} \\              Ahmad & 7 Years \\         Nadeem & 2 Years at UAF\\       Nadeem & 1 Years at NTU\\         Nadeem & 3 Years at GCU\\              \end{rndtable}          \end{center}     \end{document}


title: Can't zoom on u3d object in pdf

text: I am trying to make pdfs with u3d objects embedded, however when doing so I note that I cannot zoom in on the object, either by scrolling, or switching to the zoom tool. Interestingly, the pan tool also does not work. If, for example, I read a pdf with a u3d object embedded from elsewhere, e.g. from the media9 guide, or from creation directly in Solidworks, the zoom works fine, so it seems to be something in the LaTeX that is wrong. Here is my code:               \documentclass[a4paper]{article}          \usepackage[left=1.5cm,right=1.5cm,top=1.5cm,bottom=1.5cm]{geometry}     \usepackage{media9}     \usepackage[english]{babel}          \begin{document}          \includemedia[label=frame,width=0.8\linewidth,height=0.5\linewidth,activate=pageopen,3Dtoolbar,3Dmenu]{}{octagon.u3d}          \end{document}      The u3d file can be found here: https://www.dropbox.com/s/4b0709v0lrjzbdr/octagon.U3D Any help is much appreciated.


title: Plotting loops: trajectories and directions

text: Plotting loops: trajectories have directions. How to plot the following figures using tikz ![enter image description here](http://i.stack.imgur.com/Lzvhy.jpg) 1st I start to plot the 2nd fig using the code                \begin{tikzpicture}      \draw (3,2) ellipse (.5cm and .25cm);     \draw (2.9,1.9) to [controls=+(90:1) and +(90:1)] (3,2);     \end{tikzpicture}       To plot the last fig, I have used.               \begin{tikzpicture}         \draw  (.5,0) .. controls (3,3) and (-1,3) .. (1.5,0);     \end{tikzpicture}       But unable to plt the outer and inside curves and the arrows. Using Hobby I wrote               \begin{tikzpicture}[use Hobby shortcut]      \draw  (-.3 ,1).. (0, 0) .. ( 1.2 , 0 ) .. ( 0 , 0 ) .. (-.3 ,-1);      \draw  (.45, 0) .. ( .9 , 0 ) .. ( .6 , 0 ) .. ( .7 , -0.01);     \draw  (-.15, 1.2).. (-.01, .2) ..(.01, .22).. (.6, .1) .. ( 1.3 , 0 ) .. ( 0 , -.1 ) .. (-.3 ,-1.2);     \end{tikzpicture}      But problem for the outer curve persists. What to do?               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{hobby,decorations.markings}          \begin{document}     \begin{tikzpicture}[       use Hobby shortcut,       vec1/.style={         decorate,         decoration={           markings,      % v-- can fine-tune arrow position and rotation           mark=at position 0.1 with {\arrow[rotate=5]{stealth}},         }       },       vec2/.style={         decorate,         decoration={           markings,      % v-- here again---fine-tune as needed           mark=at position 0.080 with {\arrow{stealth}},           mark=at position 0.206 with {\arrow{stealth reversed}},           mark=at position 0.800 with {\arrow{stealth reversed}},           mark=at position 0.930 with {\arrow{stealth}},         }       },     ]       % filled points       %\fill (0,0) circle (1pt);       %\fill (2,0) circle (1pt);          \draw (0.4, 0) .. (0.8, 0.3) .. (1.0, 0) .. (0.4, 0);         \draw  (-.3 ,1).. (0, 0) .. ( 1.2 , 0 )          \draw  (-.3 ,-1).. (0, 0) .. ( 1.2 , 0 ) .. ( 0 , 0 ) ;          \draw   (.5, 0) .. ( .8 , 0 ) .. ( .6 , 0 ) .. ( .7 , -0.012);          \draw (-.1, 1)..(-.08, .7)..(-.05, .4)..( .1 , .4 )..( .7 , .6 )..( 1.4 , 0 )..( .7 , -.6 )..( .2 , -.4 )..(-.1,-.5)..(-.11 ,-.8);         \end{tikzpicture}     \end{document}


title: Table in a resizebox out of bounds

text: I'm trying to resize a table so that it will fit a page, following the instructions given in this question. However, \centering doesn't seem to work, as shown by this example:               \documentclass{article}     \usepackage{graphicx}     \begin{document}     \begin{table}[htbp]         \centering         \resizebox{\textwidth}{!}{           \begin{minipage}{\textwidth}               \caption{Inflation for April 2014}             \begin{tabular}{l|rrrrrrrr}               \hline               1. FOOD AND NON ALCOHOLIC BEBERAGE&0.79\%&0.86\%&3.06\%&8.51\%&5.26\%&3.48\%&5.70\%&6.43\%\\\hline             \end{tabular}       \end{minipage}}     \end{table}          \end{document}      The table starts way off to the right and part of it ends up outside the page. How can I fix this? Thanks


title: Latex font error ... I can't find 'hv'

text: I want to compile my PNAS journal document. I am unable to do so. Since I am new to this latex community I am not much aware of the packages that need to be installed.               kpathsea: Running mktextfm hv     /usr/share/texmf/web2c/mktexnam: Could not map typeface abbreviation v for hv.     /usr/share/texmf/web2c/mktexnam: Need to update /usr/share/texmf-texlive/fonts/map/dvips/skak/special.map?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input hv     This is METAFONT, Version 2.718281 (TeX Live 2009/Debian)               kpathsea: Running mktexmf hv     ! I can't find file `hv'.     <*> \mode:=ljfour; mag:=1; nonstopmode; input hv          Please type another input file name     ! Emergency stop.     <*> \mode:=ljfour; mag:=1; nonstopmode; input hv          Transcript written on mfput.log.     grep: hv.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input hv' failed to make hv.tfm.     kpathsea: Appending font creation commands to missfont.log.     ! Font \footnotefont=hv at 6.0pt not loadable: Metric (TFM) file not found.     l.165 \font\footnotefont\frutigermed at 6pt          ?


title: Using \fontseries{b}\selectfont does not give me a bold face

text: I am trying to emulate the font below: ![enter image description here](http://i.stack.imgur.com/wYzFg.png) Apparently it can be done with:               \renewcommand*{\firstnamefont}{\fontsize{34}{36}\sffamily\mdseries\upshape}      This is from the `moderncv` package, more specifically the file `moderncvstyleclassic.sty` In my case, I thought I could get it with:               {\fontencoding{T1}\fontfamily{cmss}\fontseries{b}\selectfont This is a test}      But it doesn't work. Instead I get: ![enter image description here](http://i.stack.imgur.com/kbj6h.png) which by the way is also what I get with:               {\fontencoding{T1}\fontfamily{cmss}\fontseries{m}\selectfont This is a test}      Notice that the difference between both code snippets is using `\fontseries{b}` instead of `\fontseries{m}` With this:   * How can I get the font in the first image?   * Why is it that `\fontseries{b}` and `\fontseries{m}` yield the same result above? # Update 1: If I use               {\fontencoding{T1}\fontfamily{cmss}\fontseries{bx}\selectfont This is a test}      I get: ![enter image description here](http://i.stack.imgur.com/NFsi6.png) which is still different from what I show in the top image.


title: Environments nested in Lists

text: I have a list with several items consisting solely of an `align` environment:               \begin{enumerate}     \item     \begin{align}     e^{\pi i} + 1 &= 0\\     1 + 1 &= 2     \end{align}     \end{enumerate}      ![enter image description here](http://i.stack.imgur.com/qznjO.png) By default, the environment begins on the line after the numbering. Other list environments with nested environments also prepend a line break automatically:               \begin{itemize}     \item     \[e^{\pi i} + 1 = 0\]     \end{itemize}      What is the best method to start the environment on the same line as the numbering?


title: Custom heading with tex4ht

text: tex4ht generates a page head and foot with navigation elements, such as `[next] [tail] [up]` with hyperlinks. Now I would like to change that appearance to have the page heading left and right of the title:               [prev] My second section [next]      instead of               [prev] [next]          My second section      and (challange!) in the foot:               [prev] My first section <-            -> My third section [next]      where `My first section` is the name of the previos section and similar with `My third section`


title: Generate regular polygon

text: I want to generate a regular polygon with 6 sides in `TikZ`. But I can not compile the following:               \begin{figure}     \resizebox{8 cm}{8 cm}{          \begin{tikzpicture}[scale=2]          \node [draw, thick, minimum size=3cm, regular polygon, regular polygon sides=6] at (2,2) {center \ node};          \node [draw, thick, minimum size=3cm, regular polygon, regular polygon sides=6] at (2,3.74) {adjacent \ node};          \node [draw, thick, minimum size=3cm, regular polygon, regular polygon sides=6] at (2,0.26) {adjacent \ node};          \node [draw, thick, minimum size=3cm, regular polygon, regular polygon sides=6] at (0.5,2.87) {adjacent \ node};          \node [draw, thick, minimum size=3cm, regular polygon, regular polygon sides=6] at (0.5,1.13) {adjacent \ node};          \node [draw, thick, minimum size=3cm, regular polygon, regular polygon sides=6] at (3.5,2.87) {adjacent \ node};           \node [draw, thick, minimum size=3cm, regular polygon, regular polygon sides=6] at (3.5,1.13) {adjacent \ node};     \end{tikzpicture}     }     \caption{Nodes placed  in hexagonal grid when ROI partitioned in to regular hexagons}     \end{figure}


title: Including a PDF with white background as transparent

text: I actually have two related questions.   1. I have a PDF I want to use with includegraphics in a beamer presentation. This PDF has a white background, which I want to be considered as transparent (so other items in the frame are printed above it. Is that possible?   2. It is actually more than a single PDF that I want to include, to create animation (each PDF is a frame). Right now I create frames separately. Is there a way to use all PDFs for animation? I tried something like:                \includegraphics{\alt<1>{img1}{\alt<2>{img2}{img3}}}}      to get animation, but it does not work.


title: LaTeX Table Fixed Header while scrolling

text: I was wondering if it's possible to construct a table in LaTeX which has a fixed header so when we scroll down the page of the output PDF, we can still read the column names and keep track of what the numbers in the table represent. I have seen in a post here at stackoverflow about how to do this with HTML and someone had linked to this example: http://www.mustafaozcan.net/en/demo/fixedtableheader/jquery-fixedtableheader- demo-en.html I would like to be able to do that in a PDF produced by LaTeX. Is that possible?


title: Trouble plotting arctan with pgfplots

text: I'm trying to plot arctan(x) with `pgfplots` but I don't get a good output. Here is my code:                \begin{cfigur}\begin{axis}[          width=160pt,compat=1.5.1,grid style={ultra thin},every axis plot post/.append style={thick},          x tick label style={font=\tiny},y tick label style={font=\tiny},          scale only axis,grid=major,axis lines=middle,          xlabel={$x$},          ylabel={$y$},          xmin=-200,          xmax=200,          domain=-200:210,          ymin=-5.5,          ymax=5.5,          xtick={-150,-100,...,150},          ytick={-5, -4,...,5},          restrict y to domain=-20:20,          legend style={at={(0.5,-0.05)},anchor=north,nodes={right}},      ]      \addplot[mark=none,color=blue, samples=500]{atan(x)};      \addlegendentry{$y = \tan^{-1}x $};      \end{axis}\end{cfigur}


title: Text alignment using fix anchor positions in TikZ

text: I created some biological drawings using Dia and exported them as TikZ TeX code. I want to define some commands that insert these drawings and add some text to them. As there is a lot of text and not much space I want the text to be aligned left, right or centered according to a certain anchor point. Just consider this example. The arrows should point to the anchor points. ![enter image description here](http://i.stack.imgur.com/ohnrp.png) The first text, "right", has a fixed anchor point on its right. If the text grows the text should move further to the left. The text "left" has an anchor on its left edge. It grows to the right. The "center" text is centered according to an anchor on its center position. The resulting TeX Code is posted below. I am sorry for all of the boilerplate parts! [Edit] To clarify what I really want to achieve: I create a picture in Dia that contains some (placeholder) text. I now want a corresponding LaTeX command that inserts this picture and a new text for each text originally placed in the graphic. As the space is limited the text sometimes need to be aligned in a different way. Consider this example picture ![enter image description here](http://i.stack.imgur.com/nq4kX.png) For the creation of the command I can easily replace the text in the generated Tex by something like               \node[anchor=west] at (8.650000\du,7.400000\du){#1};      which only replaces the original text by a corresponding argument, but as it can be already seen in the second example picture there is not enough space to left-align every string. So what I need is a command like               \drawText{(8.650000\du,7.400000\du)}{#1}{l}      which enables me to specify the alignment just as shown in the first example. Do you have any idea how this (the text output in the three mentioned ways) could be achieved by only knowing the anchor point? Thank you in advance Here is some sample code which was generated by the first example Dia project               \documentclass{article}     \usepackage{tikz}     \begin{document}     \ifx\du\undefined       \newlength{\du}     \fi     \setlength{\du}{15\unitlength}     \newcommand{\testpic}[3]{     \begin{tikzpicture}     \pgftransformxscale{1.000000}     \pgftransformyscale{-1.000000}     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetstrokecolor{dialinecolor}     \definecolor{dialinecolor}{rgb}{1.000000, 1.000000, 1.000000}     \pgfsetfillcolor{dialinecolor}     \pgfsetlinewidth{0.100000\du}     \pgfsetdash{}{0pt}     \pgfsetdash{}{0pt}     \pgfsetbuttcap     {     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetfillcolor{dialinecolor}     % was here!!!     \pgfsetarrowsend{stealth}     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetstrokecolor{dialinecolor}     \draw (9.950000\du,10.050000\du)--(9.950000\du,7.700000\du);     }     \pgfsetlinewidth{0.100000\du}     \pgfsetdash{}{0pt}     \pgfsetdash{}{0pt}     \pgfsetbuttcap     {     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetfillcolor{dialinecolor}     % was here!!!     \pgfsetarrowsend{stealth}     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetstrokecolor{dialinecolor}     \draw (14.831803\du,10.050000\du)--(14.831803\du,7.700000\du);     }     \pgfsetlinewidth{0.100000\du}     \pgfsetdash{}{0pt}     \pgfsetdash{}{0pt}     \pgfsetbuttcap     {     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetfillcolor{dialinecolor}     % was here!!!     \pgfsetarrowsend{stealth}     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetstrokecolor{dialinecolor}     \draw (19.951803\du,10.050000\du)--(19.951803\du,7.700000\du);     }     % setfont left to latex     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetstrokecolor{dialinecolor}     \node[anchor=west] at (8.650000\du,7.400000\du){#1};     % setfont left to latex     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetstrokecolor{dialinecolor}     \node[anchor=west] at (6.250000\du,7.800000\du){};     % setfont left to latex     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetstrokecolor{dialinecolor}     \node[anchor=west] at (14.050000\du,7.418625\du){#2};     % setfont left to latex     \definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}     \pgfsetstrokecolor{dialinecolor}     \node[anchor=west] at (20.000000\du,7.400000\du){#3};     \end{tikzpicture}     }     \testpic{right}{center}{left}     \end{document}


title: \hbar new letter

text: I would want to know in which package the symbol `\hbar` is defined. In fact I ask this because I need to create a letter like `\hbar` but with 'k' instead of 'h'.


title: amsmath nobreakdash definition to allow normal hyphenation

text: In the `amsmath` package documentation it is written: > `\newcommand{\n}[1]{$n$\nobreakdash-\hspace{0pt}}` > > The last example shows how to prohibit a linebreak after the hyphen but > allow normal hyphenation in the following word. (It suffices to add a zero- > width space after the hyphen.) I am thinking that this can be used to make the more general commands `\nbhyphen` and `\nbendash` like this :               \documentclass{minimal}     \usepackage{mathtools}     \newcommand{\nbhyphen}{\nobreakdash-\hspace{0pt}}     \newcommand{\nbendash}{\nobreakdash--\hspace{0pt}}     \begin{document}     Electron\nbhyphen electron interaction. Maxwell\nbendash{}Boltzmann distribution.     \end{document}      and then use them in my document instead of writing the dashes explicitly. **Questions:** Is this a good idea? Will it work everywhere, or is it like to cause unforeseen problems? Should I use the commands with space after, or `{}`? Why is this not default behavior in LaTeX?


title: ledpar: Get rid of any space between paragraphs while retaining the synchronization of the pagecontents

text: My question: Is there a way to simply get rid of any space between the paragraphs of `ledpar`- while retaining the pagesynch? (I understand that synchronizing paragraphs is a feature of ledpar, put I think it should be a feature which the user could turn off...) I have a problem (similar to this) with an edition of an Arabic text with a translation on the facing page. The paragraphs are only synchronized if I force the Arabic font to be exactly as high as the latin font (using fontspec `Scale=MatchUppercase`; I use LuaLaTeX and KOMA). However, the Arabic text is then really too small and fairly unreadable. If I increase the size of the Arabic script (e.g. by declaring that the Arabic text is `\Large`), the paragraphs are no longer synchronized. Then I decided to get rid of the synchronization of paragraphs (because in research literature, paragraphs are rarely - if at all - synchronized the way ledpar does it). I found diabonas' quick hack here. But don't get it to work. (Maybe it is because this hack is for `ledpar` with `stanza`) (Perhaps not so minimal) working example:               \documentclass[12pt]{scrbook}     \usepackage{fontspec}          \setmainfont[Ligatures=TeX]{Times New Roman}     \newfontfamily\arabicfont[Script=Arabic, Numbers=Arabic, Scale=MatchLowercase]{Scheherazade}          \usepackage{ledmac, ledpar}     %\usepackage{etoolbox}        %% This was diabonas' solution to the question I was referring to. (see link above)     %\makeatletter     %\patchcmd{\Pages}{\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}}{\ifdim\ht\l@dleftbox>0pt\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}\fi}{}{}     %\patchcmd{\Pages}{\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}}{\ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi}{}{}     %\makeatother          \newcommand{\arabtxt}[1] % Arabic inside LTR         {\bgroup\luatextextdir TRT\arabicfont #1\egroup}     \newenvironment{arabpar}     % Arabic paragraph         {\luatextextdir TRT\luatexpardir TRT\arabicfont}{}          \newcommand{\arabnormaltext}         {\Large}          %\shiftedversestrue     % This is the solution to my problem as suggested by the package maintainer          \begin{document}     \chapter{Chapter}     Text.          \begin{pages}     \begin{Leftside}     \linenummargin{outer}     \sidenotemargin{inner}     \beginnumbering     \pstart     \begin{arabpar}     \section*{Second Part}     \arabnormaltext\noindent\setline{1}%     فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين ١٢٣٤٥ فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين حاشية عربية. فقرة عربية محاذاة إلى اليمين. فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين ١٢٣٤٥ فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين حاشية عربية. فقرة عربية محاذاة إلى اليمين.     \hfill\end{arabpar}     \pend     \pstart\begin{arabpar}\arabnormaltext     فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين ١٢٣٤٥ فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين حاشية عربية. فقرة عربية محاذاة إلى اليمين. فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين ١٢٣٤٥ فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين حاشية عربية. فقرة عربية محاذاة إلى اليمين. فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين ١٢٣٤٥ فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين حاشية عربية. فقرة عربية محاذاة إلى اليمين.     \hfill\end{arabpar}     \pend     \pstart\begin{arabpar}\arabnormaltext     فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين ١٢٣٤٥ فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين حاشية عربية. فقرة عربية محاذاة إلى اليمين. فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين ١٢٣٤٥ فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين فقرة عربية محاذاة إلى اليمين حاشية عربية.     \hfill\end{arabpar}     \pend     \endnumbering     \end{Leftside}     \begin{Rightside}     \linenummargin{outer}     \sidenotemargin{outer}     \beginnumbering     \pstart     \section{Second Part}     \noindent\setline{1}%     English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned.     \pend     \pstart     English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned.     \pend     \pstart     English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned. English text. English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned English paragraph left aligned.     \pend     \endnumbering     \end{Rightside}     \Pages     \end{pages}     \end{document}      So, it seems that the synchronization goes down the drain because of the different fontsizes. Can't we just get rid of the space between the paragraphs (and hope that the pagecontents will still be somehow synchronized)?


title: making appendix for thesis

text: I need some help with creating an appendix for my thesis. I have about 10 figures which need to be in the appendix. I have a good appendix with the following code:               \appendix      \addcontentsline{toc}{chapter}{APPENDICES}          \chapter{XXXX}      I have a main `thesis.tex` file where I call this `appendix.tex` file after the last chapter. Problems are:   1. The appendix starts without any notice that it is the appendix except for the chapter number being `A`, but I want to have either a separate page which says "Appendix" prior to the start of the appendix or on top of the first appendix page to explicitly say "Appendix".   2. Now I use the `\chapter{}` command to have the title of the appendix but I think I will have only one chapter in the appendix. Is there some command which can make the title insited of chapter?


title: Use \bgroup and \egroup to set some pre and post code to a macro

text: Why isn’t it possible to use `\bgroup` and `\egroup` in this way?               \documentclass{article}          \def\precode{\fbox\bgroup}     \def\postcode{\egroup}          \newcommand{\mymacro}[1]{\precode#1\postcode}          \begin{document}     \mymacro{Text}     \end{document}      I know that I can store the argument to a box or smiley use `\fbox`in the definition of `\mymacro` directly but the application of this MWE is a little more complex so that these two way won’t work. Now I wonder why this code gives no error but gives no text either.


title: Footnote into a \twocolumn expression

text: I have a paper that uses the `article` document class, in `twocolumn` mode. The title and the author are set within a `\twocolumn[...]` command. Now I need to put a footnote after the name of the first author, so that a small "1" appears next to it and the footnote (containing the e-mail of the first author) must go at the bottom of the page. The problem is that I've discovered that `\footnote`, within `\twocolumn`, makes the small "1" appear right after the name of the first author (but not so close to it, and this is not good) but I don't find the footnote at the bottom of the page. How can I perform this task? As an example I put here below a small piece of code that demonstrates the problem:               \documentclass[twocolumn]{article}          \begin{document}     \twocolumn[{\centering \LARGE \textbf{Test\footnote{Test title            footnote} Test Test Test Test Test Test Test Test \bigskip}}]              Test\footnote{test text footnote} Test Test Test Test Test Test Test          Test Test Test Test Test Test Test Test Test Test Test Test Test Test          Test Test Test Test Test Test Test Test Test Test Test Test Test Test          Test Test Test Test Test Test Test Test Test Test Test Test Test Test          Test Test Test Test Test Test      \end{document}      As you could verify, the first footnote does not appear, while the footnote into the text, appears, and with the number 2.


title: How to create groups of table rows with alternating colors?

text: **Problem.** When coloring a table, using different colors for even / odd rows is quite usual and can be accomplished with the `xcolor` package. I, however, don't want to have alternating colors per row, but per _row group_. **Example.** The following example is minimal working. I have a macro `\writerow` to output a table row (because much information in the original file is automatically generated), and I have a second macro `\setgroup` to set the group to `1` (white background) or `2` (gray background). To store this information, there is a macro `\rc` (reading "row color").               \documentclass{standalone}          \usepackage{ifthen}     \usepackage{colortbl}          \begin{document}          %     % Macros          \newcommand\rc{0.8}     \newcommand\setgroup[1]{             \ifthenelse{\equal{#1}{1}}{                     \renewcommand\rc{1.0}             }{                     \renewcommand\rc{0.8}             }     }     \newcommand\writerow[1]{             \\ \rowcolor[gray]{\rc} #1     }          %     % Data          \begin{tabular}{l}     \textbf{Header}             \setgroup{1}                     \writerow{Zeile 1}                     \writerow{Zeile 2}             \setgroup{2}                     \writerow{Zeile 3}                     \writerow{Zeile 4}     \end{tabular}          \end{document}      **Presumptions.** The example works; however, every row is colored gray, which means that the `\renewcommand\rc` isn't working. Why? Probably it's a problem of scope. But the only scope I can see in that document is that of the `tabular` environment, which shouldn't be a problem, as all the operations happen inside of it. Where is my error? Thanks for your help in advance!


title: Linebreak between numbers connected by dash

text: In my text I am using lots of dates. Now I have the following problem: `1480–1541` (two figures and between them a dash) appears at the end of one line and extends over the line into the margin space without being properly broken into the next line. I guess this is caused by the dash. Something like `1480–\\-1541` does not work, since it adds an extra hyphen. So, how I can achieve the proper result:               ... ... ... 1480–     1541?


title: biblatex authoryear-icomp: How to change parenthesis to [asdf 1985]

text: Sadly I didn't find any solutions in the biblatex doku nor in google. Can anybody please point me out how to change the parenthesis of the authoryear-icomp (or authoryear style) from (author year) to [author year] (or recommend me another style providing that; I want to have my citations in the text in the form [author1 and author 2 year] respectively [author1 et al. year]; & instead of and would be even better) P.S.: Does anybody know a site where I can see (I only find the styles not a printout) the different styles in comparison? Testing all of these is quite a bit of work.


title: Is there an debian/ubuntu package containing mdframed.sty?

text: I found several answers on this site recommending the mdframed package. However, I can't find a ubuntu texlive package that includes this. Do I have to install this manually or am I overlooking something here?


title: Tables with math, equal column width, and right alignment

text: Q: Is there an approach, less hacky than my `\MyLen` approach, that would generate roughly the second table below? I'd like to maintain professional features (but I welcome criticisms wholeheartedly!) like (1) `booktabs` effects, (2) right alignment of data, (3) no vertical rules, (4) horizontal rule only to separate estimators and column titles, (5) equal column widths, (6) and tight spacing of columns. I generated the following table and thought it didn't look terribly professional because of the different column widths (Q: Am I wrong? Should this table be left alone?)               \documentclass{article}     \usepackage{booktabs}     \usepackage{diagbox}     \usepackage{tabularx}     \begin{document}     \begin{table}[ht]       \centering       \begin{tabular}{@{}lrrrrrrrr@{}}         \toprule         & \multicolumn{4}{l}{MPE} & \multicolumn{4}{l}{MAPE}\\         \cmidrule(r){1-1}  \cmidrule(lr){2-5} \cmidrule(l){6-9}         \diagbox[trim=lr]{Est.}{Jumps} & 0 & 3 & 10 & 30 & 0 & 3 & 10 & 30 \\         \midrule         $\widetilde{JV}$                & 2.14 & 2.42    & 1.35     & $-$1.69  & 2.14 & 4.57 & 4.92  & 4.74 \\         $\widehat{JV}$                  & 1.99 & 2.16    & 1.12     & $-$1.83  & 1.99 & 4.47 & 4.91  & 4.81 \\         $\widehat{JV}_{\mathrm{BNS04}}$ & 0.35 & $-$4.35 & $-$12.91 & $-$26.35 & 3.11 & 5.48 & 12.95 & 26.35 \\          \midrule         $\widetilde{IV}$                & $-$2.03 & $-$2.52 & $-$1.33 & 1.73  & 6.54 & 6.37 & 5.24  & 3.71 \\         $\widehat{IV}$                  & $-$1.87 & $-$2.26 & $-$1.10 & 1.87  & 6.48 & 6.31 & 5.23  & 3.80 \\         $\widehat{IV}_{\mathrm{BNS04}}$ & $-$0.24 & 4.25    & 12.93   & 26.39 & 6.61 & 7.06 & 13.11 & 26.39 \\         \bottomrule       \end{tabular}       \caption{my caption}     \end{table}      ![tab1](http://i.stack.imgur.com/um6Bu.jpg)               \newlength{\MyLen}     \settowidth{\MyLen}{$-$26.35}     \newcolumntype{R}{>{\raggedleft\arraybackslash}p{\the\MyLen}}     \begin{table}[ht]       \centering       \begin{tabular}{@{}lRRRRRRRR@{}}         \toprule         & \multicolumn{4}{l}{MPE} & \multicolumn{4}{l}{MAPE}\\         \cmidrule(r){1-1}  \cmidrule(lr){2-5} \cmidrule(l){6-9}         \diagbox[trim=lr]{Est.}{Jumps} & 0 & 3 & 10 & 30 & 0 & 3 & 10 & 30 \\         \midrule         $\widetilde{JV}$                & 2.14 & 2.42    & 1.35     & $-$1.69  & 2.14 & 4.57 & 4.92  & 4.74 \\         $\widehat{JV}$                  & 1.99 & 2.16    & 1.12     & $-$1.83  & 1.99 & 4.47 & 4.91  & 4.81 \\         $\widehat{JV}_{\mathrm{BNS04}}$ & 0.35 & $-$4.35 & $-$12.91 & $-$26.35 & 3.11 & 5.48 & 12.95 & 26.35 \\          \midrule         $\widetilde{IV}$                & $-$2.03 & $-$2.52 & $-$1.33 & 1.73  & 6.54 & 6.37 & 5.24  & 3.71 \\         $\widehat{IV}$                  & $-$1.87 & $-$2.26 & $-$1.10 & 1.87  & 6.48 & 6.31 & 5.23  & 3.80 \\         $\widehat{IV}_{\mathrm{BNS04}}$ & $-$0.24 & 4.25    & 12.93   & 26.39 & 6.61 & 7.06 & 13.11 & 26.39 \\         \bottomrule       \end{tabular}       \caption{my caption}     \end{table}      ![tab2](http://i.stack.imgur.com/gla8D.jpg) I like this table. More professional (But again, any comments? On second look, the columns do look a little wide). Although, I don't like having to use the `\MyLen` hack. I thought there might be a less hacky approach using the `tabularx` package:               \newcolumntype{R}{>{\raggedleft\arraybackslash}X}     \begin{table}[ht]       \centering       \begin{tabularx}{\linewidth}{@{}lRRRRRRRR@{}}         \toprule         & \multicolumn{4}{l}{MPE} & \multicolumn{4}{l}{MAPE}\\         \cmidrule(r){1-1}  \cmidrule(lr){2-5} \cmidrule(l){6-9}         \diagbox[trim=lr]{Est.}{Jumps} & 0 & 3 & 10 & 30 & 0 & 3 & 10 & 30 \\         \midrule         $\widetilde{JV}$                & 2.14 & 2.42    & 1.35     & $-$1.69  & 2.14 & 4.57 & 4.92  & 4.74 \\         $\widehat{JV}$                  & 1.99 & 2.16    & 1.12     & $-$1.83  & 1.99 & 4.47 & 4.91  & 4.81 \\         $\widehat{JV}_{\mathrm{BNS04}}$ & 0.35 & $-$4.35 & $-$12.91 & $-$26.35 & 3.11 & 5.48 & 12.95 & 26.35 \\          \midrule         $\widetilde{IV}$                & $-$2.03 & $-$2.52 & $-$1.33 & 1.73  & 6.54 & 6.37 & 5.24  & 3.71 \\         $\widehat{IV}$                  & $-$1.87 & $-$2.26 & $-$1.10 & 1.87  & 6.48 & 6.31 & 5.23  & 3.80 \\         $\widehat{IV}_{\mathrm{BNS04}}$ & $-$0.24 & 4.25    & 12.93   & 26.39 & 6.61 & 7.06 & 13.11 & 26.39 \\         \bottomrule       \end{tabularx}       \caption{my caption}     \end{table}      ![tab3](http://i.stack.imgur.com/B6buA.jpg) I like that the columns are tighter but there is some weird stuff going on with that 3rd data row (Q: Any clue what's going on there?)


title: Using symlinks to point to a .bib file in a different directory with bibtex and texmaker

text: This has been driving me crazy all day. Tried everything before asking a new question, I apologize in advance if I missed something. What I'm trying to do is to have a centralized `.bib` file that I can later call from any `.tex` file using bibtex. However (this is the fun part), the .bib file has to be used by a windows machine, as well as a mac through dropbox. My main system is a mac using texlive 2013 and Texmaker. I first put the .bib file in `/~/dropbox/references/references.bib` and created a symlink in the terminal (`ln -s references.bib references2.bib`), which I put in the local tmxtree (`/usr/local/texlive/texmf- local/bibtex/bib/local`). I then run `mktexlsr` to update the database and run bibtex from Texmaker. I get the following error message: > I couldn't open database file reference2.bib I tried the same but with an alias created in the finder instead of the symlink and again, no luck. To understand what was going on, I reversed the procedure: I left the symlink in the dropbox folder and placed the "original" file in the texmf tree. This worked beautifully. So, apparently bibtex does not like links. However, this is not an acceptable solution, because if I do this, then the windows machine cannot see the symlink that is now in dropbox. Additional things I tried: (1) I saw here that there is a bibtex option `\--include- directory=/path/to/include` that tells bibtex to look in said directory for the `.bib` file. However, it seems that this is not available in Texlive 2013. I couldn't get it to work in Texmaker, nor could I find any reference to that invoking `bibtex --help` or `man bibtex` from the terminal. (2) I tried using `BIBINPUTS=/~/dropbox/references/` and it did work, but only when running bibtex directly from the terminal, and not from texmaker. I'm running mavericks, so I did what I could to get this environment variable to stick, but with no luck. In summary, the specific questions I have are: Is there any way to make bibtex work with a symlink or alias? and if not, How can I have a centralized `.bib` file that lives in dropbox and can be called by both a windows computer, and a mac running texmaker?


title: Read arbitrary lines from file

text: Is there an easy way to read arbitrary lines from a file? For example "read line number 12" or "read backwards from last line to first line" or "read lines 1,3,5...".


title: Biblatex authoryear-icomp: maxnames not working or I don't get it

text: I have been fighting quite a while with the following problem (which might be related to some strange previous errors in my document): I use `authoryear-icomp` with the following options and XeLaTeX (all packages up-to-date):               \usepackage[safeinputenc,uniquename=full,maxnames=2,minnames=1,maxbibnames=99,         style=authoryear-icomp,dashed=true,backend=biber]{biblatex}      I have two references in my bibfile that share the first five authors and the year. In my cite I get: > (author1,author2,author3,author4,author5 year; > author1,author2,author3,author4,author5,author6 year) which is really ugly. Does anybody have a hint for me how to get that fixed? I'd like to have something like > (author1,author2,year-a; author1,author2,year-b) I tried to gamble around with the `uniquename` option without any results also.


title: How can I install the ocr-a font on MiKTeX 2.9?

text: In my previous post Generate random numbers with a specific font I was unable to compile the code given in the discussion because there was an error when compiling which said that               (C:\Users\azetina\Desktop\Test\testrandomnumbers.aux) ){C:/Program Files/MiKTeX     2.9/fonts/enc/dvips/cm-super/cm-super-t1.enc}Trying to make PK font ocr10 at 569 DPI...     Creating ocr10.pk...     Running miktex-mf.exe...     This is METAFONT, Version 2.718281 (MiKTeX 2.9)                    ! I can't find file `ocr10'.      When I try the ocr package without the [ocr-a], the file compiles and even with ocr-b it still compiles. So I am interested in knowing how to install the ocr-a font so that i can compile the document.


title: Which typesetting programming language is most used in publishing?

text: Is TeX really used in publishing industry?If I have to learn a typesetting programming language to find a job in publishing industry is TeX a good choice or I should learn something else? I'm also interest if or in which publishing industry is used TeX.


title: Add a second website in moderncv banking

text: I wanted to include 2 websites in my resume which I am making using `moderncv` but it seems it allows only one website. How to show 2 websites in the header (showing the website icon for both)? I am using `moderncv`'s `banking` style.


title: Theorem name and number in margin, note in text

text: I'm using `thmtools` to make ultra-fancy theorems. I would like the Theorem name and number (e.g., "Theorem 1") to jut out into the left margin of the text, and the note (e.g., "The Fundamental Theorem of Calculus" be in the regular text. But I can't get the alignment quite right. Here is a minimal example:               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amssymb}     \usepackage{thmtools}          \pagestyle{empty}          \declaretheoremstyle[         headfont=\bfseries,         notefont=\normalfont,         bodyfont=\itshape,         headpunct=\newline,         headformat={%             \makebox[0pt][r]{\NAME\ \NUMBER\ }{\NOTE}%         },     ]{theorem}          \declaretheorem[style=theorem]{theorem}               % I need to undeclare the proof environment that amsthm provides but I can't use \renewenvironment     \let\proof\relax     \let\endproof\relax          \declaretheoremstyle[         headfont=\scshape,         notefont=\itshape         bodyfont=\normalfont,         headpunct=\relax,         headformat={%             \makebox[0pt][r]{\NAME\ }\NOTE},     ]{proof}          \declaretheorem[         style=proof,         qed=\qedsymbol]{proof}                    \begin{document}          \begin{theorem}[The Fundamental Theorem of Calculus]     Let $f$ be an integrable function on $[a,b]$ and define     \[         g(x) = \int_a^x f(t) \,dt.     \]     If $f$ is continuous at $x$ in $(a,b)$, then $g$ is differentiable at $x$ and     \[         g'(x) = f(x).     \]      \end{theorem}          \begin{proof}     Let $h>0$ be given so that $x+h < b$ (The case $h<0$ is treated similarly).  We have     \[         \frac{g(x+h) - g(x)}{h} =   \frac{1}{h} \int_x^{x+h} f(t)\,dt.     \]     Let $M_h$ be the maximum value of $f$ on $[x,x+h]$, and let $m_h$ the minimum value of $f$ on $[x,x+h]$.  We have     \[         m_h \cdot h \leq \int_x^{x+h}f(t)\,dt \leq M_h \cdot h     \]     So     \[         m_h \leq \frac{g(x+h) - g(x)}{h} \leq M_h.     \]     Since $f$ is continuous at $x$, as $h\to 0$, both $m_h$ and $M_h$ tend to $f(x)$.      \end{proof}               \end{document}      ![sample code output](http://i.stack.imgur.com/FpJvg.png) As you can see, the note is too far to the right. And in the `proof` environment, there is no note, but the text begins too far to the right as well. What's putting the extra space in there and how can I get rid of it? **Edit** Scroll down to my answer to see how I solved it. I accepted Phil's answer because it's less hacky than Gonzalo's (did not involve `@`) and got me closest to the result I wanted.


title: Environment for Mathematics

text: I am writing some notes and in them there is 95% mathematics, give or take, so I use `$...$`. The problem is that if I want to go into a new line and I use the `\\\` there is the risk of badbox creation. Also because I write a lot of formulas in multiple lines I have to use a lot of times `$...$` , which seems to me a little useless because my notes as I said are almost entirely mathematics. Is there an environment or another way so I can write mathematics like I write text? Something like the `verbatim` environment but for mathematics?


title: Should I always specify -sPAPERSIZE=a4 when invoking ps2pdf for paper size other than A4?

text: When I compile a document with paper size other than A4 as follows:               \documentclass{scrbook}     \usepackage[A6paper]{geometry}          \begin{document}      something     \end{document}      using `latex-dvips-ps2pdf` steps, should I use `-sPAPERSIZE=a4` switch when invoking `ps2pdf`? I don't know why TeXnicCenter setup the output profile for `ps2pdf` with `-sPAPERSIZE=a4` switch by default as follows. `ps2pdf -sPAPERSIZE=a4 -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile="%bm.pdf" -c save pop -f "%bm.ps"`


title: the prob and sol environments of Springer's svmono - how to pass arguments

text: When using `svmono` the `prob` and `sol` environments require an argument (a label right after `\begin{prob}` giving the `prob:key`, and that `prob:key` is then to be used as an argument for the corresponding `\begin{sol}`). How can I place the label for the `prob` environment and then pass it to the `sol`environment? I know I can ERT the label, but that is an ugly solution. Besides, it does not really solve it since I could not figure out how to pass the ERTed label to the `sol` environment. Ideally, a neat solution to both problems, but any help will be greatly appreciated. A MWE that compiles to give one problem, then in an unnumbered chapter, a solution that automatically relates to that problem by means of the lable `niceProb`:                \documentclass[english]{svmono}      \usepackage[T1]{fontenc}      \usepackage[latin9]{inputenc}      \usepackage{babel}      \begin{document}      \begin{prob}\label{niceProb}      some nice problem      \end{prob}           \chapter*{Solutions}      \begin{sol}{niceProb}      a really nice solution      \end{sol}      \end{document}      What I would like to know is how to place the label at the `prob` environment from within Lyx (preferably without ERTing it), and how to pass `niceProb` to the `sol` environment. Thanks!


title: Automatic axes for graphs with PSTricks

text: I have datas from Matlab and I would like to plot them using PSTricks. My datas are in a .data file. So far I have done a graph but only with Manual adjustment of the axes:               \psset{xunit=0.025mm, yunit=1cm}     \begin{pspicture}(-200,-0.5)(1900,4.25)     \fileplot[plotstyle=line,linewidth=1pt,         linecolor=blue]{coordonnees.data}          \psaxes[dx=400, Dx=400]{(->}(1900,4.1)            [$\mathbf{x}$,0][$\mathbf{y}$,90]          \psgrid[griddots=5,subgriddiv=1,             gridlabels=0pt, xunit=1cm, yunit=1cm](4,4)     \end{pspicture}      Which gives me something like this: ![enter image description here](http://i.stack.imgur.com/J6pdz.jpg) The graph is ok but I would like PSTricks to generate such squared graph (e.g. 4cm x 4cm) with the values of the axes automatically adjusted with regards to the datas contained in the .data file (I currently have to adjust it manually). How can I achieve this?


title: How to figure out which distribution a package is in?

text: I just installed TeX Live on my Mac with Macports. I wanted to use the `enumitem` package and was told that LaTeX couldn't find the file when I tried to compile. I installed the texlive-basic distribution – is there a way to figure out the smallest distribution that contains the `enumitem` package? Alternately, if I download the package where do I want to put it?


title: Include excerpts from a document in another document

text: I have a manuscript and its revision report. I need to put some sentences of this manuscript to the revision report as excerpts. Instead of defining excerpts as macros or putting the excerpts in another file and then including them, is there a better solution to use the text of the manuscript in the revision report? I expect a solution like: Contents of `manuscript.tex`:               ...     Pragraph is starting.     \begin{externalize}[excerpt1]     Part that must be both in the manuscript and the revision report.     \end{externalize}     Paragraph ends.     ...      Contents of `revisionReport.tex`:               ...     Here we include the following excerpt from the revised manuscript:          \externalizedtext{excerpt1}     ...


title: Prelim2e marking but centred without tikz

text: I use preliminary markup on draft versions of documents which specifies the `svn` repository number, timestamp, url etc. I prefer this to be typeset centred at the bottom of the page below the footer. Here is the effect I am trying to achieve: ![desiderata](http://i.stack.imgur.com/eZyp8.png) The solution needs to:   * work in both `onecolumn` and `twocolumn` mode;   * work with at least the standard LaTeX classes;   * work with `geometry` and `fancyhdr`;   * allow LaTeX commands in the specification of the preliminary marker so I can typeset `svn` information, `\today` etc. and allow multi-line markers;   * centre the marker beneath the footer but within the printable area even when different options are passed to `geometry` and `fancyhdr`;   * be sensitive to whether the `draft` or `final` option is active;   * not affect page layout in other ways e.g. it must not affect page or line breaks, alignment or placement of the header/footer;   * work with pdfLaTeX. I have been using `prelim2e`. However, this does not centre the marking beneath the footer consistently or correctly. This prompted me to ask this question. Although there is something odd about `geometry`'s effect there, it seems that there is also a distinct issue with `prelim2e` in the sense that no matter what I try, I cannot get the markup centred beneath the footer. This is true even if I stick to the very simplest configuration and just try something like `\PrelimWords{a}`. After searching this site and ctan for a bit, I came across maetra's comment on this answer by Kurt. That comment suggests combining `background` and `ifdraft`. So I tried the following:               \documentclass[draft,twocolumn]{article}     \usepackage{url,svn-multi}         \svnidlong             {$HeadURL: file:///svn/myproject/tweaked-branch/usr/local/texlive/current/texmf-dist/tex/latex/something/something.sty $}             {$LastChangedBy: cfr $}             {$LastChangedRevision: 19567 $}             {$LastChangedDate: 2014-04-16 19:46:05 +0100 (Mer, 16 Ebr 2014) $}     \usepackage[hscale=.875]{geometry}     \usepackage{ifdraft}     \makeatletter       \ifdraft{%         \usepackage[placement=bottom,scale=1,opacity=1,vshift=10mm]{background}           \@ifpackageloaded{svn-multi}{%               \newsavebox{\prelimtxt}               \sbox{\prelimtxt}{%                   \parbox{\textwidth}{%                           \urlstyle{sf}%                           \centering \small \textsf{Draft --- \today\ --- Revision \svnrev\ --- \svnyear--\svnmonth--\svnday\ \svnhour:\svnminute:\svnsecond}\\[1em]                           \centering \tiny \textsf{\svnkw{HeadURL}}\\%                           }% end parbox                   }% end sbox               \backgroundsetup{contents=\usebox{\prelimtxt}}               }{\backgroundsetup{contents={\centering \small \textsf{Draft --- pdf\LaTeX{}ed --- \today}}}}}{%               \providecommand{\pgfsyspdfmark}[3]{\relax}}     \makeatother     \usepackage{kantlipsum}     \begin{document}     \kant[1-5]     \end{document}      Although I have not yet tried this in a real document, the results appear to be exactly what I'm looking for. The output is, in fact, that I posted above. However, it does seem to be a sledgehammer to crack a nut. This solution requires me to load `tikz` merely to set the preliminary marker at the bottom of the page. I realise this is because `background` is much more powerful and flexible than `prelim2e` and I really like the package for other uses. It just feels like overkill here. (Note that much of my customisation is dedicated to _undoing_ the doings of `background` by setting the scale back to 1, using full opacity etc.) Moreover, this solution requires me to either put up with errors when switching to final or to load `tikz` even when I'm not using it at all. (My code above institutes a hack to avoid both evils which involves just setting a dummy command if necessary.) Is there an alternative solution which works properly but is a bit lighter weight? Or a workaround for `prelim2e` (seems doubtful from what I've read)?


title: Ligatures not shown

text: Even though there's a number of topics on here concerning the subject, it still doesn't work here. An example like:               \documentclass[11pt,a4paper]{article}          \usepackage{fontspec,graphicx,xltxtra}     \setmainfont[Mapping=tex-text, Ligatures={Common,Rare,Historic},Alternate=1]{Hoefler Text}          \begin{document}          \Huge     \noindent     Que dictes vous de mon appel,\\     Garnier? Fis je sens ou folie?\\     Toute beste garde sa pel\\     Qui la contraint, efforce ou lie\\     S'elle peut, elle se deslie          fire flower fjörd\\          fi fl          ﬁ ﬂ          \end{document}      Doesn't work. The last line DOES show ligatures, but any other line doesn't. It also says this in the logs:               Requested font "Hoefler Text" at 10.0pt      -> C:/Windows/Fonts/HoeflerText-Roman.otf     Requested font "Hoefler Text/ICU" at 10.0pt      -> C:/Windows/Fonts/HoeflerText-Roman.otf           fontspec warning: OpenType feature 'Ligatures=Common' (+liga) not available     (fontspec)  for font 'Hoefler Text',     (fontspec)  with script 'Latin', and language 'Default'.           fontspec warning: OpenType feature 'Ligatures=Rare' (+dlig) not available     (fontspec)  for font 'Hoefler Text',     (fontspec)  with script 'Latin', and language 'Default'.           fontspec warning: OpenType feature 'Ligatures=Historic' (+hlig) not available     (fontspec)  for font 'Hoefler Text',     (fontspec)  with script 'Latin', and language 'Default'.           fontspec warning: OpenType feature 'Alternate=1' (+salt=1) not available     (fontspec)  for font 'Hoefler Text',     (fontspec)  with script 'Latin', and language 'Default'.      Why does it simply not work? I've tried many alternatives people mentioned, but it never gets full with ornaments and nice jolly shapes. I'm using MiKTeX, compiling with XeLaTeX. Secondly, I'm not sure how the naming system for fonts works. Can I check which file is called what in LaTeX? Maybe I need Hoefler Text, instead of HoeflerText-Roman, or something...


title: biblatex style with multiple bibliographies in one document

text: This is to all the biblatex gurus. I have only just come from Bibtex to Biblatex and I think I am lost in the many options available. Here is my scenario: I have a document, thesis which I intend to have two bibliographies with different styles..eventually. although for now I just want to get things working. With the working example below, I have the two bibliographies as I want but some things are not clear easy to solve: 1) The intext (textcite) outputs : LastName, Initials et.al but I would like LastName et.al. 2) The bibliography style outputs: FirsAuthorLastName, FirstAuthorInitials, SecondAuthorLastName, SecondAuthorInitials, etc but as you can see there is a comma separating both first and lastname as well as between authors. Now that doesn't look too nice I think. Perhaps a different marker like a semi column. Second, I want to list only the first few (5) authors and no more in the bibbliography style 3) Items in the second bibliography are also included in the first ? This is not too bad but 4) The numbering continues in the second bibliography instead of restaring back at 1 5) Finally, is I need to have the second bibliography in a different style, say author-year, sorted by year of publication what do I do ? Now this is asking too much but if others have solved these issues I will be glad to know. Thank you.               \begin{filecontents}{mymwe.bib}     @ARTICLE{Rauchfuss2008,       author = {Barton, Bryan E. and Olsen, Matthew T. and Rauchfuss, Thomas B.},       title = {Aza- and Oxadithiolates Are Probable Proton Relays in Functional         Models for the [FeFe]-Hydrogenases},       journaltitle = {J. Am. Chem. Soc.},       year = {2008},       volume = {130},       pages = {16834-16835},       number = {50},       doi = {10.1021/ja8057666},     }          @BOOK{Clegg1998,       title = {Crystal Structure Determination},       publisher = {Oxford University Press},       year = {1998},       author = {Clegg, William},       isbn = {978-0-19-855901-6},       location = {Oxford, U.K.},     }     % This file was created with JabRef 2.6.     % Encoding: UTF8          @ARTICLE{Chen2011,       author = {Guanying Chen and Tymish Y Ohulchanskyy and Wing Cheung Law and Hans         Agren and Paras N Prasad},       title = {Monodisperse NaYbF(4)?:?Tm(3+)/NaGdF(4) core/shell nanocrystals with         near-infrared to near-infrared upconversion photoluminescence and         magnetic resonance properties.},       journal = {Nanoscale},       year = {2011},       month = {Mar},       __markedentry = {[Theodore]},       doi = {10.1039/c0nr01018a},       institution = {Institute for Lasers, Photonics, and Biophotonics, The State University         of New York at Buffalo, Buffalo, New York 14260, USA. tyo2@buffalo.edu         pnprasad@buffalo.edu.},       language = {eng},       medline-pst = {aheadofprint},       pmid = {21373678},       timestamp = {2011.03.15},       url = {http://dx.doi.org/10.1039/c0nr01018a}     }          @ARTICLE{Ding2011a,       author = {Hong Ding and Ken-Tye Yong and Wing-Chueng Law and Indrajit Roy and         Rui Hu and Fang Wu and Weiwei Zhao and Kun Huang and Folarin Erogbogbo         and Earl J Bergey and Paras N Prasad},       title = {Non-invasive tumor detection in small animals using novel functional         Pluronic nanomicelles conjugated with anti-mesothelin antibody.},       journal = {Nanoscale},       year = {2011},       month = {Mar},       __markedentry = {[Theodore]},       doi = {10.1039/c1nr00001b},       institution = {The Institute for Lasers, Photonics and Biophotonics (ILPB), Department         of Chemistry, The State University of New York at Buffalo, Buffalo,         NY 14260, United States. pnprasad@buffalo.edu.},       language = {eng},       medline-pst = {aheadofprint},       pmid = {21365120},       timestamp = {2011.03.15},       url = {http://dx.doi.org/10.1039/c1nr00001b}     }          @ARTICLE{Ding2011,       author = {Hong Ding and Ken-Tye Yong and Indrajit Roy and Rui Hu and Fang Wu         and Lingling Zhao and Wing-Cheung Law and Weiwei Zhao and Wei Ji         and Liwei Liu and Earl J Bergey and Paras N Prasad},       title = {Bioconjugated PLGA-4-arm-PEG branched polymeric nanoparticles as         novel tumor targeting carriers.},       journal = {Nanotechnology},       year = {2011},       volume = {22},       pages = {165101},       number = {16},       month = {Apr},       __markedentry = {[Theodore]},       doi = {10.1088/0957-4484/22/16/165101},       institution = {Department of Chemistry, Institute for Lasers, Photonics and Biophotonics,         University at Buffalo, The State University of New York, Buffalo,         NY 14260, USA. Department of Pharmaceutical Sciences, University         at Buffalo, The State University of New York, Buffalo, NY 14260,         USA.},       language = {eng},       medline-pst = {ppublish},       pii = {S0957-4484(11)77811-4},       pmid = {21393821},       timestamp = {2011.03.15},       url = {http://dx.doi.org/10.1088/0957-4484/22/16/165101}     }          @ARTICLE{Pang2011,       author = {Zhaoguang Pang and Xinping Zhang},       title = {Direct writing of large-area plasmonic photonic crystals using single-shot         interference ablation.},       journal = {Nanotechnology},       year = {2011},       volume = {22},       pages = {145303},       number = {14},       month = {Apr},       __markedentry = {[Theodore]},       doi = {10.1088/0957-4484/22/14/145303},       institution = {Institute of Information Photonics Technology and College of Applied         Sciences, Beijing University of Technology, Beijing 100124, People's         Republic of China. College of Physics Science and Information Engineering,         Hebei Normal University, Shi Jia Zhuang 050016, People's Republic         of China.},       language = {eng},       medline-pst = {ppublish},       pii = {S0957-4484(11)78366-0},       pmid = {21346302},       timestamp = {2011.03.15},       url = {http://dx.doi.org/10.1088/0957-4484/22/14/145303}     }          @ARTICLE{Zhai2011,       author = {Tianrui Zhai and Xinping Zhang and Zhaoguang Pang and Fei Dou},       title = {Direct Writing of Polymer Lasers Using Interference Ablation.},       journal = {Adv Mater},       year = {2011},       month = {Mar},       __markedentry = {[Theodore]},       doi = {10.1002/adma.201100250},       institution = {Institute of Information Photonics Technology and College of Applied         Sciences, Beijing University of Technology, Beijing 100124, China.},       language = {eng},       medline-pst = {aheadofprint},       pmid = {21374741},       timestamp = {2011.03.15},       url = {http://dx.doi.org/10.1002/adma.201100250}     }         \end{filecontents}     \documentclass{article}          \usepackage[bibstyle=numeric, citestyle=numeric-comp, sorting=none,defernumbers=true,backref=false,firstinits=true,terseinits=true,                 isbn=false,url=false,doi=false,eprint=false, backend=bibtex8]{biblatex}      \DeclareNameAlias{default}{last-first}      \DeclareNameAlias{labelname}{last-first}     \DeclareBibliographyCategory{mypubs}          \bibliography{mymwe}     \begin{document}     \noindent This is a sample text citing all others     \cite{Zhai2011,Pang2011,Ding2011,Ding2011a}     The filecontents stuff here is simply to generate a .bib file, and I've used \nocite{*} to include all references rather than selected citations. Said he \textcite{Chen2011}          \printbibliography[maxnames=99,title={References}]          \addtocategory{mypubs}{Ding2011,Ding2011a}     \nocite{Ding2011,Ding2011a}          \printbibliography[maxnames=99,category=mypubs,resetnumbers=true,omitnumbers=true,title={List of Publications}]          \end{document}


title: How to draw horizontal(row) legend without the surronding rectangle?

text: I found the following code to manually draw legend, but it produces vertical(column) legend. How to draw it horizontally? I don't want surrounding rectangle also.               \documentclass{article}          \usepackage{pgfplots}          % argument #1: any options     \newenvironment{customlegend}[1][]{%         \begingroup         % inits/clears the lists (which might be populated from previous         % axes):         \csname pgfplots@init@cleared@structures\endcsname         \pgfplotsset{#1}%     }{%         % draws the legend:         \csname pgfplots@createlegend\endcsname         \endgroup     }%          % makes \addlegendimage available (typically only available within an     % axis environment):     \def\addlegendimage{\csname pgfplots@addlegendimage\endcsname}          \begin{document}          \thispagestyle{empty}          \begin{tikzpicture}         \begin{customlegend}[legend entries={$a$,$e^x$,C,$d$}]         \addlegendimage{red,fill=black!50!red,area legend}         \addlegendimage{red,fill=black!50!red,sharp plot}         \addlegendimage{red,fill=black!50!red,mark=*,sharp plot}         \addlegendimage{red,fill=black!50!red,ybar,ybar legend}         \end{customlegend}     \end{tikzpicture}          \end{document}       Output: ![enter image description here](http://i.stack.imgur.com/fGveI.png)


title: where do I report bugs in font packages

text: There are two font packages I like for great readability (letters are clearly distinguishable, and math fonts stands out from text since it is heavier a bit). Unfortunately, they are buggy. The first one, the one which I think gives the most readable math fonts is Boisik. I love its curly brace: very distinguishable from parentheses, brackets. Unfortunately, it has a problem with some small size fonts: it doesn't seem to have some of them in the 11pt and 12pt options to the class file, like article. Here is a small sample file               \documentclass[11pt]{article}           \usepackage{boisik}           \begin{document}           $$     T^{ U_{abcdefghijklmnopqrstuvwxyz0123456789}} \quad a \alpha     $$          \end{document}       When you compile (I have TeX Live 2012) the above, you won't get i,j,m,n,u. You get the same problem with the 12pt option, but no problem with 10pt, that is, without option. The above file also exhibits another problem (which seems to be common to other font packages as well), that the `a` and `\alpha` characters look almost the same. Another package I have problem with is `gfsneohellenic`. For me, it has the best textfonts. But I cannot use the package in my work since in math mode the characters `a` and `\alpha` are exactly the same. Another problem with the package is that in subscripts it crams binary symbols with their surroundings. In regular environment, binaries seem to be fine. Here is a sample file               \documentclass[12pt]{article}          \usepackage[default]{gfsneohellenic}          \begin{document}          $$     a = \alpha\qquad \sum_{n \le N}\qquad n \le N.     $$          \end{document}


title: PGF: Externalize + Fadings differences in viewer

text: I've been working with the `fadings` library in PGF and I was having trouble getting it working with externalize. I finally figured out that it was working, but Apple's Preview does not display the fadings when externalized. I opened the PDF with Adobe Acrobat and the fadings worked fine. Has anyone else come across this or know if it's a bug in PGF or Apple's Preview? Here's an example using `\includegraphics` and `\pgfuseimage`:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{external}     \usetikzlibrary{fadings}     \tikzexternalize     \begin{document}     % Three color triangles     \begin{tikzpicture}     \fill[green] (90:4) -- (210:4) -- (-30:4) -- cycle;     \fill[blue,path fading=west] (90:4) -- (210:4) -- (-30:4) -- cycle;     \fill[red,path fading=south] (90:4) -- (210:4) -- (-30:4) -- cycle;     \end{tikzpicture}     \includegraphics{\jobname-figure0.pdf}     \pgfdeclareimage{fig0}{\jobname-figure0.pdf}     \pgfuseimage{fig0}     \end{document}      Left is Adobe Acrobat, right is Apple Preview: ![enter image description here](http://i.stack.imgur.com/iyMUo.jpg) edit: Next is comparison between the above document in Preview and the externalized image also in Preview ![enter image description here](http://i106.photobucket.com/albums/m259/liamdamewood/compare2.jpg)