title: Tikzpicture edge over graph

text: I've got the image attached, obtained from code                   \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,thick,main node/.style={circle,draw,font=\sffamily\Large\bfseries}]            \node (S) {};       \node[main node] (0) [node distance=1.1cm,below of=S] {$s$};       \node[main node] (3) [node distance=2.2cm,below of=0] {3};       \node[main node] (2) [node distance=2.2cm,left of=3] {2};       \node[main node] (1) [node distance=2.2cm,left of=2] {1};       \node[main node] (4) [node distance=2.2cm,right of=3] {4};       \node[main node] (5) [node distance=2.2cm,right of=4] {5};       \node (6) [node distance=1.1cm,below of=1] {};       \node (7) [node distance=1.1cm,below of=2] {};       \node (8) [node distance=1.4cm,below left of=3] {};       \node (9) [node distance=1.1cm,below of=4] {};       \node (10) [node distance=1.1cm,below of=5] {};       \node[main node] (T) [node distance=2.75cm,below of=3] {$t$};            \path[every node/.style={font=\sffamily\small}]         (S) edge node [right] {} (0)         (0) edge node [left] {} (1)             edge node [left] {} (2)             edge node [right] {} (3)             edge node [left] {} (4)             edge node [right] {} (5)         (1) edge node [above] {} (2)                 edge node [left] {} (6)                 edge node [left] {} (T)         (2) edge node [above] {} (3)             edge node [left] {} (7)             edge node [left] {} (T)         (3) edge node [above] {} (4)                 edge node [left] {} (8)                 edge node [left] {} (T)         (4) edge node [above] {} (5)             edge node [right] {} (9)             edge node [right] {} (T)         (5) edge node [right] {} (10)             edge node [right] {} (T)         ;         \end{tikzpicture}      and I would like to know how I could draw the "red" edges using TIKZ package. Thanks. ![graph](http://i.stack.imgur.com/x8Jpw.jpg)


title: Is there a faster way to type sequences?

text: When I'm using sequences in an article, I always type things like `(x_n)_n` and `(x_n^k)_n`. However, that doesn't display the subscript after the brackets very nicely. I know that I can fix this by using `\left(` and `\right)`, but I forget about them most of the time (causing a lot of frustrations when I discover it after I printed my document).               \documentclass[]{article}          \begin{document}     These sequences aren't displayed perfectly:     $$(x_n)_n \qquad (x_n^k)_n.$$     These ones look okay:     $$\left(x_n\right)_n \qquad \left(x_n^k\right)_n.$$          \end{document}      Maybe it's because I find the use of `\left(` and `\right)` a bit too time- consuming. I'm therefore wondering whether there's a clean way to achieve the same thing somewhat faster. (I'd find it no offence if you simply answer that I shouldn't be that forgetful... ;) )


title: How to use i.e. left, middle and right color when using draw as an argument instead of a command?

text: I'm forced to define colors within my `tikzset` for one of my projects. This requires me to use the `draw` command within my `tikzset` to set a color. Normally I can just use, say `\draw` command to just set an argument of `[top color=#1,bottom color=#3, middle color=#2]` to get the desired result, but in this case I want to use the `draw` within my tikzset to define fading colors in similar fashion. I doubt there are any workarounds barring perhaps the `shading` command for which I have not found an argument equivalent (?) in the PGF manual v3.00, see page 694. Code:               \tikzset{     mal/.style={->, >=stealth,     single arrow, line width=16mm,     single arrow head extend=.5cm, single arrow head indent=.25cm}     }      And the object itself:               \begin{tikzpicture}[scale=2,node distance=1cm, auto,baseline=-.5ex]     \node (dummy) at (-5,-10) {};      \begin{scope}[remember picture,overlay,shift={(dummy.center)}]          \def\malpath{(8.75,4.25) arc (440:130:7.75)}     \draw[mal]      \malpath;     \end{scope}


title: Newsletter latex template or example

text: I thought I had a bright idea when I decided I would write a monthly newsletter in latex. I use org-mode and emacs as my personal information management system, so it is easy for me to generate latex documents from my data. The only thing I need is a good newsletter template. There should be lots of them. Right? What I want is this:http://www.epd.de/sites/default/files/pdf/epd-Ost- Wochenspiegel_2011_35.pdf which is a "tex" newsletter by Stephan Lehmke created with OpenScape I like the navigation feature in the top and in the right margin. Also over all it looks very professional. The templates that I have found are not as good. For example: http://www.latextemplates.com/cat/newsletters Does anyone have a good example of a latex newsletter with navigation features? Or can anyone point me in the direction of what I need to do to create one and how much effort it would be. I have not used latex now for the last 10 years after graduating from University...


title: How to use Gnuplots .eps and .tex files at all with pdflatex

text: I tried to make a plot with data from a .txt file. The part with gnuplot works, but bringing the diagramm to Latex is frustrating. That's what I do: \-- GNUPLOT --               set terminal epslatex size 10cm,5.8cm     set output 'Messw1.tex'     plot '~Long Filepath~/mydata.txt' notitle with lines      Now there are to files in "My Documents" (On partition C, in case it matters. TexLive 2012 and Gnuplot are on a different Partition.): "Messw1.tex" and "Messw1.eps". \-- LATEX --               \documentclass[11pt]{scrartcl}     \usepackage{float}     \usepackage{caption}     \usepackage{epstopdf}          \begin{document}          \begin{figure}         \input{~Long Filepath~/Messw1}     \end{figure}          \end{document}      That's the first time in latex I have not the slightest idea, how I can make it work. :) Desperately needing help!


title: Equations, tables, figures, sections: reference with chapter number but label without

text: Using the `book` class equations, tables, figures and sections have the chapter number as first number of the label (e.g. the first equation of chapter 2 is equation 2.1). I want to remove the chapter number from the label but I want to keep it when I refer to it (the best would be keeping it if and only if the reference is outside the chapter where the label is)


title: LaTeX generating me 'Draft' text

