title: Defining repeated tabular/array columns using a computed value to specify the number

text: ## Background: I just recently saw that one could define multiple columns in a `tabular` or `array` using the syntax:               *{num}{<align>}       So, for example `\begin{tabular}{r*{3}{l}r}` is the identical to `\begin{tabular}{rlllr}`, and similarly for `array`. ## Problem: I used this to produce a solution to Best way to create an system of equations enviroment? where the number used was provided as a parameter. This works fine if the specified parameter is one less than the number of variables. So, I attempted to modify this to accept the actual number of variables, and set that to a counter value, decrement it by one, and use the new value of the counter to specify how many of these were to be used. I suspect that this is an expansion issue (which I haven't quite gotten the hang of). Alternatively, if I could somehow perform a decrement operation and apply that value to the column specification would be fine as well. ### Incorrect Result: Currently, the code below produces: ![enter image description here](http://i.stack.imgur.com/64Sic.png) ### Desired Result: I would like to use something equivalent to the intent of the commented `\begin{array}` that uses a value of one less than the provided parameter. So when this works as desired, the output should be (note the shift in the right vertical bar): ![enter image description here](http://i.stack.imgur.com/dWtK8.png) ## Code:               \documentclass[border=5pt]{standalone}     \usepackage{xcolor}     \usepackage{array}     \usepackage[paperwidth=4.7in]{geometry}          \newcounter{NumberOfRepeatedColumns}     \newenvironment{MySystem}[2]{% <num+1> <r|l|c>         \setcounter{NumberOfRepeatedColumns}{#1}         \addtocounter{NumberOfRepeatedColumns}{-1}         \begin{array}{c| *#1{#2} | c}% want to replace this with something equivalent to line below          %\begin{array}{c| *{\the\value{NumberOfRepeatedColumns}}{#2}}%             \the\value{NumberOfRepeatedColumns}\\     }{%         \end{array}%     }               \newcommand{\data}{123 & abc & de  & f \\1   & a   & def & fg}%          \begin{document}     \color{red}     $\begin{MySystem}{4}{r}         \data     \end{MySystem}$     \hspace{0.5in}     $\begin{MySystem}{4}{l}         \data     \end{MySystem}$          \color{blue}     $\begin{MySystem}{3}{r}         \data     \end{MySystem}$     \hspace{0.5in}     $\begin{MySystem}{3}{l}         \data     \end{MySystem}$     \end{document}


title: Math mode inside LyX tables

