title: reflexive arrow

text: $$      \begin{array}{c}      \ovalbox{A} \\     \uparrow \downarrow \\     \ovalbox{B} \\     \uparrow \\     \ovalbox{C}      \end{array}      $$       (The `fancybox` package is used here, so that `\ovalbox{B}` appears as a capital B in a box with curved corners.) This is a crude sort of picture of a simple directed graph, and although all I need is something simple like this, I also was to be able to show an arrow pointing from `\ovalbox{B}` to itself, set to the right of `\ovalbox{B}`. How can I do that?


title: Line breaks within a figure environment in memoir

text: I am trying to set up the following layout on a figure in a document typeset with the memoir class:                                         ![enter image description here](http://i.stack.imgur.com/cj4Mh.png) I have tried using `\\\` within the `\subbottom` environment, but this doesn't seem to work               \begin{figure}[!t]     \subbottom[]{     \includegraphics[width=0.45\linewidth]{img1.png}\\[0.2cm]     \includegraphics[width=0.45\linewidth]{img2.png}}     \hfill \subbottom[]{     \includegraphics[width=0.45\linewidth]{img3.png}\\[0.2cm]     \includegraphics[width=0.45\linewidth]{img4.png}}     \end{figure}      LaTeX seems to ignore my `\\\\[0.2cm]` commands and instead it tries to print images in the same row. Is there a way to do this when using the float commands provided by the memoir class? (such as `\subbottom`).


title: Show code similar to documentation of packages

text: I saw that several documentation packages use the environment to show macrocode long codes with page break, the example implementation of the package geometry. How do I do this? I wanted to show a code along with page break.


title: The '.is if' handler of pgfkeys

text: Let us start with an example from the pgf manual, version 2.10, page 495:               \pgfkeys{/flat world/.is if=theworldisflat}     \pgfkeys{/flat world=false}     \def\x#1{% code-A       \iftheworldisflat         Flat       \else         Round?       \fi       #1%     }      I have two questions concerning this example. (1) Can I set `\newif\iftheworldisflat` within the command `\pgfkeys` or, better still, get `\pgfkeys` to declare the boolean for me automatically. The latter is what obtains in _xkeyval_ package. (2) How do I pass a code (eg, code-A above) directly to the key `flat world` within `\pgfkeys` without a de tour? Is this possible? Something like the following appears to me to be better, since it allows the callback to be executed whenever the key is set.               \pgfkeys{%       /my family/my keys/.cd,       keya/.is if={<boolean>}{<callback>},     }      (3) Why did _pgfkeys_ use `\edef` here:               \def\pgfkeys@non@outer@newif@#1#2{%        \expandafter\edef\csname #2true\endcsname          {\noexpand\let\noexpand#1=\noexpand\iftrue}%        \expandafter\edef\csname #2false\endcsname          {\noexpand\let\noexpand#1=\noexpand\iffalse}%        \csname #2false\endcsname     }      **EDIT** What I have tried is for something like the following. I am still thinking of how to optimize the code; that's why I am yet to post it:               \pgfkeys{%       /my family/my keys/.cd,       keya/.is if=boola,       keyb/.is if=keyb, % Acceptable, but why repeat 'keyb'?       % Use 'keyc' as the boolean and allow the user to provide a default value.       % No need to provide a boolean or repeat 'keyc' on the right hand side of '='.       keyc/.is bool={true}{\def\y##1{##1-True-#1}}{\def\y##1{##1-False-#1}},     }


title: listings using tcolorbox for beamer documentclass

text: I'm trying to get `listings` using `tcolorbox` for `beamer` `documentclass`. My MWE is given below but could not get it working. Any help will be highly appreciated. Thanks * * * ## MWE * * *               \documentclass{article}     \usepackage{listings}     \usepackage{tcolorbox}     \tcbuselibrary{listings}%     \usepackage{xcolor}          \lstset{ % General setup for the package         language={[LaTeX]TeX},         basicstyle=\small\sffamily,         numbers=left,         numberstyle=\tiny,         frame=tb,         tabsize=4,         columns=fixed,         showstringspaces=false,         showtabs=false,         keepspaces,         commentstyle=\color{red},         keywordstyle=\color{blue}     }%                    \tcbset{listing engine={listings}}               \usepackage[english]{babel}     \usepackage{blindtext}          \begin{document}          \section{First Section}          \blindtext          % Redefine the document environment within a group     \begingroup     \renewenvironment{document}{}{}     \renewcommand\documentclass[2][]{}          \begin{tcblisting}{colback=red!5!white,colframe=red!25,left=6mm,     listing options={style=tcblatex,numbers=left,numberstyle=\tiny\color{red!75!black}}}     \documentclass{beamer}     \begin{document}         \begin{frame}             \frametitle{First Frame}                 \blindtext           \end{frame}              \begin{frame}             \frametitle{Second Frame}                 \blindtext           \end{frame}          \end{document}          \end{tcblisting}          \end{document}


title: Multiple Choice Questions in Exam package

text: I am trying to write an exam with some multiple choice questions. Here is a minimal example of what I am doing               \documentclass[addpoints]{exam}          \begin{document}          \begin{center}     \gradetable     \end{center}               \begin{questions}          \titledquestion{\textbf{Multiple Choice}}[10]               What is the Capital of the United States in 1799?          \begin{oneparchoices}     \choice NY      \CorrectChoice Washington D.C.     \choice Chicago     \choice LA          \end{oneparchoices}                         \question[10]          What is the Capital of the United Kinddom in 1999?          \begin{oneparchoices}     \choice London      \CorrectChoice Washington D.C.     \choice Chicago     \choice LA          \end{oneparchoices}               \end{questions}                    \end{document}      I would like to achieve the following:   1. The choices are really close to each other, it there a way to put them in the full line with equal spaces between them?   2. I would like to start count the questions from the second one, how do I achieve this?


title: How to add whitespace after every item in a list in ConTeXt?

text: I have a document containing some questions. I need to leave readers space to write a few sentences as an answer. I am using this code:               \startitemize[r]         \item Where do most bears live?         \item What kind of bears live in your area? When have you seen them?         \item If you meet a bear, what should you do?     \stopitemize      With the grid on, this leaves only one empty line after each item, e.g.:               i. Where do most bears live?          ii. What kind of bears live in your area? When have you seen them?          iii. If you meet a bear, what should you do?          This is some other text.      How can I add 1 or 2 extra empty lines after each item?


title: In BibTex, when should I use 'howpublished' and when 'url '?

text: I'm writing a piece whose bibliography with some technical reports, presentation, manuals, and just websites. In the .bib file, I need to decide whether to use 'howpublished' fields, or 'url' fields for the addresses of where these are at When should I use which of them? Note: I currently use the `abbrv` bibliography style, but I'd like a more general answer .


title: PGF's \foreach with weird list

text: A claim is made at pgffor: Special treatment for last item in \foreach-list that the following works. But I can't get it to work. What have I missed?               \newcount\nra     \foreach[count=\nx]\x in {1--,2--,...,10--}{%       \advance\nra by1       \ifnum\nra>2 \breakforeach\fi       \texttt{\x (\the\nra)}\space     }      Also, please how do I get the following to work with `\foreach`?               \def\amspace{\let\amspace\space}     \newcount\nra     \foreach\x in {1pt,2pt,...,10pt}{%       \advance\nra by1\relax       \ifnum\nra>2 \breakforeach\fi       \amspace\texttt{\x (\the\nra)}%     }      **EDIT** (2012/06/19) **This is now a community question: everyone can edit it or provide his/her suggestions below** I have reopened this question because I want to seek the opinion of users of `\foreach` on which of the following format is to be preferred for an ellipsis list, i.e., a list to be completed. Suggestions of other syntaxes are welcome. `\foreach` currently supports the rather queer syntax, which is given on p.505 of the PGF-2.10 manual (just before the section titled _special handling of pairs_ ):               {0\pi,0.5\pi,...\pi,3\pi}     {A_1,..._1,H_1}     {1--, 4-- ,...--, 10--}     {1pt, 4pt, ...pt, 10pt}      **Proposals** For incomplete (ellipsis) lists, the user should include optional key values after the loop list, as follows. This will significantly speed up list completion and reduce the possibility of mistaken identity. Target list:               {a,B,1,5,A^1,A^3,A^5,A^7,A^9}      Syntax for \newforeach:               \newforeach [<conventional.keys>] \x in {a,B,1,5,...}[       start = A^1,       end = A^9,       step = 2,       coupler = ^,       grow right, % increment right of <coupler>       grow left, % increment left of <coupler>       macro elements, % elements are macros       ... more keys     ]     {<loop.callback>}      `<conventional.keys>` will be the usual `\foreach` keys/variables with some few new ones. Examples of when elements are macros:               \pgfmathsetmacro\start{<expr>}     \pgfmathsetmacro\stopp{<expr>}     {\start,...,\stopp}      **Reminder** `\newforeach` will work for arbitrary list separators and subseparators (including active list separators) and will remove the group scoping of computations by `\foreach`. New user variables will include               *parser = <value> (e.g., {,})     *subparser = <value> (e.g., /)     list is macro = <true> | <false> % the given list is a macro     terminator = <value> (e.g., {;}) % callback terminator     evaluate \x as \y using <formula>     count in \nr all \x satisfying <condition>     store in \cmd all \x satisfying <condition>     apply to all \x satisfying <condition> = <code>     apply to all \x in serial range [a,b] = <code>     at begin loop = <code>     at end loop = <code>      The star sign (`*`) on parsers will mean "remember and use this parser subsequently, until I change it". A new boolean `\iflastitem` will be introduced, which can be toggled independently, on different nesting depths. Item counters (e.g., `\currentitemnumber`) will also be introduced on all nesting depths without collision between nesting depths. The loop can also look ahead for `\nextitem`. And in the case of premature termination of the loop with `\breaknewforeach`, or with a user-inserted list item (`\listbreaker`), the remainder of the list on the current nesting depth will be available in `\listremainder`. The `\newforeach` loop can also be paused with the user- inserted list item `\listpauser`.


title: node, scope and pgfonlayer

text: Please can I use node inside pgfonlayer? The node in question is commented out in the following:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{scopes}     \usetikzlibrary{backgrounds}     \begin{document}     \begin{tikzpicture}     [       my line/.style={line width=2.5pt},       put circle/.style={circle,draw=blue!50,fill=blue!20,thick,         inner sep=0pt,minimum size=5mm},       execute at end picture={         \begin{pgfonlayer}{background}           \path[fill=yellow!25,rounded corners,my line,draw=red]             (current bounding box.south west) rectangle             (current bounding box.north east);           %\node at (2,2) [my line] {           {             [magenta]             \draw (0mm,10mm) -- (15mm,10mm);             \draw (0mm,8mm) -- (15mm,8mm);           }             \draw (0mm,6mm) -- (15mm,6mm);           {             [green]             \draw (0mm,4mm) -- (15mm,4mm);             \draw (0mm,2mm) -- (15mm,2mm);             \draw[blue] (0mm,0mm) -- (15mm,0mm);           };         %};         \end{pgfonlayer}       }     ]     \node at (0,0) [put circle] {X};     \node at (4,1) [put circle] {Y};     \end{tikzpicture}     \end{document}


title: Problems installing AucTeX over Emacs 24 (OSX)

text: http://pastebin.com/fbzXTdCU Above is a terminal log for those who would make sense of it, but basically I have done the following things in order to get the lovely promises of Emacs' screenshots:   1. Downloaded AucTeX through this question, which includes the package in question `preview-latex`   2. Read `README` and `INSTALL`, ran `./configure` as advised.   3. Realized Xcode's awful habits and made `make` a thing in my actual path   4. Ran `./configure` again, 'successfully' - followed by `make` and `make install`   5. Fired up Emacs, noticed the lack of menu (supposed to be tell-tale of a successful install) and then fired up proper `emacs`, to no effect.   6. Ran ./configure again, but specifying which emacs to work with (`Emacs.app/Contents/MacOS/Emacs`), and it gave an error about not being able to find my `texmf` folder, so I ran it again with that (and the lisp directory, it couldn't find that either)   7. Did some more research. Turned out I gave it the wrong lispdir at first (`lisp` instead of `site-lisp`). Tried the same call again with the modified option. The most recent call I ended up making was line 2490 in the log above:               ./configure --with-texmf-dir=/usr/local/texlive/2012/texmf \                 --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs \                 --with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp      Nothing has worked. Can anybody tell me what piece of this puzzle I'm missing? I'm running OSX 10.7.5.


title: Override first/last name splitting for one entry in BibTeX

text: I want to preserve the ordering of the author field and avoid the automatic abbreviations, and only that, for this specific entry. I have something like:               @TECHREPORT{abcd2012,       author = {Free Software Foundation},       title = {Some study},       year = {2012}     }      By default, it displays the author name as: > FOUNDATION, F. S. and when I use `\citeauthoronline`: Foundation I want it to display: > FREE SOFTWARE FOUNDATION And for when I use `\citeauthoronline`: > Free Software Foundation If I add an additional pair of `{}`, it prevents splitting, but also blocks further desired formatting from the bibliography style (capitalization). So, this solution isn't acceptable. What I can do to achieve the desired effect? EDIT: I forgot to mention my bibliography style, ABNTeX:               \usepackage[alf,abnt-etal-text=emph]{abntcite}


title: Table and its captions on different pages

text: I have a really long table that fits the whole page (in fact it's a really wide table that I have rotated by 90 degrees):               \begin{table}[!pht]     \caption{ ... some quite long description }     \begin{sideways}\begin{minipage}{0.9\textheight}\begin{center}\begin{small}     \vskip 1cm     \begin{tabular}{|c|c|cccccc|ccc|ccc|ccc|}     ... a lot of data...      But the caption and table are overlapping. Is there a way to show on one page only the description, and on the another page only the table (but preserving the numeration of table environment)?


title: error using special characters in in biblatex with LuaLaTeX

text: I am using LuaLaTeX and `biblatex` which the `biblatex` manual says should be able to compile `utf`. At the bottom of this message is a minimal non-working example. In the final PDF it just deletes all the accented characters. I can go in and manually correct the `.bbl` file (replacing `√®`with `\'e` and `√∂ = \"o`) but this isn't an ideal solution. The errors I get when running BibTeX (with `biber` of course as the default engine) are               INFO - This is Biber 1.5     INFO - Logfile is 'Biblatex.blg'     INFO - Reading 'Biblatex.bcf'     INFO - Found 3 citekeys in bib section 0     INFO - Processing section 0     INFO - Looking for bibtex format file 'Biblatex.bib' for section 0     INFO - Decoding LaTeX character macros into UTF-8     INFO - Found BibTeX data source 'Biblatex.bib'     INFO - Overriding locale 'en_US.UTF-8' default tailoring 'level = 4' with 'level = 2'     INFO - Overriding locale 'en_US.UTF-8' default tailoring 'variable = shifted' with 'variable = non-ignorable'     INFO - Sorting 'entry' list 'cms' keys     INFO - No sort tailoring available for locale 'en_US.UTF-8'     INFO - Writing 'Biblatex.bbl' with encoding 'UTF-8'     INFO - Output to Biblatex.bbl      Then in LuaLaTeX I get this error:               l.50 ...le sentence ~\citep[1666]{Loschel:2010dn}.                                                    ./Biblatex.tex:50: Package inputenc Error: Keyboard character used is undefined     (inputenc)                in inputencoding `utf8'.     See the inputenc package documentation for explanation.     Type  H   for immediate help.      ...                                                        l.50 ...le sentence ~\citep[1666]{Loschel:2010dn}.          [1{/usr/local/texlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]          ./Biblatex.tex:53: Package inputenc Error: Unicode char \u8:√®vr not set up for use with LaTeX.      with input                   \documentclass{report}                \usepackage[utf8]{inputenc}     %Use utf-8 encoding for foreign characters         \usepackage[authordate,natbib,backend=biber,bibencoding=utf8]{biblatex-chicago}              \begin{filecontents}{\jobname.bib}              @article{Cherp:2011dt,         author = {Cherp, Aleh and Jewell, Jessica},         title = {{The three perspectives on energy security: intellectual history, disciplinary roots and the potential for integration}},         journal = {Current Opinion in Environmental Sustainability},         year = {2011},         volume = {3},         number = {4},         pages = {202--212},         month = sep,         annote = {(0) {\&}lt;ce:title{\&}gt;Energy Systems{\&}lt;/ce:title{\&}gt;              }         }              @article{Loschel:2010dn,         author = {L{\"o}schel, Andreas and Moslener, Ulf and R{\"u}bbelke, Dirk T G},         title = {{Indicators of energy security in industrialised countries}},         journal = {Energy Policy},         year = {2010},         volume = {38},         number = {4},         pages = {1665--1671},         month = may         }              @article{Lefevre:2010kz,         author = {Lef{\`e}vre, Nicolas},         title = {{Measuring the energy security implications of fossil fuel resource concentration}},         journal = {Energy Policy},         year = {2010},         volume = {38},         number = {4},         pages = {1635--1644},         month = jan         }                   \end{filecontents}         \addbibresource{\jobname.bib}              \begin{document}              This is the first meaningless sentence ~\citep{Cherp:2011dt}. This is another meaningless sentence ~\citep{Lefevre:2010kz}. A third meaningless example sentence ~\citep[1666]{Loschel:2010dn}.              \printbibliography              \end{document}


title: Freeing space by Formating the size of citations on slides in Beamer using Biblatex

text: I want to change the size of my citations on the slides. My relevant preamble:               \usepackage[style=apa,sorting=nyt,backend=biber]{biblatex}     \DeclareLanguageMapping{ngerman}{ngerman-apa}     \addbibresource{biblio1.bib}     %---------------Document-----------------------%     \begin{frame}[allowframebreaks]     \frametitle{References}     %\nocite{*}     \renewcommand*{\bibfont}{\scriptsize}     \printbibliography     \end{frame}      Up until now I do it likes this:               {\tiny\parencite{Harris.12}}      **Question:** Is there an option to format this for all citations in the beamer-presentation?


title: Expansion issue when adding to CSV list from within a \foreach

text: Another expansion issue that I am unable to guess at the correct combination of `\edef`/`\expandafters` to get to work. ## Background: Below I have defined `\AddToCommaSeparateList` which uses `\g@addto@macro` as per How keep a running list of strings and then process them one at a time. This works as I desire when used outside of a `\foreach` and properly handles list members containing a comma: ![enter image description here](http://i.stack.imgur.com/KR4AG.png) ## Problem: But when I attempt to add to this list from within a `\foreach`, I run into an expansion issue. Well the answer seems pretty obvious, I just need to expand the content that is added to the list. Well, that should not be too difficult, or so I think. So I defined `\ExpandedAddToCommaSeparateList`, where instead of               \g@addto@macro#1{{#2}}%      used in `\AddToCommaSeparateList`      I simply use:               \edef\ExpandedMember{#2}%      \g@addto@macro#1{{\ExpandedMember}}%      Well, as is usual with expansion issues (at least for me), things did not quite work as expected. In the MWE below I had to resort to an `\xdef` to get things to compile, but I should only need an `\edef`. ![enter image description here](http://i.stack.imgur.com/fnXk2.png) ## Question:   * What magic combination of `\edef` and/or `\expandafter`s do I need to add to the `\ExpandedAddToCommaSeparateList` macro so that I can use it outside and inside a `\foreach`? ## Notes:   * I think this code seems rather long, but I think that is due to the comments, and the first phase which is just to test that the code works as expected in basic usage.   * The problem output is highlighted in red, it should correspond to the output in blue.   * I really just want one version of this macro that works in both cases (inside and outside of a `\foreach`). Don't really see where I would _not_ want expansion (at least in my use case). Hence, am tryinig to handle the expansion issue from within the macro that adds to the list, as opposed to within the `\foreach`. ## Code:               \documentclass{article}     \usepackage{xcolor}     \usepackage{xstring}     \usepackage{pgffor}          \makeatletter     \newcommand*{\ResetCommaSeparatedList}[1]{\gdef#1{}}%     \newcommand*{\IfEmptyCommaSeparatedList}[3]{%         % #1 = listname         % #2 = code if list is empty         % #3 = code if list is non-empty         \IfStrEq{#1}{}{#2}{#3}%     }          \newcommand*{\AddToCommaSeparateList}[2]{%         % #1 = listname         % #2 = content to add to CSV list         %         % Don't add a leading comma in list         \IfEmptyCommaSeparatedList{#1}{}{\g@addto@macro#1{,}}%         %         %  Extra brace group in case #2 contains a comma         \g@addto@macro#1{{#2}}%     }%     \newcommand*{\ExpandedAddToCommaSeparateList}[2]{% with expansion?         % #1 = listname         % #2 = content to add to CSV list         %         % Don't add a leading comma in list         \IfEmptyCommaSeparatedList{#1}{}{\g@addto@macro#1{,}}%         %         % Only need a \edef here, but usign \xdef to get this to compile         \xdef\ExpandedMember{#2}%          %  Extra brace group in case #2 contains a comma         \g@addto@macro#1{{\ExpandedMember}}%     }%     \newcommand*{\DumpList}[1][black]{%         \par         MyList = \par         \foreach \x in \MyList {\hspace*{1cm}\textcolor{#1}{\x}\par}     }%     \makeatother          \newcommand*{\MyList}{}%          \begin{document}     \noindent\textbf{Show that this works outside of foreach}\par     \ResetCommaSeparatedList{\MyList}     \AddToCommaSeparateList{\MyList}{1}     \AddToCommaSeparateList{\MyList}{2}     \AddToCommaSeparateList{\MyList}{3}     \AddToCommaSeparateList{\MyList}{4, 5, 6}     \DumpList[blue]          % Repeat just to ensure that that \ResetCommaSeparatedList works     \ResetCommaSeparatedList{\MyList}     \AddToCommaSeparateList{\MyList}{x}     \AddToCommaSeparateList{\MyList}{y}     \AddToCommaSeparateList{\MyList}{z}     \AddToCommaSeparateList{\MyList}{a, b, c}     \DumpList          \bigskip\hrule     \bigskip\noindent     But, when the content is added via a \verb|\foreach| there are      expansion issues.     I want this to yield \textcolor{blue}{1, 2, 3}:          % --------------------------------- Problems start here     \ResetCommaSeparatedList{\MyList}     \foreach \x in {1,...,3} {%         % A check is made here so that only certain ones get added         % to the CSV list (omitted here as it is not relevant to issue)         \ExpandedAddToCommaSeparateList{\MyList}{\x}%     }     \DumpList[red]          \bigskip\noindent     Also, would prefer just one version of this macro, so this should      produce results identical to the first output in blue above:     \ResetCommaSeparatedList{\MyList}     \ExpandedAddToCommaSeparateList{\MyList}{1}     \ExpandedAddToCommaSeparateList{\MyList}{2}     \ExpandedAddToCommaSeparateList{\MyList}{3}     \ExpandedAddToCommaSeparateList{\MyList}{4, 5, 6}     \DumpList[red]     \end{document}


title: I encountered an 'errorUnknown graphics extension: .eps.'

text: I tried to load an .eps picture, but an error occured, 'errorUnknown graphics extension: .eps.'. Please help me!


title: Latex error. Unknown graphics extension: eps

text: > **Possible Duplicate:**   >  I encountered an 'errorUnknown graphics extension: .eps.' I have the error like in the title. I found some pages on the web with a solution to this problem. They use to say that compiling should be not LaTeX->pdf but LaTeX->ps->pdf. How can it be done, or maybe there is another solution for the problem?


title: Are maxnames or minnames legal options for printbibliography?

text: I haven't been doing much LaTeX'ing and just installed TeX live 2012 last night. Now one of my documentation projects stops compiling due to the following snippet:               \chapter{List of publications}     \begin{refsection}[Publications]       \defbibheading{empty}{%         \markboth{Publications}{Publications}       }       \printbibliography[heading=empty,maxnames=15,minnames=15]     \end{refsection}      It seems `maxnames` and `minnames` are now removed for `printbibliography`. How to fix this without changing the global settings? Thanks. The snippet is sort of an innovative use of biblatex to list my publications. It used to work with biblatex 1.4c. It should display full author list for that particular chapter. EDIT: sadly I am struggling with English to clarify my question. It involves a complex use of biblatex and not about using maxnames or minnames or printbibliography, which are clearly explained in the manual.


title: Using \footnotemark with letters

text: There are many answers to questions about `\footnotemark`, but I couldn't find one to mine. I have the following code and it works fine. What I need to use is `\footnotemark [a]` instead of `\footnotemark [1]`, but I always get an error. Is it a `\usepackage` problem?               \begin{table}[thb!]     \centering     \caption[Sample table]{Params}     \label{tab:params}     \vspace{0.5 cm}     \begin{tabular}[width=0.5\columnwidth]{|c|c|c|}\hline     \textbf{Params}& \textbf{Description} & \textbf{Values }\\\hline     \textbf{$x$} & high  & $2$ $\left[\frac{mol}{h}\right]$\footnotemark [1]\\\hline     \textbf{$y$} & low & $0.2$ $\left[\frac{mol}{h}\right]$\footnotemark [2]\\\hline     \end{tabular}     \end{table}     \footnotetext [1]{parameter value are taken from \cite{bla}.}     \footnotetext [2]{parameter value are taken from \cite{blabla}}


title: How to prevent tables from being wider than the text width in ConTeXt?

text: I have some tables like this:               \starttabulate[|l|l|]         \HL         \NC Title 1 \NC Title 2 \NC\NR         \HL         \NC This is a sentence. \NC This is another sentence. \NC\NR         \HL     \stoptabulate      Sometimes, the sentences are too long, so then the table width becomes very wide.   * How can I make certain that the width of the table never exceeds the width of the available text width?


title: <F5> in vim-latex doesn't expand environment

text: I'm new to vim-latex and have been reading some tutorials. I've noticed that the behaviour of the `F5` on my machine is rather different from what the tutorials tell me. I'm supposed to expect `F5` to expand an environment (if the name of the env is typed) or to select from a list in order to expand. However, all I am getting `\usepackage{name of environment}` being returned, which doesn't make sense to me of course since I'm trying to add environment tags and not a package. Why is there such a deviation from the expected behaviour?


title: pstricks and admin rights

text: I am using MiKTeX 2.9 on an XP account with restricted user rights. Unfortunately I was not able to compile a file under `xelatex` which included `pstricks` graphics, so I tried everything that I found on the net, i.e. updating all packages and adding a `-dNOSAFER` option to the file `dvipdfmx.cfg`. These thing were done under an administrator account, after I found out that the problem persisted there as well (I am not the administrator, by the way). Happily this seemed to work - I was then able to compile the file . However, when trying to compile under my restricted account, I get the well-known message again:               ** WARNING ** Image format conversion for PSTricks failed.      ** WARNING ** Interpreting special command pst: (ps:) failed.     ** WARNING ** >> at page="1" position="(133.768, 372.249)" (in PDF)     ** WARNING ** >> xxx "pst: tx@Dict begin STP newpath /ArrowA { moveto } def /ArrowB "      This is a minimal example:               \documentclass{article}     \usepackage{pstricks}     \begin{document}     \begin{figure}     \begin{pspicture}(4,5)     \psframe(0.7,2)(3.3,3)     \rput(2,2.5){An Example}     \end{pspicture}     \end{figure}     \end{document}      I'm really wondering what's going on here. Unfortunately I don't know much about user rights on XP and how they might interfere with xelatex. Switching to LaTeX/pdfLaTeX is not an option for me, as I need the unicode support provided by XeLaTeX. I'm happy for any suggestions. _**Edit:_** I would like to add that I added the `-dNOSAFER` option directly to the `dvipdfmx.cfg` (I know one is not supposed to do so as it might be overwritten), because when I first put the edited file into my local repository I did not notice any change in behaviour, although I refreshed the `FNDB` and updated the format files after placing the file there. Anyway, now that I think about it, when I first put it into the local repository I did so under my restricted user account whereas when I edited the original file I was logged in under our administrator's account (which I cannot access without our admin's help). So the reason it did not work was probably not due to the location of the file but rather to the user rights issue. However, I would prefer to have the adjusted file under my local repository, in case I really need it.


title: How do I add an option that sets a flag to a document class?

text: I want to add an option that sets a flag to a document class. That is, I want to be able to type               \documentclass[foo]{class}      and get one type of behavior, and type               \documentclass{class}      to get a different type of behavior. I'm thinking I should do it like this in the class file:               \newif\if@foo     \@foofalse     ...     \DeclareOption{foo}{\@footrue}     ...     \if@foo     ...     \else     ...     \fi      Will this work? Could this cause a problem if a package I use in the document also has a `\newif\if@foo` in it?


title: Is there a way to control whitespace around a TikZ picture?

text: When I draw a `tikzpicture` that includes paths, I get quite a bit of extra whitespace added around the elements of the picture. Depending on the elements the figure contains, this can work out in some dimensions and not others, but is never entirely what I want, for example: ![enter image description here](http://i.stack.imgur.com/u9pf4.png) If I attempt to fix this using `overlay` with the paths, the picture is shifted (closer) to the left, but I get too little whitespace, and elements overflow onto the text: ![enter image description here](http://i.stack.imgur.com/54R9r.png) How do a make sure that there is no unwanted whitespace around a `tikzpicture`, while ensuring that there is no overflow onto adjacent elements? _Is there a way to set a whitespace "margin" around a`tikzpicture`?_ * * *               \documentclass[]{article}          \usepackage{lipsum}          \usepackage{tikz}     \usetikzlibrary{topaths}     \usetikzlibrary{positioning}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes.geometric}      \usetikzlibrary{petri}     \tikzset{         redarrow/.style={->, red, fill=none,>=angle 60, thick},           bluearrow/.style={->, blue, fill=none,>=angle 60, thick}}          \begin{document}          \newcommand{\demofig}{         \begin{tikzpicture} [             grpobject/.style={regular polygon, regular polygon sides=\grpdim,minimum height=2cm},             grpmark/.style={circle,inner sep=2.0pt} ]             \def\scale{\grpdim/1.4}             \foreach \i [evaluate=\i as \angle using \grpstartangle+(\i-1)*360/\grpdim] in {1,...,\grpdim}{                 \def\nodeloc{({\scale*cos(\angle))},{\scale*sin(\angle))})}                 \begin{scope} [rotate around={(360/\grpdim)*(\i-1):\nodeloc },every node/.style={transform shape}]                     \node[grpobject,draw=black] (\i) at \nodeloc {};                      \node[grpobject,draw=black,minimum height=1.4cm,draw opacity=0.0] (markgrid) at \nodeloc {};                      \node[grpmark,fill=gray!75] at (markgrid.corner 1) {};                  \end{scope};}             \foreach \i [remember=\i as \j (initially \grpdim)] in {1,...,\grpdim}{                 \draw[redarrow,overlay](\i)--(\j);}             \draw[bluearrow,\doover](1)to[loop,looseness=4,min distance=2cm](1);         \end{tikzpicture} }          Here's what happens when drawing a figure that includes paths. Quite a bit of white space is added around the \texttt{tikzpicture}, which looks alright vertically, but places the figure off to the right a bit:          \def\grpdim{4}     \def\grpstartangle{135}     \def\doover{}     \demofig          This is not what I want.          \pagebreak{}          Here's what happens if I use \texttt{overlay} when drawing paths; the \texttt{tikzpicture} ends up flowing over the text.          \def\grpdim{4}     \def\grpstartangle{135}     \def\doover{overlay}     \demofig          This is not what I want either          \bigskip{}          How do a make sure that there is no extra whitespace around a \texttt{tikzpicture}, while ensuring that there is no overflow onto adjacent elements? Is there a way to set a whitespace "margin" around a \texttt{tikzpicture}?          \end{document}      * * * Note that focus here is the final question. I'm aware that there are methods measuring the actual extent of the `tikzpicture`, and for manually clipping and buffering the edges, the most accurate of which involve additional packages applied to the picture it its own document. The question here is whether TikZ knows the actual extent of figure elements so that one can simply create whitepace buffers, relative to extent of the visible content, similar to CSS margins.


title: Removing Section Name in Heading of Reference Page

text: I am using the `\pagestyle{myheadings}` command to put page numbers on my document which does not include the Section Name in the heading. However, that does not seem to work on the References page of my document which was created using the `\printbibliography` command. How can I effect a `\pagestyle{myheadings}` command on the contents created by the `\printbibliography` command? I tried using `\printbibliography[heading=none]` but it also removes the Section Name. What I want is for only the Section Name in heading (left side of a page number) be removed. The following example illustrates this. This will output a two page document. 1st page contains a page number in the header, but does not include section Name (Bipartite Matching). But on the References page, References is included in the header plus the page numbers... I don't want that..               \documentclass[10pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \usepackage[backend=bibtex8]{biblatex}     \addbibresource{other_bib.bib}          \pagestyle{myheadings}     \begin{document}     \section{Bipartite Matching}          Given a bipartite graph $G=(A \cup B,E)$, a \textit{matching} $M$ in $G$ is a set of pairwise non-adjacent edges such that no edges in $M$ share a common vertex\cite[][pp. 184]{Chartrand05}.           \newpage     \printbibliography     \end{document}


title: How can I undo an etoolbox patch?

text: Suppose I patch an environment using an etoolbox command such as `\AtBeginEnvironment` or `\AfterEndEnvironment`, etc. How can I undo these changes at a later stage?               \documentclass{article}     \usepackage{etoolbox}     \let\olditemize\itemize      \let\oldenditemize\enditemize     \AfterEndEnvironment{itemize}{bleat bleat}     \begin{document}     \begin{itemize}     \item This is an item.     \end{itemize}     \let\itemize\olditemize        %Would like to undo the change     \let\enditemize\oldenditemize  %now, but this doesn't help.     \begin{itemize}     \item This is another item.     \end{itemize}     \end{document}


title: Is there a LaTeX template for electronics data sheets?

text: Many electronics data sheets appear in very similar formats. E.g., Analog Devices DAC data sheet in PDF has a very common format. Is there a LaTeX template for generating a document like the above?


title: References not getting the correct page number

text: I am a beginner in using LaTeX. The problem I am getting is that I am unable to get the correct reference page number in the content, but get the previous chapter last page number. Also in the header, i.e. chapter number of the references is of previous chapter. This is the main file code               \documentclass[12pt,a4paper]{report}          \usepackage[top=0.70in, bottom=0.70in, left=0.8in,right=0.80in]{geometry} % setting the page alignment with this package     \usepackage[pdftex]{graphicx}      \usepackage[dvips, bookmarks, colorlinks=false]{hyperref} %for creating links in the pdf version and other additional pdf attributes, no effect on the printed document     \usepackage[final]{pdfpages} %for embedding another pdf, remove if not required     \usepackage{float} %used for figure placement with H as a parameter     \usepackage{pslatex} % for times new roman, old package, but works     \usepackage{array} % for making text bold in table     \usepackage{subfigure} % for displaying figure side by side          %For the header and footer     \usepackage{fancyhdr}     \fancypagestyle{plain}{%     %\fancyhf{} % clear all header and footer fields     \fancyfoot[L]{\emph{TouchX Mouse Simulation Using Gesture on a Virtual Screen}} % except the center     \fancyfoot[R]{\thepage}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     }          \pagestyle{fancy}     \lhead{Chapter \thechapter}     \renewcommand{\chaptermark}[1]{%      \markboth{#1}{}}           \fancyfoot[LO,LE]{\emph{TouchX Mouse Simulation Using Gesture on a Virtual Screen}}     \cfoot{}     \fancyfoot[RO, RE]{\thepage}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     %For the header and footer Over          % Altering the Index Page Title     %\renewcommand{\contentsname}{\begin{center}\textsc{University Of Pune \\2011 - 2012}\\[1cm]Index\end{center}}                %GLOBAL SETTINGS OVER, DOCUMENT BEGINS     \begin{document}          %Renames "Bibliography" to "References" on ref page     \renewcommand\bibname{References}                     %TABLE OF CONTENTS AND LIST OF FIGURES ARE AUTOMATICALLY ADDED BY FOLLOWING COMMANDS     %ADD FIGURE OF TABLES IF YOU NEED TO, CHECK DOCUMENTATION     \pagenumbering{roman} %numbering before main content starts               %To reset the Header & Footer for TOC and LOF     \pagestyle{empty}     \addtocontents{toc}{\protect\thispagestyle{empty}}     \tableofcontents % adds Index Page          %\pagestyle{empty}          \addtocontents{lof}{\protect\thispagestyle{empty}}     \listoffigures % adds List of Figures     \addtocontents{lot}{\protect\thispagestyle{empty}}     \listoftables     \cleardoublepage          %And reset back the settings we choose for Header and Footer     \pagestyle{fancy}          \newpage     \pagenumbering{arabic} %reset numbering to normal for the main content          \input{project/introduction.tex} % adds the introduction page     \input{project/ref.tex} % adds the References page          \end{document}      and the `ref.tex` file is               \addcontentsline{toc}{chapter}{References}     \begin{thebibliography}{99}          \bibitem{short_paper_name}Mario Ganzeboom ,\emph{How hand gestures are recognized using a dataglove};  University of Twente,The Netherlands,2010.     \bibitem{short_paper_name}Ye Zhou,Gerald Morrison,\emph{A Real-time Algorithm for Finger Detection in a Camera Based Finger-Friendly Interactive Board System}; 5th International Conference on Computer Vision Systems, Applied Computer Science Group, Bielefeld University, Germany,2007.          \end{thebibliography}


title: Can I prevent a package from redefining a command?

text: I like to use runes and letters from other non-standard alphabets as mathematical symbols. However, now the `allrunes` package is interfering with my other mathematical typesetting. Take this minimal example:               \documentclass{article}     \usepackage{allrunes}          \begin{document}     $\bar{x}$     \end{document}      I get these error messages:               LaTeX Warning: Command \bar invalid in math mode on input line 6.          ! LaTeX Error: Command \bar unavailable in encoding OT1.      I think that the problem lies in `allrunes.sty`, which redefines the `\bar` command:               \newcommand{\DeclareRuneSeparators}[1]{%       [..]       \DeclareTextSymbol{\bar}{#1}{33}        % !       [..]     } % end of newcommand{\DeclareRuneSeparators}      **Is there a way to prevent`allrunes` from redefining `\bar`, so that I can still use it as the usual math symbol? Or any other way of recovering the functionality of `\bar`?** The exact same happens not just for `\bar`, but also for `\dot`.


title: How to reduce horizontal ruler's width to the width of the document text in fancyhdr?

text: I use `fancyhdr` to customize my footer. But this code:               \pagestyle{fancy}     \fancyhf{} % sets both header and footer to nothing     \lfoot{From: K. Grant}     \rfoot{\thepage}     \renewcommand{\footrulewidth}{0.4pt}      adds TWO rulers (top and bottom) with the width that is equal to the page width. I would like to reduce the width of the bottom ruler to the width of the main text and remove the top ruler. Plus, I would like the width of the text below the bottom ruler to be the same as the width of the main text. How to do this? **UPDATE** : I forgot to mention that I also use geometry package to adjust page margins. Maybe this is the source of the problem? **UPDATE**               \documentclass[12pt]{article}          \usepackage[utf8]{inputenc}     \usepackage{longtable}     \usepackage[top=2cm, bottom=2cm, left=1.5, right=1cm]{geometry}     \usepackage{fancyhdr}     \pagestyle{fancy}               \fancyhf{} % sets both header and footer to nothing     \lfoot{Page \thepage}     \rfoot{some text}     \renewcommand{\footrulewidth}{0.4pt}     \renewcommand{\headrulewidth}{0pt}          \begin{document}          SOME TEXT SOME TEXT SOME TEXT SOME TEXT       SOME LOOOOONG TABLE          \end{document}


title: Move table to the left / change left margin of particular frame

text: I'm trying to move my table to the left with no success. I found `\hspace`, but it seem to not work. Here is my slide:               \begin{frame}          \frametitle{Test slide}     \vspace{-0.4cm}     \hspace{-1cm}     \begin{tabular}[t]{p{5.4cm}p{5.8cm}}     \vspace{0pt} \includegraphics[scale=0.25]{eleanor_scriven_2429776k.jpg} &     \begin{enumerate}[<+->]     \item This is test text This is test text      \item This is test text This is test text      \item This is test text This is test text      \item This is test text This is test text      \item This is test text This is test text      \end{enumerate}     \end{tabular}          \end{frame}


title: Centering equations within alignat command

text: I want to centre the formula inside the equals. So far I have               \begin{alignat*}{2}         v_2(16)&=\frac{2}{5}[v_3(32)+v_3(8)] &&= 0, \\     v_2(4)&=\frac{2}{5}[v_3(8)+v_3(2)] &&= 1.20,\\        v_2(1)&=\frac{2}{5}[v_3(2)+v_3(0.50)] &&= 3.     \end{alignat*}      Basically I have                A =BBB = CC           A =B   = CCCC      but I want                A = BBB = CC           A =  B  =CCCC


title: Setting up TexMaker on Ubuntu "biblatex.sty not found."

text: **--UPDATE--** I've installed biblatex via the command "sudo apt-get install biblatex". However I now get a partially generated pdf like this:![enter image description here](http://i.stack.imgur.com/nUP0L.png) instead of the desired output of: ![enter image description here](http://i.stack.imgur.com/FGbBD.png) **--UPDATE--** I've found TexMaker very easy and helpful with the pdf file it generated whenever you pressed the "Quick Build" button. Sadly when I started writing slightly more complicated scripts (my current Tex document) that required biblatex for references whenever I clicked on the "Quick Build" button I get the following error: > ! LaTeX Error: File `biblatex.sty' not found. Instead to build my pdf I need to type the following in the command line:               pdflatex test.tex     biber test     pdflatex test.tex      A similar question was asked here but I really don't want to use a script each time I need to compile my Tex document. My echo $PATH is "/usr/local/texlive/2012/bin/x86_64-linux:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" and here is the current configuration of TexMaker ![TexMaker commands](http://i.stack.imgur.com/oeXIr.png) ![TexMaker Quick Build](http://i.stack.imgur.com/sUjLp.png)


title: Automatic subsection enumeration

text: For our math lectures I have been hard-coding paragraphs like               \paragraph*{Definition 1.1.1 (foo)}     \paragraph*{Example 1.1.2}     \paragraph*{Proposition 1.1.3}      and I want to create new commands like `\definition`, `\lemma`, `\theorem`, ... which create such paragraphs and handle the numbering. Every command is nested in a subsection, if you need to know. Any specific idea what would be the best?


title: Resetting newtheorem counter

text: This one is probably straightforward, but I'm not missing something with the newtheorem environment and using newcounter. I would like a new environment on its own counter like "Environment M.1", but I get "Environment M.0.1" in the following.               \documentclass{article}          \newcounter{mycounter}     \renewcommand{\themycounter}{M.\arabic{mycounter}}     \newtheorem{myenv}{Environment}[mycounter]          \begin{document}          \begin{myenv}[Some Stuff]     Here are some comments.     \end{myenv}          \end{document}


title: Thick and patterned arrows

text: I am trying to get an arrow that is thick but not entirely black but has a pattern (e.g., crosshatch). I am not sure how to get this. I have the following that still gives me a black arrow:                  \documentclass[landscape]{scrartcl}                   \usepackage{tikz}        \usetikzlibrary{shapes,shapes.multipart,shapes.geometric,fit,positioning,arrows,matrix,decorations.pathreplacing,patterns}             \begin{document}             \begin{tikzpicture}        \tikzset{        bigbigbox/.style = {minimum width=3.5cm, rectangle},        bigbox/.style = {draw, rectangle},        box/.style = {minimum width=2.7cm, rounded corners,rectangle, fill=blue!20},        square/.style = {minimum width=15mm,minimum height=15mm}        }             \node[square,draw,text width=1.5cm,align=center] (a1) {Map Tasks};        \node[square,draw,right of=a1,xshift=20mm,text width=1.5cm,align=center] (a2) {Mapper Input Cache};        \node[square,draw,below of=a1,yshift=-15mm,text width=1.5cm,align=center] (a3) {Reduce Tasks};        \node[square,draw,below of=a2,yshift=-15mm,text width=1.5cm,align=center] (a4) {Check Fixed Point};             \draw[-triangle 90, line width=1mm, black,pattern=crosshatch,postaction=        {draw=black,pattern=crosshatch, line width=3mm, shorten >=0.2cm, -}] (a2.west) -- (a1.east);             \node[bigbox] [fit = (a1) (a4)] (box1){};        \end{tikzpicture}        \end{document}      Here is what I get: ![enter image description here](http://i.stack.imgur.com/3dS1O.png)


title: Adding a signature on an online job application

text: Nowadays many job applications are sent in digital form as PDF. We use of course LaTeX to create such. Usually you add a cover letter to your CV and credentials. If you sent this as print-out by classic mail you sign this letter (at least in Germany), but what (and how) do you do for an online application? I would say either:   1. leave it empty   2. add your name in the usual font as normal text   3. add your real signature as scanned image   4. add your name in a special font so that it look more like a signature (but you can still see that it isn't a real one) I'm planning to go with the last method and I'm looking for suitable fonts for it which I can use with PDFLaTeX (XeLaTeX and LuaLaTeX answers are fine too, but will be taken as non-competitive). I would also be happy to get some style guidelines if I should not got with an other method (with a rationale to avoid subjective opinions). * * * I already had a look at Good Style of Creating a Signature all within LaTeX which is similar but still too different. I don't need or want any rule and the shown font in the accepted answer are looking too real.


title: Figure caption as name for digital signature

text: I use a image as my signature in a letter and I want my name directly underneath it. so far, I have successfully changed the Figure caption by using               \renewcommand{\figurename}{}%To avouid Figure or Fig      Which results in : ![1](http://i.stack.imgur.com/E6A7P.png) Question: How can I align it directly below the image and avoid the "1:" and just have my name.


title: Macro that maps a number to pifont ding character

text: With `pifont`, the darkened circled number starts from 182. ![enter image description here](http://i.stack.imgur.com/98aA3.png) I made a macro that maps `\dcircle{1}` to `\ding{182}` as follows.               \newcommand{\dcircle}[1]{\ding{181 + #1}}      However, `\dcircle{1}` returns the characters that I don't expect: ![enter image description here](http://i.stack.imgur.com/IbfzP.png) What might be wrong?


title: Biblatex: \textcite style in footnotes

text: I would like to use the `\textcite` style: "Author (year, pages)" in the `\footcite` as well. I could do `\footnote{\textcite}`, but I was wondering if it would be possible to change the `\footcite` to work in the `\textcite` format, or better, using `\autocite` (so I can switch between in-line and footnote). **EDIT** This a working example:               \documentclass[a4paper,12pt]{article}          \usepackage[hyperref=true,natbib=true,style=authortitle,     citestyle=authoryear,sorting=nyt,     autocite=footnote,     %autocite=inline,     %citestyle=authoryear-ibid,  %% Eventually will use this     backend=biber]{biblatex}          \listfiles     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}          @book{Smith96,     author = {Amith, Adam},     year = {1996},     title = {Economy},     publisher = {My company}      }          \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          This is a textcite \textcite[96]{Smith96} and this is the textcite in a footnote\footnote{\textcite[128]{Smith96}}.          This is a footcite \footcite[300-320]{Smith96} and this an autocite \autocite[98-34]{Smith96}          \printbibliography     \end{document}      The result with standard autocite=inline: ![enter image description here](http://i.stack.imgur.com/EvsIS.png) The result with autocite=footnote: ![enter image description here](http://i.stack.imgur.com/ujA2S.png) I would like footnote and autocite in the same format as textcite: Author (year, pages) Thank you!


title: Unknown graphic extension and file not found in beamer

text: The header of my file is the following:               \documentclass[xcolor=x11names,compress]{beamer}          \usepackage{times,amsmath,amsfonts,psfrag}     \usepackage{latexsym,amssymb,float,stfloats,multirow,subfigure}     \usepackage{graphicx,subfigure,epsfig,color}     \usepackage{tikz}     \usepackage{xcolor}     %\usepackage[pdftex]{graphicx}     %\usepackage{sidecap}     \usepackage{cite}      and I'm including the figures as follows:               \begin{figure}[h]      \centering \epsfig{file=mainfigure,scale=.62} %\caption{Cognitive Radio Pair}     \label{fig:CR_pair}     \end{figure}      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               \begin{columns}         \begin{column}{2.6in}          \begin{itemize}     \small     \item[$\bullet$] $\underbrace{\text{At each step of sequential estimation}}_{\underbrace{\text{\small CR pair decisions}}_{{\text{\small \textcolor[rgb]{1.00,0.00,0.00}{1. Terminate}\qquad} \underbrace{\text{\textcolor[rgb]{0.00,0.50,0.00}{2. Continue}}}_{\textcolor[rgb]{0.00,0.50,0.00}{\bigg\Downarrow \qquad \qquad \bigg\Downarrow}}}}}$\\       \qquad \qquad \quad \textcolor[rgb]{0.00,0.50,0.00}{Same channel\qquad Switch}         \end{itemize}       %\end{block}         \end{column}         \begin{column}{2.5in}         %\begin{block}{}     % Your image included here     %\begin{figure}         \centering \includegraphics[trim = 10mm 25mm 10mm 10mm, clip=true, width=1\textwidth]{mat-model-new3.eps}%\caption{Risk versus cost}     %\end{figure}     %\begin{center}     %\end{center}     %\begin{figure}[th]     % \epsfig{file=risk_vs_c_snr_-10db_0db_alpha0-15.eps,scale=.41} \caption{Risk vs cost SNR=0,-10 dB}     %\label{fig:risk_vs_c}     %\end{figure}         %\end{block}         \end{column}       \end{columns}      then when I hit texify I get these two following errors: > File mainfigure not found and > Unknown graphics extension .eps FYI, I tried to install all the related package in Miktex packages manager but still doesn't work. Any help please?!!!!


title: How to label a TiKz shape for referencing its legend in the caption

text: How can I label a TiKz line style for further referencing in figure caption. For `\addplot` the label just follows it. However, I don't know how to do it for `\draw`. MWE:               \documentclass{book}     \usepackage{lipsum}     \usepackage{caption}     \usepackage{pgfplots}     \pgfplotsset{compat=1.3}     \tikzset{pointille/.style={dash pattern = on 2pt off 2pt on 6pt off 2pt}}     \tikzset{points/.style={dash pattern = on 1pt off 1pt}}     \tikzset{tirets/.style={dash pattern = on 5pt off 5pt}}          \begin{document}     \lipsum[1]     \begin{figure}[!ht]     \centering     \captionsetup{width=9.5cm}     \pgfplotsset{every axis plot post/.append style={mark=none,line width=1.5pt}}     \begin{tikzpicture}     \begin{axis}[height=7cm,width=9cm,grid=major,xlabel=$x$,ylabel=$f(x)$,     tick label style={font=\footnotesize},label style={font=\small},max space between ticks=45, major tick length=0cm,minor tick length=0cm,enlargelimits=false,]     \addplot[tirets,color=blue]{2*x};\label{p4}     \addplot[pointille,color=green]{0.5*x*x};\label{p5}     \addplot[points,color=red]{-0.125*x*x*x};\label{p6}     \end{axis}          \draw [dashed,red,thick] (1,1) rectangle (2,2); \label{p7}     \draw [solid,blue,thick] (1,1)-- (2,2); \label{p8}     \end{tikzpicture}     \caption[Caption in ToC]{This is a plot about colored curves: $f(x)=2 x$ (\ref{p4}),  $f(x)=0.5 x^2$ (\ref{p5}), and $f(x)=-0.125 x^3$ (\ref{p6}), (\ref{p7}), and (\ref{p8})}     \end{figure}     \lipsum[1]     \end{document}      ![enter image description here](http://i.stack.imgur.com/ZHzVF.png)


title: How to get error messages from pdflatex tool (specially running from php)

text: I am executing pdflatex from php script and it gives me very long list of log entries mixed with errors e.g                system('/usr/texbin/pdflatex    -output-directory=./temp/tex '.$tex_output  . "   1> /dev/null  ",$firstRun);       log output Is it possible to get errors or warnings only (may be using logs files it generates ) ?


title: How to "cleanly" update TeXworks under MikTeX 2.9

text: A while ago I was struggling to obtain TeXworks working correctly with MikTeX 2.9.4521-x64 under Windows 7-x64; and after a marathon I managed to correctly match the appropriate extensions with the registry (it seemed all was going to be fine). But, looking up on the main site of the editor, I found that a new version was released, and since I like to have programs with recent fixes I decided to apply for an even _exchange_ ; i.e. _I wanted my TeXworks distribution simply and clearly replaced by the newest one inside the appropriate folder_. The comment of @karlkoeller is a valid help to get my first step done; but I have still some worries about installing a new version. _Where exactly has to be put in order to have the same folder structure as before?_ **Disclaimer:** The below statements are based on personal deductions, so they may be lacking of accuracy/preciseness. With a little explaining, I learnt that not one folder of TeXworks is placed inside my OS; so the main distribution of this program (installed using MikTeX `setup.exe`), when removed, is called by the whatever-folders it may be stored in to be deleted (and the registry cleared). _End of deductions._ The main problem is that I do not know how this behaviour is like when I try to install a brand new/separated version of this program (I don't think that a reverse logic would apply). So what are the steps to follow?


title: Central Composite Design with tikz

text: I'm trying to make the followng Central Composite Design with tikz. * * * **Desired Result** * * * ![enter image description here](http://i.stack.imgur.com/a2kc5.jpg) My MWE with output is: * * * **Code** * * *               \documentclass[tikz]{standalone}     \usepackage{tikz}           \usetikzlibrary{calc}            \begin{document}         \begin{tikzpicture}[scale=4,fill opacity=0.4,thick,                             line cap=round,line join=round]         %% Define coordinate labels.         % t(op) and b(ottom) layers         \path \foreach \layer/\direction in {b/{0,0,0},t/{0,1,0}} {             (\direction)             \foreach \point/\label in {{0,0,0}/ll,{1,0,0}/lr,{1,0,-1}/ur,{0,0,-1}/ul} {                 +(\point) coordinate (\layer\label)             }             ($(\layer ll)!0.5!(\layer ur)$) coordinate (\layer md)         };              % Put text next to the labels as requested.         % Funilly enough we need to set fill opacity to 1.              % Draw left cube.         \fill (0, 0,-1) circle (0.5pt);              \foreach \direction in {(0,0,1),(0,1,0),(1,0,0)} {             \draw[dashed,black] (bul) -- + \direction;         }         \draw (bll) -- (blr) -- (tlr) -- (tll) -- cycle;         \draw (blr) -- (bur) -- (tur) -- (tlr) -- cycle;         \draw (tll) -- (tlr) -- (tur) -- (tul) -- cycle;         \foreach \point in {bul, bll, blr, bur, tll, tlr, tul, tur} {             \fill[fill opacity=1] (\point) circle (0.75pt);         }          \draw (1.5, 0, -1) -- (0, 0,-2);              \end{tikzpicture}     \end{document}      * * * ## **Output** ![enter image description here](http://i.stack.imgur.com/mPaDZ.png) I've difficulty in drawing vertices. Any help will be highly appreciate. Thanks in advance.


title: can I use changes package to highlight added environments, say, itemize?

text: I am using `changes` package to track modifications to a LaTeX documents, but found simply wrapping `\begin{itemize}\end{itemize}` with `\added` command doesn't work. It works fine if I wrap the contents of each `itemize` separately.


title: How can I shrink a path to the center?

text: I'm not quite sure if I formulated the title correctly. I would like to get a result similar to the hand-drawn graph and I got the right one: ![](http://i.stack.imgur.com/E7GyX.png) ![](http://i.stack.imgur.com/wv6Bz.png) Here is the code:               \documentclass{article}     \usepackage[pdftex,active,tightpage]{preview}     \setlength\PreviewBorder{2mm}          \usepackage{xcolor}     \definecolor{pink}{HTML}{FF00FF}     \definecolor{purple}{HTML}{800080}          \usepackage{tikz}     \usetikzlibrary{arrows,positioning, calc,lindenmayersystems,decorations.pathmorphing}      \tikzstyle{vertex}=[draw,fill=black,circle,minimum size=10pt,inner sep=0pt]     \tikzstyle{selected edge} = [draw,line width=5pt,-,red!50]     \tikzstyle{markedCircle}=[line width=1pt,rotate=90,decorate,decoration={snake, segment length=2mm, amplitude=0.4mm}]          \begin{document}     \pgfdeclarelayer{background}     \pgfsetlayers{background,main}          \begin{preview}     \begin{tikzpicture}  [scale=1.2]       \node (a)[vertex] at (3,1) {a};       \node (b)[vertex] at (5.5,2.5) {b};       \node (c)[vertex] at (0.5,3) {c};       \node (d)[vertex] at (3.5,4.5) {d};       \node (e)[vertex] at (6,5.5) {e};       \node (f)[vertex] at (0,6.5) {f};       \node (g)[vertex] at (3,7) {g};       \node (h)[vertex] at (4.5,7.5) {h};       \node (i)[vertex] at (6,7.5) {i};       \node (j)[vertex] at (1.5,8.5) {j};       \node (k)[vertex] at (4,9) {k};            \foreach \from/\to in {a/b,a/b,b/d,b/e,c/f,d/f,d/g,f/g,g/h,h/e,h/i,e/i,f/j,g/j,j/k,k/h,k/i}         \draw[line width=2pt] (\from) -- (\to);            \begin{pgfonlayer}{background}         \draw (a.center) edge[selected edge] (c.center);         \draw (c.center) edge[selected edge] (f.center);         \draw (f.center) edge[selected edge] (g.center);         \draw (g.center) edge[selected edge] (j.center);         \draw (g.center) edge[selected edge] (h.center);         \draw (h.center) edge[selected edge] (k.center);         \draw (g.center) edge[selected edge] (d.center);         \draw (d.center) edge[selected edge] (b.center);         \draw (h.center) edge[selected edge] (i.center);         \draw (h.center) edge[selected edge] (e.center);       \end{pgfonlayer}            % Can those be shrinked?       \draw[color=black!80, markedCircle] (a) -- (c) -- (f) -- (g) -- (d) -- (b) -- (a);       \draw[color=purple,   markedCircle, fill=purple!10] (f) -- (g) -- (d) -- (f);       \draw[color=red,      markedCircle] (b) -- (d) -- (g) -- (h) -- (e) -- (b);       \draw[color=yellow,   markedCircle] (g) -- (h) -- (k) -- (j) -- (g);       \draw[color=pink,     markedCircle] (f) -- (g) -- (j) -- (f);       \draw[color=pink,     markedCircle] (f) -- (g) -- (j) -- (f);       \draw[color=orange,   markedCircle] (h) -- (k) -- (i) -- (h);       \draw[color=blue,     markedCircle] (h) -- (i) -- (e) -- (h);     \end{tikzpicture}     \end{preview}     \end{document}      I don't know how to make two (or three) things:   * shrink the areas to the center so that the lines don't overlap   * write the numbers in the center of the area   * (perhaps find a more random solution - one that looks more like handwriting - for drawing the lines than snake) (The current sources are on GitHub. I will include the solution there, as soon as it is available.)


title: accessing other lua libraries in lualatex (MiKTeX)

text: I would like to access the other lua libraries e.g. luagraph in lualatex. If use:               require("luagraph")      I get a complaint about permission denied, which as far as I could determine relates to different libraries used in compiling the software, MSVC80 and others. Is there a way to get past this?


title: Gummi with glossaries

text: I would like to know if and how I can integrate glossaries, or specifically makeglossaries, into Gummi? Any help is greatly appreciated!


title: Putting normal letters in between Greek ones

text: So I am trying to write out Gauss' law for gravitation and I am having a hard time figuring out how to write it out without an error. I am currently trying to write in an equation block               4\piG\rho\delta      but obviously TeX is picking up on the fact that I have `\piG` and not `\pi`. I can delineate between the two by adding a `\ ` to space them out but that looks funky in the equation. Any help is appreciated.


title: BibLaTex custom style - header

text: I am a LaTeX noob and am stuck on how to modify a `biblatex` style. I tried playing around with an existing style but I have a hard time following in which files all the sub-macros are hidden. My bib needs to look as follows: > **Last1 / Last2 Year**   >  (tab)Last1, First_initial1; Last2, First_initial2: Title. Publication, > Location, Date. I started editing an existing desing and it currently looks as follows: > **Last1, First1 and First2 Last2 Year**   >  (tab)Last1, First1 and First2 Last2. Title. Publication. Can anyone help me where I need to look in the varous bbx, cbx and def files to make my bibliography look right? * * * EDIT               \ProvidesFile{newstyle_bib.bbx}[\abx@bbxid $Id: standard.bbx,v 0.9a 2010/03/19 19:52:15 $] \newtoggle{bbx:isbn}     \newtoggle{bbx:url}     \newtoggle{bbx:doi}     \newtoggle{bbx:eprint}     \DeclareBibliographyOption{isbn}[true]{%       \settoggle{bbx:isbn}{#1}}     \DeclareBibliographyOption{url}[true]{%        \settoggle{bbx:url}{#1}}      \DeclareBibliographyOption{doi}[true]{%      \settoggle{bbx:doi}{#1}}      \DeclareBibliographyOption{eprint}[true]{%       \settoggle{bbx:eprint}{#1}}      \ExecuteBibliographyOptions{isbn,url,doi,eprint}     %%%%%%%%%%%%%%%      \DeclareBibliographyDriver{book}{%       \usebibmacro{author_head}      \indent %      \bf\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}      \printnames{author}%       \newunit\newblock      \printfield{title}%       \newunit\newblock      \printlist{publisher}%      \newunit       \printlist{location}%       \newunit       \printfield{year}%       \finentry       \newline}           %%%%%%%%%%%%%%%      %%%%%%%%%%%%%%%      \DeclareBibliographyDriver{article}{%      \usebibmacro{author_head}      \indent %      \bf\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}       \printnames{author}% \newunit\newblock


title: Cross Referencing not referring bibliography in elsarticle

text: I am working on a paper for Elsevier, but the cross reference is not referring to bibliography , as it appear disabled . My code is here               \documentclass[preprint,3p,twocolumn]{elsarticle}               \usepackage{lineno}              \usepackage{pifont}     \usepackage{natbib}     \usepackage{graphicx}     %\usepackage{cite}     \usepackage[nodots,nocompress]{numcompress}     \usepackage{setspace}               \journal{Computer Networks}               \begin{document}          \begin{frontmatter}                    \title{Wireless Sensor Networks Routing: Key Challenges and Open Issues}               \author[a]{Palvinder Singh Mann\corref{cor1}}     \ead{psmaan@hotmail.com}     \author[b]{Satvir Singh}     \ead{satvir15@gmail.com}     \cortext[cor1]{Corresponding author.Tel.:+91-9888395367 fax:+91-0181-2205852}          \address[a]{Department of Information Technology, DAV Institute of Engineering and Technology, Jalandhar,Punjab,India.144008.}     \address[b]{Department of Electronics and Communication Engineering, Saheed Bhagat Singh State Technical Campus, Ferozepur, Punjab, India.152004.}          \begin{abstract}     Wireless sensor networks (WSNs) enable new applications and require non-conventional paradigms for protocol design. Owing to the requirements for self-organization, scalability and primarily low energy consumption needs, a proper balance between communication and data processing capabilities must be maintained. This motivates a huge effort in research activities and investments on this field for past few years. At present most of the research on WSNs has concentrated on the design of energy and computationally efficient algorithms and routing protocols with application domain restricted to simple data-oriented monitoring. In this paper, we presented a comprehensive analysis on WSNs routing with key challenges for development of protocol designs. At last we discussed some open issues for future directions in WSNs for research contributions.     \end{abstract}          \begin{keyword}     Wireless sensor networks, self-organization, scalability, routing protocols               \end{keyword}          \end{frontmatter}          \linenumbers          %% main text          \section{Introduction}               Wireless Sensor Networks (WSNs) contain self-configured, distributed, autonomous and resource empowered sensor nodes that monitor physical or environmental activities, such as humidity, temperature, sound, vibration or pollutants in a specific area of operation\cite{akkaya2005survey}. Sensor nodes \cite{abbasi2007survey}cooperatively \cite{al2004routing}pass their sensed data through the wireless\cite{bi2010ant} network to a main location, known as sink or base station where the data can be monitored and analyzsed for decision making.               \subsection{Subsection One}                    \subsection{Subsection Two}                    \section{References}               \bibliographystyle{model1-num-names}     \bibliography{Ref}                         \end{document}


title: Polar plots 1st quadrant

text: I'm trying to plot some polar vectors using PSTricks but I'm not able to only plot the first quadrant of a polar plot. This is my current trivial code:               \begin{figure}[hbtp]     \begin{pspicture}(-5,-5)(5,5)     \SpecialCoor       \psaxes[axesstyle=polar,xAxisLabel=some,subticklinestyle=dashed, subticks=2](5,5)     \psline[linecolor=red, linewidth=2pt]{->}(0,0)(5;15)     \psline[linecolor=red, linewidth=2pt]{->}(0,0)(2;40)     \end{pspicture}     \end{figure}      Are there some additional parameters I need to pass or it would be better to use another approach to achieve the same result? ![enter image description here](http://i.stack.imgur.com/sbkUI.jpg)


title: Mathematical handwriting worksheets

text: Similar to Handwriting Drill Sheets question; however, I need it to work in math mode. The problem is that my students don't seem to understand the location and spacing when writing their home work. Mostly because their language has a radically different spacinig. For example:                  $\log_2^{4^{2x}}$       Instead of                $\log_2 4^{2x}$       I would like to have some worksheets of various equations so they can practice the proper spacing and write neater, and to save my time grading their homework. I have tried the examples listed, but the math mode spacing was way off. Also, none of the \setfont commands worked for me. all the fonts were not found.               \documentclass[12pt]{article}           % necessary packages      \usepackage{tikz}           % set the font      \usepackage{fontspec}      \setmainfont{Zapfino}% from http://www.fontsquirrel.com/           % help length to store width of text      \newlength{\lengthoftext}             % increase baseline skip      \usepackage{setspace}     \setstretch{4}           % define height of lowercase letters     \newcommand{\lowercaseheight}{1ex}     % define height of uppercase letters     \newcommand{\uppercaseheight}{2ex}     % define depth of descenders     \newcommand{\descenderdepth}{-2.2ex}     % you may add more values here and then us them in the {tikzpicture}     % to add more line to your grid               % package to have a "every line" hook     \usepackage{lineno}          \newenvironment{drillsheet}{%     % let the "line numbers" start directly at the text     \setlength\linenumbersep{0pt}%     % let the "line numbers" be the grid     \renewcommand{\thelinenumber}{%         \begin{tikzpicture}[overlay]                 % baseline                 \draw [ultra thick] ((0,0) -- ++(\textwidth,0);                 % lowercase height                 \draw ((0,\lowercaseheight) -- ++(\textwidth,0);                 % uppercase height                 \draw [thick] (0,\uppercaseheight) -- ++(\textwidth,0);                 % descender depth                 \draw (0,\descenderdepth) -- ++(\textwidth,0);         \end{tikzpicture}%     }%     % the font and color of the numbers must be set explicitly     \renewcommand\linenumberfont{\normalfont\color{black}}     % start "line numbering", i.e. the grid     \begin{linenumbers}%         % set text color to gray         \color{black!25}%     }{     % end "numbering", i.e. the grid     \end{linenumbers}%     }          \begin{document}     \Large     \begin{drillsheet}      $\log_2 2^{2x}$       $\int_{i+1}^{\infty} e^{2x}\,dx$          \end{drillsheet}     \end{document}


title: TeXcount counting \multicolumn

text: When using TeXcount on the following MWE \multicolumn macro is counted as a word and I get: > Words in text: 6 What can I do to avoid this behavior and get the correct word count?               \documentclass{article}          %TC:group table 0 1     %TC:group tabular 1 1          %TC:macro \specialcell [0,text]               \newcommand{\specialcell}[3][c]{%         \begin{tabular}[#1]{@{}#2@{}}#3\end{tabular}}          \begin{document}               \begin{table}         \begin{tabular}{lr}             \multicolumn{2}{c}{word1 word2} \\             word3 & \specialcell[t]{l}{word4\\word5} \\         \end{tabular}     \end{table}               \end{document}


title: Horizontal alignment in Tikz node

text: How can I get the three elements on each line to space out appropriately to the end of the box??               \documentclass{article}     \usepackage{catchfile,tikz}     \usepackage{filecontents}% http://ctan.org/pkg/filecontents     \usepackage{silence}% http://ctan.org/pkg/silence     \usepackage{tikz}     \usepackage{eurosym}     \usepackage{tikz}     \usepackage{amsmath}     \usetikzlibrary{trees,shapes,intersections,calc,matrix,fit,backgrounds}          \begin{document}     \resizebox{1.0\textwidth}{!}{     \begin{tikzpicture}[scale=0.5, grow=right, sloped,dot/.style={circle,fill,inner sep=0.5pt}]     \tikzstyle{level 1}=[level distance=08cm, sibling distance=3.5cm]          \node(A)[] {N=1000}     child {node[text opacity=100, align=center,draw=black!100, text width=155] {     (-50\%) \\      N=100 \euro4.88$\mu$ (1.96) \\     N=1000 \euro5.66$\mu$ (1.96)     }     edge from parent node[below] {}     };          \end{tikzpicture}     }     \end{document}


title: What's the best way to embed Visio diagrams?

text: I was wondering if there is an easier (and better) way of embedding Visio diagrams into a LaTeX document. As far as I know there a two ways:   1. Save Visio Diagram as PNG and use `\includegraphics`   2. Save Visio Diagram as SVG and convert it via Inkscape to a PDF and include the PDF No. 1 has the big downside that the graphics are not scalable without producing artefacts. No. 2 has an unfavourable work-flow.


title: Drawing a LISP expression as a tree

text: Somewhat inspired by How to automatically draw tree diagram of prime factorization with LaTeX? and mostly motivated by laziness, I'd like to be able to draw a tree defined by LISP syntax for a class I'll be TA'ing next semester. For those who don't know, LISP is a programming language (the second oldest, in fact) that specifies programs directly as trees:               (defun count (a l &optional c)       (if l                                      ;; if l is not empty [()===nil]           (count a                               ;; return the number of a's in the cdr                  (cdr l)                  (+ (if c c 0)                   ;; add c (if it wasn't given, start with 0)                     (if (equal a (car l)) 1 0))) ;; and 1 or 0, if a==l[0]         c))                                      ;; otherwise, return the count      Given the `(if ...)` sequence, I'd like it to come up with something like this:               \documentclass{article}     \usepackage{tikz}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength{\PreviewBorder}{10pt}%     \usetikzlibrary{arrows}          \begin{document}     \begin{tikzpicture}[->,>=stealth',level/.style={sibling distance = 10cm/#1,       level distance = 1.5cm}]      \node  {if}         child{ node {l} }         child{ node {count}                 child{ node {a} }                 child{ node {cdr}                         child{node {l}}}                 child{ node {+}                                 child{ node {if}                                     child { node {c} }                                     child { node {c} }                                     child { node {0} }}                                 child{ node {if}                                     child { node {equal}                                         child {node {a}}                                         child {node {car}                                             child { node {l}}}}                                     child { node {1}}                                     child { node {0}}}}}     ;      \end{tikzpicture}     \end{document}      Obviously the style is whatever looks best, but I'd like the macro to avoid the crossings that my example is a victim of. ![enter image description here](http://i.stack.imgur.com/UwKqb.png) My best guesses are to make `(` and `)` active somehow, but I don't have the TeXnical experience to define such macros off-hand.


title: Typeset just the first letter in a group

text: How can I typeset (print) just the first letter of a group of text? For instance, how does `biblatex` or `bibtex` determine the first initials of a name? MWE to get started:               \documentclass[]{article}          \begin{document}          This prints \firstinit{just the first letter}.          My hero is \firstinit{John} \firstinit{Paul} Jones.          \end{document}


title: Using latexindent from vi?

text: I would like to use `latexindent` from the `vi` editor. Ideally, I would use it just like one uses `fmt`. Recall that in `vi` you can filter any portion of your text through an external filter. So, one could type `!}fmt` and upon hitting return, the current paragraph is formatted as if it was text. Similarly, you can type `!}sort -u` to sort a list, removing any duplicates, etc. Ideally, one could write `!}latexindet -someflags` to LaTeX format the current paragraph. Benefits of this workflow are being able to quickly undo the changes by simply hitting `u`, and the ability to apply indentation at a finer grain. I will wait a little, before posting my answer to this problem.


title: Generate plain text from bibtex file and bst style

text: I have two files:   * entries.bib - file with bibtex formatted entries,   * nature.bst - file with bibliography style Is there a way to generate plain text citations from these files using command line tools?


title: Making custom templates for texmaker

text: I typically use TeXShop as my editor, and like being able to quickly access custom templates when I create a new document. I'm going to be teaching a student of mine how to use LaTeX, but he can't use TeXShop. He uses ubuntu, and installed texmaker (we wanted an editor that I could easily install on my Mac so I could play around with it and help him troubleshoot). I've taught a few students how to use LaTeX, and find that one effective way to do this is for them to start from a very basic template, then build a custom preamble that includes some useful packages (e.g., showing them how to install hyperref both gives them a useful package and shows them how to install packages). I also show them how to save this as their own custom template, helping them see how to customize their editor (typically TeXShop). This gives them confidence to play around and use the editor. **Here's my primary question** : is there a way to create templates for texmaker? I can't see one, but perhaps I'm missing something. The closest I've gotten is creating a "texmaker template" folder and using the "New by copying an existing file". Maybe it's just a matter of getting used to it, but I don't find it as elegant or intuitive a solution. **Follow up question** : are there other editors you might recommend we use? As I said, I'm a TeXShop user, but find most editors work just fine. I'm looking for something that we can both run (he's a ubuntu user), so when he emails me with questions I can use the same editor in case it's not a coding error.


title: Linebreaks after bib items for Bibstyle (using BibLaTeX)

text: I am currently suffering of a strange bibstyle problem with line breaks. There is a missing space between bib items in the bibliography, which is generated using BibLaTeX. ![enter image description here](http://i.stack.imgur.com/XvcLS.png) Even though I am using the authoryear bibstyle, I do not get the line breaks after each bib item.               \usepackage[citestyle=authoryear,bibstyle=authoryear,url=false,doi=true,natbib=true,backend=bibtex]{biblatex}     \renewcommand{\nameyeardelim}{ }%     \renewcommand{\multicitedelim}{, }%     \DefineBibliographyStrings{ngerman}{andothers={et\addabbrvspace al\adddot}}               \renewcommand{\cite}{\citep}%     \addbibresource{/home/robert/Documents/franzi/diss/Literatur/library.bib}      Is there any possibility to adjust the space after each bib item with a dedicated biblatex parameter? I have searched through the manual but was not finding something useful.


title: Change the chapter font in TOC without using "tocloft" package

text: As using `tocloft` in `book` class produces some unexpected _side-effect_ , I wonder how to change the chapter font (e.g. 1 Introduction) as sans serif without using any other packages? For example, change the highlighted text to `sans serif font`. MWE:               \documentclass{book}     \usepackage[UKenglish]{babel}     \usepackage{color}     \usepackage[lining ]{libertine}     \usepackage[ T1 ]{fontenc}          \definecolor{DarkBlue}{RGB}{0,51,153}     \usepackage[ ]{titlesec}      \titleformat{\chapter}[display]          {\LARGE \color{DarkBlue}}       {\vspace{-1 em} \flushright   \normalsize \color{black}  \MakeUppercase{  \bfseries \sffamily  \chaptertitlename } \hspace{1 em}  { \fontsize{70}{70}\selectfont \color{black} \sffamily \thechapter }} {20 pt} { \bfseries \sffamily \LARGE}              \titleformat{\section} {\Large \bfseries \sffamily \color{DarkBlue}}     {\thesection}{1 em}{}     \titleformat{\subsection}  {\large \bfseries \sffamily  \color{DarkBlue}}      {\thesubsection}{1 em}{}     \titleformat{\subsubsection}  {\normalsize \sffamily  \bfseries      \color{DarkBlue}}  {\thesubsubsection}{1 em}{}  %\slshape     \setcounter{tocdepth}{3}   % table of content depth     \setcounter{secnumdepth}{3}          \usepackage{lipsum}          \begin{document}          \frontmatter     \tableofcontents     \chapter{Preface}          \lipsum[1-3]     \mainmatter     \chapter{Introduction}     \section{Foo}     \lipsum[1-12]     \chapter{How to make nuclear bomb}     \section{Equations}     \lipsum[1-12]     \backmatter     \chapter{Appendix~A}     \lipsum[1-12]     \chapter{Appendix~B}     \lipsum[1-12]     \end{document}      ![enter image description here](http://i.stack.imgur.com/BC4q1.png)


title: Automatically connect nodes without overlapping other nodes or connections

text: In making a tree diagram with TikZ. Say that I've got the following nodes               \node(a) {\(A\)};     \node(b1) at ($(a)+(4,1)$){\(B_1\)};     \node(b2) at ($(b1)+(0,-1)$){\(B_2\)};     \node(c) at ($(b1)+(1,-0.9)$){\(C\)};     \node(d) at ($(c)+(2,0)$){\(D\)};     \node(e) at ($(d)+(1,0.5)$){\(E\)};      and that I want to draw the following connections   * `(a)` to `(b1)`   * `(a)` to `(b2)`   * `(b1)` to `(d)`   * `(b2)` to `(e)` but I want no or as few connections as possible to overlap another node or another connection ( _without_ changing the placement of the nodes). If I draw straight lines between the nodes               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          \begin{tikzpicture}     \node(a) {\(A\)};     \node(b1) at ($(a)+(4,1)$){\(B_1\)};     \node(b2) at ($(b1)+(0,-1)$){\(B_2\)};     \node(c) at ($(b1)+(1,-0.9)$){\(C\)};     \node(d) at ($(c)+(2,0)$){\(D\)};     \node(e) at ($(d)+(1,0.5)$){\(E\)};     \draw[->] (a) to (b1);     \draw[->] (a) to (b2);     \draw[->] (b1) to (d);     \draw[->,red] (b2) to (e);          \end{tikzpicture}          \end{document}      I end up with an overlap of _C_ and an overlap of the line _B₁_ and _D_ (the red line): ![Straight lines between nodes overlaps another node and another line](http://i.stack.imgur.com/oWMdF.png) Also, if I make the lines somewhat curved               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          \begin{tikzpicture}     \node(a) {\(A\)};     \node(b1) at ($(a)+(4,1)$){\(B_1\)};     \node(b2) at ($(b1)+(0,-1)$){\(B_2\)};     \node(c) at ($(b1)+(1,-0.9)$){\(C\)};     \node(d) at ($(c)+(2,0)$){\(D\)};     \node(e) at ($(d)+(1,0.5)$){\(E\)};     \draw[->] (a) to[out=20,in=180] (b1);     \draw[->] (a) to[out=0,in=180] (b2);     \draw[->] (b1) to[out=0,in=160] (d);     \draw[->,red] (b2) to[out=0,in=180] (e);     \draw[->,red,dashed] (b2) to[out=-40,in=240] (e);          \end{tikzpicture}          \end{document}      I get the same kind of overlap: ![Curved lines between nodes overlaps another node and another line](http://i.stack.imgur.com/7vjc5.png) What I'm after is a result like the dashed red line that don't overlap anything _but without_ having to manually set what angles the lines should enter and exit nodes from. In short, is there a way to avoid overlaps of nodes and other lines except for manually changing angles for lines, i.e. can I tell TikZ to avoid drawing over other nodes and lines and draw around them instead?


title: An issue when using TeXnicCenter Alpha and Adobe Reader 10

text: I use TeXnicCenter Alpha, DDE control TeXnicCenter, MikteX 2.7, Adobe Reader 10, and Windows 7. Whenever I build, the log file reads "`undefined !control sequence`" and whenever I output the file, the Adobe Reader will pop up, but the document is not shown, and when I close the Adobe Reader, then TeXnicCenter will not respond. How can I fix this?


title: How to set the title of a book in the References in an upright font shape

text: I am trying to set the book title style to plain in `namedplus.bst` but don't seem to be able to. Currently this is what I have               FUNCTION {format.btitle}     { title emphasize     }      and replacing it with the following code from another style file that gives plain text format for the title gives me error messages               FUNCTION {format.btitle}     { title "title" bibinfo.check       duplicate$ empty$ 'skip$         {         }       if$     }      error message: the literal stack isn't empty for entry could you please help me with this?


title: How to top align some text with a logo in titlingpage (memoir)?

text: Here is a MWE of my problem:               \documentclass[article, openany, a4paper]{memoir}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english]{babel}     \usepackage{graphicx}     \usepackage{mwe}     \usepackage{lmodern}          \makepagestyle{mytitlestyle}     \makeevenhead{mytitlestyle}{\scshape University of Copenhagen}{}{\includegraphics[width=0.2\textwidth]{example-image-a}}     \makeoddhead{mytitlestyle}{\scshape University of Copenhagen}{}{\includegraphics[width=0.2\textwidth]{example-image-a}}     \makeevenfoot{mytitlestyle}{}{}{}     \makeoddfoot{mytitlestyle}{}{}{}          \title{My Thesis}          \begin{document}          \begin{titlingpage}     \aliaspagestyle{titlingpage}{mytitlestyle}          \begin{center}     \Huge\bfseries\sffamily\thetitle     \end{center}          \end{titlingpage}          \end{document}      By default the header contents appear bottom aligned. The logo is supposed to be bigger than the "University of Copenhagen" text and should be top aligned.


title: Latex \newcommand with python code inside

text: I'm extremely new to Latex. I'm using python package to insert graphics in a loop. What I can not understand is how I can transform this code               \documentclass{article}     \usepackage{python}          \begin{document}          \begin{figure}     \centering     \begin{python}     import os     print r"\fbox{bla bla}"     \end{python}     \end{figure}          \end{document}       into something like               \documentclass{article}     \usepackage{python}          \newcommand\insPython[1]{     {     \begin{figure}     \centering     \begin{python}     import os     print r"#1"     \end{python}     \end{figure}     }          \begin{document}          \insPython{bla bla}          \end{document}       The second version does not work. Is there any way to wrap a Python code into a Latex command?


title: How to add global hyphenation rules?

text: I know about discretionary hyphens, `\\-`, about `\allowbreak`, `\nobreak` as well as `\hyphenation{...}` and even `\tracingparagraphs=1` to write hyphenations into the log-file. Those are OK for family names or quite rare tecnical terms, but from time to time LaTeX makes hyphenation mistakes which I would like to prevent for all documents on my PC. Is there a configuration file where I can add hyphenation for all TeX documents? As a second thought: is there someone to whom to apply for adding/changing hyphenation rules for TeX globally? For example "determined" broken into "determ-ined" by Tex instead of "deter- mined" ("de-termined" would also be possible). (Might have been corrected by some update, which my distribution does not include yet, but surely there are some words left.) There is               % File: ukhyphen.tex     % TeX hyphenation patterns for UK English [NOT TO BE CHANGED IN ANY WAY!]     ...     \hyphenation{ % Do NOT make any alterations to this list! --- DW      ...     }      which probably would do the job (at least locally for my PC), but I get the vague impression that the autors do not want me to change that file, and if there ever would be an update of the file, my hyphenations would be lost.               \documentclass[british]{article}     \usepackage[british]{babel}     \usepackage{hyphenat}     \hyphenation{he-lio-trope opos-sum}     \tracingparagraphs=1     \begin{document}     \pagenumbering{arabic}     \selectlanguage{british}     \allowhyphens          Ms Miller-\allowbreak Smith ba\-la\-clava {\nobreak areca}      electromagnetic\hyp{}endioscopy heliotrope opossum.          \end{document}


title: How to do something like "inner sep west"? -- specify inner sep on just only one side

text: I'm wondering how to create a node with TikZ which has different inner separations/padding on each side. Imagine something like this:               \node [inner xsep=10pt, draw=blue, very thick, rectangle] (box) {Some Text in here};     \node [fill=blue, text=white] at (box.west) {\MySymbol}      Now, the problem is that the text is too close to my symbol -- simply increasing "inner xsep" is not a good idea, because it would look awkward on the left side of the text node. Any hints on how to increase the padding of the right side of the box?


title: Drawing a graphic image with LaTeX for an e-book using Markdown

text: How can I draw the picture below with LaTeX? I will be using it in an e-book using Markdown. Thanks. ![enter image description here](http://i.stack.imgur.com/uY1r2.jpg)


title: Altering Date Format in References

text: I am still working on formatting my references according to my department’s standard. I am currently trying to alter a date format but failing. I need:               30. Sept. 2003.      Yet anything I do doesn’t seem to have any influence. Find attached a MWE:               \documentclass[a4paper,12pt]{article}     \usepackage{xpatch}     \usepackage{polyglossia}     \setmainlanguage[variant=british]{english}     \usepackage{fontspec,xltxtra,xunicode}     \usepackage{csquotes}     \usepackage{url}     \usepackage[style=authoryear-ibid,backend=biber,doi=false,isbn=false,url=false,autolang=hyphen]{biblatex}          \addbibresource{Merkliste.bib}          \renewcommand*{\postnotedelim}{\addcolon\space}          \renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}         \renewcommand*{\intitlepunct}{\addspace}          \renewcommand{\bibpagespunct}{\ifentrytype{incollection}{\addperiod\addspace}{\addcolon\addspace}}          \DeclareFieldFormat       [online]       {url}{{#1}}     \DeclareFieldFormat       [online]       {title}{\mkbibquote{#1\isdot}}     \xpatchbibmacro{title}{\printfield[titlecase]{subtitle}}%     {\printfield[titlecase]{subtitle}\ifentrytype{online}{\addperiod}{}}%     {}{}%     \DeclareFieldFormat{urldate}{#1}     \DeclareFieldFormat{postnote}{#1}     \DeclareFieldFormat{multipostnote}{#1}     \DeclareFieldFormat{pages}{#1}     %% Here are my tries.     \xpatchbibmacro{url+urldate}{\printfield{urlyear}\mkbibmonth{\thefield{urlmonth}}{\thefield{urlday}}}{}{}         \xpatchbibmacro{date+extrayear}{%       \printtext[parens]%     }{%       \setunit*{\addperiod\space}%       \printtext%     }{}{}          \xpatchbibmacro{title}{\printfield[titlecase]{subtitle}}%     {\printfield[titlecase]{subtitle}\ifentrytype{article}{\addperiod}{}}%     {}{}%          \AtEveryBibitem{\clearlist{language}} % clears language     \AtEveryBibitem{\clearfield{note}}    % clears notes     \AtEveryBibitem{\clearfield{series}}   % clears Series     \AtEveryBibitem{\ifentrytype{book}{\clearfield{number}}{}}     \AtEveryBibitem{\ifentrytype{book}{\clearfield{pages}}{}}          \begin{document}     \nocite{*}.      \printbibliography     \end{document}      and a .bib-extract:               ![@online{secretariat_a_la_politique_linguistique_quebec_dynamique_2014,         Author = {{Secr{\'e}tariat {\`a} la politique linguistique Qu{\'e}bec}},         Date-Modified = {2014-08-03 17:01:54 +0000},         File = {Dynamique des langues en quelques chiffres \: Tableaux - Secr{\'e}tariat {\`a} la politique linguistique.pdf:/Users/Moritz/Desktop/Dynamique des langues en quelques chiffres \: Tableaux - Secr{\'e}tariat {\`a} la politique linguistique.pdf:application/pdf},         Month = jul,         Title = {La dynamique des langues en quelques chiffres : Tableaux},         Urldate = {2014-07-28},         Year = {2014}}][1]      ![Here’s my not-perfect output](http://i.stack.imgur.com/Zj2Dj.png)


title: big formula with description

text: It is possible to make the following thing, helping you Latex...? ![big formula](http://i.stack.imgur.com/pzq7O.jpg)


title: font bbm5.pfb for Bakoma Tex

text: I am currently using a Bakoma Tex. I tried to install the "bbm5.pfb" font but the file is corrupted. Can some help me where can we find the said font?


title: Warning in you code

text: On this page: Neural Network representation I took neural network drawing but i have an error on that:               \foreach \i in {1,2,3,4,5,6,7,8,9}{         \foreach \j in {1,2,3,4,5,6,7,8}{             \path[normal arrow,Cyan, draw opacity=0.2] (nx\i) -- (cl1n\j);         }     }        * _cl1n_ is like not declared or defined can you help me?


title: Create a two column static small box

text: how can I create a new command to make a static true and false as labels of the first and two columns. This columns are lanes of small boxes. This small boxes would depend on the questions created. If there are four questions created then the command will provide four rows with two small boxes.This is an example of what i am saying. ![two column box](http://i.stack.imgur.com/BhzZU.png) what I actually visualize in coding the .tex file for with the command ## Code \question This is a sample short text. \twoboxes i am still thinking if this can be right..


title: TeXnicCenter and Jabref - refreshing database?

text: After adding a new reference with JabRef, I need to close and restart TeXnicCenter before the entries in the literature database menu of TeXnicCenter get updated. Isn't there a button for refreshing the literature database, so I will see my changes right away? I also asked on latex-community


title: Long Squiggly Arrows in LaTeX

text: Is there some way for me to get long squiggly arrows of length comparable to `\longrightarrow` or `\longmapsto` in `LaTeX`?


title: Design elements

text: Do you know some programs or templates or tips to help me with design elements of a math workbook? For a simple exemple, see picture below and for more I'll show you 2 exemple:   1. http://www.amazon.com/Thomas-Calculus-Early-Transcendentals-Edition/dp/0321884078   2. http://www.amazon.com/Calculus-Its-Applications-10th-Edition/dp/0321694333/ref=pd_sim_b_10?ie=UTF8&refRID=1Q1S89E37NQENWTWFSDD ![counter design](http://i.stack.imgur.com/0jdGo.jpg)