title: Custom authoryear bibstyle to match German dinat

text: I use `biblatex` in my document like this:                 \usepackage[backend=biber,                 hyperref=true,                 sorting=none,                 url=true,                 isbn=false,                 citestyle=authoryear-comp,                 bibstyle=authoryear,                 mergedate=true,                 dashed=false,                 citereset=chapter,                 maxcitenames=3,                 maxbibnames=100,                 block=none,                 eprint=false,                 urldate=comp,                 dateabbrev=false,                 natbib=true]{biblatex}      Which generates a bibliography that looks like this: ![no description](http://i.stack.imgur.com/XhI4g.png) I wish to follow the German `dinat` style bibliography as closely as I can without getting too overwhelmingly complex if possible and without using `natbib`. An example of that would look like this: ![enter image description here](http://i.stack.imgur.com/Uabft.png) How could I go about accomplishing that? The `citestyle` is already ideal and I do not want to change that. Here is the bibliography file.


title: Calculation of an absolute position

text: My question is about calculating with the package textpos. By saving the vertical position of a block of text with zsavepos and calculating the middle of it, I want to position a block of text at the same vertical position. In the following example, it doesn't seem to work. Thank you for your answer.               \documentclass{article}     \usepackage{lipsum}     \usepackage{zref-savepos}     \usepackage[absolute,overlay]{textpos}     \usepackage{calc}          \begin{document}          \zsavepos{begin}     \lipsum[20]     \zsavepos{end}          \begin{textblock*}{2.5cm}[0.5,0.5](2cm,0.5\zposy{begin}sp-0.5\zposy{end}sp)     \noindent \textit{Text that should be centered vertically.}     \end{textblock*}          \begin{textblock*}{2.5cm}[0.5,0.5](2cm,11143907sp)     \noindent \textit{Text approximately properly centered.}     \end{textblock*}          \end{document}


title: Chapter title and abstract in the same page

text: I'm writing a report and I need to write an abstract for the chapter after the chapter title in the same page. How can I do this?


title: Strange problem with frames (ConTeXt tables)

text: > **Leads to a bug report on the ConTeXt mailing list:[dev-context] bTABLE in > header and document give unexpected behavior** When using this code I get a problem with the frame around the header on the last page. It gets the same frame setting as the table. This is a screenshot of what I would expect to see: ![Good Page](http://i.stack.imgur.com/4wly6.png) And this is what I am seeing: ![not so good page](http://i.stack.imgur.com/vF9nt.png) Can someone give me a solution to solve this?               % TABLE SETUP     \setupTABLE[frame=on, framecolor=blue, rulethickness=4pt]     \setupTABLE[header][each][background=color, backgroundcolor=blue, color=white]     \setupTABLE[row][odd][background=color, backgroundcolor=gray]     \setupTABLE[row][even][background=color, backgroundcolor=lightgray]     \setupTABLE[row][last][bottomframe=on]     \setupTABLE[row][test][background=color, backgroundcolor=darkgray]     %     % HeaderStyle -------------------------------------------------------------\          \startsetups[header]         \setupTABLE[frame=on]         \setupTABLE[c][each][width=0.2\textwidth, align=middle, offset=2mm ]         \setupTABLE[c][4][width=0.6\textwidth]         \setupTABLE[r][5][height=\headerheight]              \bTABLE             \bTR               \bTD Rev  \eTD \bTD {\ssbfa \getvariable{document}{projectname}} \\                                    {\ssbfa \getvariable{document}{documenttitle}}\eTD \bTD some text\eTD                     \eTR % End of row 1         \eTABLE           \stopsetups     \setupheadertexts[\setups{header}]                 \starttext     \startbuffer[table]     \bTABLE[split=repeat]         \startTABLEhead             \bTR \bTD No. \eTD \bTD[nc=2] Length         \eTD \eTR             \bTR \bTD     \eTD \bTD{} [m] \eTD \bTD{} [inch] \eTD \eTR         \stopTABLEhead         \startTABLEbody             \bTR[background=color, backgroundcolor=darkgray] \bTD[nc=3] This is a section where I can place this and that \eTD \eTR             \dorecurse{100}             {\bTR \bTD 1.  \eTD \bTD some dummy text.        \eTD \bTD some more dummy text \eTD \eTR}          \stopTABLEbody     \eTABLE     \stopbuffer          \placetable[split, none]{}{\getbuffer[table]}     \stoptext


title: Vertex with two labes (label in, weight out)

text: I use the `tikzpicture` environment to make graphs. I would like to make a vetex in the graph with comondo `\Vertex` with an internal value to the vertex (label's vertex) and another value outside (weight's vertex). I know there is a command LabelOut can do one or the other, but both is not possible. Is there any solution to my problem? Thanks!


title: Is it possible to skip the first line in a theorem environment?

text: I'm currently writing up some solutions, and I like to rewrite the problem before answering it. I've set exercise to be a theorem environment, and the code I'm using is               \begin{exercise}      \begin{enumerate}      \item Show that $R$ is symmetric iff $R^{-1}\subseteq R$.     \item Show that $R$ is transitive iff $R\circ R\subseteq R$.     \end{enumerate}     \begin{proof}     \end{proof}     \end{exercise}      However, when I build, the first item (a) appears immediately to the right of the Exercise heading, and the second item (b) appears below and indented: ![alt text](http://i.stack.imgur.com/2Bhi6.jpg) I've tried using `\newline` and `\linebreak`, and even skipping a line before typing `\begin{enumerate}` after the `\begin{exercise}` command but those don't work. Is there a way to push (a) down below Exercise 3.32. so that it's lined up with (b)? Thank you. As requested, my preamble is:               \documentclass[11pt]{article}     \input{other/packages.tex}     \input{other/theoremdef.tex}      where packages.tex is               \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amscd}     \usepackage{url}     \usepackage[top=1.3in, bottom=1.3in, left=1.3in, right=1.3in]{geometry}          % header and footer     \pagestyle{headings}          \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{stackrel}     \usepackage{mathrsfs}     \usepackage{verbatim}     \usepackage{enumerate}     \usepackage{hyperref}     \usepackage{xy}     \input xy     \xyoption{all}      And theoremdef.tex is:               \newtheorem{exercise}{\bf Exercise}     \newcommand{\dom}{\text{dom}\ }     \newcommand{\ran}{\text{ran}\ }     \newcommand{\fld}{\text{fld}\ }     \newcommand{\op}[2]{\langle #1,#2\rangle}     \newcommand{\ot}[3]{\langle #1,#2,#3\rangle}     \newcommand{\ms}[1]{\mathscr{#1}}


title: The size of a font - larger

text: this is my document:               \documentclass[a4paper,10pt]{article}     \usepackage{czech}          \begin{document}          \begin{quote}     \itshape\uv{V poledne vám přijde textová zpráva z neznámého čísla, že máte večer dorazit ke staré městské továrně. Ne, to není žádná vyděračská akce, ale pozvánka na večeři. V Praze vznikla první pop-up restaurace, která se z ničeho nic objeví na neznámém místě. Organizátoři si sami vybírají hosty a jídla z přísně tajného menu jim servírují na netradičních místech.}     \end{quote}               \begin{quotation}     V poledne vám přijde textová zpráva z neznámého čísla, že máte večer dorazit ke staré městské továrně. Ne, to není žádná vyděračská akce, ale pozvánka na večeři. V Praze vznikla první pop-up restaurace, která se z ničeho nic objeví na neznámém místě. Organizátoři si sami vybírají hosty a jídla z přísně tajného menu jim servírují na netradičních místech.     \end{quotation}          \end{document}      I want to make the size of a font little bit larger. It is the same problem as my someone else has 1 hour ago. It writes me warnings when I use               \fontsize{10.62222pt}{17pt}\selectfont.: Font shape IL2/cmr/m/n in size         10.62222pt pt not available, substituted for 10pt.


title: Use sans-serif in a verbatim environment?

text: What is the right way get `fancyvrb`’s verbatim environment (or any other variation) to use `\textsf` as the font? I can do it with:               \begin{Verbatim}[commandchars=\\\{\}]       \textsf{Here’s some textsf.}     \end{Verbatim}      I would have expected something analogous to the following to work:               \begin{Verbatim}[fontfamily=helvetica]       Here’s some Helvetica.     \end{Verbatim}      but none of the variations I’ve tried (`[fontfamily=sf]`, `[fontfamily=textsf]`, `[fontshape=sf]`, and half a dozen others) seems to work.


title: Pagenumbering - center, foot

text: how can I change the pagenumbering: I want to have numbers in the center in the bottom part of the page and I want to have at the first page number 5.


title: Automatically wrap the text in verbatim

text: In tex environment, when I try to use the verbatim function using verbatim packages, sometimes the longer text in the line tend to be cut off. How can I resize the text to fit into the line or automatically extend the text to the next line so as to retain all the text. For example I have the following text:                   \begin{verbatim}             C **  RAINCVT   =CONVERTS RAIN TO UNITS OF M/SEC , inch/day=0.0254m/86400s=2.94E-7m/s, inch/h=7.05556E-6m/s     C **  EVAPCVT   =CONVERTS EVAP TO UNITS OF M/SEC, IF EVAPCVT<0 EVAP IS INTERNALLY COMPUTED     C **  SOLRCVT   =CONVERTS SOLAR SW RADIATION TO JOULES/S/SQ METER (Watts/m^2)         \end{verbatim}      In my output the first line doesn't show all the text. I would also appreciate if someone could tell how to limit the floating verbatim ? In tables using the label `[h]` at the end would fix the position of the table which doesn't seem to work on verbatim.


title: Document class for a simple one-page assignment

text: I'm looking for a LaTeX document class which would fit a simple one-page assignment with mostly text. I'd still want sections and subsections like those in `article`, but would like:   * more vertical space   * no page numbering   * much smaller title, author name and date Is there such a document class out there? I tried to do this manually in an `article`. The title, author name and date can be solved using fancy header instead, and page numbering is easy to remove, but I can't remove the excessive vertical space on top and bottom. Also, such a solution would be worse from a re-usability viewpoint.


title: Shift horizontal line to the left

text: I am using a horizontal rule to to separate texts, and I would like the rule to start to the left of the current left margin. I am using the following code, but apparently it is not the correct way to do that, as I get the warning: "Overfull \hbox (2.22221pt too wide) in paragraph" What is the correct way? thanks.               \documentclass{article}     \usepackage{xcolor}     \usepackage[english]{babel}     \usepackage{blindtext}      \newcommand{\blockline}{\noindent\hspace{-0.05\textwidth}         \textcolor{orange}{\rule{1.05\textwidth}{5pt}}}     \begin{document}         \noindent\blindtext              \blockline              \noindent\blindtext     \end{document}


title: floatrow is not rendering captions correctly

text: I'm having a couple issues in a latex document being converted to a pdf. I'll put each in separate posts. The first: I can't get my captions to appear over the table. I've Goolged this, and the solution seems very simple: include `\usepackage{floatrow}` and `\floatsetup[table]{capposition=top}` in the preamble. My preamble looks like this:               \documentclass[16pt,]{article}     \usepackage{floatrow}     \floatsetup[table]{capposition=top}     \usepackage{caption}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{amssymb,amsmath}     \usepackage{ifxetex,ifluatex}     \usepackage[titletoc]{appendix}     \usepackage{fixltx2e} % provides \textsubscript     % use upquote if available, for straight quotes in verbatim environments     \IfFileExists{upquote.sty}{\usepackage{upquote}}{}     \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex       \usepackage[utf8]{inputenc}     \else % if luatex or xelatex       \ifxetex         \usepackage{mathspec}         \usepackage{xltxtra,xunicode}       \else         \usepackage{fontspec}       \fi       \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}       \newcommand{\euro}{€}     \fi     % use microtype if available     \IfFileExists{microtype.sty}{\usepackage{microtype}}{}     \usepackage[margin=1in]{geometry}     \usepackage{longtable,booktabs}     \ifxetex       \usepackage[setpagesize=false, % page size defined by xetex                   unicode=false, % unicode breaks when used with xetex                   xetex]{hyperref}     \else       \usepackage[unicode=true]{hyperref}     \fi     \hypersetup{breaklinks=true,                 bookmarks=true,                 pdfauthor={Me},                 pdftitle={Title of a Survey Manual},                 colorlinks=true,                 citecolor=blue,                 urlcolor=blue,                 linkcolor=magenta,                 pdfborder={0 0 0}}     \urlstyle{same}  % don't use monospace font for urls     \setlength{\parindent}{0pt}     \setlength{\parskip}{6pt plus 2pt minus 1pt}     \setlength{\emergencystretch}{3em}  % prevent overfull lines     \setcounter{secnumdepth}{0}          \title{Title of a Survey Manual}     \author{ME}     \date{2014}          \begin{document}      When I `pdflatex document.tex` my file it just seems to ignore the `floatrow` command. When I `pandoc document.tex -o test.pdf` the file my tables come out looking like this:               [c]@ccccc@ Scale Item & lambda & SE & est/SE & p     Item 37 & 0.747 & 0.026 & 28.908 & 0     Item 2 & 0.738 & 0.023 & 32.092 & 0     Item 25 & 0.689 & 0.026 & 26.71 & 0     Item 10 & 0.662 & 0.029 & 23.165 & 0     Item 18 & 0.698 & 0.026 & 27.177 & 0     Item 24 & 0.763 & 0.029 & 26.705 & 0     Item 28 & 0.621 & 0.029 & 21.518 & 0     Item 8 & 0.48 & 0.036 & 13.415 & 0     Item 11 & 0.501 & 0.036 & 13.917 & 0     Item 7 & 0.706 & 0.03 & 23.898 & 0     Item 31 & 0.576 & 0.034 & 16.879 & 0     Item 32 & 0.508 & 0.036 & 14.183 & 0      It appears Pandoc moves the caption correctly but does not render the table. Please advise, as it will be much appreciated.


title: Splitting a large document into several files

text: Why is it recommended to split a large document into several parts and include them with `\include`? Is it only a relic of the past times when computers and LaTeX compilers were slower, or is it still up-to-date? What are the pros and cons of this practice, also in terms of interaction with other external tools (version control, find/replace, et cetera)? Motivation: I've found a recent discussion that mentions this practice ( Writing and Managing Thesis in LaTeX, Everyday LaTeX and workflow?), as well as a comment that criticizes it in an answer to Everyday LaTeX and workflow?. A couple of months ago, I asked the same question in a comment to Techniques and packages to keep up with good practices, but it's probably better to ask this here again as a "real question".


title: A problem getting 'author (forthcoming a, b)' in citation; natbib

text: I'm trying to cite two forthcoming publications of a single author, storing them under cite-keys 'Author' and 'Author1', and letting the year for each entry be 'forthcoming.' (I'm using `BibDesk` software to store bibliography and `natbib` package.) However, while in the Bibliography at the end of the document I correctly get 'Author. forthcoming a., Author forthcoming b.' as two separate entries, in the body of the text, using `\citet{Author, Author1}`, I get 'Author (forthcoming a,f)'. I cannot figure out why I am getting 'f' instead of 'b' here, and am not sure how to detect the problem. Here's what I'm using:                   \documentclass{article}         \usepackage{amsmath}         \usepackage{amsthm}         \usepackage{latexsym}         \usepackage{enumitem}         \usepackage{upgreek}         \usepackage{quoting}         \quotingsetup{vskip=0pt}         \usepackage{hyperref}         \hypersetup{colorlinks=true,linkcolor=red}         \usepackage{amssymb}         \usepackage{turnstile}         \usepackage{cancel}         \usepackage[utf8]{inputenc}         \usepackage{ dsfont }         \usepackage{mdwlist}         \usepackage{ tipa }         \usepackage{marvosym}         \usepackage{color}         \usepackage{stmaryrd}         \usepackage{geometry}         \usepackage[english]{babel}         \usepackage{setspace}         \usepackage{natbib}         \usepackage{textcomp}         \usepackage{linguex}         \newcommand\extwo{Example 2}         \renewcommand{\bibnumfmt}[1]{#1.}         \usepackage{graphicx}         \usepackage{ textcomp }              \makeatletter         \newcommand*{\rom}[1]{\expandafter\@slowromancap\romannumeral #1@}         \makeatother              \title{Title}         \author{Author}         \doublespacing              \begin{document}         \maketitle              \citet{Author, Author1}                             \bibliography{Test}              \bibliographystyle{phil_review_mod}         \nocite{*}               \end{document}      The `Test' bibliography has only two entries. The first entry: cite-key: "Author" Author: "Name Author" Title: "Title" Book title: "In Title" Publisher: "Test Press" Year: "forthcoming." Editors: "Editors" The second entry: cite-key: "Author1" Author: "Name Author" Title: "Test" Journal: "Journal Test" Year: "forthcoming."


title: Latex Beamer ugly transition

text: To get the section title as well as the subsection dots in the header (see figure) I use the Warsaw theme. Depending on the color I use, I get very ugly glowing transitions I'd like to remove. Without the Warsaw theme, there is no such transition. However, in this case I don't get my beloved header. ![enter image description here](http://i.stack.imgur.com/svVQk.png) So I hope you have any suggestion on how to remove these borders.               \documentclass[xcolor=dvipsnames]{beamer}           \usetheme{Warsaw}     \useoutertheme[subsection=false]{smoothbars}     \useinnertheme{default}          \setbeamertemplate{caption}[numbered]     \setbeamertemplate{footline}{}          \setbeamercolor{structure}{fg=ProcessBlue}     \setbeamercolor{frametitle}{fg=white}     \setbeamercolor{frametitle}{bg=ProcessBlue}     \setbeamercolor{block title}{fg=white}     \setbeamercolor{block title}{bg=ProcessBlue}     \setbeamercolor{block body}{fg=black}     \setbeamercolor{block body}{bg=Cyan!10!White}          \usepackage[english]{babel}     \usepackage{graphicx}     \usepackage{multirow}     \usepackage{xcolor}               \begin{document}          \section{Introduction}     \subsection{}          \begin{frame}     \frametitle{frame 1}          \end{frame}          \end{document}


title: Newline in copyright notice string (XMP pdf metadata)

text: I'm wondering if it is possible to include a newline character in the XMP pdf copyright notice string. I've tried using \\ or \newline but with no sucess... See code below:               \documentclass{article}     \usepackage{lipsum}     \usepackage{hyperref}     \usepackage{hyperxmp}     \hypersetup{         pdfauthor={Donald Duck},         pdftitle={Uncle Scrooge},         pdfcopyright={Copyright © 2014 by Mickey.\\ All rights reserved.}     \begin{document}     \lipsum[1]     \end{document}      As the picture below demonstrates, the newline character is ignored for some reason... How to have it right? ![enter image description here](http://i.stack.imgur.com/aYxyq.png)


title: Exchange meaning of : and \colon

text: I usually use the colon symbol `:` to denote maps. For set syntax there is the `braket` package. So as the spacing of `:` is not appropriate, I want it to behave like `\colon`. I tried               \documentclass{article}          \usepackage[fleqn]{amsmath}     \usepackage{braket}     \usepackage{dsfont}     \usepackage{mathtools}     \mathtoolsset{centercolon}          \def\textcolon{:} \catcode`\:=\active \def:{\relax\ifmmode\colon\else\textcolon\fi}          \begin{document}              Here is an example:         \begin{gather*}             f: x \mapsto x^2\\             g\colon \mathds R_+ \ni x \mapsto x^x \in \mathds R\\             A := \Set{ x \in \mathds R_+ | g(x) < x }         \end{gather*}          \end{document}      But that throws the error > ! TeX capacity exceeded, sorry [grouping levels=255]. Without the active definition, it looks like ![enter image description here](http://i.stack.imgur.com/19D9p.png) Notice that I use `:=` for definitions. That should still be possible. The problem there is that `\colon=` looks terrible: ![enter image description here](http://i.stack.imgur.com/RuKAG.png) * * * As I agree with egreg, that using all the active math chars is not a good idea. I'm going with David's approach and use:               \AtBeginDocument{\DeclareMathSymbol{:}{\mathpunct}{operators}{"3A}}     \def\colon{\mathrel{:}}          \usepackage{mathtools}     \usepackage{newunicodechar}          \def\textcoloneq{≔} \newunicodechar{≔}{\ifmmode \mathrel{{\vcentcolon}{=}} \else \textcoloneq \fi}     \def\texteqcolon{≕} \newunicodechar{≕}{\ifmmode \mathrel{{=}{\vcentcolon}} \else \texteqcolon \fi}      I use `\AtBeginDocument` so that I can use it together with `fontspec`.


title: How can I place a brace in a relative position to two labels of different nodes in TikZ?

text: For example, consider the following code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning,decorations.pathreplacing}          \begin{document}          \begin{tikzpicture}[estilo/.style={rectangle,draw,node distance=0mm,minimum width=0.5cm,minimum height=0.5cm}]              \tikzset         {             brace/.style= {decoration={brace, mirror, amplitude=8pt}, decorate}         }              \node[estilo] (n1) [minimum width=4cm]{};             \node[estilo] (n1-1)[ right=of n1.west, label=below:$i$ ]{};             \node[estilo] (n1-2)[ left=of n1.east,  label=below:$j$ ]{};              \draw [brace] (n1-1.south west) -- (n1-2.south east)              node[midway, label=below:{$ n = j - i + 1 $}]{};          \end{tikzpicture}          \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/eArZX.png) I would like the brace to be located just below of the labels of nodes n1-1 and n1-2, but in a relative form. **Any idea?**


title: Change chapter numbers to words in Arabic

text: Instead of "Chapter 1" I want "Chapter one", but in Arabic. one => الأول and so on. In english, a solution exist:               \usepackage{fmtcount,etoolbox}     \makeatletter     \patchcmd{\@makechapterhead}{\thechapter}{\Numberstring{chapter}}{}{}     \patchcmd{\chaptermark}{\thechapter}{\NUMBERstring{chapter}}{}{}     \makeatother      But what about Arabic? MWE:               \documentclass[12pt,english]{book}     \usepackage{fancyhdr}     \usepackage{polyglossia}     \setmainlanguage[numerals=maghrib]{arabic}     \setotherlanguage{english}     \newfontfamily\arabicfont[Script=Arabic,Scale=1.5]{Arabic Typesetting}     \pagestyle{fancy}          \begin{document}     \selectlanguage{arabic}     \chapter{مقدمة}          \end{document}


title: How can I print the table of contents multiple times in my document?

text: I am using also `titletoc` to improve how my table of contents. I would like to print the table of contents several times. How can I do it? It does not work in the MWE:               \documentclass{article}     \usepackage[utf8]{inputenc}          \begin{document}          \tableofcontents          \section{Hello}     \section{Bye}          \tableofcontents          \end{document}      ![enter image description here](http://i.stack.imgur.com/EHP3h.png) PS: I have this code in my document, in order to have no title for the table of contents.               \makeatletter     \renewcommand\tableofcontents{%         \@starttoc{toc}%     }     \makeatother      PPS: `\renewcommand{\contentsname}{}% Remove \tableofcontents' title/name` will not work since I am using `[french]{babel}`.


title: How to assign code in table of figures?

text: Is possible that i can get an alghorithm that was wrote in LaTeX with a package and transform in a figure to be added in list of figures (`\listoffigures`)?


title: How to know the number of elements in a clist in LaTeX3?

text: I could not find in the LaTeX3 documentation any function to count the number of elements in a `clist`. So I coded my own, but it is likely to be very suboptimal. Is there any better alternative? To be precise, `\clist_count:NN` stores in its first argument (of type `int`) the length of its second argument (a `clist`)               \cs_new:Nn \clist_count:NN     {       \int_set:Nn \l_tmpa_int {0}       \clist_set_eq:NN \l_tmpa_clist #2       \bool_until_do:nn        {         \clist_if_empty_p:N \l_tmpa_clist       }{         \clist_pop:NN \l_tmpa_clist \l_tmpa_tl         \int_add:Nn \l_tmpa_int {1}       }       \int_set_eq:NN #1 \l_tmpa_int     }      I am also interested in a function that would pick the `n`-th element of a `clist`.


title: Line Numbers in Listing Outside of Paragraph

text: I use the listings package for code listings and I turned the line numbers on. But they appear left of the paragraph. I want them inside the paragraph. In the documentation it looks just right. Here is my code:               \documentclass[12pt,a4paper]{scrartcl}     \usepackage{listings}     \lstset{numbers=left}     \begin{document}     \section{Test}     Test     \begin{lstlisting}         test()     \end{lstlisting}     \end{document}


title: Without defining a new command for each setting, is it possible to pass the set of settings to the optional argument of lstinputlisting ?

text: # Screenshot ![alt text](http://i.stack.imgur.com/8DuhC.png) * * * # Scenario I want to define two sets of settings for `\lstinputlisting`--One setting for CSharp A and the other one for CSharp B. They are different only in the color settings.               \def\CSharpSettingsA%     {%      \lstset%      {%       language={[Sharp]C},       literate={ï}{}0{»}{}0{¿}{}0,       backgroundcolor=\color{White},        basicstyle=\scriptsize\color{Black}\ttfamily,        keywordstyle=\color{Orange},        identifierstyle=\color{Cyan},        stringstyle=\color{Red},         commentstyle=\color{Green}%       }     }          \def\CSharpSettingsB%     {%      \lstset%      {%       language={[Sharp]C},       literate={ï}{}0{»}{}0{¿}{}0,       backgroundcolor=\color{Black},        basicstyle=\scriptsize\color{White}\ttfamily,        keywordstyle=\color{Orange},        identifierstyle=\color{Cyan},        stringstyle=\color{Red},         commentstyle=\color{Green}%       }     }      There is a common setting as well.               \lstset%     {%      breaklines=true,      tabsize=2,        showstringspaces=false,      aboveskip=0pt,      belowskip=0pt%     }      **NOTE:** because each set contains many key-value pairs, it is not good idea to pass those key-value pairs directly to the optional argument of `\lstinputlisting`. In the preamble, I define two commands as follows:               \newcommand{\InputCSharpA}[1]{{\CSharpSettingsA\lstinputlisting{#1}}}     \newcommand{\InputCSharpB}[1]{{\CSharpSettingsB\lstinputlisting{#1}}}      And in the document body, I switch between them as follows:               \begin{document}     \InputCSharpA{CSharp/MyCode/Program.cs}          \InputCSharpB{CSharp/MyCode/Program.cs}     \end{document}      * * * # Question Without defining a newcommand for each setting, is it possible to pass the set of settings to the optional argument of `lstinputlisting` ? Such as `\lstinputlisting[key=CSharpSettingsA]{}` for example. * * * # Complete Minimal Code               \documentclass[dvipsnames]{article}     \usepackage[a4paper,margin=20mm]{geometry}     \usepackage{xcolor}          \usepackage{listings}     \lstset%     {%      breaklines=true,      tabsize=2,        showstringspaces=false,      aboveskip=0pt,      belowskip=0pt%     }          \def\CSharpSettingsA%     {%      \lstset%      {%       language={[Sharp]C},       literate={ï}{}0{»}{}0{¿}{}0,       backgroundcolor=\color{White},        basicstyle=\scriptsize\color{Black}\ttfamily,        keywordstyle=\color{Orange},        identifierstyle=\color{Cyan},        stringstyle=\color{Red},         commentstyle=\color{Green}%       }     }          \def\CSharpSettingsB%     {%      \lstset%      {%       language={[Sharp]C},       literate={ï}{}0{»}{}0{¿}{}0,       backgroundcolor=\color{Black},        basicstyle=\scriptsize\color{White}\ttfamily,        keywordstyle=\color{Orange},        identifierstyle=\color{Cyan},        stringstyle=\color{Red},         commentstyle=\color{Green}%       }     }          \newcommand{\InputCSharpA}[1]{{\CSharpSettingsA\lstinputlisting{#1}}}     \newcommand{\InputCSharpB}[1]{{\CSharpSettingsB\lstinputlisting{#1}}}          \begin{document}     \InputCSharpA{CSharp/MyCode/Program.cs}          \InputCSharpB{CSharp/MyCode/Program.cs}     \end{document}


title: LyX: Different margins for page numbers

text: How can I modify the page numbers to have a different SIDE margin. I've got the vertical margin set right but my advisor wants my page numbers for the thesis 0.5" from both top and side edge (1" margin for the text). I'm using LyX.


title: \tkzDrawLine doesn't print node

text: I've made this drawing, but I can manage to place the node $m$ to the line. Any suggestions? Thanks in advance ![enter image description here](http://i.stack.imgur.com/RjKJN.png)               \documentclass[a4paper]{article}     \usepackage{pgfplots}     \usepackage{tkz-euclide}     \usetkzobj{all}     \begin{document}     \begin{center}     \begin{tikzpicture}     \coordinate (M) at (0,0) ;     \coordinate (A) at (canvas polar cs:angle=90,radius=3cm);     \coordinate (B) at (canvas polar cs:angle=20,radius=3cm) ;     \draw (M) circle (3cm);     \draw (A) -- (B) ;     \tkzDefMidPoint(A,B) \tkzGetPoint{P}     \draw (A) -- (P) node[midway,sloped] {$// $} ;     \draw (P) -- (B) node[midway,sloped] {$// $} ;     \tkzDrawLine[add = 0.5 and 1.6](P,M) node {m}; %PROBLEM%     \tkzDrawPoints(A,B,M);     \tkzLabelPoints(B,M);     \tkzLabelPoints[above](A);     \end{tikzpicture}     \end{center}     \end{document}


title: LaTeX doesn't recognize "et al." in the Bibliography

text: I'm using `Jabref` to manage my Bibliography. Sometimes, I put directly: > First Author et al. when adding the article author's name in `Jabref`. When compiling my `.tex` file, LaTeX doesn't recognize the `et. al` as more names. It takes it as a name/surname. This is an example of a Bibliography entry in `Jabref`.               @ARTICLE{Wolf2003,         author = {Wolf, K.et al.},         title = {Compensation mechanism in tumor cell migration: mesenchymal–amoeboid         transition after blocking of pericellular proteolysis},         journal = {J. Cell Biol.},         year = {2003},         volume = {160},         pages = {267–277},        }      This is a `.tex`MWE with the bib entry mentioned:               \documentclass[11pt]{book}       \usepackage{cite}       \bibliographystyle{unsrt}  \\     \begin{document}       Here is the bib entry mentioned\cite{Wolf2003}            \bibliography{bibfile}      \end{document}      Here's the output: ![Output of the <code>.tex</code> MWE mentioned above](http://i.stack.imgur.com/lfwLs.jpg) How can I solve this problem? Thank you for your replies and comments. P.S. I tried to find the answer from the questions already made but I didn't, even when I think somebody already had this problem.


title: wrapfigure inside a tikzpicture

text: I am trying to place a figure environment inside a tikzpicture as:                 \begin{tikzpicture}         \node [mybox] (box){%           \begin{minipage}{0.45\textwidth}     %   \LHead{         \begin{wrapfigure}{r}{.2\textwidth}           \begin{center}             \includegraphics[scale=1.]{Figures/cell2.png}             \caption{\tikz \shade[ball color=gray] circle(0.45); Sphere}           \end{center}         \end{wrapfigure}     %   }           \end{minipage}         };         \node[fancytitle, right=30pt,rounded corners=10pt] at (box.north west) {\Huge{Structure}};       \end{tikzpicture}      If I just put `includegraphics`, without the `figure` env, its working. But I need figure env in this case as I would like to place the caption beside the figure. I am compiling with pdflatex and texlive 2013


title: label within lstlisting prefix gives strange output on \ref

text: I have all kinds of labeltypes for my own convenience defined like "sec:", "cha:", "fig:", "lst:" and so on. Now I wanted to point to a certain line of code within one of my listings. There is no need have a label for that listing, but on some other page I want to put "(see on page X)" especially because of the listing might be split by a natural pagebreak. At the end of the line of code I wrote `$\label{lbl:mySpecialLineOfCode}$`. At the location where I want to put the page number by `\pageref{lbl:mySpecialLineOfCode}` and it outputs the correct page number. For experimental reasons I put `\ref{lbl:mySpecialLineOfCode}` and it printed 14. I don't understand how Latex determines this number. The label is placed neither in chapter in 14, nor in section X.14, nor is it the 14th label or the 14th listing (I have a larger number of both before that position). My only fear is, that it occupies a "place"/"number" and the listofwhatever at the beginning in the document will go from 13 to 15 in the next line. That would be too bad. Better I know beforehand that something like this can happen (I cannot say it happens - in my case though). Anybody can give me a hint?


title: Option seemingly ignored

text: I'm trying to give my custom class file two options for font size, `11pt` and `12pt`. I want `12pt` to be the default. I create the options like this:               \DeclareOption{11pt}{         \PassOptionsToClass{11pt}{article}}          \DeclareOption{12pt}{         \PassOptionsToClass{12pt}{article}}          \ExecuteOptions{12pt}     \ProcessOptions          \LoadClass[]{article}      This works fine, the default font size becomes 12pt. However the problem occurs when in the case that I want to go against this default and use 11pt font, using, of course, the `11pt` option like so:               \documentclass[11pt]      This does nothing when it should change the font size to 11pt (actually 10.95pt, since that is what the `article` class uses as a substitute for 11pt, but this does not matter). How can I make the `11pt` option override the default `12pt`? I can't seem to figure it out, Is it simply a problem with my method? Interestingly enough, if I make `11pt` the default option, with `\ExecuteOptions{11pt}`, then I can use `\documentclass[12pt]` and get `12pt` font, but just not the other way around.


title: How to suppress "Name:" and underline in eqexam

text: I want to write an exam without the _Name_ bit in the upper right corner. I only figured out how to change the text using `\examNameLabel` but not how to suppress it altogether.


title: Help with cross-referencing and altered numbering schemes

text: I've recently written a book and I now need to produce two companion volumes -- (1) a set of per-chapter 'appendices', consisting of material that expands on the stuff in each chapter, and (2) a solutions manual for the many exercises in the book. I want to refer to the original book's chapters and equations, and the `xr` package looks like the right tool. Each of the two new books will have its own chapters and equations, of course, but these are related to the "master" book. In the "solutions" book, I'd like to write something that looks like this:               \chapter{Solutions}     Problem~\ref{ex:intro-warmup}: In Equation~\ref{eq:quadratic}, the coefficient     of $x^2$ is $a$. For a cubic like     \begin{align}     \label{eqS:cubic1}     a x^3 + b x^2 + c^x + d     \end{align}     \noindent     the coefficient of the cubic term is $a$, while the coefficient of $x^2$ in     Equation~\ref{eqS:cubic1} is $b$.      in hopes of producing something whose ASCII approximation looks like this: _Chapter 1S Solutions_ _Problem 1.1: In Equation 1.3, the coefficient of x2 is a. For a cubic like_ _a x^3 + b x^2 + c^x + d (1.1S)_ _the coefficient of the cubic term is a, while the coefficient of x2 in Equation 1.1S is b._ In this example, `ex:intro-warmup` and `eq:quadratic` are labels defined in the main book; for the solutions book, I'll be labeling all equations with the prefix `eqS:` instead of `eq:` to avoid name-conflicts.) My goal is that I'd like the number for every chapter, section, subsection, equation, etc., in the solutions manual to terminate with an "S", so that a reference to "Equation 1.3" clearly refers to the main book, while "Equation 1.1S" refers to equations in the solutions manual. It appears that `xr` lets me do the opposite of this -- I can change the way the externally-referenced items are shown -- but I do not see how to make it happen in the INTERNAL numbering.


title: Definition of \limits

text: I am trying to understand how the `\limits` comand works in math mode but I cannot find its definition anywhere. So far, I've tried `latex.ltx` and `amsmath.sty` but I am now assuming it is stored somewhere else.


title: Why does media9 need babel?

text: I wonder why the `media9` package, a new replacement for `movie15`, needs `babel`? And what will happen if I would want to load `polyglossia` instead of `babel` as it is required for XeLaTeX to compile Russian text (note that standard babel conflicts with XeLaTeX if Russian language is requested)? NB: Fortunately, there is a custom russification for babel (http://ctan.org/pkg/russian) which does not conflict with XeLaTeX--I am just curious.


title: positioning text in tikz drawings

text: All, I'd like to position my text in a tikz picture such that it does not interfere with the lines drawn. I am new to tikz so bear with me on the coding. This is my code               \begin{tikzpicture} % STYLES \tikzset{         ellips/.style={ellipse, minimum width=100pt,         align=center,node distance=3cm,fill=black!10,inner sep=5pt,text width=2.5cm,minimum          height=2.0cm,>=stealth'} }          \node [ellips](Choices) {Strategic Choices};      \node [above=2cm of Choices](dummy) {};      \node [ellips, force, left=1.5cm of dummy] (Institutions) {Institutions};      \node [ellips, force, right=1.5cm of dummy] (Organisations) {Organisations};          % Draw the links between       \path[<->,thick]             (Choices) edge node[anchor=center, text width=3.5cm, left, midway] {Industry conditions and firm-specific resources}  (Institutions)             (Choices) edge node[anchor=center, text width=3.5cm, right, midway] {Formal and informal constraints} (Organisations)            (Institutions) edge  node [midway, below] {interaction} node[midway, above] {Dynamic} (Organisations);          \end{tikzpicture}      This gives the following result ![enter image description here](http://i.stack.imgur.com/3UhWd.png)


title: Backward opening quote in Mac

text: I am using Mac OS X, Standard US English Keyboard. I have written a full document using TeXShop. I have several double quote and single quote for single word or two words (not a quotation of many lines), like               "MyWord"          'MyWord'      However, when the PDF is produced, the opening quote mark looks like a closing one. Now, how can I set globally so that it looks like normal. I wish I could set a global definition or package without rewriting or editing text. Searching this forum, I found one solution:               \usepackage[T1]{fontenc}        But it has two problem. It produces straight quote mark, also only working for double quote. Could any one provide simple solution for: 1) global setting that works for both single and double CURLY quote, so that it looks normal in Mac 2) global setting that works also for single STRAIGHT quote with option: `\usepackage[T1]{fontenc}` Note that I am using following package:               \usepackage[catalan,english]{babel}     \usepackage[T1]{fontenc}     \usepackage{upquote}


title: How to draw the calculation of a determinant?

text: I'm trying to reproduce the following calculation of a determinant in latex: ![enter image description here](http://i.stack.imgur.com/QlUbX.png) Any ideas? I thought of using the tabular environment but unfortunately I'm not able to align the "=" correctly.


title: Load a package as optional argument

text: I'm creating my personal package. I'd like to use an option to turn on/off the line numbering provided by the package `lineno`. So, my `sty` file contains               \RequirePackage{lineno}     \linenumbers      But if one does not have the `lineno` package installed it will produce an error. It one does have the package installed it will enumerate the lines. I'd like to check if one does have `lineno` first and in affirmative case I'd like to be able to use my package as               \usepackage[lineno]{mysty} % to turn on the numbering      or               \usepackage{mysty} % default with no numbering if `lineno` does not exists      I tried this               \RequirePackage{lineno}     \@ifpackageloaded{lineno}{%     \DeclareOption{lineno}{\linenumbers}%     \ProcessOptions%     }{}      and it works if `lineno` is installed. But what about if it is not?


title: Diagram of an Acoustic Doppler Current Profiler (ADCP) in TikZ

text: I am trying to write a report on some equipment that I used during some analysis, the diagram is shown below: ![enter image description here](http://i.stack.imgur.com/YgXAm.jpg) I attempt to re-create this with `tikz`, here is my attempt so far               \documentclass{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}     % draw main body     \fill[gray!40!black!20](0,0) rectangle (5cm,7.5cm);     % draw bottom     \fill[red!80!black!70](0,0) rectangle (5cm,2cm);     % draw top     \draw[fill = blue](0,6) rectangle (5cm,7.5cm);     % draw circles at top of diagram     \fill[cyan!70!white](1.5,7)circle(0.5cm);     \fill[cyan!70!white](3.5,7)circle(0.5cm);     % draw lines      \draw (1,7.5)--(0.5,9);     \draw (2,7.5)--(2.5,9);          \draw (3,7.5)--(2.5,9);     \draw (4,7.5)--(4.5,9);          \end{tikzpicture}     \end{document}      resulting in: ![enter image description here](http://i.stack.imgur.com/v8n1K.png) which to be fair is terrible. I am struggling to find a way of (1) generating the top of the diagram i.e. the top bit and make it seem that the beams are traveling away from the source. How would I do this? Also, I realize that I'll have to play around with this a lot to make it look anywhere near the original diagram, but I thought I'd start by getting the main details in order. Can anyone suggest any way of making my attempt look a bit closer to the diagram, keeping in mind that my `tikz` skills are very limited.


title: How to put \value{counter} as value to .aux file?

text: I'm trying to customize `eledmac` settings in a way that I can use its footnote ability just like the ordinary LaTeX footnote style, but not as one paragraph per footnote but all footnotes in one paragraph. My problem is now to get the footnote mark into the footnote text apparatus, since `eledmac` is used to put line number and lemma there instead of footnote marks. As a result, if I use `\value{footnote}` somewhere in the second argument of `\edtext`, I only get the last (highest) footnote number because `eledmac` will typeset the footnote apparatus when finalizing the page instead of instantly inserting footnotes that would reflect the current footnote counter value. In order to fix this, I've already set up a little label/reference command that will memorize the footnote mark number in the .aux file. This seems to work as long as I put hard coded footnote numbers into it, but if I pass `\value{footnote}` to it, `\value{footnote}` gets into the .aux file, which again results in the last (highest) footnote number of the page. Is there a way to resolve `\value{footnote}` to its actual value for the .aux file? What could I do instead, if there's no way for doing so? Here a screenshot of the PDF: ![eledmac for paragraph style footnotes with problems while placing footnote marks in the apparatus.](http://www.freie-bibel.de/value_footnote.png) Here an example:               \documentclass[a4paper]{article}          \usepackage[utf8]{inputenc}     \usepackage{ngerman}     \usepackage{eledmac}     \usepackage{perpage}     \usepackage{zref-user}          \setlength{\parskip}{0pt}          \numberlinefalse     \footparagraph{A}     \nonumberinfootnote          \MakePerPage{footnote}          \makeatletter     \zref@newprop{myfootnote}[0]{0}     \zref@addprop{main}{myfootnote}          \newcommand*{\footnotemarkref}[1]     {         \zref@extractdefault{#1}{myfootnote}{0}     }          \newcommand*{\footnotemarklabel}[1]     {         \zref@setcurrent{myfootnote}{\value{footnote}}         \zref@labelbyprops{#1}{myfootnote}      }     \makeatother          \begin{document}     \beginnumbering     \pstart     Dieses\edtext{\addtocounter{footnote}{1}\footnotemark[\footnotemarkref{footnote:1:2:1}]}{\lemma{\footnotemark[\footnotemarkref{footnote:1:2:1}] 1,2}\Afootnote{\footnotemarklabel{footnote:1:2:1}O. Er.}} war im Anfang bei Gott.     Alles ward durch dasselbe,\edtext{\addtocounter{footnote}{1}\footnotemark[\footnotemarkref{footnote:1:3:1}]}{\lemma{\footnotemark[\footnotemarkref{footnote:1:3:1}] 1,3}\Afootnote{\footnotemarklabel{footnote:1:3:1}O. ihn.}} und ohne dasselbe ward auch nicht eins, das geworden ist.     \pend     \endnumbering     \end{document}      The lines in the .aux file are:               \zref@newlabel{footnote:1:2:1}{\myfootnote{\c@footnote }}     \zref@newlabel{footnote:1:3:1}{\myfootnote{\c@footnote }}      Where I would rather have something like this:               \zref@newlabel{footnote:1:2:1}{\myfootnote{1 }}     \zref@newlabel{footnote:1:3:1}{\myfootnote{2 }}      Additionally, if you know where the space before the footnote mark in the text area are coming from, please let me know. Thanks in advance!


title: problem with footnote in xepersian : " Undefined control sequence \small By me\footnote"

text: I have problem in using `xepersian` package. When I use footnote, it come with the error `Undefined control sequence \end` but without `xepersian` it works properly. I use MiKTeX 2.9 * * * here is the code                   \documentclass[]{article}         \usepackage{graphicx}         \usepackage{xepersian}         \begin{document}         \begin{center}              \includegraphics{../Pictures/tehran}              \huge This is My First work!              \small By me\footnote{dfgdtjk}         \end{center}         \end{document}      and here is the error                   Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \small By me\footnote{dfgdtjk}         Undefined control sequence \end{document}         Overfull \hbox (0.99916pt too wide) in paragraph         Overfull \hbox (172.67282pt too wide) in paragraph


title: printing colored borders of hyperref package (latex)

text: I Want to print the borders of `hyperref` package in LaTeX. Using the package `\usepackage{hyperref}`, in the pdf file, some borders (red, green, etc) appears. When the document is printed the borders does not appear (which is logical). Happens that I want to print those borders. Is it possible ?


title: uneven line spacing

text: This is something that is already annoying me for quite a while. (I use LuaLaTeX) The line spacing of the Arabic text is uneven (see pic and/or MWE below). In particular, I think, lines 2, 7, and 10. It would very unpleasant if a book got printed like this. I use Khaled Hosny's font Amiri Font -- but it's not the font's fault. I also get this with Microsoft's Arabic Typesetting, for example. Nonetheless, I contacted Khaled (because I knew him from TeX.sx) and he said: > "This may be due to the way TeX calculates line spacing, lines with > high/deep glyphs will cause bigger line spacing. Since Arabic prefers more > generous interline spacing than Latin, the solution is usually to make the > line spacing big enough by default. If this does not suit you (e.g. the main > text is in Latin script), then I think there are ways to force TeX to do > fixed line spacing (I don’t use LaTeX my self, but in ConTeXt I just set the > text on a grid)." So he suggests two solutions, I make three out of them:   1. ~~increase the line spacing of **all** text (i.e. Arabic **and** Latin)~~ -- not suitable, but maybe:   2. increase the line spacing of Arabic text only   3. force fixed line spacing of all text Any ideas of how to accomplish this? Any further ideas? Pic (looks better than here displayed when you download it): ![uneven line spacing](http://i.stack.imgur.com/OHsih.png) MWE:               % !TEX TS-program = lualatex     \documentclass[paper=a4,fontsize=11pt,DIV=calc]{scrartcl}          \usepackage{fontspec}         \setmainfont[Ligatures=TeX]{Times New Roman}     \newfontfamily\arabicfont[Script=Arabic,Numbers=Arabic]{Amiri}          \usepackage{csquotes}     \newcommand{\arabtext}[1]   % Arabic inside LTR         {\bgroup\luatextextdir TRT\arabicfont #1\egroup}     \newcommand{\aq}[2] %         {\blockquote{\arabtext{#1\hfill}\\{#2}}}          \begin{document}          \aq{وأمّا مَنْ جعل العناصر والأسطقسّات أكثر من واحد مثل ابن دقليس وأنكساغورش ولوقيس وديمقراطيس فإنّه يلزمهم أن يقولوا إنّ الكون هو غير الاستحالة لأنّه يجب أن يكون الكون باجتماع الأسطقسّات والفساد بافتراقها والاستحالة شئ غير الاجتماع والافتراق. فأمّا ابن دقليس فإنه كان يقول إنّ الأسطقسّات ستّة اثنان محرّكان وهما العداوة والمحبّة وأربعة متحرّكة وهى الأرض والماء والهواء والنار. وأمّا أنكساغورش ولوقيس وديمقراطيس فإنّهم كانوا يقولون إنّ الأسطقسّات غير متناهية. وأمّا أنكساغورش فكان يضع التى بهذه الصفة هي الأجسام المتشابهة الأجزاء وهى التى يُسَمَّى الكلّ منها والجزء باسم واحد بعينه مثل اللحم والمخّ والخشب. وأمّا ديمقراطس ولو قيس فإنّهما يريان أنّ التى بهذه الصفة هي أجسام غير متجزّئة وأنّها غير متناهية فى عددها وأشكالها وأنّ الأجسام المركّبة من هذه إنّما تختلف لمكان اختلاف الأجزاء التى تتركّب منها من قبل ثلاثة أشياء : الشكل والوضع والترتيب.}     {Facientes autem elementa esse plura uno, ut Empedocles et Anaxagoras et Leucippus et Democritus, necesse est eis dicere generationem esse aliam ab alteratione. Generatio enim fit per congregationem elementorum et corruptio per segregationem eorum; alteratio autem neque est congregatio neque segregatio. Empedocles vero dicebat sex esse elementa, quorum duo sunt moventia, scilicet amicitia et lis, et quatuor mobilia, scilicet terra et aqua et aër et ignis. Anaxagoras autem et Leucippus et Democritus dicebant elementa esse infinita. Sed Anaxagoras ponebat ea esse corpora consimilium partium, quorum totum et pars habent idem nomen, ut caro et medulla et lignum. Democritus autem { p. 6} et Leucippus dixerunt ea esse corpora infinita in numero et in figuris, et quod corpora composita ex hiis diversificantur secundum diversitatem illarum partium aut propter figuram aut propter situm aut propter ordinem.}          \end{document}


title: How to change the font size of all theorem environments?

text: I have several theorem environments:               \newtheorem{theorem}{Theorem}     \newtheorem{definition}{Definition}     \newtheorem{proposition}{Proposition}      etc. and I want to change them so that they all use "small" for font size. Is there a way to re-define the font size for all of these environments?


title: Setting Vim's NoSpell for command

text: I'm trying to switch off Vim's spell-checking for the glossaries command `\gls`. I really don't understand how the syntax matching works but I'm trying the following in `~/.vim/after/ftplugin/tex.vim`:               syn region texGlsZone matchgroup=texStatement start="\\gls\(pl)\s*{" end="}\|%stopzone\>" contains=@NoSpell      This doesn't work and I can't see how to debug. The Hilinks plugin (when I can get it to work) tells me the `gls` text has this syntax stack:               SynStack:  texChapterZone->texSectionZone->texSubSectionZone->texStatement  HltTrace: texStatement->Statement      and the text inside the curly braces have:               SynStack:  texChapterZone->texSectionZone->texSubSectionZone  HltTrace: texSubSectionZone      Has anyone done this or something like it themselves?


title: Small script letter in text or math mode?

text: I know that               \documentclass{article}     \usepackage{mathrsfs}     \usepackage{extarrows}     \begin{document}     $\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$     \end{document}          produce :   ![enter image description here](http://i.stack.imgur.com/CEx4f.png) but I want to know what is the necessary command to get : ![enter image description here](http://i.stack.imgur.com/Ck6Cv.jpg)


title: bibTeX + Kile + mageia (KDE) = error?

text: I can't get the bibliography printed in the final pdf after I compile the _main.tex_ file with pdfLaTeX in Kile. I'm using Mageia OS with a KDE desktop environment. This is the error I get when I try to compile the main.tex with bibtex: `[BibTeX]main.aux => main.bbl (bibtex)` `[BibTeX]finished with exit code 2` I pressed the bibtex button on _mybibliography.bib_ : that didn't work. Next, I compiled (I tried) _main.tex_ with pdfLaTeX and got 0 errors, and a number of warnings: `LaTeX Warning: Citation 'sharbati:2009' on page 3 undefined on input line 2.` `LaTeX Warning: Empty bibliography on input line 51.` `LaTeX Warning: There were undefined references.` `Package biblatex Warning: Please (re)run Biber on the file:(biblatex)main(biblatex)and rerun LaTeX afterwards.`


title: Lining up equations with words

text: I want to align the following assignment statements w.r.t the `=` sign as follows:               \begin{itemize}     \item  $Wd  =$ We are eating the fish.     \item  $Ct  =$ Your Claws tore through my shirt!     \item  $Dhw =$ Your Dolphin swims fast.     \end{itemize}      I guess I could use `begin{align*}` and then use `\text{}` but that seems really messy. I actually would like similar use to `begin{align}` where we can use the `&` character to determine the position of the alignment.   1. Is there a better way?   2. What else can you recommend? Thanks in advance!


title: Error when trying to use the subcaption package

text: When I try to use the `subcaption` package (`\usepackage{subcaption}`), I get some errors. However, using the `subfigure` package (`\usepackage{subfigure}`), the compilation is successful with no errors. I cannot figure out what is wrong... here is a code example:               \documentclass[12pt, a4paper, oneside]{book}     \usepackage{fullpage}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{alltt}     \usepackage{latexsym}     \usepackage{exscale}     \usepackage[numbers, sort&compress]{natbib}     \usepackage{rotating}     \usepackage{changepage}     %\usepackage{notoccite}          %a useful package if you write url addresses:     %\usepackage{url}          \usepackage[labelfont=bf]{caption}     \usepackage{subcaption}          \usepackage{epsfig}          \begin{document}          \begin{figure}[htb]          \centering     \subfigure[]     {     \label{fig: Image1}      \includegraphics[width=76mm,height=60mm]{CordicStruc.pdf}     }     \subfigure[]     {     \label{fig: Image2}      \includegraphics[width=76mm,height=60mm]{Diagram1.pdf}     }          \caption{\textbf{(a) Block diagram of floating-     point CORDIC co-processor architecture.} \textbf{(b) Pre-Process module in CORDIC co-processor.}}     \end{figure}          \end{document}


title: How to maintain HTML internal links when converting with Pandoc

text: I am trying to convert from html to pdf with Pandoc. The output is pretty nice, still with the command `pandoc index.html -o output.pdf`I lose all my internal links (from table of contents to chapters, from text to footnotes, etc). Is there any way to keep all the links also in the output?


title: TikZ: Define pattern with reference to external picture

text: I want to fill a tikz-picture with a pattern, based on an external picture. Is this possible? If yes, how? I tried to define a new pattern with `\pgfdeclarepatternformonly`, but `\pgfuseimage` seems to be no valid command inside `\pgfdeclarepatternformonly`. Remark:   * In my example I used a marble-picture, but my question is independend from this special picture.   * I force the tile to 1cm. Probably it would be better to use the real size of the tile image.   * If I define `\pgfdeclarepatternformonly` after `\begin{document}` the LaTeX error disappear, but the pattern does not work. My MNWE (minimal not working Example):               \documentclass[]{standalone}     \usepackage{tikz}     \usetikzlibrary{patterns}          %Source: http://upload.wikimedia.org/wikipedia/de/thumb/f/f9/LapG.jpg/83px-LapG.jpg     %But could be any other picture     \pgfdeclareimage[width=1cm,height=1cm]{marble}{83px-LapG}%force quadratic tile          \pgfdeclarepatternformonly{marble}{\pgfpoint{0cm}{0cm}}{\pgfpoint{1cm}{1cm}}{\pgfpoint{1cm}{1cm}}{     \pgfuseimage{marble}%! LaTeX Error: Missing \begin{document}.     }          \begin{document}          \begin{tikzpicture}     % This should create a rectangle with 15*15 tiles.     \draw[pattern=marble] (0,0) rectangle (15,15);     \end{tikzpicture}           \end{document}


title: Fading shadow with mdframed

text: I would like to create an environment like this: ![Box with fading shadow](http://i.stack.imgur.com/wa1IQ.png) which I have created with this code:               %     % Boxed environment with semi-transparent shadow.     %     \newlength{\boxw}     \newlength{\boxh}     \newlength{\shadowsize}     \newlength{\boxroundness}     \newlength{\tmpa}     \newsavebox{\shadowblockbox}          \setlength{\shadowsize}{6pt}     \setlength{\boxroundness}{3pt}          \newenvironment{shadowblock}[1]%     {\begin{lrbox}{\shadowblockbox}\begin{minipage}{#1}}%     {\end{minipage}\end{lrbox}%     \settowidth{\boxw}{\usebox{\shadowblockbox}}%     \settodepth{\tmpa}{\usebox{\shadowblockbox}}%     \settoheight{\boxh}{\usebox{\shadowblockbox}}%     \addtolength{\boxh}{\tmpa}%     \begin{tikzpicture}     \addtolength{\boxw}{\boxroundness * 2}     \addtolength{\boxh}{\boxroundness * 2}          \foreach \x in {0,.05,...,1}     {     \setlength{\tmpa}{\shadowsize * \real{\x}}     \fill[xshift=\shadowsize - 1pt,yshift=-\shadowsize +      1pt,black,opacity=.04,rounded corners=\boxroundness]      (\tmpa, \tmpa) rectangle +(\boxw - \tmpa - \tmpa, \boxh - \tmpa -      \tmpa);     }          \filldraw[fill=yellow!50, draw=black!50, rounded corners=\boxroundness] (0,      0) rectangle (\boxw, \boxh);     \draw node[xshift=\boxroundness,yshift=\boxroundness,inner sep=0pt,outer      sep=0pt,anchor=south west] (0,0) {\usebox{\shadowblockbox}};     \end{tikzpicture}}      As you can see if you compile it has a fading shadow, however, as it uses `\minipage` in case the text is very long it doesn't split into 2 pages. I have though that this could be achieved with the environment `mdframed`, however, although it has shadows it doesn't have any fading effect. I have tried for example:               \begin{mdframed}[backgroundcolor=yellow!50,linecolor=black!50,roundcorner=10pt, % shadow=true,          tikzsetting={shade,           top color=yellow!50,           bottom color=yellow!10,           rounded corners=1pt,           blur shadow={shadow blur steps=5,shadow blur extra rounding=1.3pt,shadow yshift=-0.5cm}           }]     \lipsum[4-5]     \end{mdframed}      but when you compile it doesn't correcty draw the shadow: ![enter image description here](http://i.stack.imgur.com/Y1qNs.png) Any ideas?


title: Color bleeding when using \vsplit for a box with colored text

text: I want to `\vsplit` a box with quite arbitrary content. If the content does some color changes, strange things happen. The following MWE demonstrates the problem. The example text changes font and color of the second paragraph. When this paragraph is split, the red color bleeds outside the box, see `inter text` while the font change is restricted to the box. By the way: setting the color to `black` before the `inter text` worsen the problem, because then the third paragraph and everything after the second box is painted red. How do I have to adapt the `\splitmytext` macro (and maybe the `\savemytext` macro) to avoid this color bleeding problem?               \documentclass{article}     \usepackage{xcolor,lipsum}          \newbox\mwebox     \newbox\firstbox          \newcommand{\savemytext}[2]{%       \setbox\mwebox\vbox{\hsize=#1\relax#2}}          \newcommand{\splitmytext}[1]{%       \setbox\firstbox\vsplit\mwebox to #1}          \begin{document}          \savemytext{10cm}{%       \lipsum[1]       {\itshape\bfseries\color{red}       \lipsum[2]       }       \lipsum[3]     }          \splitmytext{7cm}          \fbox{\box\firstbox}          inter text          \fbox{\box\mwebox}          after text          \end{document}      ![enter image description here](http://i.stack.imgur.com/CW5HL.png)


title: Table entry shifted downwards with Hyperref package

text: I wanted to make a table with two columns: the left column lists the terms that the right column explains. Also I'd like to make the terms on the left column **link to itself**. The minimum working example below shows what I wanted and also the problem I have.               \documentclass[letterpaper]{article}          \usepackage{geometry}     \usepackage{array,tabularx}     \usepackage[colorlinks,bookmarksnumbered,bookmarksopen,pdffitwindow]{hyperref}     \hypersetup{pdfview=FitB,pdfpagetransition=Dissolve}          \begin{document}     \tableofcontents\pagebreak          \section{Definitions}     The following terms are used in one or more books of these specifications.          \renewcommand{\arraystretch}{2}     \vspace*{\baselineskip}\noindent     \begin{tabularx}{\linewidth}{@{}>{\bfseries\raggedright\arraybackslash}p{0.2\linewidth}X}     \hypertarget{AR}{}\hyperlink{AR}{Accelerated Revocation} & A key revocation performed on a date sooner than the published key expiry date.\\          \hypertarget{App}{}\hyperlink{App}{Application} & The application protocol between the card and the terminal and its related set of data.\\          \hypertarget{AAC}{}\hyperlink{AAC}{Application Authentication Cryptogram} & An Application Cryptogram generated by the card when declining a transaction.\\     \end{tabularx}     \end{document}      ![enter image description here](http://i.stack.imgur.com/huDqj.png) As can be seen, the left column entries are all shifted down. I feel that adding a vertical distance manually is not a correct way to solve it. Any suggestions as to what to do?


title: Typesetting option that includes makeindex (TeX Live, TeXworks)

text: I used to work with the MiKTeX distribution and the included TeXworks program. The latter provided me with a typesetting-configuration that was something like `pdfLaTeX + BibTeX + MakeIndex`. (It created the index files automatically.) Now that I changed to TeX Live (still working with TeXworks which comes now with TeX Live, though) such an option is no longer available. I'd have to run `MakeIndex` and `pdfLaTeX` (two compilations) seperately. I don't know the syntax for building my own typesetting-configuration which would provide me with the mentioned features (`pdfLaTeX` and `MakeIndex` in particular). Could someone show me how to build that setting, please? Or post the settings of the said MikTeX typesetting configuration.


title: Strange alignment when using tilde as the not operator in logic

text: I wish to use ~ which has latex symbol: `\sim` for the negation sign in logic. `\sim` and `\neg` are the two most frequent symbols for negation in logic. However, I get a strange looking result if I use `\sim`. The spacing with the variables is odd as the `\sim` is further from the variable. Compare the alternative using `\neg` and you will see what I mean.   1. How can I fix the spacing/alignment?   2. How can I show the results of my LateX code on SE? Thanks in advance!


title: Is this the expected behavior or am I missing something?

text: Consider the following simple MWE:               \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}       \draw(0,0) -- (3,3);       \pgfmathparse{2+1}       \draw[red] (0,0) -- (3,\pgfmathresult);     \end{tikzpicture}     \end{document}      I expect to have, as an output, one red line, however this is the result that I get: ![enter image description here](http://i.stack.imgur.com/9sBpY.png) So, is it a bug, feature, or simply me doing something wrong?


title: LaTeX: Use command argument in conditional?

text: I'm in the process of writing a command that outputs a certain text only if its argument is a nonzero number. I'd like to be able to write something like:               \newcommand{mycommand}[1]{     \if{#1 != 0}     Some text, because it's nonzero     \else     Some other text, because it's zero     \fi     }          \mycommand{0}     \mycommand{1} And get the output:               Some other text, because it's zero     Some text, because it's nonzero I'm running into trouble getting the conditional right, though - I'm not sure that LaTeX is treating `#1` like an integer to be checked (or even if that's the right syntax for not-equals - I wasn't able to find a ton of information on integer conditionals). How might I go about writing this conditional?


title: Displaying C++ source code with TikZ

text: I’m trying to have some C++ source code displayed in a TikZ environment (I'm using TikZ to have several copies of the same text on a single page, so that when it is printed I can cut the sheet into identical parts and save paper). The code below is not working and I don’t really understand why. Can anyone help me fix it ? Perhaps I should not use the listing package ?               \documentclass[a4paper]{article}          \usepackage[T1]{fontenc}     \usepackage[margin=0in]{geometry}     \usepackage{tikz}     \usepackage{listings}          \lstset{     language=C,     basicstyle=\small\sffamily,     numbers=left,     numberstyle=\tiny,     frame=tb,     columns=fullflexible,     showstringspaces=false     }               \begin{document}     \pagestyle{empty}       \noindent   \begin{tikzpicture}[x=1cm,y=1cm]     \foreach \x in {0,10.5,21}       {         \draw (\x ,0) -- (\x ,29.65);       };     \foreach \y in {0,7.41,14.83,22.24,29.65}       {         \draw (0, \y) -- (21, \y);       };           \foreach \x in {0,10.5}       {      \foreach \y in {0,7.41,14.83,22.24}       {       \draw(0.5+\x,3.75+\y) node [right,text width=9.5cm] {     {\bf  BTS SIO 1\`ere ann\'ee}\ \newline     {\bf  Correction pour le tri de trois nombres}\ \           \begin{lstlisting}     #include <iostream>          using namespace std;          int main(int argc, const char * argv[])     {              // insert code here...         int a,b,c,ancien;         cout << "Entrez le premier nombre\n";         cin >> a;         cout << "Entrez le second nombre\n";         cin >> b;         cout << "Entrez le troisième nombre\n";         cin >> c;         if (b<a) {             ancien=a;             a=b;             b=ancien;         }         if (c<b) {             ancien=b;             b=c;             c=ancien;         }         if (b<a) {             ancien=a;             a=b;             b=ancien;         }         cout << "Voici les nombres dans l'ordre croissant : \n" << a << "," << b << "," << c << "\n";         return 0;     }     \end{lstlsiting}               };     };          \end{tikzpicture}     \end{document}


title: File size savings

text: This is a question just out of curiosity; I hope someone familiar with the "under-the-hood" parts of TeXLive can answer my question. I have a LaTeX source file for a presentation using Beamer, which I compiled on my Laptop and my Office Computer. I noticed that the document generation seems to take much longer on my laptop (a little longer is expected, but my laptop is not _that_ under-powered). What's most surprising, however, is the resulting file-size: the file generated on my laptop is less than half the size the one on the office computer! Here be the output from `pdfinfo` On the office computer               Creator:        LaTeX with beamer class version 3.01     Producer:       pdfeTeX-1.21a     CreationDate:   Mon Jan 31 18:25:27 2011     Tagged:         no     Pages:          136     Encrypted:      no     Page size:      362.835 x 272.126 pts     File size:      1742603 bytes     Optimized:      no     PDF version:    1.4      On the laptop:               Creator:        LaTeX with Beamer class version 3.10     Producer:       pdfTeX-1.40.11     CreationDate:   Mon Jan 31 20:43:37 2011     ModDate:        Mon Jan 31 20:43:37 2011     Tagged:         no     Pages:          136     Encrypted:      no     Page size:      362.835 x 272.126 pts     File size:      572179 bytes     Optimized:      no     PDF version:    1.5      Three obvious differences: different `beamer` version, `pdfetex-1.21a` versus `pdftex-1.40`, and different output PDF versions. Does anybody know what accounts for the drastic file-size savings? * * * **Edit** As requested, output from `pdffonts` Office computer               name                                 type         emb sub uni object ID     ------------------------------------ ------------ --- --- --- ---------     WVPACK+NimbusSanL-Regu               Type 1       yes yes no      70  0     PAHDZS+NimbusMonL-Regu               Type 1       yes yes no      97  0     MWNYAU+NimbusSanL-ReguItal           Type 1       yes yes no     185  0     FUFSQV+CMSY10                        Type 1       yes yes no     188  0     RIQINP+CMSS10                        Type 1       yes yes no     514  0     KJHURB+MSBM10                        Type 1       yes yes no     517  0     RLPCEA+CMSS8                         Type 1       yes yes no     520  0     GKWRKQ+CMMI10                        Type 1       yes yes no     523  0     FNSGBY+CMSY8                         Type 1       yes yes no     526  0     ZULBEX+EUFM10                        Type 1       yes yes no     529  0     EGCPYN+CMEX10                        Type 1       yes yes no     532  0     AQNXQD+MSBM7                         Type 1       yes yes no     535  0     DBUPMR+CMMI8                         Type 1       yes yes no     863  0     ZLJTDB+CMSY9                         Type 1       yes yes no    2269  0     UVPNAP+CMSY6                         Type 1       yes yes no    3138  0     XWDUKW+MSAM10                        Type 1       yes yes no    5351  0      Laptop               name                                 type              emb sub uni object ID     ------------------------------------ ----------------- --- --- --- ---------     ZDCYDU+NimbusSanL-Regu               Type 1            yes yes no     120  0     DXSMAM+NimbusMonL-Regu               Type 1            yes yes no     122  0     ZSHOJP+NimbusSanL-ReguItal           Type 1            yes yes no     208  0     FWRRDZ+CMSY10                        Type 1            yes yes no     209  0     NIDXKV+CMSS10                        Type 1            yes yes no     536  0     TZDOHW+MSBM10                        Type 1            yes yes no     537  0     QLIKDK+CMSS8                         Type 1            yes yes no     538  0     LJZIEY+CMMI10                        Type 1            yes yes no     539  0     HZTDAS+CMSY8                         Type 1            yes yes no     540  0     BJBQRD+EUFM10                        Type 1            yes yes no     541  0     WMELZR+CMEX10                        Type 1            yes yes no     542  0     GCAWWC+CMMI8                         Type 1            yes yes no     872  0     UOMENF+CMSY9                         Type 1            yes yes no    2289  0     JKSUUE+CMSY6                         Type 1            yes yes no    3165  0     TMHVPV+MSAM10                        Type 1            yes yes no    5398  0


title: Have ispell ignore certain LaTeX tags

text: Using `ispell -t` on a `.tex` file generally does a good job of figuring out what is TeX and what isn't but it seems to find misspellings on commands that are generally going to be misspelled, i.e.               \includegraphics{myfig.jpg}      Gives a typo since `myfig` nor `.jpg` are in the dictionary. I think it would be silly to add them for every case. Is there a way to get ispell to ignore whatever is in a set of tags that I define?


title: What is most effecient way to draw a graph in LaTeX?

text: > **Possible Duplicate:**   >  LaTeX for Graph Theory? For the first time, I was going to draw a graph in LaTeX. (I was intended for a graph similar to the following) ![enter image description here](http://i.stack.imgur.com/bDbwk.png) Graph Theory is an important topic in Computer Science so I thought graph- drawing in LaTeX should be trivial, i.e. a package is given the adjacency matrix of graph and it positions each node in its **perfect place automatically without the user having to manually place each node.** But after some googling I now feel graph drawing is probably a time consuming task in the TeX world. Is it better to draw graphs with some graphic software and insert it as an image, or there is some better solution? (How do I balance the trade-off between elegant looks and time-efficiency?) Is there a software that allows you to draw a graph in a GUI and then generate LaTeX markup for that ( **I mean a graph specific app not a general one** ). **note** : This is not a duplicate, please note to bold text.


title: Axes for notched box plots from data files

text: I am trying to create notched box plots similar to those shown in the picture from data files. ![enter image description here](http://i.stack.imgur.com/GB2j8.gif) I have managed code that creates the box plots with notches like I want (the code below without the axis and `addplot` commands), but am having trouble adding axes. My setup for drawing the box plots does not work when I use `\addplot` and if I don't use `\addplot` I get other errors or depending on how I move the code for my axis, I get only the axes. I cannot think how to fix this.               \documentclass{article}     \usepackage{pgfplots}     \usepackage{filecontents}     \usepackage{pgfplotstable}     \usetikzlibrary{calc}     \begin{document}     \begin{filecontents}{boxplot.dat}     1 1 1.2 0.4 1.5 0.2 1.05 0.95     2 2 2.3 1.5 2.7 1 2.05 1.95     3 0.7 1.4 0.5 1.9 0.1 0.75 0.65     4 0.7 1.4 0.5 1.9 0.1 0.75 0.65     \end{filecontents}     \pgfplotstableread{boxplot.dat}{\infotable}     \pgfplotstablegetrowsof{boxplot.dat}     \pgfmathsetmacro{\rows}{\pgfplotsretval-1}     \begin{tikzpicture}     \begin{axis}[     xticklabels={1, 2, 3, 4},     ]     \addplot{     \foreach \i in {0,...,\rows}{%     %x-values     \pgfplotstablegetelem{\i}{[index] 0}\of{\infotable}     %Middle     \let\xM\pgfplotsretval     %Left     \pgfmathsetmacro{\xL}{\xM-0.25}     \pgfmathsetmacro{\xLInd}{\xM-0.125}     %Right     \pgfmathsetmacro{\xR}{\xM+0.25}     \pgfmathsetmacro{\xRInd}{\xM+0.125}     %y-values     \pgfplotstablegetelem{\i}{[index] 4}\of{\infotable}     \let\yTopWhisk\pgfplotsretval     \pgfplotstablegetelem{\i}{[index] 2}\of{\infotable}     \let\yBoxTop\pgfplotsretval     \pgfplotstablegetelem{\i}{[index] 6}\of{\infotable}     \let\yTopInd\pgfplotsretval     \pgfplotstablegetelem{\i}{[index] 1}\of{\infotable}     \let\yMedian\pgfplotsretval     \pgfplotstablegetelem{\i}{[index] 7}\of{\infotable}     \let\yBottomInd\pgfplotsretval     \pgfplotstablegetelem{\i}{[index] 3}\of{\infotable}     \let\yBoxBottom\pgfplotsretval     \pgfplotstablegetelem{\i}{[index] 5}\of{\infotable}     \let\yBottomWhisk\pgfplotsretval     %top part     \draw [blue] (\xLInd,\yMedian) -- (\xL,\yTopInd) -- (\xL,\yBoxTop) -- (\xR,\yBoxTop) --       (\xR,\yTopInd) -- (\xRInd,\yMedian);     %bottom part     \draw [blue] (\xLInd,\yMedian) -- (\xL,\yBottomInd) -- (\xL,\yBoxBottom) -- (\xR,\yBoxBottom) -- (\xR,\yBottomInd) -- (\xRInd,\yMedian);     %median     \draw [red] (\xLInd,\yMedian) -- (\xRInd,\yMedian);     %top whisker     \draw [black] (\xM,\yBoxTop) -- (\xM,\yTopWhisk);     \draw [black] (\xL,\yTopWhisk) -- (\xR,\yTopWhisk);     %bottom whisker     \draw [black] (\xM,\yBoxBottom) -- (\xM,\yBottomWhisk);     \draw [black] (\xL,\yBottomWhisk) -- (\xR,\yBottomWhisk);     }%     }     \end{axis}     \end{tikzpicture}     \end{document}


title: Replace instances of \cite that have a specific argument

text: In LaTeX, is there a way to define a macro (or something) to replace every instance of               \cite{a_literal_string}      with               \ref{appendix:a_different_literal_string}      without touching instances of `\cite` with arguments that aren't `a_literal_string`? I would like to do this for several different possible replacements. The idea here is that I'm including some modular documents in a larger project, and I want to use some of them as appendices. I don't want to just find/replace, because the sub-documents need to be able to refer to each other when they aren't being used in the larger project.


title: Multiple footmark messes with hyperref. Hyperlinks pointing to wrong footnotes or dead

text: When setting multiple footmarks inside an environment that doesn't allow any (equation), the ids correspond to the correct footnotetexts but not the hyperlinks.               \documentclass{article}          \usepackage{amsmath}     \usepackage{hyperref}          \begin{document}              Text\footnote{text1} Text\footnote{text2}              \begin{equation}             \refstepcounter{equation}             J=b a^3             \tag{\theequation\footnotemark{}\footnotemark{}}         \end{equation}              \#1 links to \#1              \#2 links to \#2              \#3 does not link anywhere              \#4 links to \#3              \addtocounter{footnote}{-2} %3=n         \stepcounter{footnote}\footnotetext{a}         \stepcounter{footnote}\footnotetext{b}              \newpage\null\thispagestyle{empty}\newpage               \end{document}


title: Merge bibtex citations

text: Can one automate the construction of a BibTeX bibliography which includes all the bibliographic entries from multiple separate LaTeX documents? The documents I have in mind have citations in common, which must only appear once in the combined list. I could potentially paste the text from all the documents into one file and use the bibliography from that. This would involve a fair bit of editing though, since the documents all use various incompatible documents classes and macros.


title: Latex into Keynote (Greek Letters Font)

text:
i'm preparing a presentation with Keynote. To include the formulas i'm using Latexit but the text and the formulas have different fonts. I've tried to use this to change the font in Latexit:               \usepackage{mathspec}
\usepackage{xunicode}
\usepackage{xltxtra}     \setmainfont{Chalkboard}
          \setmathsfont(Digits){Chalkboard}     \setmathsfont(Latin){Chalkboard}     \setmathsfont(Greek){Chalkboard}     \setmathsfont(Symbols){Chalkboard}      It is working for Digits and Latin, but it isn't for Greek and Symbols. Can anyone help me?


title: Missing pictures when using pgfplots

text: When preparing an article I came across with a strange problem. To draw graphs I use pgfplots. Like here:               \documentclass[twoside,11pt,a4paper]{article}     \usepackage{daiostyle}          \usepackage[all]{xy}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{width=7cm,compat=newest}     \usepackage{subcaption}     \renewcommand\thesubfigure{\asbuk{subfigure}}     \begin{document}     \begin{figure}[!hb]     \begin{center}         \begin{tikzpicture}[scale=0.85]             \begin{axis}[xmax=105, xmin=0, ymax=120, ymin=0, ylabel=\small{y}, xlabel=\small{x}, grid=major]                 \addplot[blue, mark=none] table{PlowMenExp1L.dat};             \end{axis}         \end{tikzpicture}         \caption{A caption}\label{PlowMenExp1L}     \end{center}     \end{figure}         \end{document}      Package daiostyle can be found here Dat file here But what I get looks like this one: ![output](http://i.stack.imgur.com/AncV6.png) I don't understand, what is wrong. Can anybody help me?


title: How to put A under B with syntactic sugar?

text: Say I would love to have a command that would put text `A` under text `B`. Yet I do not want to write my command arguments in `\commandname{A,B}` fashion. Instead I would love to write something like to write code like this: `\put A \under B` Are such constructs possible with TeX commands and how to create them?


title: Resume header - format the line in the header

text: In resume class, when the file is created in the header is a long horizontal line. And this line appears on every page. How can I format the header to have the line only on the first page, but not on the next? Here is an example: ![enter image description here](http://i.stack.imgur.com/Fj21z.png) And the code for this example:               \documentclass[margin,line,a4paper]{resume}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[pdftex]{color,graphicx}     \usepackage{graphicx,wrapfig}     \usepackage{url}     \usepackage[colorlinks=true, a4paper=true, pdfstartview=FitV,     linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref}     \pdfcompresslevel=9     \usepackage{fancyhdr}     \pagestyle{fancy}          \begin{document}       I want this upper line       \section{\mysidestyle Section}\vspace{1mm}         \begin{description}         \item This is the first page. And the above line is ok.         \end{description}       \newpage       This is the next page. I don't want this line.               \end{document}


title: Chronology adds arbitrary gaps

text: I'm trying to display a timeline in my document using the package chronology, however it does weird things. I'm using the following code:               \begin{chronology}[5]{0}{30}{4ex}{\textwidth}     \event[0]{2}{$P_5$} % 2     \event[2]{3}{\color{gray}switch}     \event[3]{5}{$P_4$} % 2     \event[5]{6}{\color{gray}switch}     \event[6]{8}{$P_3$} % 2     \event[8]{9}{\color{gray}switch}     \event[9]{11}{$P_2$} % 2     \event[11]{12}{\color{gray}switch} %%%%%% gap     \event[12]{14}{$P_1$} % 2     \event[14]{15}{\color{gray}switch}     \event[15]{16}{$P_5$} % 1     \event[16]{17}{\color{gray}switch}     \event[17]{19}{$P_4$} % 2     \event[19]{20}{\color{gray}switch}     \event[20]{22}{$P_2$} % 2     \event[22]{23}{\color{gray}switch} %%%%%% gap     \event[23]{25}{$P_1$} % 2     \event[25]{26}{\color{gray}switch}     \event[26]{28}{$P_4$} % 2     \event[28]{29}{\color{gray}switch}     \event[29]{30}{$P_1$} % 1     \end{chronology}      This should produce a completely filled timeline, but there are two gaps as seen in the picture linked below. What could be the problem? Screenshot: ![enter image description here](http://i.stack.imgur.com/wuYiE.png)


title: Greek-Letters-Different in AdobeReader and TexStudio, who's right?

text: I want to use greek letters in my Matlab Figures and then use the figures in Latex. I'm using TexStudio, and the preview inside of TexStudio shows me, for example if I entered a `\mu` in Matlab something similiar to an alpha. If I take a look at the created pdf with AdobeReader, I see the correct mu. I'm afraid now, that if I want to print the Document later on from a professional printshop they print the wrong Letters. Is there a way to determine which version is the "normal" and which program is showing me the wrong letter?


title: Create a document class based on a KOMA-Script class: paper size problem

text: I want to create a document class based on a KOMA-Script class. First I would like change paper size, which would be defined in cls file. I see that similar problem was questioned in here, but without clear solution. Has anyone of you an example of own document class based on a scrbook? **wikibook.cls:**               \ProvidesClass{wikibook}[2013/06/30]     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrbook}}     \ProcessOptions\relax     \LoadClass[paper=b4]{scrbook}      or alternative:               \ProvidesClass{wikibook}[2013/06/30]     \PassOptionsToPackage{b4paper}{typearea}     \LoadClass{scrbook}      **test.tex:**               \documentclass[12pt]{wikibook}        \usepackage{bookman}      \usepackage{lipsum}         \begin{document}            \chapter{First example}           \section{Section one}                \lipsum[2-8]           \chapter{Second example}           \section{Section two}      \end{document}      Generated pdf size is persistently a4.


title: How to set the same width for number in enumerate

text: I have this code, to make a blue ball with white numbers inside, but the numbers have different `width` and I want to make them even, all with the same width, the largest want.               \usepackage{wboiboites}          \newcommand*{\itemball}[1]{% bolas 3D     \footnotesize\protect\tikz[baseline=-3pt]%     \protect\node[scale=.7, circle, shade, ball     color=blue]{\color{white}\bf#1};}          \begin{document}          \begin{enumerate}[label=\itemball{\arabic*},leftmargin=0pt,itemindent=*]     \setcounter{\enumi}{7}     \item Some text numbered as 8.     \item Some text numbered as 9.     \item Some text numbered as 10.     \item Some text numbered as 11.     \item Some text numbered as 12.     \item Some text numbered as 13.     \end{enumerate}          \end{document}      How I can do it?


title: node names and nested loops in TikZ

text: I'm trying to draw a (part of a) lattice. To achieve that I use two nested foreach loops, like this:               \foreach \x in {-1, 0, 1} {         \foreach \y in {0, 1, 2} {             \path node (\x.\y) at (\x+\y-1, \y-\x) {};         }     }      Anyway I'm not able to refer to the nodes I create in the code above. Specifically, if I try something like this:               \path[->] (0.0) edge [bend right = 30] (0.1);      I get an error:               ERROR: Package pgf Error: No shape named 0 is known.      So the question is: which name will TikZ accept? The names should correspond to the lattice points. So, in some way, they should contain \x and \y. Trying to variate on the nodes name doesn't help either. For example, if I try this               \path node (X\x Y\y) at (\x+\y-1, \y-\x) {};      I still get the same error:               ERROR: Package pgf Error: No shape named X0 Y0 is known.


title: Multirow/multicolumn cells in TikZ matrices?

text: Is it possible to make TikZ matrix cells span multiple rows/columns, like they can in LaTeX tables using \multirow/\multicolumn? Specifically, I'd like to typeset something like the following in a TikZ matrix:               header1  longcell1   longcell2     header2  cellA cellB cellC cellD     header3  X     Y     Z     W


title: Is there a "proper" way to fix alignment of text in a \framebox?

text: The `\framebox` command aligns its contents vertically centered, but this has a tendency to produce results that are extremely visually displeasing. Case in point:               \documentclass{article}       \usepackage{relsize}       % Double box just to make things clearer       \newcommand{\DoubleBox}[1]{\framebox{\framebox{\textbf{#1}}}}       \begin{document} \noindent       \DoubleBox{I think this is visually displeasing} \par\noindent       \DoubleBox{\raisebox{0pt}[9pt]{I think this is an ugly hack}} \par\noindent       \DoubleBox{\larger\raisebox{0pt}[9pt]{And said hack doesn't work for larger text}}       \end{document}      > Is there a way to fix this that "just works" so things look right at all > sizes?


title: Are there any tools for collaborative bib files?

text: It would be very useful to have a shared bib file across my research group which can be kept up-to-date by any member of the group. Are there any tools for this sort of thing? I know about Mendeley which allows bib sharing and syncing. Are there any other tools?


title: How I draw the tree of possibility?

text: I can do the following drawings of Board:               \documentclass{article}     \usepackage{skak}     \usepackage{chessboard}     \let\boardfont\undefinedcommand     \usepackage{diagram}          \begin{document}     \setboolean{showcomputer}{false}     \setboolean{piececounter}{false}     \specialdiagnum{}          \begin{diagram}[4x4]     \pieces{wDa3, wDb1, wDc4, wDd2}     \end{diagram}     \begin{diagram}[4x4]     \pieces{wDb4}     \end{diagram}          \end{document}      But, as do the tree of possibilities:![enter image description here](http://i.stack.imgur.com/6onSF.jpg)


title: how to avoid bibtex error message "repeated entry" for an entry appearing in several bibtex files?

text: I am using several bibtex files, dedicated to several topics. But some references are common to several topics and then appear in several of my bibtex files. Currently, I am writing a document dealing with several of these topics, and need to use several of these bibtex files at the same time. Obviously, I get the error message when compiling with bibtex: "repeated entry". I would like to avoid this error message, but without removing my entries from the bibtex files, as I need them when compiling only with one of them (when writing articles on one topic only), and without merging my bibtex files.


title: Abstract not showing up when removing \maketitle

text: I have the code:               \maketitle     \begin{abstract}Some text \end{abstract}     \newpage     \section{some section}      But when I comment out `\maketitle` the document shows `\section{some section}`, not the abstract nor seem to use the command `\newpage` because "some section" is displayed on page 1. When uncommenting `\maketitle` everything is displayed correctly. How do I properly remove the maketitle and still having the abstract shown? This example shows the issue (at least for me):               \documentclass[12pt]{amsart}     \title{}     \author{}     \begin{document}          %\maketitle     \begin{abstract}     Abstract     \end{abstract}          \section*{Acknowledgement}     Text           \end{document}


title: remove page number in bibliography

text: I do not want page number to be displayed in my bibliography. So I tried gobble like this:               \bibliography{MyLibrary}{}     \bibliographystyle{plainnat}     \pagenumbering{gobble}      It is fine as long as my bibliography is 1 page long. But now my references spread to two pages, only the second page doesn't show page number. The first page (that has the Bibliography heading) still shows page number. How do I remove page number on both pages?   My preamble is as follows:               \documentclass[11pt]{report}     \usepackage[numbers]{natbib}     \usepackage{titlesec}     \titleformat{\chapter}[display]{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge      }


title: author name with periods produces Et al

text: I want to cite this article:               @article{kc2010ppe,     author = {K.C., Samir and Barakat, B. and Goujon, A. and Skirbekk, V. and Sanderson, W. and Lutz, W.},     journal = {Demographic Research},     number = {55},     pages = {383--472},     posted-at = {2012-07-06 13:25:30},     priority = {2},     publisher = {Max Planck Institute for Demographic Research, Rostock, Germany},     title = {{Projection of populations by level of educational attainment, age, and sex for 120 countries for 2005-2050}},     volume = {22},     year = {2010}     }      The lead authors name is Samir K.C. (surname is K.C.). I cannot figure out how to get the reference correctly in the text. I am using natbib through biblatex. My .tex file is something like:               \usepackage[natbib=true, backend=bibtex8, firstinits=true, style=authoryear-comp, dashed=false, isbn=false, maxcitenames=3]{biblatex}     ...     more preamble and the rest of the paper...     ...     Global population forecasts, such as \citet{kc2010ppe} or...      Which outputs... > Global population forecasts, such as K.C. Et al. (2010) or ... Where as I want a lower case e... > Global population forecasts, such as K.C. et al. (2010) or ... I suspect this behavior is something to do with the unconventional surname?


title: add code on every latex beamer frame

text: I would like to add some lines of code at the beginning of each frame, like the code which is uncommented here. However, the `addtobeamertemplate` does not work in the way I expected it. Does anybody know how to do this?               \documentclass[slidestop]{beamer}     \usetheme{Madrid}          \begin{document}          \addtobeamertemplate{frame begin}{\setlength{\abovedisplayskip}{2pt}}{\setlength{\abovedisplayskip}{2pt}{0pt}}     \addtobeamertemplate{frame begin}{\setlength{\belowdisplayskip}{2pt}}{\setlength{\belowdisplayskip}{2pt}{0pt}}     \addtobeamertemplate{frame begin}{\vspace*{-10pt}}{\vspace*{-10pt}}          \begin{frame}{Test}     %\setlength{\abovedisplayskip}{2pt}     %\setlength{\belowdisplayskip}{2pt}     %\vspace*{-10pt}          \begin{block}{Test}     \end{block}     \begin{gather*}     a=b     \end{gather*}          \end{frame}     \end{document}


title: Centering all tables in a document with etoolbox

text: (I know there are already other questions about centering tables such as this. This question is specific to etoolbox.) How do I center all tables using etoolbox? I can do               \documentclass[11pt]{article}     \makeatletter     \g@addto@macro{\table}{\centering}     \makeatother          \begin{document}     \begin{table}     \begin{tabular}{lr}         cat & 123 \\     \end{tabular}     \end{table}     \end{document}      and this works. But why not the following with etoolbox?               \documentclass[11pt]{article}     \usepackage{etoolbox}     \AtBeginEnvironment{table}{\centering}          \begin{document}          \begin{table}     \begin{tabular}{lr}         cat & 123 \\     \end{tabular}     \end{table}          \end{document}


title: Change author separator and delete "&" in bibliography (biblatex)

text: I have some problems with the bibliography. For nearly all changes I wanted I found solutions, but not for these two: 1: I would like to change the separator after the first name: "Panzer, Paul; Mustermann, Max" instead of "Panzer, Paul, Mustermann, Max". 2: How can I change the "&" to a ";" (but just in the bibliography and not in citations!) Thank you very much :-) This is the code I use:                \documentclass[a4paper,11pt,DIV=calc, titlepage]{scrartcl}               \usepackage[T1]{fontenc}         \usepackage[utf8]{inputenc}         \usepackage[ngerman]{babel}         \usepackage{filecontents}               \usepackage[babel, german=quotes]{csquotes}         \usepackage[style=authoryear-ibid,natbib=true, maxbibnames=9,maxcitenames=2,uniquelist=false, backend=biber]{biblatex}         \renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}               \DefineBibliographyStrings{ngerman}{             andothers = {{et\,al\adddot}},                     }               \renewcommand{\finalnamedelim}[0]{\addspace\&\addspace}                \DeclareNameAlias{sortname}{last-first}          \DeclareNameAlias{default}{last-first}                \DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{citetitle}{#1} %Anführungszeichen um Titel entfernen         \DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1}               \addbibresource{literature.bib}               \begin{filecontents}{literature.bib}               @Article{Pa2015,           Title                    = {The Test},           Author                   = {Paul Panzer and Max Mustermann and Bananen Baum},           Journaltitle             = {bla bla},           Year                     = {2015},                Owner                    = {Me},           Timestamp                = {2014.08.14}         }         \end{filecontents}                    \begin{document}              test \parencite{Pa2015}\\              \printbibliography                   It should look like this:\\              \textsc{Panzer}, Paul; \textsc{Mustermann}, Max; \textsc{Baum}, Bananen (2015). The test. In: \textit{bla bla.}\\                        \end{document}


title: Parabola starting at the node shape border

text: Is it possible to draw a parabola respecting the border shape of the node? In a simple line or arc this is possible by using nodes with `inner sep` as endpoints, but the parabola doesn't care about this separation option. Here is an example, which shows the difference. I would like to have the parabola like the arc.               \documentclass{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}       \node[circle,fill=white,draw=black,inner sep=2mm] at (0.0,0.0) (p1) {};       \node[draw=none] at (1.0,1.0) (p2) {};       \node[circle,fill=white,draw=black,inner sep=2mm] at (3.0,0.0) (p3) {};       \draw[->] (p1) parabola bend (p2) (p3);       \draw[->] (p1) -- (p3);     \end{tikzpicture}     \end{document}      ![Result](http://i.stack.imgur.com/08JF2.png)