title: Xetex and Times New Roman font

text: I want to create a document using latex, but I discovered that latex only works with plain ascii, and my native language is not English :) So I tried xetex instead (with example from here). The problem is, I do not have the font that example requires. What should I add to the beginning section of my .tex file to get a proper font - Times New Roman for example?


title: Is it possible to adjust natively the size of the PDF file during compilation with pdflatex?

text: I am a beginner in LaTeX, tentatively using it for industrial documents. I am working on a laboratory report containing little text and a large number of pictures. I prefer to leave the pictures at their native quality level for archival purposes and because a number of them get magnified by the elegant routines found at this link: How to create magnified subfigures and corresponding boxes for portions of a large image I typically get a PDF file directly using `pdflatex`. The `.pdf` file I am working on contains 9 pages and has a size of 9000 KiB. Post-processing the `.pdf` file with the routine below (launched from the same directory), and using the "prepress" option, I get a file size of about 6500 KiB, and 3500 KiB with the setting "printer". I could not find any drop of quality with each of these two settings (there are two lower quality options available, "ebook", and "screen"), when printed on A3 paper with a 600 dpi laser printer, and I would like to get the "printer" quality natively (directly at the creation of the PDF files), in order to eliminate the post-processing operation. Is there a way to do this?               /usr/local/bin/gs -q  -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite        -PDFSETTINGS=/printer -sOUTPUTFILE=NameOfOutputFile.pdf         -f NameOfTargetFileToOptimize.pdf


title: adjust the array size to the size of the frame+Beamer

text: I inserted a table into a page of a presentation Beamer but the problem is that the array size exceeds the frame. How to adjust the array size to the size of the frame?


title: beamer | One Block displayed, the other covered

text: I want that when the first block is displayed, the second is gray, and vice versa.               \documentclass{beamer}     \usepackage[frenchb]{babel}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{epsfig,pslatex,colortbl}     \usepackage{graphics}     \usepackage{graphicx}%pour les includegraphics     \usepackage{array}     \usepackage{beamerthemesplit}      \usepackage{multicol}          \usetheme{PaloAlto}     \usecolortheme{orchid}     \begin{document}     \begin{frame}[t]{General formalization of haplotyping.}     \begin{block}{Inputs}     \begin{itemize}     \item A \alert{genotype matrix} $G$.     \item The \alert{rows} of the matrix are \alert{taxa / individuals}.     \item The \alert{columns} of the matrix are \alert{SNP sites /         characters}.      \end{itemize}     \end{block}     \begin{block}{Outputs}     \begin{itemize}     \item A \alert{haplotype matrix} $H$.     \item Pairs of rows in $H$ \alert{explain} the rows of $G$.     \item The haplotypes in $H$ are \alert{biologically plausible}.      \end{itemize}     \end{block}     \end{frame}     \end{document}      When I use the code above, the two blocks appear together. But, I want the first block is displayed while the second is covered. Then, The first is covered and the second is displayed. any help?


title: Commenting out all blank lines not TeXnically necessary?

text: This is a follow-up to this question on commenting out empty lines vs. \noindent. Given that I have now begun commenting out lines surrounding environments like this:               \documentclass{article}          \begin{document}          Some body text. Let's introduce a quote:%     %     \begin{quote}     Some quote text.     \end{quote}     %     Some text following the quote.          \end{document}      I wonder whether there is any harm in commenting out _all_ empty lines not serving a TeXnical purpose in my source, like so:               \documentclass{article}          \begin{document}     %     Some body text. Let's introduce a quote:%     %     \begin{quote}     Some quote text.     \end{quote}     %     Some text following the quote.     %     \end{document}      I vaguely remember reading a question a while back where it was noted that you might hit something like a character limit on comments (maybe someone can point me to that again?) in longer documents, which might be something to worry about. Are there any downsides to commenting out TeXnically unnecessary empty lines in my source?


title: Why LaTeX is the winner?

text: When `LaTeX` was LaTeX 2.09, AMSTeX seemed for me to be deeper. Tools for a beautiful math were advanced and the manual by Michael Spivak reminded in its beauty _The TeXbook_. But LaTeX have won and now AMSTeX macros are only additional packages. What is the source of such a success? I am afraid that I am still missing some LaTeX subtleties, hence this question. Reasons I can quess are labelling system and many packages even about twenty years ago, but it is not enough for me to understand the source of this success. _Remark:_ And it seems that there is a local threshold: 50000 questions.


title: show ref in tex

text: For example I have some equation               \begin{equation}\label{myequation}     \end{equation}      In `.dvi` file it would be numbered, for example, (1.10). If I would like that it would marked as `[myequation]`, how can I do it?


title: Write content of box to a file

text: I would like to take the contents of a box generated with `\begin{lrbox} ... \end{lrbox}` and write it to a file. The use case is a question and answer environment, where the answer should be collected and showed at different location in the document. In addition I would like to show the answer next to the question. Therefore I pack the question into a box, and then I assume that the contents of this box can both be used inside the environment and for storing the data in an external file. But the last part is the reason for this question. The approach I have used this far is the `newfile` package and the code below. The problem is that what is written to test3.comment is the following               \unhbox \voidb@x \copy \myboxquestion \relax       Almost working code               \documentclass{article}     \usepackage{newfile}     \newoutputstream{comment}     \openoutputfile{\jobname.comment}{comment}          \newsavebox{\myboxquestion}     \newenvironment{question}{%     \begin{lrbox}{\myboxquestion}\begin{minipage}{\linewidth}}{%     \end{minipage}\end{lrbox} \par\usebox{\myboxquestion}     % What to do here?     \addtostream{comment}{\usebox{\myboxquestion}}}          \setlength{\parindent}{0.0cm}          \begin{document}          Testing     \begin{question}     What is 3 + 4     \end{question}               \section{Collected}     \input{\jobname.comment}          \end{document}


title: A circular table? (where the rows form concentric circles)

text: I would need to make a table where the rows consist of concentric circles. That is, row 1 is forms the innermost circle; row 2 the second circle; row 3 the third circle and so on. The columns would thus form pizza slices meeting in the center of the circles. What I'm trying to do is to recreate a series of tables on the basis of the one pictured below (for what it's worth, the table is from a Jesuit work published in China in 1626). The five instances of one and the same letter ("a", "e", "i" etc) would all be in the same column but on different rows. I would provide some kind of elementary MWE if I could, but I don't know where to start. I'd appreciate any help I can get. Thank you! ![enter image description here](http://i.stack.imgur.com/Tgvtc.jpg)


title: In Tikz, how to make the text on an edge have the same direction as the edge's?

text: I have created a simple node-edge graph in which I would like to have the texts on each edge aligned to the direction of the edge.               \documentclass[class=minimal,border=0pt]{standalone}     \usepackage{pgf}     \usepackage{tikz}     \usetikzlibrary{arrows,automata}     \usepackage[latin1]{inputenc}     \begin{document}          \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm,                         semithick]       \tikzstyle{every state}=[fill=red,draw=none,text=white]            \node[state]         (D)                     {$D$};       \node[state]         (C) [below right of=D]  {$C$};       \node[state]         (B) [above right of=D]  {$B$};       \node[state]         (A) [below right of=B]  {$A$};            \path (D) edge              node {tdc} (C)                         (B) edge              node {tbc} (C)             (C) edge              node {tca} (A);     \end{tikzpicture}          \end{document}      For example, I would like the text `tbc` rotates `-90` degrees automatically to be aligned to the direction of the edge connects the node `B` to the node `C`. Is that possible?


title: How can I stop content overlapping my footer?

text: I am trying to use LaTeX to generate PDF versions of cheat sheets people build on my website. They are all three column documents, effectively each containing multiple tables. For the most part, LaTeX handles the dividing of content into columns really well. However, sometimes some blocks overlap the footer. I have a test document (built with lualatex, based on this tex file), and you can see on page 2 in the first column the "Directives" block overlaps the footer. I've tried a few different things to resolve this. The closest solution was adding an mbox after each table, as in this PDF (from this tex file). As you can see, there is no longer an overlapping issue. However, on page 3 there is now a gap at the top of column 2. Does anybody have an idea how I can stop columns overlapping the footer without introducing odd gaps at the top of some columns?


title: Suppress modification of listings in draft mode

text: In reference to this: HERE How can I suppress draft mode from altering my input listings, or, at least rendering a box of the same size as what the listing would occupy. Draft mode is very useful for all sorts of reasons, but my document gets modified too heavily when the listings get reduced to a single line....


title: Include extra line when using newpage in longtable

