title: Specify location from which a line starts in pstricks

text: I have a problem with the following code. The lines from h6 and h7 are supposed to start right below h6 and h7 and not at the left of h6 and h7. This worked with tree-dvips but `pstricks` seems to decide differently about the position where the line starts. Is it possible to force `pstricks` to take bottom instead of bottom left?               \documentclass{minimal}     \usepackage{pstricks,pst-node}               \psset{nodesep=5pt} %,linewidth=0.8pt,arrowscale=2}     \psset{linewidth=0.5pt}     \begin{document}          \begin{tabular}{@{}ccc@{}}                                    & \rnode{h0}{h0}                & \\[8ex]     \rnode{h1}{h1:every(x, \rnode{h1h3}{h2}, \rnode{h1h2}{h3})}      &                              & \rnode{h5}{h5:some(y, \rnode{h5h7}{h6}, \rnode{h5h6}{h7})}\\[8ex]     \rnode{h3}{h2:dog(x)}           & ~~~~~\rnode{h7}{h6:cat(y)}         & \\[6ex]                                    & \rnode{h4}{h4:chase(e, x, y)}\\     \end{tabular}     {\psset{linestyle=dashed}%     \ncline{h0}{h5}%     \ncline{h0}{h1}%     \ncline{h5h6}{h4}%     \ncline{h1h2}{h4}%     }%     \ncline{h1h3}{h3}%     \ncline[angleA=-90]{h5h7}{h7}%               \end{document}


title: Algorithm pointers and references

text: I'm looking for a clean way/best-practice of writing an `algorithmic` block that uses pointers and references. I've had success with `algorithmic` in the past, but this is the first time I've tried writing up something with pointers. The snippet code in C/C++ looks like:               Node *n = &root;     n->value = input;      The LaTeX approach I attempted doesn't look quite right:               \STATE $n \leftarrow \& \mathrm{root}$     \STATE $n \rightarrow \mathrm{value} \leftarrow \mathrm{input}$      Which renders as: ![latex pointers and references](http://i.stack.imgur.com/LSNcS.png) I think it looks a little odd with both with the `&`, and the left and right arrows making it look like two things are pointing to mathrm. It seems a bit like the problem is a conflict with the `\leftarrow` being used for assignment, but `\leftarrow` appears to be common practice, so I'd like to follow it. Of course I can also rewrite the algorithm to NOT use pointers, but it inflates the code block almost 2x and I'm working against a page limit. :) The end goal here of course is readability.


title: Difference between flushright and raggedleft

text: What is the difference between `flushright` and `raggedleft`?


title: Using fixed space aroung headings to get text in sync with baseline grid

text: In order to make my text stay in sync with the baseline grid, I've set the vertical spacing before and after `\section` headings to integer multiples of `\baselineskip` (using the `titlesec` package). A `\section` heading, in this example, is preceded by exactly two, and followed by exactly one blank line (as suggested by Robert Bringhurst). TeX's vertical stretching and shrinking might have its advantages, but those are less relevant to this particular project, which consists of no vertical material but plain text and headings, and which requires proper grid-typesetting. Oh, and there's only one font size throughout the entire book. Now, `\subsection` headings I'd like to be preceded by `1.5\baselineskip,` and followed by `0.5\baselineskip`. Consider the MWE below. Everything's fine as long as the start of a new `\subsection` doesn't coincide with a new page -- in which case the `1.5\baselineskip` gets gobbled, causing the remaining text to fall out of sync with the grid. Of course, that's what you'd expect, but I'm wondering if there's a way to change it; to make 0.5 of these `1.5\baselineskip` indigestible, in order to have the heading fall between two lines, but have the first line of the text be in sync again. All I've come up with so far is a workaround, or rather a somewhat dirty hack, which inserts a thick white rule before the heading. Besides being somewhat dirty, though, it has the drawback of (1) relying on a number determined by trial & error (`0.6\baselineskip`), which might be wrong when other factors change and (2) not working properly when a subsection does _not_ start at the top of a new page (it un-syncs the text on page 3). Any other ideas are appreciated, thanks in advance! They don't have to rely on titlesec by the way, which is something I've been living without so far.               \documentclass[paper=a5,pagesize]{scrartcl}     \usepackage{blindtext,xcolor,tikz,eso-pic,titlesec}          \setkomafont{section}{\normalsize}          % baseline grid     \AddToShipoutPicture{%     \AtTextLowerLeft{         \begin{tikzpicture}[overlay,remember picture]%             \draw[red!10!white,thin]%                  (current page.south west) grid[step=\baselineskip]%                  (current page.north east);%         \end{tikzpicture}%         }%     }          % spacing for headings     \titlespacing*{\section}{0em}{2\baselineskip}{\baselineskip}     \titlespacing*{\subsection}{0em}{1.5\baselineskip}{0.5\baselineskip}     \titlespacing*{\subsubsection}{0em}{\baselineskip}{0em}          %% workaround     %\titlespacing*{\subsection}{0em}{1\baselineskip}{0.5\baselineskip}     %\titleformat{\subsection}{\sectfont{\color{white}\titlerule[0.6\baselineskip]}}{\thesubsection}{1ex}{}               \begin{document}     \section{Lorem Ipsum}     \Blindtext     \subsection{Lorem Ipsum}     \Blindtext\newpage     \subsection{Lorem Ipsum}     \Blindtext     \subsubsection{Lorem Ipsum}     \Blindtext     \end{document}      # edit/update What follows is an second improvement of the workaround (but a workaround it remains nevertheless), now in a complete MWE:               \documentclass[paper=a5,pagesize]{scrartcl}     \usepackage{xcolor,tikz,eso-pic,titlesec,blindtext}     \setkomafont{section}{\normalfont}     \setkomafont{subsection}{\normalfont}     \setkomafont{subsubsection}{\normalfont}          % baseline grid     \AddToShipoutPicture{%     \AtTextLowerLeft{     \begin{tikzpicture}[overlay,remember picture]%     \draw[red!10!white,thin]%      (current page.south west) grid[step=\baselineskip]%      (current page.north east);%      \end{tikzpicture}%      }%     }          % spacing for headings     \titlespacing*{\section}{0em}{2\baselineskip}{\baselineskip}     \titlespacing*{\subsection}{0em}{1\baselineskip}{0.5\baselineskip}     \titlespacing*{\subsubsection}{0em}{\baselineskip}{0em}          %% workaround     \titleformat{\subsection}{\vspace{0.85\baselineskip}\vspace*{-0.35\baselineskip}}{\thesubsection}{1ex}{}          \begin{document}     \section{Lorem Ipsum}     \Blindtext     \subsection{Lorem Ipsum}     \Blindtext\newpage     \subsection{Lorem Ipsum}     \Blindtext     \subsubsection{Lorem Ipsum}     \Blindtext     \end{document}      ![heading lowered by ca. 0.5\\baselineskip](http://i.stack.imgur.com/YUfzU.png) ## update, Feb 21 (in reply to Hendrik's answer) sorry, I was a bit too sloppy in testing your solution, Hendrik. The `\topskip` trick does work fine if the page break that comes before the new subsection is a manual one (as in the example), but if the page breaks automatically (as it does in real life when the page preceding the heading is full), the heading is on the first baseline rather than offset by `0.5\baselineskip` -- the space gets eaten as usual. See here:               \begin{document}     \section{Lorem Ipsum}     \Blindtext     \subsection{Lorem Ipsum}     \Blindtext\newpage     \subsection{Lorem Ipsum}     \Blindtext     \subsection{Lorem Ipsum}     \blindtext\blindtext\blindtext\blindtext     \subsection{Lorem Ipsum} % <---------------- !     \blindtext     \end{document}      I'm not saying the `\topskip` approach is a bad idea; I currently just don't have a idea how to improve it.


title: Reduce whitespace or margin before listofalgorithms command

text: I'm at my wits end on this one. I have a list of algorithms page that I want formatted the same way as my ToC and ToF. What I have currently is pretty close _except_ that the List of Algorithms title (and subsequent content) is too low on the page. I tried doing               \addtocontents{loa}{\vspace*{-64.0truept}}      But all that does is move the list higher without moving the title. My MWE:               \documentclass[12pt,letterpaper]{report}     \usepackage{geometry}     \usepackage{fancyhdr}     \usepackage{afterpage}     \usepackage{graphicx}     \usepackage{amsmath,amssymb,amsbsy}     \usepackage{dcolumn,array}     \usepackage{tocloft}     \usepackage{caption}     \usepackage{listings}     \usepackage{algorithm}     \usepackage{algorithmic}     \usepackage{color}          \begin{document}     \pagenumbering{roman}     \title{Title}     \author{Me}          \tableofcontents     % This puts the word "Page" right justified above everything else.     \addtocontents{toc}{~\hfill Page\par}     % Asking LaTeX for a new page here guarantees that the LOF is on a separate page     % after the TOC ends.     \newpage     % Making the LOT and LOF "parts" rather than chapters gets them indented at     % level -1 according to the chart: top of page 4 of the document at     % ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/tocloft/tocloft.pdf          \makeatletter     \begingroup       \let\newcounter\@gobble       \let\setcounter\@gobbletwo       \globaldefs\@ne       \let\c@loadepth\@ne       \newlistof{algorithms}{loa}{\listalgorithmname}     \endgroup     \let\l@algorithm\l@algorithms     \makeatother          \addcontentsline{toc}{part}{LIST OF TABLES}     \renewcommand{\cftlabel}{Table}     \listoftables     \addtocontents{lot}{Table~\hfill Page \par}     \newpage     \addcontentsline{toc}{part}{LIST OF FIGURES}     \listoffigures     \addtocontents{lof}{Figure~\hfill Page \par}     \newpage     \addcontentsline{toc}{part}{LIST OF ALGORITHMS}     \listofalgorithms     \addtocontents{loa}{\vspace*{-64.0truept}}     \addtocontents{loa}{Algorithm~\hfill Page \par}     \newpage          \doublespace     \pagenumbering{arabic}     \include{chapter1}     %-----------------------back matter     {\singlespace     % Making the references a "part" rather than a chapter gets it indented at     % level -1 according to the chart: top of page 4 of the document at     % ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/tocloft/tocloft.pdf          \begin{algorithm}     \caption{Algorithm}     \label{alg:alg1}     \begin{singlespace}     \begin{algorithmic}[1]         \FOR{$j = 0$ \TO $j < limit$}             \STATE $j \gets j + 1$          \ENDFOR     \end{algorithmic}     \end{singlespace}     \end{algorithm}          \end{document}      How do I manipulate the **LIST OF ALGORITHMS** title/heading such that it moves higher on the page? Note that if I can change the margins on this page without affecting the others that would work too.


title: Using item counter in conditional in definition of item label (xetex)

text: I'm making an `enumerate` list, and I'd like to get the label to depend on the value of the counter, specifically by adding a space before the beginning if I'm above 9. That's because my label would be `[label={\upshape N˚ \arabic"}]`, and keeping it like that would mean that from 10 on the label is moved to the left and goes beyond the left-hand margin of my page. I would use `\ifnum<sth>>9\,\,\else \fi`, only I don't know what to put in `<sth>` to have the numbered list's number as the test expression. I guess an `enumerate` defines a counter for items. How do I use its value?


title: pdflatex and pstool: how to keep the generated images in subdirectories?

