title: TikZ arrow positioning

text: With help of you I could get started with TikZ and create this image: ![Original](http://i.stack.imgur.com/4M23s.png) Because I want to explain the double arrow part (HIS <-> Processing) better, I want to extend the "HIS" block and split this into two different blocks, surrounded with a dashed container "HIS": ![Extended](http://i.stack.imgur.com/U7kpc.png) As you can see the arrows overlap and I don't know the correct syntax to shift arrows, like what happened on the right side. This is what I'd like to accomplish: ![enter image description here](http://i.stack.imgur.com/s1z4P.png) Note the shift of the arrow coming out of processing, which is translated to the bottom. This shifting is also needed to have arrows between Reporting and Archive. The tex code (I use pdflatex) with the complete document surrounding the image is this:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{shapes,arrows,fit,calc}     \tikzstyle{box} = [draw, rectangle, rounded corners, thick, node distance=7em, text width=6em, text centered, minimum height=3.5em]     \tikzstyle{container} = [draw, rectangle, dashed, inner sep=2em]     \tikzstyle{line} = [draw, thick, -latex']          \begin{document}          \begin{tikzpicture}[auto]         \node [box] (planning) {Planning};         \node [box, below of=planning] (resources) {Resources};         \node [box, below of=resources] (sensors) {Sensors};         \node [box, below of=sensors] (processing) {Processing};              \coordinate (middle) at ($(resources.west)!0.5!(sensors.west)$);         \node [box, left of=middle, node distance=10em] (archive) {Archive};         \node [box, left of=archive, node distance=10em] (reporting) {Reporting};              \node[container, fit=(resources) (sensors)] (or) {};         \node at (or.north west) [above right,node distance=0 and 0] {OR};              \node[container, fit=(archive) (reporting)] (his) {};         \node at (his.north west) [above right,node distance=0 and 0] {HIS};              \path [line] (planning) -- (resources);         \path [line] (resources) -- (sensors);         \path [line] (sensors) -- (processing);              \path [line] (archive) |- (planning);         \path [line] (archive) |- (processing);         \path [line] (processing) -| (reporting);              \draw [line] (processing.east) -- ++(2,0) node(lowerright){} |- (planning.east);         \draw [line] (lowerright |- or.east) -- (or.east -| resources.south east);     \end{tikzpicture}          \end{document}      I tried already `(processing.south) -| (reporting)` instead of `(processing) -| (reporting)`, but this doesn't translate the arrow enough to have it fist a vertical part. Any help is really appreciated, as I hope to understand TikZ better!


title: Formatting of institution as author with natbib and numbered references

text: I am editing a document to be submitted to an Elsevier journal. The Elsevier document class uses natbib to handle references. I am encountering a problem with the appearance of references that have an institution or organization as the author. For example, if the author is "US Department of Energy", I know I can force the output to appear as I've specified using double braces:               Author = {{US Department of Energy}}      The trouble I'm having is that while this achieves the desired effect, bibtex is treating the author name as a last name, so it gets formatted in the references list as: > US Department of Energy, . Using `\usepackage[nodots]{numcompress}` gets rid of the comma, but there will still be a space between the end of the author and the period. Looking at the bbl file reveals that bibtex is adding `\xfnm[]` after the author name. If I remove this element in the author name in the bbl file, the extra comma and space go away. I know that the problem is created in part because of the bst file I'm using, but I'm not supposed to substitute another format. Is there anything I can do to prevent this extra element from being added to the bbl file by bibtex in the first place? ### MWE: tex markup               \documentclass[11pt]{article}     \usepackage[numbers,sort&compress]{natbib}     \usepackage{hyperref}          \begin{document}          Here I am going to use a reference with an institutional author~\cite{BTS2012}.          \bibliographystyle{model3-num-names}     \bibliography{sources}          \end{document}        ### MWE: bibtex file (sources.bib)               @misc{BTS2012,       Author= {{Bureau of Transportation Statistics}},       Howpublished = {\url{http://www.bts.gov/programs/national_household_travel_survey/daily_travel.html}},       Publisher = {{Department of Transportation}},       Title = {{National Household Travel Survey: Daily Travel Quick Facts}},       Year = {2012}}      Download link for model3-num-names.bst if needed. ### New MWE (demonstrating author name double period formatting problem)               \begin{filecontents*}{\jobname.bib}     @misc{BTS2012,       Author= {{Bureau of Transportation Statistics}},       Howpublished = {\url{http://www.bts.gov/programs/national_household_travel_survey/daily_travel.html}},       Publisher = {{Department of Transportation}},       Title = {{National Household Travel Survey: Daily Travel Quick Facts}},       Year = {2012}}     @article{Shaw1985,       Author = {Shaw, John J and Gendron, Robert F and Bertsekas, Dimitri P},       Journal = {IEEE Transactions on Power Apparatus and Systems},       Number = {2},       Pages = {286--294},       Title = {{Optimal Scheduling of Large Hydrothermal Power Systems}},       Volume = {104},       Year = {1985}}     }     \end{filecontents*}          \documentclass[11pt]{article}     \usepackage[numbers,sort&compress]{natbib}     \usepackage{hyperref}     \usepackage[nodots]{numcompress}          \begin{document}          Here's a reference with an institutional author~\cite{BTS2012}. Here's a journal reference~\cite{Shaw1985}. Notice how the periods terminating the authors' first and middle initials have been removed, and thus only a final period terminates the list of author names, rather than a terminating double period (which would appear as Bertsekas, D.P..).          \bibliographystyle{model3-num-names}     \bibliography{\jobname}          \end{document}      Download link for the modified version of the numcompress package (see line 167).


title: Right align in eqnarray

text: I have a MWE where I use `eqnarray` for multiline equations. I want to right align those two `text`, but `\hfill` is not working here. I think I may use `align`, but here just want to know how to do it with `eqnarray`.               \documentclass[]{beamer}          \begin{document}          \begin{frame}     \frametitle{Example}     \begin{eqnarray*}     A &=& B + C \hfill (\Leftarrow \text{from Theorem 1}) \\       &=& D + E \hfill (\Leftarrow \text{from Corollary 2}) \\       &=& F      \end{eqnarray*}     \end{frame}          \end{document}


title: ConTeXt: How to prevent new paragraph after \hrule in section heading?

text: I'm using ConTeXt, and trying to setup my document's subsection headings to start with a colored rule. However, any way I've tried doing this results in a rule placed a line higher than the heading text. The simplest document that illustrates the issue is the following:               \startmode[*mkii]       \enableregime[utf-8]       \setupcolors[state=start]     \stopmode          \setuphead[section]      [style=\tfb, before={beforetext}]     \setuphead[subsection]   [style=\tfb, before={\blackrule}]          \starttext          \section{Section}     This works as expected.          \subsection{Subsection}     Here, for some reason the rule doesn't come on the same line as the heading.     However, inlining does seem to work in the section text: \blackrule     \stoptext      which gets rendered as ![rule rendering test](http://i.imgur.com/82LJHRe.jpg) Does anyone know what causes the line break when the rule is part of the section heading, and how to prevent it?


title: Hyperref linking to wrong item in TOC(Lyx)

text: I added the hyperreff package and a TOC to my document using Lyx's built-in options. It seemed to work almost perfect except one problem: the first item in the TOC is linked to the page of the second item, the second item is linked to the page of the third item, etc..(the last item is not linked at all). I have a feeling that the solution is quite simple, but all of my efforts to solve it were to no avail. edit: this is a part from the source code, I'm not sure which part is relevant.               \documentclass[english,hebrew]{article}     \usepackage[T1]{fontenc}     \usepackage[cp1255]{inputenc}     \usepackage{geometry}     \geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}     \makeatletter     \AtBeginDocument{\make@lr\thetheorem}     \usepackage{hyperref}     \makeatother     \usepackage{babel}     \begin{document}     \tableofcontents     \pagebreak     \section{eno}\phantomsection     \addcontentsline{toc}{subsection}{eno}     \L{$TEXTEXTEXTEXTXET$}     \newpage     \section{owt}\phantomsection     \addcontentsline{toc}{subsection}{owt}     \end{document}


title: Aligning both tikz pictures and their captions

text: I am using two tikz pictures in subfigures. The baseline parameter allows aliging the subfigures via the nodes, however the caption (b) is much above the caption (a) in such case. If I don't you baseline, then the caption are aligned, but not the figures. Is that possible to match the alignment for both simultaneously?               \documentclass[10pt, a4paper]{amsart}     \usepackage{graphicx, subfigure}     \usepackage{graphics}     \usepackage{tikz}     \usepackage[all]{xy}     \usetikzlibrary{arrows,automata}     \usetikzlibrary{shapes,snakes}     \usetikzlibrary{positioning}          \begin{document}          \begin{figure}[h]     \centering       \subfigure[First SS]{       \begin{tikzpicture}[baseline=(b),->,>=stealth',shorten <= 2pt, shorten >= 2pt,auto,node distance= 2.2cm]            \tikzstyle{every state}=[draw,circle split,minimum width={2em}]              \node[state]    (a1)                                            {$a_1$ \nodepart{lower} $A$};         \node[state]    (b)     [below right = .3cm and 3.5cm of a1]    {$b$ \nodepart{lower} $B$};         \node[state]    (a2)    [below left = .3cm and 3.5cm of b]     {$a_2$ \nodepart{lower} $A$};              \path[->]             (a1)    edge [loop above, below left]   node    {$\frac13\;$}   (a1)                     edge [bend left]                node    {$\frac13$}     (b)                     edge [bend right,left]          node    {$\frac13$}     (a2)             (a2)    edge [bend right, right]        node    {$\frac23$}     (a1)                     edge [bend right, below]        node    {$\frac13$}     (b)             (b)    edge [loop above, below right]  node    {$\;\;1$}       (b)             ;       \end{tikzpicture}       \label{fig:ss.example.a}       }       \qquad       \subfigure[Second SS]{       \begin{tikzpicture}[baseline=(-b),->,>=stealth',shorten <= 2pt, shorten >= 2pt,auto,node distance= 2.2cm]            \tikzstyle{every state}=[draw,circle split,minimum width={2em}]              \node[state]    (-a)                        {$\bar a$ \nodepart{lower} $A$};         \node[state]    (-b) [right = 3cm of -a]    {$\bar b$ \nodepart{lower} $B$};              \path[->]             (-a) edge [loop above, below left]   node    {$\frac23\;$}   (-a)                 edge                 node    {$\frac13$}     (-b)             (-b) edge [loop above, below right]  node    {$\;\;1$} (-b)             ;       \end{tikzpicture}       \label{fig:ss.example.b}       }       \caption{Example of two finite autonomous SSs.}       \label{fig:ss.example}     \end{figure}          \end{document}


title: How make a class or package?

text: I want to make a class or package but i don't have example class or package Would you help me and give a example document ( ***.cls** ) or package( **.*sty** ) ?


title: Template for a book for children

text: I intend to (write and) typeset in LaTeX one or more books for my almost-4 child. They would be books telling a fairy tale (or the labours of Hercules, say) with one sentence and a large illustration in each page. Assuming to have the text and the (probably jpeg) illustration, do you know a package / template / set of macros to put everything together in an easy and pleasant way? "Pleasant" means here, for instance, that the text might be in a different position in each page, or in one or several lines, and so on.


title: Designing Magazines in LaTeX

text: How to design attractive magazines using LaTeX?Will **TikZ** be sufficient.What packages to include in the book class


title: Add chapter number in roman numbers using fancyhdr

text: I am trying to add the chapter number to the footer using fancyhdr. What I would like to do is have the chapter number in roman numbers and the page number in arabic together like so:               VI - 8      This is the code I have right now:               \documentclass[a4paper]{book}     \usepackage{fancyhdr}          \begin{document}     \pagenumbering{Roman}     \clearpage     \pagestyle{fancy}     \cfoot{\thepage}     \renewcommand{\headrulewidth}{0pt}     \fancyhead[LE,RO]{}     \fancyhead[LO,RE]{\slshape \leftmark}     %\tableofcontents          \clearpage     \pagenumbering{arabic}     \input{Chapter_1.tex}     \input{Chapter_2.tex}     \input{Chapter_3.tex}     \input{Chapter_4.tex}     \input{Chapter_5.tex}     \input{Chapter_6.tex}          \end{document}      Could anyone please help me?? THank you in advance!


title: cancelling out cells in tables

text: Can you help me to obtain this table in LaTeX? Is it possible to obtain it by completing the following code?               \begin{table}[htbp] \centering     \begin{tabular}{cccc}     \hline     a & b & c & d \\     e & f & g & h \\     i &   &   & j \\     k &   &   & l \\     \hline     \end{tabular}     \end{table}      ![enter image description here](http://i.stack.imgur.com/Nt6oB.png)


title: curve doesn't follow the point

text: I created this graph using pgfplot package. Here it is the code I used:               \begin{figure}[htp]     \centering     \begin{tikzpicture}         \begin{semilogxaxis}[xmin=1e-06,xmax=1e-01,xlabel=packet loss,ylabel=valore atteso,                              grid=both,                              legend pos = north west]         \addplot [smooth,thick,blue]             file {./MATLAB/grafici/valore_atteso/pure_network_coding/var_pkts_loss_probability/valore_atteso_20nodes_rlnc.txt};     \end{semilogxaxis}     \end{tikzpicture}     \end{figure}      here it is the result I got: ![enter image description here](http://i.stack.imgur.com/soOHU.png) but unfortunately this is not the right graph. This because the file contains those values:               1e-06 1.0022     1e-05 1.0095     0.0001 1.0299     0.001 1.135     0.01 2.1753     0.1 46.922      The curve around 1e-3 and 1e-2 goes down. Why?


title: excel2latex table too many }s, wrong endgroups, and too many endgroups

text: I am having issues inputting a table generated by `excel2latex` into my primary document. I have called up packages `bookends`. And here is the code copied directly from `excel2latex` (in excel 2010 on a PC):               \begin{table}[htbp]         \centering         \caption{Add caption}           \begin{tabular}{rrrr}           \toprule           Group & Mean1 & Mean2 & Difference \\           \midrule           Men   & 2.6   & 3.6   & 1.0 \\           Women & 6.7   & 8.9   & 2.2 \\           \bottomrule           \end{tabular}%         \label{tab:junk}%       \end{table}%        With this code consistently I get the following 3 errors:               Too many }'s \end{table}       \begin{document} ended by \end{table}. \end{table}       Extra \endgroup \end{table}        However, I can't seem to find any of these errors in the actual code.   I can't seem to get past these errors when the code is directly in the document or when input from a different file (as in `\input{table_junk}`).   Does anyone have any suggestions?


title: Controlling the subcaption space in memoir

text: Memoir provides these two declarations to control the vertical space surrounding a subcaption:               \tightsubcaptions     \loosesubcaptions      I was wondering if there is a way to control this spacing more accurately; perhaps using something that allows me to specify exactly the amount of spacing?


title: How to create Multilevel Colored Boxes using tcolorbox/any other package?

text: `tcolorbox` Manual provides the following example: ![enter image description here](http://i.stack.imgur.com/qSBQZ.jpg) Can anybody please suggest me how to create exactly this type of box - The no. of rows to add must be flexible(It seems that tcolorbox has no option other than top & bottom): ![enter image description here](http://i.stack.imgur.com/VaDFu.jpg)


title: Different radii of rounded corners in same draw command in TikZ

text: Is it possible to use different rounded corners radii on different parts of a draw command? I'm creating a tube that is bent. I'd like the outer radius to be greater than the inner radius. I can of course do this by creating two different draw commands, but then I won't be able to fill the object.               \filldraw[draw=blue!50, fill=black!10, rounded corners=2] (1.9,15) -- (3.1,15) -- (3.1,14.6)     -- (3.3,14.6) -- (3.3,15.2) -- (3.5,15.2)-- (3.5,13.9) -- (3.3,13.9) --(3.3,14.5) --     (3.1,14.5) -- (3.1,14.1) -- (1.9,14.1) -- cycle;      I've tried the following, but it generated a white diamond-shape in the middle of the figure that was supposed to be green.               \documentclass[border=3mm]{standalone}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}          \filldraw node[fill=green,     append after command={[rounded corners=0pt](b.west)|-(b.north)},     append after command={[rounded corners=3pt](b.north)-|(b.east)},     append after command={[rounded corners=1pt](b.east)|-(b.south)},     append after command={[rounded corners=5pt](b.south)-|(b.west)}] (b) {Another piece of text};     \end{tikzpicture}          \end{document}


title: How to create a Fancy Notes-Box in half of the Page along with text

text: I can draw the following type of Notes-Box: ![enter image description here](http://i.stack.imgur.com/5JRbv.jpg) Can someone please suggest me how to draw this type of Notes-Box: ![enter image description here](http://i.stack.imgur.com/PQxBp.jpg) The second one is different from the first one in 2 ways:   * We can add text below the picture (In the first one, picture occupies the left frame completely)   * The second box does not cover the entire space. We can write text on Left side as well. Thanks.


title: Can \uput mimic \rput when they enclose a non-zero dimensional object?

text: ## Zero-dimensional objects For zero dimensional objects, `\uput` can mimic `\rput` as illustrated in the following example.               \documentclass[pstricks,border=12pt]{standalone}           \begin{document}           \begin{pspicture}[showgrid=bottom](6,6)      % the first angle in [] will be ignored when the labelsep = 0.     \uput{0}[0]{0}(2,3){\pscircle(1,1){1}}     \uput{0}[45]{45}(2,3){\pscircle[linecolor=red](1,1){1}}     \uput{0}[90]{90}(2,3){\pscircle[linecolor=blue](1,1){1}}     \end{pspicture}           \begin{pspicture}[showgrid=bottom](6,6)      \rput{0}(2,3){\pscircle(1,1){1}}     \rput{45}(2,3){\pscircle[linecolor=red](1,1){1}}     \rput{90}(2,3){\pscircle[linecolor=blue](1,1){1}}     \end{pspicture}           \end{document}      ## Non-zero dimensional objects The following is my attempt to mimic `\rput` with `\uput`. Unfortunately, I failed and gave up! I cannot move the center of `\object` to `(2,3)` when using `\uput` while I can do it with `\rput`.               \documentclass[pstricks,border=12pt]{standalone}           \newcommand\object[1][black]{%     \pspicture(3,2)     \psframe*[linecolor=#1](3,2)     \endpspicture     }     \begin{document}           \begin{pspicture}[showgrid=bottom](6,6)      \uput{0}[0]{0}(2,3){\object}     \uput{1.5}[0]{0}(2,3){\object[yellow]}     \uput{-1.5}[0]{0}(2,3){\object[blue]}     \end{pspicture}           \begin{pspicture}[showgrid=bottom](6,6)      \rput{0}(2,3){\object}     \end{pspicture}           \end{document}      Do you have any idea?


title: Referencing (not Bibliography) in Harvard Style using Write Latex

text: I am relatively new to Latex and I am trying to write my first project thesis. I am using WriteLatex, which is an online Latex environment. I was successful in obtaining the references from many sites, imported them into a .bib file in Bibtex and cite them in Author Year title format. My problem arises when I cannot see the References at the bottom in Harvard style. What I want to see is this               [Alpaydin,2004] Ethem Alpaydin, Introduction to Machine Learning, MIT Press, 2004.      What I get is just this under the name Bibliography               Ethem Alpaydin, Introduction to Machine Learning, MIT Press, 2004.      I am using the following packages               \documentclass[a4paper]{report}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{graphicx}     \usepackage{natbib}          \begin{document}          \addcontentsline{toc}{subsection}{Bibliography}     \bibliography{Ref} %My .bib file     \bibliographystyle{plainnat}     \end{document}      Edit: The Bibliography files are of the format:               @book{alpaydin2004introduction,       title={Introduction to machine learning},       author={Alpaydin, Ethem},       year={2004},       publisher={MIT press}     }      Can someone please help me get the Harvard style referencing even at the end of the document in the style I mentioned above. Thanks in advance


title: Custom section in conflict with TOC

text: I adapted this answer to make a custom section I need. My intention is that it looks something like the second heading from this image: ![desired_output](http://i.stack.imgur.com/GQRiM.png) So the numbering must be made using `(\Alph)` and it must be independent from the section/subsection. The counter should restart at each subsection. Here's a MWE with my attempt to achieve the heading I need:               \documentclass{article}     \usepackage{titlesec}         %%% seccion para estatica comparativa         \titleclass{\scenario}{straight}[\subsection]         \newcounter{scenario}[subsection]         \titleformat{\scenario}           {\scshape}{}{0em}{(\thescenario)~}         \titlespacing*{\scenario}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}         \renewcommand*{\thescenario}{\Alph{scenario}}         \newcommand{\scenarioautorefname}{scenario}          \begin{document}     \setcounter{tocdepth}{1}     \tableofcontents          \section{First section}          \subsection{First subsection}     \scenario{My first scenario}     \scenario{My second scenario}          \subsection{Second subsection}     \scenario{My third scenario}     Counter restarts.     \end{document}      I'm sure that I must be making some mistake, because even though it produces the desired result, now the TOC compiles incorrectly, showing the `scenarios` even though I defined TOC depth to 1. What mistake am I making on the definition of the custom heading? I tried looking on this site or the `titlesec` documentation, but haven't been able to solve it.


title: Chapterstyle in memoir

text: For some reason I can't compile the following small example in memoir.               \documentclass[oneside,12pt]{memoir}     \begin{document}     \chapterstyle{madsen}          \frontmatter     \tableofcontents     \mainmatter          \chapter{First chapter}     Text     \chapter{Second chapter}     More text          \end{document}      Gives the following error:               ! Undefined control sequence.     <argument> \hspace {0.4em}\resizebox                                           {!}{4ex}{\chapnamefont \bfseries \sffam...     l.13 \mainmatter      If I comment the line `\chapterstyle{madsen}` the document compiles well. I have used `\chapterstyle{madsen}` in other documents before. Why is it that I can't compile this one?


title: \thelstlisting undefined for nostarch

text: I'm trying to get `nostarch` working and it won't even get out of the gate. I'm just a lowly user so these kinds of errors leave me quite clueless. The sample doc in the distribution nssample.tex gives me the same error as this simple example does:               \documentclass[nocfonts]{nostarch}     \begin{document}     \end{document}      And I get the error:               ! LaTeX Error: \thelstlisting undefined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.580 \renewcommand \thelstlisting      Clearly `nostarch` is pulling in `listings` (or is it `listing`?), or maybe more correctly, it needs it but it isn't pulling it in? I'm using a fully updated TeXLive 2011 on OS X Lion.


title: Aliasing a command to another

text: I have the command `\DoubleSpacing` within the caption of many of my figures throughout my document. This command is provided by `memoir.`               ...     \caption[]{\DoubleSpacing Here is a figure caption}     ...      I would like to replace this command by some other command, say `aux_command` that I can alias to `\DoubleSpacing` or to a dummy command that does nothing (literally), at will, and in one single place. This would allow me to quickly turn on and off DoubleSpacing in the caption of my figures. How can I do that?


title: alternating chapter and section on header

text: I use the code trying to have the header to display chapter and section alternately               \pagestyle{fancy}     \renewcommand{\chaptermark}[1]%     {\markboth{\MakeUppercase{\thechapter.\ #1}}{}}     \renewcommand{\sectionmark}[1]%     {\markright{\MakeUppercase{\thesection.\ #1}}}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}     \addtolength{\headheight}{0.5pt}     \fancyhf{}     \fancyhead[R]{\fontsize{10}{11}\selectfont \thepage}     \fancyhead[L]{\ifthenelse{\isodd{\value{page}}}{\leftmark}{\rightmark}}      but instead of displaying the headers based on the value of pages, I would like to have the header to display section first on the header after every new chapter My template was obtained from http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/ How can I do it? Any code provided would be much appreciated


title: Add custom information to text citations with biblatex

text: I've come across a case now where I need to refer to items in my bibliography as well as to something someone has told me personally. I would like that text citation to look something like this: > I know from books and people I have talked to that George Harrison played > the guitar in the Beatles (Lennon 1972, pp. 48 sqq.; Starkey 1994, pp. 103 > sqq; Paul McCartney, p.c.). The "Paul McCartney, p.c." part needs to be custom added when needed. How should I do this with `biblatex`? Below a MWE.               \documentclass{article}     \usepackage[style=authoryear]{biblatex}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @book{lennon1972,         AUTHOR = "John Lennon",         TITLE = "Who did what in the Beatles",         YEAR = "1972"}     @book{starkey1994,         AUTHOR = "Richard Starkey",         TITLE = "I'm the drummer",         YEAR = "1994"}     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}     I know from books and people I have talked to that George Harrison played the guitar in the Beatles \parencites[48\psqq]{lennon1972}[103\psqq]{starkey1994}[Paul McCartney p.c.]{}          \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/cnt8w.png)


title: Misalignment of vertical lines in big LaTEX table

text: This is my code:               \documentclass[12pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{multirow}     \usepackage{hhline}     \usepackage{array}     \usepackage{booktabs}      \usepackage{tabularx,ragged2e,booktabs,caption}     \usepackage{tabu}     \begin{document}     \begin{center}     \begin{minipage}{\linewidth}     \begin{center}     \small     \begin{tabu}{|[2pt] >{\raggedright}m{5cm} |[2pt] >{\centering}m{0.7cm} | >{\centering} m{0.4cm} | >{\centering} m{0.9cm} | >{\centering} m{2cm}| >{\centering}m{1.9cm} | >{\centering}m{1.9cm} |[2pt]}     %\begin{tabu}{|[2pt] >{\centering}p{5cm} |[2pt] >{\centering}p{0.4cm} | >{\centering} p{0.4cm} | >{\centering} p{0.9cm} | >{\centering} p{2cm}| >{\centering}p{1.9cm} | >{\centering}p{1.9cm} |[2pt]}     \tabucline[2pt]{-}            \multirow{3}{*}{Statements}& \multicolumn{6}{c|[2pt]}{Test Value\,=\,3}\\     \cline{2-7}     & \multicolumn{4}{c}{} &\multicolumn{2}{|p{3.8cm}|[2pt]}{95\,\% Confidence Interval of the Difference} \rule{0pt}{4ex}\\[3ex]     \cline{2-7}     & M& TP&    V-valu&  Difference&    Lower&  Upper \\[3ex]     \tabucline[2pt]{-}     IIdentifying wertssdf sdfweds asdwead asdwedasd asdwedasd asdad pattern asdwsdva a s asdasd for comparing the same aweda against the afasd qweqw asdas asdasd..& 9.50&  33& .000&   1.1&    .9& 1.4\\[12ex]          Identifying wertssdf sdfweds asdwead asdwedasd asdwedasd asdad pattern asdwsdva a s asdasd for comparing the same aweda against the afasd qweqw asdas asdasd.&  4.34&   31& .000&   .7& .4& 1.0 \\[12ex]     Identifying wertssdf sdfweds asdwead asdwedasd asdwedasd asdad pattern asdwsdva a s asdasd for comparing the same aweda against the afasd qweqw asdas asdasd., is valuable knowledge.&  6.347&  31& .000&   1.1&    .7& 1.4 \\[10ex]     DIdentifying wertssdf sdfweds asdwead asdwedasd asdwedasd asdad pattern asdwsdva a s asdasd for comparia against the afasd qweqw asdas asdasd. not .&       5.78&   30& .000&   .9& .6& 1.2\\[14ex]     \tabucline[2pt]{-}     \end{tabu}     \end{center}     \end{minipage}     \end{center}     \end{document}      This is how it looks: ![enter image description here](http://i.stack.imgur.com/v0456.jpg) As you can see there is misalignment at 5 and 6 columns in second row. Why It could be so? I can not find bug anywhere? Thank you in advance.


title: section title in \frametitle beamer

text: I want to create a new environment, from frame environment, but I want to add the command \frametitle so it shows the title of the current section. Anyone have any idea how to do.


title: How to make letter spacing in verbatim/fancyvrb look like listings

text: I've just noticed that the spacing between letters is different in `verbatim` vs. `lstlisting` environments: ![example of the difference in letter spacing](http://i.stack.imgur.com/33wNp.png) Given that I add the option `columns=flexible` to the `lstlisting` environment, the spacing in this environment looks similar to the one in the `verbatim` environment. Is it possible to do the reverse, i.e. to make the text in the `verbatim` environment look like the text in the `lstlisting` environment (possibly using the fancyvrb package)? Below is the sample code I used:               \documentclass{article}     \usepackage{verbatim}     \usepackage{listings}          \begin{document}          \begin{lstlisting}[basicstyle=\ttfamily]       Dummy code     \end{lstlisting}          \begin{verbatim}       Dummy code     \end{verbatim}          \end{document}


title: Writing under a Table

text: I made a table with the tabular environment and I wanted to continue writing (under it) but the words are moved to the next page. I used:               \makeatletter     \setlength{\@fptop}{0pt}     \setlength{\@fpbot}{0pt plus 1fil}     \makeatother      to move the table to the top of the page. I don't know if this has something to do with this error. Or are there any commands under the table before continue writing?


title: Link to start of current section, automatically, in ConTeXt?

text: I want page headers to link to the start of the current `\subject`, and – because I am automatically processing an XML document – I want to do this without manually entering the subject label. (This may also require automatically adding a label to the subject.) Is there a command/keyword that identifies the location of the last-defined subject head? `\getmarking[subject]` fetches the subject title. Unfortunately, trying to set a label with `\reference[{\getmarking[subject]}]` gives an error. Minimal example:               % Smaller pages make examples nicer: \input-ing a quote      % will create multiple pages at once     \setuppapersize[A7][A7]     \setupinteraction[state=start]          %% I want people to be able to click this text to go to the start of the chapter     \setupheadertexts[{\sc \words \getmarking[subject]}][]     \setupheader[leftwidth=0.9\textwidth]     \setuppagenumbering[location={header,right}, style=os]          \setuphead[subject]       [header=high,            % no header on the subject page        page=right,        % Keep track of the number (but don't print it)        % This is so we can include \subjects in the ToC        % (ToC not included in this example)        incrementnumber=yes,        number=no,        interaction=list,       % link to the TOC       ]          \starttext       \subject{Water}       \input bryson            \subject{America}       \input davis     \stoptext


title: How to create a fancy badge (award graphics) in LaTeX?

text: Is it possible to create fancy badges in LaTeX? Are there any packages for this? Below are some examples: ![](http://i.stack.imgur.com/w1mF5.png) ![](http://i.stack.imgur.com/gJD08.jpg) ![](http://i.stack.imgur.com/AZ3VM.jpg) ![](http://i.stack.imgur.com/5H7MB.jpg)


title: Efficient Strategy to cite papers

text: My strategy to cite papers has been to type all the information in manually within the body of the .tex file. For example:               \begin{thebibliography}{10}          \bibitem{mg} {\sc M. Gockenbach},     {\em Understanding and Implementing the Finite Element Method}, SIAM,     Philadelphia (2006)          ...          \end{thebibliography}      When I search for articles on things like google scholar, I notice that I have the option of importing into BibTeX format, but it looks nothing like what I would type in the body of the article. For example:               @article{biot1941general,       title={General theory of three-dimensional consolidation},       author={Biot, M.A.},       journal={Journal of applied physics},       volume={12},       number={2},       pages={155--164},       year={1941},       publisher={AIP}     }      So, I suspect there's a faster way to use this code to my advantage. Can I simply put it into my latex file in the bibliography section? Can I put it into a separate file and load the bibliography from that file into my .tex file? How can I do this?


title: Is there a simple way to open ".sty" files by something similar to the "texdoc"?

text: Is there a simple way to open "`.sty`" files by something similar to the "`texdoc`"? I'm looking for something like `texsty` to simply open `.sty` files.


title: How do I create complex equation?

text: I need to create a couple complex equations and most of the things I try end up putting the denominator next to the numerator. I am trying to create these equations:               k=(QL)/(t(Delta)hA)      and               k=((aL)/(At))ln(h(sub zero)/h(sub t))      Is it possible to make these equatons?


title: Questions about Bjornstrup

text: I use `\documentclass{scrbook}` with `\usepackage[Bjornstrup]{fncychap}`. How can I style the `partpage` like the `chapterpage` in the `Bjornstrup`-style? Plus this I want to change the grey colour of the box from `Bjornstrup` in another one. How is this possible?


title: Faster Metapost SVG Output with TeX?

text: I am generating some diagrams with METAPOST. I need the output in SVG format. My labels are generated by calls to LaTeX via `Tex.mp` and its `TEX` METAPOST definition (also called a macro). My complaint: it is pretty slow to constantly write stuff to a file and fire off an instance of `latex`. Is there a faster way to achieve the same result? (As I recall, I can use METAPOST inside a TeX document with the package `luamplib`, which is fast, but it generates PDF, not SVG.) Minimal example:               prologues:=3;     input TEX;          outputformat := "svg";     outputtemplate:="%j.%{outputformat}";          string texpre;     % texpre = "%&latex" & char(10) &     texpre =        "\documentclass{article}" & char(10) &       "\begin{document}  " & char(10);          TEXPRE(texpre);     TEXPOST("\end{document}");          beginfig(1)       draw fullcircle scaled 1in;       string l;       l = "Foo";       dotlabel.bot(TEX("Label is " & l), origin);     endfig;     end


title: How can I conditionally include the page number in a cross-reference (when the object referenced is on a different page)?

text: When a cross-reference to a figure is not on the same page as the figure, I would like to include the page number in the figure. But when they are on the same page, this is redundant--and I want to omit the page number. In other words, I want to switch between these two styles of figure referencing depending on samepage/differentpage:               \newcommand{\figref}[1]{Figure~\ref{fig:#1}, page \pageref{fig:#1}}     \newcommand{\simplefigref}[1]{Figure~\ref{fig:#1}}      Probably Testing for current page and conditionals can do this, has anybody got a recipe worked out?


title: numbered sublist

text: Here is what I want to do -               1. List 1      1. sub list 1      2. sub list 2      I tried doing this,               \begin{enumerate}           \item List 1            \begin{enumerate}         \item sub list 1         \item sub list 2       \end{enumerate}          \end{enumerate}      But this gives me -               1. List 1      a. sub list 1      b. sub list 2      How should I go about this.


title: Generate labels based on macro argument

text: I'm not proficient in LaTeX enough to solve the following. I have a macro that takes two parameters, creates a nice box, puts the first argument in bold, and the second argument in an emphasized text:               \newcommand{\Step}[2]{%     \noindent{\\[0pt] \rule{0pt}{0.5ex}%     \hspace*{1em}\fbox{\parbox[t]{0.92\columnwidth}{{\bfseries Step #1.\ }\emph{#2}}}}         \vspace*{1.1ex} }      I call this macro 10-15 times in text (that many steps I have). In order to be able to refer to the page where this macro is expanded, I would now like to place a label. If I change the last line to:                   \vspace*{1.1ex} \label{step:mode:#1} }      errors start to pop up. I get this, on a completely unrelated line:               ! Missing \endcsname inserted.     <to be read again>                     \protect      l.160 ...aults Occur\relax }{figure.caption.52}{}}      This line probably comes from some auxiliary file. How to properly expand the first argument and use it as an argument to label? First argument does not have spaces, and will never have them.


title: How to make nested table span all underlying cells

text: How can I make a nested multicolumn table span all its underlying columns such that 1 2 3 do not look squashed together but are rather distributed equally over the 2 cells?               \begin{tabular}{ c c }       something long & here too \\       \multicolumn{2}{c}{\begin{tabular}{ l c r } 1 2 3\end{tabular}} \\     \end{tabular}


title: Adobe Caslon Pro, XeLaTeX, fontspec - how to change the "dollar" symbol that's used with oldstyle numbers

text: I am using XeLaTeX with Adobe Caslon Pro, and I would like to have oldstyle numbers. But when I use the option `Numbers=OldStyle` in `fontspec`, my dollar sign changes from a full-height S with two lines through it to a tiny s with only one line through it. How can I get oldstyle numerals without changing the dollar sign? I tried a number of options for ligatures in the fontspec command, however the actual ligatures they introduce are not pleasant. Minimal Example (compiled with XeLaTeX):               \documentclass{article}     \usepackage{fontspec}          \setmainfont[     Mapping=tex-text,     %Numbers={OldStyle}     ]{Adobe Caslon Pro}          \title{Title}     \author{Author}     \date{}          \begin{document}     \maketitle          \$100          \end{document}


title: Compilation error with tex4ht when using the authblk package

text: The following example, taken from Adding more than one author with different affiliation and saved as `example.tex`, compiles well with `pdflatex example.tex`.               \documentclass[11pt,a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{authblk}          \title{More than one Author with different Affiliations}     \author[1]{Author A\thanks{A.A@university.edu}}     \author[1]{Author B\thanks{B.B@university.edu}}     \author[1]{Author C\thanks{C.C@university.edu}}     \author[2]{Author D\thanks{D.D@university.edu}}     \author[2]{Author E\thanks{E.E@university.edu}}     \affil[1]{Department of Computer Science, \LaTeX\ University}     \affil[2]{Department of Mechanical Engineering, \LaTeX\ University}          \renewcommand\Authands{ and }          \begin{document}       \maketitle     \end{document}      But with `mk4ht oolatex example.tex` I get three times the error message " **! Illegal parameter number in definition of \@author.** " and not the desired output file.


title: How to force nodes to have the same size in tikz matrices

text: Is there some intelligent way to have several tikz nodes have the same height and width? Consider the following example with output below. I'd like every node in each row to have the same height equal to the height of the tallest node and every node in each column to have the same width equal to the width of the widest node. In the example below each node in the third row has a different height. In the first two rows the heights are forced to be equal using \vphantom. There must be a more intelligent way to do this. Any ideas? What about the columns (they contain identical nodes, but they would not normally)? I don't want to hard-code a minimum width+height. Thank you! J.               \documentclass{minimal}          \usepackage[svgnames]{xcolor}     \usepackage{tikz}               \begin{document}     \begin{tikzpicture}     [every node/.style={anchor=base}]     \matrix [draw=red]     {     \node[fill=Orange] {a\vphantom{Xg}}; & \node[fill=Green] {X\vphantom{ag}}; & \node[fill=LightGreen] {\vphantom{aX}g}; \\     \node[fill=Yellow] {a\vphantom{Xg}}; & \node[fill=Cyan] {X\vphantom{ag}}; & \node[fill=Magenta] {\vphantom{aX}g}; \\     \node[fill=Purple] {a}; & \node[fill=LightBlue] {X}; & \node[fill=Aquamarine] {g}; \\     };     \end{tikzpicture}     \end{document}      ![Output](http://i.stack.imgur.com/xGbF0.jpg)


title: Horizontally aligning figures in tikz

text: I have produced two figures using TikZ that currently consume one full page(each taking up a half of the page). I want to scale these images and place them side by side horizontally so that I can save up half a page. I tried using the subfloat environment, and somehow things are getting very messy. Can someone tell me how to do this? Here is my Tikz code:               \documentclass{report}     \usepackage{multirow}     \usepackage{graphicx}     \usepackage{subfig}      \usepackage{verbatim}     \usepackage{array}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{float}     \usepackage{xspace}     \usepackage{tikz}     \usepackage{subfloat}     \usetikzlibrary{shapes,arrows,shadows}     \usepackage{bm,times}     \usepackage{pgf}          \begin{document}          \begin{figure}          \begin{tikzpicture}               \newcommand{\mx}[1]{\mathbf{\bm{#1}}} % Matrix command     \newcommand{\vc}[1]{\mathbf{\bm{#1}}} % Vector command          % Define the layers to draw the diagram     \pgfdeclarelayer{background}     \pgfdeclarelayer{foreground}     \pgfsetlayers{background,main,foreground}          % Define block styles used later          \tikzstyle{sensor}=[draw, fill=white!20, text width=5em,          text centered, minimum height=2.5em,drop shadow]     \tikzstyle{ann} = [above, text width=5em, text centered]     \tikzstyle{wa} = [sensor, text width=10em, fill=white!20,          minimum height=6em, rounded corners, drop shadow]     \tikzstyle{sc} = [sensor, text width=13em, fill=white!20,          minimum height=10em, rounded corners, drop shadow]          % Define distances for bordering     \def\blockdist{2.3}     \def\edgedist{2.5}            \path[fill=white!20,rounded corners, draw=black!50, dashed]                (-7.0,3.5) rectangle (-3.5, -3.5);                  \coordinate [label=left:$C_3$] (A) at (-4.5,3.0);            \path[fill=white!20,rounded corners, draw=black!50, dashed]                (-1.0,3.5) rectangle (2.0, -3.5);                  \coordinate [label=left:$C_2$] (A) at (0,3.0);            \node (wa) [sensor]  {$CK$};         \path (wa.west)+(-4.0,1.5) node (asr1) [sensor] {$CK$};         \path (wa.west)+(-4.0,0.5) node (asr2)[sensor] {$CK$};         \path (wa.west)+(-4.0,-1.0) node (dots)[ann] {$\vdots$};          \path (wa.west)+(-4.0,-2.0) node (asr3)[sensor] {$CK$};                  \path (wa.east)+(\blockdist,-1) node (c1) [sensor] {$C_1$};         \path (c1.west)+(-1,-0.5) node (dots)[ann] {$\vdots$};           \path (wa.south)+(0,-2.0) node (c22)[sensor] {$CK$};                \path [draw, ->] (asr1.east) -- node [above] {$1$}              (wa.160) ;         \path [draw, ->] (asr2.east) -- node [above] {$2$}              (wa.180);         \path [draw, ->] (asr3.east) -- node [above] {$m$}              (wa.200);         \path [draw, ->] (wa.east) -- node [above] {}              (c1.west);         \path (c1.east) ++ (1,0) node (temp) { };         \path [draw, ->] (c1) -- (temp);         \path [draw, ->] (c22) -- (c1);                                \path (c22.west) ++ (-1,0.4) node (temp2) { };          \path [draw, ->] (temp2) -- (c22);         \path (c22.west) ++ (-1,-0.4) node (temp3) { };         \path [draw, ->] (temp3) -- (c22);          \path (c22.west)++(-0.5,-0.25) node (dots1)[ann] {$\vdots$};                \end{tikzpicture}          \caption{\label{fig:in} A Figure}     \centering          \end{figure}                    \begin{figure}          \centering     \begin{tikzpicture}               \newcommand{\mx}[1]{\mathbf{\bm{#1}}} % Matrix command     \newcommand{\vc}[1]{\mathbf{\bm{#1}}} % Vector command          % Define the layers to draw the diagram     \pgfdeclarelayer{background}     \pgfdeclarelayer{foreground}     \pgfsetlayers{background,main,foreground}          % Define block styles used later          \tikzstyle{sensor}=[draw, fill=white!20, text width=5em,          text centered, minimum height=2.5em,drop shadow]     \tikzstyle{logic}=[draw, fill=white!20, text width=3em,          text centered, minimum height=1.5em,drop shadow]     \tikzstyle{ann} = [above, text width=5em, text centered]     \tikzstyle{wa} = [sensor, text width=10em, fill=white!20,          minimum height=6em, rounded corners, drop shadow]     \tikzstyle{sc} = [sensor, text width=13em, fill=white!20,          minimum height=10em, rounded corners, drop shadow]          % Define distances for bordering     \def\blockdist{2.0}     \def\edgedist{2.0}            \path[fill=white!20,rounded corners, draw=black!50, dashed]                (-1.0,3.0) rectangle (4.0, -4.5);                  \coordinate [label=left:$C_2'$] (A) at (1.0,1.5);            \path[fill=white!20,rounded corners, draw=black!50, dashed]                (-5.0,3.0) rectangle (-2.5, -4.8);                  \coordinate [label=left:$C_3'$] (A) at (-4.0, 2.5);              \node (wa) [logic]  {$\land$};         \path (wa.west)+(-3.2,1.5) node (asr1) [sensor] {$CK$};         \path (wa.west)+(-3.2,0.5) node (asr2)[sensor] {$CnK$};         \path (wa.west)+(-3.2,-0.5) node (asr3) [sensor] {$CK$};         \path (wa.west)+(-3.2,-1.5) node (dots)[ann] {$\vdots$};          \path (wa.west)+(-3.2,-2.0) node (asr4)[sensor] {$CK$};             \path (wa.west)+(-3.2,-3.0) node (asr5)[sensor] {$CnK$};         \path (wa.west)+(-3.2,-4.0) node (asr6) [sensor] {$CK$};                   \path (wa.east)+(\blockdist,0.5) node (lor) [sensor] {$\lor$};              \path [draw, ->] (asr1.east) -- node [above] {$S_{1,0}$}              (wa.160) ;         \path [draw, ->] (asr2.east) -- node [above] {$S_{1,1}$}              (wa.162);         \path [draw, ->] (asr3.east) -- node [above] {$B_1$}              (wa.164);         \path [draw, ->] (wa.east) -- node [above] {}              (lor.west);         \path (wa.south)+(0,-1.3) node (dots)[ann] {$\vdots$};           %    \node (wa.south)+(0.0, -4.0) node (wa1) [logic] {$\land$};     %   \node (wa.south)+(0.0, -1.0) node (wa1) [logic] {$\land$};      \node (wa.south)+(0.0, -2.0) node (wa1) [logic] {$\land$};     % \node (wa.south)+(0.0, -3.0) node (wa1) [logic] {$\land$};             \path [draw, ->] (asr4.east) -- node [above] {$S_{m,0}$}              (wa1.180) ;         \path [draw, ->] (asr5.east) -- node [above] {$S_{m,1}$}              (wa1.182);         \path [draw, ->] (asr6.east) -- node [above] {$B_m$}              (wa1.184);         \path [draw, ->] (wa1.east) -- node [below] {}              (lor.west);                         \path (wa1.east)+(\blockdist, -1.5) node (lor1) [sensor] {$\lor$};         \path (wa.east)+(\blockdist,-1.5) node (dots)[ann] {$\vdots$};             \path (wa.east)+(4.5,-1.5) node (c1) [sensor] {$C_1$};            \path (wa.east) + (6, -1.5) node (temp) { };     %  \path (lor1.west) ++ (-1,0) node (temp1) { };      %   \path [draw, ->] (temp1) -- (lor1);         \path (lor1.west)++(-0.5,-0.25) node (dots1)[ann] {$\vdots$};                \path (lor1.west) ++ (-1,0.4) node (temp2) { };          \path [draw, ->] (temp2) -- (lor1);         \path (lor1.west) ++ (-1,-0.4) node (temp3) { };         \path [draw, ->] (temp3) -- (lor1);                 \path [draw, ->] (lor1) -- (c1);       \path [draw, ->] (c1)-- (temp);         \path [draw, ->] (lor) -- (c1);         \begin{pgfonlayer}{background}              \path[fill=white!20,rounded corners, draw=black!50, dashed]                 (3,3) rectangle (-3,-3);                         \end{pgfonlayer}               \end{tikzpicture}          \caption{\label{fig:collapse}Another Figure}          \end{figure}          \end{document}


title: Cross reference supporting information in class achemso

text: By using the class achemso Supporting information to prepare the there to carry out a cross-reference (\ref{table:S1}} for this aquivo external "supporting.tex", example: Text ... see (Fig. S2) or (Table: 2), this is Suporting in a separate file.


title: Remove the bullets in Beamer's table of contents

text: I use the `Madrid` theme How can I remove the bullets in page of table-of-contents. I have tried               \setbeamertemplate{items}[circle]      It can remove the bullets in `enumeration` environment. But can do with that in table-on-contents


title: Remove whitespace in plot in Matlab textstring where 'DefaultTextInterpreter' is 'Latex'

text: With MWE:               set(0,'DefaultTextInterpreter','Latex');     x = linspace(0,10,1e2);     fx = sin(x);          Xpos = 0.1;     Ypos = 0.83;     plot(x,fx);     hTag = text(Xpos,Ypos,'(a)'); set(hTag,'FontSize',23);      I get (too much) whitespace between the character 'a' and the brackets. How do I remove it?


title: Multiple titlepages in a beamer presentation?

text: I will be giving a job talk using Beamer slides. In my job talk, I will be presenting two papers. I would like, therefore, to have three titlepages, in the format shown below. The first titlepage is the real title page. The second and third titlepages are to display the information about the papers from which that section of the talk is based.               \begin{frame}{}     Title of My Talk     My Name     The Date     \end{frame}          \begin{frame}{}     Title of Paper 1     Names of Paper 1 Authors     \end{frame}          ... slides for paper 1 ...          \begin{frame}{}     Title of Paper 2     Names of Paper 2 Authors     \end{frame}          ... slides for paper 2 ...      Is it possible to do this in Beamer?


title: How to use a glossary with xindy that is not displayed

text: According to several posts in the web the following error is related to not displaying the glossary:               Error in line 426:               ; additional letter groups          (define-letter-group "glsnumbers"        :prefixes ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")        :before "A")     ERROR: "A" does not name a letter group in     (DEFINE-LETTER-GROUP "glsnumbers" :PREFIXES      ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") :BEFORE "A")          ***Call to xindy failed***          Possible cause of problem:          No language detected.     Have you remembered to use \printglossary     or \printglossaries in your document?          Check 'diss_org.anx' for details      This in fact works without error if I print all of my three glossaries. How to get rid of that? I use glossaries, xindy and the following options               \usepackage[acronym,toc=true,shortcuts,xindy,section,nomain,nonumberlist]{glossaries}      P.S.: Sorry I do not have time to setup an MWE since I have to submit my thesis tomorrow. I can make one later * * * ## Update The problem disappeared with updating TeXLive.


title: \newcommand with PythonTeX PyCode

text: Environments are MiKTeX 2.9, XeLaTeX, PythonTeX 0.11 beta, and Python 3.3. I am pretty new to LaTeX and Python/PythonTeX and am struggling with the following piece of code.               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8     \documentclass{article}     \usepackage{fontspec,xunicode,xltxtra}     \usepackage{fancyvrb}     \usepackage{etex}     \usepackage{etoolbox}     \usepackage{xstring}     \usepackage{pgfopts}     \usepackage{newfloat}     \usepackage{xcolor}     \usepackage{pythontex}          \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \newcommand{\pow}[2]{\py{#1**#2}}     \newcommand{\poww}[2]{\pyc{print(#1**#2)}}     \newcommand{\powww}[2]{\begin{pycode}print(#1**#2) \end{pycode}}          \begin{document}     \pow{2}{5}      % success     \poww{2}{6}     % success     \powww{2}{7}    % fail     \end{document}      I get an error on `\powww` and can not understand why. Any help appreciated.               Extraneous input `print(2**7) \end {pycode}^^I% fail' between \begin{pycode}[     <key=value>] and line end     .     \FV@Error ...ncyVerb Error:^^J\space \space #1^^J}          l.28 \powww{2}{7}^^I% fail      The ultimate goal is to pass sets of 2 unicode strings as parameters from the XeLaTeX document via PythonTeX to Python, but I prefer to "start simple and then expand step by step".


title: Vim complains of Whitespace error with \hspace

text: When I type the following line in Vim:               \hrule height .1mm      Why do I get the following error in the Vim Location List:               foo.tex|258 error| Whitespace before punctation mark in " ."      NOTE: It actually says _punctation_ for some reason, and not _punctuation_


title: achieve a theorem like construct without newtheorem

text: I am trying to achieve a `theorem` like representation in my `beamer` presentation as shown. Currently I am defining a `newtheorem` env for each such construct in `preamble`, and then using that, as:               %in preamble     \newtheorem{trial}{A trial}          %in the body       \begin{frame}         \begin{trial}           Just a trial         \end{trial}       \end{frame}      Can I have a more generic way of achiving this? I mean, I don't want to define 50 `\newtheorem` in `preamble`, but still want to have this two coloured construct. Just using theorem will give me a `Theorem:trial` in the upper part. ![newtheorem](http://i.stack.imgur.com/e78hf.png)


title: textpos error with newenvironment{aside} and xelatex

text: I'm using xelatex with texlive 2011 vanilla on the latest ubuntu precise pangolin. I fork and try to use the great cv template from https://github.com/afriggeri/cv This template uses TikZ for the header, XeTeX and fontspec with Helvetica Neue font (extracted from dfont with `fondu` program). When i try to compile with `xelatex cv.tex` i have one error like this :               (/usr/local/texlive/2011/texmf-dist/tex/latex/textpos/textpos.sty     Package: `textpos' 1.7g <2010 September 30>     Grid set 16 x 16 = 38.39343pt x 49.68562pt     TextBlockOrigin set to 0pt x 0pt     )     ! Illegal parameter number in definition of \aside.     <to be read again>                         1     l.169 }      Which refers to this portion of source code into `friggeri-cv.cls`               \RequirePackage[absolute,overlay]{textpos}     \setlength{\TPHorizModule}{1cm}     \setlength{\TPVertModule}{1cm}     \newenvironment{aside}{%       \let\oldsection\section       \renewcommand{\section}[1]{         \par\vspace{\baselineskip}{\Large\headingfont\color{headercolor} #1}       }       \begin{textblock}{3.6}(1.5, 4.33)       \begin{flushright}       \obeycr     }{%       \restorecr       \end{flushright}       \end{textblock}       \let\section\oldsection     }


title: All figures at end of section (or Chapter) but in the order they were cited in the text

text: I've been trying to do this for so long, it would make my life so much easier. I have a `*.tex` file containing all the details of the figures in a chapter (but not necessarily in the right order), because the first thing I do when I'm writing is make all the figures, but I don't know what order I'll need them. Then I want to be able to reference this file at a particular point so I insert:               \input{figures.tex}      and all the figures appear, and that's great, but the thing is, I want them to be ordered by the location that they are first cited in the text, because I make the figures first, and I'm not sure what order I will use them. Up till now I end up scouring the document finding the references and ordering the figure order at the end manually, but this isn't very efficient. Alternatively can anyone suggest another workflow/method that would enable me to achieve something similar. (like maybe inserting the figures at a particular place but them only appearing at the end in a section I designate) Cheers! edit: So this is my main tex file               \documentclass{article}      \usepackage{graphicsx}      \begin{document}            \section{the text}     text text text \ref{justafig} more text \ref{asecondfig}          \section{the figures}          \input{figures}          \end{document}      then this is figures.tex               \begin{figure}[tbp]%one column          \centering{             \includegraphics[width=160mm]{./figa.png}}              \caption{the caption}             \label{asecondfig}     \end{figure}          \begin{figure}[tbp]%one column          \centering{             \includegraphics[width=160mm]{./figb.png}}              \caption{the caption}             \label{justafig}     \end{figure}      But this inserts the figures in the order then are in figures.tex and I want them in the order they are cited in the text


title: Is there any tool to draw bezier curve and transfer the coordinates to tikz?

text: Is there any tool to draw bezier curve graphically. Using the coordinates in the tool, can we draw bezier curve in tikz?


title: Error \hfil while compiling .tex file

text: Whenever I am compiling my .tex file using writelatex web service or using the the Texworks on my own desktop. I am receiving the following error message. I have checked everything but could not find the cause of problem. I will highly appreciate any help as soon as possible.               "Missing number, treated as zero.     <to be read again>                         \hfil      l.82  "


title: undertilde package provides inconsistent vertical spacing between nucleus and accent

text: My own answer is provided below, but feel free to add your own improvement as well. The `\utilde` command from the `undertilde.sty` package places different amounts of vertical space between the accent and the nucleus, depending on whether the equation is typeset in a single-line environment, ( _i.e._ , inline math, `equation`, or `displaymath`) or a multiple-line environment ( _i.e._ , `align`, `gather`, `multline`, and their associated `*-ed` environments). In a single-line environment, the accent is given the proper amount of space, but in a multiple-line environment, the accent is too far away. Below is an example: ![Undertilde spacing issue](http://i.stack.imgur.com/NhDOD.png)


title: Customizing memoir

text: I wish to set a page with the following measures (I'm copying a Renaissence text, basically): >   * Stocksize (a3paper) >   * trimmedsize (papersize) 340mm*210mm >   * typeblock 261.8mm*140mm >   * lr margins 23.3mm 46.7mm >   * ul margins 23.3mm 54.9mm >   * marginnote dst 2.8mm, width 23.3mm, 1em > Fontsize should be roman `14pt` and marginnote text should be italic `12pt` Now maybe I'm overlooking something, but it appears memoir sets the text margins according to the stock and keeps moving the trims over the text.               \documentclass[a3paper, 14pt, twoside, showtrims]{memoir}          \settrimmedsize{340mm}{210mm}{*}     %\settrims{10mm}{10mm}     %\settypeblocksize{261.8mm}{140mm}{*}     %\setlrmargins{23.3mm}{46.7mm}{*}     \setlrmarginsandblock{23.3mm}{46.7mm}{*}     \setulmarginsandblock{23.3mm}{54.9mm}{*}          \setmarginnotes{2.8mm}{23.3mm}{1em}               \usepackage{lipsum}          \begin{document}          \lipsum \sidepar{\lipsum}     \lipsum          \end{document}      I'm sure it's going to be a very trivial matter and I apologize if the answer is obvious, but I really can't seem to find a solution.


title: How to \label-\ref an un-numbered section

text: I'm trying to 'reference' the `\section*{Introduction}` of my article. I can quite easily reference the `\section{InsertSectionName}` with a `\label{}` and a `\ref{}` (taking this as my definition of 'reference') but it doesn't appear to work this way for an un-numbered section. Is there a way to do it, or to at least reference the first line of the `\section*{Introduction}`? Note: I prefer to have the "Introduction" of my article as un-numbered and to start with (Section)"1" thereafter.


title: Reduce space before and after an enviroment

text: A simple(?) question, how do I reduce the space before and after a environment? I suppose I'm after a redefine environment command that I can put at the top of my document. **Example** I'm using Sweave and the R highlight environment. Basically, R code gets transformed into latex code. The end latex result looks like this:               \begin{Hchunk}       \begin{Hinput}          \ttfamily\noindent          \hlprompt{\usebox{\hlnormalsizeboxgreaterthan}{\ }}<snip>          \normalfont        \end{Hinput}             \begin{Houtput}          \ttfamily\noindent           NC-17{\ }{\ }{\ }{\ }PG{\ }PG-13{\ }{\ }{\ }{\ }{\ }<snip>        \end{Houtput}           %A few more Hinput and Houtput environments.     \end{Hchunk}      I would like to reduce the space after `\end{Houtput}` For example `\end{Houtput}\vspace{-0.2em}`


title: How to upgrade TeXLive 2009 to TeXLive 2010

text: I have a TeXLive 2009 installation on my Linux machine. And, I'd like to upgrade it to TeXLive 2010. I tried the command `sudo tlmgr update --self --all` as suggested in How to keep my TeX Live installation up to date?. But, I get the following error message. > tlmgr: package repository http://.../mirrors/ctan.org/systems/texlive/tlnet > > The release version of the installation source and the installation media do > not agree: source: 2010, media: 2009 > > Please fix your location http://.../mirrors/ctan.org/systems/texlive/tlnet > at /usr/local/bin/tlmgr line 4205. This error message makes me wonder if it's possible at all to upgrade from TeXLive 2009 to 2010 automatically by pointing my repository location to the right address.


title: Longtable margin

text: I use the package **longtable** for build tables. But the table has many columns, then it to fall outside the limits page. How do I fix this? And how to change the margin for tables? Look at the example: ![enter image description here](http://i.stack.imgur.com/UEj3A.png) Thanks.


title: Defining a command for linked and indexed section headings?

text: What is the (preferred way of) defining a command that   * places a heading (like \section, \chapter, etc.)   * creates a label for this heading that can be referenced   * places the heading in the TOC (I think the TOC part is pretty automatic, yes?)   * places the heading in the index and what is the (preferred way of) defining a referencing command that   * places a reference to the heading with the name of the heading and it's page number   * makes this reference a Link when generating a PDF   * maybe some options on how the referencing should be spelled out and what packages are needed for this? Example:               \headx[label1]{This is a heading}     ...     \headxx[label12}]{Some sub-heading}     ...     ...     For further details, see \headreference[style=short]{label1}.     ...      (edit) Note: `[style=...]` could control what details are inserted. E.g. `short` could mean to only insert the section name as link (and skip the section number and page). `Full`could mean to also insert section number and page as text for the link. (This is just an example to show that I think that such a command should probably have some fine-tuning switches.)


title: Modify global size of booktabs table

text: Here is the table I am trying to make:               \documentclass{book}     \usepackage{tabularx, booktabs}     \usepackage{lipsum}          \begin{document}     \begin{table}     \centering               \begin{tabularx}{\textwidth}{lll}           \toprule     Conditions & Items test corrects & Items test incorrects \\      \midrule      Non-adjacents & Fa\textunderscore Sol\textunderscore Ré\textunderscore (O\textunderscore P\textunderscore Q\textunderscore ) & *Do\#\textunderscore Sol\#\textunderscore Si (S\textunderscore R\textunderscore T) \\      & Sol\#\textunderscore Do\#\textunderscore Si\textunderscore  (R\textunderscore S\textunderscore T) & *Ré\textunderscore Sol\textunderscore Fa (Q\textunderscore P\textunderscore O) \\      & \textunderscore Do\textunderscore Fa\#\textunderscore Ré\# (\textunderscore u\textunderscore v\textunderscore w) & *La\textunderscore Mi\textunderscore La\# (\textunderscore y\textunderscore x\textunderscore z) \\      & \textunderscore Mi\textunderscore La\textunderscore La\# (\textunderscore x\textunderscore y\textunderscore z) & *Ré\#\textunderscore Fa\#\textunderscore Do (\textunderscore w\textunderscore v\textunderscore u) \\     Adjacents &  Ré.Ré\#.Fa.Do.Sol.Fa\# (QwOuPv) & *Si.La.Sol\#.La\#.Do\#.Mi (TyRzSx) \\       & Ré.La\#.Fa.Mi.Sol.La (QzOxPy) & *Si.Fa\#.Sol\#.Ré\#.Do\#.Do (TvRwSu) \\       & Si.Ré\#.Sol\#.Do.Do\#.Fa\# (TwRuSv) & *Ré.La.Fa.La\#.Sol.Mi (QyOzPx) \\       & Si.La\#.Sol\#.Mi.Do\#.La (TzRxSy) & *Ré.Fa\#.Fa.Ré\#.Sol.Do QvOwPu) \\       \bottomrule           \end{tabularx}          \end{table}          \lipsum          \end{document}      The result is as follow: ![enter image description here](http://i.stack.imgur.com/iEJRl.png) I tried to reduce the width of my table with `\footnotesize` but the text in the table is still a bit beyond the right margin: ![enter image description here](http://i.stack.imgur.com/nRAtU.png) **Question:** Is there a way to force all the table to stay align with the text with booktabs ?


title: Simple horizontal slides

text: What is the simplest way to make a slide presentation? I tried beamer, but it is really complicated and I would like to have the same simple look as in _slides_ , but horizontal rather than vertical.


title: ConTeXt style/environment files for setting TEI?

text: Is there a repository of styles for typesetting XML, specifically TEI XML markup, using ConTeXt? I've been googling now for a week or so trying to dig up as much information as possible about typesetting XML using ConTeXt, and I've read several old (from 2005) articles about building such a repository. I can't seem to find anything concrete, though. Can anyone point me in the right direction?


title: Arabic page numbers appearing when I want Roman

text: I am currently writing my MSc thesis and I am having a problem with roman and arabic page numbering. I would like the _Contents_ , _List of Figures_ and _List of Tables_ all to have roman page numbers. I would then like the arabic numbers to start at the _Introduction_. I have included my code below. At the moment I am strangely seeing roman page numbers on the _Contents_ and _List of Figures_ , but the arabic numbers are starting on the _List of Tables_ page instead of the _Introduction_ page! I don't know if it makes a difference, but I am using the `book` class. Note - In case anyone is wondering, I am using `\setcounter{secnumdepth}{-1}` to prevent List of Figures and List of Tables from being numbered as chapters.               % Contents %     \newpage     \pagenumbering{roman}     \setcounter{page}{1}     \tableofcontents          % List of Figures %     \setcounter{secnumdepth}{-1}     \chapter{List of Figures}          % List of Tables %     \setcounter{secnumdepth}{-1}      \chapter{List of Tables}          % Introduction %     \setcounter{secnumdepth}{1}     \setcounter{page}{1}     \pagenumbering{arabic}     \chapter{Introduction}


title: Drawing histidine with chemfig

text: I'm trying to draw histidine with chemfig and I'm stuck. I drew most parts correctly but I'm having trouble attaching the imidazole ring properly. Here's what I have so far:               \documentclass{article}     \usepackage{chemfig}     \definesubmol{ring}{N*5(=-{NH}-(-)=-)} % imidazole ring          \begin{document}     \chemfig{!{ring}-[:30]-[:-30](-[:-90]NH_2)-[:30](=[:90]O)(-[:-30]OH)} % histidine     \end{document}      Is there an easy way to use my sub-molecule and attach it to the main part at the correct atom and angle? Cheers :)


title: Auto-generate attendance list

text: I am trying to generate attendance sheets for my class. I need the sheets to have two things: 1) a list of the students in the class with a blank for them to sign their names. 2) a randomized version of the list so that when I call on students to give the answer to homework problems, it is a different order during each class. I am struggling with looping in latex combined with list manipulation inside a `tabular` environment (tabu) and all of the associated expand and global variable issues. In the MWE below, I am trying to do #1 above. I can put in the blank lines, that is not the issue. The problem is generating the list of students inside the table. Extra credit for anyone who posts an answer to #2, though I have seen postings that suggest an answer to this (see "Generating random numbers without repetitions" for the code I was going to base mine on). MWE:               \documentclass[12pt]{article}          \usepackage{tabu}                  % Table control     \usepackage{etoolbox}              % csdef     \usepackage{pgffor}          \pagestyle{plain}          \newcounter{studentcounter}          \newcommand\addstudent[1]{%        \stepcounter{studentcounter}        \expandafter\def\csname studentlist\thestudentcounter\endcsname{#1}     }          \newcommand\getstudent[1]{%        \csname studentlist#1\endcsname     }          \addstudent{Donna}     \addstudent{Michael}     \addstudent{Chris}          \begin{document}          \newcommand\finallist{}     \foreach \n in {0,...,\thestudentcounter}{        \appto\finallist{ \getstudent{\n} \\ }     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55          STUDENT 2: \getstudent{2} \\  % This just shows me my macro is working.          \centering{\textbf{\large Attendance}}          \vfil          \sffamily          \taburulecolor{blue}     \arrayrulewidth=2pt     \begin{tabu}{l@{\rule{0pt}{20pt}}}     \multicolumn{1}{l}{Student}\\     \finallist     \rule{2in}{1pt}\\     \rule{2in}{1pt}\\     \rule{2in}{1pt}\\     \end{tabu}          \vfil          \end{document}      EDIT/UPDATE: Thanks to the people who posted answers. For the record, here is what I currently have, based on the solutions posted. I've taken the MWE and added the rest of the context around it so that folks can see the final product.               \documentclass[11pt]{article}          \usepackage{tabu}                  % Table control     \usepackage{etoolbox}              % csdef     \usepackage{fancyhdr}              % Fancy headings     \usepackage{datenumber}            % Day from Date.     \usepackage{ifthen}     \usepackage{tikz}                  % random          % An environment for changing the left and right margins     % for a block of text.  A typical usage is     % \begin{changemargin}{-0.5cm}{-0.5cm}     \newenvironment{changemargin}[2]{%     \begin{list}{}{%     \setlength{\topsep}{0pt}%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     \setlength{\listparindent}{\parindent}%     \setlength{\itemindent}{\parindent}%     \setlength{\parsep}{\parskip}%     }%     \item[]}{\end{list}}          \newcommand{\myline}{\rule{1in}{1pt}}     \newcommand{\mybox}{\fbox{\rule{0pt}{10pt}\quad }}          \setlength{\topmargin}{-0.5in}     \setlength{\textheight}{9.0in}     \setlength{\oddsidemargin}{0in}     \setlength{\textwidth}{6.5in}     \setlength{\headheight}{15pt}     \setlength{\parindent}{0pt}     \setlength{\parskip}{10pt}     \setlength{\headsep}{10pt}     \setlength{\marginparsep}{0.1in}     \setlength{\marginparwidth}{0.5in}          \pagestyle{fancy}          % In the final version, the date will be passed in on the     % command line.     \setdate{2013}{05}{24}          \lhead{\textbf{Math 132: Geometry}}     \rhead{\textbf{Donham}}     \lfoot{}     \cfoot{\textbf{\datedayname, \datedate}}     \rfoot{}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}          \newcounter{index}     \newcounter{studentcounter}          \newcommand\addstudent[1]{%        \stepcounter{studentcounter}        \expandafter\def\csname studentlist\thestudentcounter\endcsname{#1}     }          \newcommand\getstudent[1]{%        \csname studentlist#1\endcsname     }          % The student list would normally be in a separate file so     % that multiple classes are supported.     \addstudent{Abigail}     \addstudent{Aiden}     \addstudent{Alexander}     \addstudent{Ava}     \addstudent{Daniel}     \addstudent{Emily}     \addstudent{Emma}     \addstudent{Ethan}     \addstudent{Isabella}     \addstudent{Jacob}     \addstudent{Jayden}     \addstudent{Madison}     \addstudent{Mason}     \addstudent{Mia}     \addstudent{Michael}     \addstudent{Noah}     \addstudent{Olivia}     \addstudent{Sophia}     \addstudent{William}          \begin{document}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55     \vspace*{1pt}     {\centering \textbf{ \large Attendance } \par}          Students must sign in to receive credit for attending class.  If your     name is in the list below, simply write your initials on the     associated line.  If your name is \textit{not} listed, it means that     you may not be registered for this class!  Print your name on a blank     line, and then write your initials.  You should check with the     registrar to be sure you are registered.          \begin{center}     \sffamily     \setcounter{index}{0}%     \taburulecolor{blue}     \arrayrulewidth=2pt     \begin{tabu}{l@{\rule{0pt}{18pt}\hspace*{0.5in}\myline \quad \mybox \quad \mybox}}     \multicolumn{1}{l}{Student \hfill Initials \qquad HW \quad P}\\ \hline     \whiledo{\value{index} < \value{studentcounter}}{%       \addtocounter{index}{1}%       \makebox[1in]{\csname studentlist\arabic{index}\endcsname\hfill}\\%     %  \rule{2in}{1pt}\\%     }     \rule{2.5in}{1pt}\\     \rule{2.5in}{1pt}\\     \end{tabu}     \end{center}          \vfill     \pagebreak          % This page has a random list on names to call on students when     % surveying the class (e.g. answers to the day's homework problems.     \makeatletter     \def\declarenumlist#1#2#3{%     \expandafter\edef\csname pgfmath@randomlist@#1\endcsname{#3}%     \count@\@ne     \loop     \expandafter\edef     \csname pgfmath@randomlist@#1@\the\count@\endcsname       {\the\count@}     \ifnum\count@<#3\relax     \advance\count@\@ne     \repeat}          \declarenumlist{mylist}{1}{\value{studentcounter}}          \def\prunelist#1{%     \expandafter\edef\csname pgfmath@randomlist@#1\endcsname         {\the\numexpr\csname pgfmath@randomlist@#1\endcsname-1\relax}     \count@\pgfmath@randomtemp     \loop     \expandafter\let     \csname pgfmath@randomlist@#1@\the\count@\expandafter\endcsname     \csname pgfmath@randomlist@#1@\the\numexpr\count@+1\relax\endcsname     \ifnum\count@<\csname pgfmath@randomlist@#1\endcsname\relax     \advance\count@\@ne     \repeat}          \vspace*{10pt}     {\centering\textbf{\large Random Student List for \datedayname, \datedate}\par}          \begin{changemargin}{2in}{0in}     \setcounter{index}{0}%     \whiledo{\value{index} < \value{studentcounter}}{%       \addtocounter{index}{1}%       \pgfmathrandomitem\z{mylist}       \getstudent{\z}\\[5pt]       \prunelist{mylist}     }     \end{changemargin}     \vfill          \end{document}      Here is the current result... ![page0](http://i.stack.imgur.com/FsTRV.jpg) And the randomized page... ![page1](http://i.stack.imgur.com/kpYem.jpg)


title: change bibliography output with different files for each chapter

text: I am writing my thesis in pdfLaTeX+MakeIndex+BibTeX using achemso bibliography style, and I am using a root file with different files and bib for each chapter. I am trying to adjust the output of the bibiliography (i.e. add the title, remove et al and list all authors, break up a url, etc). I have tried a number of different things, including trying to add a control sequence (described here: How to use achemso bibliography style without achemso package?). I'm not sure if I'm not putting things in the right place, but nothing is working. Help? Main file:               \documentclass[12pt,oneside,final]{thesis}     \usepackage{chapterbib}     \usepackage[superscript]{cite}      \makeatletter      \renewcommand\@biblabel[1]{#1.}      \makeatother      \renewcommand\bibname{References}      \usepackage{chemstyle}     \usepackage{cite}     \begin{document}     \title{Title}     \author{Me}     \include{chapter1_MWE}     \end{document}      Chapter 1 (chapter1_MWE)               \chapter{This is the first chapter}     \label{sec:chapter1}     The text goes here.\cite{winzeler2008malaria}     Then more text.\cite{hall2005comprehensive}     \bibliographystyle{achemso}     \bibliography{./Bibliographies/chapter1_MWE}      Bibliography (chapter1_MWE)               @article{winzeler2008malaria,       title={Malaria},       author={Winzeler, Elizabeth Ann},       journal={Nature},       volume={455},       number={7214},       pages={751--756},       year={2008},       publisher={Nature Publishing Group}     }          @article{hall2005comprehensive,       title={A comprehensive survey},       author={Hall, Neil, and Karras, Marianna and Raine, Ja Dale and Carlton, Jane M and Kooij, Taco WA and Berriman, Matthew and Florens, Laurence and Janssen, Christoph S and Pain, Arnab and Christophides, Georges K, and James, K and Trueman, H E and Mendoza Jac and Bidwell, Shelby L and Rajandream, M-A and Carucci, Dan J and Yates, John R III and Kafatos, F C and Janse, C J and Barrell, B and Turner, M R and Waters, Andre P and Sinden, Rob E},       journal={Science},       volume={307},       number={5706},       pages={82--86},       year={2005},       publisher={American Association for the Advancement of Science}     }      This doesn't exactly put out what my main working file does, but it is close enough.


title: KOMA-Script: Adjust text region based on header height

text: I'd like to put an image into the headline using `scrpage2`, but the text runs through the image, because the height of the headline seems not to be adjusted. The `KOMA-Script` documentation doesn't seem to mention anything related to the height of the headline, so I would have thought that this is adjusted automatically. Is there anything that I can add to the example to have the text start below the image in the headline? This is the current example, replacing the image with a simple bar for simplicity:               \documentclass{scrartcl}          \usepackage{scrpage2}     \chead{\rule{2cm}{2cm}}     \pagestyle{scrheadings}          \begin{document}     Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy      nibh euismod   tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut      wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit      lobortis nisl ut aliquip ex ea commodo consequat.     \end{document}      And that's what it looks like: ![example result](http://i.stack.imgur.com/NXb2W.png)


title: Different colours for the bullets in itemize environment

text: In the following list, the colour of the bullet will be fixed:               \begin{itemize}     \item Good point 1     \item Good point 2     \item Poor statement 1      \item Poor Statement 2     \end{itemize}      Is there anyway to modify the above environment to have different colours for the bullets depending on the entry? Something like               Green Bullet Good point 1     Green Bullet Good point 2     Red Bullet Poor statement 1     Red Bullet Poor statement 2


title: Can I use these Libertine glyphs in pdftex?

text: MWE:               \documentclass{article}     \usepackage{iftex}     \ifXeTeX\else         \usepackage[utf8]{inputenc}         \usepackage[T1]{fontenc}     \fi     \usepackage{libertine}          \begin{document}     \ifXeTeX \addfontfeatures{Variant=01} \fi     ÖÜ     \end{document}      If you compile this with XeLaTeX, you get a different looking Ö and Ü character. It is very nice from the creators of Libertine that they included this alternate version that does not look weird for Hungarian eyes. Is there a way to use this in PDFLaTeX as the default Ö and Ü?


title: remove logo border / padding from Berkeley theme

text: I would like to remove the border or padding around the logo when using the Berkeley theme for beamer. What is the best way to do that?


title: Bibtex style issue

text: I need a special Bibliography-Style, as prescribed for my thesis.               FOR BOOKS:     [1] Surname, Forename. (Year of publication). Title(italic). Publishing-place: Publisher.          FOR NEWSPAPERS:     [1] Surname, Forename. (Year of publication, publication-date). Title. Name of the Newspaper(italic), Page.          FOR WEBSITES:     [1] Surname, Forename. (Year of publication). Title(italic). URL, Today's Date.      I haven't found any template, so I think I have to create my own. I already created a custom bibliography-style with `custom-bib`. Now I have the file `myoutput.bst`. I've copied it in many places like `~/texmf/bibtex/bst/` or even `/usr/share/texlive/texmf-dist/myoutput`. But TeXmaker says: `! Package biblatex Error: Style 'myoutput' not found`.               \documentclass[10pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage[babel,german=swiss]{csquotes}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{lmodern}     \title{title}     \usepackage[bibstyle=myoutput,backend=bibtex]{biblatex}     \bibliography{literaturverzeichnis}     \begin{document}     \include{kapitel/vorwort}          \section{Einleitung}               \printbibliography          \end{document}      I hope somebody can help me! * * * OK. moewe's post was very helpful, but here are some more problems:   1. (important) The author name is like: "Firstname Surname". But it should be "Surname, Firstname".  **SOLVED** :               \AtBeginBibliography{%       \DeclareNameAlias{default}{last-first}%       }        1. (less important) How do I get rid of that "URL:" ? **SOLVED** :               \DeclareFieldFormat{url}{\space\url{#1}}         1. The Edition or in german "Auflage", is shortened to "Aufl." (like Ed. or something). How can I get the full word "Auflage"? **SOLVED** :               \DefineBibliographyStrings{ngerman}{%       edition = {Auflage}     }        1. (important): After "Auflage" or "Aufl" (or in english Edition) I need a comma. **SOLVED** :               \DeclareFieldFormat{edition}{#1\adddot\space\bibstring{edition}\addcomma\space}        1. (important): Also I need to change the "besucht am 24.02.2006) to URL, 24.02.2006.  ( **SOLVED** ): (better/nicer inputs?)               \DeclareFieldFormat{urldate}{\addcomma\space#1}      thanks, * * * OK. It looks like I solved those problems by my own, still I don't know if this is the nicest solution. Any suggestions to optimize it? Where does these commands come in, when I don't want them in my Master.tex? (I mean bibtex.cfg, etc.) At the moment, I have them in a seperate tex file, which I include with \include{bib_mod} **One last question: How can I split up multiple authors in commas and only the last one has a "and" Lastname, Surname, Lastname2, Surname2 and Lastname3, Surname3 [...]** For better understanding: If there is only one author, display normally:               Lastname, Surname      If there are two authors, just use a comma no "and":               Lastname, Surname, Lastname2, Surname2      If there are more than three authors, use "and" only at the last position:               Lastname, Surname, Lastname2, Surname2 and Lastname3, Surname3      thanks,


title: Cleveref reference name depending on label instead of counter?

text: Let's say I have this:               \documentclass{article}     \usepackage{cleveref}     \begin{document}     \section{Section One}     \label{a:sec1}     \cref{a:sec1}          \section{Section Two}     \label{b:sec2}     \cref{b:sec2}     \end{document}      Cleveref will now reference "Section 1" and "Section 2" because the label comes after a section. But what I need is that it references the label depending on `a:` and `b:`, where I define the displayed name. For example: All labels having an `a:` should be referenced as "Car X" and all labels having a `b:` should be referenced as "Truck X" even though they are both a section. Note: I do _not_ want to change the counter, only the word that is displayed when referencing depending on the label's "namespace"! Is `cleveref` able to do this alone or do I have to build some custom solution (probably with `prettyref`)?


title: Changing another language "et al." to "et al."

text: I currently writing in danish via the package:               \usepackage[danish]{babel}      Now, in my bibliography, which is done by `biblatex`, it changes the "et al.", when having a lot of authors, to "m. fl.", which is technically correct in danish. But since "et al." is latin, it pretty much is what we use in Denmark as well. So basically, how do I change the "m. fl." to "et al." ?


title: Figure between equation and where

text: Here is a problem hard to describe and give a minimal code. I have an equation written like this:               \begin{equation}         \tau_w = -\frac{T}{\ln(r_{decay})}     \end{equation}     %      where $r_decay$ is decay ratio in percentage.      Also I have a a full page figure like below:               \begin{figure}[htb!]         \centering         \includegraphics{fig1.pdf}         \caption{Preparation of impact data for pre-processing}     \end{figure}      For a reason, latex chooses to put the figure between equation and 'where' statement during pdflatex compile. Is there a way to push the figure to another page so that information flow does not get distrupted? In pdf file it looks like this: page1: some text and equation at the bottom of the page page2: figure in a new page / no text whatsoever here page3: statement that follows the equation _where_


How can I fix the problem of \ref command when I have been used overlays in beamer? This problem appears to me when I use overlays. Here is an example               \documentclass[notes=show,12pt]{beamer}     \usepackage{beamerthemeshadow}          \beamertemplateshadingbackground{red!15}{blue!15}     \usepackage{lmodern}     \usepackage[T1]{fontenc} % fonte codificado em em T1 (8 bits)     %\usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}     \usepackage[latin1]{inputenc} % letras acentuadas     \usepackage{color}          \begin{document}          \frame { \frametitle{First Theorem}     Consider the equation      \[\cos^2(x) + \sin^2(x)=1     \]          \begin{overprint}     \onslide<2>     Let bla bla...          \onslide<3>     \begin{theorem}{\label{T1}}     If     \begin{equation} \label{E1}     x = \pi     \end{equation}     then bla bla bla     \end{theorem}     \onslide<4>     \begin{exampleblock}{Observation}     The conclusion of Theorem \ref{T1} remains valid if the condition \eqref{E1} is replaced by $x = 2\pi$      \end{exampleblock}          \end{overprint}          }          \end{document}


title: Tricky problem with sources in list of figures

text: I've a very tricky problem here: **MWE:**               \documentclass[12pt,german]{article}     \usepackage[demo]{graphicx}     \usepackage{caption}     \usepackage[list=true]{subcaption}     \begin{document}     \begin{figure}             \centering             \begin{subfigure}[b]{0.3\textwidth}                     \includegraphics[width=\textwidth]{}                     \caption{Caption1}             \end{subfigure}%             ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.               %(or a blank line to force the subfigure onto a new line)             \begin{subfigure}[b]{0.3\textwidth}                     \includegraphics[width=\textwidth]{}                     \caption{Caption2}             \end{subfigure}             ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.               %(or a blank line to force the subfigure onto a new line)             \begin{subfigure}[b]{0.3\textwidth}                     \includegraphics[width=\textwidth]{}                     \caption{Caption3}             \end{subfigure}             \caption{Caption0}     \end{figure}     \listoffigures     \end{document}      # Problem: I need to have my sources of the images in the list of figures. The caption for the figure **must** be under the image (bottom). # What I need:                    List of Figures          1    Caption ............................................. 1          (a)    Caption1 ..................................... 2                 Source: http://tex.stackexchange.com          (b)    Caption2 ..................................... 3                 Source: StackExchange                 Graphic: Severin      Anyone got an idea?


title: Lost control with \marginpar

text: I want to include marginal notes _only on the left side_ of a large document. (For your information, I have included all the packages listed in the preamble of the document in the following minimal example. The `marginnote` package was added in vein to fix this problem.) **Constraint:** I cannot change the `\documentclass`. I lost control with the `\reversemarginpar` in the second page of this minimal document. Is there a quick fix to this problem? **Edit:** After reading the comments, I may have to pay attention to what page I am in (even or odd) while typing margin notes. Is it possible to add some sort of a `\newcommand` so that I do not have to do this? Otherwise, it is going to be a very time consuming project.               \documentclass[11pt, reqno]{amsart}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{mathtools}     \usepackage{epstopdf}     \usepackage{enumerate}     \usepackage[usenames,dvipsnames]{color}     \usepackage[parfill]{parskip}         \usepackage{caption,array,booktabs}     \usepackage{pgf,tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{decorations.pathreplacing}     \usepackage{multicol}     \usepackage{epigraph}     \usepackage[perpage,para,symbol*]{footmisc}     \usepackage{marginnote}     \usepackage{xcolor}          \usepackage{lipsum}          \begin{document}     \lipsum[1]\reversemarginpar\marginpar{\textcolor{red}{ID 1}}     %I want the margin note to appear on left.  Hence the reason to use \reversemarginpar     \lipsum[2-4]     \newpage     \lipsum[1]\marginpar{\textcolor{red}{ID 2}}      %I still want the margin note to appear on left. But it isn't.     \lipsum[2]\reversemarginpar\marginpar{\textcolor{red}{ID 3}}     %ISo I tried \reversemarginpar again.  but, \reversemarginpar does not work anymore.     \lipsum[3-4]     \end{document}


title: Installed .sty with tlmgr but latex can't find it

text: I have installed Tex live 2013 Version 3.1415926 and I want to install the package mdframed. My first try was to enter in the terminal               tlmgr install mdframed      but the terminal responded to me that I am not allowed to do that. When I entered               sudo tlmgr install mdframed      I gained the message "tlmgr: command not found". So I typed               sudo -i      added the tex path in /root/.bashrc and finally entered               tlmgr install mdframed     tlmgr update mdframed      and it worked! But if I compile my latex file the error               ! LaTeX Error: File `mdframed.sty' not found.      remains. Any Idea how to solve it? EDIT: Output of               kpsewhich mdframed.sty      is               /usr/local/texlive/2013/texmf-dist/tex/latex/mdframed/mdframed.sty


title: specifying location of individual nodes in cycle process with tkz

text: Consider this example:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{arrows}          \begin{document}     \begin{tikzpicture}     \fill [orange] (0.1,0.1) rectangle (12,8);       \node[text opacity = 0] (1) at (4,8) {C3};       \node (2) [below left of = 1] {B2};       \node (3) at (4,2) {C3};       \node (4) [below right of = 1] {D4};       % connect the dots       \path[->,>=stealth]       (1) edge [bend right=20]  (2)       (2) edge [bend right=20]  (3)       (3) edge [bend right=20]  (4)       (4) edge [bend right=20]  (1);          \draw[->,>=stealth](5,2) -- (5,4);     \draw[->,>=stealth](3,4) -- (3,2);          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/enmpG.png) I have a couple of questions: Firstly, why is it that when I specify the locations of C3, B2 and D4 do not move automatically i.e. I would hope that B2 and D4 would move to be half way between nodes (1) and (4)? How can I fix this? I know that I can simply specify 'below' for all of them but this makes the diagram too small so I was hoping of specifying the top and bottom coordinate and then have use 'bottom' to do the rest, but obviously this doesn't work. Secondly, how can I alter the diagram so that the two arrows in the bottom of the diagram to blend into the main cycle i.e. showing that the arrows are either coming out or going into the main process?


title: Drawing a trawling boat with TikZ

text: I would like to draw a diagram of a boat with LaTeX and I have started using a package called TikZ which looks very promising but I'm not sure how to use it to draw diagrams other than rectangles and other basic shapes. Would someone be able to guide me through the process of drawing a boat with TikZ? The diagram I had in mind was ![enter image description here](http://i.stack.imgur.com/eCFRq.jpg)


title: latexdiff and lstlisting

text: I was wondering if it is possible to have latexdiff ignore all lstlistings from my documents when finding diffs. Most of my listings contain special characters. That works rather nicely within an lstlisting but when latexdiff tries to compare, such listings end up outside of the lstlisting and therefore need to be escaped manually. Is there a way to go around that?


title: Configure CV in LyX

text: I would like to ask help in configuring my CV in LyX. I am using moderncv style with LyX in Ubuntu 12.04. I shall say that I have found a close solution to my problem in this post on blank spaces, but cannot apply it directly as I am using LyX. Then I also found another post in the LyX wiki, and followed it in order to modify the style files. However, this is not a complete solution as I don't see a corresponding command in the style file. My first question is if there are commands in the style file that I can change in order to modify the spacings as described in the first post. Thanks in advance.


title: draw complicated symmetric figure

text: I wish to draw a figure in PSTricks (a Paint-version is attached), consisting of three elements:   1. Two identical objects, facing each other (they are they in the figure...)    2. A red "parabola", contained within the two grey objects How can I go about this easiest in PSTricks? Is it just brute force or is there a clever strategy? The brute-force method seems very time-consuming. The various sizes, distances etc.. are less important at the moment. I am just trying to figure out how to do this to begin with.. ![enter image description here](http://i.stack.imgur.com/xVC46.jpg)