title: How to force hyperref to reference only \cite and not \citeauthor or \citeyear?

text: I would like `hyperref` to make links only when I use `\cite` and not with `\citeyear` and `\citeauthor`. Here is an example :               \documentclass{article}     \usepackage[numbers]{natbib}     \usepackage{hyperref}          \begin{document}          \citeauthor{Wysocki1960} has shown something interesting in \citeyear{Wysocki1960} \cite{Wysocki1960}.          \bibliographystyle{plainnat}     \bibliography{test}     \end{document}      With the .bib file :               @article{Wysocki1960,     annote = {cited By (since 1996) 27},     author = {Wysocki, J.J.},     journal = {Journal of Applied Physics},     number = {3},     pages = {571--578},     title = {{Effect of temperature on photovoltaic solar energy conversion}},     volume = {31},     year = {1960}     }      In the output, I want only the [1] to appear as a link.


title: Minimization of the time it takes to preview a large beamertex file

text: I have a very large beamer tex file which requires a long time to texify. I want to make very minor changes and want to visualize these changes quickly. Is there a way to texify only the changes that I made to speed up visualization (previews)? Is there a way to preview single frame or a block of code only? If not, what are other tips on how to speed up the texifying process and minimize the time it takes to preview my document?


title: Document automatically deleting

text: I have been using LaTeX for a few years and that never happened before. I compiled my document (about 1000 lines long) using TeXworks, pdfLaTeX. I did so a couple of hours ago and now reopened the document to continue it but the document refused to compile. I checked and the last couple of lines (with the crucial `\end{document}`) are missing. This is the second time it happened to me this week and I need to hand the document in pretty soon so I'm getting worried.   I'm doing regular back-ups so each time I have been able to find what I had written but I want to understand what is happening. Anyone has any ideas what is happening and how to fix this? In the mean time, I added a bunch of `%` at the end hoping it doesn't delete anything important. Other informations : I am running on Ubuntu 12.04 LTS.


title: specific citation style using multibib

