title: Using \usepackage[utf8]{inputenc} in moderncv.cls

text: I am trying to compile a CV using `moderncv.cls` but have problems with the special danish characters æ,ø,å. Normally I add either `\usepackage[utf8]{inputenc}` or `\usepackage[applemac]{inputenc}` packages to my template but this is not really working. The `moderncv.cls` file has the following part:                 \RequirePackage[T1]{fontenc}       \IfFileExists{lmodern.sty}%         {\RequirePackage{lmodern}}%         {}      Normally I would have `\usepackage[utf8]{inputenc}` before `fontenc`, but the `\RequirePackage` seem to mess this up. I use Texmaker and MacOS. Does anyone know how I can add the package? MWE: * * *               \documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman          \moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'     \moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'          \usepackage[scale=0.75]{geometry} % Reduce document margins     %\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column     %\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name          %----------------------------------------------------------------------------------------     %   NAME AND CONTACT INFORMATION SECTION     %----------------------------------------------------------------------------------------          \firstname{Lonnie} % Your first name     \familyname{Andersen} % Your last name          % All information in this block is optional, comment out any lines you don't need     \title{Curriculum Vitae}     \address{Gladsaxevej 78, st tv, 2860 Søborg}     \mobile{+45 31444177}     \email{lonnieandersen82@gmail.com}     \extrainfo{additional information}     %\photo[70pt][0.4pt]{pictures/Lonnie} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)     %\quote{"A witty and playful quotation" - John Smith}          %----------------------------------------------------------------------------------------          \begin{document}          \makecvtitle % Print the CV title          %----------------------------------------------------------------------------------------     %   EDUCATION SECTION     %----------------------------------------------------------------------------------------          \section{Education}          \cventry{2009--2013}{Ph.D student}{DTU Wind Energy}{}{Currently finishing thesis}{}     \cventry{2003--2009}{Cand. Scient in Biomedical engineering}{DTU}{}{\textit{GPA -- 8.4}}{}               \end{document}


title: Hang of List of schemes

text: I want to align the second line of long names in a list of schemes like in the second screenshot below. Current situation: ![enter image description here](http://i.stack.imgur.com/mbpKd.jpg) I want it like this: ![enter image description here](http://i.stack.imgur.com/UfcM5.jpg)


title: Conditionally including a TikZ figure

text: I have the following construction for a figure. The background is, when `\submit` is defined, only the caption is included, but no figure. Otherwise the figure is included. The problem is that I have two places in which the same caption needs to be put. It is a pain to keep this in sync. I'm hoping there is a easy way to save the text to a value, and input it to both places. I have multiple such figures, so I'd like to do this in as generic a way as possible. So, if I have n figures, I'd like one command or function, not n, to do the job. Also, this is for a journal which doesn't like extra packages, so I need a solution that doesn't require a special package. I'd also be interested in solutions that use a different approach.               \newcommand{\figlegend}{% figure legend       \refstepcounter{figure}% Increment counter for correct referencing     }     \ifdefined\submit \figlegend     Caption text     \label{schema}     \else     \par \mbox{}     \par     \begin{figure}[tp]       \begin{center}         \tikzsetnextfilename{Figure1-schema}         \input{SCHEMA}         \caption{%             Caption text                 }         \label{schema}       \end{center}     \end{figure}     \fi      EDIT: I've edited the title to reflect more accurately what I'm trying to do here. @Mike Renfro thought that one could solve the issue by not including the figure if `\submit` was active. So, I've changed the code to what I'm actually using. The `\input{SCHEMA}` inputs a `SCHEMA.tex` file which contains TikZ/PGF code. EDIT2: Edited title again. Unusually, I've accepted an answer that did not answer my original question. @Mike Renfro made a compelling case that I was asking the wrong question. I think his is a better answer to the question I wasn't asking, which was how to abstract out my conditional construct. Thanks Mike! For reference, I'm including the Guidelines for Figure and Table Preparation of the journal in question, in question, PLoS ONE.


title: Asymptote Draw Label relative to a plot or drawing

text: I have a graph (a `histogram` and a `draw(graph(...))`). I want a sort of title label above the whole plot. Right now I'm manually placing it, but I will need to make many such graphs with different sizes. Is there any way to do this automatically? Here is a simplified example:               import graph;     import stats;          string sample = "Participant G";     string key1 = "A";     string key2 = "B";     real[] a={152,136,151,144,512,128,184,152,136,128,152,128,568,120,144,144,160,136,128,1192,176,160,160,160,248,1624,488,296,408,143,161,167,144,145,152,128,2752,576,184,168,176,935,218,173,169,154,326,162,169,167,408,157,157,266,168,139,127,496,107,156,112,128,144,128,168,144,152,144,144,144,448,152,160,127,120,128,144,104,128,104,128,688,137,136,591,449,335,96,192,128,144,146,143,985,194,261,163,207,282,172,714,149,144,1249,155,1219,124,146,290,105,129,114,134,1270,2092,157,158,161,124,131,148,139,117,135,128,129,197,141,173,643,172,143,619,281,114,174,945,130,133,136,183,441,126,117,114,107,154,146,128,119,125,159,270,194,276,207,403,144,736,138,138,118,166,81,125,136,130,160,711,113,143,131,324,191,115,157,123,216,113,141,124,113,131,133,183,906,132,123,125,142,149,133,141,126,244,148,160,124,197,162,110,128,576,376,186,122,137,139,120,133,163,144,376,118,268,156,148,646,819,158,183,721,125,174,139,125,152,127,272,158,159,316,142,144,127,120,136,160,144,144,136,137,120,128,136,135,1320,471,641,190,705,161,134,99,309,154,136,641,155,147,2357,232,132,131,115,785,164,446,137,122,139,136,131,139,133,141,152,150,153,139,138,120,139,664,145,139,169,151,138,578,192,159,139,136,141,801,205,295,1113,194,924,136,141,151,159,144,369,1137,192,157,149,160,158,291,331,340,168,151,156,141,138,202,176,123,110,224,194,172,174,153,139,134,129,133,402,133,134,650,196,1038,159,1800,505,954,206,156,177,1424,236,136,141,143,123,120,170,123,220,157,139,136,120,127,138,1460,1329,748,138,578,249,345,185,163,341,136,333,151,123,118,108,114,102,118,120,131,131,152,175,146,696,144,191,1703,136,136,128,128,136,128,128,280,224,1552,1056,176,144,137,284,133,457,144,136,128,1279,200,1072,128,136,120,719,688,168,224,151,136,144,144,176,136,152,136,151,112,168,128,816,280,144,128,152,136,128,1472,240,176,177,752,144,136,152,120,144,152,112,128,120,120,96,120,144,112,160,136,136,160,1168,137,111,160,137,128,161,144,136,136,143,145,95,296,162,126,112,151,137};     int n = a.length;     int myBins=bins(a);          size(152mm,76mm,IgnoreAspect);          histogram(a,min(a),max(a),myBins,normalize=true,low=0,lightred,black,bars=false);          //manual placement, will break if data changes:     label(sample + ": " + key1 + "," + key2,(1000,.014),NE);     xaxis("time differences (ms)",BottomTop,LeftTicks);     yaxis("frequency",LeftRight,RightTicks(trailingzero));      What's the best way to do this? Can I put a label right above the top x-axis, or as a sort of second xaxis label?


title: Tikz externalization figure not aligned/caption missing

text: I am putting a presentation together using beamer. I have a few tikz/pgf pictures that I externalize. Yet the figures are not put back into the document correctly. They are not in the right spot on the slides and the captions are missing. The externalization did produce the figures correctly as far as I can tell. I have the same problem when using the hyperref package in article class documents. As far as I know beamer uses hyperref in itself? I am unsure how to circumvent this issue, any ideas? Here's a simple working example               \documentclass[red]{beamer}       \usepackage{tikz}       \usepackage{pgfplots}       \usepgfplotslibrary{external}       \tikzexternalize       \tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"; dvips -o "\image".ps "\image".dvi}}       \tikzset{external/force remake}     \begin{document}       \frame{         \begin{figure}           \centering           \tikzsetnextfilename{MyFig}           \begin{tikzpicture}             \begin{axis}[xmin=0,xmax=5,                ymin=1,ymax=6,                        domain=0:5]           \addplot [red] {x*x-2*x+3};             \end{axis}           \end{tikzpicture}           \label{fig:MyFig}           \caption{This text is missing}         \end{figure}       }     \end{document}      I compile with, with TeXLive:               latex -interaction=nonstopmode -shell-escape %.tex; dvips -o %.ps %.dvi; ps2pdf %.ps


title: multiletter names in lambda calculus

text: First, I am new to TeX and use it only for mathematical expressions. IMHO the most striking feature is that TeX does not respect whitespaces.   1. In lambda calculus, application is denoted by juxtaposition. In programming languages based on lambda calculus (ML, Haskell) names may be several letters long, therefore, to separate names in application, a whitespace is placed between names. I want to use function names from standard libraries of those programming languages, therefore I can not just give up multiletter names. Currently I use “\ ” in application, but it seems hackish to me and clutters the code. What is the best way to do this? Example: You can take just any functional code, like `$foldr\ f\ z\ (x:xs) = f\ x\ (foldr\ f\ z\ xs)$`.   2. BTW, is it regular in lambda calculus to embrace multiletter names in “operatorname”?


title: Drawing a filled-in arc using TikZ

text: I am trying to draw the area formed by an arc of a circle (specifially 3/4 of a circle, that is `0 <= \theta <= 3\pi/2`) with a radius of 4 using TikZ. I also need the interior of that arc filled in. here is what I have thus far, but 'too' much is filled in, and that may be a result of the manner I have use to draw the arc:               \begin{tikzpicture}     \draw [->] (-5.0,0)--(5.0,0);     \draw [->] (0,-5.0)--(0,5.0);     \filldraw[fill opacity=0.5,fill=blue] (4,0) arc (-0.05:275:4.0cm);         \foreach \x in {-4,4}         \draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\x$};         \foreach \y in {-4,4}         \draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\y$};     \end{tikzpicture}      Any help will be appreciated.


title: Re-Indent in TeXShop

text: Is there something as Re-Indent (in Xcode) or Smart Indent (in Matlab) for TeXShop?


title: Have a new seed in pgfmath more often

text: I'm using pgfmath in my code since I need some randomness and I want the seed used for the randomness to be updated each time I compile. I read that pgfmath is updating the seed every minute, which is not enough for what I'm doing. Is there a way to force him to update every second or, even better, every millisecond? Here is a toy example of code which prints randomly 4 elements in the list {one, two, three, four}               \documentclass[11pt,a4paper]{report}     \usepackage{tikz}     \begin{document}     \pgfmathdeclarerandomlist{mylist}{{one}{two}{three}{four}}     \pgfmathrandomitem\elem{mylist}\elem\       \pgfmathrandomitem\elem{mylist}\elem\        \pgfmathrandomitem\elem{mylist}\elem\       \pgfmathrandomitem\elem{mylist}\elem     \end{document}


title: specifying a longtable not to split

text: I am using longtable in my report as I have many tables that are longer than a page. To make it consistent, I am using longtable for all the tables. Many times because of page settings, a small table gets split into two across consecutive pages. Is there a way to specify to a longtable that don't split this table across pages? I know this defeats the purpose of longtable in a way, but I am looking for a work around.


title: \label \ref pair in pgfplots does not work on running latex command second time

