title: How to get all CAPS chapter titles

text: Trying to get all CAPS chapter titles. Using the following, only the ToC chapter title is all CAPS:               \documentclass{memoir}     \renewcommand{\chaptitlefont}{\MakeUppercase}     \begin{document}          \tableofcontents*          \chapter*{Preface}     \addcontentsline{toc}{chapter}{Preface}            \chapter{Sample Title}          \end{document}      What does one do to get Preface, and Sample Title to be in all CAPS as well?


title: Easiest way to fill the region defined by a number of paths

text: I have a number of paths, quad-circles in this case, which intersect to define a complex region in the middle of the graph. How do I fill the A - B - C - D region in the image below? I prefer a solution that makes no assumptions on the formulation of the paths, i.e.: they can be Bezier curves with random control points instead of quadrant of a circle.               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{calc,intersections,through}          \begin{document}     \begin{tikzpicture}         \path[draw,clip] (0,0) rectangle (6,6);         \node(circle 1)[draw, circle through={(6,0)}] at (0,0) {};          \node(circle 2)[draw, circle through={(0,0)}] at (6,0) {};         \node(circle 3)[draw, circle through={(6,0)}] at (6,6) {};         \node(circle 4)[draw, circle through={(0,0)}] at (0,6) {};              \coordinate[label=A](A) at (intersection 2 of circle 1 and circle 2);         \coordinate[label=B](B) at (intersection 1 of circle 1 and circle 4);         \coordinate[label=C](C) at (intersection 2 of circle 3 and circle 4);         \coordinate[label=D](D) at (intersection 2 of circle 2 and circle 3);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/gYT2P.png)


title: Issue with forward search (single PDF but multiple tex files) Emacs + SyncTex + Evince

text: I have a single master file and several other .tex files are included in this master file. TeX-source-correlate mode is enabled for forward search. For the master file forward search is working but when I do it on some other .tex files, Emacs raises an error that says that the corresponding PDF file is not found. I have included the master file name at the end of every included .tex file.


title: Export page numbers of references

text: I would like to export the page numbers of all the inner references of my document. How can one achieve this? Equivalently, how can we export the section/chapter number of all the inner references? For external references of the bibliography (I use bibtex), using the `\backref` command creates a `.brf` file which contains this information. * * * **Edit:** By inner references, I mean references to a label defined by `\label` and referred by `\ref`. Consider for instance, the minimal example:               \documentclass{article}     \begin{document}          \section{One}     Here\label{here}          \newpage     \section{Two}          \newpage     \section{Three}     Here is \ref{here}.     \end{document}      I would like to retrieve that there is an inner reference from page 3 (Section 3) to page 1 (Section 1).


title: Turn preamble font declaration into a "oneliner" to be used in Matlab

text: I was already using `x` and `y`, and needed something similar, but different so I declared the following in my preamble:               \DeclareFontFamily{OT1}{pzc}{}     \DeclareFontShape{OT1}{pzc}{m}{it}{<-> s * [1.10] pzcmi7t}{}     \DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}      This means I can use `\mathpzc{x}` and `\mathpzc{y}` in my document. However, I have now made a figure in Matlab and want to use `\mathpzc{x}` and `\mathpzc{y}` along the axis. I'm using a modified version of `matlabfrag` to create a PDF file containing the latex symbols. However I am not able to declare new fonts in Matlab, so my question is: Instead of using the command `\mathpzc{}`, can I use a different (and probably more complex) command which also account for the code I put in the preamble?


title: Caption label formatting in Context