text: I am using `multibib` with two bib-files. For the first one I use a numeric citation style. But for the second one I want to have [A1, A2, ...]. This works for my reference list but in my citation I still have [1, 2, ...]. How can I change this to [A1, A2,...]? Here is my minimal document (you have to use 2 bibfiles: litA and litB)               \documentclass[a4paper,10pt,twoside,titlepage,parskip=half-]{scrartcl}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman, english]{babel}     \usepackage{eso-pic}     \usepackage{textcomp} %\textmu einfügen z.B.     \usepackage[normalem]{ulem}     %text unterstreichen, durchstreichen usw.     \usepackage[resetlabels]{multibib}     \newcites{lita}{References1}     \newcites{ownb}{References2}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}     \makeatletter\renewcommand{\@biblabel}[1]{[#1]}\makeatother     \bibliographystylelita{plain}     \bibliographylita{./literature/litA}                        \citelitd{label1}          \makeatletter\renewcommand{\@biblabel}[1]{[A\,#1]}\makeatother     \bibliographystylelitb{plain}     \bibliographylitb{./literature/litB}                           \end{document}


title: Use Mac's Preview to display PDF files from TexShop?

text: I am sure there is a simple way to do this but my internet search yielded nothing .. I prefer using Mac's `Preview` to display PDF files rather than `TexShop's` internal PDF viewer. `TexMaker` has an option to use an external viewer, but I couldn't find a similar option in `TexShop`. Is there a way I can accomplish this ?


title: How to take off the marks of a graphic made with a CSV file

text: I'm importing a CSV file and I want to take off the marks of the graphic,how can I do this?               \documentclass{minimal}     \usepackage{pgfplots}     \usepgfplotslibrary{dateplot}          %\usepackage{filecontents}% Commented out dataCL.csv is not overwriten.     \begin{filecontents*}{dataCL.csv}         x, y         1, 10         2, 15         3, 17     \end{filecontents*}          \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot table [mark = none, draw = none,col sep=comma,x=x, y=y] {dataCL.csv};     \end{axis}     asdfasdfasdfasd     \end{tikzpicture}     \end{document}


title: Bad vertical distance in table using makecell package \multirowhead

text: This is my working code:               \documentclass[12pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{multirow}     \usepackage{hhline}     \usepackage{array}     \usepackage{caption}     \usepackage{tabu}     \usepackage{makecell}     \oddsidemargin   16mm     \evensidemargin  -3mm     \topmargin      -3mm     \headheight      5mm     \headsep         7mm     \textheight      228mm     \textwidth       146mm     \footskip        8mm        \begin{document}     \makegapedcells     \renewcommand\theadfont{\footnotesize}     \renewcommand\theadset{\def\arraystretch{.85}}     \setcellgapes{1pt}     \renewcommand\cellgape{\Gape[1pt]}        \begin{table}[h]     \label{tab:table30B}     \begin{center}     %7 columns     \small     \begin{tabu}{|[2pt] c|[2pt] c| c| c| c| c| c|[2pt]}     \tabucline[2pt]{-}       \multirowthead{3}[9ex][l]{\parbox{3cm}{xxx xxxx xxxxx experxxxx cc xxx xxxx xx xxxx xx xxx xxxxxxxx xxxexxxmexx xxxxx?}} & \multicolumn{6}{c|[2pt]}{\thead{XX XXXX XX XXX XXX XXXXXXXX XXXXXX\\ / XXXXXXXX XXXXXX XXXr XXXX?}}\\     \cline{2-7}     &NeXX&  \thead{XXXXX\\ ($< \,10\,\%$)}&\thead{Reaso-\\nably}&   \thead{XXarly\\ ($> XX\,\%$\\ and $< XX\,\%$)}& \thead{XXXX\\ XXX\\ ($> XXX \,\%$)}&    \thead{XXXXX}\\     \cline{2-7}          & \thead{Count}&    \thead{Count}&  \thead{Count}&  \thead{Count}&  \thead{Count}&  \thead{Count}   \\          \tabucline[2pt]{-}     X\,--\,XX (XXXXX)& 7&   2&  11& 1&  0&  31\\     XXX\,--\,15 (XXXXX)&    31& 1&  3&  2&  1&  10\\     15\,--\,20 (XXXXX)& 12& 0& 4&   7&  0&  X\\     XX,--\,XX (XXXXX)&  0&  0&  1&  0&  0&  1\\     XXXX XX (XXXXX)&0&  3&  X&  0& 2&   3\\     Total&  11& 16& X& 3&   1&  48\\     \tabucline[2pt]{-}     \end{tabu}     \end{center}     \end{table}     \end{document}      This what I have: ![enter image description here](http://i.stack.imgur.com/Cgs7V.jpg) As you can see 2-7 multicolumn row has huge vertical distances. How I could remove them? As I understand there is a problem with \multirowhead command, but I can not figure out what I could do with it. I've tried different things, this is a best I could get by so far. Please Help me to solve this problem using makecell package. Usually this package gives very nice results in constructing tables. Thank You in advance.


title: Disabling included pictures in Beamer

text: I am preparing a huge document with tons of pictures and Tikz drawings (based on Beamer package). Is there a command for NOT including all the pictures inserted by \includegraphics? This might speed up the typesetting.


title: How to include table of contents into a table of contents

text: I would like to know how to include table of contents into a table of contents.... I have an example of how to spoof it into the toc - using \phantomsection - but it seems like when i have a long document the link goes a bit wrong - ie. it links to a couple of pages before.....               \phantomsection     \addcontentsline{toc}{chapter}{Contents}     \tableofcontents      * * * **Example:**               \documentclass[12pt, a4paper, twoside]{book}     \usepackage[english]{babel}     \usepackage{amsfonts,dsfont}     \usepackage[final]{pdfpages}     \usepackage{hyperref}           %----------------------------------------------------------------------------------     \begin{document}     \pagenumbering{roman}      %----------------------------------------------------------------------------------          %----------------------------------------------------------------------------------     \thispagestyle{empty}     \begin{titlepage}     {\Large     \begin{center}     {\bf XXXXXXXXXXXXXXX}     \end{center}     }     \end{titlepage}     %----------------------------------------------------------------------------------          \phantomsection     \addcontentsline{toc}{chapter}{Contents}     \tableofcontents               \phantomsection     \addcontentsline{toc}{chapter}{List of Figures}     \listoffigures          \phantomsection     \addcontentsline{toc}{chapter}{List of Tables}     \listoftables          %----------------------------------------------------------------------------------          \newpage     \setcounter{page}{1}     \pagenumbering{arabic}          \chapter{XXXXX}     \label{chXXXXX}          \section{Introduction}\label{chXXXXX_Intro}     BLAH BLAH BLAH.           %----------------------------------------------------------------------------------          %--------------------     \setboolean{@twoside}{false}     \end{document}


title: Good strategy for line breaks with paragraphs of LaTeX source

text: What approach is recommended regarding line breaks when writing paragraphs of LaTeX?   * Should a new line be started at the end of each sentence?   * Is it better to manually start new lines or to let the editor wrap the line? No doubt such decisions have implications for version control, debugging, collaboration, automaticity of writing, and so on. What is considered good practice? Or is it a completely personal decision? Let me know if this should be community wiki.


title: \chardef and underscore

text: Could you explain to me why               a\_b {\ttfamily a\_b} \\     \chardef\_=`\_     a\_b {\ttfamily a\_b}      produces ![alt text](http://i.stack.imgur.com/C3Tpx.png) ? I would like to have the short underscore in the normal text and the long one in fixed-width font. I cannot change `{\ttfamily a\\_b}`. The other `a\\_b` I can change. Thanks for your help! * * * EDIT: I realized that `a\textunderscore b` solves my immediate problem in text. I would still like to know where the mysterious dot is comming from. In math mode,               \chardef\_=`\_     $a\_b$      LaTeX stops compiling altogether on my installation (without error, it just halts).


title: Using arrays and variables in TikZ

text: I'm trying to make a simple graphic, that will change, when I change input parameters. I made arrays with input parameters:               \def\zamkl{{3,4,4.5,5}}     \def\zamkh{{4,3.5,5,4.5}}      then, I'm trying to make variables `myl` and `myh`, which I intend to use later:               \pgfmathparse{\zamkl[0]}     \def\myl{\pgfmathresult}     \pgfmathparse{\zamkh[0]}     \def\myh{\pgfmathresult}      but the result is very strange, the figure has size `8x8`, though it should be `6x8`: ![enter image description here](http://i.stack.imgur.com/HQqOC.png) The whole code is:               \begin{tikzpicture}     \def\zamkl{{3,4,4.5,5}}     \def\zamkh{{4,3.5,5,4.5}}          \pgfmathparse{\zamkl[0]}     \def\myl{\pgfmathresult}          \pgfmathparse{\zamkh[0]}     \def\myh{\pgfmathresult}          \draw[help lines] (0,0) grid (6,8);          \coordinate (A) at (0,0);     \coordinate (B) at (\myl,0); \node at (B) [below] {$T$};     \coordinate (C) at (2*\myl,0);     \coordinate (D) at (2*\myl,\myh); \node at (D) [left] {$S$};     \coordinate (E) at (2*\myl,2*\myh);     \coordinate (F) at (\myl,2*\myh); \node at (F) [below] {$R$};     \coordinate (G) at (0,2*\myh);     \coordinate (H) at (0,\myh); \node at (H) [right] {$W$};          \draw [very thick] (A) -- (C) -- (E) --(G) -- (A);          \fill (B) circle (4pt);     \fill (D) circle (4pt);     \fill (F) circle (4pt);          \end{tikzpicture}


title: How do I do currency calculations in text?

text: I am writing a long document, which has a lot of money references in Indian rupees (easily typeset using package tfrupee). Some definitions peculiar to Indian money before we proceed:   1. Its grouped as ..,2,2,3. For instance, 100,000 is written as 1,00,000. (This is not particularly relevant to the question below, but the factoid is mentioned here for completeness).   2. Currency unit lakh = hundred thousand (100,000)   3. Currency unit crore = hundred hundred thousand (10000000). Back to the question. However, some of the audience of this document is going to be based in the US and Europe. So, I want to define the following (metacode).               \usepackage{tfrupee}     \usepackage{eurosym}          \newcommand{\scalefactor}[#1]{100000 if lakh and 10000000 if crore}          \newcommand{\rupeetodollars}{60.08} % Number of rupees to a dollar these days.     \newcommand{\rupeetoeuros}{82.32} % Number of rupees to a Euro these days.          \newcommand{\actualindianmoney}[2]{#1*\scalefactor{#2}}          \newcommand{\indianmoney}[2]{\rupee #1 #2\footnote{\$ \actualindianmoney{#1}{#2}/\rupeetodollars}. \eurosym \actualindianmoney{#1}{#2}/\rupeetosuros.}      with invocations like: `\indianmoney{10}{lakh}` and `\indianmoney{2}{crore}`. However, I have never done any floating point calculation (fp vs. pgfmath) using \LaTeX and how to convert lakh to 100000 and crore to 10000000 (to do the sensible multiplication above) as well as ensure only two decimal places in the result is throwing me. Could someone help me out here? PS: Is it possible to get compile time values for the exchange rates above instead of hardcoding numbers that may be obsolete in a few weeks (Though it has settled down of late, the Indian rupee has been one of the more volatile currencies around for the past two years).


title: How to set binding offset in report class

text: I want to add bigger margin to the left side of document for binding purposes. The default margin with report class is ~1.5 inches, but when I use the geometry to set the bindingoffset, whole layout is wrong. The side margins are shifted correct, but the whole pages is also shifted up and there is huge margin at the bottom. MWE is here, comment out the geometry package to see the effect.               \documentclass[a4paper,12pt]{report}     \usepackage[a4paper, bindingoffset=0.4in]{geometry}     \usepackage{blindtext}     \usepackage{fancyhdr}          \setlength{\headheight}{15pt} % fix headers          \begin{document}     \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{\textit{#1}}{}}     \renewcommand{\sectionmark}[1]{\markright{\textit{#1}}{}}     \cfoot{\thepage}     \lhead{\leftmark}     \rhead{\rightmark}     \parskip 1em          \chapter{Test Chapter}     \blindtext          \blindtext          \section{section}     \blindtext          \blindtext          \section{title}     \blindtext          \blindtext     \end{document}      What I want is same layout as if the geometry package is not used, just with **bigger left margin**. The left margin should be 0.4 inches wider than the default.


title: How can I annotate an image with arrow and text?

text: I am using LaTeX to make a manual. I would like to annotate an image with arrows pointing to parts of the image and a textual annotation outside of the image. Is there a simple way I can do this with TikZ or something similar? ![an example of the kind of thing i want to do](http://i.stack.imgur.com/g6uC6.png) The question is not answered already... the linked "duplicate" (which I had seen) doesn't describe drawing arrows with text annotations, which is what i asked about!


title: I can't change the font size

text: I can't do something so simple like changing the font size . No matter what number I write in `\documentclass[10pt]{article}`, I'm not able neither to reduce nor to increase the size. Although after `\documentclass` you can see `[10pt]`, reality is that the actual font size the text is compiled is 11 (I think). I wonder if the problem has its root in any of this packages:               \documentclass[10pt]{article}     \usepackage{amsmath,amssymb,amsthm,fontenc,titlesec}     \usepackage[left=2.5cm,top=3.5cm,right=2.5cm,bottom=3.5cm]{geometry}      \usepackage{lipsum}     \usepackage{graphicx}     \usepackage{wrapfig}     \usepackage[spanish]{babel}     \usepackage[latin1]{inputenc}     \usepackage{fancyhdr}     \usepackage{multirow}     \usepackage{url}     \pagestyle{fancy} % seleccionamos un estilo     \lhead{TEBF} % texto izquierda de la cabecera     \chead{Práctica 10}     \rhead{Jorge Becerra} % número de página a la derecha     \renewcommand{\headrulewidth}{0.4pt} % grosor de la línea de la cabecera      Thanks in advance


title: Letting pictures appear in a presentation

text: Recently, I asked this question, about how to let bullets appear in a frame in a Latex Beamer document. How would I do this with pictures? Say that I want a slide which contains one graph in the upper half and after clicking another graph appears in the lower half. The answer to my previous question does not help in this case, because there is no itemize/enumerate environment. Any help is appreciated!


title: Alternating column layouts in LaTeX (beamer)

text: I have been using LaTeX beamer for my presentations for some time. My standard slide layout consists of bullet-points on one side, with a 'hook' image on the other. To keep visual interest, I alternate the columns between slides. A minimal code snippet looks like this:               \documentclass[a4paper]{beamer}          \usepackage{graphicx}          \title{My Title}     \author{Me}     \begin{document}          \maketitle          \begin{frame}         \begin{columns}     \begin{column}[c]{7cm}     \begin{itemize}        \item Point One        \item Point Two     \end{itemize}     \end{column}     \begin{column}[c]{3cm}     \includegraphics[width=3cm]{stock/default.png}     \end{column}     \end{columns}     \end{frame}          \begin{frame}     \begin{columns}     \begin{column}[c]{3cm}     \includegraphics[width=3cm]{stock/default.png}     \end{column}     \begin{column}[c]{7cm}     \begin{itemize}        \item Point Three        \item Point Four     \end{itemize}     \end{column}     \end{columns}     \end{frame}               \end{document}      Obviously, for longer presentations this alternation can be annoying to code. Also, inserting or removing a slide from the presentation means that the rest of the slides have to be manually realigned. (At the moment I mainly use a vim macro to do it.) Is there any way to have a variable or parameter that would automatically toggle to correctly swap the columns from slide to slide? I've toyed with the idea of defining a new frame type that takes an 'alignment' argument as well as the relevant text and images, but how to do that, and whether a persistent 'variable' can be kept and set in a LaTeX document, is a significant leap beyond my existing LaTeX knowledge.


title: Formatting table border and text alignment in LaTeX table

text: I have the following table in the `.tex` file:               \documentclass{article}     \usepackage{booktabs}     \begin{document}          \begin{table}[htbp]       \centering       \caption{Distribution of Number of Injured Non-Motorists by Injury Severity Level}         \begin{tabular}{rcccccc}         \toprule         \textbf{Injury Severity } & \multicolumn{2}{c}{\textbf{Pedestrian}} & \multicolumn{2}{c}{\textbf{Bicyclist}} & \multicolumn{2}{c}{\textbf{All Non-Motorists}} \\         \midrule         Possible injury & 1700  & 67.70\% & 502   & 59.40\% & 2202  & 65.60\% \\         Non-Incapacitating injury & 523   & 20.80\% & 259   & 30.70\% & 782   & 23.30\% \\         Incapacitating injury & 250   & 10.00\% & 84    & 9.90\% & 334   & 9.90\% \\         Fatal injury & 39    & 1.50\% & 0     & 0.00\% & 39    & 1.20\% \\         \textbf{Total} & \textbf{2512} & \textbf{100.00\%} & \textbf{845} & \textbf{100.00\%} & \textbf{3357} & \textbf{100.00\%} \\         \bottomrule         \end{tabular}%       \label{tab:dvar}%     \end{table}%          \end{document}      This gives me the following table: ![Table using Latex code](http://i.stack.imgur.com/bBgrO.png) However, I want it in this specific format for my thesis: ![Required formatting](http://i.stack.imgur.com/xFWNg.png) Please note that the outer borders are 2 lines while the inner borders are single line. Also, the numbers are to be aligned along the decimal point. Can anyone please help me out here?


title: How to adjust the sign of implication sign

text: I want to get the following implication arrows: ![What I want](http://i.stack.imgur.com/XwkHU.png) But according to percusse's suggestion not implies, not Leftarrow, description in the middle of an arrow in TikZ-cd I would get this: ![Can not adjust](http://i.stack.imgur.com/Nykgf.png) As you can see, I want to get the implication sign with large distance between two parallel curves, not the large width of each of the two curves. Can tikz- cd do this? Here is the modification of percusse's tex file:               \documentclass{article}     \usepackage{tikz-cd}     \usetikzlibrary{decorations.markings}     \tikzset{degil/.style={line width=1.5pt,             decoration={markings,             mark= at position 0.5 with {                   \node[transform shape] (tempnode) {$\backslash\backslash$};                   %\draw[thick] (tempnode.north east) -- (tempnode.south west);                   }               },               postaction={decorate}     }     }          \tikzset{     commutative diagrams/.cd,     arrow style=tikz,     diagrams={>=open triangle 45, line width=1.5pt}}               \begin{document}          \begin{tikzcd}[arrows=Rightarrow]     \fbox{\parbox{2cm}{$f$ is differentiable at point $P$}}     \arrow[bend right]{rr}{} &\quad         \qquad&\fbox{\parbox{2cm}{$f$ is continuous at $P$}}\arrow[bend right,degil]{ll}{}     \end{tikzcd}     \end{document}


title: How can I draw annotated braces over and under math expressions?

text: What LaTeX markup would one have to write to produce a result similar to the image below? ![enter image description here](http://i.stack.imgur.com/eWaqH.png) Please excuse my Paint-and-mouse drawing skills. :-)


title: Problem with a table

text: I have a table that I would like to adjust: the text is floatting; I wanna have it centred in every cell.                 \documentclass[12pt,a4paper,oneside]{book}       \usepackage{tensor}       \usepackage{graphicx}       \begin{document}            \begin{table}       \centering       \begin{tabular}{|p{3cm}|p{2cm}|p{2.3cm}|p{1.5cm}|p{4cm}|}       \hline        \center{Radionuclide padre} & \center{T$_{1/2}$ (anni)} & \center{Abbondanza isotopica} & \center{Elemento figlio} & \center{Materiali databili} \tabularnewline   \hline \hline       \center{\nuclide[14][]{C}} & \center{5730} & \center{-} & \center{\nuclide[14][]{N}} & \center{Materiali organici} \tabularnewline \hline        \center{\nuclide[235][]{U}} & \center{723 milioni} &\center{ 0.72}&     \center{\nuclide[207][]{Pb}} & \center{Zirconide, Uranite, Pechblenda} \tabularnewline \hline         \center{\nuclide[40][]{K}} & \center{1'300 milioni} & \center{0.012} &   \center{\nuclide[40][]{Ar}} & \center{Muscovite, Biotite, Orneblenda, Feldspato potassico, Rocce vulcaniche}\tabularnewline       \hline        \center{\nuclide[238][]{U}} & \center{4'510 milioni} & \center{99.27} &  \center{\nuclide[206][]{Pb}}& \center{Zircone, Uraninite, Pechblenda}\tabularnewline  \hline        \center{\nuclide[232][]{T}} & \center{13'900 milioni} & \center{100} &  \center{\nuclide[208][]{Pb}}& \center{Rocce vulcaniche}\tabularnewline \hline        \center{\nuclide[87][]{Ru}} & \center{47'000 milioni} & \center{27.87} &    \center{\nuclide[87][]{St}}& \center{Miche, Feldspati potassici, Rocce metamorfiche}\tabularnewline      \hline       \end{tabular}            \end{table}       \end{document}


title: How to insert two white spaces at the beginning of a line

text: I want to insert two white space at the beginning of a line. How can I do that? I want something like this               This is first line       This is second line     This is third line     This is fourth line


title: Scattering a figure with TikZ

text: Starting with a shape similar to the one generated with the following MWE :               \documentclass[11pt]{article}          \usepackage{tikz}     \usepackage{pgf}     \usepackage{pgffor}     \usepgfmodule{shapes}     \usepgfmodule{plot}     \usetikzlibrary{decorations}     \usetikzlibrary{arrows}     \usetikzlibrary{snakes}          \begin{document}     \begin{center}     \begin{tikzpicture}     \node[inner sep=0, outer sep=0] at (-2.5,0.5) (a) {};     \node[inner sep=0, outer sep=0] at (-1.5,2) (b) {};     \node[inner sep=0, outer sep=0] at (0.5,2) (c) {};     \node[inner sep=0, outer sep=0] at (2,0) (d) {};     \node[inner sep=0, outer sep=0] at (0.5,-2.5) (e) {};     \node[inner sep=0, outer sep=0] at (0,0) (y) {};          \draw [cyan, xshift=4cm] plot [smooth cycle, tension=0.95] coordinates { (a) (b) (c) (d) (e) };     \draw (a) -- (y);     \draw (c) -- (y);     \draw (e) -- (y);     \end{tikzpicture}     \begin{tikzpicture}     \end{tikzpicture}     \end{center}     \end{document}      ![init](http://i.stack.imgur.com/fP29e.png) Is there an easy way to automatically generate something like this ![scattering](http://i.stack.imgur.com/KR8AB.jpg) That is, I want to cluster the three parts split by the black lines joining in the middle, then eventually shift them apart from one another. If was thinking of using http://www.texample.net/tikz/examples/puzzle/ but I have no idea of how I can apply that to my case, since the three parts are not the same. Thanks. PS: how the big shape is generated can be changed, it was just to give you an idea of what I'm looking for. * * * Update: here is where I'm at, is there a way to make the outter path curved, and make the tangent match at each end points ?               \documentclass[11pt]{article}     \usepackage{ifthen}     \usepackage{tikz}     \usepgfmodule{shapes}     \usepgfmodule{plot}     \usetikzlibrary{decorations}     \usetikzlibrary{arrows}     \usetikzlibrary{snakes}          \begin{document}     \begin{center}     \begin{tikzpicture}     \node[inner sep=0, outer sep=0] at (-2.5,0.5) (a) {};     \node[inner sep=0, outer sep=0] at (-1.5,2) (b) {};     \node[inner sep=0, outer sep=0] at (0.5,2) (c) {};     \node[inner sep=0, outer sep=0] at (2,0) (d) {};     \node[inner sep=0, outer sep=0] at (0.5,-2.5) (e) {};     \node[inner sep=0, outer sep=0] at (0,0) (y) {};     \coordinate (Y) at (y);     \newdimen{\centerX}     \newdimen{\centerY}     \pgfextractx\centerX{\pgfpointanchor{Y}{center}}     \pgfextracty\centerY{\pgfpointanchor{Y}{center}}          \foreach \x/\y in {a/c, c/e, e/a} {         \coordinate (A) at (\x);         \newdimen{\tempAX}         \newdimen{\tempAY}         \pgfextractx\tempAX{\pgfpointanchor{A}{center}}         \pgfextracty\tempAY{\pgfpointanchor{A}{center}}              \coordinate (C) at (\y);         \newdimen{\tempBX}         \newdimen{\tempBY}         \pgfextractx\tempBX{\pgfpointanchor{C}{center}}         \pgfextracty\tempBY{\pgfpointanchor{C}{center}}              \pgfmathparse{\tempAX-\centerX} \let\deltaY\pgfmathresult         \pgfmathparse{\tempAY-\centerY} \let\deltaX\pgfmathresult              \pgfmathparse{sqrt(\deltaX*\deltaX+\deltaY*\deltaY)} \let\r\pgfmathresult         \pgfmathparse{\deltaX/\r} \let\NormeddeltaX\pgfmathresult         \pgfmathparse{\deltaY/\r} \let\NormeddeltaY\pgfmathresult              \node at ([yshift=0.15*\deltaX,xshift=0.15*\deltaY]\x)  (extra) {};         \draw (extra) -- (y);              \pgfmathparse{\tempBX+\tempAX-\centerX} \let\deltaY\pgfmathresult         \pgfmathparse{\tempBY+\tempAY-\centerY} \let\deltaX\pgfmathresult              \pgfmathparse{sqrt(\deltaX*\deltaX+\deltaY*\deltaY)} \let\r\pgfmathresult         \pgfmathparse{\deltaX/\r} \let\NormeddeltaX\pgfmathresult         \pgfmathparse{\deltaY/\r} \let\NormeddeltaY\pgfmathresult              \pgfmathparse{\centerY+10.*\NormeddeltaX} \let\YR\pgfmathresult         \pgfmathparse{\centerX+10.*\NormeddeltaY} \let\XR\pgfmathresult     %   \draw [cyan] plot coordinates { ([xshift=\XR, yshift=\YR]\x) ([xshift=\XR, yshift=\YR]y) ([xshift=\XR, yshift=\YR]\y) };         \ifthenelse{\equal{\x}{a}}{             \draw [cyan] plot coordinates { ([xshift=\XR, yshift=\YR]a) ([xshift=\XR, yshift=\YR]b) ([xshift=\XR, yshift=\YR]c) ([xshift=\XR, yshift=\YR]y) ([xshift=\XR, yshift=\YR]a) };         }{             \ifthenelse{\equal{\x}{c}}{                 \draw [cyan] plot coordinates { ([xshift=\XR, yshift=\YR]c) ([xshift=\XR, yshift=\YR]d) ([xshift=\XR, yshift=\YR]e) ([xshift=\XR, yshift=\YR]y) ([xshift=\XR, yshift=\YR]c) };}{                 \draw [cyan] plot coordinates { ([xshift=\XR, yshift=\YR]e) ([xshift=\XR, yshift=\YR]a) ([xshift=\XR, yshift=\YR]y) ([xshift=\XR, yshift=\YR]e) };             }         }     }     \end{tikzpicture}     \begin{tikzpicture}     \end{tikzpicture}     \end{center}     \end{document}      ![update](http://i.stack.imgur.com/F3R7J.jpg) * * * Update 2: I think I'm good for now, c.f. results below.               \documentclass[11pt]{article}     \usepackage{ifthen}     \usepackage{etex}     \usepackage{tikz}     \usepgfmodule{shapes}     \usepgfmodule{plot}     \usetikzlibrary{decorations}     \usetikzlibrary{arrows}     \usetikzlibrary{snakes}     \begin{document}     \begin{center}     \begin{tikzpicture}     \coordinate (a) at (-2.5,0.5);     \coordinate (b) at (-1.5,2);     \coordinate (c) at (0.5,2);     \coordinate (d) at (2,0);     \coordinate (f) at (1,-1.0);     \coordinate (e) at (0.5,-2.5);     \coordinate (y) at (0,0);     \newdimen{\centerX}     \newdimen{\centerY}     \pgfextractx\centerX{\pgfpointanchor{y}{center}}     \pgfextracty\centerY{\pgfpointanchor{y}{center}}          \foreach \x/\y in {a/c, c/d, d/e, e/a} {         \newdimen{\tempAX}         \newdimen{\tempAY}         \pgfextractx\tempAX{\pgfpointanchor{\x}{center}}         \pgfextracty\tempAY{\pgfpointanchor{\x}{center}}              \newdimen{\tempBX}         \newdimen{\tempBY}         \pgfextractx\tempBX{\pgfpointanchor{\y}{center}}         \pgfextracty\tempBY{\pgfpointanchor{\y}{center}}              \pgfmathparse{\tempAX-\centerX} \let\deltaY\pgfmathresult         \pgfmathparse{\tempAY-\centerY} \let\deltaX\pgfmathresult              \pgfmathparse{sqrt(\deltaX*\deltaX+\deltaY*\deltaY)} \let\r\pgfmathresult         \pgfmathparse{\deltaX/\r} \let\NormeddeltaX\pgfmathresult         \pgfmathparse{\deltaY/\r} \let\NormeddeltaY\pgfmathresult              \node at ([yshift=0.15*\deltaX,xshift=0.15*\deltaY]\x) (extra-\x) {};         \draw (extra-\x) -- (y);     }     \foreach \x/\y in {a/c, c/d, d/e, e/a} {         \newdimen{\tempAX}         \newdimen{\tempAY}         \pgfextractx\tempAX{\pgfpointanchor{\x}{center}}         \pgfextracty\tempAY{\pgfpointanchor{\x}{center}}              \newdimen{\tempBX}         \newdimen{\tempBY}         \pgfextractx\tempBX{\pgfpointanchor{\y}{center}}         \pgfextracty\tempBY{\pgfpointanchor{\y}{center}}              \pgfmathparse{\tempBX+\tempAX-\centerX} \let\deltaY\pgfmathresult         \pgfmathparse{\tempBY+\tempAY-\centerY} \let\deltaX\pgfmathresult              \pgfmathparse{sqrt(\deltaX*\deltaX+\deltaY*\deltaY)} \let\r\pgfmathresult         \pgfmathparse{\deltaX/\r} \let\NormeddeltaX\pgfmathresult         \pgfmathparse{\deltaY/\r} \let\NormeddeltaY\pgfmathresult              \pgfmathparse{\centerY+10.*\NormeddeltaX} \let\YR\pgfmathresult         \pgfmathparse{\centerX+10.*\NormeddeltaY} \let\XR\pgfmathresult         \node[overlay] at ([xshift=1000.*\XR, yshift=1000.*\YR]y) (extra-\x-clip) {};         \draw[black] plot coordinates { ([xshift=\XR, yshift=\YR]\x) ([xshift=\XR, yshift=\YR]y) ([xshift=\XR, yshift=\YR]\y) };         \begin{scope}         \clip[overlay] plot coordinates { ([xshift=\XR, yshift=\YR]extra-\x) ([xshift=\XR, yshift=\YR]y) ([xshift=\XR, yshift=\YR]extra-\y) (extra-\x-clip) };         \fill[draw, fill=black!20]  plot [smooth cycle, tension=0.95] coordinates { ([xshift=\XR, yshift=\YR]a) ([xshift=\XR, yshift=\YR]b) ([xshift=\XR, yshift=\YR]c) ([xshift=\XR, yshift=\YR]d) ([xshift=\XR, yshift=\YR]f)  ([xshift=\XR, yshift=\YR]e) };         \end{scope}     }     \end{tikzpicture}     \end{document}      ![final](http://i.stack.imgur.com/azutM.png)


title: How to create a table format of 81 columns which can fit into one page?

text: I want to create a table of 81 columns in landscaped mode, tiny font is ok. I changed the `\documentclass` to landscape, however the font was still too big to fit in. Any suggestion or idea would be greatly appreciated.               \documentclass[landscape,6pt,letterpaper]{article}     \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}      \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{amssymb}     \usepackage{polynomial}     \usepackage{layouts}     \usepackage{enumerate}     \usepackage{syntax}     \usepackage{gensymb}     \usepackage{enumitem}     \usepackage{cancel}     \usepackage{calc}     \usepackage{enumerate}     \usepackage{xcolor}               \begin{document}          \setlength{\parindent}{0pt}     \setlength{\parskip}{1ex}         \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}         0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 &          0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 &          0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 &          0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 &          0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 &          0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 &          0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 &          0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 8         \end{tabular}     \end{document}


title: Can a table include a horizontal dashed line?

text: In a normal table, you can use the `\hline` command to draw a horizontal line. I am trying to make this line a dashed horizontal line. I have found the package `dashrule` via this answer, but this only works for `\rule` situations; i.e. it can't be directly used as a line in a table, and LaTeX won't compile it. Conversely, I've tried wrapping the `\hdashrule` in a multicolumn:               \multicolumn{5}{|c|}{\hdashrule{130mm}{1pt}{4pt}} \\      However, the padding around the table cell breaks the flow of the table, and the horizontal rule is not aligned with the other `\hline`s of the table. (It also means that the rule width must be specified manually.) Is there any way to make a `\hline` dashed without resorting to tables-in- tables? Can you force a single table cell to have no vertical or horizontal margins and padding?


title: Indexing, subentries, and see also

text: I'm creating an index using `makeindex` and I can't get the output to look the way I want. Basically, I would like to create an entry formatted as follows: > entry1   >  ~~~subentry1, 2   >  ~~~subentry2, 3   >  ~~~ _see also_ entry2 I can't figure out how to format the `\index` command so that the last line appears properly. The best I've come up with is `\index{entry1!z@{}|seealso{entry2}}`, but starts the entry off with a comma. Anyone else encounter this incredibly specific and OCD problem? EDIT: Ok, here's an example that demonstrates the issue:               \documentclass[12pt]{memoir}     \makeindex          \begin{document}          Lorem ipsum     \index{entry1!subentry1}     \index{entry1!subentry2}     \index{entry1!z@{}|seealso{entry2}}          \printindex     \end{document}


title: How do I include all authors of cited works in an index of persons?

text: I use the splitidx package to create a special index of named persons.               \usepackage[makeindex,protected]{splitidx}     \newindex[Index of people]{person}     \setindexpreamble[person]{...}      To index people as "Surname, Given", I created two simple macros:               \newcommand{\person}[2]{\sindex[person]{#2, #1}#2}% "Given Surname" in text     \newcommand{\Person}[2]{\sindex[person]{#2, #1}#1 #2}% "Surname" only in text      This works at least for people with given and surname (unlike names such as "Plato"). Now I also want to include authors of cited works in the people index with page numbers where I cited them. The page numbers when I cited their work should be set in a different style to see whether I mentioned the person or one of its works. Any idea how to do this automatically? Simply rewriting the \cite command will not help, because it only gets the citation key as argument. I use the biblatex package for citations, maybe this helps.


title: Circling label in TikZ

text: To label a node with "1" in TikZ, I can use               \path (0,1) coordinate (P1) node[right=0.05cm] {1};      Is there a way to circle the label "1"?


title: How can I change the legend's location in a pgfplot?

text: For a report I am preparing several figures that I exported from Matlab using the matlab2tikz script. However, the location of the legend does not please me. Here is an example plot: ![alt text](http://i.stack.imgur.com/7CMCh.png) I want to move the legend into the bottom right (souh east) corner. I tried doing this applying the command `legend pos=south east` as explained in the pgfplots manual, page 117. However, this does not change anything but rather delivers a `finished with exit code 1` message. **Did anything change unnotedly in the pgfplots package? Or how do I properly move the legend?** Minimal example that produces `exit code 1`:               \documentclass{scrartcl}          \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[%     scale only axis,     width=0.45\textwidth,     height=0.2\textheight,     xmin=0, xmax=300,     ymin=-2e+06, ymax=1e+07,     legend entries={Analytic solution,GPS data,Kalman filtered},     legend style={nodes=right},     legend pos= south east]          \addplot [color=blue, solid]     coordinates{ (0,7e+06) (0.1,7.0007e+06) (0.2,7.0014e+06) };          \addplot [color=green, solid]     coordinates{ (0,6.99999e+06) (0.1,7.00071e+06) (0.2,7.00143e+06) };          \addplot [color=red, solid]     coordinates{ (0,0) (0.1,7.00071e+06) (0.2,7.00174e+06) };          \end{axis}     \end{tikzpicture}          \end{document}


title: \underfullrule?

text: I always use something like `\overfullrule=1mm` when I am writing Latex documents. I do read all warnings regarding overfull \hboxes, but I still prefer the visual output that very clearly shows exactly which boxes are overfull. Can I somehow have something similar for _underfull_ \hboxes? Some kind of simple visual highlighting that shows exactly where in the final document I have those problematic lines of text? I am using pdflatex in case it matters.


title: How could I create this type of diagram in LaTeX?

text: I would like to recreate the following diagram in LaTeX: ![enter image description here](http://i.stack.imgur.com/6ZiH9.jpg) Something that uses TikZ is likely to be good and I have seen TikZ-UML which is somewhat similar to what I want, but I would really value some guidance. I'm not sure how to go about creating a diagram like this in TikZ. Thank you for any ideas you may have.


title: Use autocite=footnote with style=authoryear-ibid in biblatex and enclose only the year in parentheses

text: I'm using the following configuration to cite sources:               \usepackage[backend=bibtex, style=authoryear-ibid, autocite=footnote]{biblatex}      One of my indirect citations looks like this:               \autocite[Vgl.][123]{ruschmeyer}      I get this result: > Vgl. Ruschmeyer u. a. 1995, S. 123 I'd rather like to get this result, according to my university's guidelines: > Vgl. Ruschmeyer u. a. (1995), S. 123 How can I enclose the year in brackets and keep everything else as it is? I've read about `\DeclareAutoCiteCommand`, but it seems to do a lot more than what I need. I had a look at this solution, but it does not work for indirect citations and the parentheses also include the pagenumbers. Thank you for your help!


title: Dash in Environment Name

text: I'm trying to make a verbatim environment called "my-environ"               \documentclass{article}          \usepackage{fancyvrb}          \DefineVerbatimEnvironment{myenviron}{Verbatim}{numbers=left,frame=lines,label=My Environ,labelposition=topline}          %\DefineVerbatimEnvironment{my-environ}{Verbatim}{numbers=left,frame=lines,label=My-Environ,labelposition=topline}          \begin{document}          \begin{myenviron}     Hello     \end{myenviron}          %\begin{my-environ}     %Hello     %\end{my-environ}          \end{document}      If you uncomment the code, you'll see that it doesn't compile. I don't have to use `fancyvrb`, but I would like similar functionality.


title: Insert some simple path in LaTeX document

text: I'd like to insert some simple linux path inline with the text in my LaTeX document by using basic elements like:               \texttt{/usr/share/myspell/dicts/hyph_pl_PL.dic}      ..but it failed and this error below appears:               ! Missing $ inserted.     <inserted text>     $     l.221 ...{/usr/share/myspell/dicts/hyph_pl_PL.dic}     I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.     ! Extra }, or forgotten $.      I'm not sure why it appears, but for sure am not try to use math environment in this case, so what the compiler tried to explain to me. Is there some simple workaround of this trivial problem? Some examples would be the perfect answer. Details: using `TeX Live 2013` with `Texmaker 4.1.1` on `Ubuntu 14.04`.


title: Nomenclature cutting off some entries

text: The nomenclature is cutting off some entries. I have more entries than one page can hold so instead of printing to another page, it is truncating the nomenclature and only printing the first few entries that can fit on one page. Anyone have a solution? I'm using the article class if that helps. MWE:               \documentclass[11pt, oneside]{article}            \usepackage{geometry}                            \geometry{letterpaper}                                \usepackage{amsmath}     \usepackage{graphicx}                    \usepackage{amssymb}     \usepackage{nomencl}                     \usepackage{graphicx}     \usepackage{color}     \begin{document}          \nomenclature{$D_h$}{Hydraulic Diameter [m]}     \nomenclature{$P$}{Wetted Perimeter [m]}     \nomenclature{$\eta_f$}{Individual Fin Efficiency}          % plus a lot more entries          \printnomenclature          \section{Executive Summary}     % main body of text. no issues here          \end{document}


title: Article is already a type "wizard-defined" function name

text: Following this answer http://tex.stackexchange.com/a/85983/17685 I'm trying to create a publication list with `TeXworks`. Basically I did exactly what was in the answer and created two `files plainyr_my.bst` and `Publication.tex`. Then I compile `Publication.tex` into pdfLaTeX. Then I compile `Publication.tex` into BibTeX and see:               This is BibTeX, Version 0.99d (TeX Live 2012)     The top-level auxiliary file: Publications.aux     The style file: plainyr_my.bst     article is already a type "wizard-defined" function name     ---line 592 of file plainyr_my.bst      : function {article      :                  }     Database file #1: Publications.bib     (There was 1 error message)      What is wrong? P.S. I can add the files content to the question, but I'm afraid that it would be inappropriate here, since they are too long.


title: TikZ picture to fit beamer page

text: I am trying to put `tikzpicture` in `beamer`. Currently, I am creating it in a separate PDF file in `article` mode and then crop it; because I have no idea how I can scale the `tikzpicture` to fit my `beamer` window. I am here putting a complete real `flowchart`, that I want to use directly in beamer. Any help will be useful.               \documentclass[12pt]{beamer}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[latin1]{inputenc}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \pagestyle{empty}     \begin{document}     \begin{frame}     \pagestyle{empty}     \tikzstyle{decision} = [diamond, draw, fill={rgb:red,3;green,39;blue,233},          text width=4.5em, text badly centered, node distance=4cm, inner sep=0pt, text=white, font=\bfseries]     \tikzstyle{block} = [rectangle, draw, fill={rgb:red,3;green,39;blue,233},          text width=8em, text centered, rounded corners, minimum height=4em, node distance=2cm,       text=white, font=\bfseries]     \tikzstyle{line} = [draw, -latex', line width=2pt]     \tikzstyle{cloud} = [draw, ellipse,fill={rgb:red,0;green,114;blue,255}, node distance=4cm,     text width=5em, text centered, minimum height=2em, text=white, font=\bfseries]           \begin{tikzpicture}[node distance = 2cm, auto]         \node [block] (init) {initialize model};         \node [cloud, left of=init] (expert) {$V^{(2)}_{ij}$ from \textit{ab initio} DFT};         \node [cloud, right of=init] (system) {lattice structure};         \node [block, below of=init] (identify) {identify models (Ising/ Heisenberg)};         \node [block, below of=identify] (mc) {Monte Carlo};         \node [block, below of=mc] (evaluate) {Metropolis Alogorithm};         \node [block, left of=evaluate, node distance=4cm] (iteration) {Iterate};         \node [decision, below of=evaluate, node distance=3cm] (decide) {System Converged?};         \node [block, below of=decide, node distance=3cm] (stop) {Evaluate $T_c$, magnetization,    correlation  \textit{etc.}};         \node [cloud, right of=evaluate](how) {choose $V^{(2)}_{ij}$ according to shell and local concentration};         % Draw edges         \path [line] (init) -- (identify);         \path [line] (identify) -- (mc);         \path [line] (mc) -- (evaluate);         \path [line] (evaluate) -- (decide);         \path [line] (decide) -- node {\large\textbf{yes}}(stop);         \path [line,dashed] (expert) -- (init);         \path [line,dashed] (system) -- (init);         \path [line] (decide) -| node [near start] {\large\textbf{no}} (iteration);         \path [line] (iteration) |- (mc);         \path [line,dashed] (how) -- (evaluate);     \end{tikzpicture}        \end{frame}     \end{document}


title: RevTex 4.1 AIP Bibliography Formatting

text: This is my first question on TeX.SX. I am currently using the ShareLatex AIP template to produce a journal article. I have modified and customized some elements of this project's main TeX file and class file. There are a few files in the project, including the BibTex file. My main problems lie within the bibliography and citation sections. I want to obtain a bibliography in-text citation numerically with a superscript and square brackets also, so in other words, a square bracket superscript numerical citation, like 3, but in superscript. How would I achieve this? Furthermore, I want to completely modify the reference section. I do not like the formatting at all. I would like to get rid of the quotes that surround every title. Instead of this: A. Gusnanto, H. Wood, Y. Pawitan, P. Rabbitts, and S. Berri, "Correcting for cancer genome size and tumourcell content enables better estimation of copy number alterations from next-generation sequence data," Phys. Rev.28, 262 (2012). I want it to look like this: Gusnanto, A., Wood, H., Pawitan, Y., Rabbitts, P., and Berri, S. Correcting for cancer genome size and tumourcell content enables better estimation of copy number alterations from next-generation sequence data. _Phys. Rev_. **28** , 262 (2012). I am attaching a MWE for the project. I am completely new to LaTex. Please excuse my lack of knowledge or ignorance, for I am only a high school junior. Also my MWE has some formatting errors (namely with the new column starting in the reference section) This is my aipsamp.bib This is my aipsamp.tex This is revtex4-1.cls Thanks for any help! Believe me, I have already spent 6 grueling unproductive hours trying to make it work, so ANY help is greatly appreciated.


title: Prevent display math from creating a new line at the start of an item?

text: \begin{description}     \item[xyz] \[x=y\]     \end{description}      `x=y` appears on the line below `xyz`, if I changed `\\[x=y\\]` to some normal text it wouldn't create the new line. How can I stop it?


title: How to insert subscript in LaTexDraw?

text: I wish to insert a simple vertex name like a1. All I want is to put 1 as subscript of a. I couldnot figure out how to do it in LaTexDraw.


title: Border-top display

text: I need to display border on the very top of a page and I can't figure out how to do that. If it helps in CSS it would be: border-top: 5px solid blue; Thanks in advance for any help.


title: Gradient filling with PSTricks

text: Consider the following:               \documentclass{article}          \usepackage{pstricks-add}          \begin{document}          \begin{figure}      \centering       \begin{pspicture}(2.4,0.6)        \rput(1.2,0.25){Springboldene}     %   \psset{linestyle=none}        \multido{\r=0.3+0.45}{5}{\pscircle(\r,0.3){0.3}}       \end{pspicture}     \end{figure}          \end{document}      How do I fill the five circle with a gradient color that stretches over all five of them, starting with orange at the left and going to green at the right? I would like to remove the circles themselves (therefore `linestyle=none`) but fill the inner of them as explained.


title: Using class file located in non-root directory with LyX

text: I would like to use the template `elsarticle.lyx`, but apparently I'm missing `elsarticle.cls`. Unfortunately I don't have root rights, so I can't follow most instructions on the web on installing new packages. What I did instead was to get the elsarticle package from CTAN, and put it in a directory `~/texmf`. The environment variable `TEXMFHOME` was not defined, so I executed `export TEXMFHOME=$HOME/texmf/`, followed by a call of `texhash`. From what I can tell that worked just fine. Now I reconfigure and restart LyX, but it still complains about the missing `elsarticle.cls` when I try to use the template.


title: How to select all occurrences of a specified word in a string and append another word to each of them?

text: When using `infix-RPN` package, we can use `\infixtoRPN` to convert infix expression to RPN expression. The output of the conversion can be retrieved by invoking `\RPN`. `\infixtoRPN{cos(x)+sin(x)}`, for example, will yield `x cos x sin add` that is available in `\RPN`. My question, how to insert `RadtoDeg` right after the `x`? So the final will be `x RadtoDeg cos x RadtoDeg sin add`. The skeleton is given as follows.               \documentclass{article}     \usepackage{infix-RPN}          \def\f(#1){cos(#1)+sin(#1)}          % #1 target word     % #2 inserted word     \def\appendtoRPNafter#1#2{%         %implementation using \RPN goes here!         %don't forget to return the result!     }     \begin{document}         \infixtoRPN{\f(x)}%         \appendtoRPNafter{x}{RadtoDeg}%     \end{pspicture}     \end{document}


title: Self-defined Width of the Pseudocode Box with algorithmicx?

text: This post has beautifully shown how to make the algorithm pseudocode box as wide as one column or two columns. I am now writing a pseudocode with many `if` layers. So a one-column box cannot suffice. However, the layers are not that many to span over two columns. So my problem is that if I use the two-column box, the RHS is too empty and the comments are too far away from the code. **One-column, too narrow. Two-column, too wide.** **Can I define the width of the algorithm box myself, say 1.5 columns wide?**


title: Underbrace color change using \only<> and \textcolor{}{} slightly shifts the content

text: I am making a presentation using `beamer` and am trying to make `underbrace{}{}` appear using `\textcolor{}{}` and `\only<>`. I use the code               \documentclass{beamer}     \usepackage{bm}          % Just some newcommands.     \newcommand{\msum}[2][]{\sum \limits_{#2}^{#1}}     \newcommand{\norm}[1]{\left|\left|{#1}\right|\right|}     \newcommand{\nqb}[1]{{#1}^{\perp}}     \newcommand{\nqj}[1]{\check{#1}}     \newcommand{\textblack}[1]{\textcolor{black}{#1}}     \newcommand{\textb}[1]{\textcolor{blue}{#1}}     \newcommand{\textg}[1]{\textcolor{green}{#1}}     \newcommand{\textr}[1]{\textcolor{red}{#1}}     \newcommand{\textw}[1]{\textcolor{white}{#1}}          \begin{document}         \begin{frame}             \only<1>             {                 \[                     \nqj{\psi}_j:=\textw{\underbrace{\textblack{\psi_j}}_{\bm{g}}                     \textblack{-}                     \underbrace{\textblack{\msum[j-1]{k=1}(\psi_j,\nqb{\psi}_k)\nqb{\psi}_k}}_{\bm{h}}},                     \quad\nqb{\psi}_j:=\dfrac{\nqj{\psi}_j}{\norm{\nqj{\psi}_j}}                 \]             }             \only<2->             {                 \[                     \nqj{\psi}_j:=\textblack{\underbrace{\textblack{\psi_j}}_{\bm{g}}                     \textblack{-}                     \underbrace{\textblack{\msum[j-1]{k=1}(\psi_j,\nqb{\psi}_k)\nqb{\psi}_k}}_{\bm{h}}},                     \quad\nqb{\psi}_j:=\dfrac{\nqj{\psi}_j}{\norm{\nqj{\psi}_j}}                 \]             }                \end{frame}     \end{document}      in which I only change the color of a part of the text. Nonetheless, looking at the two resulting slides, the content shifts a bit. How can I avoid this? Or is there perhaps a better way to get `\underbrace`s to appear? The solution as proposed in Using \only<#> to change text color causes spacing issues does not work, I believe.


title: Reference source code line in minted environment with cleveref

text: I'd like to reference lines in the `minted` environment (solved here for regular `\ref`) using cleveref. MWE:               % !TEX TS-program = arara     % arara: pdflatex: { shell: yes }     % arara: pdflatex: { shell: yes }          \documentclass{article}     \usepackage{minted}     \usepackage{cleveref}          \begin{document}     \section{First section}          \begin{minted}[linenos=true, mathescape]{c}     int i = 0;     int j = 1; // label $\label{ln:unreachable1}$     \end{minted}          Test with ref: \ref{ln:unreachable1}          Test with cref: \cref{ln:unreachable1}          \end{document}      Gives ![enter image description here](http://i.stack.imgur.com/eHNnq.png) i.e. the containing section instead of "line $number".


title: Format section's title with \renewcommand

text: I have tried to make my sections appear as "Section I : My section's title" or "Section I My section's title" with the `\renewcommand\thesection...` command but in the table of contents the word "Section" is not appearing at the right place. It looks like this: ![enter image description here](http://i.stack.imgur.com/g4599.png) This is my MWE:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage[francais]{babel}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{mathptmx}     \usepackage{amssymb}     \usepackage[left=1cm,right=1cm,top=1.5cm,bottom=1.5cm]{geometry}     \title{my title}     \renewcommand\thesection{Section \ \Roman {section}}     \begin{document}     \maketitle     \tableofcontents     \pagebreak     \section{my section}     \end{document}      Thank you in advance for you help.


title: How to exclude some algorithms for \listofalgorithms

text: I tried with `\captionsetup{list=no}` but it doesn't work for the algorithm listing. Any ideas? I am splitting alg. over several pages using `algorithm2e` and don't want the captions of the split algorithms to show.               \begin{algorithm}[ht]     \caption*{MyAlgorithm}     \captionsetup{list=no}     \label{alg:myalg2}     \end{algorithm}      Right now the dots are showing without the name, i wan't to get rid of the dots. Thanks.


title: Is it possible to get the name of the referenced item together with a label?

text: If I define a figure, table, code listing or anything similar with a caption and a label, how can I get the item name together with the reference label? For example, if I define a figure:               \begin{figure}         \includegraphics{figures/figure.png}         \caption{Some figure.}         \label{figure:some-figure}     \end{figure}      what do I need to do to avoid writing: `Figure \ref{figure:some-figure} shows` and write `\ref{figure:some-figure} shows` to produce the following output: "Figure 1 shows" ?


title: Missing section links in table of contents (memoir class, custom section headings)

text: I am trying to add a table of contents to a document produced using the memoir class. I have customized the section headings to emulate a publication I like. When I produce the pdf (using xelatex -shell-escape), the chapter-level and subsection-level hyperlinks in the table of contents work as expected, but the section-level hyperlinks do not. There is the appearance of a hyperlink for each section, but when I click on one, nothing happens. Two constraints:   1. I need to stay in the memoir class.   2. The section (and sub-section) headings need to appear as formatted below (e.g., I don't want section numbering). Two observations:   1. If I set the section numbering depth to 'section', the hyperlinks work as desired (but then I get numbered sections).   2. If I add \bfseries or any other series to \setsecheadstyle{\Large\scshape\MakeLowercase}, then the hyperlinks work (but again, I lose the formatting desired). Minimal working example:               \documentclass[11pt,oneside,article]{memoir}     \usepackage{graphicx,url}     \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{listings}     \setcounter{tocdepth}{2}     \usepackage[usenames,dvipsnames]{color}                          \usepackage[xetex]{hyperref}        \usepackage{lipsum}     \setsecheadstyle{\Large\scshape\MakeLowercase}      \setsubsecheadstyle{\normalsize\itshape}      \setsubsubsecheadstyle{\small\bfseries}     \setaftersubsubsecskip{-1em}     \maxsecnumdepth{chapter}     \setsecnumdepth{chapter}      \setaftersecskip{1.7ex}          \begin{document}           \maketitle                                                                 \tableofcontents          \section{Introduction}     \lipsum     \section{Another Section}     Text.     \subsection{Subsection 1}     Text.     \subsection{Subsection 2}     Text.     \section{Last Section}     Text.          \end{document}


title: In bibtex/natbib, is there a way to have a shortened name in the citation vs the bibliography

text: For example, Mary Carter (not her real name) published a book under her married name, Mary Carter van der Merwe. She subsequently got divorced, and resumed her maiden name professionally. In the text I would like to cite her book as Carter (2003), even though in the bibliography it will be listed under Carter van der Merwe, M. Is there an automated way to do this? I know that I could do it simply by typing Carter and then using the year-only form of the citation. Thanks!


title: Years before note with BibLaTeX?

text: How do I order the outcome of BibLaTeX? I would like to have year before the note.   I currently just use               \usepackage{biblatex}        %preamble end          \printbibliography[title={Internet}, type=misc]      I have defined an internet source as               @misc{t100b,       author = {Interbrand},       title = {{Best Global Brands 2012}},       howpublished = "\url{http://www.interbrand.com/en/best-global-brands/2012/Best-Global-Brands-2012-Brand-View.aspx}",       year = {2012},       note = "Visited the 19/12/2012"     }      in my internet.bib file.   It looks like > Interbrand. _Best Global Brands 2012._ http://www.interbrand.com/en/best- > global-brands/ 2012/Best-Global-Brands-2012-Brand-View.aspx. Visited the > 19/12/2012. 2012. I would like it to be > Interbrand. _Best Global Brands 2012._ http://www.interbrand.com/en/best- > global-brands/ 2012/Best-Global-Brands-2012-Brand-View.aspx. 2012. Visited > the 19/12/2012. Is it possible to get the year before the note? It is currently sorted by list af appearance, which I would like to continue using.


title: Overlay text over stealth in TikZ?

text: I try to make my text overlay over the stealth, as if that part of stealth is covered by the text and thus invisible. What I have now is               \documentclass[a4paper]{article}     \usepackage{tikz}     \usetikzlibrary{backgrounds, calc, positioning, fit}          \begin{document}          \begin{tikzpicture}         \node[draw] (a) {A node};         \node[draw,align=center] (b) at (0,-5) {Another\\node};         \draw[-stealth] (a.west) --++ (-1, 0) |- (b.west)node[pos=0.4, above]{Text};     \end{tikzpicture}          \end{document}      which gives me ![enter image description here](http://i.stack.imgur.com/JuVXw.png) As can be seen the stealth "goes through" the text node, which is undesired. How can I fix it?


title: Trouble with tikz and def

text: I'm trying to combine two different suggestions people made about an earlier question I asked. I'm getting a bunch of errors, but I'm not sure what the problem is. The code is:               \documentclass[border=2mm]{standalone}     \usepackage{tikz}        \usetikzlibrary{calc}     \def\mycurve#1{(0,0) to[out=70, in=180] (5,1.8)#1}     \begin{document}       \begin{tikzpicture}     \clip (-0.1,-0.1) rectangle (5,3);                                        \draw[help lines,->] (0,0) -- (4.2,0);                                    \draw[help lines,->] (0,0) -- (0,3);   % draw axis lines                  \draw[gray,dashed] (0,2) -- (4.2,2);   % draw asymptote                   \draw[domain=0.5:4.6,very thick,red,->,samples=400] \mycurve;% draw plot          \foreach \x  in {0.25,0.5,...,4}                                                      {         \draw[help lines,->] (\x,0) -- ($(\x,\mycurve)-(0,0.6pt)$);       }          \end{tikzpicture}                                                               \end{document}      I think the problem is at the end, where I try to make the vertical lines relative to the curve; it works if the curve is defined as a hyperbola, as in `\def\mycurve#1{{1/(-(\x+#1))+2}}`, but if I define an arbitrary curve it doesn't. Can I not do that, or did I make a code mistake somewhere?


title: Error My Way Modules at ConteXt ?

text: I want to make a document from My Way Modules at ConTeXt, like this example :               \usemodule[mag-01]     \setvariables     [magazine]     [title={Introduction},     author=Hans Hagen,     affiliation=PRAGMA ADE,     date=Januari 2003,     number=0]     \startbuffer[abstract]     This is the zero issue of a semi periodical. The     associated style can be used by \CONTEXT\ users to     typeset and publish their own issues.     \stopbuffer     \starttext \setups [titlepage] \setups [title]     \setupheadertexts[welcome]     This is the zero issue of a range of \CONTEXT\ related     publications, in most cases short introductions to new     functionality. The style may be used by users for providing     similar documents, but preferably not for other purposes,     since it may confuse readers in their expectations.     We’ve chosen a layout which is more functional than     beautiful. This layout provides several text areas: headers     and footers, margins and edges as well as a main text area.     The surrounding (gray) makes the main page (which is     slightly smaller than A4) stand out and is suitable for     viewing in spread mode.     The documents produced at \PRAGMA\ are called {\bf This     Way}, user documents gets the title {\bf My Way}. The     \PRAGMA\ issues are numbered. We strongly advise you not to     use the \type {mag-} prefix for your issues, since this may     lead to clashes with files distributed by \PRAGMA.     \setups [listing] \setups [lastpage] \stoptext       But , i get error like this :               Command Line:   C:\context\tex\texmf-mswin\bin\context.exe "My Ways.tex"     Startup Folder: D:\My Ways               mtx-context     | run 1: luatex --fmt="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="My Ways" --lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./My Ways.tex" --c:input="./My Ways.tex" --c:kindofrun=1 --c:maxnofruns=8 "cont-yes.mkiv"     This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5024)       \write18 enabled.     open source     > 1 > 1 > C:/context/tex/texmf-context/tex/context/base/cont-yes.mkiv          ConTeXt  ver: 2014.06.22 19:58 MKIV beta  fmt: 2014.6.25  int: english/english          system          > 'cont-new.mkiv' loaded     open source     > 2 > 2 > C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv     close source    > 2 > 2 > C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv     system          > files > jobname 'My Ways', input './My Ways', result 'My Ways'     fonts           > latin modern fonts are not preloaded     languages       > language 'en' is active     open source     > 2 > 3 > D:/My Ways/My Ways.tex     resolvers       > modules > 'mag-01' is loaded     open source     > 3 > 4 > C:/context/tex/texmf-context/tex/context/base/s-mag-01.tex          tex error       > error on line 140 in file C:/context/tex/texmf-context/tex/context/base/s-mag-01.tex: ! Undefined control sequence          l.140 \setupoutput               130     \setupbackgrounds [text]  [background=text]     131          132     \definelayer     133       [title]     134       [state=repeat,     135        hoffset=-1cm,     136        voffset=1cm,     137        width=\paperwidth,     138        height=\paperheight]     139          140 >>  \setupoutput     141       [pdftex]     142          143     \setuplayout     144       [width=middle,     145        topspace=1.5cm,     146        height=middle,     147        header=1.5cm,     148        footer=1cm,     149       %grid=yes,     150        headerdistance=.25cm,               ?           Process has been terminated ...      **How to resolve it ?**


title: Typesetting Roman numerals within LaTeX text

text: I want to typeset real Roman numerals (both uppercase and lowercase) in LaTeX text. I've checked out a previous thread but found no satisfactory solution. (In fact, several solutions mentioned in that thread doesn't work for me. I don't know why.) I personally use the straightforward approach of                   \newcounter{counter}                \newcommand{\upperRomannumeral}[1]{\setcounter{counter}{#1}\Roman{counter}}         \newcommand{\lowerromannumeral}[1]{\setcounter{counter}{#1}\roman{counter}}      but it is still not satisfactory. Is there any better way to perform the task?


title: Is there a limit to the size of a tex-file?

text: I've been writing a document for some time now. It is steadily growing and hopefully will continue to do so. Lately I realised that -- although I just recently bought a new MacBook -- when I work on my largest `tex-file` typing is a little slow in `TexShop`. To be precise, when I write a sentence, then I am often finished on the keyboard with typing and still see the letters appear one after another on the screen for, say, two or three seconds until `TexShop` is finally done with the sentence. There is, then, a certain latency. Now, I am aware that this is a separate issue that should be directed at the developers of TexShop, but it started me thinking whether there is   1. a maximum size of a `tex-file` (characters or kilobytes) that one can _technically_ `\input` or `\include` into the the main file which contains the preamble and the `\begin{document}` and `\end{document}` or, alternatively, whether there is   2. a maximum file size that is _recommended_ for a `tex-file` to `\input` or `\include` into the the main file. The question has a bearing on my latency problem, because I could solve the latency problem by subdividing the larger files into smaller ones, but I would prefer not to do so -- actually for no good reason -- unless it was _recommended_ along the lines of question #2. While I would primarily be interested in answers that pertain to `LuaLaTeX`, I guess for other users here on the site answers that pertain to `LaTeX` and `XeLaTeX` will also be interesting.


title: Creation of simple template

text: I have been asked to make a simple LaTeX template for a friend of mine. Here is my attempt:               \documentclass[       danish,       a4paper,       12pt     ]{article}               \usepackage{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[       hmargin=2.4cm,       vmargin=3cm     ]{geometry}     \usepackage{fancyhdr}     \usepackage{graphicx}     %\usepackage{enumitem} Maybe include.     \usepackage{microtype}               \DisableLigatures[f]{encoding=T1}          \setlength\parindent{1em}          \pagestyle{fancy}     \renewcommand*\headrulewidth{0pt}     \setlength\headheight{42.5pt}     \addtolength{\textheight}{-29pt}     \lhead{}     \rhead{\rule{100pt}{38.1424pt}} % Insert logo here via \includegraphics.     \cfoot{\scriptsize Læreruddannelsen i Århus, Trøjborgvej~$82$, $8200$~Aarhus~N, telefon~$87\,55\,30\,00$}               \begin{document}          \vspace*{\baselineskip}     \begin{center}       \textbf{%         {\LARGE\MakeUppercase{bacheloropgave}}\\[\baselineskip]         Emenvalg og -begrundelse\\         (2007-uddannelsen)\\       }       {\scriptsize Jf. Bekendtgørelse om uddannelsen til professionsbachelor som lærer i folkeskolen, $\S~10$}     \end{center}     \vspace{4ex}          \noindent\textbf{Fag}\\     Something\\[1.2\baselineskip]     \textbf{Emne}\\     Something\\[1.2\baselineskip]     \textbf{Emnebegrundelse}\\     Something     \vspace{4ex}          \noindent\textbf{Navn}\\     Something\\[1.2\baselineskip]     \textbf{Studienummer} \hspace{5em}    \textbf{Stamhold}\\     $123\,456$            \hspace{9.01em} $12.34$\\[1.2\baselineskip]     \textbf{Underskrift}          \end{document}      My main problem is that when I use `\hspace{5em}` at the bottom of the document, I don't know how to automatically vertically align "Stamhold" and "12.34"; the `9.01em` is found by eye-balling. If there are any other comments to the template, please let me know. P.S. The width of the `\rule` in the header is set precisely to give the same headheight as the logo does.


title: How to prevente cite tags from messing up italics in Org-mode?

text: I'm using Emacs 24.2.1 and I don't think I have any special settings that should interfere. If I enter the following text, there is no problem:               /cite{BibtexRef} Text that is not italicized. /cite{BibtexRef}      But then there is an issue here:               */cite{BibtexRef} I don't want italics here. /I only want them here./*      I'm not understanding why the formatting gets messed up in the second case but not the first. Can someone explain? To get things to look a bit closer to what I want, I am italicizing all my citations, like this.               */cite{BibtexRef}/* Not italicized. */Italicized./*      Could this cause problems with Bibtex? Is there a better solution?


title: Disable hyperlinks in minitoc while the hyperlinks are enabled in ToC

text: Is it possible to have hyperlinked entries in the ToC, while hyperlink is disabled in minitoc?


title: How to align comments in algorithm code?

text: I will to align comments in another column, package algorithm. (Similar question: Faulty right alignment for comments in algorithmic package), but I will to become that result: ![enter image description here](http://i.stack.imgur.com/PLS7D.png)               \usepackage{algorithm,algorithmic}     \renewcommand{\algorithmiccomment}[1]{\bgroup\hfill//~#1\egroup}          [...]          \begin{algorithm}     \caption{$function(n : \mathbb{N}_0) : \mathbb{N}_0$}     \label{algo1}     \begin{algorithmic}[1]        \REQUIRE $n \in \mathbb{N}_0$        \STATE $result \leftarrow 0 : \mathbb{N}_0$        \STATE $temp \leftarrow 1 : \mathbb{N}_0$        \FOR[$n$ Durchläufe]{$i \leftarrow 0$ \TO $n-1$}          \FOR{$j \leftarrow i$ \TO $i$}            \STATE $temp \leftarrow temp \cdot 2$ \COMMENT{Multiplikation}          \ENDFOR          \STATE $result \leftarrow result + temp$ \COMMENT{Addition}          \STATE $temp \leftarrow 1$        \ENDFOR        \RETURN $result$     \end{algorithmic}     \end{algorithm}


title: How to define command like "| (german) for greek language? --: allowhyphens, noligature, minimal space

text: For my polutonikogreek documents I want to use commands/shortcuts like the `"|` of `germanb.ldf`, which is `\declare@shorthand{german}{"|}{\textormath{\penalty\@M\discretionary{-}{}{\kern.03em}\allowhyphens}{}}`. (Some people tend to mark and se"|parate the etymo"|logical parts of a word.) Ι've de"|fined new short"|cuts `\/` and `\|`, which I've used for Greek through"|out all of my documents, but they don't do not"|hing, for what"|ever reason.               \pdfgentounicode=1     \input glyphtounicode     \documentclass[ngerman]{scrbook}     \usepackage{savesym,cmap}     \usepackage[LGR,T1]{fontenc} \usepackage[utf8]{inputenc} \input{ix-utf8enc.dfu}     \input{ix-utf8enc.dfu} \usepackage[main=ngerman,greek,]{babel}     \usepackage[GlyphNames]{teubner}\savesymbol{breve} \savesymbol{aa}     \usepackage{mathpazo} \restoresymbol{pplj}{breve}\restoresymbol{pplj}{aa}     \ifFamily{pplj}{porson}     \usepackage[nonegthinspace,twothirds]{thinsp}     \makeatletter     \renewcommand*{\,}{\thinspace\allowhyphens}%doesn't really work ...     \iflanguage{greek}{\let\/\relax}{}%doesn't work, produces "ρ"s     \let\|\relax %I need something line \/, but without allowing for linebreaks     \addto\greek@shorthands{%       \declare@shorthand{greek}{\/}{\textormath{\penalty\@M\discretionary{-}     {}{\kern.08em}          \allowhyphens}{}} %I don't use "|, as this has special meaning in Greek/teubner, so I choose           \declare@shorthand{greek}{\|}{\textormath{\penalty\@M\discretionary{}{}{\kern.08em}          \nolinebreak}{}} %the same without linebreak, e.g. if it follows the first letter of a word         }     \makeatother     \begin{document}     \begin{otherlanguage}{greek}o\us k \es k\/d\ia\/dwsi, \as ll''\,\esa\|laben\\     οὐκ ἐκ\/δί\/δωσι, ἀλλ''\,ἔ\|λαβεν     \end{otherlanguage}     \end{document}


title: Splitting a sum

text: I have some equations that are long and run off the page if I don't break them onto multiple lines. Some of these equations have a constant on the left and a sum of terms on the right. I find that when I split the right side with the `split` command, the results are kind of ugly:               \documentclass[11 pt]{report}     \usepackage{amsmath}     \begin{document}     \[\begin{split}16801 =& \text{DG:H:HICAP} + \text{DG:H:HIPP} + \text{DG:H:Hilar proj} +\\     & \text{DG:H:Aspiny Hilar}\end{split}\]     \end{document}      ![enter image description here](http://i.stack.imgur.com/yuI2J.jpg) Two things are wrong with this picture:   * the spacing around the equals sign is clearly off   * the plus ending the first line is unusually close to the preceding "j" How can I fix these things? BTW, I got identical results using `align` in place of split.


title: Framed box, over framed text with image

text: ![](http://i.stack.imgur.com/WWTPi.png) Hi all, I'm a newby in LaTeX but after researching online, I have seen that it is possible to create boxes and frames adjusted to text and images. I am trying to achieve something like the image, what would you recommend? I have seen you can use `\ovalbox`, `mdframed`, `beamer`, `TiKZ`… My main issue is framing the title in the position required and insert image. Thanks a lot! :)


title: Setting background color for the whole row/column in a TikZ matrix

text: I'm trying to highlight a whole row/column of a TikZ `\matrix[matrix of nodes]`. ![](http://i.stack.imgur.com/42L7I.png) Luckily, for TikZ matrix we have row/column selectors. So, in theory, the above should be achieved by the following code:               \documentclass{article}          \usepackage{tikz}          \usetikzlibrary{matrix}          \begin{document}            \begin{tikzpicture}              \matrix[matrix of nodes,nodes={draw},row 2/.style={fill=blue!20}] {           a11 & a12 & a13 \\           a21 & a22 & a23 \\           a31 & a32 & a33 \\         };            \end{tikzpicture}          \end{document}      ...but that simply doesn't work. Am I missing something? To produce the image above, I had to manually insert a `|[fill=blue!20]|` before every element of the 2nd row. Defining a style like `\tikzstyle{foo}=[fill=blue!20]` and setting `row 2/.style={foo}` doesn't work either. In the same time, using row/column selectors to set _foreground_ color works (simply `[blue!20]` instead of `[fill=blue!20]`), as well as setting many other properties like font face & size. Seems like a bug in TikZ? Tested with pdfLaTeX, XeLaTeX and luaLaTex on TeXLive 2011.


title: Vertical lines in tables are not drawn document

text: \begin{tabular}{ l | c || r }       1 & 2 & 3 \\       4 & 5 & 6 \\       7 & 8 & 9 \\     \end{tabular}      appears as 1 2 3   4 5 6   7 8 9 so no vertical lines in the table. I can't get any vertical lines to show up in my tables Any ideas?


title: How to work with large projects

text: I am working on a project and i want to slim it down a litle so please help me with the following. I have a document structure like this:               /DocumentRoot      |-main.tex      |-title.tex      |      |-/chapter-1      |  |-/images      |  |-chapter-1.tex      |      |-/chapter-2         |-/images         |-chapter-2.tex      My document is like this:               \begin{document}     \include{./title}     \include{./chapter-1/chapter-1}     \include{./chapter-2/chapter-2}     \include{./chapter-3/chapter-3}     \end{document}      in my chapters i use both some images and some heavy tikz plots so i use externalize and draft options for quicker compilation. But i want the images to be placed in the respective chapter folders but for example in chapter 3 this works:               \includegraphics[width=\linewidth]{./chapter-3/images/img.jpg}      and this doesn't               \includegraphics[width=\linewidth]{./images/img.jpg}      for some reason xelatex has problems with the relative paths of included chapters. I also want to control the location output and the naming of the externalized tikz documents. Any help with that? I am working with miktex and texworks.


title: Is it possible to shift ticks position in a graph to match APA style ?

text: I have been looking for a while for a way to shift ticks on a graph. I found many options regarding ticks positions, labels or size but I could not find a way to move them orthogonally to the axis they are on. I would like to match APA style graphs: shift up all the labels along the x axis and move left all the labels along the y axis so that they only appear on one side of the axis. Currently, the axis cut the ticks in two equal parts as shown below. Would you have any idea on how to move these ticks ?               \documentclass[10pt]{standalone}     \usepackage[T1]{fontenc}      \usepackage{times}      \usepackage{tikz}      \usepackage{pgfplots}      \pgfplotsset{compat=1.6}      \pgfplotsset{ every non boxed x axis/.append style={x axis line style=-},      every non boxed y axis/.append style={y axis line style=-}}     \begin{document}      \footnotesize      \begin{tikzpicture}     \begin{axis}[%     x tick label style={major tick length=5pt},     width=6cm,     height=6cm,     scale only axis,     xmin=-0.8444, xmax=0.8223,     axis lines=left,     xtick={-0.8444,-0.4277,-0.0110,0.4056,0.8223},     xticklabels={-0.8444,-0.4277,-0.0110,0.4056,0.8223},     ymin=0, ymax=0.3]     \addplot [     color=blue,     solid,     mark=*,     mark options={fill=blue,solid}     ]     coordinates{(-0.8444,0.2702)(-0.4277,0.2206)(-0.011,0.171)(0.4056,0.1213)(0.8223,0.0717)};     \end{axis}     \end{tikzpicture}      \end{document}


title: Adding extra columns to the usnomencl nomenclature package

text: I use the package `usnomencl` to create nomenclatures e.g.               \setlength{\UnitLabelWdth}{0.4\textwidth}          \begin{Nomencl}[2em]     \item[$\zeta$] damping ratio     \item[$\theta$] \UnitLine{angular displacement}{rad}     \end{Nomencl}      Looking at the line:               \item[$\theta$] \UnitLine{angular displacement}{rad}      one can see that 3 columns are formed, the first one being the unit name, the second one mentioning what the unit stands for and the last column giving the unit symbol. I would like to add an extra column at the end with the heading `"Pages where defined or first used"`. And then I will manually add the corresponding page numbers. Is there a way to accomplish this?


title: How to get started with plain TeX

text: I am using TeX Live 2010 on Windows 7. I have no experience to compile a plain TeX input file.   1. Is my input file below correct?              % gettingstarted.tex     \input pstricks     \topmargin=-72.27pt     \oddsidemargin=-72.27pt     \paperwidth=72.27pt     \paperheight=72.27pt     \parindent=0pt     \special{papersize=\the\paperwidth,\the\paperheight}          \pspicture(\paperwidth,\paperheight)     \psframe(\paperwidth,\paperheight)     \endpspicture          \bye        2. What is the plain TeX compiler I must execute to get DVI output? And what is the syntax? * * * I have tried using `tex gettingstarted.tex` and I got the following errors: ![enter image description here](http://i.stack.imgur.com/2OSbS.png)


title: Error in format of bib entry

text: I'm trying to use _apalike_ bib style for my references (in ref.bib file). In my tex file I set these settings               \bibliographystyle{apalike}     \bibliography{ref}      I require my reference to be in standard format like:               This is my reference (author1 et al, 2014)      But I'm getting the reference cited using number               This is my reference (1)      My text in tex source file is               This is my reference \cite{ref1}      and the entry in bib file is               @inproceedings{ref1,      author = {author1 and author2 and author3 and author4 and author5},      title = {Title of reference},      booktitle = {Proceedings of the conference},      year = {2014}       How do I get the reference cited in the actual (first) format.


title: Problem with "shapes arrow" in TikZ+LaTeX

text: When I used the following example to print a shape arrow               \documentclass{article}     \usepackage{tikz}     \usepgflibrary{shapes.arrows}      \begin{document}     \begin{tikzpicture}     \node [single arrow,minimum width=1cm,minimum height=2cm] {};     \end{tikzpicture}     \end{document}       the following error happened:               ./arrow.tex:6:Package tikz Error: I do not know what to do with the option ``single arrow''. ...arrow,minimum width=1cm,minimum height=2cm]      Do you know what's the problem?


title: Manipulate title field's strings in biblatex

text: I need to take the first string (considering `First~Second` a single string) from the `title` field from anonym entries and:   1. Format this first string differently from the rest of the title, e.g.: > LES MILLES et un nuit trans. by M. Galland. Paris: Compaigne des Libraires, > 1745. > > THE BOOK of the thousand nights and a night trans. and annot. by Richard F. > Burton. London: Burton Club, 1885.   2. Use that string as a citation label, e.g. > LES MILLES..., 1745; THE BOOK..., 1885 So, the style file needs to check for `author` and `editor` names and, in their absence, reformat the first word of the title to uppercase, as well as use it as a label for quotations. ### My attempt This is what I've tried so far. I tried to achieve this result through the use of `xstring` with something like:               \newbibmacro{author+title}{%         \ifnameundef{author}%             {\ifnameundef{editor}%             {%               \StrCut[1]{\thefield{title}}{ }\StringA\StringB%               \SpecialTitleFormat{\StringA}\space\StringB%               \setunit\newblock             }%             {\usebibmacro{editor}                 \setunit{\labelnamepunct}\newblock                 \usebibmacro{title}}}%             {\usebibmacro{author}%               \setunit{\labelnamepunct}\newblock%               \usebibmacro{title}}      And I tried to remap this string to the `shorttitle` field via biber's `\DeclareSourcemap` functionality               \DeclareSourcemap{       \maps[datatype=bibtex]{         \map[overwrite]{           \step[fieldsource=title,                 fieldset=shorttitle,                 match=\regexp{(\w+).*},                 fieldvalue={$1}]         }       }     }     \renewbibmacro*{labeltitle}{%       \iffieldundef{label}         {\iffieldundef{shorttitle}            {\printfield{title}%             \clearfield{title}}            {\printfield[shorttitle]{shorttitle}}}         {\printfield{label}}}      The problem with this approach is that the citation label and the emphasis in the bibliography are taken from the field through different means, what makes it inconsistent, e.g. the `~` works for the bibliography part, but not for the label. Here's a MWE:               \documentclass{article}     \usepackage{filecontents}     % Bibliographic Database     \begin{filecontents*}{\jobname.bib}     @book{simple,       title = {Simple anonym entry},       publisher = {Publisher},       year = {2013},     }     @book{1001nights,       title = {The~Book of the thousand nights and a night},       subtitle = {A plain and literal translation of the Arabian nights' entertainments},       translator = {Richard F. Burton},       annotator = {Richard F. Burton},       location = {London},       publisher = {Burton Club},       year = {1885},       }     @book{1001nuit,       title = {Les~milles et un nuit},       subtitle = {Contes Arabes},       translator = {M. Galland},       address = {Paris},       publisher = {Compaigne des Libraires},       year = {1745},     }     @book{editoranonym,       title = {An anonym entry with an editor},       editor = {Editor, Ed},       publisher = {Publisher},       year = {2000},     }     \end{filecontents*}     % Biblatex Style file     \begin{filecontents*}{\jobname.bbx}     \ProvidesFile{\jobname.bbx}          \RequireBibliographyStyle{standard}          % I'm redefining the book driver to use an author+title bibmacro     \DeclareBibliographyDriver{book}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author+title}%       \newunit       \printlist{language}%       \newunit\newblock       \usebibmacro{byauthor}%       \newunit\newblock       \usebibmacro{byeditor+others}%       \newunit\newblock       \printfield{edition}%       \newunit       \iffieldundef{maintitle}         {\printfield{volume}%          \printfield{part}}         {}%       \newunit       \printfield{volumes}%       \newunit\newblock       \usebibmacro{series+number}%       \newunit\newblock       \printfield{note}%       \newunit\newblock       \usebibmacro{publisher+location+date}%       \newunit\newblock       \usebibmacro{chapter+pages}%       \newunit       \printfield{pagetotal}%       \newunit\newblock       \iftoggle{bbx:isbn}         {\printfield{isbn}}         {}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \newunit\newblock       \usebibmacro{related}%       \usebibmacro{finentry}}          \RequirePackage{xstring}     \DeclareRobustCommand{\SpecialTitleFormat}[1]{%       \MakeUppercase{#1}}          % author+title bibmacro     % this should check for author and editor, and, in their absence, use     % the title field     \newbibmacro{author+title}{%         \ifnameundef{author}%             {\ifnameundef{editor}%           {%             \StrCut[1]{\thefield{title}}{ }\StringA\StringB%             \SpecialTitleFormat{\StringA}\space\StringB%             \setunit\newblock           }%           {\usebibmacro{editor}                 \setunit{\labelnamepunct}\newblock                 \usebibmacro{title}}}%             {\usebibmacro{author}%               \setunit{\labelnamepunct}\newblock%               \usebibmacro{title}}       }     \DeclareSourcemap{       \maps[datatype=bibtex]{         \map[overwrite]{           \step[fieldsource=title,                     fieldset=shorttitle,                 match=\regexp{(\w+).*},                 fieldvalue={$1}]%                }             }           }          \renewbibmacro*{labeltitle}{%       \iffieldundef{label}         {\iffieldundef{shorttitle}            {\printfield{title}%             \clearfield{title}}            {\printfield[shorttitle]{shorttitle}}}         {\printfield{label}}}          \endinput     \end{filecontents*}          \usepackage[utf8]{inputenc}     \usepackage[bibstyle=\jobname,citestyle=verbose]{biblatex}     \addbibresource{\jobname.bib}     \usepackage{xstring}          \begin{document}          \thispagestyle{empty}          \citetitle{simple} \citetitle{1001nights} \citetitle{1001nuit} \citetitle{editoranonym}          \printbibliography          \end{document}      ![image](http://i.stack.imgur.com/2IvXe.png)


title: Reduce vertical space before minipage

text: My problem: There's more space before my `\chapter` that's inside a `\minipage` environment than before any of the other chapters that are outside this environment. What I'm after: Keep the same distance before every chapter. However, I'd like to keep the two chapers within the two minipages as they are (i.e. vertically aligned). I'm using LuaLaTex-->PDF in order to use the Arial font, although that might be irrelevant. I'd happily use any other solution that does not involve minipage if that is possible. My MWE (using LuaLaTex-->PDF)               \documentclass[a4paper,10pt]{report}     \usepackage[T1]{fontenc}     \usepackage{fontspec}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage[top=20mm, bottom=20mm, left=20mm, right=20mm]{geometry}          \setmainfont{Arial}          \newfontfamily\secfont{Arial}          \definecolor{MSBlue}{rgb}{.204,.353,.541}     \definecolor{MSLightBlue}{rgb}{.31,.506,.741}     \definecolor{light-gray}{gray}{0.5}          \usepackage{sectsty}     \allsectionsfont{\secfont}          \usepackage{titlesec}     \newcommand{\hsp}{\hspace{0pt}}          \titlespacing*{\chapter}{0cm}{0.7cm}{0.2cm}[0pt]     \titlespacing*{\section}{0cm}{0.5cm}{0cm}[0pt]          \titleformat{\chapter}{\normalsize\bfseries\secfont\color{MSBlue}}{\hsp}{0pt}{\normalsize\bfseries\color{MSBlue}}[\vspace{0ex}\titlerule]     \titleformat{\section}{\large\bfseries\secfont}{\hsp}{0pt}{\large\bfseries}          \usepackage{etoolbox}     \makeatletter     \patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}     \makeatother          \begin{document}     \pagestyle{empty}     \pagenumbering{gobble}          \chapter{Some chapter}     \section{some section}     {\color{light-gray}some small text}\\     \blindtext          \chapter{Some other chapter}     \section{some other section}     {\color{light-gray}Some small text}\\%     \blindtext%     \par\smallskip\nointerlineskip%     \noindent\begin{minipage}[t]{0.5\textwidth}     \chapter{Here it is} %                      <--- The culprit!     \begin{tabular}{l l}         \small                  \textbf{cell1}  &| cell6 \\                 \textbf{cell2}  &| cell7 \\                 \textbf{cell3}  &| cell8 \\                 \textbf{cell4}  &| cell9 \\                 \textbf{cell5}  &| cell10     \end{tabular}%     \end{minipage}%     %     \begin{minipage}[t]{0.5\textwidth}         \chapter{And the other one}         \small          Writing some text here     \end{minipage}%          \chapter{The next chapter}     \blindtext          \end{document}


title: Another section numbering format

text: My current section numbering format is something like this: > 1   >  1.2   >  1.2,3 But I want it to be like this: > 1-   >  1-2-   >  1-2-3- What should I do?


title: Remove bibliography headings with multibib and tocbibind

text: I use `multibib` which creates two families of citation commands: `pri` and `sec`. I would like to get rid of bibliography headings for the `\bibliographypri` and `\bibliographysec` commands while keeping the Bibliography heading for the main `\bibliography` at the end of the document. I also use `tocbibind`, as advised here, to include Bibliography in the TOC and have a correct PDF bookmark. I renew `thebibliography` environment to remove the internal `\chapter` code before `\newcites` and then restore it to get the main bibliography right. In the following MWE, using `tocbibind` modifies `\bibliography` in a way that it adds an empty PDF bookmark at the chapter level, which I don't want. Moreover, citations that should be on the same pages as sections _Primary_ and _Secondary_ are two pages farther than expected.               \documentclass{book}     \usepackage[resetlabels]{multibib}     \usepackage[nottoc]{tocbibind}          \makeatletter     \newenvironment{thebibliographynohead}[1]          {%\chapter*{\bibname}%           %\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%           \list{\@biblabel{\@arabic\c@enumiv}}%                {\settowidth\labelwidth{\@biblabel{#1}}%                 \leftmargin\labelwidth                 \advance\leftmargin\labelsep                 \@openbib@code                 \usecounter{enumiv}%                 \let\p@enumiv\@empty                 \renewcommand\theenumiv{\@arabic\c@enumiv}}%           \sloppy           \clubpenalty4000           \@clubpenalty \clubpenalty           \widowpenalty4000%           \sfcode`\.\@m}          {\def\@noitemerr            {\@latex@warning{Empty `thebibliography' environment}}%           \endlist}     \makeatother          \let\thebibliographyold\thebibliography     \let\thebibliography\thebibliographynohead     \newcites{pri,sec}{{},{}}     \let\thebibliography\thebibliographyold          \usepackage{bookmark}          \begin{document}              \frontmatter         \chapter{Abstract}         \chapter{Sources}                  \section*{Primary}                 \addcontentsline{toc}{section}{Primary}                 \nocitepri{greenwade93}                 \bibliographystylepri{plain}                 \bibliographypri{bibliography}                 \clearpage                  \section*{Secondary}                 \addcontentsline{toc}{section}{Secondary}                 \nocitesec{greenwade93}                 \bibliographystylesec{plain}                 \bibliographysec{bibliography}                 \clearpage              \cleardoublepage         \pdfbookmark{\contentsname}{Contents}         \tableofcontents %% Skip from TOC, only PDF bookmark              \mainmatter         \pagenumbering{arabic}         \chapter{Chapter A}         \section{Section A}         Ref.~\cite{greenwade93}.              \backmatter         %\addcontentsline{toc}{chapter}{Bibliography}         \bibliographystyle{plain}         \bibliography{bibliography}         \chapter{Acronyms}          \end{document}


title: Latex Multiple row/column table

text: I am drawing a multiple row and column table using the following syntax.               \begin{table*}[t]     \caption{Evaluation of object recognition }     \begin{center}       \begin{tabular}{ccc|c|c|c|c|c|c|c|cIl}      \whline{4-10}     & & & \multicolumn{7}{ |cI }{\textbf{Objects}} \\ \cline{4-11}     & & & Car & Book & Bear & Plane & Boat & Laptop & Mouse &  \textbf{Average} \\ \whline{2-11}          \multicolumn{1}{ c }{\multirow{6}{*}{Threshold} } &     \multicolumn{1}{ c }{\multirow{2}{*}{60$\%$} } &     \multicolumn{1}{ IcI }{Recall}       & 0.983     & 0.967    & 0.783     & 0.966     &  0.483    & 1.00   &  0.583  & \textbf{0.824}  \\ \cline{3-11} &&     %\multicolumn{1}{ cI  }  {}                           \multicolumn{1}{ IcI }{Pecision}        & 0.463     & 0.645     & 0.469     & 0.841  &  0.632    & 0.738    &  0.843  &  \textbf{0.662}  \\ \whline{2-11} &          \multicolumn{1}{  c  }{\multirow{2}{*}{80$\%$} } &       \multicolumn{1}{ IcI }{Recall}      & 0.917     & 0.933  & 0.633    & 0.317  & -    &  0.95 & 0.15  &  \textbf{0.557}  \\ \cline{3-11} &&     %\multicolumn{1}{ c|  }{}                        &  &     \multicolumn{1}{ IcI }{Pecision}        & 0.652     & 0.885  & 0.329    & 0.454  & -     & 0.709    & 0.891 & \textbf{0.560}   \\ \whline{2-11} &          \multicolumn{1}{ c  }{\multirow{2}{*}{90$\%$} } &     %\multicolumn{1}{ IcI }{Recall}         & 0.75  & 0.743     & 0.05  & 0.083  & -     & 0.767     & -       &  \textbf{0.342}  \\ \cline{3-11} &&     %%\multicolumn{1}{ c|  }{}                           &  &     \multicolumn{1}{ IcI }{Pecision}        & 0.694     & 0.869  & 0.01     & 0.118     &  -    & 0.916 &  - &    \textbf{0.373}    \\ \whline{2-11}          \end{tabular}     \end{center}     \label{tab:recognition}     \end{table*}      Please notice the commented code of the last recall row. When the code is commented the latex compiles and produces a PDF. However when I uncomment the code, it gives an error as follows: ![enter image description here](http://i.stack.imgur.com/xVIWf.png) Can I get some help to fix this error.


title: How would I cite a dataset with BibTeX?

text: I want to output something like this: > Pew Research Center for the People & the Press. (2008). April 2012 Values > Survey [Data file]. Available from Pew Research Center for the People & the > Press Web site: http://www.people-press.org/category/datasets/ How would I enter that into BibDesk? I use BibDesk to manage my citations.