title: Why do some fonts work and others don't in LaTeX?

text: I use the Helvetica font and everything is OK, but if I try to use Garamond for instance then I run into problems... and I cannot compile (or the pdf tells me that it cannot retrieve the fonts, when I try for instance to use bt- charter).. I use the following packages in my tex file and I compite with xelatex (because of strange characters in my bib file). Is the problem coming from here?               \documentclass[12pt,captions=nooneline]{scrartcl}          \setlength{\textwidth}{6.2in}     \usepackage[utf8]{inputenx}               \usepackage{booktabs}     \usepackage{ragged2e}                    \usepackage{helvet}          \usepackage{slantsc}     \usepackage{array}     \usepackage{amsmath}     \usepackage{harvard}     \usepackage{siunitx}     \usepackage{savesym}     \usepackage{caption}     \usepackage{multicol}     \usepackage{subfigure}     \usepackage{microtype}     \usepackage{geometry}     \usepackage{pdflscape}     \usepackage{eurosym}     \usepackage{epsfig}     \usepackage{multicol}     \usepackage{tabularx}     \usepackage{booktabs}     \usepackage{graphicx}     \usepackage{setspace}     \usepackage{verbatim}


title: How to write Bengali in LaTeX?

text: \documentclass{barticle}     \title{EkiT pRbn/dh} \author{Ajana elkhk} \date{pNNicesh {oi}bshakh, 1413}     \begin{document}     \bng     \maketitle     \section{pRthm pirec/chd}     rbiin/dRnaethr EkiT kibtar shuru inec ed{O}ya Hl.     \begin{verse}     kt Ajanaer jana{I}el tuim \\ kt gher idel ThNNa{I}. \\     duurek kirel inkT bn/dhu,\\ prek kirel bha{I}....          \end{verse}     \end{document}


title: mindmap with rendering artifacts

text: I am trying to render this mindmap but I am getting some artifacts. Can anyone tell why.               \documentclass{article}     \usepackage{pgfplots}     \usetikzlibrary{mindmap,trees, backgrounds}          \begin{document}     \section{Introduction}          \begin{figure}[h]     \makebox[\textwidth][c]{     \begin{tikzpicture}     %%%%%%%%%%%%%%% CANOPY STRUCTURE       \path[mindmap,concept color=green!50!black, text=white]              node[concept](struct) at (0,0){Canopy Structure}                 child[grow = -45, concept color = orange]{                 node[concept](light){Light Interception}                         [clockwise from = 20]                         child{node[concept](alb) {Shortwave albedo}}                         child{node[concept](lw){Longwave Emissivity}}                         child{node[concept](shade){Shading}}                         }             %----------------------------------------------------------                 child[grow = 45, concept color = green!50!yellow!70!black]{                     node[concept](func){Ecosystem Function}                         [counterclockwise from = -20]                         child{node[concept](massflu) {Mass Fluxes}}                         child{node[concept](biom) {Biomass}}                         child{node[concept](prod){Production}}                         child{node[concept](comp) {Competition}                             child{}}                         }             %----------------------------------------------------------                 child[grow = 0, concept color = blue!60!white]{                     node[concept](rough) at (0.5,0){Turbolence}                         child[grow = 20]{node[concept](lh){Latent Heat}}                         child[grow = -20]{node[concept](sh){Sensible Heat}}};             %----------------------------------------------------------          %%%%%%%%%%%% ATMOSPHERE       \path[mindmap,concept color=blue!80!white!60!green, text=white]         node[concept](atmos) at (12,4){Atmospheric Exchanges};          %%%%%%%%%%%% ENERGY       \path[mindmap,concept color=red!50!black, text=white]         node[concept](energy) at (12,-4){Surface Energy};          %%%%%%%%%%%%% MAKING SECONDARY CONNECTIONS        \newcommand{\conngreentoorange}{to[circle connection bar switch color=from (green!50!yellow!70!black) to (orange)]}       \newcommand{\connredtoorange}{to[circle connection bar switch color=from (red!50!black) to (orange)]}       \newcommand{\connredtoblu}{to[circle connection bar switch color=from (red!50!black) to (blue!60!white)]}       \newcommand{\connazuretoblu}{to[circle connection bar switch color=from (blue!80!white!60!green) to (blue!60!white)]}       \newcommand{\connazuretogreen}{to[circle connection bar switch color=from (blue!80!white!60!green) to (green!50!yellow!70!black)]}       \newcommand{\connazuretored}{to[circle connection bar switch color=from (blue!80!white!60!green) to (red!50!black)]}       \newcommand{\connblutogreen}{to[circle connection bar switch color=from (blue!60!white) to (green!50!yellow!70!black)]}       \begin{pgfonlayer}{background}         %\draw [circle connection bar ]           \path (func)  \conngreentoorange (light);           \path (energy)\connredtoorange (alb);                 \path (energy)\connredtoorange (lw);           \path (energy)\connredtoblu (sh);           \path (energy)\connredtoblu (lh);           \path (atmos) \connazuretoblu (lh);           \path (atmos) \connazuretoblu (sh);           \path (atmos) \connazuretored (energy);           \path (atmos) \connazuretogreen (massflu);           \path (lh) \connblutogreen (massflu);       \end{pgfonlayer}     \end{tikzpicture}}     \end{figure}          \end{document}      This is my result: ![enter image description here](http://i.stack.imgur.com/tCKag.png)


title: How do i get the two circuits to display side by side?

text: \documentclass[11pt, a4paper]{article}     \usepackage{fullpage}     \usepackage{circuitikz}     \usepackage{enumerate}     \usepackage{SIunits}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}     \begin{figure}[h]     \centering     \begin{subfigure}[t]{0.3\textwidth}     \centering     \begin{circuitikz}[ scale=1.2, american voltages]\draw      (0,0) -- (3,0) to[short, -o](3,0)      (0,1.5) to [R, l=$10 \kilo \ohm$] (3,1.5) to[short, -o](3,1.5)      (3,1.5) to [open, v = $V_c$] (3,0)      (0,0) to [V, l=$V_i$] (0,1.5)      ;\end{circuitikz}      \caption{Steady State Capacitor}\label{Steady State Capacitor}      \end{subfigure}           \begin{subfigure}[t]{0.3\textwidth}      \centering      \begin{circuitikz}[ scale=1.2, american voltages]\draw      (0,0) -- (3,0) to[short, -o](3,0)      (0,1.5) to [R, l=$10 \kilo \ohm$] (3,1.5) to[short, -o](3,1.5)      (3,1.5) to [open, v = $V_c$] (3,0)      (0,0) to [V, l=$V_i$] (0,1.5)      ;\end{circuitikz}      \caption{Steady State Capacitor}      \end{subfigure}      \end{figure}      \end{document}


title: APA6 reference: Chapter in book

text: I have trouble referencing a chapter in an edited book using `apa6.cls`. I use Jabref to create the `.bib` file for my references. **What I want is:** > Good, B., & Kleinman, A. (1985). Anxiety and the anxiety disorders. In A. H. > Tuma & J. D. Maser (Eds.), **_Anxiety and the Anxiety Disorders_** (p. > 297-323). Hillsdale, NJ, England: Lawrence Erlbaum Associates, Inc but this is what I got: > Good, B., & Kleinman, A. (1985). Anxiety and the anxiety disorders. In A. H. > Tuma & J. D. Maser (Eds.), (p. 297-323). Hillsdale, NJ, England: Lawrence > Erlbaum Associates, Inc. The title of the book is missing. This is the `bibtex` code I have from Jabref:               @INBOOK{Good1985,       chapter = {Culture and anxiety: Cross-cultural evidence for the patterning of         anxiety disorders Anxiety and the anxiety disorders},            pages = {297-323},            title = {Anxiety and the Anxiety Disorders},            publisher = {Hillsdale, NJ, England: Lawrence Erlbaum Associates, Inc.},            year = {1985},            editor = {Tuma, A. H. and Maser, J. D.},            author = {Good, B. and Kleinman, A.},            timestamp = {2013.05.22}     }      Does anyone know how to fix this? Many thanks.


title: How can I have labels on the plots in latex, drawn in R

text: I used R to get different plots. I saved them as pdf. I went to my tex. file and I used `\includegraphics` command. The plot came but it does not have labels on, that is, x-labels, y-labels and title-labels. Please advice.


title: Implicit \hfil at the end of each paragraph?

text: Why do `Alpha \hfil\ Omega\par` and `Alpha \hfil\ Omega` not flush "Omega" to the right?


title: Why do I get the error "! Illegal parameter number in definition of \appendix."while redefining the \appendix command?

text: I'm trying to redefine the `\appendix` command so that my appendix headings go to the top of the pages. To do this, I tried the following code, but I get the error `! Illegal parameter number in definition of \appendix`. Why am I getting this error and how to get rid of it?               \documentclass{book}     \makeatletter     \renewcommand\appendix{\par     \def\@makechapterhead#1{%       \vspace*{0\p@}%       {\parindent \z@ \raggedright \normalfont         \ifnum \c@secnumdepth >\m@ne           \if@mainmatter             \huge\bfseries \@chapapp\space \thechapter             \par\nobreak             \vskip 20\p@           \fi         \fi         \interlinepenalty\@M         \Huge \bfseries #1\par\nobreak         \vskip 40\p@       }}       \setcounter{chapter}{0}%       \setcounter{section}{0}%       \gdef\@chapapp{\appendixname}%       \gdef\thechapter{\@Alph\c@chapter}}     \makeatother     \begin{document}     \appendix     \chapter{Foo}     \end{document}      Please keep in mind that, I know that a solution is to put the redefinition of the `\@makechapterhead` at the beginning of the `\appendix` command in the document body, but I want to do the job in the preamble. Also, I'd prefer not to use extra packages to do the job.


title: new environment with one optional and second must have arguments