text: I am trying to introduce a linebreak after the caption label so that the caption starts below the caption label in `context`. However, the `suffix` key for the `\captionsetup` only accepts text like `:` or `--`. I would like something like this: ![Caption label above the caption. ](http://i.stack.imgur.com/RWe9p.png) MWE:               \setupbodyfont[modern,11pt]     \setuplayout       [width=11cm,        rightmargin=6cm]          \setupcaption       [figure]       [width=\rightmarginwidth,        headstyle=smallcaps,        suffix={:},        prefix=yes,        way=bysection,        prefixsegments=chapter,        align=right,        location={rightmargin,high}]          \starttext     \showframe     \chapter{One}     \placefigure{A cow is a cow is a cow.}{\externalfigure[cow]}     \stoptext


title: Avoiding page break in the Latex bibliography list

text: I have a problem, the references are being split by the page break in a such strange manner. ![enter image description here](http://i.stack.imgur.com/pvGoi.jpg) I use IEEE style and already tried `\usepackage[section]{placeins}` but it influences any other section, but not the references. I need to have reference list as compact as possible, without undesired and unnecessary page break. I tried to google it, but did not find the answer. ## **SOLVED:** _In the IEEE template there was a line: \addtolength{\textheight}{-12cm} After conclusion and before the bibliography. When I deleted it, everything got OK. Hope it would be useful for someone._


title: citations shown as zeros

text: In LyX, I added a BibTeX biography to the end of the document, and several citations in the document body. In the PDF, I can see the correct references at the end, but in the document body, the references appear as zeros: "(0)". Interestingly, inside LyX the citations are shown just fine, for example: > ... Such methods were used in the first documented dialog systems Weizenbaum > (1966) ... In the PDF, instead of "Weizenbaum (1966)", I see "(0)". I am new to LaTeX and LyX, so I have no idea how to debug this...


title: no page numbers in lyx

text: How can I tell LyX to put page numbers in the rendered PDF? I looked in all the menus, and haven't find the correct option. The closest matches are: Document -> Settings -> Page Layout, or Document -> Settings -> Numbering, but none of them has page numbering. \-- Here is my first try to post a MWE:               #LyX 2.0 created this file. For more info see http://www.lyx.org/     \lyxformat 413     \begin_document     \begin_header     \textclass article_acl_singlecolumn     \use_default_options true     \maintain_unincluded_children false     \language english     \language_package default     \inputencoding auto     \fontencoding global     \font_roman default     \font_sans default     \font_typewriter default     \font_default_family default     \use_non_tex_fonts false     \font_sc false     \font_osf false     \font_sf_scale 100     \font_tt_scale 100          \graphics default     \default_output_format default     \output_sync 0     \bibtex_command default     \index_command default     \float_placement h     \paperfontsize 11     \spacing single     \use_hyperref false     \papersize a4paper     \use_geometry true     \use_amsmath 1     \use_esint 1     \use_mhchem 1     \use_mathdots 1     \cite_engine natbib_authoryear     \use_bibtopic false     \use_indices false     \paperorientation portrait     \suppress_date false     \use_refstyle 1     \index Index     \shortcut idx     \color #008000     \end_index     \secnumdepth 3     \tocdepth 3     \paragraph_separation indent     \paragraph_indentation default     \quotes_language english     \papercolumns 1     \papersides 1     \paperpagestyle fancy     \tracking_changes false     \output_changes true     \html_math_output 0     \html_css_as_file 0     \html_be_strict false     \end_header          \begin_body          \begin_layout Title     No Page Numbers Example     \end_layout          \end_body     \end_document


title: How can I get a question's difficulty to be typeset in the question's heading?

text: In his excellent `exsheets` package, cgnieder explains how to define custom _dividing concepts_ , such as question difficulty. After `difficulty` has been as a new dividing concept, each question can be attributed a certain `difficulty` value, such as, for example, `basic`, `intermediate`, `advanced`, `insanely hard`, etc. Questions of a given `difficulty` can then be shown/hidden very easily (as in my code below). **What I would like is for a question's difficulty to be typeset in the question's heading.** That way, I could, for example, tell my students that they should be comfortable with all `basic` questions, and that they should make an attempt at `insanely hard` questions only if they like a real challenge. As far as I know, none of the `headings` instances defined in subsection 19.2 of the `exsheets` documentation allow for dividing concepts to be printed somewhere in a question's heading. Is there an easy way of doing that?               % adapted from subsection 12.3 in the exsheets manual     \documentclass{article}          \usepackage{exsheets}     \DeclareQuestionClass{difficulty}{difficulties}     \SetupExSheets{use-difficulties={easy,hard}}          \begin{document}          \begin{question}[difficulty=easy] % I'd like 'easy' to be printed in the heading       An easy question.     \end{question}     \begin{question}[difficulty=medium] % I'd like 'medium' to be printed in the heading       This one’s a bit harder.     \end{question}     \begin{question}[difficulty=hard] % I'd like 'hard' to be printed in the heading       Now let’s see if you can solve this one.     \end{question}          \end{document}      ![enter image description here](http://i.stack.imgur.com/hhw5M.png)


title: Table of x-y values with first and second order differences

text: I would like to code a pages of notes that has the layout shown in the picture below. My question is the most efficient way to do this with LaTeX. I would think tikz with lots of nodes and edges, but I wonder if there is a more efficiently using tables within LaTeX. ![differences](http://i.stack.imgur.com/RdFvr.jpg)


title: How to draw this 3D H-layout recursive tree with Tikz?

text: **Background:** This is an extension problem from my last post How to draw the recursive H-Layout tree using Tikz?. The (2D) H-layout tree is actually from the VLSI layout problem in computer science. I have received excellent solutions to the last post. Now, I am further interested in its 3D extension. > 3D H-Layout tree: It is a recursive structure whose basic units are > transformed 3D H-layout. The 3D H-layout consists of three mutually > perpendicular _mata-edges_. Each _meta-edge_ is composed by three nodes > connected by two edges. The following image shows a basic 3D H-layout unit: ![The basic 3D H-layout unit](http://i.stack.imgur.com/HPVTZ.png) A simple 3D H-layout tree is as follows ( **Note:** in this image, just the red part grows recursively. I would prefer the solution in which both the blue part and the red part grow simultaneously):   ![A simple 3D H-layout tree](http://i.stack.imgur.com/FLYvN.png) **Problem:** > How to draw this 3D H-layout recursive tree using Tikz? The visualization > will be beneficial for my further investigation of such structure.


title: Helvetica font has jagged edges

text: I use 'Helvetica' as my font and build my document using Texmaker. But the PDF generated has jagged edges while using this font and when I use a different font (say Times or even Helvetica sans-serif) it builds just fine. ![enter image description here](http://i.stack.imgur.com/K6R9l.png) Please suggest if there is anyway I can get over this. The problem with these jagged edges is that it appears very dull and unreadable at 100% resolution. OK guys, now here is the MWE               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %% HEADER     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \documentclass[a4paper,twoside,12pt]{book}          %% Language %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     %\usepackage[utf8]{inputenc}     \usepackage{graphicx,color,subfigure}          %% Line Spacing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage{setspace}     %\singlespacing        %% 1-spacing (default)     %\onehalfspacing       %% 1,5-spacing     \doublespacing        %% 2-spacing          %% Other Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage[left=1.5in, right=1.5in, top=1in, bottom=1in, includefoot, headheight=13.6pt]{geometry}     \usepackage[pagebackref=true,breaklinks=true,letterpaper=true,colorlinks,bookmarks=false]{hyperref}     \usepackage{helvet}     \usepackage[square,numbers]{natbib}     \usepackage{hyphenat}     \usepackage{fancyhdr}               \begin{document}          \pagestyle{empty} %No headings for the first pages.          \cleardoublepage %The first chapter should start on an odd page.          \pagestyle{plain} %Now display headings: headings / fancy / ...          \pagebreak          %------------------------------------------------------------------------     \chapter{Divorce}               A major change that has occurred in the Western family is an increased incidence in divorce. Whereas in the past, divorce was a relatively rare occurrence, in recent times it has become quite commonplace. This change is borne out clearly in census figures. For example thirty years ago in Australia, only one marriage in ten ended in divorce; nowadays the figure is more than one in three (Australian Bureau of Statistics, 1996: p.45). A consequence of this change has been a substantial increase in the number of single parent families and the attendant problems that this brings (Kilmartin, 1997).               \end{document}


title: How to change font size for specific lstlisting

text: I have a java lstlisting and it is too big and does not mach a single page. Is there any way to specify font for specific listing, not all listings in document?


title: Modifying alltt

text: I want to create an environment which wraps `alltt` in such a way that the character `'` is replaced by `\textquotesingle` wherever it occurs inside the environment but is as normal elsewhere. I have tried to replicate the tricks played in `upquote.sty` but have been unable to master the art of catcode hacking sufficiently to get it working. Any suggestions would be very welcome.


title: How to use a LaTeX beamer (template)

text: This is a really stupid question (I know) but I can't figure out how to get this LaTeX beamer template: http://blog.barisione.org/2007-09/torino-a-pretty- theme-for-latex-beamer/ I get a tar-file and zip it. But how to use the template? When I click on it I just get into a lot of different files. Thank you very much in advance.


I want to know the differences in settings between article and minimal document classes. I don't want to do this task by comparing their source codes manually. Is there a simple way to know a list of article settings that are different from minimal settings?


title: Biolinum font bold 11pt issue in tableofcontents

text: I found an issue in adopting the Biolinum font, bold face at 11pt, in the tableofcontents. At 10pt or 12pt it works just fine, indeed. But I need to use 11pt. Compiled indifferently under LuaLaTeX and PdfLateX. Watch at the "e" character, which is not correctly aligned with the other chars. Seems not to scale optimally. I think I'll send a mail to the font's author, but meanwhile I'm just asking if I missed something in the code... B.t.w. please feel free to fix my English if sounds bad. Thanks. The code which gives the issue is:               \documentclass[a4paper, 11pt, openany, twoside]{book}      %--------------------- Fonts ------------------------------------------     \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \usepackage{libertineotf}     %--------------------- tocloft (indice generale) ---------------------%     \usepackage[titles]{tocloft}     \renewcommand{\cftchapfont}{\sffamily \bfseries}     \renewcommand{\cftchappagefont}{\sffamily \bfseries}          %_____________________ BEGIN DOCUMENT _________________________________%          \begin{document}     \frontmatter      \tableofcontents     \mainmatter     \chapter{abcdefghijklmnopqrstuvxwyz \uppercase{abcdefghijklmnopqrstuvxwyz} 1234567890}     \backmatter     \end{document}      **EDIT** Compiled under MikTeX 2.9, LuaTeX-0.70.2 ![The result](http://i.stack.imgur.com/sfu3W.jpg)


title: Preferred non-breakable space

text: Let's say I have a sentence like: "I will be at the beach from 4 to 7 this afternoon." and I want to add breakable spaces to prevent numbers from being isolated. So far, no problem, I could write something like: `I will be at the beach from~4~to~7 this afternoon`. Now what if I'd like to say that I'd _rather_ have a non-breakable space between `4` and `to`, but it's ok to remove it on emergency stretch if it doesn't fit then. Is there a way to use "preferred" non-breakable spaces that will be honored only if there is no overfull lines?


title: How to renew section commands in latex3

text: I'm trying to rewrite section commands using LaTeX3. For testing purpose, what I did is basically this:               \ProvideDocumentCommand \p { o m }     {   \IfNoValueTF{#1}         { %             \paragraph{\textsf{#2}}         }         { %             \paragraph[#1]{\textsf{#2}}         }     }      But I want to rewrite the `\paragraph` command so I could reuse any customization in a standard way. I've done some digging and obviously I need to get a grip on expl3, I saw multiple ways of doing this, like here but I'm trying to reach something that might be distributed as a `.sty` class. I dig into `skrapport` class, but there's too much information. Is there anyone that could explain me step by step the process from the `\ProvidesExplClass` to command rewriting like any kind of section or a simple `\cite`?


title: Beamer enumeration, continue counting but keep item at fixed position

text: I want an enumeration list. The list should however be fixed at its position. Furthermore at all time only 1 item should shown. So what I want is sort of this               \documentclass{beamer}     \begin{document}     \begin{frame}{Test}     \only<1>{%       \begin{enumerate}         \item[1.]<1> Item 1        \end{enumerate}     }     \only<2>{%       \begin{enumerate}         \item[2.]<2> Item 2       \end{enumerate}     }     \only<3>{%       \begin{enumerate}         \item[3.]<3> Item 3       \end{enumerate}     }     \end{frame}     \end{document}      Can this be achieved in an easy manner? For example, is there an option? Such that you could just use               \documentclass{beamer}     \begin{document}     \begin{frame}{Test}     \begin{enumerate}     \item<1> Item 1     \item<2> Item 2     \item<3> Item 3     \end{frame}     \end{document}


title: Make an \fbox of the remaining line width in `exam` class

text: I'm writing a math test in the `exam` class, and I want to make framed boxes for the students to write their answer in. I've tried this solution, but the box exceeds the right page margin by 6.79999pts. What's going wrong here? MWE:               \documentclass[12pt, a4paper]{exam}     \RequirePackage{amssymb, amsfonts, amsmath, latexsym, verbatim, xspace, setspace}     \usepackage[margin=1in,showframe]{geometry}     \usepackage[utf8]{inputenc}     \usepackage{fouriernc}     \usepackage{calc}          \usepackage{tikz,tikzpagenodes}     \usetikzlibrary{calc}          \newlength{\whatsleft}     \newcommand{\measureremainder}[1]{%     \begin{tikzpicture}[overlay,remember picture]         % Measure distance to right text border         \path let \p0 = (0,0), \p1 = (current page text area.east) in             [/utils/exec={\pgfmathsetlength#1{\x1-\x0}\global#1=#1}];     \end{tikzpicture}%     }          \onehalfspacing          \begin{document}     \begin{questions}     \addpoints     \question[8] \emph{Regn ut:}     \begin{parts}         \part[2] $6-(-4) = $ \measureremainder{\whatsleft}\fbox{\begin{minipage}{\whatsleft}\vspace{2em}\hfill\end{minipage}}     \end{parts}          \end{questions}     \end{document}      Resulting in ![enter image description here](http://i.stack.imgur.com/C0IUr.png)


title: Tabular environment within the \newenvironment

text: I'm writing a book, in which we refer the reader to the CD-ROM for the source code, and tell him the compiler and the result of running the program. Here's an example: ![expected](http://i.stack.imgur.com/wK38v.png) Since this "template" is happening a lot in the book, I decided to define a new environment for it (the command `\cprotEnv` used below is from the package cprotect):               \newenvironment{CDROM}[2]         {\begin{tabular}{| m{0.5in} m{0.3in} m{5in} |}             \hline             \includegraphics[width=0.5in]{CD-ROM.pdf} && #1 \\             & \includegraphics[width=0.3in]{Hand.pdf} &             We used the free compiler #2. \\             & \includegraphics[width=0.3in]{Hand.pdf} &         }         {\\ \hline \end{tabular}}          \cprotEnv\begin{CDROM}{\verb"\SampleCodes\C++\GetPageSize"}{Open Watcom}     The page size for this system is 4096 bytes.     \end{CDROM}      However, the output is something peculiar: ![produced](http://i.stack.imgur.com/UjwTP.png) Could you please help me to get the expected results?


title: ucharclasses package does not work with TeX Live 2014's fontspec

text: With full TeX Live 2014 `ucharclasses` package no longer works with `fontspec`. It works with BasicTeX 2014 because BasicTeX 2014 uses old version of font spec from 2013. Here is an example document which works with `fontspec` 2013 but no longer works with `fontspec` from full TeX Live 2014:               \documentclass[12pt]{article}          \usepackage{fontspec}     \defaultfontfeatures{Mapping=tex-text}          \usepackage[Latin, Thai]{ucharclasses}     \setDefaultTransitions{\fontspec{Hoefler Text}}{}     \setTransitionTo{Thai}{\fontspec[Scale=1]{Thonburi}}          \begin{document}          Test  ไทย          \end{document}        Anybody knows how to fix it?


title: Enforcing baseline alignment for multiple overbraces in math mode

text: What is the easiest way to vertically align overbraces in math? In the following example...               \documentclass{article}     \usepackage{amsmath}     \begin{document}          \begin{math}     *(m, n) = (\overbrace{n - m}^\text{index}, \overbrace{\sum_{k=m}^{n-1}{\pi_{i_k}}}^\text{sum})     \end{math}          \end{document}      ...because the second tuple element has greater vertical extent (due to the summation), the brace appears higher than the other one. I would like to have "index" and "sum" on the same baseline: ![enter image description here](http://i.stack.imgur.com/zPo30.png)


title: Equation formatting: spacing between characters

text: I have the following variable: `$\omega_{fo}$` which gives [;\omega_{fo};] . The problem with the output is that there is a quite big separation between the letters `f` and `o`. Is there a way to make them come closer? NB: the `fo` stands for forcing---this is why it's in italic (normal math mode) and not written upright. Thanks a lot...


title: TeX Live 2010 and Thunderbird add-on LaTeXIt! don't cooperate

text: I am using the Thunderbird email client on Windows and I have TeX Live 2010. I have tried the Thunderbird add-on _LaTeXIt!_ (to insert equations as images in emails). (This is not the Mac tool LaTeXiT, just to avoid confusion.) However, the developer seems only to support MiKTeX and not TeX Live. When trying to use it in Thunderbird, e.g. putting in a simple `$a^2$`, I get an error message. The message below is from the _LaTeXIt!_ tool:               LatexIt! run report...          *** Found expression $a^2$          $PATH is My computer path (I have deleted the info here)               *** Generating LaTeX expression:     \documentclass{article}     \usepackage[latin1]{inputenx}     \usepackage[T1]{fontenc}     \begin{document}     $a^2$ %this is where your LaTeX expression goes     \end{document}          I ran C:\texlive\2010\bin\win32\latex.exe -output-directory=C:\DOCUME~1\yogcal\LOCALS~1\Temp -interaction=batchmode C:\DOCUME~1\yogcal\LOCALS~1\Temp\tblatex-1.tex error code 1          LaTeX process returned 1     Proceeding anyway...     Severe error. Missing package?     We left the .tex file there: C:\DOCUME~1\yogcal\LOCALS~1\Temp\tblatex-1.tex, try to run latex on it by yourself...     --> Failed, not inserting And here is the log file               This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010) (format=latex 2011.2.28)  18 JUL 2011 08:26     entering extended mode      restricted \write18 enabled.      %&-line parsing enabled.     **C:/DOCUME~1/yogcal/LOCALS~1/Temp/tblatex-1.tex     ! Emergency stop.                          \protect       C:/DOCUME~               1/yogcal/LOCALS~1/Temp/tblatex-1.tex     *** (job aborted, file error in nonstop mode)               Here is how much of TeX's memory you used: (info deleted here) Of course, I can compile the LaTeX file `tblatex-1.tex` generated in the temp folder very well with TeX Live 2010 without any problems but _LaTeXIt!_ apparently cannot. I am posting this question here as maybe someone can provide me with useful information on what is happening during the compilation process. Any suggestions? * * * Update: This is what I get when running the command as _LaTeXIt!_ did:                C:\texlive\2010\bin\win32>latex.exe -output-directory=C:\DOCUME~1\yogcal\LOCALS~1\Temp -interaction=batchmode C:\DOCUME~1\yogcal\LOCALS~1\Temp\tblatex-1.tex      This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010)      restricted \write18 enabled.      entering extended mode      C:\texlive\2010\bin\win32> And there is no compilation. If I move the file `tblatex-1.tex` to C:\, then compilation is fine. I believe that the error is due to the location where the file `tblatex-1.tex` is placed by _LaTeXIt!_ i.e. in               C:\Documents and Settings\yogcal\Local Settings\Temp Maybe the spacing in the folder names is creating this problem. And there is not way to change this in the option of _LaTeXIt!_ to `C:\`


title: itemize doesn't work in IPE

text: I want to use itemized lists in IPE. Everytime when I try to do this I get following error:                Assertion failed on line #511 (ipegeo.cpp): 't != 0'      Aborted (core dumped)      I've read that itemize environments need a box where paragraphs are allowed(e.g. minipage or parbox). But even when I have the itemize environment in a minipage it doesn't work. Does anyone know how I can fix the error? edit: I have Ubuntu 12.04, Tex Live 2012 and IPE 7


title: Journal Abbreviations in achemso

text: I am submitting a paper to ACS Nano using the `achemso` package. However, even after using `ancac3` document class optiion the bibliography always shows the full journal name. ACS Nano would like to have the journal names abbreviated. Anyway I can accomplish this?


title: Different xstep and ystep in TikZ with to[path] (precisely to[grid with coordinates])

text: As it's my first question, I want to say `hello` first! I am using `[grid with coordinates]` code from Andrew Stacey answer (link) for How can I show coordinates by grid in TikZ automatically?. I modified it a bit and tried to acquire different `major/minor lines xstep` and `ystep`, I ended with:               \documentclass{article}          %\usepackage{pgfplots}     \usepackage{tikz,pgfplots}          \makeatletter     \def\grd@save@target#1{%       \def\grd@target{#1}}     \def\grd@save@start#1{%       \def\grd@start{#1}}     \tikzset{       grid with coordinates/.style={         to path={%           \pgfextra{%             \edef\grd@@target{(\tikztotarget)}%             \tikz@scan@one@point\grd@save@target\grd@@target\relax             \edef\grd@@start{(\tikztostart)}%             \tikz@scan@one@point\grd@save@start\grd@@start\relax             \draw[minor help lines] (\tikztostart) grid (\tikztotarget);             \draw[major help lines] (\tikztostart) grid (\tikztotarget);             \grd@start             \pgfmathsetmacro{\grd@xa}{\the\pgf@x/1cm}             \pgfmathsetmacro{\grd@ya}{\the\pgf@y/1cm}             \grd@target             \pgfmathsetmacro{\grd@xb}{\the\pgf@x/1cm}             \pgfmathsetmacro{\grd@yb}{\the\pgf@y/1cm}             \pgfmathsetmacro{\grd@xc}{\grd@xa + \pgfkeysvalueof{/tikz/grid with coordinates/major step x}}             \pgfmathsetmacro{\grd@yc}{\grd@ya + \pgfkeysvalueof{/tikz/grid with coordinates/major step y}}             \foreach \x in {\grd@xa,\grd@xc,...,\grd@xb}             \node[anchor=north] at (\x,\grd@ya) {\pgfmathprintnumber{\x}};             \foreach \y in {\grd@ya,\grd@yc,...,\grd@yb}             \node[anchor=east] at (\grd@xa,\y) {\pgfmathprintnumber{\y}};           }         }       },       minor help lines/.style={         help lines,         gray,         line cap =round,         xstep=\pgfkeysvalueof{/tikz/grid with coordinates/minor step x},         ystep=\pgfkeysvalueof{/tikz/grid with coordinates/minor step y}       },       major help lines/.style={         help lines,         line cap =round,         line width=\pgfkeysvalueof{/tikz/grid with coordinates/major line width},         xstep=\pgfkeysvalueof{/tikz/grid with coordinates/major step x},         ystep=\pgfkeysvalueof{/tikz/grid with coordinates/major step y}       },       grid with coordinates/.cd,       minor step x/.initial=.5,       minor step y/.initial=.2,       major step x/.initial=1,       major step y/.initial=1,       major line width/.initial=1pt,     }     \makeatother      What I need now is to specify `xstep` and `ystep` in actual `tikzpicture`, e.g. in code below I want to pass `xstep` and `ystep` (for minor and major lines separately) so that Fig. B gets `major lines xstep =0.2`.               \begin{document}          \begin{figure}         \centering         \begin{tikzpicture}[xscale=1,yscale=2]         \draw (0,0) to[grid with coordinates] (5,1);             \end{tikzpicture}         \caption{A}\label{fig:sphere}     \end{figure}              \begin{figure}         \centering         \begin{tikzpicture}[xscale=5,yscale=2]         \draw (0,0) to[grid with coordinates] (1,1); %major step x =0.2         \end{tikzpicture}         \caption{B}\label{fig:sphere}     \end{figure}          \end{document}      I can't guess how to pass the parameters.


title: Relative Paths for the animate Package

text: I would like to use relative images with the `animate` package. I have tried both using the `\graphicspath` as shown below and typing in the relative path. Either way the code fails. Can anyone explain why this doesn't work (since `animate` is built on the `graphicx` package)? Any suggestions for a work around? I would really like to be able to keep my images in a separate directory                   \graphicspath{{"../../../Project Work/Shot Database/Data/CFD/15/"}}              %This line works         \includegraphics[width=3in]{v-top-0002}              %This line doesn't         \animategraphics[loop,autoplay,width=6.5in]{12}{v-top-}{0001}{0008}


title: Problem with un-clear error messages (using LaTeXmk[fls file] and XeLaTeX[bad file descriptor])

text: More or less out of the blue, I've gotten the following:               xelatex: Bad file descriptor     Latexmk: fls file doesn't appear to have been made      I've no clue about the first and the second is confusing in that the appropriate .fls file was created during the `latexmk` run. Since my text is mostly `\input` based, I narrowed it down to two files. One has undergone significant change so it is the likely target for investigation based on the debugging rule of _whatever changed is the problem_ but the other was a simple inclusion for the bibliography which has not changed in quite some time. I've done a `latexmk -C filename` several times without improvement. It creates the .pdf file but still fails with:               Latexmk: Errors, so I did not complete making targets     Collected error summary (may duplicate other messages):       pdflatex: Command for 'pdflatex' gave return code 256      As an aside, where does Latexmk put the errors is finds and 'collects'? Nor can I seem to find what 'code 256' actually means. Suggestions, brickbats, pointers all welcome at this point. **UPDATE:** Here is a MWE that duplicates (at least for me) the problem: First the test.tex file:               \documentclass{memoir}     \begin{document}     \input{bibliography}     \end{document}      Then the bibliography.tex file as `\input` above               \nocite{*}     \bibliographystyle{plain}     \bibliography{test}      And then the actual test.bib file:               @book{Bateman.1906,      author = {Bateman, Newton and Selby, Paul and Short, William F.},      year = {1906},      title = {Historical encyclopedia of Illinois},      address = {Chicago},      publisher = {Munsell Pub. Co.}     }          @book{Beckett.1966,      author = {Beckett, J. C.},      year = {1966},      title = {The making of modern Ireland, 1603-1623},      address = {London},     publisher = {Faber}     }      **UPDATE II:** Just in case here is the `latexmkrc` file I use:               $pdf_mode = $preview_mode = 1;     $dvi_mode = $postscript_mode = 0;     $pdflatex = "xelatex %O %S";     $hash_calc_ignore_pattern{'dat'} = '^.*$';     $pdf_previewer = 'start "c:/Program Files/SumatraPDF/SumatraPDF.exe" %O %S';      The only oddness that I can think of is the `$hash_calc_ignore_pattern{'dat'}` which skips over a .dat file I use for versioning. **UPDATE III** Screen dump including 'clean' and run:               +C:\>latexmk -C test     Latexmk: This is Latexmk, John Collins, 11 Nov. 2012, version: 4.35.     **** Report bugs etc to John Collins <collins at phys.psu.edu>. ****     Latexmk: Examining fdb file 'test.fdb_latexmk' for rules ...          +C:\>latexmk test     Latexmk: This is Latexmk, John Collins, 11 Nov. 2012, version: 4.35.     **** Report bugs etc to John Collins <collins at phys.psu.edu>. ****     Latexmk: applying rule 'pdflatex'...     Rule 'pdflatex': Rules & subrules not known to be previously run:        pdflatex     Rule 'pdflatex': The following rules & subrules became out-of-date:           'pdflatex'     ------------     Run number 1 of rule 'pdflatex'     ------------     ------------     Running 'xelatex  -recorder  "test.tex"'     ------------     This is XeTeX, Version 3.1415926-2.4-0.9998 (MiKTeX 2.9)     entering extended mode     (C:\Users\hsmyers\Desktop\Jourdan\test\test.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,     croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("C:\Program Files\MiKTeX 2.9\tex\latex\memoir\memoir.cls"     Document Class: memoir 2011/03/06 v3.6j configurable book, report, article docu     ment class     ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\ifetex\ifetex.sty"     ("C:\Program Files\MiKTeX 2.9\tex\plain\ifetex\ifetex.tex"))     ("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")     ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\misc\etex.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\memoir\mem10.clo")     ("C:\Program Files\MiKTeX 2.9\tex\latex\memoir\mempatch.sty"))     (C:\Users\hsmyers\Desktop\Jourdan\test\test.aux)     (C:\Users\hsmyers\Desktop\Jourdan\test\bibliography.tex     (C:\Users\hsmyers\Desktop\Jourdan\test\test.bbl     bibitemlist     )) [1] (C:\Users\hsmyers\Desktop\Jourdan\test\test.aux)          LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.           )     Output written on test.pdf (1 page).     Transcript written on test.log.     Latexmk: Found input bbl file 'test.bbl'     Latexmk: References changed.     Latexmk: Log file says output to 'test.pdf'     Latexmk: Found bibliography file(s) [test.bib]     Latexmk: applying rule 'bibtex test'...     Rule 'bibtex test': The following rules & subrules became out-of-date:           'bibtex test'     ------------     Run number 1 of rule 'bibtex test'     ------------     For rule 'bibtex test', running '&run_bibtex(  )' ...     ------------     Running 'bibtex  "test"'     ------------     Latexmk: applying rule 'pdflatex'...     Rule 'pdflatex': File changes, etc:        Changed files, or newly in use since previous run(s):           'test.aux'     ------------     Run number 2 of rule 'pdflatex'     ------------     ------------     Running 'xelatex  -recorder  "test.tex"'     ------------     xelatex: Bad file descriptor     Latexmk: fls file doesn't appear to have been made     Latexmk: Found input bbl file 'test.bbl'     Latexmk: References changed.     Latexmk: Log file says output to 'test.pdf'     Latexmk: Found bibliography file(s) [test.bib]     Latexmk: Errors, so I did not complete making targets     Collected error summary (may duplicate other messages):       pdflatex: Command for 'pdflatex' gave return code 256     Latexmk: Use the -f option to force complete processing,      unless error was exceeding maximum runs of latex/pdflatex.      Sorry about the length even with a short MWE it ran fairly long. **RESOLUTION??:** While thrashing around trying various things I stumbled across a _fix_. Note that I said 'a' fix, not 'the' fix since while this works it doesn't tell me what was wrong in the first place :( What I did was run `TexWorks` which to my surprise ran to completion without error. Then because I'm both curious and paranoid, I made a slight change and then ran `latexmk` again. Likewise to completion without error. So there you have it---job well done---NOT! On the other hand I'm back up and running if still somewhat ignorant.


title: Circular drop shadow example

text: Sorry for such an elementary question, but all the examples I could find in search were too complicated. I'm trying to recreate a circular drop shadow example from the pgf manual. What packages are necessary and where do I place               shadow scale=1.1, shadow xshift=.3ex, shadow yshift=-.3ex,     fill=black, path fading={circle with fuzzy edge 15 percent},     every shadow,      in regards to the rest of the code?               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{shapes.geometric}     \usepgflibrary{decorations.shapes}     \begin{document}     \begin{tikzpicture} {1,...,8}         \node[circle,circular drop shadow,draw=blue,fill=blue!20,thick]           at (\i*45:1) {Circle \i};     \end{tikzpicture}     \end{document}


title: Removing the bibliography name

text: I use the »babel« package with option `bahasa` . For bibliography purposes, I make the section "Daftar Pustaka", but `thebibliography` environment produced "Pustaka". So there are two titles. How to remove the `thebibliography` name?


title: Equation not displaying correctly

text: Just a quick question about equations. I have been trying to get my equations to display correctly but so far no luck. What I require is this ![PDF Form](http://i.stack.imgur.com/pQkj3.png) What I am getting ![LaTex form](http://i.stack.imgur.com/okYQv.png) With this code               \begin{equation}     \label{eq:dn1}          \frac{d{N_{1}}}{dt}=-R_{p}+\frac{\phi D}{2L_{crystal}}+N_{2}W_{21}+N_{3}W_{31}+N_{4}W_{41}+C_{up}N_{2}^{2}          \end{equation}      Also, I can't remember how to make it so all the equation numbers are in the same position on the right hand side of the page. As you can see, this isn't happening either. Usually when I use equations, I don't normally have this problem. Any help is greatly appreciated.


title: Preventing page breaks from occurring in bibliography items

text: Using Bibtex and Natbib, does anyone know how to **prevent** a pagebreak from occurring mid-item? I would like the bibliography to either:   * Put an entire record on a given page, or    * Carry the record over to the following page.  I **DONT** want the bibliography to:   * Break a record halfway through the actual record so that part is on one page, and part on the next. My bibliography has 6+ pages of records, so I am talking about breaks midway through an **INDIVIDUAL** record, not through the actual bibliography, which is inevitable and perfectly fine. My bibliography is in a multicol environment, sample to follow: ![Output](http://i.stack.imgur.com/JX3v6.png) In the above, you can see that item 186 and 212 are not complete, therefore, would like them to start on the next column and next page respectively. MWE for the bibliography as follows:               \bibliographystyle{BSTFILE} %my style file.     \newcommand*{\doi}[1]{\href{http://dx.doi.org/\detokenize{#1}}{\raggedright\mybibdoicolor{DOI: \detokenize{#1}}}} %format DOI's     \setlength{\bibsep}{0.0pt} %separation     \def\mybibfontsize{\small} %fontsize     \def\mybibnumbercolor{gray} %define number color     \renewcommand{\bibnumfmt}[1]{\color{\mybibnumbercolor}[\textbf{#1}]}  %change color of number     \addcontentsline{toc}{chapter}{References} %add to toc          \begin{multicols}{2}{         \mybibfontsize\bibliography{BIBLIOGRAPHY}     }     \end{multicols}


title: Using non-numeric ((sub)sub)sections changes the way of how \ref is displayed

text: I have some issue with LaTeX and I haven’t found a solution yet. So hopefully some of you can help me. I'm writing a big article with four levels of sectioning (so I'm using paragraph for the lowest level). Furthermore in my faculty it is common to have the sections in Alph, subsections in Roman, subsubsections in arabic and paragraphs in alph. This didn't seem to be a problem by redefining `\thesection`, etc. But now I'm struggling with a problem, when referencing. In the subsequent example I have a reference and if I don't redefine `\the...`, then the last sentence in the PDF will be _You find some information about it in **1.1.1**._. So I expected to have the same structure after redefining: _You find some information about it in **A.I.1._** , but instead I get _You find some information about it in **1**._ How can I achieve my desired output? I faced the same problem with fancy, but I could fix it by redefining `\sectionmark`, `\subsectionmark` and `\subsubsectionmark`. Maybe there is some similar solution for my `\ref` problem? I'm using the hyperref package, if this is of any importance.               \documentclass{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[ngermanb]{babel}          \renewcommand \thesection {\Alph{section}}     \renewcommand \thesubsection {\Roman{subsection}}     \renewcommand \thesubsubsection {\arabic{subsubsection}}          \begin{document}     \section{My first Section}\label{sec:s1}     \subsection{My first Subsection}\label{sec:s1-ss1}     \subsubsection{My first Subsubsection}\label{sec:s1-ss1-sss1}     This is some text, pretty similar to \emph{lorem ipsum}.          \section{My first Section}\label{sec:s2}     Have you ever heard about \emph{lorem ipsum}? You find some information about it     in \ref{sec:s1-ss1-sss1}.     \end{document}


title: Help with adjusting line-spacing on custom title page

text: I'm making a custom title page for my PhD proposal, following the Title Creation article of LaTeX in Wikibooks. However, after many tries I just can't get the title to have a bigger line-spacing. I was wondering if anyone can help me with this issue. Heres the image of the issue and a sample document: ![title](http://i.stack.imgur.com/47GXW.png) Sample Document:               \documentclass[10pt,a4paper]{article}          \usepackage[portuguese]{babel}     \usepackage[latin1]{inputenc}       \usepackage[pdftex]{graphicx}          \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}     \begin{document}          \begin{titlepage}         \begin{center}              % Upper part of the page         %\includegraphics[width=0.15\textwidth]{./logo}\\[1cm]             \textsc{\large Department}\\[0.5cm]         \textsc{\Large University}\\[3.5cm]              \textsc{\Large Proposal bla bla}\\[1.5cm]              % Title         \HRule \\[0.4cm]         {\Huge \bfseries Proposal title proposal title proposal title proposal title proposal title proposal title}\\[0.4cm]         \HRule \\[1.5cm]              % Author and supervisor         \begin{minipage}{0.4\textwidth}         \begin{flushleft} \large             \emph{Autor:}\\             John Smith         \end{flushleft}         \end{minipage}         \begin{minipage}{0.4\textwidth}         \begin{flushright} \large             \emph{Orientador:} \\             Dr.~Albert \textsc{Einstein}         \end{flushright}         \end{minipage}              \vfill              % Bottom of the page         {\large \today}              \end{center}          \end{titlepage}          \end{document}


title: How to collaborate on a TeX project using VCS with a collaborator who is not using VCS?

text: Pretty self-explanatory; I'm thinking of @AndrewStacey's answer, in particular the part about working with collaborators who do not use VCS. I'm hoping for a more detailed explanation / step-by-step workflow for how, e.g., to use GIT (or SVN) to make it "seem" to _me_ that a potential collaborator who is not tech-savvy (or TeX-savvy!) is using VCS without the collaborator having to be aware of it. The collaborator and I will share files over Dropbox, but I'm planning on treating a local non-shared, version-controlled folder as the "real" project and just using the Dropbox for fast exchange with the collaborator. Any words of advice / approaches to doing this would be much appreciated.


title: Tikz - How to determine the coordinates in fill

text: How to create Candle Symbol in LaTeX I previously asked a question about making candle light and got amazing answers. To todd's answer I have another question which would help understand basics of such problems. In the answer `\fill[color=#2] (0,0) .. controls (-1.5,1.25) and (.5,2) .. (-.2,4) .. controls (1,2.5) and (1,.5) .. (0,0);` How to find the coordinates, it can not be shear hit and trial, there must be some reason behind it. its better to learn how to fish then ask ask for a fish :), so lets learn it from TeX Gurus. Really appreciate all your help.


title: Run a library from a folder?

text: I'm struggling to get Tikz to run on my University terminal, for some as of yet unknown reason, and I don't have the permissions to install Tikz. I've emailed the 'computer help people' asking them to fix it, but that could take anywhere between a day and a month. I found this question which has gone someway to answering my question, namely this answer. The answer points here and it looks like I want this sort of syntax:               \import{/base/otherfolder/million_other_folders}{oneOfTheFiles}      But it seems like this is going to take one line for every file I want, and Tikz is very large. Am I doing this right? How can I use Tikz without 'installing' it properly? * * * # Edit the first: Using `kpsepath tex | sed 's/:/\n/g'` I found that `~/texmf/tex` exists and is accessible to me. Running `tree` on the base `dir` the folders I downloaded look like so, how much of this needs to go into `~/texmf/tex` ?               base     |-- doc     |   `-- generic     |-- source     |   `-- latex     `-- tex         |-- context         |-- generic         |-- latex         `-- plain      # Edit the second: I'm getting conflicting results from `kpsepath tex | sed 's/:/\n/g'|sed '/!!/d'` (I've removed the results appended by `!!` as I think they are folders I don't have permission for.) The issue is I don't think the files it finds don't exist. It may just be my universities set up of this terminal. Here is a screencap: ![enter image description here](http://i.stack.imgur.com/QR4mm.png)


title: How to test if a macro has the shape of a coordinate from TikZ?

text: How can I know if a macro contains a coordinate, that is, in the sense of having the shape of a coordinate `num,num`. What I want to do is to know if a given macro, `\pos`, has the shape (in sense of parsing) of a coordinate or not, and then do something in case it has it and do something else if the shape is not a coordinate. For example, I'm looking for a way of achieving:               \pos{0,0}     \ifcoordinate\pos     It is a coordinate     \else     It is not a coordinate     \fi      In that case, what `\ifcoordinate` should be? In other words, how can I know if the contents of the given macro are in the sequence: `number, coma, number`?. _Note that I want to use this verification, later on, in some TikZ related code, so a TikZ related solution is appreciated._


title: pgfplots: using path names created with foreach in pgfplotsextra

text: This is a follow-up to naming paths inside a TikZ foreach loop I want to plot a series of plots with names generated for each plot (using`name path global`) in a `foreach` loop and place a `coordinate` at the intersection of each plot with a reference line. The `coordinates` name is also generated in the loop. The names are generated from `\ksdlist`, the reference line is called `RefLine`:               \documentclass{standalone}          \usepackage{tikz,pgfplots}          \usetikzlibrary{intersections}%,backgrounds,calc}          \def\ksdList{5e-2,3e-2,2e-2,1e-2,4e-3,1e-3,4e-4,1e-4,1e-5}          \begin{document}       \begin{tikzpicture}         \begin{loglogaxis}[           xmin=2300,xmax=1e8,ymin=0.008,ymax=0.1           ]           \path[draw,name path global=RefLine] (rel axis cs:1,0) -- (rel axis cs:1,1);           \foreach \ksd in \ksdList {             \edef\plotopt{name path global=plot-\ksd}             \expandafter\addplot\expandafter[\plotopt,raw gnuplot] gnuplot {               set xrange [2300:1e8];               set yrange [0.008:0.1];               set logscale xy;               set samples 100;               f(R,L) = -2*log10(2.51/(R*sqrt(L))+\ksd/3.71)-1/sqrt(L);               set cont base;               set cntrparam levels discrete 0;               unset surface;               splot f(x,y) smooth unique;             };             \edef\intersectionsopt{name intersections={of plot-\ksd and RefLine}}             % -----------             % This fails:             \expandafter\pgfplotsextra{\expandafter\path\expandafter[\intersectionsopt] (intersection-1) coordinate (end-\ksd);};           }           % -----------------------------------------------           % This is how I can place the coordinate manually           \pgfplotsextra{\path[name intersections={of=plot-5e-2 and RefLine}] (intersection-1) coordinate (end-5e-2);}         \end{loglogaxis}         % ---------------------------         % And I can now place a label         \path (end-5e-2) node[right] {0.05};       \end{tikzpicture}     \end{document}      The options for creating the intersections are in `\intersectionsopt`, but they include a pair of braces, which I think is the cause for errors during compilation.


title: One more question regarding "function restriction"

text: This question is in connection with How to typeset function restrictions There, egreg gives a satisfactory answer (at least for me) The problem is that I'd like to do the same thing with `\restriction` as delimiter instead of `|`, but somehow I can't figure out how to do that.


title: Subfigure Alignment

text: I am trying to show a set of pictures using `subfigure`. The first line seems OK, but the second line has a different alignment than the first line, even though the two lines are exactly the same. How can I fix it? Code:               \begin{figure*}         \centering             \begin{subfigure}                     \centering                     \includegraphics[width=\imagewidth,height=\imageheigth]{image1}             \end{subfigure}             ~             \begin{subfigure}                     \centering                     \includegraphics[width=\imagewidth,height=\imageheigth]{image2}             \end{subfigure}                   ..............         ..............         ~         \begin{subfigure}                 \centering                 \includegraphics[width=\imagewidth,height=\imageheigth]{imageN}         \end{subfigure} \\         ~         \begin{subfigure}                 \centering                 \includegraphics[width=\imagewidth,height=\imageheigth]{image(N+1)}         \end{subfigure}         ..............         ..............         ~          \begin{subfigure}                 \centering                 \includegraphics[width=\imagewidth,height=\imageheigth]{image(2N)}         \end{subfigure}         \caption{some stuff her}          \label{fig:stuff}          \end{figure*}


title: Displaying authors in color bibtex

text: If I call a reference by `\citet{xxx}`, it appears in my document as `Author [number]`, where the number appears in the color I defined in `\hypersetup{citecolor=red}` while `Author` and `[]` appear in black color. The `natbib` options I am using are:               \usepackage[square,colon,sort&compress,numbers]{natbib}      Would it be possible to make the entire reference (`Author[number]`) appears in red color? or at least the Author and the number? MWE:               \documentclass[12pt]{article}     \usepackage{cite}     \usepackage{color}     \usepackage{hyperref}     \usepackage[square,colon,sort&compress,numbers,nonamebreak]{natbib}     \hypersetup{colorlinks,citecolor=red,linkcolor=red}          \begin{document}          blablabla \citet{Ref1} blabla.....          \newpage     \bibliographystyle{unsrtnat}     \bibliography{BibliographyFile}          \end{document}          @article{Ref1,      author    = "Author1, A1. and Author2, A2.",     title     = "xxxxxxxxxxxxxxxx",     journal   = "xxxxxxxxxxxxxxxxxxxx",     volume    = "YY",     number    = "ZZ",     year      = "XXXX",     url={web},     pages     = "x-y",     }       * * * a MWE is:               \documentclass[12pt]{article}     \usepackage{cite}     \usepackage{color}     \usepackage{hyperref}     \usepackage[square,colon,sort&compress,numbers,nonamebreak]{natbib}     \hypersetup{colorlinks,citecolor=red,linkcolor=red}          \begin{document}          blablabla \citet{Ref1} blabla.....          \newpage     \bibliographystyle{unsrtnat}     \bibliography{BibliographyFile}          \end{document}          @article{Ref1,      author    = "Author1, A1. and Author2, A2.",     title     = "xxxxxxxxxxxxxxxx",     journal   = "xxxxxxxxxxxxxxxxxxxx",     volume    = "YY",     number    = "ZZ",     year      = "XXXX",     url={web},     pages     = "x-y",     }


title: Horizontal line within a line of text

text: You may know that in `moderncv` there is a horizontal line at the left of each section. I want to print this at the right of the section title too, just like this: ![Mockup of desired output](http://i.stack.imgur.com/kUvby.png) My current code is as follows:               \documentclass[10pt,a4paper]{moderncv}     \moderncvtheme[blue]{classic}     \usepackage[T1]{fontenc}     \usepackage[utf8x]{inputenc}     \usepackage[english]{babel}     \usepackage[scale=0.92]{geometry}          \setlength{\hintscolumnwidth}{1.2cm}     \usepackage{helvet}          \firstname{\Huge Johnson}     \familyname{Green\vspace{-3mm}}          \title{\normalsize \color{black}Expertise in xxx and xxx.}     \mobile{\color{black}{\textbf{(987) 1234 5678}}}     \email{johnson.green@example.com}          \begin{document}     \maketitle          \section{\textbf{\textsc{Objective}}}     Seeking the XXX position in YYY that ...           \section{\textbf{\textsc{Education}}}     \cvitem{2010 - 2014}{ Ph.D, Z University}     \cvitem{2006 - 2010}{ B.A, M University}     \end{document}


title: Multiple bibiographies using biblatex, and resetting numbers

text: I am writing a sort of large CV, and I've split my publications into several blocks, using this:               \nocite{*}     \printbibheading[title={Publications}]     \printbibliography[nottype=online,heading=subbibliography,     title={Printed Sources},resetnumbers=true]     \printbibliography[type=online,heading=subbibliography,     title={Online Sources},resetnumbers=true]      which I mostly copied from the `biblatex` manual. However, the numbers aren't being reset as I want. The numbers in the Online Sources part, for example, go [13], [21], [29], [36] instead of [1], [2], [3], [4] as I'd like them to. Probably there are options better suited to my purpose than `resetnumbers`, but I haven't found them yet. Basically I want each sub-bibliography to be numbered starting at [1], and increasing in increments of 1. Ideas or advice?


title: How can the default font size for a family be set?

text: I want to use the luximono font for all my listings and all verbatims. By default, this font seems to be bigger than the rest, so I adjusted my listings with `basicstyle=\ttfamily\scriptsize` which I could also do for all `\verb`'s. How can I set the default font size for a family, in this case `ttfamily`?


title: nag complains about \centerline in environment "shaded" from package framed

text: Running this with Miktex, pdflatex, Windows, TeXnicCenter, everything fully up to date:               \documentclass{article}          \usepackage[l2tabu]{nag}     \usepackage{xcolor}     \usepackage{framed}          \definecolor{shadecolor}{named}{lightgray}          \begin{document}          \begin{shaded}       Foo Bar     \end{shaded}          \end{document}      gives:               Package nag Warning: Command \centerline is TeX.      (nag)                Use \centering or center environment instead on input line 13.      Is there anything I can do about it without changing the package itself? Any better packages than framed available that can do the same (page breaking colored boxed)? If not, how to contact the author of the package and inform him?


title: PDF Analyser or repair tool

text: I got one PDF that is resultant file after conversion and merging of 17 documents(few documents were already converted to PDF) however resultant file has been converted and merged using activePDF. Now for resultant PDF file I am getting two errors when I open it in Adobe Acrobat Reader x I also tried Adobe Acrobat Prof latest to analyse but nothing helped, can someone guide me in right direction please > "An error exists on this page. Acrobat may not display the page correctly. > Please contact the person who created the PDF document to correct the > problem." and > "Cannot extract the embedded font "HiddenHorzOCR". Some characters may not > display or print correctly." Both errors are coming up for same document. **Main Problem** Converted/Merged PDF got invisible text for a specific PDF document, when I open open on its own, everything works fine. I guess If I embedded that font into resultant document might solve problem.


title: How do I get TeXCount working in TeXnicCenter

text: Sorry this is a bit specific, but I could really use some help. I am trying to work out a good way of getting a word count for my thesis. I do most of my editing on windows, via TeXnicCenter v1 and MikTeX2.9. The TeXCount webpage implies that MikTeX should come with TeXCount installed, and I see texcount.exe under `C:\ProgramFiles\MiKTeX 2.9\miktex\bin\x64` but I don't understand how to use it. I have seen the following question Using TeXcount with TeXnicCenter on this site, but I decided to go down the route suggested on this thread http://www.latex-community.org/forum/viewtopic.php?f=36&t=730 because it seemed to me some folks had actually got it working, but it hasn't helped me yet. I followed the instructions   1. Install ActivePerl   2. in TeXnicCenter go to /Tools/Customize/tools/new(insert)/   3. Fill in:   WordCount   command: "cmd /K texcount"   Arguments: "-inc '%pm'" At this point it seems to try to run MiKTeX 2.8 but I have no idea why! And then throws up an error message saying "The Perl script could not be found." I am not surprised, I can't find it either. It is not installed in `MiKTeX 2.9\scripts`. I have downloaded it myself and put `TeXcount_3_0_0_24` into that directory, but I am not confident that this path is being scanned by MiKTeX, and again I am not sure how to make that happen. I tried putting it elsewhere and providing MiKTeX with a new location, but MiKTeX just told me it was "Not a TDS-compliant root directory". I am rather stumped. I don't want to have to go putting copies of perl scripts and executables into all my directories as the final post suggested. Alternatively, if you think I am crazy to be going down this route, can anyone recommend a free pdf word counting tool? I'd prefer texcount because my word limit does not include captions, references etc and it's a faff to strip them out. As a last resort I can ftp everything across to linux and try to install TeXCount there, but I'd prefer to stick with my laptop if I can.


title: Glossaries package has a conflict with \boldsymbol in headings while hyperref is loaded

text: I have encountered an error while trying to add glossaries to a document where I had used `\boldsymbol` in a `\section` command, this error occurs only if the package `hyperref` is loaded. I hope the proper example is:               \documentclass[a4paper,12pt,oneside]{report}     %     \linespread{1.1}     %     \usepackage[IL2]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[czech,british]{babel}     %     \usepackage{hyperref}     %     \usepackage{amsfonts,amsmath,amssymb}     \usepackage{IEEEtrantools}     %     \usepackage{longtable}     \usepackage[acronym,nomain]{glossaries}     %     \makeglossaries     \begin{document}     %     \newacronym{ads}{AdS}{Anti-de Sitter}     %     \gls{ads}     \section{$\boldsymbol{B}$}     %     \printglossary[type=\acronymtype,title=List of Abbreviations]     %     \end{document}      Are there any nice solutions? * * * **Edit** I have also noticed that when I add a contents line for the list (I do not know if I'm doing it how I should) using `\addcontentsline{toc}{chapter}{List of Abbreviations}` it looks good, but the hyperlink does not work, it jupms to previously created contents line for bibliography, despite the fact, that the list has right page number in contents. Is it also an issue of `glossaries` together with `hyperref`


title: Is it possible to use packages changepage and hanging together?

text: I'm trying to change the margins around some paragraphs with hanging indents, but LaTeX throws an error and doesn't really explain what's wrong. I'm a LaTeX newbie, so please forgive me if I'm making a simple mistake. Thanks for your help.               \documentclass[a4paper,11pt]{article}          \usepackage{fullpage}     \usepackage{hanging}     \usepackage{changepage}          %\setlength{\parindent}{0pt}     \setlength{\parskip}{16pt}          \begin{document}          \begin{adjustwidth}{.25in}{0in}     \begin{hangparas}{.25in}{1}              \setlength{\parindent}{0in}              \textbf{One.}         \hspace{6pt}         Some text.  Some text.  Some text.  Some text.  Some text.  Some text.         Some text.  Some text.  Some text.  Some text.  Some text.  Some text.         Some text.              \textbf{Two.}         \hspace{6pt}         Some more text.  Some more text.  Some more text.  Some more text.  Some         more text.  Some more text.  Some more text.  Some more text.  Some more         text.  Some more text.  Some more text.          \end{hangparas}     \end{adjustwidth}          \end{document}               This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/Debian)      restricted \write18 enabled.     entering extended mode     (./test.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, fa     rsi, arabic, monogreek, greek, ibycus, ancientgreek, loaded.     (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo))     (/usr/share/texlive/texmf-dist/tex/latex/preprint/fullpage.sty)     (/usr/share/texlive/texmf-dist/tex/latex/hanging/hanging.sty)     (/usr/share/texlive/texmf-dist/tex/latex/changepage/changepage.sty) (./test.aux     )          ! LaTeX Error: Something's wrong--perhaps a missing \item.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...          l.30 \end{adjustwidth}          ?


title: Chapter Headings in TOC

text: I'm looking to accomplish what was shown here: Table of Contents with Chapter Where the toc was changed from                 1 Introduction      to               Chapter 1 Introduction      Except I also have an abstract, acknowledgements, list of tables, and list of figures in the toc. When I implement the solution my List of Tables, List of Figures, Acknowledgements and Abstract get piled on top of each other. My TOC compiled and looked fine (though not the way I wanted) before I added the \titlecontents block of code suggested in the above question. ![Piled TOC](http://i.stack.imgur.com/bScut.jpg)               % MWE     \documentclass{report}     \usepackage{titletoc}% http://ctan.org/pkg/titletoc     \titlecontents*{chapter}% <section-type>       [0pt]% <left>       {\addvspace{1em}}% <above-code>       {\bfseries\chaptername\ \thecontentslabel\quad}% <numbered-entry-format>       {}% <numberless-entry-format>       {\bfseries\hfill\contentspage}% <filler-page-format>          \begin{document}          \setcounter{page}{2}     \setcounter{tocdepth}{1}     \tableofcontents       \cleardoublepage       \addcontentsline{toc}{chapter}{\listfigurename}       \listoffigures       \cleardoublepage       \addcontentsline{toc}{chapter}{\listtablename}       \listoftables     \cleardoublepage     \cleardoublepage       \addcontentsline{toc}{chapter}{Abstract}       \cleardoublepage               \begin{abstract}     \thispagestyle{plain}     \pagenumbering{roman}     \setcounter{page}{9}     MWE     \end{abstract}            \addcontentsline{toc}{chapter}{Acknowledgements}     \setcounter{page}{10}     \section*{Acknowledgements}     \thispagestyle{plain}     I would....          \end{document}


title: Combine pgfplots on common background

text: This image is two `tikzpicture`s side by side, each with a newsprint background (thanks to Background image for pgfplots chart). I want them combined, so they appear on the same torn sheet of newsprint. The title should be centered there, too. I've looked at answers to several questions about nesting `tikzpicture`s but couldn't solve my problem. The not quite minimal MWE follows. (Sorry for the details and the duplicated code. I thought it best to provide the actual plots I plan to use.) ![enter image description here](http://i.stack.imgur.com/Nd0Uv.png)               \documentclass{standalone}     \usepackage{tikz,pgfplots}     \usepackage{pgfplotstable}          \usetikzlibrary{calc,decorations.pathmorphing}          %deal with warning message in log     \pgfplotsset{compat=1.8}          \usepackage{helvet}     \usepackage[eulergreek]{sansmath}          \newcommand{\images}{../images}          \begin{document}          \pgfdeclarelayer{background}     \pgfsetlayers{background,main}           \pgfplotstableread[col sep=comma]{     year, return, assets     2007, 23, 34.9     2008, 8.6, 37     2009, -27.3, 26     2010, 11, 27.4     2011, 21.4, 32     }\endowment          \newcommand{\plotsize}{width=7cm, height=6cm}          \tikzset{     pencildraw/.style={ %         decorate,         decoration={random steps,segment length=6pt,amplitude=3pt}         },      font=\sffamily\sansmath     }     \begin{tikzpicture}     \path[clip,pencildraw] (-1.8,-1) rectangle (6,5.5);     \begin{axis}[            title={\large Harvard Endowment},           \plotsize,           ylabel={Return},            axis y line*=left,           axis x line*=middle,           xtick=data,           xticklabel style={align=center},           xticklabels={2007, 2008, 2009, 2010, 2011},           yticklabel=\pgfmathprintnumber{\tick}\,$\%$,           nodes near coords={\pgfmathprintnumber{\pgfplotspointmeta}\%},         ]         \addplot table[x=year, y=return] {\endowment};              \begin{pgfonlayer}{background}           \node{\includegraphics{\images/newsprint}};         \end{pgfonlayer}     \end{axis}      \end{tikzpicture}          \begin{tikzpicture}     \path[clip,pencildraw] (-1.8,-1) rectangle (6,5.5);     \begin{axis}[            ymin=0,           ylabel={Assets},            \plotsize,           axis y line*=left,           axis x line*=bottom,           xtick=data,           xticklabel style={align=center},           xticklabels={2007, 2008, 2009, 2010, 2011},           yticklabel={\$\pgfmathprintnumber{\tick}b},           nodes near coords={\$\pgfmathprintnumber{\pgfplotspointmeta}b},         ]         \addplot table[x=year, y=assets] {\endowment};              \begin{pgfonlayer}{background}           \node{\includegraphics{\images/newsprint}};         \end{pgfonlayer}     \end{axis}      \end{tikzpicture}     \end{document}


title: mdframed label multiply defined (with listings and paracol)

text: I use three packages (in a latex "book" document) to display source files (not only tex and sometimes loaded from external files) and their outputs (sometimes loaded from external files) side by side.   * listings for the syntax highlighting   * paracol to display side-by-side   * mdframed to customize appearance My problem is, that this causes warnings of multiply defined labels (somewhere inside mdframed I think):               WARNING: Label 'mdf@pagelabel-1' multiply defined     WARNING: There were multiply defined labels      I hacked my way through, but I'm not satisfied with my solution... is there a better way? Here is my minimal "working with warnings" example. My hacks are commented out (to use them toggle comment on the \switchcolumn command to).               \documentclass[]{book}          \usepackage{listings}     \usepackage{mdframed}     \usepackage{paracol}          \lstnewenvironment{insertcode}{\mdframed}{\endmdframed}          %-------------------------------------------------------     %\newcounter{mdfzrefhack}     %\setcounter{mdfzrefhack}{1}     %\newcommand{\swcsafe}{     %\switchcolumn     %\setcounter{mdf@zref@counter}{\value{mdfzrefhack}}     %\addtocounter{mdfzrefhack}{1}     %}     %=======================================================          %-------------------------------------------------------          \begin{document}          \begin{paracol}{2}     \begin{insertcode}     x     \end{insertcode}          %-------------------------------------------------------     %\swcsafe     %=======================================================     \switchcolumn     %-------------------------------------------------------          \begin{insertcode}     y     \end{insertcode}     \end{paracol}          \end{document}      Each of the modifications below (magically in some cases) make the warnings go away:   * not using mdframed   * changing the document type from book to minimal (for ex.)   * shifting one of the listings a bit lower by placing some text above it in the column Edited: made the example simpler, deleted PS (thanks to egreg) UPDATE: I've just submitted this on the github of `mdframed`.


title: Multiple builds at once

text: I'm currently using following combination:   * the latest TexnicCenter (2.01 Stable 32bit)   * MiKTeX 2.9 32 bit (all packages updated)   * pdflatex.exe   * biber (instead of biblatex) My problem is, that if a new reference is added using biber, the document needs to be compiled three times before the citations are properly placed. Is there any possibility to compile the whole document with one click? I tried to use **texify.exe** (instead of pdflatex.exe) but that doesn't work either. Does anybody know how I can fix that?


title: Inserting YouTube link in modern CV

text: RE: Modern CV contact info - YouTube channel link Hi, I've tried repeatedly to include a link, in the upper-right-hand corner where my contact information is located a YouTube link to my channel, but to no avail. I have a LinkedIn hyperlink using "\social" but cannot seem to get the same for YouTube. Any suggestions? I've attached a snapshot of the section but deleted the section I had for "\social[youtube]" because I kept getting errors. (I'm very new to LaTeX and am unsure how to upload the entire file otherwise). Thanks so much! Chris               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[blue]{classic}                                 \usepackage[scale=0.8]{geometry}     \AtBeginDocument{\recomputelengths}      \firstname{John}     \familyname{Doe}     \mobile{}                        \phone{}               \email{test@foo.bar}      \social[linkedin]{}            \usepackage[pdftex,                        pdfauthor={},                        pdftitle={CV for },                        pdfsubject={Detailed CV for focusing on his previous training, employment and PhD research.},                        pdfkeywords={These, are, keywords},                        pdfproducer={ShareLaTeX},                        pdfcreator={pdflatex},                        pdfpagemode={UseOutlines},                        bookmarksopen,                        pdfstartview={FitH},                        colorlinks,                        linkcolor={blue},                        citecolor={red},                        urlcolor={blue}]{hyperref}          \begin{document}     \maketitle          % EDUCATION     \section{Education}     \cventry{2012--Present}{Some education}{University}{Prescott}{Arizona}{}  % arguments 3 to 6 can be left empty     \cventry{2008--2012}{MA (Hons)}{University}{Huntsville}{Texas}{}          \end{document}


title: Is TeX the only document creator with syntax highlighting?

text: Is there any other document creator software other than TeX (word processor, DTP, webapp etc.) that can include syntax highlighted source code in a number of programming languages? For me it seems like a very unique feature to TeX, that without using an external tool (formatter website+copypaste, IDE+copypaste, separate executable, commercial plugin) you can include syntax-highlighted source code. I'm specifically asking for software with the primary purpose of creating written documents (articles, books etc.), but with the ability to include syntax highlighted source code snippets. I'm aware of the following solutions:   * LaTeX + `listings` or similar package   * LaTeX + `pygments` python library + `texments`/`verbments`/`minted`/`pygmentex` package   * Word processor + copypaste from an IDE/editor   * Word processor + copypaste from a website such as http://www.tohtml.com   * Word processor + some kind of plugin From this list only the first option is completely implemented in LaTeX, while the others use at least 2 programs, one for the document editing and another for the highlighting. What I want to verify is the suspicion that LaTeX is the only way to create a document with code snippets without invoking external programs.


title: How can I Insert Additional label on the z-axis in ternary diagram?

text: I need help on how I can insert additional label X_{Bi} on the z-axis of the subfigure in my ternary diagram. In the example shown below I can only insert it at a location too far away from the middle of z-axis.Is there anyone who knows how I can put this label at middle (i.e. above the label 'first image' in fig.a) of the z-axis?               \documentclass{article}     \usepackage{pgfplots,subcaption}     \usepgfplotslibrary{ternary}     \pgfplotsset{compat=1.8}     %     \begin{document}     \begin{figure}%     \begin{subfigure}{\columnwidth}\centering       \begin{tikzpicture}         \begin{ternaryaxis}[                ternary limits relative=false,                width=7.5cm,                height=7.5cm,                ymax=1.0,                no markers,     %           clip=false,     %         disabledatascaling,                minor tick num=1,                grid=both,                xlabel=Sn,                xlabel style={                 at={(axis cs:1,0,0)},                 anchor=south                },                ylabel=Sb,                ylabel style={                 at={(axis cs:0,1,0)},                 anchor=10                },                zlabel=Bi,                zlabel style={                 at={(axis cs:0,0,1)},                 anchor=north west                },         ]              \addplot3 [black,dashed] coordinates {            (0.9047, 0.0953, 0.0000)                  (0.9019,   0.0883, 0.0098)                  (0.8993,   0.0806, 0.0201)                  (0.8969,   0.0722, 0.0309)                  (0.8950,   0.0630, 0.0420)                  (0.8936,   0.0532, 0.0532)                  (0.8929,   0.0428, 0.0643)                  (0.8930,   0.0321, 0.0749)                  (0.8938,   0.0212, 0.0850)                  (0.8953,   0.0105, 0.0942)                  (0.8975,   0.0000, 0.1025)         };              \addplot3 [black,dashed] coordinates {             (0.8209,    0.1791, 0.0000)                   (0.8131,  0.1682, 0.0187)                   (0.8054,  0.1557, 0.0389)                   (0.7980,  0.1414, 0.0606)                   (0.7913,  0.1252, 0.0835)                   (0.7859,  0.1071, 0.1071)                   (0.7823,  0.0871, 0.1306)                   (0.7810,  0.0657, 0.1533)                   (0.7822,  0.0436, 0.1742)                   (0.7859,  0.0214, 0.1927)                   (0.7917,  0.0000, 0.2083)         };              \addplot3 [black,dashed] coordinates {                 (0.7439,    0.2561, 0.0000)          (0.7313,   0.2418, 0.0269)          (0.7186,   0.2251, 0.0563)          (0.7060,   0.2058, 0.0882)          (0.6942,   0.1835, 0.1223)          (0.6841,   0.1580, 0.1580)          (0.6767,   0.1293, 0.1940)          (0.6729,   0.0981, 0.2290)          (0.6734,   0.0653, 0.2613)                 (0.6777,    0.0322, 0.2901)                 (0.6848,    0.0000, 0.3152)         };       \end{ternaryaxis}     \end{tikzpicture}     \label $ $X_{Bi}$     \caption{First Image}     \label{fig:a:first}     \end{subfigure}     \caption{Isoactivity curves}%     \end{figure}          \end{document}


title: Latex already defined clash between cls file and multiple packages

text: I am using `sjvour3.cls` provided by springer which define `\keywords` command. Many other packages also define this command and when compiling with latex, I get this error. > ! LaTeX Error: Command \keywords already defined. I cannot change the `cls` file as they would use their standard version to compile my paper. It complains in many packages `multirow`, `subfig`, `float`, `fontenc` etc. [EDIT] I fixed this issue by using `\let\keywords\relax` command after `\documentclass`.


title: Could someone explain how to fix the 'listings.sty' issue in a very "for dummies" way?

text: I've been trying to use the `listings` package, but whenever I try to install it I get the message:               ! LaTeX Error: File `listings.sty' not found.      I'm new to LaTeX and I have no clue how to do anything. I'm using TexStudio. Could someone walk me through how to fix this. I've seen many threads about the very same issue, but I simply don't understand what I have to do.


title: pgfplots axis descriptions from file

text: I was wondering if there is any way to make pgfplots read the xlabel and ylabel from a file. This is similar to this question Using Labels from a File in PGFplot but I'd like to read the column headings and use them as axis descriptions (not as labels for individual ticks). To stick with the example from the other post, for a file foo.dat like this               # foo.dat     # X-Position Height       1          15       2          20       3          12       4          24      I would like to have an axis environment equivalent to               \begin{axis}[xlabel=X-Position, ylabel=Height]        \addplot file {foo.dat};     \end{axis}      but without having to specify `xlabel=X-Position, ylabel=Height` explicitly. The reason for this strange question is that I'm using a tex file in a script to generate plot images. Without axis descriptions I can generate a data file, copy both the data file and the prepared tex file into a temporary folder an compile everything. If what I asked is not possible, I would have to change the tex file. I can deal with this by generating the tex file on the fly in this case, but I was just wondering if there was a better solution.


title: How do I install ConTeXt alongside MikTeX

text: I would like to give ConTeXt a shot. It is likely just me, but I am finding the installation guide on the wiki a little confusing, e.g.   * Do I need Ruby or not? Does that depend on the installer, current TeX distribution, anything else?   * Does the (one of the) GUI installers work? What is the difference between that and the command line installer?   * If I install alongside a working TeX distribution, do I want the environment variables set globally or not? Why? Why not?   * Do I use `texexec.exe/rb`? Do I use `context.exe`?  Some of the above questions, I _think_ I know the answer to, but I'm not sure. Ideally, I would like to set up a TeXnicCenter output profile to build and view a ConTeXt file. Any advice would be appreciated.


title: How do I put two footnotes in the caption of a float?

text: This question Using \footnote in a figure's \caption already has some suggestions on how to get a footnote in a caption. None seem really satisfactory because it seems hard to get the footnote text on the same page as the footnote mark. Anyway, I still want to do something more complicated: put _two_ footnotes in one caption. Is there a better way to do this and get the right numbering than to play around with the footnote counter manually? Obviously using `\footnotemark[]` is not an option because this _will_ lead to wrong numbering sooner or later. To demonstrate the default behaviour: ![caption](http://i.stack.imgur.com/Wq17A.png) ![footnotes](http://i.stack.imgur.com/AWCgq.png) The code used was this:               \documentclass[a5paper]{article}     \usepackage{fnpct}     \begin{document}     \begin{figure}     \caption[Caption title in LOF]{This is a footnote in a caption\footnotemark{} and another one\footnotemark.}     \end{figure}     \footnotetext{First footnote}     \footnotetext{Second footnote}     \end{document}


title: Controlling the position of page numbering

text: How do I get the number of each page to be three quarters of an inch down and three quarters of an inch in from the top right hand corner?               \documentclass[12pt, a4paper]{report}     \pagestyle{myheadings}     \begin{document}     Peter     \newpage     Palmer     \end{document}


title: Making subfigures have captions like standard figures

text: I have used subfigures to layout my figures in the way I would like, but I would like them to have captions as if they were standard figures. IE, Figure 1, Figure 2... Is there a way of doing this? EDIT: Here is how I am using subfigures.               \begin{figure}[htb]     \begin{center} \subfigure[Figure 1]{\includegraphics[width=\figwidth\textwidth]{1.png}}     \subfigure{\includegraphics[width=\figwidth\textwidth]{3.png}}\\     \subfigure{\includegraphics[width=\figwidth\textwidth]{4a.png}}     \subfigure{\includegraphics[width=\figwidth\textwidth]{4b.png}}     \end{center}     \end{figure}


title: Chartwell fonts and changing colour with ligatures

text: Bit of a niche question. There is a beautiful set of TrueType fonts called Chartwell designed for producing graphs from text. I am trying to get these to work in Latex. I have switched to Xe(La)tex, and can now get the fonts to appear. However I would like to change text colour without sequence of numbers being split into two. Best explained with some code and a picture.               \documentclass[13pt]{article}     \usepackage{fontspec}     \usepackage{xcolor}          % Now define your quick commands for switching fonts     \setmainfont{ChartwellRose}     \newfontfamily\cwrose[Ligatures=Rare, Color=blue]{ChartwellRose}          \begin{document}     \raggedright          Here is the text without ligatures          \fontsize{48}{60}     \selectfont     40+20+50     \rmfamily     \normalsize               Here is the text with ligatures          \cwrose     \fontsize{48}{60}     \selectfont     40+70     \rmfamily     \normalsize          Here is the text with a colour change inserted          \cwrose     \fontsize{48}{60}     \selectfont     40+\addfontfeature{Color=red}+70     \rmfamily     \normalsize          And as you can see the colour change has broken the effect of enabling the ligatures and the 'rose' is now presented as two separate objects (rather than a single object with 2 different colours.          \end{document}      Is it possible therefore to change the colour of a part of the text without the ligature formation being broken? Here is a screenshot of the compiled example and here is a screenshot of unbroken form of the last example


title: Debugging OpenType Feature / Substitution Problems with XeTeX

text: I have been sent an updated set of fonts from a professionally developed OTF typeface which I am trying to use with plain XeTeX. When using them with XeTeX, I could not get the OpenType features to work, even most basic ones like +liga, although it seems that they are present. I have subsequently solved the problem (see at the end) by adding :script=DFLT, but I am still not sure how to debug this since I found the solution by trial- and-error. The problem was, for example:               \font\rm"New Font" at 12pt     \rm Office \bye      Produced “Office” without the ffi ligature whilst:               \font\rm"Old Font" at 12pt     \rm Office \bye      Produced Oﬃce with the ligature. Other features (e.g. +smcp, +ornm, +hlig) work with other fonts but not the New Font (e.g. `\font\rm"Old Font:+smcp" at 12pt` gives me small caps, `\font\rm"New Font:+smcp" at 12pt` does not). If I try `otfinfo -f newfont.otf` I get               c2sc    Small Capitals From Capitals     dlig    Discretionary Ligatures     dnom    Denominators     frac    Fractions     hist    Historical Forms     hlig    Historical Ligatures     liga    Standard Ligatures     lnum    Lining Figures     medi    Medial Forms     [etc.]      So I know those features are present in the font. I have also opened up the font with fontforge and checked the ffi substitution is there: it is. Comparing the Old Font and the New Font, in addition to differences to the shapes of the glyphs, I notice that the new font is OS/2 Version 3 not 2. Would that make a difference? Also, I notice that there are more substitutions in the New Font (20 not 18); they appear in a different order (with +c2sm first); there are two +frac substitutions; and there is a Single Substitution related to the +frac substitution. Could any of these be causing XeTeX to choke? Finally, if I use abiword, it carries out the ffi substitution, as well as a few less common substitutions such as Th which are present in the font as +liga. There are no errors from XeTeX. Could anyone advise how I might debug this problem and see what XeTeX does not like? * * * After some deep reading of the XeTeX Reference Guide and going through the font options one by one, I eventually found that specifying the script language solved the problem:               \font\rm"New Font:script=DFLT" at 12pt     \rm Office \bye      I am, however, still unsure why XeTeX seems not to like this font. I would have thought the DFLT scripts would be read by default... I am also not sure how to properly debug this.


title: Trouble Defining a LaTeX Command

text: I am trying to define a table of direct sums of `{\chi_i}`in LaTeX, meaning that the entries will be things of the form: `5 \chi_2 \bigoplus \chi_4 \bigoplus 2 \chi_7` for given data like `{{1,0},{2,5},{3,0},{4,1},{5,0},{6,0},{7,2}}` that tells you how many copies of each `\chi_i` we want for a given entry. How I wrote the data is just an example. I can format the data in whatever the most convenient form happens to be. In order to avoid hardcoding in each entry of the table, I'm trying to define a new command in LaTeX, either via `\newcommand` or `\def`, that will take in such data and return it in the form of a direct sum as written above, but I'm a bit new to it and don't know how I should go about creating a command with what will be a variable number of arguments, since not each direct sum can be written with just three terms. The fact that `\newcommand` and `\def` take in a fixed number of arguments make me think that I should not be using them for this task. Any suggestions would be appreciated. EDIT: More accurately, the data concerning the coefficients of the sum is going to look like `{5,2,7,8,2,0,0,1,3}` where this is meant to be read as `5 \chi_1 \bigoplus 2 \chi_2 \bigoplus \ldot \bigoplus 3 \chi_9` where the sequence is always going to be a fixed size. It should also be the case that the terms with zeros should not show up in the sum.


title: biblatex - How to get "editor" in parentheses behind the name? (authoryear)

text: I must have the editor(s) in parentheses for source-types such as collections, proceedings and others. The relevant part of the bibliography item currently looks like > Ed. by F. Seibt but must be > Seibt, F. (editor) For multiple editors, the status quo is > Ed. by G. E. R. Lloyd/G. E. L. Owen but it must be > Lloyd, G. E. R./Owen, G. E. L. (editors)               \documentclass[     12pt,     a4paper     ]     {scrreprt}          \usepackage[T1]{fontenc}     \usepackage{lmodern}          \usepackage[     language=auto,     style=authoryear,     backend=bibtex,     isbn=false,     doi=false,     citereset=chapter,     maxcitenames=3,     dashed=false,     sorting=nyt,     firstinits=true,     terseinits=false     maxbibnames=99,     uniquename=init     ]{biblatex}          \begin{filecontents*}{lit.bib}     @InCollection{brandt,       options     = {useprefix=false},       hyphenation     = {german},       indexsorttitle  = {Nordischen Lander von der Mitte des 11. Jahrhunderts bis 1448},       author      = {von Brandt, Ahasver and Erich Hoffmann},       editor      = {Ferdinand Seibt},       indextitle      = {Nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448, Die},       title       = {Die nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448},       shorttitle      = {Die nordischen L{\"a}nder},       booktitle   = {Europa im Hoch- und Sp{\"a}tmittelalter},       series      = {Handbuch der europ{\"a}ischen Geschichte},       number      = {2},       publisher   = {Klett-Cotta},       location    = {Stuttgart},       date        = {1987},       pages       = {884--917},     }     @InProceedings{moraux,       keywords    = {secondary},       hyphenation     = {french},       indexsorttitle  = {De Anima dans la tradition grecque},       author      = {Moraux, Paul},       editor      = {Lloyd, G. E. R. and Owen, G. E. L.},       indextitle      = {\emph{De Anima} dans la tradition gr{\`e}cque, Le},       title       = {Le \emph{De Anima} dans la tradition gr{\`e}cque},       subtitle    = {Quelques aspects de l'interpretation du trait{\'e}, de Theophraste {\`a}                 Themistius},       shorttitle      = {\emph{De Anima} dans la tradition gr{\`e}cque},       booktitle   = {Aristotle on Mind and the Senses},       booktitleaddon  = {Proceedings of the Seventh Symposium Aristotelicum},       eventdate   = {1975},       publisher   = cup,       location    = {Cambridge},       date        = {1979},       pages       = {281--324},       annotation      = {This is a typical \texttt{inproceedings} entry. Note the \texttt{booksubtitle},                 \texttt{shorttitle}, \texttt{indextitle}, and \texttt{indexsorttitle} fields.                 Also note the \texttt{eventdate} field.}     }     \end{filecontents*}          \addbibresource{lit.bib}          \DeclareNameAlias{sortname}{last-first}          \renewcommand{\multinamedelim}{\addslash}     \renewcommand{\finalnamedelim}{\addslash}          \begin{document}     \chapter{First Chapter}     \begin{itemize}         \item This is for the \verb+@incollection+ type by \citeauthor{brandt}.\footcite[See][p. 12]{brandt} The bibliography item currently looks like         \begin{verbatim}         Ed. by F. Seibt         \end{verbatim}         but I must have         \begin{verbatim}         Seibt, F. (editor)         \end{verbatim}         \item Then for \verb+@inproceedings+, in the case of multiple editors: these are just some words to have a sentence.\footcite[Cp.][p. xi]{moraux}. This currently looks like         \begin{verbatim}         Ed. by G. E. R. Lloyd/G. E. L. Owen         \end{verbatim}         but I must have         \begin{verbatim}         Lloyd, G. E. R./Owen, G. E. L. (editors)         \end{verbatim}     \end{itemize}     \printbibliography     \end{document}


title: Overfull in option of thm when using "showkey" usepackage

text: I have a problem when using the showkeys uspackage, I get overfull in the option of the thm statement. and when I remove the showkeys it breaks automatically. I do not know the error might comes from the showkeys package or somthing else.![Here is the overfull when using the showkey](http://i.stack.imgur.com/huNEL.png) , ![Here u will see it breaks automatically when removed the showkeys](http://i.stack.imgur.com/RkOyH.png). Please if enyone has an answer??


title: putting two indices and exponents side to side

text: I did not find the answer to my following question on the web. I apologize in advance if this question has already been answered somewhere. I would like to write a matrix with the two subscripts and exponents side by side, like in the following latex command.               ${\left( T_{ij}\right)_{i=1}^n}_{j=1}^{p}$      However, in the command above, the indices and exponents are not at the same height. Does anyone know how to put them at the same height (while keeping them horizontally aligned)?


title: Chemical equation with "●" symbol

text: How to write this equation (the ● is like the +). I'm using `{chemist}` package for ordinary equations.                ROO● + AH → ROOH + A●


title: Bounding box of pictures used in TikZ/PGF

text: I am creating TikZ pictures using some external images in the following manner:               \documentclass{article}          \usepackage{tikz}          \begin{document}          \begin{figure}[htb]         \centering\small         \begin{tikzpicture}             \coordinate (O) at (0,0,0);             \pgfdeclareimage[width=2cm]{moon}{moon.png}             \node (moonn) at (O) {\pgfbox[center,center]{\pgfuseimage{moon}}};         \end{tikzpicture}         \caption{This is a long caption. As you can see it interferes with the Moon!}     \end{figure}          \end{document}      The problem is that there does not seem to be a bounding box around the image, and it thus interferes with the caption: ![Caption interference](http://i.stack.imgur.com/GpPPW.png) How can I solve this problem? Am I using wrong code? * * * _Appendix_ Used image: ![The Moon](http://i.stack.imgur.com/4FSLR.png)


title: pgfplots: plotting data with gnuplot

text: I try to plot a data file (test2) which contains a header and 2 columns. My pdfLaTeX (argument: --enable-write18) gives me not the result I get with executing gnuplot.exe. This is the code:               \documentclass[a4paper]{scrartcl}          \usepackage[paperwidth=27cm,paperheight=17cm,margin=0in,showframe]{geometry}          \usepackage{tikz,pgfplots}                    \begin{document}                    \centering     \begin{tikzpicture}         \begin{axis} [         width=21cm, height=14cm,         tick label style={font=\large},     %   xmin=7700, xmax=7810,     %   xtick={7700,7725,...,7800},     %   ymin=0.009, ymax=0.05,         axis x line=box,         axis y line=box         ]         \addplot gnuplot [raw gnuplot, id=test, mark=none, color=blue]{     %   set xrange [7700:7810];     %   set yrange [0:0.05];         plot "test2" using ($1):($2) every 1:1:139000::144100 with lines; %plot intervall: max. 7600         };              \end{axis}     \end{tikzpicture}                    \end{document}      Obtained in Latex:![pdfLaTeX Output](http://i.stack.imgur.com/doXMX.png) But only in gnuplot I get the result I am looking for: ![GnuPlot](http://i.stack.imgur.com/MxNGt.png) The Code is the same: "plot "test2" using ($1):($2) every 1:1:139000::144100 with lines", what am I doing wrong? The data file is aviable here: http://www.file- upload.net/download-7765589/test2.html I am looking forward for your advice. Thank you!