title: Fill from path to axis with tikz intersections

text: I am trying to represent parts of a plot that extend from a simple curve to the boundaries, but I can't find a simple way of creating the closed path from the intersection of two paths. I have seen much more complicated examples, so I'm sure there is an easy way using intersections but I can't find a description in the manual for something that seems simple. The MWE is below, but what I need is the fill to join up with the curve. Ultimately I need 2 such fills going to the x-axis, but happy to start with 1! Any suggestions welcome.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{intersections}          \begin{document}     \begin{tikzpicture}     \draw [help lines] (0,0) grid (8,6);     \draw [name path=curve, very thick ] (0,4.5) to [out=-90,in=90]  (8,0);     \draw [name path=top, very thick]  (0,4.5) to (8,4.5)  to (8,3) to (0,3);     \path [name intersections = {of=curve and top}];      \coordinate (A) at (intersection-1);     \coordinate (B) at (intersection-2);     \fill [green] (A)--(8,4.5)--(8,3) --(B) --(A);     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/beatO.png)


title: How can I align this equation?

text: I want to align this equation. I tried               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{fourier}     \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \begin{document}     If $U$, $V$, $W$, $u$, $v$, $v$, $w$ are lengths of edges of the tetrahedron (first three form a triangle; $u$  opposite to $U$ and so on),      \[\text{volume} = \frac{\sqrt {\,( - a + b + c + d)\,(a - b + c + d)\,(a + b - c + d)\,(a + b + c - d)}}{192\,u\,v\,w}\]     where     \begin{align*}     a  &= \sqrt{xYZ}, & b  = \sqrt{yZX},\\     c  &= \sqrt{zXY}, &d  = \sqrt{xyz},\\     X  &= (w - U + v)\cdot(U + v + w),   &x  = (U - v + w)\cdot(v - w + U),\\     Y &= (u - V + w)\cdot(V + w + u),  &y  = (V - w + u)\cdot(w - u + V),\\     Z  &= (v - W + u)\cdot(W + u + v), &z = (W - u + v)\cdot(u - v + W).     \end{align*}     \end{document}      ![enter image description here](http://i.stack.imgur.com/zDwy2.jpg) I feel it is not good. How can I repair it?


title: Tikz code not working in LyX but working in pure Tex

text: I'm trying to add a tikz picture in my LyX document. To do this, I organize the tikz tex code in Texmaker (a friend sent me a tikz code model in a .tex file) and then I copy it to a ERT in LyX (making sure to use the correct packages). The problem is that the code works in Texmaker when I export it to pdf, but doesn't work when I try to preview it with LyX! I get the error: > File ended while scanning use of \pgfkeys@@qset. > > <*>newfile3.tex > > _*_ (job aborted, no legal \end found) The tex code that is working in Texmaker is the following:               \documentclass[12pt,a4paper]{article}          \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          \tikzset{     % Two node styles for game trees: solid and hollow     solid node/.style={circle,draw,inner sep=1.5,fill=black},     hollow node/.style={circle,draw,inner sep=1.5}     }          \begin{center}     \begin{tikzpicture}[scale=1.5,font=\footnotesize]     % Specify spacing for each level of the tree     \tikzstyle{level 1}=[level distance=15mm,sibling distance=35mm]     \tikzstyle{level 2}=[level distance=15mm,sibling distance=15mm]     \tikzstyle{level 3}=[level distance=15mm,sibling distance=8mm]     % The Tree     \node(0)[hollow node,label=above:{Jogador 1},label=right:{$x''$}]{}     child{node(1)[solid node]{}     child{node(3)[solid node,label=right:{$x$}]{}     child{node[solid node,label=below:{$(a_1,b_1)$}]{} edge from parent node[left]{$C$}}     child{node[solid node,label=below:{$(a_2,b_2)$}]{} edge from parent node[right]{$D$}}     edge from parent node[left]{$L$}}     child{node(4)[solid node]{}     child{node[solid node,label=below:{$(a_3,b_3)$}]{} edge from parent node[left]{$C$}}     child{node[solid node,label=below:{$(a_4,b_4)$}]{} edge from parent node[right]{$D$}}     edge from parent node[left]{$R$}}edge from parent node[left,xshift=-3]{$A$}     }     child{node(2)[solid node]{}     child{node(5)[solid node,label=right:{$x'$}]{}     child{node[solid node,label=below:{$(a_5,b_5)$}]{} edge from parent node[left]{$C$}}     child{node[solid node,label=below:{$(a_6,b_6)$}]{} edge from parent node[right]{$D$}}     edge from parent node[left]{$L$}}     child{node(6)[solid node]{}     child{node[solid node,label=below:{$(a_7,b_7)$}]{} edge from parent node[left]{$C$}}     child{node[solid node,label=below:{$(a_8,b_8)$}]{} edge from parent node[right]{$D$}}     edge from parent node[right]{$R$}     }edge from parent node[right,xshift=3]{$B$}     };     % information set     \draw[dashed,rounded corners=10]($(1) + (-.2,.25)$)rectangle($(2) +(.2,-.25)$);     % specify mover at 2nd information set     \node at ($(1)!.5!(2)$) {Jogador 2};     \draw[dashed, rounded corners = 10]($(3) + (-.2,.25)$)rectangle($(6) +(.2,-.25)$);     \node at ($(4)!.5!(5)$) {Jogador 1};     \end{tikzpicture}     \end{center}          \end{document}      So I open LyX, copy all the code bewteen \begin{document} and \end{document}, and put the following in the document preamble:               \usepackage{tikz}     \usetikzlibrary{calc}      But when I try to preview/export to pdf, I get the error I copied above. Can anyone help me, please? Thanks!


title: how to locate the text besides the center of the line

text: I used the code below to add the text besides the line, however, it is very near to the bottom node, I wish to add the text besides the center of the line. May someone help me on this? The code is :               \path [line] (s8) -- node [left]{hotel}(s9);      Now the result is: ![enter image description here](http://i.stack.imgur.com/bjCUe.jpg)


title: To display the lengths in millimeters by default

text: All my length are in millimetres and the command \the\mylength outputs a length in points. Idem with the \layout from the package `layout`. How can I display all theses lengths in millimetres (more easily understandable than the points).


title: Key value options in combination with TikZ

text: I'm trying to create some TikZ commands that use key value options. Using the following link: How to create a command with key values? I was able to declare some commands, but now I'm stuck. As a MWE consider:               \documentclass{article}     \usepackage{keyval}     \usepackage{tikz}     \usepackage{pgfkeys}          \makeatletter          % using keyval package     \define@key{cutkv}{label}{\def\cutkv@label{#1}}     \define@key{cutkv}{bend}{\def\cutkv@bend{#1}}     \setkeys{cutkv}{label={},bend={}}     \newcommand{\cutkv}[3][]{       \begingroup       \setkeys{cutkv}{#1}       \draw[->] (#2) to[\cutkv@bend] node{\cutkv@label} (#3);       \endgroup     }          % using pgfkeys package     \pgfkeys{       /cutpgf/.is family, /cutpgf,       default/.style =       {label = ,        bend = },       label/.estore in = \cutpgf@label,       bend/.estore in = \cutpgf@bend,     }     \newcommand{\cutpgf}[3][]{       \pgfkeys{/cutpgf, default, #1}       \draw[->] (#2) to[\cutpgf@bend] node{\cutpgf@label} (#3);     }     \makeatother          \begin{document}     \begin{tikzpicture}       \cutkv[label=1]{0,0}{3,5}       \cutkv[label=2,bend={bend right}]{1,4}{7,2}       \cutkv[label=3,bend={bend right=10}]{6,0}{5,4}     \end{tikzpicture}          \begin{tikzpicture}       \cutpgf[label=1]{0,0}{3,5}       \cutpgf[label=2,bend={bend right}]{1,4}{7,2}       \cutpgf[label=3,bend={bend right=10}]{6,0}{5,4}     \end{tikzpicture}     \end{document}      The first and the second call of the \cut command work fine, but in the third call the option `bend right=10` is not passed correctly. At least, I don't understand the problem there. I also tried the approach with `pgfkeys`, as mentioned in the first answer of the above post, but that didn't change anything. edit: I added the version with `pgfkeys` to the MWE. Any help is very much appreciated. Thanks.


title: Complex parsing of arguments in new environments

text: I am trying to build an invoice generation system in LaTeX which will be easy and maintainable. Right now we are using longtable and a preprocessing layer. I would like to change this to a `.sty` and a set of macros so that templates can be more heavily separated from the data entered into them. What I would like is an API like:               \begin{invoicetable}{r|llrr|r}{runningnumber,description,qty,sellprice,linetotal}     \heading{runningnumber=\#,partnumber=Partnumber,description=Description,qty=Qty,sellprice=Price,linetotal=Total}     \line{runningnumber=1,partnumber=A-12232,description={Test part, some data},qty=4,sellprice=14.99,linetotal=59.96}     \end{invoicetable}      This would be a macro for something like (pretty formatting added here for clarity):               \begin{longtable}{r|llrr|r}     \# & Partnumber & Description          & Qty & Sellprice & linetotal \\     \endhead      1 & A-12232    & Test part, some data &   4 &     14.99 &     59.96 \\     \end{longtable}      A few reasons for doing this is that it would allow me to drop columns in the environment declaration and have relevant keys ignored in the line items, and it would free up key ordering in the addition of lines themselves (partnumber=A-12232,qty=4 would be the same regardless of ordering). At this point I have a pretty good idea of how the `\line` macro would work in that case (I may name it `\invoiceline`) and if I have trouble I can ask more questions there, but my immediate question is with the argument to the `\begin` macro. I need to be able to figure out roughly how to internally take the comma separated values in, break them up into an ordered list and a counter, something like a counter of `\invoice@cols` as a counter, and `\invoice@col@current` as another one. I figure there would need to be a macro for each col, like `\invoice@col1` returning the name of the column.


title: allowing only horizontal edges (with labels) by using boxes of varying height for nodes

text: I would like to take advantage of tikz-qtree's spacing algorithm to draw (horizontal) trees of the following form                S  _     C     ---| |---------        | |    B        |a|---------        | | A  _  U        |_|---| |---              |b| V              |_|---      where   * both nodes and edges can be labeled   * all edges are horizontal   * the nodes are made up of boxes of varying height.  Actually, I would also like to extend this to graphs that no longer are trees as in the following example                S  _        C     ---| |---------------        | |    B     _        |a|---------| | V        | | A  _  U |c|---        |_|---| |---|_|              |b|              |_|---------                     X      Any ideas how to extend tikz-qtree in this direction? Maybe other tikz-related packages are better suited for this purpose, if so, please let me know.


title: Grouped Bar-Chart, all four in a panel

text: I am tryin to show all four graphs in a single panel page. Also, I want to see my graphs being very professional for beamer presentation in a single frame. Thanks.               \documentclass{article}          \usepackage{amsmath}     \usepackage{caption}     \usepackage{pgfplots}          \pgfplotsset{compat=1.9}          \begin{document}     \begin{figure}[H]     \centering     \resizebox{12cm}{!}{%     \begin{tikzpicture}%[font=\normalsize]     \begin{axis}     [xbar,width=22cm,height=12cm,bar width=20pt,enlargelimits=0.20,     nodes near coords,     nodes near coords align=horizontal,      %xmajorgrids = true,     point meta=x * 1, % The displayed number.     xlabel={\textbf{Percentage of Cost}},     tick align=outside,     xtick={0,5,...,100},      ytick={1,...,5},     yticklabels={Penalty Cost, Fixed Cost, Operating and Maintenance Cost, Purchase Cost}]     \addplot[draw=red,fill=red!50]     coordinates {(0,1) (4.1,2) (16.8,3) (54.4,4)};     \addlegendentry{\text{MRI Scanning Machine}}          \addplot[draw=blue, fill=blue!50]      coordinates {(14.5,1) (4.6,2) (1.3,3) (4.3,4)};     \addlegendentry{\text{CT Scanning Machine}}          \end{axis}     \end{tikzpicture}     }     \captionsetup{font={footnotesize}}     \caption{Percentages of Cost Components for MRI and CT scanning machines}     \end{figure}     \begin{figure}[H]     \centering     \resizebox{12cm}{!}{%     \begin{tikzpicture}%[font=\normalsize]     \begin{axis}     [xbar,width=22cm,height=12cm,bar width=20pt,enlargelimits=0.20,     nodes near coords,     nodes near coords align=horizontal,     point meta=x * 1, % The displayed number.     xlabel={\textbf{Percentage of Cost}},     tick align=outside,     xtick={0,5,...,100},      ytick={1,...,5},     yticklabels={Penalty Cost, Fixed Cost, Operating and Maintenance Cost, Purchase Cost}]     \addplot[draw=red,fill=red!50]     coordinates {(26.9,1) (3.5,2) (9.0,3) (34.4,4)};     \addlegendentry{\text{MRI Scanning Machine}}          \addplot[draw=blue, fill=blue!50]      coordinates {(18.6,1) (3.3,2) (0.9,3) (3.4,4)};     \addlegendentry{\text{CT Scanning Machine}}          \end{axis}     \end{tikzpicture}     }     \captionsetup{font={footnotesize}}     \caption{Percentages of Cost Components for MRI and CT scanning machines}     \end{figure}          \begin{figure}[H]     \centering     \resizebox{12cm}{!}{%     \begin{tikzpicture}%[font=\normalsize]     \begin{axis}     [xbar,width=22cm,height=12cm,bar width=20pt,enlargelimits=0.20,     nodes near coords,     nodes near coords align=horizontal,     point meta=x * 1, % The displayed number.     xlabel={\textbf{Percentage of Cost}},     tick align=outside,     xtick={0,5,...,100},      ytick={1,...,5},     yticklabels={Penalty Cost, Fixed Cost, Operating and Maintenance Cost, Purchase Cost}]     \addplot[draw=red,fill=red!50]     coordinates {(0.0,1) (11.5,2) (22.3,3) (60.8,4)};     \addlegendentry{\text{MRI Scanning Machine}}          \addplot[draw=blue, fill=blue!50]      coordinates {(0.0,1) (1.2,2) (2.3,3) (1.9,4)};     \addlegendentry{\text{CT Scanning Machine}}          \end{axis}     \end{tikzpicture}     }     \captionsetup{font={footnotesize}}     \caption{Percentages of Cost Components for MRI and CT scanning machines}     \end{figure}          \begin{figure}[H]     \centering     \resizebox{12cm}{!}{%     \begin{tikzpicture}%[font=\normalsize]     \begin{axis}     [xbar,width=22cm,height=12cm,bar width=20pt,enlargelimits=0.20,     nodes near coords,     nodes near coords align=horizontal,     point meta=x * 1, % The displayed number.     xlabel={\textbf{Percentage of Cost}},     tick align=outside,     xtick={0,5,...,100},      ytick={1,...,5},     yticklabels={Penalty Cost, Fixed Cost, Operating and Maintenance Cost, Purchase Cost}]     \addplot[draw=red,fill=red!50]     coordinates {(0.0,1) (9.8,2) (31.6,3) (49.6,4)};     \addlegendentry{\text{MRI Scanning Machine}}          \addplot[draw=blue, fill=blue!50]      coordinates {(0.0,1) (2.6,2) (1.8,3) (4.6,4)};     \addlegendentry{\text{CT Scanning Machine}}          \end{axis}     \end{tikzpicture}     }     \captionsetup{font={footnotesize}}     \caption{Percentages of Cost Components for MRI and CT scanning machines}     \end{figure}     \end{document}


title: Errors in LaTeX source

text: I keep getting this error when I try to compile my tex file. Here's my tex file:               \documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper and 11pt font size     \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs     \usepackage{fourier} % Use the Adobe Utopia font for the document - comment this line to return to the LaTeX default     \usepackage[english]{babel} % English language/hyphenation     \usepackage{amsmath,amsfonts,amsthm} % Math packages          \usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template          \usepackage{sectsty} % Allows customizing section commands     \allsectionsfont{\centering \normalfont\scshape} % Make all sections centered, the default font and small caps          \usepackage{fancyhdr} % Custom headers and footers     \pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers     \fancyhead{} % No page header - if you want one, create it in the same way as the footers below     \fancyfoot[L]{} % Empty left footer     \fancyfoot[C]{} % Empty center footer     \fancyfoot[R]{\thepage} % Page numbering for right footer     \renewcommand{\headrulewidth}{0pt} % Remove header underlines     \renewcommand{\footrulewidth}{0pt} % Remove footer underlines     \setlength{\headheight}{13.6pt} % Customize the height of the header          \numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)     \numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)     \numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)          \setlength\parindent{0pt} % Removes all indentation from paragraphs - comment this line for an assignment with lots of text          %----------------------------------------------------------------------------------------     %   TITLE SECTION     %----------------------------------------------------------------------------------------          \newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height          \title{      \normalfont \normalsize      \textsc{NSIT, Division of Computer Engineering} \\ [25pt] % Your university, school and/or department name(s)     \horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule     \huge Project Synopsis \\ % The assignment title     \horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule     }          \author{             \horrule{0.5pt} \\[0.4cm]             Ashish Kothari (240/CO/12)\\             Ayush Gupta (248/CO/12)\\             Chandan Kar (252/CO/12)\\             \horrule{0.5pt} \\[0.4cm]} % Your name     \date{\normalsize\today} % Today's date or a custom date          \begin{document}          \maketitle % Print the title          %----------------------------------------------------------------------------------------     %   PROBLEM 1     %----------------------------------------------------------------------------------------          \section{Fast \& light console-based Music Player}          The project aims to build a fast, light, and high-quality music player that is console-based with a simple and easy-to-use GUI written on shell scripts made for Linux systems. The music player is being designed to be able to decode most modern audio file formats.           %------------------------------------------------          \subsection{Utility Requirements}          The utility requires very little computing power to function and is very efficient with CPU usage. For Linux OS, the utility has about 3\% to 4\% CPU usage on playing a high quality VBR MP3 on a Pentium 366MHz machine.\\          Requirements are listed as below:     \begin{itemize}         \item mpg123 - an MPEG player and decoder library         \item A Linux OS distribution         \item Atleast 100MHz of computing power      \end{itemize}               %------------------------------------------------          \subsection{Innovativeness \& Usefulness}          The music player is being developed with the goal of optimising CPU utilisation, while having an easy-to-use GUI to play high quality music.\\          Some proposed features of the utility are:     \begin{itemize} \itemsep 1pt              \item Support for various audio sub-systems          \item Simple but powerful control modes for frontend GUI         \item Support for playback through URL         \item Support for music playback from Cloud storage          \item Many audio data settings: resampling, choose channel, mono.         \item Support for Relative Volume Adjustment / Replay Gain           \end{itemize}          %------------------------------------------------          \subsection {Current status of development}     \begin{itemize} \itemsep -2pt              \item Basic functionality of the music player  has been achieved.          \item Frontend user interface is under development and is being developed using Zenity/ncurses library.         \item Integration of proposed features into the GUI user interface of the utility has been started.          \end{itemize}          %------------------------------------------------          % \paragraph{Heading on level 4 (paragraph)}          % \lipsum[6] % Dummy text          % %----------------------------------------------------------------------------------------     % % PROBLEM 2     % %----------------------------------------------------------------------------------------          % \section{Lists}          % %------------------------------------------------          % \subsection{Example of list (3*itemize)}     % \begin{itemize}     %   \item First item in a list      %       \begin{itemize}     %       \item First item in a list      %           \begin{itemize}     %           \item First item in a list      %           \item Second item in a list      %           \end{itemize}     %       \item Second item in a list      %       \end{itemize}     %   \item Second item in a list      % \end{itemize}          % %------------------------------------------------          % \subsection{Example of list (enumerate)}     % \begin{enumerate}     % \item First item in a list      % \item Second item in a list      % \item Third item in a list     % \end{enumerate}          %----------------------------------------------------------------------------------------     \end{document}         Errors:               There were errors in your LaTeX source          /usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty:90: LaTeX Error: Command \@BCOR already defined. [...fter\@@BCOR\CurrentOption BCORBCOR\@@BCOR}]          /usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty:91: LaTeX Error: Command \@@BCOR already defined. [\newcommand*{\@@BCOR}{}]          /usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty:99: LaTeX Error: Command \@DIV already defined. [...andafter\@@DIV\CurrentOption DIVDIV\@@DIV}]          /usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty:100: LaTeX Error: Command \@@DIV already defined. [\newcommand*{\@@DIV}{}]          /usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty:196: LaTeX Error: Command \x@paper already defined. [}]          /usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty:197: LaTeX Error: Command \x@@paper already defined. [\newcommand*{\x@@paper}{}]          There were also warnings.          [no file]: LaTeX Warning: Unused global option(s):    [fontsize=11pt].     (Log parsing issues. Disregard unless something else is wrong.)          [Done!]      Also, I installed TeXLive using the backports ppa recently on my Ubuntu 12.04


title: Word count and 'TeX capacity exceeded'

text: I use this piece of code in the preamble, obtained from Environment that counts words inside:               \usepackage{xesearch}     \newcounter{words}     \newenvironment{assignment}{%       \setcounter{words}{0}       \SearchList!{wordcount}{\stepcounter{words}}         {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?}       \UndoBoundary{'}       \SearchOrder{p;}}{%       \StopSearching       \marginpar{\arabic{words} words}}      I use this in my main file that includes several chapters. If I include up to the end chapter 4 (33599 words) then the counting environment works fine. If I include the next chapter (~6K words) I get the `TeX capacity exceeded` error. Having tested and excluded all other options it is definitely down to the `assignment` environment reaching a buffer(?) limit at some point over 33.599K words. I am not sure how to create a MWE for this particular case without sharing my actual work which for obvious reasons I cannot do.


title: Squares in Matrix

text: I would like to write a matrix equation, where the matrix contains equally sized coloured blocks on the diagonal. Something like: ![enter image description here](http://i.stack.imgur.com/GPH4b.png) Does anyone have any idea how to go about this?


title: Unwanted Hyperref link

text: I'm using the below code in a Tex file               \documentclass{article}          \usepackage{hyperref}          \begin{document}          \title{Title}          \author{Author field\thanks{Corresponding author. E-mail: \href{mailto:tenraa@uvt.nl}{tenraa@uvt.nl}}}          \maketitle     \section{INTRODUCTION}\label{sec1}          Climate change presses for environmental policy analysis. The recent economic literature stresses the     importance of technical change for curbing emissions, and     proposes policies that can achieve it.     Efficient allocation of production activities may     aid the realization of international environmental policy     targets, such as stipulated in the Kyoto Protocol     the EU climate and energy package (2009).\footnote{An anonymous referee observed that by     \href{http://ec.europa.eu/clima/policies/package/index_en.htm}{http://ec.europa.eu/clima/policies/package/index\_en.htm}.}          \end{document}      After creating the PDF the last word of the paragraph "(2009)" is showing the below link in the PDF. If I remove the `\thanks` command in the author field it is coming correctly. Could you please advise how to avoid the below link in PDF. ![enter image description here](http://i.stack.imgur.com/aiMjs.jpg)


title: How to disable beamer's dimming of covered text

text: In Beamer, when you use `\pause` `\uncover`, or `<+->` with itemize, the text that is covered is dimmed. But that could be distracting since people can still read ahead. Is there a way to disable this dimming? On a similar note, it seems the amount of dimming depends on the level of nesting in a list, which can sometimes be even more frustrating since the next bullet separated by several sub-bullets becomes so much more prominent in the middle of the page. Can this be changed too? I tried `\only`, but then the text jingles around since the layout thinks the text isn't there. I also tried different themes, but it doesn't seem to change the amount of dimming (of course, I could just be selecting bad themes).


title: Fillable fields vanish from PDF form when include'd in another PDF

text: I have created, using hyperref, a set of fillable PDF forms. When I open the PDFs in Adobe Acrobat Reader, the forms work as expected (these are simple no- frills forms without any JavaScript - one of those fill-it-in-and-print-it-out varieties). However, when I try to include these forms in a larger LaTeX document (where these will be present in the Appendices), using (pdfpages):               \includepdf[pages={-}]{Form1.pdf}      and pdflatex that larger document, I just get the static text fields in the appendix - the fillable part of the form is gone! I wish to retain the PDF form as is (which I thought was how pdfpages worked). What are my options (if I am not missing something rather simple)? Is there an alternative to pdfpages here?


title: Strange margin change in bibliography

text: For some reason, my bibliography margin has changed after a certain entry. I've attached an image of what's happening. ![enter image description here](http://i.stack.imgur.com/7yefy.png) When I shuffled sources around, I found that it always happens at that particular bibliography entry. So, I checked the .bbl file and found this in the preceding entry: `\newblock 10.1007/978-3-540-92219-3_20.` Removing that fixes the problem. The thing is, I'd like for DOI and URL entries to be included in my bibliography. Should I be doing something differently?


title: Custom divider between 2 minipage and lstlisting

text: I am using the following code to have 2 boxes beside each other for code comparison:               \documentclass[12pt]{article}     \usepackage{listings}     \begin{document}          \begin{singlespace}     \begin{minipage}[t]{0.45\textwidth}     \begin{lstlisting}[language=HTML,frame=lrtb]     %one       %two         Hi there     \end{lstlisting}%     \end{minipage}%     \hfill     \begin{minipage}[t]{0.45\textwidth}     \begin{lstlisting}[language=HTML,frame=lrtb]     <one>       <two>         Hi there       </two>     </one>     \end{lstlisting}%     \end{minipage}%     \end{singlespace}          \end{document}      This results in the following being rendered: ![1](http://i.stack.imgur.com/WCOYl.png) I would like to place custom text between the 2 boxes. Ideally, something that looks like: ![2](http://i.stack.imgur.com/spxhH.png)


title: Create appendix in Lyx

text: I am trying to create appendix in Lyx. I use 'Document->Start Appendix Here' just before the beginning of the appendix text, and I can see that the text before the Bibliography is wrapped in an appendix box. However, when I print the document, the text appears the same way as the main body text, i.e. no indication whatsoever that these are part of appendix. Any suggestion what I may have missed? I have also tried inserting '\appendix' before the appendix text, but it doesn't work either. In addition, how does the section numbering work in appendix? Can I simply organise the sections using the dropdown list


title: File copy without expansion

text: What is the command for file copy? I want to copy the contents of one file into another without any command expansion. The operative system would use               copy source target      I tried reading the contents of one file into a variable and the writing it into the target:               \CatchFileDef{\OriginalF}{\jobname.sc0}{}     \newwrite\hcOutputStreamF     \immediate\openout\hcOutputStreamF=\jobname.sc1     \immediate\write\hcOutputStreamF{\OriginalF}     \immediate\closeout\hcOutputStreamF      but it expands the TeX commands saved in the original file.


title: Math operator with indices and limits

text: I have several `\bigoplus` operators, indexed by i from 1 to d, using `\bigoplus_i` Now, I want to use these operations on terms indexed by j from 1 to d. My first attempt to write this was `\mathop{\bigoplus_i}_{j=1}^d` which puts all subscripts and superscripts to the right. I want the 'i' to be a subscript down and to the right, but I want 'j=1' to appear beneath the operator and 'd' to appear above. I've tried a few different ideas (using '\displaystyle') without getting what I wanted. Finally, `\mathop{\bigoplus{}_i}_{j=1}^d` worked; but I'm not sure the spacing is ideal. Any suggestions? Thanks!


title: Russian language within figure captions in unicode-aware systems

text: When I try to compile the following document caption package seem to convert caption text to `\cyr..` sequences and fontspec don't understand them. Is it possible do somehow get around that without getting back to 8-byte internal encodings?               \documentclass[11pt]{article}     \usepackage{fontspec}     \usepackage[english,russian]{babel}     \setmainfont{Arial} %anything will do          \begin{document}     Надпись на русском.     \begin{figure}     \caption{Это надпись} %if you comment this document compiles     \end{figure}     \end{document}      Here's the error string               ! Undefined control sequence.     \figurename ->{\cyr \CYRR                                \cyri \cyrs .}     l.9 \caption{Это надпись}                                        %if you comment this document compiles      Update: this is the same as \tableofcontents encoding issue with lualatex


title: Why do I get this error when using babel?

text: > **Possible Duplicate:**   >  \tableofcontents encoding issue with lualatex I tried adding babel package to my file - to get proper hyphenation for my language. But I get strange error, related specifically to `\tableofcontents` (everything else is working, and hyphenation behaves as expected). The test case:               \documentclass[a4paper,titlepage]{article}     \usepackage{xltxtra}     \usepackage[russian]{babel}     \begin{document}     \tableofcontents     \end{document}      The output:               $ xelatex file.tex     Package babel Warning: No input encoding specified for Russian language on inpu     t line 136.          )) (./TZ_Parrot_6.aux)     ! Undefined control sequence.     \contentsname ->{\cyr \CYRS                                  \cyro \cyrd \cyre \cyrr \cyrzh \cyra \cyrn \cyri...     l.5 \tableofcontents      How can I fix it? I'm using TeX Live 2009 distribution.


title: How to nest tables?

text: I want to make a table inside another table as follows. Unfortunately, it does not work. What is wrong with it?               \documentclass{minimal}     \usepackage{array,longtable,calc}          \begin{document}          \begin{longtable}{*{2}{m{0.5\linewidth}}}     %     \begin{longtable}%     {*{2}{m{0.5\linewidth}}}     A & B\tabularnewline     C & D\tabularnewline     \end{longtable}%                                             & E \tabularnewline     F                                 & G \tabularnewline     \end{longtable}               \end{document}      * * * ## EDIT 1 Based on @Herbert's suggestion to use tabular for the inner table, here is my modification. However, the rule does not appear. :-)               \documentclass{minimal}     \usepackage{array,longtable,calc}          \begin{document}          \begin{longtable}{|*{2}{m{0.5\linewidth}|}}     \hline%     \begin{tabular}%     {|*{2}{m{0.5\linewidth}|}}     \hline%     A & B\tabularnewline\hline     C & D\tabularnewline\hline     \end{tabular}%                                             & E \tabularnewline\hline     F                                 & G \tabularnewline\hline     \end{longtable}               \end{document}


title: How to specify size of binding and trim/crop

text: If i want to print a document on a standard size paper (for example A4), and then bind it and trim it, what is the best way to tell LaTeX what the binding space and the trim size is? How do I figure out the page size, and how do I tell LaTeX what it should be. Is there a package or a document class that will help me do that? To clarify some more, I am trying to ask a question that someone in the following situation would find useful: I know how to produce a LaTeX document, with sections, figures, table of contents etc. Now I want to print and bind the document, but I only have an office printer that prints on a standard size paper, and a good paper cutter that I can use for trimming/cropping. I have some options for binding (staple, spiral, glue, ...). What is the correct way to make LaTeX print the document so I can bind it and trim/crop it. Basically how to set up the correct layout of the page on the paper, without resorting to hacks like manually increasing margins to accommodate the binding and trim.


title: Equivalent of bounding box when compile with pdflatex

text: I'm having an issue inserting a .pdf image into my .tex file (an .eps works fine). A description of my problem is below. When I insert an .eps figure by doing:               \documentclass[a4paper,11pt]{article}     \usepackage{graphicx}          \begin{document}     \begin{figure}     \includegraphics[angle=90,bbllx=113bp,bblly=67bp,bburx=506bp,bbury=741bp,width=0.8\textwidth]{lipari-plot.eps}     \caption[]{}     \label{fig:liparieps}     \end{figure}     \end{document}      and compile my latex test.tex file using latex (i.e. by doing "latex test.tex; dvipdf test.dvi test.pdf;" on the command line) the figure looks as expected. However, I need to compile my test.tex file using pdflatex (as my images need to be .pdf instead of .eps). Unfortunately, I can't find an equivalent to a bounding box that will work with pdflatex. I have tried using viewport (as suggested by websites and the compiler), but the image doesn't appear correctly. (I compile it by doing "pdflatex test.tex;" on the command line.) The code I have tried, for example, is               \documentclass[a4paper,11pt]{article}     \usepackage{graphicx}          \begin{document}     \begin{figure}     \includegraphics[angle=90,viewport=113bp 67bp 506bp 741bp, clip, width=0.8\textwidth]{lipari-plot.pdf}     \caption[]{Caption}     \label{fig:liparipdf}     \end{figure}     \end{document}      (The files lipari-plot.eps and lipari-plot.pdf are uploaded on this website: http://latex-community.org/forum/viewtopic.php?f=45&t=23286 . Sorry, I can't figure out how to upload them here) Does anyone know a way to make the compiled version of my .pdf image look like the .eps version?


title: How to use \cutout command in shapepar package?

text: How to use `\cutout` command in shapepar package? I need a cut on the right side of the page (square format).


title: compiler can't find file on cifs/Samba share

text: I am unable to compile LaTeX files whenever they are on a particular network drive. I am using ubuntu lucid and mount a samba share in fstab like so:               //domain.com/me$ /home/me/H_DRIVE cifs credentials=/home/me/.smbpasswd,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0      When I try to compile any file on this share with latex or pdflatex I get the message:               ~/H_DRIVE$ pdflatex foo     ----------------------     This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)     entering extended mode     ! I can't find file `foo'.     <*> lecture2          (Press Enter to retry, or Control-D to exit)     Please type another input file name:      The file is certainly there, I can edit it etc. The same file compiles fine locally. Is this a known issue? I couldn't find out much about this, but it seems it may be because of the size of the filesystem (no idea, but it must be pretty big) or because of cifs/samba.


title: Curiosity - 3D animation in TikZ

text: Is it possible to create animations shown in the link below in TikZ http://ubcsanskrit.ca/lesson2/writingtutor.html to start animation click on any of the letters on the page. I know it may not be nice to ask outside TeX question but to product such animation what sort of program one should use? I would really appreciate your help


title: Multicolumn and graphics

text: If you try to comment what i have marked you will see the heading picture step one page back respect the title why? Here is the picture. The code is from this post.               \documentclass[%                   twocolumn,            %   COMMENT THIS                   a4paper,%                   % carta A4                   ]{scrbook}          \usepackage{graphicx}                      % immagini          \usepackage{titlesec}          \usepackage{fontspec}          % Bible books (capitoli)     \newcommand{\bbook}[4][]{%       \makebox[\textwidth][c]{\includegraphics[width=6in]{#4}}       \chapter[#1]{#2,\\\large #3\\\char"2766}     }     \titleformat{\chapter}[hang]%        {\centering\huge}%        {}%        {0pt}%        {}     \titlespacing*{\chapter}       {0pt}{0pt}{5pt}          \setmainfont{EB Garamond 12 Regular}          \begin{document}          \twocolumn[               %   COMMENT THIS          \begin{@twocolumnfalse}   %   COMMENT THIS          \bbook{Title}{title.}{genese_heading}          \end{@twocolumnfalse}     %   COMMENT THIS          ]                         %   COMMENT THIS          \end{document}


title: Table of contents broken with Koma Script and lstdoc

text: There seems to be some negative interaction between Koma Script (using version 3.11a) and the `lstdoc` package in my example document. The MWE works nicely when I comment out `\usepackage{lstdoc}` but when I include it the formatting of the table of contents is messed up. Here is the example document:               \documentclass[     a4paper,     titlepage     ]{scrbook}          \usepackage{lstdoc}          \begin{document}     \tableofcontents          \section{test1}     test test     \end{document}      The output without `lstdoc` looks as follows ![enter image description here](http://i.stack.imgur.com/WED5B.png) whereas with the package included this happens: ![enter image description here](http://i.stack.imgur.com/PnPLW.png) Is there any workaround to this problem? I want to the line because I am using the alternative to the `glossaries` package from this question which requires the `lstdoc` package. I noticed that `hyperref` is also pulled in if `lstdoc` is used but `hyperref` alone does not cause any problems.


title: Slides template in LyX generates option clash for package graphicx

text: The `slides` template in LyX is generating an error even with a very simple example (that is, a single slide with a *.pdf plot) The source, provided below, generates this error: > ! LaTeX Error: Option clash for package graphicx. with the following description: > The package graphicx has already been loaded with options: [] There has now > been an attempt to load it with options [dvips] Adding the global options: > ,dvips to your \documentclass declaration may fix this. Try typing to > proceed. Is there something simple I've missed? Is there a solution I can enact inside the LyX gui?               % Preview source code     %% LyX 2.1.1 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[landscape,english]{slides}     \usepackage{fontspec}     \setmainfont[Mapping=tex-text]{Linux Biolinum}     \setsansfont[Mapping=tex-text]{Linux Biolinum}     \setcounter{secnumdepth}{1}     \setcounter{tocdepth}{1}     \usepackage[dvips]{graphicx}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \pdfpageheight\paperheight     \pdfpagewidth\paperwidth               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.     \newcounter{slidetype}     \setcounter{slidetype}{0}     \newif\ifLyXsNoCenter     \LyXsNoCenterfalse     \newcommand{\noslidecentering}{        \LyXsNoCentertrue%     }     \newcommand{\slidecentering}{        \LyXsNoCenterfalse%     }     \newcommand{\lyxendslide}[1]{        \ifLyXsNoCenter%             \vfill%        \fi%        \ifcase \value{slidetype}%             \or % no action for 0             \end{slide} \or%             \end{overlay} \or%             \end{note}%        \fi%        \setcounter{slidetype}{0}           \visible     }     \AtEndDocument{\lyxendslide{.}}     \newcommand{\lyxnewslide}[1]{      \lyxendslide{.}      \setcounter{slidetype}{1}      \begin{slide}     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     % Uncomment to print out only slides and overlays     %     %\onlyslides{\slides}          % Uncomment to print out only notes     %     %\onlynotes{\notes}          \makeatother          \usepackage{xunicode}     \usepackage{polyglossia}     \setdefaultlanguage{english}     \begin{document}          \lyxnewslide{}          Test slide.          \includegraphics[width=5cm,height=5cm]{../../../../plot}     \end{document}


title: How to create a bubble chart with LaTeX

text: Is it possible to create bubble charts with LaTeX that plot 3-4 dimensions in one diagram? In the following plot X and Y specify the location, size the size of the bubble. It would be nice to use a fourth column for a color gradient or palette. ![bubble chart from excel](http://i.stack.imgur.com/NcARj.png)


title: Quote style like on owni.eu

text: > **Possible Duplicate:**   >  Block quote with big quotation marks How can I reproduce with TikZ the quoting style from Owni.eu http://owni.fr/2011/09/13/increvable-droit-dauteur/ in a environment? I don't know how to move the quotation marks (see the cut part).


title: Booklets in memoir class

text: I was just reading this question about using pdfpages to create twoup effects in memoir. This worked great for me, but I am wondering how I can get the page order to set up a booklet, so that it can be folded in half with correct pagination. I never got the booklet code to work. Any idea?


title: Scaling TikZ figures for poster

text: Is there a way to scale a figure drawn in TikZ that scales the node sizes and not simply the coordinate system? I have tried using `\scalebox`, but `beamerposter` (I assume) redefines the font sizes, so the labels in the figure get scaled up as well. One could, of course, force TikZ to make the nodes larger. I'm a little resistant to this, as I'm not very good at manipulating node sizes in general and I seem to have no sense of scale for the poster. Is there some sort of canonical simple method of taking TikZ figures written for a typically sized document and adapting them to a poster?


title: Outline of style I. A. i. a. 1. ...

text: Is there an easy way to create an outline of this form? I. Header   [tab]A. Subheader   [tab][tab]i. Item   [tab][tab][tab]a. Subitem I found an `outlines` package that let me specify levels with `\1`, `\2`, etc. instead of `\begin{enumerate}`, and keeping that format would be really nice.


title: How can I make todo comments when using the multicol package?

text: I need to use the `multicol` package and I want to have todo items in the margin. I found the `todonotes` package which looked very promising:               \documentclass[12pt]{article}     \usepackage{todonotes}     \usepackage{multicol}          \begin{document}     \begin{multicols}{2}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec varius suscipit     diam a mattis. Etiam tortor nisl, volutpat a pharetra eu, consequat nec massa.     Vestibulum dapibus, enim vitae tempor adipiscing, massa magna ultrices erat, in     sodales turpis quam non nisi. Ut tristique luctus turpis at viverra. Aenean id     magna nec tellus facilisis mollis. Sed blandit nibh vitae turpis gravida     sodales. Donec erat velit, mollis id mattis at, eleifend quis neque. Morbi     ullamcorper bibendum feugiat. \todo{Fix this!} Aenean sed massa faucibus lectus     facilisis facilisis. Vivamus urna justo, commodo non mollis sodales, consequat     nec ipsum. Nam eget ligula non neque condimentum malesuada non et nisi.          \end{multicols}          \end{document}      However, I get the following warning and no todos in the margin:               Package multicol Warning: Floats and marginpars not allowed inside `multicols'      environment!.      Is there an easy fix or perhaps some other package that is better suited?


title: Filling region between two \draw Tikz

text: probably an easy one for people how are used to it. i'd like to fill the area between the two functions with a pattern (stripes, for instance). See the code below. I saw something like this with [domain]-option, but no glue how the scheme works, maybe i'm totaly wrong :D JOB: > fill diff between red and black funktion Thanks so far               \def\dtwData{graphics/data/dtwSimple.txt}     \begin{tikzpicture}     %Points     \coordinate (x-start) at (0cm, 2cm);     \coordinate (x-end) at (15cm, 2cm);     \begin{scope}[thick]         \draw[] (0,0) -- (0,6);          \draw[] (x-start) -- (x-end);     \end{scope}     \draw[color=red, thick] (0, 1) -- (14, 6);     \draw[color=blue, dashed] (0, 1.75) -- (14, 6.75);     \draw[color=blue, dashed] (0, 0.25) -- (14, 5.25);     %plot     \draw[thick] plot[smooth] file {\dtwData};     \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/oA4zF.png)


title: In WinEdt 7: How to typeset Arabic, Persian and Urdu properly?

text: WinEdt 7 has been released with a claimed support of UTF8. It is true that now the arabic letters are showing correctly, but the default setting are still far from being useful. first, the arabic, persian and urdu words are made of connected letters (cursive writing), and winedt is showing them separated like latin words! second, the arabic, persian and urdu languages are right-to-left languages, and I didn't see a way to switch to right to left (RTL) mode in WinEdt 7 !! Can somebody suggest a solution for these problems (if any)?


title: Drawing graphs with multiline labels for vertex/edge?

text: I have been using tikz-graph to draw graphs representing two-part protocols. Now I'd like to add comments to some nodes of the graph (multiline text, to the side of the vertex). I'm not sure how to do that. I have been adding labels to vertices and putting them outside with `LabelOut`, but then I can't do multiline text. This is a toy/minimalistic example:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{arrows}     \usepackage{tkz-graph}          \usepackage{graphicx}       \usepackage[T1]{fontenc}          \begin{document}          \begin{tikzpicture}       \SetUpEdge[lw = 1.5pt,                  color=black,                  labelstyle = {sloped}]       \SetVertexNoLabel       \GraphInit[vstyle=Art]       \tikzset{EdgeStyle/.style={post}}       \tikzset{node distance = 6 cm}       \SetVertexMath            % Two top symbols, displayed as two invisible       % vertices with visible labels:       {\tikzset{VertexStyle/.style = {color=white,text=black}}         \SetVertexLabel         \Vertex[L=\alpha]{P}         \SetVertexLabel         \Vertex[position={right of=P}, L={\beta}]{X}}            \tikzset{node distance = 1 cm}       {\SetVertexLabel        %%%        %%% HERE: in the next line the label can't be split in two lines...        \Vertex[LabelOut,Lpos=180,position={below of=P}, L={the protocol starts here}]{X1}       }       \tikzset{node distance = 2 cm}       \SO(X1){X2}       \SO(X2){X3}       \tikzset{node distance = 6 cm}            \EA(X1){A1}       \EA(X2){A2}       \Edge[label={220 ESMTP}](X1)(A1)       \Edge[label={EHLO client-host}](A1)(X2)       \Edge[label={250 DSN}](X2)(A2)       \Edge[label={mail from: email-address}](A2)(X3)     \end{tikzpicture}     \end{document}      What wold be the usual, easy way to do what I'm trying to do?


title: How to change the font of page numbers in TOC LOT LOF without "tocloft"?

text: It can be easily done with `tocloft`, however, as there are already many settings for the whole document, using it caused the changing of spacing, and some conflicts with other packages, etc, compared to the original style for `book` class. ![enter image description here](http://i.stack.imgur.com/bPwa6.png) So how to change the font of page numbers for chapters, sections , tabs and figs.. in front matter, without use of `tocloft` package. **Edit 1:** Using `tocloft`               \usepackage[ ]{tocloft}     \renewcommand{\cftchappagefont}{\bfseries \sffamily}     \renewcommand{\cftsecpagefont}{ \sffamily}     \renewcommand{\cftsubsecpagefont}{ \sffamily}       \renewcommand{\cftsubsubsecpagefont}{ \sffamily}     \renewcommand{\cftfigpagefont}{ \sffamily}     \renewcommand{\cfttabpagefont}{ \sffamily}      The error: ![enter image description here](http://i.stack.imgur.com/aVv8t.png) The following commands have been commented:               % \setcounter{tocdepth}{3}       % \setcounter{secnumdepth}{3}      I dont know if `tocloft` is conflicted with `\usepackage[nottoc]{tocbibind}`. Besides, the spacing between entries in TOC, LOT, LOF are enlarged, and the blank pages are also removed which is created by default in `book` class.


title: Chinese punctuation problem

text: I am trying to move a Chinese punctuation mark to the head of a character. I am using the following macro, which works fine. But if I redefine the `\CJKpunctsymbol`, it will be a messy. Can any one help me on this? works fine code - which directly apply to a punctuation:               \hskip -0.9em \vbox to 0.1em {\vskip -1em{\hbox to 0.9em {。}}}      Redefine `\CJKpunctsymbol` - the `\hbox` will be very long and can't resize.               \def\vCJKpunctsymbol#1{\hskip -0.9em \vbox to 0.1em {\vskip -1em {\hbox to 0.9em {\CJKsymbol{#1}}}}}     \let\CJKpunctsymbol\vCJKpunctsymbol      The following 2 pictures are examples. I use `\fbox` to make it clear. ![enter image description here](http://i.stack.imgur.com/ixzP6.png) ![enter image description here](http://i.stack.imgur.com/0cIbT.png)


title: Problems using `\left\{` in array environment

text: I am trying to define a matrix in segments by enclosing the entries of the matrix in boxes, and also using the open and closed braces to label those segments. So far I have developed the following code to do this.               \documentclass[a4,12pt]{report}          \usepackage{multirow}          \begin{document}          \[       A =         \left(           \begin{array}{rrrrrl}               \cline{2-4} \cline{5-5}             \multirow{2}{*}{$B \{$} &               \multicolumn{1}{|r}{1} & 2 & \multicolumn{1}{r|}{-4} & \multicolumn{1}{|r|}{1} & \multirow{2}{*}{$\} \hat{\mathbf{b}}^{T}$} \\               & \multicolumn{1}{|r}{2} & -5 & \multicolumn{1}{r|}{-3} & \multicolumn{1}{|r|}{-3} & \\               \cline{2-4} \cline{5-5}             \hat{\mathbf{c}} \{  & \multicolumn{1}{|r}{-6} & -3 & \multicolumn{1}{r|}{0} & \multicolumn{1}{|r|}{5} & \} a_{n-1,n} \\               \cline{2-4} \cline{5-5}             \hat{\mathbf{d}} \{ & \multicolumn{1}{|r}{-6} &  7 & \multicolumn{1}{r|}{0} & \multicolumn{1}{|r|}{-8} & \} a_{n,n} \\               \cline{2-4} \cline{5-5}           \end{array}         \right)     \]               \end{document}      This produces the following output: ![enter image description here](http://i.stack.imgur.com/Eb7e4.png) What I want to do is expand the left and right brace in the first and last columns to line up with the rows that have been segmented. One way of doing this is to use the `\left\\{` and `\right\\}` LaTeX commands. The problem is that when I do this, I get the following LaTeX error:               ! Missing \right.  inserted.     <inserted text>                     \right .     l.12         \multirow{2}{*}{$B \left\{$}                                               &     ?      Also, what I would like to do is separate the segments using individual boxes, rather than adjoining boxes as above. Any ideas on how to do this would be very much appreciated.


title: How to change line spacing in footnotes?

text: I have a document with line spacing 1.5. But I want the footnotes line spacing 1. How could I do this? I tried the package `setspaces` but does not allow me this option.


title: How to put axes with PSTricks?. I use \psaxes... but I have no results

text: I want to use `\psaxes` and `\psgrid` but it doesn't runs well. What am I doing wring?               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-node}     \usepackage[utf8]{inputenc}     \usepackage{eurosym}          \begin{document}      \begin{pspicture}(-2,-2)(12,6) %\malla     % \psaxes{<->}(3,3)     % \psaxes[linewidth=1.2pt,labels=none,ticks=none]{<->}(2,1)(0,0)(4,3)      \rput(1,2){\circlenode{V}{\textcolor{blue}{Vigo}}}      \rput(1,5){\circlenode{C}{\textcolor{magenta}{Coru\~na}}}      \rput(3,2){\circlenode{S}{\textcolor{red}{Scq}}}      \rput(3,5){\circlenode{P}{\textcolor{green}{Po}}}           \ncarc[arcangle=33]{->}{V}{C}      \naput*{\small 45 \euro}   % This line show error on compiling.           \ncarc[arcangle=11]{->}{S}{P}      \ncput*{\small 25 \euro }           \ncarc[arcangle=75]{->}{S}{P}      \ncput*{\small{\blue 15 \euro} }           \psbezier[linecolor=blue, linestyle=dashed]{*-*}(4,-0.5)(6,6)(8,-2)(10,2)          \rput(8,3){Esto é unha proba.}          \pscurve[linecolor=blue, linewidth=0.035]{o-o}(6,5)(7,4)(8,5.8)(9,5.8)(10,4)(11,6)          \psdots[dotsize=0.4](10,2)          \pscustom{     \pscurve(10,-2)(11,2)(11.5,1)     \psline(11.5,1)(11.5,-1)     \fill[fillstyle=solid,fillcolor=lightgray]     }     \end{pspicture}     \end{document}


title: Changing \renewcommand{\familydefault}{...} back to default

text: I just have a quick question: how can I change this command back to the default?               \usepackage[scaled=0.92]{helvet}     \renewcommand\familydefault{phv}      **Addendum** - Here's the MWE:               \documentclass[12pt,a4paper,twoside,openright]{scrbook}      \usepackage[scaled=0.92]{helvet}      \renewcommand\familydefault{phv}      \begin{document}      \chapter{Test}      \section{Test2}      This is normal Text      \end{document}


title: How to access the quotation marks in Berling font using lualatex?

text: Here is a small example:               \documentclass[11pt,article,oneside]{memoir}          \usepackage{fontspec}     \setmainfont[ItalicFont={BerlIt}, FeatureFile=myligatures.fea]{Berling}     \begin{document}     ``Lala la''     \end{document}      ![enter image description here](http://i.stack.imgur.com/cBhIp.png) The myligatures.fea comes from this question and now I would like to use the quotation marks that I know the font have at glyph position 105 and 119 instead. Is there a way I can map these to be used instead? Worth noticing is that if I copy the unicode symbols from Wikipedia and use them it works, however that would be a pain of search replace and something that I would want LuaLaTeX to do for me...               \documentclass[11pt,article,oneside]{memoir}          \usepackage{fontspec}     \setmainfont[ItalicFont={BerlIt}, FeatureFile=myligatures.fea]{Berling}     \begin{document}     ``Lala la''          “Lala la”     \end{document}      ![enter image description here](http://i.stack.imgur.com/oNclG.png)


title: How can I create an index or TOC using latexdb and mysql?

text: I have a database full of names, addresses, etc.. We use them at my work to make sure only people in the database are allowed inside (or denied entry, if they've ever done something wrong). I created a document with pdflatexdb, and by using longtable, I now have a 'working' document that I can live with if I have to. However, as we add people to the database everyday, the "list" gets larger and less manageable as far a scanning for a name or id number and the like. What I'd like to figure out is how to create an "index" that will show which pages last names (a field in the DB) start with... IE - names that start with A are on page one, B page 50, C page 60, and so forth. Here is a working example:               \documentclass[10pt,twoside]{report}          \usepackage{longtable}     \usepackage[left=.5in, right=.5in, top=1cm, bottom=.8in]{geometry}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead{}     \fancyfoot{}     \fancyfoot[RE, RO]{\thepage}     \fancyfoot[C]{Generated: \today}          \renewcommand{\headrulewidth}{0pt}     \texdbconnection{CONNECTION STUFF}          %% BEGIN TeXDBdef     \texdbdef{##query}{select lname, fname, license_no, comments from visitors where redsheet='Allow' order by lname}{##lname,##fname,##license,##comments}          %% EHD TeXDBdef          \begin{document}     \begin{center}\section*{These people are allowed inside the building.}\end{center}     \begin{center}\Large{Ordered by name}\end{center}     \begin{longtable}{@{\extracolsep{\fill}}llp{8cm}l}         \Large{Name} & \Large{License \#} & \Large{Comments} \vspace{1em} \\     \hline \vspace{.2em}         \endhead         \vspace{.8em}         \texdbfor{##query}{\texttt{##lname,} \texttt{##fname} & \texttt{##license} & \texttt{\textit{##comments}} \\ \vspace{.5em}}     \end{longtable}          \end{document}      I am a relative n00b to `LaTeX`, so please be gentle if my document has glaring errors (I'm assuming some of my code is redundant or even useless). Thanks.


title: Biblatex: Multilingual proceedings - bibliography does not reflect language changes

text: I'm typesetting the proceedings of a conference with texts either in German or in English with bibliographies at the end of each text. In English texts I'd like to have the bibliography in English and in German texts in German. I tried to do it this way:               \documentclass{article}     \usepackage{fontspec}     \usepackage{polyglossia}      \setmainlanguage{german}     \setotherlanguage{english}     \usepackage{csquotes}     \usepackage[style=verbose,sorting=none,babel=other,backend=biber]{biblatex}     \usepackage{filecontents}     \begin{filecontents}{references.bib}     @INCOLLECTION{bloch_uber_1956,       author = {Felix Jacoby},       title = {Über die Entwicklung der Griechischen Historiographie und den Plan     einer neuen Sammlung der griechischen Historikerframgmente},       booktitle = {Abhandlungen zur Griechischen Geschichtsschreibung},       year = {1956},       editor = {Bloch, Herbert and Maier, Karl},       pages = {16-64},       address = {Leiden}     }     \end{filecontents}     \addbibresource{references.bib}     \begin{document}     \section{Erster Beitrag}     \begin{refsection}     Im Text: \cite{bloch_uber_1956}.     \printbibliography[heading=subbibliography]     \end{refsection}          \selectlanguage{english}     \section{Second article}     \begin{refsection}     In text citation:  \cite{bloch_uber_1956}.     \printbibliography[heading=subbibliography]     \end{refsection}     \end{document}      The language is switched to English in the second section, but not the bibliography strings in the bibliography: They are still set to the mainlanguage German, so it's still “Hrsg. von“ instead of ”ed. by“ and ”S.“ instead of ”pp.“ for example. Have I missed something in the biblatex manual or can this not be achieved with biblatex? (The same problem occurs with babel and pdflatex.)


title: How to remove extra space between  \vspace*{0em} and \section?

text: I want to add an exact amount of space between type area and a section:               \documentclass{scrbook}          \KOMAoptions{fontsize=10pt, paper=14cm:21cm, DIV=calc, pagesize=auto, BCOR=5mm,     twoside=true, titlepage=true}          \usepackage{lmodern}     \usepackage[utf8]{inputenc}          % shows frames of type area (good for debugging)     \usepackage{showframe}          \begin{document}          %\vspace*{-\topskip}  % removes \topskip space     \vspace*{0em}  % space amout is 0em for testing purpose; remove or comment to get absolutely no space     \section{Test}          \end{document}      I think the command `\vspace*{0em}` expands the section’s glue, right? If I remove `\vspace*{0em}` the section is on the top of the type area. Somehow `\vspace*{0em}` should do the same thing. The background is that I want to add an exact space between type area and section, but it’s always to much space. Any idea to fix this?


title: Internal error: bad native font flag (XeLaTeX, fontspec, newtxmath, libertine, \dot)

text: I'm trying to use `\dot{P}` in a math environment. MWE:               \documentclass{scrartcl}     \usepackage[no-math]{fontspec}     \usepackage{libertineotf}     \usepackage[libertine]{newtxmath}     \begin{document}         \begin{equation}             \dot{P}(t) + 1234567890         \end{equation}     \end{document}      Without the command `\dot` everything works as aspected.   With it I get the error: `Internal error: bad native font flag` and no output is produced. Without the option `no-math` or the entire `fontspec` package (whose functionality I don't even need at the moment) there is an output compiled that includes a correct "dotted" P.   But the paranthesis, the plus sign and the numbers are not set in the Libertine font but rather in CM. Also the spacing information from the `newtxmath` package seems to get lost (could be related to CM). I already tried to change the package order. That resulted in an option clash error for fontspec and the same output as without the fontspec package at all. Any suggestions?   I tried using the `libertine` package for `pdflatex` (without fontspec of course) which produced the same output as XeLaTeX without the fontspec package. Versions/File List:               MikTeX                2.9 64bit, Win7     libertineotf.sty      2012/04/07 5.13-8     fontspec.sty          2012/05/06 v2.2b     newtxmath.sty         2012/06/25 v0.99


title: Minted working from terminal but not Texpad

text: I'm using the minted package in latex on my mac (running lion). Now when I use the terminal to type               pdflatex -shell-escape My_Ruby_Notes.tex       it compiles fine and the resultant pdf looks perfect. When I try and typset the exact same document through Texpad (I assume any other IDE also) I just get a load of errors pertaining to the My_Ruby_Notes.out.pyg file. I have set up in preferences to use -shell-escape but this hasn't fixed it. Any ideas? My $PATH is shown below in case this sheds some light on things > > /Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/Philip/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/bin:/Users/Philip/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/Philip/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/Philip/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin All the errors are of the following form               Undefined control sequence. (...err}{\PYZbs{}}\PY{n}{relax}\PY{p}{\PYZpc{}}...)      Below is a minimal working file (working from terminal, not Texpad)               \documentclass[12pt, titlepage]{article}     \usepackage{minted}     \begin{document}     \newpage          \begin{minted}[mathescape,                    linenos,                    numbersep=5pt,                    gobble=2,                    frame=lines,                    framesep=2mm]{csharp}       string title = "This is a Unicode π in the sky"       /*       Defined as $\pi=\lim_{n\to\infty}\frac{P_n}{d}$ where $P$ is the perimeter       of an $n$-sided regular polygon circumscribing a       circle of diameter $d$.       */       const double pi = 3.1415926535     \end{minted}          \end{document}


title: Weird xparse issue involving splitlist

text: \DeclareDocumentCommand\test{o}{\IfNoValueOrEmptyTF{#1}{No value or     empty!}{-#1-}}      works, but when we try to use a split list the NoValueOrEmpty test fails:               \DeclareDocumentCommand\test{ > { \SplitList { , } }o}{\IfNoValueOrEmptyTF{#1}{No value or empty!}{-#1-}}      It seems an empty splitlist is not the same as empty?               \makeatletter     \newcommand{\IfNoValueOrEmptyTF}[3]     {         \IfNoValueTF{#1}{#2}         {         \def\@tempa{#1}         \ifx\@tempa\@empty#2\else#3\fi         }     }     \makeatother


title: make a glossary with ConTeXt

text: is there a simple way to make a glossary in ConTeXt? just like with the glossaries package in latex example : https://en.wikibooks.org/wiki/LaTeX/Glossary


title: graphicx (or graphics) package distorts format

text: I have a strange problem. I am writing my thesis and the style file is provided by my university. The normally working graphicx package seems to be distorting the format when I enable it using `\usepackage{graphics}` If I enable this package, and not even insert a figure, the bottom margin changes as demonstrated in the figures below. And naturally, I can not add a figure without graphicx! How can I overcome this problem? ![Faulty page bottom with graphicx enabled](http://i.stack.imgur.com/pB8F0.png) ![The normal view before enabling graphicx](http://i.stack.imgur.com/L5FyO.png)


title: How to cite a hardware catalog in bibtex

text: I would like to cite a hardware catalog of one (or more) manufacturers of devices that I'm working on for my master's thesis. Can anyone help me with some guidance on how to write the bibtex entry for such a publication ? For example what I know about the catalog particular manufacturer is : Hardware Catalog 2013, Ground Breaking Technologies inc., Utopia.


title: Why is the \listoffigures command not working?

text: I'm writing my dissertation using LaTeX and I'm having some problems when using `\listoffigures`. The `\listoftables` command works perfectly, but the `\listoffigures` command does not recognize the many figures in the text. What should I do?


title: I want to fill all the space between paragraphs on a page with a grid(graphic)

text: I took an example from another answer to a similar question (How to define a figure size so that is consume the rest of a page?). On a page of an exam paper I want the following: > Question > > Quadpaper (light grey) Maybe a remark like "review your answer". So here is my MWE:               \documentclass[svgnames,a4paper]{report}     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage[margin=25mm]{geometry}     \usepackage{lipsum}          \newcommand{\currentsidemargin}{%     \ifodd\value{page}%        \oddsidemargin%     \else%         \evensidemargin%     \fi%     }          \begin{document}     \setlength{\parindent}{0mm} \setlength{\parskip}{6pt}     \newsavebox\mybox     \savebox{\mybox}[\textwidth][c]{  % The text for below the grid      \parbox{\textwidth}{         \textbf{\Huge Some text}              \lipsum[3]       }     }          \newlength\gnat     \settoheight{\gnat}{\usebox{\mybox}}     \addtolength{\gnat}{0.5\parskip}          \lipsum[2-5]% dummy text          \begin{tikzpicture}[overlay,remember picture]          % Helper nodes       \path (current page.north west) ++(\hoffset, -\voffset)         node[anchor=north west, shape=rectangle, inner sep=0, minimum width=\paperwidth,          minimum height=\paperheight] (pagearea) {};           \path (pagearea.north west) ++(\leftmargin+\currentsidemargin,         -\topmargin-\headheight-\headsep+\gnat)           node[anchor=north west, shape=rectangle, inner sep=0,           minimum width=\textwidth, minimum height=\textheight] (textarea) {};          % Image      \path let \p0 = (0,0), \p1 = (textarea.south) in         node [inner sep=0pt,outer sep=0pt,anchor=north west] {%         \pgfmathsetmacro\imgheight{(\y0-\y1-0.5\gnat-mod(\y0-\y1-0.5\gnat,8mm))}%         \begin{tikzpicture}[remember picture,overlay]              \node[xshift=+0mm,yshift=1mm] at (\p0){              \begin{tikzpicture}%[overlay,remember picture]                  \tikzset{dotted lines/.style={black, loosely dotted,  thick}}                   \draw[style=dotted lines,step=.8cm] (0,0) grid (160mm,\imgheight pt+24mm);               \end{tikzpicture}              };         \end{tikzpicture}         %}      };     \end{tikzpicture}     \vfill     \vfill     \usebox{\mybox}     %\the\gnat   % To see the space     \end{document}      * * * My question: Why do I have to add **24mm** to the grid to get it fill the full available space? _[I will later add a test to check if the box is empty and then set`\gnat` to zero. Although any suggestions would be appreciated.]_


title: How to produce structure as in attached image

text: I remember seeing similar question (image wise) here on this forum but did not bookmark it :( If anyone knows and can point me to the example or give me some ideas to get started would be great help. I am working on reproducing an old book which has around 4000 linesas shown in the attached image. Text on each line is called "Sutra". Number on the left is a unique serial number. Some sutras have a number on the right, which means part or whole text that sutra is to be added to the sutra number shown on the right. The part which gets transferred to below sutra should be shown as bold or colored. Sometimes its part and sometimes its the whole sutra that gets transferred as can be see in "6" I also would like to show the text thats getting transferred to the sutra below on across the left line in `scriptsize` text. In the shown example the span is limited to 3 sutras however in the later part it can span across ~100 sutras - in such cases the left line should spread across pages. the flow of words is always downwards, there will not be any case where the text flows upwards. ![enter image description here](http://i.stack.imgur.com/wMAjq.png) PS: numbers in front of Sutra 11 - 12, 19, please do change the question title that make more sense than what I have given.


title: Is there a side effect if we use listings.sty with  chained styles?

text: Even though I have not detected the side effect, I am still worrying I might do a bad practice here. Is there a hidden side effect when doing the following?               \documentclass[cmyk]{article}     \usepackage{xcolor}     \usepackage{listings}          \lstdefinestyle{Common}     {                language={[LaTeX]TeX},         linewidth=0.5\linewidth%     }               \lstdefinestyle{A}     {         style=Common,       backgroundcolor=\color{yellow!50}%           }          \lstdefinestyle{B}     {         style=Common,       backgroundcolor=\color{green!50}%        }          \begin{document}          \begin{lstlisting}[style=A]     This is \fbox{style A}.     \end{lstlisting}          \begin{lstlisting}[style=B]     This is \fbox{style B}.     \end{lstlisting}          \end{document}


title: Tikz, mindmap, and nodes - control over node radius

text: I'm trialling tikz mindmap as a tool for drawing network diagrams. Everything is great, however what I'd like is to be able to have some control over the node sizes. As an example, say my root note is a firewall with 8 interfaces, and the 8 child nodes under this firewall node are interface nodes. Child to that is then any single-homed hosts. Each multihomed host would be configured similar to this, and I'd use paths to connect them. Basically what I'm getting at is this: I'd prefer to have something like the mindmap, but in fact not a tree - rather a graph; I did not find such a library in tikz. Other notes:   * I'm avoiding dot2tex and graffle for the time being, as I need these diagrams to have a little fancy).   * I don't want to use simple nodes and paths (as I have to do more work with positioning the nodes). Any suggestions? So all I'm after, is the ability to declare nodes, and give them a set radius, for example:               \centering\begin{tikzpicture}[     mindmap,     every node/.style={concept, execute at begin node=\hskip0pt, fill, scale=0.7},     root concept/.append style={level distance=10, concept color=black, grow cyclic},     level 1 concept/.append style={level distance=90, sibling angle=60, text=white},     level 2 concept/.append style={level distance=70, sibling angle=60, text=white},     router/.style={concept color=green, fill=black, text=lime, line width=1ex},     firewall/.style={concept color=red, fill=black, text=red, line width=1ex},     site/.style={concept color=green},     linux/.style={concept color=blue!75!white},     null/.style={concept color=red},     lan/.style={concept color=gray},     iface/.style={         concept color=black,         fill=red,         text=white,         line width=1ex,         font=\small\scshape,         node width=1cm % *** for example ***     },        openbsd/.style={concept color=yellow!50!orange},     ]


I got a "LaTeX Warning: There were multiply-defined labels", and I know what it means but my document is pretty big and it has various files. So, how can I find the multiply-defined label? I am using TeXShop in MacOS. This is the whole warning (I believe):               ------------------------------------------------------------------------------      Bibliography     ------------------------------------------------------------------------------     (./Thesis.bbl [29] [30] [31] [32] [33] [34] [35]) [36] (./Thesis.aux)     LaTeX Warning: There were undefined references.     LaTeX Warning: There were multiply-defined labels.      )


title: Inserting space after the number in footnotes

text: Text of Footnotes are very close to their numbers. How can I make 2mm space after all footnote numbers (or 2mm before every footnote text)?               \documentclass[draft,12pt,a4paper]{article}          \begin{document}     X\footnote{x}          Y\footnote{y}     \end{document}


title: Macro for tabbing with complex line breaks (or similar environment)

text: I have a complicated transcription with mid-line aligned text. I've been using `tabbing` to do it automatically, but it obviously doesn't do line breaks. I want to write a macro (unless something already exist) that could take the following:               1 xxxxxxxxxxxxxxxx\=(tab stop)xxxxxx\=xxxxxxx|xx\=xxxxxxxxxxxx     2                 \>yyyyyyyyyyyyyyyyyyyyyyyyy|yyyyyyyyyyyyyyyyyy     3                                   \>zzzzzzz|zzzzzz     4                                            |  \>aaa      and display it like this:               1 xxxxxxxxxxxxxxxx\=(tab stop)xxxxxx\=xxxxxxx     2                 \>yyyyyyyyyyyyyyyyyyyyyyyyy     3                                   \>zzzzzzz     4 xx\=xxxxxxxxxxxx     5 yyyyyyyyyyyyyyyyyy     6 zzzzzz     7   \>aaa      I want a line break to occur when necessarily and the line to be continued after the last line to be broken and in the same order. I hope it makes sense and I'm not making it too complicated. I'd appreciate any advice, doing it manually is painful and needs to be redone after any page layout change, i have no experience in LaTeX macros, so pointing me to anywhere I could start would be great.


title: Is there package to create a "Problem-Solution" environment that is symmetric for "twoside" pages?

text: # Background The following screenshot shows a **Problem-Solution** environment that is symmetric for `twoside` papers. **NOTE:** The problem heading is on the right side for odd-numbered pages. For even-numbered pages, the heading is on the left side. Orphan-widow issues must also be taken into account such that there is no page break at the heading. ![alt text](http://i.stack.imgur.com/Et2oQ.png) I already created this environment but it looks so complicated. Is there a package to do this out of the box? # Maximal Code Snippet (I cannot minimize my code anymore)               \documentclass[cmyk,10pt]{article}     \usepackage[a6paper,hmargin=1cm,vmargin=2cm]{geometry}     \usepackage{ifthen}     \usepackage{xcolor}     \usepackage{lipsum}     \usepackage{calc}          \newcounter{example}[section]          \renewcommand{\theexample}{\thesection.\arabic{example}}     \newenvironment{Example}[2][]%     {%         \refstepcounter{example}%         %------------------- Example Head -------------------         \par\nointerlineskip\vspace{\baselineskip}\noindent%             \label{example:\theexample}\color{blue}%         \ifthenelse{\isodd{\pageref{example:\theexample}}}%         {%             {\color{blue}\hrulefill}%             \raisebox{\depth}{%                 \colorbox{blue}{%                     \color{white}Example \theexample\ifthenelse{\equal{#1}{}}{}{\ (#1)}%                 }%             }%         }         {%               \raisebox{\depth}{%                 \colorbox{blue}{%                     \color{white}Example \theexample\ifthenelse{\equal{#1}{}}{}{\ (#1)}%                 }%             }%             {\color{blue}\hrulefill}%         }%         %------------------- Example Body -------------------         \par\nopagebreak\nointerlineskip\vspace{0.5\baselineskip}\noindent{\footnotesize#2}%         %------------------- Solution Head -------------------         \par\nointerlineskip\vspace{0.5\baselineskip}\noindent%         \colorbox{red}{\makebox[\linewidth-2\fboxsep]{\color{white}Solution}}%         %------------------- Solution Body -------------------         \par\nopagebreak\nointerlineskip\vspace{0.5\baselineskip}\noindent%         \color{red}\footnotesize\ignorespaces%     }     {%         %------------------- Solution Foot -------------------         \par\nopagebreak\nointerlineskip\vspace{0.5\baselineskip}\noindent{\color{red}\hrulefill}%         \par\nointerlineskip\vspace{\baselineskip}\noindent\ignorespacesafterend%     }          \usepackage{multido}          \begin{document}     \section{Without Title}          \begin{Example}     {%         \lipsum[1]     }%     \lipsum[2]     \end{Example}               \section{With Title}     \begin{Example}[With Title]     {%         \lipsum[1]     }%     \lipsum[2]     \end{Example}          \section{Looping}          \multido{\ix=1+1}{10}{%     \begin{Example}[\ix]     {%         \lipsum[\ix]     }%     Einstein's formula     \begin{equation}     E\not=mc^2     \end{equation}     \lipsum[\ix]     \end{Example}\lipsum[\ix]}     \end{document}      Or if there is no package, could you give me a suggestion to do it in a better way?


title: Sections are inclued in TOC, but not in the body text

text: I need sections included in the TOC, but not in the body text for a PDF output; so when I click the section at TOC, it will jump to the related page [where section header/title is not displayed]. How do I do this?


title: scrbook page numbers are only present on first page of chapters

text: I have to submit my thesis tomorrow and al of a suddon do not get any pagenumbers for any but the first page of the chapters. Anybody out there who can help me? I fear I do not have time to build a mwe sadly. Preamble settings:               \documentclass[b5paper,pagesize,11pt,DIV=calc,BCOR=8mm,parskip=false,bibtotoc,hidelinks]{scrbook}     \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{url}     \usepackage{rotating}     \usepackage{soul}     \usepackage{tocbasic}     \usepackage{tabularx}     \usepackage{array} %tabularx needs array!     \usepackage{todonotes}     \usepackage{polyglossia}         \setmainlanguage[variant=american]{english}         \setotherlanguage{german}          \usepackage{csquotes}     \usepackage{import}     \usepackage[grey,bookman]{quotchap}     \usepackage{xltxtra}     \usepackage{amsmath}     \usepackage{bbm}     \usepackage{unicode-math}     \usepackage{xr} %allow external references     \usepackage{afterpage}     \usepackage{pdflscape}     \usepackage{eso-pic} %exact placement of figures          \usepackage{siunitx}      \usepackage{booktabs}     \usepackage{epsf}     \usepackage{color}     \usepackage{colortbl}     \usepackage{multirow}     \usepackage{xspace}     \usepackage{tikz}     \usepackage[below]{placeins} %prevents floats of getting over a FloatBarrier     \usepackage{rotating}     \XeTeXtracingfonts=1      \usepackage[LabelsAligned]{currvita} %we need this for the integrated cv in the appendix     \usepackage{pdftexcmds}     \usepackage{caption}     \usepackage[font+=footnotesize]{subcaption}     \usepackage{verbatim}     \let\synopsis\comment     \let\endsynopsis\endcomment     \usepackage[active,       generate=synopsis,       extract-env={synopsis},       extract-cmd={section},       extract-cmdline={tableofcontents}]{extract}     \begin{extract}     \newenvironment{synopsis}{}{}     \end{extract}      My system is Debian wheezy and TeX Live 2011.


title: Adding comments to pseudocode

text: I would like to find a pseudocode package that support the possibility to wrote a comment at the right side of a if and that it wont be between `{ }` but rather at the right side of the page, after a symbol. ![enter image description here](http://i.stack.imgur.com/vBKHO.png) I would like instead of               if x < p {     .} then      something like this:               if (x < p)         \blacktriangleright x is a ...      my code:                \documentclass[]{scrbook}      \usepackage[english]{babel}      \usepackage[latin1]{inputenc}      \usepackage[T1]{fontenc}      \begin{document}      \begin{algorithm}      \caption{Influx}      \label{influx}      \begin{algorithmic}[1]      \REQUIRE $p \in [0,1]$, $G$      \ENSURE None      \FOR{$i = 0 \to 2^d-1$}        \IF{$n(\nu_i) = 0$}          \IF{ $x < p$ \COMMENT{ $x$ is a normal distribution number in the range of $[0,1]$}}           \STATE Occupy $v_i$ site with probablility $p$           \ENDIF        \ENDIF      \ENDFOR      \end{algorithmic}      \end{algorithm}      Any ideas?


title: TikZ: How to remove unwanted lines within an element? (something like TRIM)

text: In the following, i want only outer edges. I can use `fill=white` to remove unwanted circle portion. How to remove unwanted edges of rectangle?               \documentclass[a4paper]{article}          \usepackage{tikz}               \begin{document}       \begin{tikzpicture}             \draw (0,0) circle [radius=2cm];             \draw[fill=white] (0,1) rectangle (3,2);       \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/9N6Jk.png) When i have                 \begin{tikzpicture}             \draw (0,0) circle [radius=2cm];             \draw[fill=white] (0,1) rectangle (3,2);             \path[fill=white] (0,0) circle [radius=2cm];       \end{tikzpicture}      the circle is not thick.


title: Drawing a line between two points

text: The LaTeX line requirements are too restrictive (coprime and mag < 6). Is there any package that lets me just draw a line between two points? Basically               \line(a,b)(c,d)      or something similar I went through all the trouble of calculating the points for my lines using the `fp` package and now I can't draw the lines I need? I'm looking for a smooth line that uses the unit length and some way to set its thickness.


title: How to draw labeled parallel arrows in commutative diagram with TikZ?

text: I want to draw labeled parallel arrow in commutative diagram with TikZ, I searched on google and Tex Stackexchange, however, I found only the method to draw parallel arrow by `transform canvas` only, I tried to add the labeled but it failed. Here is my picture: ![enter image description here](http://i.stack.imgur.com/wWbgu.png) I want to label a map from `$\mathfrak{P}=\bigoplus_{i\inI}\mathfrak{P_{i}}$` to `$\mathfrak{P_{i}}$ and from $\mathfrak{P_{i}}$` to `$\mathfrak{P}=\bigoplus_{i\inI}\mathfrak{P_{i}}$`, i.e the arrows of the square. Here is the code :               \begin{tikzpicture}[node distance=2.8cm, auto]     \node (P) {$\mathfrak{P}=\bigoplus_{i\in I}\mathfrak{P_{i}}$};     \node(Q)[right of=P] {$\mathfrak{P_{j}}$};     \node (B) [below of=P] {$\mathfrak{B}$};     \node (C) [right of=B] {$\mathfrak{C}$};     \draw[transform canvas={yshift=0.5ex},->] (P) - -(Q);     \draw[transform canvas={yshift=-0.5ex},->](Q) -- (P);      \draw[->](Q) to node {$a$}(B);     \draw[->](Q) to node {$a$}(C);     \draw[->] (P) to node {$\pi_{j}$} (B);     \draw[->] (B) to node {$\psi$} (C);     \draw[->, dashed] (Q) to node [swap] {$g$} (B);     \end{tikzpicture}


title: macros that won't accept other macros as arguments

text: I'm trying to pass a counter to a macro that uses macros from the `fp` package. I can pass hard coded values and `\results` from the `fp` package BUT if I pass the counter it complains that it is not a valid floating point value. Is there any way to make this is work? There should be no diference between `\cmd{1}` and `\cmd{\count0}` as logically and mathematically when `\count0` is 1. I'm not sure what is going on behind the scenes but there should be some way to get it to work. This will save me trouble of having to create a `\result` variable that follows the counter which adds unnecessary clutter.


title: Add authors as footnote in lncs

text: please, I was asked to modify the .tex file of a manuscript. The problem is that I want to add "supervised by ..." as a footnote and when use \footnote{supervised by ...} in \author{} it does not work. I use a Latex lncs format. Thank you!


title: How to change only the last xticklabel?

text: I would like to set the last `xticklabel` to `\infty`. How can this be achieved without necessarily knowing the `xtick` value?               \documentclass{article}     \usepackage{pgfplots}     \begin{document}       \begin{tikzpicture}         \begin{axis}[           xticklabel={\tick >= 24 ? $\infty$ : $\pgfmathprintnumber{\tick}$}         ]           \addplot+[] table {\somedata};         \end{axis}       \end{tikzpicture}     \end{document}      (note: the above inline conditional doesn't work at all, it's just to illustrate what I am trying to do)


title: Cite bibliography in beamer

text: I am preparing a beamer presentation. In some slides (4 of 30) I want to cite one or two bibliographic references and put them at the bottom of each slide. They lie there just as a bulleted list, not being cited in the text of the slide. I wonder what is the best approach to do so. PS: I forgot to mention that bibliographic entries are stored in a .bib file


title: Why is TeXWorks generating corrupted pdfs?

text: I have installed MikTeX and TeXWorks on my Windows 7 PC. When I edit a .tex file in TexWorks and then save the file as a pdf, the pdf created cannot be opened by Adobe Reader; Reader complains that the file is damaged. Nonetheless, executing `pdflatex myFile.tex` on the windows command line creates a pdf that Adobe Reader can reliably open. Why can't I create such pdfs through the TexWorks IDE?


title: Templates for generating timesheets

text: Are there templates for generating weekly time sheets in LaTeX? Ideally something that would minimize duplicate entries by computing totals and days- of-week.


title: How to scale a tikzpicture including texts?

text: It seems that the `scale` option scales only the length of lines, but not the size of texts. For instance, `1` and `true` and not scaled in the following code.               \begin{tikzpicture}[thick, scale=0.6]     \draw [dashed] (1,12) -- (11,12);     \node[above] at (4,11) {1}; \node[above] at (8,11) {true};     \end{tikzpicture}      Could anyone tell me how to scale everything together within a tikzpicture? Thank you very much! PS: It is a picture in a presentation with Beamer.


title: Padded two-column arrays

text: I am using the following kind of 'padded array' many times:               \setlength{\fboxrule}{0pt}     \setlength{\fboxsep}{3pt}     \fbox{     \ensuremath{     \begin{array}{|l|l|}     \hline      A & B\\      C & D\\     \vdots & \vdots \\     E & F\\     \hline      \end{array}     }     }       I'd like to be able to just write, e.g.,               \begin{DRS}     A & B\\      C & D\\     \vdots & \vdots \\     E & F\\     \end{DRS}      (or the same with a command instead of an environment), but I don't know a clean way to set this up. The problem is that fbox is a command, and array an environment, so I'm not sure of the right way to mix the two. I could possibly hack it together, e.g. using the environ package (which I just found by searching on this topic), but it would be nice to know the right way to do this. Thanks! Edit: this is the kind of image I'm producing (using nested DRSs): ![enter image description here](http://i.stack.imgur.com/te3Qb.png)


title: Beamer Font Size for Footer

text: How can I change the font size of the footer in Beamer without modifying the font of the title (on the title page)? Also, when I try to change the title's font with `\title{\fontsize{20}{25} My Title}` it doesn't seem to work. Thank you.


title: Color only subsection header but NOT its toc entry

text: I'm having hard times trying to color some lines of my document. I want to color just the title of a subsection, but I don't want that the corresponding title in TOC is colored too. What I have now is: `\subsection{{\color{RoyalBlue}TITLE}}` And this work for the subsection title, but it actually colors also the corresponding title in the TOC. Thanks for helping, Rosario


title: Use BPchem Numbering As Labels in a PGFPlot

text: So, I yanked this example right from the manual on `pgfplots`, because this looks highly complex. The graph is exactly what I want to have, except instead of the custom labels it provided, I want to be able to insert the compound numbering from `BPChem` as the labels instead, so as a test I replaced that first `symbolic x coord` with my own number reference. Needless to say it does not work :(               \documentclass[12pt, letterpaper]{article}     \usepackage{pgfplots}     \usepackage{bpchem}     \begin{document}          \CNlabelsubnoref{cmp1}{a}     \begin{tikzpicture}         \begin{axis}[             ybar,             enlargelimits=0.15,             legend style={at={(0.5,-0.2)},             anchor=north,legend columns=-1},             ylabel={\#participants},             symbolic x coords={\CNrefsub{cmp1}{a},good,neutral,%             not good,poor},             xtick=data,             nodes near coords,             nodes near coords align={vertical},             x tick label style={rotate=45,anchor=east},             ]             \addplot coordinates {(\CNrefsub{cmp1}{a},0) (good,8)             (neutral,2) (not good,0) (poor,0)};         \end{axis}     \end{tikzpicture}          \end{document}      pdflatex compilation never finishes, but the pdf file contains this... > pgfplots [ ybar, enlargelimits=0.15, legend style=at=(0.5,-0.2), > anchor=north,legend columns=-1, ylabel=#participants, symbolic x coords=?? > ,good,neutral,not good,poor, xtick=data, nodes near coords, nodes near > coords align=vertical, x tick label style=rotate=45,anchor=east, ] > coordinates (?? ,0) (good,8) (neutral,2) (not good,0) (poor,0); 1 If I stop pdflatex, I get the following errors in my console:               ! Missing \endcsname inserted.     <to be read again>     \protect     l.20 ]     The control sequence marked <to be read again> should     not appear between \csname and \endcsname.     Missing character: There is no a in font nullfont!     ! Extra \endcsname.     \pgfplotsarray@glob@TMP ...ts@loc@TMPa \endcsname     Process exited with error(s)      Any chance this is something that can be worked around?


title: Adding both captions and notes to a table with the captions package

text: In the following table I created the caption exactly they way I wanted. I'd like to add a "Note" below the `tabular`, but within the `table` environment, following the same style as the caption. I sort of achieved what I wanted with the following. But it seems very hacky. There must be a better way, right? E.g., is there some starred version of `\caption` that suppresses the float number? If there were I could just add that below the `tabular`. That sure would be easiest. I've checked the `caption` package and there seems to be no such thing. Any other solutions?               \documentclass{article}     \usepackage{booktabs}     \usepackage[margin=10pt,font=small,labelfont=bf,labelsep=colon,tableposition=top,figureposition=top]{caption}     \usepackage[leftmargin=10pt,rightmargin=10pt]{quoting}     \begin{document}       \begin{table}[ht]         \centering         \caption{My caption. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.}         \begin{tabular}{ll}           \toprule           foo & bar \\           \midrule           baz & bog \\           \bottomrule         \end{tabular}         \begin{quoting}           {\small {\bf Note:} a note Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.}         \end{quoting}       \end{table}     \end{document}      ![tab1](http://i.stack.imgur.com/zaE6c.jpg)