text: I am preparing a long document with Latex on Linux. The document uses lots of plots including 3D plots. Without externalizing the plots, latex gives me a message of memory problem. After much searching on forums and reading about the pgfplots document (http://pgfplots.sourceforge.net/pgfplots.pdf) on Page 464, I realized that the problem is due to the \label \ref pair in my plots as I use \label inside the pgfplot code, and \ref in the caption to refer to the marker line. The Latex document compiles successfully on first run and creates all the necessary files such as .dpth .spl .eps .dvi .log on the first latex run. But when I run latex for the second time, I get this error: > ! Package tikz Error: Sorry, the system call 'latex -shell-escape -halt-on- > erro r -interaction=batchmode -jobname "elsarticle-template-1a-num- > figure_crossref0" "\def\tikzexternalrealjob{elsarticle- > template-1a-num}\input{elsarticle-templat e-1a-num}" && dvips -o > "elsarticle-template-1a-num-figure_crossref0".eps "elsar ticle- > template-1a-num-figure_crossref0".dvi' did NOT result in a usable output > file 'elsarticle-template-1a-num-figure_crossref0' (expected one of > .epsi:.eps: .ps:). Please verify that you have enabled system calls. For > pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named > 'write 18' or something li ke that. Or maybe the command simply failed? > Error messages can be found in 'el sarticle-template-1a-num- > figure_crossref0.log'. If you continue now, I'll try t o typeset the > picture. I am using the following latex commands two times:               latex -shell-escape elsarticle-template-1a-num.tex     latex -shell-escape elsarticle-template-1a-num.tex      This is how my document looks:                   \documentclass[preprint,12pt]{elsarticle}              \usepackage[usenames,dvipsnames]{pstricks}         \usepackage{epsfig}         \usepackage{pst-grad} % For gradients         \usepackage{pst-plot} % For axes         \usepackage{pstricks-add}         \usepackage{amsmath}         \usepackage{amsthm}         \usepackage[lined,boxed,commentsnumbered]{algorithm2e}         \usepackage{subfigure}         \usepackage{pgfplots}         \usetikzlibrary{patterns}         \usepackage{tikz}         \usepgfplotslibrary{external}         \tikzexternalize         \tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource" && dvips -o "\image".eps "\image".dvi}}         \begin{document}         Lots of text content here. Also some pstricks images.         %Plots begin here. Here I use \label \ref         \begin{table}[!htb]         \begin{minipage}{.5\linewidth}         \input{alpha_0_vary_results_1.txt}         \end{minipage}%         \begin{minipage}{.5\linewidth}         \input{alpha_0_vary_results_2.txt}         \end{minipage}         \begin{minipage}{.5\linewidth}         \input{alpha_0_vary_results_3.txt}         \end{minipage}%         \begin{minipage}{.5\linewidth}         \input{alpha_0_vary_results_4.txt}         \end{minipage}         \caption{Values of \(\alpha\) from [0,1] in different data. The line denoted by \ref{abc} marker is the \texttt{abc}. The line with \ref{new_one} marker is the \texttt{New One} scheme.}         \label{alpha_0_vary_results_figure}         \end{table}     \bibliographystyle{abbrv}     \bibliography{references.bib}          \end{document}      This is one of the pgfplots files. Showing alpha_0_vary_results_1.txt file.               \begin{tikzpicture}[scale=0.8]     \begin{axis}[title=Data 1,xlabel=\(\alpha\),ylabel=Measure]     \addplot[color=black,mark=x , mark size=4] coordinates {             (10,100)             (20,150)             (40,225)             (80,340)             (160,510)             (320,765)             (640,1150)     };\label{abc}     \addplot+[color=black,mark=o , mark size=4] coordinates {             (10,130)             (20,110)             (40,155)             (80,130)             (160,210)             (320,735)             (640,950)     };\label{new_one}     \end{axis}     \end{tikzpicture}      I get no errors in running latex two times using the above commands when I remove all the plots from my document. So this means the problem is related to the plots.


title: Changing Figure Numbering depending on how many occur in an \item

text: While trying to typeset examination papers in LaTeX, I've become the victim of shifting figure numbering standards laid down by my institution. The old way required figures to be numbered like this:               \renewcommand{\thefigure}{\theenumi\ifnum\value{figure}>1/\Alph{figure}\fi}      which is to say Figure Q1, Figure Q1/B, Figure Q1/C, etc. (the A omitted on the first figure). Now we have to put the '/A' on the first figure, but if there's only one figure per question, leave the '/A' out all together. Questions are in an enumerated list at the top level; hence the `\theenumi` above. So now, if Q2 had one figure, it would be Figure Q2. If it were followed by Q3 with two figures, they would be Figure Q3/A and Figure Q3/B.


title: Golden ratio typography in TeX

text: Chris Pearson makes a number of claims in his article Secret Symphony: The Ultimate Guide to Readable Web Typography, which I find fascinating, and I would like to know: are the formulas he proposes applicable and useful when using TeX? Specifically, Pearson asserts that there is a relationship between the _font height_ (or x-height), _line height_ and _line width_ whereby using the golden ratio one can with two of the above calculate preferable variables for displaying text on the web for improved appearance and reading. I thought the article was fascinating and well written, and though I am not qualified to comment on the merits I also found the criticisms and comments to support a well thought out methodology on the hypothesis (utilization of the golden ratio to lay out text). Pearson even put together a web-site to calculate the relevant Cascading Style Sheet variables. Pearson has posited the following equations: > **(1) for calculating the line-height:** > > ![Line height ratio tuning equation](http://i.stack.imgur.com/GjPCY.gif) > > (i.e. `h = \varphi - \frac{1}{2\varphi}\left( 1 - \frac{w}{w_\varphi} > \right)`) and > **(2) for calculating the line width:** > > ![Line width tuning equation](http://i.stack.imgur.com/qHAIz.gif) > > (i.e. `w = {l_\varphi}^2[1 + 2\varphi(h - \varphi)]`) where _`h`_ is the font height, _`w`_ is the line width, _`l`_ is the line height, and _`φ`_ is the golden ratio. Pearson then goes on to state: > Golden Ratio Typography can be used to fine tune the typography of any > medium! Are the above formulas applicable and useful when using TeX? Insofar as this is a useful methodology for determining the relationship between line width, line height and font height, can it be applied to TeX and if so how? There are some apparent considerations in the article because it caters to presentation on the web and which considerations are not relevant to typesetting with TeX, notably with respect to the need to round line height and other variables on the web, and the need to use font-height because x-height is unavailable. Are there others?


title: blindtext, unicode-math, and babel won't play nice because of setmathfont (in LyX)

text: Usng unicode-math, I am trying (in LyX) to use a font for my main font, and also for math Latin and Greek characters, while keeping the rest as is. At the same time, I want to use `blindtext`. Blindtext only allows `\blindmathtrue` if the language has been set to English. This I believe I have to do via the language package custom area in the LyX document preferences, however using `\usepackage[english]{babel}` breaks `unicode-math`. I get > ! Font \l_tmpb_font has only 8 fontdimen parameters. If I use the default language package, all works, except, as stated above, blindtext English/math.               %This is in my preamble:     \usepackage[vargreek-shape=unicode]{unicode-math}     \setmathfont{Latin Modern Math} % this is obligatory or no math font will     be set...     %everything works to here. But this setmathfonts is causing the problem     \setmathfont[range=\mathit/{latin, Latin}]{SNsanafonmaruP}      % upper and lower case latin and numbers      % any font will do          \setmainfont[Mapping= tex-text]{SNsanafonmaruP} % not actually relevant....     \usepackage{blindtext}      I don't believe the font I used is the problem; I get the same behavior whatever text only font I use, even common ones like Biolinium or Hoefler Text. (N.B. The example is heavily redacted from a larger set of uses of `unicode- math` for nefarious purposes, so this a best effort to produce a MWE for what seems to be the crux of the matter.) The problem is not with LyX. Here is a TeX (TeXShop) document that does not work:               % tell TeXShop to use xelatex, open/save in Unicode     %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode     \documentclass[12pt]{article}     \usepackage[english]{babel}          \usepackage[vargreek-shape=unicode]{unicode-math}     \setmathfont{Latin Modern Math} % obligatory or no math font will be set...          %UNCOMMNENTING THIS LINE CAUSES ERROR     % using text only font: I also tried Hoefler Text, etc. The font I really want is SNsanafonmaruP     %\setmathfont[range=\mathit/{latin, Latin}]{Linux Biolinum O} %  upper and lower case  latin and numbers     %Using a font like LLO however, does work     %\setmathfont[range=\mathit/{latin, Latin}]{Linux Libertine O} %  upper and lower case  latin and numbers          \usepackage{blindtext}     \begin{document}          No math:\blindtext     \blindmathtrue     With Math:\blindtext          \end{document}


title: How do i get this Bib file right?

text: Right now I have the following BibTeX file:               @Article{PLT,         author  = {Carmen C. Centena, Mitre C. Dourado und         Jayme L. Szwarcfiter},         title   = {On the Convexity of Paths of Length Two in Undirected Graphs},         URL = {http://www.sciencedirect.com/science/article/pii/S1571065309000043},         year    = {2009},      }                      @Article{RIGP,     author  = {Mitre C. Dourado, Lucia D. Penso, Dieter Rautenbach und Jayme L. Szwarcfiter},          title   = {Reversible Iterative Graph Processes},          journal = {Theor. Comput. Sci. 460: 16-25 },          year    = {2012},          }          @Article{IVE,          author  = {Carmen C. Centena, Lucia D. Penso, Dieter Rautenbach und Vinicius G. P. de Sá},          title   = {Immediate versus Eventual Conversion: Comparing Geoteic and Hull Numbers in $P_{3}$-Convexity},          URL = {http://www.sciencedirect.com/science/article/pii/S0304397512005798},          year    = {2010},     }      I d like to see this in the PDF pretty much as I have written in here. Which `\bibliographystyle` should I use and do I need some extra packages?


title: Vector images in PDF

text: I use `latexmk` to automatically generate my LaTeX files. I want to use vector graphics, exported from Matlab (*.eps) but I know, that this is not possible (for some reason) - just image files like *.jpg or *.png. Is there a way to tell latexmk to workaround that drawback or will there be no vector graphics for me in near future? Sorry in case I bring up the issue again - but after quite some time with LaTeX it's still not clear to me...


title: How do you use Psvectorian?

text: Can someone provide a short explanation or example of using `psvectorian`? http://melusine.eu.org/syracuse/pstricks/vectorian/psvectorian.pdf Specifically, I am looking for an explanation of how to download required documentation, files, styles, etc (I downloaded the files from CTAN to no avail). I also would like to know how to use these ornaments in the body of the document as well as the `fancyhdr` environment for both centered headers and footers. Lastly, can I use `psvectorian` while typesetting in XeLaTeX? Maybe there is a quick and simple example someone can provide?!


title: Break y axis for values exceeding range

text: Related to this question regarding values that exceed the axis range (which also provides the code for a MWE), I would like to modify the output slightly: instead of displaying the numbers above the bars, the y axis should be cut off as well (obviously, this only works if the exceeding values are in the same range which they are in my case). Here's a picture of how I thought of it: ![example with cut off axis and chart](http://i.stack.imgur.com/71Zn9.png) Does pgfplots provide keys that allow such a modification of the axis?


title: Using \lstinputlisting to include a file but only certain lines or line ranges

text: I wanted to tidy up a TeX document and was curious if you can use `\lstinputlisting` or a similar function to include a certain part of a source-code file. Example, I have a 500 or so line source file and I want to include just lines 300-400. Is there a way to do this?


title: Indenting text and still allowing sections, pagebreaks and floats

text: I have a document where there are some sections with and some without subsections. When there are subsections, I want them (and all their content) to be indented. I have found several approaches to this which basically come down to the following two:   1. **Using a minipage** This comes with two problems: Sections can't be broken over pages and floats can't float into or out of the minipage, so all floats would have to be placed between sections in the source as well as in the output.   2. **Using addmargin (or adjustwidth)** (The addmargin environment is provided by KOMA-script and the adjustwidth environment by the changepage package.) This one doesn't have the problems a minipage has, but sectioning commands don't seem to work inside these environments at all. I get the error `Something's wrong--perhaps a missing \item.`. How can I achieve the indentation without having any of these problems? * * * MWE:               \documentclass[parskip=half]{scrartcl}          \begin{document}          \section{Using minipage}          \hfill\begin{minipage}{\dimexpr\textwidth-2cm}          \subsection{A Subsection}          First table declared here.          \begin{table}         \centering         \caption{some table}              \begin{tabular}{c c}             1, 1    &   1, 2    \\             2, 1    &   2, 2    \\         \end{tabular}     \end{table}          \subsection{Another Subsection}          Plain text.          \end{minipage}          \section{Using addmargin}          \begin{addmargin}[2cm]{0cm}          \subsection{A Subsection}          Second table declared here          \begin{table}         \centering         \caption{some table}              \begin{tabular}{c c}             1, 1    &   1, 2    \\             2, 1    &   2, 2    \\         \end{tabular}     \end{table}          \subsection{Another Subsection}          Plain text.          \end{addmargin}          \end{document}      Output: ![The output of the MWE](http://i.stack.imgur.com/ocek4.png)


title: No hebrew shows in DVI (CTRL+D)

text: I've installed LyX with culmus-latex on Ubuntu 14.04 and set settings according to this tutorial: http://gadial.net/Documents/LyX%20Guide.pdf My problem is that when I preview some document in hebrew with CTRL+D I don't see any hebrew. Where there was supposed to be hebrew I see nothing, blank space. What could be the problem?


title: Opacity of a legend fill in pgfplots

text: I am forced to make rather small plots that need to have a legend. This means that it is unavoidable that part of the plot gets covered by the legend. To retain legibility of the plot, I would like to make the _background_ of the legend partly transparent. My approach was to use `legend style={fill opacity=0.8, draw opacity=1}`, however, this makes the whole legend transparent, and not only the fill. Here is an MWE:               \documentclass{article}          \usepackage{pgfplots}     \pgfplotsset{compat=1.10}          \begin{document}         \begin{tikzpicture}             \begin{axis}[                 width=5cm,                 axis equal,                 legend style={fill=white, fill opacity=0.6, draw opacity=1},                 ]                 \addplot[samples=100, domain=0:2*pi, red]                  ({cos(deg(x))}, {sin(deg(x))});                  \addlegendentry{test}             \end{axis}         \end{tikzpicture}     \end{document}      The output is: ![Fully translucent legend](http://i.stack.imgur.com/mXmtP.png) As you can see the outline is fully drawn, but the text inside the legend is also transparent. How can avoid this, and only make the fill translucent?


title: Table position at Top Problem

text: I am trying to place my table at the top of page but it seems there is something I am missing. First of all here is what my document structure               \documentclass{article}     \begin{document}     \section{Introduction}     4 long paragraphs which take exactly one page with this document class.     % Now the actual table starts     \begin{table}     \centering     \caption{Vertical Alignment Test}     \begin{tabular}[t]{ |m{0.85\textwidth}|c| } \hline     Somewhat 20 rows for this table     \end{tabular}     \end{table}     % Table end here     Immediately after table, Same 4 long paragraphs are copied but without \section.     \end{document}      This results in following output document structure   * Page-1: 4 paragraphs   * Page-2: Vertically center aligned table   * Page-3: 4 paragraphs **Problem:** Now my table is not as much long that it should take complete page rather if aligned properly at top of page, 2 paragraphs from bottom can be adjusted on page-2. **Tried Solutions** Here is somewhat related question which discusses the same problem. I tried to understand accepted answer and applied given solutions but no luck. I tried to move table between paragraphs but it didn't change on output file mean same structure keep on outputting i.e. 4 paragraphs -> table -> 4 paragraphs I cut some rows and at about half of rows (10) table get positioned at top and I get the effect what I wanted. But I don't want 10 rows I want all 20 rows in one table. Please let me know if there are any questions regarding my explanation.


title: How to correctly use tabular/table

text: What's wrong with this code, please?               \documentclass[franch]{beamer}     \usepackage{babel}     \begin{document}     \begin{frame}{Cs}     \centering     \begin{table}     \centering     \caption{Comparatif entre \textit{Two Track Unified Process} et \textit{Rational Unified Process}}     \begin{tabular}{|c{0.5cm}|c{0.5cm}|c{0.5cm}|c{0.5cm}|c{0.5cm}|}     \hline     & Axé développement & Projets cibles & Technologies & Architecture logicielle \\     \hline     RUP & \includegraphics[height=1.8ex]{images/danger} & >= 10 & \includegraphics[height=1.8ex]{images/danger} & \includegraphics[height=1.8ex]{images/danger} \\     \hline     2TUP & \includegraphics[height=1.8ex]{images/func_ok} & * & \includegraphics[height=1.8ex]{images/func_ok} & \includegraphics[height=1.8ex]{images/func_ok} \\     \hline     \end{tabular}     \end{table}     \end{frame}     \end{document}      I couldn't be able to find the error. The table misses two vertical lines on output.


title: Hieroglyphs: How could we map several font files?

text: > **This question is for (TeX) archaeologists** _Notice:_ We have got better fonts for hieroglyphs these days stored in a single font file, or in SVG file(s), or in a series of GIFs covering all the Unicode hieroglyphs (Gardiner, New Gardiner, Gardiner in color, Aegyptus, Hieroglyphica project and probably some more), see U13000 for more details. In old days, we needed more font files because there was a limitation of 256 glyphs per font. This is an example of it, we have got five font files for hieroglyphs, http://www.rockwellweb.com/hiero.htm. How can we map all the present hieroglyphs? An example: when we enter `\tohiero{A1-A2-A3}` in TeX we should get first three hieroglyphs from the first font file (`GARDAE__.TTF`). The glyph positions are `"F021`, `"F022` and `"F023`. ![mwe](http://i.stack.imgur.com/aCHEi.png)


title: Tikz - Marking nodes in a binary tree?

text: I need help marking nodes in a binary tree. I've tried drawing this using the fitting library in tikz, but the fit would cover other undesired nodes as well. Please help. The code I tried is here               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes}     \colorlet{light blue}{blue!50}     \begin{document}     \begin{tikzpicture}[       inner/.style={fill = light blue,circle,draw,thick,minimum width=5mm,inner sep=0},       small inner/.style={inner,minimum width = 3mm},       triangle/.style={fill = light blue,isosceles triangle,draw=,thick,shape border rotate=90,isosceles triangle stretches=true, minimum height=20mm,minimum width=15mm,inner sep=0,yshift={-10mm}},       small triangle/.style={triangle, minimum height = 8mm, minimum width = 6mm },       large triangle/.style={triangle,minimum width = 27mm,minimum height=36mm,yshift={-11mm}},       very large triangle/.style={triangle,minimum width = 33mm,minimum height=44mm,yshift={-11mm}},       level 1/.style={sibling distance=70mm},       level 2/.style={sibling distance=35mm},       level 3/.style={sibling distance=25mm},       level 4/.style={sibling distance=25mm},       level 4/.style={sibling distance=15mm},       level 5/.style={sibling distance=7mm},     ]       \node[inner] {}          [child anchor=north]         child {node[inner] {}             child {node[large triangle,yshift={-3mm}] {$2^{i-1}-1$}}             child {node[inner,yshift={0mm}] {}                 child{node[triangle,font=\small,yshift={-3mm}] {$2^{i-2}-1$}}                 child{node[inner,yshift={0mm}] {}                     child{node[small triangle,font=\fontsize{6}{3},yshift={12mm}]{}}                     child{node[small inner,yshift={7mm}]{}                         child{node[small inner,yshift={9mm}]{}}                         child{node[small inner,yshift={9mm}]{}}                     }                 }             }         }         child {node[very large triangle ,yshift={-12mm}] {}};     \end{tikzpicture}     \end{document}      ![The image I'm trying to make](http://i.stack.imgur.com/tZYue.jpg) ![Output of my code](http://i.stack.imgur.com/AaWTa.png3)


title: Creating stackoverflow like tags

text: I'm trying to create stackoverflow like tags. Currently I'm using an `\fbox{text}` to create the tags, which works, but not all boxes have the same height (it seems that letters like 'p' make a box take more height). Is there a way to create something like `\fbox` but with a fixed height? (They don't need to have a drop shadow or something like that. Just simple framed boxes)


title: Adjust width of listings including pagebreaks

text: I have my own lstlistings environments which are framed. Since I wanted to adjust the width so the frame starts with the text I used a minipage inside the lstlisting. (See MWE). But as I have quite long code fragments I'd like to allow Page-Breaks inside the listing which is not possible using minipage. I was not able to achieve the same thing using `\adjustwidth{..}`. Any ideas? (I am using XeLatex)               \documentclass[a4paper]{article}     \usepackage{polyglossia}     \setdefaultlanguage[]{english}          \usepackage{listings}     \lstset{frame=single}     \usepackage{ifthen}     \lstnewenvironment{example}[1]       {       \flushleft \textbf{Example }\def\ExampleDescription{#1\\}\\       \ExampleDescription       \hspace*{\dimexpr\fboxrule+\fboxsep}%        \minipage{\dimexpr\textwidth-\fboxsep-\fboxrule}%        }{       \endminipage       }     \usepackage{lipsum}     \begin{document}          \lipsum[2-6]     \begin{example}{Description}     hello     this is a code example     that should     be long     enough     to provoke a pagebreak     \end{example}     \end{document}


title: How can I changethe formatting of the journal entry to italics with vancouver.bst?

text: `[vancouver.bst][1]` output does not provide by defaults italics for the journal title. Is there any way to change this?


title: biblatex/babel autolang= doesn't work with idemtracker

text: Although I was glad to discover that biblatex integrates with babel for bibliography formatting, I might have found a bug that prevents it to work with idem (not ibidem) entries. Same goes with biblatex-dw (e.g. footnote-dw style), verbose*, historian and probably with any biblatex style. I keep getting a space before punctuation in citations managed with the idem tracker although the collins* bib entries have langid = {english}. Is there a workaround against this or should it be reported as a bug? Thanks. I think I am up do date with biblatex version 2.8. Example with style=historian,               \documentclass[french]{article}          \usepackage{filecontents}     \begin{filecontents}{file.bib}     @BOOK{collinscha,       title={Changing Order: Replication and Induction in Scientific Practice},       publisher={University of Chicago Press},       year={1992 [1985]},       author={Harry Collins},       edition={New},       langid={english}     }          @BOOK{collinsoth,       title={another book title with same author},       publisher={na},       year={9999},       author={Harry Collins},       langid={english}     }     \end{filecontents}          \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{verbatim}     \usepackage[english,ngerman,frenchb]{babel}     \usepackage{csquotes}     \usepackage[style=historian,backend=bibtex8,autolang=hyphen]{biblatex}     \DefineBibliographyStrings{french}{namedash={---------}}     \addbibresource{file.bib}          \begin{document}     \cite{collinscha}.          \cite{collinsoth}.          Formating error: see how babel french made-up a space before the colon.          \cite{collinscha}.          \printbibliography     \end{document}      gives, ![enter image description here](http://i.stack.imgur.com/PzW7x.jpg) Example with style=verbose-trad1,               \documentclass[french]{article}          \usepackage{filecontents}     \begin{filecontents}{file.bib}     @BOOK{collinscha,       title={Changing Order: Replication and Induction in Scientific Practice},       publisher={University of Chicago Press},       year={1992 [1985]},       author={Harry Collins},       edition={New},       langid={english}     }          @BOOK{collinsoth,       title={another book title with same author},       publisher={na},       year={9999},       author={Harry Collins},       langid={english}     }     \end{filecontents}          \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{verbatim}     \usepackage[english,ngerman,frenchb]{babel}     \usepackage{csquotes}     \usepackage[style=verbose-trad1,backend=bibtex8,autolang=hyphen]{biblatex}     \addbibresource{file.bib}          \begin{document}     \cite{collinscha}.          \cite{collinsoth}.          Formating error: see how babel french made-up a space before the colon.          \cite{collinscha}.          \printbibliography     \end{document}      gives, ![enter image description here](http://i.stack.imgur.com/7lnVS.jpg)


title: How can I output the PDF to a different folder?

text: I am using TexStudio on Windows 7 with Miktex. Currently, the output PDF of my document is generated in the same folder as my `.tex` files. How can I output it elsewhere?


title: Output temporary files in a different directory

text: TexStudio currently dumps all intermediate files into the same directory that my .tex files were in. It makes a lot of clutter. Can these be put into their own directory? How? I'm using Miktex on Windows 7.


title: How to reduce the space between two footnotes, making them seem more like two paragraphs?

text: \documentclass{article}     \usepackage{lipsum}     \usepackage[doublespacing]{setspace}     %\usepackage[onehalfspacing]{setspace}     \setlength{\parskip}{0pt}     \usepackage[b5paper]{geometry}     \begin{document}     {\footnotesize\lipsum[3]\lipsum[3]}     text\footnote{\lipsum[3]}     text\footnote{\lipsum[3]}     \end{document}      If I use `setspace` package to change the line spacing, you can see that there is a big space between the two footnotes. How do I make the footnote just like the main body, as if it were like two paragraphs?


title: How can I apply a style to \frame{} that is similar to the style of mdframed?

text: I am often using a "mdframed" package to frame my paragraphs or important statements. I usualy do it like this (MWE):               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[framemethod=TikZ]{mdframed}     \mdfdefinestyle{opombe}{%         font=\footnotesize,         linecolor=orange,         outerlinewidth=1pt,         roundcorner=5pt,         innertopmargin=5pt,         innerbottommargin=5pt,         innerrightmargin=10pt,         innerleftmargin=10pt,         backgroundcolor=orange}          \begin{document}          \begin{mdframed}[style=opombe]     some text     \end{mdframed}          How can I apply same style to \frame{some text}?          \end{document}      I would like to use the same profile for `\frame{}` (provided in MWE). What are my options here? I need this frame to be in line with text and not a paragraph like (like mdframed environment). Is it possible to edit mdframed to be in line with text?


title: Typesetting pinyin finals

text: With the package `\pinyin`, it is possible to write pinyin using commands such as `\bu4`. This package produces much better tone marks than are provided by `\'`, `\v`, etc. The package `\pinyin` includes all of the pinyin for full words, as well as `\a` and `\o` (because by themselves these can be words), however, I need to typeset the remaining finals individually: > ē é ě è ī í ǐ ì ū ú ǔ ù ǖ ǘ ǚ ǜ It is rare for these to appear on their own, hence, I have not been able to locate any commands which will print them, provided by the `pinyin` package, so I think the authors left that out. I have found a copy of the source code on CTAN, however, it does not appear to be using LaTeX code to define things. I believe somewhere in this code much of the answer, but it is filled with these strange `@` and `#`'s:               \def\py@@#1#2#3#4{       \py@kern{#2}#1       \ifcase #4         \or\py@macron #1{.3}\or\py@acute #1\or\py@hacek #1\or\py@grave #1\or #1       \fi       \py@kern #1{#3}}          \def\py@a{\py@@ a}     \def\py@A{\py@@ A}          \def\py@e{\py@@ e}     \def\py@E{\py@@ E}          \def\py@i#1#2#3{       \py@kern{#1}i       \ifcase #3         \or\py@macron\i{.3}\or\py@acute\i\or\py@hacek\i\or\py@grave\i\or i       \fi       \py@kern i{#2}}     \def\py@I{\py@@ I}          \def\py@o{\py@@ o}     \def\py@O{\py@@ O}          \def\py@u{\py@@ u}     \def\py@U{\py@@ U}      How can I replicate the results of the `pinyin` package, but only displaying the finals (ending vowels) on their own? Update: Just to clarify, I don't need all of the finals (i.e. -ue, -ing), as I can typeset those with a combination of letters.


title: Automatic edge placement / avoid collisions in generated graph

text: I have the following graph, whose labels are generated in a for-loop:               \documentclass[tikz,margin=5mm]{standalone}     \usetikzlibrary{graphs,graphs.standard,quotes}          \usepackage{ifthen}          \begin{document}     \begin{tikzpicture}     \tikzstyle{vertex}=[circle,fill=blue!15,draw,minimum size=17pt,inner sep=0pt]          \graph[circular placement, radius=4cm, group polar shift=(360/5:0),     nodes={circle,draw,vertex}] {         \foreach \x [evaluate=\x as \sx using int(\x+1)] in {0,...,4} {           \foreach \y in {0,...,4} {             \x -- \y;             \x --["\ifthenelse{\sx<\y}{$\mathsf{alph}(w_{\sx} \cdots w_{\y})$}                     {\ifthenelse{\sx=\y}{$\mathsf{alph}(w_{\sx})$}{}}", sloped] \y;           };         };       };     \end{tikzpicture}     \end{document}      The result is, that the labels   * cross the graphs edges   * overlap with other labels The only thing I found out about this is, that automatic collision avoidance seems not to be available: Label automatically positioned so that it doesn't overlap anything. Anyway, my example graph is not uncommon and somehow I should be able to place the labels in an acceptable way. If there is no general way, what are possible solutions for this example? I could think of the following positioning (including some resizing of the graph)   * place the labels of the outmost edges on the outside   * place the other labels in the pentagon in the middle But I would not know how to achieve this.


title: "Black marker" effect in the text (sanitization used to hide passwords in code example)

text: I wonder if there is any latex library that allows me to obtain a sanitization "black marker" effect in order to conceal _omissis_ information, like for example a secret code in a url or a password in a code listing. Please have a look at this to get the idea of what I wish to obtain: document with _omissis_ information and here Any ideas?


title: Footnotemark in caption of listing causing problem

text: I have the following listing:                  \begin{lstlisting}[float=h,caption={Description\footnotemark.}, label={listing2},             keywordstyle=\color{blue}\bfseries, ndkeywordstyle=\color{black}\bfseries, commentstyle=\color{red}\ttfamily,             stringstyle=\color{green}\ttfamily, identifierstyle=\color{black},backgroundcolor=`\color{white},frame=single, frameround=ffff,captionpos=b,basicstyle=\scriptsize]`          text     text          \end{lstlisting}          \footnotetext{text}      When I compile, there is a fatal error: `latex Text Capacity exceeded, sorry [input stack size=5000]` Problem is at `\footnotemark`, how I can solve this problem?


title: Problem combining fouriernc with tgschola

text: I have recently found out that tgschola and fouriernc actually have different font sizes (at least on my MiKTeX installation). 12pt fouriernc seems to be roughly equivalent to 11.2pt tgschola. The problem now arises when you I try to combine these fonts for text+math. The result looks inconsistent since I have specified 11.2pt fontsize in the KOMA class. ![enter image description here](http://i.stack.imgur.com/fFKBO.png) Here's the MWE:               %\documentclass[fontsize=12pt,oneside,DIV=12,a4paper]{scrreprt}     \documentclass[fontsize=11.2pt,oneside,DIV=12,a4paper]{scrreprt}     \usepackage{fouriernc}     \usepackage{tgschola}          \begin{document}     This is $n_i$ a $r_{[0]}$ Test.     \end{document}      Is there a way to assign different font sizes to these two packages or are there any other solutins to this problem? Maybe I'm missing something?


title: LyX and Jabref problem - Windows

text: I am using LyX 2.0.6 and Jabref 2.9. I am trying to incorporate my bibliography in Jabref into Lyx, however I get the following error message in JabRef: "Verify that LyX is running and that the the lyxpipe is valid [\.\pipe\lyxpipe]". I know that the Lyx manual specifies that I should insert "\.\pipe\lyxserver.in", however, I read somewhere else that it should be changed to the same path as the one in Lyx. I also tried the "\.\pipe\lyxserver.in" path but I got the same error message. Before getting that error message, I had gone to Insert > List TOC > Bibliography in Lyx.


title: How to display acronyms by order of appearance in the glossaries package?

text: In the code below, I want the acronyms to be displayed **by order of appearance** in the body in the list of acronyms and the glossaries **in alphabetic order** at the end of the book. When I use the option `sort=use`, the two Lists are displayed by order of appearance in the document body. How can I solve this problem?               \documentclass{book}     \usepackage[xindy,acronym]{glossaries}          \newglossaryentry{maths}{         name=mathematics,         description={Mathematics is foo bar}}          \newglossaryentry{chem}{         name=chem,         description={Chemistry is foo bar}}              \newacronym{dm}{DM}{diagonal matrix}         \newacronym{aca}{ACA}{a contrived acronym}         \makeglossaries     \begin{document}     \printglossary[type=\acronymtype]     \chapter{Foo}     I'm talking about \gls{maths}, \gls{chem}, \acrshort{dm}, and \acrshort{aca}.     \printglossary     \end{document}


I'm trying to create an arara rule that will download my bibliography from zotero using its embedded server. The URL works, that's not the issue, but arara claims the file has a syntax issue. The rules file has this:               !config     # Pull bibliography from zotero as part of build     # author: Emiliano Heyns     # last edited by: eeh, Dec 2nd 2013     # requires arara 3.0+     #     # Sample usage     #     # % arara: zoterobib     # % arara: zoterobib: {format: biblatex}     # \documentclass[mode=present,display=\powerdotmode]{powerdot}     #      identifier: zoterobib     name: ZoteroBib     commands:      - <arara> wget -O "@{tempfile}.bib" "http://localhost:@{port}/better-bibtex/collection?@{collection}.@{format}"      - <arara> wget -O "@{base}.bib" "http://localhost:@{port}/better-bibtex/collection?@{collection}.@{format}"      - <arara> @{ isWindows( "cmd /c del", "rm" ) } "@{tempfile}.bib"     arguments:      - identifier: base       flag: <arara> @{parameters.base}       default: @{getBasename(file)}     - identifier: tempfile       flag: <arara> @{parameters.tempfile}       default: @{getBasename(file)}_tmp     - identifier: port       flag: <arara> @{parameters.port}       default: 23119     - identifier: format       flag: <arara> @{parameters.format}       default: biblatex     - identifier: collection       flag: <arara> @{parameters.collection}      When running the rule without parameters, I get this error:               It appears that the 'zoterobib' task has a YAML syntax error or        an invalid field. Could you take a look at the 'zoterobib.yaml'        file located at 'C:\Program Files\arara\rules'. I tried my best        to dump the error message, so here it is:                                   Context: while scanning for the next token                             Problem: found character @'@' that cannot start any token              Error found in line 21, column 11.                                           default: @{getBasename(file)}                  ^                                                        (the arrow is under the '@', shifted out of its place by the proportional font. I have another rule that uses this kind of parameter specification, and that works, so I'm at a loss to see why this wouldn't be accepted.


title: How to make the (COMPLETE) preamble of a Standalone document available to a `Main Document`?

text: I am in the process of generating a lot of content for presentations and scripts. The standalone package and documentclass seems to be a very helpful, but I am running into an issue mentioned by Diac Busquets here > Is it possible to somehow tell standalone to copy the preamble of the files > being included? It is sometimes a hassle to keep copying all the > \usetikzlibrary commands. I already tried to use the `subpreamble=true` and the `sort=true` options for the `standalone package` in the main file. But somehow when I use the `sort=true` option, the presentation compiles fine, but my "standalone tables" do not show up (The "standalone tikz" do though). And when I use `subpreamble=true`, the package options clash (no matter how much I rearrange the packages) **QUESTION 1: Why does`\includestandalone{my tables}` produce no result?** How come, I cannot use the `\IfStandalone{⟨code for standalone mode⟩}{⟨code for main document⟩}`command and place my `\usetikzlibrary` statement in each of the two curly brackets (pair). The "double code" seems unnecessary, but it should work! Right? ... I tired that, but without any luck. The main document seems to ignore the `{⟨code for main document⟩}` statement. Even if I use the `sort` option. **QUESTION 2: Why is the`{⟨code for main document⟩}` statement ignored in the main document?** Specifically, how can I prevent the "reuse" of the `usetikzlibrary{mylibraries}` in my main document? **Question 3: How do I fix it?** Here is the StandalonePicture.tex               \documentclass[convert]{standalone}     \usepackage{tikz}          \IfStandalone{      \usetikzlibrary{arrows,decorations.pathmorphing,decorations.markings,decorations.text,}     \tikzset{>=latex}     }     {     % This command does not seem to have an effect in the main document     \usetikzlibrary{arrows,decorations.pathmorphing,decorations.markings,decorations.text,}     \tikzset{>=latex}     }          \begin{document}     \begin{tikzpicture}[node distance=3cm,]          %Define main nodes     \tikzstyle{main node}=[black,draw,circle,minimum size=2.cm,align=center]          % Draw actual nodes     \node [main node] (1) {Text 1};      \node [main node] (2) [ left of=1, ] {Text 2};          % Connecting Arrows     \draw [<-,postaction={decorate,decoration={text along path,raise=-2.5mm,text align=center,text={|\tiny| Bending}}}] (2) to [bend right=-45]  (1);          \end{tikzpicture}     \end{document}      And here is the actual presentation (Presentation.tex) that calls the tikzpicture (or table)               \documentclass[]{beamer}          % It does NOT work with the following line (but it should)     % I don't understand, because the \IfStandalone{}{} command should take care of that.     \usepackage{standalone}               % It does work if the sort option is enabled      % (Of course, since the 'sort' option ensures that the 'subpreamble' is reprinted)     %\usepackage[sort=true]{standalone}               \begin{document}          %%%%%%%%%%%%%%%%%%%     % Begin Unit %%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%     \begin{frame}     \frametitle{Frame 1}     \framesubtitle{This one works flawlessly}     \begin{itemize}     \item First slide with no picture     \end{itemize}     \end{frame}     % ---------------------     % Notes ------------     % ---------------------     \note{     \begin{itemize}     \item This works     \end{itemize}     }     % ---------------------     % Skript ------------     % -------------------------------     \mode<article>{          }     %%%%%%%%%%%%%%%%%%%     % End Unit %%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%          %%%%%%%%%%%%%%%%%%%     % Begin Unit %%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%     \begin{frame}     \frametitle{Frame 1}     \framesubtitle{This one won't work because of missing tikzlibrary}          \includestandalone{StandalonePicture}          \end{frame}     % ---------------------     % Notes ------------     % ---------------------     \note{     \begin{itemize}     \item This works     \end{itemize}     }     % ---------------------     % Skript ------------     % -------------------------------     \mode<article>{          }     %%%%%%%%%%%%%%%%%%%     % End Unit %%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%          \end{document}


title: Changing the heading style of references section

text: \documentclass[twoside, a4paper, 11pt]{article}     \usepackage{natbib}          \begin{document}                    \bibliographystyle{apa-good}     \bibliography{bibliography}     \end{document}      How can I make the section header for my references list bolded, underlined, all capitalized, 11 pt and with C6. in front of it? I.e., currently, the section header is: **References** however I would like it to be: ![enter image description here](http://i.stack.imgur.com/k1Gep.jpg) * * * EDIT:               \documentclass[twoside, a4paper, 9pt]{article}     \usepackage{natbib}          \renewcommand{\refname}{C6.~REFERENCES}     \makeatletter     \renewcommand\bibsection{%       \section*{\underline{\refname}\@mkboth{\MakeUppercase{\refname}}{\MakeUppercase{\refname}}}%     }%     \makeatother                    \begin{document}          \underline{\textbf{C1. PROJECT TITLE}}          blkah blah          \underline{\textbf{C2. AIMS AND BACKGROUND}}               blah blah blah          \bibliographystyle{apa-good}     \bibliography{bibliography}     \end{document}      The output is: ![enter image description here](http://i.stack.imgur.com/SjRys.jpg) The size of references doesn't change when I change the font size to 9pt. I know I should use `\section` for section titles but there is a reason why I am manually creating section titles. So how can I get the references heading size to be the same as my manually made ones?


title: Prevent full page image in multicols

text: While placing a full-width image in the multicols environment using               \begin{figure*} ...     \end{figure*}      if the figure is larger than some fraction of the page, it takes up a whole page on its own, with copious white space above and below it. Is there a way to prevent the figure from taking a whole page, forcing the figure back to the top of the page and filling the white space below it with text?


title: Vertical space only after every second row in a table

text: I have several tables in the following custom format, to which I would like to add vertical space (e.g. 6 pt) after every second row. I know this can be done manually. I am only wondering, if there is a process to do this faster. Note that my tables come from external tex.files. So if possible I'd like a solution which can be applied to tables imported via `input` (source: xtable/R). But I am also curious how to do this quickly for normally, in Latex produced tables. Here is a simple MWE:               \documentclass[a4paper, 12pt, headsepline, smallheadings]{scrreprt}     \usepackage{dcolumn}     \usepackage{booktabs}     \usepackage[a4paper]{geometry}     \newcolumntype{Y}{D..{-1}}     \geometry{left=2cm,right=5cm,top=2cm,bottom=2cm}          \begin{document}     \begin{table}[htbp]     \centering     \caption{aaa}      {\normalsize     \begin{tabular}{lYYYYY}     \toprule      & \multicolumn{1}{r}{A} & \multicolumn{1}{c}{B} &      \multicolumn{1}{c}{C} & \multicolumn{1}{c}{E} &     \multicolumn{1}{c}{D} \\     \midrule      \multicolumn{1}{l}{X} &  0.34  &  0.08^{***} & -2.57^{***} &  0.60^{***} &  80.97 \\      & (0.44) & (0.05) & (1.26) & (0.24) &  \\      \multicolumn{1}{l}{Y} &  0.34  &  0.20^{***} &  0.99^{***} &  0.00^{***}   & 97.71 \\      & (1.30) & (1.03) & (0.01) & (0.00) &  \\      \multicolumn{1}{l}{Z} &  0.56  & 5.41^{***} &  0.08^{***} &  0.98^{***} & 33.27 \\      & (1.30) & (2.030) & (0.03) & (0.01) &  \\      \bottomrule      \end{tabular}     }     \end{table}     \end{document}      So in the end, I want this table to look as good as possible. Any suggestions appreciated, except for the content/brackets/stars. These must stay. Thanks.


title: Having difficulty with pstricks box plot, psaxes, pspicture

text: a TeX noob here. I wish to plot performance test results once every two weeks (or sooner) displaying a 2 week window. I saw a similar question: Can I use pgfplots to make a boxplot and the following answer looks very appealing:               \documentclass{article}     \usepackage{pst-plot}     \begin{document}          \begin{pspicture}(-1,-1)(12,14)     \psset{yunit=0.1,fillstyle=solid}     \psaxes[dy=1cm,Dy=10,ticksize=4pt 0,axesstyle=frame](0,0)(12,130)     \rput(1,0){\psBoxplot[fillcolor=red!30]{        100 90 120 115 120 110 100 110 100 90 100 100 120 120 120}}\rput(1,105){2001}     \rput(3,0){\psBoxplot[arrowlength=0.5,fillcolor=blue!30]{       90 120 115 116 115 110 90 130 120 120 120 85 100 130 130}}\rput(3,107){2008}     \rput(5,0){\psBoxplot[barwidth=40pt,arrowlength=1.2,fillcolor=red!30]{       35 70 90 60 100 60 60 80 80 60 50 55 90 70 70}}\rput(5,65){2001}     \rput(7,0){\psBoxplot[barwidth=40pt,fillcolor=blue!30]{       60 65 60 75 75 60 50 90 95 60 65 45 45 60 90}}\rput(7,65){2008}     \rput(9,0){\psBoxplot[fillcolor=red!30]{       20 20 25 20 15 20 20 25 30 20 20 20 30 30 30}}\rput(9,22){2001}     \rput(11,0){\psBoxplot[fillcolor=blue!30,linestyle=dashed]{       20 30 20 35 35 20 20 60 50 20 35 15 30 20 40}}\rput(11,25){2008}     \end{pspicture}     \end{document}      except that it does not quite do what I want it to do. I have obviously tried to modify this example to produce what I want, but I have been so unsuccessful, that I do not have anything else to share, since it won't help a bit. My attempts to re-adjust the coordinates (say to bound a rectangle at left bottom point (12, 40) and right upper point (27,45)) just would not do what I want it to do. They would still start at 0, or would show nothing or garbage. I did not feel like I can change one or two things and get closer to my goal. Too many settings that can potentially conflict, perhaps ... Below is a sample picture that I would like to generate (I drew it manually using Dia). The box plots in my picture all look the same only because it was simpler to copy and paste them. In reality they will be generated with three real numbers - run 1, run 2 and run 3 in minutes, for example: 42.456, 44.123, 43.854. Occasionally a test will not run correctly and I will need to display an error. I would highly appreciate if you could provide me with code that can generate something that looks like the picture below. ![enter image description here](http://i.stack.imgur.com/pFVcq.png) UPDATE: This worked with MikTeX 2.9 but not MikTeX 2.8 under Windows. UPDATE2: Set `Oy=4` if you want to raise the plot.


title: Turning off default scaling options (\setkeys{Gin}) temporarily

text: To set the default scaling values for the `\includegraphics` command, one can use `\setkeys{Gin}{(key)=value)}` from the `graphicx` package. For example, say I put down               \setkeys{Gin}{width=.7\textwidth}      This will automatically scale all succeeding `\includegraphics` commands by the above width value. Is there a way to turn off this setting for certain graphics? That is, is there a way to still use `\includegraphics` without having the width set as the above? I'm aware that               \begin{group}     \setkeys{Gin}{width=.7\textwidth}     \includegraphics{pizza.jpg} %this uses setted values     \end{group}     \includegraphics{pizza.jpg} %this uses normal values      works, but I'm wondering if I can do this without having to surround the `\setkeys{Gin}` command.


title: XeTeX and Roboto: No Ligatures

text: I'm trying to use the Roboto Font Family with XeTeX (or LuaTeX). When I'm writing a Document in XeTeX, no ligatures are used (but there are used on Android, so ligatures should be there). otfinfo from the LCDF typetools shows with the option --features, that liga is available. I use MiKTeX on Windows 8.1. Here is a minimal working example:               \documentclass[       11pt,       a4paper     ]{scrartcl}          \usepackage{fontspec}     \defaultfontfeatures{Mapping=tex-text}          \setmainfont[       ExternalLocation,       Extension=.ttf,       UprightFont=*-Regular,       ItalicFont=*-Italic,       BoldFont=*-Bold,       BoldItalicFont=*-BoldItalic,       Ligatures=Common     ]{Roboto}               \begin{document}          fi          \end{document}


title: Inline mathmode goes out the page margin in LyX

text: I'm using LyX for my document writing. Some of my inline mathmode formulas go out the page margin (see attached fig). I wonder how can I force these formulas to stay inside the page margin. Thanks in advance for your help and time. ![enter image description here](http://i.stack.imgur.com/fjN5z.png) **Edit** Code               where $vec\left(\mathbf{Y}\right)=vec\left(\begin{bmatrix}\mathbf{y}^{\left(1\right)} & \ldots & \mathbf{y}^{\left(j\right)} & \ldots & \mathbf{y}^{\left(t\right)}\end{bmatrix}\right)\equiv\mathbf{y}^{*}$;     $\mathbf{I}\otimes\mathbf{X}\equiv\mathbf{X}^{*}$; $vec\left(\mathbf{B}\right)=vec\left(\begin{bmatrix}\boldsymbol{\beta}^{\left(1\right)} & \ldots & \boldsymbol{\beta}^{\left(j\right)} & \ldots & \boldsymbol{\beta}^{\left(t\right)}\end{bmatrix}\right)\equiv\mathrm{\bm{\beta}}^{*}$;     $\mathbf{I}\otimes\mathbf{Z}\equiv\mathbf{Z}^{*}$; $vec\left(\mathbf{U}\right)=vec\left(\begin{bmatrix}\mathbf{u}^{\left(1\right)} & \ldots & \mathbf{u}^{\left(j\right)} & \ldots & \mathbf{u}^{\left(t\right)}\end{bmatrix}\right)\equiv\mathbf{u}^{*}$;     and $vec\left(\mathbf{E}\right)=vec\left(\begin{bmatrix}\mathbf{e}^{\left(1\right)} & \ldots & \mathbf{e}^{\left(j\right)} & \ldots & \mathbf{e}^{\left(t\right)}\end{bmatrix}\right)\equiv\mathbf{e}^{*}$.     Thus the univariate linear mixed model involving all variables can     be obtained from multivariate linear mixed model


title: Unwanted White Lines in listings environment

text: \documentclass{article}     \usepackage{listings}     \usepackage{color}     \begin{document}     \definecolor{light-gray}{gray}{0.95}     \lstset{basicstyle=\ttfamily\footnotesize,         backgroundcolor=\color{light-gray}, xleftmargin=0.7cm,         frame=tlbr, framesep=0.2cm, framerule=0pt,       }     \begin{lstlisting}[mathescape]     k = $\lfloor (10\log n \cdot \log\log n)^{1/3} \rfloor$;     k = $\lfloor (4\log n \cdot \log n)^{1/3} \rfloor$;     \end{lstlisting}     \end{document}      produces ![just a picture describing the situation](http://i.stack.imgur.com/46XEc.jpg) An answer to a similar question said that "this line is just an artifact of the viewer". But this line appears in two viewers and various zoom steps. On top of that, one can clearly see that the `1/3` overlaps with the white line. So I do not accept it as a mere artifact anymore. How could this problem be approached? Is it possible to somehow put another grey layer underneath the lstlisting environment which would "eat up" any white lines? edit: Is there a solution that would not involve editing every line of the code?


title: How to: put definition of figures together, then generate picture at different places

text: A little explanation: For better writing experience, I want to organize all definition (I mean `\begin{figure}...` stuff) of figures into one file, and `\input` it to my main `.tex`, then generate the picture at the places where I want to. I don't know if it's possible, but it will be quite convenient if available.


title: XeTeX in OpenBSD

text: How could I get XeTeX in OpenBSD? I have tried to:   1. `pkg_add texlive_base-2012`, but it tries to install so much more that I ran out of space.   2. run the `install-tl` perl script for TL13, but even if I chose only the absolute bare minimum, it started to download all other stuff which I don't need. There wasn't binaries for OpenBSD so I thought NetBSD would be close enough. Alas, running `xetex` results in              syntax error: `(' unexpected.        3. build from source, but this again failed partly because not enough space. I guess I could whip up a virtual machine and build it there, but I thought I'd ask here first.   4. use NetBSD's pkgsrc in OpenBSD, this failed in `x11-links` not finding X11 libs. Why would one need X11 for this is a little beyond me, but hey.   5. fetched binary distribution of TL on NetBSD-6.1.1; running `xetex` gave some error about `libfontconfig.so.7.0` not found (though it did exist).   6. Installed a new virtual machine with enough space to hold the `texlive_base-2012`, `ldd`'ed the binary for libs and copied them over. Then I got `can't load library 'libfreetype.so.19.0'` (although I just copied it over). This is kinda bizarre, right? Would you have a suggestion or precompiled binary for 5.3-i386?


title: Move right-aligned paragraph more to the center

text: So I am typesetting a little songbook for our Christmas get-together. To make better use of the limited space, I am using the `multicol` package; no issues there. What I'd like to do is move a whole paragraph horizontally an arbitrary amount of space. In the following MWE take a look at stanza #3. It uses a `\begin{flushright}` environment, but I'd still like to move it a bit more to the center, keeping the right edge neatly aligned.               \documentclass[fontsize=12pt,paper=A5,DIV=14,headinclude=true,footinclude=true,headings=small,pagesize,parskip=half]{scrartcl}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english,naustrian]{babel}     \usepackage[babel=true,protrusion=true,factor=900,draft=false]{microtype}          \usepackage{multicol, sectsty}          \raggedbottom     \addtolength{\topmargin}{-1cm}     \addtolength{\textheight}{2.5cm}     \allsectionsfont{\large\centering}          \begin{document}         \section{The Little Drummer Boy}             \begin{multicols}{2}                      1. Come, they told me,\\                  \emph{pa rum pum pum pum},\\                 our new born King to see, \\                 \emph{pa rum pum pum pum},\\                 our finest gifts we'll bring, \\                 \emph{pa rum pum pum pum},\\                 to lay before the King, \\                 \emph{pa rum pum pum pum},\\                 \emph{rum pum pum pum,\\ rum pum pum pum.}                      So to honor Him,\\                  \emph{pa rum pum pum pum},\\                 when we come.                  \columnbreak                      2. Little Baby, \\                 \emph{pa rum pum pum pum},\\                 I am a poor boy, too,\\                 \emph{pa rum pum pum pum},\\                 I have no gift to bring,\\                 \emph{pa rum pum pum pum},\\                 that's fit to give a King,\\                 \emph{pa rum pum pum pum},\\                 \emph{rum pum pum pum,\\ rum pum pum pum}                      Shall I play for you,\\                 \emph{pa rum pum pum pum},\\                 on my drum?               \end{multicols}         \begin{flushright}                      3. Mary nodded, \emph{pa rum pum pum pum},\\                 the ox and lamb kept time, \emph{pa rum pum pum pum},\\                 I played my drum for Him, \emph{pa rum pum pum pum},\\                 I played my best for Him, \emph{pa rum pum pum pum},\\                 rum pum pum pum, rum pum pum pum.                      Then He smiled at me, \emph{pa rum pum pum pum},\\                 me and my drum.              \end{flushright}     \end{document}      ![enter image description here](http://i.stack.imgur.com/yg1BU.jpg)


title: How do I put a die roll at the top of each page?

text: I was thinking about a trick I heard of in old RPG books and wondered how you would do it in LaTeX. So it used to be hard to find RPG dice in stores (That is, dice with 4, 6, 8, 10, 12 and 20 sides. Note that all of these but the d10 are platonic solids), so that one book put a series of dice at the top of each page. You simply flipped the book open to a random page and read out which of the dice you wanted. How would I set a document to automatically have a dice roll of a set number of sides at the top of each page, and ensure there is an even balance of all possible rolls? (ie so for a d20, a 40 page document has two of each number, a 25 page document has 20 rolls and 5 blank pages at the end) and that they are randomly distributed (so that you can't flip to the start of the book to add to your chances for a low roll, for example). Code for an arbitrary number of sides would be the best, as they I could tweak it for any dice I wanted. This is mostly for fun, as every gamer I know has more dice you then you shake a stick at, but I'm curious how you would go about doing it. Edit of Clarification: I don't want help drawing the dice: I could use an image, there is a package for it, etc. I'd make a question about that. What I want is the numbers evenly distributed to each page, and the placement of them throughout the book randomized. Ok, I wrote a quick psudocode that might work. I have no idea if this is the best way to do it, or if it is possible in LaTeX, but it might be a start?               Pages := Number of pages     Sides := Number of sides on die     Count := Pages/Sides (rounded down)     Skip := Pages mod Sides //Might as well place the blank pages at the front     Set all pages to false     for(i = Skip to Sides)     {         while(j := 0, j < Count, j++)         {             Random := Random number between 1 and Pages             if(Page{Random} = false)             {                 Place i on Page{Random}                 Set Page{Random} = true             }             else             {                 j--             }     }      This doesn't ensure a fair distribution, but if I see a bunch of clumps of stuff I could just recompile.


title: LuaLaTeX and MetaPost

text: Is there a LuaLaTeX equivalent of               \startMPinclusions          input mpfile;      \stopMPincusions      in ConTeXt? That is, if I have               \documentclass{article}      \usepackage{luamplib}          \begin{document}     \begin{mplibcode}          Some MP code that requires a reference to another File.mp          \end{mplibcode}     \end{document}      How do I get LuaLaTeX to recognise the other File.mp?


title: Matlab2tikz adds extra legend entries

text: The legend from a boxplot figure is not being created properly. I get this: ![enter image description here](http://i.stack.imgur.com/TCjYx.png) Instead of thiS: ![enter image description here](http://i.stack.imgur.com/C5Dic.png) But really only need 2 legend entries. Any Ideas why all the objects in this plot are being given legend entries when in Matlab there are only 2 `light blue=4ACH` and `dark blue=6ACH`. How do I make the two blue boxes using tikz code? `\addlegendentry` doesn't work because the boxplots are not plot items but filled objects defined by tables of coordinates MVE               \documentclass{amsart}     \usepackage{graphicx}     \usepackage{tabularx}     \usepackage{subfig}     %\usepackage[framed,numbered,autolinebreaks,useliterate]{mcode} %matlab to latex s     \usepackage{tikz,pgfplots}      \pgfplotsset{compat=newest}       \pgfplotsset{plot coordinates/math parser=false}     \usetikzlibrary{plotmarks}     \begin{document}          \definecolor{mycolor1}{rgb}{0.6,0.8,1}     \definecolor{mycolor2}{rgb}{0,0.2,0.6}          \begin{tikzpicture}          \begin{axis}[%     width=4.52083333333333in,     height=3.565625in,     scale only axis,     xmin=0.5, xmax=1.5,     xtick={1},     xticklabels={Direct Care,Housekeeping,Mealtimes,Medication Round,Miscellaneous,Personal Care},     ymin=-10, ymax=100,     ytick={0,10,20,30,40,50,60,70,80,90,100},     ylabel={Normalised cfu (Y) values},     legend style={draw=black,fill=white,legend cell align=left}     ]          \addplot [     color=black,     solid     ]     table{     0.755 0     0.895 0     };     \addlegendentry{4 ACH};          \addplot [     color=black,     solid     ]     table{     0.755 0     0.895 0     };     \addlegendentry{4 ACH};          \addplot [     color=black,     solid,     line width=1.0pt     ]     table{     0.685 0     0.965 0     };     \addlegendentry{4 ACH};          \addplot [     color=blue,     only marks,     mark=*,     mark options={solid,fill=mycolor1,draw=black}     ]     table{     0.825 10.0567798116818     };     \addlegendentry{200 ACH};     \addplot [     color=black,     dotted     ]     table{     0.825 0     0.825 0     };     \addlegendentry{4 ACH};     \addplot [     color=black,     solid     ]     table{     0.755 0     0.895 0     };     \addlegendentry{4 ACH};          \addplot [     color=black,     solid     ]     table{     0.755 0     0.895 0     };     \addlegendentry{4 ACH};          \addplot [     color=black,     solid,     line width=1.0pt     ]     table{     0.685 0     0.965 0     };     \addlegendentry{4 ACH};          \addplot [     color=blue,     only marks,     mark=*,     mark options={solid,fill=mycolor1,draw=black}     ]     table{     0.825 10.0567798116818     };     \addlegendentry{4 ACH};          \addlegendentry{6 ACH};          \addplot [     color=black,     dotted     ]     table{     1.175 0     1.175 0     };     \addlegendentry{6 ACH};          \addplot [     color=black,     solid     ]     table{     1.105 0     1.245 0     };     \addlegendentry{6 ACH};          \addplot [     color=black,     solid     ]     table{     1.105 0     1.245 0     };     \addlegendentry{500 ACH};          \addplot [     color=black,     solid,     line width=1.0pt     ]     table{     1.035 0     1.315 0     };     \addlegendentry{6 ACH};          \addplot [     color=blue,     only marks,     mark=*,     mark options={solid,fill=mycolor2,draw=black}     ]     table{     1.175 10.6896518156056     };     \addlegendentry{6 ACH};               \end{axis}     \end{tikzpicture}%     \end{document}


title: Add space below equations? \belowdisplayskip is not working?

text: I use the following code in my LaTex document to specify the space before and after the align-environment (code is before the `\begin{document}`):               \makeatletter     \g@addto@macro\normalsize{%       \setlength\abovedisplayskip{0.0cm}       \setlength\belowdisplayskip{0.8cm}       \setlength\abovedisplayshortskip{0.0cm}       \setlength\belowdisplayshortskip{0.8cm}     }     \makeatother      Unfortunately this is not changing anything? If I increase the numbers to               \makeatletter     \g@addto@macro\normalsize{%       \setlength\abovedisplayskip{1.0cm}       \setlength\belowdisplayskip{1.5cm}       \setlength\abovedisplayshortskip{1.0cm}       \setlength\belowdisplayshortskip{1.5cm}     }     \makeatother      I get the error message               ! Improper \halign inside $$'s.     <recently read> \halign           l.138 \end{align}


title: Tooltips For Texstudio in Ubuntu empty

text: I'm using TEXstudio 2.6.2 on Ubuntu 12.04 LTS. Does anyone else have the problem of the tooltips being empty when mousing over various things like toolbar buttons or references in the tex file. And more importantly does someone have a fix? Cheers..


title: LaTeX code for different choice

text: Could you please help me to find the LaTeX code that will gives the following result: ![enter image description here](http://i.stack.imgur.com/MccAv.png+)


title: How to highlight tree levels

text: How can i highlight tree levels to be some thing like that...![enter image description here](http://i.stack.imgur.com/l4rWb.png) I've drawn my tree with this code               \documentclass[landscape]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{tikz-qtree}     \usetikzlibrary{shadows,trees}     \begin{document}     \tikzset{font=\large,     edge from parent fork down,     level distance=60pt,     every node/.style=         {top color=white,         bottom color=blue!25,         rectangle,rounded corners,         minimum height=8mm,         draw=blue!75,         very thick,         drop shadow,         align=center,         text depth = 0pt         },     edge from parent/.style=         {draw=blue!50,         thick         }}          \centering     \begin{tikzpicture}          \Tree [.Parent             [.one                  [.one1                         [.one11                              [.one111 ]                             [.one112 ]                             [.one113 ] ]                        [.one12 ]                         [.one13 ] ]                  [.one2 one21 ] ]             [.two                  [.two1 two11 ]                 [.two2 [.two21 two211 ]                        [.two22 [.two221 two2211 ]                                 [.two222 two321 ] ] ] ]              [.three                 [.three1 ] ] ]          \end{tikzpicture}     \end{document}


title: Small Caps in Gentium Plus after MiKTeX update

text: I'm using Gentium Plus under `XeTeX` for quite a long time now, and it always worked like a charm. However, after updating `MiKTeX` (I'm running version 2.9.4902 now), small caps are not displayed properly anymore, though the font surely includes small caps (that's what they say on the SIL webpage). I get a warning:               Font shape 'EU1/GentiumPlus(0)/m/sc' undefined(Font) using 'EU1/GentiumPlus(0)/m/n' instead      Here is a minimal example:               \documentclass{article}     \usepackage{xltxtra}     \setmainfont[Mapping=tex-text]{Gentium Plus}          \begin{document}     \textsc{testtext}     \end{document}      What should I do? I need to use a font that has full Unicode support and small caps.


title: tex4ht, html output: increase eps image resolution without affecting math images size

text: I have the following MWE:               \documentclass{book}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \begin{document}     Lorem ipsum dolor sit amet, \(k_\delta=\frac{3 \mathit{EJ}}{l^3}\) consectetur:     \begin{equation*}k_\delta=\frac{3 \mathit{EJ}}{l^3}\end{equation*}          \begin{centering}     \includegraphics[width=0.5\textwidth]{myimage.eps}     \end{centering}     \end{document}      which compiles fine to `html` (with `htlatex example.tex "myconfig, xhtml, charset=utf-8" " -cunihtf -utf8"` under Ubuntu TeXLive), `myconfig.cfg` being               \Preamble{xhtml}     \Configure{graphics*}         {jpg}         {\Picture[pict]{\csname Gin@base\endcsname .jpg             \space width="\expandafter\the\csname Gin@req@width\endcsname"}}     \Configure{graphics*}         {png}         {\Picture[pict]{\csname Gin@base\endcsname .png             \space width="\expandafter\the\csname Gin@req@width\endcsname"}}     \begin{document}     \EndPreamble      Looking for a workaround to the unsolved problem of small image sizes in `html` output, I wrote a Python script which parses `html` source and doubles `width` and `height` of all images, getting in face of a new problem, poor quality of 'doubled' `eps` images. So I tried to increase density from 110x110 to 220x220 in `tex4ht.env`, `<convert>` section:               Gconvert -trim +repage -density 220x220 -transparent '#FFFFFF' zz%%4.ps %%3      This actually increased the resolution of `eps` images, so that now I can double their size in `html` source with my Python script, but also increased the _size_ of math formula images (whose size is not affected by my Python script because they don't hold `width` nor `height` attributes). Is there a way to increase `eps` images resolution without affecting math images size? Here is a screenshot of the `html` output with doubled size of math formulas: ![enter image description here](http://i.stack.imgur.com/vHjyd.png)


title: How to create table with multiple multirows and multi columns

text: I try to create a table like to one here: ![enter image description here](http://i.stack.imgur.com/lJ0Dr.jpg) I tried many options with `\multirow` and `\multicolumn`, however, after few hours I'm not even close to the final result. Any ideas how could I achieve this?


title: Making Table in LATEX having different rows in different columns

text: ![enter image description here](http://i.stack.imgur.com/Kfu5n.jpg) I wish to have this table by using latex code.


title: Unknown graphics extension: .1.png

text: I have a file called `xxxx_0.1.png`, and want to import it as an image in my document. I am using `graphicx` with the following command:               \includegraphics[width=0.5\textwidth]{images/xxxx_0.1.png}      and LaTex gives me the error:               Unknown graphics extension: .1.png      Basically, it is treating everything after the first dot as the file type, rather than only the stuff after the last dot. Other than the obvious solution (renaming the files so it only has one dot), does anyone know if there a way to get LaTex to play ball?


title: Paragraph Numbering in LaTeX and Space Increase of Indentation

text: Is there any easy way to do the same thing that this code does:               % arara: pdflatex          \documentclass[a4paper,12pt]{report}     \usepackage[inner=0.75in,outer=0.65in,top=0.75in,bottom=0.75in]{geometry}     \usepackage{blindtext}     \usepackage{titlesec}          \makeatletter         \def\@makechapterhead#1{%         \vspace*{5\p@}         {%         \parindent \z@ \raggedleft \normalfont         \ifnum \c@secnumdepth >\m@ne             \if@mainmatter                 %\huge\bfseries \@chapapp\space \thechapter                 \Large\bfseries \thechapter.\space%                 %\par\nobreak                 %\vskip 20\p@             \fi         \fi         \interlinepenalty\@M         \Large \bfseries #1\par\nobreak         \vskip 5\p@         }}     \makeatother          \begin{document}     \chapter{Some Text}         \begin{itemize}             \item[1.1] \blindtext             \item[1.2] \blindtext         \end{itemize}          \section{Some More Text...}         \begin{itemize}             \item[1.3] \blindtext             \item[1.4] \blindtext         \end{itemize}          \subsection{Some More Text...}         \begin{itemize}             \item[1.5] \blindtext         \end{itemize}     \end{document}      Please provide some information regarding how to increase the horizontal spacing between the item number and the .. The indentation for each paragraph is also significant. Should this be done manually? The requirement of this post can be summarized as:   * Paragraph numbering in an ascending order without the effect of sections, etc.   * Indentation of the paragraph should be the same   * If this can only be done manually as shown, please propose a way to increase the horizontal distance between the paragraph number and the text.


title: Customizing a biblatex style - can I start with lockstep's post?

text: I want to customize a biblatex style based on _authoryear_ (and thus based on _standard_ as well). So when I read this, does it mean I have to work with the cumulated paste of both .bbx-files or can I start with an empty file with the options listed in the post by lockstep? Reason: I have been googling and trying stuff out for 5 hours now and I can't even get rid off an indentation after the first line of an bibliography-entry for example. It appears I am not very good with this. I'm using Tex Live 2012 on Win 7. **EDIT** Ok, upon reading your replies I realized I should have posted the following upfront. Here is what I did. First, this is what I have to get, for instance as a book (also "collection") by multiple authors: **Cooper, W. W./ Seiford, L. M./Tone, K. (2007):**   Data Envelopment Analysis, 2nd Edn., Springer, Heidelberg. (or "edn.","Edition","Ed." or "ed."–I think I prefer "Ed.".) Here is what I managed to get with natbib and some customizations via `latex makebst` in the Windows CLI: **Cooper, W. W./ Seiford, L. M. and Tone, K. (2007):** Data Envelopment Analysis. Springer, Heidelberg, 2nd edn.. Then I used biblatex with this setup to get this: **Cooper,W.W./L. M. Seiford/K. Tone** (2007):   _Data Envelopment Analysis._   2nd ed.   Springer, Heidelberg.   Another problem: The _whole_ bibliography is indented. Well, at least it looks aligned. :)


title: Two-column layout with thick vertical rule in ConTeXt

text: # Background I would like to add a thick rule centered between two columns. # Example Code A minimum working example that illustrates the issue:               \setupcolors[state=start]          \startuseMPgraphic{StyleVerticalRule}       thickness := 6.50pt;            if CurrentColumn < NOfColumns :         setbounds currentpicture to OverlayBox           shifted( -3*thickness, 0 );              draw rightboundary OverlayBox           withpen pensquare scaled thickness           withcolor \MPcolor{red};       fi     \stopuseMPgraphic          \defineoverlay[StyleVerticalRule][       \useMPgraphic{StyleVerticalRule},     ]          \definecolumnset[StyleColumns][       n=2,       background=StyleVerticalRule,     ]          % Horizontal line below the section header.     \define[2]\StyleSection{%       \framed[         frame=off,         bottomframe=on,         framecolor=pink,         rulethickness=1.0pt,         width=local,       ]{\vbox{#2}}}               \setuphead[section][       command=\StyleSection,       after={\startcolumnset[StyleColumns]},       aftersection={\stopcolumnset},     ]          \starttext     \startbodymatter       \startchapter[title={Chapter}, reference=sec:my-chapter,]       \startsection[title={Section}, reference=sec:my-section,]       \startsubsection[title={Equipment},reference=sec:my-equipment,]         \input knuth         \input knuth       \stopsubsection       \stopsection       \stopchapter     \stopbodymatter          \stoptext      # Problem The vertical rule height appears to be `\textheight`, rather than height of the columns. The code above produces: ![Over Extended Rule](http://i.stack.imgur.com/f0Exz.png) The vertical rule extends beyond the subsection header because, I think, it references `OverlayBox`. I would like to use the column height, not the text height, to produce: ![Perfectly Extended Rule](http://i.stack.imgur.com/csm8K.png) # Questions With respect to multi-column layouts:   * How do you restrict the height of the vertical rule so that it respects the column height (i.e., how do you determine the column height)?   * How would you add sufficient space to the section's column margins so that the vertical rule does not overlap any text?   * What is the required calculation to ensure the vertical rule is centered between the columns (i.e., `-3*thickness` seems... incorrect)? I also could not find any definition for `OverlayBox`, although I found a few examples. # Related Information that is somewhat related:   * How to place text between two columns and which breaks the rule dividing them in ConTeXt?   * formatting natural table header with conTeXt   * http://tex.stackexchange.com/a/17813/2148   * Creating a grid which fills available text area on a page in ConTeXt?   * http://www.ntg.nl/pipermail/ntg-context/2011/058352.html   * http://wiki.contextgarden.net/TABLE


title: How to TeX a table contain large bracket

text: How to Tex a table in the form? I'm not interested in the detail of the matrix content, just interested in the form of the matrix, especially how to put the arrows and labels outside the matrix. ![enter image description here](http://i.stack.imgur.com/uHBxe.png) Here is what I got so far:               \left(     \begin{array}{c|c|c|ccc}      1 & 1 & 1 & 1 & \gets & \ket{1}\\     \hline      1 & 1 & 1 & 1 & \gets & \ket{1}\\     \hline      1 & 1 & 1 & 1 & \gets & \ket{1}\\     \hline      1 & 1 & 1 & 1 & \gets & \ket{1}\\     \uparrow & \uparrow & \uparrow & \uparrow & & \\     \ket{1} & \ket{1} & \ket{1} & \ket{1} & &      \end{array}     \right)      ![enter image description here](http://i.stack.imgur.com/Nxo4X.png)


title: elsarticle.cls and biblatex incompatibility

text: I would like to submit a paper to an Elsevier journal, which uses `elsarticle` document class. `elsarticle` loads `natbib` but I've been using `biblatex` instead of BibTeX throughout most of my files (I have a common `.bib` file for all my publications which is `biblatex` compatible right now). The problem is that I have many authors with special characters (like ø, å, ü etc) and BibTeX was giving errors when compiling because of the encoding - this was the reason why I switched to `biblatex` in the first place. Is there a quick way to make my `.bib` file compatible with BibTeX without manually substituting those special characters with their TeX versions? Or will Elsevier become `biblatex` compatible soon?


title: TexWorks.0.4.5 completely changed the text in the editor

text: Sorry this is a little vague, I'm _totally_ baffled by it. I've been using TexWorks intensively for a few years. I just upgraded it from 0.4.3 to 0.4.5. Now the text in the editor appears in ALL CAPS, in a bizarre font. When I compile my document, the output is correct (i.e. mixed case) - even though _ALL_ the words appear in CAPS in the editor. Which makes it utterly unuseable. I'm so baffled I don't even know where to start. Can anyone point me a little bit in the right direction? On a related note, my frustration with TexWorks has been building enormously in recent months - is this still a reasonable tool to use, or has it been supersided by something much better these days? Any and all pointers greatly appreciated.


title: Labelling and drawing at rotated/shifted objects

text: I'm trying to draw an image from a mathematical publication (see the crop at the end of my post). You can find a recent version of the drawing at page 37 of my script (PDF). The complete source is here. I drew a rhomb with those squares in it and shifted all pieces to the right place:               \begin{tikzpicture}     \draw (0,0) -- (4,1) -- (8,0) -- (4,-1) -- (0,0);     \draw[thick] (6,.5) -- (4,1) -- (4,-1) -- (6,-.5)       [yshift=4cm]  (6,.5) -- (4,1) -- (4,-1) -- (6,-.5);     \draw[thick,dashed] (6,.5) -- (6,-.5)       [yshift=4cm]  (6,.5) -- (6,-.5);      I did the same with the squares around those figures. Now I want to label each square (R_0, R_1) and draw arrows from one box to another. I'm looking for a better way than to write something like `\draw[->] (2,2) -- (2,0);`. So adding nodes sounds like the right idea, but I found no working solution. What would you recommend for drawing arrows and adding some labels? ![crop of a drawing](http://i.stack.imgur.com/X5sJH.png)


title: Centering contents after \unvbox

text: Trying to build a complex macro, I managed to compute what I need in a vbox. Now, I want to `\unvbox` this box to allow page breaks, and would like each element it contains to be centered. I can't find a way to add some glue on the left and right of each element. Is it at all possible? Any alternative? Edit: typical boxes I'd like to handle are of this kind:               \vbox{       \halign{\hfil#&\hfil#\hfil&#\hfil\cr       aa & b & cc\cr       d & eee & f\cr}     }      (I don't really want to modify them because I need to access their `\wd` at some point).


title: tikz: two blocks stacked on each other

text: I drew two blocks stacked on each other. Unfortunately, it looks off and I think it can be done more compactly code wise with a cleaner look. Here is what I have:               \documentclass[tikz, convert = false]{standalone}%     \usetikzlibrary{calc}     \usetikzlibrary{intersections}          \begin{document}     \begin{tikzpicture}       \coordinate (O) at (0, 0);       \coordinate (P1) at (0.35, 1);       \coordinate (P2) at (1.35, 1);       \coordinate (P3) at (1, 0);            \draw (O) -- (P3) node[pos = .5, font = \tiny, below] {$1$} -- (P2)       node[pos = .5, right, font = \tiny] {$1$};       \draw[dashed] (O) -- (P1) -- (P2);       \draw (O) -- +(0, .2) coordinate (P4) -- +(1, .2) coordinate (P5) --       +(1, 0);       \draw[name path = uil] (P5) -- ($(P2) + (0, .2)$) coordinate (P6) --       +(0, -.2);       \draw (P6) -- +(-1, 0) coordinate (P7);       \draw[dotted] (P7) -- (P1);            \path[name path = uol] (P4) -- (P7);       \path[name path = hl] (0, .35) -- +(1.25, 0);       \path[name intersections = {of = uol and hl}];            \coordinate (P8) at (intersection-1);            \draw[dashed] (P8) -- (P7);       \draw (P8) -- (P4);            \path[name intersections = {of = uil and hl}];            \coordinate (P9) at (intersection-1);            \draw (P8) -- (P9);       \draw (P8) -- +(0, .2) coordinate (P10) -- +(1, .2) coordinate (P11) --       (P9);       \draw (P6) -- +(0, .2) coordinate (P12);       \draw (P11) -- (P12) -- +(-1, 0) coordinate (P13) -- (P10);       \draw[dotted] (P13) -- +(0, -.2);     \end{tikzpicture}     \end{document}      Here is what it looks like ( **ugly** ): ![enter image description here](http://i.stack.imgur.com/LYwla.png) How can the code be improved to make a better looking image and to be more simplified?


title: Rotating figure within a block of figures

text: I am using MiKTeK 2.9 on Windows 7. I am trying to make a single figure out of a block of eps files using the following code               \documentclass{article}      % Specifies the document class     \usepackage{geometry}     \usepackage{setspace}     \usepackage[dvips]{graphicx}     \usepackage{afterpage}     \usepackage{amssymb}      \usepackage{sistyle}      \usepackage{rotate}      \SIstyle{USA}           \newcommand{\ip}[2]{(#1, #2)}                              % Defines \ip{arg1}{arg2} to mean                              % (arg1, arg2).          \input{psfig}          \renewcommand\floatpagefraction{0.8}%          \setlength{\textwidth}{7.0in}     \setlength{\oddsidemargin}{-.25in}     \setlength{\evensidemargin}{-.25in}     \setlength{\topmargin}{-0.25in}     \setlength{\textheight}{9.0in}     \parskip 6pt          \begin{document}          \begin{figure}[p]     \centerline{\psfig{figure=c:/Users/Peter/Clustering/OriginalObjects2.eps,width=2.5in}         \psfig{figure=c:/Users/Peter/Clustering/Samples/OriginalGravFieldHist.eps,             width=2.5in,angle=-90}}     \vspace{0.1in}     \centerline{(a) \hspace{3.5in} (b)}     \vspace{0.2in}     \centerline{\psfig{figure=c:/Users/Peter/Clustering/Samples/OriginalGravFieldHistDiff.eps,width=2.5in}         \psfig{figure=c:/Users/Peter/Clustering/OriginalObjectsFiltSquared.eps,width=2.5in}}     \vspace{0.1in}     \centerline{(c) \hspace{3.5in} (d)}     \vspace{0.2in}     \centerline{\psfig{figure=c:/Users/Peter/Clustering/OriginalObjectsFiltCubed.eps,width=2.5in}}     \vspace{0.1in}     \centerline{(e)}          \caption{whatever}     \label{whatever}     \end{figure}          \end{document}      The "angle=-90" is supposed to rotate the second .eps file (c:/Users/Peter/Clustering/Samples/OriginalGravFieldHist.eps) in place without translating it or affecting the positioning or appearance of the other .eps files. Instead, it translates that figure down without rotating it and pushes the first figure (c:/Users/Peter/Clustering/OriginalObjects2.eps) to the left.


title: Center subfloat above extended subcaption in subfig package

text: In the subfig package, the command `\captionsetup[subfigure]{width=<length>}` extends the width of a subcaption. Now how can the subfloats be centered above their enlarged subcaptions? The subfloats appear to be left justified by default.


title: Strikethrough text

text: I am writing an article in LaTeX 2e. Part of the article describes the Sieve of Eratosthenes, and I want to show examples of how multiples of a prime are removed from the sieve by showing them in a strikethrough font. How do I create a strikethrough font in LaTeX 2e?