title: Spacing between poem title and poem text

text: I'm writing a book of poems using the `book` class. Most of the poems are pretty short and I'm only putting 1 or 2 poems on each page. The problem I'm having is that latex is putting a large space between the poem title and the poem. How do I prevent this from happening? I know some of you may be tempted to recommend that I use the `memoir` class instead, but I've already done so much work in the book class, so I'd prefer to just keep using the `book` class. Next time I'll try the `memoir` class. Here is an example of the code I am using:               \documentclass{book}     \usepackage{verse}          \begin{document}          \poemtitle{Lamp}     \begin{verse}     The lamp is nice\\     The lamp is cool\\     Blah diddy blah\\     The lamp turns blue     \end{verse}     \end{document}


title: Ignore particular tabular cell height and simple overflow its content (like \multirow)

text: I want latex to ignore the height of a tabular cell and to overflow its content to the above and below tabular cell (see image - red arrows). First I tried \multirow but this doesn't align the text on the left side in the right way.               \documentclass{standalone}          \usepackage{graphicx}     \usepackage{adjustbox}     \usepackage{multirow}          \begin{document}          %%- Cropped Image     \newcommand{\croppedimg}[1]%     {%     \adjustbox{valign=c}{\includegraphics[width=1\linewidth,clip=true,trim=90pt 60pt 50pt 140pt]{#1}}%     }%               \begin{minipage}[t]{13cm}          \begin{tabular}{p{0.008\linewidth}p{0.008\linewidth}p{0.008\linewidth}p{0.4\linewidth}p{0.4\linewidth}}         %-- multirow solution does not work right... dont know why.         %& \multirow{3}{*}{\rotatebox[origin=c]{90}{Property Text 1 large}} &  & %         %         %-- solution without multirow but now the table row hight grows with it's inner elements         & & &         Caption A:\newline Text Text Text Text Text Text Text Text Text Text Text Text Text Text & %         Caption B:\newline Text Text Text Text Text Text Text Text Text Text Text Text Text Text \\         %%         & \rotatebox[origin=c]{90}{Property Text 1 large} %         & \rotatebox[origin=c]{90}{Unit 1 Text} & \croppedimg{black.png} & \croppedimg{black.png} \\         %%           \rotatebox[origin=c]{90}{Property Text 2} & %         & \rotatebox[origin=c]{90}{Unit 2 Text} & \croppedimg{black.png} & \croppedimg{black.png} \\         %%         & \rotatebox[origin=c]{90}{Property Text 3} %             & \rotatebox[origin=c]{90}{Unit 3 Text} & \croppedimg{black.png} & \croppedimg{black.png} \\         %%               \rotatebox[origin=c]{90}{Property Text 4 large} & %         & \rotatebox[origin=c]{90}{Unit 4 Text} & \croppedimg{black.png} & \croppedimg{black.png} \\      & & & \vspace{1cm} & \vspace{1cm}     \end{tabular}     \end{minipage}           \end{document}      ![example](http://i.stack.imgur.com/G3BOT.png) I think I need something like the HTML-CSS command "position:absolute" for the "property-text-1-large" cell so that the outer tabular element does not grow with this inner content size. I know this is not a good solution but I think it will be the simplest? so the result should look like this ![result](http://i.stack.imgur.com/xfZni.png) Thanks very much


title: Deleted date appears in Title page

text: I am using TeXnic Cener on Windows. My latex document is in article format. Initially, I had the following title page:                   \documentclass{article}         \setcounter{tocdepth}{3}         \begin{document}         \title{Some title}              \author{My Name}         \date{\today}         \maketitle               \thispagestyle{empty}               \clearpage          \tableofcontents           \clearpage      Then, to add more structure to the title page, I made the following modifications:                    \begin{document}          \title{Some title}                \author{My Name}                    \paragraph{}          \large \centerline{My Report}          \centerline{for the purpose}          \centerline{\date{\today}}          \normalsize                     \maketitle               \thispagestyle{empty}               \clearpage          \tableofcontents          \clearpage      The problem is, the date appeared in two places: the old place and the new place. I removed the date completely and tried the following:   1. Restart texnic center   2. Restart my laptop   3. Remove the pdf file generated so it is created again. Nothing seems to work and I still get the date displayed in its old place. I also want to mention that before adding date to any of the above code, the date did not display at all. Thanks in advance for any suggestions.


title: Equal spacing between \begin environments, any text based environment and inline maths

text: I'm creating a document with a lot of `\begin`...`\end` environments, single lines of text with or without inline maths and long paragraphs with or without inline maths. The problem I'm having is that there seems to be different spacing between the different environments and I always have to revert to zooming in on the PDF and then creating or removing vertical spacing accordingly. So my question is: Is there anyway to set equal spacing between all possible environments? For example: At the end of a paragraph I start a new line with a table. I want the top row of text in the table to be the same spacing away from the bottom of the paragraph as the line spacing in the paragraph. I then follow that up with an equation and I want that to be the same spacing away, etc. Cheers for the help, JD.


title: Referencing name of file in separate file, none of which is the main file

text: I have a main file (say, `main.tex`) and two chapters in separate files (`labour.tex`, `health.tex`) which the main file reads via `\externaldocument` (I've also used `\input` but with the same disappointing results). I want to write in labour something like: > In Chapter health we find... How can I reference the name of a file within another file, none of which is the main one? I've tried the `xr` package, but as far I can tell (not much, admittedly) it helps cross-reference objects such as equations existing in a separate file, but I couldn't figure out how to reference the name of another file.


title: nextfoot in scrlttr2

text: I do not understand some of the features the nextfoot variable has in the scrlttr2 KOMA-script class.               \documentclass[]{scrlttr2}          \pagestyle{headings}          \usepackage{fontspec}     \setmainfont{Linux Libertine O}          \usepackage{polyglossia}     \setdefaultlanguage[babelshorthands=true]{german}          \usepackage{lipsum}          \begin{document}          \setkomafont{pagefoot}{\normalfont}          \setkomavar{nextfoot}{\hspace*{\fill}Sascha Wolf\qquad E-Mail: \texttt{xxx@gmx.de}\qquad Mobiltelefon: +49 123 45\,67\,89\hspace*{\fill}}          \setlength{\parskip}{1em}     \setlength{\parindent}{0pt}          \begin{letter}{Familie Mustermann}          \opening{Sehr geehrte Familie Mustermann,}          \lipsum          \closing{Mit freundlichen Grüßen}          \end{letter}          \end{document}      Why do I need the line               \setkomafont{pagefoot}{\normalfont}      and               \hspace*{\fill}      to get the desired output? Why is the footer text justified and set in italics by default? And where can I find these definitions? Is there a cleaner way of doing this? Edit: And how do I get the page number back? Is using \thepage OK?


title: Multiple Documents by Different Authors and One Table of Contents

text: I have a number of different LaTeX documents. Each document has a different title and author. Is there any way for me to:   1. Combine all of these documents into one larger document with accurate page numbers and a single title page for the entire large document?   2. Create a table of contents that includes the page number at which each separate document starts and the author of that document? Edit: This template is being used for all the documents that need to be combined.


title: "Q" and "A" in margin - out of alignment

text: I have defined a command for a letter in the margin as follows (using marginnote because marginpar did not work at all):               \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}}      I appreciate that there are likely going to be issues with vertical alignment, due to the different fonts/sizes and when issuing the commands I have done the following to address the issue:               \sideletter{Q}[-1mm]      and               \sideletter{A}[1mm]      This seems to just about fix the issue vertically. However I cannot seem to align horizontally - the A is just _slightly_ further to the right. Example image: ![example](http://i.stack.imgur.com/5YtBa.png) Does anyone have any idea about how to approach this? I have tried using hfill and centering but nothing seems to work. Below is a minimum working example:               \documentclass{article}     \usepackage{lipsum}     \usepackage{marginnote}     \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily #1}}     \setlength\parindent{0pt}     \begin{document}     \reversemarginpar     \sideletter{Q}     \lipsum[6]          \sideletter{A}     \lipsum[6]     \end{document}      I think in this MWE ![MWE](http://i.stack.imgur.com/fcV6u.png) the misalignment is possibly less obvious, but it is still there. Perhaps the font choice does have _some_ bearing on it, but not everything.


title: global relabeling of all figures

text: Can I global change all figures and references to figures up one starting from figure 10? So figure 10 and all references to 10 become 11 and so on? I should probably add that I have about 30 figures and added a figure right above figure 9 displacing my current count. That is why I need to re-label all figures and references to the figures. Current figure labeling: `\label{fig:fig1}`, `\label{fig:fig2}`, and so on


title: alignment of tikzpicture

text: I have several plots which I create with tikzpicture. The plot dimension is set to `\begin{tikzpicture}[x=\textwidth]`. I try to align these plots right with `\begin{flushright}` and `\end{flushright}` but it shows no effect on the alignment.               \begin{figure}     \begin{flushright}        \input{gfx/1} \\        \input{gfx/2} \\        \input{gfx/3} \\        \input{gfx/4} \\     \end{flushright}     \end{figure}      What can I do to have a clean right alignment of these 4 plots? ![four plots misaligned](http://i.stack.imgur.com/TCGfs.jpg) **EDIT:** While I created the MWE I noted that this behaviour is caused by the setting `\pgfplotsset{compat=newest}`. My solution is to abandon this command.


title: Text decoration is trimmed off with standalone package

text: I am decorating an arc with text as shown in this MWE using the `standalone` class:               \documentclass[10pt,class=article]{standalone}     \usepackage{tikz}         \usetikzlibrary{decorations.text}     \begin{document}     \begin{tikzpicture}         % \path (-6, 0) grid (6, 6); % words on top of arc are trimmed off       \path [decorate,decoration={text along path, text align={align=fit to path stretching spaces}, text={|\fontsize{40}{48}\selectfont|Aut inveniam viam aut faciam}}] (-5, 0) arc (180:0:5cm);     \end{tikzpicture}     \end{document}      The text decoration is trimmed off at the top of the arc. The results do not change with either the `crop` or the `preview` option of `standalone`. By including an undrawn grid (see commented line in MWE), I can get the full graphic but then I need to run the PDF through `pdfcrop` to get a tight bounding box. Is there a more elegant solution using `standalone` and perhaps something else? I would rather use the `tikzpicture` than a PDF in my main document.


title: Making a math poster using LyX

text: Is there a Beamer for LyX (or something analogous so that I can make a poster)? A code for a sample poster would be great. If so, can one please leave some details on how I would go about adding this (I.e. do I add something to my LateX preamble, do I download a package)? Related Questions:   * Given a LateX source code, how do I enter this into LyX? I know how to turn my work into a LateX source, but I do not know how to do the opposite.   * I also have MikTeX. I am not sure if Beamer can be used directly on that, but if it is possible, please give some details.   * Does one turn the code/work into a PDF before making it a poster? If not, what would I convert my material to before I print out a poster? I have access to a facility that will print out the poster.   * If I'm not supposed to use PDF for the poster, is there a way to see what my current work looks like? **Edit** After downloading the link sciposter.lyx in the "tread" in the comment below given by dcmst, I wanted to see what the sample looked like in PDF, but I got this error. ![enter image description here](http://i.stack.imgur.com/J2k0O.jpg)


title: Wrong plot alignment when using colorbar and groupplot

text: The alignment of the plot is wrong when I use colorbar, see figure. How can I fix this? Further I would like to know how I can make the small axis ticks black in stead of gray? Now you can't really see them in all the plots accept the lower right one.               |____|____|____|     0   500  1000 1500      ![enter image description here](http://i.stack.imgur.com/o9UTV.jpg)               \begin{tikzpicture}          \pgfplotsset{%       width=4cm,       height=4cm,       scale only axis,       every x tick label/.append style={font=\scriptsize\color{gray!80!black}},       xmajorgrids,       xminorgrids,       every y tick label/.append style={font=\scriptsize\color{gray!80!black}},       ymajorgrids,       yminorgrids     }          \begin{groupplot}[       group style={group size=2 by 2},       y dir=reverse,       axis on top     ]          \nextgroupplot[       xmin=0, xmax=1805,       xticklabels={\empty},       ymin=0, ymax=1200,       colorbar right,       colormap/blackwhite,     ]     \addplot graphics [       xmin=0,        xmax=1805,        ymin=0,       ymax=1200     ] {scarlett_dx.png};          \nextgroupplot[       xmin=0, xmax=1805,       xticklabels={\empty},       ymin=0, ymax=1200,       yticklabels={\empty},       colorbar right,       colormap/blackwhite     ]     \addplot graphics [       xmin=0,        xmax=1805,        ymin=0,       ymax=1200     ] {scarlett_ddx.png};          \nextgroupplot[       xmin=0, xmax=1805,       ymin=0, ymax=1200,       colorbar right,       colormap/blackwhite     ]     \addplot graphics [       xmin=0,        xmax=1805,        ymin=0,       ymax=1200     ] {scarlett_dy.png};          \nextgroupplot[       xmin=0, xmax=1805,       ymin=0, ymax=1200,       yticklabels={\empty},       colorbar right,       colormap/blackwhite     ]     \addplot graphics [       xmin=0,        xmax=1805,        ymin=0,       ymax=1200     ] {scarlett_ddy.png};          \end{groupplot}


title: Changing formatting of URL in biblatex \footcite

text: I've switched from `bibtex` to `biblatex` due to having to use `\footcite` based on university's requirements for writing a report. It may be worth noting that I'm also very new to (La)TeX. I'm only having issues with an extremely long URL which spans three lines in footnotes and seems to use different line-spacing than footnotes ordinarily use. What would be the easiest way to force `biblatex` to not switch font when printing URLs in `\footcite`? Or even better, how to make it just use italic? I currently use `style=verbose-note`, and I do import `url` and `hyper ref`. * * * This is not an exact duplicate of the linked-to question, as I don't know how to edit the URLs generated by `biblatex`, and _only them_. I find the formatting of URLs basically acceptable, but in `biblatex`-generated footnotes, and somewhat even in the bibliography, they look hideous. * * * An attempt at a minimal working example (which may end up being neither minimal nor working). **thetext.tex**               \documentclass[times, utf8]{book}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @book{slashdot:2004,             title = {{XFree86} 4.4: List of Rejecting Distributors Grows},             author = {Collins, B.},             publisher = {Slashdot},             month = {2},             year = {2004},             url = {http://yro.slashdot.org/story/04/02/18/131223/xfree86-44-list-of-rejecting-distributors-grows}     }     \end{filecontents}               \usepackage[style=verbose-note,natbib=true,sortcites=true,defernumbers=true,pageref,block=space,backend=biber]{biblatex}     \addbibresource{\jobname.bib}          \begin{document}          \chapter{Test chapter}     Here is some text\footcite{slashdot:2004}.          \end{document}      **Makefile**               thetext.pdf: thetext.tex literature.bib             pdflatex thetext.tex             biber thetext             pdflatex thetext.tex      In this example, the output even looks decent… unfortunately, the actual template I use (a modification of another university's template) has different margins, different font, etc. So in the actual PDF, the output looks less- than-decent. My text: ![My text](http://i.stack.imgur.com/nfuC0.png) Example above: ![Example above](http://i.stack.imgur.com/jcpWb.png) Template used is called "tvz" and if someone wants to work with the actual template it's available on BitBucket. If someone needs it, I can make an extended example based on "tvz" available as well.


title: Aligning using flushleft and flushright

text: I am trying to create one column to the left side by side with another column to the right. The column to the left is labeled "Examples of like terms:" and the column to the right is labeled "Examples of unlike terms:" Here is my work so far:               \documentclass{article}     \usepackage{gensymb}     \usepackage{amsfonts}     \usepackage{amsmath}     \begin{document}     \title{Algebra}     \maketitle          \section{Like Terms}                     \begin{flushleft}                                \textbf{Examples of like terms:} \\     $3x$ and $5x$ \\     $4y^2$ and $9y^2$ \\     $7xy$ and $3xy$ \\     $6$ and $15$      \end{flushleft}           \begin{flushright}                                           \textbf{Examples of unlike terms:} \\      $2x$ and $8y$ \\     $4t^2$ and $4t^3$ \\     $x^2y$ and $xy^2$ \\     $12$ and $12x$      \end{flushright}                \end{document}


title: Label in a ntheorem environment witout additional caption

text: I defined a new theorem with the ntheorem package. If i want to add a label to a certain theorem i get an error from the caption package. And referencing doesn't work.               Package caption Warning: \label without proper \caption on input line 170.     See the caption package documentation for explanation.               LaTeX Warning: Reference `def:edge-factor' on page 11 undefined on input line 310.      The theorem looks like this:               \begin{mydef}[Edge-Weight]         \label{def:edge-weight}         [...]     \end{mydef}      The caption is set as an environment variable. How could i get a proper label without adding an additional caption? Minimal Example               \documentclass[pdftex,a4paper, twoside]{scrreprt}     \usepackage{caption}          \usepackage{newfloat}     \usepackage[standard, hyperref]{ntheorem}          \DeclareFloatingEnvironment[fileext=frm,placement={H},name=Definition, listname={List of Definitions}]{deffloat}     \theoremstyle{break}     \theoremsymbol{\ensuremath{\clubsuit}}     \theoremseparator{:}     \theoremprework{\begin{deffloat}[H]}     \theorempostwork{\end{deffloat}}     \newtheorem{mydef}{Definition}[chapter]          \begin{document}          \begin{mydef}[Edge-Factor] \label{def:edge-factor}         Definition     \end{mydef}          Text \ref{def:edge-factor}          \end{document}      While checking the Example i got to know its because the new float environment.


title: Can I use a \caption in a tabu environment?

text: Is it possible to use `\caption` between a `tabu` environment? I have tried using these packages:               \usepackage{tabularx}     \usepackage{longtable}     \usepackage{tabu}      And when I write this in my code:               \begin{tabu} spread 2in{|X[2]|X[2]|X|X|X[2]|X[2]|}     %\caption{Marito}     \hline     1 & 2 & 3 & 4 & 5 & 6 \\     \hline     \end{tabu}      I get a lot of errors if I uncomment `\caption{Marito}`. Note: The Tabu documentation doesn't say anything about it


title: Naming conventions for macro names that include the package name

text: ## Background Many packages provide commands that have the full name of the package, or an abbreviation, as part of the command name. Sometimes the package name (or abbreviation) is at the beginning of the command name, and sometimes it is later. For example, many packages provide a settings macro. Sometimes this is of the form `\set<pkg><param>` while in other cases we have `\<pkg>set<param>`. An example is `\setbeamercolor` vs. `\pgfsetarrowoptions`. I believe both `pgf` and `beamer` were created by the same author. There are also cases where a package provides a command that does something similar to a built-in command, and thus has a similar name. So we have variants of `\input` in the forms of `\VerbatimInput` from `fancyvrb` and `\inputminted` from `minted`. ## Question **When the name of a command includes the name of the package (or an abbreviation), are there any conventions for where the package name occurs? I'm primarily thinking about macros that are for the user, rather than internal macros or macros for package writers.** Are there advantages to having the package name at the beginning of the command name, versus having the package name later, or is it just a matter of personal preference? Are there reasons to prefer one approach to the other? ## Reflections I can think of some possible reasons that each approach might be beneficial. Putting the package name (abbreviation) first gives a nice uniformity to command names, so it might be beneficial when there are a **lot** of commands to name (`pgf` might be an example). At the same time, putting the package name later might result in commands that sound more like natural language or sound more active, and thus might be easier to remember (in the `\input` case, we want a particular kind of `\input`).


title: Sections in ToC with links but without headings

text: I want to include some external documents (PDFs) in the appendix of the document I am writing. I would like to have these included documents listed in my table of contents, but no section heading should be typeset where they appear in the main document. The setup I constructed with the help of this answer (included below) works fine, except that the links made by `hyperref` in the ToC all point to the start of the appendix. How can I get links in the ToC that point to the `section`s?               \documentclass[oneside]{scrbook}     \usepackage{hyperref,scrpage2}          \newcommand*\silentsection[1]{       \addtocounter{section}{1}       \addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}       \sectionmark{#1} % this is to get headers for the section     }          \pagestyle{scrheadings}     \automark{section}     \begin{document}     \tableofcontents     \chapter{main}     \clearpage\section{part}     \clearpage\section{with}     \chapter{some}     \clearpage\section{sections}          \appendix     \chapter{included documents}          \silentsection{one}     Yada.          \cleardoublepage     \silentsection{two}     Yada yada.          \cleardoublepage     \silentsection{three}     Yada yada yada.          \end{document}


title: Splitting a long equation with a curly brace for the equations in two lines

text: The equation that I have pasted below is very long. I want the first equation (e34a) after `dw^2/dx^2` to be split in two lines with a common curly brace for the equation in two lines. My code is               \begin{subequations}\label{e34}        The Normal Stress are given by        \begin{align}        q = & \overline{C}_1\overline{C}_3\overline{C}_5\dfrac{\alpha^{*}k_s w}{U\big(1+ \alpha^{*}k_s(\frac{w}{q_u})\big)}- \dfrac{\partial^{2}w}{\partial x^{2}}\Bigg(G_1 H_1+\overline{C}_2(T_p+T_1)\cos\theta+G_2 H_2\overline{C}_1 \label{e34a}\\     &+ G_3 H_3 \overline{C}_1 \overline{C}_3+G_4 H_4 \overline{C}_1 \overline{C}_3\overline{C}_5+ \overline{C}_1\overline{C}_4(T_p+T_2)\cos\theta+              \overline{C}_1\overline{C}_3\overline{C}_6(T_p+T_3)\cos\theta\Bigg)\nonumber\\             \intertext{The Mobilised Tension for top reinforcement is}                 \frac{\partial T_1}{\partial x} = & -\Bigg(q+G_1H_1\frac{\partial^{2}w}{\partial x^{2}}\Bigg)\  \overline{D}_1                 - \Bigg(\overline{C}_3\overline{C}_5\dfrac{\alpha^{*}k_s w}{U\big(1+\alpha^{*}k_s(\frac{w}{q_u})\big)} - A_1 \frac{\partial^{2}w}{\partial x^{2}}\Bigg)\  \overline{D}_2\\             \intertext{The Mobilised Tension for middle reinforcement is}                 \frac{\partial T_2}{\partial x} = & -\Bigg(\frac{1}{\overline{C}_1} \Big(q+A_2\frac{\partial^{2}w}{\partial x^{2}} \Big) +G_2 H_2\frac{\partial^{2}w}{\partial x^{2}} \Bigg)\ \overline{D}_3  \label{e34c} \\                 & - \Bigg( \overline{C}_5 \dfrac{\alpha^{*}k_s w}{U\big(1+\alpha^{*}k_s(\frac{w}{q_u})\big)} - A_3 \frac{\partial^{2}w}{\partial x^{2}} \Bigg)\ \overline{D}_4  \nonumber                 \intertext{The Mobilised Tension for bottom reinforcement is}                 \frac{\partial T_3}{\partial x} = & -\Biggl(\frac{1}{\overline{C}_3}\Bigg(\frac{1}{\overline{C}_1}\Big(q+A_2\frac{\partial^{2}w}{\partial x^{2}} \Big)+A_4\frac{\partial^{2}w}{\partial x^{2}}\Bigg)+G_3 H_3\frac{\partial^{2}w}{\partial x^{2}} \Biggl)\ \overline{D}_5  \label{e34d} \\                 & - \Bigg( \dfrac{\alpha^{*}k_s w}{U\big(1+\alpha^{*}k_s(\frac{w}{q_u})\big)} - G_4H_4 \frac{\partial^{2}w}{\partial x^{2}} \Bigg)\ \overline{D}_6  \nonumber     \end{align}     \end{subequations}


title: Splitting a group of long equations in LaTeX

text: I have 3 equations which are long. These equations should be subequations and should be split and aligned. They should be given labels as well. I am attaching the code below.               \begin{subequations} \label{e33}     \begin{align}     \begin{split}           q^{*}& = \Bigg(\dfrac{\alpha^{*}W}{U\big(1+\alpha^{*}(\frac{W}{q_u^{*}})\big)}\Bigg)\  \overline{C}_1\overline{C}_3 - \Bigg(G_1^{*} +\overline{C}_2(T_p^{*}+T_1^{*})\cos\theta+G_2^{*}\overline{C}_1+G_3^{*}\overline{C}_1\overline{C}_3+ \overline{C}_1\overline{C}_4(T_p^{*}+T_2^{*})\cos\theta\Bigg)\  (\dfrac{W_{(i-1)}-2W_i+W_{(i+1)}}{(\Delta X)^{2}}) \label{e33a}                   %\frac{\partial T_1^{*}}{\partial X}& = -\Bigg(q^{*}+G_1^{*}\frac{\partial^{2}W}{\partial X^{2}}\Bigg)\  \overline{D}_1 - \Bigg(\overline{C}_3\dfrac{\alpha^{*}W}{U\big(1+\alpha^{*}(\frac{W}{q_u^{*}})\big)} - \Big(G_2^{*}+G_3^{*} \overline{C}_3+\overline{C}_4(T_p^{*}+T_2^{*})\cos\theta \Big) \frac{\partial^{2}W}{\partial X^{2}}\Bigg)\  \overline{D}_2 \label{e33b} \\             %\frac{\partial T_2^{*}}{\partial X}& = -\Bigg(\frac{1}{\overline{C}_1} \Big(q^{*}+\bigg(G_1^{*}+\overline{C}_2(T_p^{*}+T_1^{*})\cos\theta \bigg)\frac{\partial^{2}W}{\partial X^{2}} \Big) +G_2^{*}\frac{\partial^{2}W}{\partial X^{2}} \Bigg)\ \overline{D}_3 - \Bigg(\dfrac{\alpha^{*} W}{U\big(1+\alpha^{*}(\frac{W}{q_u^{*}})\big)} - G_3^{*}\frac{\partial^{2}W}{\partial X^{2}} \Bigg)\ \overline{D}_4       \label{e33c}     %\end{split}     %\end{align}     %\end{subequations}      Please provide me suggestions for the same.


title: Problem with \only and alignment of graphics (pdf) in beamer

text: I have been trying to include pdf graphics in a document with this simple command:               \documentclass{beamer}          \begin{document}          \begin{frame}         \only<1>{\includegraphics[width=\textwidth]{test}}         \only<2>{\includegraphics[width=\textwidth]{test}}         \only<3>{\includegraphics[width=\textwidth]{test}}     \end{frame}          \end{document}      Unfortunately, the three pictures (that are supposed to be identical), are not aligned identically (from the top). Here is the test.pdf used for generating the pdf: http://imgur.com/1nOiT Here is the generated pdf: http://imgur.com/UUu0v (as you can(not?) see), the first and second image are not aligned. * * * Now if someone knows why it acts like this? Here I put a VME since it seems to me that no package were necessary except for the class Beamer. I have tried with my "usual" packages, maybe I am just missing the right one? Just so you know, what I was able to do so far: if I put a `~` after `{test}`, then it gets aligned (note that it will not work on this minimal example, there are some packages missing). Also something I noticed (because when I first met this probleme I had many more `\only`), it is always the one before last only that messes up! No matter how many `\only`, and then the last one will be aligned with the previous one (this is why we need at least three only lines).


title: Searching special caligraphic math letters

text: Trying `\mathcal{X}` or `\mathcal{S}` does not bring me the caligraphic letters i am searching for. I am searching for these "special" X'es and S'es you can see in the two following pictures: ![Special X](http://i.stack.imgur.com/gtOXV.png) ![Special S](http://i.stack.imgur.com/6afCs.png) Can anyone explain me which font or command to use to get these caligraphic letters?


title: How to show a wide bar over a letter?

text: I want to have a wide bar over `XY` but it just shows a small bar. Any idea? ![enter image description here](http://i.stack.imgur.com/P7gf5.png)               \item In the standard $(x,y)$ coordinate plane, point $X$ has coordinates $(-4,0)$ and point $Y$ has coordinates $(0,-8)$. What is the coordinates of the midpoint of $\bar{XY}$?\hfill         \begin{enumerate}         \item $(-6,-1)$              \item $(-2,-4)$          \item $(0,2)$          \item $(2,4)$          \item $(6,-1)$                   \end{enumerate}


title: Nested ifthenelse in tikz fails after arbitrary changes

text: Attempting to draw a random polymer mesh, which I intended to visualize by drawing a series of random walks between (x,0) and (x,1) where x is arbitrary. My first attempt is attached, and it compiles. But if I change certain things it gives the error message "Package tikz Error: Giving up on this path. Did you forget a semicolon? }}" Given this I have not progressed beyond this, my first attempt. By "certain things" I mean for example removing "nicefrac" or sometimes arbitrarily altering the \foreach statements. Or even if I change the starting coordinates for coordinate A to for example (rand,rnd). The code below is then clearly not ideal. The lines, if not drawn as ultra thin, have ugly gaps at each joint, there is the error message I do not understand where comes from. So, how can I draw a messy mesh in a better fashion? The rules are simple: Each polymer chain in the mesh is drawn as a set of jointed segments of equal length. The joints between these should be able to deviate only by a certain angle (Depending on the polymer stiffness) and they should all remain within a given distance of the drawn surface. If they reach this limit, the polymers will bend back down or up, as the case may be.               \documentclass{article}     \usepackage{tikz}     \usepackage{nicefrac}          \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usetikzlibrary{calc}     \newcommand*{\ExtractCoordinate}[1]{\path (#1); \pgfgetlastxy{\XCoord}{\YCoord};}%          \begin{document}     \begin{tikzpicture}     \clip (-.5,-.5)rectangle(.5,2);               \foreach \x in {-1.0,-.9,...,1}{     \draw[ultra thin] (\x,0.1) coordinate[name=A];     \foreach \y in {0,.2,...,10}{               \ExtractCoordinate{A}         \ifthenelse{\lengthtest{\YCoord <28 pt}}%Checked if below 1.         {%Is below 1.         \ifthenelse{\lengthtest{\YCoord >0 pt}}{%Check if above 0         \draw[ultra thin] (A)--++(rand*120:.05) coordinate[name=A];%Yes, above zero         }{\draw[ultra thin] (A)--++(rnd*89:.05) coordinate[name=A];}%NOT above zero         }%Is not below 1         {\draw[ultra thin] (A)--++(-rnd*89:.05) coordinate=name=A];         }%ELSE 1         }}         \draw[fill=blue!15] (-1,0)rectangle(1,-1);%surface coated by the mesh     \end{tikzpicture}     \end{document}       The code results in something akin to this: ![mesh first attempt](http://i.stack.imgur.com/CG8f6.png)   or this, with normal line thickness:   ![thick line mesh](http://i.stack.imgur.com/qHIAa.png) which is fairly close to what I would like, though I would like to tweak the behavior of the angles somewhat so I can change how far each polymer segment can bend (Thereby simulating different polymer stiffnesses). Also, at this point, all polymers tend to move to the right, their motion is not truly random but directed in one direction.


title: Structuring the bibliography by headings and subheadings

text: In my Bibliography, I need two categories: Primary Sources and Secondary Sources. The first needs to be subdivided into Manuscripts and Published Works. So, I thought I could use the following code:               \printbibheading         \printbibliography[keyword={Manuscripts}, heading=subbibliography, title={Manuscripts}]         \printbibliography[keyword={Primary Source}, heading=subbibliography, title={Primary Sources}]         \printbibliography[keyword={Secondary Source}, heading=subbibliography, title={Secondary Sources}]      This, however, gives me three categories, but I would like to have only two with the first being subdivided. In other words I need something like this:               \printbibliography[keyword={Manuscripts},         heading=subbibliography,         title={Primary Sources},         subtitle={Manuscripts}]  %% subtitle={...}


title: Plot from scratch (without explicit data)

text: I'm trying to draw a plot which I've been given in a scan: ![scanned plot](http://i.stack.imgur.com/4FLtq.png) What is the correct way to plot a custom shaped curve --- a freehand tool counterpart. I used quick curve but it's hard to tell extremum from an inflection point.               \begin{figure}     \centering     \bt[xscale=0.03,yscale=0.03]     %\draw (0,0) grid[step=10](200,120);     \coordinate(a) at (0,0);     \coordinate(b) at (20,0);     \coordinate(c1) at (25,2);     \coordinate(c) at (30,10);     \coordinate(d) at (48,50);     \coordinate(ce) at (65,90);     \coordinate(e) at (80,110);     \coordinate(f) at (90,100);     \coordinate(g1) at (89,98);     \coordinate(g) at (93,95);     \coordinate(h) at (100,103);     \coordinate(ci) at (102,103);     \coordinate(i) at (130,100);     \coordinate(cj) at (165,96.6);     \coordinate(j) at (170,95);     \coordinate(ccl) at (172,90);     \coordinate(cl) at (198,5);     \coordinate(l) at (200,0);     \coordinate(m) at (206,-10);     \coordinate(n) at (218,0);     \coordinate(o) at (222,8);     \coordinate(cp) at (232,-3);     \coordinate(p) at (240,0);     \coordinate(r) at (248,0);     \coordinate(z) at (260,0);     \draw[>=latex,->](0,-18)--(0,128)node[left]{$U$};     \draw[>=latex,->](0,0)--(270,0)node[right]{$t$};     \draw[red,semithick] (a)--(b);     \draw[red,semithick] (b) to%     [quick curve through={(c1)(c)(d)(ce)(e)(f)(g)(h)(ci)(i)}] (cj);     \draw[red,semithick] (cj) to%     [quick curve through={(j)(ccl)(cl)(l)(m)(n)(o)(cp)(p)(r)}] (z);     \et     \caption{Charakterystyczne parametry przebiegów impulsowych}     \label{rys:przebiegimpulsowy}     \end{figure}      ![My plotted image](http://i.stack.imgur.com/4Phq2.png) The result is very prone errors when any of the points is moved even a bit. Is there a better way to do that?


title: Drawing a gear with Tikz

text: I need some help to modify the `\gear` macro of this answer in order to be able to fill the drawn gear with a solid color. I've tried to move the `\draw` command outside the loop, but it does not work as expected (missing semicolon???):               \newcommand{\gear}[3]{%         \def\modu{#1}         \def\Zb{#2}         \def\AngleA{#3}              \pgfmathsetmacro{\Rpr}{\Zb*\modu/2}         \pgfmathsetmacro{\Rb}{\Rpr*cos(\AngleA)}         \pgfmathsetmacro{\Rt}{\Rpr+\modu}         \pgfmathsetmacro{\Rp}{\Rpr-1.25*\modu}         \pgfmathsetmacro{\AngleT}{pi/180*acos(\Rb/\Rt)}         \pgfmathsetmacro{\AnglePr}{pi/180*acos(\Rb/\Rpr)}         \pgfmathsetmacro{\demiAngle}{180/\Zb}         \pgfmathsetmacro{\Angledecal}{(\demiAngle-2*\AnglePr)/2}              \draw[fill=black!20] \foreach \zz in{1,2,...,\Zb}{              ({(\zz))/\Zb*360-\Angledecal}:\Rb)                 -- (\zz/\Zb*360-\Angledecal:\Rp)                 to[bend right=\demiAngle] (\zz/\Zb*360+\Angledecal:\Rp)                 -- plot[domain=-0:\AngleT,smooth,variable=\t]                     ({{180/pi*(-\t+tan(180/pi*\t))+\zz/\Zb*360+\Angledecal}:\Rb/cos(180/pi*\t)})                 %                  to[bend right=\demiAngle]                      ({{180/pi*(\AngleT+tan(180/pi*-\AngleT)) +(\zz+1)/\Zb*360-\Angledecal}:                         \Rb/cos(180/pi*-\AngleT)})             %                  plot[domain=-\AngleT:-0,smooth,variable=\t]                     ({{180/pi*(-\t+tan(180/pi*\t)) +(\zz+1)/\Zb*360-\Angledecal}:                         \Rb/cos(180/pi*\t)})         } -- cycle;     }      **Edit:** add missing fill color


title: Changing Font Size of Bibliography Heading

text: In How to change font size for bibliography?, people discuss changing the Bibliography heading font size without changing the size of the "References" heading. I would like to also make the "References" heading be normal size. How do I do this? I would prefer to use the bibtex style alpha. I am using the class article. Here is my code:               \documentclass[12pt,headings=normal]{article}     \usepackage{amsfonts, amsmath, amssymb}     \usepackage[margin=1in]{geometry}          \usepackage[hebrew,english]{babel}     \usepackage{general}          \begin{document}          ...               \bibliographystyle{alpha}     \bibliography{references}          \end{document}


title: Highlighting changes in code

text: I want to print code, preferably syntax highlighted, and then combine this with a diff where the included code is the newer version of the code. I want lines that have been added or changed to be highlighted or displayed normally, and for lines that have been unmodifed to be faded. Currently I am including the code with the lstlisting package, but that doesn't give me a way to combine the diff to highlight changes. Something like this would be great. **Original File** > foo   >  bar **Modified File** (included in the LaTeX document) > foo   >  bar2   >  baz And the result in the document would be > foo   >  **bar2**   >  **baz** (except ideally the normal text will be faded and the bold text would be normal)


title: Table numbers restart using \ContinuedFloat

text: Okay, I am really new at LaTeX so I may be screwing up terribly, but here's my problem. I'm writing a paper with several tables, one of which is in three parts, so I'm using `\ContinuedFloat` from the `caption` package to try to get correct captions. What I want is the first table to be `Table 1`, then to have `Table 2a, 2b, 2c`. Instead, I get `Table 1` and then `Table 1a`, `Table 1b`, `Table 1c`. Here's what I have (I apologize if it isn't enough, I'm not quite sure what you need!)               \documentclass{article}     \usepackage[demo]{graphicx}     \usepackage{caption}     \DeclareCaptionLabelFormat{cont}{#1˜#2\alph{ContinuedFloat}}     \captionsetup[ContinuedFloat]{labelformat=cont}     \usepackage[]{subfig}     \begin{document}          \begin{table}[!htbp]     \centering     \includegraphics{plachit.jpg}     \caption{}     \label{plachit}     \end{table}          \begin{table}[!htbp]\ContinuedFloat     \centering     \subfloat[]{\includegraphics{kisel1.jpg}}     \caption{Tier 1}     \label{kisel1}     \end{table}          \begin{table}[!htbp]\ContinuedFloat     \centering     \subfloat[]{\includegraphics{kisel2.jpg}}     \caption{Tier 2}     \label{kisel2}     \end{table}          \begin{table}[!htbp]\ContinuedFloat     \centering     \subfloat[]{\includegraphics{kisel3.jpg}}     \caption{Tier 3}     \label{kisel3}     \end{table}          \end{document}      I wasn't using `subfloat` at first, but from looking around trying to find an answer, it seemed like other people were. Not exactly sure if it's necessary.


title: error when using tikz with quotes and angles

text: i want to draw some angles using tikz where i have the following code:                   \documentclass{article}         \usepackage[ngerman]{babel}         \usepackage{tikz}         \usetikzlibrary{quotes,angles}         \begin{document}                   \begin{tikzpicture}         \coordinate (a) at (0,0);         \coordinate (b) at (1,0);         \coordinate (c) at (0,1);         \pic["name",draw=black] {angle=b--a--c};         \end{tikzpicture}          \end{document}      i first had to update my pgf-package (which i believe i successfully did), because apparently this "angles"-thing is quite new. now i've looked in a lot of forums and this concept always seemed to work. for me it also does, but only if i leave out the optional argument `"name"` to label the angle. with this as an argument, as in the code above, i get an error-message that says: > ! Argument of \language@active@arg" has an extra }. > > \par > > l.44 \pic["name",draw=black] > > {angle=b--a--c}; > > I've run across a `}' that doesn't seem to match anything. > > ... i dont understand this error-message. what have i done wrong? i believe the syntax to be ok, because i more or less just copy-pasted the code. i also updated pgf twice - in admin- and nonadmin-mode, so this should be ok. also it works if i just leave out that one optional argument of `\pic` (but i would really like to label the angle). i hope you can help me out here:)


title: How to format bibliography titles as section, subsection, and subsubsection

text: How can I format the titles "Books" and "Articles" to appear as `\subsections`? MWE:               \documentclass{article}          \usepackage{lipsum}     \usepackage{biblatex}     \addbibresource{NZSM446.bib}          \begin{document}     \section{Sections Available}     \subsection{Subsection}     \subsubsection{Subsubsection}     \section{Bibliography}     \nocite{*}     \printbibliography[title={Books},type=book,sorting=nyt]     \printbibliography[title={Articles},type=article,sorting=nyt]     \end{document}      Desired output: ![enter image description here](http://i.stack.imgur.com/C6cRD.png)


title: axis lines=middle and axis lines=center

text: Is there a difference between               axis lines=middle       and               axis lines=center       options in `pgfplots`?


title: Figure references in tufte-book

text: With the `tufte-book` class I cannot get references for figures right.               \documentclass{tufte-book}      \usepackage{lipsum,blindtext}     \usepackage[demo]{graphicx} % Demo option for MWE without image     \begin{document}          \listoffigures     \newpage     \Blindtext          \begin{marginfigure}     \includegraphics{img1}     \label{fig:l1}     \caption{some image}     \end{marginfigure}     \Blindtext          \begin{marginfigure}     \includegraphics{img2}     \label{fig:l2}     \caption{any other image}     \end{marginfigure}          \end{document}      The entries in the list of figures only refer to the page itself (here the first page).


title: ConTeXt: Repeat second-level registers within index

text: # Background In ConTeXt, a multi-level index can be created using:               \index{level1+level2}text      If the value for `level2` matches the previous index value of `level2`, then the text for `level2` is not repeated. # Problem I would like for the `level2` to be repeated as per the expected outcome shown below: ![Repeated Section Title](http://i.stack.imgur.com/HMAzV.png) In the image, `SECTION A` is repeated (identified in red), but only because in the code snippet the middle "`SECTION A`" actually contains an extra space (i.e., "`SECTION A `"). When the exact same section title is actually repeated (identified in orange), the section title is hidden. # Code To illustrate the problem:               \define[1]\AnimalName{%       \expanded{\index{#1+\namedstructurevariable{section}{title}}{#1}}%     }          \define[1]\AnimalQuant{#1}     \define[1]\AnimalGroup{#1}     \define[3]\Animal{       \startitem         \AnimalQuant{#1} \AnimalGroup{#2} \AnimalName{#3}       \stopitem     }          \setupregister[index][       textstyle=\em,       style=\tfa\bold,       balance=no,       command=\Word,     ]          \starttext       \placeindex[compress=yes]       \startchapter[title={Chapter 1}]         \startsection[title={Section A}]           \Animal{6}{rookery}{albatross}           \Animal{12}{wisdom}{wombat}           \Animal{10}{plague}{locusts}           \Animal{11}{lounge}{lizard}           \Animal{6}{pride}{lion}           \startitem             5 array \index{hedgehog+SECTION A}hedgehog           \stopitem           \startitem             7 army \index{herring+SECTION A }herring           \stopitem           \startitem             100 bloat \index{hippopotamuses+SECTION A}hippopotamuses           \stopitem         \stopsection       \stopchapter     \stoptext      Change:               7 army \index{herring+SECTION A }herring      to (by removing the extra space after `SECTION A `):               7 army \index{herring+SECTION A}herring      After making `SECTION A` exactly the same, the index is collapsed (hidden/removed): ![Missing Level 2](http://i.stack.imgur.com/AEdXy.png) # Question How do you prevent ConTeXt from collapsing duplicate level 2 index titles?


title: Conditional use of multicol

text: I'm using the `multicol` package to get two columns, but sometimes the contents is too wide in a particular column and I was wondering if there is a way to first make sure the contents will fit (horizontally) in two columns and if it doesn't just print a normal one column. I want to do this in a new environment definition and I thought I could use the `ifthen` package.


title: How to list dependency packages of a LaTeX file on OS X?

text: I need to know what packages are used in a LaTeX file. Is there a way to list them? For example, I have a file which uses `tikz-dependency`, how can I find out which packages this package uses? If there's a fancy OS X way to do it, that's welcome. I have MacTex installed, but I didn't manage to find a tool which does this. (Tex Live Utility lists packages, but not dependencies.)


title: Matrix environments not working

text: I have a strange problem. It seems I cannot use any of the matrix environments (`matrix`, `bmatrix`, `pmatrix` etc.). The following code will not render on my machine               \documentclass[12pt]{article}     \usepackage{amsmath}          %%% BEGIN DOCUMENT     \begin{document}     \begin{bmatrix}      U_{11} & U_{12}& U_{13}& \cdots& U_{1k}\\      U_{21} & U_{22}& U_{23}& \cdots& U_{2k}\\      \vdots & &\vdots & &\vdots             \\      U_{N1} & U_{N2}& U_{N3}& \cdots& U_{Nk} \\      \end{bmatrix}          \end{document}      However if I just put the `bmatrix` environment code into LaTeXiT, everything works fine. I have tried even just the simplest matrix examples using several `matrix` environments and none seem to work. Is my `amsmath` package hosed somehow? I'm running OSX 10.7.4 and am using TexShop installed via MacTeX. Here is the error:               ! Missing $ inserted.     ! Missing $ inserted.     <inserted text>                      $     l.12  \end{bmatrix}          ?       Any help would be greatly appreciated.


title: How to add "continued from previous page" hint to page breaking **mdframed**?

text: Follow-up question to the accepted answer here and here. The latter seems promising, with the caveat that it doesn't work.   * I'm using **`mdframed`** with **`tikz`** - but without "theorems". However, I too would like to see the title upon page breaks with a "continued" hint. How? **Screenshot** , followed by **MWE** : ![enter image description here](http://i.stack.imgur.com/M0Jpp.png)               \documentclass[a4paper]{article}               \usepackage{graphicx}          % \usepackage[heightrounded=true, textheight=735pt, textwidth=430pt, layoutvoffset=27pt, hcentering, includefoot, headheight=26pt, headsep=10pt, footskip=10pt, showframe]{geometry}               \usepackage[framemethod=TikZ]{mdframed}          % \mdfsetup{skipabove=0pt,skipbelow=1\topskip, nobreak=true, innertopmargin=0.5\baselineskip, innerbottommargin=0.5\baselineskip, frametitleaboveskip=2pt, frametitlebelowskip=1pt}     %%%          \mdfdefinestyle{my_style_testing}{frametitlebackgroundcolor=pink}          \usepackage{lipsum}          \begin{document}          \lipsum[4]     \vspace{5cm}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{mdframed}[style=my_style_testing,frametitle=\color{blue}{What an interesting title this is...}]          hello world          \lipsum[1]          \vspace{5cm}          \lipsum[3]          \vspace{5cm}          \lipsum[2]          \end{mdframed}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               \end{document}


title: Spacing in labels of a list

text: I entered the following code in LaTeX:               \documentclass{article}     \begin{document}     \begin{enumerate}     \item[[$\Rightarrow$]]necessitiy     \item[[$\Leftarrow$]]sufficiency     \end{enumerate}     \end{document}      I got this: ![enter image description here](http://i.stack.imgur.com/RdAAK.jpg) The spacing is not exactly as I desired. I would like the `]` to be as close to the arrow as the `[` and I would like a little bit of space between the `]` and the actual item.


title: Trouble defining a macro that typesets underscore characters as _

text: I want to define a macro that typesets its argument in typewriter font and allows for underscore characters in its argument. Within a group, I make `_` active, I define `\\_` to be typeset as an underscore, and then I insert the text. This approach works great _outside_ the definition of my macro, but TeX complains about two `Missing $ inserted` if I attempt to pass some text containing underscore characters as argument to the macro in question. What's going on? ![enter image description here](http://i.stack.imgur.com/3uk5W.png)               \documentclass{article}          \newcommand\allowsforunderscores[1]%     {%         \begingroup             \ttfamily             \catcode`\_=\active                                  \let\_\textunderscore%             #1%         \endgroup     }             \begin{document}          %\allowsforunderscores{Bertrand_Russell}    % if uncommented, this generates an error          % However, the following compiles just fine.     {         \ttfamily         \catcode`\_=\active                              \let\_\textunderscore         Bertrand_Russell%     }     \( 4_4 \) % sanity check          \end{document}


title: amsmath package clash

text: Just this afternoon I seem to have a package clash that resulted in all my equation numbers disappearing. I seem to have resolved the issue by putting `\usepackage{amsmath}` at the top of the preamble rather than halfway down, where it has been for the last couple of years. In particular, it seems I need to load `amsmath` before `cleveref`. I am sure this is new today. I am now worried that there might be some other package clash caused by moving `amsmath` to the top (although it seems to be compiling OK now). M(non-W)E               \documentclass{report}          \usepackage{cleveref}     \usepackage{amsmath}          \begin{document}          \begin{equation}       \label{eq:j}       J = \frac{1}{2}(a - b)     \end{equation}          I want to reference \cref{eq:j}          \end{document}      Does this work for anyone else? I use MikTex2.9 by the way. Are there likely to be any other package clashes caused by moving `amsmath` to the top? Including my full package list just in case anyone can spot something wrong:               \documentclass[12pt, a4paper, oneside, fleqn]{report}          \usepackage{amsmath}     \usepackage{setspace}                % allow different line spacing     \usepackage[showframe, top=2.5cm, left=3.5cm, bottom=2.5cm, right=2.5cm, includehead]     \usepackage{hyphenat}     \usepackage[T1]{fontenc}   % allows < > to work properly     \usepackage{textcomp}     \usepackage{lmodern}       % gives bold italic font     \usepackage{import}        % import files from subdirectories     \usepackage[toc]{glossaries} % add a glossary     \usepackage[subfigure,titles]{tocloft}     \usepackage[noabbrev]{cleveref}      % reference object types automatically     \usepackage{url}                     % split URLs across lines     \usepackage{graphicx}      % needed for including graphics     \usepackage{epstopdf}     \usepackage{grffile}     \usepackage{placeins}      % insert floatbarriers     \usepackage[singlelinecheck=0,font={sf,small},labelfont=bf]{caption, subfig}     \usepackage{fancyhdr}     \usepackage{appendix}               % allow formatting of appendix titles     \usepackage{subdepth}                   % allow more levels of subsection     \usepackage{sectsty}          % put section headings in sans-serif font     \usepackage{mathtools}     \usepackage{xfrac}                   % allow placement of fractions in text     \usepackage{xspace}                  % automatically put spaces after defined symbols     \usepackage{siunitx}          % good unit formatting     \usepackage{array,booktabs}     \usepackage{enumitem}     \usepackage[round]{natbib}     \usepackage[british]{babel}


title: How to redefine a command using \DeclareMathOperator

text: I'd like to declare some new operators using `\DeclareMathOperator` and some of the names are already taken by other commands (that I do not want to use). Is there an equivalent to the `\renewcommand` command for `\DeclareMathOperator` or a different way to overwrite the commands using `\DeclareMathOperator`?


title: Biblatex: How to make maxcitenames to work with Custom styles?

text: I was trying to use different Custom styles with Biblatex, but seems that `maxcitenames=2` is not properly working with biblatex-apa. The option is working with build-in style (e.g. `authoryear`,`verbose`), following these post Biblatex: Modify maxcitenames to work in three cases and biblatex is ignoring maxcitenames. File test.tex               \documentclass[11pt,a4paper]{article}          \usepackage[american]{babel}     \usepackage[backend=biber,style=apa,maxcitenames=2]{biblatex}     \usepackage[utf8]{inputenc}     \usepackage{csquotes}     \DeclareLanguageMapping{american}{american-apa}          \bibliography{Biblatex.bib}          \begin{document}          Test \cite{campbell2007}, \cite{Goldetal08}.          \printbibliography      \end{document}      File Biblatex.bib               @article{Goldetal08,         title = {A room with a viewpoint: Using social norms to motivate environmental conservation in hotels},         volume = {35},         shorttitle = {A room with a viewpoint},         issue = {3},         pages = {472-482},         journaltitle = {Journal of Consumer Research},         author = {Goldstein, {N.J.} and Cialdini, {R.B.} and Griskevicius, V.},         date = {2008},         file = {Google Scholar Linked Page:files/599/Goldstein et al. - 2008 - A room with a viewpoint Using social norms to mot:}     }          @article{campbell2007,         title = {"Says who" How the source of price information and affect influence perceived price (un) fairness},         volume = {44},         issue = {2},         pages = {261-271},         journaltitle = {Journal of Marketing Research},         author = {Campbell, {M.C.}},         date = {2007},         file = {Google Scholar Linked Page:files/912/jmkr.44.2.html:text/html}     }      And I get this output, ![enter image description here](http://i.stack.imgur.com/kRjnu.png) So the `maxcitenames=2` option seems to fail, any suggestions how this can be done? Is this a problem related to the specific style ("apa")?


title: How can I add a shaded, thick arrow to a Tikz picture?

text: I have created a directed graph and want to add a thick, shaded arrow to indicate change over time. The problem: It should go from one edge to another (from initial state to result state), not from one node to another like the other arrows. Is there any way to do this? I found the code for an arrow which is close enough to "thick and shaded", but I don't seem to be able to put it in the right place.                       \documentclass[12pt,a4paper]{article}                  \usepackage{tikz}             \usetikzlibrary{arrows,automata,positioning}                  \newcommand{\feat}[1]{\textsc{#1}}             \newcommand{\type}[1]{\textit{#1}}             \newcommand{\fsbase}[1]{{\scriptsize #1}}                  \begin{document}                  \begin{tikzpicture}         [          semithick, x=2.4cm,y=0.9cm, >=latex, baseline=7ex,         % anchor=base,          inner sep=.2ex, outer sep=.6ex, minimum size=3.0ex         ]         {\node (pc) at ( 1.5, 2.0) [circle,double,draw,minimum size=4ex,thick,label=90:$\type{bumfuzzlement}$] {\fsbase{}};}         {\node (in) at ( 0.0, 0.0) [circle,draw,label={[label distance=-1ex]175:$\type{interaction}$}] {\fsbase{}};}         {\node (en1) at ( -0.5,-3.0) [circle,draw,label=left:$\type{entity}$] {\fsbase{}};}         {\node (en2) at ( 0.5,-3.0) [circle,draw,label=right:$\type{entity}$] {\fsbase{}};}         {\node (an) at ( 0.5,-5.0) [circle,draw,label=below:$\type{animate}$] {\fsbase{}};}         {\node (ch) at ( 3.0,-0.0) [circle,draw,label={[label distance=-1ex]20:$\type{change of psych state}$}] {\fsbase{}};}         {\node (ps1) at ( 2.5,-3.0) [circle,draw,label=left:$\type{psych state}$] {};}         {\node (ps2) at ( 3.5,-3.0) [circle,draw,label=right:$\type{psych state}$] {};}                   {\path[->](pc) edge[bend right=15] node[above left]{\feat{cause}} (in);}         {\path[->](pc) edge[bend left=15] node[above right]{\feat{effect}} (ch);}         {\path[->](in) edge[bend right=15] node[left]{\feat{stimulus}} (en1);}         {\path[->](in) edge[bend left=15] node[right]{\feat{experiencer}} (en2);}          {\path[->](en2) edge[bend left=0] node[right]{\feat{animacy}} (an);}         {\path[->](ch) edge[bend right=15]          node[left]{\feat{initial state}} (ps1);}         {\path[->](ch) edge[bend left=15] node[right]{\feat{result state}} (ps2);}          {\path[->](en2) edge[bend left=13] node[above]{\feat{experience}} (ch);}         {\path[->](pc) edge[bend right=75,dashed] node[above]{\feat{}} (en1);}         {\path[->](pc) edge[bend left=75,dashed] node[above]{\feat{}} (ps2);}         {\path[-](ps1) edge[bend left=0] node[below]{\feat{$\neq$}} (ps2);}              \end{tikzpicture}          \tikz\draw[line width=1mm,-implies,double, double distance=1mm] (0,0) -- (1,0);                       \end{document}


title: hyperref: How to open a directory view with href{...}?

text: I wrote a small LaTeX file which describes the contents of some directories. Now I try to provide a direct link to the described files and directories. I successfully use `\href{filename.ext}{Link name}` to provide a link for files. Unfortunately if I pass a directory name to `\href` the PDF reader (tried with Adobe Reader and Evince) doesn't recognize the link. Examples of unrecognized links (a directory named _abc_ exists in the same directory as the .pdf is):               \href{abc}{Open abc directory}     \href{abc/}{Open abc directory}     \href{./abc}{Open abc directory}     \href{./abc/}{Open abc directory}     \href{run:abc}{Open abc directory}     \href{run:abc/}{Open abc directory}     \href{run:./abc}{Open abc directory}     \href{run:./abc/}{Open abc directory}      Does anyone know if there is any chance to do this?


title: Problem with parpic and compactenum

text: I want to place a graphics to the right in a theorem environment containing a `compactenum` list. I tried to use `parpic` like this, but it doesn't work:               \documentclass{article}     \usepackage[pdftex]{graphicx}     \usepackage{picins}     \usepackage{enumerate}     \usepackage{paralist}     \usepackage{amsthm}     \theoremstyle{definition}%     \newtheorem{test}{test}          \begin{document}          \begin{test}        \parpic[r]{\includegraphics[draft,width=6cm]{test.jpg}}        Text, text, text,  text, text,  text, text,  text, text,  text, text,  text,        text,  text, text,  text, text,  text, text,  text, text,        \begin{compactenum}[a)]           \item  text,  text, text,  text, text,  text, text,  text, text, text,  text, text,  text, text,  text, text,  text, text           \item  text,  text, text,  text, text,  text, text,  text, text, text,  text, text,  text, text,  text, text,  text, text        \end{compactenum}     \end{test}          \end{document}      The result looks like this: ![result](http://i.stack.imgur.com/wUW6N.jpg) Any idea how to fix this? _Edit:_ I tried also Nicolás's solution below, however the image is not aligned at the top, this becomes clear if I add more text like this:               \documentclass[english]{article}     \usepackage{babel}     \usepackage{blindtext}     \usepackage{amsthm}     \usepackage[demo]{graphicx}          \newtheorem{test}{test}     \begin{document}           \noindent\parbox[b][][s]{\dimexpr\linewidth-5cm-5mm}{%         \begin{test}            Text, text, text,  text, text,  text, text,  text, text,  text, text,  text,            text,  text, text,  text, text,  text, text,  text, text,               \begin{itemize}                  \item  text,  text, text,  text, text,  text, text,  text, text, text,  text, text,  text, text,  text, text,  text, text                  \item  \blindtext                    \end{itemize}         \end{test}         } \hfill         \includegraphics[draft,height=4cm, width=5cm]{imageName}          \end{document}      ![parbox](http://i.stack.imgur.com/lzPJn.jpg)


title: limits to \oplus not working and double ended arrow equation

text: I am having an equation which having `\oplus` with limits, but `\limits` for `\oplus` gives error and there is another critical equation with double ended arrow. can anyone please help me to key this equation. ![enter image description here](http://i.stack.imgur.com/kcB2d.png)


title: ensure nomenclature definitions are aligned

text: I have generated a nomenclature for my document and the horizontal spacing between the symbol and the definition stays constant no matter how long the symbol is. For example:               \documentclass{article}     \usepackage{amsmath}     \usepackage{nomencl}     \makenomenclature     \begin{document}     Example of nomenclature      \nomenclature{TIARLW}{This is a really long word}     \nomenclature{TOA}{This one also}     \nomenclature{a}{another}     \nomenclature{$\partial{u}/\partial{z}$}{Here's another one}     \printnomenclature     \end{document}      resulting in ![enter image description here](http://i.stack.imgur.com/ccxRc.png) How is it possible to make the nomenclature so that each of the definitions are aligned? Is it possible to treat this as a table?


title: Customize the size of the shaded box

text: I am using `\begin{shaded}` from `\usepackage{framed}`. The problem is I am using it for examples which come inside `\begin{itemize}`, the shaded box's margin does not begin with the `\item` margin instead the shaded color begins from far left. ![The screenshot from my document](http://i.stack.imgur.com/YXVdX.png) **I would like to have it like the below image -** ![enter image description here](http://i.stack.imgur.com/SibZQ.png)


title: Command to make new command

text: I have several books with toggles/ifs for each of them (I have toggles and ifs because I had several problems with some other packages..) I defined the toggles in my style-File like this:                \newtoggle{printer}      \togglefalse{printer}      \newif\ifprinter      \printerfalse      \newcommand{\printer}{\printertrue\toggletrue{printer}}      and defining the type in the Book with the command `\printer` Since I have like 70 different products I would like to declare a new product in my style file with `\newproduct{printer}` and Latex sets up the lines above. How can I do this?


title: What is the easiest way to circumvent TeX's restriction on 16 math fonts?

text: I need to use math symbols from different fonts, exceeding the count of 16. What is the easiest way to adapt my setup to be able to use more math fonts? I'm looking for either of the following:   * hacks that let me cheat around the restriction   * another setup that is likely to be most compatible with what I'm currently using, namely `pdflatex` I know that there are systems/engines such as LuaTeX and XeTeX (both allowing way more than 16 math fonts), but I'm really looking for something that is as conservative as possible an extension of LaTeX. The reason is that I'm using a lot of packages written for LaTeX, and switching over to something like XeTeX for my current project is likely to break things in subtle ways. If the answer is "there is no way", that's also okay. _Here is a minimal example of uncompilable code:_               \documentclass{article}     \usepackage{amsmath} % for the \mspace command and other things (necessity of this package not demonstrated in this minimal example)     \usepackage{dsfont} % for the \mathds command     \usepackage{txfonts} % for \coloneqq; also: if I omit this line, I get an error message saying that "Command \lhd not provided in base LaTeX2e" (I need \lhd)     \usepackage[only,llbracket,rrbracket,llparenthesis,rrparenthesis]{stmaryrd} % imports: [| |] (| |)     \usepackage[mathb]{mathabx} % for \sqbullet and \blackdiamond          % for \lcurvearrowdown:     \DeclareFontFamily{U}{MnSymbolA}{}     \DeclareFontShape{U}{MnSymbolA}{m}{n}{       <-6> MnSymbolA5       <6-7> MnSymbolA6       <7-8> MnSymbolA7       <8-9> MnSymbolA8       <9-10> MnSymbolA9       <10-12> MnSymbolA10       <12-> MnSymbolA12}{}     \DeclareFontShape{U}{MnSymbolA}{b}{n}{       <-6> MnSymbolA-Bold5       <6-7> MnSymbolA-Bold6       <7-8> MnSymbolA-Bold7       <8-9> MnSymbolA-Bold8       <9-10> MnSymbolA-Bold9       <10-12> MnSymbolA-Bold10       <12-> MnSymbolA-Bold12}{}     \DeclareSymbolFont{MnSyA}{U}{MnSymbolA}{m}{n}     \DeclareMathSymbol{\lcurvearrowdown}{\mathrel}{MnSyA}{187}          % for \sqsubseteq and \nsqsubseteq; I don't like the appearance of these symbols from txfonts, so I am using the respective MnSymbol ones, except I'm naming them \sqeq and \nsqeq     % THIS IS THE CODE BLOCK THAT FIRST MADE MY FILE UNCOMPILABLE WHEN I ADDED IT     \DeclareFontFamily{U}{MnSymbolD}{}     \DeclareFontShape{U}{MnSymbolD}{m}{n}{         <-6>  MnSymbolD5        <6-7>  MnSymbolD6        <7-8>  MnSymbolD7        <8-9>  MnSymbolD8        <9-10> MnSymbolD9       <10-12> MnSymbolD10       <12->   MnSymbolD12}{}     \DeclareFontShape{U}{MnSymbolD}{b}{n}{         <-6>  MnSymbolD-Bold5        <6-7>  MnSymbolD-Bold6        <7-8>  MnSymbolD-Bold7        <8-9>  MnSymbolD-Bold8        <9-10> MnSymbolD-Bold9       <10-12> MnSymbolD-Bold10       <12->   MnSymbolD-Bold12}{}     \DeclareSymbolFont{MnSyD}{U}{MnSymbolD}{m}{n}     \DeclareMathSymbol{\sqeq}{\mathrel}{MnSyD}{90}     \DeclareMathSymbol{\nsqeq}{\mathrel}{MnSyD}{210}          \begin{document}          \( \mathds{N} \) % WITHOUT THIS LINE, THE CODE COMPILES          \( \coloneqq \) % this line is not required to get a minimal example of uncompilable code, but I need this symbol          \( \llbracket,\rrbracket,\llparenthesis,\rrparenthesis \) % this line is not required to get a minimal example of uncompilable code, but I need these symbols          \( \sqbullet, \blackdiamond \) % this line is not required to get a minimal example of uncompilable code, but I need these symbols          \( \lcurvearrowdown \) % this line is not required to get a minimal example of uncompilable code, but I need this symbol          \( a \sqeq b \nsqeq c \) % this line is not required to get a minimal example of uncompilable code, but I need these symbols          \( \mathit{abc} \) % WITHOUT THIS LINE, THE CODE COMPILES          \( \mathsf{a} \) % WITHOUT THIS LINE, THE CODE COMPILES          \end{document}      _(I know this is an arbitrary example, but I think it serves the purpose of illustrating the issue.)_


title: Latex error in my compilation

text: What's wrong with my code test ? I do this to               \documentclass[10pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[french]{babel}     \usepackage{enumitem}     \frenchbsetup{StandardLists=true}     %\usepackage{textcomp}     \usepackage{amsmath,amssymb}     \usepackage{ mathrsfs}      \usepackage{fancyhdr}      \pagestyle{fancy}     \usepackage{graphicx}     \usepackage{xcolor}     \definecolor{tr}{rgb}{0.22,.26,.64}      \definecolor{bl}{RGB}{022,119,184}       \definecolor{or}{RGB}{254,89,0}       \definecolor{v1}{RGB}{224,237,224}     %\usepackage{libertine}     \usepackage[frenchstyle]{kpfonts}     \usepackage{pifont}     \usepackage{wasysym}     \usepackage{ifsym}     \usepackage{mathabx}     \usepackage{vmargin}     \usepackage{setspace}      \doublespacing     \parindent= 0 cm     \setmarginsrb{1cm}{2 cm}{2 cm}{1 cm}{1 cm}{0 cm}{0 cm}{0.5 cm}          \begin{document}%********************************************************************************************************     \begin{center}     \textsc{\Large Questionnaire}     \end{center}     \vspace{2 cm}     \fcolorbox{white}{v1}{\begin{minipage}{17 cm}     \textsc{L'âge}                        %l'âge_________________________________________________________________________     \end{minipage}}     {\color{gray!15}\rule[0.6 cm]{17.2 cm}{0.03 cm}}     1. Quel est votre âge? \hspace{10 cm}  \fbox{\hspace{3 cm}{\color{white}on}}     {\color{gray!15}\rule[-0.6 cm]{17.2 cm}{0.03 cm}}     \fcolorbox{white}{v1}{\begin{minipage}{17 cm}     \textsc{Sexe}           %________________________________________________________________________________________     \end{minipage}}     {\color{gray!15}\rule[0.6 cm]{17.2 cm}{0.03 cm}}     2. Vous êtes : Homme (1) ; Femme (2 ) ;      $\textbigcircle \,$  1.1\hspace{1 cm} $\textbigcircle \,$ 2.2             {\color{gray!15}\rule[-0.6 cm]{17.2 cm}{0.03 cm}}     \fcolorbox{white}{v1}{\begin{minipage}{17 cm}     \textsc{La taille}          %_______________________________________________________________________________________     \end{minipage}}     {\color{gray!15}\rule[0.6 cm]{17.2 cm}{0.03 cm}}     3. Quelle est votre taille ( en $cm$ )? \hspace{8 cm}  \fbox{\hspace{3 cm}{\color{white}on}}      {\color{gray!15}\rule[-0.6 cm]{17.2 cm}{0.03 cm}}     \fcolorbox{white}{v1}{\begin{minipage}{17 cm}     \textsc{Bac}    %_______________________________________________________________________________________________     \end{minipage}}     {\color{gray!15}\rule[0.6 cm]{18.5 cm}{0.03 cm}}           \end{document}


title: IEEEauthorblockN

text: I am trying to use the ieeeconf template. When I am using the               \begin{document}     \author{It is me}     \maketitle      it typesets. However, I want affiliations and change author to               \begin{document}     %\author{It is me}          \author{     \IEEEauthorblockN{Xin Liu, Daqiang Zhang, Jingyu Zhou, Minyi Guo}     \IEEEauthorblockA{Department of Computer Science\\     Shanghai Jiao Tong University\\     No. 800, Dongchuan Road, Shanghai, P.R.China\\     \{navyliu, zhangdq\}@sjtu.edu.cn, \{guo-my, zhou-jy\}@cs.sjtu.edu.cn}     }     \maketitle      (I have cut-paste of the names from some internet search result), I am getting               ! Undefined control sequence.     \@author -> \IEEEauthorblockN                                    {Xin Liu, Daqiang Zhang, Jingyu Zhou, Minyi Gu...     l.36 \maketitle


title: Click to go to an anchored line

text: It is possible to make a `hyperref` to go to page x, but how we can define a custom anchor to go a destination line? For example:               \documentclass{article}     \usepackage{lipsum}          \begin{document}       \lipsum[1]       \lipsum[2]       THE DESTINATION LINE (anchor x)       \lipsum[3]       \lipsum[4]       CLICK HERE (go to anchor x)       \lipsum[5]     \end{document}      How to click on `CLICK HERE` and goes to the `DESTINATION LINE`? I mean displaying `THE DESTINATION LINE` as the first line in the pdf reader.


title: creating a small cylinder within a larger cylinder

text: can someone provide me with some code, or insights, into how to create a diagram of a shaded cylinder within a cylinder? any typesetting system will do (please specify which one, though). is it also possible to label the regions? like, with letters (cylinder C, smaller cylinder P, lengthwise T, etc)? any answers or references to existing answers would be much appreciated. thank you!


title: Adapting typesetting of editor field information in verbose-style

text: I need my footnotes and bibliograpy entries look a certain way. I am almost there but I have a problem with how the editor of an edited book / incollection looks like. Currently, it looks like this in the footnote: Brian Smith, ‘How to do it’ in _Big Book of Knowledge_ , ed. by Tony Riley (Oxford: Oxford University Press, 2012), pp. 12–34. and this in the bibliography: Smith, Brian, ‘How to do it’ in _Big Book of Knowledge_ , ed. by Tony Riley (Oxford: Oxford University Press, 2012), pp. 12–34. What I need it to read is: Smith, Brian, ‘How to do it’ in Tony Riley (ed.), _Big Book of Knowledge_ (Oxford: Oxford University Press, 2012), pp. 12–34. So how do I adapt the verbose-style that it reads "... Tony Riley (ed.)" instead of "ed. by Tony Riley"? Additionally, that the editor comes after "in", i.e. before the title of the book. ("in Tony Riley (ed.), _The Big Book of Knowledge_ " instead of "in _The Big Book of Knowledge_ , ed. by Tony Riley")? Thank you very much Dan PS: This is my little example:               \documentclass[paper=a4,fontsize=12pt]{scrartcl}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @incollection{Smith2012,         Address = {Oxford},         Author = {Brian Smith},         Booktitle = {Big Book of Knowledge},         Editor = {Tony Riley},         Pages = {12-34},         Publisher = {Oxford University Press},         Title = {How to do it},         Year = {2012}}     \end{filecontents}          \usepackage[style=verbose-trad3,      natbib=true,     sortcites=true,      block=space,      isbn=false,      url=false,      doi=false,      dashed=false,      dateabbrev=false,     backend=biber,     bibencoding=utf8,     ]{biblatex}          \renewcommand{\footcite}{\cite}     \usepackage[ngerman,british]{babel}     \usepackage[applemac]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[style=english,english=british]{csquotes}               \renewcommand*{\cite}{\autocite}     \renewcommand*{\newunitpunct}{\addcomma\space}               \usepackage{biblatex}     \renewbibmacro{in:}{%     \ifentrytype{article}{space}{%     \nopunct     \printtext{\bibstring{in}\nopunct\addspace}}}                    \renewbibmacro*{publisher+location+date}{%     \nopunct% ADDED     \printtext[parens]{% ADDED     \printlist{location}%     \iflistundef{publisher}     {\setunit*{\addcomma\space}}     {\setunit*{\addcolon\space}}%     \printlist{publisher}%     \setunit*{\addcomma\space}%     \usebibmacro{date}%     }     \newunit}          \addbibresource{\jobname.bib}          \begin{document}     This is an example sentence.\cite{Smith2012}          \printbibliography          \end{document}


title: Automatic data recognition and plot processing in pgfplots

text: I am a beginner in LaTeX, trying to use it for industrial documents, such a measurements report. One example is the true position graph of the MWE. The circle represents the true position tolerance. Data point outside of the circle do not meet the requirements. I would like to improve it in the following way:   1. Specify the limits of the graph automatically (i.e. by extending the max value found either in X or Y columns of a certain factor, the same for the X axis and Y axis) fom the actual data, and not manually in the following lines:              xmin = -0.35, xmax =  0.35,     ymin = -0.35, ymax =  0.35,        2. In a similar way, the vertical and horizontal lines created by the following lines should adapt automatically to the graph size.               \addplot+[sharp plot, mark=none, black] coordinates {(-0.50,0)  (0.5,0)};      \addplot+[sharp plot, mark=none, black] coordinates {(0,-0.5)  (0,0.5)};        3. If possible, assign the color of the dots, not on the Y value, but on the polar distance to the center.   4. Align vertically the color bar labels i.e. on the decimal separator, as opposed to the current position.   5. As a bonus, assign a neutral (i.e. blue) color to all dots that meet the tolerance, (are inside or on the circle) , and color code only the ones that do not meet the requirements...               \documentclass{article}     \usepackage[T1]{fontenc}      \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage[active,tightpage]{preview} %produces the plot only when activated     \PreviewEnvironment{tikzpicture} %produces the plot only when activated     \pgfplotsset{compat=1.5.1}     \usepackage{filecontents}          \begin{document}     \thispagestyle{empty}     \begin{filecontents}{Data.dat}     X       Y           0.059   0.207           -0.030  0.198           -0.035  0.042           0.064   0.130           -0.118  0.133           -0.128  0.195           -0.143  0.022           -0.148  0.182           -0.079  -0.005          -0.081  0.124           -0.091  0.126           -0.090  0.261           -0.049  -0.037          -0.045  0.063           -0.048  0.124           -0.051  0.199           -0.040  -0.063          -0.025  0.035           -0.028  0.117           -0.057  0.270           -0.020  -0.075        -0.022  0.025     -0.024  0.138     -0.33   0.288     0.012   -0.111     0.069   0.004     0.014   0.101     -0.021  -0.293     \end{filecontents}               \pgfplotstableread{Data.dat}\mytable % Creating a macro containin the data of external file          \tikzset{every mark/.append style={scale=0.7}} %Adjusting size of marks in plot          \begin{tikzpicture}     \begin{axis}[scale= 2, width=8cm,height=8cm,     %axis on top,     ticklabel style={/pgf/number format/.cd, fixed, precision=2,use comma},       xmin = -0.35, xmax =  0.35, %Plot X size       ymin = -0.35, ymax =  0.35, % Plot Y size         xlabel = {True position (mm), X axis},         ylabel = {True position (mm), Y axis},     title= Pin tip location (solder side),         colorbar, colorbar style={ticklabel style={/pgf/number format/.cd, fixed, fixed zerofill, precision=2,use comma}},     ]          \addplot[scatter, only marks, mark=*]      table {\mytable};      \draw[red] (axis cs:0,0) circle[radius=0.1];     \addplot+[sharp plot, mark=none, black] coordinates {(-0.50,0)  (0.5,0)};      \addplot+[sharp plot, mark=none, black] coordinates {(0,-0.5)  (0,0.5)};      \end{axis}     \end{tikzpicture}          \end{document}


title: How do I write multicol in Lyx on the title page?

text: I'm trying to write some text in two columns on the `titlepage`, but unfortunately everytime the `tabular` part is on a new page with a blank page between. I guess it has something to do with `\maketitle`, but how do I change that in LyX? P.S. Multicols doesnt work too               \begin{document}          \begin{titlepage}               \title{randomTitle}               \subject{1. bla}               \date{vorgelegt am \today}          \begin{doublespace}          \publishers{\noindent Fakultät Wirtschaft \smallskip{}     \\     Studiengang Wirtschaftsinformatik\smallskip{}     \\     Kurs }     \end{doublespace}               \author{von \smallskip{}     \\     user1259201}          \maketitle          \begin{tabular}{ll}     Verfasser: \\\ Ich           Ausbildungsbetrieb:\\\myCompany              Anschrift:\\\ myCompanyAddressStreet\\                Betreuer:\\\myProf       Abgabedatum:\\\myEndDate         \end{tabular}          \end{titlepage}          \end{document}


title: How to change text generated in package acronym

text: > **Possible Duplicate:**   >  How to invert long term to short term using ACRONYM list? This is a newbie question, how to change the text generated by `\ac` command, like: I have this:               \usepackage[nolist,nohyperlinks]{acronym}     %...          \acrodef{CBR}{\emph{Content-Based Retrieval}}      When I use `\ac{CBR}` I have this: > Content-Based Retrieval (CBR) but I need this > Content-Based Retrieval -- CBR or this: > CBR -- Content-Based Retrieval


title: How do I draw a white border on a black page ?

text: I use               \pagecolor{black}     \color{white}      to create a document with white text on black background. I draw a border around the page using               \pgfpagesdeclarelayout{boxed}     {       \edef\pgfpageoptionborder{0pt}     }     {       \pgfpagesphysicalpageoptions       {%         logical pages=1,%       }       \pgfpageslogicalpageoptions{1}       {         border code=\pgfsetlinewidth{2pt}\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=.95\pgfphysicalwidth,%         resized height=.95\pgfphysicalheight,%         center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%       }%     }          \pgfpagesuselayout{boxed}      or               \thisfancypage{%        \setlength{\fboxsep}{2pt}\doublebox}{}      . But I need to have white lines for the border, else they won't show up on the black page. How do I change or set the border line colours ?


title: How do I convince tocloft to put the word 'Figura' ahead of entries in my List of Figures?

text: How to customize list of figures, adding word FIGURA to appears in the table of contents? I changed `\newcommand{\cftfigfont}{Figura }`, but in the summary, it's not linked (`hyperref`). How to solve it?               \renewcommand*{\l@figure}[2]{%       \ifnum \c@lofdepth >\z@         \vskip \cftbeforefigskip         {\leftskip \cftfigindent\relax          \rightskip \@tocrmarg          \parfillskip -\rightskip          \parindent \cftfigindent\relax\@afterindenttrue          \interlinepenalty\@M          \leavevmode          \@tempdima \cftfignumwidth\relax          \let\@cftbsnum \cftfigpresnum          \let\@cftasnum \cftfigaftersnum          \let\@cftasnumb \cftfigaftersnumb          \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip          {\cftfigfont #1}\nobreak          \cftfigfillnum{#2}}        \fi       }     \newlength{\cftbeforefigskip}       \setlength{\cftbeforefigskip}{\z@ \@plus.2\p@}     \newlength{\cftfigindent}       \setlength{\cftfigindent}{1.5em}     \newlength{\cftfignumwidth}       \setlength{\cftfignumwidth}{2.3em}     \newcommand{\cftfigfont}{Figura }     \newcommand{\cftfigpresnum}{}     \newcommand{\cftfigaftersnum}{}     \newcommand{\cftfigaftersnumb}{}     \newcommand{\cftfigleader}{\normalfont\cftdotfill{\cftfigdotsep}}     \newcommand{\cftfigdotsep}{\cftdotsep}     \newcommand{\cftfigpagefont}{\normalfont}     \newcommand{\cftfigafterpnum}{}     \newcommand{\cftfigfillnum}[1]{%       {\cftfigleader}\nobreak       \hb@xt@\@pnumwidth{\hfil\cftfigpagefont #1}\cftfigafterpnum\par}


title: Caption within a figure?

text: I have an image ![enter image description here](http://i.stack.imgur.com/wkQRx.jpg) where as x are 3 diagrams. As there is empty space on the left, I was wondering if it is possible to put the caption of the image within the picture.


title: Change width of arrow

text: This is a MWE of my code:               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}          \usepackage{tikz}     \usetikzlibrary{shapes,arrows}               \tikzset{         myarrow/.style={             draw,             fill=black,             single arrow,             minimum height=2.5ex,             line width=1pt,             single arrow head extend=0.1ex         }     }          \newcommand{\arrowup}{%     \tikz [baseline=-0.5ex]{\node [myarrow,rotate=90] {};}     }     \newcommand{\arrowdown}{%     \tikz [baseline=-1ex]{\node [myarrow,rotate=-90] {};}     }               \begin{document}          \begin{center}     This is some text.\\     \arrowdown\\     And some more.\\     \arrowup\\     And even more.     \end{center}          \end{document}      which gives me this: ![arrows](http://i.stack.imgur.com/qyQM2.png) the `line width` will only reduce the width of the arrows up to a certain point but no more. I want the arrows to look a little thinner. I'm using `PDFLaTeX` to compile on Ubuntu 12.10. Cheers.


title: color an entry in the list of figures

text: I have a command that prints an image and will be used inside a certain environment. First I run a test if the file exists and is a valid image file (see this question for the definition of `\imagetest`).   If it is ok then the image is just printed, otherwise I print a box with an informative message.               \newcommand{\musicSFE}[1]{         \imagetest{#1}         {% If it is a valid image do:                  \noindent             \includegraphics{#1}              }         {% If it isn't a valid image do:                  \bigskip             %TODO: Make the entry in the \listof...s red             \framebox{\colorbox{yellow}                 {Image #1 missing}}                  \bigskip         }     }      So far it works ok, but I would like to also print the caption red _in the list of ...   What I found is that with               \captionsetup{font={color=red}}      I can change the appearance of the caption, but only that at the current place in the document. If I do               \DeclareCaptionListFormat{mystyle}{\textcolor{red}{#1 #2}}      and then               \captionsetup{listformat=mystyle}      It actually changes the \listof, but only the reference number gets colored. So the question is: How can I color the list entry of such a floating environment?   Actually I'd also accept a suitable other way to highlight such an entry


title: Environment subfigure - what to do with whitespace

text: So I've made a block of figures using the `subcaption` package. It contains 5 images and follows the following layout:               \begin{figure}[t]             \begin{subfigure}[t]{0.3\textwidth}                     \includegraphics[width=\textwidth]                     {1.pdf}                     \caption{$1$}                     \label{fig:1}             \end{subfigure}             ~             \begin{subfigure}[t]{0.3\textwidth}                     \includegraphics[width=\textwidth]                     {2.pdf}                     \caption{$2$}                     \label{fig:2}             \end{subfigure}             ~             \begin{subfigure}[t]{0.3\textwidth}                     \includegraphics[width=\textwidth]                     {3.pdf}                     \caption{$3$}                     \label{fig:3}             \end{subfigure}             ~             \begin{subfigure}[t]{0.3\textwidth}                     \includegraphics[width=\textwidth]                     {4.pdf}                     \caption{$4$}                     \label{fig:4}             \end{subfigure}             ~             \begin{subfigure}[t]{0.3\textwidth}                     \includegraphics[width=\textwidth]                     {5.pdf}                     \caption{$5$}                     \label{fig:5}             \end{subfigure}             ~                    \caption{Plots of numbers.}             \label{fig:numbers}           \end{figure}      My question is: what should I do with the whitespace? I thought of either putting the `figure` caption there, or centering the last two images so the whitespace is symmetrical. However I don't how to do any of the two. For the latter, I tried inserting an extra `~` before the fourth image but it didn't work-nothing happened.


title: Customising glossary group titles

text: I'm using the `glossaries` package to produce multiple glossaries in the same document and have found it convenient to define my own glossary style. When `makeindex` is used the glossary is sub-divided into a maximum of 28 logical blocks that are determined by the first character of the `sort` key set with `\newglossaryentry`. The sub-divisions are: _ASCII_ , _numbers_ , and _A,...,Z_. I need to have three separate glossary groups, and for that I prepend the `sort` key of glossary entries with the following letters:   * **`a`** for a group of _numbers_ and _letters_   * **`g`** for a group of Greek letters   * **`s`** for a group of subscripts Here's a MWE (just run (pdf)latex twice on it with `\--shell-escape`):               \documentclass{article}     \usepackage[nomain,makeindex]{glossaries}          %% new glossary style     \newglossarystyle{onecol}{%     %     \renewenvironment{theglossary}%     {\begin{description}}{\end{description}}%     %     \renewcommand*{\glossaryheader}{}%     %     % indicate what to do at the start of each logical group     \renewcommand*{\glsgroupheading}[1]{%     \item[{\glsgetgrouptitle{##1}}]}     %     \renewcommand*{\glsgroupskip}{\indexspace}%     %     \renewcommand*{\glossaryentryfield}[5]{%     \item[\glstarget{##1}{##2}] ##3%     }%     }          %% glossary     \newglossary{model}{model.sys}{model.syo}{Nomenclature}          %% glossary entries     \newglossaryentry{L}{sort={aL},name={\ensuremath{\mathcal{L}}},type={model},                            description={lift function}}     \newglossaryentry{CL}{sort={aCL},name={\ensuremath{C_L}},type={model},                             description={lift coefficient}}     %     \newglossaryentry{alpha}{sort={galpha},name={\ensuremath{\alpha}},type={model},                                description={angle of attack}}     \newglossaryentry{beta}{sort={gbeta},name={\ensuremath{\beta}},type={model},                               description={sideslip angle}}     %     \newglossaryentry{fs}{sort={sfs},name={\ensuremath{\infty}},type={model},                             description={free-stream condition}}          \immediate\write18{makeglossaries \jobname}     \makeglossaries          \begin{document}     \glsaddall     \printglossary[type={model},style={onecol}]     \end{document}      ![enter image description here](http://i.stack.imgur.com/KteIV.jpg) The way `theglossary` environment is redefined above is somewhat redundant, but I only wish to provide a working example for now. ## Question Is it possible to _remove_ the title of the first group, and change the titles of the second and third groups to **Greek letters** , and **Subscripts** , respectively? If yes, do I need to call `xindy` using my own style file or does a change in the way I define the glossary style `onecol` suffice?


title: How to manipulate headsep only on text pages

text: The space between headings and chapter or section titles is a frequently answered issue. But what if I want to keep that distance but reduce the space between heading and text on pages without a title? I write my thesis using `scrreprt` and I am currently forced to squeeze two huge photographs and some text on one page. So I need to reduce the space between heading and text without changing the layout of pages that start with a chapter or section. Here is an example:               \documentclass[12pt,a4paper,oneside,notitlepage]{scrreprt}          \usepackage[utf8]{inputenc}      \usepackage[ngerman]{babel}      \usepackage[a4paper,left=35mm,right=25mm, top=35mm, bottom=25mm]{geometry}           \usepackage[headsepline, plainheadsepline, automark]{scrpage2}      \pagestyle{scrheadings}      \chead[]{\headmark}      \ohead[\pagemark]{\pagemark}      \cfoot[]{}     \automark{chapter}     \setkomafont{pageheadfoot}{\footnotesize}           \setlength{\headsep}{0.5cm}      \renewcommand*\chapterheadstartvskip{\vspace{0cm}}      \renewcommand*\chapterheadendvskip{\vspace{0.5cm}}          \begin{document}     \renewcommand*{\chapterpagestyle}{scrplain}     \chapter{A chapter}     some text          The distance to the heading is okay.     \newpage     \section{Another line}     here goes some text too.          The distance here is too small.     \newpage     This is the part I aimed for. It should be that close.      \end{document}      As you can see changing headsep moves the section as far up as the normal text. I have tried the `titlesec`-package and some redefinitions like this (german golatex thread) without getting it back in its normal position but it seems impossible without changing back 'headsep'. But there must be a way to disconnect these two spaces, right? I would really appreciate some help and shared knowledge since I am fairly new to LaTeX.


title: Math Symbols Palette?

text: I'm using TeXworks version 0.4.3 r857 (MiKTeX 2.9) in Windows 7. Usually I use TeXShop on the Mac, but my Mac G5 is in need of repair. So now on the Windows side I'm wondering if there is an equivalent for the palette full of oft-used math symbols. Also, what about macros for common typographical edits? Do such things exist or is one forced to type in all the math symbols and typographical commands by hand?