text: Probably this question has been asked before, but I could not find a satisfactory answer anywhere. Is there a way to define a \newenviroment with an optional and a must have argument. e.g something like               \newenvironment[2]{     do something if #1 is there else leave alone     do something with #2     }{}      My apologies in advance if question sounds too vague.


title: vim-spell: exclude custom LaTeX commands

text: I'm using Vim (with vim-latex) to write my LaTeX documents. I made a bunch of custom commands to mark different kinds of "variables" (as in programming languages) I use in text, in formulas and in code listings. I always wrap the variable names in my commands to ensure consistent text formatting and have the ability to conveniently change the format at a later point. Usually a command—e.g. `\somevariable{somename}`—does not contain an orthographically correct name. The problem is, Vim's spell checker marks all my variable names as wrong and this clutters the spell checking (e.g. when I want to step between errors). Another example are TikZ pictures where the node names of my graph are marked as spelt wrong. Is there a (preferably easy) way to exclude the contents (the stuff inside `{` and `}`) of custom commands from spell checking? (I already found this question but this is not exactly what I want as it only deals with standard commands/environments and adding all my custom commands here is quite cumbersome)


title: How to change font family LaTeX plot?

text: I want to change the font family of the bar plot to Helvetica fonts. I have tried using the following code but it only changes axis fonts and not the data labels inside the plot:               \documentclass[margin=5pt]{standalone}        \usepackage{tikz,pgfplots,pgfplotstable}     \usepackage{helvet}     \renewcommand{\rmdefault}{phv}          \pgfplotstableread[col sep=semicolon]{     name;S1;S2     john white;912;800     alan ket;484;400     halen koo;309;250     daren kalig;291;280     arif butt;192;150     james seal;142;120      }\loadedtable     \begin{document}      \begin{tikzpicture}         \begin{axis}[                 enlarge x limits=0.2,                 xbar,nodes near coords,bar width=16pt,bar shift=0pt,                 symbolic y coords={john white,alan ket,halen koo,daren kalig,arif butt,james seal},             ytick={john white,alan ket,halen koo,daren kalig,arif butt,james seal},             %x coord trafo/.code={\pgfmathparse{-x}},             xticklabels={0,1000,500,0,500,1000},         ]         \addplot[nodes near coords align={left},                     draw=blue,fill=blue!25,text=blue]             table[y=name,x expr={-\thisrow{S1}},point meta={-x}] \loadedtable;              \addplot table[y=name,x expr={\thisrow{S2}}] \loadedtable;     \end{axis}     \end{tikzpicture}      \end{document}      Here is the plot: ![plot](http://i.stack.imgur.com/vqMs7.png)


title: How to add a side-bar non-intrusively over more than one paragraph?

text: If I insert a couple of new paragraphs in my long text I want to mark the new section somehow so that others can see I edited this part and it is not yet corrected. I also want to be able to remove the "this is new text" markings very easily. Ideally they should show up with one or two lines in a diff or so. Currently I use a text color that spans several paragraphs. That works quite well with `\begingroup` and `\endgroup`:               \begingroup \color{tcolortodo}              More the none paragraph, ... lists, tables, etc.          \endgroup      But I often print my stuff on a black-and-white printer. So, the only other possibility that comes to mind would be **a black line or bar alongside the new paragraphs**. How do I do that?


title: Embedding PDF while rewriting fonts in Latex

text: I have some PDF-files which I embed as graphic-objects into my latex-project. Those PDFs come from different sources. One I created in Powerpoint myself, then exported to PDF to make it vectorized and another one is cropped from a PDF usermanual. Now I'm wondering what would be the best and easiest way (if there is one) to embed those PDFs into my latex document but somehow make the fonts in it being compiled by texify so that the fonts look the same as in my project. I assume there's a function to maybe put some "placeholders" into the pdf's I'd like to embed and replace them at compiling-time by some texts in the correct latex- font!? Thanks in advance **Okay to clarify** : I have a PDF with vectorized figures in it and texts on the axis, a title and so on... I'm looking for ANY way to embed this PDF into my latex document with rewriting the texts in the PDF in the font being used in my latex document so that the ensemble looks nice. **My first edit was (which works by manually using the`overpic`-package)**: Manually doing it works like this: 1\. Open the PDF in any PDF-editor and delete all the text-objects (so that only the graphical part remains in the PDF), save it 2\. Include the PDF in your latex document using the `overpic`-package with the rgid option 3\. Now put texts (or even math- formulas possible) OVER the embedded graphical object (which comes from the PDF-file). The texts will therefore obviously look like any other text in your document (similar in style / font etc.) (Some more informations on overpic: How can I superimpose LaTeX / TeX output over a PDF file?) **EDIT2** : As stated below in the comment:   If you put this out of hold, I'll post my own answer as solution to the question below which would, as you say Charles, be worth mentioning just to record the solution which is really a nice one. Easy to do and very very nice in the final output.


title: How to keep tex and installed packages up to date on a Mac with no hassles?

text: I have MacTeX 2013 basic installed, and I use TexLive to get packages I need for my writing. Recently TexLive told me that the repository is now only for a newer version than what I have installed. I see that MacTex 2014 basic is available, and even though 2013 is working fine for me I get 2014 to make TexLive happy. Now I apparently have two TeX installs. When I delete the 2013 install directory, all the extra packages I had downloaded with TexLive are gone. I do not want to deal with rebuilding what I previously had just because of a yearly update. I think this is a reasonable expectation, so what am I doing wrong here? Does this problem completely go away if I install the full install instead of basic? Is there a way to make TexLive install packages to a more stable location? I just want a working typesetting system that is keep up to date without a bunch of distracting janitorial work.


title: How can I recognize documents prepared in (La)TeX?

text: Inspired by a part of this question, this seemed like an interesting question to ask. Advocates of LaTeX often say that you can see the difference in typesetting quality when you look at a document prepared with LaTeX and compare it to something prepared in, say, MS Word. I certainly don't dispute this; I can often tell, but it's hard to put my finger on exactly why. So what are these differences? What are the distinctive features that make a document look like it was prepared in LaTeX, rather than some other system? In other words, if I have a PDF file and I would like to make an educated guess as to whether it was created in LaTeX or not, what should I be looking for? (ignoring any PDF metadata that identifies the creator) I have my own ideas about this but I'll refrain from self-answering, at least for now, to see what other people may suggest.


title: Removing the line and address from scrlttr

text: `scrlttr2` seems to set a line with the address on it. I can't figure out _which_ of the many `scrlttr2` options turns it off.               \documentclass{scrlttr2}     \setkomavar{fromname}{Seamus}     \setkomavar{fromaddress}{Earth\\       Solar System\\       Milky Way\\       The Universe}     \begin{document}     \begin{letter}{TeX\\         Stackexhange\\         dot com\\         The internet}       \opening{Dear TeXnicians}            I am having trouble with the above ruled line            \closing{Yours hopefully}     \end{letter}     \end{document}      ![this line!](http://i.stack.imgur.com/E3R1G.png) I am trying to remove the rule, and the text highlighted...


title: Heading exceeds margins

text: I am writing a document with the `book` class. Hence, the title of the chapter appears at the head of each even page, and the title of the section appears at the head of each odd page. However, some of my titles are too long and the texts exceeds the margins. How can I resolve this, for instance by ending the heading with '...' if the heading is too long?


title: How to strip curly-braces from variable before using it as a filename?

text: I'm trying to use a variable to pass a filename to \includegraphics. I'm having trouble because my filename is built up from other variables. This leaves an empty curly-brace inside the filename. The filename correctly prints in the document, but the braces cause a "file not found" error in \includegraphics. (I'm working on a genealogy project with many photographs. The names are generated with a script.) How can I get LaTeX to strip empty curly-braces from a variable before passing it to \includegraphics? Many thanks, Kevin Example Code: filevar.tex               %      % ==============================================================     % Example to show problem with building filenames from variables     %     % Current directory contains:     %    + This LaTeX source file (filevar.tex)     %    + A directory named "photos"     %    + JPEG photo photos/t-0001_FirstPhotoName.jpg     %    + JPEG photo photos/t-0002_SecondPhotoName.jpg     %     % This file is processed with the command     %    pdflatex -interaction=batchmode filevar.tex     %     %    The error messages are:     %    LaTeX Warning: File `./photos/t-00{}01_FirstPhotoName.jpg' not found on input      %    LaTeX Warning: File `./photos/t-00{}02_SecondPhotoName.jpg' not found on input                %                 \documentclass[letterpaper,twoside]{article}          \usepackage{graphicx}     \graphicspath{{./}{./photos}}          %     % Here is the macro I want to fix.     \newcommand{\pfile}[1]{%     %\catcode`_=12 % --does not work inside macro     Here is the example for file \texttt{#1}.     \newline     \includegraphics[height=0.40in,width=0.55in,keepaspectratio=true]{./photos/t-#1}     \newline     }%          % These variables are generated programmatically...     \def\photoSerialNumberBase{00}     \def\photoSerialNumberFirstPhotoName{\photoSerialNumberBase{}01}     \def\photoSerialNumberSecondPhotoName{\photoSerialNumberBase{}02}          \begin{document}          \title{Problem Example: Variables and Filenames}     \author{Kevin Cundiff}     \date{\today}     \maketitle     \pagenumbering{arabic}          \section*{Rubber Meets the Road}     Lots of important and earth-shaking text goes here.               % This cryptic command disables the special meaning of '_'.     % This allows underscores to be used in a filename.     \catcode`_=12 % --does work inside environment!               Just below this paragraph, I would like to place the thumbnail for     several photos. The filename is generated using variables. This leaves     a set of empty curly-braces in the middle of the filename which prevent     the actual thumbnail from loading in my document.               How can I tell \LaTeX{} to strip empty curly-braces from the variable?     Many thanks!          \pfile{\photoSerialNumberFirstPhotoName_FirstPhotoName.jpg}               \pfile{\photoSerialNumberSecondPhotoName_SecondPhotoName.jpg}               \end{document}


title: Bibtex: unsrt and crossref

text: I'm writing a paper for which the bibliographic style is unsrt (imposed by the editor). I use texlive 2010 and latexmk for compilation. I try to use crossref for inproceedings entries in my bib file. It works well on other documents (with the same bib entries but different styles) but on this one bibtex complains:               Warning--empty booktitle in xxx     Warning--empty booktitle in yyy      The inproceedings are defined before the proceedings as required. Here is a MWE:               \documentclass[a4paper,10pt]{article}          \begin{document}          See~\cite{Joe2011} for details.          \bibliographystyle{unsrt}     \bibliography{test_unsrt}          \end{document}      With the following bib file:               @INPROCEEDINGS{Joe2011,      author = {Joe, J.},      title = {On the use of crossref and unsrt},      crossref = {stackexchange/tex/23122}     }          @PROCEEDINGS{stackexchange/tex/23122,       title = {Proceedings of question 23122},       year = {2011},     }      Simply changing the title field to booktitle works. The matter is that proceedings entry are supposed to have a title field (not booktitle). For instance JabRef propose only the title field. Most styles I have tried use the title field. For now my problem is closed but maybe someone with good knowledge of bibtex could fix this Thanks in advance.


title: Text fraktur at 8pt

text: I need some Fraktur text in a footnote of a (journal) class I cannot change. I am using `yfonts` and `\textfrak` and get the message               LaTeX Font Warning: Font shape `LY/yfrak/m/n' in size <8> not available     (Font)              size <10> substituted on input line 467.      The Fraktur text is, indeed, too big for the footnote. Is there a way to coerce 8pt?


title: Inkscape SVG with opacity exported to PDF in pdflatex document not displayed correctly on Mac OS X

text: I use Inkscape to create graphics which I export to PDFs in order to include them into a LaTeX documents (with \includegraphics and using pdflatex). I didn't notice that there is something wrong until someone told me that my figures do not display correctly on Mac OS X. Basic graphic parts, e.g. boxes or circles which have a Opacity setting less than 100% are not displayed at all. The problem seems to be in pdflatex since the exported PDF from inkscape alone displays just fine on a Mac. Since I'm using Linux and sometimes Windows I never realized that there is even a problem! After trying to figure out what could cause the problem, i stumbled over \includegraphics PDF, color problem and Inkscape → PDF → includegraphics → XeLaTeX → changed colors However, this did not solve my problem. A similar question was asked in Opaque-to-transparent gradient lost in embedded PDF figure but now answer was really given. I found out that the conversion of the exported PDF to a PS and then back to PDF resolves the issue but the graphic quality is quite bad afterwards. What did I miss? Thanks for any suggestion. Below is a minimal working example:               \documentclass[a4paper]{article}     \usepackage[pdftex]{color,graphicx}          \begin{document}          \begin{figure}[htb]      \begin{center}       \includegraphics[width=\columnwidth]{test_diagram}       \caption{Block diagram created with Inkscape 0.48}      \end{center}     \end{figure}          \end{document}      The included graphic can be downloaded here: https://www.dropbox.com/s/mrtj0c3u0ng6a39/test_diagram.pdf Inkscape: 0.48.3.1 r9886   pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)


title: text alignment problem in beamer

text: The text is aligned left even though there is lot of space on right side. Below is my part of tex file. and the output slide is also attached. Please suggest what can I do to correct this. Thanks.               \documentclass[slidestop,compress,mathserif]{beamer}     \usepackage[latin1]{inputenc}     \usepackage{verbatim}     \usepackage{graphicx}     \usetheme{Boadilla}     \usecolortheme{beaver} %{beetle}%{crane}      \usepackage{textpos}     \usepackage{tikz}     \usepackage{biblatex}     \addbibresource{ref.bib}          \title[xyz]{Energy Interactions}     \author[Ramkrishna Sharma]{Ramkrishna Sharma}     \institute[DU]{University of Delhi, INDIA}     \date{September 11, 2014}               \setbeamertemplate{footline}[slide number]     \setbeamertemplate{frametitle}[default][center]         % For centering the Heading          \titlegraphic{         \includegraphics[width=1.5cm,keepaspectratio]{figure/cern.jpg}\hspace*{3.35cm}~%         \includegraphics[width=2cm,keepaspectratio]{figure/logo_du.jpeg}\hspace*{2.75cm}~%         \includegraphics[width=1.5cm,keepaspectratio]{figure/cmsLogo.jpeg}     }          \begin{document}     \renewcommand{\inserttotalframenumber}{\pageref{lastslide}}     \begin{frame}     \titlepage     \end{frame}          \begin{frame}\frametitle{Table of contents}\tableofcontents     \end{frame}          \begin{frame}[shrink=20]\frametitle{Motivation}     \begin{block}{Higgs boson Found!!!}         \begin{itemize}         \item Discovery of Higgs boson anounced on 4 July 2012.         \end{itemize}     \end{block}          \begin{block}{Queries}         \begin{itemize}         \item But, now the question about Higgs boson split into two queries\footfullcite{Massironi:2014fma}:             \begin{itemize}             \item Is this the only Higgs boson present in Nature?             \item Is it really doing {\bf the Higgs boson} job?             \end{itemize}         \end{itemize}     \end{block}     \begin{block}{Answer: Mainly three roads}         \begin{itemize}         \item keep searching for scalar outside of m=125GeV\footfullcite{Chatrchyan:2013yoa},         \item measure with high precision the properties of the 125GeV boson\footfullcite{CMS:2014ega}, and         \item measure the electroweak vector boson interactions.         \end{itemize}     \end{block}          \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/jIG9r.png)


title: Citation undefined in Biblatex-mla

text: I am a mac user and I installed biblatex-mla into `~/Library/texmf` and I `texhash`ed a lot. However my citation never works. Here is my tex file:               \begin{filecontents*}{bibl1.bib}     @book{goossens93,         keywords = {primary},         author = "Michel Goossens and Frank Mittlebach",         title = "The {LaTeX} Companion",         year = "1993",         publisher = "Addison-Wesley",         address = "Reading, Massachusetts"     }          @book{knuth84,         keywords = {primary},         author = "Donald E. Knuth",         title= "The {TeX}book",         publisher = "Addison-Wesley",         year = 1984     }     \end{filecontents*}          \begin{filecontents*}{bibl2.bib}     @unpublished{patashnik88,         keywords = {secondary},         author = "Oren Patashnik",         title = "Using {BibTeX}",         note = "Documentation for general BibTeX users",         month = jan,         year = 1988     }     \end{filecontents*}          \documentclass{article}     \usepackage[style=mla,guessmedium=false]{biblatex}     \usepackage[american]{babel}     \usepackage{csquotes}     \addbibresource{bibl1.bib}     \addbibresource{bibl2.bib}          \begin{document}     \cite{knuth84}, \cite{goossens93}, \cite{patashnik88}          \printbibliography[keyword=primary,heading=subbibliography,%     title={Primary Sources}]     \printbibliography[keyword=secondary,heading=subbibliography,%     title={Secondary Sources}]          \end{document}      I am sure I included my `bib` file in the current directory. Below is the log:               Package biblatex Warning: Missing 'hyperref' package.     (biblatex)                Setting hyperref=false.     (./Writing Draft.aux) (./Writing Draft.bbl)     LaTeX Warning: Citation 'knuth84' on page 1 undefined on input line 39.     LaTeX Warning: Citation 'goossens93' on page 1 undefined on input line 39.     LaTeX Warning: Citation 'patashnik88' on page 1 undefined on input line 39.     Package biblatex Warning: Keyword 'primary' not found on input line 41.     LaTeX Warning: Empty bibliography on input line 41.     Package biblatex Warning: Keyword 'secondary' not found on input line 43.     LaTeX Warning: Empty bibliography on input line 43.     [1{/usr/local/texlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     (./Writing Draft.aux)     LaTeX Warning: There were undefined references.     Package biblatex Warning: Please (re)run Biber on the file:     (biblatex)                "Writing Draft"     (biblatex)                and rerun LaTeX afterwards.     )</usr/local/texlive/2012/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb     ></usr/local/texlive/2012/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>     Output written on "Writing Draft.pdf" (1 page, 21282 bytes).     SyncTeX written on "Writing Draft.synctex.gz"     Transcript written on "Writing Draft.log".      Any help is highly appreciated.


title: How to draw a horizontal line at the end of proofs?

text: How can I draw a horizontal line at the end of proofs? I use `\begin{proof}....\end{proof}`. I use `amsthm` package without any modification.


title: Using Excel2LaTeX in Excel 2013

text: I'm using Excel 2013 and having no luck getting the Excel2LaTeX add-in to do my bidding. When I view my add-ins from the options menu, all seems well--Excel2LaTeX shows up, and its checkbox is marked when I go to "Manage Add-Ins". However, there is nothing on the tool bar: no Add-Ins Ribbon, no shortcut buttons to be found under any existing headings--it's like it disappeared!! Anyone able to figure out what's going on?


title: LaTeX2rtf with pdftooltip

text: I'm using LaTeX2rtf to convert LaTeX article or report documents into rich text format. I also compile the PDF using pdfLaTeX. In my document, I use the `pdfcomment` package to create tooltips.               \documentclass{article}     \usepackage{pdfcomment}     \begin{document}     \pdftooltip{$a^2+b^2=c^2$}{An equation}     \end{document}      The tooltips are correctly rendered in the PDF version. However, when I run               latex2rtf      `\pdftooltip[*options*]{*item*}{*tooltip*}` is rendered as _item_ and _tooltip_. If _item_ is a float, or equation, then the float or equation is shown. _tooltip_ is always shown as text. This is correct as far as LaTeX2rtf is concerned, but I would like to modify this behavior so that I don't have to tidy up my document too much. Question: How can I force LaTeX2rtf to ignore _tooltip_ and just process the _item_ argument? I am looking for a solution that will work with a document that contains lots of `\pdftooltips`, so using the `\iflatextortf` switch doesn't really work (too much added complexity). Ideally I would be able to define something in the preamble or pass an option to LaTeX2rtf.


title: Inserting a .tex image into my LaTeX document

text: I'm using a program that exports images in a `.tex` format and I was wondering if anyone know how I should include this in my main TeX file?               \fcolorbox{white}{white}{%     \begin{picture}(162,306)(271,-175)      \SetWidth{1.0}      \SetColor{Black}     \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](272,-174)(352,-94)     \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](352,-94)(432,-174)      \Photon(352,-94)(352,50){7.5}{7} \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](352,50)(432,130)     \Line[arrow,arrowpos=0.5,arrowlength=5,arrowwidth=2,arrowinset=0.2](272,130)(352,50)      \Text(368,-14)[lb]{\Large{\Black{$\gamma$}}}      \end{picture}}


title: tweaking a resume template to allow custom bibtex categories

text: So I use LaTeX a lot for work. I'm in the process of creating a new academic CV. I found a beautiful template that I really love, but handles bibtex references in an unweildy manner. It assumes something is a conference piece or a journal article by the type of bibtex entry. (@misc, @inproceedings, @article, etc) This is problematic since for example, I have workshops I've attended that published proceedings and were counted as "peer reviewed". Sometimes they were not peer reviewed, but these would be lumped together with the first CV's approach. Another issue is the whole @misc section is a jumble of posters, invited talks, and links to news articles about me. My old cv template isn't very pretty, but it handles bibtex citations in a much more usable manner. Basically, it lets you predeclare your categories and list the cites that go in each. (Example below)               \bibliography{pubs}     \addtocategory{books}{MWH3,ITSM91,ITSM94,expsmooth08}     \addtocategory{papers}{BHG91,BH92,YW93,Hyndman94,HDRF95}     \addtocategory{papers}{HDR96,HBG96,HF96,GHH97,HW97,LFSH97,GH98}      Ideally, I'd like to use the citation method from my old CV, but with the visual look from the new one. I've attempted merging the new resumé's .cls and the old resumé's .sty, but I know very little about making templates and just get a mass of errors. It seemed like a simple matter of replacing one template's references code with the other, but I can't get it to compile. Is there any way I can force the new CV style I found to let me have my own custom groupings? I tried pulling the citation code from one templatr and puttin it in the other, but it just leads to a mass of errors, and no matter how much I google I can't get it to compile. Any help would be greatly appreciated.


title: citeyearpar in latex that would compress the years together

text: So I have two articles that have the same main author. I found an answer in this website to how to make the `\citeyearpar` to become `hyperref`ed:               \DeclareCiteCommand{\citeyearpar}         {}         {\mkbibparens{\bibhyperref{\printdate}}}         {, }         {}      Now I apply it as `\citeyearpar{article1,article2)` what I get is (year1),(year2) but what I want is (year1,year2). Can I get help for this? As an example I edit 01-introduction.tex from bibtex tutorial:               % !TEX encoding = UTF-8 Unicode     % !BIB TS-program = biber          \documentclass[a4paper]{article}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=authoryear,backend=biber]{biblatex}     \usepackage{hyperref}     \DeclareCiteCommand{\citeyearpar}         {}         {\mkbibparens{\bibhyperref{\printdate}}}         {, }         {}          %     % We use the database biblatex-examples.bib.     \addbibresource{biblatex-examples.bib}     %     % Some generic settings.     \newcommand{\cmd}[1]{\texttt{\textbackslash #1}}     \setlength{\parindent}{0pt}     \begin{document}          Test Test Test Test Test Test Test Test \citeyearpar{companion,companion} Test Test Test.     \printbibliography          \end{document}      Result is : ![enter image description here](http://i.stack.imgur.com/0Y5Tk.png)


title: Spacing in headline between number and text

text: How do I change the spacing between the number and the title of a section? I would like to have the following: > **1.** (1cm space) **Section name**


title: Scale included graphics to the higher ratio instead of the lower for given width, height

text: I would like to scale an included graphics keeping its aspect ratio. Using               \includegraphics[width=<my width>,height=<my height>,keepaspectratio]{file.jpg}      scaling naturally takes place, but the package calculates which scaling factor is the lower one, the factor to achieve the given width or the factor to achieve the given height (while observing the aspect ratio). That makes sense if you have a given dimension to fill and would like to make sure that the image is fully shown. However, I would like to scale using the larger of the two scaling factors. In effect, this would fully fill the given dimensions and produce an overlap either in width or height. In a next step, I then would like to use the `adjustbox` to clip the viewport to my desired dimensions, ideally centered on the image. But that's potentially stuff for a separate question. * * * **Edit with solution** Martin essentially answered the question, so the credit is his. Here, I'd only like to share the actual code I used based on Martin's suggestion. My target width and height are called `\mywidth` and `\myheight` respectively.               \adjustbox{%         min size={\mywidth}{\myheight},%         Clip*={0.5\width - 0.5\mywidth} {0.5\totalheight - 0.5\myheight}%               {0.5\width + 0.5\mywidth} {0.5\totalheight + 0.5\myheight}%     }{%         \includegraphics[max size={\mywidth}{\myheight}]{file.jpg}%     }%      To get the `adjustbox` options working with `includegraphics` I used the `export` option of the package.


title: Center table on landscape page

text: I have a rather wide table for which I have a designated page in landscape mode. The rest of the document is in portrait mode. Currently, the first row of the table begins at the very top of the page and ends somewhere in the middle. I'd like the table to be vertically centered though. How can I achieve this? I'm using the `tabular` environment.


title: Embedding videos using Beamer and Acrobat Reader

text: I've been reading a lot of related questions, but they last to use the `media9` package. My very specific question is that when using Beamer in Windows to embed a video, Acrobat Reader is unable to open it asking for a vids:FMP4 video decompressor, so where can I find such a decompressor?


title: TeX editor with line-spacing preferences

text: Do you know a TeX editor where one can increase the line spacing/change the line spacing in preferences? LibreOffice Writer could do the trick provided it did not prepend `0xfeff` to files encoded in `UTF-8`, which prevents LaTeX engines from working. I'm happy with VIm. It's just that I like writing prose in a double-spaced environment.


title: Should I leave LaTeX decide the vertical height of the space above a text paragraph?

text: In my document, above a text paragraph, there are objects of many possibilities: `\end{figure}`, `\end{align*}`, `$$`, `\end{itemize}`, `end{enumerate}`, etc... It seems that visually on the final pdf, it does not leave space of same height before the text paragraph. So I have to try several `\\` or add black line in my `.tex` to get a consistent layout... This manual adjustment confuses me, is there any elegant way to determine the space of certain height? What do you put usually after a `end{...}` before a text paragraph?


title: Text at the end of the page

text: I would create a page with some text at the end of the page. Initially the page is blank and after I add text using:               \thispagestyle{empty}     \vspace*{\stretch{5}}         \begin{center}             Text         \end{center}      The content should be add at the end. Could be right the solution I proposed?


title: Parenthesis not aligned with characters inside in arabic, using Xelatex

text: I re-ask the same question, more precisely... I'm using Polyglossia to write a book of probability in arabic, and I've recently formatted my machine so I lost the last installation of fonts etc.. but not the files fortunately, saved periodically... So I have some problems for typesetting my old files, that I absolutely not understand... one problem what I never see it is that, after compilation, the parenthesis are behind the characters inside... and is really inacceptable when the main font is "Traditional Arabic", which is the font of the book (and still remains for another font... see example below)... This is the case for referred equation and for it's reference with different behaviour for two different fonts, and the same (bad) behaviour for text... See the words "(of null intersection)" This is also the case even if the characters used are Latin !! My question is then: where do come from this problem?   how can I obtain centered parenthesis around the characters inside, for every font ? Here is the basic tex file, of the same simple text, written with main font "Traditional arabic" first, and in the font Amiri, for watching the difference..               \documentclass[14pt,a4paper]{extbook}          \usepackage{amsmath,amssymb}     \usepackage{polyglossia}     \setmainlanguage[numerals=maghrib]{arabic}     \setotherlanguage{english}     \newfontfamily\arabicfont[Script=Arabic,Scale=1.2,AutoFakeSlant=-0.02]{Traditional Arabic}     \setsansfont[Script=Arabic,Scale=1.5]{Traditional Arabic}          \begin{document}     \LR{     Let  $E_{1}, E_{2},\ldots, E_{n}$, some disjoint events (of null intersection), then     \begin{equation} %eqn3.1     \label{eqn3.1}     P \left(\bigcup_{1}^{n} E_{i}\right) = \sum_{i = 1}^{n} P (E_{i})     \end{equation}     The equation       \eqref{eqn3.1} generalizes to...       }          \vspace*{70pt}             \newfontfamily\arabicfont[Script=Arabic,Scale=1.2,AutoFakeSlant=-0.02]{Amiri}     \LR{     Let  $E_{1}, E_{2},\ldots, E_{n}$, some disjoint events (of null intersection), then     \begin{equation} %eqn3.1     \label{eqn3.2}     P \left(\bigcup_{1}^{n} E_{i}\right) = \sum_{i = 1}^{n} P (E_{i})     \end{equation}     The equation       \eqref{eqn3.2} generalizes to...       }          \end{document}      And the result of my compilation (Using texmaker, and Windows 8).. ![enter image description here](http://i.stack.imgur.com/LZDBZ.gif)


title: How and when to remove the space on the left hand of the beginning of a paragraph?

text: I have something like that:               \section{subsection}     ...     \begin{figure}     ...     \end{figure}     texttexttext     ...      It turns out that it does not put the "texttexttext" on the very left hand side... it leaves some space... My questions are:   1. How to remove this space?   2. Generally speaking, in a technical report, when should we leave some space on the left hand side of the beginning of a paragraph? when shouldn't we?   3. If we leave some space the left hand side of the beginning of a paragraph, should we leave a blank line above it to separate from the previous paragraph?   4. Also, what is the best way to add a blank line? `\\[1em]`? I would like to know the convention.


title: How can I allow a command to be used without braces around its argument, when the argument has an argument?

text: I've defined a couple simple macros to make my life a little easier:               \newcommand{\curl}[1]{\ensuremath{\nabla\times #1}}     \renewcommand{\v}[1]{{\ensuremath{\vec{#1}}}}      This way, in text mode I can write `\v{F}` or `\curl{\v{F}}`, and all is well. But for simplicity, at least in math mode, I'd like to be able to just write `\curl\v{F}`, and have it expand to               \ensuremath{\nabla\times {\ensuremath\vec{F}}}      just like `\curl{\v{F}}`. Since I've defined `\curl` in a pretty simple manner, this currently looks right. However, I think I'm actually getting a stranger behavior: if I change the definition of `\curl` to have parentheses, like `{(\ensuremath{\nabla\times #1})}`, then the vector symbol shows up over the closing parenthesis, as if the `\v` (but not its argument) is being captured as an argument to `\curl`. Strangely, though, simply typing `\ensuremath{(\nabla\times {\ensuremath\vec})}` results in errors. What's going on here? Is there a good way to do this, and is it a good idea? (By the way, the reason I have an extra pair of `{}` in the definition of `\v` is that it allows me to use `\int_\v{x}` rather than `\int_{\v{x}}`. This much seems to work, but I'm not really sure why.)


title: Font style for page number for chapter in ToC

text: The page numbers in the ToC appear in different styles. For sections and subsections in normalsize and for the chapter in **bold** and slightly larger (I think). How can one change the fontsize/fonttype for the page number of a chapter entry in the ToC? document style: book live-tex LaTeX, from Ubuntu 11.4 pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)


title: Disable smallcaps within \textsc?

text: _How can I disable smallcaps within`\textsc{}`?_ I would like to be able to disable/toggle smallcaps on a local level so that something like `\textsc{o\textrm{open}mp}` looks like `\textsc{o}open\textsc{mp}`. The reason for not doing the latter is to try to make use of the `glossaries` package with the `smallcaps` option for abbreviations. This automatically does the outer `\textsc{}` wrapping.


title: Tex file for preparation of Book of Abstract

text: I want to prepare a book of abstract by latex. I would like to include the following things in the document 1\. A Cover page 2\. A page for FOREWORD 3\. List of content (abstract title) along with page number 4\. Abstract (each abstract in each page.) Please provide a sample tex for the preparation of the same.               \documentclass[titlepage,openany]{book}     \usepackage{lipsum}     \usepackage{authblk}     %\usepackage{abstract}     \usepackage{titlesec}     \titleformat{\chapter}[display]       {\normalfont\huge\bfseries}       {}       {0pt}       {\Huge}     \titlespacing*{\chapter}       {0pt}{20pt}{20pt}          \title{Symposium on }     \date{23th May, 2015}     \author{ABSTRACT}     \newenvironment{absquote}                    {{\center\bfseries Abstract\endcenter}%                      \list{}{\leftmargin2cm\rightmargin\leftmargin}%                     \item\relax\footnotesize}                    {\endlist}     \def\author#1{\center#1\endcenter}     \def\articletitle#1{\center{\bfseries\LARGE{#1}}\endcenter}     \def\serial#1{{\bfseries\hfill#1\hspace{2em}}}     \begin{document}     \begin{titlepage}     \maketitle% or design your own cover page     \end{titlepage}     \frontmatter     \tableofcontents     \chapter*{Foreword}     \lipsum[1-2]          \mainmatter     \articletitle{Title 1}     \author{FIRST AUTHOR$^{(a)}$, 2nd Author 2$^{(b)}$,  3rd  AUTHOR$^{(c)}$}     \address{$^a$ \small address 1, E-mail: a1@gmail.com\\     $^b$ address 2, E-mail: a2@gmail.com,\\ $^c$ \small address 3, E-mail: a3@gmail.com}     \begin{absquote}     \lipsum[1]     \textbf{Keywords}: {Eco-epidemiology; Stability; Hopf bifurcation; Periodic solutions; Permanence; Global stability.}     \serial{A-213}     \end{absquote}     \newpage     \articletitle{Title 2}     \author{Author 1, Author 2}     \begin{absquote}     \lipsum[2]     \serial{A-214}     \end{absquote}     \end{document}


title: Unindented proof in amsbook

text: I am using the proof environment in amsbook. Unlike amsart, the proof is automatically indented. Is there a way of cancelling the indentation?               \documentclass{amsbook}     \begin{document}     \noindent This is a non-indented sentence.     \begin{proof}     This is a proof.     \end{proof}     \end{document}


title: Using scalable sizes for rectangles, circles and nodes in TikZ?

text: How do you define the size of a rectangle, circle or node in TikZ to be scalable, like when you position objects using `(1, 2)` and then apply `scale=2`? What I'm looking for is to be able to scale the objects like circles and boxes along with the coordinates.


title: chemical laboratory equipment

text: I want to include some drawings with Erlenmeyer flask, Bunsen burner and so on in LaTeX. I browsed the texample.net gallery. I found some examples for chemical structures, molecules and so. But I did not find any example for lab equiment.   * Does TikZ provide a library that helps to construct this?   * Are there any other TikZ sites where I can find examples?    * Does anybody had a similar task and found a solution to share? I am not fixed on TizK. Are there other means to make this drawings? I looked at pst-labo. How difficult would it be to extend the options it provides? Any suggestions are welcoome.


title: "Smart commenting" in LaTeX

text: Is there any package that lets me insert "smart comments" in a LaTeX document? What I mean by "smart commenting":   I have a source (.tex) file of notes of the lecture that happened in the classroom. However, the notes do not have the detailed discussion of the proofs. I want to edit the source file and add the comments, such that the output PDF file will be same as the output of the original source; except that it will have small buttons (or similar constructs), which on pressing, will reveal the additional comments that I have made. Essentially, one could achieve this by adding editor notes using any of the PDF reading programs. However, those notes are not portable from program-to- program, and more importantly, I cannot insert mathematical equations using those annotation tools, which I can using LaTeX. I know this sounds kind of vague, but can someone help?


title: Installing AUCTeX on Windows from package-install

text: I have Emacs 24 and MikTeX on Windows 7 professional and I have recently installed AUCTeX 11.86 from package-install. The installation seems to have completed successfully, I even succeeded at compiling a latex sample file, but I can use AUCTeX only in the emacs instance where I issued the installation command, where it gets loaded by package- install. I can't do the same with a new emacs instance. Nothing seems to have been written in my .emacs file upon installation and I can't find the `auctex.el` file, which the AUCTeX installations instructions report to be found inside the auctex directory `(.emacs.d/elpa/auctex)`, to load AUCTeX at initialization time. Any idea on how I can solve the issue?


title: How to make a wrapper for the figure and table environments.

text: I am familiar with the `newenvironment` command, but I was wondering, how do I carry on the parameters that are used between `[ ]`, i.e `[bht!]`? I want to make a `newfig` and a `newtab` environment that will take care of some stuff that I don't want to redo everytime, i.e. center a figure or set text size to small.. I am lazy, and this can improve the readability of my tex document as well. I know I can define them as normal parameters like this :               \newenvironment{tableC}[2]     {\begin{table}[#1#2]\begin{center}}     {\end{center}\end{table}}      but these parameters are not always present, and do not necessarily have a default value. For example, the ! parameter has no default equivalent (or does it?). What can I do from this point? EDIT: Using floats, I was able to do what I needed. Here is how I did it for tables :               \usepackage{float}     \newfloat{tableC}{tbp}{lop}[chapter]     \floatname{tableC}{Table}     \floatevery{tableC}{\centering}


title: Problem with \mathpalette and \mathchoice

text: When working on an additional answer to this question of mine, I stumbled across the following problem with `\mathpalette`. For simplicity I give an example where in practice it is ridiculous to use `\mathpalette`: `\mathpalette{}{B}_b` gives the output ![](http://i.stack.imgur.com/LAk4B.png), whereas the straightforward `B_b` gives ![](http://i.stack.imgur.com/MK87l.png). Note that in the latter version the subscript is closer to the "B", which is good. If instead of `\mathpalette` one uses the version `\mathchoice{B}{B}{B}{B}_b`, one (of course) has the same problem. Is there a way around this problem? (I mean other than `\mathpalette{}{B_b}`, which is not an option for what I need.)


title: Latex listings R: need mono-spaced font with bold keywords and correct caret (^)

text: I am using the listings package to display R code. I would like a monospaced font, bold keywords, and I would like code that works when the user cuts and pastes from the pdf file into rstudio. The default listings font works correctly when pasted, but does not display bold keywords. Some fonts display bold keywords, but the caret symbol is incorrect when pasted. Here is sample code that illustrates the problem (cut and paste the fifth line in the listing to see what happens---the caret is wrong, i.e., it displays this character: ˆ, which is not recognized by R, rather than this: ^)               \documentclass{article}     \usepackage{graphicx,textcomp}     \usepackage{comment,lscape}     \usepackage{fancyvrb,listings}     \usepackage{listings,makeidx}     \usepackage{marginnote}     %\usepackage{pxfonts} % bold but wrong caret     \usepackage{courier} % bold but wrong caret     %\usepackage{ascii} % no bold     \lstloadlanguages{R}     \usepackage{hyperref}          \lstloadlanguages{R}     \lstdefinelanguage{Renhanced}[]{R}{%       morekeywords={acf,ar,arima,arima.sim,colMeans,colSums,is.na,is.null,         mapply,ms,na.rm,nlmin,replicate,row.names,rowMeans,rowSums,seasonal,         sys.time,system.time,ts.plot,which.max,which.min},       deletekeywords={Call},       alsoletter={.\%},       alsoother={:_\$}}     \lstset{language=Renhanced,extendedchars=false,     basicstyle=\small\ttfamily,     commentstyle=\textsl,     showstringspaces=false,     index=[1][keywords]}          \begin{document}          \begin{lstlisting}[float,frame=single,caption={A first example},label=list:ex1]     r <- 0.06     g <- 0.02     tt <- 1:5     cf0 <- 100     pv <- sum(cf0*(1+g)^(tt-1)/(1+r)^tt)      print(pv, digits = 8)     [1] 437.41649     \end{lstlisting}          \end{document}


title: Reference non-included chapters in large document

text: I have a large document that contains many different chapters which reference each other. The body of the main latex file looks something like:               \maketitle     \tableofcontents          \include{chapter1}     \include{chapter2}     ...     \include{chapter10}      I wish to create several documents that only contain selected chapters (i.e. chapters 3 and 8). These chapters should be numbered the same as they are in the main document so the nice latex auto-numbering is less than helpful in this case. I know I can use `\setcounterdepth` to make sure the chapters are numbered as I wish so that's not a problem. However, once I am no longer including a chapter, latex doesn't know where to point the reference to. Is there any solution where the compiler looks at all of the files but only actually includes some in the compiled document? I also want _only_ the included chapters to be in the TOC. Not sure if that would complicate the problem at hand.


title: How to full fill a page with a dot generated graph?

text: I have this .dot file with this content:               digraph world { size="7,7";         {rank=same; S8 S24 S1 S35 S30;}         {rank=same; T8 T24 T1 T35 T30;}         {rank=same; 43 37 36 10 2;}         {rank=same; 25 9 38 40 13 17 12 18;}         {rank=same; 26 42 11 3 33 19 39 14 16;}         {rank=same; 4 31 34 21 41 28 20;}         {rank=same; 27 5 22 32 29 15;}         {rank=same; 6 23;}         {rank=same; 7;}              S8 -> 9;         S24 -> 25;         S24 -> 27;         S1 -> 2;         S1 -> 10;         S35 -> 43;         S35 -> 36;         S30 -> 31;         S30 -> 33;         9 -> 42;         9 -> T1;         25 -> T1;         25 -> 26;         27 -> T24;         2 -> {3 ; 16 ; 17 ; T1 ; 18}         10 -> { 11 ; 14 ; T1 ; 13; 12;}         31 -> T1;         31 -> 32;         33 -> T30;         33 -> 34;         42 -> 4;         26 -> 4;         3 -> 4;         16 -> 15;         17 -> 19;         18 -> 29;         11 -> 4;         14 -> 15;         37 -> {39 ; 41 ; 38 ; 40;}         13 -> 19;         12 -> 29;         43 -> 38;         43 -> 40;         36 -> 19;         32 -> 23;         34 -> 29;         39 -> 15;         41 -> 29;         38 -> 4;         40 -> 19;         4 -> 5;         19 -> {21 ; 20 ; 28;}         5 -> {6 ; T35 ; 23;}         21 -> 22;         20 -> 15;         28 -> 29;         6 -> 7;         15 -> T1;         22 -> T35;         22 -> 23;         29 -> T30;         7 -> T8;         23 -> T24;         23 -> T1; }      How can I render it and fullfill a page?


title: In beamer, figure and table side by side

text: I have 6 figures and 1 table. I plan to arrange them as follows, in the first line, there are 4 figures side by side. in the second line, there are [figure figure table].               \begin{document}               \begin{block}{Results}     \begin{minipage}{\textwidth}     \begin{figure} % "[t!]" placement specifier just for this example     \begin{subfigure}{0.24\textwidth}     \includegraphics[width=\linewidth]{c_cs.eps}      \end{subfigure}     \begin{subfigure}{0.24\textwidth}     \includegraphics[width=\linewidth]{soft.eps}     \end{subfigure}     \begin{subfigure}{0.24\textwidth}     \includegraphics[width=\linewidth]{c_kernel.eps}     \end{subfigure}     \begin{subfigure}{0.24\textwidth}     \includegraphics[width=\linewidth]{C_gl_abs_lambda=10-3.eps}     \end{subfigure}      \end{figure}     \end{minipage}          \begin{minipage}[b]{0.48\textwidth}     \begin{figure}          \begin{subfigure}{0.5\textwidth}     \includegraphics[width=\linewidth]{C_mtl_hinge_lambda=10-3.eps}     \end{subfigure}     \begin{subfigure}{0.5\textwidth}     \includegraphics[width=\linewidth]{C_mmmf_hinge_lambda=10-5.eps}     end{subfigure}          \end{figure}     \end{minipage}               \begin{minipage}     \begin{table}     %\vspace{0.3cm}     \noindent\begin{tabularx}{\textwidth}{cccc}         \toprule        per iteration (s)                      &\vtop{\hbox{\strut Dimensionality}\hbox{\strut Reduction}}   & Linear SVM  &Kernel SVM  \\\midrule     FISTA   &  $5$         &  $21$ & $ 0.1052$ \\\bottomrule     \end{tabularx}\vspace{-0.3cm}\caption{Running time}\label{tab rt}     \end{table}     \end{minipage}               \end{block}          \end{document}


title: drawing two curves in the same figure

text: Please i need someone who can help me to draw two curves into one figure. I need to draw the two curves Y1 and Y2 in the same figure. ![enter image description here](http://i.stack.imgur.com/e5fCJ.png) By the way, i tried to write the code below:               \documentclass{article}     \usepackage{tikz}     \begin{document}          \begin{tikzpicture}              \draw[->] (0,0) -- (6,0);         \draw[->] (0,0) -- (0,1.5);           \draw[thick, color=red] plot [smooth,tension=0] coordinates{(0.1, 0.003) (0.5, 0.005) (2, 0.4) (5, 1)};      \draw[thick, color=red] plot [smooth,tension=0] coordinates{(0.1, 0.2) (0.5, 0.5) (2, 0.1) (5, 1.4)};          \end{tikzpicture}     \end{document}      The problem is that i get a very small graph especially a very small y-axis!! so how can i resolve this problem ?


title: Entering Unicode characters in LaTeX

text: How do I enter Unicode characters in LaTeX? What packages do I need to install and what escape sequence do I type to specify Unicode characters in an ASCII source file?


title: Problem with justification and \titleformat (LuaLaTeX)

text: I am using this titleformat for my chapters but the text after \chapter{} ist centered too.               \titleformat{\chapter}[display]       {\normalfont\Large\sffamily}       {\centering\textbf{---~~\thechapter~~---}}{-10pt}       {\hrulefill\LARGE\sffamily\centering\vskip-0pt\textbf{#1}\vskip-10pt\hrulefill}     \titlespacing*{\chapter}       {0pt}{-40pt}{20pt}      How can i justify the text?


title: URLs in external references show up as question marks

text: So I have several external references like this one               @misc{epa_2013,       author = {EPA},       title = {National Pollutant Discharge Elimination System},       url = "{\url{http://cfpub.epa.gov/npdes/}}",       note = "Accessed: 2/6/2013",     }      And when I compile my document, I get question marks instead of a URL: ![Rendered Bibtex](http://i.stack.imgur.com/Jpx5Y.png) I have the following preamble:               \documentclass{tJDE2e}          \title{{\itshape International Journal of Digital Earth} \break Name of Paper}     \author{Our Authors}          \usepackage{graphicx} % support the \includegraphics command and options     \usepackage{color}     \usepackage{subfigure}      \usepackage{placeins}               \usepackage{url}               %needed for correctly facing smart quotes     \usepackage [english]{babel}     \usepackage [autostyle, english = american]{csquotes}     \MakeOuterQuote{"}          \date{}      \begin{document}          \maketitle     \begin{abstract}      And for the references section, I have this:               \bibliographystyle{tJDE}     \bibliography{reference}      I've tried removing the `\url`, I've tried changing the `url` package to `hyperref`...no matter what I do, I can't seem to get the URLs to render as actual URLs. EDIT: here is the tJDE2e template for the Digital Earth journal http://www.tandf.co.uk/journals/authors/tjdelatex.zip


title: how to handle corrupted graphics file

text: I am generating a latex file with many `\includegraphics` commands from a program. The image files change from run to run. The latex file might, for example, look like the one in this question. Occasionally an image file that I receive is corrupted. I can eliminate nearly all such situations by checking the size of the image file and emitting some vertical space instead of the `\includegraphics` command should the the image file be too small to reasonably be the sort of image I am expecting; however, a very small number of corrupted image files are larger. In that case pdflatex stops with an error message. All my image files are `.jpg` files. I believe that jpegtran on UNIX will fix most of these and I could pass every jpeg through that but I am concerned about the impact on runtime if I do that and also there could still be a very few that that does not address. Is there a way to handle this? Basically I need something like: "include a jpg file using `includegraphics` without generating an error and if that fails then emit some vertical space otherwise the `includegraphics` can stand".


title: Underfull/overfull preference

text: When long words at the end of a line cannot be hyphenated (for example when hyphenation is suppressed with `\mbox{}`), LaTeX could either have the tendency to make lines overfull or the tendency to make them underfull. Is there a way to define for a paragraph or a short block of text (in which I want to list some longer technical terms), that I prefer underfull lines?


title: PSTricks LaTeX to Readable LaTeX Code Conversion

text: I have opened the Editable PDF file in Inkscape, Version: 0.48 and saved as `LaTeX with PSTricks macros`. Now i have the LaTeX file with `PSTRICKS` code. I am not familer with `pstricks` package and how to do pstricks latex code to normal LaTeX code. MWE is:               \documentclass{article}     \usepackage{color}     \usepackage{pstricks,pst-node,pst-tree,auto-pst-pdf}     \usepackage{fontspec}     \setmainfont{STIXGeneral}     \begin{document}     \psset{xunit=.5pt,yunit=.5pt,runit=.5pt}     \begin{pspicture}(88.75,32.5)     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(24.625,17.065)     \lineto(26.703125,18.32525)     \lineto(29.96775,12.871125)     \lineto(33.625,29.125)     \lineto(85.5,29.125)     \lineto(85.5,28.382875)     \lineto(34.21875,28.382875)     \lineto(30.336,11.125)     \lineto(29.57525,11.125)     \lineto(25.9145,17.23925)     \lineto(24.8945,16.620625)     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(3.20947266,12.5)     \lineto(3.20947266,23.23730469)     \lineto(4.52783203,23.23730469)     \lineto(4.52783203,12.5)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(7.12109482,21.72119141)     \lineto(7.12109482,23.23730469)     \lineto(8.4394542,23.23730469)     \lineto(8.4394542,21.72119141)     \closepath     \moveto(7.12109482,12.5)     \lineto(7.12109482,20.27832031)     \lineto(8.4394542,20.27832031)     \lineto(8.4394542,12.5)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(11.36377072,12.5)     \lineto(11.36377072,20.27832031)     \lineto(12.54296994,20.27832031)     \lineto(12.54296994,19.18701172)     \curveto(12.78710815,19.56786403)(13.11181486,19.8742602)(13.51709104,20.10620117)     \curveto(13.92236093,20.33812693)(14.38378625,20.45409361)(14.90136838,20.45410156)     \curveto(15.47753515,20.45409361)(15.94994679,20.33446482)(16.31860471,20.09521484)     \curveto(16.68725074,19.85594968)(16.94726024,19.52147735)(17.098634,19.09179688)     \curveto(17.71386104,19.9999925)(18.51464149,20.45409361)(19.50097775,20.45410156)     \curveto(20.27245223,20.45409361)(20.86571336,20.24047078)(21.28076291,19.81323242)     \curveto(21.69579065,19.38597944)(21.90330998,18.72802112)(21.9033215,17.83935547)     \lineto(21.9033215,12.5)     \lineto(20.59228635,12.5)     \lineto(20.59228635,17.39990234)     \curveto(20.59227613,17.92724067)(20.54955156,18.30687896)(20.46411252,18.53881836)     \curveto(20.3786533,18.77074568)(20.22362416,18.95751307)(19.99902463,19.09912109)     \curveto(19.77440586,19.24071592)(19.51073424,19.31151663)(19.208009,19.31152344)     \curveto(18.66112572,19.31151663)(18.20702461,19.12963204)(17.84570432,18.76586914)     \curveto(17.48436908,18.40209371)(17.3037052,17.8198189)(17.30371213,17.01904297)     \lineto(17.30371213,12.5)     \lineto(15.98535275,12.5)     \lineto(15.98535275,17.55371094)     \curveto(15.98534714,18.1396428)(15.87792538,18.57909548)(15.66308713,18.87207031)     \curveto(15.44823831,19.1650324)(15.09667616,19.31151663)(14.60839963,19.31152344)     \curveto(14.23730202,19.31151663)(13.89428478,19.21386047)(13.5793469,19.01855469)     \curveto(13.2644026,18.82323586)(13.03613134,18.53759162)(12.89453244,18.16162109)     \curveto(12.7529285,17.78563925)(12.68212779,17.2436476)(12.6821301,16.53564453)     \lineto(12.6821301,12.5)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(2.81351471,3.875)     \lineto(4.45642853,6.21234131)     \lineto(2.93630981,8.37184143)     \lineto(3.88903046,8.37184143)     \lineto(4.57922363,7.31749725)     \curveto(4.70907397,7.11706982)(4.81352028,6.94910886)(4.89256287,6.81361389)     \curveto(5.01676714,6.99992058)(5.13109351,7.16505866)(5.2355423,7.30902863)     \lineto(5.9934845,8.37184143)     \lineto(6.903862,8.37184143)     \lineto(5.34986877,6.25468445)     \lineto(7.02242279,3.875)     \lineto(6.0866394,3.875)     \lineto(5.16355896,5.27232361)     \lineto(4.91796875,5.64917755)     \lineto(3.73659515,3.875)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(36.32958984,12.5)     \lineto(35.10644531,12.5)     \lineto(35.10644531,23.23730469)     \lineto(36.42480469,23.23730469)     \lineto(36.42480469,19.40673828)     \curveto(36.98144246,20.10497286)(37.69189096,20.45409361)(38.55615234,20.45410156)     \curveto(39.03466306,20.45409361)(39.48754347,20.35765816)(39.91479492,20.16479492)     \curveto(40.3420348,19.97191636)(40.69359695,19.70092053)(40.96948242,19.35180664)     \curveto(41.24535421,19.00267904)(41.46141844,18.58153689)(41.61767578,18.08837891)     \curveto(41.77391813,17.59520975)(41.85204305,17.06786653)(41.85205078,16.50634766)     \curveto(41.85204305,15.17333717)(41.52245354,14.14306476)(40.86328125,13.41552734)     \curveto(40.20409548,12.68798809)(39.41308065,12.32421893)(38.49023438,12.32421875)     \curveto(37.57226218,12.32421893)(36.85204805,12.70751932)(36.32958984,13.47412109)     \closepath     \moveto(36.31494141,16.44775391)     \curveto(36.31493922,15.5151337)(36.44189221,14.84130625)(36.69580078,14.42626953)     \curveto(37.11083686,13.74755735)(37.67235973,13.40820222)(38.38037109,13.40820312)     \curveto(38.95653814,13.40820222)(39.45458451,13.65844611)(39.87451172,14.15893555)     \curveto(40.29442742,14.65942167)(40.50438815,15.40527053)(40.50439453,16.39648438)     \curveto(40.50438815,17.41210446)(40.30297234,18.16161543)(39.90014648,18.64501953)     \curveto(39.49730908,19.12841134)(39.01024902,19.37011032)(38.43896484,19.37011719)     \curveto(37.86278923,19.37011032)(37.36474285,19.11986643)(36.94482422,18.61938477)     \curveto(36.52489994,18.11889087)(36.31493922,17.39501464)(36.31494141,16.44775391)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(76.5644536,13.45947266)     \curveto(76.07616678,13.04443305)(75.60619654,12.75146459)(75.15454149,12.58056641)     \curveto(74.70287713,12.40966806)(74.21825848,12.32421893)(73.70068407,12.32421875)     \curveto(72.84618954,12.32421893)(72.18945191,12.53295895)(71.73046923,12.95043945)     \curveto(71.27148408,13.36791905)(71.04199212,13.90136579)(71.04199266,14.55078125)     \curveto(71.04199212,14.93163819)(71.12866196,15.27953824)(71.30200243,15.59448242)     \curveto(71.4753413,15.90942042)(71.70239185,16.16210571)(71.98315477,16.35253906)     \curveto(72.26391473,16.54296471)(72.58007652,16.68700753)(72.9316411,16.78466797)     \curveto(73.19042747,16.85302299)(73.58105208,16.91894089)(74.1035161,16.98242188)     \curveto(75.16796456,17.10937039)(75.95165518,17.26073743)(76.45459032,17.43652344)     \curveto(76.45946717,17.61718238)(76.46190858,17.73192836)(76.46191454,17.78076172)     \curveto(76.46190858,18.31786528)(76.33739698,18.69628287)(76.08837938,18.91601562)     \curveto(75.75146007,19.21386047)(75.25097229,19.36278611)(74.58691454,19.36279297)     \curveto(73.96679389,19.36278611)(73.50903067,19.25414364)(73.21362352,19.03686523)     \curveto(72.91821095,18.81957376)(72.69970531,18.43505266)(72.55810595,17.88330078)     \lineto(71.26904345,18.05908203)     \curveto(71.38623006,18.61083373)(71.57910096,19.05638993)(71.84765673,19.39575195)     \curveto(72.1162098,19.73510019)(72.504393,19.99633039)(73.01220751,20.17944336)     \curveto(73.52001699,20.36254097)(74.10839531,20.45409361)(74.77734423,20.45410156)     \curveto(75.44140179,20.45409361)(75.98095203,20.37596869)(76.39599657,20.21972656)     \curveto(76.81102932,20.063469)(77.1162048,19.86693599)(77.31152391,19.63012695)     \curveto(77.50682941,19.39330365)(77.64354802,19.09423169)(77.72168016,18.73291016)     \curveto(77.76561821,18.50829477)(77.78759085,18.10302174)(77.78759813,17.51708984)     \lineto(77.78759813,15.75927734)     \curveto(77.78759085,14.53368937)(77.81566699,13.75854366)(77.87182665,13.43383789)     \curveto(77.92797156,13.10913025)(78.03905544,12.79785126)(78.2050786,12.5)     \lineto(76.82812548,12.5)     \curveto(76.69140054,12.77343723)(76.60351,13.09326113)(76.5644536,13.45947266)     \closepath     \moveto(76.45459032,16.40380859)     \curveto(75.97606922,16.20849239)(75.2582965,16.04247693)(74.30127001,15.90576172)     \curveto(73.75927456,15.82763339)(73.37597416,15.73974285)(73.15136766,15.64208984)     \curveto(72.92675586,15.54443055)(72.75341619,15.40160843)(72.63134813,15.21362305)     \curveto(72.50927581,15.02563224)(72.44824072,14.81689221)(72.44824266,14.58740234)     \curveto(72.44824072,14.23583811)(72.58129722,13.94286965)(72.84741259,13.70849609)     \curveto(73.11352325,13.47412012)(73.50292716,13.35693274)(74.01562548,13.35693359)     \curveto(74.52343395,13.35693274)(74.97509366,13.46801661)(75.37060595,13.69018555)     \curveto(75.76610849,13.9123521)(76.05663555,14.21630688)(76.24218798,14.60205078)     \curveto(76.38378366,14.89989994)(76.45458437,15.33935263)(76.45459032,15.92041016)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(84.06445122,15.34912109)     \lineto(85.36083794,15.18066406)     \curveto(85.21922915,14.28710759)(84.85668069,13.5876454)(84.27319145,13.08227539)     \curveto(83.68968967,12.57690422)(82.97313765,12.32421893)(82.12353325,12.32421875)     \curveto(81.05907706,12.32421893)(80.20336503,12.67211897)(79.55639458,13.36791992)     \curveto(78.90942101,14.06371914)(78.58593501,15.0610326)(78.58593559,16.35986328)     \curveto(78.58593501,17.19970233)(78.72509502,17.93456488)(79.00341606,18.56445312)     \curveto(79.28173509,19.19432924)(79.70531865,19.66674088)(80.27416801,19.98168945)     \curveto(80.84301283,20.29662306)(81.46190869,20.45409361)(82.13085747,20.45410156)     \curveto(82.97557905,20.45409361)(83.66649633,20.24047078)(84.20361137,19.81323242)     \curveto(84.74071401,19.38597944)(85.08495195,18.7792906)(85.23632622,17.99316406)     \lineto(83.95458794,17.79541016)     \curveto(83.83251179,18.31786528)(83.61644755,18.71093129)(83.30639458,18.97460938)     \curveto(82.99633099,19.23827451)(82.6215755,19.37011032)(82.182127,19.37011719)     \curveto(81.51806098,19.37011032)(80.97851074,19.13207345)(80.56347466,18.65600586)     \curveto(80.14843344,18.17992596)(79.94091412,17.42675289)(79.94091606,16.39648438)     \curveto(79.94091412,15.35155965)(80.14110923,14.59228306)(80.541502,14.11865234)     \curveto(80.94188968,13.64501839)(81.4643501,13.40820222)(82.10888481,13.40820312)     \curveto(82.62645831,13.40820222)(83.05858678,13.56689346)(83.40527153,13.88427734)     \curveto(83.75194547,14.20165845)(83.97167181,14.68993922)(84.06445122,15.34912109)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(13.70935822,7.58425903)     \curveto(14.08479376,7.17493872)(14.40942417,6.86371695)(14.68325043,6.6505928)     \curveto(14.95706156,6.43746311)(15.21535446,6.27867649)(15.45812988,6.17423248)     \lineto(15.45812988,5.98368835)     \curveto(15.17865711,5.84818833)(14.90766128,5.67528735)(14.6451416,5.46498489)     \curveto(14.38260688,5.25467925)(14.06926796,4.94628036)(13.7051239,4.53978729)     \lineto(13.37908173,4.53978729)     \curveto(13.64442555,5.10718413)(13.92247855,5.54331803)(14.21324158,5.84819031)     \lineto(7.4595108,5.84819031)     \lineto(7.4595108,6.27585602)     \lineto(14.21324158,6.27585602)     \curveto(13.99869613,6.54967231)(13.84908385,6.75291918)(13.7644043,6.88559723)     \curveto(13.67971146,7.01826926)(13.55409361,7.25115629)(13.38755035,7.58425903)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(18.79244292,7.31326294)     \curveto(19.08884168,7.68587876)(19.32031728,7.93146872)(19.48687041,8.05003357)     \curveto(19.71269665,8.21375604)(19.95122943,8.29561936)(20.20246947,8.29562378)     \curveto(20.49886682,8.29561936)(20.77621411,8.18835018)(21.03451216,7.97381592)     \curveto(21.2927999,7.75927346)(21.42194634,7.4134715)(21.42195189,6.936409)     \curveto(21.42194634,6.6033069)(21.3739575,6.34148542)(21.27798522,6.15094376)     \curveto(21.18200212,5.96039754)(21.03238985,5.80725667)(20.82914793,5.69152069)     \curveto(20.62589611,5.57578108)(20.4170035,5.51791218)(20.20246947,5.51791382)     \curveto(19.95122943,5.51791218)(19.71269665,5.59836406)(19.48687041,5.75926971)     \curveto(19.32031728,5.88065138)(19.08884168,6.12765278)(18.79244292,6.50027466)     \curveto(18.40852925,6.01756072)(18.00062408,5.77620507)(17.56872618,5.77620697)     \curveto(17.2836143,5.77620507)(17.03873005,5.88417997)(16.83407271,6.10013199)     \curveto(16.62941345,6.31607956)(16.52708429,6.58495823)(16.52708495,6.9067688)     \curveto(16.52708429,7.22575043)(16.62941345,7.49392338)(16.83407271,7.71128845)     \curveto(17.03873005,7.92864585)(17.2836143,8.03732647)(17.56872618,8.03733063)     \curveto(18.00062408,8.03732647)(18.40852925,7.79597081)(18.79244292,7.31326294)     \closepath     \moveto(19.08461058,6.91100311)     \curveto(19.33019734,6.5299122)(19.55461575,6.26879643)(19.7578665,6.12765503)     \curveto(19.88771478,6.03449796)(20.03309275,5.98792056)(20.19400084,5.98792267)     \curveto(20.40853488,5.98792056)(20.58849304,6.066961)(20.73387587,6.22504425)     \curveto(20.87924898,6.3831228)(20.95193796,6.60612978)(20.95194304,6.89406586)     \curveto(20.95193796,7.19328739)(20.87783754,7.42194012)(20.72964156,7.58002472)     \curveto(20.58143586,7.73810191)(20.39724339,7.81714236)(20.17706358,7.8171463)     \curveto(20.0387385,7.81714236)(19.90888633,7.77762213)(19.7875067,7.69858551)     \curveto(19.62377614,7.58848963)(19.38947767,7.32596243)(19.08461058,6.91100311)     \closepath     \moveto(18.50027525,6.9067688)     \curveto(18.27444278,7.18905308)(18.09377889,7.37042268)(17.95828307,7.45087814)     \curveto(17.82278307,7.53132645)(17.69293091,7.57155239)(17.56872618,7.57155609)     \curveto(17.40499785,7.57155239)(17.26879422,7.5136835)(17.16011488,7.39794922)     \curveto(17.05143298,7.2822079)(16.99709267,7.12271556)(16.9970938,6.91947174)     \curveto(16.99709267,6.7190447)(17.05355014,6.55884665)(17.16646636,6.43887711)     \curveto(17.27937999,6.31890243)(17.41628934,6.25891638)(17.57719481,6.25891876)     \curveto(17.8623033,6.25891638)(18.16999647,6.47486617)(18.50027525,6.9067688)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(59.42480469,17.18017578)     \lineto(52.33496094,17.18017578)     \lineto(52.33496094,18.41064453)     \lineto(59.42480469,18.41064453)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(46.6155777,19.98253632)     \lineto(46.6155777,19.25)     \lineto(42.51252747,19.25)     \curveto(42.50688146,19.43348675)(42.53652163,19.60991633)(42.60144806,19.77928925)     \curveto(42.70589401,20.05875316)(42.87314925,20.33398329)(43.10321426,20.60498047)     \curveto(43.33327757,20.87597494)(43.66567089,21.18931386)(44.1003952,21.54499817)     \curveto(44.77506004,22.09827901)(45.23095405,22.53653007)(45.46807861,22.85975266)     \curveto(45.70519674,23.18296802)(45.82375741,23.48854404)(45.82376099,23.77648163)     \curveto(45.82375741,24.07852453)(45.71578251,24.33328883)(45.49983597,24.5407753)     \curveto(45.28388292,24.74825119)(45.00230132,24.85199177)(44.65509033,24.85199738)     \curveto(44.28811442,24.85199177)(43.99453561,24.74189972)(43.77435303,24.52172089)     \curveto(43.5541674,24.30153151)(43.44266391,23.99666121)(43.43984222,23.60710907)     \lineto(42.65649414,23.68756104)     \curveto(42.71012832,24.27189134)(42.91196375,24.71719958)(43.26200104,25.02348709)     \curveto(43.6120363,25.32976305)(44.08204468,25.48290392)(44.67202759,25.48291016)     \curveto(45.2676514,25.48290392)(45.73907122,25.31776584)(46.08628845,24.98749542)     \curveto(46.43349801,24.65721353)(46.60710471,24.24789692)(46.60710907,23.75954437)     \curveto(46.60710471,23.51112703)(46.556293,23.2669485)(46.45467377,23.02700806)     \curveto(46.35304613,22.78706006)(46.18437946,22.53441291)(45.94867325,22.26906586)     \curveto(45.71295964,22.00371276)(45.32128599,21.63956212)(44.77365112,21.17661285)     \curveto(44.31634315,20.79270018)(44.02276434,20.53229013)(43.89291382,20.39538193)     \curveto(43.76306001,20.25847143)(43.65579083,20.12085637)(43.57110596,19.98253632)     \closepath     }     }     {     \newrgbcolor{curcolor}{0 0 0}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]     {     \newpath     \moveto(67.59863281,12.5)     \lineto(67.59863281,15.07080078)     \lineto(62.94042969,15.07080078)     \lineto(62.94042969,16.27929688)     \lineto(67.84033203,23.23730469)     \lineto(68.91699219,23.23730469)     \lineto(68.91699219,16.27929688)     \lineto(70.3671875,16.27929688)     \lineto(70.3671875,15.07080078)     \lineto(68.91699219,15.07080078)     \lineto(68.91699219,12.5)     \closepath     \moveto(67.59863281,16.27929688)     \lineto(67.59863281,21.12060547)     \lineto(64.23681641,16.27929688)     \closepath     }     }     \end{pspicture}     \end{document}


title: Renaming Algorithm to Heuristic in algorithm2e package

text: I am trying to write some heuristics for a problem using the `algorithm2e` package. However as you may know, when you write :               \begin{algorithm}     \caption{Heuristic 1: Name of Heuristic}      ...     \end{algorithm}      The output says * * * **Algorithm 1** : Heuristic 1: Name of Heuristic * * * Do someone know how do I get it to write: * * * **Heuristic 1** : Name of Heuristic * * * instead ? PS. I don't know if this command does the trick: `\SetAlgoRefName{}` I could not get it to work, anyone has an example where they used it? Related topics are:   * http://www.mail-archive.com/lyx-users@lists.lyx.org/msg67681.html In different packages:   * Rename "Algorithm" to "Listing"   * Customizing the algorithm/algpseudocode package


title: Prevent equation labeling to change sizes

text: Everytime i change equation font size using `\footnotesize` the label _(for example (3.12))_ on the right side also changes its size. Is tere a way to change equation font size but not its label font size? Or maybe even vice versa - to change label font size but not equation font size. This is how i usually write down equations:               \begin{minipage}[t]{\textwidth}     \footnotesize     \begin{equation}\label{eee013}     \begin{split}     f(x) = A e^{-\frac{(x-\textcolor{1}{\mu})^2}{2 \textcolor{1}{\sigma^2}}}     \end{split}     \end{equation}     \end{minipage}


title: What is wrong with defining \bal as \begin{align}?

text: I'm trying to define two commands `\bal` and `\eal` instead of inserting `\begin{align}` and `\end{align}` in my document, but in the code below, I'll get some errors. What is wrong with it?               \documentclass{article}     \usepackage{amsmath}     \makeatletter      \newcommand{\bal}{%      \begingroup      \align%     \@ifstar{\nonumber}{}%      }      \newcommand{\eal}{\endalign\endgroup}     \makeatother     \begin{document}     \bal*     x=y     \eal     \end{document}


title: How to hyperref a pageref in second half of an algorithm, independent of first half

text: I'm struggling with something that seems pretty complicated to me, but maybe there's a way better solution already out there. If not, I'd really appreciate any help with getting the following problem solved. I have a long algorithm in my document that I've broken in two. It's written using `algorithmicx`. My requirements are as follows:   1. The algorithm number (e.g. Algorithm 1.3) should be the same for both since it's the same algorithm.   2. At the end of the first half, I want a line that says the algorithm is continued later.   3. If the second half ends up just on the next page, I just want to say "Continued on next page". If it's on a later page than the next page, I want the note to say "Continued on page x".    4. I want the "Continued on page x" to hyper-reference the page of the second half of the algorithm. I realize in point #3 that it would be unusual for the second half not to end up on the next page, but I'm curious about this as an exercise. Also, you might want to describe half of a lengthy algorithm in the text, show pseudocode for the first half, then talk about the second half in the text again before continuing the pseudocode, in which case they'd like end up spaced apart by multiple pages. My solution for these points so far:   1. This is solved using `\ContinuedFloat` of the `subcaption` package; without this command, the second half of the algorithm would get an incremented number in the title.   2. This is solved with zref and a conditional check on the absolute page number, based on a question I asked here.    3. See 2.    4. This is the problematic point. Right now, I have a separate `\label` in each algorithm environment, but when hyperlinked, the link in the second half returns me to the first (correct), but the link in the first half just takes me to the first half (incorrect), when it should take me to the second half.  I think the problem with 4 is a conflict between the subcaption and hyperref packages, in that links to figures generally take you to the top of the figure, so a link to the second half of the algorithm takes me to the top of the first one since I've used a `\ContinuedFloat` so it considers them both one big float. Also, when I build, I get a warning "destination with the same identifier (name{algorithm0.1}) has already been used". However, the page numbers shown in the PDF are correct, they just don't link correctly. I've provided a MWE below. Notice that when you click the "Continued on" link at the bottom of the first half of the algorithm, it doesn't take you to the second half. Is there a solution for this? Also, if there's an overall solution for splitting up algorithms that would do everything I'm trying to do here, that would be great. Many thanks to everyone who even reads this admittedly long-winded question. MWE:               \documentclass[12pt, oneside]{report}           \usepackage[english]{babel}         \usepackage{blindtext}          \usepackage[font=small,tableposition=top]{caption}     \usepackage[skip=6pt,hypcap=true]{subcaption}          \usepackage[chapter]{algorithm}     \usepackage{algorithmicx,algpseudocode}          \usepackage[user,abspage]{zref}     % macro to compare two absolute page numbers to see if the first is greater than the second by more than one     \makeatletter     \newcommand\cmpabspage[2]{%        \ifnum\zref@extract{#1}{abspage}>\numexpr\zref@extract{#2}{abspage}+1\relax            \expandafter\@firstoftwo        \else            \expandafter\@secondoftwo        \fi     }     \makeatother          \usepackage[pdftex]{hyperref}     \hypersetup{colorlinks=true}     \newcommand{\pagename}{page }          \begin{document}          \blindtext          Pseudocode is shown in Algorithm \ref{longalg}.          \begin{algorithm}[!htbp]       \caption{Long algorithm part 1}         \label{longalg}         \label{longalg-1}         \zlabel{z.longalg-1}          \begin{algorithmic}[1]                    \State The first part of a lengthy algorithm would go here.                   \cmpabspage{z.longalg-2}{z.longalg-1}             {\Statex Continued on \pagename \pageref{longalg-2}}             {\Statex Continued on next page}              \algstore{algstore.longalg}         \end{algorithmic}     \end{algorithm}          \Blindtext[4][4]          \begin{algorithm}[!htbp]          \ContinuedFloat     \caption{Long algorithm part 2}     \label{longalg-2}     \zlabel{z.longalg-2}          \begin{algorithmic}[1]             \algrestore{algstore.longalg}                  \cmpabspage{z.longalg-2}{z.longalg-1}             {\Statex Continued from \pagename \pageref{longalg-1}}             {\Statex Continued from previous page}                  \State The second part of a lengthy algorithm would go here.                  \end{algorithmic}     \end{algorithm}          \end{document}      Thanks.


title: Suppress page numbers when using \addcontentsline

text: I have a table of contents in my memoir book. I want there to be one line for each chapter, in addition to headings for each set of similar chapters. However, I do not want any page numbers to be displayed across from the "headings" (for which I am using the command `\addcontentsline`). In the following MWE, for example, I do not want a page number for "Topic 1" or "Topic 2".               \documentclass{memoir}     \begin{document}          \frontmatter     \tableofcontents*          \mainmatter          \phantomsection     \addcontentsline{toc}{part}{Topic 1}          \chapter{Chapter 1}          This is the first chapter.          \phantomsection     \addcontentsline{toc}{part}{Topic 2}          \chapter{Chapter 2}     This is the second chapter.          \chapter{Chapter 3}     This is the third chapter.          \end{document}


title: What is pkgindoc.sty really for?

text: During a discussion of this question, I looked a bit into the `pkgindoc.sty` buried in `ltclass.dtx` (docstrip option `afterpreamble`). While I understand how this works (and it works in an ugly way IMHO), I am quite curious if anybody knows what the original purpose of it was (and whether it's documented anywhere)? (It seems that `pkgindoc.sty` is not generated during normal LaTeX installation, and I've never heard about it from anywhere, including the previous two answers to the above-mentioned question.) Here is the relevant section from `ltclass.dtx` for reference: > ### 71 After Preamble > > Finally we declare a package that allows all the commands declared above to > be `\@onlypreamble` to be used after `\begin{document}`. >   >   >     ⟨*afterpreamble⟩ >     \NeedsTeXFormat{LaTeX2e} >     \ProvidesPackage{pkgindoc} >              [1994/10/20 v1.1 Package Interface in Document (DPC)] >     \def\reserved@a#1\do\@classoptionslist#2\do\filec@ntents#3\relax{%   >       \gdef\@preamblecmds{#1#3}} >     \expandafter\reserved@a\@preamblecmds\relax >     ⟨/afterpreamble⟩ >


title: Xstring dealing with macros

text: I wrote the `\bib` command to reference authors in my thesis not using numeric or alpha references of `natbib`. It copies a piece of text, cut the first 60 characters (the width of my page} and put it together with the bibentry in the end of my work. Everything goes ok if there is no macros. I've used `xstring` and tried to expand, not expand...but I could not make it work. I appreciate any help.               \newcommand{\bib}[2]{#1 \pagenote{\cuttext{#1}}\bibentry{#2}}}          \newcommand{\cuttext}[1]{%     \expandarg\StrLeft{#1}{60}[\myleft]%     \expandarg\exploregroups\StrCount{\myleft}{ }[\mycount]%     \StrPosition[\mycount]{\myleft}{ }[\mypos]%     \StrLeft{\myleft}{\mypos}%     }%      Usage in the middle of my thesis text:               \bib{According to \citeauthor{last:2010} the best \textit{rock band singer} was bla bla bla}{last:2010}


title: How to have multiple rows on the left side of an equation

text: I have an equation whose left side has a long text. I would like to make it on multiple rows followed by the equal sign and then the right side.               \documentclass[12pt]{article}     \usepackage{amsmath}     \begin{document}          \begin{equation}     \text{The left hand side of this equation is very long} = a < x < b     \end{equation}          \end{document}      This is what I want. The left side has two rows so that it's not too wide. ![enter image description here](http://i.stack.imgur.com/fpt3O.png)


title: Displaying an outline in the header of a Beamer presentation

text: I have a number of related frames in a Beamer presentation and I would like to emphasize this relationship by walking through a sort of outline of that part of the presentation. This is what I have so far:                \documentclass{beamer}          \usepackage[utf8]{inputenc}     \usepackage{xcolor}          \begin{document}          \begin{frame}     \frametitle{A frame title}          \begin{tiny}     \begin{tabular}{ l c c r }       \textcolor{gray}{Item one...} & \bf{Item two...} & \textcolor{gray}{Item three...} & \textcolor{gray}{Item four...} \\       \textcolor{gray}{Item five...} & \textcolor{gray}{Item six...} & \textcolor{gray}{Item seven...} & \textcolor{gray}{Item eight..}     \end{tabular}     \end{tiny}          Some content.... perhaps an image, one or two equations, a table...          \end{frame}          \end{document}      ![What I have so far](http://i.stack.imgur.com/sydhQ.png) My plan is to make a copy of the table for each frame and then change which item is bold. The actual table content is wider so it takes up the entire width of the frame. I would like the table to be aligned to the left beneath the frame title. I would like to make it so that the actual content of the frame is not affected. Ideas for how to do this would be much appreciated. If you can solve it without a table that's fine as well of course.


title: Creating a PGF Calendar Fortnight List Arrangement

text: Currently I have some basic code using the tikz calendar library:               \usepackage{tikz}     \usetikzlibrary{calendar}     \tikz     \calendar [dates=2014-01-01 to 2014-1-last,                week list, month label above left]      if (Sunday) [red];      which produces this: ![Week list](http://i.stack.imgur.com/4cZ6R.png) Is there anyway I can create a "fortnight list" arrangement, so that I get something resembling the following, i.e. putting two weeks on the same row? ![Fortnight list](http://i.stack.imgur.com/RJqHO.png)


title: Setting vertical spacing between different document elements at the same time

text: I have the following problem. Let's define three types of document elements: _Titles_ , _Paragraphs_ and _Longtables_. The problem is to setup vertical spaces between them independently. For example, let's denote:   * Vertical space #1 between Titles and Paragraphs.   * Vertical space #2 between Titles and Longtables.   * Vertical space #3 between Paragraphs and Titles.   * Vertical space #4 between Paragraphs and Longtables.   * Vertical space #5 between Longtables and Titles.   * Vertical space #6 between Longtables and Paragraphs. The general problem is to set: vspace #1 to V1 cm, vspace #2 to V2 cm, ... , vspace #6 to V6 cm. This should be done in preambula to minimize author's efforts in the document part. Since this problem was too hard for me, I've tried to solve its particular case where V1 = V2 = ... = V6 = 1cm, i.e. all the vertical spaces #1-#6 are the same. I've managed to find the following _variables_ that affect these vspaces:               \captionsetup[longtable]{       belowskip=1cm          % VARIABLE #1     }     \setlength{\LTpre}{1cm}  % VARIABLE #2     \setlength{\LTpost}{1cm} % VARIABLE #3     \titlespacing*{\section}{0pt}{1cm}{1cm} % VARIABLES #4, #5      As I've found out, these variables affect:   * belowskip - vspaces 2, 4.    * LTpre - vspaces 2, 4.   * Ltpost - vspaces 5, 6.   * titlespacing-3 - vspaces 3, 5.   * titlespacing-4 - vspaces 1, 2. You can easily make sure that it is impossible to chose a subset of these variables so that each vspace is covered one and only one time. Do you have any ideas how to solve this problem (in general or at least in the particular case)? Here is the code.               \documentclass{book}     \usepackage{titlesec}     \usepackage{longtable}     \usepackage{caption}     \usepackage{lipsum}          \captionsetup[longtable]{       belowskip=1cm          % VARIABLE #1     }     \setlength{\LTpre}{1cm}  % VARIABLE #2     \setlength{\LTpost}{1cm} % VARIABLE #3     \titlespacing*{\section}{0pt}{1cm}{1cm} % VARIABLES #4, #5               \begin{document}          \section {Title title title title title title}          % Vertical space #1: Title - Paragraph          \lipsum[2] % Paragraph          % Vertical space #3: Paragraph - Title          \section {Title title title title title title}          % Vertical space #2: Title - Longtable          \begin{longtable}{|c|}       \caption{Table Table Table Table Table Table}\\         \hline Something \\ \hline     \end{longtable}             % Vertical space #6: Longtable - Paragraph          \lipsum[2] % Paragraph          % Vertical space #4: Paragraph - Longtable            \begin{longtable}{|c|}       \caption{Table Table Table Table Table Table}\\         \hline Something \\ \hline     \end{longtable}             % Vertical space #5: Longtable - Title           \section {Title title title title title title}          \end{document}


title: TikZ: How to draw a sine curve in 3D?

text: I know how to draw a sine curve in TikZ and I know how to rotate it in the plane of the paper. I would now like to draw a sine curve that oscillates in the depth of the paper - to give the impression that the wave it illustrates oscillates in and out of the direction perpendicular to the paper. It could be somehow similar to the blue curve in this picture: ![enter image description here](http://i.stack.imgur.com/X1AsP.png) Any suggestions on how this can be done in TikZ?


title: Luapath broke after upgrading miktex

text: I had my miktex 2.9 working fine with lualatex. I went in and somewhere modified some file so that I could add my own module paths. After upgrading some packages using the miktex upgrade tool my latex code can no longer find my lua modules. When I upgraded miktex said it needed to repair some miktex config file but I didn't realize at the time it was due to my modification. lualatex does not use LUA_PATH for some reason. My lua library code works standalone just fine(printing package.path shows what is in LUA_PATH but not using lualatex). I've tried modifying package.path using \directlua and it prints out correctly BUT my modules are still not found. I've searched the complete miktex installation for lua path stuff and can't find anything. Not sure if the "repair" deleted the file I modified or what happened but nothing seems to work. In any case, why doesn't lualatex use LUA_PATH? Is there any way to fix this? The main thing to realize here is that everything worked before "upgrading"(I do not think I upgraded anything regarding lualatex though), everything works as expected using Lua For Windows, and it seems to be a path issue. It seems like it is almost surely an issue with LuaLatex and IIRC the reason I had to modify the path inside the the miktex installation dir was because I couldn't get LUA_PATH or package.path to work with lualatex in the first place > The hard coded solution(which will probably break after each upgrade) is to > modify lualatex.ini and add additional paths BUT make sure to use forward > slashes and to use two slashes at the end of the path. There is no need to > add filenames to the end such as ?.lua like LUA_PATH. There still is the > question of why lualatex does not use LUA_PATH. Also, I am using winedt 6 which may use it's own environment where LUA_PATH does not exst...