title: Why doesn't LaTeX hyphenate words containing accents, e.g. "développement"?

text: In this MWE, Latex doesn't hyphen the word "développement" and prefer to create a HUGE hbox.               \documentclass[a4paper,12pt,dvipsnames]{report}     \usepackage[utf8]{inputenc}     \usepackage[french]{babel}     \usepackage{lmodern}     \usepackage[a4paper, showframe]{geometry}          % Title Page     \title{}     \author{}               \begin{document}     \section{Section}      \subsection{Subsection}     \begin{description}      \item [Marhalie Toucse : ]  ingénieure de la plate-forme SORTATZ. Elle réalise       le développement du projet des tex écrit pour lipsum lagae legarc sgsi text text text text text text text text text.      \end{description}     \end{document}       ![enter image description here](http://i.stack.imgur.com/0Edft.png)


Hyphenation of words with accents doesn't work. I'm writing my document in Portuguese so I have accents like '`~^ for some words but these words are not hyphenated. How do I solve this? THIS WAS SOLVED BY: (1) updating my texlive installation. (2) adding the lines               \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}      to my document. Actually the last line is not necessary but the text font would be too ugly without it.


title: Difference between fancytooltips and fancy-preview

text: I read the documentation for both fancytooltips and fancy-preview here, and I don't really understand what their differences are, or when I should prefer one over the other. I see that fancytooltips is a TeX package (a .sty file), while fancy-preview is a Perl script. But they seem to have the same capability (which is the capability in the pictures on this page.)


title: How to remove all dashes (-) using a macro?

text: In a package, I'm building macro names from the values of options passed to a function. Now, the values should also allow a `-` inside, but the command names I'm building with `\csname` do not. So, I need to remove all `-` from the option value inside the `\csname...\endcsname`. How can I do this. Simple example:               \documentclass{report}          \makeatletter     % Create tex name of the form "test@ARGUMENT".      % PROBLEM: Need to remove - from #1...     \newcommand{\process}[1]{\typeout{Process called with `#1'} \csname test@#1\endcsname}     \newcommand{\test@mytag}{\typeout{test@mytag called} It worked}     \makeatother          \begin{document}     % The following should actually try to execute \test@mytag (i.e. the - removed)     \process{my-tag} % Doesn't work, needed for values like shade-tb-inverse     \process{mytag} % Works, but ugly with values like shadetbinverse     \end{document}      I want a command that takes an argument (in my case, an option value filtered by xkeyval's choicekey to one of certain valid values). Now, I want to call a command `\test@VALUE`. Unfortunately, the option values should allow dashes, like my-tag or shade-lr. As LaTeX does not allow dashes in commands, I need to filter all `-` inside the `\csname`. How can I do that?


title: Printing A6 on A4 paper

