title: How to remove parentheses when I refer to some lemma or proposition

text: I have the following TeX document:               \documentclass[12pt,a4paper]{article}     \usepackage[left=19mm,right=19mm,top=20mm,bottom=22mm]{geometry}     \usepackage{makeidx, graphicx, amsmath, amsthm, amssymb, ae}     \setcounter{MaxMatrixCols}{20}     \setlength{\textheight}{260mm}     \setlength{\textwidth}{170mm}     \usepackage[T1]{fontenc}          \newtheoremstyle{italiktekst} %name       {5mm}    %Space above, empty = `usual value'       {0mm}    %Space below       {\itshape}   %Body font       {}           %Indent amount (empty = no indent, \parindent = para indent)       {\bfseries}   %Thm head font       {}      %Punctuation after thm head       {\newline}   %Space after thm head: \newline = linebreak       {}       %Thm head spec          \theoremstyle{italiktekst}     \swapnumbers     \newtheorem{theorem}{Theorem}[section]     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{problem}[theorem]{Problem}          \renewcommand{\thesection}{\arabic{section}.}     \renewcommand{\thetheorem}{(\thesection\arabic{theorem})}          \setcounter{page}{5}     \begin{document}     \setcounter{section}{-1}     \raggedright          \section{\rm Perron-Frobenius theorem}          \begin{lemma}     \hspace*{5mm}     \label{U_Ainvariant_UT_Ainvariant}     Let $\langle \cdot, \cdot\rangle$ be the standard inner product for ...     \end{lemma}          \vspace*{5mm}     \textbf{\textit{Proof:}}     Recall that for a subspace $\mathcal{U}$ is said to be ...     \hfill{$\square$}\\          \begin{lemma}     \hspace*{5mm}     \label{columns_independent_AP_PD}     Consider arbitrary rectangular matrix $P$ of order       $m\times n$ in which columns are linearly independent.     The column space ...     \end{lemma}          \vspace*{5mm}     \textbf{\textit{Proof:}} Denote by $\mathcal{M}$ column       space ...     \hfill{$\square$}\\          ...          \vspace*{5mm}     Recall that, from Lemma \ref{U_Ainvariant_UT_Ainvariant} we have...          \vspace*{5mm}...in Lemma \ref{columns_independent_AP_PD} we have shown that...          \end{document}      Result for this code is following: ![enter image description here](http://i.stack.imgur.com/Wt50k.jpg) What bothers me is how to remove the parentheses when I refer to some lemma or proposition (see picture below) ![enter image description here](http://i.stack.imgur.com/s2J8x.jpg) Does anyone have any idea?


title: hyperlink on equation number

text: I would like to link an equation to a sentence at the end of the document (e.g. code below) but placing the hyperlink on the equation number and not on the equation itself? Is it possible? THanks for your help.               \begin{equation}       \hyperlink {label1} {        uWiT = min( TDec_{y-1} , TJan_{y} , TFeb_{y} )}     \end{equation}               ...          ...          \hypertarget{label1}{Equation minimum temperature}


title: Problem with citation multiple authors

text: I need to cite a paper with multiple authors:               @article{DBLP:journals/tit/HammonsKCSS94,         author    = {A. Roger Jr. Hammons  and                    P. Vijay Kumar and                    A. Robert Calderbank and                    Neil J. A. Sloane and                    Patrick Sol{\'e}},         title     = {The Z$_{\mbox{4}}$-linearity of Kerdock, Preparata, Goethals,                    and related codes},         journal   = {IEEE Transactions on Information Theory},         volume    = {40},         number    = {2},         year      = {1994},         pages     = {301-319},         ee        = {http://dx.doi.org/10.1109/18.312154},         bibsource = {DBLP, http://dblp.uni-trier.de}       }      But when I made the citation it appears as `[HKC+94]` and I want to be `[HKCSS94]`. can anyone help me?


title: Trim axis left in style

text: Why`trim axis left` doesn't work in style command ?               \documentclass{article}              \usepackage{tikz,pgfplots}              \pgfplotsset{%             compat=newest,             axeseul/.style={%             tick style={thin,black},             axis x line = center,   % rien en y                  axis y line = none,     % sans axe y             ymin=0,ymax=0,          % sinon problème             xmin=0,xmax=1,          % le plus fréquent             trim axis left,         % pour l'alignement à gauche des axes                                     % page 317 pgfplots doc             }}               \begin{document}          \begin{tikzpicture}     \begin{axis}[axeseul,xmin=-3,xmax=2]     \end{axis}     \end{tikzpicture}              \pgfplotsset{%             tick style={thin,black},             axis x line = center,   % rien en y                  axis y line = none,     % sans axe y             ymin=0,ymax=0,          % sinon problème             xmin=0,xmax=1,          % le plus fréquent             trim axis left,         % pour l'alignement à gauche des axes                                     % page 317 pgfplots doc             }          \begin{tikzpicture}     \begin{axis}[xmin=-3,xmax=2]     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/jPVZ9.png)


title: Horizontal waterfall chart with labels for each bar

text: I've looked through similar questions here and here, but I'm still stuck. Basically what I'm trying to achieve is this plus bar labels: ![enter image description here](http://i.stack.imgur.com/wefPn.png) I have two problems: 1) My code sucks. Right now the y-axis labels and the waterfall connectors are placed manually, which is suboptimal since I'll be making 15 or so versions of the chart. 2) I can't get the bar labels to show up in the right place. I've used Jake's Centered Nodes Near Coords solution before (can't find the reference stack exchange question at the moment), but for some reason they refuse to go in the proper place in this example. Any suggestions on how to improve this / make the labels work would be greatly appreciated. [EDIT] I really need an answer using PGFplots, please. This needs a quick turnaround and I don't have time to learn a different .cvs to latex implementation. MWE:               \documentclass{article}     \usepackage{pgfplots, pgfplotstable}     \usepackage{filecontents}          \pgfdeclareplotmark{waterfall bridge}{\pgfpathmoveto{\pgfpoint{0pt}{33pt}}\pgfpathlineto{\pgfpoint{0pt}{9pt}}\pgfusepathqstroke}     \pgfdeclareplotmark{waterfall bridge 2}{\pgfpathmoveto{\pgfpoint{0pt}{19pt}}\pgfpathlineto{\pgfpoint{0pt}{-5pt}}\pgfusepathqstroke}     \pgfdeclareplotmark{waterfall bridge 3}{\pgfpathmoveto{\pgfpoint{0pt}{5pt}}\pgfpathlineto{\pgfpoint{0pt}{-19pt}}\pgfusepathqstroke}     \pgfdeclareplotmark{waterfall bridge 4}{\pgfpathmoveto{\pgfpoint{0pt}{-9pt}}\pgfpathlineto{\pgfpoint{0pt}{-33pt}}\pgfusepathqstroke}     %~~ALL OF THE MARK POSITIONING IS UGLY~~     % I would like them to use relative, rather than absolute, positioning          \begin{filecontents}{datatable.csv}     2 3 2 -6 -3     \end{filecontents}          \makeatletter     \pgfplotsset{         calculate xoffset/.code={             \pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed}             \pgfmathsetmacro\labelshift{(\pgfplotspointmeta*10^\pgfplots@data@scale@trafo@EXPONENT@x)/2)*\pgfplots@x@veclength)}             \pgfkeys{/pgf/fpu=false}             },         nodes near coords horizontally centered/.style={             every node near coord/.append style={                 /pgfplots/calculate xoffset,                 xshift=-\labelshift,yshift=-.25pt                 },             nodes near coords align=center         }     }     \makeatother          \begin{document}     \begin{tikzpicture}     \begin{axis}[             xbar stacked,             point meta=explicit,             nodes near coords horizontally centered, %~~THIS ISN'T WORKING~~             bar width=10pt,             axis x line*=bottom,             axis on top=true,             ytick style={opacity=0},            yticklabel style={font=\small, text width=2cm, align=center},            x axis line style={opacity=0},            y axis line style={opacity=0},             y dir=reverse,             ytick={-.35,-.175,0,.175,.35}, %~~THIS IS UGLY!~~             yticklabels={                     label1,label2,label3,label4,label5                 },         ]           \addplot[             fill=cyan,             draw=none,             bar shift=28pt,             mark options={                 lightgray,                 thick,             },             mark=waterfall bridge,           ] table [y expr=\coordindex, x index=0, meta index=0] {datatable.csv};           \addplot[             fill=orange,             draw=none,             bar shift=14pt,             mark options={                 lightgray,                 thick,             },             mark=waterfall bridge 2,           ] table [y expr=\coordindex, x index=1, meta index=1] {datatable.csv};           \addplot[             fill=blue,             draw=none,             bar shift=0pt,             mark options={                 lightgray,                 thick,             },             mark=waterfall bridge 3,           ] table [y expr=\coordindex, x index=2, meta index=2] {datatable.csv};           \addplot[             fill=red,             draw=none,             bar shift=-14pt,             mark options={                 lightgray,                 thick,             },             mark=waterfall bridge 4,           ] table [y expr=\coordindex, x index=3, meta index=3] {datatable.csv};           \addplot[             fill=yellow,             draw=none,             bar shift=-28pt,           ] table [y expr=\coordindex, x index=4, meta index=4] {datatable.csv};         \draw[ultra thin,lightgray] (axis cs:0,\pgfkeysvalueof{/pgfplots/ymin}) -- (axis cs:0,\pgfkeysvalueof{/pgfplots/ymax}); % adds x=0 line     \end{axis}     \end{tikzpicture}               \end{document}


title: Tikz edge label position

text: Is there a way to set the location of the position of edge label when using the tikz graph package? I attempted to look for samples of this being done in the manual, but was unable to find any (closest I got was in 19.6 where it shows how to set some options for individual edges). Is this possible? **Edit:** more specifically, I am looking for a way to put the label above or below the edge. **Edit to add MWE:**               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{graphdrawing,positioning,graphs}     \usegdlibrary{layered, trees}     \begin{document}     \begin{tikzpicture}         \begin{graph}          {1->[edge label=hello]2};         \end{graph}     \end{tikzpicture}          \end{document}


title: Fancy Styled Borders in LaTeX

text: How to draw attractive Borders in LaTeX. A Sample image like this: ![enter image description here](http://i.stack.imgur.com/qttvR.jpg)


title: Why is the text in these table column cells not centered?

text: I have the following table in my document, and it seems to be OK except that the topmost columns' text is not centered. I can't figure out why not. I could manually adjust the multicolumn `m` sizes to get there, but that does not seem like the right solution. I have a similar table in my document and the centering works fine. This is all within a 2 column IEEE-type document. I thought maybe my table was too wide and something weird was happening - but making the table less wide does not solve the problem (although it _does_ make the text off center in different ways). My entire table is centered on the page; I tried taking that out and leaving it left justified and that had no effect. ![messed up table](http://i.stack.imgur.com/Ami6B.png) The TeX that generates this table is:               \begin{table*}        \centering        \caption{Results on Xilinx Virtex 5 Devices}        \label{tab:XilinxResults}        \begin{tabular}{|m{3cm}|m{1.50cm}|m{1.50cm}|m{1.30cm}|m{1.30cm}|m{1.30cm}|m{1.30cm}|m{1.30cm}|m{1.30cm}|}           \cline{2-9}           \multicolumn{1}{>{\centering}m{3.0cm}|}{ } &  % blank box           \multicolumn{2}{>{\centering}m{3.0cm}|}{\bfseries Clock Frequency (MHz)} &           \multicolumn{2}{>{\centering}m{2.6cm}|}{\bfseries Throughput (Mbit/s)} &           \multicolumn{2}{>{\centering}m{2.6cm}|}{\bfseries Area (CLB Slices)} &           \multicolumn{2}{>{\centering}m{2.6cm}|}{\bfseries Throughput / Area} \tabularnewline \hline           \multicolumn{1}{|>{\centering}m{3cm}|}{\bfseries Architecture} &           \multicolumn{1}{>{\centering}m{1.50cm}|}{\bfseries 512-bit} &           \multicolumn{1}{>{\centering}m{1.50cm}|}{\bfseries 256-bit} &           \multicolumn{1}{>{\centering}m{1.30cm}|}{\bfseries 512-bit} &           \multicolumn{1}{>{\centering}m{1.30cm}|}{\bfseries 256-bit} &           \multicolumn{1}{>{\centering}m{1.30cm}|}{\bfseries 512-bit} &           \multicolumn{1}{>{\centering}m{1.30cm}|}{\bfseries 256-bit} &           \multicolumn{1}{>{\centering}m{1.30cm}|}{\bfseries 512-bit} &           \multicolumn{1}{>{\centering}m{1.30cm}|}{\bfseries 256-bit}           \tabularnewline\hline\hline                \bfseries BMW x1 &           \raggedleft 4.89 & \raggedleft 8.14 & \raggedleft 5004  & \raggedleft 4168 &           \raggedleft 12039 & \raggedleft 6164 & \raggedleft 0.42 & \raggedleft 0.68 \tabularnewline \hline           \bfseries BMW x1-PPL18 &           \raggedleft 46.51 & \raggedleft 70.97 & \raggedleft 47628  & \raggedleft 36335 &           \raggedleft 24564 & \raggedleft 11610 & \raggedleft 1.84 & \raggedleft 2.96 \tabularnewline \hline           \bfseries BMW /32(h) &                                                                                \raggedleft 44.27 & \raggedleft 69.41 & \raggedleft 1416  & \raggedleft 1110 &                                       \raggedleft 4001 & \raggedleft 2211 & \raggedleft 0.35 & \raggedleft 0.50 \tabularnewline \hline                     \bfseries CubeHash x1 &                                                                                \raggedleft 152.70 & \raggedleft 151.93 & \raggedleft 2443  & \raggedleft 2430 &                                     \raggedleft 745 & \raggedleft 672 & \raggedleft 3.28 & \raggedleft 3.62 \tabularnewline \hline                       \bfseries CubeHash x1-PAR5 &                                                                                \raggedleft 151.26 & \raggedleft 151.56 & \raggedleft 12101 & \raggedleft 12125 &                                    \raggedleft 3742 & \raggedleft 3490 & \raggedleft 3.23 & \raggedleft 3.47 \tabularnewline \hline                     \bfseries CubeHash x1-PAR17 &                                                                                \raggedleft N/A & \raggedleft 150.49 & \raggedleft N/A & \raggedleft 40933 &                                         \raggedleft N/A & \raggedleft 11360 & \raggedleft N/A & \raggedleft 1.91 \tabularnewline \hline                      \bfseries CubeHash x1-PAR33 &                                                                                \raggedleft 150.65 & \raggedleft N/A & \raggedleft 79542 & \raggedleft N/A &                                         \raggedleft 24570 & \raggedleft N/A & \raggedleft 3.24 & \raggedleft N/A \tabularnewline \hline                      \bfseries CubeHash /2(h) &                                                                                \raggedleft 173.52 & \raggedleft 184.71 & \raggedleft 1388 & \raggedleft 1477 &                                      \raggedleft 733 & \raggedleft 624 & \raggedleft 1.89 & \raggedleft 2.37 \tabularnewline \hline                              \end{tabular}                                                                                \end{table*}


title: biblatex Binary on MacTex 2011 Is Missing

text: I recently upgraded from MacTex 2009 to MacTex 2011. Before installing 2011, I carefully followed the instructions for uninstalling 2009 that were given here. After installing 2011, I ran `sudo tlmgr update --all` Then, I tried to test the installation by compiling an old paper that I had written using Xetex and BibLaTeX. This is when I noticed that there was no BibLaTeX binary installed on my system. So, I tried `tlmgr show biblatex`, which reported that the package was indeed installed on my system. I also tried `texdoc biblatex`, which also brought up the BibLaTeX manual. Finally, I tried `tlmgr search --file biblatex`. This showed that a number of files were installed with the biblatex package, but, curiously enough, no binary file. My next step was to try to uninstall and reinstall the biblatex package by running `sudo tlmgr remove --force biblatex` and `sudo tlmgr install biblatex` After this, I tried `tlmgr show biblatex`, `texdoc biblatex`, and `tlmgr search --file biblatex`, as before, with exactly the same results. So, my question is: Where is the biblatex binary? How do I process my biblatex files now? Any help that anyone can give would be greatly appeaciated!


title: How to add a copyright notice footer to only the first page of a document?

text: I have a conference paper that requires me to enter a copyright notice to only the first page of the document. I know that I can use `fancyhdr` to add this. I added the following to my document:               \usepackage{fancyhdr}     \lfoot{This is the copyright notice} %The footer needs to be left aligned      I have downloaded the `fancyhdr` style file and added it to the directory. But in the pdf output the footer does not show. Also after I make it to work it needs to be on the first page only. **Edit** : Full code below:               %% LyX 2.1.0 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[conference]{IEEEtran}     \usepackage[latin9]{inputenc}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{fancyhdr}     \lfoot{This is the copyright notice}     \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.          %% bare_conf.tex     %% V1.3     %% 2007/01/11     %% by Michael Shell     %% See:     %% http://www.michaelshell.org/     %% for current contact information.     %%     %% This is a skeleton file demonstrating the use of IEEEtran.cls     %% (requires IEEEtran.cls version 1.7 or later) with an IEEE conference paper.     %%     %% Support sites:     %% http://www.michaelshell.org/tex/ieeetran/     %% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/     %% and     %% http://www.ieee.org/     % correct bad hyphenation here     \hyphenation{op-tical net-works semi-conduc-tor}          \@ifundefined{showcaptionsetup}{}{%      \PassOptionsToPackage{caption=false}{subfig}}     \usepackage{subfig}     \makeatother          \begin{document}     % paper title% can use linebreaks \\ within to get better formatting as desired     \title{Title here}          \begin{author}     \author{\author{\IEEEauthorblockN{FK\IEEEauthorrefmark{1}, A A\IEEEauthorrefmark{1}, F K\IEEEauthorrefmark{1},  Ri\IEEEauthorrefmark{1} and Sd\IEEEauthorrefmark{2}} \IEEEauthorblockA{\IEEEauthorrefmark{1}School of Computing, Engineering and Information Sciences, .\\ Email: \{**, **, **i, **\}@dept.comk \IEEEauthorblockA{\IEEEauthorrefmark{2}Department of Computer Science and Engineering, ***\\ Email: **@g.com}}}}     \end{author}     \maketitle     \author{\IEEEauthorblockN{FK\IEEEauthorrefmark{1}, AA\IEEEauthorrefmark{1}, FF\IEEEauthorrefmark{1},  Ri\IEEEauthorrefmark{1} and Sd\IEEEauthorrefmark{2}} \IEEEauthorblockA{\IEEEauthorrefmark{1}School of Computing, Engineering and Information Sciences**.\\ Email: \{**, **, **, **\}@*** \IEEEauthorblockA{\IEEEauthorrefmark{2}Department of Computer Science and Engineering, ***\\ Email: ***}}}     \begin{abstract}     Abstract here     \end{abstract}          \section{Introduction}     Introduction here          \section{Proposed Method}     Method explained here          \section{Conclusion}     Conclusion here          \bibliographystyle{IEEEtran}     \bibliography{SS_bibtex}               % that's all folks     \end{document}


title: *** glibc detected *** error from texmaker in tikzpicture environment

text: I am facing a very strange problem. Texmaker quits with an error under a very specific condition, which has nothing to do with compilation, but rather what I type. Say for a minimal working example, I start typing               \documentclass[]{article}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}[      If I now try to type `domain` I get to `do`, pressing `m` or any other character exits Texmaker with the following: `*** glibc detected *** texmaker: free(): invalid next size (fast): 0x0000000002d67de0 ***` There are a lot more lines to it. Including these libraries: `libc.so.6`, `ibQtGui.so.4`, `libQtCore.so.4`, `libglib-2.0.so.0` I don't recall having had this problem before and it seems to be a problem with the interface (Qt) I guess. I believe this will also work with other latex environments, not just `tikzpicture`, but haven't found any yet. Using `\begin{tikzpicture}` makes the following lines appear orange. Typing `do` appears in blue as would `for`. It seems Texmaker recognizes that a code is to follow, or something of the sort. But it does not crash when typing `for`. I am honestly lost as to how to fix this. Any ideas? I am using: Linux Mint 13 Maya MATE, Texmaker 3.2, Texlive 2012 Also: This only happens if `do` are the first characters on a new line. Full error output here **UPDATE** : The problem seems to be version specific. I installed Texmaker 3.3 and do not face this problem any more. I have also installed Texmaker 3.2 on another Linux machine and face the same error.


title: PNG not loading with TeXworks

text: I get this error when trying to load .png file I import               \usepackage[pdftex]{graphicx}     \graphicspath{ {C:\Users\Daniel\Desktop\projectfigures} }          \begin{document}     \includegraphics[width=2.5cm]{definitiongraphexample.png}          \end{document}      The problem is I get this error               ! Undefined control sequence.          \reserved@b ->C:\Users                             \Daniel \Desktop \projectfigures      l.423 ...[width=2.5cm]{definitiongraphexample.png}      I can't seem to load it. I've tried to load include{path} and that didn't work. So I'm now trying to graphicspath What am I doing wrong? `\usepackage[pdftex]{graphicsx}` doesn't get an error and it doesn't say to download it so I don't know why this isn't working.


title: Jabref, fixing abbreviation for field

text: I'm using Jabref to manage referrences. I want to abbreviate **pages** to **pp.** or skip word ( **pages** ). %---- BibTeXsource --------------% Inproceedings               @INPROCEEDINGS{Talaya2004,       author = {Talaya, J. and Alamús, R. and Bosch, E. and Kornus, W},       title = {Integration of a Terrestrial Laser Scanner with GPS/IMU Orientation         Sensors},       booktitle = {The International Archives of the Photogrammetry, Remote Sensing         and Spatial Information Sciences 35 (Part B7)},       year = {2004},       pages = {990-995},       owner = {Say},       timestamp = {2013.09.07}     }      % my Question.tex                   \documentclass[12pt,twoside]{report}% Use this line for the print version of the thesis         \usepackage{natbib}              \begin{document}              %%%%%%%%%%%%% begin Bibliography %%%%%%%%%%%%%%%%%         \citet{Talaya2004}\\                   \bibliographystyle{apalike}              \bibliography{References}              \end{document}      output:               Talaya, J., Alams, R., Bosch, E., and Kornus, W. (2004). Integration of           a terrestrial laser scanner with gps/imu orientation sensors. In The In-          ternational Archives of the Photogrammetry, Remote Sensing and Spatial        Information Sciences 35 (Part B7), pages  990-995.         Here **pages** is appearing. How can I skip **pages** or customize pages to pp..


title: Why does \parskip add space after section headings inconsistently?

text: There are already several questions dealing with the extra vertical space after section headings that result from setting `\parskip` to a non-zero value. Here, I just want to understand _why_ extra space is added before normal paragraphs but not before lists. (I think this is a legitimate question and not a duplicate.) As it can be seen in the picture below, there is extra space when the section starts with some text: ![No parskip \(left\) vs parskip \(right\), paragraph](http://i.stack.imgur.com/UuFGM.png) Yet no extra space when the section starts with an itemize: ![No parskip \(left\) vs parskip \(right\), itemize](http://i.stack.imgur.com/XCdkN.png) Here is the code I used:               \documentclass[11pt]{article}          \parskip=\smallskipamount          \usepackage{enumitem}          \newlist{compactlist}{itemize}{3}     \setlist[compactlist]{%       label=\enskip\textbullet,       partopsep=0pt,       topsep=0pt,       parsep=0pt,     }          \usepackage{blindtext}          \begin{document}     \section{Parskip}     %% \blindtext     \begin{compactlist}       \item \blindtext     \end{compactlist}          \end{document}


title: How do I put a wide figure on the top of the first page of a two-column paper?

text: I'd like my academic paper to have a page-width-spanning figure right underneath the title. How do I do this? Whenever I try using `\begin{figure*}...\end{figure*}` with the figure at the start of my paper, it always pushes it to the second page, no matter what combination of `h, t, !` arguments I put. To be clear, I want something like this: figure span to one column on double column page but I want my figure to be at the top of the FIRST page underneath the title. Does anyone have a minimum working example? My document begins like this: `\begin{document} \maketitle ... `


title: Fast access to bibliography reference key without browsing .bib file

text: I have an article linked with a `very_big.bib` file. To cite any reference in the article, I use `\citet{reference_key}`. However, to get the reference key I need to search `very_big.bib` file, which is not very time-efficent solution. I know that some TeX editors, like TeXstudio, have code completion option, that gives you a suggestions for the reference keys. But I'm using Latexian editor, which doesn't have this option (although it has neat code completion for other things). So I'm wondering whether you use other solutions then code completion for fast access to `very_big.bib` files in order to get your reference key for citation?


title: Remove numbering of unreferenced theorems

text: Can theorems, lemmas, etc., be automatically displayed without numbers if not referenced (like `\mathtoolsset{showonlyrefs}` for equation tags)?


title: Automatic bold for every first character of a line

text: It's possible to do this > **L** orem ipsum dolor sit amet, > > **c** onsectetur adipisci elit, sed eiusmod > > **t** empor incidunt ut labore > > **e** t dolore magna aliqua. Ut enim > > **a** d minim veniam, quis nostrud > > **e** xercitation ullamco laboris nisi ut aliquid > > **e** x ea commodi consequat. Quis aute > > **i** ure reprehenderit in voluptate velit > > **e** sse cillum dolore eu fugiat nulla pariatur . > > **E** xcepteur sint obcaecat cupiditat non proident, > > **s** unt in culpa qui officia deserunt > > **m** ollit anim id est laborum. without writing the following code               \textbf{L}orem ipsum dolor sit amet, \\     \textbf{c}onsectetur adipisci elit, sed eiusmod \\     \textbf{t}empor incidunt ut labore \\     \textbf{e}t dolore magna aliqua. Ut enim \\     \textbf{a}d minim veniam, quis nostrud \\     \textbf{e}xercitation ullamco laboris nisi ut aliquid \\     \textbf{e}x ea commodi consequat. Quis aute \\     \textbf{i}ure reprehenderit in voluptate velit \\     \textbf{e}sse cillum dolore eu fugiat nulla pariatur. \\     \textbf{E}xcepteur sint obcaecat cupiditat non proident, \\     \textbf{s}unt in culpa qui officia deserunt \\     \textbf{m}ollit anim id est laborum.      but, for example, something like this?               \begin{bold_first}     Lorem ipsum dolor sit amet, \\     consectetur adipisci elit, sed eiusmod \\     tempor incidunt ut labore \\     et dolore magna aliqua. Ut enim \\     ad minim veniam, quis nostrud \\     exercitation ullamco laboris nisi ut aliquid \\     ex ea commodi consequat. Quis aute \\     iure reprehenderit in voluptate velit \\     esse cillum dolore eu fugiat nulla pariatur. \\     Excepteur sint obcaecat cupiditat non proident, \\     sunt in culpa qui officia deserunt \\     mollit anim id est laborum.     \end{bold_first}


title: Macros for code annotations

text: I'm wondering if there are some macros for annotating listings as below easily. They are primarily used in books from Manning. ![Code annotations](http://i.stack.imgur.com/D8JeF.png) **Solution** For anyone who's interested, this is my macro I finally got:                   \newcommand*{\AddNote}[5]{%         \begin{tikzpicture}[overlay, remember picture]         \coordinate (x) at (#2,0);         \coordinate (a) at ($(x)!(#1.north)!($(x)+(0,1)$)$);         \coordinate (b) at ($(a)+(0.8,0)$);         \coordinate (c) at ($(b)+(0,#3)$);         \draw [open triangle 45-] (a) -- (b) -- (c);         \node[#5] at (c) {\bf\sffamily\smaller#4};         \end{tikzpicture}%         }      Usage is: `\AddNote{linemarker}{x-offset}{y-offset}{text}{style}`


title: LaTeX Beamer: How to get distinct page numbers when using overlays?

text: ## The question When I create slides for presentations in LaTeX with the Beamer class, I like to use constructions with `overprint` like this:               \begin{frame}       \begin{block}{}         \begin{itemize}           \item Some general remarks about ALL plots         \end{itemize}       \end{block}       \begin{block}{}         \begin{center}           \begin{overprint}             \only<+>{               \incgraphics{width=7cm}{plot1.pdf}\\               Explanation of Figure 1             }             \only<+>{               \incgraphics{width=7cm}{plot2.pdf}\\               Explanation of Figure 2             }             % maybe more plots...           \end{overprint}         \end{center}       \end{block}     \end{frame}      The problem is that like this _all slides created from one`frame` are assigned the same page number_ which makes people complain that it's difficult to follow which slide I am on (when giving the talk via phone etc.). How can I change this? ## A minimal example to reproduce the problem               \documentclass{beamer}          \usetheme{Madrid}          \begin{document}          \begin{frame}       Common text\\       \begin{overprint}         \only<+>{           Figure 1 and explanation of Figure 1         }         \only<+>{           Figure 2 and explanation of Figure 2         }       \end{overprint}     \end{frame}          \end{document}      ## Partial answer One can mess around with `\setbeamertemplate` and use `\insertpagenumber{}` instead of `\insertframenumber{}`, but like this you lose generality (e.g. you cannot switch between themes easily). Maybe there is a better solution?


title: how do I make tikz circular arrowheads concentric to the point they connect?

text: I have a box-and-pointer diagram but it looks wrong, because the circular arrowheads are tangential to the point it connects, rather than concentric to that point. ![](https://88df6ea0630aed8027ff-0caf779119a6537399728d4d80523795.ssl.cf5.rackcdn.com/qbgwrrycxdnr/page/3164ebb4e759fa24bf46a2995caf0ba9c7a452af.jpeg) How can I fix this?               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{arrows}     %%%<     \usepackage{verbatim}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{5pt}%     %%%>     \title{immutable list}     \begin{document}     \begin{tikzpicture}        \tikzstyle{square} = [draw, shape=rectangle, minimum height=1cm, minimum width=1cm, node distance=2cm, line width=1pt]       \node[square] (1a) at (0,0)     {};       \node[square] (1b) at (1cm,0)   {};            \node[square] (2a) at (3cm,0)   {};       \node[square] (2b) at (4cm,0)   {};            \node[square] (3a) at (6cm,0)   {};       \node[square] (3b) at (7cm,0)   {};            \node[square] (4a) at (9cm,0)   {};       \node[square] (4b) at (10cm,0)  {};            \node (1) at (0,-2) {1};       \node (2) at (3,-2) {2};       \node (3) at (6,-2) {3};       \node (4) at (9,-2) {4};            \draw [*-latex] (1b.center) -- (2a);       \draw [*-latex] (2b.center) -- (3a);       \draw [*-latex] (3b.center) -- (4a);       \draw (4b.north east) -- (4b.south west);            \draw [*-latex] (1a.center) -- (1);       \draw [*-latex] (2a.center) -- (2);       \draw [*-latex] (3a.center) -- (3);       \draw [*-latex] (4a.center) -- (4);          \end{tikzpicture}     \end{document}


title: See which files are installed when installing a package with tlmgr

text: Is there a log somewhere that tells me what files where installed when I install a package with `tlmgr`?


title: auctex folding command does not work, creates new block

text: After installing auctex in Emacs, I am trying to issue the folding command:`C-c C-o C-b`. However, as soon as I issue `C-c C-o` auctex immediately inserts a new block and prompts me for its name. I checked the help and that is the shortcut for the `latex-insert-block` command. Can someone help me resolve what is going on here?


title: Octave to LaTeX

text: Is there anything (command/script/function) that can convert a Octave expression to LaTeX. What I am asking for is something like this: I type               a = eye(3,3); %Identity Matrix      and then do something like `textify_me(a)` which produces               \begin{array}{ccc}     1 & 0 & 0 \\ blah blah blah     \end{array}      AND/OR               syms x     int(sym('x^2'))      produces               \frac{x^3}{3}      I am not asking for "sweaving" of codes, exporting figures or anything similar. I am simply asking for conversion of variables and symbolic expressions directly to LaTeX format. MATLAB has a function `latex` which does this. But it is closed source. Is there something Open Source or should I attempt to try and accumulate people to write it?


title: Why is the spacing for this completely whacky?

text: I have the following line:               $P(can't\,communicate)       = \frac{\#\,of\,combinations\,of\,4\,different\,keys}              {total\,possible\,arrangements}       = \frac{\frac{10*9*8*7}{4}}{2025}       = \frac{1260}{2025} = 0.62 = 62 \% $      This doesn't all fit on one line, so the "= 0.62 = 62 %" falls under a new line, but it is stretched across to fill the WHOLE LINE. Why is this, and how can I stop it from happening? I just want it to look standard..


title: Subfigure numbering for Greek - XeLaTeX

text: I am writing a thesis in Greek. Everything compiles well and the produced document is the desired one except one little problem. The numbering on my subfigures is followed by a small rectangle, i.e. (α'rectangle'), (β'rectangle') etc. I'm posting my preamble concerning at least the language options. It is very annoying and any help will be appreciated.               \documentclass[a4paper,twoside, 12pt]{book}          \usepackage{fontspec}     \newfontfamily\greekfont{Arial}     \usepackage{polyglossia}     \setdefaultlanguage{greek}     \setotherlanguage{english}     \setmainfont[Mapping=tex-text]{Arial}          \usepackage{float, subfig}          \begin{document}          \begin{figure}       \centering       \subfloat[]{\includegraphics[<options>]{figFile1}} \\       \subfloat[]{\includegraphics[<options>]{figFile2}} \\       \caption{}       \label{}     \end{figure}          \end{document}      The same problem occurs if I use the `subfigure` package and substitute `\subfloat` with `\subfigure`.


title: negation of \pitchfork

text: Is there a symbol for "non-transversality" (or how to create it)? I am thinking about something similar to the negation of the symbol `\pitchfork`. I did not find anything like this in the list of available symbols.


title: algorithmicx, broken left align with custom numbering

text: I am trying to use the algorithmic package with Step1. Step2. instead of 1, 2, ... line numbering and I have numberless lines. An example:               \documentclass[11 pt]{report}     \usepackage{algorithm}     \usepackage{algpseudocode}     \begin{document}     \begin{algorithm}     \caption{My Algorithm}     \algrenewcommand{\alglinenumber}[1]{\bf Step{#1}.}     \begin{algorithmic}[1]     \State aaa     \Statex bbb     \State ccc     \end{algorithmic}     \end{algorithm}     \end{document}      However, aaa bbb and ccc are not properly left aligned. How can I fix it? Edit: I have edited the code to make it compilable (MWE)


title: How can I use scrpage2 with scrartcl?

text: For displaying the current section's title in the page-header, I usually use the `scrpage2` package with `scrbook`. However, now I would like to write a report with `scrartcl`, and my settings are not supported anymore: the section is not displayed. Here is the `scrpage2` code, that works with scrbook:               \usepackage[%         headsepline,                %% Separation line below the header     %   footsepline,                %% Separation line above the footer         markuppercase     ]{scrpage2}           \lefoot{}                      %% Bottom left on even pages      \lofoot{}                      %% Bottom left on odd pages      \refoot{}                      %% Bottom right on even pages      \rofoot{}                      %% Bottom right on odd pages      \cfoot{}                           %% Bottom center           \lehead{\bfseries\pagemark}    %% Top left on even pages      \lohead{\bfseries\headmark}    %% Top left on odd pages      \rehead{\bfseries\headmark}    %% Top right on even pages      \rohead{\bfseries\pagemark}    %% Top right on odd pages      \chead{}                           %% Top center           \pagestyle{scrheadings}      I found this resource (in German), but I do not understand the solution from that. How can I make the packages work with each other?


title: Latex compiling out \begin{document} etc

text: I am writing a thesis with latex, each chapter is in its own TeX file and get included with a `\input{Chapters/Chapter1}` command. One of my Chapters is generated with Sweave (R code) and includes `\documentclass{article}`, `\begin{document}`, `\end{document}` etc at the top - this interferes with compiling the full document - so I remove them manually each time I compile. I am looking for a way to remove these lines at compile time of the full document. thanks.


title: Expanding macro arguments in newcommand

text: I'd like to use `datetime`'s `\monthname` as part of a command; consider this snippet of command line `pdflatex` use:               $ pdflatex     This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010)      restricted \write18 enabled.     **\documentclass{article}     entering extended mode     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, lo     aded.          *\usepackage{datetime}     (/PATH/TO/texlive/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/PATH/TO/texlive/texmf-dist/tex/latex/base/size10.clo))          *\newdate{someDate}{30}{05}{2011}     (/PATH/TO/texlive/texmf-dist/tex/latex/datetime/datetime.sty     (/PATH/TO/texlive/texmf-dist/tex/latex/fmtcount/fmtcount.sty     (/PATH/TO/texlive/texmf-dist/tex/latex/base/ifthen.sty)     (/PATH/TO/texlive/texmf-dist/tex/latex/graphics/keyval.sty)     (/PATH/TO/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)     (/PATH/TO/texlive/texmf-dist/tex/latex/fmtcount/fc-english.def)     (/PATH/TO/texlive/texmf-dist/tex/latex/fmtcount/fc-USenglish.def)     No configuration file fmtcount.cfg found.     ))          *\newcommand\someDateStr{\getdateday{someDate} \monthname[\getdatemonth{someDate}] \getdateyear{someDate}}          *\typeout{\someDateStr}     30 \monthname[05] 2011          *\typeout{\monthname[\getdatemonth{someDate}]}     \monthname[05]      So, it looks like in the construct `\monthname[\getdatemonth{someDate}]`, Latex will expand only `\getdatemonth{someDate}`, but not the `\monthname` part; I'm suspecting it has something to do with the square brackets as arguments, because if I try to use `edef` instead, I get an error:               *\edef\someDateStr{\getdateday{someDate} \monthname[\getdatemonth{someDate}] \getdateyear{someDate}}     ! Argument of \reserved@a has an extra }.     <inserted text>                      \par      <*> ...atemonth{someDate}] \getdateyear{someDate}}          ?       So, the question is: how can I use `\monthname[\getdatemonth{someDate}]` as a part of a newcommand, such that it results with (in this case) "May"? Thanks in advance for any responses,   Cheers!


title: TikZ - How can I create a style for nodes which have the shape of a corner?

text: Probably a silly question, but I currently can't figure out how to create a style definition for a corner. What I want is included in the MWE. ## MWE               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     newtxtext,     amsmath,     }     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepackage{tikz}     \tikzset{     testtest/.style={     %rectangle, %don't want this     %circle, %don't want this either     draw=gray,     thick     },       }          \listfiles          \begin{document}     Test.     \begin{center}     \begin{tikzpicture}[font=\sffamily\small]     \node[testtest] at (0,0) {Some words.};     \end{tikzpicture}     \end{center}     \begin{center}         \begin{tikzpicture}             \draw[thick] (0,0) -- (2,0) -- (2,0.5) node[below left] {This is what I want. Just a corner. Its size is going to get adapted anyway.};         \end{tikzpicture}     \end{center}     \end{document}      ## Picture ![enter image description here](http://i.stack.imgur.com/bnF5Y.png)


title: How to work with SVN version control in Lyx?

text: In Lyx versions 1.6.8 and higher there is a version control toolbar. I successfully got RCS working but I cannot find any information on how to use SVN. However, there always is an "use SVN" button which is greyed out. I added the bin directory of a slicksvn installation to the PathPrefix in the Lyx options as well as to the Path environment variable of WinXP, which is my operating system. I saved preferences, reconfigured and restarted Lyx but SVN won't work. How to get SVN up and running with Lyx?


title: Include LaTeX file named with substring of current filename

text: I'm frequently creating presentations with beamer and need both the handout and the presentation itself. To avoid editing the file when I need to compile the other, I use `\ifdefined\ishandout ...` at the beginning of the presentation and have a separate file for the handout that contains nothing but               \def\ishandout{1}     \input{topic.tex}      Since the handout file is always named following the schema `topic_handout.tex` I'm looking for a way to strip the inner `_handout` so I can use the same handout file for all presentations without changing the content. I found `\jobname` which gives me `topic_handout`, so I just need to strip the constant string `_handout` and add `.tex` to the argument in `\input`. Since this happens before the document class is declared, I cannot use any packages. Any help is welcome.


title: Hyperref, cleveref and algpseudocode same identifier warning

text: I get the warning               pdfTeX warning (ext4): destination with the same identifier      (name{ALG@line.2}) has been already used, duplicate ignored      with the MWE down below.               \documentclass{article}          \usepackage{algpseudocode}     \usepackage{hyperref}     \usepackage{cleveref}          \begin{document}     \begin{algorithmic}     \Procedure{Euclid}{$a,b$}     \EndProcedure     \end{algorithmic}          \begin{algorithmic}     \Procedure{Euclid}{$a,b$}     \EndProcedure     \end{algorithmic}     \end{document}      Is there a chance to fix that?


title: Standard way of handling oversize pages?

text: In a book project, using `\geometry{letterpaper}`, there are occasional places where an oversize diagram has to be included — one much wider than a normal page — without being reduced or spread across pages. But I don't want all the other pages to be oversize, as well. What options do I have for allowing individual pages to be oversize, on an ad hoc basis? (`\geometry` cannot be re-declared in the body of the document).


title: Running command on new page

text: I have a special letterhead command called `\newpageheader` which adds a decorative figure and sets spacing for new pages:               \newcommand{\newpageheader}{\newpage \thispagestyle{plain} \hspace{-1in} \includegraphics{letterhead.png} }      Currently, I have to add the `\newpageheader` command deliberately, which involves finding natural breaks in the text based on the compiled PDF. This is manual and time-consuming. Is there a way to make a command like this run on each new page automatically? My objective is for the formatting to be automatic, and not require any manual tweaks.


title: mdframed: how to put the optional argument of a theorem-like environment between brackets?

text: ## The classical case With the classical `\newtheorem` command of `amsthm`, one gets the following result for **optional arguments** : ![enter image description here](http://i.stack.imgur.com/3Iiak.png) from this code               \documentclass{article}     \usepackage{amsthm}     \newtheorem{theorem}{Theorem}     \begin{document}          \begin{theorem}[Riemann]     Let $X$... Nulla egestas congue ullamcorper. Suspendisse id dictum est. Quisque ut urna lorem. Sed non aliquet sem, quis sollicitudin ante.      \end{theorem}          \end{document}      ## The `mdframed` case I would like to get a similar result with `mdframed`: **the optional argument between brackets, but no change of font and no dot at the end**. But by default, here is what I get: ![enter image description here](http://i.stack.imgur.com/FsHPi.png) from the code               \documentclass{article}     \usepackage{mdframed}          \mdfdefinestyle{myFramedTheoremStyle}{%     frametitlealignment=\raggedright,     linecolor=red,     linewidth=4pt,     innertopmargin=0pt,     innerbottommargin=10pt,     innerleftmargin=10pt,     innerrightmargin=10pt,     frametitleaboveskip=5pt,     skipbelow=0pt,     font=\itshape     }          \mdtheorem[style=myFramedTheoremStyle]{theorem}{Theorem}          \begin{document}          \begin{theorem}[Riemann]     Let $X$... Nulla egestas congue ullamcorper. Suspendisse id dictum est. Quisque ut urna lorem. Sed non aliquet sem, quis sollicitudin ante.      \end{theorem}          \end{document}      ## What I have found so far In the documentation, I have found the following options (of the `\mdfdefinestyle` command): > theoremseparator, theoremtitlefont and theoremspace but there seems to be to attribute for defining what comes after the optional argument. I am looking for an option of the `\mdfdefinestyle` command which could be called `theoremtextafter`. ## My question I hope something like that exists. Do you know if it is the case? If not, is it possible to find an easy solution? Thank you.


title: Merge free arrows with TikZ

text: I'm starting with TikZ, and basicaly what I'm trying to achieve is to draw what is shown in red in the next picture: ![enter image description here](http://i.stack.imgur.com/318b1.jpg) I think the solution is to use the help grid in order to point the line to the coordinate where I want to merge it with other, I tried for hours but it seems it's impossible for me :( can please anybody help me? Please find attached my code:               \documentclass[a4paper,12pt,twoside]{book}     \usepackage[bottom=25mm,top=25mm, left=30mm, right=25mm]{geometry}     \usepackage[utf8x]{inputenc}     \usepackage[spanish, es-tabla, es-noshorthands, es-nosectiondot]{babel}     \usepackage{tikz}     \usetikzlibrary{shapes, arrows}          \makeatletter     \pgfdeclareshape{datastore}{       \inheritsavedanchors[from=rectangle]       \inheritanchorborder[from=rectangle]       \inheritanchor[from=rectangle]{center}       \inheritanchor[from=rectangle]{base}       \inheritanchor[from=rectangle]{north}       \inheritanchor[from=rectangle]{north east}       \inheritanchor[from=rectangle]{east}       \inheritanchor[from=rectangle]{south east}       \inheritanchor[from=rectangle]{south}       \inheritanchor[from=rectangle]{south west}       \inheritanchor[from=rectangle]{west}       \inheritanchor[from=rectangle]{north west}       \backgroundpath{         %  store lower right in xa/ya and upper right in xb/yb         \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y         \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y         \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}         \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}         \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@yb}}         \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}      }     }     \makeatother          \begin{document}          \begin{center}     \begin{tikzpicture}[       font=\sffamily,       every matrix/.style={ampersand replacement=\&,column sep=2cm,row sep=2cm},       subsistema/.style={draw,thick,rounded corners,fill=white!20,inner sep=.3cm},       adpredect/.style={rectangle split,rectangle split parts = 3,draw,thick,rounded corners,fill=white!20,inner sep=.3cm},       click_OK/.style={draw,thick,circle,fill=green!20},       click_NOK/.style={draw,thick,circle,fill=red!20},       bypass/.style={subsistema,fill=yellow!20},       datastore/.style={draw,very thick,shape=datastore,inner sep=.3cm},       dots/.style={gray,scale=2},       to/.style={->,>=stealth',shorten >=1pt,semithick,font=\sffamily\footnotesize},       every node/.style={align=center}]            % Position the nodes using a matrix layout       \matrix{         \node[subsistema] (preparobox) {bla\\ bla};           \& \node[subsistema] (lectmot) {blablablablablablabla\\ blablablabla}; \& \\              \& \node[datastore] (colamot) {blabla}; \& \\              \node[subsistema] (parobox) {blablablabla\\ blablabla};           \& \node[adpredect] (subs) {%                           blablablablablablabla     \nodepart{two}                           blablablablablablabla    \nodepart{three}                           blablablablablablabla   \nodepart{four}                           };            \& \node[click_OK] (clickdetectado) {OK}; \\           \& \node[click_NOK] (clicknodetectado) {NOK}; \& \node[bypass] (acc_bypass) {BYPASS}; \\       };            % Draw the arrows between the nodes and label them.       \draw[to] (preparobox) -- node[midway,above] {blabla}           node[midway,below] {blablablabla} (lectmot);       \draw[to] (lectmot) -- node[midway,right] {bla} (colamot);       \draw[to] (lectmot) to[bend left=50] node[midway,below] {bla} (preparobox);       \draw[to] (colamot) --           node[midway,right] {blablabla\\bla} (subs);        \draw[to] (parobox) -- node[midway,above] {bla}           node[midway,below] {blabla} (subs);         \draw[to] (subs) -- node[midway,above] {blabla}          node[midway,below] {blabla} (clickdetectado);          \draw[to] (subs) -- node[midway,left] {blablabla\\blablablabla}          (clicknodetectado);          \draw[to] (clicknodetectado) -- node[midway,above] {blablablabla} node[midway,below] {blablabla} (acc_bypass);          \draw[to] (clickdetectado) to [out = -50, in = -90, looseness=2.2] node[midway,above] {blablabla} node[midway,below] {blablabla} (parobox);          %\draw[to] (acc_bypass) to [out = -50, in = -90, looseness=1.2] (parobox);     \end{tikzpicture}     \end{center}          \end{document}


title: Different vertical space before and after a image

text: The MWE is here:               \documentclass{minimal}     \usepackage{blindtext} % dummy text     \begin{document}     \blindtext          \rule{60pt}{20pt}          \blindtext     \end{document}      You can find that black rectangle, a dummy image, is separated from the paragraph blow by a vertical space, but the rectangle and paragraph above sticked together. Can someone tell me why?


title: Two lines ending where the longest one ends

text: I would like to have two consecutive lines of text where the shortest line is justified so that it ends at the end of the other, i.e. both lines should end at the end of the longest one. How can I do this? Here is an example of what I would like. Imagine you have these two lines: > 1) Lorem ipsum dolor sit amet, > > 2) consectetur adipisicing elit, These lines are similar, but they do not end perfectly at the same point. I would like that the shortest line, in this case the second, is justified so that it ends at the same point of the first. I tried something with the environment tabular, but I'm not able to obtain the desired result. :(


title: Problems with \DeclareSortingScheme for @misc documents in Biblatex

text: I apologize for the probably quite simple questions, but somehow I struggle to find an answer in the docs and online. I would like to have a separate bibliography for the UN Documents I am using, which I defined (according to the OSCOLA style) like this:               @misc{sc955,         institution = "UNSC",         instrument_no = "Res 955",         date = "1994-11-08",         doc_no = "UN Doc S/RES/955",         entrysubtype = "undoc",         keywords = "undoc"     }      I would like to sort them by the institution, followed by the instrument number. I tried the following:               \DeclareSortingScheme{un-res}{         \sort{ \field{institution} }         \sort{ \field{instrument_no} }     } %(in the preamble)          \printbibliography[keyword=undoc, sorting=un-res, title={UN Documents}]      I don't get any error messages, but the sorting seems rather random. What am I doing wrong? Many thanks!


title: Floatable centered and non-splittable lstlisting

text: I've been looking around and tried various setups but have yet to found the solution. I'm trying to define a `lstlisting` environment that is a float, is centered in the page, and cannot be broken across pages, without using `captionof`. Using the `figure`, `center`, and `varwidth` environments to encapsulate the `lstlisting`environment works. However, it requires to use `captionof` from the `caption`package outside the `lstlisting`, which changes the _look_ (size) and _behavior_ (width of the caption box, perhaps due to the `varwidth`) of the caption itself. I'd like to use the `label` and `caption` of the `lstlisting` environment. Any idea? Note: I may post more details sometime later. **EDIT** : Well, I just achieved a partial solution:               \begin{figure}[t]     \begin{center}     \begin{minipage}{0.7\linewidth}     \begin{lstlisting}[label={lst:stuff},     caption={Very large Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption Caption.}]     Stuff     \end{lstlisting}     \end{minipage}     \end{center}     \end{figure}          \ref{lst:stuff}      Now the problem is that large captions will begin break lines and not fill the entire `\linewidth` since only 70% percent (`0.7\linewidth`) of it is available (this is required in order to make the listing centered by eye). Any ideas? **EDIT 2** : I guess `\captionof{lstlisting}{Caption}` will have to do the trick. **EDIT 3** : Complete solution:               \documentclass{article}     \usepackage{caption}     \usepackage{listings}          \begin{document}     \begin{figure}[t]     \begin{center}     \begin{minipage}{0.7\linewidth}     \begin{lstlisting}     Stuff     \end{lstlisting}     \end{minipage}     \end{center}     \captionof{lstlisting}{Caption.}     \label={lst:stuff}     \end{figure}          \ref{lst:stuff}     \end{document}


title: Working in Landscape Orientation to make a To-Do List

text: I'm essentially trying to re-create the following (Which may have been created in Microsoft Word) with LaTeX. I have figured out how to get into landscape orientation but it goes down onto a new page instead of moving rightways across the file to fill in the empty space. I'm fairly sure I need to tweak both the margins and the size of the text to ensure everything fits correctly but I'm trying to tackle this one problem at a time.               \documentclass{article}     \usepackage[landscape]{geometry}          \begin{document}          \section*{Monday}          \subsection*{Work}     \begin{itemize}       \item        \item        \item      \end{itemize}          \subsection*{Projects}     \begin{itemize}       \item        \item        \item      \end{itemize}          \subsection*{Personal}     \begin{itemize}       \item        \item        \item      \end{itemize}          \section*{Tuesday}          \subsection*{Work}     \begin{itemize}       \item        \item        \item      \end{itemize}          \subsection*{Projects}     \begin{itemize}       \item        \item        \item      \end{itemize}          \subsection*{Personal}     \begin{itemize}       \item        \item        \item      \end{itemize}          \end{document}      ![Desired document.](http://i.stack.imgur.com/NLcHe.png)


title: how to remove page numbers from first page of chapters

text: My report requires page numbers to start from 1st chapter 1st page. So I use               \pagenumbering{arabic}      just before I do               \include{tex_files/chapter1)Introduction}      Now I want the page counting to start from 1st page, but I dont want the page numbers to appear on the first page of each chapter. How to do this? **Answer :**   Quick (and dirty?) solution: \thispagestyle{empty} just after \chapter{...}. – guillem


title: Customise bullet points inside shadowbox

text: I'm writing a report and using shadowbox for some important points. I have used the code below and it is working fine. However, when I tried to use the bullet points an extra space is added to the start of the shadowbox. I not sure what is the problem?. I found another way to do the shadowbox by using xcolorbox, but I couldn't figure out how to change the parameters to get same as the below shadowbox. Here is my code:               \documentclass{article}     \usepackage{varwidth}       \usepackage{fancybox}          \newcommand\Cshadowbox{\VerbBox\@Cshadowbox}      \def\@Cshadowbox#1{%     \setbox\@fancybox\hbox{\fbox{#1}}%      \leavevmode\vbox{%       \offinterlineskip      \dimen@=\shadowsize      \advance\dimen@ .5\fboxrule      \hbox{\copy\@fancybox\kern.5\fboxrule\lower\shadowsize\hbox{%       \color{ShadowColor}\vrule \@height\ht\@fancybox \@depth\dp\@fancybox   \@width\dimen@}}%       \vskip\dimexpr-\dimen@+0.5\fboxrule\relax       \moveright\shadowsize\vbox{%       \color{ShadowColor}\hrule \@width\wd\@fancybox \@height\dimen@}}}          \begin{document}      \shadowbox{       \begin{varwidth}{\textwidth}\textbf{\begin{center} \textit{\begin{itemize}               \item First item of the list  .                \item Second item of the list.\\                \end{itemize}}                   \bigskip                 \end{center}                }                  \bigskip                 \end{varwidth}      }     \bigskip      \end{document}      Any suggestion to solve the space with current code or new suggestion ? ![enter image description here](http://i.stack.imgur.com/gNcJn.png)


title: Centering a table and the caption

text: I can't center the table with the following code, but the caption is in the center:               \begin{table}[h]       \centering       \resizebox{0.8\textwidth}{!}{\begin{minipage}{\textwidth}            \caption{\textbf{State Table for Example 1}}       \label{table: state table1}     \begin{tabular}{cc|cc}          x & y & X & Y \\      \hline        $\bar{0}$  & $\bar{0}$ & 1 &1 \\         0  & 1 & 0 &1 \\         $\bar{1}$  & $\bar{1}$ & 0 & 0 \\         1  & 0 & 1 &0 \\             \end{tabular}           \end{minipage}}     \end{table}      Any suggestion?


title: Table with caption too wide for standalone package document

text: I am trying to output a wide table with a caption using the `standalone` package. When I do the following without a caption, I get nice output:               \documentclass{standalone}          \usepackage{caption}     \usepackage{booktabs}          \begin{document}     %\minipage{0.9\textwidth}     \begin{tabular}{llllllllll}     \toprule       & \multicolumn{3}{c}{Model 1}       & \multicolumn{3}{c}{Model 2}       & \multicolumn{3}{c}{Model 3}     \\         \cmidrule(r){2-4}         \cmidrule(r){5-7}         \cmidrule(r){8-10}     %       Variable         & Coefficient & Std Error & $p$-value         & Coefficient & Std Error & $p$-value         & Coefficient & Std Error & $p$-value     \\     \midrule       Brand1:$\log p_t$         & -3.44 & 0.226 & 2e-16***         & -3.39 & 0.227 & 2e-16***         & -3.27 & 0.231 & 2e-16***     \\       Brand2:$\log p_t$         & -2.67 & 0.250 & 2e-16***         & -2.62 & 0.248 & 2e-16***         & -2.61 & 0.248 & 2e-16***     \\       Brand3:$\log p_t$         & -4.45 & 0.413 & 2e-16***         & -4.50 & 0.425 & 2e-16***         & -4.43 & 0.427 & 2e-16***     \\       Brand4:$\log p_t$         & -2.34 & 0.607 & 1e-4***         & -2.32 & 0.601 & 1e-4***         & -2.38 & 0.599 & 9e-5***     \\       Brand5:$\log p_t$         & -3.92 & 0.536 & 2e-12***         & -3.90 & 0.532 & 2e-12***         & -3.86 & 0.530 & 2e-12***     \\[5pt]       Brand1:$\log p_{t-1}$         & & &         & 0.435 & 0.227 & 0.056.         & 0.518 & 0.229 & 0.024*     \\       Brand2:$\log p_{t-1}$         & & &         & 0.226 & 0.248 & 0.362         & 0.256 & 0.248 & 0.302     \\       Brand3:$\log p_{t-1}$         & & &         & 1.024 & 0.410 & 0.012*         & 1.078 & 0.423 & 0.011*     \\       Brand4:$\log p_{t-1}$         & & &         & 0.547 & 0.602 & 0.364         & 0.543 & 0.598 & 0.364     \\       Brand5:$\log p_{t-1}$         & & &         & 0.151 & 0.532 & 0.777         & 0.183 & 0.531 & 0.731     \\[5pt]       Brand1:$\log p_{t-2}$         & & &         & & &         & 0.465 & 0.231 & 0.045*     \\       Brand2:$\log p_{t-2}$         & & &         & & &         & 0.241 & 0.248 & 0.332     \\       Brand3:$\log p_{t-2}$         & & &         & & &         & 0.067 & 0.413 & 0.870     \\       Brand4:$\log p_{t-2}$         & & &         & & &         & -0.508 & 0.599 & 0.397     \\       Brand5:$\log p_{t-2}$         & & &         & & &         & 0.047 & 0.530 & 0.979     \\[5pt]       Brand1:MAPE         & \multicolumn{3}{c}{0.146}         & \multicolumn{3}{c}{0.131}         & \multicolumn{3}{c}{0.114}     \\       Brand2:MAPE         & \multicolumn{3}{c}{0.111}         & \multicolumn{3}{c}{0.111}         & \multicolumn{3}{c}{0.109}     \\       Brand3:MAPE         & \multicolumn{3}{c}{0.108}         & \multicolumn{3}{c}{0.103}         & \multicolumn{3}{c}{0.099}     \\       Brand4:MAPE         & \multicolumn{3}{c}{0.192}         & \multicolumn{3}{c}{0.192}         & \multicolumn{3}{c}{0.194}     \\       Brand5:MAPE         & \multicolumn{3}{c}{0.110}         & \multicolumn{3}{c}{0.103}         & \multicolumn{3}{c}{0.099}     \\     \bottomrule     \end{tabular}     %\captionof{table}{Regression results for 5 brands of coffee in a single store.}     %\endminipage     \end{document}      ![Output of code without caption](http://i.stack.imgur.com/drpyx.png) Based on Errors using standalone package to create a table, I try to use a `minipage` environment and the `caption` package to include a caption. The code and the output follows below:               \documentclass{standalone}          \usepackage{caption}     \usepackage{booktabs}          \begin{document}     \minipage{0.9\textwidth}     \begin{tabular}{llllllllll}     \toprule       & \multicolumn{3}{c}{Model 1}       & \multicolumn{3}{c}{Model 2}       & \multicolumn{3}{c}{Model 3}     \\         \cmidrule(r){2-4}         \cmidrule(r){5-7}         \cmidrule(r){8-10}     %       Variable         & Coefficient & Std Error & $p$-value         & Coefficient & Std Error & $p$-value         & Coefficient & Std Error & $p$-value     \\     \midrule       Brand1:$\log p_t$         & -3.44 & 0.226 & 2e-16***         & -3.39 & 0.227 & 2e-16***         & -3.27 & 0.231 & 2e-16***     \\       Brand2:$\log p_t$         & -2.67 & 0.250 & 2e-16***         & -2.62 & 0.248 & 2e-16***         & -2.61 & 0.248 & 2e-16***     \\       Brand3:$\log p_t$         & -4.45 & 0.413 & 2e-16***         & -4.50 & 0.425 & 2e-16***         & -4.43 & 0.427 & 2e-16***     \\       Brand4:$\log p_t$         & -2.34 & 0.607 & 1e-4***         & -2.32 & 0.601 & 1e-4***         & -2.38 & 0.599 & 9e-5***     \\       Brand5:$\log p_t$         & -3.92 & 0.536 & 2e-12***         & -3.90 & 0.532 & 2e-12***         & -3.86 & 0.530 & 2e-12***     \\[5pt]       Brand1:$\log p_{t-1}$         & & &         & 0.435 & 0.227 & 0.056.         & 0.518 & 0.229 & 0.024*     \\       Brand2:$\log p_{t-1}$         & & &         & 0.226 & 0.248 & 0.362         & 0.256 & 0.248 & 0.302     \\       Brand3:$\log p_{t-1}$         & & &         & 1.024 & 0.410 & 0.012*         & 1.078 & 0.423 & 0.011*     \\       Brand4:$\log p_{t-1}$         & & &         & 0.547 & 0.602 & 0.364         & 0.543 & 0.598 & 0.364     \\       Brand5:$\log p_{t-1}$         & & &         & 0.151 & 0.532 & 0.777         & 0.183 & 0.531 & 0.731     \\[5pt]       Brand1:$\log p_{t-2}$         & & &         & & &         & 0.465 & 0.231 & 0.045*     \\       Brand2:$\log p_{t-2}$         & & &         & & &         & 0.241 & 0.248 & 0.332     \\       Brand3:$\log p_{t-2}$         & & &         & & &         & 0.067 & 0.413 & 0.870     \\       Brand4:$\log p_{t-2}$         & & &         & & &         & -0.508 & 0.599 & 0.397     \\       Brand5:$\log p_{t-2}$         & & &         & & &         & 0.047 & 0.530 & 0.979     \\[5pt]       Brand1:MAPE         & \multicolumn{3}{c}{0.146}         & \multicolumn{3}{c}{0.131}         & \multicolumn{3}{c}{0.114}     \\       Brand2:MAPE         & \multicolumn{3}{c}{0.111}         & \multicolumn{3}{c}{0.111}         & \multicolumn{3}{c}{0.109}     \\       Brand3:MAPE         & \multicolumn{3}{c}{0.108}         & \multicolumn{3}{c}{0.103}         & \multicolumn{3}{c}{0.099}     \\       Brand4:MAPE         & \multicolumn{3}{c}{0.192}         & \multicolumn{3}{c}{0.192}         & \multicolumn{3}{c}{0.194}     \\       Brand5:MAPE         & \multicolumn{3}{c}{0.110}         & \multicolumn{3}{c}{0.103}         & \multicolumn{3}{c}{0.099}     \\     \bottomrule     \end{tabular}     \captionof{table}{Regression results for 5 brands of coffee in a single store.}     \endminipage     \end{document}      ![Output of code with caption](http://i.stack.imgur.com/KRhfc.png) What should I do so that the output is not cut off?


title: Preventing page break after the first or before the last list item

text: Is there a way to globally prevent all lists from having a page break inserted between the first and second items or between the last and second-last item? I'm fine with page breaks that are after the second item and before the second-last item, but I do not want the first item or the last item to be alone. I know that I can use "\nopagebreak\@nobreaktrue" to prevent a page break at a specific location, but I don't want to have to insert it manually, nor do I know how to insert it automatically via macros. (I've searched everywhere for many hours but couldn't find a solution, and I'm a beginner in LaTeX so I can't figure out how to solve it myself.)


title: Highlighting a row in a table

text: I need to highlight rows 3rd and 5th in the following table. I the package `xcolor` with the optional argument `table`, but it doesn't work. And gives me an error.               \begin{table}[h]       \centering          \resizebox{0.8\textwidth}{!}{\begin{minipage}{\textwidth}            \caption{\textbf{State Table for Example 1}}       \label{table: state table1}          \hfil % This is new      \begin{tabular}{cc|cc}     x & y & X & Y \\      \hline        $\bar{0}$  & $\bar{0}$ & 1 &1 \\         \rowcolor{blue}[0.9] 0  & 1 & 0 &1 \\         $\bar{1}$  & $\bar{1}$ & 0 & 0 \\         \rowcolor{blue}[0.9] 1  & 0 & 1 &0 \\        \end{tabular}           \end{minipage}}          \end{table}          \end{document}      Any suggestion please?


title: How to coherently combine 3D and contour plots with pgfplots

text: Both contour and 3d plots can be done easily in pgfplots, but I have a hard time combining them nicely. Here's an example of what I'd like to achieve (from the matplotlib examples): ![plot](http://i.stack.imgur.com/I6S0n.png)


title: apacite - citing websites with no author

text: So I'm trying to cite a website using `apacite`. According to my teacher, the output has to look like: > New child vaccine gets funding boost. (2001). Retrieved March 21, 2001, from > http://news.ninemsn.com.au/health/story_13178.asp After finding out `apacite` doesn't allow for `@online`, I added the following to my BiBTeX file               @misc{nyu,       title = {Elements, Atoms, and Molecules},       year = {1996},       urldate = {April 1, 2012},       url = {http://www.nyu.edu/pages/mathmol/textbook/compounds.html}     }      but that prints out: > Elements, atoms, and molecules. (1996). How do I get it to show URL and retrieved date? I only have 2 websites, so I can enter them manually, but I can't even figure out how to do that.


title: Switch off booktabs for one table only

text: I am using the `booktabs` package in basically all my papers to present tables with results or descriptive statistics. However, I need to show a schematic choice in a table, and for that I need a proper grid with continuous vertical lines. `booktabs` only allows for vertical lines with spaces in between and lines do not intersect. This is turned on automatically for all tables. I'd rather not write something in `tikz` just for that, I have the table and it looks nice without `booktabs`, however then the rest of the tables in the paper looks bad. So my question essentially is how can I switch off `booktabs` within/for a specific `tabular` environment? To illustrate the issue ![enter image description here](http://i.stack.imgur.com/sX9ST.png)


title: How can I make a single-aligned row under two double-aligned rows in an equation?

text: I have an equation that I would like to align like this (the x is actually `\times`):               A = BBBBB CCCCCCC               x DDDDD       = EEEEEEE FFFFF      I have tried the align environment, align with nested aligned, and alignat with two columns. The best I can do with plain align is:               A =&~ widersum &BBBBB &CCCCCCC        &           &      &x DDDDD       =&~ sum      &BBBBB &FFFFF      Which in my current case is fine, because the second sum is only a fraction less wide. But is there any decent way to ignore a second alignment `&` in one row? PS: I seem to need extra spaces `~` when I place the alignment after an equals sign. How come? **EDIT:** a realistic example               f_ &= \sum_{\mu, \lambda=-\infty}^\infty &blabla bla bla \notag \\                                              &&\times blabla \notag \\        &= \sum_{\lambda=-\infty}^\infty blabla bla blabla      is what I'm after


title: Weird behavior of longtable

text: I have a fairly long longtable in my document that does this weird thing: ![weird page split](http://i.imgur.com/na3Q1mp.png) Basically, it adds that little (vertical) divider after the table has finished (I know I have two hlines, but that is not a problem atm). Anyone know how to fix this? Relevant code:               \begin{longtable}{p{1.7cm} | p{1.5cm} p{1.5cm} p{1.5cm} p{1.5cm} p{1.5cm}  p{1.5cm}}     ...     \hline     $\bar{R^2}$ & .6298 & .6273 & .6277 & .6255 & .6459 & .5810 \\     $N$ & 149 & 149 & 149 & 149 & 149 & 85 \\     \hline     \multicolumn{7}{l}{\footnotesize{${}^{***}$ significant at 1\% level, ${}^{**}$ significant at 5\% level, ${}^*$ significant at 10\% level}} \\     \hline     \hline     \label{regmodels}     \end{longtable}


title: List of TeX formats

text: LaTeX, ConTeXt and plain are the most well known TeX formats/macro packages. But there are others, such as Lollipop. What others are out there and are any in use these days anymore?


title: inverted breve accent in math mode

text: Is there a math mode accent giving an inverted breve? I have tried `\stackrel{frown}{x}`, but the alignment and spacing are all wrong when compared to `\breve{x}`.


title: disable index creation in dtx file

text: The following code is a minimal dtx code with ending .tex (only for the example). I try to understand when an index created and when not, how this is influenced by the loading of hyperref and fail to see that the commands of doc.sty behave as documented.               % \iffalse     %<*driver>     \ProvidesFile{dtxcode.tex}     %</driver>     %     %<*driver>     \documentclass{ltxdoc}     % \usepackage{hyperref}          % \EnableCrossrefs  % (default) Every new macro name used within a macrocode or                       % macrocode∗ environment will produce an index entry.     \DisableCrossrefs % turn off this feature     %     % If an index is created is determined by the use of the following     % declarations in the driver file preamble; if neither is used, no index is      % produced.     % \PageIndex     % all index entries refer to their page number     % \CodelineIndex % index entries produced by \DescribeMacro and \DescribeEnv                    %  refer to page number but those produced by the macro                    %  environment refer to the code lines,                     % which will be numbered automatically.     % \CodelineNumbered % no index is created, but the code lines are numbered               \RecordChanges     \listfiles          \begin{document}       \DocInput{dtxcode.tex}       \PrintIndex     \end{document}     %</driver>     % \fi     %%     % \DescribeMacro{\foobar} Prints out foobar \index{test}     %      % \Finale     \endinput      In this code the index is created with both `\DisableCrossrefs` and `DisableCrossrefs` However If I load additionally the package hyperref the index disappears completely no matter what commands I activate. The index file created is nevertheless still the same - it is just not loaded. And if I use `\CodelineNumbered` when hyperref is loaded the index appears again though it should not according to the docs of doc.sty. To me this appears like a bug in ltxdoc/doc.sty. EDIT: Here a list of scenarios and their results. In all cases the idx file was deleted before execution and the pdf was created with `pdflatex`, `makeindex.exe -s gind.ist %.idx`, `pdflatex` (a) no hyperref, \EnableCrossrefs and \PageIndex               %\usepackage{hyperref}     \EnableCrossrefs     \PageIndex      Index is created. (b) no hyperref, \DisableCrossrefs and \PageIndex               %\usepackage{hyperref}     \DisableCrossrefs     \PageIndex      Index is created (but should not?) (c) no hyperref, \DisableCrossrefs and \CodelineNumbered               %\usepackage{hyperref}     \DisableCrossrefs     \CodelineNumbered      Index is not created, empty idx file. (d) no hyperref, \EnableCrossrefs and \CodelineNumbered               %\usepackage{hyperref}     \EnableCrossrefs     \CodelineNumbered      Index is not created. It seams that `\EnableCrossrefs` and `\DisableCrossrefs` do not control the index in contrast to the description of the documentation. (e) with hyperref, \EnableCrossrefs and \PageIndex               \usepackage{hyperref}     \EnableCrossrefs     \PageIndex      idx file is created but only self defined `\index` entries are displayed. In this case `test` but not `foobar`, though both are in the idx file with               \indexentry{foobar=\verb!*+\foobar+|usage|hyperpage}{1}     \indexentry{test|hyperpage}{1}      (f) with hyperref, \EnableCrossrefs and \CodelineNumbered               \usepackage{hyperref}     \EnableCrossrefs     \CodelineNumbered      No idx file is created as without hyperref. To summarize: With loading of hyperref the creation of the index files is not influenced, but the index entries of doc.sty arenot included during compilation in the pdf.


title: Making natbib and chapterbib work

text: > **Possible Duplicate:**   >  Multiple bibliographies I'm trying to write a book with references in each chapter and I would like to use `chapterbib` and `natbib` packages. I can't really understand how to make things work. My book is organized as follows:   * `settings.tex` which contains all the packages, commands etc that I use in my document (among the others: `\usepackage{natbib}`, `\usepackage{chapterbib}`)   * `Chapter_01.tex` (in which I'd like the references stored in `references_01.bib`)    * `Chapter_02.tex` (in which I'd like the references stored in `references_02.bib`). I then have a `Book.tex` file that is made like this:               \input{settings_pdf.tex}          \begin{document}          \include{Chapter_01.tex}          \include{Chapter_02.tex}          \end{document}      What should I put at the end of each chapter in order to get the references and how should I compile the document to produce a pdf document?


title: Multiple Bibliographies: Wrong bib-files

text: > **Possible Duplicate:**   >  Multiple bibliographies I am working on the `tex` file for a journal in which several articles will be published. I created a Master `tex` file, let's call it `master.tex`, that contains contents such as the titlepage, the imprint, the table of contents etc. For the sake of orginization I saved the articles in seperate `tex` files and include them in the master tex. Every article has it's own bibliography `.bib`. The problem that arises is that at the end of an article (where I inserted the bibliography-command) a bibliography appears, however not the correct one. The first `bib` file that is inserted in the master `tex` appears on every position where a bibliography command is. Can you help me out? `master.tex`:               \documentclass[twoside, 10pt]{article}     \begin{document}     % TITLEPAGE, IMPRINT, ...     \newpage     \include{author1}     \newpage     \include{author2}     \end{document}      whereas every article tex file has the same structure `author1.tex`:               \section{heading}     % CONTENTS     \bibliographystyle{plainnat}     \bibliography{author1}


title: How to use a separate bibliography at the end of each section?

text: > **Possible Duplicate:**   >  Multiple Bibliographies I need to use a separate bibliography at the end of each section in my work, However, after declaring the package `\usepackage{bibunits}` and subsequently, using `\usebibunit`, my TeXnicCenter tells me the command is not recognized! Please, I need help on any other available method.


title: Modifying nodes in a flowchart with psmatrix enviroment

text: I'm trying to draw some flowcharts with the `psmatrix` enviroment and I must show my input and output in a parallelogram box . I do not have a problem with the nodes while having the parallelogram in my flowchart but whenever I try to draw a horizontal node I encounter the problem with the below figure where a part of the node is inside of the parallelogram ![image showing problem](http://i.stack.imgur.com/Xv84F.jpg)               \documentclass{article}     \usepackage{amsmath,amssymb}      \usepackage{pstricks}     \usepackage{pst-node}     \usepackage{pst-blur}     \definecolor{Blue}{rgb}{1.,0.75,0.8}          % ================================     % Source: http://tug.org/pipermail/pstricks/2009/006766.html          \makeatletter     \newdimen\psparallelogramsep     \def\psset@parallelogramsep#1{\pssetlength\psparallelogramsep{#1}}     \psset@parallelogramsep{3mm}     \def\psparallelogrambox{\pst@object{psparallelogrambox}}     \def\psparallelogrambox@i{\pst@makebox\psparallelogrambox@ii}     \def\psparallelogrambox@ii{%         \begingroup         \pst@useboxpar         \pst@dima=\pslinewidth         \advance\pst@dima by \psframesep         \pst@dimc=\wd\pst@hbox\advance\pst@dimc by \pst@dima         \pst@dimb=\dp\pst@hbox\advance\pst@dimb by \pst@dima         \pst@dimd=\ht\pst@hbox\advance\pst@dimd by \pst@dima         \setbox\pst@hbox=\hbox{%             \ifpsboxsep\kern\pst@dima\fi             \begin@ClosedObj             \addto@pscode{%                 \psk@cornersize                 \pst@number\pst@dima neg                 \pst@number\pst@dimb neg                 \pst@number\pst@dimc                 \pst@number\pst@dimd .5                 \pst@number\psparallelogramsep                 \tx@Parallelogram}%                 \def\pst@linetype{2}%                 \showpointsfalse             \end@ClosedObj             \box\pst@hbox             \ifpsboxsep\kern\pst@dima\fi%         }%         \ifpsboxsep\dp\pst@hbox=\pst@dimb\ht\pst@hbox=\pst@dimd\fi         \leavevmode\box\pst@hbox         \endgroup%     }          % From the Frame and Rect PostScript macros     \pst@def{Parallelogram}<{%     /ParallelogramA {     x1 pgs sub y1 moveto     x1 y2 lineto     x2 pgs add y2 lineto     x2 y1 lineto     x1 pgs sub y1 lineto     closepath} def     %     /pgs ED     CLW mul     /a ED     3 -1 roll     2 copy gt { exch } if     a sub     /y2 ED     a add     /y1 ED     2 copy gt { exch } if     a sub     /x2 ED     a add     /x1 ED     1 index 0 eq {pop pop ParallelogramA } { OvalFrame } ifelse}>     \makeatother          \def\pspbox[#1]#2{\makebox[#1]{\psparallelogrambox{#2}}}          % ================================     \pagestyle{empty}          \begin{document}      \begin{latin}     \vspace{0.5cm}     \small       \psset{shadowcolor=black!70,shadowangle=-90,blur=true}       \begin{psmatrix}[rowsep=0.7,colsep=0.7]% defines the distance between two frames         %Begin        \psovalbox[fillstyle=solid, fillcolor=yellow!30,shadow=true]{Start} \\        %input                   \psparallelogrambox[fillstyle=solid,fillcolor=blue!20,shadow=true]{Input r} \\              %Condition         \psdiabox[fillstyle=solid, fillcolor=magenta!20,shadow=true]{$ r > 0 $} &         %output                  \psparallelogrambox[fillstyle=solid,fillcolor=blue!20,shadow=true]{Print m , d , s} \\                 %computation            \psframebox[shadow=true]{$ d=2*r  $}  &                %End                 \psovalbox[fillstyle=solid, fillcolor=yellow!30,shadow=true]{End}\\             %computation            \psframebox[shadow=true]{$ m=2*\pi*r $}  \\             %computation            \psframebox[shadow=true]{$ s = \pi*r*r    $}  \\             %output                  \psparallelogrambox[fillstyle=solid,fillcolor=blue!20, shadow=true]{Print Sum} \\             % Links         \ncline{->}{1,1}{2,1}         \ncline{->}{2,1}{3,1}         \ncline{->}{3,1}{4,1}<{\textcolor{red}{Yes}}         \ncline{->}{4,1}{5,1}         \ncline{->}{5,1}{6,1}         \ncline{->}{6,1}{7,1}        \ncline{->}{3,1}{3,2}^{\textcolor{red}{No}}         \ncline{->}{3,2}{4,2}           \ncangles[angleA=-90,angleB=180,armA=0.5cm,armB=0.7cm]{->}{7,1}{3,1}     \end{psmatrix}      \end{document}      So what should I do in order to have the right nodes ?


title: Can't generate vertical space between tables

text: I realize this is probably a really simple issue but I'm a complete beginner. I am auto-generating code very similar to the LaTeX code below. However no matter what I do I can't get space between the two tables - vspace just doesn't seem to work. However, if I have a figure after these tables vspace then works fine between the tables and the figure. Does anyone have any advice please? I added               \usepackage{parskip}      today as I don't want paragraph formatting. THANKS a lot for any help, Tom.               %% WriteReport.m method created this file.     \documentclass[english]{article}     \usepackage{avant}     \usepackage[T1]{fontenc}     \usepackage{geometry}     \geometry    {verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=1cm,headsep=1cm,footskip=1cm}     \usepackage{fancyhdr}     \pagestyle{fancy}     \usepackage{color}     \usepackage{babel}     \usepackage{array}     \usepackage{float}     \usepackage{graphicx}     \usepackage{parskip}     \usepackage[bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,     breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]     {hyperref}     \hypersetup{pdftitle={MyOutput},     pdfauthor={Autogenerated by MyOutput}}     \providecommand{\tabularnewline}{\\}     \usepackage{color}     \lhead{MyOutput}     \begin{document}     \section{\textsf{Section title}}     \begin{tabular}{|r|l|}        \hline        one & two \\        \hline        one & two \\        \hline        one & two \\        \hline        one & two \\        \hline        one & two \\        \hline     \end{tabular}     \newline     \vspace*{1 cm}     \begin{tabular}{|r|l|}        \hline        three & four \\        \hline        three & four \\        \hline        three & four \\        \hline        three & four \\        \hline        three & four \\        \hline     \end{tabular}     \end{document}


title: Tikz: Shading a path without any filling

text: How can I shade a path witout filling? In particular, I wand to draw a curved arrow that starts colored blue and ends colored green, where in between it gradually changes its color. I can't find a way to shade a path without filling it. The following code does _not_ work, as it shades the filling area, although it compiles.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc,automata,patterns,decorations,decorations.pathmorphing}     \usetikzlibrary{fadings}     \begin{document}     \begin{tikzpicture}          \draw[path fading=south,very thick,top color=blue!80!white,           bottom color=green!80!white,->] (0,0) .. controls +(0,-1) and +(0,1) .. (1,-2);          \end{tikzpicture}     \end{document}      ![Example image](http://i.stack.imgur.com/blLvk.png)


title: How to write raw text verbatim in LyX?

text: I want to write PlantUML diagrams from within LyX, and I want to put the result right into the document itself. To do so, I attempted to create a comment environment, in which I put the diagram description. Basically, PlantUML scans a directory for a bunch of text like the following:               @startuml foo.png     (A) --> (B) : x     (B) --> (C) : y     @enduml      ...converts it on the fly to something GraphViz understands, then writes the output in `foo.png`. To do this, I tried to put the PlantUML source in a comment block. However, this results in the following output in the LyX file:               \begin_inset Note Note     status open          \begin_layout Plain Layout     @startuml foo.png     \end_layout          <snip/>          \end_inset      I tried to work around this by putting the source in an ERT block, but this simply adds a `\begin_inset ERT`, without removing the `\begin_layout` lines. How can I work around this?


title: How to make pgfplots vertical labels have proper hyperref erence box?

text: PGFPlots and hyperref don't seem to play well together for vertical text. For example, the ylabel (which is vertical) shows its hyperref box in the middle of nowhere instead of at the position and direction of the vertical label. Does anybody know a workaround? (Note two things: the hyperref box works well for rotatebox and for horizontal labels) ![wrong vertical label](http://i.stack.imgur.com/Iq5cR.png)               \documentclass{article}     \usepackage[]{hyperref}     \usepackage[]{pgfplots}       \begin{document}     \rotatebox{90}{\href{http://www.google.com}{hello}}bye     \newline     \begin{tikzpicture}      \begin{axis}[xlabel = {\href{http://www.google.com}{Time}},  ylabel = {\href{http://www.google.com}{Length}}]      \end{axis}     \end{tikzpicture}     \end{document}      EDIT: Although Jake's answer (and Martin's) does the job, the problem persists for "units" part of the label. (I should have posted the full problem in my question instead of a simplification). As in the picture and code below, see how it seem not trivial to rotate the units part and also make it appear the expected location (after the end of the word "Length"): ![units with link not rotated](http://i.stack.imgur.com/urcAn.png)               \documentclass{article}     \usepackage[]{hyperref}     \usepackage[]{pgfplots}     \usepackage[]{tikz}     \usepgfplotslibrary{units}     \begin{document}     A plot with units:\newline     \begin{tikzpicture}     \begin{axis}[y label style={rotate=-90}, x unit = {\href{http://www.google.com}{\mathrm{s}}}, y unit = {\href{http://www.google.com}{\mathrm{m}}}, xlabel = {Time}, ylabel = {\rotatebox{90}{Length}}, title = {Axis}]     \end{axis}     \end{tikzpicture}     \end{document}


title: KILE Sweave Error - "Cannot open log file; did you run LaTeX?"

text: I am using Sweave to generate a pdf from a .Rnw file. I added a new build configuration in Kile using Kile's build-configuration settings.               Settings > Tools > Build      OS is Windows 7. How do I fix this error? I don't see an option for specifying log file. After setting this, compilation is working fine, but the "log and messages" pane in Kile, at the bottom is not able to show the compilation status message and says:.               "Cannot open log file; did you run LaTeX?"      The new build configuration is: > COMMAND:: C:\Program Files\R\R-2.15.1\bin\x64\R.exe > > OPTIONS:: CMD Sweave --pdf %source > > ADVANCED:: >   >   >     Type (Run Outside of Kile) >   >     Class (LaTeX) >   >     Source Extension (Rnw) >   >     Target Extension (tex) >   >     State (Editor) >


title: keep svninfo package from overwriting \today?

text: I use the package `svninfo` to put the svn revision on my title page so that I know which version people are looking at when they give me feedback. My titlepage also contains the current date though from the command `\today`. It seems that `svninfo` overwrites that value of `\today` to give me what seems like the date of last check-in or something. How do I insert the actual current date at compile time independent of any svn date, even when I am using the `svninfo` funtionality elsewhere in my document?


title: How to ignore proofs?

text: I'd like to print a shorter version of my paper without all the proofs, I'm thinking about something like               \renewenvironment{proof}{\begin{comment}}{\end{comment}}      but that activates the _comment_ environment right there instead of in the code.


title: ams bibliography style rationale

text: I have come to like the ams bibliography style. Is there a rationale for the style available? In general, are there guidelines for typesetting bibliographies you can recommend? Lastly, what are your favourite bibliography styles?


title: BibTeX warning that optional fields are empty

text: I've got the following .bib file (Material.bib):               @manual{GHCUserGuide,       author = {The GHC Team},       title = {The Glorious Glasgow Haskell Compilation System User's Guide},       number = {7.6.3},       institution={University Court of the University of Glasgow},       year = {2013},       month = {April}     }          @techreport{Haskell_1_3,       author = {John Peterson and others},       title = {Report on the Programming Language Haskell},       institution = {Various institutions},       year = {1996},       month = {May}     }      and the following tex file:               \documentclass{scrreprt}          \begin{document}          \nocite{Haskell_1_3}     \nocite{GHCUserGuide}          \bibliographystyle{alphadin}     \bibliography{Material}               \end{document}      When running BibTeX, I get the following warnings:               This is BibTeX, Version 0.99d (MiKTeX 2.9)     The top-level auxiliary file: BibTeX.aux     The style file: alphadin.bst     Database file #1: Material.bib     Warning--empty number in Haskell_1_3     Warning--empty note in Haskell_1_3     Warning--empty edition in GHCUserGuide     Warning--empty address in GHCUserGuide     (There were 4 warnings)      That's strange because all the mentioned fields in the output are _optional_ and not _required_ for the given entry types. What's the reason for this behaviour and is there any way to get rid of the warning messages without having to add the fields to the .bib-file?


title: Highlighting of latex code in emacs

text: I am absolutely new to Emacs and lisp, but I am considering a possibility to start using it for LaTeX code editing. What I have learned about Emacs (and it fascinated me) is that it has almost unlimited possibilities to modify it according to your needs. Before jumping into learning progress I need to clarify few things. One of the most important features that I need for my editor is possibility to create advanced highlighting schemes. Part of my work is rewriting LaTeX code to make it suitable for certain type of conversion to HTML. Visual emphasis of some parts in the code makes my work much easier. So the questions are:   1. Is it possible in Emacs, to highlight certain commands only if they are in some kind of environment?   2. Can I define highlighting priorities in case they overlap.   3. Can I tell Emacs to highlight certain phrases only if they follow after some set (containing symbols or words)?   4. Can I define different highlighting modes for math and text modes?


title: esttab output in Spanish (observations) using threeparttable and estwide or estauto

text: I am using the eststo and esttab commands to output regression results in .tex documents. I then use threeparttable (package threeparttablex) and \estwide to create and format the table in my LyX document (see Regression tables made with esttab in Stata have columns with different widths, using LyX in particular for the preamble). In LyX, I set the language to Spanish in Document/Settings I am using those to write a report in Spanish, so I would like the "Observations" note, which is automatically created by esttab, to be in Spanish instead of English (I'd like it to say "Observaciones"). This is not a problem with other notes since I write them directly in LyX. Is there a solution to this by changing something in the preamble for example? Thanks a lot in advance for your help. A MWE os such Stata code:               sysuse auto, clear     regress mpg weight length foreign, robust // specification without controls     eststo C1     regress mpg weight length, robust // specification with controls      eststo C2      regress price weight length foreign, robust // specification without controls     eststo C3     regress price weight length, robust // specification with controls      eststo C4          esttab C1 C2 C3 C4 using test.tex, booktabs fragment replace ///     se(%3.2f) b(3) label  indicate(Controls=foreign, labels("S\'i" "No")) ///     star(* 0.1 ** 0.05 *** 0.01) nonotes nomtitles drop(_cons) ///     mgroups("mpg" "weight", pattern(1 0 1 0) ///     prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))      And the correspondent output in TeX:                                   &\multicolumn{2}{c}{mpg}                    &\multicolumn{2}{c}{weight}                 \\\cmidrule(lr){2-3}\cmidrule(lr){4-5}                     &\multicolumn{1}{c}{(1)}         &\multicolumn{1}{c}{(2)}         &\multicolumn{1}{c}{(3)}         &\multicolumn{1}{c}{(4)}         \\     \midrule     Weight (lbs.)       &      -0.004\sym{**} &      -0.004\sym{*}  &       5.775\sym{***}&       4.699\sym{***}\\                     &      (0.00)         &      (0.00)         &      (1.50)         &      (1.73)         \\     \addlinespace     Length (in.)        &      -0.083         &      -0.080         &     -91.371\sym{*}  &     -97.960\sym{*}  \\                     &      (0.07)         &      (0.07)         &     (48.18)         &     (56.39)         \\     \addlinespace     Controls            &         Yes         &          No         &         Yes         &          No         \\     \midrule     Observations        &          74         &          74         &          74         &          74         \\      Finally, my code in the LyX document:               \begin{threeparttable}              \estwide{test.tex}{4}{c}     \Figtext{\footnotesize{Errores est\'andares corregidos por correlaci\'on y heteroskedasticidad a nivel de escuela entre par\'entesis.\\ \textit{* p < 0.1, ** p <     0.05, *** p < 0.01.}}}         \end{threeparttable}


title: How can I draw a right angle with MetaPost?

text: I want to use MetaPost to draw a right angle `BAC`. `A = (20,30)`, `B = (0,0)`, the top of the angle is point `A`. How can I compute the coordinate of point `C`? ![The Right Angle](http://i.stack.imgur.com/crFY3.png)


title: Generating an author index with author names only, not dates, using natbib

text: I'm generating an author index using `natbib`, `makeidx`, and `\citep` and `\citet` in the document, with `\citeindextrue`. This works, but the author entries are of the form: > Hegselmann (2001), 142, 190 > > Hegselmann (2012), 55, 190 What I would like to appear is just: > Hegselmann, 55, 142, 190 The `natbib` documentation makes an elliptic reference (page 16) to: "The form of the index entries is set by the internal `\NAT@idxtxt`, which can be redefined by hackers if wanted (in the `natbib.cfg` file please). By default, it prints the short author list plus date or number in the current parenthesis style and citation mode." I have tried '`\renewcommand\NAT@idxtxt{\NAT@name\NAT@spacechar}`' in the `natbib.cfg` file, but this doesn't seem to work (index entries are unchanged). What should I be doing?


title: Modular document: separate BibTeX?

text: I am building a modular LaTeX document for an econ journal. Each component of the modular document is one article. I want to have separate BibTeX references for each article. First, I created a big combined BibTeX. When I compile the whole document, each article's bibliography contains everything from the big combined BibTeX. Then I tried to split the big BibTeX file into separate ones for each article. When I did that, the complier made the first article's bibliography the bibliography for all of the articles. What should I do?


title: Speeding up minted compilation

text: I've been looking into speeding up my `pdflatex` compilation time and it's lighting fast now. Only one thing's still very slow: compiling source code using the `minted` package. I was wondering if there is no way of speeding this up (perhaps like the `tikz` externalization `\tikzexternalize` that only needs to run once and from then on includes the result). I was thinking of making a new environment that puts the `minted` environment inside a `tikz` environment, so that the rules of the `\tikzexternalize` may apply, but I haven't really figured out how to do this exactly (simply putting it inside a tike node doesn't work).