text: If I insert a math mode environment inside a table cell, then the output will show no vertical space between the borders and the equation, here is an example: > ![enter image description here](http://i.stack.imgur.com/bEme9.jpg) Is there any way that will make the borders have more vertical space from the formula?


title: Does \\ suppress hyphenation for the following word?

text: I am not sure, if this is a bug of the package `showhyphens` or some LaTeX- behaviour I don't understand. Please have a look on the following example:               % arara: lualatex     \documentclass[ngerman]{article}     \usepackage{babel}     \usepackage{showhyphens}          \begin{document}     \noindent Hallo\\Hallo      \end{document}      Could there be any reason to suppress hyphenation here? When using the babel shorthand `"-` the red hyphenation line is shown. ![enter image description here](http://i.stack.imgur.com/tf2rv.png)


title: How to adjust the inner and outer margin spaces around legend in PGFPlots?

text: How can I adjust the inner/out right/left/top/bottom margins of legend in PGFPlots? (not the space between the legend entries) e.g. indicated in the below figure. ![enter image description here](http://i.stack.imgur.com/GUdJI.png)


title: Bibtex and Chicago style citations?

text: In the Chicago Manual of Style citation guidelines I find that one is to quote journal articles and italicize journals, books, and theses. But when I run the code below the output shows the journal article title as un-quoted. What's going on? ![output](http://i.stack.imgur.com/PgAd0.jpg)               % test.tex     \documentclass{article}     \usepackage{natbib}     \begin{document}       \nocite{*}        \bibliographystyle{chicago}       \bibliography{test}     \end{document}      and               % test.bib     @phdthesis{Doe11,       title={The Title},       author={Doe, J.},       year={2011},       school={University of Mars}     },          @article{JohSil05,       title={EbayesThresh: R programs for Empirical Bayes Thresholding},       author={Johnstone, I.M. and Silverman, B.W.},       journal={Journal of Statistical Software},       volume={12},       number={8},       pages={1--38},       year={2005}     },          @book{Joh11,         title = {Gaussian estimation: Sequence and multiresolution models},         author = {Johnstone, Ian M.},         year = {2011},     },      Example from the manual: Joshua I. Weinstein, “The Market in Plato’s Republic,” _Classical Philology_ 104 (2009): 440.


title: mathptmx vs mtpro2 for mathematical typesetting

text: Is there any serious advantage of using the commercial `mtpro2` fonts over `mathptmx`?


title: Slanted TIPA text

text: I'm relatively new to LaTex, and am using it to write my linguistics thesis. I started out in TexShop. Although the TIPA faq says you can't use italics with TIPA, this seemed to be working fine. Now I've switched to Texstudio and it doesn't work. I've also tried slanted text, and this doesn't work either (I've also attempted this in ShareLatex). Can anyone help? I've tried many ways of combining macros, and many different macros for both italics and slanted text (e.g. \textsl, \slshape, \it, etc). Why does it work in TexShop and not the other compilers? Am I missing something? * * * **Minimal working example:**               \documentclass[twoside, 11pt, a4paper, footinclude=true, headinclude=true, cleardoublepage=empty]{scrbook}          \usepackage{tipa}           \begin{document}          \textipa{\slshape tuFuN} \hspace{.65in} `sunset'               \end{document}      * * * **results in:** tuɸuŋ ‘sunset’


title: TikZ: best way to draw a user guidance

text: I have a string in the form of `.[field].[field].[field]` where each `[field]` needs to be replaced with user specific information. I would like to create some sort of instruction/guidance on what specific information is needed in each field. **My ideas** (sorry for the poor drawings):   * 1st example: ![](http://i.stack.imgur.com/UWGtb.png)   * 2nd example: ![](http://i.stack.imgur.com/w9JL2.png) I don't know whether this is the best way to do it, but I think some visualization will help the user to understand better than a block of text (the users are ordinary people). How can I create such a diagram as seen above using TikZ? I've been playing around with `node`s and `path`s, but I did get really far as I have not been using TikZ a lot. Any help is appreciated! * * * **EDIT:** Thanks to Gonzalo Medina for providing the two examples. I made some changes to it, here's my final result: ![enter image description here](http://i.stack.imgur.com/4jaS5.png)               \documentclass[dvipsnames]{standalone}     \usepackage{tikz}     \usetikzlibrary{backgrounds,positioning}          \newcommand{\intval}[1]{\textbf{\color{RoyalBlue}#1}}     \tikzset         { field/.style  = { draw=RoyalBlue, minimum height=20pt }         , pdval/.style  = { draw=black!10, font=\strut\LARGE                   , minimum height=20pt, text depth=-2pt }         , dot/.style    = { fill=black, circle, anchor=south                   , inner sep=1.2pt, xshift=-5pt, yshift=3pt }         , desc/.style   = { fill=black!10, rounded corners=5pt, inner sep=5pt }         , num/.style    = { draw, circle }         }          \begin{document}     \begin{tikzpicture}[node distance=10pt, scale=.8, transform shape]         % fields         \node[field,text width=60pt]            (user)      {};         \node[field,right=of user,text width=30pt]  (year)      {};         \node[pdval,right=of year]          (function)  {st};         \node[field,right=of function,text width=20pt]  (realm)     {};         \node[pdval,right=of realm]         (entity)    {foo};         \node[pdval,right=of entity]            (school)    {bar};              % dots         \foreach \n in {user,year,function,realm,entity,school}             \node[dot] at (\n.south west) {};              % numbers & descriptions         \node[num,above=4cm of user.west,xshift=5pt] (user_num) {\textbf{1}};         \node[desc,right=5pt of user_num] ()             {Your \textbf{username}, f.e. \textit{foobar}};              \node[num,above=2cm of year.west,xshift=5pt] (year_num) {\textbf{2}};         \node[desc,above=5pt of year_num,xshift=7pt] ()             {Your \textbf{year of joining}, f.e. \textit{2012}};              \node[num,above=1.5cm of realm.west,xshift=5pt] (realm_num) {\textbf{3}};         \node[desc,right=5pt of realm_num,yshift=30pt,text width=5cm] ()         {             Your \textbf{realm}:\\[10pt]             \noindent             \begin{tabular}{@{}ll}             Architecture            & \intval{A} \\             Constructional engineering  & \intval{CE} \\             Chemistry           & \intval{C} \\             Digital technology      & \intval{DT} \\             Telecommunication       & \intval{T} \\         \end{tabular}         };              % lines         \draw (user_num.south)  -- ([xshift=5pt]user.north west);         \draw (year_num.south)  -- ([xshift=5pt]year.north west);         \draw (realm_num.south) -- ([xshift=5pt]realm.north west);     \end{tikzpicture}     \end{document}


title: amsalpha-like bibtex style with manual labels

text: I want to do `amsalpha` style citation with BibTeX, except that I want to have manual control over the key/labels (e.g., `[ABC09]`). Is there an option for this?


title: Tabular vs fbox (or other options?) for creating an organized document

text: I'm currently in the process of trying to make a template that I can use for creating lesson plans for my high school math classes, but am having some trouble figuring out how I can make this be the most efficient. Ideally, this document will be something that I can just open up and add information to without having to worry about adjusting spacing; I just want to be able to type things in. In terms of structure, I am shooting for something that looks vaguely similar to this lesson plan. So far, my code is:               \documentclass[12pt]{article}     \usepackage{multicol, fancyhdr}     \usepackage[margin=.5in]{geometry}     \usepackage[mmddyyyy]{datetime}     \usepackage[table]{xcolor}          ...            \begin{document}     \begin{center}     \begin{tabular}{|p{7cm}p{11cm}|}     \hline     \large{Unit: (Put your unit here)} \cellcolor{lightgray} & \large{Lesson: (Put your lesson here)} \cellcolor{lightgray} \\     \hline     \end{tabular}     \begin{tabular}{|p{7cm}|p{11cm}|}     \hline      {\bfseries Date:} \emph{\today} & \bfseries{Standards:} \\      & \\     \bfseries{Text Used:} & $\bullet$ This would be standard one. \\     \emph{Example book} &  \\      & $\bullet$ This would be standard two. \\     \bfseries{Materials:} &  \\     \emph{Sample materials written out} & $\bullet$ This would be standard three. \\      & \\     \cline{2-2}     \bfseries{Accommodations:} & \bfseries{Key Terms:} \\     Some sort of list of accommodations that students may need... &  \\      & \\     {\bfseries Time:} 45 Minutes & \\     \hline     \end{tabular} \\[.4in]          \begin{tabular}{|p{9cm}|p{9cm}|}     \hline     \multicolumn{2}{|c|}{\large{Continuity} \cellcolor{lightgray}} \\     \hline     \bfseries{Previous Lesson:} & \bfseries{Next Lesson:} \\      & \\     This is where stuff will go about the previous lesson. & This is where stuff will go about the next lesson. \\[1in]     \hline     \end{tabular}\\[.4in]          \begin{tabular}{|p{9cm}|p{9cm}|}     \hline     \bfseries{Objectives:} & \bfseries{Key Questions:} \\      & \\     $\bullet$ Objective one could be written right here. Or here. & $\bullet$ \\      & \\     $\bullet$ This would be the second objective of the lesson. & $\bullet$ \\      & \\     $\bullet$ Did someone say a third objective? & $\bullet$ \\     \hline     \end{tabular}          \end{center}     \end{document}      Which creates output like: ![enter image description here](http://i.stack.imgur.com/6Arn9.png) The problem I'm running into is that I'm pretty sure that in the long-term, tabular isn't the best way to do this (since if one of my columns ends up taking up multiple lines, it'll affect the spacing of the rows in the other column, best seen in my "Key Questions" section). But when I tooled around with fbox, things seemed a little off too. I essentially am trying to stitch together a bunch of different text boxes, that are related to one another (similar sizes, sharing edges, etc), but ultimately independent from each other (so my text in one doesn't affect the other). I don't know how to do this.


title: Inserting RTL text in verbatim environment

text: How I can insert Persian text in verbatim environment when using XePersin package ( v11.138, 2012/05/03). Following code dose not work:               \begin{verbatim}          <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"     "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">     <book>       <bookinfo>         <title> عنوان کتاب </title>         <author>         </author>       </bookinfo>      محتوای کتاب     </book>          \end{verbatim}


title: Expand command and put result into a macro: Use of \value doesn't match its definition

text: I still struggle with the expansion of Latex. I try to calculate the a real number from a date format and put this into a macro `\value`. I need to expand the command with `\edef` because I plan to use the value as a parameter in `pgfplots`.               \documentclass[10pt]{article}          \usepackage{tikz}      \usepackage{pgfcalendar}           \newcount\mycount          \begin{document}          \newcommand{\dateconvert}[1]{%      \pgfcalendardatetojulian{#1}{\mycount}      \pgfcalendarjuliantodate{\mycount}{\myyear}{\mymonth}{\myday}      \pgfmathparse{(\myday-1)/365+(\mymonth-1)/12+\myyear}\let\mydate\pgfmathresult      \mydate     }          \dateconvert{2010-07-01} %works          \edef\value\dateconvert{2010-07-01}     \value %does not work: Use of \value doesn't match its definition          \end{document}      Calling `\dateconvert` directly works. However, when I try to copy the result into `\value`, it fails.


title: Inserting an Image in cventry in moderncv

text: I am using `moderncv` to create my CV. In the _Experience_ section, I enter each element by               \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}      I would like to insert a small logo of the company or university in the left column, i.e. just below the years.   How can I do it?


title: Is it possible to create an adaptable golden ratio frame around equations?

text: I would like to create special frame around my equations. This frame should obey to the **golden ratio** rule. This means that its width divided by its height should give **1.61803398875**. If possible, the code will adapt to choose the _long_ side. For example for a long column vector, the height will be 1.61803398875 times longer than its width. I've found the following code in another question in this forum (here). It uses `tikz` but I can't figure out how to modify it to obtain a golden ratio frame around my equations...               \documentclass{article}     \usepackage{amsmath}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{shapes}          \makeatletter     \newdimen\@myBoxHeight%     \newdimen\@myBoxDepth%     \newdimen\@myBoxWidth%     \newdimen\@myBoxSize%     \newcommand{\SquareBox}[2][]{%         \settoheight{\@myBoxHeight}{#2}% Record height of box         \settodepth{\@myBoxDepth}{#2}% Record depth of box         \settowidth{\@myBoxWidth}{#2}% Record width of box         \pgfmathsetlength{\@myBoxSize}{max(\@myBoxWidth,(\@myBoxHeight+\@myBoxDepth))}%         \tikz \node [shape=rectangle, shape aspect=1,draw=red,inner sep=2\pgflinewidth, minimum size=\@myBoxSize,#1] {#2};%     }%     \makeatother          \begin{document}     \SquareBox{I}     \SquareBox{y}     \SquareBox[thick, dashed]{long text}     \SquareBox[draw=blue]{longer text}     \SquareBox[draw=blue, thick, fill=yellow]{$e = mc^2$}     \SquareBox[draw=black, thick, fill=yellow!10, rounded corners=2pt]{$\displaystyle \int_{-\dfrac{\pi}{2}}^{\dfrac{\pi}{2}} dx $}     \end{document}      Thanks for your help in advance.


title: How can I move a single node in a tikz plot?

text: I can't find an answer online, please help me. The following plot shows the percentage of 3 groups. The red line is the average (and needs to stay at 13.8). How can I move ONLY the node "2.9" a little bit up? (here it is not really problematic, but I have other graphs where the number and the red line are overlapping - looks terrible!).... Thank you very very much! ![enter image description here](http://i.stack.imgur.com/pTCsb.png)               \documentclass[pdftex,11pt,a4paper]{scrreprt}     \usepackage{geometry}     \geometry{a4paper,left=28mm,right=28mm, top=25mm, bottom=25mm}      \usepackage{acronym}     \usepackage{tikz}     \usetikzlibrary{shapes.geometric,arrows}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{amsmath,amssymb,amstext}     \usepackage{graphicx}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}               \begin{document}     \pgfplotsset{every axis/.append style={         font=\footnotesize,         line width=0.5pt,         bar width=7pt,         tick style={line width=0.4pt}}}          \begin{figure}[h!]     \begin{tikzpicture}     \begin{axis}[         xlabel=Test,         ymin=0, ymax=100,         ylabel=percentage,         enlargelimits=0.15,         ybar,         symbolic x coords={1,2,3},         xtick=data,         width=12cm,         bar width=10pt];          \addplot [black, fill=black,nodes near coords]     coordinates {(1, 55.6) (2,18) (3,2.9)};          \addplot[red,mark=none, sharp plot, line width=0.6pt]     coordinates {(1,13.8) (3,13.8)};          \end{axis}          \end{tikzpicture}     \end{figure}     \end{document}


title: Texmaths vs Texpoint?

text: I wonder if anyone has used both Texmaths for LibreOffice or Texpoint for Powerpoint. Is one significantly better than the other; does either have glaring limitations? I'm preparing some slides with lots of figures and equations so thought to use LibreOffice or Powerpoint instead of beamer, but wanted to get a sense of which equation editor is more developed.


title: The \titlepage problem in beamer

text: When I put in the preamble. It has several warning as > Token not allowed in a PDF string (Unicode) Because I use the `$^1$` in the title. Then when I put in the document. the warning appears. How do I solve it? Thanks > Option `pdfauthor' has already been used My MWE               \documentclass[presentation]{beamer}     \let\Tiny\tiny     \usepackage{hyperref}     \usetheme{Berkeley}     \begin{document}          \renewcommand{\thefootnote}{$\aleph$}               \title[Cross]{\large Experimental Studies %     \thanks{\scriptsize Project supported by foundation:  Supported by the National Nature Science Foundation}}     \author[A,B,C]{A$^1$,     B$^1$     and C$^2$}     \institute[Fluid Mechanics]{$^1$Department of Mechanics \& Engineering Science\\     $^2$College of Science}     \date[The second presentation, 2013]{The second presentation, 2013}     %\logo{\includegraphics[height=16pt]{picture/Fudanlog.PNG}}     \date[\initclock\tdtime]{\today}          \begin{frame}     \titlepage     \end{frame}          \section{A section}     \subsection{A subsection}     \begin{frame}       \frametitle{Frame title1}       \framesubtitle{frame subtitle1}       Some text s     \end{frame}     \end{document}


title: What Program do I need to write .bib files and how do I use their contents in my bibliography?

text: What Program do I need to write .bib files and how do I use their contents to create my bibliography with the help of the additional input of my bst file which I downloaded from http://ftp.math.utah.edu/pub//tex/bibtex/apa.bst (APA style)? I am running Ubuntu 12.10 if it is relevant.


title: Formatting title and clauses in isov2 document class

text: I am currently working with the **isov2** document class. I have been successful in changing the font of the entire document to Times New Roman. However, I would like for the title, table of contents (the actual words 'Contents'), and all clauses to be in a different font. I _think_ the font is Arial, as seen in the image below. I have also noticed that a period is being added to all clauses (clause, sclause and ssclause). I would like for a period to ONLY be added to the clause. I am unsure exactly how to edit my current code to adjust that as well. My code follows the image below. Thank you. ![Desired Font](http://i.stack.imgur.com/IMdfd.png)               \documentclass[draft,wd,letterpaper]{isov2}     \let\ifpdf\relax           % Overall font to Times New Roman     \usepackage{fontspec}     \setmainfont{Times New Roman}          % Add a period (.) after the clause numbering (in the actual document, NOT toc)     \makeatletter     \def\@seccntformat#1{\csname the#1\endcsname.\quad}     \makeatother          \standard{ISO/IEEE 11073-10201}     \yearofedition{2013}     \languageofedition{(E)}     \setcounter{tocdepth}{3}     % ToC includes ssclauses and above          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \title{Title of Document}{}{}          \tableofcontents          \clause{Clause} This is the first clause     \sclause{SClause} This is a subclause (sclause)     \ssclause{SSClause} This is a sub-subclause (ssclause)     \clause{Clause} This is the second clause     \end{document}


title: How to use Rnw and bib files in Lyx?

text: I am writing for publication in Transportation Research Board. Someone un- officially created a LaTeX template for the journal (here). The template consists of 3 files with these extensions:   1. .bib   2. .rnw   3. .bst How can I get started with using these files in Lyx?


title: put one page completely landscape

text: I have a document that is mostly in normal layout, but two sections need to be in landscape. The contents of the page turn without problem, including table and section. What doesn't turn on those pages are the header and the footer, and I'd like those to turn as well. How can I do that?               \documentclass{article}     \usepackage{lastpage}     \usepackage{lscape}     \usepackage{titlesec}     \newpagestyle{newstyle}{      \setheadrule{0pt}            \sethead[\small{Report - \sectiontitle}]         []         []         {\small{Report - \sectiontitle}}         {}         {}     \setfoot[\small{\copyright~{} \year myself}][][\small{\thepage/\pageref{LastPage}}]{\small{\copyright~{} \year myself}}{}{\small{\thepage/\pageref{LastPage}}}     }     \titleformat{\section}     {\color{blue}\normalfont\Large\bfseries}     {\color{blue}\thesection}{1em}{}[\vspace{2pt}\titlerule]     \titleformat{\subsection}     {\color{blue}\normalfont\Large\bfseries}     {\color{blue}\thesubsection}{1em}{}     \titleformat{\subsubsection}     {\color{blue}\normalfont\Large\bfseries}     {\color{blue}\thesubsubsection}{1em}{}               \pagestyle{newstyle}     \begin{document}     \begin{landscape}     \section{A section}     Some Text          \begin{table}      \begin{tabular}{|c|c|c|c|c|c|}     \hline     foo & bar & bar & baz & foo & bar \\     \hline     a & a & a & a & a & a\\     \hline         \end{tabular}     \end{table}     \end{landscape}     \end{document}


title: Sorting scheme for specific entry-types in biblatex

text: I'm using `nty` sorting scheme, but I need `@proceedings` and `@inproceedings` entries to be sorted by `eventtitle` before `booktitle` in `@inproceedings` and before `title` in `@proceedings`. The order should be `author`→`title`→`eventtitle`→`number`→`booktitle`→`date/year` (This is because I'll have to put `eventtitle`s before `booktitle`s in `@[in]proceedings` entries) I managed to achieve something with `\DeclareSortingScheme`, but it interferes with the sorting of other entry types, e.g. anonymous articles. A non working MWE               \documentclass{article}     \begin{filecontents}{\jobname.bib}       @proceedings{A,         eventtitle = {Symposium of Given Field},         number = {2},         venue = {London},         title = {Annals of the Second Symposium of Given Field},         date = {2000},         location = {London},         publisher = {Publisher},       }       @proceedings{B,         eventtitle = {Congress of Another Field},         number = {10},         venue = {Paris},         title = {Proceeding of the 10\textsuperscript{th} Congress of Another Field},         date = {2013},       }       @article{C,         title = {The anonymous article},         journal = {Journal},         date = {2013-09-10},       }     \end{filecontents}     \usepackage[style=authortitle,sorting=nyt,backend=biber]{biblatex}     \addbibresource{\jobname.bib}     \DeclareSortingScheme{mysort}{       \sort{         \field{presort}       }       \sort[final]{         \field{sortkey}       }       \sort{         \field{sortname}         \field{author}         \field{editor}         \field{translator}         % \field{sorttitle}         % \field{title}       }       \sort{         \field{eventtitle}         \field{number}       }       \sort{         \field{sorttitle}         \field{title}       }       \sort{         \field{sortyear}         \field{year}       }       \sort{         \field[padside=left,padwidth=4,padchar=0]{volume}         \literal{0000}       }     }     \begin{document}     \nocite{*}     \printbibliography[sorting=nyt,title={\texttt{nyt}-sorted Bibliography}]     \printbibliography[sorting=mysort,title={\texttt{mysort}-sorted Bibliography}]     \end{document}      > ![minimal non-working example](http://i.stack.imgur.com/QgsyL.png)


title: What would draw a student of the humanities to (La)TeX systems?

text: I've been given permission to put up a poster in the campus writing center. The primary users of this writing center are from the humanities—those students who need to write rather long papers on a regular basis. Given that it is strictly _non_ -technical writing, what features of (La)TeX systems would draw such a user, and how should I advertise these strengths on a small poster or pamphlet?


title: Bembo, Bembo Book or Garamond Premier Pro? And how to exploit all their features with LuaLaTex?

text: I am allowed to use one of these fonts (or the three of them if I want) to edit a document. Here is the list of the Bembo fonts I have :               Bembo-Bold.otf                  Bembo-ExtraBoldOsF.otf     Bembo-BoldExpert.otf            Bembo-Italic.otf     Bembo-BoldItalic.otf            Bembo-ItalicExpert.otf     Bembo-BoldItalicExpert.otf      Bembo-ItalicOsF.otf     Bembo-BoldItalicOsF.otf         Bembo-SC.otf     Bembo-BoldOsF.otf               Bembo-Semibold.otf     Bembo-Expert.otf                Bembo-SemiboldExpert.otf     Bembo-ExtraBold.otf             Bembo-SemiboldItalic.otf     Bembo-ExtraBoldExpert.otf       Bembo-SemiboldItalicExpert.otf     Bembo-ExtraBoldItalic.otf       Bembo-SemiboldItalicOsF.otf     Bembo-ExtraBoldItalicExpert.otf Bembo-SemiboldOsF.otf     Bembo-ExtraBoldItalicOsF.otf    Bembo.otf      here is the list of the Bembo Book fonts I have :               BemboBookMTPro-Bold.otf         BemboBookMTPro-Italic.otf     BemboBookMTPro-BoldIt.otf       BemboBookMTPro-Regular.otf      and here is the list of the Garamond Premier Pro fonts available :               GaramondPremrPro-Bd.otf         GaramondPremrPro-MedCapt.otf     GaramondPremrPro-BdCapt.otf     GaramondPremrPro-MedDisp.otf     GaramondPremrPro-BdDisp.otf     GaramondPremrPro-MedIt.otf     GaramondPremrPro-BdIt.otf       GaramondPremrPro-MedItCapt.otf     GaramondPremrPro-BdItCapt.otf   GaramondPremrPro-MedItDisp.otf     GaramondPremrPro-BdItDisp.otf   GaramondPremrPro-MedItSubh.otf     GaramondPremrPro-BdItSubh.otf   GaramondPremrPro-MedSubh.otf     GaramondPremrPro-BdSubh.otf     GaramondPremrPro-Smbd.otf     GaramondPremrPro-Capt.otf       GaramondPremrPro-SmbdCapt.otf     GaramondPremrPro-Disp.otf       GaramondPremrPro-SmbdDisp.otf     GaramondPremrPro-It.otf         GaramondPremrPro-SmbdIt.otf     GaramondPremrPro-ItCapt.otf     GaramondPremrPro-SmbdItCapt.otf     GaramondPremrPro-ItDisp.otf     GaramondPremrPro-SmbdItDisp.otf     GaramondPremrPro-ItSubh.otf     GaramondPremrPro-SmbdItSubh.otf     GaramondPremrPro-LtDisp.otf     GaramondPremrPro-SmbdSubh.otf     GaramondPremrPro-LtItDisp.otf   GaramondPremrPro-Subh.otf     GaramondPremrPro-Med.otf        GaramondPremrPro.otf      Choosing between them is becoming nearly impossible to me because I really like the three of them. So to make my choice, I decided to base it on technicalities.   * First question : Which one would you recommend and why?   * Second question : Which one do you believe is the **most comfortable for reading** when printed?   * Third question : Which one offers the the biggest amount of exploitable features when using LuaLaTex?   * Fourth question : How do I exploit all of their features (swashes, small caps, small italic caps, glyphs I can't type with the keyboard, etc.)? I ask the fourth question because my university bought them all and they cost an arm & a leg, so I really intend to get the most out of them. For example I can't get the swashes to work (or any other feature in fact). For swashes I tried this :               \documentclass{article}     \usepackage{fontspec}     \newopentypefeature{Contextuals}{NoAlternate}{-calt}     \defaultfontfeatures{Kerning=Uppercase,Mapping=tex-text,}     \setmainfont{Garamond Premier Pro}     \begin{document}     Quad Qed          \addfontfeatures{Contextuals=NoAlternate}     Quad Qed     \end{document}      But the swash does not work. I also tried to set the options like this :               \documentclass{article}     \usepackage{fontspec}     \setmainfont[Contextuals=Swash]{Garamond Premier Pro}     \begin{document}     Quad Qed     \end{document}      But then the console says this :               *************************************************     * fontspec warning: "icu-feature-not-exist-in-font"     *      * OpenType feature 'Contextuals=Swash' (+cswh) not available for font     * 'GaramondPremrPro' with script 'Latin' and language 'Default'.     *************************************************      Is there something wrong with this font? Also, my document contains a big amount of equations, do you have any advice on the math fonts?


title: How to fine tune rotation of text along circular path?

text: After searching the web and finally coming from here (recreating a logo), I couldn't find an answer to what I am looking for. I want to rotate a text inside a circle and have a full control/fine tuning over its rotation, I stuck with the "Unknown" text, I couldn't make it rotate further down to get it _centrally_ aligned with regard to the two yellow and red rectangles, i.e. the "kn" part of "Unknown" should face the white line between the two rectangles as in the figure below   ![enter image description here](http://i.stack.imgur.com/lv2gP.jpg) based on the code below:               \documentclass[12pt]{scrreprt}     \usepackage{courier} %courier font     \usepackage{pgf,tikz,xcolor} % for tikz graphs and colors     \usetikzlibrary{decorations.text} % decorations.text for the text along path feature     \pagestyle{empty} % to suppress page numbers     \begin{document}     \begin{figure}[htbp]     \begin{tikzpicture}     \draw[color=black,fill=yellow,fill opacity=1.0] (2.87,-0.98) -- (2.51,-2.05) -- (4.39,-2.66) -- (4.76,-1.6) -- cycle;% yellow rect     \draw[color=black,fill=red,fill opacity=1.0] (3.23,0.19) -- (5.12,-0.43) -- (4.81,-1.5) -- (2.92,-0.88) -- cycle; %red rect     \draw[double distance=10mm,double=gray,opacity=0.3](0,0) circle (4.4cm); % a double circle     \path [postaction={decorate,decoration={raise=-1ex,text along path, reverse path,text align=center, text={|\ttfamily\huge\color{white}|Text label 1}}}] (-36:4.4cm) arc (-36:216:4.4cm); % commands should be between delimiters ||      \path [postaction={decorate,decoration={raise=-1ex,text along path, reverse path,text align=right, text={|\ttfamily\huge\color{white}|Unknown}}}] (-36:4.4cm) arc (-36:144:4.4cm);     \path [postaction={decorate,decoration={raise=-1ex,text along path,text align=right, text={|\ttfamily\huge\color{white}|Text label 2}}}] (-36:4.4cm) arc (-36:288:4.4cm);       \end{tikzpicture}     \end{figure}     \end{document}        Also related to my question:   1\. Can I do all of the text in one \path command?   2\. Can I do text along a path directly using the circle as my path, I mean without the need to draw an arc?   3\. It would be great if this can be done with few lines of code.   4\. Is there any specialized packages/tikz (tikz fan!) libraries to get user- friendly control over text along _any_ path anywhere in the cloud?


title: Multiple labels in aligned environment

text: I would like to format an optimization problem by               \documentclass{article}     \usepackage{amsmath}          \begin{document}          We want to label each line separately. The inserted text and formulas     have to be aligned like in this example:     \begin{equation}     \begin{aligned}     \label{eq:3}     & \underset{X}{\text{minimize}} & &  \mathrm{trace}(X) \\     & \text{subject to} &&  X_{ij} = M_{ij}, \; (i,j) \in \Omega, \\     & &&  X \succeq 0.      \end{aligned}     \end{equation}          \end{document}      ![enter image description here](http://i.stack.imgur.com/X0al4.png) (Already described in How to label an optimization problem with a label such as (P)?). An ideal alignment of the inserted text and formulas is achieved by the `aligned` environment. However, I want to label each line separately. By placing `\label{...}` at each line               \begin{equation}     \begin{aligned}     & \underset{X}{\text{minimize}} & &  \mathrm{trace}(X) \label{eq:6}\\     & \text{subject to} &&  X_{ij} = M_{ij}, \; (i,j) \in \Omega, \label{eq:7} \\     & &&  X \succeq 0. \label{eq:9}      \end{aligned}     \end{equation}      I get the error message: "Package amsmath Error: Multiple \label's: label 'eq:4' will be lost." How can I label each line individually?


title: arara: between silent and verbose mode

text: Consider the following files **`myfile.tex`**               % arara: myrule: {items: [lions, zebras]}     \documentclass{article}          \begin{document}     hello world     \end{document}      **`myrule.yaml`**               !config     #     # Sample usage     # % arara: myrule: {items: [lions]}     # % arara: myrule: {items: [lions, zebras]}     #     identifier: myrule     name: Myrule     commands:      - <arara> echo @{item}     arguments: []      If I run `arara` in `verbose` mode on `myfile.tex` using               arara -v myfile      then the output is                 __ _ _ __ __ _ _ __ __ _       / _` | '__/ _` | '__/ _` |     | (_| | | | (_| | | | (_| |      \__,_|_|  \__,_|_|  \__,_|          Running Myrule...           lions     Status: SUCCESS          Running Myrule...           zebras     Status: SUCCESS      If I run it in `silent` mode using               arara myfile      then the output is                 __ _ _ __ __ _ _ __ __ _       / _` | '__/ _` | '__/ _` |     | (_| | | | (_| | | | (_| |      \__,_|_|  \__,_|_|  \__,_|          Running Myrule... SUCCESS     Running Myrule... SUCCESS      I would like to get more information about the `@{item}` currently being processed, even when I'm compiling in `silent` mode; explicitly, my desired result (when running `arara myfile`) would be something like                 __ _ _ __ __ _ _ __ __ _       / _` | '__/ _` | '__/ _` |     | (_| | | | (_| | | | (_| |      \__,_|_|  \__,_|_|  \__,_|          Running Myrule (lions)... SUCCESS     Running Myrule (zebras)... SUCCESS      Is such output possible? PS: My example above is a toy example- the 'real-life' code is in How to create individual chapter PDFs


title: Compile .tex file to a pdf on os X

text: I installed mactex and I wrote a resume in Vim, but I can't figure out how to compile the .tex file into a pdf using the command line. I have a program called TexWorks that does it, but I'm more comfortable just using the command line. How does one compile .tex to .pdf? Thanks.


title: How to include price in bibliography?

text: I have added a `price` attribute to my bibliography as such:               @book{1578203120,       Author = {Janice Reynolds},       Title = {The Complete E-Commerce Book: Design, Build \& Maintain a Successful Web-based Business},       Publisher = {CRC Press},       Year = {2004},       ISBN = {1578203120},       URL = {http://www.amazon.com/dp/1578203120},       price = {USD 30.55}     }      When I re-run my `latexmk` (which runs `bibtex` and `xelatex` the required number of times), I don't see the price show up in my bibliography. I don't get any errors or warnings either. I'm using the following `biblatex` options:               \usepackage[backend=bibtex,url=true]{biblatex}      **UPDATE: I ultimately got this looking how I wanted as follows:**               \begin{filecontents*}{biblatex-dm.cfg}     \DeclareDatamodelFields[type=field,datatype=literal]{price}     \DeclareDatamodelEntryfields{price}     \end{filecontents*}          \NewBibliographyString{price}     \DefineBibliographyStrings{english}{price = {price}}          \renewbibmacro*{addendum+pubstate}{%       \iffieldundef{price}         {}         % {\textsc{\bibstring{price}}\addcolon\space\printfield{price}}         {\addperiod\space\textsc{price}\addcolon\space\printfield{price}}       \printfield{addendum}%       \newunit\newblock       \printfield{pubstate}}      ![screenshot](http://i.stack.imgur.com/kVwPq.png)


title: How to remove the "References" title

text: I would like to know how to remove the "References" title from command \bibliography{}. If I write:               ... text ... \cite{RefAnd2013} ...     \bibliographystyle{IEEEtran}     \bibliography{AnderBib}     ... more text ...     \end{document}      Appears "References" title: > ... text [1] ... > > **References** > > [1] W. Anderson, Environment Modeling with UML, in ... 2010. [Online]. > Available: http://dx.doi.org/xxx > > ... more text ... But, I need > ... text [1] ... > > [1] W. Anderson, Environment Modeling with UML, in ... 2010. [Online]. > Available: http://dx.doi.org/xxx > > ... more text ...


title: How do I replace an XYZ coordinate system on an already available plot?

text: I have an eps file looking like this: ![enter image description here](http://i.stack.imgur.com/IpZDb.jpg) I have no access to the original dataset, so replotting it is not an option. I would like to replace the ugly 80s style coordinate system (Both the captions and the lines) with a coordinate system generated by `pgfplots`. I have seen somewhere that this is possible, but I don't remember where and how. I can remove the captions and lines with Illustrator so that I only have the plot. Could someone please point me to a source where it's explained how to achieve this? * * * I got it to run with example data from the PGFPLOTS manual. However, when I enter my coordinates:               (0,0,0) => (36.5,64.6-64.6)     (0,10,0) => (0,64.6-36.5)     (10,0,0) => (93.4,64.6-47.8)     (5,5,1) => (44.3,64.6-40.6)      I get the following error message:               Error: Sorry, 'scale uniformly' failed bec     ause its actual implementation works only if y_x = 0 (for 2d axes) or if z_x =      0 (for 3d axes). The result will not fill the prescribed dimensions. For 2d axe     s, you may also want to consider the 'unit vector ratio' key.      What is it trying to tell me? I don't understand this error message. * * * MWE               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots}     \usepackage[T1]{fontenc}          \usetikzlibrary{plotmarks}          %%%<     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{5pt}     %%%>          \begin{document}          \begin{tikzpicture}     \begin{axis}[         grid=both,minor tick num=1,         xlabel=$x$,ylabel=$y$,zlabel=Local Dose         ]     \addplot3 graphics[         points={%  important             (0,1,0) => (0,207-112)             (1,0,0) => (446,207-133)             (0.5546,0.5042,1.825) => (236,207)             (0,0,0) => (194,207-202)         }] {data.png};     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/t1AL0.png)


title: Color transition from title to main body

text: I've been scouring the internet for an answer to this question, unsuccessfully. I couldn't find it here. If there is an answer already, sorry and please direct me to it. I'm trying to customize my presentation a lot and with my MWE, I've gotten stuck with a little detail that I can't figure out.               \documentclass{beamer}     \usetheme{Ilmenau}          \useoutertheme[subsection=false]{smoothbars}          \usepackage{lipsum}          \setbeamertemplate{footline}[default]     \setbeamertemplate{navigation symbols}{}          \definecolor{color3}{rgb}{.4 .4 .4}          \usecolortheme[named = color3]{structure}     \setbeamercolor{frametitle}{fg = white}     \setbeamercolor{background canvas}{bg = black}     \setbeamercolor{normal text}{fg = white}          \begin{document}     \begin{frame}         \frametitle{Test}         \framesubtitle{Test framesubtitle}         \lipsum[4]     \end{frame}     \end{document}      When this code is run, it'll create a nearly black slide. EXCEPT for the transition from the title to the main body of the slide, where there's an annoying little white line. How can I have this color transition change from gray to black instead of from gray to white? ![enter image description here](http://i.stack.imgur.com/0YaKq.png)


title: Plot with Min/Max bar and two average points

text: I am trying to stop using Excel charts in my academic papers and rather use something more LaTeX integrated such as Tikz. My current Excel chart looks like that: ![I have](http://i.stack.imgur.com/72uyu.jpg) As can be seen, any combination from the two sets {CR, ER, CRER} and {10, 50, 100} contains four information: Avg, AvgOpen, Min and Max. I would like to draw, for each combination, one single bar: One bar that spans from Min to Max and two different points that indicate Avg and AvgOpen. Searching on the web, the closest to what I want looks like that: ![I would like to have](http://i.stack.imgur.com/0v2mX.png) However, I could only find solutions like the one discussed here: Link to other discussion thread: pgfplots with symbolic x coords and error bars In this example, the min and max values can be well identified, but there is only one single point to indicate the avg. How could I add another point to such an example? Also, in the Excel chart you can see that I have two lines of labels on the x-axis. For example a "CR" which is then sub-divided into 10, 50 and 100. Does anybody have an indication how I could create such a chart? Many thanks in advance. Any kind of help is appreciated. San ========================================== I managed to build a chart according to what I would like to have. Now I just have to add a legend, which does not quite work out. Using normal bars, I can add a legend. However, using error bars I didn't yet figure out how. Please consider my current code:               \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}     \pgfplotsset{         min max/.style={             mark=-,             error bars/.cd,                 y dir=plus,                 y explicit,                 error mark=-,             /pgfplots/table/.cd,                 x=Time,                 y=Min,                 y error expr=\thisrow{Max}-\thisrow{Min}         },         avg avgopen/.style={             mark=*, mark size=2pt, %mark options={xshift=-2pt},             error bars/.cd,                 y dir=plus,                 y explicit,                 error mark=square,     %            error mark=|,     %            error bar style={draw opacity=0,xshift=3pt},     %            error mark options={draw opacity=1, mark size=3pt},             /pgfplots/table/.cd,                 x=Time,                 y=AvgOpen,                 y error expr=\thisrow{Avg}-\thisrow{AvgOpen}         }     }          \pgfplotstableread{     Time    Avg AvgOpen Min Max     CR  8.63    5.81    4   10     ER  8.17    6.31    3   10     CRER    8.42    5.84    4   10     }\datatableA          \pgfplotstableread{     Time    Avg AvgOpen Min Max     CR  25.02   15.84   6   44     ER  23.17   16.97   6   43     CRER    24.15   15.73   6   45     }\datatableB          \pgfplotstableread{     Time    Avg AvgOpen Min Max     CR  48.24   38.18   13  86     ER  45.47   39.41   12  82     CRER    47.19   38.29   12  85     }\datatableC                    \begin{figure}[htbp]     \hspace{-0.5cm}     \begin{tabular}{C{.26\textwidth}C{.26\textwidth}C{.26\textwidth}C{.20\textwidth}}     %%%%%%%%%%%%%%%%%%%%%%     \subfigure [10 loc] {     \begin{tikzpicture}     \begin{axis} [symbolic x coords={CR,ER,CRER},xtick=data,width=0.30\textwidth,height=0.4\textwidth,                     %legend entries={Min, Max, Avg, AvgOpen},                     %legend to name=legend:legend-stats1                        legend pos=north west,     ]     \addplot [min max][forget plot,only marks]  table {\datatableA};     \addplot [avg avgopen][forget plot,only marks] table {\datatableA};     %\legend{$S$};     \end{axis}     \end{tikzpicture}     } &      %%%%%%%%%%%%%%%%%%%%%%     \subfigure [50 loc] {     \begin{tikzpicture}     \begin{axis} [symbolic x coords={CR,ER,CRER},xtick=data,width=0.30\textwidth,height=0.4\textwidth]     \addplot [min max][forget plot,only marks]  table {\datatableB};     \addplot [avg avgopen][forget plot,only marks] table {\datatableB};     \end{axis}     \end{tikzpicture}     } &      %%%%%%%%%%%%%%%%%%%%%%     \subfigure [100 loc] {     \begin{tikzpicture}     \begin{axis} [symbolic x coords={CR,ER,CRER},xtick=data,width=0.30\textwidth,height=0.4\textwidth]     \addplot [min max][forget plot,only marks]  table {\datatableC};     \addplot [avg avgopen][forget plot,only marks] table {\datatableC};     \end{axis}     \end{tikzpicture}     } &     %\ref{legend:legend-stats1}     \end{tabular}     \caption{My chart.}     \end{figure}      This gives me a chart such as the following one: ![My chart](http://i.stack.imgur.com/Hs4FF.jpg) Now, I would like to add a legend to the right of the 3 subfigures, vertically aligned in the center or at the top, with the following four entries (showing the corresponding symbol): \- Min \- Max \- Avg \- AvgOpen Furthermore, I would like to have a little less (horizontal) space between each of the bars. As mentioned, I was trying to manage this since some time now and I just don't find the right commands. Any help is appreciated! Many thanks in advance. San


title: Automatic Way of Searching for Syntax Inconsistencies

text: I have a large .tex file, and when ran am receiving error messages about missing `$` or extra delimiter/missing `{`. It tells me in the log file where the error is "supposed" to be located, but it is not there. I believe it is somewhere else in the file though. My question, is there an automatic way of FINDING exactly where the syntax inconsistencies in your file are when the log file just provide a line number and even then sometimes it gives incorrect line number locations such as: having one brace `{...` with no closing brace, or having one math delimiter `$...` or `\(...`, and missing the other. A small snapshot is below of what was reported back after compilation. ![log output](http://i.stack.imgur.com/Xj1hv.png) And this is what my `line 16` looks like below: Line 16 ![Line 16](http://i.stack.imgur.com/pKtwO.png)


title: Math-mode overrun in newtheorem

text: I would like to have a long math-mode "title" in a newtheorem environment:               \documentclass[twocolumn]{article}     \usepackage{amsthm}          \newtheorem{definition}{Definition}          \begin{document}     \begin{definition}     [$ABC \rightarrow DEF \rightarrow GHI \rightarrow JKL \rightarrow MNO \rightarrow PQR$]           Here's some text that runs over onto the next line, to show the overrun.     \end{definition}          \end{document}      However, although the text wraps properly if the title is text, an inline math-mode title doesn't seem to wrap. (It seems reasonable to expect it to wrap since it's not display math, but perhaps I'm wrong.) The particular formula I've used here is illustrative: I would like something that works with an arbitrary (breakable) math formula. There is some overlap with Overruns in newtheorem in latex. The "manual intervention" discussed there (formatting the name of the theorem yourself) certainly works, but I wondered if there was a better solution. Also note that I am using `amsthm`.


title: Fancy header in bibliography

text: I would like to add a custom style to my bibliography. With this code:               \phantomsection     \addcontentsline{toc}{chapter}{\bibname}     \bibliographystyle{unsrt}     \bibliography{mybib.bib}{}     \thispagestyle{fancy}      I've the first page in plain style (no custom header and number on bottom), whereas other bibliography's pages use the fancy style. How can I set fancy also for the first page? Note: I'm using `book` as document type.


title: How do I add a line automatically before a listing

text: I am using the `listings` package and I want to automatically add a blank line before every listing. Any idea on how to do this?


title: Splitting examples in gb4e

text: I would like to split examples in the `\usepackage{gb4e}` to get explanatory remarks as close to the explained item as possible. Usually, my typeset examples are looking like this:               (1) blabla     (2) a. blabla,         b. blabla         c. blabla     (3) blabla bal      Then I provide some explanatory remarks. This is produced by:               \begin{exe}       \ex  blabla       \ex \begin{xlist}           \ex blabla           \ex blabla           \ex blabla         \end{xlist}       \ex blabla bla     \end{exe}      **I would like the examples to look either like this...**               (1) blabla     (2) a. blabla,         b. blabla          Some explanatory remarks. Some explanatory remarks. Some explanatory remarks.      Some explanatory remarks. Some explanatory remarks.                c. blabla     (3) blabla bal      ... **or like this:**               (1) blabla     (2) a. blabla,         b. blabla          Some explanatory remarks. Some explanatory remarks. Some explanatory remarks.      Some explanatory remarks. Some explanatory remarks.          (2) c. blabla     (3) blabla bal      The latter option repeats the number "(2)" before "c.", the other doesn't. So the idea is to divide examples into several pieces and give some explanations in between. The ideal answer would begin like this:               \begin{exe}       \ex  blabla       \ex \begin{xlist}           \ex blabla           \ex blabla         \end{xlist}     \end{exe}          Explanatory remarks...      The remaining commands/environments I don't know how to generate. I guess there is a way doing it based on `\setcounter`. But if this would work, I wouldn't know how to get a solution without the number.


title: Apparent hyperref conflict with datatool and longtabu col vertical alignment?

text: Only when I turn on `hyperref` do I get a weird vertical alignment problem in the first column of a `datatool`-driven `longtabu`. Without `hyperref`, the rows of the first column are vertically aligned to the top just like the other columns. With `hyperref` turned on, the first column rows are acting like they have a built-in line break and drop down one line within the wrapped column.   MWE -- compare `hyperref` commented to uncommented:               \documentclass[12pt]{article}          \usepackage{filecontents}     \begin{filecontents}{actionitems.csv}     ID|Project|Opened|Due|Issue|From|Lead|Closed|Note     1|Area 51|2012/12/12|2012/12/21|Prepare for the ending of the world|A. Crackpot|So Crazy||12/12 Survived the trial day \DTLpar 12/22 Bored now -- go on to the next thing     2|Roswell|2012/12/12|2012/12/21|Prepare for alien abduction|Tinfoil Hat|I.M. Gullible||12/21 Where are they? \DTLpar 12/22 Left Behind!     \end{filecontents}          \usepackage{datatool}     \DTLsetseparator{|}     \DTLloaddb{actionitems}{actionitems.csv}          \usepackage{fullpage}     \usepackage{booktabs,longtable,tabu}     \usepackage{pdflscape}          % Note difference in vertical alignment of ID column with package hyperref commented or not:     \usepackage{hyperref}          \begin{document}     \pagestyle{empty}     \tabulinesep=1mm     \begin{landscape}     \begin{longtabu}{ X[1,r] X[2,l] X[2,l] X[2,l] X[5,l] X[3,l] X[5,l] }              \caption*{Open Action Items}\\         \toprule              ID & Project & Opened & Due & Issue & Lead & Note\\ \hline         \endhead              \DTLforeach*{actionitems}             {\id=ID,\project=Project,\opened=Opened,\due=Due,\issue=Issue,\lead=Lead,\note=Note}             {\id & \project & \opened & \due & \issue & \lead & \note\\ \hline}          \end{longtabu}     \end{landscape}     \end{document}


title: How can I get bold Greek letters with mathptmx?

text: I'm currently using these packages in my document:               \usepackage{mathptmx}     \usepackage[margin=1.2in]{geometry}     \usepackage{fancyhdr}     \usepackage{amsmath, amsthm, amssymb, amsbsy}     \usepackage{graphicx}     \usepackage{hyperref}     \usepackage{enumerate}     \usepackage{enumitem}     \usepackage[utf8]{inputenc}     \usepackage[danish]{babel}     \usepackage[T1]{fontenc}     \usepackage{caption}     \usepackage{subcaption}      But when I try to use:               \boldsymbol{\sigma}      As and example, well, nothing happens. It's not bold. I've also tried `\mathbf` and such. But nothing happens. I don't know if it is because I'm using the "Times New Roman"-like package ? Can anyone help me out?


title: Including graphics into a savequote

text: I use `quotchap` for each chapter of a book. For a specific chapter, I would like to replace the text by a picture (`.jpg`). Unfortunately, the `\begin{figure}` directive does not seem to work inside a `\begin{savequote}` environment. Is there a workaround I am missing ?


title: table inside a main table

text: I want to have a table which contains many tables. I want its caption also. MTab1 and 2 are single col and row matrix. length of Mtab1 and 2 should be equal to T1 and T2.It means Row of MTab1 = 7 rows of T1 ![enter image description here](http://i.stack.imgur.com/91BfS.png)               \documentclass[pdftex,12pt,a4paper]{report}     \usepackage{lscape}         \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}         \documentclass[pdftex,12pt,a4paper]{report}     \usepackage{lscape}      \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}       \begin{document}        \begin{landscape}          \begin{tabular}{l l l}           MTab1 & \input{./Mat1_out.tex} & \input{./Mat2_out.tex}\\ MTab2 & \input{./Mat1_out.tex} & \input{./Mat2_out.tex}\\              \caption{This table shows some data}         \end{tabular}          \end{landscape}           \end{document}      % Content Mat1_out.text               \begin{tiny}\begin{tabular}{|l|c|c|c|c|}     \hline     &\textbf{col 1}&\textbf{col 2}&\textbf{col 3}&\textbf{col 4}\\\hline     \textbf{row 1}&0.55&0.24&0.35&0.75\\\hline     \textbf{row 2}&0.14&0.93&0.83&0.38\\\hline     \textbf{row 3}&0.15&0.35&0.59&0.57\\\hline     \textbf{row 4}&0.26&0.20&0.55&0.08\\\hline     \textbf{row 5}&0.84&0.25&0.92&0.05\\\hline     \textbf{row 6}&0.25&0.62&0.29&0.53\\\hline     \textbf{row 7}&0.81&0.47&0.76&0.78\\\hline     \end{tabular}     \end{tiny}      % Mat2_out.tex               \begin{tiny}\begin{tabular}{|l|c|c|c|c|}     \hline     &\textbf{col 1}&\textbf{col 2}&\textbf{col 3}&\textbf{col 4}\\\hline     \textbf{row 1}&0.93&0.79&0.69&0.83\\\hline     \textbf{row 2}&0.13&0.31&0.75&0.54\\\hline     \textbf{row 3}&0.57&0.53&0.45&1.00\\\hline     \textbf{row 4}&0.47&0.17&0.08&0.08\\\hline     \textbf{row 5}&0.01&0.60&0.23&0.44\\\hline     \textbf{row 6}&0.34&0.26&0.91&0.11\\\hline     \textbf{row 7}&0.16&0.65&0.15&0.96\\\hline     \end{tabular}     \end{tiny}      % latextable2.tex               \begin{table}         \begin{tabular}{|l|}             \hline             MTab1\\ \hline             Matb2 \\             \hline         \end{tabular}     \end{table}


title: Too wide diagrams

text: I have been struggling with diagrams that exceed the margins of my document. Could you tell me how could I solve this problem without changing the margin sizes? I am using the XY package. Thanks!


title: Windows API Error when running LaTeX over the web (MiKTeX installation)

text: I have installed MiKTeX 2.9 on a Windows Server 2003R2 with IIS. I have a CGI program that's internally running the command "latex filename" but this program is failing with an error message               initexmf.exe: Windows API error 5: Access is denied. initexmf.exe:      Data: C:\Documents and Settings\Default User\Local Settings\Application Data\MiKTeX      latex: The operation failed for some reason.      latex: Data: D:\Program Files\MiKTeX 2.9\miktex\bin\initexmf.exe      Running the same command from the command prompt as a local user works but not when I try to run it over the web. I have a second machine with an almost identical setup that has MiKTeX 2.6 installed. On this machine the same command works as expected over the web. The installation directory is on a secondary drive (D-drive) under               D:\Program Files      So I tried to install MiKTeX on the C-drive under \Program Files and under C:\ and on the D-drive under D:\ but this didn't change anything. I've installed DebugView to identify the files that are accessed and the first file latex is tying to access is               D:\Program Files\MiKTeX 2.9\miktex\config\miktexstartup.ini      but this file doesn't exist. Obviously the permissions aren't set up properly for the user under which the CGI is run but I'm surprised that the MiKTeX installation didn't setup permissions properly. Does anybody have an idea of what the problem could be?


title: How to put the QED symbol of a proof at the right place inside align?

text: When a proof ends with a formula in `equation` or `equation*` environment, putting `\qedhere` after the equation would cause the QED symbol to appear in the right place. I.e. at the end of the line in which the equation appears. For example:               \begin{equation}       x = y+z \qedhere     \end{equation}      However, I cannot get the same result when the formula is inside an `align`/`align*` environment using the same method:               \begin{align}       x &= a+b \\         &= y+z \qedhere     \end{align}      The square appears just after (y+z) and is not shifted to the right boundary of the page. Here is a MWE:               \documentclass[a4paper]{article}     \usepackage{hyperref}     \usepackage{amsthm}     \usepackage[cmex10]{amsmath}     \interdisplaylinepenalty=2500     \usepackage{amssymb}          \title{Example to Show QED is Misplaced}     \author{}     \begin{document}     \begin{proof}       This proof is typeset correctly:       \begin{equation*}         x = y + z \qedhere       \end{equation*}     \end{proof}          \begin{proof}       But this one not!       \begin{align*}         x & = u + v \\         & = y + z \qedhere       \end{align*}     \end{proof}          \end{document}


title: Nested itemize environment affects vertical spacing of parent itemize environment

text: I have two itemize environments, one is nested in the other. Somehow the nested itemize environment affects the vertical spacing of the adjacent item of the parent itemize environment. As you can see in the example below, the vertical space between **b** and **c** is slightly smaller than between **a** and **b**. If I remove the nested itemize environment, the vertical spacing between **b** and **c** is the same as between **a** and **b**. How can I achieve equally spaced items in an itemize environment nesting another itemize environment? ![enter image description here](http://i.stack.imgur.com/yFBkN.png)               \documentclass{beamer}          \begin{document}       \begin{frame}         \begin{itemize}           \item a           \item b           \item c           \begin{itemize}             \item d             \item e           \end{itemize}         \end{itemize}       \end{frame}     \end{document}


title: What packages are actively maintained/developed on github/bitbucket?

text: I would like to improve my TeX skills by following the development of actively developed packages. I findingwould like to give back by taking on some of the low hanging fruit among the issues/bug-reports of a package. Any platform will do: Github, Bitbucket, Gitorious, Launchpad, etc...


title: Extended game-form with egameps.sty: no branches

text: I'm trying to learn to create extended game-forms with LaTeX, but I don't get branches. The example code I've downloaded is:               \documentclass{article}     \usepackage{pstricks}     \usepackage{egameps}     \begin{document}          \begin{figure}[htb]     \hspace*{\fill}     \begin{egame}(600,280)     \putbranch(300,240)(2,1){200} \iib{1}{$C$}{$D$}     \putbranch(100,140)(1,1){100} \iib{}{$c$}{$d$}[$3,3$][$1,4$]     \putbranch(500,140)(1,1){100} \iib{}{$c$}{$d$}[$1,4$][$2,2$]     \infoset(100,140){400}{2}     \end{egame}     \hspace*{\fill} \caption[]{Sample Game}\label{mygame}     \end{figure}     \end{document}      But I only get this: ![enter image description here](http://i.stack.imgur.com/Ojz89.png) Is there anyone who knows how to fix this issue?


title: Globally set the justification in a framed box

text: I want to show the text from a Python Interpreter in a Windows console. This should be plain text (like you see in a command line terminal). I also want to show Python code snippets with highlighting. To do this, I set my default listing style for coloring (`\lstset`) and then created a custom listing style for command line terminal output (`\lstdefinestyle`). When I try to use a framed box to show the terminal output, I find that it tries to fully justify the lines and adds extra spaces between words. How do I globally set all framed boxes to be left justified so I don't have to justify each box? Here is what I did:               \documentclass[openright,12pt]{book}     %Include Packages     \usepackage{hyperref}     \usepackage{float}     \usepackage{longtable}     \usepackage{listings} %code snippets     \usepackage{color}     \usepackage{calc}     \usepackage{amsmath}     \usepackage{framed} %console output displays     \usepackage{graphicx}     \usepackage{tikz}     \pagestyle{headings}          %Syntax Coloring for code snippets     \lstset{       belowcaptionskip=1\baselineskip,       breaklines=true,       frame=l,       xleftmargin=\parindent,       language=Python,       showstringspaces=false,       basicstyle=\footnotesize\ttfamily,       keywordstyle=\bfseries\color{green!40!black},       commentstyle=\itshape\color{mygray},       identifierstyle=\color{blue},       stringstyle=\color{orange},       numbers=left,       numbersep=15pt,        numberstyle=\tiny\color{gray},     }          %Syntax coloring for inline code at the console     \lstdefinestyle{consolePy}{       breaklines=true,       language=Python,       showstringspaces=false,       xleftmargin=0pt,       frame=none,       numbers=none,       identifierstyle=\ttfamily\color{black},       basicstyle=\footnotesize\color{black},         commentstyle=\ttfamily\color{black},       stringstyle=\ttfamily\color{black},       keywordstyle=\ttfamily\color{black}       }          \begin{document}     \begin{framed}     \begin{lstlisting}[style=consolePy]     >>> MyName = “Jason”     >>> print MyName     Jason     >>> MyAge = 30     >>> print 'My name is', MyName, 'and I'm', MyAge, 'years old.'     My name is Jason and I’m 30 years old.     \end{lstlisting}     \end{framed}     \end{document}      I would show a screen capture of the result but I'm new so I can't post images. Just know that the result is my text showing large white spaces in the framed listing. Thank you for any guidance you can provide!


title: Representing Equivalence Relations with Nodes, Loops, and Edges

text: I've never used TikZ for illustrating equivalence relations, but I thought I'd try it out. What I'd like to produce is something like this: ![output](http://i.stack.imgur.com/lu4f5.jpg) What is the general method for connecting points to themselves with looped arrows and creating labels of the points to the right? * * * So here is what I used to solve this problem:               \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,       thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}]            \node[main node] (1) {1};       \node[main node] (2) [right of=1] {2};       \node[main node] (3) [right of=2] {3};            \path[every node/.style={font=\sffamily\small}]         (1) edge [bend right] node [left] {} (2)             edge [bend right] node[left] {} (3)             edge [loop above] node {} (1)         (2) edge [loop above] node {} (2)         (3) edge [loop above] node {} (3);     \end{tikzpicture}      * * * I got the idea from here.


title: rectangle in corner of table

text: How to draw green rectangles in the following table.                 \begin{tabular}{|c|c|c|c|c|c|}     \hline        & $D_1$ & $D_2$ & $D_3$ & $D_4$ & Supply \\      \hline      $S_1$ & 19 & 30 & 50 & 10 & 7 \\      \hline      $S_2$ & 70 & 30 & 40 & 60 & 9 \\      \hline      $S_3$ & 40 & 8 & 70 & 20 & 18 \\      \hline      Demand & 5 & 7 & 8 & 14 & 34 \\      \hline      \end{tabular}        ![enter image description here](http://i.stack.imgur.com/jehNt.png)


title: Defined \acronymname is not used in toc, but the standard "Acronyms", why?

text: I have defined a new name for my Acronyms list, but it the default name ("Acronyms") is used in the table of contents. Do you know how I can solve this? I have created a minimum working example, but it doesn't have the problem, so here is some of my code. Is there a problem here, or should I look somewhere else?               ...     \usepackage[acronym,nonumberlist,toc]{glossaries}     \usepackage{glossary-superragged}     \makeglossaries          \renewcommand*{\acronymname}{Acronyms and Abbreviations}     \renewcommand*{\glspostdescription}{} % remove trailing dot     \renewcommand*{\glsnamefont}[1]{\textbf{#1}}          \newacronym{hci}{HCI}{Human-Computer Interaction}     \newacronym{dom}{DOM}{Document Object Model}     \newacronym{svg}{SVG}{Scalable Vector Graphics}     ...          \begin{document}          \frontmatter         \includepdf[pages={-}]{front_page.pdf}         \setcounter{page}{1}             \input{abstract}         \clearpage         \tableofcontents         \printglossary[style=super, type=\acronymtype]         \input{preface}     \mainmatter         ...


title: Problem with formatting tables with equal column widths

text: I want to create two tables that have the same width of columns. Both tables consist of 6 rows and 3 columns. In both tables, row 1 and row 4 are explanatory, and should expand in all columns. In the first table, rows 2, 3, 5, and 6 should have three columns of the same width. In the second table, rows 2 and 3 should have 2 columns of the same width, and rows 5 and 6 should have three columns of the same width. This is how I've made the first table:                   \begin{table}[h]             \caption{Distribution of mappings for the SLA parameter $\pi$.}             \label{tab:distPi} \centering             \begin{tabular*}{0.45\textwidth}{@{\extracolsep{\fill}}|c|c|c|}                 \hline                     \multicolumn{3}{|c|}{\textbf{Name of the SLA parameter $\pi$}} \\                 \hline                     \emph{Cost} & \emph{Charge} & \emph{Rate} \\                 \hline                     15\% & 15\% & 40\% \\                 \hline                 \hline                     \multicolumn{3}{|c|}{\textbf{Unit of the SLA parameter $\pi$}} \\                 \hline                     \emph{USD} & \emph{GBP} & \emph{YPI} \\                 \hline                     38\% & 2\% & 40\% \\                 \hline             \end{tabular*}             \vspace{-0.3cm}         \end{table}      and this is how I've made the second table:                   \begin{table}[h]             \caption{Distribution of mappings for the SLA parameter $\mu$.}             \label{tab:distMu} \centering             \begin{tabular*}{0.45\textwidth}{@{\extracolsep{\fill}}|c|c|c|c|c|c|}                 \hline                     \multicolumn{6}{|c|}{\textbf{Name of the SLA parameter $\mu$}} \\                 \hline                     \multicolumn{3}{|c|}{\emph{MemoryConsumption}} & \multicolumn{3}{|c|}{\emph{Consumption}} \\                 \hline                     \multicolumn{3}{|c|}{70\%} & \multicolumn{3}{|c|}{30\%} \\                 \hline                 \hline                     \multicolumn{6}{|c|}{\textbf{Unit of the SLA parameter $\mu$}} \\                 \hline                     \multicolumn{2}{|c|}{\emph{Mbit}} & \multicolumn{2}{|c|}{\emph{Gbit}} & \multicolumn{2}{|c|}{\emph{Tbit}} \\                 \hline                     \multicolumn{2}{|c|}{5\%} & \multicolumn{2}{|c|}{55\%} & \multicolumn{2}{|c|}{40\%} \\                 \hline             \end{tabular*}             \vspace{-0.3cm}         \end{table}      However, the formatting is not good, as you can see in the given screenshot. ![alt text](http://i.stack.imgur.com/WSfk6.png) Does anyone have an idea how to do it better? The page is two-columned and the tables will be in one of the two columns. Their width should be ca. 90% of the width of the column.


title: About big parenthesis larger than Bigg

text: Do any one know how to type a very big parenthesis in LaTeX. Since the formula is very big, I used `multline` environment, in one line, there are many pair of parenthesis by using `\left` and `\right` which make them already very big. Between lines, I need some parenthesis bigger than the one given by `\Bigg`. My intention is to show the following big formula in `multline` environment:               $$     \frac{           e^{-\frac{t \lambda +4}{4 \lambda \nu }}           \left(                 e^{\frac{t}{4 \nu }}                 \left(                       4 \sqrt{\pi } \sqrt{\nu }+1                 \right)                 \nu \Phi                 \left(                       \frac{t-\frac{2}{\lambda }}{\sqrt{2} \sqrt{t \nu }}                 \right)                 \lambda^3                 -e^{\frac{t \lambda +8}{4 \lambda \nu }}                 \left(                       4 \sqrt{\pi } \sqrt{\nu }-1                 \right)                 \nu                 \left(                       \Phi                       \left(                             \frac{t+\frac{2}{\lambda }}{\sqrt{2} \sqrt{t \nu }}                       \right)                       -1                 \right)                 \lambda^3                 +e^{\frac{1}{\lambda \nu }}                 \left(                       4 \sqrt{\pi } \lambda^3 \nu^{3/2}                       \left(                             2 \Phi                             \left(                                   \frac{1}{\sqrt{2} \lambda \sqrt{t \nu }}                             \right)                             -1                       \right)                       -e^{\frac{t}{4 \nu }}                       \left(                             \left(                                   \lambda                                   \left(                                         4 \sqrt{\pi } \sqrt{\nu }-1                                   \right)                                   \nu +2                             \right)                             \lambda^2+2                             (\lambda \nu -2)                             \Phi                             \left(                                   \frac{\sqrt{\frac{t}{\nu }}}{\sqrt{2}}                             \right)                             \lambda^2-2                        \right)                  \right)            \right)          }{4 \lambda }     $$


title: Is it bug or feature? I cannot use makeidx in beamer.

text: I attempted to use makeidx.sty in my beamer project. The first two compilation using latex, the input file can be processed successfully. Then I execute makeindex, it also run without error. But when I call latex.exe again, I got an error message saying * * *               !LaTeX Error: Environment theindex undefined.     See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...     1.1 \begin{\theindex}      * * *               \documentclass{beamer}     \usepackage{makeidx}     \makeindex          \begin{document}          \begin{frame}{test 1}     \index{Laplace}Laplace transform is...     \LaTeXe\ can make you happy!     \end{frame}          \begin{frame}{test 2}     \printindex     \end{frame}          \end{document}


title: Is there a more idiomatic way of achieving this?

text: I've recently decided to use LaTeX as my primary document processor, I want to know can I achieve the effect of this more idiomatically:               \documentclass{article}     \usepackage{amsthm}     \usepackage{amsmath}     \begin{document}     \begin{alignat*}{5}      &\phantom{\Rightarrow} &a &= b \\      &\Rightarrow           &b &= a \\      &\Rightarrow           &a &= b \\      \end{alignat*}     \end{document}      ![Output from Tex](http://snag.gy/q3FtJ.jpg)


title: How do I use git submodules to keep one preamble template for all my documents?

text: I’ve read this which outlines the advantages of using submodules in git to use one centralized preamble .tex to be used for all future LaTeX document. When the preamble is changed, all documents compiled subsequently are affected. This sounds great, but the git part is very poorly explained, and I haven’t had any luck finding a guide that does this successfully. I even bough the Peepcode guide, but it’s pretty bad. I know this is a part-git-part-LaTeX question, but the question is specifically directed at LaTeX work management.


title: Set fixed font size in floating tables with floatrow package

text: The floatrow package allows global changes to the font size in floating tables with commands such as `font = small` (cf. section 3.1.2 of the documentation). But such settings only change the _relative_ size of the font. In some cases, as in Change font inside document to specific point size, the font size needs to be fixed rather than relative. How can I set a fixed size for my floating tables with `floatrow`? Borrowing from the solution to the linked question above, I tried just specifying `\floatsetup{font = {doublespacing, \fontsize{9}{11}\selectfont}}`, but this only resulted in an error.               \documentclass[12pt]{article}     \usepackage{lipsum, setspace}         \doublespacing     \usepackage{floatrow}         \floatplacement{table}{hbtp}         \floatsetup{font = doublespacing}          \begin{document}     \lipsum[1]     \begin{table}         \begin{tabular}{*4{l}}             A & B & C & D\\             x & w & y & z\\             1 & 2 & 3 & 4\\         \end{tabular}     \end{table}     \end{document}


How to define a new font family on Beamer? I've tried this way, but I get `Undefined control sequence` :               \newfontfamily\fff{xxx.ttf}      Any good idea, please? Thanks in advance!


title: How to display non-printable Unicode characters in Emacs/AucTeX?

text: I would like to see the non-printable Unicode bidi characters PDF (202C), LRO (202D), RLO (202E) in the emacs editor (but not the pdf output). How can i do this? EDIT: Here's a minimal working example. * * *               %% -*- mode: LaTeX; coding: utf-8 -*-     \documentclass{article}     \usepackage[utf8x]{inputenc}     \begin{document}         Forward, [202e]drowkcab[202c] and forward again.     \end{document}      * * * Here [202e] and [202c] stand for the Unicode bidi characters of the corresponding hexadecimal codes, namely RLO (Right-to-Left Override) and PDF (Pop Directional Formatting), respectively. I have entered them using the combinations _C-x 8 **RET** 202e **RET**_ and _C-x 8 **RET** 202c **RET**_ , respectively. The output reads: > Forward, backward and forward again. Ideally i would like the characters [202c] and [202e] to show in the emacs editor, but not in the pdf output, as yellow 'C' and 'E', respectively.


title: Establishing a new LaTeX repository in the university

text: Since there is only one TeX server in Australia, I am thinking to initiate negotiations with my institution to host a TeX repository on the website of University. First of all, please give me some hints/clues on how should I convince the university for this. In the other words, **what is the advantages for university to host such a repository?** Also, I am interested to know what is the actual figures for such TeX repositories? For example:   * How much physical space is required (i.e.15GB)?    * How many times a year should TeX repositories get updated by new versions of TeX packages?   * Time, resources, staff required for maintenance of the repository   * How much data is downloaded from TeX repository per day/month?


title: pgfplots: enlarge x limits while using x min/max

text: The problem: I like to use `enlarge x limits` to have some white space to the axes. I now often load in my data (generated elsewhere) but only want to plot a specific range (using `x min/max`). Now, doing so will not end up in white space since there is more data outside the plotted range. Is there an easy (built-in) way to 'cut-off' the plotted data at the position defined by `x min/max` and `enlarge x limits`? **MWE:**               \documentclass{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}     \begin{axis}[     width=0.85\linewidth,     height=5cm,     enlarge x limits=0.05,     enlarge y limits=0.05,     xmin = 2,     xmax = 6     ]          \addplot[black] coordinates {     (1, 2)     (2, 2.5)     (3, 1.5)     (4, 1.4)     (5, 1.3)     (6, 1.1)     (7, 0.9)     };     \end{axis}     \end{tikzpicture}     \end{document}


title: (Clickable) cross-reference in lstlisting

text: To generate documentation for an 'application programming interface', I would like to have a syntax highlighted area (with the class declaration), which has clickable links to the documentation (which is specific per method). The reason for the clickable links is twofold:   * To allow quick jumping to the method documentation.   * To prevent having to synchronize the class declaration and the method declaration elsewhere in the document. Tried so far:   1. `lstlisting` in combination with `escapeinside` option. The link works; however , the link text is _not_ syntax-highlighted.   2. `minted`, which has a `mathescape` option, but no `escapeinside`. If supported, I doubt if it would highlight the link text. Does anyone have an idea? **MWE:**               \documentclass{article}          \usepackage{hyperref}     \usepackage{listings}     \usepackage{color}          % #1: label name     % #2: function declaration     \makeatletter     \newcommand*{\func}[2]     {         % Label for full declaration         \edef\@currentlabel{#2}         \phantomsection         \label{#1}         % Text printed where \func{...} is used         #2     }     \makeatother          \begin{document}          % Method info     \func{fn:getage}{int GetAge()} \\     More info...          % Class declaration     \begin{lstlisting}[language=c++,keywordstyle=\color{blue},escapeinside='']     class Employee     {         % Would like to insert (clickable) link here, like         % \ref{fn:getage}         int GetAge();     }     \end{lstlisting}          % Reference to method (full declaration)     \ref{fn:getage}          \end{document}      **Attempt with`escapeinside` (only `lstlisting`)**               \begin{lstlisting}[language=c++,keywordstyle=\color{blue},escapeinside='']     class Employee     {         % Clickable link works, but no highlighting/formatting         '\ref{fn:getage}'     }     \end{lstlisting}


title: Logical equivalence vDashv

text: I need to create a symbol logical equivalence. Contact vDash with appropriate vertical line, but I can not find any. Can you advise?


title: Adding vertical space (\vspace) around custom environment

text: I have document with custom environment `myenv` which left margin is 4em.               \documentclass{book}     \usepackage{lipsum}          \newenvironment{myenv}{     \setlength{\leftskip}{4em}     }               \begin{document}          \lipsum[1-2]          \begin{myenv}          Vertical space should be here.          \lipsum[3-5]          Vertical space should be here.          \end{myenv}          \lipsum[6]          \end{document}      I want to **add vertical space around this environment - that is before/above and after/below**. Most straightforward, but at the same time labor-intensive, way to accomplish this that I know of is:               \begin{document}          \lipsum[1-2]          \begin{myenv}          \vspace{2em}          \lipsum[3-5]          \vspace{2em}          \end{myenv}          \lipsum[6]          \end{document}      Since I want to be able to change this vertical space without changing vertical spaces in rest of the document, I use macro:               \documentclass{book}     \usepackage{lipsum}          \newenvironment{myenv}{     \setlength{\leftskip}{4em}     }          \def \myvspacemacro{     \vspace{2em}     }               \begin{document}          \lipsum[1-2]          \begin{myenv}          \myvspacemacro{}          \lipsum[3-5]          \myvspacemacro{}          \end{myenv}          \lipsum[6]          \end{document}      Is there any easier and faster way of doing this? Ideally, I would like to set length of top vertical space and bottom vertical space for environment same way as I set leftskip value. Is it possible? There are 2 similar questions: Proper way of vertical spacing before/after environments, Vertical space before and after custom environment, but none of them seems to solve situation like mine. **Simply put, I want to achieve same effect as I would achieve in HTML/CSS by using margin-top and margin-bottom properties.** I also tried to add `\vspace` to my environment definition, but it only adds margin on top of environment and leaves no margin below environment.               \documentclass{book}     \usepackage{lipsum}          \newenvironment{myenv}{     \vspace{2em}     \setlength{\leftskip}{4em}     }          \begin{document}          \lipsum[1-2]          \begin{myenv}          \lipsum[3-5]          \end{myenv}          \lipsum[6]          \end{document}


title: How to break line of subscript under min?

text: $$     \min_{c^{(1)}, c^{(2)}, \cdots, c^{(m)}; \\ \mu_1, \mu_2, \cdots, \mu_K}     \frac{1}{m}     \sum_{i=1}^m \left\lVert \vec{x}^{(i)} - \mu_{c^{(i)}} \right\rVert     $$      The `\\` does not seem to do the trick? How?


title: Enumerate every row, excluding the first one in a table

text: I want to numerate every row, excluding the first one, in a tabularx environment. In my MWE the first line, headline, is also numerated. How can I turn this off?               \documentclass{article}     \usepackage{array,tabularx}     \newcounter{rowcount}     \setcounter{rowcount}{0}     \begin{document}          \begin{tabularx}{\textwidth}{@{\stepcounter{rowcount}\therowcount.\hspace*{1pt}}X|X}     head1 & head2\\     text text text text text text text text text text text text text text text text & txet\\     text text text text text text text text text text text text text text text & txet\\     text & txet\\     text & txet\\     text & txet\\     text & txet\\     \end{tabularx}          \end{document}


title: How to change the orientation of a brace?, with psbrace, in PsTricks

text: I can´t believe it. I was looking and reading... the multiple examples in page 23 in pstricks-add- doc.pdf and I can´t reach what I want. Even copying and pasting any examples of the PDF I know how to put the the brace pointing UP. But I try, and try, and I have no solution. This is a MWE               \documentclass[12pt,a4paper,x11names]{article}     \usepackage{pstricks,pst-node,pst-blur,pstricks-add}     \usepackage{subcaption}     \usepackage[utf8]{inputenc}     \usepackage{eurosym}     \newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur}     \definecolor{azultenue}{RGB}{65,170,193}     \definecolor{rojotenue}{RGB}{192,2,3}     \definecolor{naranjatenue}{RGB}{241,101,35}     \definecolor{verdetenue}{RGB}{144,169,61}     \definecolor{gris135}{RGB}{135,135,135}          \begin{document}          \begin{figure}[h!]     \centering     %\resizebox{8cm}{!}{     \psset{framearc=0.2, shadowcolor=black!70, shadowangle=-90, unit=1.0cm,nodesep=0.12cm}     %     \def\pscolhookii{\hskip 1cm}     \def\pscolhookiii{\hskip 1cm}     \begin{psmatrix}[rowsep=2.2, colsep=5.2]% defines the distance between two frames      [name=Inicio]      \psframegray(-2.5,-3.2)(2.5,2.5)     %      \rput(-1.1,1.5){\circlenode[fillstyle=solid,fillcolor=azultenue]{p1}{\textcolor{black}{$p_1$}}}      \rput(-0.3,1.5){\circlenode[fillstyle=solid,fillcolor=azultenue]{p2}{\textcolor{black}{$p_2$}}}      \psdots[dotsize=0.06](0.2,1.5)      \psdots[dotsize=0.06](0.4,1.5)      \psdots[dotsize=0.06](0.6,1.5)       \rput(1.1,1.5){\circlenode[fillstyle=solid,fillcolor=azultenue]{pmu}{\textcolor{black}{$p_\mu$}}}     %     \psbrace(-1.5,1.2)(1.5,1.2){}     \pnode(0,0.58){nfantasma}          %%%%%%%%%%% HOW TO PUT THIS BRACE POINTING UP  %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%%%      \psbrace(-2.1,-0.8)(2.1,-0.8){A}   %%%%%%%%%%      %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%%%           \psbrace*[rot=90,ref=rC](-2.1,-1.8)(2.1,-1.8){AA}               \psbrace[rot=180,nodesep=-0.8cm](-2.1,-2.8)(2.1,-2.8){AAA}          \psbrace*[ref=lb](-1,1)(1,1){I}  %%% copy from the page 23. where you can see pointing UP          \pnode(0,-1.75){nfantasma2}     &[name=Conjunto]      \psframegray(-2.5,-3.2)(2.5,2.5)      \pspolygon[fillstyle=solid,fillcolor=gris135,linestyle=dashed,linecolor=red,linewidth=0.06cm,linearc=0.4](-2.4,-1.5)(-2.4,-0.5)(2.4,-0.5)(2.4,-1.5)(-2.4,-1.5)          &[name=EM]     \psframegray(-2.5,-3.2)(2.5,2.5)     \end{psmatrix}          \vspace{3.1cm}     \caption{Esquema $(\mu , \lambda)$}\label{mucomalambda-ilustracion}     \end{figure}          \end{document}


title: How can I plot inequality solutions in one axis with selected ticks?

text: I would like to plot in one axis the solutions of the following inequality **1 < x < 4**. How can I do this by using tikz and show **only the ticks of the numbers 1 and 4**? I tried this :               \documentclass[a4paper,11pt]{article}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{pgfplots,tikz}     \usepackage{tkz-euclide,tkz-fct}     \begin{document}     \begin{tikzpicture}     \tkzInit[xmin=-2,xmax=5,xstep=1]     \tkzDrawX     \tkzLabelX[label options={text=black,below = 3pt}]     \tkzDefPoint(1,0){A}     \tkzDefPoint(4,0){B}     \tkzDrawSegment[line width=1mm](A,B)     \end{tikzpicture}     \end{document}


title: How to put a subscript in a superscript

text: How can I write the following thing? `a^(b_c)`, `b` being a superscript of `a`, and `c` being a subscript of `b`.


title: Image within \maketitle - not separate page

text: I would like to put a logo above my title, but I would also like to keep the title/author/date on the first page of text. All of the solutions I've found so far relate to the title page package, which instigates a separate page. Inserting a figure turns the first page into a 'regular' page, with header and footer, followed by the title on the next page. I'm using article class. Any suggestions? Code below is slightly modified from XeLaTeX template to provide MWE.               \documentclass[12pt]{article}     \usepackage{geometry}      \geometry{a4paper}                        \usepackage{graphicx}     \usepackage{amssymb}               \usepackage{fontspec,xltxtra,xunicode}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont[Mapping=tex-text]{Hoefler Text}     \setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}     \setmonofont[Scale=MatchLowercase]{Andale Mono}          \title{Brief Article}     \author{The Author}     \date{}               \begin{document}     \maketitle          Content of document, starting straight away, same page...     I would like the image to have appeared at the top, above Brief Article.         But where to put the command?               \end{document}


title: What are the standards of TeX/LaTeX coding in order to obtain robust packages?

text: I have posted several questions ultimately involving various aspects of robustness, that have arisen in the context of other questions in risk of clouding the main point of the question in each case. I thought it would be appropriate to have a centralised discussion here about what needs to be taken into account to achieve robustness and what sort of things one can do early on to minimise the pain of upgrading one's own code later on. There was a recent discussion about backward compatibility here where some mixed emotions were being expressed about whether or not a certain author was doing the right thing by his users when abandoning backward compatibility, so it's clearly an important topic. It would be good to discuss this topic without opinions of any one author's application of what is considered best practice and limiting ourselves to discussion of the principles themselves. I'm in the middle of writing a package myself as a fledgling package writer and various issues have arisen basically concerning robustness of code. Does it access globals appropriately, can it be used in any context, or what are reasonable expectations on where it can be used, without breaking? None of the other suggested questions, that came up when I typed this one in, are focussed on this particular question. I keep coming up with little questions that I want to ask relating to this topic that would get buried as comment questions and would spread the discussion all over the place as separate questions. Hopefully this is considered a worthy meta discussion. Answers could either be about general principles or particular examples of use, such as: `\pgfmathsetlength` can set a variable prefixed with `\global`, whereas `\pgfmathaddtolength` can not. Is it best practice in the former case, as you must in the latter case, making the value global with `\pgfmathsetlength{\testvar}{0}\global\testvar\testvar` just in case this changes in future? I suppose whatever the argument, that consistent practice has to be an important guide.


title: Exact positioning of page numbers at the top of each page

text: Good day everyone. I need some help on my report. My professor requires me to place page number on each page at exactly 1.25 inch from the top on the right side of the paper. Hope you can help me. Below is my sample code.                 \documentclass[12pt,a4paper]{report}       \usepackage{fancyhdr}       \usepackage{lipsum}            \fancyhf{}       \fancyhead[R]{\thepage}       \pagestyle{fancy}                \fancypagestyle{plain}{%      \fancyhf{} % clear all header and footer fields      \fancyhead[R]{\thepage} % except the center      }           \begin{document}           \chapter{Introduction}      \lipsum           \chapter{Review}      \lipsum           \end{document}


title: Table width with threeparttable smaller than notes and caption?

text: I am trying to create a fairly thin table with wider caption and wider note than the body of the table itself. My aim is not to make the table simply wider, since this makes the table look ugly and the values seem to be lost. Is there a way to solve this problem simple and smooth? Thanks a lot for every comment!               \documentclass[12pt]{article}     \usepackage{threeparttable}     \usepackage{booktabs}          \begin{document}               \begin{table}[h]     \centerline{     \begin{threeparttable}     \caption{The is ment to be a very long table caption, which is wider than the table itself.}     \label{table:meanerrorbaseline}          \begin{tabular}{cc}     \toprule     Endowment & Mean error \\      \midrule     0         & 1.67       \\     1         & 1.49*      \\     2         & 1.42**     \\     3         & 1.30***    \\     4         & 1.15***    \\     5         & 1.15***    \\     6         & 1.09***    \\     7         & 1.02***    \\     8         & 0.92***    \\     9         & 0.85***    \\     10        & 0.76**     \\     \bottomrule     \end{tabular}          \begin{tablenotes}       \small          \item The note is ment to be wider than the table itself, without having to make  the table wider and making it look ugly.         \end{tablenotes}     \end{threeparttable}     }     \end{table}     \end{document}


title: How to make some visible effect on the output file of a document "invisible" or non-effective while fulfilling its "invisible" function?

text: Are there any commands/packages/environments that can make some code that has a visible effect in the output file as if it were not written but fulfilling its internal function? For example,               \documentclass{memoir}          \newcounter{sol}     \addtocounter{\thesol}{-1}     \newenvironment{sol}[2]%     {\refstepcounter{sol}\index{\textbf{#2}}%     \addcontentsline{toc}{section}{\protect #1}%     \centering\textsc{\Large\textbf{#1}}\\%     \noindent By: \textbf{#2}\\%         \begin{raggedright}\ignorespaces}%     {\end{raggedright}\ignorespacesafterend}          \begin{document}     This document shows \ref{sol:num} sols.     .     \begin{sol}{}{}     \label{sol:num}     \end{sol}     .     \end{document}      In the code above, the last `sol` environment serves to count all the existing `sol` environments in the document other than itself (shown by adding -1 to the counter) by labeling and referring. However, the `sol` environment provides visible effect in the output file like printing the characters `By:` and providing ToC and Index entries as we can see in its definition.


title: Changing font color in a table adding unwanted extra spacing

text: I haven't been able to find a solution, so I'm hoping for any suggestions. When I try to change the font color in my table, I get extra spacing above and below the lines with the color-changed font. Any way to work around this?               \begin{tabular}{>{\raggedright}p{0.5cm}>{\raggedright\arraybackslash}p{9cm}}     \ding{47}                & Test 1 \\     {\color{new}{\ding{47}}} & {\color{new}{Test 2}} \\     {\color{new}{\ding{47}}} & {\color{new}{Test 3}}\\     {\color{new}{\ding{47}}} & {\color{new}{Test 4}} \\     \ding{47}                & Test 5\\     \end{tabular}\\      An image of what's happening: ![enter image description here](http://i.stack.imgur.com/g7c7Q.png)


title: One axis in pgfplots

text: I try to make one axis exercices for students, thus I try to customize pgflots but I don't understand what append in this examples :               \documentclass{article}         \usepackage{tikz,pgfplots}     \pgfplotsset{%         compat=newest, %footnotesize         tick label style={font=\footnotesize},         label style={font=\small},         legend style={font=\small},         axis x line = center,         axis y line = center,         every axis/.style={pin distance=1ex}         %xlabel near ticks     %            }   %%%% fin pgfplotsset               \begin{document}          \begin{tikzpicture}     \begin{axis}[%     axis x line=center,     axis y line=none,     xmin=-3,xmax=3,     ]     \end{axis}     \end{tikzpicture}          \begin{tikzpicture}     \begin{axis}[%     axis x line=center,     axis y line=none,ymin=0,ymax=1,     xmin=-3,xmax=3,     ]     \end{axis}     \end{tikzpicture}          \begin{tikzpicture}     \begin{axis}[%     axis x line=center,     axis y line=none,     xmin=-3,xmax=3,     xticklabels={8,3,,5,,7},     ]     \end{axis}     \end{tikzpicture}               \begin{tikzpicture}     \begin{axis}[%     axis x line=center,     axis y line=none,     xmin=-3,xmax=3,     xticklabels={8,3,,5,,7},     extra x ticks={.75},     ]     \end{axis}     \end{tikzpicture}          \end{document}      In the first : xmin, xmax doesn't work ? In the second : with it works in the second ? In the third : where is the first 8 ? In the forth : where is extra tick ? Once the initial 8 from xlabels appears on the place of extra label ! I use texlive with both last versions of pgf-tikz and pgfplots.![enter image description here](http://i.stack.imgur.com/I7ns2.png)