title: Tikz new shape : how to access/define anchors

text: I would like to create some new shape in order to use it with tiKz. The problem I'm front facing is how to access edged of the newly created shapes. So far I got this :               \documentclass[paper=a4,11pt,parskip=half,twoside]{scrartcl}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[french]{babel}     \usepackage[pdftex]{graphicx}          \usepackage{tikz}     \usepackage{circuitikz}     \usepackage{pgfplots}          \def\convEl{%         ++(-.5,-.5) -- ++(1,0) -- ++(0,1) -- ++(-1,0) -- cycle     }          \def\convEm{%         ++(0,0) circle (.5)     }          \def\convMe{%         ++(-.5,-.5) -- ++(.5,1) -- ++(.5,-1) -- cycle     }          \def\accEn{%         ++(-.5,-.5) -- ++(.5,0) -- ++(0,1) -- ++(-.5,0) -- cycle ++(0,-1) -- ++(.5,1)     }          \begin{document}          \begin{tikzpicture}         \filldraw[draw=red,ultra thick,fill=orange] (0,0) \convEl node (a) {};         \filldraw[draw=red,ultra thick,fill=orange] (2,0) \convEm node (b) {};         \filldraw[draw=red,ultra thick,fill=orange] (4,0) \convMe;         \filldraw[draw=red,ultra thick,fill=orange] (6,0) \accEn;     \end{tikzpicture}          \end{document}      Well maybe I should precise some more in comparison to the code provided. I want to access specific positions of my shapes, like bottom center and +30°/-30° on each side to connect arrows. Here is a little scheme of the behaviour expected. This is why I need to create / access some more anchors. If i draw a simple rectangle, I can do it, but with new/special shapes like the one I need... ![Arrows connection](http://i.stack.imgur.com/5ILII.png)


title: Why this errors with PSSets in psmatrix?

text: I´m starting with diagrams, and I have any errors with this code: (edited after Herbert´s comment)               \documentclass[12pt,a4paper]{standalone}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[spanish]{babel}     \usepackage{amsmath,amsfonts,amssymb,latexsym}     \usepackage{graphicx}          \usepackage{xcolor}     \usepackage{mathpazo}       % Fuente MathPazo     % ----------------------  PSTRICKS ---------------     \usepackage{pstricks}     \usepackage{pst-plot,pst-3dplot,pst-node,pst-tree,pst-grad,pst-coil,pst-text,pst-3d,pst-eps,pst-fill,pstricks-add,multido}     %\input{pssettings.tex}     \begin{document}     \psset{framearc=0.2,shadowcolor=black!70,shadowangle=-90,blur=true,fillstyle=solid}     \begin{psmatrix}[rowsep=0.5,colsep=0.5]% defines the distance between two frames         \psset{xunit=1cm,yunit=1cm}         &\makebox[2.00]{%         \psframe[fillcolor=lightgray,fillstyle=solid,linestyle=none](-1.00,-1.00)(1.00,1.00)         \cnode[fillstyle=solid,fillcolor=blue](0,0){0.15}{Current}         }         & \makebox[6cm]{Solución Actual}\\              &\makebox[2.00]{%         \psframe[fillcolor=lightgray,fillstyle=solid,linestyle=none](-1.00,-1.00)(1.00,1.00)         \cnode[fillstyle=solid,fillcolor=blue](0,0){0.15}{Current}         \cnode[fillstyle=solid,fillcolor=pink](-0.75,0.75){0.15}{Current}         }& \makebox{Generar Vecindad}\\         &\makebox[2.00]{%         \psframe[fillcolor=lightgray,fillstyle=solid,linestyle=none](-1.00,-1.00)(1.00,1.00)         \cnode[fillstyle=solid,fillcolor=pink](1,1){0.20}{Current}         \cnode[fillstyle=solid,fillcolor=blue](0,0){0.20}{Current}         }& \makebox{Elegir Mejor Vecino}\\              \psdiabox[shadoÇ=true]{¿Cumple el\\Criterio de Aspiración?}         &\psdiabox[shadoÇ=true]{¿Está en la \\Lista Tabú?}& \\              & & \makebox{Aceptar como nueva solución}\\              }          \end{psmatrix}               \end{document}      How Can I do to obtain no errors? ## ![enter image description here](http://i.stack.imgur.com/05XN9.jpg) ## ![enter image description here](http://i.stack.imgur.com/m6YHp.jpg) ![enter image description here](http://i.stack.imgur.com/2Eyw3.jpg) How can I do to not overput the contente os makboxes? , obatining a separation between each 2. I_ thought that It was automatic with rowsep How Can I put the text on the right of the image without being over the frameboxes?? lenght of makebox... Can be set with pt/cm/or without messure?


title: How to place the caption of a lstlisting in the margin? (scrreprt, floatrow)