text: Here is the code which I executed:               %Template for Technical Document     \documentclass[a4paper]{book}     \input{preamble/pakages.tex}     \input{preamble/quotations.tex}     \input{preamble/chapter_section_name_styling.tex}     \input{preamble/chapter_styling.tex}     \input{preamble/page_layout.tex}     \begin{document}     \input{articles/backtrack_linux.tex}     \end{document}       The output I get (first 2 pages are blank with watermark and draft is attached to pages and nodes appear only on first page): ![enter image description here](http://i.stack.imgur.com/5nCwI.png)   Actaully I wanted to append this code to my file : TikZ Circle Nodes 'Cybyrus14' The code executed fine before making changes to few files. I made the following changes in these files or rather I suspect there is a problem in these files: The page_layout.tex file:               \usetikzlibrary{calc,chains,positioning}     \fancypagestyle{plain}{       \fancyhf{}       \fancyfoot[LE,RO]{\tikz[baseline={(0,0)},anchor=center]         \node[label={center:\thepage},inner sep=0pt,outer sep=0pt]{\includegraphics[scale=.25]{images/apple}};}%       \renewcommand{\footrulewidth}{0.4pt}       \renewcommand{\headrulewidth}{0.0pt}     }               \fancypagestyle{myfancy}{     \fancyhf{}     \fancyhead[LE,RO]{\slshape\nouppercase{\leftmark}}     \fancyfoot[LE,RO]{\tikz[baseline={(0,0)},anchor=center] \node[label={center:\thepage},inner sep=0pt,outer sep=0pt]{\includegraphics[scale=.25]{images/apple}};}%     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     }     \newcounter{thepagenum}     \setcounter{thepagenum}{0}          % Set highest row number to access     % '11' here because there are 11 rows in the .csv     \def\pagelimit{11}          \newcommand{\setquoteandauthor}{%       \parbox[c][0.9cm][b]{\dimexpr\textwidth-4.5cm\relax}{%\centering         \emph{\QValue} \hfill --- \AValue}}%          \AddEverypageHook{%       \ifnum\pdfstrcmp{\arabic{thepagenum}}{\pagelimit}=0       \setcounter{thepagenum}{0}%       \else       \fi       \stepcounter{thepagenum}       \DTLgetvalue{\QValue}{quotes}{\arabic{thepagenum}}{1}%       % Author info too?       \DTLgetvalue{\AValue}{quotes}{\arabic{thepagenum}}{2}%     %  \fancyfoot[cf]{``\QValue'' --- \AValue}%       \fancyfoot[cf]{\setquoteandauthor}}                    \let\oldcleardoublepage\cleardoublepage     \renewcommand{\cleardoublepage}{\afterpage{\thispagestyle{empty}}\oldcleardoublepage}          \pagestyle{myfancy}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}          \newwatermark[allpages,color=red!50,scale=3,xpos=0,ypos=0]{\transparent{0.2}\includegraphics[scale=.25]{images/logo}}          \usetikzlibrary{calc,positioning}     \tikzset{mynode/.style={anchor=center,circle,fill=magenta,text=white,font=\sffamily,scale=2,inner                sep=2pt,minimum width=0.6cm}}     \newsavebox\mybox     \savebox\mybox{%     \begin{tikzpicture}[node distance=.1cm]         \node[mynode] (c) {C};         \node[mynode,below=of c] (y1) {Y};         \node[mynode,below=of y1] (b) {B};         \node[mynode,below=of b] (y2) {Y};         \node[mynode,below=of y2] (r) {R};         \node[mynode,below=of r] (u) {U};         \node[mynode,below=of u] (s) {S};         \node[mynode,below=of s] (1) {1};         \node[mynode,below=of 1] (4) {4};         \end{tikzpicture}%     }      For easy compilation I would rather give my all other files as well: chapter_section_name_styling.tex               \usetikzlibrary{shapes.misc,arrows}     \newcommand\titlebar{%     \tikz[baseline,trim left=0.5cm,trim right=2.5cm] {%         \node [             text = red!70!green,             anchor= base east,             minimum height=3.5ex] (a) at (2.5cm,0.6ex) {%         };        \path[fill=red!70!blue] (a.east) circle (.5ex);        \draw[color=red!70!blue, thick,rounded corners=1ex] (a.east) |- (\textwidth+3cm,-0.75ex);     }%     }          \newcommand\subtitlebar{%     \tikz[baseline,trim left=1cm,trim right=3.05cm] {%         \node[             text = red!70!green,             anchor= base east,             minimum height=3.5ex] (b) at (3.05cm,0.6ex) {%         };        \path[fill=red!70!blue] (b.east) circle (.5ex);        \draw[color=red!70!blue, thick,rounded corners=1ex] (b.east) |- (\textwidth+2cm,-0.75ex);     }%     }          \titleformat{\subsection}{\normalfont\sf}{\subtitlebar}{0.2cm}{\textcolor{blue!60!green}{#1}}     \titlespacing*{\subsection}{-2cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \titlespacing*{name=\subsection,numberless}{0cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \renewcommand*{\thesubsection}{\arabic{subsection}}               \titleformat{\section}{\large\sf}{\titlebar}{0.25cm}{\textcolor{blue!60!green}{#1}}     \titlespacing*{\section}{-2.15cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \titlespacing*{name=\section,numberless}{0cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \renewcommand*{\thesection}{\arabic{section}}      chapter_styling.tex:               \newcommand\chapterauthor[1]{\authortoc{#1}\printchapterauthor{#1}}     \WithSuffix\newcommand\chapterauthor*[1]{\printchapterauthor{#1}}     \makeatletter     \newcommand{\printchapterauthor}[1]{%       {\parindent0pt\vspace*{-25pt}%       \linespread{1.5}\large\scshape\filcenter #1%       \par\nobreak\vspace*{35pt}}       \@afterheading%     }     \newcommand{\authortoc}[1]{%       \addtocontents{toc}{\vskip-10pt}%       \addtocontents{toc}{%         \protect\contentsline{chapter}%         {\hskip1.3em\mdseries\scshape\protect\scriptsize#1}{}{}}       \addtocontents{toc}{\vskip5pt}%     }     \makeatother          \titleformat{\chapter}[display]       {\bfseries\Large}     %  {\filright\MakeUppercase{\chaptertitlename}\Huge\thechapter}       {}       {1ex}       {\titlerule\vspace{1ex}\filcenter #1}       [\vspace{1ex}\titlerule]      packages.tex:               \usepackage{graphicx}     \usepackage[explicit]{titlesec}     \usepackage{tikz}     \usepackage{suffix}     \usepackage{fancyhdr}     \usepackage[a4paper,margin=1in,includefoot,footskip=1in,bindingoffset=0.2in,centering,headheight=0.3in,heightrounded]{geometry}     \usepackage[printwatermark]{xwatermark}     \usepackage{xcolor}     \usepackage{transparent}     \usepackage{filecontents}     \usepackage[T1]{fontenc}     \usepackage{everypage}     \usepackage{datatool}     \usepackage{microtype}     \usepackage{afterpage}     \usepackage{background}     \usepackage{pgfornament}     \usepackage{ifoddpage}      quotations.tex:               \begin{filecontents}{csv_files/quotations.csv}     I\space think everybody in this country should learn how to program a computer because it teaches you how to think.; Steve Jobs     Computer Science is no more about computers than astronomy is about telescopes.; Edsger W. Dijkstra     The computer was born to solve problems that did not exist before.; Bill Gates     A\space computer would deserve to be called intelligent if it could deceive a human into believing that it was human.; Alan Turing     UNIX is basically a simple operating system but you have to be a genius to understand the simplicity.; Dennis Ritchie     Imagination is more important than knowledge.  For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution.; Albert Einstein     The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.; Stephen Hawking     The more you know, the more you realize you know nothing.; Socrates     Tell me and I forget.  Teach me and I remember.  Involve me and I learn.; Benjamin Franklin     Real knowledge is to know the extent of one's ignorance.; Confucius     I~do not fear computers. I fear lack of them.; Isaac Asimov     \end{filecontents}     \DTLsetseparator{;}     \DTLloaddb[noheader,keys={quote,author}]{quotes}{csv_files/quotations.csv}      The backtrack_linux.tex:               \begin{tikzpicture}[remember picture, overlay]     \node at ($(current page.east)+(-0.5in,0)$) {\usebox\mybox};     \end{tikzpicture}     \chapter{Install Backtrack on an Android Device}     \chapterauthor*{K.DINESH KUMAR \par II Year B.Tech CSE}     \section{What is Backtrack?}     BackTrack is a distribution designed by Jason Dennis based on the Ubuntu Linux distribution aimed at digital forensics and penetration testing use. BackTrack provides users with easy access to a comprehensive and large collection of security-related tools ranging from port scanners to Security Audit. Support for Live CD and Live USB functionality allows users to boot BackTrack directly from portable media without requiring installation, though permanent installation to hard disk and network is also an option.\par     \section{Security Tools in Backtrack}     BackTrack includes many well known security tools including:     \begin{itemize}         \item Metasploit for integration         \item Wi-Fi drivers supporting monitor mode (rfmon mode) and packet injection         \item Aircrack-ng         \item Gerix Wifi Cracker         \item Kismet         \item Nmap         \item Ophcrack         \item Ettercap         \item Wireshark (formerly known as Ethereal)         \item BeEF (Browser Exploitation Framework)         \item Hydra         \item OWASP Mantra Security Framework, a collection of hacking tools, add-ons and scripts based on FirefoX.         \item Cisco OCS Mass Scanner, a very reliable and fast scanner for Cisco routers with telnet and enabling of a default password.     \end{itemize}          \section{Installing Backtrack on Android Device}     \subsection{Tools Required}     \begin{enumerate}     \item Backtrack 5 ARM.\\     Download Backtrack 5 ARM from Backtrack official site. Backtrack with ARM architecture only on Backtrack 5 version. ARM architecture not available for Backtrack 5 R1, Backtrack 5 R2, and Backtrack 5 R3.     \item Rooted android device \\     Why rooted android device ? Because we need install some application that need Android to be root     \item Busybox, Superuser, Terminal Emulator, and AndroidVNC. \\     You can download search and all of them on Google Play. BusyBox is installer and uninstaller Android program, Superuser is superuser rights manager for Android, Terminal Emulator is Android's built-in Linux command line shell program, and AndroidVNC is a VNC viewer for Android.     \end{enumerate}     \subsection{Installation}     \begin{enumerate}     \item Extract BT5-GNOME-ARM.7z to folder, for example "BT5" folder and then put on device root directory.     \item Open Terminal Emulator on device then go to BT5 folder using the command \verb+ cd sdcard/BT5 +     \item Then run this following command \verb+ su + and \verb+ sh bootbt + and you will see \verb+ root@localhost +     \item Now lets run Backtrack GUI with VNC viewer \verb+startvnc+     \item To connect wth VNC we must know the port where VNC listening. Run \verb+netstat -anpt+ and remember the port where VNC listening. In this case the port is 59016. Open AndroidVNC and fill the form like this: \\     Nickname : BT5\\     Password : toortoor\\     Address  : 127.0.0.1\\     Port     : 5901 \\     \item Connect it and you will see Backtrack 5 interface \par     \textit{Remember! Some of the Backtrack tools can't work properly and do it for your own risk. I hope you can Install Backtrack on Android device without any problems, tell me if you get problems.}     \end{enumerate}      The quotations.csv file:               %% LaTeX2e file `csv_files/quotations.csv'     %% generated by the `filecontents' environment     %% from source `technical' on 2014/02/11.     %%     I\space think everybody in this country should learn how to program a computer because it teaches you how to think.; Steve Jobs     Computer Science is no more about computers than astronomy is about telescopes.; Edsger W. Dijkstra     The computer was born to solve problems that did not exist before.; Bill Gates     A\space computer would deserve to be called intelligent if it could deceive a human into believing that it was human.; Alan Turing     UNIX is basically a simple operating system but you have to be a genius to understand the simplicity.; Dennis Ritchie     Imagination is more important than knowledge.  For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution.; Albert Einstein     The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.; Stephen Hawking     The more you know, the more you realize you know nothing.; Socrates     Tell me and I forget.  Teach me and I remember.  Involve me and I learn.; Benjamin Franklin     Real knowledge is to know the extent of one's ignorance.; Confucius     I~do not fear computers. I fear lack of them.; Isaac Asimov      The images : ![enter image description here](http://i.stack.imgur.com/U5J6O.jpg) ![enter image description here](http://i.stack.imgur.com/AClti.jpg) I want the nodes at every page and at right side for the pages on the right and on the left side for the pages on the left .


title: Make a command to mark a text and class them for text analyze

text: Sorry for my English, I'm French and it's my first post on this forum, but I'm a frequent visitor of this forum, thanks for all ;) My problem is this : I'm working with transcriptions of 35 interviews (1000 pages) and I'm trying to build a command (environment or package?) to mark my linear text with some (sub)commands (margin braces, highlighting) in a first part, and after, copy and redirect this marked text to a thematic classification in a second part. My idea : I'd like to use my command in the text like this:               \marque{#1}{#2}{#3}{#4}{#5}      or               \begin{\marque}{#1}{#2}{#3}{#4}#5\end{\marque}      I need 3 functions for this command:   * to mark paragraphs (`#5`) of the first part with 5 specific layouts, according to `#1` value   * text (`#5`) and titles (`#2 #3 #4`) extraction for driving to a tree structure (maybe in 5 files: his.tex phi.tex com.tex sem.tex est.tex)   * integrate this new structure with titles and text to the 2nd part (without layouts from part 1) * * * Details of the command: {`#1`}= title 1 (which doesn't appear in part 1) associated with a layout   * if#1=[his]      * layout=`\encadre`     * drive to his.tex   * if#1=[phi]      * layout=`\accoladedroite`     * drive to phi.tex   * if#1=[com]      * layout=`\parentgauche`     * drive to com.tex   * if#1=[sem]      * layout=`\surlignage`     * drive to sem.tex   * if#1=[est]      * layout=`\crochetdroit`     * drive to est.tex file {`#2`}= title 2 which appears in both parts   * appear in the layout (so included in the layout command: `\marque{#2}=\crochetdroit{#1}`)   * drive on the associated file (#1) in a made section, otherwise create a new section named #2 (the new text of #2)      * if #2 doesn't correspond with any section in #1 file, write at end `\section{titre 2}` (for example in file his.tex)     * if #2 corresponds with a section in #1 file, (ex: his.tex), do nothing {#3}= title 3 which appears in both parts   * appear in the layout    * drive      * if #3 doesn't correspond with any subsection in #1 file and `\section{#2}`, write at end of this section `\subsection{title 3}`     * if #3 corresponds with subsection in #2 section in #1 file, do nothing {#4}= title 4 which appears in both parts   * appear in the layout    * drive (like #3) to make a `\subsubsection{title 4}` {#5}= text which appears in both parts   * appear in the layout    * drive   * appear under `\subsubsection{#4}` of `\subsection{#3}` of `\section{#2}` of #1 file (ex: his.tex) To include texts from files to part 2, after part 1 `\part{Les interviews}`, write part 2:               \part{L'analyse}      \chapter{Histoire}        \include{his.tex} %(or \input ?)      \chapter{Philosophie}        \include{phi.tex}      \chapter{Communication}        \include{com.tex}      \chapter{Sémantique}        \include{sem.tex}      \chapter{Esthétique}        \include{est.tex}      See example illustrated in document attached:               \part{Les interviews}       \chapter{Interview 1}       \marque{his}{Inspiration}{Expiration}{}{text 1         \marque{com}{thèse}{Action 136}{}{text 2           \marque{phi}{Steak}{Pastèque}{Aztèque}{text 3             \marque{est}{Uchronie}{Carotte}{}{text 4}             \marque{est}{Anachronie}{C}{V}{text 5}             \marque{est}{Reconstitution}{Carotte}{Carotte}{text 6}             \marque{est}{Achronie}{L'actrice}{La Lapistou 1567}{text 7}}}         text 8         \marque{est}{5678 The}{action}{veste}{text 9}         text 10}      ![enter image description here](http://i.stack.imgur.com/ZpRJE.jpg) And, in the second part:               Histoire       Inspiration         Expiration             texte 1-2-3-4-5-6-7-8-9-10     Philosophie       Steak         Pastèque           Aztèque             texte 3-4-5-6-7     Communication       Thèse         Action 136             texte 2-3-4-5-6-7     Sémantique     Esthétique       Uchronie         Carotte             texte 4       Anachronie         C           V             texte 5       Reconstitution         Carotte           Carotte             texte 6       Achronie         L'actrice           Le lapistou 1567             texte 7       5678 The         action           vest             texte 9      * * * So! I know how to make layout (sub)command, for example, the `\parentgauche` command, or `\temporal`               \newcommand\parentgauche[4]     {\par     \smallskip     \makebox         [\textwidth][r]         {$\rotatebox[origin=c]{90}{#1}         \rotatebox[origin=c]{90}{\color{gray}#2-\textit{#3}}         \left(         \begin{minipage}{\textwidth}#4\end{minipage}         \right.         \nulldelimiterspace=0pt$}     \par     \smallskip}}          \newcommand{\choixcouleur}[1]         {\ifthenelse{\equal{#1}{uchronie}}{\sethlcolor{Apricot}}{}%         \ifthenelse{\equal{#1}{achronie}}{\sethlcolor{Tan}}{}%           \ifthenelse{\equal{#1}{anachronie}}{\sethlcolor{Salmon}}{}%         \ifthenelse{\equal{#1}{reconstitution}}{\sethlcolor{Peach}}{}}     \newcommand{\temporal}[4]         {\choixcouleur{#1}\hl{#4}\footnote{{\textbf{#1}#2\textit{#3}}}}      * * * But, I don't know how to built commands to: \- copy/paste (I know cut/paste, but I need the text in part 1) \- extract, \- write in another file, \- drive in this file. Maybe it's better to create files not only for chapter, but also for section subsection & subsubsection too? * * * That's my config:               \documentclass{scrbook}     \usepackage{fontspec}     \usepackage{xltxtra}      \usepackage{xunicode}     \usepackage[applemac]{inputenc}     \usepackage{lmodern, textcomp}      \usepackage[T1]{fontenc}         \usepackage[frenchb]{babel}          \frenchbsetup{FrenchFootnotes=false}     \usepackage{eco}                 \usepackage[babel,french=guillemets*]{csquotes}     \usepackage[protrusion=true,expansion=true]{microtype}      \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{soul}     \usepackage{multicol}


title: How can I force ToC not to end with a chapter?

text: So I am writing a programming book and I decided to include `\section`s in the ToC as well (see picture below). The problem I am having is that I have ugliness where `\chapter` is the last item on the page and only on the next page I have the `\section`s for that chapter (see the very end of picture). How can I fix ToC to move this `3 Text Conversion and Substitution` to a new page rather than leaving it hanging on the current page? I am using `memoir` class, btw. ![wrong2](http://i.stack.imgur.com/OWGGS.png)


title: Inserting a new page to ToC in memoir

text: > **Possible Duplicate:**   >  How can I force ToC not to end with a chapter? Does anyone know a way of adding a `\newpage` (or similar) to the ToC. One of my chapter headings is at the bottom of a page and I'd like to drop it down to start off the next page. Any suggestions would be much appreciated.


title: Defining a custom cross referencing style

text: I want my cross reference links to look like:               Chapter X: Chapter Title      To achieve that I have created the following command:               \newcommand{\fancyref}[1]{\autoref{#1}: \nameref{#1}}      The problem is that the `:` character is not part of the generated hyperlink. Could someone help? Thanks in advance. Warning I get when compiling Leo Liu's example:               LaTeX Warning: Reference `*' on page 1 undefined on input line 10.          [1{/usr/local/texlive/2009/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     (./example.aux)          LaTeX Warning: There were undefined references.


title: Why is the cmss font in OT1 and T1 very different?

text: When I compile the code below with and without the `\usepackage[T1]{fontenc}`, I get quite different results. The normalfonts are the same, but with `T1` the characters in the section heading seem way too wide (a smaller font is scaled up?) while those in the LARGE line are actually a bit narrower. Why is this happening, and how do I get `T1` to behave? Presumably the default `OT1` fonts are the "correct" `CMSS` fonts?               \documentclass[12pt,flegn,a4paper]{article}     \usepackage{lipsum}     \renewcommand*\familydefault{\sfdefault}     %\usepackage[T1]{fontenc}     \begin{document}     \section{This is a long section title}     a b c d e f g h i j k l m n o p q r s t u v w x y z     \par     {\LARGE Some very LARGE text Blah Blah}     \par     \lipsum[1]     \end{document}


title: Inserting a colored box to page background leaves gap

text: I'd like to have a colored box in the upper part of every page. Even though it's a simple task, I cannot make it work. Having looked for answers here and in the eso-pic package discription does not bring me any further. Neither playing around with minipages as suggested here http://en.wikibooks.org/wiki/LaTeX/Tips_and_Tricks#Sidebar_with_information has solved it. This is what I came up with so far:               \documentclass[12pt,a5paper]{article}     \usepackage{geometry}     \usepackage{eso-pic,xcolor,lipsum}     \pagestyle{empty}          \AddToShipoutPictureBG{         \AtPageUpperLeft{             {\color{red}%                 \rule[-1cm]%offset PageBorder                     {\paperwidth}%{14.8cm}                     {1cm}%height             }         }     }          \begin{document}     \lipsum     \end{document}      When I run pdfLaTeX, I always have a small gap, say .1mm on the left border. Did not dare to try that How to I reduce space before and after HRule? , though. Any help is greatly appreciated.


title: display figure before new subsection, bot not on an own page

text: I have multiple subsections, one with 3 subsequent figures               \subsection{Sometitle 1}     words words words...      3x               \begin{figure}[h!]       \centering         \includegraphics[width=\linewidth]{pics/img}       \caption{Desc.}       \label{fig:img}     \end{figure}      then the next subsection               \subsection{Sometitle 2}     other words other words...      Two images take up a whole page, the third is displayed after the first few lines of the following subsection.. ![like this](http://i.stack.imgur.com/ITIKt.png) How do I get to start the next subsection **after** the third figure, but not have the third figure on an own page?


title: Mixing twocolumn and create fourcolumn reference on same page

text: The article is typeset in twocolumn and reference parts are need to typeset in fourth column on same page. I have googled and find `cuted` can do Mixing onecolumn and twocolumn modes. But I have need four column reference on same page. Please find MWE:               \documentclass[twocolumn]{article}     \usepackage{amsmath}     \usepackage{cuted}%%Mixing onecolumn and twocolumn modes     \begin{document}     \title{Traditional computers and their limitation}     \author{K. E. Kelbal}     \maketitle     \begin{abstract}     High performance computing is needed for evaluating computationally "bulky" problems. For years, computers have progressed in architecture and hardware     aspects to exploit parallelism, but the algorithmic or software aspects are yet to be discovered fully in many fields. There are many aspects related to high performance computing, which we need to know before developing algorithms. Linear algebra lies at the heart of most calculations in scientific computing. Thus there is a need for developing computationally "rich" algorithms for linear algebra. In this report we present some ways to exploit parallelism for achieving high performance for linear algorithms, along with a summary of parallel processing and architecture overview with performance evaluation analysis.      \end{abstract}      \section{Introduction}     In the past decade, the world has experienced one of the most exciting periods in computer development. Computer performance improvements have been dramatic - a trend that promises to continue for the next several years. One reason for the improved performance is the rapid advancement in microprocessor technology. Microprocessors have become smaller, denser and more powerful. The result is that microprocessor based super computing is rapidly becoming the technology of preference in attacking some of the most important problems of science and engineering. To exploit microprocessor technology, vendors have developed high parallel computers \cite{id:0001,id:0002}.          Highly parallel systems offer the enormous computational power needed for solving some of the most challenging computational problems such as     circuit simulation incorporating various effects. Unfortunately, software development has not keep pace with hardware advances. New programming paradigms     languages, scheduling and partitioning techniques, and algorithms are needed to fully exploit the power of these highly parallel machines.          A major new trend for scientific problem solving is distributed computing. In distributed computing \cite{id:0003}, computers are connected by a network     are used collectively to solve a single larger problem. Many scientists are discovering that their computational requirements are best served not by a single,     monolithic computer but by a variety of distributed computing resources, linked by high speed networks. By parallel computing, we mean a set of processes that     are able to work together to solve a computational problem. There are a few things that are worthwhile to point out. First, the use of parallel processing and     the techniques that exploit them are now everywhere; from the personal computer to the fastest computer available. Second, parallel processing doesn't     necessary imply high performance computing.          The traditional computer, or conventional approach to computer design involves a single instruction stream. Instructions are processed sequentially and the     result is movement of data from memory to functional unit and back to memory. As demands for faster performance increased, modifications were made to     improve the design of the computers. It became evident that a number of factors were limiting potential speed: the switching speed of the devices, packaging     and interconnection delays, and compromises in the design to account for realistic tolerances of parameters in the timing of individual components. Even if a     dramatic improvement could be made in any of these areas, one factor still limits performance: the speed of light. Today's supercomputers have a cycle time     on the order of nanoseconds. One nanosecond translates into the time it takes light to move about a foot (in practice, the speed of pulses through the wiring     of a computer ranges from 0.3 to 0.9 feet per nanosecond). Faced by this fundamental limitation, computer designers have begun moving in the direction of     parallelism.          In this report we explore some of the issues involved in the use of high performance computing and parallel processing aspects. The organization     of the report is given below.          \section{Organization Of the Report}          \begin{enumerate}     \item Chapter 2 describes the fundamentals of parallel processing and issues related with high performance computing \cite{id:0004,id:0005}.     \item Chapter 3 describes the techniques used to decrease overhead and improve performance \cite{id:0006}.     \item Chapter 4 describes the performance analysis for uniprocessor and parallel processors \cite{id:0007}.     \item Chapter 5 describes parallel algorithms for solving linear \cite{id:0008,id:0009,id:0010}.     \item Chapter 6 discusses future work that is to be done.     \end{enumerate}          \begin{strip}     \begin{thebibliography}{99}     \bibitem{id:0001}{Abraham Silberschatz, Peter Baer Galvin, "Operating System Concept", Addison Wesley, Reading Massachusetts, USA, 1998}     \bibitem{id:0002}{John P. Hayes, "Computer Architecture and Organization", McGraw-Hill International Company, Singapore, 1988 }     \bibitem{id:0003}{PVM 3 User Guide and Reference Manual, Edited by Al Gist, Oak Ridge National Laboratory, Engineering Physics and Mathematics Divison,     Mathematical Science Section, Oak Ridge, Tennessee, USA, 1991}     \bibitem{id:0004}{PVM's HTTP Site, "http://www.epm.ornl.gov/pvm/"}     \bibitem{id:0005}{Brian W. Kernighan, Dennis M. Ritchie, "The C - Programming Language, (ANSI C Version)", Prentice-Hall of India Pvt. Ltd., New Delhi, 1998}     \bibitem{id:0006}{Thomas H. Corman, Charles E. Leiserson, Ronald L. Rivest, "Introduction to Algorithm", MIT Press, Cambridge, MA, USA, 1990}     \bibitem{id:0007}{Kenneth Hoffmann, Rey Kunze, " Linear Algebra", Prentice-Hall of India Pvt. Ltd., New Delhi, 1997}     \bibitem{id:0008}{G.H. Golub and C. F. Van Loan , " Matrix Computations", Third Edition. The Johns Hopkins University Press, Baltimore, 1996}     \bibitem{id:0009}{David A. Patterson, John L. Hennessy, "Computer Architecture, A Quantitative Approach", Morgan Kaufmann Publications Inc., San Mateo, California, USA,     1990}     \bibitem{id:0010}{Jack Dongarra, Iain Duff, Danny Sorensen, and Henk van der Vorst, Numerical Linear Algebra for High-Performance Computing",Society for Industrial and     Applied Mathematics, Philadelphia, 1998}     \end{thebibliography}     \end{strip}     \end{document}      NOTE: Currently we have created reference one part is `\begin{figure*}`. But this is manually need to do. I have need the automatically place like `cuted`. That is possible?


title: tikz parabola node position

text: I am trying to position nodes on a parabola curve. However, it seems tikz cannot calculate the midway positions. Neither of the following examples works:               \begin{tikzpicture}         \draw (-1,0) parabola[parabola height=2cm] (3,0)             node[sloped, above, pos=0.5] {0.5};     \end{tikzpicture}          \begin{tikzpicture}[to path={         parabola[parabola height=2cm] (\tikztotarget) \tikztonodes}]         \draw (0,0) to             node[above, sloped] {0.5} (3,0);     \end{tikzpicture}      Any suggestions? Thanks!


title: How to make the BibTeX reference list visible in a LaTeX document

text: Im very new at LaTeX and I would appreciate some help solving this problem. I have created a BibTeX file containing all references to a document. In this text file BibTeX items are inserted and no other text are written, for instance @article{...}. When I call for this bib file from the main.tex file I use the commands:               \bibliographystyle{plain}     \bibliography{thebibliography}      Now to my question. All i get when I compile this main.tex is the title (bibliography) for this chapter, otherwise the textfield is blank. Is this error occurring because I should write anything in the bib file or have I missed any lines in the main.tex file.


title: Linebreak before \texttt

text: I have text and there are some commands, that should be write in `\texttt`. It's one word, that shouldn't be broken and should be on next line, but LaTeX doesn't put a line break before it and lays it over the border of paragraph. I don't want put there `\\\\*` or `\newline` there, because our professors get mad about these commands. I translate it with pdflatex in Texmaker.


title: Batch generated file produces encoding error with latex

text: **The goal:** This is for an exam. I have a program which should be compiled and executed by batch script. Another batch script calls that first batch an writes the output to a `.txt` file. Then the contents of that `.txt` file should be included in a document which is produced with Latex. **The problem:** Latex produces an character encoding error during the build. Error message: > Package `inputenc` Error: Keyboard character used is undefined in > inputencoding 'utf8' The generated file looks like this:               Ausgabe generiert am 11.05.2013 um  8:28:11,39     ************** Skript zur Kompilierung der Source-Dateien **********************     Kompilieren der Sourcedateien zu "Program.exe"          Microsoft (R) Visual C# 2008 Compiler Version 3.5.30729.6400     , für Microsoft (R) .NET Framework Version 3.5     Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.          Erfolgreiche Kompiliereung      In line 6 the german umlaut 'ü' (ue) is the problem. Also there is a problem with the # character later. LaTeX config:               \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}      Code is included like this:               \lstinputlisting[style=tests]{log/log.txt}      The strange thing, I have special characters like Umlaut (äöü) etc. all over the place in my document and that works fine. If I copy a file from my project and rename it to `log.txt` it works fine. But if I create a new file on the file system (or generate it with the script) and write some special characters to it, it crashes. **More details:** I am using Windows 8, Texnicenter and MikTex. The listing style looks like this:               \lstdefinestyle{tests}{         language=,         basicstyle=\ttfamily,                numbers=none,          breaklines=true,                      frame=none,                              breakatwhitespace=false,                     backgroundcolor=\color{hellgelb},           literate=         {Ö}{{\"O}}1         {Ä}{{\"A}}1         {Ü}{{\"U}}1         {ß}{{\ss}}2         {ü}{{\"u}}1         {ä}{{\"a}}1         {ö}{{\"o}}1     }      **What I have tried:** Googled my a.. off. I tried to use all possible codepages in the batch file like: 1250, 1252, 850, 65000, 65001, 1200, 1201, 12000, 12001. Nothing works. I'd appreciate your help very much! **Edit** Batch that writes the output:               @echo off     SET log=%~dp0\latex_doku\log\log.txt     SET skripts=%~dp0..\..\cd\batch     SET folder=%~dp0\latex_doku\log\     SET result=%~dp0..\..\cd\unit_tests\results\TestResult.xml          ECHO Generieren der Ausgabedatei...     ECHO Ausgabe generiert am %DATE% um %time%>%log%          REM kompilieren     CALL %skripts%\compile.bat>>%log%          REM Systemtests ohne Eingabedateien ausfuehren     CALL %skripts%\run_tests.bat>>%log%          REM ausfuehren     CALL %skripts%\run.bat>>%log%          REM TestResults     IF NOT EXIST %result% GOTO EXT     xcopy "%result%" "%folder%" /y          :EXT     pause      When I dont specify a codepage the result looks like this: ![enter image description here](http://i.stack.imgur.com/JNGaO.jpg) When I specify cp 1252 for example it looks like this: ![enter image description here](http://i.stack.imgur.com/UvSbq.jpg) It is strange that the character is shown correctly in the editor...


title: Best practice for control flow charts

text: I wanted to plot a flow chart graph which looks similar to this diagram: ![flow chart](http://i.stack.imgur.com/63lXf.png) that comes from this source.   1. Which package would be best for that?   2. I don't want to use pstricks


title: xasy not showing

text: When I do               xasy circles.asy      in the examples folder, nothing except a bounding box when you click shows up in xasy. So how to use xasy and let the figure shown correctly?


title: Apply formatting to outermost parentheses

text: I have some text information where I need to apply a text format to all the outer most parentheses such as making them larger and/or bold. In a sense I want to process text like ^(...(...(...)...)...(..)..^)...^(..(....)..^) Where ^( and ^) have special formats(basically all I want to do is make the outermost parentheses of some mathematical like text(but it is not math text) stand out so it is easier to read). It would look like **(**...(...(...)...)...(..).. **)**... **(**..(....).. **)** Any ideas to do this easily? I do not want to have to add \mathbf to each parenthesis as it clutters up the text. (in fact I would actually like to modify the text just before *( and apply a format to it(just the word before it). So SomeText(....) would get a format applied to SomeText and the outer ( ) but everything inside will remain. I want to avoid cluttering up the text as much as possible and I guess some environment is needed?


title: Split box in two

text: I need to create a figure with two small figures; I want it to be a box that is split into two, with a syntax tree located in each side. The MWE below shows what I'm trying and failing with:               \documentclass{article}     \usepackage{tikz-qtree}     \usepackage{ textcomp }     \newcommand\TR[1]{\textlangle#1\textrangle}     \begin{document}     \begin{figure}[ht]         \fbox{             \begin{minipage}[b]{0.5\linewidth}                 \centering                 \begin{tikzpicture}                     \tikzset{every tree node/.style={align=center,anchor=north}}                     \Tree [ .NP [ .vP[DE] { } [ .v' v\\dai [ .VP { } [ .V' V\\\TR{dai} yanjing ] ] ] ] NP\\nanhai ]                     \end{tikzpicture}                     \caption{default}                 \label{fig:figure1}             \end{minipage}         }         \hspace{0.5cm}         \fbox{             \begin{minipage}[b]{0.5\linewidth}                 \centering                 \begin{tikzpicture}                     \tikzset{every tree node/.style={align=center,anchor=north}}                     \Tree [ .NP [ .vP[DE] { } [ .v' v\\dai [ .VP { } [ .V' V\\\TR{dai} yanjing ] ] ] ] NP\\nanhai ]                 \end{tikzpicture}                 \caption{default}                 \label{fig:figure2}             \end{minipage}         }     \end{figure}     \end{document}      This code creates two separate boxes, which is not what I want.


title: ConTeXt equivalent of \renewcommand

text: I can use \define to define a new command, but how do I overwrite an existing one? My use case is rewriting all `{\externalfigure[cow]}` to `\placefigure[right]{My Caption}{\externalfigure[cow]}` to float them.


title: Problem with symbol

text: I am trying to write a math paper, and I need to write the following symbol: `$\overline{\underline{X}}$` Is there any package that already contains it?


title: Shortcut macro for tabularx environment

text: I'm trying to define a shortcut using `\newcommand` for setting up a table using the `tabularx` environment. The command seems to work fine when beginning the table:               \newcommand{\bt}{\begin{tabularx}}      But doesn't work when ending the table:               \newcommand{\et}{\end{tabularx}}      The error message that I receive is:               ! Missing } inserted.          <inserted text>                           }          l.33 \end{tabularx}


title: How to quote with TeX and output the reference?

text: I'm totally new to TeX but I've gone more or less through the http://en.wikibooks.org/wiki/LaTeX/ Wiki but I didn't find anything beside `\quote` and `\quotation`. How can I quote inline with the quote index? for example > He said "Bla blah"$^{[14]}$ And how can I link this to a reference in the end? Is there a tutorial or example for this? Or any other quotation system like the harvard referencing system would be also OK.


title: Convincing someone LaTeX follows typesetting best practice

text: Often, when presenting a LaTeX document to someone, they will complain about how the margins are thick and how lines should be at a line's height apart. I often find myself struggling to convince them that LaTeX produces the best typesetting contrarily to the ugly documents they've seen all their life (excluding professionally typeset books and documents) What would be the best convincing argument in favor of LaTeX typesetting? (As a side note, I know this is an unusual question that some might consider subjective, but it can still be responded with an objective answer and would be useful to know for the community.)


title: Two figures side by side with text wrapping

text: I have a problem with text wrapping around two figures side by side, each of which has a different height. Look at the required template below. ![enter image description here](http://i.stack.imgur.com/5jwq6.jpg) Currently I placed two pictures with `minipage` environment. But how can I combine it with the `wrapfigure` environment to get the required result? Or maybe there are other solutions? Currently i use this simple code:               \documentclass{article}     \usepackage{wrapfig}     \usepackage{xcolor}     \usepackage{lipsum}          \begin{document}          \lipsum[1]          \begin{figure}[h]     \begin{minipage}[t]{0.5\linewidth}     \centering     \textcolor{blue}{\rule{3cm}{3cm}}      \caption{A}     \label{fig:A}     \end{minipage}     \begin{minipage}[t]{0.5\linewidth}     \centering     \textcolor{blue}{\rule{5cm}{8cm}}      \caption{B}     \label{fig:B}     \end{minipage}     \end{figure}          \lipsum[2]          \end{document}


title: Table: a symbol instead of a vertical line

text: I know it is a little unorthodox, but it would save me quite some time if I would be able to print a character instead of a vertical line in a table: | a | b | c | -> | a | b $\sim$ c | any clues?


title: Matlab, Inkscape, ConTeXt and automatic image conversion?

text: I want to use matlab plots in my ConTeXt document, but preprocess them in Inkscape. I wonder if there is some recommended workflow. So far what I'm doing is this:   1. save matlab figure as 'fig', so I can reuse the figure in matlab. Just in case   2. use plot2svg to create a SVG from matlab (actually I've patched the original to gzip the svg.)   3. edit plot in Inkscape   4. Here is one of my problems: use edited plot ConTeXt I'm using MkII (pdfTex), since I have had some problems(with layout, no euler font and others) with MkIV(which actually supports SVG) and I think it is still beta. I want to import the gzipped SVG directly in my ConTeXt document, but see no way how to import the document. The method mentioned in the wiki does not work either. Is there a way to convert the file automatically with Inkscape to e.g. pdf? Maybe my workflow is not the best for the task, so I also wonder if there is a better way to create, edit and use figures/plots in my documents.


title: Breqn color and background options ignored?

text: I have this simple latex code:               \documentclass{article}     \usepackage{color}     \usepackage{breqn}     \begin{document}     \begin{dmath}[background={red}]     1+1=2     \end{dmath}     \end{document}      However using background option for dmath seems not to work at all, the background stays white. I compiled with MiKTeX 2.9.4533 without any warnings. I have also tried               \begin{dmath}[background=red]     \begin{dmath}[color={blue}]     \begin{dmath}[color=blue]      And some more combinations but none of them works. Why is that?


title: Customize horizontal positon of table within page

text: I am using memoir package and I want to generally left align tables (In contrast to figures that should be centered). I am using the `hmisc` latex function which generates this float table code, but I didnt find a way to easily change/discard the center environment:               \begin{table}[!h]     \caption{}     \begin{center}     \begin{tabular}     ...content...     \end{tabular}     \end{center}     \end{table}      I already tried the following:               \let\centering\relax      to generally disable centering. My idea is to selectively enable centering for figures. To achieve this I am trying to use the package `floatrow` but I without any success. Could somebody draft how to either selectively switch off or switch on centering. (Providing I am using the `hmisc` latex function to generate the table.) Edit 1: Additional Question: Is there a way (and how) to disable centering (as mentioned using the `\let` command) but center a figure afterwards somewhere in the document ?


title: A new paragraph followed by a big skip

text: Here is the code I am using to place a heading with a line above and below the text, from this post.               \newcommand{\rheading}[1]     {         \par         \bigskip         \hrule height 1pt         \kern 5pt         \hbox to \textwidth{\textbf{\mediumletterspace{#1}}\hfil}         \kern 5pt         \hrule height 0.2pt         \kern\smallskipamount     }      However, with the `\par` at the beginning, there is `\parskip` vertical space followed by a `\bigskip` vertical space. I want to make this skip the same, regardless of the length of `\parskip`. How do I accomplish this? Also, if I get rid of the `\par`, there is no vertical skip at all and not even a line break. Why?


title: "Missing number, treated as zero" error adding subfigures

text: I was ok doing my college work, then I needed to put figures on it. I looked at the Wikipedia's example where it used subfigures, so I tried to use in my work. The following block is public at my Github repo, although it's just copy-and- paste with changed figure paths.               \begin{figure}         \centering         \begin{subfigure}[b]{0.3\textwidth}             \includegraphics[width=\textwidth]{multiple/Torrentcomp_small-0.png}             \caption{A gull}             \label{fig:gull}         \end{subfigure}%         ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)         \begin{subfigure}[b]{0.3\textwidth}             \includegraphics[width=\textwidth]{multiple/Torrentcomp_small-0.png}             \caption{A tiger}             \label{fig:tiger}         \end{subfigure}         ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)         \begin{subfigure}[b]{0.3\textwidth}             \includegraphics[width=\textwidth]{multiple/Torrentcomp_small-0.png}             \caption{A mouse}             \label{fig:mouse}         \end{subfigure}         \caption{Pictures of animals}\label{fig:animals}     \end{figure}      I compiled and then got the following log before some preexistent warnings               ./Chapters/Chapter3.tex:26: Missing number, treated as zero. [        \begin{subfigure}[b]{0.3\textwidth}]     ./Chapters/Chapter3.tex:26: Illegal unit of measure (pt inserted). [        \begin{subfigure}[b]{0.3\textwidth}]     ./Chapters/Chapter3.tex:33: Missing number, treated as zero. [        \begin{subfigure}[b]{0.3\textwidth}]     ./Chapters/Chapter3.tex:33: Illegal unit of measure (pt inserted). [        \begin{subfigure}[b]{0.3\textwidth}]     ./Chapters/Chapter3.tex:40: Missing number, treated as zero. [        \begin{subfigure}[b]{0.3\textwidth}]     ./Chapters/Chapter3.tex:40: Illegal unit of measure (pt inserted). [        \begin{subfigure}[b]{0.3\textwidth}]          (...)          ./Chapters/Chapter3.tex:46: LaTeX Warning: Float too large for page by 833.1359pt on input line 46.      I thought that it was that `\textwidth` fault, but then `\the\textwidth` printed some value. So, I'm stuck in this. =/


title: Pgfplots: Drawing Arrows Along Contour Plots

text: I would like to draw "stealth" arrows in place of the "0" labels along the trajectory in the phase portrait pictured below. I decided to draw the trajectory using the contour functionality of Pgfplots. So far, I managed to set the inner separation of the labels to zero, but I am having trouble figuring out how to change the label text. Do you have any ideas? ![enter image description here](http://i.stack.imgur.com/jUazF.png) Here is the code I used to generate the plot:               \documentclass{standalone}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         title={Phase portrait of Van der Pol oscillator.},         domain=-2:2,         xmin=-2,         xmax=2,         ymin=-2,         ymax=2,         view={0}{90},         axis background/.style={fill=white}     ]          \addplot3[         contour prepared =         {             contour label style = {                 inner sep = 0pt             },             draw color = black,             label distance = 140pt,             handler/.style = /tikz/smooth         }     ] table {     1   1   0     1.06298 0.924071    0     1.12034 0.837528    0     1.1715  0.742761    0     1.21604 0.642327    0     1.2537  0.53874 0     1.28439 0.434294    0     1.30815 0.330936    0     1.32515 0.230198    0     1.33561 0.133173    0     1.33981 0.0405447   0     1.33807 -0.0473723  0     1.33071 -0.130566   0     1.31803 -0.209266   0     1.30032 -0.283883   0     1.27781 -0.354957   0     1.25071 -0.423121   0     1.21919 -0.489065   0     1.18336 -0.553523   0     1.14327 -0.617253   0     1.09894 -0.681037   0     1.05031 -0.745674   0     0.997309    -0.811985   0     0.939765    -0.880811   0     0.877471    -0.953012   0     0.81016 -1.02946    0     0.737503    -1.11104    0     0.659117    -1.19857    0     0.574566    -1.2928 0     0.483372    -1.39432    0     0.385033    -1.50335    0     0.279056    -1.61961    0     0.165004    -1.742  0     0.0425688   -1.86824    0     -0.0883296  -1.99446    0     -0.227417   -2.1148 0     -0.37392    -2.22123    0     -0.526427   -2.30376    0     -0.68279    -2.35129    0     -0.84013    -2.35325    0     -0.994979   -2.30182    0     -1.14358    -2.19409    0     -1.28228    -2.03341    0     -1.40797    -1.82915    0     -1.5184 -1.59496    0     -1.61235    -1.34614    0     -1.68956    -1.09692    0     -1.75062    -0.858681   0     -1.79667    -0.639141   0     -1.82921    -0.442463   0     -1.84984    -0.269927   0     -1.86016    -0.120777   0     -1.86162    0.00698576  0     -1.85553    0.115975    0     -1.84301    0.208983    0     -1.82497    0.288714    0     -1.80219    0.357639    0     -1.77525    0.417936    0     -1.74466    0.471483    0     -1.71076    0.519882    0     -1.67385    0.56449 0     -1.6341 0.606463    0     -1.59164    0.646794    0     -1.54654    0.686352    0     -1.49881    0.725909    0     -1.44841    0.766178    0     -1.39527    0.807829    0     -1.33925    0.85152 0     -1.2802 0.89791 0     -1.21788    0.947684    0     -1.15205    1.00156 0     -1.0824 1.06031 0     -1.00855    1.12475 0     -0.930078   1.19577 0     -0.846509   1.27428 0     -0.757294   1.36121 0     -0.661824   1.45744 0     -0.559443   1.56366 0     -0.449463   1.68024 0     -0.331198   1.80687 0     -0.204031   1.94227 0     -0.0675019  2.08357 0     0.0785556   2.22577 0     0.233841    2.3611  0     0.397387    2.47881 0     0.567366    2.5655  0     0.740977    2.60659 0     0.914493    2.58894 0     1.08351 2.50416 0     1.24344 2.35155 0     1.39009 2.13913 0     1.52018 1.88231 0     1.6317  1.60044 0     1.72397 1.31283 0     1.79745 1.03554 0     1.85344 0.779751    0     1.89372 0.551697    0     1.92029 0.353461    0     1.93511 0.184222    0     1.94001 0.0414127   0     1.93657 -0.0783631  0     };          \addplot3[         color=black!30!white,         quiver={             u={y},             v={0 - x + y * (1 - x^2)},             scale arrows=0.1         },         -stealth,         samples=20     ]{0};          \end{axis}     \end{tikzpicture}     \end{document}      Thanks for your help!


title: Some extensions to pst-solides3d

text: I asked this set of questions (actually 2 of the 3 below) on the `PSTricks` mailing list a couple of days ago, but have since heard that Herbert's "to do" list is quite lengthy. So, I'm distributing them to a wider audience here, in hopes of getting some feedback... Consider the following minimal example:               \documentclass{article}     \usepackage{multido}%     \usepackage{pst-solides3d}%     \pagestyle{empty}     \begin{document}     \begin{pspicture}(-4,-4)(10,10)       \psset{viewpoint=50 45 20 rtp2xyz,Decran=25,lightsrc=50 45 20,lightintensity=1}%            % ================== SPHERE ==================       \psSolid[%         r=3.5,% sphere radius         object=calottesphere,% sphere         theta=90,phi=-90,% angles between which to draw the hollow spherical section         ngrid=45 45,% number of grid lines across 2 dimensions r         grid,% remove line edges         fillcolor=black!15,%         incolor=black!15,%         hollow=true,% object has a hollow look         action=draw**](0,0,0)% draw the object            % ================== SECTION CURVE ==================       % pi/2~1.5707963267948966192313216916398       % pi/30~0.10471975511965977461542144610932       % pi/15~0.20943951023931954923084289221863       % pi/6~0.52359877559829887307710723054658       % r=3.5*sin(45)~2.4748737341529       % x=r*cos(t), y=r*sin(t), z={2.4748737341529,4.4748737341529}       \defFunction[algebraic]%         {sectioncut}(t)%         {3.5*cos(0.5236)*cos(t)}{3.5*cos(0.5236)*sin(t)}{3.5*sin(0.5236)}%       \multido{\rA=0.0+0.2094,\rB=0.1047+0.2094}{15}{%         \psSolid[%           object=courbe,% object is a curve           r=0,% with of curve line is 0           range=\rA\space \rB,%           linecolor=black,%           linewidth=0.5\pslinewidth,%           resolution=360,%           RotZ=-45,%           function=sectioncut]%       }%     \end{pspicture}     \end{document}      It produces this sphere and dashed line segment: ![Sphere with dashed line segment](http://i.stack.imgur.com/LTlhK.jpg) Since I am unfamiliar with fiddling around in the guts of packages, I am not sure whether my questions are at all reasonable, or perhaps just too far- fetched. However, asking is free, right? Riiight... * * * **Question 1** : Is it possible to change the default shadow colour from black to something else? My motivation for this question stems from the fact that the shadow of the object from the light source (`lightsrc`) depends on the specified `viewpoint` parameter, and could potentially be solid black. Consequently, in an attempt to reduce the shadow intensity, `lightsrc` and `viewpoint` could be chosen closer together. However, the package documentation suggests against this by stating the following (on page 16): > Note: In order to get some shadow regions to appear in the graphic — which > emphasises the 3D character — we would suggest choosing the light source and > the view point differently. So, in order to heed this note, it would be ideal to have/use an option like `shadowcolor=black!50` (say). On that thought - and here I'm going for gold - how about an option like `lightsrccolor=green!50!red` (say) for those festive times when you're really screwing around with different-coloured light bulbs. * * * **Question 2** : Is it possible to create a dashed line style (`linestyle=dashed`) for a parametric curve in 3D (`object=courbe`)? Although the section curve in the graphic looks like a dashed line, it actually uses the `multido` package to sequentially print _15 solid line segments_ of a parametric curve along intervals of pi (pi/15~0.2094 to more accurate). However, I think this artificially bloats the resulting EPS/PDF since each of the (15) line segments is considered its own `\psSolid[object=courbe,...]`. * * * **Question 3** : `pst-solides3d` provides the option `opacity=k` where 0<=k<=1 which sets the fill opacity of a _surface_. Is it possible to add a similar option for stroke opacity? This option stems from playing around with `PSTricks`' options for opacity: `strokeopacity` (for normal stroke operation) and `opacity` (for filled areas).


title: Spanish babel and chemformula package

text: I need to write a chemical reaction. I use to make this with `mhchem`, but I discover `chemformula`. All it is right but no the arrows when I use the package `babel` in spanish. There are a problem with spanish babel, because these two codes demonstrate there is a conflict. I need to use spanish `babel` and `chemformula` at the same time. These are the codes: The first one:               \documentclass[11pt]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[spanish]{babel}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{chemformula}     \begin{document}     \ch {C6H12O6 (s)  +  6 O2 (g) <-> 6 CO2 (g)  +  6 H2O(l)}     \end{document}      and the second:               \documentclass[11pt]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{chemformula}     \begin{document}     \ch {C6H12O6 (s)  +  6 O2 (g) <-> 6 CO2 (g)  +  6 H2O(l)}     \end{document}      Can somebody help me?


title: citation square brakets upright in theorems

text: How to set up the citation square brakets and numbers in upright in theorems while keeping other stuffs slanted? (This style is suggest by my professor.) The usual appearance is the following > _Theorem. There is no biggest prime number (see [1, Theorem 30 at page > 100])._ I would like to achieve > _Theorem. There is no biggest prime number_ ( _see_ [1, _Theorem_ 30 _at > page_ 100]). I could manually set `\textup` to numbers to upright but can not set the square brackets to upright.


title: ‘Article.cls’ not found after installing homebrew

text: I’m using Kile as my primary editor on Max OS X and everything was working fine until yesterday. I installed homebrew and used it to install some other software. I’m thinking some of my directories got moved around. How can I specify the search path for Kile? And how do I determine what the correct path is now? I know I just have to set the TEXINPUTS environment variable, but can’t find where it should point to.


title: Vertically center a table inside a subfloat

text: The following MWE produces two tables side by side:               \documentclass{report}          \usepackage{tabu}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{subfig}     \usepackage{siunitx}     \usepackage[version=3]{mhchem}          \newcommand{\ul}{\si{\micro\liter}}     \newcommand{\uM}{\si{\micro}M}     \newcommand{\degc}{\si{\celsius}}          \begin{document}          \begin{table}[h]             \centering             \caption{PCR conditions}                  \subfloat{\begin{tabu}{lrrrr}                 \toprule                                 & 1X        & 2X        & Total     & Per tube  \\                 \midrule                 \ce{H2O}        & 9.10 \ul  & 18.20 \ul & 18.20 \ul & 9.10 \ul  \\                 2X KAPA HiFi    & 10.00 \ul & 20.00 \ul & 38.20 \ul & 19.10 \ul \\                 AMPG1 (10 \uM ) & 0.40 \ul  & 0.80 \ul  & 39.00 \ul & 19.50 \ul \\                 ORIG1 (10 \uM ) & 0.40 \ul  & 0.80 \ul  & 39.80 \ul & 19.90 \ul \\                 Template        & 0.25 \ul  & ---       & ---       & ---       \\                 \midrule                 \textbf{Total}  & 20.00 \ul & ---       & ---       & ---       \\                 \bottomrule             \end{tabu}}             \subfloat{                 \begin{tabu}{ccc}                     \toprule                     \multicolumn{2}{c}{95\degc}     & 3:00      \\                     \midrule                     \multirow{3}{*}{x35} & 98\degc  & 0:30      \\                                          & 54\degc  & 0:20      \\                                          & 72\degc  & 1:00      \\                     \midrule                     \multicolumn{2}{c}{72\degc}     & 3:00      \\                     \multicolumn{2}{c}{4\degc}      & $\infty$  \\                     \bottomrule                 \end{tabu}             }     \end{table}          \end{document}      However, the second table is awkwardly positioned: ![enter image description here](http://i.stack.imgur.com/L4CTp.png) I'd like the second, smaller table to be moved down, so that it is centered vs. the bigger first table.


title: Formatting the thread call stack

text: Given a thread call stack as follows:               FATAL org.apache.hadoop.mapred.TaskTracker:     Error running child : java.lang.OutOfMemoryError: Java heap space     org.apache.hadoop.io.Text.setCapacity(Text.java:240)     at org.apache.hadoop.io.Text.set(Text.java:204)      at org.apache.hadoop.io.Text.set(Text.java:194)      at org.apache.hadoop.io.Text.<init>(Text.java:86)     ......     at org.apache.hadoop.hive.ql.exec.persistence.RowContainer.next(RowContainer.java:263)     org.apache.hadoop.hive.ql.exec.persistence.Row Container.next(RowContainer.java:74)     at org.apache.hadoop.hive.ql.exec.CommonJoinOperator.checkAndGenObject(CommonJoinOperator.java:823)     at org.apache.hadoop.hive.ql.exec.JoinOperator.endGroup(JoinOperator.java:263)     at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:198)     ......     at org.apache.hadoop.hive.ql.exec.persistence.RowContainer.nextBlock(RowContainer.java:397)     at org.apache.hadoop.mapred.Child.main(Child.java:170)      How to write the latex code to achieve the following effect. The effects contains Indentation, Automatic bold for specific lines and A monospaced font. Note that the generated lines should be able to span the two columns if the paper is two-column style. I've tried lstlisting but the fonts and indentation are not good. ![enter image description here](http://i.stack.imgur.com/L62y2.jpg) ![enter image description here](http://i.stack.imgur.com/BhFt5.jpg)


title: Use of \midrule in booktabs table

text: Are there any formal guidelines/suggestions on the use of `\midrule` inside a `booktabs` table with just rows of identically formatted data? The booktabs manual is very specific about vertical rules, stating that you should > [n]ever, ever use vertical rules. But what about horizontal rules between data items of the same type? This question occurred when deciding if a LaTeX table generator should insert `\midrule`s between each line. The picture below (shamelessly stolen from there) shows the difference for the same data (but with slightly different formatting of the figures): ![Different ways to format the same data](http://i.stack.imgur.com/zVy3n.png)


title: Removing the enumeration of align text

text: I want to remove the number next to the aligned text produced by this code:               \begin{align}     U & =c^\intercal G_1\\     V & =b^\intercal G_2,\notag     \end{align}      Which displays as follows: ![enter image description here](http://i.stack.imgur.com/QCLqb.png) Can anyone help me?


title: Conditionals inside document

text: Sorry I was not able to reproduce this problem outside Friggeri's CV template... I am using Friggeri's CV template with the same friggeri-cv.cls (I have only changed all the Helvetica fonts to Arial). I want to use the "print" option that removes colors making everything grayscale. With that purpose I want to include some conditionals inside the document. While I have successfully used the following structure in the preamble:                \ifdefined\@cv@print       do this      \else      do that      \fi      I cannot make it work inside the body of my document... is it even possible? I am new with conditionals, so I am quite lost here... I have included the following MWE:               \documentclass[print]{friggeri-cv}%"BLACK&WHITE" should appear     %- or -%     %\documentclass[]{friggeri-cv}%"COLORS" should appear in red          \begin{document}     \header{name}{surname}            {occupation}          % In the aside, each new line forces a line break     \begin{aside}       \section{section}         aaa         bbb     \end{aside}               \section{section}     \begin{entrylist}       \entry         {2014}         {\ifdefined\@cv@print         BLACK\&WHITE         \else         {\addfontfeature{Color=red}COLOR}         \fi}         {more here}         {and more text}     \end{entrylist}               \end{document}


title: Piecewise item list in beamer with transparency

text: I'd like to have a list in beamer that fits with the following requirements:   1. blank page   2. item 1 is shown   3. item 2 is shown and item 1's opacity is reduced to the beamer "standard"   4. item 3 is shown and item 2 and 1's opacity is reduced to the beamer "standard"   5. item 4 is shown and item .... and so on What I have so far:               \documentclass[aspectratio=169]{beamer}     \usepackage[utf8]{inputenc} % UFT8x - danske bogstaver     \usepackage[T1]{fontenc}     \begin{document}     \begin{frame}     \begin{itemize}         \item $x$-aksen: kemisk skift, elektrontæthed omkring det atom, som proton(erne) er bundet til         \pause         \item $y$-aksen: ækvivalente antal protoner         \pause         \item Intensitet $=$ areal (integral) under signal         \pause         \item Intensitet $=$ antal ækvivalente protoner         \pause         \item Kan ``mærke'' nærliggende protoner $\to$ opsplitning     \end{itemize}     \end{frame}     \end{document}      Gives me a list where they get covered one after another.               \documentclass[aspectratio=169]{beamer}     \usepackage[utf8]{inputenc} % UFT8x - danske bogstaver     \usepackage[T1]{fontenc}     \begin{document}     \begin{frame}     \setbeamercovered{transparent}          \begin{itemize}[<+->]         \item $x$-aksen: kemisk skift, elektrontæthed omkring det atom, som proton(erne) er bundet til         \item $y$-aksen: ækvivalente antal protoner         \item Intensitet $=$ areal (integral) under signal         \item Intensitet $=$ antal ækvivalente protoner         \item Kan ``mærke'' nærliggende protoner $\to$ opsplitning     \end{itemize}     \end{frame}     \end{document}      Gives me a list where the first item is visible and the rest are semi- transparent in the start, and gets uncovered one after another.


title: Increase font size and making a boldface in mathmode in Latex

text: ![enter image description here](http://i.stack.imgur.com/N9EPz.png) How to increase the font size and make a boldface of the whole symbol given above in mathmode in Latex ?


title: Dialect of the `[1.]` suffix in `\begin{enumerate}[1.]`?

text: I have a tool (pandoc) that is producing tex. Among the output is the following:               \begin{enumerate}[1.]     \item foo     \item bar     \item baz     \end{enumerate}      `pdflatex` then refuses to compile it with error "there is something wrong" When I remove the `[1.]` it compiles successfully. Is the use of this `[1.]` parameter some kind of dialect mismatch? Which dialects if any support the construct and which do not?


title: Substituting lowerbacktitle in one-sided document

text: I'm using LyX and the thesis template that comes with it. When I changed my document from two-sided to one-sided a page in the output disappeared. I found out that this was the `\lowertitleback` that requires a two-sided document (and that makes sense, I guess, since there is no back of the title on a one- sided document.) Is there another command I can use that gives me the same result as `\lowertitleback` but on another page in a one-sides document? **Edit:** I'm thinking that `\maketitle` could be the way to go but that gives me a lot of problems:   * the first line of the page (listing names of my professors, referees etc.) is indented   * and empty heading line (as the one used in my chapters) is displayed   * the `\dedication` is shown on the same page as `\maketitle`. If I separate with `\clearpage` then the page with `\dedication` isn't displayed well - is has the heading line as well and it's no longer centered. The easiest way to go would be to merge the pdf output of the `\lowertitleback` page from a two-sided version of the document with output of the one-sided one - but that would be cheating so I would like a fix.


title: Labeling Multiple Equations Per Row of a Table

text: I am trying to create a table with two columns of independently labelled equations (1-6). Unfortunately, everything I have found so far either has not worked or would number them as sub-equations (1a, 1b, etc). My current attempt is:               \documentclass{article}     \usepackage{graphicx, verbatim, tabularx}     \usepackage{amsfonts}     \usepackage{amsmath, amssymb}      \newcommand{\grad}{\vec{\nabla}}           \newcommand{\prtl}[2]{\frac{\partial #1}{\partial #2}}      \newcommand{\curl}{\grad\times}     \begin{document}      \begin{tabular}{p{5cm}p{5cm}}      $\curl\vec{E} = -i\omega\mu\vec{H}$ &       $\curl\vec{H} = i\omega\mu\vec{E}$ \\      \begin{equation}      \label{eq:curlHx}       \prtl{E_z}{y} +\gamma E_y= -i\omega\mu H_x      \end{equation}      &      \begin{equation}      \label{eq:curlEx}        \prtl{H_z}{y} +\gamma H_y= i\omega\mu E_x      \end{equation}\\      \begin{equation}      \label{eq:curlHy}        -\prtl{E_z}{x} -\gamma E_x= -i\omega\mu H_y      \end{equation}      &      \begin{equation}      \label{eq:curlEy}        -\prtl{H_z}{x} -\gamma H_x= -i\omega\mu E_y      \end{equation}      \\      \begin{equation}      \label{eq:curlHz}       \prtl{E_y}{x}-\prtl{E_x}{y} = -i\omega\mu H_z      \end{equation}      &      \begin{equation}      \label{eq:curlEz}        \prtl{H_y}{x}-\prtl{H_x}{y} = -i\omega\mu E_z      \end{equation}      \end{tabular}          \end{document}      Is there an environment other than tabular that would make this work? Tabularx came close (got the numbering correct), but the formatting/spacing was horrific.


title: Please help with multicolumn/multirow

text: I've been searching for an example of confusion matrix, and I found one that I need to modify. Here is the example:               \documentclass[11pt]{article}     \usepackage{tikz}     \usepackage{multirow}     \begin{document}     \begin{tabular}{l|l|c|c|c}     \multicolumn{2}{c}{}&\multicolumn{2}{c}{Truediagnosis}&\\     \cline{3-4}     \multicolumn{2}{c|}{}&Positive&Negative&\multicolumn{1}{c}{Total}\\     \cline{2-4}     \multirow{2}{*}{Screening test}& Positive & $a$ & $b$ & $a+b$\\     \cline{2-4}     & Negative & $c$ & $d$ & $c+d$\\     \cline{2-4}     \multicolumn{1}{c}{} & \multicolumn{1}{c}{Total} & \multicolumn{1}{c}{$a+c$} & \multicolumn{1}{c}{$b+d$} &\multicolumn{1}{c}{$N$}\\     \end{tabular}     \end{document}      which produces: ![enter image description here](http://i.stack.imgur.com/zGAQx.png) What I need it's basically delete the "Total" column and row, and make the matrix size 4x4. I would like to turn 90 degrees the left text. This is what I mean (I swear I did it with paint :D): ![enter image description here](http://i.stack.imgur.com/l6W4v.png) Thank you very much in advance!


title: Breaking the equation inside a fraction

text: I am trying to write this equation using the help provided in the link below How to break a long expression in the denominator of a fraction? Still the equation goes outside the margin. I using `\documentclass[a4paper,10pt]{article}`.               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{mathtools}     %opening     \title{}     \author{}          \begin{document}         \maketitle          \begin{abstract}        \end{abstract}          \section{}              \begin{equation*}     -\dfrac{1}{128\pi^{2}}\left[\dfrac{\splitdfrac{4(m_1 + m_3)\cos~\delta~\sin\theta_{12}~\sin\theta_{13}(\cos~\delta~\cos~\theta_{12}(2~y_e^{2}      - y_\mu^{2} - y_\tau^{2} +(y_\mu^{2} - y_\tau^{2})\cos~2\theta_{23})\sin~\theta_{13}}{+ (-y_\mu^{2} + y_\tau^{2})\sin~     \theta_{12}~\sin~2\theta_{23}}}{m_1 - m_3}\right] +      \end{equation*}         \end{document}


title: While using fancy header, when using \chapter*, header takes previous chapter heading

text: I want to change the font style of right header. while using \chapter*, right header show the chapter heading of the previous chapter.               \documentclass[12pt]{scrreprt}          \usepackage{booktabs}     \usepackage[explicit]{titlesec}     \usepackage{tikz}     \usetikzlibrary{calc}          \DeclareFixedFont{\chapternumberfont}{T1}{ppl}{m}{n}{1.5in}          \newcommand\brectangles{%     \begin{tikzpicture}[overlay, remember picture]     \fill[red!60!blue!50!green!120]%[red!60!blue!50!green!150]%        (current page.north west) rectangle ( $ (current page.north east) + (0,-7cm) $);     \fill[red!60!blue!50!green!120]%[red!60!blue!50!green!150]%        (current page.south west) rectangle ( $ (current page.south east) + (0,3cm) $);     \end{tikzpicture}%     }          \titleformat{\chapter}[display]       {\Large\bfseries\ssfamily\color{white}}%\scshape       {\thispagestyle{empty}\brectangles}       {-2in}       {%       \vskip-4ex\filcenter {\small\MakeUppercase{Project on Compilation of...}}\\[2ex]       \parbox[b]{.65\linewidth}{#1}%       \raisebox{0.8in}{\parbox{.15\linewidth}{\large\chaptertitlename}}%       \parbox[b]{.2\linewidth}{\chapternumberfont\thechapter}%       }       [\vspace*{1in}]          \titleformat{name=\chapter,numberless}[display]       {\Huge\bfseries\color{white}} %sffamily\       {\thispagestyle{empty}\brectangles}        {-2in}       {\parbox[b]{.65\linewidth}{#1}}       [\vspace*{1in}]               % for fancy header & footer     \usepackage{xcolor}%     \usepackage{fancyhdr}     \pagestyle{fancy}     \lhead{Statistics}     \lfoot{ LHS }     \rfoot{\includegraphics[width=20pt]{logo}}     \renewcommand{\headrulewidth}{1pt}     \renewcommand{\footrulewidth}{1pt}               %for quotes     \usepackage{csquotes}          % for hyperrefrences     \usepackage{url}     \usepackage[linktoc=all]{hyperref}     \hypersetup{     colorlinks,     citecolor=black,     filecolor=black,     linkcolor=black,     urlcolor=blue     }          % for line spacing     \renewcommand{\baselinestretch}{1.15}          %for indenting paragraphs     \setlength{\parskip}{1em}          %for drop caps     % works with pdfLaTeX     \usepackage{type1cm} % scalable fonts     \usepackage{lettrine}          % FOR CALLIGRAPHIC FONTS     \usepackage{calligra}     \usepackage[T1]{fontenc}          \renewcommand{\arraystretch}{2}          \begin{document}          \tableofcontents          \pagenumbering{roman}          \pagestyle{empty}% no page numbers          \pagestyle{plain}          \pagestyle{fancy}          \pagenumbering{arabic}          \chapter {Introduction}          \clearpage          \section{Right header is in capitals, how to change in normal font}          \section {Background}          \chapter*{Appendicies}          \addcontentsline{toc}{chapter}{Appendicies}          \section*{Appendix-W.R}          \addcontentsline{toc}{section}{Appendix-Workers' Remitances}          \clearpage          \newpage          \section{Ahmad}          \end{document}


title: Functions with no parameters in algorithmicx

text: I am trying to write an algorithm using `algorithmicx`and I need to put a function with no parameters. I use               \Function {foo}{}      latex produces: > function FOO However I need: > function FOO() (The same goes for calling a function (i.e. when using `\Call{foo}{}`)


title: Define abstract environment in book

text: I want to define an abstract environment for `\documentclass{book}`. Therefore, I copied the relevant definitions from `report.cls` from here into my preamble. But it doesn't work. Where's the problem?               \documentclass[11pt, a4paper]{book}          \usepackage{lipsum}          \makeatletter     \if@titlepage       \newenvironment{abstract}{%           \titlepage           \null\vfil           \@beginparpenalty\@lowpenalty           \begin{center}%             \bfseries \abstractname             \@endparpenalty\@M           \end{center}}%          {\par\vfil\null\endtitlepage}     \else       \newenvironment{abstract}{%           \if@twocolumn             \section*{\abstractname}%           \else             \small             \begin{center}%               {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%             \end{center}%             \quotation           \fi}           {\if@twocolumn\else\endquotation\fi}     \fi     \makeatother          \begin{document}          \begin{titlepage}     \begin{abstract}       \lipsum[1]     \end{abstract}     \end{titlepage}          \chapter{This and That}          \lipsum[2]          \end{document}      I know there are lot's of solutions on the web on how to write abstracts in the book class. I am mainly interested in the question why my solution of defining the environment technically doesn't work.


title: Change to class file not reflected

text: I am using a class file to help document my thesis. I need to make some basic changes and I therefore go and edit my class file. I save it and then in Texnic Center when I do `shift`+`ctrl`+`f5` I do not get the updated information. Is there another way to compile or something? I am not sure why changes do not get reflected.


title: Staircase paths through young tableaux

text: I would like to draw a staircase path in a young tableau that uses the sides of the boxes in the tableau as steps. For example, in the tableau               \documentclass[border=2mm]{standalone}     \usepackage{ytableau}     \begin{document}     \ytableausetup     {boxsize=1.25em}     \ytableausetup     {aligntableaux=top}     \begin{ytableau}     *(blue!40) 1& *(blue!40) 3 &*(blue!40) 5 &7&9\\     *(blue!40) 2 & *(blue!40) 4 &8&10&11     \end{ytableau}     \end{document}        I would like to have the bottom side of the box with the entry 2 as the first step, then bottom of box 4, then right side of box 4, bottom of box 5, right side of box 5, top box 7, top box 9. The colors are not important, they're there for convenience, as long as there is this path drawn across the tableaux. Any ideas?


title: Why does hyperref return errors when options are included to this package?

text: When I include these options to the package hyperref I get error messages and the file doesn't compile! Please here is a minimal working environment:               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage[colorlinks=true,linkcolor=blue]{hyperref}          \begin{document}          \begin{equation}      E = M c^2      \label{eq}     \end{equation}               \eqref{eq} was given by Einstein.          \end{document}      However, when I include in addition the package cleveref, the program crashes. Any help would be highly appreciated.


title: keyval error for listings/color?

text: When I try to compile this in my code, the compiler tells me Package keyval Error: backgroudcolor undefined. I really don't understand why it is telling me that when I know the package is installed. I don't know what else to do either, this is only my second time useing Latex for anything. Any help would be appreciated.               \documentclass{article}     \usepackage{fancyhdr}     \usepackage{listings}     \usepackage{graphics}     \usepackage{color}     \pagestyle{fancy}     \cfoot{Page : \thepage}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}          \definecolor{dkgreen}{rgb}{0,0.6,0}     \definecolor{gray}{rgb}{0.5,0.5,0.5}     \definecolor{mauve}{rgb}{0.58,0,0.82}          \lstset{frame=tb,       aboveskip=3mm,       belowskip=3mm,       showstringspaces=false,       columns=flexible,       basicstyle={\small\ttfamily},       backgroudcolor=\color{mauve}       numbers=left,       numberstyle=\tiny\color{gray},       keywordstyle=\color{blue},       commentstyle=\color{dkgreen},       breaklines=true,       breakatwhitespace=true       tabsize=3     }


title: Using bibtex from Org mode: .bbl and .aux files are incorrectly generated

text: I've searched this site as well as other resources, and I understand it that this is a common problem, however, no single place can explain what exactly are the steps for debugging or troubleshooting. Here's my setup:               #+LATEX_HEADER: \hypersetup{urlcolor=blue}     #+LATEX_HEADER: \hypersetup{colorlinks,urlcolor=blue}     #+LATEX_HEADER: \bibliographystyle{plain}     #+LATEX_HEADER: \bibliography{gg}          #+BEGIN_SRC sh :exports none       BIBINPUTS=./gg.bib:$BIBINPUTS       export BIBINPUTS     #+END_SRC      Here's the TEX file produced from Org mode:               \documentclass[11pt]{report}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{fixltx2e}     \usepackage{graphicx}     \usepackage{longtable}     \usepackage{float}     \usepackage{wrapfig}     \usepackage{rotating}     \usepackage[normalem]{ulem}     \usepackage{amsmath}     \usepackage{textcomp}     \usepackage{marvosym}     \usepackage{wasysym}     \usepackage{amssymb}     \usepackage{hyperref}     \tolerance=1000     \hypersetup{urlcolor=blue}     \hypersetup{colorlinks,urlcolor=blue}     \bibliographystyle{plain}     \bibliography{gg}     \author{me}     \date{2014-08-24}     \title{unimportant}     \hypersetup{      pdfkeywords={unimportant},       pdfsubject={unimportant},       pdfcreator={Emacs 24.3.1 (Org mode 8.2.6)}}     \begin{document}          \maketitle     \tableofcontents          \cite{Wilkinson}     ...     \end{document}      Log produced by Bibtex:               This is BibTeX, Version 0.99d (TeX Live 2013)     Capacity: max_strings=35307, hash_size=35307, hash_prime=30011     The top-level auxiliary file: test.aux     The style file: plain.bst     I found no \bibdata command---while reading file test.aux     Warning--I didn't find a database entry for "Wilkinson"     [...]       Contents of gg.bib file:               @book{Wilkinson,      author = {Wilkinson, Leland},      title = {The Grammar of Graphics (Statistics and Computing)},      year = {2005},      isbn = {0387245448},      publisher = {Springer-Verlag New York, Inc.},      address = {Secaucus, NJ, USA},     }      This is the .bbl file produced:               \begin{thebibliography}{}          \end{thebibliography}      Note that this is already wrong: content is missing. Org mode log:               compiling test.tex...     test.bbl:1: Missing \begin{document}.     test.bbl:1: leading text: \begin{thebibliography}{}      Well, this is nonsense, why should there be `\begin{document}` here? Anyways, in the end, the PDF is generated, but no bibliography and the citations look like `[?]`. I've tried all of these programs to generate the output:               (setq org-latex-to-pdf-process '("latexmk -pdf %f"))          ;; (setq org-latex-to-pdf-process     ;;       '("xelatex %f && bibtex %f && xelatex %f && xelatex %f"))          ;; (setq org-latex-to-pdf-process     ;;      '("pdflatex -interaction nonstopmode %b"     ;;        "bibtex %b"     ;;        "pdflatex -interaction nonstopmode %b"     ;;        "pdflatex -interaction nonstopmode %b"))          ;; (setq org-latex-pdf-process '("rubber -d --into %o %f"))          ;; (setq org-latex-pdf-process     ;;       '("texi2dvi --pdf --clean --verbose --batch %f"     ;;         "bibtex %b" "texi2dvi --pdf --clean --verbose --batch %f"     ;;         "texi2dvi --pdf --clean --verbose --batch %f"))      They give more or less the same results. Depending on the phase of the moon and whether Venus can be found in the constellation of Libra, the error messages can vary, but most of them don't even resemble the actual state of affairs in the document they are supposed to relate to. I will post error messages upon demand, because I don't want to clutter this already long post. I will be enormously grateful if instead of / in addition to trying to fix my setup, you could provide a complete example which uses .org and .bib files. * * * I'm almost there:               #+LATEX_HEADER: \usepackage[backend=bibtex, style=numeric]{biblatex}     #+LATEX_HEADER: \hypersetup{urlcolor=blue}     #+LATEX_HEADER: \hypersetup{colorlinks,urlcolor=blue}     #+LATEX_HEADER: \addbibresource{gg.bib}      With these modifications and `rubber` as the compiler I can generate the proper citation, but the bibliography list isn't generated. * * * Oh, I made it! :) I was missing `\printbibliography` \- this instructs the processor to place the bibliography in the specified place. I'll wait for an answer though before I post one myself. I can't say that I understand why does it work the way it does, so probably someone who knows better could explain it.


title: unwanted pagebreak in footnote

text: I'm trying to reference a long URL in a footnote. I'm usig hyperref-package (which loads automatically the url-package).               \usepackage[unicode=true,      bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=1,     breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]     {hyperref}     \urlstyle{rm}      My footnote looks like this:               \footnote{\url{https://www.apple.com/pr/library/2008/04/03iTunes-Store-Top-Music-Retailer-in-the-US.html} - besucht 14.08.2012}      The URL is seperated in 2 linex, but the first line is on one page and the second line is on the next page. ![Page1](http://i.stack.imgur.com/yvhVV.png) ![Page2](http://i.stack.imgur.com/EWW4I.png) Do you know how i can fix that issue?


title: Shading a block of my text

text: I would like to surround some source code in my beamer presentation with a lightly shaded box. More specifically in the C++ source code given below, I would like to shade the code block of the `vecAddKernel` function with a light grey box. How do I do this. Here is my code for my beamer frame               \begin{frame}[fragile]{Simple CUDA Code: A Vector Sum}     \lstset{ language=C++,              basicstyle=\ttfamily\scriptsize,              keywordstyle=\color{blue}\ttfamily,              stringstyle=\color{red}\ttfamily,              commentstyle=\color{green}\ttfamily            }        \begin{lstlisting}        // Compute vector sum C = A+B        // Each thread performs one pair-wise addition        __global__        void vecAddKernel(float* A_d, float* B_d, float* C_d, int n)         {           int i = threadIdx.x + blockDim.x * blockIdx.x;           if(i<n) C_d[i] = A_d[i] + B_d[i];         }         int vecAdd(float* A, float* B, float* C, int n)           {            // A_d, B_d, C_d allocations and copies omitted            // Run ceil(n/256) blocks of 256 threads each               dim3 DimGrid(ceil(n/256.0), 1, 1);               dim3 DimBlock(256, 1, 1);               vecAddKernnel<<<DimGrid,DimBlock>>>(A_d, B_d, C_d, n);          }         \end{lstlisting}     \textbf{Note: } Calls to kernels are \textbf{\color{orange}asynchronous}.     \end{frame}      Here is the output of compiling it. ![enter image description here](http://i.stack.imgur.com/RZu1T.png)


title: Extracting parts of a .sty file

text: Can you load only _some_ specific parts from a package while _not loading_ the rest at all? For example, from the code below I wanted to load only the `\newcommands`               %theorems     \usepackage{theorem}     \newtheorem{teo}{Teorema}[section]     \newtheorem{cor}[teo]{Corol\'ario}     \newtheorem{lem}[teo]{Lema}     \newtheorem{prop}[teo]{Proposi\c{c}\~ao}     %********************************************************************     %newcommands     \providecommand{\sin}{} \renewcommand{\sin}{\hspace{2pt}\textrm{sen}}     \providecommand{\tan}{} \renewcommand{\tan}{\hspace{2pt}\textrm{tg}}     \newcommand{\N}{\mathbb{N}}     \newcommand{\Z}{\mathbb{Z}}     \newcommand{\Q}{\mathbb{Q}}     \newcommand{\R}{\mathbb{R}}     \newcommand{\C}{\mathbb{C}}      In my `.tex` file I would like to use for instance               \documentclass{article}     \usepackage['newcommands only']{file.sty}      or something similar to this.


title: Avoid page break in theorem

text: I have a theorem which is half of it on another page, as I do for you automatically (without `\newpage`) get full theorem on the next page?               \documentclass[a4paper]{book}     \usepackage[utf8]{inputenc}     \usepackage{lipsum}     \usepackage{theorem}     \newtheorem{teo}{Teorema}[chapter]          \begin{document}     \lipsum[1-5]          \begin{teo}     \lipsum[1]     \end{teo}          \end{document}      ![here](http://i.stack.imgur.com/Hy6nz.png) I have the left and I need right automatically (without `\newpage`).


title: Aligning multiple binary operators

text: ## Objective I want to align the following:               expr_a1 <= expr_a2 <= expr_a3 \\     expr_b2 <= expr_b2 <= expr_b3 \\      Now, I want the `<=` to be aligned with each other; the `expr_*2` to be centered; the `expr_*1` to be right aligned, and the `expr_*3` to be left aligned ## What I have tried: `\begin{flalign}`, `\begin{align}` ## Question: Is this possible to do with `flalign`/`align`, or should I be looking into other packages in AmsMath, or other packages in LaTeX? ## Minimal Broken Example:               \begin{flalign}     a_1    & \leq &    a_2    & \leq &   a_3 \\     b_1    & \leq &    b_2    & \leq &   b_3 \\     \end{flalign}


title: Use custom tags to split bibliography

text: With `biblatex` you can split a bibliography based on keywords using               \printbibliography[keywords=mykeyword]        as documented in Sectioning bibliography by type of refered item. This seems to be hardwired to use the `keywords` field. Is there a way to divide the bibliography based on another field? Specifically, Mendeley inserts a `mendeley-tags` field that looks like:               mendeley-tags = {mytag1,mytag2,mytag3},      I have tried               \printbibliography[mendeley-tags=mytag3]      but that doesn't work. Is there a way to set this up?


title: Printing a character that has been made active in text and/or math mode?

text: I am not very familiar with TeX's category codes. If I use               \catcode`\|=13 \renewcommand{|}{hello world}      then every use of `|` in my document will be replaced by `hello world`. However, how would I be able to still print the `|` sign? Of course, the circular reference               \catcode`\|=13 \renewcommand{|}{hello|world}      does not work (exceeding TeX's majestic capacity), although I would like all instances of `|` to print as `hello|world`. And, if I'm correct, the above would just hold for regular text mode. How would the above code change if `|` was to be used in math mode?


title: How to convert LaTeX 2.09 to LaTeX2e

text: I'm trying to convert a LaTeX 2.09 template to LaTeX2e (pdflatex): http://www.yisongyue.com/resume/ How should I convert this line ?               \documentstyle[hyperref, margin, line]{res_yy}      I don't know what class I need to use               \documentclass{article} %% ???     \usepackage{res_yy}     \usepackage{hyperref}     \usepackage{line}


title: BibTeX handling of the Dutch "van" name prefix with natbib

text: I want to produce the following with LaTeX/BibTeX: In the running text: > ... we refer the reader to the work of Van Noort (2010). In the bibliography: > Thomas van Noort. An important paper. 2010. I have tried many tricks, but I don't seem to able to fulfill all the requirements:   1. "Thomas van Noort" has to appear sorted in the bibliography by the name "Noort".   2. In the running text, the "Van" needs to have an uppercase 'V'   3. In the bibliography, the "van" needs to have a lowercase 'v'   4. I am using hyperref, and I want the whole "Van Noort (2010)" text to link to the reference. Using plain `\citet` will generate: > ... we refer the reader to the work of van Noort (2010). Note the lowercase 'v'; this is not acceptable, as per standard treatment of Dutch names. Setting the BibTeX name to `Van Noort, Thomas` makes the running text citation look ok, but then in the bibliography I get > Thomas Van Noort. An important paper. 2010. Note the uppercase 'V'; this is also not acceptable, as it should only be uppercase if it is not preceded by the first name. (1) is easy: I set the BibTeX `author` field to `{\noopsort{Noort}}{van Noort}, Thomas`. (2) and (3) I can fake by saying something like `we refer the reader to the work of Van Noort \citeyear{...}`, but this is not nice, and does not fulfill (4). Anyone has any suggestions? I was under the impression that LaTeX and BibTeX were designed with these kind of things in mind, so maybe I'm missing something...