text: I am trying to set up my system to write a large document using `pdflatex` and the package `pstool`. While there is no problem with basic operation, I have a problem when I try to use it in a more structured way. I have the document organized in a directory like that:               mainfile.tex     chap1.tex     chap2.tex      chap1figures/...     chap2figures/...      the file `chap1.tex` is input-ed by `mainfile`, and in it the first command reads like `\graphicspath{{chap1figures/}}`. I load all the `psfrag` substitutions in the preamble. To make `pstool` work I have to add the same `\graphicspath{{chap1figures/}}` in the preamble file for it, which is not a big problem. The problem is that the figure created by `pstool` ends in the main directory, and not in the correct sub-folder, creating clutter and possible problems for conflicting names. Do you know if it's possible to tell `pstool` to just `cd` down the appropriate sub-folder and do all the work there?


title: Aquamacs with AUCTeX, Flyspell and completion

text: When I'm editing a file in `LaTeX-mode` (I guess it means AUCTeX), and the `flyspell` is enabled, then `M-TAB` is not responding. I cannot get completion of standard LaTeX commands - for example it won't complete `\newc` to `\newcommand`. I couldn't find information about this around... I'm using Aquamacs with 23.3.1 Emacs on Mac OS X.


title: biblatex citation format

text: I have started using LaTeX with biblatex to format my dissertation. I need my citation to look something like: (johnson, 2010:29), which is (author, year:page). Then there are some citations that I have to make look like (Xenophon, _Hellenica_ 7.6.2), which is (author, _italicized book_ , section). Is it possible to modify `\autocite` to work like this? If so... where do I start? Which file do I have to modify?


title: mathabx and mathtools: \widetilde{} and \dot{} problem

text: The problem is the odd placement of g in the second line in the `align` environment. Strangely, the `\dot{}`-character is only misplaced if it is followed by another character. I need the `mathabx` package for some symbols and would therefore prefer an alternative to this question. Without mathabx everything works as expected.               \documentclass[10pt,a4paper]{article}     \usepackage[ngerman]{babel}     \usepackage{mathtools}     \usepackage{mathabx}      \begin{document}     \begin{align*}     \widetilde{g\dot{g}}\\     \widetilde{\dot{g}g}     \end{align*}     \end{document}


title: How can I achieve proper vertical spacing for long blocks of text within a \multirow?

text: I'm trying to work with a table of the form:               \begin{tabular}[]{l D{.}{.}{-1}}       \multirow{2}{1in}{Here is a ton of text that is not going       to fit in one single line in this 1 inch column.}         & 20.132  \\       \vspace{5em}                                              & (9.218) \\                                                                 &         \\       Next thing                                                & 1.311   \\                                                                 & (0.182)     \end{tabular}      I'm using multirow here to achieve the goal of having the numbers aligned with the top of the long label, with no lines separating the two numeric cells. Essentially it should look like this:               Here is a ton of           20.132     text that is not           (9.218)     going to fit in one     single line in this     1 inch column.          Next thing                  1.311                                (0.182)      The code above works, but notice how I've had to include `\vspace{5em}`. Without this, the ton of text overflows its allotted vbox onto the next thing. The problem is that visually inspecting the output and adding ems isn't ideal, especially as I need to automatically generate many tables that need this kind of wrapping/alignment. I'm using dcolumn, so I'm not sure I can change much with the numeric column. So, finally, I'm looking for suggestions on how to properly provide space for the block of text inside `\multirow`, without manually inventing some vspace. Thanks for any info you can provide.


title: Multi horizontal alignment in mathmode

text: I would like to realize an alignment like the following:               formulaformula1     formulaformulaformula2                formula3                formula4      So I would like `formulaformula1` and `formulaformulaformula2` to be left aligned, while `formula3` and `formula4` should be left aligned with a specific position in `formulaformulaformula2`. Also I want to frame it with `\fbox` and put the box in the center.


title: LaTeX letter document causes new column instead of new page

text: I am generating a tex file that has a variable length table for each quarter of the year. I would like to keep the tables centered under one another unless there is not enough room for the table, in which case I would like to start another page. I am using the letter doc style but when I get a table that won't fit on the page is places it on the right had side of the columns on the same page. I would like to get it on a new page instead. I have tried using minipage but without success.


title: Problem with sectionning with my example