text: In the following mwe I am using the `floatrow` package to place the figure captions in the margin. How can I do the same for `listings`? **Update:** Some listings are spread over two pages.               \documentclass[a4paper, 10pt]{scrreprt}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{mwe}     \usepackage{lipsum}     \usepackage{todonotes}          \usepackage[top=1cm, bottom=1cm, left=2cm, right=5cm]{geometry}     \usepackage{txfonts}     \usepackage{xcolor}          \usepackage{listings}     \lstset{         language=C,         basicstyle=\ttfamily,         keywordstyle=\bfseries,         backgroundcolor=\color{black!10}}          \usepackage{caption}     \captionsetup{format=plain, font={small, it}, labelfont={bf}}          \usepackage{floatrow}     \floatsetup[figure]{         margins=hangright,         capposition=beside,         capbesideposition={top,right},         floatwidth=\textwidth}          \begin{document}          \chapter{How to place the caption of a lstlisting in the margin?}     \blindtext          \begin{figure}[h]       \includegraphics[width=\textwidth, height=5cm]{example-image-a}       \caption{Greybox with an 'A' in the center}     \end{figure}          \blindtext          \todo[]{TODO: Place the caption of the following listing in the margin.}     \begin{lstlisting}[caption={\lstinline{main()} function}]     int main(void)     {         while (true) {             /* loop forever */         }     }     \end{lstlisting}%          \blindtext          \end{document}      ![floatrow mwe](http://i.stack.imgur.com/E9cXS.png)


title: Problems with \EndIf and \EndFor

text: I'm using the algpseudocode package and I want to write a pseudocode. This is my code               \documentclass[conference]{IEEEtran}          \usepackage[spanish, es-tabla]{babel}     \usepackage{graphicx, times, amsmath, colortbl, psfrag}     \usepackage[ruled, vlined, english, boxed, linesnumbered, lined]{algorithm2e}     \usepackage{algpseudocode}     \usepackage{multirow}     \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage{float}          \begin{document}     ...     \begin{algorithm}         \caption{Buscar elemento en una lista}         \KwData{$lista[1,...,x_n]$: lista en la que se va a buscar, $elem$: elemento que se va a buscar}         \KwResult{$encontrado$: booleano que indica si se encontr\'o el elemento}         \begin{algorithmic}[1]             \Procedure{Buscar}{$lista$, $elem$}                 \State $encontrado \gets False$                 \For{i}{1}{n}                     \If{$lista[i]=elem$}                         \State $encontrado \gets True$                     \EndIf                 \EndFor                 \Return $encontrado$             \EndProcedure         \end{algorithmic}     \end{algorithm}     ...     \end{document}      but I get the following errors when I try to compile it               ! Missing number, treated as zero.     <to be read again>                     \ALG@b@2@EndIf@0      l.113           \EndIf     ?          ! Missing number, treated as zero.     <to be read again>                     \ALG@b@2@EndFor@0      l.114           \EndFor     ?      Does anyone know how can I compile it? Thanks for answering.


title: Change font size in context by percentage

text: Font sizes can be set with (more or less) absolute commands such as `\large`, `\Large`, `\LARGE`, and so on. Are there also commands that can increase or reduce a font size by some proportion or percentage not in absolute terms but relative to the preceding text? I am hoping to find a way to do this in the midst of chapter titles, which are set in the preamble to be `\LARGE\bfseries`. But when a colon appears in a chapter title, followed by a subtitle, I am being asked to reduce the size of the subtitle by just a small amount — and the result of using the absolute `\Large` is not satisfactory. I could redefine `\Large` just for this situation, but I'd prefer to find a _relative_ command to change font size, as described above, as that would be useful in many other situations.


title: Log all keys in a module

text: Using `l3keys`, is there any way to inspect the keys currently in a (sub)module? I'm looking for something like `\clist_show`, but for keys. `\keys_show` sounded promising, but requires that you already know the keys that have been created: `\keys_show:nn {<module>} {<key>}`. My ideal scenario would be:               \keys_show:n {module}     There are 4 keys in the key module 'module' (without outer braces):     >    {this} tl     >    {is}   tl     >    {a}    tl     >    {test} bool


title: Bibliography article : how to replace the long line by the author name in the references

text: I'm using `\documentclass{article}`. I'm also using `bibliographystyle{ecta}`. My references are in a separate bibtex file. After generating the PDF file, when I have two different citations from the same author, in the second citation a long line is drawn instead of the author's name. Please let me know How to fix this?


title: Reset the counter back to one in every chapter

text: I have the following code to get a beautiful concept boxes with optional header for every new concept discussed. The code changes the concept number using the counter but I also need to reset it to 1 again in the next chapter. The code is being taken from this group only, hence not everything i understand in it. Kindly help what needs to be done to reset the counter variable "theorem" to 1 again in the next chapter.                   % Preview preamble              %% LyX 2.0.4 created this file.  For more info, see http://www.lyx.org/.         %% Do not edit unless you really know what you are doing.         \RequirePackage{fix-cm}         \documentclass[11pt,a4paper,english,oldfontcommands,openany]{memoir}         \usepackage[T1]{fontenc}         \usepackage[latin9]{inputenc}         \setcounter{secnumdepth}{3}         \setcounter{tocdepth}{3}         \synctex=-1         \usepackage{wrapfig}         \usepackage{amsthm}         \usepackage{amsmath}         \usepackage{amssymb}         \usepackage{fixltx2e}         \OnehalfSpacing              \makeatletter              %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.         \pdfpageheight\paperheight         \pdfpagewidth\paperwidth                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.         \@ifundefined{lettrine}{\usepackage{lettrine}}{}          \theoremstyle{definition}           \newtheorem{example}{\protect\examplename}           \theoremstyle{definition}           \newtheorem{defn}{\protect\definitionname}         \theoremstyle{plain}         \newtheorem{thm}{\protect\theoremname}              \@ifundefined{date}{}{\date{}}         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.              \usepackage[T1]{fontenc}         \usepackage{amsthm}         \usepackage{amsmath}         \usepackage{amsfonts}         \usepackage{amssymb}              \usepackage{xcolor}         \usepackage[framemethod=tikz]{mdframed}         \usetikzlibrary{shadows,shadings}              \usepackage[a4paper]{geometry}         \geometry{         left=30mm, %% or inner=20mm         right=15mm, %% or outer=15mm         top=30mm, bottom=25mm,         headheight=\baselineskip,         headsep=7mm,         footskip=13mm         }         \usepackage{multicol}         \usepackage{polynom}         \usepackage{lettrine}         \usepackage{lipsum}         \usepackage{calc}         \usepackage{tikz}         \usetikzlibrary{shapes,snakes}         \usepackage{pgf}         \usepackage{graphicx}         \usetikzlibrary{arrows,mindmap}         \usepgflibrary{arrows}         %\usepackage[framemethod=TikZ]{mdframed}              \usepackage{cwpuzzle}         %\renewcommand{\secheadstyle}{\huge\bfseries}         %\chapterstyle{demo3}         \chapterstyle{verville}         %\chapterstyle{southhall}         %chapterstyle{thatcher}         %\chapterstyle{wilsondob}         %\chapterstyle{pedersen}         %\chapterstyle{bianchi}              \setsubsubsecindent{1cm}         \setaftersubsubsecskip{1cm}         \setsubsubsecheadstyle{\Large\itshape\raggedleft         \begin{tikzpicture}         \draw[overlay,remember picture,opacity=0.5] node [right,text width=15cm, rounded corners, fill=gray!30, inner sep=2ex]{};         \draw[thick,overlay,remember picture, gray!50] (0,-.1)--(12.8,-.1);         \draw[ultra thick,overlay,remember picture, gray!70] (0,-.2)--(12.8,-.2);         \draw[thick,overlay,remember picture, gray!40] (0,-.3)--(12.8,-.3);         \draw[ultra thick,overlay,remember picture,gray!70] (0,-.2) -- (-20,-.2);         \shade[yshift=6pt,ball color=gray,overlay] (0,-.2) circle (9pt);         \end{tikzpicture}         }              \setsubsecindent{0.4cm}         \setbeforesubsecskip{0.5cm}         \setaftersubsecskip{0.5cm}         \setsubsecheadstyle{\Large\scshape\raggedright         \begin{tikzpicture}         %\draw[overlay,remember picture,opacity=0.5] node [right,text width=12cm, rounded corners, fill=gray!50, inner sep=2ex]{};         \draw[yshift=-2pt,remember picture, line width=2pt, overlay, gray!30, rounded corners] (12,-.4) -- (0,-.4) -- (0,.8)  -- (12,.8) -- cycle;         \draw[thick,overlay,remember picture, gray!50] (0,-.1)--(12,-.1);         \draw[ultra thick,overlay,remember picture, gray!70] (0,-.2)--(20,-.2);         \draw[thick,overlay,remember picture, gray!40] (0,-.3)--(12,-.3);         \draw[ultra thick,overlay,remember picture,gray!70] (0,-.2) -- (-20,-.2);         \shade[ball color=gray!90,overlay] (0,-.2) circle (3pt);         \shade[ball color=gray!90,overlay] (12,-.2) circle (3pt);         \end{tikzpicture}         }              \setsecindent{0.4cm}         \setbeforesecskip{1.5cm}         \setaftersecskip{1cm}         \setsecheadstyle{\LARGE\scshape\raggedright\color{black}         \begin{tikzpicture}         \draw[yshift=6pt,overlay,remember picture,opacity=0.5] node [right,text width=15.5cm, rounded corners, fill=gray!30, inner sep=15pt]{};         \draw[yshift=-2pt,remember picture, line width=4pt, overlay, gray, rounded corners] (16,-.4) -- (-0.5,-.4) -- (-0.5,1)  -- (16,1) -- cycle;         \shade[overlay,ball color=gray] (16,0.2) circle (8pt);         \end{tikzpicture}         }              \setparaindent{1cm}         \setafterparaskip{1cm}         \setparaheadstyle{\Large\itshape\raggedright         \begin{tikzpicture}         \draw[overlay,remember picture,opacity=0.5] node [right,text width=0.4\textwidth, rounded corners, fill=gray!30, inner sep=2ex]{};         \draw[thick,overlay,remember picture, gray!50] (0,-.1)--(7.5,-.1);         \draw[ultra thick,overlay,remember picture, gray!70] (0,-.2)--(7.5,-.2);         \draw[thick,overlay,remember picture, gray!40] (0,-.3)--(7.5,-.3);         %\draw[ultra thick,overlay,remember picture,gray!70] (0,-.2) -- (-20,-.2);         \shade[yshift=6pt,ball color=gray,overlay] (0,-.2) circle (8pt);         \shade[ball color=gray,overlay](7.5,0) circle (8pt);         \end{tikzpicture}         }                        %%%%%%%% This is to get a Concept              \usepackage{lipsum}                                           %  this is the start of the code which is our interest               \newcounter{theorem}         \renewcommand\thetheorem{Concept ~\arabic{theorem}}         \makeatletter         \mdf@dolist{\mdf@do@stringoption}{%             {theoremtitle=={}}%         }         \renewrobustcmd\mdfcreateextratikz{%               \node[anchor=west,rounded corners,draw,thick,shading=axis,left color=gray!20,xshift=10cm,minimum height=.7cm,minimum width=2cm] at (P-|O)                        {~\mdf@frametitlefont{\thetheorem}%                           \ifdefempty{\mdf@theoremtitle}%                           {~}%                           {:~\mdf@theoremtitle~}%                       };         }         \makeatother         \mdfdefinestyle{theoremstyle}{%         outerlinewidth=1pt,         innerlinewidth=3pt,         roundcorner=5pt,         linecolor=black,         shadow=true,         tikzsetting={shading=axis,top color=gray!10},         innertopmargin=1.2\baselineskip,         skipabove={\dimexpr0.5\baselineskip+\topskip\relax},         needspace=3\baselineskip,         frametitlefont=\sffamily\bfseries,         settings={\global\stepcounter{theorem}},         }         \newenvironment{concept}[1][]         {\begin{mdframed}[style=theoremstyle,theoremtitle={#1}]         \relax}{         \end{mdframed}         }              \makeatother                       %%  this is the end of the code which is of our interest                                        \usepackage{babel}           \providecommand{\definitionname}{Definition}           \providecommand{\examplename}{Example}         \providecommand{\theoremname}{Theorem}                      \begin{document}         \chapter{chapter one}         \begin{concept}         first chapter first concept         \end{concept}         \chapter{chapter two}         \begin{concept}         second chapter first concept         \end{concept}         \end{document}      This is a code created by Lyx The counter code is commented as code required by us above. And the counter variable to reset is named "theorem"


title: Titlesec and ACM conference format: How to get proper capitalization of sections

text: The ACM conference format requires that the first three sections "Catagories and Subject Descriptors", "General Terms" and "Keywords" be special sections with lowercase titles. All other sections should be uppercase. In the sig- alternate document template provided here this special capitalization scheme is implemented by defining the commands `\catagories`, `\terms` and `\keywords`.               \def\keywords{\if@twocolumn     \section*{Keywords}     \else \small     \quotation     \fi}      As soon as I include the titlesec package in my paper, all section titles become lowercase. I can make all section titles uppercase with the following command: `\titleformat{\section}{\secfnt\uppercase}{\thesection}{1em}{}` where `\secfnt` is a special section font defined in the ACM template. All sections become uppercase because the definitions of `\keywords` etc. are just specially defined sections (see above code block). My question is does anyone know how to implement the special capitalization scheme required by ACM while still useing the tilesec package? Or maybe an alternative way to reduce spaceing between sections without useing tilesec? For refference the way section capitialization is implemented in the .cls template file is:               \def\section{%          \@startsection{section}{1}{\z@}{-10\p@ \@plus -4\p@ \@minus -2\p@}% GM         {4\p@}{\baselineskip 14pt\secfnt\@ucheadtrue}%     }


title: How to obtain golden ratio for KOMA article class

text: I use `\documentclass[11pt,captions=nooneline]{scrartcl}` and I would like to know how I can achieve better margins than default. Apparently, the `typerea` package can help but I find the documentation confusing. How can I obtain a golden margin ratio? What are the best margin choices for scientific articles?


title: Syriac Abbreviation Mark

text: I'm trying to implement in XeLaTeX the Syriac Abbreviation Mark (see here: http://en.wikipedia.org/wiki/Syriac_Abbreviation_Mark). The code I came up with is the following:               \catcode`^^^^070f=13     \chardef\zwj="200D     \def^^^^070f#1 {\zwj\aemph{#1}\ }      Now I can use the control character in the text (assuming I have a Syriac font):               \documentclass{article}          \usepackage{polyglossia}          \setmainlanguage{syriac}          \setmainfont{Estrangelo Edessa}               \catcode`^^^^070f=13     \chardef\zwj="200D     \def^^^^070f#1 {\zwj\aemph{#1}\ }          \begin{document}          ܫܠ܏ܡܳܐ ܫܠܡܐ.          \end{document}      Here is the result: ![Example of Syriac Abbreviation Mark](http://i.stack.imgur.com/ZMdsX.gif) This is not perfect for two reasons. First, it requires a space to end the control sequence (in fact, it should be ended by any non-Syriac character). Second, ideally the result should be an overline with 3 dots in it (beginning, end and middle - see above Wikipedia article for example). Could anyone help me out with this?


title: Experimenting with l3box and l3skip's dim variables

text: Note: The following MWE has no significance in use or further application of any kind rather than just for experimenting with the packages explicitly written on the question title. ![enter image description here](http://i.stack.imgur.com/roQ6r.png)               \documentclass{article}     \usepackage{xparse}     \ExplSyntaxOn     \dim_new:N \l_shcstyle_instruction_length     \dim_set:Nn \l_shcstyle_instruction_length { 8em }          \box_new:N \l_shcstyle_bullet_box     \hbox_set:Nn \l_shcstyle_bullet_box { \textbullet\  }           \NewDocumentCommand{\mybulletpar}{ m }      {         \parbox{\dim_use:N \l_shcstyle_instruction_length}          {           \hbox_overlap_left:n             {              %\box_move_up:nn { 0ex }              %{               \box_use:N \l_shcstyle_bullet_box               %}            }            #1          }      }     \ExplSyntaxOff          \begin{document}     This is a \mybulletpar{some random text used to test newcommand}          \end{document}      So I have been toying around with some of the LaTeX 3 packages, especially `l3box` and `l3skip` since they seemed easy to understand, but what am not sure is of their proper usage and implementation in commands. For example, the MWE above I created a new dimension; I suppose I named it correctly by putting it local. After which, I set its size to `8em`. Then I created a box and used it to set the contents of an `hbox`. Nothing hard so far. I then tried to use the `\hbox_overlap_left:n { box }` command to somewhat act like an `\llap{<content>}`. (Am not really sure if it is its proper use.) But note that when I use the box I created `\box_use:N \l_shcstyle_bullet_box`, it creates an empty line. Weird? I honestly am just experimenting on this. Any insights and corrections of naming, usage or other sample implementations of the commands would help me better understand LaTeX 3. Note that `interface3` only provides some descriptions of the commands. I am also interested in seeing how to use the following commands:   * `\box_move_right:nn {<dimexpr>} {<box function>}`   * `\box_move_left:nn {<dimexpr>} {<box function>}` and those commands involving - `\vbox:n {<contents>}`


title: Fixing a list issue

text: Let us consider the following MWE:               \documentclass[letterpaper]{article}     \usepackage[marginparwidth=2in]{geometry}     \usepackage{amsmath,amssymb}     \usepackage{calc}     \usepackage{marginnote}     \usepackage{enumitem}          \newenvironment{test}[1][3.8ex]{%     \renewcommand{\theenumi}{\alph{enumi}}%     \renewcommand{\labelenumi}{\theenumi)}%     \renewcommand{\theenumii}{\roman{enumii}}%     \renewcommand{\labelenumii}{\theenumii)}%     \renewcommand{\marginparsep}{1em}%     \marginnote{List}[#1]%       \list{}{%       \setlength{\leftmargin}{0pt}%       \setlength{\rightmargin}{0pt}%       \setlength{\parfillskip}{0pt plus 2fil}%       \setlength{\itemsep}{0pt}%       \setlength{\topsep}{1ex}%       \setlength{\partopsep}{0ex}       \setlength{\parskip}{0pt}%       \item\relax%       }%     }{       \endlist\ignorespacesafterend}          \reversemarginpar     \setlength{\parindent}{0pt}     \begin{document}              \begin{test}%          Some random text             \begin{enumerate}             \item To answer the first part, we are going to find $A \cup B $ followed by the intersection of this with set $C$. Thus,             \[(A \cup B ) \cap C =\{1,2,3,4,5,6,8\} \cap \{4,5,7\}= \{4,5\}\]             \item In the second part, we will first find $B \cap C$ followed by the union of this with set $A$. Hence,                 \[A \cup (B \cap C)=\{1,2,3,4\} \cup \{5\} =\{1,2,3,4,5\}\]             \end{enumerate}             \end{test}     \end{document}      ![enter image description here](http://i.stack.imgur.com/1XuCz.png) If you notice, the enumerate does not align horizontally with the margin note. How can this be achieved. Any improvements to the code above will be appreciated. My approach would be to change the `topsep` may be to `0ex` but that is not enough. A `\vspace{<length>}` is my last resort but seems too obvious. There are several issues:   1. The environment. I know its not the best but at least it compiles   2. The use of `[3.8ex]` to adjust the marginnote. Don't understand why it cannot occur naturally and if so what can be done to remedy that.   3. The `a` appears where the `b` is. What I am trying to create is an example\solution environments.


title: Create randomized page design in a songbook

text: I want to create a songbook, using either the package `songbook` or the package `songs`, because every song must have guitar tabs (and I want to have the possibility of adding notes to the songs later). Now I want to do something special: I have several drawings as pdf or jpg, and I want to decorate the border of the pages with these drawings. But they should distributed randomly over the book, e.g. on page 1 drawing 1 is used, on page 2 drawing 5, on page 3 drawing 2 etc. Now my question is: How can I create a page layout where these drawings are used as borders and furthermore they are distributed randomly?


title: How to use macros with parameters inside a \newenvironment?

text: I would like to define a new environment that changes the section titles via `\titleformat`. Obviously I have to "escape" the `#1` somehow, so it is not considered to be an (undeclared) parameter to `local_format_env`, but a parameter to `\titleformat`. How do I do that? (Omitting the `[explicit]` option to `titlesec` is not an option due to constraints not present in the example for simplicity of presentation.) Minimal non-working example:               \documentclass{scrbook}     \usepackage[german]{babel}     \usepackage[utf8]{inputenc}     \usepackage[explicit]{titlesec}          \newenvironment{local_format_env}{         \titleformat{\section}{\normalfont\scshape\Large}{}{0pt}{#1} % <-- needs excaping     }{         \titleformat{\section}{\normalfont\Large}{}{0pt}{#1}         % <-- needs escaping     }          \begin{document}          \section{Global Format}          \begin{local_format_env}     \section{Local Format}     \end{local_format_env}          \end{document}


title: XeLaTeX: System font for headers only?

text: I know that you can use `\setmainfont` for normal text but is there any command that will apply a font only to headers (chapters, sections, subsections)?


title: How to eliminate the gap in a chain?

text: In the following code, I used `node distance=0` and `outer sep=0` to position the nodes besides each other seamlessly.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{chains}          \begin{document}     \begin{tikzpicture}[         start chain=going right,         every node/.style={on chain, fill=black, text=white},         text height=.8em,         text depth=.2em,         node distance=0,         outer sep=0pt       ]       \node {a};       \node {bc};       \node {def};     \end{tikzpicture}     \end{document}      However, the result still shows gaps. ![small gaps are still left between the nodes](http://i.stack.imgur.com/mabmU.png) What did I miss?


title: Censor text spanning multiple lines

text: I'd like to censor or hide some text while replacing it with the appropriate amount of white-space. The replacement text cannot be searchable. The text to be hidden usually exists in the LR mode. The `censor` and `invisible` packages do not seem to work well with text spanning multiple lines. One solution, I believe, would be to turn each word into an appropriately sized box, `\makebox[\wordwidth]{}`, and let TeX (or LaTeX) handle the rest since `\makebox` is treated like a word. I am very `\sloppy`, so the problem is _hopefully_ simplified because you don't need to worry about whether a dash will be placed in the middle of a word. (Although, the `soul` package is capable of handling such situations.)


title: Source code customization for specific words?

text:
I'd like to highlight some specific words for HTML5 code manually in LaTeX. In other words, I don't want to define an exact structure for highlighting the language, but do the highlights only for the words I select. So let's say for the code below, I only want to make `signin-login` bold and green, and only its `type="text"` bold and red, while the rest of the code stays the same.                   <form id="navbar-loginform" class="navbar-form navbar-right hidden">
         <input id="signin-login" highlight="" placeholder="Username" class="form-control" type="text">

         <input id= "signin-password" highlight="" placeholder="Password" class="form-control" type="password">
         <button highlight="" type="submit" class="btn btn-success">Sign in</button>         </form>      How can I achieve this? Could you please show me a short working example for this?


title: Auctex TOC with multifile document

text: I'm writing my PhD thesis with LaTeX-Sweave and I use EMACS with AucTex and ESS. I have a master file (`master.tex`) and some slave files and my question is about the use of the TOC in the slave files. How should I do to see the TOC on the slave files? Because when I pres `C-c=` I see only an empty TOC. Do you have any suggestion?


title: Big curly brackets and rotated text around table

text: I have a rather cramped looking table here showing the chance of a nurse touching a surface type given (s)he is doing a certain type of care. I would like to make a large curly bracket to the left of the rows with a vertical label ( **Care type** ), and one above the columns saying ( **Surface category** ). Any thoughts? Also I'm very open to any suggestion of how best to display this table at your discretion.               \documentclass{article}     \usepackage{amsmath} % provides \text command     \begin{document}         $$\begin{array}{*{6}{c}}         &\text{Equipment}&\text{Patient}&\text{Hygiene products}&\text{Near-bed objects}&\text{Far-bed objects}\\         \text{Direct Care}&\frac{49}{192}&\frac{170}{913}&\frac{18}{173}&\frac{79}{392}&\frac{21}{83}\\         \text{Housekeeping}&\frac{22}{89}&\frac{7}{89}&\frac{6}{89}&\frac{35}{89}&\frac{19}{89}\\         \text{Mealtimes}&0&\frac{6}{55}&\frac{2}{11}&\frac{31}{55}&\frac{8}{55}\\         \text{Medication round}&\frac{23}{429}&\frac{23}{143}&\frac{7}{39}&\frac{50}{143}&\frac{10}{39}\\         \text{Misc.}&\frac{4}{165}&\frac{19}{165}&\frac{8}{33}&\frac{10}{33}&\frac{52}{165}\\         \text{Personal Care}&\frac{3}{89}&\frac{15}{89}&\frac{19}{89}&\frac{36}{89}&\frac{16}{89}\\         \text{Overall}&\frac{7}{233}&\frac{34}{233}&\frac{54}{233}&\frac{80}{233}&\frac{58}{233}\\         \end{array}$$     \end{document}      ![enter image description here](http://i.stack.imgur.com/blsk2.png)


title: Vertical lines in pgfgantt

text: I'm using the package pgfgantt to create Gantt charts. I've seen that with the "today" key one can have vertical line drawn in the chart. However, only one today key is allowed. How can I have several vertical lines? I want to draw a Gantt chart for several years, and I'm using the vertical grid to have dotted lines for each month, but I'd like to have a vertical solid line to split each of the years.


title: How to visualize dimensions of frame components in beamer?

text: Is there a package to visualize dimension of all frame components (head/footline, sidebars, navigation bar etc) in `beamer`? I tried to search for something similar to `layout` package, but did not succeed.


title: Rotatebox in eso-pic background rotates whole page with scrbook, but not in pdfLaTeX

text: I am using the `eso-pic` package to create a draft sign in the background of my document (`scrbook`-class). The sign is rotated 45° on the page. Everything works fine. I use `TeXLive` and `Kile` with `Suse 12.3`. Since I need `TikZ` and `pgfplots` in my document I use `LaTeX` (`latex -shell-escape -interaction=nonstopmode '%source'`) -> `DVItoPS` (`dvips -o '%S.ps' '%S.dvi'`) -> `PStoPDF` (`ps2pdf '%S.ps' '%S.pdf'`) to create the pdf. Now I have to additionally insert a draft-copyright notice on the left hand side of every page. I do produce it the same way I did with the original draft-symbol. But each `\part{title}` titlepage is put in landscape mode in the pdf-viewer. This does not happen when I compile my MWE with `pdfLaTeX` (`pdflatex -interaction=nonstopmode '%source'`). It also doesn't happen with `scrreprt`. The `LateX`-result is: ![LaTeX result:](http://i.stack.imgur.com/1o7Mu.png) The `pdfLaTeX` result is: ![pdfLaTeX-result:](http://i.stack.imgur.com/xwKNY.png) Using the `rotating`-package a similar behaviour was found in this thread. It was said that by @Mico `graphicx` package is not intended to be used together with dvips; it should only be used by a TeX engine/format that produces pdf format directly. Is this the problem here also? The workaround mentioned in the thread does not work in my case. Is there any other way to fix this?               \documentclass[openany]{scrbook}          \usepackage{graphicx}     \usepackage{lipsum}     \usepackage{type1cm,eso-pic}     \usepackage{xcolor}          \makeatletter     \AddToShipoutPicture{%     \setlength{\@tempdimb}{.5\paperwidth}%     \setlength{\@tempdimc}{.5\paperheight}%     \setlength{\unitlength}{1pt}%     \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%     % Draft     %\makebox(0,0){\rotatebox{45}{\textcolor[gray]{0.75}% <- it doesn't happen here     %{\fontsize{3cm}{3cm}\selectfont{Draft}}}}%     % Copyright     \makebox(-500,-0){\rotatebox{90}{\textcolor[gray]{0.75}% <- it does here     {\fontsize{0.7cm}{0.7cm}\selectfont{Draft \textcopyright Copyright \the\year{} - Copyright owner}}}}     }%     }     \makeatother          \begin{document}          \part{Part 1}          \chapter{Chapter 1}          \section{Section 1}          \lipsum[1-2]          \section{Section 2}          \lipsum[1-2]          \chapter{Chapter 2}          \lipsum[1-4]          \part{Part 2}          \chapter{Chapter 1}          \lipsum[1-6]          \chapter{Chapter 2}          \lipsum[1-6]          \end{document}


title: List of tokens from TeX mouth

text: Is it possible to get list of tokens which comes from TeX "mouth"? If I understand correctly: in mouth all macros, conditionals and special operations (like \the and \input) are expanded and then goes to "stomach".


title: Documentation for the animate package with TikZ

text: I'm trying to locate some detailed documentation on the `animate` package. When I look at examples here and in other places, there is really way too much unknown syntax to figure out. I was hoping someone here could help. I have started using TikZ a couple of months ago and wanted to try my luck with animating some examples, but mostly I find fairly complex examples that others have created and I need to start off with something a little more basic. I've also searched online, but it just seems as though there is a missing manual somewhere. I have the official documentation by the way.


title: Surrounding Nodes with an Ellipse in TikZ

text: The following code places six nodes along the perimeter of an equilateral triangle:               \begin{tikzpicture}[every node/.style={draw}]           \node (l1) at (0,0) [circle] {};     \node (l2) at (2,0) [circle] {};     \node (l3) at (4,0) [circle] {};     \node (m1) at (1, 1.732) [circle] {};     \node (m2) at (3, 1.732) [circle] {};     \node (h1) at (2, 3.464) [circle] {};          \end{tikzpicture}      How can I surround each "leg" of the triangle with an ellipse in a manner similar to the following: ![enter image description here](http://i.stack.imgur.com/id9IL.png)


title: How to span the background graphic across verso and recto pages in ConTeXt?

text: I want to place background images behind all of my part titles, with the image spanning across two pages, e.g.:                ___________ ___________     |           |           |     | Part 1    |           |     | Birds of  |           |     | South     |           |     | America   |           |     |___________|___________|      So far, I have created this code:               \definelayer[patternleft][x=0mm, y=0mm, width=\paperwidth, height=\paperheight]     \definelayer[patternright][x=0mm, y=0mm, width=\paperwidth, height=\paperheight]          \setlayer[patternleft]                {%         \framed[frame=off, align=right]{%             \clip[nx=2, ny=1, x=1, y=1]{%                 \externalfigure[background.jpg][factor=500]}%         }%     }%          \setlayer[patternright]                {%         \framed[frame=off, align=left]{%             \clip[nx=2, ny=1, x=2, y=1]{%                 \externalfigure[background.jpg][factor=500]}%         }%     }%      I then put it in the document like this:               \setupbackgrounds[page][background=patternleft] % sets background for verso     \part{Birds of South America}          \page[right]     \setupbackgrounds[page][background=patternright] % sets background for rector     \page[right]     \setupbackgrounds[page][background={}] % sets a blank background              This is some text.      This has two problems:   * The images are the same size as the twp pages, however, white space remains along the margins and fold.   * This sometimes places the backgrounds on the wrong pages. How can I improve this code so that the background graphic spans across verso and recto pages on the `\part` titles?


title: How to make sure that a source file is in UNIX mode?

text: **How to make sure that a source file is in`UNIX` mode?** In other words, how to check that every line in a text file is ended by LF rather then CR+LF? I am asking because a package intended for uploading to CTAN should be saved in `UNIX` mode. Earlier, it was possible to emulate `UNIX` mode in WinEdt, but after upgrading to `WinEdt 7` I don't see UNIX in a list of WinEdt's submodes. P.S. I am using Windows 7.


title: Center my dedication in my thesis

text: Currently, I have               \documentclass[a4paper,     % Seitenformat             12pt,                               %              bibliography=totoc,     % Literaturverzeichnis in das Inhaltsverzeichnis             index=totoc,    % Index in das Inhaltsverzeichnis             abstracton,     % mit Abstrakt             headsepline,    % Trennlinie f�r die Kopfzeile             %footnosepline, % Trennlinie f�r die Fusszeile             ]{scrreprt}               \usepackage{calligra} % for dedication          \begin{document}         \newpage          \vspace{4cm}     {\fontfamily{calligra}\selectfont \begin{huge}  To my parents, my brother and my sister. \end{huge}}               \newpage          \end{document}      I want to have this dedication in the middle of the page, but `\vspace` does not work, how can I do this?


title: Constructing dag-like diagrams

text: I want to draw diagrams that look a bit like this. Mathematically, you could describe them as directed acyclic graphs with dangling arcs. They're somewhat reminiscent of route diagrams. ## Desired output ![enter image description here](http://i.stack.imgur.com/rAfdO.png) Source here. There are four lines dangling in at the top of diagram, then four nodes that operate on these lines, and finally three lines dangling out of the bottom of the diagram. I know how to create this particular diagram in TikZ, but I want to make a package for creating them in general. ## Desired input It is important to me that:   * the user is required to specify as little as possible, so that it is easy to create and modify big diagrams, and that   * the diagram is composed in a row-by-row fashion. This is the code I would **like** my user to type, in order to generate the picture above (I explain the code in the next subsection):               \begin{wickersondiagram}[%       initial lines={a/{pos=10}, b/{pos=30}, c/{pos=50}, d/{pos=70}}]     \step[left=0, right=40, text=decide,%       incoming lines={a,b},%       outgoing lines={e/{pos=10,label=yes}, f/{pos=30,label=no}}]     \\     \step[left=20, right=60,%       pale,%       incoming lines={f,c},%       outgoing lines={g/{pos=30},h/{pos=50}}]     \\     \step[left=0, right=40, text=join,%       incoming lines={e,g},%       outgoing lines={i/{pos=20}}]     \step[left=60, right=80,%       incoming lines={d},%       outgoing lines={j/{pos=70}}]     \\     \end{wickersondiagram}      By 'row-by-row', I mean that if I removed the last few rows from this code, I would still obtain a perfectly valid picture, and it would look just like the one above but with the lower portion missing. ## Explanation of desired input The user starts the diagram by specifying the horizontal placements of the `initial lines`. Each line is assigned a name, here `a`, `b`, `c` and `d`. While constructing the diagram, my package should maintain an implicit 'state', containing the names of the lines and their placements. At this point in the construction, the state is               {a ↦ 10, b ↦ 30, c ↦ 50, d ↦ 70}.      Then the user creates a `\step`. The horizontal position is specified with the `left` and `right` keys. There is optional `text` on the step, which is 'decide' in this case. The `incoming lines` are removed from the state, and the `outgoing lines` are added to the state. At this point the state becomes:               {e ↦ 10, f ↦ 30, c ↦ 50, d ↦ 70}.      The point of maintaining the state is so lines that are not involved in a particular step are drawn in without the user having to keep specifying them. For instance, the package should implicitly draw the lines `c` and `d` to the right-hand side of the 'decide' step. Occasionally two or more steps occur in parallel, as seen at the bottom of the picture above. I propose to deal with this in the syntax by using `\\\` to explicitly start a new 'row' of steps. ## My approach so far My approach so far has been to try to store the state in a series of macros, e.g.:               \def\state@line@a{10}     \def\state@line@b{30}     \def\state@line@c{50}     \def\state@line@d{70}     \def\state@line@e{10}     \def\state@line@f{30}      and then maintain a comma-separated list of those lines which are currently in the state, e.g.:               \def\activelines{e,f,c,d}      My previous two questions (here and here), have resulted from my trying to get this approach to work. In those questions, I have condensed my code down to minimal working examples to show the particular technical problem I was facing. I thank the answerers for addressing those problems so thoroughly and considerately. However, since the same people are answering my questions each time, I suspect it is probably better if I just cut to the chase and show what I'm really working on. I have still idealised my problem a bit, to make it easier to explain, but I hope to have preserved most of the technical challenges. ## Extensions I would like eventually to extend my diagrams to much more complicated ones than the example shown above. For instance:   * I want my lines to have customisable thickness (so the elements of the 'state' should really be _tuples_ rather than single integers).   * I want to add a command to 'twist' two or more lines over each other, swapping their horizontal positions.   * The user must currently specify a `left` and `right` position for each step, but I want eventually to calculate these automatically from the positions of the incoming and outgoing lines.   * I want to add special 'compound' nodes that contain diagrams within them.   * I want to add another type of line.   * I want to add a command to take a snapshot of the current 'state', and a command to restore a previous 'state'. Therefore, it is important to me that your solutions are robust and understandable enough so that I can fiddle with them a lot!


title: biblatex - volume and issue in words and with comma in front of them

text: So the current product looks like this: > Gillies, A. (1933), “Herder and the Preparation of Goethe’s Idea of World > Literature”, in: Publications of the English Goethe Society 9 (2), pp. > 46–67. Due to guidelines I must produce this though: > Gillies, A. (1933), “Herder and the Preparation of Goethe’s Idea of World > Literature”, in: Publications of the English Goethe Society, vol. 9, iss. 2, > pp. 46–67. ("Volume" and "issue" would be fine as well.) Here is an MWE:               \documentclass[     12pt,     a4paper     ]     {scrreprt}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     %\usepackage[english]{babel}          \usepackage{hyperref}     \usepackage[     language=auto,     style=authoryear,     backend=bibtex,     hyperref=true,     isbn=false,     doi=false,     citereset=chapter,     maxcitenames=3,     dashed=false,     sorting=nyt,     natbib=true, %faking natbib-commands     firstinits=true,     terseinits=false     maxbibnames=99,     %autopunct=true,     uniquename=init     ]{biblatex}     \usepackage{xpatch}          \renewcommand*{\newunitpunct}{\addcomma\space}           \begin{filecontents*}{lit.bib}          @Article{gillies,       hyphenation     = {british},       author      = {Gillies, Alexander},       title       = {Herder and the Preparation of Goethe's Idea of World Literature},       journaltitle    = {Publications of the English Goethe Society},       volume      = {9},         issue = {2},       date        = {1933},       pages       = {46--67},       annotation      = {An \texttt{article} entry with a \texttt{series} and a \texttt{volume} field.                 Note that format of the \texttt{series} field in the database file}     }     \end{filecontents*}          \addbibresource{lit.bib}          \begin{document}     \chapter{First Chapter}     \begin{itemize}         \item For the case of multiple editors, these are just some words.\footcite[See][p. xi]{gillies}.     \end{itemize}     \printbibliography     \end{document}


title: Draw a vertical line with filled areas and dateplot

text: I'like to add an vertical line with some text in a graphic, but i've not found the way. I tried something like               \addplot coordinates { (2008-01-01,0)  (2008-01-01,130)} node {some text};      but it didnt work and i'm stuck ![](http://i.stack.imgur.com/R929e.jpg) Here is a working minimal example, that creates first the ybar stacked               \documentclass{standalone}                   \usepackage{pgfplots}     \usepgfplotslibrary{dateplot}          \begin{document}          \pgfplotstableread[col sep=comma,header=true]{     Year,1,1.1,1.2,1.3,1.4     2005,0,0.29,21.97,42.22,27.98     2006,0,1.43,8.25,47.53,29.96     2007,0.05,0.05,13.62,45.26,34.05     2008,0.06,0.89,10.63,30.84,44.63     2009,0.09,0,7.71,30.82,46.75     2010,0,0,1.65,28.34,27.02     2011,0,0,0.94,29.02,7.64     }\data          \begin{tikzpicture}              \begin{axis}[                 stack plots=y,                 area style,                                   enlarge x limits=false,                 enlarge y limits=upper,                                      x tick label style={/pgf/number format/1000 sep=},               ymax=150             ]             \addplot table [x=Year, y=1] {\data} \closedcycle;             \addplot table [x=Year, y=1.1] {\data} \closedcycle;                          \addplot table [x=Year, y=1.2] {\data} \closedcycle;             \addplot table [x=Year, y=1.3] {\data} \closedcycle;             \addplot table [x=Year, y=1.4] {\data} \closedcycle;                  \end{axis}     \end{tikzpicture}               \end{document}


title: What is the most bizarre thing you have seen done with TeX

text: I think the questions says it all! :) By TeX, I mean any derivative of TeX as long as the code is clearly a derivative of TeX, i.e. that it could belong on TeX.SX (and not pure Lua for example). I'll give two answers myself so you see what I mean.


title: Placing figure on an even/odd page

text: I'm writing a two sided document (it will be printed as a book) and I've got two figures which takes up a whole page each. These two figures are related so I want them to be side by side in the resulting book, i.e. figure1 should be placed on an even page and figure2 should be placed on the following (odd) page. Is there any way I can automatically achieve this? This is how I'd like the resulting pages in the book to be:               |p2--------||p3--------|     |          ||          |     | Fig1     || Fig2     |     |          ||          |     |          ||          |     |(caption) ||(caption) |     |----------||----------|


title: Bar of pie chart

text: I want to construct a bar of pie chart like the one excel does, but in LaTeX. I am having a lot of problems to come with something like this so I was wondering if somebody could help me. ![enter image description here](http://i.stack.imgur.com/Dd8JP.png)


title: Hyperlink button in the same slide that consists of "\includepdf"

text: I am making slide using beamer. I'd like to use hyperlink button at the end of the table from another PDF file named `table4`. I am trying the following, but "main" button shows up different slide. Is there any way that table and hyperlink button are shown in the same slide?               {             \label{within}          \setbeamercolor{background canvas}{bg=}         \includepdf[width=1.8\textwidth, height=2.5\textheight, pages=1]{table4.pdf}              Back to \hyperlink{main}{\beamerbutton{main}}.     }


title: Page break table with single cell

text: I have an environment set up of `longtables` that I use as "tips"-boxes and exercises in my book. The left column shows only one word rotated (tips, exercise or whatever) while the right contains the rest of the text. Now the problem is that the right column is a single cell so (xe)latex decides to put the table on a new page if it is too big. Here is an example of what I mean: ![enter image description here](http://i.stack.imgur.com/M1gck.png) So how can I make it start on the current page and break whenever necessary, then continue on the next page? My code for the table:               \documentclass[11pt]{book}          \usepackage{longtable}     \usepackage{array}     \usepackage{rotating}     \usepackage{lipsum}          \newcolumntype{M}[1]{>{%       \parskip=0.5\baselineskip%       \advance\parskip by 0pt plus 2pt        \setlength{\parfillskip}{30pt plus 1fil}}m{#1}}          \newenvironment{exercise}[1]     {         \begin{longtable}{m{0.05\textwidth}|M{0.85\textwidth}}         \rotatebox{90}{\textbf{Övning}} & \textbf{#1} \newline     }     {\end{longtable}     \bigskip     }          \begin{document}          \lipsum          \begin{exercise}{1}     \lipsum     \end{exercise}          \end{document}


title: Inconsistent behavior of setspace package in ctable doinside

text: This is odd:               \ctable[     doinside=\singlespacing,     %doinside=\setstretch{1}     ]     {lp{5cm}}     {}     {\FL     Blubb & Blobb simply dummy text of the printing and typesetting industry. Lorem Ipsum         has been the industry's standard dummy text ever since the 1500s. \ML     \LL     }      `\singlespacing` in `doinside` gives various Errors. `\doublespacing`, `\onehalfspacing` works, as does `\setstretch{x}`. Could this be a bug? If so, where to report it? And do I get the same linespacing with `\setstretch{1}` as with `\singlespacing`?


title: Insert white line before algorithm

text: I am using the `algorithm` environment to create a simple list of pseudo-code, but I don't like it that the first line is so close to the rule. Therefore, I would like to insert a single white line like `\hfill` into every algorithm I'm using. Is it easy to do that without typing `\hfill` in every algorithm block? The code I have produced _with_ `\hfill` looks like this:               % the important used packages     \usepackage{mdwlist}     \usepackage{algorithm}          \begin{algorithm}[H]     \hfill % I don't like this here, I would stylize this automatically in some way.     \begin{enumerate*}         \item Do bla.         \item Do bla.         \item Do bla.         \item Do bla.     \end{enumerate*}     \caption{My algo. \label{alg:1}}     \end{algorithm}


title: LaTeX editor with live preview for Windows and RTL language support?

text: Looking for a LaTeX editor for Windows with the following features:   * Live preview. (Inherited live preview, not something achievable if you do some tricks.)   * RTL language support. (Hebrew for example)   * Auto-complete LaTeX keywords. (Like in LED)  Googled and browsed other questions here, on SO and on tex. All I find is either only for mac or have no live preview. Can someone please point one app that support all the features stated above?


title: Lua function to see if a macro is defined or not

text: I need to determine if a TeX macro is already defined or not via a Lua function. Any ideas?               function IsTeXMacroDefined(macroname)        if defined(macroname) then return true end        return false     end


title: Graph of polynomial, scaling y-axis

text: I'm new to TikZ and to this site, so forgive me if a similar question has already been asked. I'd like to graph the polynomial function f defined by f(x) = x3 - 6x2. I want the y-axis scaled so that the graph of f fits. (I had to manually change the numbers on the y-axis. Such a noob, I know.) If I don't plot the graph of f, I have a nice, centered coordinate system. Adding the function messes up everything. Can someone help me with this? Here is my current setup:               \begin{center}     \begin{tikzpicture}[>=stealth]     %The following places numerals along the x-axis     \coordinate (-5 on x)   at  (0,5);     \node [below left]  at  (-5 on x)   {\small $-5$};     \coordinate (-4 on x)   at  (1,5);     \node [below left]  at  (-4 on x)   {\small $-4$};     \coordinate (-3 on x)   at  (2,5);     \node [below left]  at  (-3 on x)   {\small $-3$};     \coordinate (-2 on x)   at  (3,5);     \node [below left]  at  (-2 on x)   {\small $-2$};     \coordinate (-1 on x)   at  (4,5);     \node [below left]  at  (-1 on x)    {\small $-1$};     \coordinate (0 on x)    at  (5,5);     \node [below left]  at  (0 on x)    {\small $0$};     \coordinate (1 on x)    at  (6,5);     \node [below left]  at  (1 on x)    {\small $1$};     \coordinate (2 on x)    at  (7,5);     \node [below left]  at  (2 on x)    {\small $2$};     \coordinate (3 on x)    at  (8,5);     \node [below left]  at  (3 on x)    {\small $3$};     \coordinate (4 on x)    at  (9,5);     \node [below left]  at  (4 on x)    {\small $4$};     \coordinate (5 on x)    at  (10,5);     \node [below left]  at  (5 on x)    {\small $5$};          %The following places numerals along the y-axis     \coordinate (-40 on y)  at  (5,0);     \node [below left]  at  (-40 on y)  {\small $-40$};     \coordinate (-32 on y)  at  (5,1);     \node [below left]  at  (-32 on y)  {\small $-32$};     \coordinate (-24 on y)  at  (5,2);     \node [below left]  at  (-24 on y)  {\small $-24$};     \coordinate (-16 on y)  at  (5,3);     \node [below left]  at  (-16 on y)  {\small $-16$};     \coordinate (-8 on y)   at  (5,4);     \node [below left]  at  (-8 on y)   {\small $-8$};     \coordinate (8 on y)    at  (5,6);     \node [below left]  at  (8 on y)    {\small $8$};     \coordinate (16 on y)   at  (5,7);     \node [below left]  at  (16 on y)   {\small $16$};     \coordinate (24 on y)   at  (5,8);     \node [below left]  at  (24 on y)   {\small $24$};     \coordinate (32 on y)   at  (5,9);     \node [below left]  at  (32 on y)   {\small $32$};     \coordinate (40 on y)   at  (5,10);     \node [below left]  at  (40 on y)   {\small $40$};     %The following draws the grid lines     \draw[help lines] (-0.25,-0.25)        grid (10.25,10.25);     %The following draws the x-axis     \draw[line width=1.0pt,->] (-0.5,5) -- (10.5,5)        node[right] {$x$};      %The following draws the y-axis     \draw[line width=1.0pt,->] (5,-0.5) -- (5,10.5)        node[above] {$y$};     \draw[color=blue,domain=-3:5.2]        plot (\x+5,{5+(\x*\x*\x/8)-(3*\x)/8})        node[right] {$f(x) = x^3 - 3x$};     \end{tikzpicture}     \end{center}


title: Problem with line spacing in Lyx 1.6.9

text: Maybe it's a silly thing, but in order to change line spacing to Double I have to "navigate" to Document>>Settings>>Text layout. If I click on the icon `Paragraph Settings` from the Lyx toolbar and change it to `Double`, it doesn't work, as it keeps the current setting (Single). I don't think it's a bug, but it seems weird. Why doesn't the shortcut work?


title: how to use latexonly for setting tabular column specs

text: I am trying to compile this example with pdflatex and also with latex2html. I need to make the table column specification different for each case. Here is an example of what I have, but this generates an error, and I am not sure how to resolve the error. What is wrong with this?               \documentclass[]{article}%     \usepackage{html}     \begin{document}          \begin{htmlonly}%        \begin{tabular}{|p{.5in}|}     \end{htmlonly}%          \begin{latexonly}%        \begin{tabular}{|c|}     \end{latexonly}%          \hline          test1\\     test2\\          \end{tabular}     \end{document}      then               pdflatex foo.tex      gives                 LaTeX Error: \begin{tabular} on input line 10 ended by \end{latexonly}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.       ...          l.11 \end{latexonly}                          %      Why it thinks tabular ended with latexonly? I really do not want to make 2 copies of the whole table itself, and write                 \begin{latexonly}.. table ...\end{latexonly}        \begin{htmlonly}.. table ...\end{htmlonly}      I thought I'll try to be 'smart' and just put these around the column specs, but I think I do not understand how Latex environments interact with each others very well. Unless I am making some silly error, is there a better way to do this (Other than duplicating the whole table)? thanks, ps. tags here are confusing, which tag should one use for general latex questions? Is this the right group for Latex questions or is the other stackoverflow group the right one? **update** I got a solution from another group that works for me, thought to update here. The solution is to use `\latexhtml` like this               \latexhtml{% latex version       \begin{tabular}{|c|}%     }{% version for latex2html       \begin{tabular}{|p{.5in}|}%     }      thanks to Robin Fairbairns for the above solution. This worked for my latex2html and pdflatex. thanks also to everyone here for taking the time to answer. So many things to learn about Latex.


title: Setting the upper margin of chapter titles in scrbook

text: In a `scrbook` document I need to set the chapter titles close to the upper page margin, without leading number and with a `\hrule` afterwards. Redefining `\chapterheadstartvskip` does the trick with the margin but won't do the hrule and omits the number. With `titlesec` I can set the \hrule and number, but can't get the title move to the upper. Do I miss something in the `titlesec` setting?               \documentclass[]{scrbook}     \usepackage[a5paper]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{booktabs}     \usepackage[]{blindtext}          % is ignored when titlesec is used     \renewcommand*{\chapterheadstartvskip}{\vspace*{-4\topskip}}      \renewcommand*{\chapterheadendvskip}{}          \usepackage[]{titlesec}     \titleformat{\chapter}[hang]{\huge\sffamily\bfseries}{}{0pt}{}[\hrule\vspace*{-24pt}]          \begin{document}     \chapter{Foobar}     \blindtext          \end{document}      ![unfinished layout](http://i.stack.imgur.com/GZAPh.png)


title: How can I vertically align a beamercolorbox?

text: I am trying to customize a `beamer` theme. In the footline, information such as author, title, date ... are in several `beamercolorbox`es.               \hbox{%     \begin{beamercolorbox}[wd=.70\paperwidth,ht=7.25ex,left,leftskip=2ex]{title in head/foot}%         \usebeamerfont{title in head/foot}\insertshorttitle{} - \insertshortauthor     \end{beamercolorbox}%     \begin{beamercolorbox}[wd=.20\paperwidth,ht=7.25ex,center]{date in head/foot}%         \usebeamerfont{date in head/foot}\insertshortdate{}     \end{beamercolorbox}     \begin{beamercolorbox}[wd=.10\paperwidth,ht=7.25ex,right,rightskip=2ex]{date in head/foot}%         \insertframenumber{} / \inserttotalframenumber     \end{beamercolorbox}}%      I can easily manage the height and width of the box but the text is still completely at the bottom of the box. I would like this text to be vertically aligned. How can I do that?


title: The 'listings' package and UTF-8

text: Please, do you know if there's any possibility how to use the `listings` package together with XeLaTeX? I have to use XelaTeX and therefore I have UTF-8 encoded files. This is not compatible with listings which allows one- byte encoding. (I know there is `listingsutf8` package, but it converts files _from_ UTF-8 which I don't need.) The listings package works somehow, bu I only can use English letters. I've fond some solution like a list of special characters ( Having problems with listings and UTF-8. Can it be fixed? ) but it seems it works only for some letters. It there anything that would support UTF-8 in listing 'naturally'?


title: Problems with filling a path that includes decorations in TikZ

text: I want to construct a rectangle with two sides having a slight curvature and the other two sides being zigzag lines. In the end, I want to fill it. While the construction of the path worked the way I expected, the filling did not. How can I tell TikZ to fill the area inside this rectangle? ![enter image description here](http://i.stack.imgur.com/ObTm3.png)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{intersections, decorations}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \begin{document}     \begin{tikzpicture}[scale=2]          \coordinate (A) at (0,0);     \coordinate (B) at (8,0);     \coordinate (C) at (8,2);     \coordinate (D) at (0,2);          \begin{scope}[decoration=zigzag]     \def\mypath{ (A)  to[out=10,in=170] (B)     decorate[decoration=zigzag] {(B)-- (C)}  (C) to[out=170,in=10] (D)     decorate[decoration=zigzag]{(D)--(A)}       };       \draw [fill=red] \mypath;     \end{scope}     \end{tikzpicture}     \end{document}


title: How to animate a path or how to draw starting fraction of a complex but linear path?

text: I would like to reproduce something similar to Animating Protocols but with a compound path and not a straight one.               \documentclass{standalone}     \usepackage{tikz}     \usepackage{animate}     \usetikzlibrary{intersections}          \begin{document}          \begin{animateinline}[loop]{10}          \multiframe{10}{rPos=0.1+0.1}{     \begin{tikzpicture}[every node/.style={circle,draw}]          \node(R0) at (0,0) {R0};     \node[draw,circle] (R1) at (1,3) {R1};     \node[draw,circle] (R2) at (2,1) {R2};     \node[draw,circle] (R3) at (3,2) {R3};          \path[name path=route] (R0)--(R1)--(R2)--(R3)     node[pos=\rPos,coordinate] (p) {};          %I would like to draw the already defined path from R0 to p     \draw[->] (R0) -- (p);          %\draw \route          \end{tikzpicture}     }      \end{animateinline}     \end{document}       I would like to declare the path and draw only the initial segment in each frame, but I don't know how to draw the "named path". With this solution, the path draw is a straight line between (R0) and (p) but I would like it to follow (R0)--(R1)--(R2)--(R3). Do you know how to do it? pgf's manual only uses 'named path' to find intersections, so I don't know how to use them once defined. Caramdir's answer to `TikZ: draw only a certain central length of a given path` uses a decoration to draw only some part of any path. I've already adapted it to draw the starting segment of the path, but I would like to draw a certain percentatge of path length and not a fixed length (3 cm). I couldn't find in manual how to provide a parameter to a decoration. And in Length, surface, and coordinates of a tikz-pgf path, Andrew Stacey proposes to use a new TEX-SX package still in development. It seems to be they way but I think there should be a easier solution. Do you know it?


title: Can't reduce space with \vskip between parts of vertically splitted rectangle

text: In a multipart rectangle i want to reduce the space between the parts. For a horizontally splitted rectangle i achieved that with an `\hskip` after the `\nodepart` command. For a vertically splitted rectangle i tried it analogously and replaced `\hskip` with `\vskip`. Unfortunately the compiler doesn't like `\vskip` here an ends with an error. The appended code illustrates that. Why `vskip` doesn't work in my example and how could i alternatively reduce the space between vertically splitted parts of the rectangle? * * *               \documentclass{standalone}          \newcommand{\NodeTwoColsH}[2]{%        #1\nodepart{two}\hskip -5pt #2%     }           \newcommand{\NodeTwoColsV}[2]{%        #1\nodepart{two}\vskip -5pt #2%     }           \usepackage{tikz}     \usetikzlibrary{shapes.multipart}          \begin{document}     \begin{tikzpicture}[              sibling distance = 2.5cm,              every node/.style = {                 draw              },              split/.style = {                 rectangle split draw splits=false,                 rectangle split,                 draw,                 rectangle split parts=2              },              v split/.style = {                 split              },              h split/.style = {                 split,                 rectangle split horizontal              }        ]             \node{root}        child { node[h split] {\NodeTwoColsH{Left}{Right}} }        child { node[h split] {\NodeTwoColsH{Left}{Right}}            child { node[v split]  {\NodeTwoColsV{Up}{Down}} }           child { node[v split]  {\NodeTwoColsV{Up}{Down}} }        };          \end{tikzpicture}     \end{document}


title: Creating a Keyboard Shortcut in Emacs for a Command in Auctex

text: I have created a custom command in the command list in Auctex. I want to be able to set it to a key binding like the View command which is `C-c C-v`. I know how to set global key bindings in the `.emacs`. I'm not sure how to do it for a custom command. Here is the line I add into `.emacs`:               (add-to-list 'TeX-command-list'("Doall" "%`%l%(mode)%' %t; bibtex %s && %`%l%(mode)%' %t && %`%l%(mode)%' %t && %V" TeX-run-TeX t t :help "Run LaTeX BibTeX LaTeX LaTeX View"))      Any help on what to put after it to bind this to a key would be great.


title: \mathrel conflict with \left,\right,\middle

text: I refer to this question and particularly to this answer. I defined `\set` by               \usepackage{mathtools}     ...     \DeclarePairedDelimiterX\set[2]{\{}{\}}{#1 \mathrel{\delimsize|} #2}      where `\mathrel{\delimsize|}` imitates `\mid`, which itself is of math relation type but not scaleable. Although `\set[\big]{...}{...}`, `\set[\Big]{...}{...}` etc. work fine, the starred-form `\set*{...}{...}` does not. The problem is that, in this case, `\delimsize` expands to `\middle` and `\mathrel{\middle|}` leads to an error, which can easily be reproduced:               \left\{x \mathrel{\middle|} y\right\}      I could define `\set` alternatively like               \DeclarePairedDelimiterX\setnew[2]{\{}{\}}{#1 \;\delimsize|\; #2}      which should produce in most cases the same spaces around `|` as the version above. However, there is a difference if a set is in scriptstyle:               A_{\set{x}{y}}      puts no spaces around `|`, whereas               A_{\setnew{x}{y}}      still prints `\;|\;`. Do you know a way to make `\mathrel` and `\middle` compatible?


title: Beamer: Full width image, aligned to top with a frame title

text: I would like to include a full width image, aligned to the top of a frame with a frame title. The problem is, I cannot get rid of a line of white space between the orange frame title header and the lion image.               \documentclass[t]{beamer}     % Frames are 128x96mm and top-aligned by default.          % Calculate with \sidebarwidth     \usepackage{calc}     \newlength{\sidebarwidth}          % Theme     \setlength{\sidebarwidth}{28mm}     \usetheme[height=16mm, right, width=\sidebarwidth]{Goettingen}     % Hence, a full frame image is 100x80mm     \usecolortheme{crane}          % Include full-width graphics     \usepackage{graphicx}     \newcommand{\includefullwidthgx}[2][]{%     \noindent\makebox[\columnwidth]{\includegraphics[width=128mm-\sidebarwidth, #1]{#2}}%     }%          \begin{document}     \begin{frame}     \frametitle{frame title text}     \includefullwidthgx{lion.jpg}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/pn9fU.png)


title: \importonly for only processing a single import?

text: I am composing a large document, and instead of using include/input, I use the `\subimport*` command from the `import` package. This allows me to take care of relatives paths very easily. However, the nice thing with `\include` is that I can use `\includeonly` to only include certain files, without breaking references. Is there a similar command for `\subimport`? ## edit I'm trying to put together some code that would do fix this, but my LaTeX knowledge is really very limited. I wrote some kind of weird pseudocode-like thing, may be of help?               \makeatletter     \AtBeginDocument{%       \let\origsubimport\subimport       \newcommand\subimportonly[1]{\let\somevar=#1}       \renewcommand\subimport[1]{\@ifstar                                  if #1 == letvar, use origsubimport*;                                   o/w just include aux?        }}     \makeatother


title: Is there an equivalent to \graphicspath for listings?

text: How can I make the `\lstinputlisting` to search for files in a given directory? I'm thinking of a solution along the lines of the solution to this question. I would like to have a solution like               \lstinputpath{/some/path/in/the/system}     \lstinputlisting{file.ext}      where `file.ext` resides in `/some/path/in/the/system`. I tried to search for such solution without luck. I found that inside of the definition of `\lstinputlistings` the authors use a `\lst@inputpath`. However, a naive modification of this macro doesn't yield any results.


title: No references appear on template

text: I am using the following template found here. I want to use `natbib` (or `BibTeX`, which ever is most convenient) to run my references using `nocite{*}`. It gives me an error message: `Package etoolbox Error: Boolean '\ifciterequest' undefined` (and many others) when I uncomment `%\usepackage[sort]{natbib}`. What do I need to do to let me do this?               \documentclass[english,11pt]{report}             %\documentclass[ngerman,11pt]{report}          %\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}          \usepackage{graphicx, epstopdf}     \usepackage{hgb}     \usepackage{hgbbib}     \usepackage{hgbheadings}     \usepackage{nth}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{parskip}     \usepackage{float}     \usepackage{breqn}     %\usepackage[sort]{natbib}     \usepackage{Sweave}          \newfloat{rcode}{h!t}{rcode}     \floatname{rcode}{Code Example}          \usepackage{setspace}     \doublespacing          %\newcommand{\ts}{\textsuperscript}               \graphicspath{{images/}}   % where are the images?     \bibliography{bib}  % requires literatur.bib      \nocite{*}          \author{}     \title{}     \date{}          %%%----------------------------------------------------------     \begin{document}     %%%----------------------------------------------------------     \maketitle     \tableofcontents          %%%----------------------------------------------------------          blah          %%%----------------------------------------------------------     %\bibliographystyle{}     %\bibliography{bib}      %\nocite{*}     \MakeBibliography     %%%----------------------------------------------------------          \end{document}


title: Trouble adding appendix to ToC

text: I'm trying to add the appendix to my thesis and I've used the following commands:               \begin{appendices}     \chapter{Performance Tables of ABCD}     \input{tab1}     \input{tab2}     \input{tab3}     \input{tab4}     \input{realworld}     \end{appendices}      And I've used the following package:               \usepackage[titletoc]{appendix}      The problem is that it shows the following: ![enter image description here](http://i.stack.imgur.com/zmD4c.png) How can I get it to show just Appendix A? Sorry if this is a stupid question.


title: Misplaced alignment tab character when building a matrix

text: I'm still new to latex. I've been having a problem with building a matrix and I have no idea what I'm doing (or what I'm doing wrong), so be gentle please :)               \begin{matrix}      5 & 6 & 7 \\     4 & P & 0 \\     3 & 2 & 1     \end{matrix}      This is the code for building the matrix and I keep getting error:               Misplaced alignment tab character & 5 &     ...      Can anyone shine some light please?


title: newtheorem report class with `part' as reset counter

text: Sorry i have no MWE for this question. I have a `.dtx` class and looking at the `diff` between a previous "good" version and the present i have, there is nowhere some recollection about what exactly is wrong, but here it is. So i ask in the direction of more details about `part`. Ok, so the class issues a `\renewtheorem{test}[part]{Name}`, and users create environments, for instance:               \begin{test}\label{abc}       Ok.     \end{test}      But when typeset "`as in test (\ref{abc})`" instead of > as in test (1) (before) the document shows > as in test (.1)`. Not where, but _why_ is that dot popping up there? In a simplistic MWE, the part is not showing its presence w.r.t. dot in `\ref`. What can cause the dot there? If i set `\renewcommand\thepart{100}` then `\ref{abc}` is `100.1`: still the dot! Thank s.


title: side effect of caption package with custom counter

text: --- update --- Any comments, is this a bug in the `caption` package or do have have to protect `\refstepcounter` somehow? --- \update --- I have the following MWE:               \documentclass{book}          \usepackage{xparse}     %\usepackage{caption}          \newcounter{mycounter} % make a counter     \setcounter{mycounter}{0} % init the counter          \NewDocumentCommand \mymark {} {%     \refstepcounter{mycounter}%     \textsuperscript{\themycounter}}          \begin{document}     %     one\mymark          \begin{figure}     \caption{two\mymark}     \label{lab:1}     \end{figure}%          three\mymark          \end{document}      without caption package it produces ![no_caption](http://i.stack.imgur.com/26OSd.png) but if I add the package ![with_caption](http://i.stack.imgur.com/rSlxV.png) Why is the numbering incorrect?


title: How do I add a for loop to a class file function?

text: I'm using this XeLaTeX class file to write my resume. One of the features is for section headings it colors the first 3 letters:               \section{experience}      This is hardcoded to the first 3 letters, and I'd like to make it a variable length:               \section{4}{open source}      I modified the `\section` part as follows:               %%%%%%%%%%%%%     % Structure %     %%%%%%%%%%%%%     \RequirePackage{parskip}          \newcounter{colorCounter}     \def\@sectioncolor#1#2#3{%       {%         \color{%           \ifcase\value{colorCounter}%             blue\or%             red\or%             orange\or%             green\or%             purple\else%             headercolor\fi%         } #1#2#3%       }%       \stepcounter{colorCounter}%     }          \renewcommand{\section}[2]{       \par\vspace{\parskip}       {%         \LARGE\headingfont\color{headercolor}%         \@sectioncolor #1#2%       }       \par\vspace{\parskip}     }          \renewcommand{\subsection}[2]{       \par\vspace{1\parskip}%       \Large\headingfont\color{headercolor} #2%       \par\vspace{1.25\parskip}%     }          \pagestyle{empty}      I'm not sure how to modify the section part with a for loop and color only a certain number of characters.


title: mpgraphics: Unable to compile using MikTex on Windows

text: This is an example from mpgraphics package documentation:               \documentclass{article}     \usepackage{mpgraphics}     \begin{document}     \begin{mpinline}     draw (20,20)--(0,0)--(0,30)--(30,0)--(0,0)     \end{mpinline}     \end{document}      I am getting something like this: ![enter image description here](http://i.stack.imgur.com/ae4ab.png) I'm using:   - mpost version 1.504 (MiKTeX 2.9)   - pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)   - MiKTeX EPS-to-PDF Converter 2.9.3275 (MiKTeX 2.9) I compile using wrige using TexMaker and compile by means of:   `latexmk -e "$pdflatex=q/pdflatex -synctex=1 -shell-escape -interaction=nonstopmode/" -pdf %.tex` or `pdflatex -interaction=nonstopmode -synctex=1 -shell-escape %.tex` (result is the same) What am I doing wrong? You can find the log file here. Example compiled by: `pdflatex -interaction=nonstopmode -enable-write18 -synctex=1 -shell-escape %.tex` Resulting pdf: link EDIT:   I tried to compile it by a command line. This is what I got: The whole folder with source and logs


title: Theorem Style in text

text: This is a typographical question as opposed to a tex question. I want to standardise my theorem style when typing in normal text. Some of my theorems have names: Mordell-Weil Theorem, BSD Conjecture while most don't but then have a numbering attached to them. When referring to these theorems in my text, I use the name whenever possible and the number when not. I seem to like the idea of bolding those theorems with numbers, ie. {`\bf Theorem \ref{theoblah}`}. Should I do the same with named theorems? Should I just stick to using theorem numbers (even in cases where theorems have names)? What is the convention?


title: How to create page with non printing annotation

text: I would like to add text 'This page intentionally left blank' to blank page (with header) but I would like to this text appear in pdf but not in the printed document. Is it even possible? If so, how?


title: spacing between chapters in list of tables

text: tocloft seems to automatically add extra space between table entries from different chapters. I want a single space between all the entries in the list of tables. Right now I have one space between entries from the same chapter and two spaces between those from different chapters. Here's a MWE of what I have.               \documentclass[11pt, letterpaper]{thesis}          \usepackage[lmargin=1.5in, rmargin=1.0in, tmargin=2.0in, bmargin=1.0in]{geometry}               \renewcommand{\thechapter}{\Roman{chapter}}     \renewcommand{\thesection}{\arabic{section}}     \renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}           \usepackage{tocloft}     \addtocontents{lot}{Table \hfill\ {Page} \par}          \usepackage{titlesec}     \usepackage{caption}     \usepackage{ctable}     \usepackage{tabularx}               \begin{document}               % List of Tables          \renewcommand{\cftlottitlefont}{\normalfont}     \renewcommand\listtablename{\centerline{TABLES}}     \renewcommand{\cfttabaftersnum}{.}     \setlength{\cfttabindent}{0pt}     \setlength\cftbeforechapskip{0pt}     \setlength\cftbeforetabskip{11pt}          \listoftables          % End List of Tables               \chapter{Chapter One}          \begin{table}[htbp]        \centering         \begin{tabular}{lll}         \toprule         & Col 1 & Col 2 \\         \midrule         Row 1 & 11 & 12 \\         Row 2 & 21 & 22 \\         \bottomrule         \end{tabular}       \caption{This is table 1.1.}     \end{table}          \begin{table}[htbp]        \centering         \begin{tabular}{lll}         \toprule         & Col 1 & Col 2 \\         \midrule         Row 1 & 11 & 12 \\         Row 2 & 21 & 22 \\         \bottomrule         \end{tabular}       \caption{This is table 1.2.}     \end{table}               \chapter{Chapter Two}          \begin{table}[htbp]        \centering         \begin{tabular}{lll}         \toprule         & Col 1 & Col 2 \\         \midrule         Row 1 & 11 & 12 \\         Row 2 & 21 & 22 \\         \bottomrule         \end{tabular}       \caption{This is table 2.1.}     \end{table}          \begin{table}[htbp]        \centering         \begin{tabular}{lll}         \toprule         & Col 1 & Col 2 \\         \midrule         Row 1 & 11 & 12 \\         Row 2 & 21 & 22 \\         \bottomrule         \end{tabular}       \caption{This is table 2.2.}     \end{table}          \end{document}      I use `\setlength\cftbeforechapskip{0pt}`, but this seems to have no effect. I did find this: How to change the line spacing in my list of figures? and tried some of the suggestions but none seemed to work for me. Any ideas?


title: subfloatrow of package floatrow does not work without subcaptions

text: I have two pictures that I want to place as subparts using the `floatrow` package. The following example works if I add subcaptions to the parts, but does not if I leave them out. I do not want any subcaptions for these parts. Am I doing something wrong or is this a bug? Here is a minimal working example:               \documentclass{article}          \usepackage[demo]{graphicx}     \usepackage{caption,subcaption}     \usepackage{floatrow}          \begin{document}              \begin{figure}           \ffigbox{%             \begin{subfloatrow}[2]%               \ffigbox{%                 \includegraphics[width=3cm,height=3cm]{fig1}%               }{                 %\subcaption{} %% does not work without               }%               \ffigbox{%                 \includegraphics[width=3cm,height=3cm]{fig2}%               }{                 %\subcaption{} %% does not work without               }%             \end{subfloatrow}%            }{             \caption{A caption}           }         \end{figure}          \end{document}


title: Tikzpicture in table

text: I would like to center the tikzpicture in first column. In the output, the graph alignment is different for rows.               \documentclass[12pt]{report}     \renewcommand{\baselinestretch}{1.5}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}     \tikzstyle{vertex}=[circle, draw, inner sep=0pt, minimum size=6pt]     \newcommand{\vertex}{\node[vertex]}     \newcounter{Angle}     \textwidth 5.55in     \textheight 7.35in          \begin{document}     \[\begin{array}{|b|lc|lc|lc|}      \hline     G & \multicolumn{2}{c}{cr(G+nK_{1})} \vline & \multicolumn{2}{c|}{cr(G+P_{n})}  & \multicolumn{2}{c|} {cr(G+C_{n})}  \\      \hline           %enter first row%     \begin{tikzpicture}[x=0.7cm, y=0.7cm]         \vertex (a) at (0,0) {};         \vertex (b) at (1,0) {};         \vertex (c) at (0,1) {};         \vertex (d) at (1,1) {};     \end{tikzpicture}& Z(4,n) & n\geq 1 & Z(4,n) & n\geq 1 & Z(4,n) & n\geq 3 \\   \hline          %%%%Entering second row%%%%     \begin{tikzpicture}[x=0.7cm, y=0.7cm]         \vertex (a) at (0,0) {};         \vertex (b) at (1,0) {};         \vertex (c) at (0,1) {};         \vertex (d) at (1,1) {};         \path             (a) edge (c)     \end{tikzpicture}     & Z(4,n) & n\geq 1 & Z(4,n) & n\geq 1 & Z(4,n) & n\geq 3 \\  \hline          %%%%Entering third row%%%%     \begin{tikzpicture}[x=0.7cm, y=0.7cm]         \vertex (a) at (0,0) {};         \vertex (b) at (1,0) {};         \vertex (c) at (0,1) {};         \vertex (d) at (1,1) {};         \path             (a) edge (c)             (b) edge (d)     \end{tikzpicture}     & Z(4,n) & n\geq 1 & Z(4,n) & n\geq 1 & Z(4,n) & n\geq 3 \\   \hline           \end{array}\]     \]     \begin{center}     \caption {Summary of crossing numbers for $G+nK_{1}$, $G+P_{n}$ and $G+C_{n}$.}     \end{center}          \end{document}


title: Latex errors when compiling

text: I have a general question on reading latex errors. (I am not a very experienced latex user.) I guess I have two questions: When I compile a file with latex, it writes a lot of junk to my terminal. Is there a way to reduce the amount of junk? (I can look in the log file if I want to see more specific things). When I get an error message, Latex writes the line number where the error occurs. But, does Latex also tell me in what file the error occurs? (I am using a template of somebody which includes a lot of files, and has some error somewhere. The only thing I know now is that it occurs on line 765 of a certain file, but I dont know which file ....)


title: How to change my bibliography title using bibtex and miktex 2.9

text: I have a problem changing the title of my bibliography using bibtex and miktex 2.9. I've read varius sources already and tried different things, but the answer that popped up most and should be working well               \addto\captionsngerman{\renewcommand{\refname}{Literaturverzeichnis}}      does somehow not work for me. I will give you my full preamble, hopefully someone can find out what mistake I'm doing. I'm using TeXworks on a Windows 7 PC if that's of any help:               %-------------------     %BEGIN     %-------------------          %Wir verwenden eine DIN-A4-Seite und die Schriftgroesse 12.     \documentclass[paper=a4,fontsize=11pt]{scrartcl}                %Diese drei Pakete benoetigen wir fuer die Umlaute, Deutsche Silbentrennung etc.     %Apple-Nutzer sollten anstelle von \usepackage[latin1]{inputenc} das Paket \usepackage[applemac]{inputenc} verwenden     \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}          \usepackage{CJK}          \usepackage[T1]{fontenc}     \addto\captionsngerman{\renewcommand{\refname}{Literaturverzeichnis}}          %Schoenere Schrift     \usepackage{mathptmx}     \usepackage[scaled=.92]{helvet}     \usepackage{courier}          %Das Paket erzeugt ein anklickbares Verzeichnis in der PDF-Datei.     \usepackage{hyperref}          %Das Paket wird fuer die anderthalb-zeiligen Zeilenabstand benoetigt     \usepackage{setspace}          %Einrueckung eines neuen Absatzes     \setlength{\parindent}{1.5em}          %Definition der Raender     \usepackage[paper=a4paper,left=30mm,right=30mm,top=30mm,bottom=30mm]{geometry}           %Abstand der Fussnoten     \deffootnote{1em}{1em}{\textsuperscript{\thefootnotemark\ }}          %Regeln, bis zu welcher Tiefe (section,subsection,subsubsection) Ueberschriften angezeigt werden sollen (Anzeige der Ueberschriften im Verzeichnis / Anzeige der Nummerierung)     \setcounter{tocdepth}{3}     \setcounter{secnumdepth}{3}          %author,date citation style     \usepackage{authordate1-4}          %Section modifications     \usepackage{sectsty}     \sectionfont{\large}          %indentation after section heading     \usepackage{indentfirst}                    %for japanese     \newcommand{\jap}[1]{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}     %-------------------     %Ende des Kopfbereiches     %-------------------          %-------------------     %Hier beginnt der Text deiner Hausarbeit     %-------------------     \begin{document}               %Beginn der Titelseite     \begin{titlepage}     \begin{small}     \vfill {     \noindent     Universitaet }     \end{small}               \begin{center}     \begin{Large}     \vfill {\textsf{\textbf{     Titel     }}}     \end{Large}     \end{center}          \begin{small}     \vfill      \noindent     asdasdasd     27. Juli 2012     \end{small}          \end{titlepage}     %Ende der Titelseite               %Inhaltsverzeichnis (aktualisiert sich erst nach dem zweiten Setzen)     \tableofcontents     % Ab hier wird mit arabischen Zahlen nummeriert, fuer roemische waere es romanic     \pagenumbering{arabic}          %Beginn einer neuen Seite     \clearpage          %Anderthalbzeiliger Zeilenabstand ab hier     \onehalfspacing          \pagestyle{plain}               %------------------------------------------------------------------------------------------------     % TEXT HERE TEXT HERE TEXT HERE     % -----------------------------------------------------------------------------------------------          %------------------------------------------------------------------------------------------------     % BLIOGRAPHIE     % -----------------------------------------------------------------------------------------------     \nocite{*}     \clearpage     \singlespacing     \bibliographystyle{authordate1}     \bibliography{literaturverzeichnis}     \end{document}     %-------------------     %END     %-------------------      I'd be grateful for any help, for me, the section-title always reads "References" even though I used the ngerman babel package. Update 1: changing               \documentclass[paper=a4,fontsize=11pt]{scrartcl}       to               \documentclass[paper=a4,fontsize=11pt,ngerman]{scrartcl}       didn't help. Update 2: This is a minimum working example which produces for me References as header for the Bibliography:               %Wir verwenden eine DIN-A4-Seite und die Schriftgroesse 12.     \documentclass[paper=a4,fontsize=11pt,ngerman]{scrartcl}                %Diese drei Pakete benoetigen wir fuer die Umlaute, Deutsche Silbentrennung etc.     %Apple-Nutzer sollten anstelle von \usepackage[latin1]{inputenc} das Paket \usepackage[applemac]{inputenc} verwenden     \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}          \usepackage{CJK}     \usepackage[T1]{fontenc}          \renewcaptionname{ngerman}{\bibname}{Literatur}          %author,date citation style     \usepackage{authordate1-4}          \begin{document}               %Beginn der Titelseite     \begin{titlepage}     \end{titlepage}     %Ende der Titelseite               %Inhaltsverzeichnis (aktualisiert sich erst nach dem zweiten Setzen)     \tableofcontents     % Ab hier wird mit arabischen Zahlen nummeriert, fuer roemische waere es romanic     \pagenumbering{arabic}          %Beginn einer neuen Seite     \clearpage          \pagestyle{plain}          %------------------------------------------------------------------------------------------------     % EINLEITUNG     % -----------------------------------------------------------------------------------------------     \section{Einleitung}     This is a minimal working example.     \clearpage          %------------------------------------------------------------------------------------------------     % Section     % -----------------------------------------------------------------------------------------------     \section{Sectionname}     This is a section.          %------------------------------------------------------------------------------------------------     % BLIOGRAPHIE     % -----------------------------------------------------------------------------------------------     \nocite{*}     \clearpage     \bibliographystyle{authordate1}     \bibliography{literaturverzeichnis}     \end{document}


title: Cellcolor overwrites partial horizontal lines (\cline)

text: So I need to make a colored table with multirows, together with the use of partial horizontal lines. I used `\cline` which does not work: the `\cellcolor`-command overwrites the line. This question told me to change it to `\hhline` which will not be overwritten by `\cellcolor`. Instead, `\hhline` overwrites the color. To make it more clear: **Without color:**               \documentclass{article}          \usepackage{colortbl}     \usepackage{multirow}          \begin{document}            \begin{tabular}{|c|c|}         \hline         \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline         First data & 932\\ \hline          & 239\\ \cline{2-2}  % or \hhline{|~|-|}          & 137\\ \cline{2-2}  % or \hhline{|~|-|}         \multirow{-3}{*}{More data} & 319\\ \hline         Last data & 132\\ \hline       \end{tabular}          \end{document}      ![Using <code>\\cline</code> without color](http://i.stack.imgur.com/oQItA.png) **With color:**   _Using`\cline`_               \documentclass{article}          \usepackage{colortbl}     \usepackage{multirow}          \begin{document}            \begin{tabular}{|>{\columncolor{red}}c|>{\columncolor{blue}}c|}         \hline         \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline         First data & 932\\ \hline          & 239\\ \cline{2-2}          & 137\\ \cline{2-2}         \multirow{-3}{*}{More data} & 319\\ \hline         Last data & 132\\ \hline       \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/yqoeR.png) Makes the lines in the right column disappear. _Using`\hhline`_               \documentclass{article}          \usepackage{colortbl}     \usepackage{multirow}     \usepackage{hhline}          \begin{document}            \begin{tabular}{|>{\columncolor{red}}c|>{\columncolor{blue}}c|}         \hline         \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline         First data & 932\\ \hline          & 239\\ \hhline{|~|-|}          & 137\\ \hhline{|~|-|}         \multirow{-3}{*}{More data} & 319\\ \hline         Last data & 132\\ \hline       \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Nau9d.png) Creates white lines on the left column. Is there any possible way on how to resolve this?


title: Get back "old" math font in LuaLaTeX+beamer

text: Updated my tlmgr install (and all packages I have installed today) earlier today, and something changed in the font loaded by unicode-math, which I can't figure out of. The preamble I've been using for making the beamer presentations is as below:               \RequirePackage{atbegshi}     \documentclass[smaller]{beamer}          \usefonttheme{professionalfonts}     \mode<presentation>{%         \AtBeginSection{%             }     \useoutertheme[nofootline]{wuerzburg}     \useinnertheme[outline,shadow]{chamfered}     \usecolortheme{shark}     \setbeamercovered{transparent}     }     \setbeamertemplate{navigation symbols}{}          \usepackage{fontspec,microtype,amsmath}     \usepackage{unicode-math}          \usepackage{siunitx}     \usepackage[retainorgcmds]{IEEEtrantools}      Before updateing, the font was as shown in [1]. After the update, as shown in [2] [1] Before update [2] After update As I haven't changed anything at all in the preamble, I have to assume that one of the packages I use was updated (but since I didn't pay attention to the command line window I'm not sure of which). I've tried to load `unicode-math` with the options `math-style=TeX` and `math- style=ISO` without any luck. Also tried to remove `fontspec`, `microtype`, and `amsmath`, but still the same. Any input on how to get the font to be as it was before the update?


title: How can I create a polar plot on a Cartesian grid?

text: I'm currently using `tikzpicture` and `pgfplots` to plot this polar function:               \documentclass{article}     \usepackage{pgfplots}     \usepackage{tikz}     \begin{document}          \begin{tikzpicture}     \begin{polaraxis}         \addplot[red,domain=0:360,samples=360,smooth] (x,{sqrt(4/(cos(4*x)+3))});     \end{polaraxis}     \end{tikzpicture}          \end{document}      However, this plots it on a polar axis, which doesn't really make sense in context. (It's defined implicitly as x4 + y4 = x2 + y2 and I'm just using polar coordinates to easily plot it.) How can I get the same nice graph with the correct Cartesian grid, as Wolfram|Alpha displays it? I considered `\begin{polaraxis}[hide axis]` and an additional `\begin{axis}` but that seems like it would require manual alignment, etc. Is there a clean way to do this?


title: How to make hyperref link boxes in XeLaTeX as big as they are in pdfLaTeX

text: When typesetting the following sample using `xelatex`, the various clickable link-boxes produced using `\ref`, `\cite`, `\footnote`, `\href`, etc. are small and ugly, and sometimes make it hard to read the enclosed number or text. How can we make the link-boxes bigger, as they appear when running the same code through `pdflatex`?               % hyperref-xelatex.tex          \documentclass{article}     \usepackage{hyperref}          \begin{document}          \section{First section}     \label{one}          Link to section \ref{one}          This text has a footnote.\footnote{Some explanation here}          We are quoting from a book \cite{book}.          Now we want to \href{www.example.com}{link somewhere} or like this \url{www.example.com}.          \begin{thebibliography}{99}     \bibitem{book}     This book needs no title          \end{thebibliography}          \end{document}


title: Why doesn't this code make it possible to store/use a value?

text: I wrote this code               \documentclass{article}          % make a command called \insertfoo{..} for the user to insert foo     \newcommand{\insertfoo}[1]{%       \savebox{\boxthatcontainsfoo}{#1}%       }          % make a command called \showfoo that shows the value for foo     \newcommand{\showfoo}{%     \usebox{\boxthatcontainsfoo}%     }          \insertfoo{somefoo}          \begin{document}     The foo you choose was \showfoo .     end{document}     \end{document}      Why do I get a compiling error?