text: I'm trying to change the `longtable` environment to always produce this row as a first row of cells:               \begin{tabular}     \textcolor{blue}{\textbf{R}} code & Syntax & Gebruik & Is vector & Link \\     \\     \hline     \end{tabular}      What I'm trying to achieve is shown below, using the `tabular` environment instead of `longtable`.               \documentclass{ltxdoc}     \usepackage{xcolor}     \usepackage{geometry}          \newcommand{\tabpageskip}{                             \end{tabular}%                             \newpage%                             \noindent  \begin{tabular}[h]{l p{5cm} p{5cm} c c}                              \textcolor{blue}{\textbf{R}} code & Syntax & Gebruik & Is vector ? & Link \\%                             \\%                             \hline%                             }%          \begin{document}               \noindent \begin{tabular}[h]{l p{5cm} p{5cm} c c}      \textcolor{blue}{\textbf{R}} code & Syntax & Gebruik & Is vector & Link \\     \\     \hline     \\     \texttt{?} & \texttt{?\textcolor{blue}{<commando>}} & {Het opzoeken van \textcolor{blue}{\textbf{R}} commando's} && {$\leftarrow$}      \\     \\     \texttt{apropos()} & \texttt{\textcolor{blue}{apropos(}"\textcolor{cyan}{<commando>}"\textcolor{blue}{)}} & {(Deel van een) commando opzoeken} &  & {$\leftarrow$} \\     \\     \\     \texttt{as.table()} & \texttt{\textcolor{blue}{as.table(}\textcolor{cyan}{<array>}\textcolor{red}{)}} & {\textbf{\textcolor{blue}{R}} vertellen dat je de gegevens als een tabel wil lezen: read \texttt{as.table()}!} & $\surd$ & {$\leftarrow$} \\     \\     \\     \texttt{barplot()} & {\texttt{\textcolor{blue}{barplot(}\textcolor{cyan}{<functie>},} \texttt{\textcolor{green}{col=c(}\textcolor{red}{"<kleur>",...}\textcolor{green}{)}\textcolor{blue}{)}}} & {Barplot maken (histogram, maar dan kolommen {apart}) Verschillende kleuren\label{anchor.kleurspec} instellen met de \textbf{engelse} namen, bijv.: \texttt{"brown"}} &  &  \\     \\     \\     \texttt{binom.test()} & {\texttt{\textcolor{blue}{binom.test(}\textcolor{cyan}{<tabel>},}  \texttt{\textcolor{green}{p=<waarde>}\textcolor{blue}{)}}} & {Gesorteerde data tabel onderwerpen aan binomiaal test Hypothetische kans op succes (nulhypothese)} & $\surd$ & {$\leftarrow$} \\     \\     \\     \texttt{c()} & \texttt{\textcolor{blue}{c(}\textcolor{cyan}{<getal>},\textcolor{cyan}{ <getal>},\textcolor{red}{...}\textcolor{blue}{)}} & {Handmatig een array maken. Voor langere getallen, gebruik \texttt{array()}} & $\surd$ & {$\leftarrow$} \\     \tabpageskip     \\     \texttt{colSums()} & {\texttt{\textcolor{blue}{colSums(}\textcolor{cyan}{<functie>}\textcolor{blue}{)}}} & {Optellen van kolommen van een matrix. Voor rijen, gebruik: {\texttt{rowSums()}$\rightarrow$}} & $\surd$ &  \\      \\     \\     \texttt{dbinom()} & {\texttt{\textcolor{blue}{dbinom(}\textcolor{cyan}{<getal>},} \texttt{\textcolor{green}{size=<waarde>},}  \texttt{\textcolor{red}{prob=<waarschijnlijkheid>}\textcolor{blue}{)}}} & {Kans op deze waarde bij zovaak proberen kans op succes} & $\surd$ & {$\leftarrow$} \\      \\     \\     \texttt{expand.grid()} & {\texttt{\textcolor{blue}{expand.grid(}}  \texttt{\textcolor{cyan}{<getal>}:\textcolor{green}{<getal>},\textcolor{red}{...}\textcolor{blue}{)}}} & {Aftellen meerdere dobbelstenen Minimale en maximale getal voor je `dobbelsteen'} &  & {$\leftarrow$} \\     \\     \\     \texttt{file.choose()} & \texttt{\textcolor{blue}{file.choose(}"\textcolor{cyan}{<bestand>}"\textcolor{blue}{)}} & {Bestanden laden in \textcolor{blue}{\textbf{R}}} && {$\leftarrow$} \\     \\     \\     \texttt{help()} & \texttt{\textcolor{blue}{help(}\textcolor{cyan}{<commando>}\textcolor{blue}{)}} & {Het opzoeken van \textcolor{blue}{\textbf{R}} commando's} && {$\leftarrow$} \\     \\     \\     \texttt{hist()} & {\texttt{\textcolor{blue}{hist(}\textcolor{cyan}{<functie>},}  \texttt{\textcolor{green}{breaks=}\textcolor{red}{<getal>},} \texttt{\textcolor{violet}{freq=}\textcolor{purple}{<logische waarde>}\textcolor{blue}{)}} } & {Histogram tekenen  Grootte van de balkjes aangeven, zie {$\leftarrow$}  \texttt{\textcolor{purple}{TRUE}}: plot de frequenties en \texttt{\textcolor{purple}{FALSE}}: plot verhouding tot geheel} & & {$\leftarrow$} \\     \\     \\     \texttt{layout()} &  \texttt{\textcolor{blue}{layout(}\textcolor{cyan}{<matrix>}\textcolor{blue}{)}} & {Aanpassen van je grafische interface met de vorm van deze matrix} & & {$\leftarrow$} \\     \end{tabular}     \end{document}      I have checked `longtable.dtx` and believe here is where the magic happens (lines 63-74):               \let\LT@@tabarray\@tabarray     \let\LT@@hl\hline     \def\@tabarray{%     \let\hline\LT@@hl     \let\multicolumn\LT@mcol     \LT@@tabarray}%     \let\\\LT@tabularcr\let\tabularnewline\\%     \def\newpage{\noalign{\break}}%     \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}%     \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}%     \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption     \@tempdima\ht\strutbox     \let\@endpbox\LT@endpbox      How can I and where should I add my line here? And as part of what argument? I tried `\def\newpage{...\<mycode>}`, but that wouldn't fly so well.


title: Upgreek symbol in text mode and display mode should be Roman

text: In latex ell symbol are shown to be italic font. But We want that symbol to be Roman. I have tried in upgreek style but not yet that output. How to get it Roman?


title: Too much vertical space before \part when using \marginpar

text: When I use a `\marginpar{...}` before `\part{...}` on a new page, I get a big space on the top of that page. Below is a screenshot, where the left one was typeset with `marginpar`, the right one without: ![screenshot](http://i.stack.imgur.com/qhWXc.png) Code:               \documentclass{article}     \usepackage[showframe]{geometry}     \usepackage{lipsum}     %\usepackage{marginnote}     \begin{document}          % too much space before part:     \marginpar{Lorem\\Ipsum}     \part{Lorem Ipsum Dolor}     \lipsum[5]     \pagebreak          % without marginpar     \part{Lorem Ipsum Dolor}     \lipsum[5]     \pagebreak          % marginpar after part (not possible for me):     % everythink ok, no vertical spacing     \part{Lorem Ipsum Dolor}     \marginpar{Lorem\\Ipsum}     \lipsum[5]          \end{document}      I have the same problems with the `marginnote`-package. If I put the `\marginpar` after the `\part`-command, everything works fine – but this is not possible for me. (I `\input`/`\include` the parts and the marginpars show the filename and some information for that file.) Is it possible to remove all the space above a `\part`? **Edit** - some additionally information I need this for lecture notes. I have one main file `lecture.tex` which inputs every lecture from a separate .tex-file (`2013-05-08.tex`, `2013-05-10.tex` etc). Before every `\input`, I want to display the date ( = the filename) and the number of the lecture ( = a counter) using `\marginpar`. Everything works as expected, but when the external file begins with a `\part` (a new chapter in the lecture), I get this supplementary space. Not every lecture begins with a new chapter. I wanted to keep my question as general as possible, that's because I haven't written this before.


title: Simpler Way In Creating My Chart In LaTeX

text: Below is the code for a chart that I created using LaTeX. I am creating use cases for my program, and there are 117 use cases that I need to create. It would be possible to use the below code, but it will be really tedious to fill in the information for each, between all the code. My question, is there a better way to have the default layout of my chart the same as below but somehow creating my own tabular function with these specficaitons. So then I can just insert the information and not worry about getting all lost in the code. This is my first big project (300+ pages), with LaTeX, its a really cool documenting program, much better then Microsoft!! ![enter image description here](http://i.stack.imgur.com/tu4Mn.png) Thanks in advanced!               \begin{tabular}[!ht]{l p{10cm}}     \rowcolor{orange!90}\textcolor{white}{\textbf{Identifier/Name}} & \textcolor{white}{\textbf{UC1 - Login}}  \\      \textbf{Importance} & 5/5\\     \rowcolor{lightgray}\textbf{Difficulty} & 1/5\\     \textbf{Actor(s)} & Generalized User\\     \rowcolor{lightgray}\textbf{Goal} & To allow the user to access the system.\\     \textbf{Preconditions} & The user is at the login page. \\     \rowcolor{lightgray}\textbf{Summary} & Will validate the users name and password and subsequently give them access to the system.\\     \textbf{Steps} &      {\begin{tabular}{p{4cm} | p{4cm}}     1. User provides username and password. & 2. System directs user to main system page. \\     \end{tabular}} \\     \rowcolor{lightgray}\textbf{Postcondition} & \textbf{Success:} User is logged in. \newline \textbf{Failure:} The system reamins at the login state. \\          \end{tabular}


title: Space from line

text: How can i obtain the correct spacing of the two writings from the line? if you note the upper write is more far from the line...               \documentclass[a4paper]{memoir}         \RequirePackage[babel=true,tracking=true]{microtype}         \RequirePackage{fixltx2e}         \newcommand{\ThinRule}{\rule{0.5\textwidth}{0.4pt}}         % Tracking (font spacing)         \newcommand{\textlslarge}[1]{\textls[100]{#1}}         \begin{document}     \begin{center}       \begin{minipage}{\textwidth}         \centering         \fontsize{22pt}{24.85pt}\selectfont         \vfill         \textsc{\textlslarge{Di \\ Isaac Newton}} \\     %    \vspace{-0.4cm}         \ThinRule \\         \textsc{\textlslarge{Londra, MMXII}}       \end{minipage}     \end{center}     \end{document}


title: Arara problem with xelatexmk rule

text: After many tests in Mac OS X and Ubuntu, I haven't been able to run `arara` with Brent Longborough's `xelatexmk.yalm` rule. No matter what I do, `arara` seems to run `latexmk` **with`pdflatex`**, not with `xelatex`. I've discussed the issue with Brent, who kindly gave me the assistance he could, but to no avail. (This issue doesn't happen to him, even when using my files!) I am not using any `.latexmkrc` file for the tests. If I try to use other of `arara`'s rules (e.g., `xelatex.yalm`), they work without problem. There's something with my system (systems!), or with my setup, which doesn't allow me to use Brent's `xelatexmk.yalm` rule. Any ideas? This is my MWE:               % arara: xelatexmk     \documentclass{article}     \usepackage{xltxtra}     \begin{document}        Testing . . .     \end{document}      Here is my compilation log file, for this run: http://pastebin.com/jXYPQhAz Here is `arara`'s log file: http://pastebin.com/VYMi4Xca This is my `xelatexmk.yalm` file:               !config     # LaTeXmk with XeLaTeX rule for arara     # author: Brent Longborough     # last edited by: Brent Longborough     # made to work by: Paulo Cereda     identifier: xelatexmk     name: XeLaTeXmK     command: 'latexmk -e "$pdflatex=q/xelatex @{ action == "" ?  "" : "--interaction=" + action  } @{shell} @{ synctex == "" ? "--synctex=1" : synctex } @{expandoptions} %O %S/" @{ist} -pdf @{file}.tex'     arguments:     - identifier: action       flag: '@{value}'     - identifier: shell       flag: '@{value.toLowerCase() == "yes" || value.toLowerCase() == "true" || value.toLowerCase() == "on" ? "--shell-escape" : "--no-shell-escape" }'     - identifier: synctex       flag: '@{value.toLowerCase() == "no" || value.toLowerCase() == "false" || value.toLowerCase() == "off" ? "--synctex=0" : "--synctex=1" }'     - identifier: expandoptions       flag: '@{value}'     - identifier: ist       flag: '-e "$makeindex=q/makeindex %O -s @{value}.ist -o %D %S/"'      I'm using `TeXLive` 2012 (all updates) in `Ubuntu` 12.04 LTS `Precise Pangolin` (all updates). And `MacTeX` 2012 (all updates) in `OS X Mountain Lion` (all updates). Also, I'm using the latest versions of `arara` (v.2.0) and of `latexmk` (v.4.31).


title: building a box a bit special

text: I'm trying to build in latex this box: ![enter image description here](http://i.stack.imgur.com/7YhYj.jpg) I have been trying with this code:               \noindent\begin{tabular}{|c|c|c|c|}\hline      \enc{cyan}{ NOMBRE }&\enc{cyan}{ $\text{1}^{\text{er}}$ APELLIDO } & \enc{cyan}{ $\text{2}^{\text{do}}$ APELLIDO } & \enc{cyan}{ CARN\'{E}/C\'{E}DULA } \\       \hspace{4cm} & \hspace{4cm} & \hspace{4cm} & \hspace{5cm} \rule[10pt]{0pt}{12pt}\\\hline     \end{tabular}          \vspace{0.25cm}          \noindent\begin{tabular}{|c|c|c|}\hline      \enc{cyan}{ CENTRO UNIVERSITARIO }&\enc{cyan}{ GRUPO} & \enc{cyan}{FECHA } \\       \hspace{8cm} & \hspace{4cm} & \hspace{5cm} \rule[10pt]{0pt}{12pt} \\\hline     \end{tabular}     \vspace{0.25cm}          \noindent\begin{tabular}{|c|c|}\hline      \enc{cyan}{ NOMBRE DEL PROFESOR QUE APLICA EL EXAMEN}&\enc{cyan}{FIRMA } \\        \hspace{13cm} &  \hspace{4.1cm}  \rule[10pt]{0pt}{12pt}\\\hline     \end{tabular}      But, actually, this is not a "box", and I have problems with the vertical lines (it has not the same place). I thought to use the command `\begin{tabular}{|c|c|c|} \end{tabular}` but with this code I can not use an exactly hspace (I think). What can I do?


title: Centering a table while ignoring the 1st column in centering procedure

text: I want a table to be centered except I don't want the first column to be considered in the centering procedure. That is, I want columns 2 to N to be centered perfectly, and column 1 to be hanging off in the left margin. I also want the table heading and text at the bottom of the table to be aligned with the 2nd column onwards (so clearly I don't want the heading/caption to begin from the left margin or the 1st column). This is the table that I'm working with:                 \documentclass[a4paper,11pt]{article}         \usepackage{color,amsmath,amsfonts,amssymb}         \usepackage[english]{babel}      \usepackage{graphicx}      \usepackage{natbib}      \usepackage{rotating}      \usepackage{colortbl}      \usepackage{booktabs,dcolumn,caption}      \usepackage{expdlist}  %expanded list environment      \usepackage{pdflscape} %landscape single pages      \usepackage{lscape}      \usepackage{longtable} %multipage table      \usepackage{setspace} %for \singlespacing      \usepackage{pdfpages} %For slides           \usepackage[margin=1in]{geometry}      \usepackage{setspace}      \setstretch{1}           \captionsetup{labelsep=newline,singlelinecheck=false} % optional      \newcolumntype{d}[1]{D{.}{.}{#1}} % "decimal" column type      \renewcommand{\ast}{{}^{\textstyle *}} % for raised "asterisks"      \newcommand{\aast}{\ensuremath{{}^{\textstyle **}}}      \newcommand{\aaast}{\ensuremath{{}^{\textstyle *}}}      \newcommand{\kon}{\ensuremath{{}^{\textstyle ?}}}  %DELETE           \newcommand{\C}[1]{\multicolumn{1}{c}{#1}} % abbreviations                \newcommand\Ya{\C{Yes}}      \newcommand\Yb{\C{Yes\aaast}}      \newcommand\Yc{\C{Yes\aast}}      \newcommand\Yk{\C{Yes\kon}} %DELETE           \setlength{\LTleft}{0pt}      \setlength{\LTright}{0pt} %full margins           \oddsidemargin 0.5cm %      \evensidemargin 0.5cm %      \textwidth 15cm %      \topmargin  -0.2in  %      \textheight 23.5cm %      \headheight 15pt %                \doublerulesep2pt                     \begin{document}      \renewcommand{\baselinestretch}{1.1}           \fontsize{11}{16pt} \selectfont           \footnotesize      %%\begin{mdframed}[backgroundcolor=Gray,hidealllines=true]      \noindent      \begin{longtable}{@{} ll @{\extracolsep{\fill}} *{9}{d{5}} @{}}      \caption{TABLE HEADING....} \\      \cmidrule[\heavyrulewidth]{2-11}      & & \multicolumn{9}{c}{Insert formula here} \\      \cmidrule{3-11}      & &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1} \\      \cmidrule{2-11}      \endfirsthead      \multicolumn{2}{@{}l}{\emph{(continued)}} \\      \cmidrule[\heavyrulewidth]{2-11}      & & \multicolumn{9}{c}{$\tau$} \\      \cmidrule{3-11}      & &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1}      &  \multicolumn{1}{c}{0.1} \\      \cmidrule{2-11}      \endhead      \cmidrule[\heavyrulewidth]{2-11}      \multicolumn{5}{r@{}}{\emph{(continued)}}      \endfoot      \cmidrule[\heavyrulewidth]{2-11}      \endlastfoot      & \textbf{Subheading} \\      & Indic  & -0.020\aast & 0.020 & 0.020\aast & -0.020 & (0.020) & (0.020) & (0.020) & (0.020) & (0.020) \\      $\beta(\gamma)$ & Indic      \\      $\gamma(\gamma)$ &    \\      $\beta(\gamma)$ & Indic      \\      $\gamma(\gamma)$ &    \\      & Indic\textrm{   }  \\      \end{longtable}           \noindent      \vspace{-0.8cm}           {\noindent ASDOJSADIOJDAID}           \end{document}


title: Headers with chapter titles only

text: I am using memoir and there is a problem with the headers. I see section titles in the headers but I only want to see chapter titles regardless of section titles in the chapter. My tex file is included below. What I want is to have "Short chapter title" appear in the header of all pages in Chapter 1, but instead I get section and subsection titles from file chapter1.tex. How can I fix that?               \documentclass[11pt,a4paper,oldfontcommands]{memoir}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{subfig}     \usepackage{psfrag}     \usepackage{color}          \OnehalfSpacing          \begin{document}          \chapter[Short chapter title]{Long chapter title}     \input{chapter1.tex}          \bibliography{b}      \bibliographystyle{acm}           \end{document}


title: eledmac package: \pausenumbering and \resumenumbering

text: I'm using the `eledmac` package to typeset a rather large work of theology. For simplicity and the sake of a MWE, I'm just using the two stanza poem below. **Intended outcome** : Between sections that are line numbered, I would like to interpose text that is not line numbered. Typically, one would do this using the `\beginnumbering` and `\endnumbering` commands. However, these commands reset the line numbers back to 0 (or 1?). I would like the line number to resume after the interposed, non-line-numbered text. According to the `eledmac` manual, page 11, I should be able to use the commands `\pausenumbering` and `\resumenumbering` to accomplish this. **Problem statements** :   1. The manual seems to contradict itself (again, see page 11). It says, "Use `\pausenumbering` only between numbered paragraphs." It also says, "We have defined these commands ... in case you find it necessary to insert text between numbered sections without disturbing the line numbering."   2. In either use case, i.e., whether using `\pausenumbering` and `\resumenumbering` between numbered paragraphs _or_ with interposed text, I get error messages.   3. The variations on errors follow:     * If compiled as submitted in the MWE below (using `PDFLaTeX` in all cases), line numbering stops at line 10, does not resume with "Little Lamb, I'll tell thee ...", and I receive the error `line 45: Extra \endgroup \endgroup`.     * If I comment out the "offending" `\endgroup` on line 45, the error message goes away, but line number still does not resume.     * Trying to use process of elimination, if I comment out the interposing text and the `\endgroup` command, I get no errors, but line number still does not resume. A few final points:   * I have changed the `memoir` document class to both `article` and `book`, but no joy.   * Yes, I know that `eledmac` is a 3-pass system.   * I've tried replacing the use of `\autopar` with the `\pstart` and `\pend` pair, still no joy. Beside, the actual work will be several hundred pages and I definitely don't want to have to mark every paragraph!   * I have tried to search this site for something relevant and haven't been able to do so.              \documentclass{memoir}          \usepackage{eledmac} % Version 1.10.3, dated 2014-04-07          \begin{document}          \textbf{The Lamb}          \emph{William Blake}          \begingroup     \beginnumbering     \autopar     \firstlinenum{1}     \linenumincrement{1}          Little Lamb, who made thee\\     Dost thou know who made thee,\\     Gave thee life, and bid thee feed\\     By the stream and o'er the mead;\\     Gave thee clothing of delight,\\     Softest clothing, woolly, bright;\\     Gave thee such a tender voice,\\     Making all the vales rejoice?\\     Little Lamb, who made thee?\\     Dost thou know who made thee?          \pausenumbering          This is a line between the two stanzas that should \emph{not} be number, because it is prefaced with the \verb|\pausenumbering| command.          \resumenumbering          Little Lamb, I'll tell thee;\\     Little Lamb, I'll tell thee:\\     He is called by thy name,\\     For He calls Himself a Lamb\\     He is meek, and He is mild,\\     He became a little child.\\     I a child, and thou a lamb,\\     We are call\'ed by His name.\\     Little Lamb, God bless thee!\\     Little Lamb, God bless thee!          \endnumbering     \endgroup          \end{document}


title: Inserting a landscape table into a two-column document

text: I have a table that takes up the length of a normal sheet of paper (when in landscape) and is only as wide as a single column. I would like to insert the table in landscape mode into one column of the LaTex document while still using the second column for the actual writing part. Any suggestions as to how this might work?


title: Some problem with tikzpicture

text: I don't know how can use tikpicture package to draw 2 figure below: ![enter image description here](http://i.stack.imgur.com/uS34M.jpg) Please help me draw them. Thank you so much.


title: Simulating hand-drawn on curve lines, make a cycle AND fill it if necessary

text: Reading this question : Simulating hand-drawn lines and following Percusse's idea I tried this : ![enter image description here](http://i.stack.imgur.com/lNSoU.png) ![enter image description here](http://i.stack.imgur.com/bfORI.png) But is it possible to "hide" the multido code in a style command and pass the parameters throu `keys`. By the way, for a `step` of 0.01, there is 101 marks but for a `step` of 0.2 there is only 50, and the line doesn't go to the end ?               \documentclass[tikz]{standalone}     \usepackage{}     \usetikzlibrary{decorations.markings}          \begin{document}          \begin{tikzpicture}[decoration={markings,     mark=between positions 0 and 1 step .01 with {     \node at (0,.3pt*rand) [coordinate,     name=mark-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}]     {};}}]     \draw [help lines] grid (3,2);     \draw [postaction={decorate},help lines] (0,0) -- (3,1) arc (0:180:1.5 and 1);     \draw[smooth] [red] (mark-1)         \foreach \i in {2,...,101} {-- (mark-\i) } ;     \end{tikzpicture}          \begin{tikzpicture}[decoration={markings,     mark=between positions 0 and 1 step .01 with {     \node at (0,.4pt*rand) [coordinate,     name=mark-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}]     {};}}]     \draw [help lines] grid (3,2);     \path [postaction={decorate}] (0,0) -- (3,1) arc (0:180:1.5 and 1) -- cycle ;     \draw[smooth,red,fill=red!15] (mark-1)         \foreach \i in {2,...,101} {-- (mark-\i) } ;     \end{tikzpicture}          \end{document}


title: Why does the meaning of "above" seem to change when my "shift" coordinate changes?

text: The only difference between these two examples is the size of the `xshift`. The MWE with `xshift=-1.5in` and `xshift=-1.0in` places the text where I expect, but not with `xshift=-0.75in` and `xshift=-0.5in`: ![enter image description here](http://i.stack.imgur.com/CpOry.png) Could someone explain why the interpretation of `above` is being changed?               \documentclass[border=8pt]{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}     \pagestyle{empty}          \newcommand{\MyTixZPicture}[1]{%     \begin{tikzpicture}[c/.style={xshift=#1}]              \node [above left] at (0,0) {\texttt{xshift=$#1$}};       \node[draw,circle,inner sep=1pt,label={right:A}] (A) at (0,0) {};       \node[draw,circle,inner sep=1pt,label={right:B}] (B) at (0,-3in) {};              \node[circle,inner sep=1pt]          (C) at ($([c]A)!0.5!([c]B)$) {C}            edge [->,blue] node [midway,above,red,sloped] {to the top}     ([c]A)            edge [->,gray] node [midway,above,blue,sloped] {to the bottom} ([c]B);            \foreach \myn  in {A,B}         {           \draw ([c]\myn) ++ (-8pt,0) -- (\myn)   ;         }          \end{tikzpicture}%     }%     \begin{document}          \MyTixZPicture{-1.5in}     \MyTixZPicture{-1.0in}     \MyTixZPicture{-0.75in}     \MyTixZPicture{-0.5in}          \end{document}


title: How to make this table in LaTeX?

text: I'm not an expert in `LaTeX`, and just want to ask. How can we build the following table in `LaTeX`? ![enter image description here](http://i.stack.imgur.com/L7Y74.png) Thanks.


title: How to insert a picture without the name "figure"

text: I am trying to put a figure with a subtitle but without the name "figure". For example: ![triangle](http://i.stack.imgur.com/hsRKp.jpg) 'This is a triangle' and not put the name "Figure": ![enter image description here](http://i.stack.imgur.com/LnRhR.jpg) 'Figure: This is a triangle' I tried: 1.               \begin{figure}     \begin{center}     \includegraphics[scale=*]{fig.jpg}     \caption{*}     \end{center}     \end{figure}      2.               \begin{frame}     \includegraphics[scale=*]{fig.jpg}     \caption{*}     \end{frame}      And neither have worked.


title: Change the appearance of grids in pgfplots

text: I am asking if there is a command in the `pgfplots` package that changes the appearance of the grid in terms of kind of the lines. What I mean is how to change the kind of lines. I have read the documentation but I could not find anything on this issue.


title: pdftooltip color assign

text: How can we assign a color for the pdftooltip ? For example I want the text CD to be blue. How can I get the color of my choice in RGB?               \documentclass{article}     \usepackage{pdfcomment}% http://ctan.org/pkg/pdfcomment     \usepackage{amsmath}% http://ctan.org/pkg/amsmath     \usepackage{mathtools}% http://ctan.org/pkg/mathtools     \begin{document}     % \pdftooltip{<text>}{<tooltip>}     \begin{align*}       \mathrlap{\pdftooltip[mathstyle=\displaystyle]{\phantom{\sum_{i=1}^n i=\frac{n}{2}(n+1)}}{sum\string_\{i=1\}\string^n i=tfrac\{n\}\{2\}(n+1)}}%       \sum_{i=1}^n i &= \tfrac{n}{2}(n+1) \\       \mathrlap{\pdftooltip[mathstyle=\displaystyle]{\phantom{E=mc^2}}{E=mc\textasciicircum 2}}%       E &= mc^2\\     \end{align*}          \begin{itemize}         \item This is  \pdftooltip{CD}{Compact disk}.     \end{itemize}          \end{document}


title: Caption positioned at the side of the figure

text: I would like to have the caption of the Figure on the side of the figure. Plus I want to control caption width. Also, caption and Figure should be aligned all the way to the left and right of the page, respectively. Some information is provided here. I am not able to align the way I want even after a lot of attempts. Here is what I have so far.               \documentclass[12 pt]{article}     \usepackage{fullpage}     \usepackage[demo]{graphicx}     \usepackage{floatrow}          \begin{document}     \begin{figure}     \floatbox[{\capbeside\thisfloatsetup{capbesideposition= {left,center},capbesidewidth=4cm}}]{figure}[\FBwidth]     {\caption{Figure caption}\label{fig:test}}     {\includegraphics[width=5cm]{name}}     \end{figure}     \end{document}


title: Package conflict when using bigfoot with ftnright

text: It seems that there is some collision when using the package `bigfoot` together with `ftnright`. When using both packages together (it doesn’t even matter, whether a new footnote style definded with `bigfoot` is actually used), the text is no more evenly spread over the two columns, there are huge gaps between the paragraphs. Feel free to uncomment and re-comment the line in the MWE where `ftnright` is being loaded. Someone knows about this problem? Is there a workaround?               \documentclass[a4paper,twocolumn]{article}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{blindtext}          \usepackage{bigfoot}     %\usepackage{ftnright}     \DeclareNewFootnote{roman}[roman]          \begin{document}     \blindtext\footnote{Foo.}          \blindtext     \blindtext     \blindtext          \blindtext     \blindtext\footnote{Bar.}          \blindtext     \blindtext     \blindtext          \end{document}      EDIT: To clarify my question, see the following pictures. 1) `bigfoot` commented out: text evenly distributed. ![bigfoot commented out: text evenly distributed](http://i.stack.imgur.com/Otyfh.png) 2) `ftnright` commented out: text evenly distributed as well. ![ftnright commented out: text evenly distributed as well](http://i.stack.imgur.com/aXMFK.png) 3) both packages loaded: gap after first paragraph, even when `bigfoot` is not really used (but in the real document, I would like to use both packages, this is why I load it in the preamble after all). ![both packages loaded: gap after first para](http://i.stack.imgur.com/8eQUA.png) I hope this illustrates my problem better.


title: Automating the appearance of email addresses as images

text: Publishing pdf manuscripts on the web with emails embedded in the file results in spam. More generally, I am looking for a way to _automate_ the conversion of a string to an image. It's quite easy to solve this old problem using `\includegraphics` an image (more here). The trouble is that you need a distinct file and typesetting run, and you end up with unnecessary image files that you cannot delete carelessly lest you also delete non-generated images. Can you think of a way to do this on the fly? It's understood that people will have to type the email addresses if they need to message you, but that's the point. **More briefly/concretely**... With what can one replace `#1`               \documentclass{article}     \newcommand\showasimage[1]{#1}     \begin{document}     \showasimage{joe@foo.bar}     \end{document}      such that `#1` appears as an image? **Edit** It would be really nice if the pdf file remains vectorial.


title: How do I center a boxed 'Verbatim'?

text: Here's a MWE:               \documentclass[12pt]{article}     \usepackage{fancyvrb}          %===          \begin{document}               \begin{Verbatim}[fontsize=\small, frame=single, xrightmargin=5cm]     Text.     \end{Verbatim}               \end{document}      I'm trying to center the box, but I couldn't find any way of doing it. Any comments? Thanks in advance!


title: R Chunk Code within Enumeration Environment with knitr in LyX

text: I need `R Chunk Code` within `Enumeration Environment` in `Rnw` file. The following `.Rnw` document works fine.               \documentclass{article}     \begin{document}          \begin{enumerate}     \item The quick brown fox jumps over the lazy dog.\\     <<boring-random>>=     1:4     @     \\ The quick brown fox jumps over the lazy dog.          \item The quick brown fox jumps over the lazy dog.          \end{enumerate}          \end{document}      But when I import the same file to `LyX`, the `R Chunk Code` delimiter `@` combines with text (See image below). I would highly appreciate if you guide me how to put `R Chunk Code` within `Enumeration Environment` in `LyX` using `LyX` built-in `Enumeration Environment`. Thanks ![enter image description here](http://i.stack.imgur.com/H6IUJ.png)


title: Algorithmicx -- How to use latex maths delimiters

text: Today, I decided to migrate from using TeX [`$..$`] to LaTeX [`\\(..\\)`] delimiters for inline maths, and, as usual, fell off the cliff of my somewhat precarious understanding of TeXian gastroenterology, in the middle of an `algpseudocode` environment. Here's my MWE:               \documentclass{article}     \usepackage{algpseudocode}     \begin{document}     \begin{algorithmic}[1]     \Procedure{Trigger Dispatching Scheduler}{}     \State \Call{MqOpen}{$\aleph$}     \State \Call{MqOpen}{\(\aleph\)\relax}     %\State \Call{MqOpen}{\(\aleph\)} % <== This one fails     \EndProcedure     \end{algorithmic}     \end{document}      Uncommenting the %-line causes it to fail (PdfLaTeX _and_ XeLaTeX) with:               ! Argument of \) has an extra }.     <inserted text>                      \par      l.14 \State \Call{MqOpen}{\(\aleph\)}                                           % <== This one fails      What, if anything, am I doing wrong? If anyone could explain in fairly simple terms what's going on here, I'd be most grateful.


title: duodecimal page number

text: I would like to have page numbers in my document written in base 12. Here's an MWE               \documentclass[12pt]{article}     \usepackage[paperheight=1.8in, textheight=0.8in]{geometry}          \newcommand{\sirdot}{$\odot$}     \newcommand{\apple}{$\Delta$}          \begin{document}          The duodecimal numbers:     \begin{center}     1, 2, \ldots, 8, 9, \sirdot,  \apple, 10, 11, \ldots, 19, 1\sirdot,     1\apple, 20, 21, \ldots, \apple 9, \apple\sirdot, \apple\apple, 100 \ldots     \end{center}          \setcounter{page}{10}     Set page counter to 10, so this should be page \sirdot.     \newpage     This should be page \apple.     \newpage     This should be page 10.          \end{document}      ![image of page 10](http://i.stack.imgur.com/EgSNc.jpg) Why those particular symbols for 10 and 11? See http://www.cs.umb.edu/~eb/sam/duodecimal/ssegm.pdf. My document is unlikely to need three digit page numbers, which may allow for inelegant hack solutions. Extra question: `\sirdot` seems to appear just a little too low on the line.


title: tables with column width that depends on the width of table entries

text: 1. Is there an easy way to specify that a table should have columns of a width such that the beginning of a each new column is of a user-specified and column-independent distance to the end of the longest entry of the preceding column?   2. Is there a way to specify that all columns in a table should be of equal width, namely the width of the longest table entry plus some epsilon (that may or may not be user-specified)?


title: Top margin of bibliography

text: How can i reduce the top margin of the bibliography page. I need 1 inch margin at the top but it is 2 inches nw and I don't know how to reduce it.


title: Changing the working directory when including files in a subdirectory

text: I'm working on a mathematics magazine that involves multiple articles from different authors. I would like to give each article a sub-directory in which I can store all the relevant files - .tex, image files, etc. However, when I then `\include` the article .tex file from the master file, the images won't be linked correctly without editing. For example, suppose the article is stored in `articles/article1/` and includes an image matrix.png. In the article .tex file this would be inserted, normally, through `\includegraphics{matrix.png}`. However, when we move to including the article in the magazine through the master file, all these instances would have to be changed to `\includegraphics{articles/article1/matrix.png}` So, is it possible to change the LaTeX working directory before including the article such that instances of `\includegraphics` will not have to be changed, but rather that LaTeX will know to search for these files in the article directory? I'm thinking that this would be similar-ish in functionality to HTML's base href command for links. Or, is there a better way to achieve all this?


title: Understanding titletoc example (and vertical alignment on line)

text: EDIT: TLDR summary (as I wrote in comments): What I want from this question ( _and couple of others referenced herein_ ) is: -- _`section number`_ (label) to be _**top-aligned**_ with the _`title`_ + **`AND`** I want the _`title`_ _**bottom-aligned**_ with the _`page number`_ - on the __same line__ -- when a TOC entry is typeset _(I've used frames just for visual debugging)_. * * * I asked Changing vertical alignment of items in middle of line (for ToC entry), and got a suggestion there that I should try `titletoc`. And indeed, indeed, in the documentation, pg. 14, there is an example that looks like exactly what I want ( _the emphasized part_ ): ![titlesec-manual](http://i.stack.imgur.com/GGdCk.png) ... however, I simply cannot get a working example for this. First problem is I don't really understand where are those particular `<left>` and `<right>` ( _and in the PDF, I cannot search for the brackets included_ ), or how I can change them. Closest I can see in the manual for now is these definitions:               \titlecontents{ <section> }[ <left> ]{ <above-code> }                   { <numbered-entry-format> }{ <numberless-entry-format> }                   { <filler-page-format> }[ <below-code> ]          \contentsmargin[ <correction> ]{ <right> }      ... so apparently, I set `<left>` in `\titlecontents` - and I set `<right>` in `\contentsmargin`; correct ?! In particular, the manual continues: > All you need is to put these elements in the right way. If you have reserved > the space with `\hspace*{-2pc}`, simply put a box 2 pc width containing the > section label or page so that this space will be retrieved; ... ... but I don't understand two things:   * Where is this reservation of space with `\hspace*{-2pc}` done? ( _in`\titlecontents`?_)   * Where should this box 2 pc width be put? ( _in`\titlecontents`? or in the `\addtocontents` line?_) I'm trying to build an example based on this (MWE below), and closest I can get is to an analysis of this snippet ( _where letters are added for visual debugging purposes_ ):               \contentsmargin{-4em}     \titlecontents{part}[2.3em]       {A}       {B\filbreak C\contentslabel{2.3em}D}       {E\fbox{\hspace*{2.3em}F\rule{2.3em}{2pt}}}       {G\titlerule*[1pc]{.}H\contentspage I\nobreak}      ... which results with: ![myexample.pngg](http://i.stack.imgur.com/AWoSk.png) ... and all I can say is that:   * TOC entry starts with `A` (`<above-code>`)   * `B`, `C`, `D` are ignored (`<numbered-entry-format>`)   * `E` starts right after (`F` also shown), until the section number is typeset (`<numberless-entry-format>`)   * Title is typeset as is; if there is no paragraph environment with defined width ( _in`\addtocontents`_), a long line will **not** break ( _the manual is not clear on this, when giving the illustration_ )      * If I use a `minipage` to set the width of the entry - then again everything is centered, and I get back to the same problem as in original question   * `G` is printed before the leader dots - `H` (and, I guess, also `I`) are printed after the leader dots, but before page number (`<filler-page-format>`);      * I don't get what `\contentspage` is supposed to do there ... and thats about all I can understand; and I don't really see how and would help me get the TOC entry format I want. Even worse, when I build the MWE with `pdflatex`, it notifies of this:               (./test.aux) )     (see the transcript file for additional information)pdfTeX warning (dest): name     {\040\\unhbox\040\\voidb@x\040\\setbox\040\\@tempboxa\040\\hbox\040{\\color@beg     ingroup\040\\kern\040\\fboxsep\040{\040part.III}\\kern\040\\fboxsep\040\\endgra     f\040\\endgroup\040}\\@tempdima\040\\fboxrule\040\\advance\040\\@tempdima\040\\     fboxsep\040\\advance\040\\@tempdima\040\\dp\040\\@tempboxa\040\\hbox\040{\\lowe     r\040\\@tempdima\040\\hbox\040{\\vbox\040{\\hrule\040height\\fboxrule\040\\hbox     \040{\\vrule\040width\\fboxrule\040\\relax\040\\vbox\040{\\vskip\040\\fboxsep\0     40\\box\040\\@tempboxa\040\\vskip\040\\fboxsep\040}\\relax\040\\vrule\040width\     \fboxrule\040}\\hrule\040height\\fboxrule\040}}}\040} has been referenced but d     oes not exist, replaced by a fixed one          pdfTeX warning (dest): name{\040...{\040part.II}...\040}      has been referenced but does not exist, replaced by a fixed one          pdfTeX warning (dest): name{\040...{\040part.I}...\040}      has been referenced but does not exist, replaced by a fixed one      ... so something is obviously wrong - even if the run completes (and a PDF is generated). So, does anyone know of an existing MWE that implements the illustration on pg 13/14 of the `titletoc` manual? Alternatively, could anyone help fix the MWE so it implements the same example? The MWE code is here:               \documentclass{book}          \usepackage{hyperref}     \hypersetup{pdftex, colorlinks=true, linkcolor=black}     \usepackage{titletoc}          % like definition for \phantomsection, but for part     % "Re: documentation for \phantomsection"     % http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2006-01/msg01612.html     \makeatletter     \def\phantompart{%      \stepcounter{part}%      \xdef\@currentHref{part.\thepart}%      \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%     }     \makeatother          \fboxsep=0pt % for framebox          \contentsmargin{-4em}     \titlecontents{part}[2.3em]       {A}       {B\filbreak C\contentslabel{2.3em}D}       {E\fbox{\hspace*{2.3em}F\rule{2.3em}{2pt}}}       {G\titlerule*[1pc]{.}H\contentspage I\nobreak}          \begin{document}          \tableofcontents               \phantompart %     \addtocontents{toc}{%       \protect\contentsline{part}{%         \thepart\hspace{1em}\ignorespaces %           \protect\fbox{ %           A Short Entry %           } %       } %       { \protect\fbox{ \thepage } }       { \protect\fbox{ part.\thepart } }% fbox doesn't show!     } %               \phantompart %     \addtocontents{toc}{%       \protect\contentsline{part}{%         \thepart\hspace{1em}\ignorespaces %     %     \contentslabel{2pc} %           \protect\fbox{ %             \textbf{A longer entry here...} \\ %             Maybe something more written in this entry here, %             just to show as an illustration ... %     %       \protect\end{minipage} %           } %       } %       { \protect\fbox{ \thepage } }       { \protect\fbox{ part.\thepart } }% fbox doesn't show!     } %          \phantompart %     \addtocontents{toc}{%       \protect\contentsline{part}{%         \thepart\hspace{1em}\ignorespaces %           \protect\fbox{ %           \protect\begin{minipage}{0.5\textwidth} %             \textbf{Another longer entry here...} \\ %             Still, some more content entered here; %             just to show as an illustration ... %           \protect\end{minipage} %           } %       } %       { \protect\fbox{ \thepage } }       { \protect\fbox{ part.\thepart } }% fbox doesn't show!     } %                    \vspace{0.2\textheight}     Some extra text...               \end{document}


title: How to make correct shading with hsb color model?

text: I want to use hsb color model to shading. First rectangle shows a shading using rgb color model. Second rectangle shows a shading using hsb color model. But I don't understand why I don't obtain the same shading that with my third rectangle.               \documentclass{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}       % create some hsb colors       \colorlet{redhsb}[hsb]{red}%       \colorlet{bluehsb}[hsb]{blue}%       \colorlet{greenhsb}[hsb]{green}%            % first shading with rgb color model       \fill[left color=red,right color=blue] (0,1) rectangle (2,0);            % second shading with hsb color model       \fill[left color=redhsb,right color=bluehsb] (0,0) rectangle (2,-1);            % third shading with hsb color model       \fill[left color=redhsb,right color=greenhsb] (0,-1) rectangle (1,-2);       \fill[left color=greenhsb,right color=bluehsb] (1,-1) rectangle (2,-2);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/2kY5O.png) **Edit:** In fact, TikZ calculates the middle color (using color model of the left color). Then, it converts all three colors to rgb model and make shading... I add a fourth rectangle:               % fourth shading with rgb color model     \fill[left color=red,right color=green] (0,-2) rectangle ++(1,-1);     \fill[left color=green,right color=blue] (1,-2) rectangle ++(1,-1);      ![enter image description here](http://i.stack.imgur.com/W3w3s.png) So, my question is: _Can TikZ do real hsb (HSV) shading?_


title: How can I prevent my labels from getting reflected?

text: The left triangle is the image of the right triangle about the vertical line in between them as the mirror. I only want geometric objects and label position (but excluding their labels) to be reflected. How can I prevent the labels of the left triangle from being reflected?               \documentclass[pstricks,border=12pt,12pt]{standalone}     \usepackage{pst-node}          \def\Right#1{%         \pnodes(1,1){#11}(3,1){#12}(1,4){#13}         \pspolygon(#11)(#12)(#13)         \uput[180](#11){A}         \uput[0](#12){B}         \uput[180](#13){C}     }     \begin{document}     \begin{pspicture}(-4,0)(4,5)         \Right{A}         \psscalebox{-1 1}{\Right{B}}     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/O0LKN.png) The output I want to get is as follows. ![enter image description here](http://i.stack.imgur.com/cLu6a.png) ## Note Please don't suggest me to separate the left and right object by defining an individual macro for each because my real scenario needs reflection technique and I also want to adopt the DRY principle (Don't Repeat Yourself!). ## Edit I tried the following               \rput{*0}(!N-#11.x .3 sub N-#11.y){A}     \rput{*0}(!N-#12.x .3 add N-#12.y){B}     \rput{*0}(!N-#13.x .3 sub N-#13.y){C}      but it does not help. I also tried the following but it does not help.               \documentclass[pstricks,border=12pt,12pt]{standalone}     \usepackage{pst-node}     %\psset{saveNodeCoors}     \def\Right#1{%         \pnodes(1,1){#11}(3,1){#12}(1,4){#13}         \pspolygon(#11)(#12)(#13)         %\rput{*0}(!N-#11.x .3 sub N-#11.y){A}         %\rput{*0}(!N-#12.x .3 add N-#12.y){B}         %\rput{*0}(!N-#13.x .3 sub N-#13.y){C}         \uput[180](#11){A}         \uput[0](#12){B}         \uput[180](#13){C}     }     \begin{document}     \begin{pspicture}(-4,0)(4,5)         \Right{A}         \pscustom         {             \code{-1 1 scale}             \Right{B}         }     \end{pspicture}     \end{document}


![how to make  attached table format in latex ](http://i.stack.imgur.com/NxlwX.jpg) The table format is attached and i would like to know how we can create it in LATEX. kindly help me.


title: Why does \iow_shipout: introduce typeset whitespace (where \iow_now: does not)?

text: For my resume, I have an environment that lays out information in two minipages—one for position/education data, one for the environment contents. The class I wrote also produces plain text output (mostly for giggles at this point):               \cs_new:Nn \resume_maybe_write:n {       \tl_if_empty:NF \g_resume_options_output_text_file_tl {         \iow_now:Nx \g_resume_output_text_iow { #1 }       }     }      and it is this is actually what is causing the spacing issue visible here: ![output](http://i.stack.imgur.com/wcTar.png) You'll notice that the addition of `\hrule` on the top and bottom of the second `minipage` environment fixes the issue. I'm not sure why—`texdef hrule` seems to show it's a primitive (!?). The full source is available on GitHub (where the writing occurs [here][github-ioq]), but I stress that the change that _completely_ fixed the issue was this one. * * * My actual problem is fixed, but I'm _very_ curious: what could be causing this? Should this be considered a bug in `l3file`, or is it expected behavior? If the latter, why is it so?


title: My \mathcal{U} turns out to be curvy? (different than default)

text: My preamble :               \documentclass[12pt,a4paper]{report}     \usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry}     \linespread{1.5}     \usepackage{amssymb}     \usepackage{ dsfont }     \usepackage{textcomp}     \usepackage{wrapfig}     \usepackage{array}     \usepackage{indentfirst}     \usepackage{colortbl}     \usepackage{float}     \usepackage{changepage}     \usepackage{longtable}     \usepackage{mathptmx}     \usepackage{color}     \usepackage{graphicx}     \usepackage{lettrine}     \usepackage{hyperref}      \usepackage[nottoc,notlof,notlot]{tocbibind} % add to TOC     \usepackage{caption}      When I add the command :                $\mathcal{U}$      I get ![enter image description here](http://i.stack.imgur.com/d2KWh.png) instead of ![enter image description here](http://i.stack.imgur.com/oQ2ya.png) Can anyone tell me why is that happening ? and how to get the second `U` instead of my current one.


title: acm sig-alternate.cls right margin smaller than left

text: i downloaded the Tighter Alternate style file and tex from http://www.acm.org/sigs/publications/proceedings-templates but when i download the style file and tex file and compile it at on my computer, the right side margin appears smaller than the left margin. ![enter image description here](http://i.stack.imgur.com/GWUFu.png) but the site shows a perfect one http://www.acm.org/sigs/publications/sig-alternate.pdf i didn't do any changes to the style sheet. Can someone please help me.


title: Windows TeX editor with live preview

text: I'm looking for a TeX editor for Windows that would offer a live preview of fully-rendered PDFs, like what Latexian does on Mac OS - preferably freeware, but if such an editor is payware, I'm interested in that, too. So far, this search has turned up nothing, including the other answers on this site. Has anyone heard of this kind of functionality in an editor? Are there plugins for existing editors that allow for this?


title: TeXShop cannot print hello world

text: I'm running TeXShop on a mac. My latex environment somehow has somehow stopped working and can no longer even print hello world. Here's my complete latex document:               \documentclass{article}     \begin{document}        Hello world!     \end{document}      which gives the following error:               This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)      \write18 enabled.      %&-line parsing enabled.     entering extended mode     (./MyThesis.tex     ! Undefined control sequence.     l.1 \documentclass                       {article}     ?      ! Undefined control sequence.     l.2 \begin               {document}     ?      [1{/usr/local/texlive/2008basic/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]      )</usr/local/texlive/2008basic/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb>     Output written on MyThesis.pdf (1 page, 6895 bytes).     SyncTeX written on MyThesis.synctex.gz     Transcript written on MyThesis.log.      How do I start to debug this?


title: TikZ with "remember picture" compiled with pdflatex yields different results compared to dvips -> ps2pdf

text: The following document               \documentclass[11pt,a4paper]{report}          \usepackage{tikz}     \usetikzlibrary{shapes}     \usetikzlibrary{arrows}     \usetikzlibrary{positioning}          \begin{document}     \begin{tikzpicture}[remember picture]       \node [draw] (a) {%         \begin{tabular}{l}           line 1 \\           line 2           \begin{tikzpicture}[remember picture]             \coordinate (line2);           \end{tikzpicture}           \\           line 3 \\           line 4 \\         \end{tabular}       };            \node [draw, right=5cm of line2] (a) {a};            \draw (line2) -- (a);     \end{tikzpicture}     \end{document}      yields a different result when I compile it to PDF using `pdflatex` compared to using `dvips` and then `ps2pdf`. For instance, here is the (expected) figure produced by `pdflatex`: ![enter image description here](http://i.stack.imgur.com/CJptS.png) And here is the (incorrect) figure produced by `dvips` and `ps2pdf`: ![enter image description here](http://i.stack.imgur.com/vEiHK.png) Why is this, and how do I fix it so that the result is always like the one produced by `pdflatex`?


title: close appending to aliased newcommands

text: I have:               \newcommand{\alias}[0]{POS}      and use it as:               ... \alias ...      I want to sometimes pluralize it, output as: ...POSs... but this (obviously) doesn't work:               ... \aliass ...      nor does this:               ... \alias\s ...      nor does anything else I've tried. Presumably this is easy. * * * Never mind -- I figured it out but I don't know how to delete a question.


title: What spacing/justification change might fix this hbox overfill in an enumerate environment?

text: I'm planning on cleaning up a large TeX file for viewing on an e-reader (hence, small page size), and as I'm new to TeX I'm practicing on a sample file and following these instructions. However, I'm having trouble resolving an overfull hbox using common fixes. Given the following TeX (full document at end):               \begin{enumerate}     \item {\small First Subpoint (Small Font)}      \item {\tiny Second Subpoint (Tiny Font)}      \item {\Huge Third Subpoint (Huge Font)}      \end{enumerate}      ![Bad wrap](http://i.imgur.com/Bfviy8S.png)            I tried adjusting \pretolerance, which had no effect and \sloppypar was, well, sloppy: ![Sloppypar](http://i.imgur.com/jMUi70v.png)       Probably the best look would just be for "regular" spacing of "Third Subpoint", left justified, with "(Huge Font)" on the line below. But I'm not sure what spacing or justification setting to use to resolve the problem (or why the line width is "invalid" without sloppy). Any suggestions would be very much appreciated. Thank you!               \documentclass[10pt]{article}          \usepackage[font=small,labelformat=simple,]{caption}           \usepackage{titlesec}      \titleformat{\section}{\itshape\large}{}{0em}{}     \titlespacing{\section}{0pt}{8pt}{4pt}     \titleformat{\subsection}{\itshape}{}{0em}{}     \titlespacing{\subsection}{0pt}{4pt}{2pt}     \titleformat{\subsubsection}[runin]{\bf\scshape}{}{0em}{}     \titlespacing{\subsubsection}{0pt}{5pt}{5pt}          \usepackage[papersize={3.6in,4.8in}, hmargin=0.1in,vmargin={0.1in,0.1in}]{geometry}           \usepackage{fancyhdr}      \pagestyle{fancy}     \fancyhead{}                 \fancyfoot{}                      \setlength{\abovecaptionskip}{2pt}      \setlength{\belowcaptionskip}{0pt}      \setlength{\textfloatsep}{2pt}          \setlength{\floatsep}{2pt}              \setlength{\intextsep}{2pt}                  \usepackage{amssymb,latexsym,amsmath}     % Standard packages     \usepackage{breqn,microtype}          \newtheorem{theorem}{Theorem}     \newenvironment{proof}{\noindent{\bf Proof:}}{$\hfill \Box$}                 \begin{document}          \title{Sample \LaTeX ~File}     \author{David P. Little}     \maketitle          \begin{abstract}     This document represents the output from the file ``sample.tex" once compiled using your favorite \LaTeX compiler.  This file should serve as a good example of the basic structure of a ``.tex" file as well as many of the most basic commands needed for typesetting documents involving mathematical symbols and expressions.  For more of a description on how each command works, please consult the links found on our course webpage.     \end{abstract}               \section{Lists}     \begin{enumerate}     \item {\bf First Point (Bold Face)}     \item {\em Second Point (Italic)}     \item {\Large Third Point (Large Font)}         \begin{enumerate}             \item {\small First Subpoint (Small Font)}              \item {\tiny Second Subpoint (Tiny Font)}              \item {\Huge Third Subpoint (Huge Font)}          \end{enumerate}     \item[$\bullet$] {\sf Bullet Point (Sans Serif)}     \item[$\circ$] {\sc Circle Point (Small Caps)}      \end{enumerate}               \section{Equations}          \subsection{Binomial Theorem}     \begin{theorem}[Binomial Theorem]     For any nonnegative integer $n$, we have     $$(1+x)^n = \sum_{i=0}^n {\binom{n}{i}} x^i$$     \end{theorem}          \subsection{Taylor Series}     The Taylor series expansion for the function $e^x$ is given by     \begin{equation}     e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots = \sum_{n\geq 0} \frac{x^n}{n!}     \end{equation}               \subsection{Sets}          \begin{theorem}     For any sets $A$, $B$ and $C$, we have     $$ (A\cup B)-(C-A) = A \cup (B-C)$$     \end{theorem}          \begin{proof}     \begin{eqnarray*}     (A\cup B)-(C-A) &=& (A\cup B) \cap (C-A)^c\\     &=& (A\cup B) \cap (C \cap A^c)^c \\     &=& (A\cup B) \cap (C^c \cup A) \\     &=& A \cup (B\cap C^c) \\     &=& A \cup (B-C)     \end{eqnarray*}     \end{proof}               \section{Tables}     \begin{center}     \begin{tabular}{l||c|r}     left justified & center & right justified \\ \hline     1 & 3.14159 & 5 \\     2.4678 & 3 &  1234 \\ \hline \hline     3.4678 & 6.14159 & 1239     \end{tabular}     \end{center}               \section{A Picture}     \begin{center}     \begin{picture}(100,100)(0,0)     \setlength{\unitlength}{1pt}     \put(20,70){\circle{30}}  \put(20,70){\circle*{10}}   % left eye     \put(80,70){\circle{30}}  \put(80,70){\circle*{10}}   % right eye     \put(40,40){\line(1,2){10}} \put(60,40){\line(-1,2){10}} \put(40,40){\line(1,0){20}} % nose     \put(50,20){\oval(80,10)[b]} % mouth     \multiput(0,90)(4,0){10}{\line(1,3){4}}  % left eyebrow     \multiput(100,90)(-4,0){10}{\line(-1,3){4}}  % right eyebrow     \end{picture}     \end{center}               \end{document}


title: Links don't compile properly on pdflatex

text: For some reason, I can't get a link to generate when I use the `\hyperref` package with pdfLaTeX compiler. `\hyperref[this is link text]{www.google.com}` yields only a plain unformatted "www.google.com" in the finished document. I'm running manually installed Texlive 2013 on Linux Mint 16 Cinnamon 32-bit. On a 64-bit Lenovo Thinkpad e420 machine. Below is a shortened example of the doc I'm trying to compile:               \documentclass[letter]{article}     \usepackage{hyperref}          \begin{document}          Here's a hyperref. \hyperref[This is a link to Google]{http://www.google.com}.          \end{document}      Output for the above compiles to "`Here's a hyperref. http://www.google.com`" (no hyperlink or link text).


title: How to draw a cube with TikZ where all faces have a distinct color?

text: For each face, to show a distinct color I guess we have to use opacity, but at this point, this problem seemed out of my hand. Could anyone help me out? My attempt               \documentclass{article}     \usepackage{tikz}          \definecolor{cof}{RGB}{219,144,71}     \definecolor{pur}{RGB}{186,146,162}     \definecolor{greeo}{RGB}{91,173,69}     \definecolor{greet}{RGB}{52,111,72}          \begin{document}          \begin{tikzpicture}[thick,scale=3]         \coordinate (A1) at (0, 0);         \coordinate (A2) at (0, 1);         \coordinate (A3) at (1, 1);         \coordinate (A4) at (1, 0);         \coordinate (B1) at (0.3, 0.3);         \coordinate (B2) at (0.3, 1.3);         \coordinate (B3) at (1.3, 1.3);         \coordinate (B4) at (1.3, 0.3);              \draw[very thick] (A1) -- (A2);         \draw[very thick] (A2) -- (A3);         \draw[very thick] (A3) -- (A4);         \draw[very thick] (A4) -- (A1);              \draw[dashed] (A1) -- (B1);         \draw[dashed] (B1) -- (B2);         \draw[very thick] (A2) -- (B2);         \draw[very thick] (B2) -- (B3);         \draw[very thick] (A3) -- (B3);         \draw[very thick] (A4) -- (B4);         \draw[very thick] (B4) -- (B3);         \draw[dashed] (B1) -- (B4);              \draw[fill=yellow,opacity=0.6] (A1) -- (B1) -- (B4) -- (A4);         \draw[fill=black!20,opacity=0.5] (A1) -- (A2) -- (A3) -- (A4);         \draw[fill=red,opacity=0.6] (A1) -- (A2) -- (B2) -- (B1);         \draw[fill=black,opacity=0.6] (B1) -- (B2) -- (B3) -- (B4);         \draw[fill=blue,opacity=0.6] (A3) -- (B3) -- (B4) -- (A4);         \draw[fill=green,opacity=0.6] (A2) -- (B2) -- (B3) -- (A3);          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/sWXjS.png)


title: Angle of \ddots in an uneven matrix

text: I have the following triangle matrix with zeroes on the diagonal               \documentclass[a4paper]{memoir}     \usepackage{amsmath}     \begin{document}     \[     M = \begin{pmatrix}         0 & a_{1,2} & a_{1,3}   & \dots     & a_{1,n}   \\           & 0       & a_{2,3}   & \dots     & a_{2,n}   \\           &         & 0         & \ddots    & \vdots    \\           &         &           &           & 0       \end{pmatrix}     \]     \end{document}      The small problem I have now, is that the dots from \ddots point from a_{2,3} to the last zero. This could lead to the impression that the diagonal is not given by the zeroes. Anyone an idea?


title: Is there a script that reads a TeX file and replaces every instance of a \newcommand?

text: I'd like to know if there's a script that reads a `.tex` file and replace every instance of a non-standard TeX command with whatever it is replacing. I am not sure if what I want is clear but let me give an example: Suppose the **input** is:               \documentclass{amsart}      \usepackage{amsmath,amssymb}     \newcommand{\N}{\mathbb{N}}     \DeclareMathOperator{\End}{End}          \begin{document}     In this lecture we'll study the ring of Endomorphisms of an Abelian group $A$.     Let's denote this ring by $\End(A)$. Throughout the lecture, $\N$ will denote     the set of natural numbers.     \end{document}       Then, a desirable **output** of such a script is:               \documentclass{amsart}     \usepackage{amsmath, amssymb}     \begin{document}     In this lecture we'll study the ring of Endomorphisms of an Abelian group $A$.     Let's denote this ring by $\operatorname{End}(A)$. Throughout the lecture,        $\mathbb{N}$ will denote the set of natural numbers.     \end{document}      **P.S.:** I think I had seen something to this effect but I neither remember the place nor a key word to fire up Google. * * * I meant to write that, all answers here are awesome, but I miscounted 2 for 4. :(


title: How to let latex only run one user defined command and save the ouput to a tax file

text: I want to let latex only run one of my defined commands and output results to a tax file. For example, the following tex file:               \documentclass{article}     \usepackage[usenames,dvipsnames]{xcolor}          \newcommand{\note}[3][]{{\color{Orange}#1}{\color{Red}#2}{\color{Cyan}#3}}          \begin{document}          \note[text1]{text2}{text3}          hello world \textbf{here} .          \end{document}      I want latex to only run the \note command and output the results:               \documentclass{article}     \usepackage[usenames,dvipsnames]{xcolor}          \newcommand{\note}[3][]{{\color{Orange}#1}{\color{Red}#2}{\color{Cyan}#3}}          \begin{document}          {\color{Orange}text1}{\color{Red}text2}{\color{Cyan}text3}          hello world \textbf{here} .          \end{document}      into a new tex file for example compiled.tax Is there anyway to achieve this? Thanks in advance.


title: "Expanding" locally defined commands

text: I wrote a paper using custom ("locally defined") commands and environments (e.g. a new quote environment, loads of abbreviations, etc.). The journal requires me eliminate all non-standard LaTeX packages and commands/environments. Is there an out-of-the-box way of doing this? I'm thinking in something like the following: **Original document**               \documentclass{article}     \newcommand*{\myabbrone}{\textit{This is my first abbreviation}}          \begin{document}       \myabbrevone     \end{document}      **Cleaned document**               \documentclass{article}          \begin{document}       \textit{This is my first abbreviation}     \end{document}


title: Location inside a LaTeX source code

text: When viewing a pdf of a long LaTeX document, it can sometimes be difficult to find where a certain equation or a line in the pdf is located in the source code, as there are no page numbers in the source code (Unlike visual word processors). I wonder if there is a simple way to find such a location.


title: How can I write Persian in TeXstudio?

text: I want to write some Persian text in Texstudio. Which package should I use? I've heard about `xepersian` but I don't know how to use it. Any help would be appreciated.               \documentclass{article}      \usepackage{xepersian}      \settextfont{XB Roya}      \begin{document}      سلام!      \end{document}


title: Adjusting arrow style on pgfplots axes

text: Using `axis line=middle` in pgfplots creates arrow tips on the end of the axes. How can I adjust the size, style, etc? I suppose one way would be to make axes without arrows (using `axis line*=middle`) and then make the arrows separately using a `\draw` command, but I'm wondering whether there are options one can pass to the `\begin{axis}...\end{axis}` that will do the trick.


title: Tikz code: Cartesian space vs hough space

text: I would like to write down using tikz the following graphs. ![enter image description here](http://i.stack.imgur.com/HSR1p.png) It would be great and extremely helpful if someone could post me the code.


title: Tex to Lyx Error

text: I'm having two .tex files. For some reason one is easily imported into lyx without any problem. On the other hand, when I'm trying to import the second .tex file into lyx I'm getting the following error:               An error occurred while running:     tex2lyx -f "filename.tex" "filename.lyx"      Why is this happening? i can't see any difference between the two files. I'm using Linux Mint 13. Both .tex files were created with Kile 2.1 and I'm trying to import them in Lyx 2.0.2


title: Removing the List of Corrections from the Table of Contents

text: I'm using the package `fixme` and the command `\listoffixmes` which generates a list of fixme notes on a page titled _List of Corrections_. However, the title appears in the table of contents and messes with the other section titles throughout the front matter. I'm using `amsbook` as my document class. Is there a way to remove the List of Corrections from the Table of Contents?


title: Plotting .dat file

text: I'm looking to plot a simple plot with data I've taken from MATLAB in a `.dat` file format. The file has two columns in the order shown below. I would like column 1 to be x and column 2 to be y. I've been trying to use `tikzpicture` for ages but to no avail. Any help is much appreciated thank you. I dont know if this is an issue but the columns are huge and have lots of entries. Is that an issue in latex?               1.3888889e-03   2.0000478e+01     2.7777778e-03   2.0001440e+01     4.1666667e-03   2.0002877e+01     5.5555556e-03   2.0004785e+01     6.9444444e-03   2.0007160e+01     8.3333333e-03   2.0009999e+01     9.7222222e-03   2.0013296e+01      ![MATLAB Plot](http://i.stack.imgur.com/L0V9p.png) The picture is what I am attempting to recreate. Here's the code I've simply got to plot the marker points, can anyone point me in the direction of creating a line opposed to all the points. Also adding in more y axis points i.e. every 100oC and grid lines if possible. Thanks               \begin{figure}[H]     \begin{tikzpicture}     \begin{axis}     [legend style = { at = {(0.6,0.75)}},only marks,     xlabel = Time\,/\,hr,xmax = 8,xmin = 0,     ylabel = Temperature\,/\,$^{0}$C,ymax = 600,ymin = 0]     \addplot [thin] table {data.dat};     \end{axis}     \end{tikzpicture}     \caption{Temperature Change in FB}     \end{figure}


title: Disabling beamer animations easily

text: I'm writing a presentation for a conference with beamer. I'm using `\pause` commands in order to show the contents one piece at a time, but it's really annoying having to scroll through so much pages while I'm writing slides. After a little bit (read: lot of) googling, I found about the `handout` documentclass option, that seems to do just what I was looking for. My question is: since I would like to have pauses in the presentation before every list item and before every block in general, is there a way to tell beamer to automatically do this, please? With my current solution it's easy to enable/disable slides animations, but it's quite a nuisance having to manually add `\pause` everywhere.


title: Is implicit `\relax` in conditionals explained anywhere in the TeXbook?

text: I have been relying for years on TeX's behavior where, say `\if1\fi` expands to nothing and `\if1\else\fi` does the same. In the second case TeX inserts an 'implicit' `\relax` when it tries to expand `\else`. I have a 'language- lawyer' type question about it: can this behavior, more or less formally be 'extracted' from the TeXbook? Any reference would be appreciated. Note that I am not interested in the mechanism itself (I found everything I need in 'TeX: the program' a long time ago), just a (more or less) formal reference to it in the TeXbook.


title: Drawing Roman laurel leaves (SPQR) in TikZ

text: I was trying to get the symbol of the old Roman emblem (SPQR). I'm actually interested in the laurel leaves, and not so much in the banner _per se_. What I would like to have is something like this (in `Tikz`, as oppose to simply `\includegraphics`). With the possibility to change the stylish `A` to any other simple roman letter. ![enter image description here](http://i.stack.imgur.com/MFC7A.png) I'm a complete newbie with TikZ, and even though I know this question sounds like _do this for me_ , I would really appreciate if someone could at least throw in an sketch where to start.


title: How can I create an index with indices having a huge amount of sub-categories with LaTeX?

text: I want to reproduce an index written in proprietary format, doc. It uses weird indexing such as "Aa1", "Aa" and "A". I need indexing tools for doing unrestricted amount of sub-categories in index and with good index of the main index -- and some good visualizer would be useful. Each thing has information `"INDEX|NAME|LOCATION|DESCRIPTION|YEAR-RANGE|STATUS"`, the `"INDEX"` is the thing that needs visual nesting. Also, it would be useful if I could select just one branch of the index for review later. I want something like               A       Aa Something        helloe  1 si    description              1900-2001        hallo   1 si    deutsch                  2000-2010        ...         Aaa1 Some books           name   2 lo  descript                 1700-1800           name1        no location, descr       1600-1700    LOST           name2  1 di  descr                    1777-1888            Bb         Bb1          Bbb             Bbbb                 Bbbbb                   ...                     Bbbbb...b      The current indexing is a bit hard reading, it was created with some high-cost index specialist but I am unsure why it was created like that:               A SIGNS AND SYMBOLS           Aa Letters             Aaa1           1 lo        Explained                     1990-200          B CARDS AND HISTORY           BI PEOPLE INDEX       BIa Private        BIa1  1 si   Explained book                             1800-1950        BIa2  1 si   Some book                                  1888-1999       BIb Public         BIb1         Something here                             2000-2001


title: Symbols of animals

text: I'm wondering whether there are symbols implemented in LaTeX to create animals. For example like the `\Bat` in the marvosym, but for other animals. I'm especially interested in `\Dolphin` ;-)


title: Updating MikTeX fails: "Windows API error 5: Acces denied."

text: I've been using the "basic stuff" from LaTeX for slightly more than a year for university, but now I try to use a template from LaTeX Templates. When I try to compile the downloaded TeX file, I get a lot of (fatal) error messages because the packages which should be used can't be found, e.g.,               file 'lettrine.sty' not found      I use Texmaker and MiKTeX and found out I had to update MiKTeX, but when I want to update, I get an error message from the update wizard: The operation could not be completed for the following reason: Windows API error 5: Acces denied. Details: C: Can anyone help?


title: How to draw nested functions in TikZ?

text: I'm trying to draw a frequency modulated sinusoidal in a polar domain with the following code.               \documentclass[tikz,border=10]{standalone}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}              \def\rad{5.5}         \def\amp{1.0}         \def\n{11}         \def\myphi{90}              \draw [domain=0:6.29,samples=500,smooth] plot (xy polar cs:angle=\x r,             radius={\rad+\amp*cos(\n*\x r+sin(\n*\x r+\myphi)+\myphi)});          \end{tikzpicture}          \end{document}      When I compile this, however, the inner sinusoidal is completely ignored. In other words, `tikz` seems to read the following line instead.               radius={\rad+\amp*cos(\n*\x r+\myphi)});      Why does this happen, and how do I get the intended result? Edit: Frequency modulation is a mathematical operation which modifies the argument of a function. In my example, the argument of the cosine function is modified by a sine function. As explained, this inner sine function is, for some reason, ignored when I compile the code. I'm curious about why, and I wish to know how I can draw a function where nothing is ignored. Visualized by Wolfram Alpha, the first image shows the intended function, and the second image shows the function LaTeX compiles. They are not the same. Edit2: I have shortened and changed the example. It should now be easier to read the function in the code above. Hopefully I didn't remove anything essential. ![enter image description here](http://i.imgur.com/w0ikNRC.png) ![enter image description here](http://i.imgur.com/HXq0VOv.png)


title: Impossible to have a Tikz fading in a titlesec header?

text: I want to put a TikZ figure with a fading effect (which I reproduced in the body of the document as illustration) in the page header, which I set with the package `titlesec`. The following MWE seems to indicate that it doesn't work. Any workaround?               \documentclass[12pt]{article}     \usepackage{tikz}          \usetikzlibrary{fadings}     \usepackage[pagestyles]{titlesec}               \newpagestyle{teststyle}{      \renewcommand{\makeheadrule}{%       \color{blue}%       \rule[-.3\baselineskip]{\linewidth}{1pt}}        %% HEADER - depends on option       \sethead{}%        {}%        {%        \FadingSection        }%     }          \newcommand{\FadingSection}{%         \begin{tikzpicture}[baseline=(mabox.base)]             \node[rectangle,baseline=current bounding box.base,anchor=south east,inner ysep =0cm,inner xsep =0cm](mabox) at (0,0) {\sectiontitle};             \fill[path fading=west,fill=white] (-5,0) rectangle (0,1em);         \end{tikzpicture}        }          \begin{document}     \pagestyle{teststyle}     \section{ ABCD EFGH IJKLM NOPQR 1111 2222 3333 4444}     \FadingSection          \end{document}


title: What is the difference between \newline and \\?

text: As far as I know, `\\\` and `\newline` both insert a new line. But they do not have an identical expansion and tracing shows they do not execute the same commands, so what is their difference?


title: defining a fading-style directly in the fill command

text: In the following MWE i define a fading `monfading` with the command `\tikzfading` which is then used in the command `\fill`.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{patterns,fadings}     \begin{document}       \tikzfading[name=monfading,left color=transparent!100,right color=transparent!0]       \begin{tikzpicture}         \node[anchor=south west] at (0,0) {HALLO} ;            \fill[draw=black,path fading=monfading,fill=white] (0,0) rectangle (1.5,1);       \end{tikzpicture}       \end{document}      Now, i encounter some difficulties, because my tikz picture is actually in the header of the page (i use `\RequirePackage[pagestyles]{titlesec}`), and there, it seems not to remember the definition of `\tikzfading`. Therefore, i would like to put the definition of `monfading` directly in the `\fill` command. Therefore something like :               %Pseudocode :       \begin{tikzpicture}         \node[anchor=south west] at (0,0) {HALLO} ;            \fill[draw=black,path fading={left color=transparent!100,right         color=transparent!0},fill=white] (0,0) rectangle (1.5,1);       \end{tikzpicture}       How i can make this pseudo code a real code?


title: Alignment's \author

text: How I can put authors in list form.               \author{ aaaaa \and bbbb \and ccc }      Ok, but the names appear on the same line and I want to display them **vertically**.


title: Gummi breaking on inclusion of bibliography

text: Gummi is refusing to compile whenever I include the line               \bibliography{bibliog.bib}{}      I've tried with and without the .bib and it doesn't seem to matter what the contents of the file are (I've even tried with empty files). In addition it doesn't matter whether there are citations in the text or not. If anyone has any suggestions that would be brilliant After a few errors complaining about citations being undefined the only error in the output text is:               Underfull \hbox (badness 1377) in paragraph at lines 29--30     \OT1/cmr/m/n/10 of galax-ies con-tain-ing black holes at their cen-tres,     (/tmp/.CompRep.tex.bbl          LaTeX Warning: Reference `LastBibItem' on page 1 undefined on input line 1.          /tmp/.CompRep.tex.bbl:16: Undefined control sequence.     <argument> \@empty \apjl                               \xdef \UL@spfactor {\the \spacefactor }     l.16 \newblock {\em \apjl}                           , 539:L13--L16, August 2000.     /tmp/.CompRep.tex.bbl:16:  ==> Fatal error occurred, no output PDF file produced!     Transcript written on /tmp/.CompRep.tex.log.


title: How do you make a customization on the chapter page

text: I can't figure out how to modify it so that it looks like the image below.               \documentclass{book}     \usepackage{titlesec}          \titleformat{\chapter}       {\normalfont\huge\bfseries}{\thechapter\newline\chaptertitlename\}{150pt}{\huge}          \begin{document}          \chapter{The Chapter Name}          \end{document}      ![enter image description here](http://i.stack.imgur.com/FPKJx.png)


title: biblatex and biblatex-chicago

text: I would like to know what the difference is between `\usepackage[authordate,backend=biber]{biblatex-chicago}` and `\usepackage[style=chicago-authordate,backend=biber]{biblatex}`?


title: Referencing "coupled" tables

text: How can I refer to 'coupled' tables (say different tables but referenced as table 5a and table 5b). If I `\label` them and use `\ref`, they would be referenced in the document as _table 5_ and _table 6_.


title: Gradient color in one cell of a table

text: I'm trying to create a `tabular` and I'm facing the following small issue. I would like to make the background of one cell a gradient color. Is it easy to do that in LaTeX? And if so, how to do it?


title: tabular various issues

text: I'm new to LaTeX. I'm trying to create a `tabular` and I'm facing various small issues. I would like to create a `tabular` with two columns, the second one being multiline. I found out I can use `p{}` to achieve that, but the problem is that I now need to specify the width. I would have liked to set it as line width minus whatever space is used by the first column, but I don't know how to do that. edit: so I can use tabularx, but my problem now is that it goes beyond the end of the page:               \documentclass{article}     \usepackage[top=1in, bottom=1in, left=0pt, right=0pt]{geometry}%margins     \begin{document}     \begin{tabularx}{\textwidth}{|c|X|}a&b     \end{tabularx}     \end{document}


title: left aligning the conditional statement inside an array

text: I have equations of the form               a = b + d     for i <= 4, j < 3       = c         for i = 5       = d - e + u for i > 5       I am writing them using the following code in latex:               \begin{equation}        a = \left\{      \begin{array}{lr}      b + d  & \mbox{for } i \le 4, j < 3 \\      c & \mbox{for } i = 5 \\      d - e + u & \mbox{for } i > 5     \end{array}     \right.     \label{eqn:simple_one}      \end{equation}      But the problem is that the conditional statements starting with "for" are always right aligned and the output looks like this (with a left brace after the "=" sign, which i cannot draw :) ).               a = b + d     for i <= 4, j < 3         c                 for i = 5         d - e + u         for i > 5       I wanted to make the condtional part left aligned such that the words "for" come exactly one below the other. How can this be done?


title: Texmaker open session on start?

text: I have installed Texmaker 4.1 and use the save session functionality as I like to recover my definition of a master document and open all the files at once. Is there any way to configure that Texmaker would start the most recent session automatically and focus on the file I was working last (this cannot be saved in the session)? I already know of the shortcut Shift+Ctrl+F8.


title: Printing absolute page numbers

text: I'm using the `pagesel` package to output only selected parts of a large document. The page numbers in that document are not absolute page numbers, but pagesel (quite rightly) uses absolute page numbers. So what I'd like to do is, within my document, put a command to list the absolute page number on my TeX log. The `pagesel` package uses the counter `ps@count` to keep track of the absolute page number, so I've tried the following two ideas, but neither works:               \makeatletter      \typeout{Absolute Page \value{ps@count}}      \makeatother          \makeatletter      \typeout{Absolute Page \theps@count}      \makeatother      Could someone fix one of these? (I see from another answer How to find absolute page number as an integer? that I could use the `zref` package, but that seems a lot of work when pagesel already has the counter that I want.)


title: submitting to arxiv with garamond

text: When I read this http://arxiv.org/help/faq/freefonts I assumed I could just use the mathdesign package with the urw-garamond option and it would work. Unfortunately this is not the case - silly me. Is there a way to make it work?


title: ProcessOptions and ProcessKeyvalOptions

text: # `\ProcessOptions` and `\ProcessKeyvalOptions` Which comes first? Does it matter? # `\ProcessOptions\relax` or `\ProcessOptions*` What's the difference? Apparently for keyval there is only the starred version. Which should I use? I looked at the docs and they were not extremely helpful. * * * _I'm creating my own class based on`article`. I'm using `kvoptions` for the easy creation of boolean options (`\DeclareBoolOption` and `\DeclareComplementaryOption`)._


title: Controlling abbreviation of author names list using natbib

text: I am using the `natbib` package with the `aspr` style. The command `\citep{key}` prints "(Smith et al., 2011)" if the number of authors is more than 3. How can I change it so that it uses the "et al." abbreviation if the number of names is greater than 2?


title: biblatex - postcite as subscript

text: I've defined the command `\newcommand{\mycite}[2][]{\autocite{#2} #1}` which allows me to combine a superscripted citation with a parenthetical page reference: > Cf. Sloterdijk1 (pp. 84–85). ✓ This recovers the behavior of `natbib` within `biblatex`. Now I'm wondering if I can do something clever: is there a way to get the page numbers stacked right below the superscript? This doesn't give the right visual effect (with `fixltx2e`): `Sloterdijk\supercite{sloterdijk2013change}\textsubscript{(pp. 84--85)}` The following achieves what I was thinking of visually, but it's not using the bibliography system at all: `Sloterdijk$^1_{\mathrm{(pp.\ 84-85)}}$.` Maybe if I used the actual postcite argument instead of my own hack, I could do this, but I haven't figured out how to get a "real" postcite working together with superscripted numeric citations.               \documentclass{article}     \usepackage{filecontents}          \usepackage[hyperref=true,                 articletitle=true,                 url=true,                 style=nature,                 sorting=nyt,                 autocite=superscript,                 backref=false,                 backend=biber]{biblatex}          \newcommand{\mycite}[2][]{\autocite{#2} #1}          \usepackage{hyperref}          \begin{filecontents}{references.bib}     @book{sloterdijk2013change,       title={You Must Change Your Life},       author={Sloterdijk, P.},       publisher={Polity Press},       year={2013}     }     \end{filecontents}          \bibliography{references.bib}          \begin{document}     Cf. Sloterdijk\mycite[(pp. 84--85)]{sloterdijk2013change}.     \printbibliography     \end{document}


title: set width of table column to whatever's left in page width

text: I have some columns with a very short entries on the first column and a rather long entry on the second column.               \begin{ctabular}{\textwidth}{ll}       \toprule       Name & Recipe\\       \midrule       Freezing media         & 91\% FCS; 10\% DMSO \\       Growth medium (HeLa)   & 87\% DMEM; 10\% FCS; 1\% NEAA; 1\% Penicillin/Streptomycin); 1\% L-Glutamine \\       Growth medium (horse)  & 76\% DMEM; 20\% FCS; 2\% NEAA; 1\% Penicillin/Streptomycin); 1\% L-Glutamine \\       \bottomrule     \end{ctabular}      The table actually has a lot of rows and spans multiple pages, hence why I'm using `ctabular` (from the `memoir` class). I want to set the width of the table to `\textwidth`. I'll be happy with whatever LaTeX picks for the first column in order to have the name in one line, and want the second to take the rest of the space. How can I accomplish this? I do not want to set the size of each column individually so it doesn't break when I add a new row with a longer name, or change the font size for example.


title: "That makes 100 errors" and one question

text: Although I never make any misteyk, occasionally I compile a TeX file in non- stop mode (that's how I roll) so wonderful that it just starts stuttering and spits out this ![enter image description here](http://i.stack.imgur.com/paxhp.png) and provides some moral support as if it's going to make any difference to compile again.   1. Is this an internal counter i.e. hardcoded executable level count?    2. Is this a TeX or PDFTeX counter i.e. at which level is this counted?    3. Can we access it and more importantly can we lower this threshold with a switch? **Teaser** :   * Can we access or reset during a compilation? I know how stupid it would be to modify this during a compilation but... yeah.


I'd like to use hyphenation with armenian language. Here is my test code (the armenian text is in utf8).               \documentclass[a4paper,12pt]{article}          \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage[english,armenian]{babel}          \begin{document}     \setmainfont{Arial Unicode}     \selectlanguage{armenian}     հասարակագիտական հասարակագիտական հասարակագիտական հասարակագիտական հասարակագիտական հասարակագիտական հասարակագիտական հասարակագիտական հասարակագիտական հասարակագիտական      \end{document}      I'm using recent txlive 2012 and compiling my tex using xelatex command. I'm getting the following error: ! Package babel Error: Language definition file armenian.ldf not found.               See the babel package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.141 \ProcessOptions*      Is the armenian hyphenation not checked before and the armenian.ldf is really missing or I misconfigured the packages in test.tex? With thanks in advance, Nerses P.S. I didn't attached the log file, it makes the post too large.