text: I want to number my `example` environments like [section]. However, `example` environments are numbered with chapter, not section. What should I do? This is my MWE:               \newcounter{example}     \makeatletter     \newenvironment{example}[1][\mynameforexample]{\par     \stepcounter{example}%       \pushQED{\hfill$\triangle$}%       \normalfont \topsep6\p@\@plus6\p@\relax       \trivlist       \item[\hskip\labelsep        \textbf{#1 \theexample\@addpunct{.}}]\ignorespaces     }{\popQED\endtrivlist\@endpefalse}     \makeatother


title: Bibdesk import article information

text: I am working on my thesis and this includes a number of articles downloaded from various academic resources. When doing this hardly any citation information is coming along with the papers and i have manually update the information for my bibliography to be upto date. Are there any suggestions on how to improve and have bibdesk 'fetch' this information for me?


title: Change text color of ToC entries in LyX

text: I've inserted a table of contents with LyX using Insert->List/TOC->Table of Contents and it is good, but the text color text is red and I want it black. I'm using book(KOMA-script) as document class. Thanks! Ok, here's a .lyx testing code               #LyX 2.0 created this file. For more info see http://www.lyx.org/     \lyxformat 413     \begin_document     \begin_header     \textclass scrbook     \begin_preamble     \usepackage{mathpazo}          \usepackage{graphicx}     \usepackage{color,xcolor}     \usepackage{tikz, pgf, pgfplots}     \usetikzlibrary{arrows,backgrounds,plotmarks}     \pgfplotsset{width=7cm,compat=1.8}     \pgfplotsset{plot coordinates/math parser=false}          \newlength\figureheight       \newlength\figurewidth            \usepackage{icomma}      \usepackage{fancyhdr} %activamos el paquete     \usepackage{endnotes}      \usepackage{fancyvrb}     \date {}     \let\footnote=\endnote     \def\footnotetext{\endnotetext[\number\numexpr\value{endnote}+1]}     \let\footnotemark\endnotemark      \pagestyle{fancy} %seleccionamos un estilo      \lhead{ECUACIONES} %texto izquierda de la cabecera      \rhead{\thepage }     \chead{TEORÍA Y EJERCICIOS} %texto centro de la cabecera      \rfoot{RESOLUCIÓN ECUACIONES} %texto izquierda del pie     \rhead{\thepage } %número de página a la derecha     \renewcommand{\footrulewidth}{0.5pt}      \renewcommand{\headrulewidth}{0.5pt}          % Referencias - Enlaces     \usepackage[hyphens]{url}     \usepackage[breaklinks,colorlinks=true,linkcolor=red,     citecolor=red, urlcolor=blue]{hyperref}          \usepackage{caption}     \captionsetup{font=small,format=plain,parskip=1pt,justification=centering}     \captionsetup[figure]{font=small,format=plain,parskip=1pt,justification=centering}     \renewcommand{\thefigure}{\arabic {figure}}          \usepackage[total={15cm,21cm},left=2cm,top=2cm]{geometry}     \parindent=0mm     \renewcommand{\baselinestretch }{1.2}          \usepackage[superscript]{cite} %las citas          \renewcommand\citeform[1]{\textcolor{blue}{#1}}  % Ponemos las citas en azul          \let\footnote=\endnote     \def\footnotetext{\endnotetext[\number\numexpr\value{endnote}+1]}     \let\footnotemark\endnotemark           \renewcommand{\bibname}{Bibliografía}     \end_preamble     \use_default_options true     \begin_modules     theorems-ams     eqs-within-sections     figs-within-sections     fixltx2e     foottoend     customHeadersFooters     endnotes     hanging     initials     tabs-within-sections     \end_modules     \maintain_unincluded_children false     \language spanish     \language_package default     \inputencoding auto     \fontencoding global     \font_roman default     \font_sans default     \font_typewriter default     \font_default_family default     \use_non_tex_fonts false     \font_sc false     \font_osf false     \font_sf_scale 100     \font_tt_scale 100          \graphics default     \default_output_format default     \output_sync 0     \bibtex_command default     \index_command default     \paperfontsize default     \spacing onehalf     \use_hyperref false     \papersize a4paper     \use_geometry false     \use_amsmath 1     \use_esint 1     \use_mhchem 1     \use_mathdots 1     \cite_engine basic     \use_bibtopic false     \use_indices false     \paperorientation portrait     \suppress_date false     \use_refstyle 0     \index Index     \shortcut idx     \color #008000     \end_index     \leftmargin 3cm     \topmargin 2cm     \rightmargin 3cm     \bottommargin 2cm     \headheight 3cm     \headsep 3cm     \footskip 3cm     \secnumdepth 3     \tocdepth 3     \paragraph_separation indent     \paragraph_indentation default     \quotes_language english     \papercolumns 1     \papersides 1     \paperpagestyle default     \tracking_changes false     \output_changes false     \html_math_output 0     \html_css_as_file 0     \html_be_strict false     \end_header          \begin_body          \begin_layout Title     Testing     \end_layout          \begin_layout Subtitle     Testing 2     \end_layout          \begin_layout Author     Joy Division     \end_layout          \begin_layout Standard     \begin_inset CommandInset toc     LatexCommand tableofcontents          \end_inset               \end_layout          \begin_layout Chapter     Chapter 1     \end_layout          \begin_layout Section     Section 1     \end_layout          \begin_layout Standard     A testing section     \end_layout          \begin_layout Subsection     Subsection 1     \end_layout          \begin_layout Standard     A testing subsection     \end_layout          \begin_layout Chapter     Chapter 2     \end_layout          \begin_layout Section     Section 2     \end_layout          \begin_layout Standard     Another testing section     \end_layout          \begin_layout Subsection     Subsection 2     \end_layout          \begin_layout Standard     Another subsection     \end_layout          \end_body     \end_document


title: apacite and local language translations

text: Is there an easy way to change a few things regarding `apacite` package? I'm particularly looking at the url reference. When compiled `apacite` says "Retrieved from" but I'd like it to be "Sótt þann" and also when referring to a book or an article it always says "&" between authors but I'd like it to be "og". Basically small things like that are in my way of using LaTeX for writing with citation in APA style. Would really like your help regarding this matter.


title: How to draw a corner at the end of text

text: I would like to draw my logo with latex. The logo is very simple. It is a text, followed by a corner, which started at the bottom line. ![Example logo](http://i.stack.imgur.com/GBRi5.png) The size of the corner should change according to the font size of the text. With best Torsten


title: Alternative for twoside

text: I'm using the report class and would like an alternative to the option "twoside". I want chapters and top level TOC-elements to start on right hand pages, but I don't want any of the other, layout molesting, stuff that comes with twoside.               \documentclass[a4paper,12pt, leqno]{report}     \begin{document}     \end{document}


title: algorithm2e noend option produces wrong label

text: I have a problem with the `algorithm2e` package. I want to reference the end of a block, e.g., a for-loop, in my text. Therefore, I place a label behind the closing bracket of the for statement. When I configure the package to produce an "end" line, the label correctly points to this line. But if I use the option "noend", the label points to the for statement instead of the last line of the for-loop. Here is an example:               \documentclass[]{scrartcl}     \usepackage[algo2e, noline]{algorithm2e}     \begin{document}     \begin{algorithm2e}           \For {...} { a = b\; }\label{x}       \end{algorithm2e}     Reference: \ref{x}     \end{document}      The output would look somehow like this: > 1 for ... do > > 2 a = b > > 3 end > > Reference: 3 When I reference label x in my text, I get a correct reference to line 3. With the noend option for package `algorithm2e`, I get the following output: > 1 for ... do > > 2 a = b > > Reference: 1 Label x now creates a reference to line 1 instead of line 2. I guess it depends on how latex handles labels. I can fix it by putting the label behind the last line of my for-loop. But then the label would point to line 2 instead of 3 when I want to show "end" lines again. Is there a possibility that always generates the correct reference independent of the option that I am using?


title: XeTeX/mathspec, more than one math digits font

text: When using the mathspec package, is it possible to have more than one math digits font in different places in the same document. Mostly, I want the font for my math digits to be the same as my main text font, but at some places I use Eastern Arabic numerals within the math environment, so I want to be able to switch to a font that has these unicode characters. (Yes, I could choose a font that has these defined as my main text font, but that is not the optimal solution at the moment.) Here is a minimal example, which helps explain what I am trying to do.               \documentclass[a4paper,12pt]{article}     \usepackage[MnSymbol]{mathspec}          \setmainfont[Mapping=tex-text]{Junicode}          \setmathsfont(Digits){Junicode} % XITS Math     \setmathsfont(Symbols){XITS Math}     \setmathsfont(Latin){Junicode}     \setmathrm{Junicode}          \def\offsetdigits#1{%     \xoffset{#1}0%     \xoffset{#1}1%     \xoffset{#1}2%     \xoffset{#1}3%     \xoffset{#1}4%     \xoffset{#1}5%     \xoffset{#1}6%     \xoffset{#1}7%     \xoffset{#1}8%     \xoffset{#1}9}     \def\xoffset#1#2{%     \XeTeXmathcodenum`#2=\numexpr\XeTeXmathcodenum`#2-`0+#1\relax}               \begin{document}          I want the digits in my math environment to be the same as those in my text,      for example, 44{\textdegree} and $\frac{\pi}{\sin 44 \text{\textdegree}}$.          But at other points in the document, I want to be able to switch to a different      font so that I can have some Eastern Arabic digits in the math environment; for      example {\offsetdigits{"0660}$\frac{2}{5}$}. The numbers in this fraction will      only appear if we switch Junicode with XITS Math in the \verb|\setmathsfont(Digits)     {Junicode}| line in the preamble.           \end{document}


title: Why keywordstyle is not taken into consideration no bold, no red color?

text: When I have this code with `.sty` file from here               \begin{lstlisting}[language=Go, firstnumber=1, captionpos=b, caption=Golang, label=amb]     // You can edit this code!     // Click here and start typing.     package main          import "fmt"          func main() {       fmt.Println("Hello, World.")     }     \end{lstlisting}      it looks like this: ![Not styled](http://i.stack.imgur.com/hz3IX.png) And when I add this styles:               \lstdefinelanguage{Go}{     basicstyle=\normalfont\ttfamily,     keywordstyle=\color{red}\bfseries,     numbers=left,     numberstyle=\scriptsize,     stepnumber=1,     numbersep=8pt,     showstringspaces=false,     breaklines=true,     frame=lines,     backgroundcolor=\color{background},     literate=     *{0}{{{\color{numb}0}}}{1}     {1}{{{\color{numb}1}}}{1}     {2}{{{\color{numb}2}}}{1}     {3}{{{\color{numb}3}}}{1}     {4}{{{\color{numb}4}}}{1}     {5}{{{\color{numb}5}}}{1}     {6}{{{\color{numb}6}}}{1}     {7}{{{\color{numb}7}}}{1}     {8}{{{\color{numb}8}}}{1}     {9}{{{\color{numb}9}}}{1}     {:}{{{\color{punct}{:}}}}{1}     {,}{{{\color{punct}{,}}}}{1}     {\{}{{{\color{delim}{\{}}}}{1}     {\}}{{{\color{delim}{\}}}}}{1}     {[}{{{\color{delim}{[}}}}{1}     {]}{{{\color{delim}{]}}}}{1},     }      It looks like this: ![Styled](http://i.stack.imgur.com/rdLAB.png) Why `keywordstyle` is not taken into consideration no bold, no red color?


title: Clubsuit gives Missing $ inserted \end{equation} error

text: I am trying to tag an equation with a card suit. My equation works fine with other labels but the suits do not work.               \begin{equation}     y^2 + 2 = x^3, x, y \in \mathbb{Z}. \tag{\kreuz}     \end{equation}      This works, but,               \begin{equation}     \lvert x^2 - 2y^2 \rvert = 1 \tag{\clubsuit}     \end{equation}      Gives error: `Missing $ inserted \end{equation}` Any ideas?


title: biblatex-juradiss and german juristic commentaries

text: I'm writing my master’s thesis and I'm having troubles formatting citations the way I need to. I've tried to modify the solution given in this thread but without success. I'm using `biblatex` with `biblatex-juradiss` in KOMA's class `scrbook`. I need to cite as follow: > Palandt/ _Thorn_ , Anh. Art. 10 EGBGB Rn 1   * Palandt (shorthand)   * _Thorn_ (prenote)   * Anh. Art. 10 EGBGB (title)   * Rn 1 (postnote) MWE:               \documentclass{scrbook}          \usepackage{filecontents}          \begin{filecontents}{kommentare.bib}          @COMMENTARY{palandt, gender = {pm}, editor = {Palandt, Otto}, editortype = {founder}, maintitle = {Beck'sche Kurz Kommentar: B{\"u}rgerliches Gesetzbuch}, title = {Anh. zu Art. 10}, shorthand = {Palandt}, volume = {7}, publisher = {C.H. Beck}, edition = {71}, location = {M{\"u}nchen}, Year = {2012}, keywords = {Kommentar}}          \end{filecontents}          \usepackage[backend=biber,sortcites=true,style=biblatex-juradiss,sorting=nyt,safeinputenc]{biblatex}          \bibliography{kommentare}          \renewbibmacro{prenote}{%       \ifentrytype{commentary}         {\renewcommand*{\postnotedelim}{\addspace}%          \renewbibmacro*{cite:title}{%            \printfield{labeltitle}%            \setunit*{\textendash}%            \printfield[emph]{prenote}%            \setunit{\addspace}%            \printfield{edition}}}         {\iffieldundef{prenote}            {}            {\printfield{prenote}%             \setunit{\prenotedelim}}}}     \begin{document}     \cite[Thorn][Rn 1]{palandt}          \printbibliography          \end{document}      Like I've said I've tried to edit the solution given in another thread but I can't get it to work.


title: How to add mdframed in toc?

text: This refers to my previous question. How to put image in table of contents? How can i add mdframed after toc on the same page? ![enter image description here](http://i.stack.imgur.com/0izw7.png) Regards


title: How to avoid a continuous fraction line going through the equals sign in MathJaX?

text: When I use Math.SE, and I type a equation such as: ![](http://i.stack.imgur.com/pjJm2.jpg) I get this continuous line. Is there a way to avoid this?


title: How to enable two-column view with cventry in ModernCV?

text: I currently have a list of cventrys structured like this:               \cventry{}{Example 1}{}{}{}{}{     \begin{itemize}     \item Sample 1     \item Sample 2     \end{itemize}}          \cventry{}{Example 2}{}{}{}{}{     \begin{itemize}     \item Sample 3     \item Sample 4     \end{itemize}}      How would I enable two columns so I could have Example 1 on the left side and Example 2 on the right side? This is my current header:               \documentclass[12pt,letterpaper,sans]{moderncv}            % moderncv themes     \moderncvstyle{classic}                             % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'     \moderncvcolor{red}                               % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'          \usepackage[scale=0.85]{geometry}     %\setlength{\hintscolumnwidth}{3cm}                % if you want to change the width of the column with the dates     %\setlength{\makecvtitlenamewidth}{10cm}           % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...     \usepackage{multicol}          \begin{document}     \makecvtitle     \vspace*{-11mm}      What it looks like now. If i added the margin that was provided the entire margin on the left gets removed. ![Error](http://i.stack.imgur.com/SJ0W1.png)


title: How to add a page to the contents list without it being a section?

text: I want to add a section to my contents pages so that it includes the cover sheet on the contents page (personally I don't like it but it has to be done). It is easy if I have               \section{Cover Sheet}      at the start of my cover sheet but I don't want that on the cover sheet? I assume it will be something to do with the               \addtocontents{toc}      command, though I am not sure how. Any help?               \documentclass[a4paper,fleqn]{article}     \begin{document}     %%%%INSERT COVER PAGE DETAILS%%%%%     \newpage     \section{Abstract}     %%%%INSERT ABSTRACT%%%%%     \newpage     \tableofcontents     \newpage     \section{Project}     \end{document}      As an additional, if any given answer could include the way to include the contents page on the table of contents, that would save me the trouble of researching that (I've just realised it would be helpful when typing out my question). Thanks.


title: How to draw a conical spiral / redraw diagram?

text: I'm trying to redraw the diagram diagram below. I'm using it as an exemplar/reference in a document I am writing but I need it to be clearer hence the redraw. ![Diagram/Spiral](http://i.stack.imgur.com/Rkhne.png) I tried and failed to draw it in Inkscape. After thinking about it for a while though, I thought actually it could be done (and perhaps better) mathematically using something like Tikz. I've looked through the questions here and I can find similar but not what I need. So far, my code is a just a pathetic cloud and an oval and missing the crucial 2D spiral cone:               \documentclass[]{minimal}          \usepackage{amsmath,amsfonts,amssymb}     \usepackage{tikz}     \usetikzlibrary{shapes}     \usetikzlibrary{automata,positioning}          \begin{document}     \begin{tikzpicture}     \node [cloud, draw,cloud puffs=10,cloud puff arc=120, aspect=2, inner ysep=1em,text width=1cm]{Needs\\and\\Ideas};     \draw  (0,-10) ellipse (4 and 2);     \end{tikzpicture}     \end{document}


title: How to change the way theorems are numbered

text: I am trying to write a small note in which there are no sections, and the theorems go from 1,2,3. In the following code, for example:               \documentclass[12pt]{article}     \newtheorem{theorem}{Theorem}[section]     \newtheorem{definition}[theorem]{Definition}     \newtheorem{remark}[theorem]{Remark}     \title{Some Notes}     \begin{document}     \date{}     \maketitle     \begin{definition}      A group is defined as ...     \end{definition}      \begin{remark}      The concept of groups...      \end{remark}     \end{document}      I get Definition 0.1. However I want only Definition 1 to be printed instead. Furthermore I want Remark 1, instead of Remark 0.2. How can I accomplish this?


title: Rectangular spy in pgfplots without scaling

text: I'm trying to copy the behaviour of this question: Using tikzlibrary spy without magnifying line width and/or mark size. I would like to change the shape of the `spy` to `rectangle`, but I'm failing at the `scope` (which I have to admin that I don't really understand why works in the original question). Could someone help me out? The MWE:               \documentclass{memoir}     \usepackage{amsmath, tikz, pgfplots}     \usetikzlibrary{calc,spy,shapes}     \pgfplotsset{compat=newest}          \begin{document}     \begin{tikzpicture}     % [spy using outlines={rectangle,black,magnification=3,connect spies}]     \begin{axis}[%     width=6.01828521434821in,     height=4.74667979002625in,     unbounded coords=jump,     scale only axis,     xmin=1.25,     xmax=2,     xlabel={Robustness},     ymin=0,     ymax=20,     ylabel={Controller},     title={Case 11},     % legend style={draw=black,fill=white,legend cell align=left}     ]     \newcommand*\myplots[1][]{     \addplot [     color=blue,     dashed     ]     table[row sep=crcr]{     1.250000000054 0.218471486504557\\1.27500000012472 0.235880794037559\\1.30000000004985 0.253093675278193\\1.32499999988962 0.269996702493353\\1.34999999996296 0.28660169532495\\1.37500000003271 0.302803529131698\\1.4 0.318627316831094\\1.42500000000018 0.333967811176506\\1.44999999975398 0.348915976282584\\1.47499999999985 0.363393665978672\\1.50000000000007 0.377386190083728\\1.52499999999677 0.391065980885588\\1.54999999999987 0.404406696565785\\1.5749999999932 0.417357153126701\\1.60000000000001 0.429890180101467\\1.62500000007965 0.441495914781593\\1.64999999998047 0.453420186117445\\1.67500000000006 0.464885624062778\\1.70000000000013 0.475698022605379\\1.72499999999977 0.486001302461843\\1.75000000007258 0.49588760557761\\1.77500000001522 0.505406921339204\\1.79999999999992 0.514575948858101\\1.8249999999994 0.523580224222934\\1.84999999999966 0.532346980549898\\1.87499999998767 0.540884368439134\\1.90000000002483 0.549236128880721\\1.92499999997271 0.557390601810701\\1.94999999999657 0.565349329095157\\1.97499999999941 0.573100654346336\\1.99999999999993 0.580661122004988\\2.02499999998678 0.588035048696743\\2.0499999999709 0.595221272967935\\2.07499999999558 0.602215073143855\\2.09999999981776 0.609014392276178\\2.12500000001126 0.615634705868222\\2.14999999999957 0.622107376143054\\2.17499999994578 0.628535289209435\\2.19999999832383 0.63479954406909\\2.225 0.640975653060916\\2.24999999999955 0.647023272731091\\2.27499999999981 0.652900079435489\\2.29999999999833 0.658608487562972\\2.32499999999118 0.664162521737991\\2.34999999999773 0.669564611132752\\2.3750000000001 0.674786909878852\\2.40000000000024 0.679871708587361\\2.42499999998267 0.68481930558268\\2.44999999993369 0.689620895991369\\2.475 0.694300387671984\\2.50000000000226 0.698847019454327\\2.52499999999607 0.703231052229968\\2.54999999999282 0.707335949070966\\2.575 0.711299740037372\\2.59999999997469 0.715121564545835\\2.62500000002107 0.719030281788718\\2.64999999998823 0.722750679025289\\2.67499999999833 0.726355404984384\\2.6999999999989 0.729841563597055\\2.72500000000001 0.733213147420525\\2.75000000000046 0.736469697155365\\2.77500000011202 0.739681867953894\\2.8 0.742786117829059\\2.82500000000028 0.745831867778158\\2.84999999999055 0.748760245235199\\2.87499999999654 0.751587709302175\\2.90000000000011 0.754337713416536\\2.92500000001402 0.756957274828441\\2.94999999995396 0.759357524849041\\2.97499999999574 0.761687855897812\\3.00000000000154 0.764338301992918\\};     % \addlegendentry{po:pid};          \addplot [     color=green!50!black,     dashed     ]     table[row sep=crcr]{     1.250000000054 0.590067068740046\\1.27500000012472 0.587559925194454\\1.30000000004985 0.586376714983635\\1.32499999988962 0.586069496190726\\1.34999999996296 0.586583764906821\\1.37500000003271 0.587586732327579\\1.4 0.589106686232638\\1.42500000000018 0.590799582313491\\1.44999999975398 0.592894933769734\\1.47499999999985 0.595115212158793\\1.50000000000007 0.597338496940835\\1.52499999999677 0.600163078036215\\1.54999999999987 0.603553183039573\\1.5749999999932 0.607355964366702\\1.60000000000001 0.611472392727962\\1.62500000007965 0.612640770551816\\1.64999999998047 0.618542970092304\\1.67500000000006 0.625478240488116\\1.70000000000013 0.63111283078678\\1.72499999999977 0.635924446858566\\1.75000000007258 0.640430875313834\\1.77500000001522 0.644633876853955\\1.79999999999992 0.647757322657836\\1.8249999999994 0.647552686193448\\1.84999999999966 0.647363620909126\\1.87499999998767 0.647117668558105\\1.90000000002483 0.646013166144435\\1.92499999997271 0.644422071010403\\1.94999999999657 0.642591297950079\\1.97499999999941 0.640866907916906\\1.99999999999993 0.639224831229371\\2.02499999998678 0.636685323281278\\2.0499999999709 0.633964341182746\\2.07499999999558 0.631446791852552\\2.09999999981776 0.628537387562625\\2.12500000001126 0.626107411465097\\2.14999999999957 0.624103000469\\2.17499999994578 0.62449136318196\\2.19999999832383 0.624449479840847\\2.225 0.6256877319412\\2.24999999999955 0.628088304645751\\2.27499999999981 0.630472877532383\\2.29999999999833 0.63283206246448\\2.32499999999118 0.635116015919806\\2.34999999999773 0.637322260692226\\2.3750000000001 0.640065236430338\\2.40000000000024 0.642534886174564\\2.42499999998267 0.644944092104574\\2.44999999993369 0.647313968075354\\2.475 0.649603381645786\\2.50000000000226 0.651905320157395\\2.52499999999607 0.654572686699921\\2.54999999999282 0.658065576936871\\2.575 0.661530686251933\\2.59999999997469 0.664985448106105\\2.62500000002107 0.667216476217143\\2.64999999998823 0.669895462979295\\2.67499999999833 0.672557424400875\\2.6999999999989 0.675234842685167\\2.72500000000001 0.677932291475736\\2.75000000000046 0.680659050710123\\2.77500000011202 0.683201448501821\\2.8 0.685708044714863\\2.82500000000028 0.688088365642656\\2.84999999999055 0.690571448381062\\2.87499999999654 0.693076214461211\\2.90000000000011 0.695575684929241\\2.92500000001402 0.698184293706798\\2.94999999995396 0.701235761040505\\2.97499999999574 0.704202908157281\\3.00000000000154 0.705980592056065\\};     }     \newcommand*\spyfactor{3.1622776601683793319988935444327}     \newcommand*\spypoint{axis cs:1.4,0.5}     \newcommand*\spyviewer{axis cs:1.6,10}     \myplots     \node[very thin, rectangle, draw, minimum height=0.05\textwidth, minimum width=0.1\textwidth, inner sep=0pt] (spypoint) at (\spypoint) {};     \node[rectangle, draw, minimum height=0.25\textwidth, minimum width=0.5\textwidth, inner sep=0pt] (spyviewer) at (\spyviewer) {};     \draw (spypoint) edge (spyviewer);     \begin{scope}         \clip (spyviewer) rectangle (0.25\textwidth-.5\pgflinewidth,0.5\textwidth-.5\pgflinewidth);         \pgfmathparse{\spyfactor^2/(\spyfactor-1)}         \begin{scope}[scale around={\spyfactor:($(\spyviewer)!\spyfactor^2/(\spyfactor^2-1)!(\spypoint)$)}]             \myplots         \end{scope}     \end{scope}     \end{axis}     \end{tikzpicture}%     \end{document}


title: Zero error, but no PDF

text: I just installed texlive2012 on the new distribution Mageia 3, as well as the libertine font .rpm packages. I have a problem with this code :               \documentclass[10pt]{article}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{libertine}          \begin{document}     This is my first LaTeX document on Mageia 3.     \end{document}      when I compile I get zero error, but no PDF is built. And if I remove the libertine font, LaTeX has a normal behaviour. I added `\listfile` and here is the corresponding `.log`                  article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)      fontenc.sty        t1enc.def    2005/09/27 v1.99g Standard LaTeX file     inputenc.sty    2008/03/30 v1.1d Input encoding file         utf8.def    2008/04/05 v1.1m UTF-8 support for inputenc        t1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc       ot1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc       omsenc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc     libertine.sty    2011/06/06 - 5.1.2: Font libertine - (License GPL) Michael Nie     dermair       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     lettrine.sty    2007/08/08 v1.62 (Daniel Flipo)     lettrine.cfg         calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)          fxl.inc          fxb.inc          fxk.inc          fxi.inc        t1fxl.fd    2011/06/06 scaled font definitions for libertine T1/fxl (Nm).      ***********      At the end of the `.log` I also see               !pdfTeX error: pdflatex (file fxlr-xl-8x): Font fxlr-xl-8x at 600 not found      ==> Fatal error occurred, no output PDF file produced!      For kpfonts, that were installed via rpm package texlive-fontsextra, I get the same problem               !pdfTeX error: pdflatex (file jkpmn8r): Font jkpmn8r at 600 not found     ==> Fatal error occurred, no output PDF file produced!


title: Two chemfig lewis diagrams side by side with labels below

text: **MWE** :               \documentclass{report}     \usepackage{chemfig} %for chemistry diagrams          \begin{document}        \vspace{10mm}        \setatomsep{2em}        \begin{center}           \chemfig{%              CH(-[:180]CH_{3})(-[:0]CH_{3})(-[:90]CH_{3})           }        \end{center}        1-chloro-3-methylbutane        \begin{center}           \chemfig{%              CH_{3}-[:0]CH_{2}-[:0]CH(-[:90]CH_{3})(-[:0]CH_{3})           }        \end{center}        1-chloro2-methylbutane        \vspace{10mm}     \end{document}     %      **output** : ![two chemfigs with labels all on their own line](http://i.stack.imgur.com/6LRc9.png) **desired output** : ![enter image description here](http://i.stack.imgur.com/ZhWhf.png) What is the best way for me to accomplish this.


title: How to use the \L command in LaTeX

text: While Using the command `\L` in LaTeX Error Display:               latex error mathcal allowed only in math mode


title: Forward Search in Emacs for Okular not working

text: On Emacs, I am trying to get forward search with Okular. Right now, I have the following command:               okular --unique %o#src:%n`pwd`/./%b      But, this does not take me to the right line, as I'd expect. So, there is a problem here. In trying to fix this, I tried to read the manual for okular I could find. Suspiciously, none of the `%` commands appear there. The three that do appear are: (1) `%f` - file name (2) `%l` - line number of the file (3) `%c` - column number of the file I'd be glad if you explain what are the `%` commands that appear in the command I wrote and also help me find a working forward search command in this situation. ## Relevant versions, you might want to know: Emacs ------- 24.3.1 Okular ------- 0.16.2 AucTeX ------- 11.86 TeXLive ------ 2012 Please feel free to ask anything that may be relevant. P.S. In my humble opinion, this question is not a duplicate of the previous questions. I have asked a very precise question, not a working method, but a fix to what I have. `:-)` But, I do agree that this is only border line TeXnical.


title: TikZ, PGFPlots, or GNUplot: plotting a curve without the known function

text: I would like to make a plot of a function that has an overshoot of 25% and then settles with subtle oscillations at 100%. I would like to create it in one of the listed packages or in gnus case add on to PGFPlots. Unfortunately, I don't know the function I just have an image so I don't know how to start creating it. ![enter image description here](http://i.stack.imgur.com/YC9eN.jpg)


title: Word count several files in LyX

text: I want to perform a word count on my LyX document. The problem is that I include several files within my main document   * main.lyx      * include file1.lyx     * include file2.lyx        * include file21.lyx     * include file3.lyx I have not figured out how to do a proper PDF wordcount, since the results vary depending on how I export the PDF, but I know I could do a `Tools -> Statistics... -> count words` and add them up for each file, but I have something like 20 documents, hence this will be unnecessary time consuming work.


title: Challenge: images from Hart-Segerman

text: This paper by Vi Hart and Henry Segerman has some interesting hand-drawn images that cry out for a treatment with your favourite TeX-friendly package. I like the concept of throwing up one's hands and saying 'forget it; hand- drawn images it is', but it's just as cool to see such interesting figures done by code. Figure 1 c) is easy (for those in the know), figure 2 (or some minor variation on it) is do-able, but the 3D model of the cube with the appropriately perspectivised images on faces could be challenging. Figures 3 and 4 should follow from figure 2. To give a concrete question: Can figure 5 from the linked paper be generated programmatically? It seems completely systematic to me. ![Figure 5 from arxiv:1404.6596](http://i.stack.imgur.com/l84xs.jpg)


title: Strange behavior in smooth pgfplot with sudden changes in the slope

text: I'm trying to plot some points with sudden changes in the slope. But I get some strange behavior like this: ![enter image description here](http://i.stack.imgur.com/StZK8.png) as you can see in the peaks, there is no smoothness in there. However, I think the problem is the interpolation algorithm, because tikz uses bézier curves. So I'm wondering is there a way to overcome this problem? I'm putting here just a sample of the data. However, I have several plots with these discontinuities, and I would like to get an automatic way of fixing them. If you need I can show more points in which discontinuities occur.               \documentclass{standalone}          \usepackage{tikz}     \usepackage{pgfplots}          \pgfplotstableread{     0.0000  0.0000     0.1561  0.8615     0.1614  0.8643     0.1669  0.8670     0.3619  0.8670     0.3679  0.8781     0.3739  0.8809     0.3799  0.8809     0.3858  0.8837     0.3918  0.8975     1.0000  1.0000     }\datatable          \begin{document}     \makeatletter     \begin{tikzpicture}     \begin{axis}[       ylabel=label,       no markers,       smooth     ]     \addplot table [x index=0, y index=1] \datatable;          \end{axis}     \end{tikzpicture}     \end{document}


title: Beamer Error on Basic File when Upgrading now can't get any Beamer Version to work

text: I've installed Beamer 3.12 upgrading from 3.07. Now I get an error when running just this basic file below. Tried switching to other versions as well but this error always came up. What I did to update is add the beamer package from bitbucket to ~/texmf/tex/latex/beamer. Even tried putting the git in there and then I ran sudo texhash and texhash ~/texmf.:                \documentclass[ignorenonframetext,handout]{beamer}     \setbeameroption{show notes}     % \usetheme[invert]{wkbeamer}     % \hypersetup{pdfpagemode={UseNone}} % Forces not to go into fullscreen mode like default in wk     \title{A Neurobiologically Plausible Computational Model of Sound and Speech Recognition}     \date{November 24, 2011}     \begin{document}     \begin{frame}     \maketitle     \end{frame}     \end{document}      It gives me this error:               --- TeX said ---     <inserted text>                      \par      l.13 \ProvidesClassRCS                            $Header$      Then from the log file:               Runaway argument?     Header$ \ProvidesPackage {\beamer@rcsfile }[\beamer@rcsdate \space (r\ETC.     /home/bigtyme/texmf/tex/latex/beamer3.12/base/beamer.cls:13: File ended while s     canning use of \beamer@parseid.     <inserted text>                      \par      l.13 \ProvidesClassRCS                            $Header$     I suspect you have forgotten a `}', causing me     to read past where you wanted me to stop.     I'll try to recover; but if the error is serious,     you'd better type `E' or `X' now and fix your file.          Runaway argument?     Header$ \ProvidesClass {\beamer@rcsfile }[\beamer@rcsdate \space deve\ETC.     /home/bigtyme/texmf/tex/latex/beamer3.12/base/beamer.cls:15: Paragraph ended be     fore \beamer@parseid was complete.     <to be read again>                         \par      l.15           I suspect you've forgotten a `}', causing me to apply this     control sequence to too much text. How can we recover?     My plan is to forget the whole thing and hope for the best.          (/home/bigtyme/texmf/tex/latex/beamer3.12/base/beamerbasemodes.sty     Runaway argument?     Header$ \ProvidesPackage {\beamer@rcsfile }[\beamer@rcsdate \space (r\ETC.     /home/bigtyme/texmf/tex/latex/beamer3.12/base/beamerbasemodes.sty:12: Paragraph      ended before \beamer@parseid was complete.     <to be read again>                         \par      l.12           I suspect you've forgotten a `}', causing me to apply this     control sequence to too much text. How can we recover?     My plan is to forget the whole thing and hope for the best.          \beamer@tempbox=\box26     \beamer@tempcount=\count79     \c@beamerpauses=\count80     (/home/bigtyme/texmf/tex/latex/beamer3.12/base/beamerbasedecode.sty     Runaway argument?     Header$ \ProvidesPackage {\beamer@rcsfile }[\beamer@rcsdate \space (r\ETC.     /home/bigtyme/texmf/tex/latex/beamer3.12/base/beamerbasedecode.sty:12: Paragrap     h ended before \beamer@parseid was complete.     <to be read again>                         \par      l.12           I suspect you've forgotten a `}', causing me to apply this     control sequence to too much text. How can we recover?     My plan is to forget the whole thing and hope for the best.          \beamer@slideinframe=\count81     \beamer@minimum=\count82     )


title: Combine two items in an enumerated list

text: Is there an easy way to combine two items in an enumerated list? For example:               1.   First bullet     2-3. Second bullet     4.   Third bullet      My current plan involves screwing with `\labelenumi` and then manually incrementing `\enumi`, but that seems ugly


title: Where is template.sty? (Required in xfrac)

text: Having just updated to TL2011, I find that the `xfrac` package fails with the error:               ! LaTeX Error: File `template.sty' not found.      Sure enough, neither `kpsewhich` nor `find` can locate it. I _can_ find it in my TL2010 tree, so I could copy it over from there, I guess. The location there is:               tex/latex/xpackages/xbase/template.sty      But there's not even a corresponding `xpackages` directory in the TL2011 tree! My (limited) poking around in the directory structure makes it look as though the `x-stuff` has been rearranged, and several things renamed. There _is_ a suspicious looking `xtemplate.sty` file in the new TL2011 tree, but it is sufficiently different to `template.sty` that I can't be sure that they do the same thing. So ...   1. Is `xtemplate.sty` the new `template.sty` and I should just change the line in `xfrac` to require the `x`-rated version?   2. If not, should I just copy `template.sty` over from TL2010 (in to my local `texmf` tree rather than TL2011, of course) and what else should I copy?   3. Or is there a package on CTAN that covers this (I couldn't find it via a search)?   4. Is there a new super all-singing all-dancing all-reciprocating package that replaces `xfrac` that I should use instead?


title: Custom "online" entry formatting with biblatex+biber: use organisation in place of author when author is missing

text: I am using the superb biblatex package (with biber as backend) to typeset the bibliography of my thesis (compiled with pdflatex). I would like to customise the formatting of @ONLINE type entries. By default biblatex formats such entries as (simplified):               Author. Title. Organisation. URl. What I want is the following: when an entry does **not** have the author field set the formatting should treat the organisation field as the author:               Organisation. Title. Url. **Important:** in this case the organisation field should also be used as the field to sort on. If the both the author field and the organisation field are set it should apply the standard biblatex formatting (see above). When both are missing it should throw a warning. If only the author is set it should apply the default (organisation is optional anyway):               Author. Title. URl. For example, I want the following entries:               @ONLINE{Android,       title = {{A}ndroid (operating system)},       url = {http://www.android.com},       organization = {{Google, Inc.}}     }          @ONLINE{DalvikVM,       title = {{D}alvik {V}irtual {M}achine},       url = {http://code.google.com/p/dalvik},       author = {{D}an {B}ornstein et al.},       organization = {{Google, Inc.}}     }          @ONLINE{Pachube,       title = {{P}achube},       url = {http://www.pachube.com},       author = {{U}sman {H}aque}     } To be formatted as:   1. Dan Bornstein et al. _Dalvik Virtual Machine_. Google, Inc. URL: http://...   2. Google, Inc. _Android Operating System_. URL: http://...   3. Usman Haque. _Pachube_. URL: http://... **Important:** notice the sorting, the Android entry is sorted by its organisation field, the others by author (lastname). I have tried to customise the formatting myself but so far it does not work like I wanted. My effort so far:               \DeclareBibliographyDriver{online}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \iflistundef{author}         {\iflistundef{organization}           {\BibliographyWarning{No author nor organisation on Online entry}}           {\printlist{organization}}}         {\usebibmacro{author/editor+others/translator+others}}       \setunit{\labelnamepunct}\newblock       \usebibmacro{title}%       \newunit       \printlist{language}%       \newunit\newblock       \usebibmacro{byauthor}%       \newunit\newblock       \usebibmacro{byeditor+others}%       \newunit\newblock       \printfield{version}%       \newunit       \printfield{note}%       \newunit\newblock       \iflistundef{author}         {}         {\printlist{organization}}       \newunit\newblock       \usebibmacro{date}%       \newunit\newblock       \iftoggle{bbx:eprint}         {\usebibmacro{eprint}}         {}%       \newunit\newblock       \usebibmacro{url+urldate}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \usebibmacro{finentry}} The problem with this is that the orgisation field is now always used as author, even if there is an author. Also, when there is an author but no organisation only the title and url are shown. Also the organisation field is **not** used for sorting, instead the title seems to be used. So my example entries are formatted as:   1. Google, Inc. _Android Operating System_. URL: http://...   2. Google, Inc. _Dalvik Virtual Machine_. URL: http://...   3. _Pachube_. URL: http://... Can anyone help me to correct my `\DeclareBibliographyDriver` attempt so it produces the formatting and sorting I wanted?


title: Defining a command for a minted environment

text: How can I define a newcommand macro or an environment for minted? What is causing the problem that the following does not work?               \newcommand{\CppSourceCode}{     \begin{minted}[linenos=true, mathescape, xleftmargin=1cm]{c++}      #1      \end{minted}     }      output :                   ! Missing number, treated as zero.     <to be read again>                         }     l.23 ...pe, xleftmargin=1cm]{c++} #1 \end{minted}}          A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal parameter number in definition of \CppSourceCode.     <to be read again>                         1     l.23 ...pe, xleftmargin=1cm]{c++} #1 \end{minted}}          You meant to type ## instead of #, right?     Or maybe a } was forgotten somewhere earlier, and things     are all screwed up? I'm going to assume that you meant ##.          (C:\Users\ZfMGPU\Desktop\Xetextest\main\main.aux)     LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 35.     LaTeX Font Info:    ... okay on input line 35.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 35.     LaTeX Font Info:    ... okay on input line 35.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 35.     LaTeX Font Info:    ... okay on input line 35.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 35.     LaTeX Font Info:    ... okay on input line 35.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 35.     LaTeX Font Info:    ... okay on input line 35.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 35.     LaTeX Font Info:    ... okay on input line 35.     LaTeX Font Info:    Checking defaults for EU1/lmr/m/n on input line 35.     LaTeX Font Info:    ... okay on input line 35.     runsystem(pygmentize -S default -f latex > main.pyg)...executed.           (C:\Users\ZfMGPU\Desktop\Xetextest\main\main.pyg)     ! Illegal parameter number in definition of \@tempa.     <to be read again>                         1     l.37 \CppSourceCode{asdasdasd asd asd }          You meant to type ## instead of #, right?     Or maybe a } was forgotten somewhere earlier, and things     are all screwed up? I'm going to assume that you meant ##.          ! FancyVerb Error:       Extraneous input ` ##1 \end {minted}{asdasdasd asd asd }' between \begin{minted}[<key=value>] and line end     .     \FV@Error ...ncyVerb Error:^^J\space \space #1^^J}          l.37 \CppSourceCode{asdasdasd asd asd }          This input will be discarded. Hit <return> to continue.      If read that post here environment minted Iam using xelatex in miktex 2.9 but is this the only solution? Here one possibility:               Thats the minted command for having a new environment as in the package explained, probably should use this code !!          \newcommand\newminted[3][]{           \ifthenelse{\equal{#1}{}}            {\def\minted@envname{#2code}}            {\def\minted@envname{#1}}           \newenvironment{\minted@envname}            {\VerbatimEnvironment\begin{minted}[#3]{#2}}            {\end{minted}}           \newenvironment{\minted@envname *}[1]            {\VerbatimEnvironment\begin{minted}[#3,##1]{#2}}            {\end{minted}}}      Does anybody know why this works? whats the key difference? why does mine not work? Thanks a lot!!


title: Appendix Chapters typeset as Sections in ToC

text: I am very new to LaTeX and still more in a trial and error phase than on a real understanding level. My goal is to have all appendices - which are chapters and I would like to keep it that way - to appear in the TOC as sections, under a 'chapter' appendices. Here is what I tried, using the tocloft package               \newpage\phantomsection     \addcontentsline{toc}{chapter}{Appendices}     \appendix          \setlength{\cftchapindent}{\cftsecindent}     \renewcommand{\cftchapfont}{\cftsecfont}     \renewcommand{\cftchapleader}{\cftsecleader}          \chapter{chapter title}      So my idea was to just tell LaTeX to write chapters to the TOC as though they were sections. My code has no effect whatsoever. Any ideas/solutions are very much appreciated


title: Raggedright not working inside a table

text: I have a table and i want to align elements left. This is my code :               \begin{tabular}{|c|c|}       \hline         Priorité&Description \\        \hline        \multirow{4}{16 mm }{\centering 0}        & \tabitem \raggedright Documentation.\tabularnewline         & \raggedleft \tabitem  Analyse et critique de quelques navigateurs pour enfants existant.\tabularnewline         & \raggedleft \tabitem  Description de la solution souhaitée.\tabularnewline         & \raggedleft \tabitem  Modélisation et implémentation de la base de données.\tabularnewline        \hline       \multirow{2}{8 mm }{\centering 1}       & \raggedleft \tabitem Conception et développement du navigateur.\tabularnewline        & \raggedleft \tabitem Globalisation du navigateur.\tabularnewline       \hline      \multirow{2}{8 mm }{\centering 2}      & \raggedleft \tabitem Conception et développement du Dashboard administrative.\tabularnewline       & \raggedleft \tabitem Conception et développement du Dashboard parental.\tabularnewline      \hline     \centering 3&     \raggedleft \tabitem Intégration du navigateur avec le projet Famissima.\tabularnewline     \hline     \end{tabular}      can anyone help me. and this is the \tabitem:               \usepackage{booktabs}     \newcommand{\tabitem}{~~\llap{\textbullet}~~}


title: How to create Placeholder for missing figure?

text: I'm writing my paper using `texlive2013`.As for me,it is rather annoying to swich between writing and plotting figures.So I'd like to create a `dummy figure` when I was writing to avoid disturbance and add figures back later.I found a nice solution here: ![enter image description here](http://i.stack.imgur.com/zHOu8.png) However,not only were the missing figures,other normal figures were replaced as well.Is there a way to get it around?


title: Dashed underline in caption using ulem

text: I'm trying to dashed underline a word in a caption using the `ulem` package. While the `\dashuline{}` command works fine everywhere else, I get "Undefined control sequence" as error message in caption.               \begin{figure}         While it does work \dashuline{here}         \caption{It does not work \dashuline{here}}     \end{figure}      Has anyone an idea why it doesn't work and how to get it working?


title: Sorting the references alphabtically but shown in numbers

text: I am using `unsrt` style for bibliography which is absolutely fine, all the items are preceded by numbers at the end of the document. However, the hierarchy depends on when throughout the text I cite the items. By using the alphabetical sort, the numbers will turn to AlphaNumerical which I dont want it. I need to sort them according to the family name of the first author, however, I also need them to be shown with numbers and not to change the way they look. An example of the current output is as follows: [26] Mark Wallace. Practical applications of constraint programming. Constraints, 1(1-2):139– 168, 1996. [27] M. Carlsson, G. Ottosson, and B. Carlson. An open-ended finite domain constraint solver. In Proc. Programming Languages: Implementations, Logics, and Programs, 1997.


title: Automatically clipping undrawn objects in TikZ

text: I have used the `trees` package to construct my drawing, but I don't actually need the edges. So I have set the following to suppress them:               \tikzstyle{edge from parent}=[]      This works, but TikZ still allocates space in the drawing to these edges, even when they aren't visible. Is is possible to tell TikZ to ignore these when it performs its automatic clipping? * * * Here is my current code:               \newcommand{\tc}[1]{\includegraphics[clip,trim=1.15cm 1.15cm 1.15cm 1.15cm]{EPSCards/#1.pdf}}          \begin{tikzpicture}[grow cyclic,sibling angle=-12,level distance=8cm,scale=0.9] %scale just to fit on page easier     \node{} child[rotate=90]             foreach \card in {KS,KH,KD,KC,AS} {node[transform shape,rotate=-90] {\tc{\card}}};     \end{tikzpicture}      The graphics are available from: http://code.google.com/p/vectorized-playing- cards/ (You'll need to run `epstopdf` on the .eps files). And the output: ![output of above command](http://i.stack.imgur.com/lUiYN.png) As you can see, there is extra space allocated at the bottom of the image for the tree edges. If I set these to not draw, the extra space doesn't go away. Is there a way to suppress the edges entirely? I realise this isn't the best (ab)use of the `trees` package, but it was the fastest way to do what I wanted :)


title: How do I diagnose problems with a fresh install/update of a TeX distribution?

text: Here's the (hypothetical) scenario: I've updated my TeX distribution in some fashion. Now all of a sudden, a package that used to work just fine is no longer working. Of course, the list of what could have gone wrong is endless, but I would expect there to be a few common things that one should check first before trying to dig too deeply. So that's the question: What are the common causes of a package failing to work after an upgrade, and how does one diagnose and cure them? After all, one wouldn't want to look stupid on a prestigious question and answer site by asking a dumb question, would one?


title: How do I write the mathematical version of the greek letter phi when using the babel package to make greek letters upright?

text: I'm writing an essay in which I need the greek letters to be upright. I have fixed this by applying the accepted solution given to this question. I quote from that solution:               \documentclass{minimal}          \usepackage[greek,english]{babel}          \begin{document}          \greektext A whole paragraph in greek letters \latintext          \end{document}      However, when i try to write the letter phi, by using the Latin letter f, I get a version of phi that I don't want. It looks kinda like this ![enter image description here](http://i.stack.imgur.com/rkevJ.png) (only upright) but I want it to look like this ![enter image description here](http://i.stack.imgur.com/U6vDk.png) (only upright) which is the version I get when I use the standard `\phi` within the math environment.


title: TikZ frameworks in my matrix are skewed

text: I would like to draw frameworks around certain submatrices of a large matrix, like described in this question: Highlight elements in the matrix. I tried some of the provided solutions and ended up using this one:               \documentclass{article}     \usepackage{amsmath}     \usepackage{tikz}     \usepackage{color}     \definecolor{orange}{RGB}{255,127,0}     \usetikzlibrary{arrows,matrix,positioning}     \usepackage{xfrac}     \begin{document}          \begin{tikzpicture}     \matrix [matrix of math nodes,left delimiter=(,right delimiter=)] (m)     {     1 & 0 & 0 & 0 & 0 & 0 & 0\\      0 & 1 & 0 & 0 & 0 & 0 & 0\\      0 & \frac{1}{2} & \frac{1}{2} & 0 & 0 & 0 & 0\\      0 & \frac{1}{4} & \frac{7}{12} & \frac{1}{6} & 0 & 0 & 0\\      0 & 0 & \frac{2}{3} & \frac{1}{3} & 0 & 0 & 0\\      0 & 0 & \frac{1}{3} & \frac{2}{3} & 0 & 0 & 0\\      0 & 0 & \frac{1}{6} & \frac{2}{3} & \frac{1}{6} & 0 & 0\\      0 & 0 & 0 & \frac{2}{3} & \frac{1}{3} & 0 & 0\\      0 & 0 & 0 & \frac{1}{3} & \frac{2}{3} & 0 & 0\\      0 & 0 & 0 & \frac{1}{6} & \frac{7}{12} & \frac{1}{4} & 0\\      0 & 0 & 0 & 0 & \frac{1}{2} & \frac{1}{2} & 0\\      0 & 0 & 0 & 0 & 0 & 1 & 0\\      0 & 0 & 0 & 0 & 0 & 0 & 1\\     };       \draw[color=orange,line width=1pt] (m-1-1.north west) -- (m-1-4.north east) -- (m-4-4.south east) -- (m-4-1.south west) -- cycle;     \draw[color=orange,line width=1pt] (m-4-2.north west) -- (m-4-5.north east) -- (m-7-5.south east) -- (m-7-2.south west) -- cycle;     \draw[color=orange,line width=1pt] (m-7-3.north west) -- (m-7-6.north east) -- (m-10-6.south east) -- (m-10-3.south west) -- cycle;     \draw[color=orange,line width=1pt] (m-10-4.north west) -- (m-10-7.north east) -- (m-13-7.south east) -- (m-13-4.south west) -- cycle;     \end{tikzpicture}                      \end{document}      The thing is, when in a certain row there are both plain numbers and fractions, the frameworks are skewed like this: ![enter image description here](http://i.stack.imgur.com/qMfaR.png) How can I fix this? I tried to replace each `\frac` by `\sfrac` (that's why I added the package `xfrac`), but this makes the problem even worse.


title: How to add line between two rows of nodes in Tikz and how to align nodes vertically?

text: I have two questions:   1. How can I add a horizontal line centered between two rows of nodes in Tikz?    2. How can I change the vertical placement of a node to line up better with other nodes  A picture of what I mean will make this clearer: ![enter image description here](http://i.stack.imgur.com/Bghsx.png) The blue line indicates the line I'd like to add (it should be straight of course). Note the two red circles. Because of the subscripts the arrows don't "hit" them in the center of the `X` like it does for `X_1, X_2, X_3`. So how can I move these down somewhat? Here's a minimal working example.               \documentclass[a4paper,11pt]{article}          \usepackage{tikz}     \usetikzlibrary{matrix,shapes,arrows,positioning,chains, calc}          \begin{document}          \begin{tikzpicture}     \matrix (m)[matrix of nodes, column  sep=1cm,row  sep=8mm, nodes={draw=none, anchor=center} ]{     \node [] {$X_1$}; & \node [] {$X_2$}; & \node [] {$X_3$}; & \node [] {$\ldots$}; & \node [] {$X_{\frac{n}{8}-1}$}; & \node [] {$X_{\frac{n}{8}}$}; \\     \node [] {$Y_1$}; & \node [] {$Y_2$}; & \node [] {$Y_3$}; & \node [] {$\ldots$}; & \node [] {$Y_{\frac{n}{8}-1}$}; & \node [] {$Y_{\frac{n}{8}}$}; \\     };          \path [>=latex,->] (m-1-1) edge (m-2-1);     \path [>=latex,->] (m-1-1) edge node [above] {$\ast$} (m-1-2);     \path [>=latex,->] (m-1-2) edge (m-2-2);     \path [>=latex,->] (m-1-2) edge (m-2-3);     \path [>=latex,->] (m-1-3) edge node [above] {$\ast$} (m-1-2);     \path [>=latex,->] (m-1-3) edge node [above] {$\ast$} (m-1-4);     \path [>=latex,->] (m-1-4) edge (m-2-5);     \path [>=latex,->] (m-1-5) edge node [above] {$\ast$} (m-1-4);     \path [>=latex,->] (m-1-5) edge node [above] {$\ast$} (m-1-6);     \path [>=latex,->] (m-1-6) edge (m-2-6);          \end{tikzpicture}               \end{document}


title: My first Tikz picture: help on positioning and suggestions

text: I would like to know how to make this image better, maybe with a more "compact" code. Also I would like to place the label `IMT` to better fit the arrow. Is it possible to fill the axis between `pompa` and `turbina` with a shade? Lastly I would like that the arrows between boxes ends before touching the boxes. Thank you, and sorry for my English. This is my code:               \documentclass{article}      \usepackage{tikz}     \usetikzlibrary{positioning,intersections,shapes.geometric,fit,arrows,decorations.pathmorphing,decorations.pathreplacing,decorations.shapes,decorations.markings}               \begin{document}          \begin{tikzpicture}[>=latex',auto,inner sep=2mm,node distance=2cm and 3cm]          %set styles for the axis between turbine and pump and for the boxes          \tikzset{asse/.style   = {thick, double,double distance = 6pt}}     \tikzset{box1/.style={draw,minimum width=2.5cm,rectangle,thick}}          % draw nodes          \node[box1] (setA) {\textit{SET A}};     \node[box1] (evaporatore) [below=of setA] {\textit{Evaporatore}};     \node[draw,trapezium,shape border rotate=90,inner sep=1pt,minimum width=2.5cm,trapezium stretches=true,trapezium angle=80] (turbina) [on grid,below right= of evaporatore] {\textit{Turbina}};     \node[box1] (sem) [right=of turbina] {\textit{SEM}};     \node[box1] (condensatore) [on grid,below left=of turbina] {\textit{Condensatore}};     \node[draw,circle] (pompa) [on grid,below left= of evaporatore] {\textit{Pompa}};     \node[box1] (setB) [below=of condensatore] {\textit{SET B}};          %draw axis between turbine and pump          \node (imt) [draw, dashed,inner sep=3pt, rectangle, fit = (evaporatore) (turbina) (condensatore)(pompa)] {};               %connecting evaporatore-turbina-condensatore-pompa (with arrows in the middle of the path)     \begin{scope}[>=triangle 60]      \draw [decoration={markings, mark=at position 0.6 with {\arrow{>}}},postaction={decorate}] (evaporatore) -| (turbina.top right corner);      \draw [decoration={markings, mark=at position 0.6 with {\arrow{>}}},postaction={decorate}]  (turbina.bottom left corner) |- (condensatore);      \draw [decoration={markings, mark=at position 0.4 with {\arrow{>}}},postaction={decorate}] (condensatore) -| (pompa);      \draw [decoration={markings, mark=at position 0.6 with {\arrow{>}}},postaction={decorate}] (pompa) |- (evaporatore);      \end{scope}               %draw the IMT label          \node[] (labelimt) [above right=0.5cm and 0.5cm of imt] {\textit{IMT}};     \draw[->,decorate,decoration={bent,amplitude=-2,aspect=0.3}] (labelimt) -- (imt);          %draw the "asse"           \draw[asse](pompa) to node[]{asse} (turbina);           %draw arrows           \begin{scope}[>=stealth']      \path[->] (setA) edge node[] {$q_A$} (evaporatore);      \path[->] (turbina) edge node[] {$l$} (sem);      \path[->] (condensatore) edge node[] {$q_B$} (setB);     \end{scope}          \end{tikzpicture}     \end{document}


title: How to draw a square wave?

text: Everything is in the title... I'm trying to draw a simple `square wave` , but I'm reading that `tikz` cannot draw the vertical line of the discontinuity... Is there a way to overpass this ? `PSTricks` maybe ? This is what I'm trying to represent : ![what I'm trying to do](http://www.minelab.com/__files/i/5895/SquareWave.gif)


title: Right/left align chapter number and center the chapter title on the next page

text: I want to left or right align my chapter number, and center the chapter title on the next page. I've used the `\titlesec` package, but it removes the header and footer on the first page of every chapter. The code I've written right aligns both the chapter number and the title. Is there any workaround?               \documentclass{report}          \usepackage{fancyhdr}     \usepackage{titlesec}          \titleformat{\chapter}[display]     {\normalfont\Large\bfseries\raggedleft}{\chaptertitlename\ \thechapter}     {20pt}{\Large}     \pagestyle{fancy}          \rhead{XYZ}          \lhead{year}          \lfoot{Blah}          \cfoot{}          \rfoot{\thepage}          \begin{document}          \chapter{Title}     Test     \end{document}


title: Two questions on biblatex: impression vs. edition & editorial roles

text: * A: I've come accross quite a few books which state in the frontmatter that the book which I am holding in my hands is not the first edition of 1982 but (example 1) a "new impression with new material" from 1990. Others state that they are (example 2) the "fifth impression, 2004". How to deal wth that in biblatex? My current approach is to claim that whenever there is new material added, then it is a new edition (i.e., example 1 above would be: "2nd edition, 1990"). But if it is just an unaltered re- print then i just use the _original_ date and add no information (i.e., example 2 above would be: "1st edition 1982" (and _not_ 1st edition 2004!)). What do you say? * * *   * B: If a book is something like "TITLE: SUBTITLE. Translation, Introduction and Annotations by XY", then I take it, that this information is _not_ part of the title and thus does not need to be stated in my bibliography as it is on the cover of the book. And this is exactly what biblatex does: I add the name of the Translator/Annotator/Introducer in my bib-file and biblatex creates then a sentence like this "TITLE. SUBTILTE. Translated and annotated, with an introduction, by XY". (please note that the sentence on the coverpage differs from the result of biblatex). Firstly, what do I do if it says on the Coverpage "TITLE: SUBTITLE. Translation, Introduction and Annotations _and a Note on Recent Work_ by XY"? I know, I could add them using editorial roles (biblatex.pdf, pp.31ff), but do I have to? (remember that in the previous question I claimed that this information is _not_ part of the title and thus need not be reproduced as stated on the cover!) Secondly, what about titles like "A Translation of TITLE with Introduction and Commentary by XY"? (Here the information of the translator and commentator seems to be part if the title. do I have to reproduce it?) There are two possibilities:   1. Author. A Translation of TITLE with Introduction and Commentary. Translated and annotated, with an introduction, by XY. (--> not good because double information)   2. Author. TITLE. Translated and annotated, with an introduction, by XY. (--> not good because changed title!)


title: Why is a 10bp picture environment not 10bp?

text: Example:               \documentclass{article}     \begin{document}          \newlength{\picwidth}          \setlength{\unitlength}{1bp}     \settowidth{\picwidth}{\begin{picture}(10,10)\end{picture}}     \typeout{width: \the\picwidth}          \settowidth{\picwidth}{\rule{10bp}{0pt}}     \typeout{width: \the\picwidth}          \end{document}      Output in the log:               width: 10.03738pt     width: 10.03749pt      I'm expecting the two lines to be the same.


title: Something between \frownie and \smiley

text: Inside a beamer presentation, I would like to compare and contrast several alternatives. For each, I would like to highlight the "pros" (with a `\item[\Large\smiley]`), the "cons" (with a `\item[\Large\frownie]`) and "neutral" observations. Is there a symbol with a face that is neither happy, nor sad, but rather neutral?


title: Gnuplot epslatex terminal not showing axis text

text: The following minimal example shows how I make a plot using gnuplot to the "epslatex" terminal and want to include it in my document. However, the axis texsts do not show.. What might be wrong? Gnuplot makes a .tex file and an .eps file. I should have thought it was going to use both when converting to PDF. This is pdflatex by the way.               ==GNUPLOT==     set format "$%g$"     set xlabel "Temperature $T_t$"     set ylabel "Difference $|f(s')-f(s)|$"     set xrange [0.1:20]     set yrange [1:20]     set zrange [0:1]     set terminal epslatex     set output "prob.eps"     splot exp(-y/x) title ""               ==latex==     \documentclass[10pt,a4paper]{article}     \usepackage{graphicx}     \usepackage{epstopdf}     \begin{document}         \includegraphics{prob}     \end{document}


title: How to draw star in TikZ background

text: I draw shapes on background via `pgfonlayer`               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{backgrounds}          \begin{document}      \begin{tikzpicture}       \begin{pgfonlayer}{background}        \draw[rounded corners,fill=red] (1,1) rectangle (2,2);        \draw[fill=blue] (0,0) circle (.8cm);       \end{pgfonlayer}      \end{tikzpicture}     \end{document}      I know the values (coordinates) needed to draw `rectangle` or `circle`, but I have no idea what are the parameters needed to draw a `star`. We define the starting coordinate; for `rectangle` we give the second coordinate two draw `rectangle` between two points, for `circle`, we give the radius to draw circle around the starting point. What we need to give to draw star around the starting point?               \draw[fill=green] (0,0) star ????;      **PS.** Sorry, I know this is a basic typical question, but I had a long struggle with it.


title: Nested \xygraph in \xymatrix

text: I am nesting an \xygraph in an \xymatrix like so:               %\documentclass{article}     \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{MnSymbol}     \usepackage{chemarr}     \usepackage{multirow}     \usepackage{verbatim}          \input xy     \xyoption{all}          \setlength{\parindent}{0pt}     \newtheorem{mydef}{Definition}     \def\pi{a}     \def\emptyline{\vspace{\baselineskip}}               \begin{document}     \shorthandoff{"}          \begin{frame}          \textbf{Reduktion von CI auf C}\\     \begin{tabular}{c}     \begin{xy}     \xymatrix     {     \ar[r] & _{c_k}\bullet \ar@{-->}[r] \ar@{.>}[r] & \cdots \ar@{-->}[r] & \bullet \ar@{-->}[r] & _{s_k}     \begin{xy}     $     \xygraph{     !{<0cm,0cm>;<1cm,0cm>:<0cm,0.5cm>::}     !{(0,0) }*+{\bullet}="a"     !{(3,0) }*+{(M_k,s_k)}     !{(4,1) }*+{}="b"     !{(4,-1) }*+{}="c"     "a"-"b" "a"-"c" "b"-"c"     }$     \end{xy} \\     }     \end{xy}          \end{tabular}     \end{frame}          \end{document}      Additionally I use a global `shorthandoff{"}` to circumvent an error caused by using the `ngerman` babel package. This displays fine in a `\documentclass{article}`, but everything goes haywire in a `\documentclass{beamer}`. I get errors about missing `}`'s and missing `\end{xy}`'s What do I have to do to make this nesting work in the beamer class as well?


title: TexStudio / TexMaker and Github

text: I was wondering if anyone has used Github as a version control system, when writing a large document via TexStudio or TexMaker? Rstudio for example has a plugin that allows R projects to be pushed and pulled from the Github repository, making it very easy to manage committed changes, and committing them to the actual repo. Is there a way to achieve this easily with a latex document 'project'.


title: TikZ: edge should not interfere with other elements in the graph and label positioning

text: I'm quite new to TikZ and I created the following graph:               \begin{tikzpicture}          \node[draw,circle] (n4) at (2, -3) {4};     \node[draw,circle] (n5) at (2, -4) {5};     \node[draw,circle] (n6) at (1, -5) {6};     \node[draw,circle] (n7) at (3, -5) {7};     \node[draw,circle] (n8) at (1, -6) {8};     \node[draw,circle] (n9) at (3, -6) {9};     \node[draw,circle] (n10) at (2, -7) {10};          \draw[->] (n4)--(n5) node[midway, right] {lengthy edge label 1};     \draw[->] (n5)--(n6) node[midway, left] {lengthy edge label 2};     \draw[->] (n5)--(n7) node[midway, right] {lengthy edge label 3};     \draw[->] (n6)--(n8) node[midway, left] {edge label 4};     \draw[->] (n7)--(n9) node[midway, right] {edge label 5};     \draw[->] (n9)--(n10) node[midway, right] {label 6};     \draw[->] (n8)--(n10) node[midway, left] {label 7};          \draw[->] (n10) -| +(4,0) -- +(4,0) node[midway, right]  {edge label 8} |- (n4);              \end{tikzpicture}      An image of the output can be found here: ![Image](http://i.stack.imgur.com/IYdV1.png) It took me quite a while for this graph to build. However, I couldn't come up with a solution for the following questions:   * Is it possible to set the path of the edge from node 10 to node 4 in such a way that it automatically bypasses the rightmost "inner" label? In the example above I have to adjust the value in `\draw` to something like `+(5,0)` so that it doesn't interfere with "lengthy edge label 3", but this seems quite cumbersome if the graph changes frequently   * How can I place "edge label 8" in the middle of the vertical path segment?   * Is it possible to increase the distances between the nodes without having to assign new coordinate points to each node?  Any hint is appreciated.


title: Assign numbering of theorems to figures

text: How can I assign numbering of theorems to numbering of figures? I have a certain figure and instead of it being called **Figure 2.1: Figure for Theorem 2.2** , it would be much batter to have it simply named **Figure 2.2** , so readers don't get confused. There probably won't be more than one pictures for a single theorem, but just in case something unexpected happens in my document, is it possible to (either manually or automatic) add **(a)** , **(b)** , etc. after the caption? Alternatively, I wouldn't mind adding captions completely manually (so I'd type the whole "Figure 2.2." thing myself)... How can I achieve this?


title: Problem redefinning command{\<}?

text: I have a problem with redefine the command `\<`               \documentclass{article}         \renewcommand{\<}{\left\langle\!\left\langle}      \renewcommand{\>}{\right\rangle\!\right\rangle}       \begin{document}      $\< qs \> $     \end{document}      The compilation gives me notice that me dvi file is ok. Anyone has an idea?                 Running `LaTeX' on `tot' with ``latex  -interaction=nonstopmode "\input" tot.tex''      This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)      entering extended mode      LaTeX2e <2009/09/24>      Babel <v3.8l> and hyphenation patterns for english, usenglishmax,    dumylang, nohyphenation, french, basque, loaded.       (./tot.tex (/usr/share/texmf-texlive/tex/latex/base/article.cls       Document Class: article 2007/10/19 v1.4h Standard LaTeX document class       (/usr/share/texmf-texlive/tex/latex/base/size10.clo))            ! LaTeX Error: \<undefined.            See the LaTeX manual or LaTeX Companion for explanation.       Type  H <return>  for immediate help.       ...                                                         l.3  \renewcommand{\<}                       {\left\langle\!\left\langle}       (./tot.aux) [1] (./tot.aux) )       (see the transcript file for additional information)       Output written on tot.dvi (1 page, 336 bytes).       Transcript written on tot.log.            LaTeX exited abnormally with code 1 at Tue Sep 24 14:59:35


title: line legend for mesh plots

text: I am doing a group plot of related curves. Since they are related by a parameter, I want to color them according to (a function of) that parameter. For that purpose, I used the mesh option, and then use point meta to indicate what color it should have. However, the legend is then a mesh grid, and I want it to be a colored line. What's the cleanest way to do this? I found the related post Legend with Markers for Mesh Plot but I couldn't adapt it to my case.                \begin{tikzpicture}         \begin{groupplot}[group style={group size={2 by 1},                           xlabels at=edge bottom,                           xticklabels at=edge bottom},                         axis lines=left, domain=-5:5,                         xlabel=$x$,                         width=0.5\textwidth,colormap/hot,                         legend columns=-1,                         legend entries={ $\beta=0.1$, $\beta=0.5$,                         $\beta=0.8$, $\beta=1.0$, $\beta=2.0$, $\beta=5.0$},                         legend to name={fig:mm_temp_legend}]                         ]           \nextgroupplot[ylabel={$p(x)$}]           \pgfplotsforeachungrouped \be/\zedd in {                     0.1/12.4595,                     0.5/18.3263,                     0.8/29.6888,                     1.0/43.0372,                     2.0/403.539,                     5.0/1.07923e6 } {             \addplot+[line legend,samples=200,no marks,solid,mesh,point meta={ln(\be)}]             gnuplot {exp(\be*(0.4*(x-0.3)**2-0.02*x**4))/\zedd};           }           %           \nextgroupplot[ylabel={$-\log p(x)$},ymin=0]           \pgfplotsforeachungrouped \be/\zedd in {                     0.1/12.4595,                     0.5/18.3263,                     0.8/29.6888,                     1.0/43.0372,                     2.0/403.539,                     5.0/1.07923e6 } {             \addplot+[samples=200,no marks,solid,mesh,point meta={ln(\be)}]             gnuplot {\be*(-0.4*(x-0.3)**2+0.02*x**4)+log(\zedd)};           }         \end{groupplot}       \end{tikzpicture}      ![here's how it looks like](http://i.stack.imgur.com/Bxua0.png)


title: Creating a table fitting one column of a two column style page

text: I want to create a table, in a two column style page (IEEEtran) but I want the table to fit only one of the columns. The table which I make is exceeding the single column width of the page. Please help. Here is the table               \documentclass[11pt,twocolumn,conference]{IEEEtran}     .     .     .     \begin{table}[h]     \caption{hello2 testing}     \label{1234}     \begin{tabular}{cccccc}         & LfdR        & KLSRf       & MLDFSP       & PNDND       & LDFSSVM     \\     Aa  & 97.8+-2.3 & 97.4+-3.0 & 97.4+-3.0 & 97.0+-3.6 & 99.1+-1.8 \\     Al  & 69.8+-9.5 & 93.6+-3.6 & 86.9+-8.4 & 91.5+-4.5 & 94.9+-5.4 \\     Av  & 97.0+-2.9 & 99.2+-1.8 & 99.6+-1.4 & 98.3+-2.9 & 99.6+-1.4 \\     Aw  & 97.8+-3.1 & 95.3+-3.1 & 96.2+-2.5 & 92.4+-3.3 & 97.5+-3.0 \\     Ay  & 77.5+-7.2 & 90.2+-4.1 & 90.2+-5.7 & 88.1+-4.8 & 91.6+-4.9 \\     avg & 88.0      & 95.1      & 94.1      & 93.5      & 96.5          \end{tabular}     \end{table}


title: Change axis number format for external tikz file

text: I'm using `\input{filename.tikz}` to include .tikz graphs created by matlab2tikz in my LaTeX document. As shown in a comment on this question it is possible to change the plot marker size when the document is inputted, without altering the original .tikz file. Now I'm looking for a way to change the axis number formatting in the same fashion. I have numbers on the y-axis that are of the form `5 x 10^-2` where I want them just to be `0.05`. I understand from this answer that this has more to do with pgfplot than with tikz, but I'm not sure how I would use the command given in the answer right before my `\input` statement.


title: Get a table and figure on the same page with captions & labels

text: Here's what I'm looking for: I need a table and a figure to stay on the same page, while keeping captions & labels fully functional. Both the table and the figure need their own caption and their own label. The `\afterpage` command almost made it work (which I found in Join figure and table on the same page), but the labels to reference them in the text don't work anymore (no matter where I place my `\afterpage` environment. The table & figure together make up almost a full page, if that helps.


title: When author, date fields blank: remove whitespace between header and text

text: I'm creating a document with KOMA-Script's `scrartcl`, the typical outcome would look something like ![with-author](http://i.stack.imgur.com/83W4N.png) Now, I would like to leave the date and the author fields blank. This results in a lot of whitespace between the last line of the title and the actual text ![noauthor](http://i.stack.imgur.com/5SCQG.png) I could manually fiddle with negative `vspace`, but there must be a cleaner solution for it. Minimal code to reproduce the last figure.               \documentclass{scrartcl}     \subject{Summer school 2013}     \author{}     \date{}          \title{Exercise sheet 1}     \subtitle{Numerical Optimization: Basics}     % =============================================================================     \begin{document}     \maketitle          random text random text random text random text random text random text random     text random text random text random text random text random text random text     random text random text random text random text random text random text random     text          \end{document}     % =============================================================================


title: Unwanted italics in page headers (classicthesis)

text: In my section titles I sometimes have to use italic letters for the entry in the table of contents. Unfortunately, this results in italic letters in the page headers. How can I avoid this? The page headers should look like the section titles.               \documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude,             footinclude=true,cleardoublepage=empty,             BCOR=5mm,paper=a4,fontsize=10pt]{scrbook}     \usepackage{lipsum}          \usepackage[parts,beramono,eulerchapternumbers,%         listings,manychapters,%         floatperchapter]{classicthesis}           \begin{document}     \tableofcontents     \pagestyle{scrheadings}     \chapter{First chapter}     \section{First section}     \lipsum[1-18]     \section[\textit{Second} section]{Second section}     \lipsum[1-12]     \end{document}


title: Counting figures, tables and citations in a document

text: My idea is to use TeXcount to scan my document and output the number of words, figures, tables, equations and citations. I've been looking at the documentation for TeXcount and it seems that words and equations are handled by default, but I don't see how to give different environments their own counters (and citations are a different matter). Can anyone help me?


title: BibLaTeX: Lists by multiple fields of same type?

text: Is there a way to construct lists by multiple instances of a field instead of using `and` or comma, respectively? E.g., instead of               @article{FooBar,        ...        author = {John Doe and Richard Roe},        keywords={foo, bar},        ...     }      I would like to get the same result in the reference by               @article{FooBar,        ...        author = {John Doe},        author = {Richard Roe},        keyword={foo},        keyword={bar},        ...     }


title: Recursively inputting a row in a math array

text: What may be a neat way of recursively inputting an arbitrary number of rows in a math array? In particular, suppose if I write `\mycommand{A/B, C/D}` then I get `\begin{array}{l} A \mapsto B \\\ C \mapsto D\end{array}` whereas if I simply write `\mycommand{A/B}` then I just get `\begin{array}{l} A \mapsto B \end{array}` I already tried this with `\newcommand*{\mycommand}[1]{ \begin{array}{l} \foreach \xx/\yy in {#1} { \xx \mapsto \yy \\\ } \end{array} }` but then I realized, I'm having problems with `\\\` for each new row.


title: How I do install context modules in the Windows distribution of ConTeXt?

text: I know this question almost equal How do I install context modules in the ubuntu distribution of ConTeXt, but I don't understand it and there are simple way install context modules in the Windows distribution of ConTeXt and I can running ConTeXt with WinEdt 8 without modules


title: Predefined enumerate settings

text: I have multiple `enumerate`s across some files, for which I want a consistent style (same `enumitem` options):               \documentclass{article}     \usepackage{enumitem}           \newcommand{\enumSettings}{noitemsep, nolistsep, leftmargin=*}          \begin{document}          \begin{enumerate}[\enumSettings]     \item \dots     \item \dots     \end{enumerate}          \end{document}      I need the settings to be defined in centralized manner so I won't have to write them every time. I don't want to make a new environment. What can I do to make this work?


title: Iconography to summarize a table

text: I am building up a table summarizing several methodologies for a presentation. And I would like to place some coloring iconography to grasp some information at a glance. Here is the problem definition. My problem has 3 different stages. Some methodologies address all of them, others only some parts and some others fuse some stages. To address the stages several characteristics can be used to address any of those stages. Therefore I would like to build up a table where i classify the methodologies plus they description and add and extra column where i put such iconography as in the example. ![enter image description here](http://i.stack.imgur.com/AVR4q.jpg) I guess that the proper way to go is using `\tikzset`, having as many macros as colors combinations and use parameters to color it. But My problem comes when i want to fuse stages. Is there any elegant solution to it?