text: Yesterday I encountered a problem with printing an A6 pdf document (which I created using LaTeX). The Printing shop did not have A6 sheets, so they took the print out on an A4, which turned out different than what I expected it to – it was magnified in the print. I have few questions to ask, please help me out:   1. Is it possible to put A6 page with border, so I could get printout of any sized paper, and then cut it using the border?   2. Can I put multiple (x,y) on (a,b) paper? Here paper size is mention with this convention (width, height) and (a,b) bigger than (x,y). As show in the image below. Ex: 6 orange-size sheets on one green-size sheet, with border for cutting the paper into A6 after the printing?   3. Is it possible to arrange smaller sheets in any order on a bigger sheet? Like consecutive sheets row wise or column wise? Below I have mentioned the page numbers and arrangement.               (1, 2, 3)      (1, 4, 7)     (4, 5, 6)  or  (2, 5, 8)     (7, 8, 9)      (3, 6, 9)      ![](http://i.stack.imgur.com/x7HdE.png)


title: Center table by end of cell

text: I want to be able to center my table, but align the center by the end of the first cell. Currently just using the `\begin{center}` command i am able to center the table but i would rather the table be centered based off the end of the first cell and not by the average center of the table.               \documentclass{article}       \begin{document}            \begin{center}     \begin{tabular}{r | l}     I am some really long text & 10pt \\      I am also really long & 12pt \\      \end{tabular}     \end{center}     \end{document}        Gets a table that is centered, but i would rather it went "I am some really long text {center here} 10pt. Edit: The idea i'm kind of looking for can be seen in the way that you can align equations at any point.


title: latexmk vs texi2dvi?

text: I am wondering what the differences between `latexmk` and `texi2dvi` are. To my surprise I haven't found this here nor via google (apart from a post back in 2004 which I am not sure how accurate it is). I use both of these tools every once in a while but don't see any advantages of one over the other for my purposes. Are both maintained actively, can both do the same tasks, what about performance...? Would be nice to have at least some of the major aspects summarized for future reference.


title: How to change the title alignment just for the appendix sections?

text: I am formatting my dissertation document using the `usfdis` class. However, due to new specifications, the appendices titles should now be single spaced and aligned to the left margin. The code referred to the appendix section in the `usfdis.cls` is the following:               \renewcommand{\appendix}{% Appendices have a cover page and different                          % layout     \clearpage     \vspace*{0.6in}     \addcontentsline{toc}{chapter}{\protect\numberline{Appendices}}      \begin{center}{\chpsformat Appendices\par}      \end{center}     \newpage     \addtolength{\textheight}{-2\baselineskip+3pt} %<--- Weird 3.5pt     \setlength{\headsep}{2\baselineskip-3pt}%            it's magic!     \ch@ngetext     \gdef\@chapapp{\appendixname }%     \gdef\thechapter{\@Alph\c@chapter}     \renewcommand{\chapter}     {\clearpage\thispagestyle{plain}\@afterindentfalse\secdef\@appendix\@schapter}     \setcounter{chapter}{0}%     \setcounter{section}{0}%     \makeatletter     \let\@oddhead\@empty     \def\@oddhead{\vbox{\chapalign\chpformat (continued) } }     \makeatother          }      One option is to put the appendices as sections instead of chapters and then they are going to be aligned to the left but I need also to have the section titles as for example: > >     Appendix A: Name of Appendix A >     Appendix B: Name of Appendix B >     etc. >   The picture below is an example to show what the new requirements are: ![New format requirements](http://i.stack.imgur.com/rpirH.png) The code below is an example of the actual format of the document:               \documentclass[11pt,doublespacing,alignheadcenter]{usfdis}     \usepackage{geometry}     \usepackage{graphicx}     \usepackage[T1]{fontenc}     \usepackage{mathptmx}     \usepackage{helvet}     \usepackage[plain]{fancyref}     \usepackage{amsmath}     \usepackage{booktabs}     \usepackage{pdfpages}          \title{Disertation title}     \author{The author}     \degree{Doctor of Philosophy}     \department{Department}     \college{Engineering}     \advisor{Main advisor}     \member{Member 1, Ph.D. \and Member2, Ph.D. \and Member3, Ph.D.}     \approvaldate{ 2013}     \copyrightdate{2013}     \keywords{keyword 1\and keyword 2}          \begin{document}     \setlength{\parindent}{30pt}     \maketitle            \chapter{Introduction}         \section{Section 1.1 in Chapter 1}           \chapter{Conclusions}       \clearpage          \appendix      \chapter{Copyright Approvals for Appendices A, B and C, respectively }      \noappendix           \begin{bio} bio information      \end{bio}          \end{document}


title: problems with biblatex and biber

text: I have tried to make biber to work on my machine, unsuccessfully. I have searched all over and have read all the biblatex-biber related posts, but nothing seems to do the trick. Here is a Minimal (Not working) Example:               \documentclass[12pt]{article}     \usepackage[style=numeric,backend=biber]{biblatex}     \addbibresource{../../bibliographies/example}               \begin{document}     let's cite \cite{ho1995}          \printbibliography     \end{document}      When I try to compile it as it is here, using TexShop, by doing the Latex -> Bibtex -> Latex usual path (I previoulsy modified the Preferences -> Bibtex engine from bibtex to biber) I get the following message:               dhcp109128:myfolder Laura$ biber exampleBiber     INFO - This is Biber 1.6     INFO - Logfile is 'exampleBiber.blg'     INFO - Reading 'exampleBiber.bcf'     INFO - Found 1 citekeys in bib section 0     INFO - Processing section 0     INFO - Looking for bibtex format file '../../bibliographies/example' for section 0     ERROR - Cannot find '../../bibliographies/example'!     INFO - ERRORS: 1      HOWEVER, if I change the backend from biber to bibtex and change the preferences again, I obtain a perfectly good file. I get the same issue if I try to run it in a terminal window, and again, if I run bibtex instead of biber (changing the backend each time), it works perfectly fine Things that I have tried: -I tried modifying the file above by adding the line % !BIB TS-program = biber at the very top, nothing happened... -I tried updating my packages (as was suggested to me before): I am running TexLive 2013, biber 1.6, texshop 3.26 I am using bibdesk 1.6.1.  I think there might be a problem in the way bibdesk is savign the bibliography. For reference, I put the bib file at the end. Any ideas? thanks in advance               %% This BibTeX bibliography file was created using BibDesk.     %% http://bibdesk.sourceforge.net/          %% Saved with string encoding Unicode (UTF-8)                     @article{ho1995,     Abstract = {Treatment of infected patients with ABT-538, an inhibitor of the protease of human immunodeficiency virus type 1 (HIV-1), causes plasma HIV-1 levels to decrease exponentially (mean half-life, 2.1 +/- 0.4 days) and CD4 lymphocyte counts to rise substantially. Minimum estimates of HIV-1 production and clearance and of CD4 lymphocyte turnover indicate that replication of HIV-1 in vivo is continuous and highly productive, driving the rapid turnover of CD4 lymphocytes.},     Address = {Aaron Diamond AIDS Research Center, NYU School of Medicine, New York 10016.},     Author = {Ho, D D and Neumann, A U and Perelson, A S and Chen, W and Leonard, J M and Markowitz, M},     Cin = {Nature. 1995 May 18;375(6528):193. PMID: 7746311; Nature. 1995 May 18;375(6528):193-4; author reply 198. PMID: 7746312; Nature. 1995 May 18;375(6528):194; author reply 198. PMID: 7746313; Nature. 1995 May 18;375(6528):194-5; author reply 198. PMID: 7746314; Nature. 1995 May 18;375(6528):195; author reply 198. PMID: 7746315; Nature. 1995 May 18;375(6528):195-6; author reply 198. PMID: 7746316; Nature. 1995 May 18;375(6528):196; author reply 198. PMID: 7746317; Nature. 1995 May 18;375(6528):197; author reply 198. PMID: 7746319; Nature. 1995 May 18;375(6528):197-8; author reply 198. PMID: 7746320; Nature. 1995 May 18;375(6528):198; author reply 198. PMID: 7746321; Nature. 1995 Jan 12;373(6510):102. PMID: 7816085; Nature. 1995 May 18;375(6528):197; author reply 198. PMID: 7605485},     Crdt = {1995/01/12 00:00},     Da = {19950203},     Date = {1995 Jan 12},     Date-Added = {2013-09-05 18:53:13 +0000},     Date-Modified = {2013-09-05 18:53:13 +0000},     Dcom = {19950203},     Doi = {10.1038/373123a0},     Edat = {1995/01/12},     Issn = {0028-0836 (Print); 0028-0836 (Linking)},     Jid = {0410462},     Journal = {Nature},     Jt = {Nature},     Language = {eng},     Lr = {20061115},     Mh = {Antiviral Agents/therapeutic use; CD4 Lymphocyte Count/drug effects; CD4-Positive T-Lymphocytes/cytology/*virology; HIV Infections/drug therapy/immunology/*virology; HIV Protease Inhibitors/therapeutic use; HIV-1/*physiology; Humans; Kinetics; Ritonavir; Viremia/drug therapy/*virology; Virion/physiology; *Virus Replication},     Mhda = {1995/01/12 00:01},     Month = {Jan},     Number = {6510},     Own = {NLM},     Pages = {123--126},     Pl = {ENGLAND},     Pmid = {7816094},     Pst = {ppublish},     Pt = {Journal Article; Research Support, Non-U.S. Gov't; Research Support, U.S. Gov't, P.H.S.},     Rn = {0 (Antiviral Agents); 0 (HIV Protease Inhibitors); 0 (Ritonavir)},     Sb = {IM; X},     Status = {MEDLINE},     Title = {{Rapid turnover of plasma virions and CD4 lymphocytes in HIV-1 infection.}},     Volume = {373},     Year = {1995},     Bdsk-Url-1 = {http://dx.doi.org/10.1038/373123a0}}


title: Background Picture

text: I am creating a presentation using the Beamer document class. I was wondering if it would be possible to have the same picture appear as a background of each slide. This is the image I am referring to. ![enter image description here](http://i.stack.imgur.com/kodvZ.png) I want to be able to put the outline on the side strip if possible. Is there any particular theme that allows me to do so? Any usepackages I will need? Thanks in advanced for all the help.


title: Upright Greek font fitting to Computer Modern

text: I'm looking for an upright Greek font for single Greek characters (like "β-decay" or "µ-metal") which fits to the default CM/latin style, i.e. the upright version of the default italic math mode Greek letters (`\beta`, `\mu`). The "default" upright Greek font (should be `cbgreek`), which is used when writing with `babel` or with the `textgreek` package (`\textbeta`, `\textmu`), doesn't quite fit to the CM/latin font, especially the µ symbol. There are packages replacing the entire font families, e.g. `mathdesign` or `kpfonts`, providing a complete set of Greek, but none of them was made for CM/latin. `upgreek` uses another font for math mode Greek (`euler` I guess, also accessible through `textgreek` with the respective option) which also doesn't quite fit with CM/latin. I would already give up if it wasn't for the µ used by the `siunitx` package. Its default "micro" prefix (`\si{\micro}`) fits perfectly with CM/latin (see comparison below) and I wanted to know whether that µ is just a unique character of the CM font or whether there's a chance to also get an upright β and other letters in exactly that font. Also, how does the `siunitx` package get that µ? The characters µ (micro symbol) and μ (greek letter mu) print by default with the same character in `cbgreek` with UTF-8 encoding (see below)... Here's a MWE (pdflatex):               \documentclass{minimal}     \usepackage[utf8]{inputenc}     \usepackage{siunitx}     \usepackage{textgreek}     \usepackage{upgreek}          \begin{document}          m\si{\micro}\textmu $\mu$          \textbeta $\beta$          $\upmu \upbeta$          µμβ % U+00B5 (micro symbol) U+03BC (greek lower case mu) U+03B2 (greek lower case beta)          \end{document}      Result: ![Greek letters](http://i.stack.imgur.com/37mbT.png)


title: Is there another way to avoid name clash in nested multido?

text: ## Constraints   * I want to use the same name for inner and outer loop.   * I am reluctant to append `@` and make use of `\makeatletter...\makeatother`. Is there any name-spacing construct to use? ## MWE The following code will not produce the correct result as the two `\i` clash.               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{multido}     \SpecialCoor     \def\Triangle(#1)#2{{\rput(#1){\multido{\i=0+1}{#2}{\multips(\i,0)(!.5 3 sqrt 2 div){\numexpr#2-\i\relax}{\pspolygon(1,0)(!.5 3 sqrt 2 div)}}}}}               \usepackage[nomessages]{fp}     \FPset\N{4}     \FPeval\Width{(N-1)*(N+2)/2+N}     \FPeval\Height{round(root(2,3)*N/2:6)}          \begin{document}     \begin{pspicture}(\Width,\Height)         \multido{\i=1+1}{\N}{\Triangle(!\i\space 1 sub \i\space 2 add mul 2 div 0){\i}}     \end{pspicture}     \end{document}      The correct output is as follows. ![enter image description here](http://i.stack.imgur.com/3DGpY.png)


title: Generation of a simple title

text: How can i get the following result using a fixed-width right rule and a line- filling left rule ? ![Not numbered chapter title](http://i.stack.imgur.com/SrN2c.png)


title: Counting of selected words

text: I am typesetting a book, which has got more number of plants. While entering the text, I have to record the total number of plants recorded in my book. In fact, I have created an index of all these plants, but the question is should I count manually, or LaTeX can count itself. Here is my simple document.               \documentclass[a4paper,10pt]{article}          %For multiple index     \usepackage{imakeidx}     \makeindex      \makeindex[name=ch, title=Chemical index]     \makeindex[name=pl,title=Plant Index]          \begin{document}          This is my test docment. It contains total 5 plants. Plant 1\index[pl]{plant 1}  has                     chemicals 1\index[ch]{chemical 1} and 2\index[ch]{chemical 2}. Another plant\index[pl]     {plant 2} continas the chemicals 2\index[ch]{chemical 2} and 3\index[ch]{chemical 3}.          List of plants:     Plant 3\index[pl]{plant 3}     plant 4\index[pl]{plant 4}     plant 5\index[pl]{plant 5}          \printindex     \indexprologue{\small Index of plants}     \printindex[pl]          \indexprologue{\small Index of chemicals}     \printindex[ch]          \end{document}


title: How can I center a list within a list?

text: I am trying to center a list of options within an enumerated list environment. Like so,               \usepackage{enumerate}          \begin{document}       \begin{enumerate}         \item Which of the following statements is true?         \begin{center}             \begin{enumerate} [I.]                 \item Statement the first.                 \item Statement the second.                 \item Statement the third.             \end{enumerate}         \end{center}       \end{enumerate}     \end{document}      The `center` environment does nothing, however. I have also tried embedding the `center` environment above in a `minipage`, but this also did nothing. My goal is to make this like something you might see on the SATs, where the statements are centered but everything else is left-aligned. Any ideas?


title: How to use figure inside a exercise environment?

text: Trying to use figure inside an `Exercise` environment (`exercise.sty`) gives me "LaTeX Error: Not in outer par mode." Example:               \documentclass{article}          \usepackage[]{exercise}     \begin{document}          \begin{Exercise}[title={foo}, label=ex1]     A tough question.     \end{Exercise}          \begin{Answer}[ref={ex1}]     A smart answer.          \begin{figure}[htp]        \centering        \includegraphics[totalheight=0.2\textheight]{couetteFlowFig1.png}        \label{fig:ex1}     \end{figure}     \end{Answer}          \end{document}      I see in Is it possible to use the figure environment with the standalone package? that there was a similar problem with a different package, and that limitation in the package was eventually handled. It appears the same limitation exists in the `exercise` environment. Is there a work around that allows for inclusion of a figure with that package, or a different way of including a figure when using this package?


title: How to remove an unwanted tilde in the citations?

text: I'm inserting citations with bibtex and getting an unwanted tilde before the author's names. How could I prevent this behavior? The headers of my document are               \documentclass{sig-alternate}     \usepackage[english,spanish]{babel}     \usepackage[utf8]{inputenc}     \usepackage{hyperref}      ![Citation with unwanted tilde](http://i.stack.imgur.com/9ikck.png)


title: \input produces errors, copy&paste not

text: I'm working currently on a beamer-document and want to use LaTeX-code. Therefore I set up the listings-package in the following way:               \documentclass[12pt]{beamer}     \usepackage{listings}     \usepackage{xcolor}     \definecolor{keywordcolor}{HTML}{102D5D}     \definecolor{darkgreen}{rgb}{0,.6,0}     \definecolor{commentcolor}{HTML}{562B71}     \lstset{         language=[LaTeX]TeX,         texcsstyle=*\bf\color{keywordcolor},         numbers=left,         breaklines=true,         keywordstyle=\color{darkgreen},         commentstyle=\itshape\color{commentcolor},         morekeywords={},         otherkeywords={$, \{, \}, \[, \]},         tabsize=2,         frame=leftline,         basicstyle=\footnotesize\ttfamily,         backgroundcolor=\color{black!5}}          \begin{document}          \begin{frame}[fragile]              \begin{lstlisting}         \usepackage[Option]{Paket}         \end{lstlisting}          \end{frame}          \end{document}      The tex-file `otherkeywords` contains `{$, \{, \}, \[, \]}`. If I use `\input`, I'll get a bunch of errors. If I use the content for itself, I'll get the right result. Am I doing something wrong? The errors:               Improper alphabetic constant backgroundcolor=\color{black!5}}     Extra \else backgroundcolor=\color{black!5}}     Improper alphabetic constant backgroundcolor=\color{black!5}}     Improper alphabetic constant backgroundcolor=\color{black!5}}     Paragraph ended before \filehook@@ensureext was complete     Missing \endcsname inserted      I tried all the suggestions at another question, but no success for me. Sincerely


title: Beamer section/subsection links do not work with impressive

text: I am currently creating a presentation for my university with Beamer. I decided to use the `Impressive` script mainly because I wanted a clock counter and the fade-in-fade-out effect impressive provides when switching slides. However, I observe that when using impressive, the header links (for section/subsection) no longer work. This is because when I click the mouse to the link, impressive intercepts the click and changes slide to next slide instead of the linked one. Is there any possible work-around about this? I am running impressive using the command:               impressive.py -L margin=16,time=BL --fontsize 20 --transition Crossfade presentation.pdf &


title: Text is going below the page bottom

text: I am writing a LaTeX document using the `IEEEtran` document class. But the problem is the text is going beyond the page bottom. That is, the text in the column 1 is getting truncated by the lower bottom of the page. Is there some way that this problem can be handled? This is how my document structure goes:               \newcommand{\CLASSINPUTbaselinestretch}{1}     \newcommand{\CLASSINPUTinnersidemargin}{1in}      \newcommand{\CLASSINPUTtoptextmargin}{1in}     \documentclass{IEEEtran}     \title{MyTitle}     \maketitle          \begin{document}          \begin{abstract}     \end{abstract}          \bibliographystyle{IEEEtran}     \bibliography{myBib}          \end{document}


title: Multiple PDF generation with one tex file

text: I'm writing my cv using moderncv, and I want to make it in 2 languages. I wrote a common part, which both languages will have, and specific ones, where I put the translated content. I also want to make 2 versions: one with contact information, and another without it. In short: I want my cv in 4 versions: 2 languages, each one with and without contact information. I looked for an automated way to do that, just for fun. The ideal answer would be a single main .tex file producing all the 4 versions. I found 2 answers here in tex.sx, this and this, where I think my ideal can be made combining both. My main.tex have this code now               \ifx\conditionmacro\undefined       \immediate\protect\write18{%         pdflatex --jobname="cv-pt" "\includeonly{pt/personal,pt/contact,pt/content}\input{main}"       }%       \immediate\protect\write18{%         pdflatex --jobname="cv-pt-web" "\includeonly{pt/personal,pt/omitted,pt/content}\input{main}"       }%       \immediate\protect\write18{%         pdflatex --jobname="cv-en" "\includeonly{en/personal,en/contact,en/content}\input{main}"       }%       \immediate\protect\write18{%         pdflatex --jobname="cv-en-web" "\includeonly{en/personal,en/omitted,en/content}\input{main}"       }%       \expandafter\stop     \fi          \input{personal}          \include{pt/contact}     \include{pt/omitted}          \include{en/contact}     \include{en/omitted}          \begin{document}          \makecvtitle          \include{pt/content}     \include{en/content}          \end{document}      I could get this working only once without knowing how. I wish someone here can help me doing it. I really really **really** don't want to use a Makefile or shell script to do this. =) Thanks!


title: Biblatex: How can I get the label [BvB60] instead of [BB60] for an article by "Bach and van Beethoven (1760)"?

text: I'm using the `alphabetic` style of `biblatex` as follows:               \usepackage[       style=alphabetic,       maxcitenames=3,       minnames=3,       useprefix=true     ]{biblatex}      In the `.bib`-file, I have an entry:               @article{opera,       author = {Bach, Johann Sebastian and van Beethoven, Ludwig},       year = {1760},     }      When cited, this article will be rendered as [BB60]. Since I set `useprefix=true`, I expected the von-part to be present: [BvB60]. Is this a bug? How do I get the desired behavior without explicitly setting the label=BvB field in the BibTeX entry? And why is `false` the default value for `useprefix`?


title: What is the proper way to pass user input to package commands?

text: I'm wondering if someone can fill me on the proper technique for passing parameters from a document to the underlying package. The user would interface via a document like this:               \documentclass{article}     \usepackage{CourseOutline}     \begin{document}          \myAssessments[ maybe stuff ][ maybe stuff ]{ stuff }     \makeoutline          \end{document}      Defined in the style file would be the following three commands:   1. A user entry command               \NewDocumentCommand \myAssessments {O{I} O{cc} +m}         2. A formatting command               \NewDocumentCommand \myItemList {O{I} O{cc} +m}        3. A command that puts all the user input in the appropriate places and generates a course outline.              \makeoutline      The `\myItemList` command is called multiple times within `\makeoutline` to place tabular/itemize environments and the user shouldn't be mucking with it directly. My question is: what is the appropriate way to store the information from `\myAssessments` and get it into `\myItemList` when it is called? I'm trying to see if I can do this in latex3 syntax (with which I am extremely green), and my first thought was to define               \NewDocumentCommand \myAssessments {O{I} O{cc} +m}{     \tl_set:Nn \g_myA_tl {#1}     \tl_set:Nn \g_myB_tl {#2}     \tl_set:Nn \g_myC_tl {#3}     }      and later call,               \myItemList[tl_use:N \g_myA_tl][\tl_use:N \g_B_tl]{\tl_use:N \g_C_tl}      but now I'm mixing 'package syntax' with 'document syntax'. I could make it work with latex2e control sequences but how should it be done, or should it even be done, purely with latex3. I'm not even sure what "purely latex3 means". My confusion, I think, is with the proper method of interfacing between the document and the package. Help?


title: Figure inside a minipage

text: > **Possible Duplicate:**   >  How to use figure inside a minipage? For a kind of report, I have to write each section in a boxed space. To do that, I use the following :               \newcommand{\textbox}[1]{     \hfill     \centering     \fbox{     \begin{minipage}{0.95\textwidth}     \vspace{0.2cm}     #1     \end{minipage}     \newline     }     \vspace{1cm}     }      And the use is simply :               \textbox{         This is my first part.     }     \textbox{         This is my second part.     }      How to put figures inside these boxes ? If I try :               \textbox {         This is my third part.         \begin{figure}         \includegraphics[width=9cm]{myfigure.png}         \vspace{-12pt}         \caption{My caption.}         \label{fig:myfigure}         \end{figure}      }      It fails with the following error : `LaTeX Error : Float(s) lost.` How to solve this problem ?


title: How to place footnotes using longtable package with letter marks instead of numbers?

text: I have the table below as MWE. I couldn't get the footnotes with letter marks. When I use `\footnote` and `\footnotetext` macros they default to using number marks, I want to use letters like `a`, `b`, etc. instead.               \documentclass[oneside]{scrbook}      \usepackage{longtable}     \usepackage{booktabs}     \begin{document}     \begin{longtable}{r r r r r r}     \caption{Here is the caption} \\     \toprule     Time & MAD\footnote{a} & Group\footnote{b} & Par1 & Par2 & Par3 \\     \hline     \endhead     \hline \multicolumn{6}{c}{\textit{Continued on next page}} \\     \endfoot     \hline     \endlastfoot     \footnotetext{Median Absolute Deviation}     \footnotetext{Second footnote}     0     & 10.839 & 0     & 111.5 & 109.6 & 89.3  \\     200   & 10.854 & 0     & 111.6 & 109.6 & 89.3  \\     400   & 10.869 & 0     & 111.7 & 109.8 & 89.3  \\     600   & 10.898 & 0     & 111.8 & 109.9 & 89.3  \\     799   & 10.903 & 0     & 111.9 & 109.9 & 89.3  \\     0     & 10.916 & 0     & 112.1 & 110.1 & 89.5  \\     200   & 10.901 & 0     & 112.2 & 110.2 & 89.5  \\     400   & 10.569 & 0     & 112.4 & 110.4 & 89.5  \\     600   & 7.6   & 0     & 112.4 & 110.4 & 89.7  \\     799   & 4.861 & 0     & 112.5 & 110.4 & 90.6  \\     0     & 2.984 & 0     & 112.4 & 110.5 & 91.3  \\     200   & 0.74  & 0     & 112.3 & 110.3 & 91.1  \\     400   & 0.378 & 0     & 111.5 & 109.6 & 90.7  \\     600   & 0.391 & 0     & 111.7 & 109.6 & 90.9  \\     799   & 0.344 & 0     & 111.6 & 109.9 & 91.1  \\     0     & 0.388 & 0     & 111.9 & 110   & 91.6  \\     200   & 0.381 & 0     & 112.5 & 110.2 & 92    \\     400   & 0.366 & 0     & 112.6 & 110.4 & 92.6  \\     600   & 0.336 & 0     & 112.9 & 110.7 & 93    \\     799   & 0.328 & 0     & 113.1 & 110.9 & 93.6  \\     0     & 0.329 & 0     & 113.2 & 111.2 & 94.1  \\     200   & 0.393 & 0     & 113.4 & 111.4 & 95    \\     400   & 0.362 & 0     & 113.6 & 111.6 & 95.6  \\     600   & 0.345 & 0     & 113.8 & 111.9 & 96.3  \\     799   & 0.343 & 0     & 113.9 & 112.1 & 80    \\     0     & 0.335 & 0     & 113.9 & 112.4 & 97.6  \\     200   & 0.374 & 0     & 113.2 & 112.6 & 98.3  \\     400   & 0.403 & 0     & 114.6 & 112.9 & 98.9  \\     600   & 0.381 & 0     & 114.4 & 113.3 & 99.4  \\     799   & 0.388 & 0     & 115   & 113.7 & 100.1 \\     0     & 0.387 & 0     & 114.7 & 114.2 & 100.8 \\     200   & 0.41  & 0     & 115.3 & 115   & 101.9 \\     400   & 0.41  & 0     & 116.5 & 116.3 & 101.8 \\     600   & 0.421 & 0     & 117.5 & 118.6 & 102.3 \\     799   & 0.431 & 0     & 119.9 & 123.6 & 102.7 \\     0     & 0.442 & 0     & 125.3 & 132   & 103.3 \\     200   & 0.448 & 0     & 135.8 & 141.5 & 103.8 \\     400   & 0.465 & 0     & 151.1 & 147.4 & 104.4 \\     600   & 0.485 & 0     & 164.4 & 155.3 & 105.3 \\     799   & 0.495 & 0     & 181.1 & 175.6 & 106.4 \\     0     & 0.55  & 0     & 216.6 & 196.5 & 107.8 \\     200   & 0.561 & 0     & 246.8 & 215.1 & 108.1 \\     400   & 0.604 & 0     & 278   & 244   & 174.5 \\     600   & 0.646 & 0     & 304.2 & 273.1 & 174.1 \\     799   & 0.725 & 0     & 326.1 & 284.4 & 173.4 \\     0     & 0.759 & 0     & 337.3 & 293.5 & 172.5 \\     200   & 0.837 & 0     & 340.7 & 301.8 & 171.8 \\     400   & 0.864 & 0     & 342.3 & 306.3 & 170.6 \\     600   & 0.701 & 0     & 345.4 & 309.7 & 169.7 \\     799   & 0.876 & 0     & 346.2 & 307.6 & 169.1 \\     0     & 0.886 & 0     & 343.7 & 306.2 & 168.6 \\     200   & 0.876 & 0     & 340.9 & 305.4 & 168   \\     \label{tab:addlabel}     \end{longtable}     \end{document}      In the same subject, I am intending to put all the footnotes on the first page, but considering readability of the table, is there any problem in doing that? or should I repeat all footnotes over the the pages spanned by the longtable? what should be expected from the side of the trained reader?


title: Citing TikZ and other packages

text: In some areas of maths, it is advised to cite mathematical and drawing software you use to make your computations and drawings. Since I draw in TikZ, I would like to know how officially cite the package in my article. I use BibTeX, in this case with `amsalpha` style, as in MWE below. _(Related toHow do I properly cite TeX.SE for its help in typesetting? which, however, treats citing this site rather than packages themselves.)_               \begin{filecontents}{bibtest.bib}          @misc{dummy,     TITLE = {Dummy Software},     AUTHOR = {John Doe},     YEAR = {2013},     }          \end{filecontents}          \documentclass{amsart}          \begin{document}          I want to cite \cite{dummy}, and I want to cite \cite{tikz} as well.          \bibliographystyle{amsalpha}     \bibliography{bibtest}          \end{document}


title: Acousto-optic modulator in pst-optexp?

text: `pst-optexp` not only creates beautiful graphics but also it provides a way to logically describe complex optical setups. one thing I found missing is the ability to define an acousto optical modulator. basically this could be described by something like `\beamsplitter[bsstyle=plate]` but with the appearance of a box instead of a line, or something similar. does anybody knows how to do this? Thanks!


title: tagged PDF with XeLaTex

text: Is it possible to create a tagged PDF with XeLaTex or any other Tex Engine? (I need to be able to use True-Type-Fonts). Furthermore I need to create tagged PDFs of around 70 Books so doing it manually is no option. Thanks


title: Using \import correctly

text: I've got a main-file which includes the preamble. I then use `\import` to put together all chapters of my final document. When saving the main-file in another directory than the chapter-files I get the message:               ! LaTeX Error: File `GDP.tex' not found.      Isn't the idea of `\import` to import files from different directories? Is there maybe something wrong with my code?               ...         \begin{document}          \maketitle     \tableofcontents          \import{/Users/john/Documents/Uni/Studienarbeit/Latex/Kapitel/GDP}{Methodology}     \import{/Users/john/Documents/Uni/Studienarbeit/Latex/Kapitel/GDP}{GDP}          \end{document}


title: Special characters in knitr generated figure caption

text: I would like to pass special characters and formatting with the `knitr` generated captions. I am trying to understand two things: 1) Is it possible to pass `LaTeX` syntax through the caption? 2) How to define the encoding of the caption/subcaption strings? Please consider the following MWE               \documentclass{article}     \usepackage{subfig}     \begin{document}          <<fig-sub, fig.cap='Three \textit{plots}', fig.subcap=c('Erdős–Rényi', 'Barabási-Albert'), out.width='.30\\linewidth',dev='tikz',sanitize=TRUE>>=     library(ggplot2)          x<-1:10     y<-rnorm(10)          ggplot(data.frame(x,y), aes(x,y)) + geom_line()     ggplot(data.frame(y,x), aes(y,x)) + geom_line()     @          \end{document}


title: Lyx customized view of command

text: I have a command definition in my LaTeX preamble:               \newcommand*{\code}[1]{\texttt{#1}}      But the usage of this command appears as an ERT e.g. `\code{select}`. I would like this to appear as _select_ that is, italics. How to do this?


title: How to capitalize a specific work when importing references from JabRef

text: I am using JabRef to import references in LyX for my thesis. I am using IEEE style for bibliography. Using this style I get somewhat this type of results > "A. J. Navas, A. G. Zambrana, and A. Notario, "Efficient lognormal channel > model for turbulent fso communications," Electronics Letters, vol. 43, no. > 3, pp. 178 - 179, 2007. However, i want the word "FSO" to be capitalized instead of "fso". Is there any command for this. Please help me.


title: Classicthesis formatting for one-sided printing

text: I'm planning to use the `classicthesis` package for typesetting my PhD, however the university regulations dictate that it must be printed one-sided. Is there a way of configuring `classicthesis`, such that the left margin is always the inner and the right margin the outer? The default behaviour of alternating inner and outer margins looks very odd when printed single-sided.


title: \uline within a pgfmath expression produces an error

text: Why does using `\uline` within a `pgfmath` expression result in an error?               \documentclass{article}     \usepackage[normalem]{ulem}     \usepackage{tikz}          \begin{document}     \pgfmathparse{width("\uline{blabla}")}     \end{document}      The error:               ! Undefined control sequence.     \ULset ->\UL@setULdepth \def \UL@leadtype                                                {\leaders \hrule \@height \UL@heig...     l.6 ...se{width("\let\uline\relax\uline{blabla}")}          ! TeX capacity exceeded, sorry [input stack size=5000].     \UL@on #1->\leavevmode                             \UL@ender \let \UL@on \UL@onin \everymath {\UL@hrest ...     l.6 ...se{width("\let\uline\relax\uline{blabla}")}          !  ==> Fatal error occurred, no output PDF file produced!      My `\uline` is embedded in some other macro, so I can't simply not write it there. I had the idea to temporarily undefine `\uline` within the math expression (I don't need it to calculate the width, right!), but it only made matters more misterious: the error persists (it seems that `\let` is never executed).               \documentclass{article}     \usepackage[normalem]{ulem}     \usepackage{tikz}          \begin{document}     \pgfmathparse{width("\let\uline\relax\uline{blabla}")}     \end{document}


title: Rotate table with caption: "Not in outer par mode. \begin{table}[h]"

text: I would like to rotate one table with caption however it returns me an error               Missing \endgroup inserted ...omparação de Gerenciadores de Documento}     Undefined control sequence \end{sideways}      Undefined control sequence \end{sideways}     Undefined control sequence \end{sideways}     Undefined control sequence \end{sideways}     \begin{table} on input line 18 ended by \end{sideways}. \end{sideways}     Too many }'s     Extra \endgroup      I am using the code below               \begin{table}[h]     \begin{sideways}     \begin{tabular}{|c|c|c|c|c|c|}         \hline  Nome        & Linguagem & Full-Text Indexing & Controle de Versão & Workflow & Controle de Usuários \\         \hline  Quotero     & Java      &  Sim              &                       &           &       \\         \hline  OpenKM      & Java      &                   &                       &           &       \\         \hline  xinco DMS   & PHP       &                   &                       &           &       \\         \hline     \end{tabular}     \caption{Comparação de Gerenciadores de Documento}     \end{sideways}     \end{table}      How can I solve that error? It only happens if I have the caption.


title: Replacing movie15 with media9 in powerdot presentations

text: Last year, I could make `movie15` work in my `powerdot` presentations, through the `dvi2ps ps2pdf` route. I re-visited recently and could not get the movies (`*.wma`) to appear anymore. I spent the better part of two days trying to understand `media9` as its replacement, and I can get the two to work independently, but not together (At least not real, pretty like). Has anyone successfully accomplished this, or is there a reason this will probably not work? I converted my WMA to MP4, and if I go the `dvipdf` route, using `media9` in either an article class or a `powerdot` class, I get the movie to show up correctly, however, while the article class "looks" right, the `powerdot` class PDF only covers the bottom 1/4 of the pdf page. If I go the `dvi2ps` and `ps2pdf` (GS 9.05) the `powerdot` and the article class both look right (takes the entire page), but the movie doesn't show up in either one. I can post specifics, but I thought I would get the big picture answer that it is indeed possible. I've tried most of the suggestions I have found (i.e. `-dNOSAFER`), but no luck! **Response to Alexander:** Excellent, at least now I know someone has it working and its just a matter of the right format/order of 1s and 0s. I have a pretty similar setup, and when I ran your code, I got a:               'powerdot-default.ps' not found.       So I added a style option:               \documentclass[style=simple]{powerdot}       and then got the error:               ! Package babel Error: You haven't loaded the option english yet.       So I added: `\documentclass[style=simple, language=english]{powerdot}...` (Just in case anyone receives these errors, a work around for me until I find the right problem). Finally I got a `StrobeMediaPlayback.swf` not found, probably because I do not have it installed (did it come with v0.3?) I just have the original `VPlayer.swf`. So I will try and find `StrobeMediaPlayback.swf` since I am still in the same boat, the PDF looks great (formating wise), but the movie still is not there... do I have to manually update to v0.3? I thought I was setup for automatic updating, but maybe not. Could I ask what your switches/parameters are for `dvi2ps` and `ps2pdf`?


title: Placing graphics inside figure captions

text: Similar to putting a tikzpicture inside a \caption{}, I would like to insert an external icon inside figure captions, something like:               \begin{figure}     \caption{text with \includegraphics{icon} somewhere inside}     \includegraphics{image}     \end{figure}      How might this be done?


title: Template for *Proceedings of the IEEE* Journal

text: I am not able to find the template for publications in Proceedings of the IEEE. Here is an example: A Survey of BGP Security Issues and Solutions


title: Citing a certain type of reference using biblatex

text: I am in the process of updating my CV using LaTeX. In my CV, I have a list of publications, reports, etc., and I would like to use `biblatex` to manage these lists. Currently, all of my publications are maintained in a single `.bib` file, and ideally, I want it to stay this way. Here is a simple example of how I would like my publications printed in my CV, where the largest labelnumber also equals the total number of references in a particular section: > Publications & Presentations   >  JOURNAL ARTICLES   >  [3] Author, A.; Author, B. Journal Article 1 ...   >  [2] Author, C.; Author, D. Journal Article 2 ...   >  [1] Author, E.; Author, F. Journal Article 3 ...   > > > REPORTS   >  [2] Author, G.; Author, H. Report 1 ...   >  [1] Author, I.; Author, J. Report 2 ...   > I can separate the reference types using `\defbibfilter` and `\printbibliography[filter=...]`. However, the only way I can get the references to print in the bibliography without a citation is with `\nocite{*}`. When I use `\nocite{*}`, all of the references in my `.bib` file are added to the `.bbl` file so that the labelnumbers are larger than the actual number of references for a particular type. For example, if there are 8 total references in the `.bib` file, with 4 articles and 4 reports, the bibliography prints as: > Publications & Presentations   >  JOURNAL ARTICLES   >  [8] Author, Author ...   >  [7] Author, Author ...   >  [6] Author, Author ...   >  [5] Author, Author ...   > > > REPORTS   >  [8] Author...   >  [7] Author...   >  [6] Author...   >  [5] Author...   > Is there any way to `\nocite` only certain types of references in the `.bib` file? For example, `\nocite{type=article}`? Or is there another `biblatex` command that will allow me to cite a particular entry type (`article`, `report`, `book`, etc.) rather than citing with a citation key?


title: Daleif1 Theme : how to get part's title above chapter?

text: I am using the `daleif1` theme, and I would like to have the `\part`'s title juste above the `\chapter`'s title on the same page.               \documentclass{memoir}     \usepackage[explicit]{titlesec}     \usepackage{calc,graphicx,soul}     \usepackage{color}                    \begin{document}     \definecolor{nicered}{rgb}{.647,.129,.149}     \makeatletter     \newlength\dlf@normtxtw     \setlength\dlf@normtxtw{\textwidth}     \def\myhelvetfont{\def\sfdefault{mdput}}     \newsavebox{\feline@chapter}     \newcommand\feline@chapter@marker[1][4cm]{%       \sbox\feline@chapter{%         \resizebox{!}{#1}{\fboxsep=1pt%           \colorbox{nicered}{\color{white}\bfseries\sffamily\thechapter}%         }}%       \rotatebox{90}{%position titre "Chapitre"         \resizebox{%           \heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%         {!}{\scshape\so\@chapapp}}\quad%       \raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%     }     \newcommand\feline@chm[1][4cm]{%       \sbox\feline@chapter{\feline@chapter@marker[#1]}%       \makebox[0pt][l]{% aka \rlap         \makebox[18cm][r]{\usebox\feline@chapter}%       }}             \makechapterstyle{daleif1}{       \renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}       \renewcommand\chaptitlefont{\normalfont\huge\bfseries\scshape\color{nicered}}       \renewcommand\chapternamenum{}       \renewcommand\printchaptername{\color{black}}       \renewcommand\printchapternum{\feline@chm[2.5cm]} % taille de la box       \setlength\beforechapskip{-1cm}       \renewcommand\afterchapternum{\par\vskip\midchapskip}       \renewcommand\printchaptertitle[1]{\chaptitlefont\raggedleft\underline{##1}\par}     }          \makeatother     \chapterstyle{daleif1}          \part{Part ONE}               \chapter{Chapter ONE of PART ONE}     \chapter{Chapter TWO of PART ONE}                    \end{document}      I dont have the slighest idea how to do it. I tried to use `\printparttitle` but it doesn't work.


When I try to compile this file http://danjer.doudouke.org/_media/tech/dokutexit/playground.zip this error occurs:               ! LaTeX Error: Unknown graphics extension: .ps.      I'm using TeXworks Version 0.4.3 (MiKTeX 2.9) and pdfLaTeX.


title: TIKZ-PGF: Align two text-nodes to the left

text: I want to draw two text nodes in tikz-figure where the text is aligned left and not centered:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{figure}       \begin{tikzpicture}         \node at (1.0, 2.0) {veeeeeeeeeeery long text node};         \node at (1.0, 1.0) {short text node};       \end{tikzpicture}     \end{figure}          \end{document}      Here, the positions define the center of the text. What I want to do is to specify the left position of text. Who to do this?


title: Texmaker (Windows version) - first use - Error: Log file not found!

text: This is my first time using a LaTeX editor. I installed the Windows version of Texmaker changing the C drive to D and leaving the rest of the install path the same. Windows 7 Ultimate 64-bit Texmaker 3.4.1 for Windows I then did "A Local guide for using Texmaker" PDF Basically create a simple Hello World document and save it. When I went to process the file (Tools - PDFLaTeX) I received the Error: Log file not found! I checked the configuration (Options -> configure Texmaker) and found no option for log files. I checked for a log file under the D:\Program Files (x86)\Texmaker and found none. I checked for a log path in the Windows registry using regedit and found none. I checked the Texmaker issues and found Issue 97 but it does not help. I then uninstalled and reinstalled Texmaker allowing it to use the default directory on the C drive. I still get the same error. Any ideas? EDIT I installed MiKTeX as an administrator (didn't work as user) and chose the default options. After MiKTeX installed I was able to create a PDF file using Texmaker. Also, correctly setting the PDF viewer options (Options -> Configure Texmaker -> Commands -> PDF Viewer) Built-in Viewer and Embed, I was able to preview the pdf in Texmaker (View -> PDF Viewer). So, Texmaker is a LaTeX editor which generates a file containing LaTeX markup. MiKTeX is a program that converts the LaTeX markup into an output format such as PDF.


title: How can I optimize the arara (un)zip-program?

text: I have written `zip.yaml` \- it works as I can see.               !config     # zip rule for arara     # author: cis     # version: 0.1     # requires arara 3.0+, zip     identifier: zip     name: Zip     command: <arara> @{unzip}@{program} @{options} @{outputpath}@{name}.@{extension} '@{data0} @{data}' @{encrypt} @{pw}     arguments:     - identifier: unzip       flag: <arara> @{ isTrue( parameters.unzip , "un" ) }     - identifier: program       flag: <arara> @{parameters.program}       default: zip     - identifier: options       flag: <arara> @{parameters.options}     #  default: ???     - identifier: outputpath       flag: <arara> @{parameters.outputpath}     - identifier: name       flag: <arara> @{parameters.name}       default: archive     - identifier: extension       flag: <arara> @{parameters.extension}       default: zip     - identifier: data0       flag: <arara> @{parameters.data0}       default: <arara> @{getBasename(file)}.pdf     - identifier: data       flag: <arara> @{parameters.data}     - identifier: encrypt       flag: <arara> @{ isTrue( parameters.encrypt , "--password" ) }     - identifier: pw       flag: <arara> @{parameters.pw}      A simple test-program:               % arara: pdflatex     % arara: zip     \documentclass{article}     \begin{document}     Hello world.      \end{document}      * * * **Lets test the unzip-part!** Especally this works ( **run in this order** ):               % #arara: pdflatex     % #arara: zip: { name: archive2 }     % arara: zip: { unzip: true , name: archive2 }          \documentclass{article}     \begin{document}     Hello.     \end{document}      ![enter image description here](http://i.stack.imgur.com/PcdUg.png) * * * **Now to the problem:** If the zip-archive got a password, I could not run `zip.yaml` to it's end `:(` ![enter image description here](http://i.stack.imgur.com/SjrEx.png)               % #arara: pdflatex     % #arara: zip: {  encrypt: yes , pw: aaa }     % arara: zip: { unzip: true }     \documentclass{article}     \begin{document}     Hello World again.     \end{document}      **What can I do? Thank you!**


title: extend borders at ktikz preview

text: the border on the ground limits the whole view of my image. You don't see node(A). Is there a way to fit the Preview to my whole image? MWE:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \draw (-5,-5) node {A} -- (1,15) node {B};     \end{tikzpicture}     \end{document}      ![example](http://i.stack.imgur.com/5eZiX.png)


title: How to change header-footer only on a single page

text: > **Possible Duplicate:**   >  Change header only in one page I am trying to change the position of the header and footer only on a single page, because I want to make it landscape and I want to keep my current header-footer. Any ideas?


title: Automated table for excercise points in tikz

text: I'm a computer science student. And I write most of my excercises in LaTeX. So I often have to create a table for excercise points, with different numbers of excercises and different amounts of points for each excercise. Therefor I want to define a command to do this very quickliy. The idea is to provide a command `\excercisepoints{4,5,3}` which would print a table table containing space for 3 excercises. Where the first gives 4 points, the seccond 5 points, and so on. As well I want a row for the sum of points. Because I really like TikZ I decided to do this in TikZ. By using these three questions (1, 2, 3) I came to this:               \documentclass[class=article]{standalone}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage[T1]{fontenc}     \usepackage{tikz}     \usepackage{etoolbox}     \usetikzlibrary{matrix}     \tikzset{          table/.style={             matrix of nodes,             row sep=-\pgflinewidth,             column sep=-\pgflinewidth,             nodes={                 rectangle,                 draw=black,                 align=center             },             minimum height=1.5em,             text depth=0.5ex,             text height=2ex,             nodes in empty cells,     %%             row 1/.style={                 nodes={                     fill=black,                     text=white,                     font=\bfseries                 }             }         }     }     \begin{document}     \newcommand{\excercisepoints}[1]{     \let\mymatrixcontent\empty     \foreach[count=\c] \i in {#1} {         \expandafter\gappto\expandafter\mymatrixcontent\expandafter{\c \& \i \& \\}%     }     \begin{tikzpicture}     \matrix (first) [ampersand replacement=\&, table,text width=6em]     {     Excercise \& Maximal \& Achieved\\     \mymatrixcontent     $\sum$ \& \&\\     };     \end{tikzpicture}}     \excercisepoints{2,4,3}     \end{document}      This yields to this result: ![Output](http://i.stack.imgur.com/i1siZ.png) So there are two problems:   1. `\i` is not interpreted as a varible inside `\expandafter{}`   2. I don't know how to sum up the numbers. I already tried this with tikz. But I just found commands for summing up dimensions, not natural numbers. **EDIT:** For anybody watching these later, this is the working macro:               \RequirePackage{tikz}     \RequirePackage{etoolbox}     \usetikzlibrary{matrix}     \tikzset{          table/.style={             matrix of nodes,             row sep=-\pgflinewidth,             column sep=-\pgflinewidth,             nodes={                 rectangle,                 draw=black,                 align=center             },             minimum height=1.5em,             text depth=0.5ex,             text height=2ex,             nodes in empty cells,     %%             row 1/.style={                 nodes={                     fill=black,                     text=white,                     font=\bfseries                 }             }         }     }     \newcommand{\punkteliste}[1]{%     \let\mymatrixcontent\empty     \def\mySum{0}     \foreach[count=\c] \i in {#1} {%         \xappto\mymatrixcontent{\c \noexpand\& \i \noexpand\& \noexpand\\}%         \pgfmathparse{int(\mySum+\i)}\global\let\mySum\pgfmathresult     }     \begin{tikzpicture}     \matrix (first) [ampersand replacement=\&, table,text width=6em]     {     Excercise \& Maximal \& Achieved\\     \mymatrixcontent     $\sum$ \& \mySum \&\\     };


title: Control top and bottom margins of an image?

text: Using `includegraphics` seems to set default margins that gives a nice spacing between text and image. But I'd like to layout the text as close as possible to the image. How do I control the margins of an image? Change from:               |     #TEXT######################### |     | ################################## |     | ################################## |     | ################################## |     | ################################## |     | #######################            |     |                                    | % <-- margin from image is a bit tall     |           *************            |     |           *************            |     |           *************            |     |           **IMAGE.JPG**            |     |           *************            |     |           *************            |     |           *************            |     |           *************            |     |                                    | % <-- margin from image is a bit tall     |     #TEXT######################### |     | ################################## |     | ################################## |     | ################################## |     | ################################## |     | #################                  |      To:               |     #TEXT######################### |     | ################################## |     | ################################## |     | ################################## |     | ################################## |     | #######################            | % <-- as close as possible     |           *************            |     |           *************            |     |           *************            |     |           **IMAGE.JPG**            |     |           *************            |     |           *************            |     |           *************            |     |           *************            |     |     #TEXT######################### | % <-- as close as possible     | ################################## |     | ################################## |     | ################################## |     | ################################## |     | #################                  |


title: error catching in AUCTeX

text: When working with AUCTeX, I experience an unexpected behavior regarding error catching. In particular, when I hit `C-c C-c`, and there are errors, then **C-c `** does two things:   1. Splits the window and opens a new tab.   2. In the lower (new) part an error message is displayed and in the new tab's title is `TeX Live 2011` and it is empty. If I close the empty tab, and switch back to the `.tex` file, the cursor doesn't jump to the (vicinity) of the error. I find it hard to believe that this is the expected behavior. Is there a way to customize this?


title: Who manages the XeTeX examples

text: Who is the contact about the XeTeX examples over at http://www.tug.org/mactex/src/Demos/XeTeX-showcase? I'd like to submit a new example, but there's no contact name.


title: Margins from the column separator

text: If the text in both columns end and begin too close from the column separator, how do I increase the margin from it? Change from:               | #Text#######|#Text####### | % (Bad, too close to column separator)     | ############|############ |     | ############|###########  |     | ####        |  ########## |     | ############|############ |     | ############|############ |     | ############|############ |     | ############|############ |     | ########    |#########    |      to:               | #Text####### | #Text####### | % (Much better)     | ############ | ############ |     | ############ | ###########  |     | ####         |   ########## |     | ############ | ############ |     | ############ | ############ |     | ############ | ############ |     | ############ | ############ |     | ########     | #########    |


title: Control Auctex Preview colors

text: In the Auctex Preview Appearance section in customize, it is possible to set "Preview Reference Face". This is the only place I can find where the colour of the small .png files created by Preview can be modified. Changing this setting seems to have no effect on Preview's output. Also the setting does not seem to be documented -- the meaning of the options are unclear. My question is very simple: What are the actual variables which control the colours of Preview output? I have tried to look at preview.el but my elisp is not good enough.


title: How to not display chapter number in section number (titlesec)

text: I'm using `titlesec` to manipulate title and section and other. Here is what I'm using:               \titleformat{\chapter}         [frame]         {\normalfont}         {\filright \footnotesize \enspace LP \thechapter \enspace}         {6pt}         {\Large \bfseries \filcenter }          \titleformat{\section}%       [hang]       {\Large\bfseries\color{bleu}}       {\thesection}       {1em}       {}      But in my PDF the section are numbered as 1.1 then 1.2 etc... I would like to suppress the chapter number and only have 1 section 1; 2 section 2 etc... How can I do that while keeping the rest?


title: Weird numbers with defernumbers and refsegment

text: When using `refsegment` without `defernumbers`, I get a warning that I should enable `defernumbers`. When I enable it, the numbering becomes a mess: ![Issue](http://i.stack.imgur.com/nd5Mj.png) Specifically, the numbering of the bibliography starts at `x+1` instead of `1`, where `x` is the number of bibliography entries (unique or otherwise) typeset in all `refsegment`s. Weirdly, the use of, e.g., `refsegment=section` itself does not cause the issue. If the `\printbibliography[segment=x]` commands are commented-out, the numbering starts from `1` as expected. I also tried `resetnumbers` in the first `\printbibliography`, but nothing changed. I also posted a question here yesterday which gave rise to comments about the `defernumbers` issue. I am not sure whether or how the two are related. # MWE:               \documentclass{article}          \usepackage{filecontents}     \begin{filecontents}{bibliography.bib}     @Article{gob,       title           = {I've Made a Huge Mistake},       author          = {Bluth, Gob},       journal         = {Journal of Magicians},       year            = {2003},       volume          = {1},       number          = {1},       pages           = {1--10},     }          @Article{michael,       title           = {Her?},       author          = {Bluth, Michael},       journal         = {Sudden Valley},       year            = {2003},       volume          = {1},       number          = {1},       pages           = {1--10},     }          @Article{tobias,       title           = {Never-nudism},       author          = {F{\"u}nke, Tobias},       journal         = {Blue Man Group},       year            = {2003},       volume          = {1},       number          = {1},       pages           = {1--10},     }     \end{filecontents}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[british]{babel}     \usepackage{csquotes}     \usepackage[%       backend=biber,       refsegment=section,       defernumbers=true,       sorting=none,     ]{biblatex}     \addbibresource{bibliography.bib}          \begin{document}     \section{First section}     Check this out~\cite{gob,tobias}.     \printbibliography[heading=subbibliography,segment=1,]          \section{Second section}     Check this out~\cite{michael}.     \printbibliography[heading=subbibliography,segment=2,]          \nocite{tobias}     \printbibliography     \end{document}


title: IEEE Tran LaTeX Template: Affiliation Block Layout

text: I want to use the IEEE tran LaTeX class for one of my **conference** papers. Three different institutions need to be affiliated and I'm trying now to design the header in a _more attractive_ and functional fashion like it is shown in figure 2. As far as I know, the only design element that is provided is the `\and` command in order to influence the layout. This does not lead to a satisfying result, though, because the affiliation blocks are not aligned properly. At the moment all insitutions are positioned in one column one after the other which chews up a lot of space, leaving a large unused area at the right side of the header page. Do you have any suggestions/ experience to share? Thank you in advance! ![Desired Layout](http://i.stack.imgur.com/XG5IY.png)


title: timeline and tikz

text: Hello great TeX people :) I am trying to create a timeline looking like ![enter image description here](http://i.stack.imgur.com/e8PZd.png) but with months down the side and with lines connected to dates. I have been trying to modify the `chronology` package, but the "year" indication was way to deeply incooporated. I have been trying with TikZ but unfortunately I really have not been able to produce anything close to the desired output. How would you attack such a problem? how would you structure your code if trying to solve the same problem?


title: How to create a beautifully aligned solution for exercises?

text: Basically, I'm writing solution for the exercises on the textbook. And I want something like this: ![image](http://i.stack.imgur.com/e2TPJ.jpg) As you can see, sub-problems are aligned after the problem number and the formulas are aligned after each sub-problems. I've tried `\tabular` but I can't get what I wanted. Any suggestion?


title: Article Class: Why Default 10pt?

text: A template I have created for doing work uses the article class with the `a4paper` and `11pt` options set. I have sometimes needed to use 10pt instead of 11pt for only _very_ special circumstances. When I use the 10pt option, I can't decide whether to use 10pt as my default text size or not as it seems to read more easily but I can't decide whether or not if it actually does. What I would like to know is why is the default font size for `article` 10pt? Is there any typographical reason why? Does it make it any easier to read? NOTE: Using Standard Computer Modern font.


title: Fore-edge painting package for books?

text: I would like to add fore-edge painting to the edge of each page, so that when the pages are fanned, it reveals text or an image. It seems it would be easy enough to slice up an image(Tikz/PGF), or text, into the appropriate number of slices and place them at the leaf edges. However, I have no experience in writing packages, classes, or styles. For example: http://en.wikipedia.org/wiki/Fore-edge_painting http://typophile.com/node/56855 Any thoughts?


title: Is the filename of an image preserved in the final PDF?

text: Yes or no questions are pretty rare here now that I think of it. My question is simply this: When producing a PDF file with `pdflatex` or `lualatex`, is the original filename of an `\includegraphics` preserved in any way, shape or form in the final PDF? The reason I'm asking is that I'm using some less-than-serious filenames but if the original authors of the works I'm referencing in these images saw the names, I would have to rely a bit too much on the ability of someone I don't know to take a joke. The filename does not show up in plain text in the PDF file but neither does any of the text itself so that doesn't seem to be a reliable test. There is no tooltip or anything with any of the PDF readers I tried but again, that doesn't prove anything. Once this document is released, it would be too late to learn something about PDF files that I didn't know before. PS: If you elaborated on your "yes" or "no", that would be very much appreciated ;) * * * **Edit** I think it is worth mentioning that this question might be relevant even to people who don't share my questionable sense of humor. Similar to undo information left in a Word file, seeing the original filename might reveal something about the author that they do not wish to reveal and are hardly aware of. Filenames like `failed_attempt-6.png`, `study_plot_retouched.pdf` or `stand-in031.jpg` are just some examples of filenames that might cast you in a strange light if uncovered by a faithful observer of your document ;)


title: How to access \xmin, \xmax, \ymin, \ymax from within PGFplots axis environment

text: In the MWE example below I have the values specified twice, but would prefer not to have to do that. Furthermore, it is possible to allow PGFplots to automatically select these end points so I would have to iterate and modify the settings manually after seeing what PGFplots had selected. There must be some way to access these variables form within the `axis` environment:               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}     \begin{axis}[xmin=-1.5, xmax=1.5, ymin=-1, ymax=3]          \addplot[mark=none, domain=-2.5:2.5, thick, red] ({x},{x*x-0.5});%          % Would prefer to be able to specify something like this:     %\addplot [mark=none, blue, ultra thick] coordinates {(\xmin,\ymin) (\xmin,\ymax)};          % But until I can access those values, do it manually:     \addplot [mark=none, blue, ultra thick] coordinates {(-1.5,-1) (-1.5,3)};          \end{axis}      \end{tikzpicture}     \end{document}      In case there is an interest in why I want to do this: I am trying to automate labelling intersections with the lines x=0 and y=0 within PGFplots as discussed in How to specify a name path for the axis in PGFplots. However, there are issues with that approach. One solution (albeit it is a bit of a hack) is to draw the lines x=0, and y=0 with `draw=none` option and then find the intersection with that. If I can access the min/max values of the x and y axis then I can label a phantom line and automate the location of the intersections via Intersections in PGFplots


title: tabularx and formatting entire column

text: This is obliquely related to this query, except that I would like to have a `tabularx` environment where the entire first _column_ is in italics (or some other standard formatting). The following obviously does not work:               \documentclass{article}     \usepackage{array, tabularx}     \begin{document}     \begin{table}[htbp]     \begin{tabularx}{\linewidth}{>{\em}X{}<XX}     a & a & a \\     b & b & b     \end{tabularx}      \end{table}     \end{document}      I do actually need `tabularx` since I expect the last column to contain quite long sentences.


title: How to design a nice looking chapter title and page

text: I want to create something like the images I have below: ![this](http://i.stack.imgur.com/VLgT4.png) ( I couldn't draw well the chapter number and its font) and ![this](http://i.stack.imgur.com/qSnTL.png) ( I couldn't draw well the page number) \--------------UPDATE According to Gonzalo Medina answer---------------------               \documentclass[a4paper,12pt,oneside]{report}           \usepackage{fontspec}     \usepackage{xunicode}          \setmainfont{Times New Roman}     \usepackage{polyglossia}     \setmainlanguage{greek}     \setotherlanguage{english}     \usepackage{fixltx2e} %to use  _ and ^     \usepackage{url}     \usepackage{indentfirst}     \usepackage{wrapfig} % for wrapping graphics with text     \usepackage{float} % for images     \usepackage[a4paper,left=2cm,top=2.5cm,right=2cm,bottom=2.5cm]{geometry}     \usepackage{graphicx, amsmath, lettrine,amssymb}     \usepackage{fancyhdr,verbatim}     \usepackage{rotating,appendix}     \usepackage{ucs}     \usepackage{longtable}      \usepackage{listings}      \usepackage{caption}     \usepackage{capt-of}     \usepackage{underscore} %in order to use __     \usepackage{hyperref} % to make hyperlinks           %----------------------------for changing the chapter format-------------------     \usepackage[explicit]{titlesec}     \usepackage{tikz}          \titleformat{\chapter}[display]       {\Huge\scshape}       {\filleft\tikz\node[fill=green!50!black!10,rectangle,rounded corners=6pt] (chap) {\chaptertitlename};}       {0ex}       {\colorbox{green!50!black!10}{\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\vskip1ex#1\vskip1ex}}}                    %-------------------------------------------------------------------------------                                   \begin{document}          \thispagestyle{empty}          \renewcommand{\chaptername}{}     \newcommand{\EN}[1]{\foreignlanguage{english}{#1}} %in order to write english as \EN{Some words in English}          \addtocontents{toc}{\protect\thispagestyle{empty}} %to remove numbering the page from table of contents (ToC)     \tableofcontents     \thispagestyle{empty}               \chapter*{Preface}          \thispagestyle{empty}     \indent some text          \chapter {Chapter 1}          \textbf {\LARGE Intro}          \setcounter{page}{1}          \section {History}          \indent     Some text ggttg               \section {Another}          \indent    some text                    \chapter {Chapter 2}          \textbf {\LARGE Two}     \section {History2}          \indent     text     \end{document}      Using the above code i receive ![this image](http://i.stack.imgur.com/gEswO.png) I want ![that image](http://i.stack.imgur.com/zw6Qr.png) Also,for the second layout ,almost the same.It shows "1:Chapter 1" instead of "1:Intro". All i want is at every page (except from the first page of each chapter) to show the page number and the title of that chapter


title: Asymptote: How to create a radial shading or "elliptical" shading with intermediate color steps?

text: In Asymptote I can create radial gradient shadings using the `radialshade` function which defines a gradient varying smoothly from color A on a circle with center cA and radius rA to color B on a circle with center cB and radius rB. But I find myself needing to specify intermediate color shades along the way to get the look I want, e.g. to get a circle that has a small white-red area in the center, a larger dark-red outer area, and a pure red area in between. I tried to achieve this by combining two radial shades in the following way:               size(0,100);          path g=scale(2)*unitcircle;     pair A=(0.35,0.35), B=(0.6,0.6), C=(0,0);          radialshade(scale(1.1)*unitcircle,white,C,0,red,C,0.8);     radialshade(scale(1.0)*unitcircle^^g,red+evenodd,C,1,black,C,2);      giving the following output: ![](http://i.stack.imgur.com/XhZXs.png) This is not bad but I feel that this is not the most elegant way to do it. Furthermore I feel that the transition area, where one radial shading meets the other one, is not as smooth as I would hope. Another thing I would like to achieve is an "ellipse" equvialent to `radialshade` but I haven't found a solution for that. I really like the behavior of TikZ for that sort of thing. Here I can declare a radial shading in such a way that I can give intermediate colors as well as their radial positions. Furthermore the radial shadings also kind of adapt to the shape they are used on so that an ellipse is shaded in an elliptical way. Also there is some nice way of distorting the shading by specifying a center different from `{0, 0}` which is quite handy in some situations (but, of course, this effect can be achieved with `radialshade` too). Example:               \documentclass{standalone}          \usepackage[svgnames]{xcolor}     \usepackage{tikz}          \pgfdeclareradialshading{normal}{\pgfqpoint{0bp}{0bp}}{%       color(0bp)=(white);       color(10bp)=(red!90!black);       color(20bp)=(black!75!red);       color(30bp)=(black);       color(100bp)=(black)}          \pgfdeclareradialshading{distorted}{\pgfqpoint{10bp}{10bp}}{%       color(0bp)=(white);       color(10bp)=(red!90!black);       color(20bp)=(black!75!red);       color(30bp)=(black)}          \begin{document}          \begin{tikzpicture}       \shade [shading=normal] (-1, 3.5) circle (1.5cm);       \shade [shading=distorted] (3, 3.5) circle (1.5cm);       \shade [shading=normal] (-3, 0) ellipse (2 and 1.5);       \shade [shading=distorted] (2.00, 0.0) ellipse (2 and 1.5);       \shade [shading=normal] (5.00, -1.5) rectangle (7, 1.5);     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/TyPdn.png) What is the best way to achieve the look of the TikZ examples?


title: top-of-page positioning: \longtable vs. \tabular

text: Why is a `longtable` environment on top of pages vertically placed different to a `tabular` environment? I'm digging several days on this question and didn't find a way to align the `longtable` vertically in the same way. ![](http://imageshack.us/a/img705/1241/ltenv.png) Code:               \documentclass[11pt,a4paper]{article}     \usepackage{longtable}          \newcommand{\lorem}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis pellentesque iaculis nunc eget congue. Etiam lobortis nisi velit. Proin tristique massa a lectus ullamcorper semper. Aenean ut dignissim diam. Integer ullamcorper eros nibh. Cras molestie neque quis lectus lobortis egestas. Maecenas vel tortor in nulla sagittis venenatis. Nulla ac eros dui, eget lacinia ante. Fusce elementum nisl ac tortor hendrerit id lacinia orci malesuada. Praesent eu iaculis mi. Vestibulum sodales tempor rutrum. }     \newcommand{\examplelongtable}{%         \begin{longtable}{|l|p{58mm}|}         %         \hline         \endfirsthead         %         \hline\multicolumn{2}{|l|}{\textsl{\ldots continued}}         \endhead         %         \multicolumn{2}{|l|}{\textsl{will be continued\ldots}}\\*         \hline         \endfoot         %         \hline         \endlastfoot         %         aa: & 4711\\         \hline%         aaa: & 2\\         \hline%         aaaa: & 4711-2\\         \end{longtable}     }     \newcommand{\exampletabular}{%         \begin{tabular}[H]{|l|p{58mm}|}         \hline         aa: & 4711\\         \hline%         aaa: & 2\\         \hline%         aaaa: & 4711-2\\         \hline         \end{tabular}     }     \setlength{\parskip}{1.0\baselineskip}     \setlength{\LTpre}{0pt}     \setlength{\LTpost}{0pt}     \setlength{\LTleft}{\parindent}          \begin{document}     \exampletabular          \lorem          \lorem          \lorem          \lorem          \lorem     \examplelongtable     \end{document}      Supposedly there is a very simple solution, but I seem to be unable to find it... If I explicitly set a `\newpage` before the `longtable` example, an adapted `\vspace*{-...}` would help, but not on a regular page-break, where the source code doesn't "know" where it occurs.


title: Hyperref and imakeidx do not work together

text: I use `imakeidx` package to generate index in my document. I'd like to add hyperlinks into my Index, but it seems to me that `hyperref` and `imakeidx` do not work together. For example, this code doesn't create linkable index:               \documentclass[11pt]{book}     \usepackage[pdftex]{color}                              \usepackage{hyperref}     \hypersetup{         colorlinks,         citecolor=green,         filecolor=green,         linkcolor=blue,         urlcolor=green     }     \usepackage[makeindex]{imakeidx}     \makeindex     \begin{document}     Text\index{text}     \printindex     \end{document}      ` How to fix this problem? Thanks.


title: PGF loop - how to use an array inside pgfmathdeclare function?

text: I'd like to pick a number from my array inside a loop. The first argument is a "starting" value which increments by 1 for each iteration based on the second and third argument (`\qa`). The maximum number of iterations can be determined by the second argument (`\eval@limit`). The other maximum value can be determined by the value of the third argument (`\arbitraryarrayvalue`). I'm running into some issues using my array inside `\pgfmathdeclarefunction`. Specifically: The first case, the easy one, is to simply put:               \pgfmathparse{\myarray[\arbitraryarrayvalue]}     \pgfmath@smuggleone\pgfmathresult      Before closing the group. It turns out I can't look inside the array:               Paragraph ended before \pgfflt@readlowlevelfloat was complete.     <to be read again>                         \par       So looking at the existing questsions I found one related question to `\pgfflt@readlowlevelfloat`, at How do I use pgfmathdeclarefunction to create define a new pgf function?. I couldn't make the inference from that question to the solution of mine. So second case: if I use the array inside my `Expl3` solution for comparisons (this solution you will also find in the code below), I get an error like this one:               File ended while scanning use of \__fp_parse_after:ww.     Emergency stop.     ==> Fatal error occurred, no output PDF file produced!      So judging from the fact they both refer to "file ended while doing something", I suspect these macro's keep reading further and expanding further until the document ends, which I _usually_ solve with a well-placed `\relax`. I've tried adding that all over the place (inside the comparison, after it, about the array, etc.), but I can't seem to get rid of the error. Possibly not so related but maybe a general solution _outside_ `expl3` would be the answer (?) regardless, I would like to see how a such general solution to break the loop would look like outside `expl3`. :-)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{fpu}          \usepackage{expl3}          \ExplSyntaxOn     \cs_new:Npn \breakloop #1 #2       {         \fp_compare:nNnT { #1 } > { #2 }           { \breakforeach }       }     \ExplSyntaxOff          \global\def\myarray{{5,10,15,20,25,30,35,40,45,50,55,60}}          \makeatletter     \pgfmathdeclarefunction{blah}{3}{%       \begingroup         \pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}         \pgfmathparse{#1} % starting value         \edef\qa{\pgfmathresult}         \pgfmathparse{#2} % maximum amount of loops         \edef\eval@limit{\pgfmathresult}         \pgfmathparse{#3+1} % maximum value of array         \edef\arbitraryarrayvalue{\pgfmathresult}         \foreach \i in {0,...,\eval@limit}         {           \pgfmathparse{\qa+1} % \qa += 1           \global\edef\q@{\pgfmathresult} %           \pgfmathparse{\q@} %           \global\edef\qa{\pgfmathresult} %           \breakloop{\qa}{\myarray[\arbitraryarrayvalue]}         }         \pgfmathparse{\qa}         \pgfmath@smuggleone\pgfmathresult       \endgroup     }     \makeatother     \begin{document}     \pgfmathparse{blah(1,1000,9)}\pgfmathresult    %          \pgfmathparse{\myarray[2]}\pgfmathresult     \end{document}


title: Use \ref in PDF images included with \includegraphics

text: I prepare my figures in a drawing tool (OmniGraffle), export them to PDF and then use `\includegraphics` to include them in my tex file (which is compiled using pdflatex). Some of these figures have references to theorems of the text. It would be great if I could just write "Theorem `\ref{thm:foobar}`" in the drawing tool, and have `\ref{thm:foobar}` replaced by the actual number when the PDF file is included during compilation. This is probably not possible, but I figured I might as well give it a try.


title: How do I create a single-page frequency table instead of a long table for LaTeX in Stata?

text: I am using stata 12. I have a very long frequency table that I need to put in the appendix (it's composed of countries), I would like to have this table in one single page as opposed to a very long table for output in LaTeX. That is, instead of having something like this (I omit the \table and \tabular environments and go strictly to the column problem):                   Country &  Frequency\\         \textbf{U.S.} & 4\\         \text{bf{U.K.} & 10\\         \textbf{Uganda} & 7\\         \textbf{Uzbekistan} & 2\\      ... to something like this:                   Country & Frequency & Country & Frequency & Country & Frequency & Country & Frequency\\        \textbf{U.S.} & 4 & \text{bf{U.K.} & 10 & \textbf{Uganda} & 7 & \textbf{Uzbekistan} & 2\\      ... This would be much more economical on paper.


title: \includeonlyproblems{}

text: I have a collection of problems which I use to make tests, homeworks, etc. All problems are in one LaTeX file each problem is in it's own `\begin{problem}\end{problem}` environment. Every time I need to make a new exam/homework I copy-paste problems to a new LaTeX file. It would be much easier if I had `\includeonlyproblems{}` mechanism, similar to what can be found in the LaTeX songs package http://songs.sourceforge.net/ Do you know if something like that already exists?


title: T2A fontshape in verbments listings

text: I'd like to use T2A fontshape inside verbments listings (for comments in source code), but have no luck in this. For the code               \begin{pyglist}[language=haskell]     fact n = foldl 1 (*) [1..n] -- так определяет !n профессор информатики     \end{pyglist}      result with pdflatex is ![enter image description here](http://i.stack.imgur.com/vTTxX.png) result with xelatex is ![enter image description here](http://i.stack.imgur.com/dTsEV.png) Any suggestions how to get plain T2A text in comments?


title: What are underfull hboxes and vboxes and how can I get rid of them?

text: Often, TeX outputs underfull hbox and vbox warnings when running and in the generated log file. What are these and how can I get rid of them?


title: Badbox in TexnicCenter.. How to solve it?

text: After compiling my Project in Latex, I got 206 badboxes of all the types you want. However, I can only see the reference of the Badbox, for example: > Underfull \hbox (badness 1607) in paragraph at lines 439--443   >  \OT1/pbk//l/n/10 K. et al.... In `badness 1607` you can switch the '1607' for 10000, 1609, 1048 and so others... My question is: how to solve too many badboxes? Does TeXnicCenter can tell me what is the problem? Thank you for your replies.


title: How do you specify how many inches from the top each line is?

text: I am trying to use LaTeX to make a title page for my thesis according to the requirements here: http://www.grad.illinois.edu/graduate-college-thesis-requirements As you can see, the formatting requirements specify how far from the top of the page each line must be. How do you specify this in LaTeX?


title: Get current source line number

text: How can I get the current .tex source line number? I want to use it to generate useful error messages in a package I am writing. There are some errors that can only be detected at the end of the document, so I want to create a command that checks for them and tells at what line the error was made. To do that, I need to be able to save the source line number in the command that was misapplied. Preferably a command that can be used like `\sourcelineno` in this example:               \documentclass{minimal}     \newcommand \showlineno {line \sourcelineno}          \begin{document}          You are now at \showlineno.          This paragraph starts at \showlineno, and      some more text,     and runs until \showlineno.           \end{document}      where the output would be               You are now at line 6.          This paragraph starts at line 8, and some more text, and runs until line 10.


title: Show last N rows from input datafile only in \pgfplotstabletypeset

text: I would like to limit the rows in `\pgfplotstabletypeset` to the last N rows. I can skip rows by doing this:               \pgfplotstabletypeset[skip rows between index={0}{4}]{file.data}      But this only works if I know the total row count in advance. As the data file will grow over time I want the table to only contain the last, let's say 12 rows. Truncating the data file is not an option as it is also used in a pgfplot where all rows are relevant. Is there a way to calculate the second parameter to `skip rows between index` based on the total number of rows from the file?


title: Compress a list of page references

text: I'm looking for a pure (La)TeX solution (alas, no LuaTeX) for compressing a list of page references (given with `\pageref`) like `cite.sty` does with citations; that is "Compress lists of three or more consecutive numbers to one number range." The numbers are already sorted and can have up to four digits. Basically what MakeIndex does but in TeX. Input would be like `\pageref{foo}, \pageref{bar}, \pageref{foobar}, \pageref{quax}` (where the delimiter can be choosen as needed) and the output should be something like "1, 2--4".


title: How can I draw paths in Karnaugh maps?

text: I would like to draw something like this: ![enter image description here](http://i.stack.imgur.com/EK10P.png) So I would like to highlight the path from 13 -> 9 -> 11 -> 3. **How can I draw this path in a Karnough map?** edit: It don't has to be done with `kvmacros`, but I would like to have an example with which I can create other Karnaugh maps (with other marks of blocks of ones) without problems. The Karnaugh map was pretty streight forward, although I would rather like the x at the bottom and w at the right.               \documentclass{article}     \usepackage[pdftex,active,tightpage]{preview}     \setlength\PreviewBorder{2mm}          \usepackage[dvipsnames]{xcolor}     \input{kvmacros}          \begin{document}     \begin{preview}         \karnaughmap{4}{$f(w,x,y,z)$}{{$w$}{$x$}{$y$}{$z$}}%         {             1100             1100             0011             0101         }         {             \textcolor{Blue}{                 \put(2,3.5){\oval(3.9,0.9)[]}             }             \textcolor{WildStrawberry}{                 \put(0.9,3.5){\oval(1.7,0.8)[]}             }             \textcolor{Green}{                 \put(0.7,1.5){\oval(1.9,0.9)}             }             \textcolor{Sepia}{                 \put(1.5,1.5){\oval(1.6,0.7)}             }             \textcolor{Red}{                 \put(1.92,1){\oval(0.9,1.9)}             }             \textcolor{LimeGreen}{                 \put(1.76,-0.2){\oval(0.9,2.1)[t]}                 \put(1.76,4.2){\oval(0.9,2.1)[b]}             }         }     \end{preview}     \end{document}


title: '\include' sections of files?

text: Is it possible to include a section of a file? Context: Literature Reviews for thesis, I write long(ish) notes on each paper/article/whatever, but generally have a 'bird's eye view' summary. I'd like to generate a report that just contains these summaries from each individual review file. If there's a better way to lay this out, I would like to hear those too.


title: Subcaption package: compatibility issue

text: There is a compatibility problem between the CIFA document class and the _subcaption_ package. When I compile the following example (with PDFLaTex):                   \documentclass{cifa}              \usepackage{subcaption}              \begin{document}         \begin{figure}         \parbox{4cm}{\subcaption{This is a          subcaption}\label{sub}}              \caption{nothing}         \label{nothing}         \end{figure}              See figure \ref{nothing}: there is \ref{sub} inside...              \end{document}      this warnings are dislayed: > Package caption Warning: Unsupported document class (or package) detected, > > Package caption Warning: \caption will not be redefined since it's already In addition the words "figure" and "subfigure" are displayed AFTER the captions. How to fix this issue?


title: Latex align table within itemize

text: I am trying to write my CV using latex. I have the following problem. I want a table within itemize environment. This is how my code looks:               \documentclass{scrartcl}          \usepackage{tabularx}     \setlength{\tabcolsep}{25pt}     \renewcommand{\arraystretch}{2}          \begin{document}          \section*{Conferences}          \begin{itemize}              \item Oral presentation              \begin{tabularx}{\textwidth}{Xr}               XXXXXXXXXXXXXXXXXXXXXXXXXXXXX, New Orleans & Dec \lq13 \\               YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY & Mar \lq13 \\               ZZZZZZZZZZZZZZZZZZZZZZ, Krakow & Jul \lq11 \\              \end{tabularx}     \end{itemize}          \end{document}      I want the list of conferences to be left aligned with oral presentation and YYY conference to be wrapped. I did not yet try out \moderncv or other cv latex templates.


title: Using LaTeX, can we prevent others from editing pdf file properties?

text: After opening a .pdf file with Adobe Acrobat, go through menu **File** -> **Properties** -> **Description** tab, we can see the fields such as **Author** , **Subject** , **Title** , **Keywords** etc. If the .pdf file is created with LaTeX in the usual way, these fields are editable. How could we prevent this? For example, I have seen some .pdf files with these fields uneditable (grayed out). Maybe they are created with other softwares. Does LaTeX offer such functionality? I know maybe I can use Adobe Acrobat to post-process the .pdf file generated by LaTeX, using password to add some restrictions. However, I don't quite need password protection. I just don't want someone else to change the **Author** field. And I want to have it all set up in LaTeX itself. After looking at another thread, I found the solution: Use PDFtk(www.pdflabs.com). I only tried its Windows version. The Windows version comes with 3 kinds: PDFtk Free(GUI, free, limited functions cannot encrypt/decrypt), PDFtk Pro(GUI, not free, unlimited functions), PDFtk Server(command line, free, unlimited functions). I recommand the command line version. For example: `pdftk unsecured.pdf output secured.pdf owner_pw abcd1234` will generate the file secured.pdf from the original file unsecured.pdf, and secured.pdf is encrypted with the owner password (please distinguish between owner password and user password) "abcd1234". By default it encrypts everything. However, it seems that whitespace is not allowed in the password.


title: How to enable security in LaTeX using pdflatex 1.40.14

text: I want to disable copy/write/edit ... option in my `.pdf` document. I don't want the document to be password protected ... I am using LaTeX to produce the document. Here is the shapshot of the document-properties that I would like my document to have ... ![snapshot of document properties](http://i.stack.imgur.com/ntVtn.jpg) I have tried with adobe acrobat ... but somehow I am not able to achieve the same document security properties ...


title: How to mark and secure a PDF document for distribution?

text: This might not be a 100% LaTeX question since it is a matter of PDFs, but I think that the LaTeX crowd is the most appropriate audience for it. I have an unpublished research paper that I am writing in LaTeX, and I have to send its PDF to some people whom I don’t trust completely, so I am paranoid that someone will copy it. I would like to secure it in the sense that the text, table and figures cannot be copied, i.e. that the paper is rendered useless. Both "technical" (e.g. protect pdf) and other (e.g. change irrelevant text in the paper to produce a different version) solutions are seeked. I know that the safest way is just not to send it around, but I have to, and frankly, I have no clue what to do here. I also know that each PDF can be locked, but that can be easily broken. Putting diagonal watermarks across the whole pages is also not a solution because text and images can be copied, and watermarks destroy the readability. Another thing would be to put watermarks on raster figures directly in the file, so they are useless if copied. Do you have a solution for this? What did you do in similar situations?


title: Secure the pdf produced by Latex

text: > **Possible Duplicate:**   >  How to set security options to create PDF using pdflatex I was wondering if there are any provisions for securing the pdf generated by Latex? I mean secure it from copying, or printing (I know that sounds ridiculous but still I was curious) or secure it using a password or all of these? Is that possible?


title: Get the number of columns of a table

text: Consider the following plots               \documentclass{article}     \usepackage{pgfplots}          \begin{document}           \pgfplotstableread{     1 3 6 4     2 2 5 2     3 4 4 1     4 5 2 3     }\table          \begin{tikzpicture}       \begin{axis}         \foreach \i in {1,...,3}{%           \addplot table[x index=0,y index=\i] {\table};                                 }       \end{axis}     \end{tikzpicture}          \end{document}      I would like to use it as a template for input files of varying number of columns. For this I need to replace the `3` ine the `foreach` command by the number of columns of the loaded table. Is there something similar to `\pgfplotstablecols` that would be understood in this environment?


title: Using a picture as the page border for an entire document

text: I've got a LaTeX document, and I've been given a PNG file consisting of a page border with a big transparent section in the middle. Is it possible to use LaTeX to add that image to every page, with the actual content in the transparent section; or will I have to create the PDF with LaTeX and then manually add the border in some other way?


title: «» resemble too much \ll \gg

text: I am typesetting a translation of some ancient poetry book from another language (namely Finnish). In the text there are several quotes which uses the Guillemets (« and »). Since I am using a UTF-8 encoded document (with `\usepackage[utf8]{inputenc}`) in my text there are directly those symbols. Upon rendering, however, the symbol closely resemble `\ll` and `\gg`, that is "much smaller than" and "much greater than". Is there a way for me to obtain something more similar to « and » ?


title: Biblatex citation order

text: I'm having some problem with my biblatex order of citation. Using this configuration:               \documentclass {article}     \usepackage[brazil]{babel}     \usepackage[utf8]{inputenc}     \hyphenation{es-ta-bi-li-da-de}     \usepackage{setspace}     \singlespacing     \usepackage[natbib=true,style=numeric]{biblatex}     \addbibresource{frameworks.bib}      Being frameworks.bib this:               @Article{JONHSON88,     author = {Ralph Johnson, Brian Foote},     title = {Designin Reusable Classes},     journal = {Journal of Object-Oriented Programming SIGS},     year = {1988},     key = {Johnson:88},     volume = {1},     number = {5},     pages = {22-35},     month = jun     }          @book{UML-F:00,     author = {Fontoura M., Pree W., Rumpe B.},     editor = {Addison-Wesley},     title = {The UML Profile for Framework Architectures},     year = {2000},     }      My pdf is generated with a text like:               Something about something[4], and moo foo other children[1].      This citation `[4]` is the first in all text. How can I order this correctly to `[1]...[2] ...`? Thanks in advance.


title: How to order citations in biblatex according to their appearance?

text: I use the package biblatex for my bibliography. It has four bibliographic stiles (numeric, alphabetic, authoryear and authortitle, I use numeric) and every of them orders the citations alphabetically, according to the author's surname. I need to order the citations according to the order in which they appear in the text (the order of citation). How to? Modifying any property of the stiles? Thanks.