title: Compounds defined implicitly in captions (chemscheme/chemstyle/chemcompounds)

text: I'm using the `chemstyle` package to handle automatic numbering of compounds. It apparently uses the `chemcompounds` package to handle this. In the documentation for the latter, it explains compounds can be 'created' implicitly, just by referring to a label that doesn't yet exist: `\compound{label}`. Generally this works great, but when I try to do it inside a caption, it seems to forget the compound straight away. For example, I have two figures side-by- side, I refer to different compounds in each caption, but they get assigned the same compound number. When I create a new compound in the text following, it gets the number assigned to the first compound in the figures... so basically as soon as the caption ends the package forgets all the compounds. I should mention I'm aware it is possible to work around this (eg. by making sure things are referred to in text before captions), but I'm looking for a foolproof solution. After all I'm using LaTeX for this so I don't have to worry about misnumbered compounds constantly.


title: Times font and packages for lithuanian

text: I cannot get Times font when I use pslatex and packages for lithuanian language at the same time (font remains as default), how to fix this?               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[L7x]{fontenc}     \usepackage[lithuanian]{babel}     \usepackage{pslatex}     \begin{document}     My text.     \end{document}


title: Is it possible to find methods in source code using \inputminted?

text: My document MWE:               \documentclass[12pt,a4paper]{mwrep}     \usepackage{minted}     \begin{document}     \inputminted[gobble=4,firstnumber=3,firstline=3,lastline=9,linenos,tabsize=4]{java}{Foo.java}     \end{document}      Content of Foo.java:               public class Foo     {         public static void main(String[] args)         {             for(int i=0; i<10; i++)             {                 System.out.println(i);             }         }     }      Presented TeX document will show and format method `main`. When I change the code of `Foo` class (e.g. add a new method above `main` or expand it), I would need to manually change the range of lines to show. Can it somehow be done automatically? I think of comments as a markers in the java code. Something like in one of the examples below:               public class Foo     {         //start-main         public static void main(String[] args)         {             for(int i=0; i<10; i++)             {                 System.out.println(i);             }         }         //end-main     }      or               public class Foo     {         public static void main(String[] args) //start-main         {             for(int i=0; i<10; i++)             {                 System.out.println(i);             }         } //end-main     }      Is it possible to pass this to LaTeX (or Pygments in this case)? I would like to be able to ignore those markers when presenting a larger portion of code (e.g. whole `Foo.java` file) but this is not as important as the main question. Maybe there is another way without any markers? For example telling Pygments to print `main` method from `Foo` class.   Of course I don't want to be limited to methods only. I want to be able to mark any part of the code this way.


title: How can I move the position of a label inside a node?

text: I just started using TikZ an it's amazing. But I can't find out how to change the position of the label inside a node. At the moment I've:               \node (DataAccess) at (0,2) [draw,thick,minimum width=8cm,minimum height=2cm,           align=center, rounded corners] {Datenzugriff};      But I'd like to have the text in the upper center (but inside) of the rectangle. Any idea?


title: New command for spacing letters in microtype

text: How can i make a _new command_ that increases the space in between the letters. I do not want to use the already existing commands like `\textsc`, `\Large` or `\footnotesize`; and if it's possible I prefer a command with an argument ...               \documentclass[a4paper]{memoir}          \usepackage[italian]{babel}          \usepackage[T1]{fontenc}          \usepackage[babel=true,tracking=true]{microtype}          \SetTracking{ encoding = *}{ 400 }          \begin{document}          \textls{this is a test}          \end{document}      * * * Is it possible recreate this setting in `microtype` with the new command? `LetterSpace=40 WordSpace=2` * * * Look at my answer and tell me if the commnet are rigth please. Thanks. whith this configuration i have the default letter spacing in all text and command, so no influence on any part of the document right?               \documentclass[a4paper]{memoir}          \usepackage[tracking=true]{microtype}          \newcommand{\textlsLarge}[1]{{\Large\textls[400]{#1}}}          \begin{document}          \textlsLarge{this is a test} % new spacing command that use the space specified in newcommand (400)          {\Large this is a test} % no influence on the large command           \end{document}


title: Best choice between using \\ or leaving space after each paragraph to end the paragraph

text: Here is the thing, I have always used a blank space between paragraphs in order to tell latex that there is a new paragraph. But there is someone I work with very often that keeps using \\ to break a line after a paragraph... This is really annoying so I wanted to know if there is a real advantage of using \\ over just leaving a space. Note that I am not referring to the paragraph environment, but to the simple term paragraph.


title: Place table at end of chapter

text: I have a very large tabular which I want placed at the end of my chapter. I need it inside a float because I want a caption. I could simply put the code at the end of the chapter and use [h] or even [h!] placement modifier. But I'd prefer to keep the code at a different location in the text. I do not want to use a package like endfloat since this is the only float I wish to stick at the end of a chapter.


title: Spacing around thm environments when parskip is changed

text: I am a beginner with LaTeX and have this probably tyro problem - when I use `asmthm`package environments in combination with `\parskip`, the (vertical) spacing above and below theorems, definitions, etc become uneven (the below one is longer than the above). This problem occurs only between a thm- environment and plain text! Between two consecutive thm-like object (e.g. two definitions one after another) the separations are correct. This problem most likely occurs, because LaTeX inserts only `\topsep` before a thm-object, but after it are inserted once `\topsep` (due to the thm environment) and then `\parskip` (due to the plain text style). So how can I fix this? Is there a way, to make `\parskip` execute/not execute both before and after a thm-environment (doesn't matter which of the two options, as long as the spacing are even)? PS What is the equivalent of `\topsep` for the below separation? I intuitively tried `\belowsep`, but such doesn't exist...


title: Drawing a TikZ arc specifying the center

text: The TiKz command for an arc:               \draw (0,0) arc (-30:30:2) ;      Draws an arc that **starts** at (0,0), and would be the part of the circle from -30 degrees to +30 degrees of radius 2. ![arc1](http://i.stack.imgur.com/sZIMn.png) It is _very_ hard to place these arc sometimes. This is the symbol i want to draw: ![eye](http://i.stack.imgur.com/1LLxa.png) (This represents an eye and needs more detail). I want to draw the arc as _part of a circle with center at where the `<` meets, but I have to currently fudge the start location of the arc so it properly crosses the `<` (and it's not even exact). If I could do a circle from -45 to +45 degrees **CENTERED** at the `<`, then that would be much easier.


title: New operators inside tikzpicture

text: I am trying to declare a new operator (only using horizontal and vertical lines and labels). By now I used `tikzpicture` for that with the following code:               \newcommand{\newtypeline}[3]{     \begin{tikzpicture}[scale=2]%     \draw (0,0) -- (10ex,0ex);%     \draw (5ex,-1ex) -- (5ex,1ex);     \node[label=left:{$#1$}] at (0,0 ) {};     \node[label=above:{$#2$}] at (5ex,1ex ) {};     \node[label=below:{$#3$}] at (5ex,-1ex ) {};     \end{tikzpicture}%     }      Problem is that I'd like to use that new command within another `tikz` environment - and there both `tikz`s environments start interacting with each other. Is there any way of declaring an operator to later embed into `tikzpicture`s? Edit:               \documentclass[11pt]{article}     \usepackage{tikz}     \usetikzlibrary{automata,arrows,shapes,snakes,topaths,trees,backgrounds}     \newcommand{\newtypeline}[3]{%     \begin{tikzpicture}%      \draw (0,0) -- (10ex,0ex);% \draw (5ex,-1ex) -- (5ex,1ex);      \node[label=left:{$#1$}] at (0,0 ) {};      \node[label=above:{$#2$}] at (5ex,1ex ) {};      \node[label=below:{$#3$}] at (5ex,-1ex ) {};      \end{tikzpicture}%      }      \begin{document}      intend to look like:      \newtypeline{a}{b}{c} looks like:      \begin{tikzpicture}[->]      \node at (0,1) {\newtypeline{a}{b}{c}};      \end{tikzpicture}      \end{document}


title: \cancel does not work with emf

text: In OOoLaTeX for OpenOffice, when I use `\cancel` in `.png` format, it works, but it does not work for `.emf` format. For the `.emf` case, it just puts a weird symbol on the letter. Any idea? Edit 1: In `.emf` format, `\cancel{a}` draws a diagonal, but with different symbols, not with just a line. It works well in `.png` format. Edit 2: Works fine for LaTeX but not for OOoLaTeX.


title: Specific title page and other slide footer in latex beamer

text: I need to create title page like this 1st image and other slides like the 2nd image. I also need to add logo as a image (to header,footer) and footer like this..(different footer in title page)I used `\usetheme{Madrid}`. How can I add these correctly ![1st slide](http://i.stack.imgur.com/2oVWD.jpg) ![2nd slide](http://i.stack.imgur.com/H1e4U.jpg)


title: Remove the space above/below itemizes and descriptions

text: In the document below an itemize is nested in a description and I want to have no vertical space between the entries. I removed the space above and below of itemizes and descriptions using `\vskip-\parskip`, but this might not be the right way. And it does not work if the itemize is the first content inside a description. I tried to use the `joinedup` and `nowhite` as shown here, but then the spacing still exists. **How to remove the space above/below itemizes and descriptions?** **Code:**               \definedescription[description][         alternative=left,         width=2em,         before={\vskip-\parskip},  %<<< ?         after={\vskip-\parskip},   %<<< ?     ]          \setupitemize[each][packed][   % [joinedup,nowhite] don't change spacing         before={\vskip-\parskip},  %<<< ?         after={\vskip-\parskip},   %<<< ?     ]          \starttext              \startdescription{Foo}             \input knuth         \stopdescription              \startdescription{Bar}             \startitemize             \item ↑ Too much space above ↑             \item Just some Text             \item Just some Text             \stopitemize         \stopdescription              \startdescription{Baz}             A line that contains some text. A line that contains some text. A line that contains some text.              \startitemize             \item Just some Text             \item Just some Text             \item Just some Text             \stopitemize             A line that contains some text. A line that contains some text. A line that contains some text.          \stopdescription          \stoptext      **Result:** ![output document](http://i.stack.imgur.com/zjpzc.png) Used ConTeXt version is `2013.05.28 00:36`.


title: Alignment of Matrix Equations

text: I want the code below to appear in one line but the last array (the transposed one) appears on the line below. What should I do?               \begin{equation}           X'X=(V_r,V_{p-r}) \[ \left( \begin{array}{cc}      \Lambda_r & 0 \\      0 & \Lambda_{p-r} \end{array} \right)\] \[ \left( \begin{array}{c}      V'_r\\      V'_{p-r} \end{array} \right)\]           \end{equation}


title: Which TeX procedure removes trailing tabs?

text: From reading the TeX source, it seems that the `input_ln` procedure is responsible for removing trailing spaces from lines upon input (before category codes are considered). A very short excerpt from the code there is               if buffer[last-1]<>" " then last_nonblank:=last;     end;      The test appears to target specifically spaces, and not tab characters. However, doing some tests, I see that TeX also removes tabs (regardless of catcodes). For instance, running               echo -e "\\\\catcode9=12\\\\show\\t%" | tex      correctly shows `the character <tab>`, but omitting the `%` there is no output. So... Which part of TeX removes trailing tabs?


title: Bibtex doesn't compile with a new style

text: I'm trying to change my bibliographystyle from unsrt to nar. However, pdflatex, bibtex , 2x pdflatex(using Texmaker) always gives me the following Error: `Package natbib Error: Bibliography not compatible with author-year citations.` I tried to delete the bib and aux files, but it doesn't seem to work. I've got two *.bib files. One is created by Mendeley and one is created by me. This is an example of one of my entries:               @book{saleh,       Author = {Bahaa E. A. Saleh and Malvin C. Teich},       Title = {Fundamentals of Photonics (Wiley Series in Pure and Applied Optics)},       Publisher = {John Wiley \& Sons},       Year = {1991},       ISBN = {0471839655},       URL = {http://www.amazon.com/Fundamentals-Photonics-Series-Applied-Optics/dp/0471839655%3FSubscriptionId%3D0JYN1NVW651KCA56C102%26tag%3Dtechkie-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0471839655}     }      This is how I cite:               \cite{feyn}      It seems there are a lot of these questions, but all the proposed solutions don't work for me.


title: How to typeset dimensions of a box?

text: I want to typeset something like this: **3.0 × 3.0 × 0.9 mm** How can I do that in LaTeX (using `siunitx` package)? So far, I have this:               \num{3.0} × \num{3.0} × \SI{0.9}{\milli\metre}      But probably someone else knows a better solution.


title: Problem with pdflatex command

text: I don't what's happened but it seems that the usr/texbin directory is not anymore in the system path. When I give the command pdflatex I have command not found. I tried to put the directory on /etc/paths (even if on paths.d/ I have the TeX directory with the /usr/texbin path) but now when I gave the command pdflatex I have this error:                lstat(./pdflatex) failed ...     ./pdflatex: No such file or directory     Assertion failed: (ret), function remove_dots, file ../../../texk/kpathsea/progname.c, line 316.     Abort trap: 6      If I enter the command as /usr/texbin/pdflatex everything is ok. All this happened after I installed the haskell environment and pandoc (through cabal). One more thing before installing I changed the permission of the /usr/local/texlive (chown -R 'whoami'...). I am using Mavericks 10.9.2.


title: Error by writing multiline equation in beamer

text: Following beamer syntax generates an error:               \begin{frame}      \frametitle{Sys}     $$Y \sim \left\{\begin{matrix}     \chi_{2N}^2,~~~~~~~~~:H_0\\      \chi_{2N}^2(2\gamma),~~~:H_1     \end{matrix}\right$$          $$f_Y(y) = \left\{\begin{matrix}     \frac{1}{2^N\Gamma(N)}y^{N-1}e^{\frac{-y}{2}},~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:H_0\\      \frac{1}{2}\left ( \frac{y}{2N\gamma}\right)^\frac{N-1}{2}e^{\left(-\frac{y+2N\gamma}{2}\right)}I_{N-1}\left ( \sqrt{2N\gamma y} \right),:H_1 \end{matrix}\right$$          \end{frame}


title: Kantlipsum installation process

text: Why for the `kantlipsum` package the process below is required to install it, instead of the normal positioning of the file `.sty` like for the other packages? Are there some advantages?               To install the distribution:           - run "latex kantlipsum.ins"      - move "kantlipsum.sty" to locations where LaTeX will find it (the FAQ on CTAN in         /help/uktug-FAQ gives more information about this magic place)      Update: For example the package `classicthesis` provides directly the `.sty` file without run               "latex <file>.ins"


title: Tool for generating a website's BibTex using the URL?

text: Is there an existing tool for generating BibTeX of a website using its URL? What I'm thinking is something like a web tool or a Python script that does this.


title: Empty y-axes label in tikzpicture-diagram

text: I'm searching for to code for a empty y-axis label. I don't want numbers on my y-axis. Any Ideas? My code:               \begin{tikzpicture}             \begin{axis}[only marks, width=1.02\textwidth,height=0.2\textheight,             legend style={at={(1,1)},xshift=-13.25cm, yshift=-0.1cm,anchor=north west,nodes=left},                      xtick={1700, 1725, 1750, 1775, 1800, 1825, 1850, 1875, 1900, 1925, 1950, 1975}, %=Intervals                 x tick label style={/pgf/number format/1000 sep=},                  y tick label style={/pgf/number format/1000 sep=},                 %extra y ticks={456.1, 1022.4},                 %extra y tick labels={{456,1},{1022,4}},                 extra y tick style={grid=major,                     tick label style={, ,}},                     ymin=0.7,                     ymax=1.4,                 ylabel={Phänomenbelege},                 enlarge x limits=0.01]                        \addplot  table [x=jahr, y=bla] {bla.txt};                 \addplot  table [x=jahr, y=blub] {blub.txt};                             \legend{bla, blub}      \end{axis}         \end{tikzpicture}


title: Define a \newcommand to incorporate colors in \myvariables

text: I use LaTeX to write my job applications. Since I have more than 50 places to apply for, I like to define variables, such as: \targetorg, \website, \mysignature etc. Since these are sensitive portions of the letters, I would like to be able to define these variables such that they easily can stick out.( _by means of a color for example._ ) So far what I have been doing is the following:               \newcommand{\mycolor}{\color{blue}}       \newcommand{\defaultcolor}{\color{black}}     \newcommand{\targetorg}{\mycolor "Name of organization I am applying work for" \defaultcolor}     \newcommand{\myname}{\mycolor "my name" \defaultcolor}     \newcommand{\job}{\mycolor "type of work" \defaultcolor}     \newcommand{\place}{\mycolor "location of organization" \defaultcolor}      This would then be used as follows:               begin{document}     Hi,       My name is \myname and would like to apply as \job for \targetorg in \place.      end{document}      In this manner, when I compile my document, the various defined variables stick out so I can spot quickly if there are any mess ups and adjust accordingly. After I am done with double checking the work, I then redefine \mycolor to black so that the text is in one uniform color. The way I have done it now works perfectly, except that from a coding perspective it looks primitive to always have to include {\mycolor ... \defaultcolor} for every new instance of \newcommand.   **Question:**   I would like to ask if there is a way to make a \newcommand that would automatically incorporate these color definitions within itself. Ultimately I would like to do the following: `\newcmdcolor{\targetorg}{"Name of organization I am applying work for"}`   which should be the exact equivalent of:   `\newcommand{\targetorg}{\mycolor "Name of organization I am applying work for" \defaultcolor}`   So how do a define such a \newcmdcolor?   `\newcommand{\newcmdcolor}{??????}` **MWE**   I discussed above the essential aspects of the code. For the sake of complying to the MWE standards, I hereby produce a full working sample which can be copy-pasted to your convenience:               \documentclass{article}     \usepackage{xcolor}     \newcommand{\mycolor}{\color{blue}}       \newcommand{\defaultcolor}{\color{black}}     \newcommand{\targetorg}{\mycolor "Dummy Organization" \defaultcolor}     \newcommand{\myname}{\mycolor "Dummy Name" \defaultcolor}     \newcommand{\job}{\mycolor "Dummy Work" \defaultcolor}     \newcommand{\place}{\mycolor "Dummy Location" \defaultcolor}          \begin{document}     \noindent     To whom it may concern,\\\indent     My name is \myname\, and I would like to apply for \job\, at \targetorg\, in \place.\\     Sincerely,\\     \myname     \end{document}


title: Supremum of the infimum

text: Consider the following snippet:               $$\text{d}_{H}(A,B)  = \max\left\{ \sup_{a\in A} \inf_{b\in B} \text{d}(a,b),\sup_{b\in B} \inf_{a\in A}\text{d}(a,b)\right\}$$      ![example](http://i.stack.imgur.com/Q965L.png) In the output, the text under the inf's is significantly smaller then the one under the sup's. The same happens when I have it in an `align` environment. You can see the same problem in the wiki definition of the Hausdorff distance. How can I have the typeset under the inf's and sup's in the same size?


title: Using circuitikz, how do I make a ground node and link to it from several others?

text: I'd like to get two or three nodes linking to a ground symbol (this is not an electric circuit), as in this attempt:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning}     \usepackage{circuitikz}     \begin{document}          \begin{tikzpicture}     \node[](a){X};     \node[](b)[right=of a]{Y};     \node[ground](g)[below=of a]{};     \draw[-] (a.south) -- (g.north);     \draw[-] (b.south) -- (g.north);     \end{tikzpicture}          \end{document}      But this fails with the following error:               ! Package PGF Math Error: Unknown function `north' (in 'north').          See the PGF Math package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.12 \node[ground](g)[below=of a.east]{};          ?       And yet, TeX still outputs the PDF, which seems correct... What am I doing wrong? (I am willing to use another library instead of circuitikz if it makes things easier) **edit:** included an example with two nodes linking to ground, not only one


title: How to mirror TeX Live?

text: I have a local network with many clients using (La)TeX. Mirroring TeX Live distribution in my server will save time and bandwidth. We are Windows users who are not familiar with RSYNC. I have read the TeX Live site, but I am still confused how to use RSYNC. Could you tell me how to make a mirror for TeX Live step by step? * * * I want to make a local mirror such that any local clients can download or update from it. The local mirror works like other CTAN mirrors, but the synchronization to the CTAN mirrors is not done automatically but on my manual action.


title: Using discretionary linebreaks in centering environment

text: I am having trouble with the interaction between discretionary line breaks and centering. I have defined macros for math mode that contain discretionary line breaks to help TeX lay out inline formulas without overrunning the paragraph margins. However, in a centering environment, lines always break, even if there is plenty of room to make a longer line. The following is a complete example showing an unnecessary line break in a very short line.               \documentclass{article}     \newcommand{\qlambda}[1]{\lambda#1.\linebreak[1]\:}     \begin{document}     \centering     $\qlambda{x} x$ % This would fit in one line but is broken into two     \end{document}      Most of my document is not centered. I noticed the problem when I tried using the following method to center table cells vertically and horizontally.               \begin{tabular}{|m{20em}|}       \centering\arraybackslash       $\qlambda{x} x$ % This would fit in one line but is broken into two     \end{tabular}      How can I make a discretionary line break that doesn't break when a paragraph fits on a single line?


title: one-letter word at the end of line

text: > **This question led to a new feature in a package:**   >  `impnattypo` I come from Poland and I'm writing some text in my native language. One of our typography standards is that we do not leave one-letter words at the end of a line. For example:               Mietek poszedl do sklepu i     kupil jabola      is illegal, and correctly it should be as follows:               Mietek poszedl do sklepu      i kupil jabola      I don't know if there is such a rule in US/English typography also, but I cannot find any latex setting that would fix such errors. The only solution I've found so far is to add the "~" character, which seems to work as whitespace, but also prevents to break connected words between lines. So I have to write:               Mietek poszedl do sklepu i~kupil jabola      Is there any other way to do so? I've tried with               \widowpenalty10000       \clubpenalty10000       which prevents orphans, but it seems that 'orphans' for us (Polish) is something different than for Americans ;) In the US orphan is the first line of a paragraph on the last line of a page (at least I think so), but for us, 'orphan' is such a single-letter word at the end of a line.


title: Removing double negative signs in equations

text: ## Intro: I am attempting to write a macro which can remove any extra negative signs in a general equation: 15.2 + -3.1 would be changed to: 15.2 - 3.1 when using the commands:               \newcommand{\A}{15.2}     \newcommand{\B}{-3.1}     \[ A \pluss{\B} \]      * * * My problems start when defining the macro `\pluss{}` for cases such as:               \newcommand{\A}{5}     \newcommand{\B}{\frac{-3}{12}}     \[ A \pluss{\B} \]      ## Question: I thought that in the pluss#1{} macro I would just count the number of negative signs in `#1`. If it is odd then the result is negative but I am having two problems:   1. How to count negative signs when the input to the macro is `\frac{-3}{12}`   2. How to convert the catcode of the negative signs in `\frac{-3}{12}` so that they don't print...


title: Creating vector logos for embedding in other tex documents

text: I'm interested in drawing a logo with Tikz to embed either as a PDF or as a code snippet in other Tex documents. In order to do this, I'd like to draw the logo in a small PDF file, size 1 inch by 1 inch. I try the following code and curiously, it seems that geometry has additional parameters influencing the shape of the PDF. What must I "set to zero" so that drawing a 1inch diameter circle intersects all edges of the PDF as viewed?               \documentclass{slides}     \usepackage[paperwidth=1in, paperheight=1in, margin=0in]{geometry}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}         \draw (0.5, 0.5) circle (1);     \end{tikzpicture}     \end{document}


title: package footbib error: missing \bibitem, when using plainnat style

text: I use the `footbib` package to do references for an acknowledgment page. This keeps the references self contained in a footnote. If I use the plainnat style then it breaks. I have a working example which needs two files (I'm guessing it can be done in one, but I'm not sure how). latex file:               \documentclass{article}     \usepackage[oneside,firstcite(page)]{footbib}          \footbibliographystyle{nature}      %\footbibliographystyle{plainnat}      \footbibliography{references}     \renewcommand*\putfootcitelabel[1]{#1}           \begin{document}        Hello\footcite{Muller1993}     \end{document}      The second file called `references.bib` is:               @BOOK{Muller1993,       title = {Inorganic Sructural Chsmistry},       publisher = {John Wiley \& Sons Ltd.},       year = {1993},       author = {Ulrich M\"{u}ller},     }      So to compile you do **latex** -> **bibtex** on the `<project>.fb.aux` file -> **latex** -> **latex**. The `<project>.aux` file doesn't matter. Now there is a commented out line in the project file `\footbibliographystyle`. If you swap it with the commented one, then it breaks after you try to do a latex compile following the bibtex one. I get this error: `! Package footbib Error: Missing \bibitem on input line 2 of footbib_test.fb.bbl.` Any one know why or how to fix it?


title: baseline of custom marks in pgfplots

text: I'm trying to plot some intervals with pgfplots and wanted to use a custom mark for upper and lower bound. I planned doing this by using a "V" for the upper bound and a "^" for the lower bound (ideally not the letters but symbols that look like the upper and lower half of an X). The idea here is that both symbols will merge into an X for empty intervals. I guess I could get symbols like those with `text mark={v}` but the alignment would be off, as pgfplots would center the mark instead of using the tip of the "v" as its baseline. Any idea how I could get the alignment right?


title: How to store a counter value at some point in the document?

text: I'm beginning to learn LaTeX and I need some help with counters. My goal is to store the value a certain counter reaches at some point in the document and use it later. This is my attempt:               \documentclass{article}          \begin{document}          \section{title}          text     \let\myvalue\thesection          \section{title}     text          \myvalue          \end{document}      but `\myvalue` prints 2 instead of 1. I read this: What is the difference between \let and \def? but let does not seem to store the value at the definition time in my case. What am I doing wrong?


title: Variable color for section titles

text: The following def takes first three letters as an argument:               \newcounter{colorCounter}     \def\@sectioncolor#1#2#3{%       {%         \color{%           \ifcase\value{colorCounter}%             blue\or%             red\or%             orange\or%             green\or%             purple\or%             brown\else%             headercolor\fi%         } #1#2#3%       }%       \stepcounter{colorCounter}%     }      It actually colors first three letters of the section name. How do I make it color the whole section name instead? Can I make it to take the whole paragraph as an argument? **Edit** In order to make it work one has also to               \renewcommand{\section}[1]{       \par\vspace{\parskip}       {%         \LARGE\headingfont\color{headercolor}%         \@sectioncolor #1%       }       \par\vspace{\parskip}     }      **Edit 2** MWE:               \documentclass{article}          \usepackage{fontspec}     \usepackage{polyglossia}          % fonts:     \defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}     \setmainfont{DejaVu Sans}     \setsansfont{DejaVu Sans}     \setmonofont{DejaVu Sans Mono}          \usepackage{xcolor}     \colorlet{headercolor}{gray}          \newcounter{colorCounter}     \def\@sectioncolor#1#2#3{%       {%         \color{%           \ifcase\value{colorCounter}%             blue\or%             red\or%             orange\or%             green\or%             purple\or%             brown\else%             headercolor\fi%         } #1#2#3%       }%       \stepcounter{colorCounter}%     }          \renewcommand{\section}[1]{       \par\vspace{\parskip}       {%         \LARGE\color{headercolor}%         \@sectioncolor #1%       }       \par\vspace{\parskip}     }          \begin{document}               \section{aaaaaa}          \section{bbbbbb}          \section{cccccc}          \end{document}


title: Tikz matrix: Align node to center of multirow

text: I am having an issue with TIKZ, or matrices ... I don't know which :) All I want to do is to move/align my Blackbox in the center of this one (multi-)row while having the arrows spread evenly on the sides (see below). Somehow it does not work. I tried with tabular and array, but still no luck. Any ideas? Thanks!! (I'm no hero with latex, please be kind!)               \documentclass[10pt]{article} %     \usepackage{tikz} %     \usepackage{multirow} %     \usetikzlibrary{automata,arrows} %     \usepackage[active,tightpage]{preview}%     \PreviewEnvironment{tikzpicture}%     \setlength\PreviewBorder{1em}%     \begin{document}              \begin{tikzpicture}         [auto,         block/.style ={rectangle, draw=black, thick, fill=black!85, text width=8em, text centered, text=white, rounded corners, minimum height=10em},         line/.style ={draw, thick, -latex}]              \matrix [column sep=15mm,row sep=6mm]         {         \node[] (in1) {Eingang 1} ; & \multirow{6}{*}{\node[block] (bb) {Blackbox};} & \node[] (out1) {Ausgang 1} ; \\         \node[] (in2) {Eingang 2} ; & & \node[] (out2) {Ausgang 2} ; \\         \node[] (in3) {Eingang 3} ; & & \node[] (out3) {Ausgang 3} ; \\         \node[] (in4) {Eingang 4} ; & & \node[] (out4) {Ausgang 4} ; \\         \node[] (in5) {Eingang 5} ; & & \node[] (out5) {Ausgang 5} ; \\         \node[] (in6) {Eingang 6} ; & & \node[] (out6) {Ausgang 6} ; \\         };              \begin{scope}[every path/.style=line]         \path (in1.east) -- ([yshift=3em]bb.west);         \path (in2.east) -- ([yshift=2em]bb.west);         \path (in3.east) -- ([yshift=1em]bb.west);         \path (in4.east) -- ([yshift=-1em]bb.west);         \path (in5.east) -- ([yshift=-2em]bb.west);         \path (in6.east) -- ([yshift=-3em]bb.west);              \path ([yshift=3em]bb.east) -- (out1.west);         \path ([yshift=2em]bb.east) -- (out2.west);         \path ([yshift=1em]bb.east) -- (out3.west);         \path ([yshift=-1em]bb.east) -- (out4.west);         \path ([yshift=-2em]bb.east) -- (out5.west);         \path ([yshift=-3em]bb.east) -- (out6.west);         \end{scope}              \end{tikzpicture}          \end{document}      ![align blackbox](http://i.stack.imgur.com/Grorq.png)


title: How do I insert names into birthday invitations automatically?

text: I am trying to create a LaTex document that will allow me to write the text of the birthday invitations once with the formatting I desire, and then have Latex automatically fill in the recipient's names from a list on each different one (as well as have multiple invitations per letter sized sheet of paper). I have searched this sight as well as the Latex wikibook and a Latex website for templates (to see if anyone has done something similar) or similar concepts. I haven't found anything that would help me do this.


title: Recommended font for math symbols?

text: I need to show unit symbols of micro, nano, kilo, mega .. Is there a recommend front for this usage? ex: 10µ Ω


title: Use of longplural, shortplural in CustomAcronymFields

text: I'd like to have the first occurrence of my acronyms in emphasized style. So, I redefined `CustomAcronymFields` and use `SetCustomStyle`, as suggested by the FAQ. This worked til I needed a special treatment for a acronym. I guess the example is self explanatory? (Try it with and without `SetCustomStyle`.)               \documentclass{scrreprt}     \usepackage[%       acronym, shortcuts,       xindy={language=german-duden,codepage=utf8}     ]{glossaries}          %see: http://www.dickimaw-books.com/faqs/glossariesfaq.html#longformat     \renewcommand*{\CustomAcronymFields}{%       name={\the\glsshorttok},% name is abbreviated form       description={\the\glslongtok},% description is long form       first={\noexpand\emph{\the\glslongtok\space(\the\glsshorttok)}},%       firstplural={\noexpand\emph{\the\glslongtok\noexpand\acrpluralsuffix}\space(\the\glsshorttok)},%       text={\the\glsshorttok},%       plural={\the\glsshorttok\noexpand\acrpluralsuffix}%     }     \SetCustomStyle          \newacronym[         longplural={A long Test},         shortplural={AlT},         plural={TSTn}]{tst}{TST}{A Test}          \makeglossaries          \begin{document}     This is aspecial long form of \acp{tst}. An the singular of \ac{tst} and it's     plural \acp{tst}.          \printglossary[style=listdotted,type=\acronymtype]{}          \end{document}      What do I have to change, to get the long plural and short plural working?


title: Arrows between two tables

text: I'd like to connect two cells from different tables using arrows. How can this be achieved? ![enter link description here](http://imgur.com/S1Yuf.png)


title: The font of operator names: the size

text: A while ago, I asked what was the correct way of changing the font used to set operator names. I stabilized at:               \DeclareSymbolFont{sfoperators}{OT1}{cmss}{m}{n}     \DeclareSymbolFontAlphabet{\mathsf}{sfoperators}     \makeatletter     \def\operator@font{\mathgroup\symsfoperators}     \makeatother      Now, the peculiar combination of fonts I am using (Bookman at 11pts, standard cmss) results in the operator names being set in letters which are too small: ![enter image description here](http://i.stack.imgur.com/HsQvB.png) Can I change the fontsize used here?


title: How can I use one argument as the default value for another?

text: I'd like to define a command that takes 1, 2 or 3 arguments, and where the 2nd gets the same value as the 1st if it is not defined. I tried               \newcommand\codefrom[3][#1][Matlab]{ ... }      but I get an error saying > ! Illegal parameter number in definition of \codefrom.   >  <to be read again>   >                     1   >  l.57 \newcommand{\codefrom}[3][#1][   >                                                                Matlab] Is there any way to accomplish what I want to do?


title: LaTeX Underlined section titles with note to right without underline

text: I would like to have underlined section titles. However, I would like to put a reference to the right, without extending the underline completely. I am using sectsty and ulem to get the underlined section. Below is an example of what I am trying to do, but the underline continues to the right.               \documentclass[12pt]{article}     \usepackage{sectsty}     \usepackage[normalem]{ulem}          \sectionfont{\ulemheading{\uuline}}          \begin{document}         \section{Section Title\hfill [Ref]}     \end{document}


title: mactex-basic and authordate1 style

text: Need some help.. I installed the light version of MacTeX (BasicTeX), and found out that it doesn't contain the 'authordate1' bibtex style that I need. I downloaded that style on CTAN in a ZIP file containing the following files:               README     authordate1.ltx     authordate3.bst     authordate4.ltx     authordate1-4.sty     authordate2.bst     authordate3.ltx     testadb.ltx     authordate1.bst     authordate2.ltx     authordate4.bst      How do I install it (using `tlmgr`?) ? Thanks in advance! Jonathan


title: Inserting not centered image in Latex

text: I do not have any problem inserting images on LaTex, but As I have a big image when inserting It with:               \includegraphics[height=0.8\textheight]{image.png}\\      It appears centered, as it is a little big, I would like to be inserted from the most left side (not in center)   * How do you modify that line to add image in the left and not in the center of document?   * Is it possible to change margin just for this image, then return margins as original place? I put an example of something like I am getting...And the one I am searching for... ![enter image description here](http://i.stack.imgur.com/Xtfbz.png)


title: Extreme vertical spacing between lines

text: How can I fine tune and reduce the vertical spacing of lines so characters from lines above and below are almost pixel-touching each other? Example: ![Example of lines barely touching each other](http://i.stack.imgur.com/OSHYI.png)


title: LaTeX equivalent of     in HTML?

text: In HTML, to get extra horizontal spacing all I would have to do is:               This is textual phrase A   This is textual phrase B      to get the following output:               This is textual phrase A...This is textual Phrase B      . = _1 invisible space character_ **Question#1: How do you force insert space characters?** **Question#2: What is the proper way to fine control horizontal spacing instead of force adding space characters?**


title: What BibTeX editors / bibliography managers have an up to date support for biblatex?

text: > **Possible Duplicate:**   >  Bibliography tools that are compatible with biblatex and biber I am looking for an easy to use bibliography manager in the style of jabref or pybliographer, that would support the current biblatex extensions to the `.bib` format, such as `@online` entries, `location` fields etc., that I could recommend to someone who is just learning how to use bibtex/biblatex.


title: Create a "claim" environment

text: I am writing a quite long proof in a LaTeX file and I would like to create a "claim" environment to put inside said proof. Can someone help me to understand how this can be done, or at least redirect me to some manual or other resource where it is explained? What I would like precisely is two environments: claim: similar to theorem, but maybe instead of getting **Claim** (bold), only underlined. claimproof: similar to the proof environment, but with a black box at the end, to distinguish its end from the end of the full proof of the theorem.


title: Extreme vertical spacing between list items & nested lists

text: How can I fine tune and reduce the vertical spacing of list items and nested lists so characters from lines above and below are almost pixel-touching each other? Example: ![enter image description here](http://i.stack.imgur.com/mjTnp.png) **UPDATE 1:** @egreg: When I try:               \begin{enumerate}[label=\arabic*.,before*=\tighten,noitemsep]     \item List 1     \begin{enumerate}[label=\Alph*.,before*=\tighten,noitemsep]     \item Item Aabcg     \item Item Bagcb     \item Item Cabcg     \item Item Dagcb     \end{enumerate}     \end{enumerate}      there is a tall space between `List 1` and `Item Aabcg` Can you further modify your answer to fix this? **UPDATE 2:** @egreg: Thanks but I still get:               1. List 1               A. Item Aabcg          B. Item Bagcb          C. Item Cabcg          D. Item Dagcb      Can you get rid of that space between `List 1` and `Item Aabcg` to get:               1. List 1          A. Item Aabcg          B. Item Bagcb          C. Item Cabcg          D. Item Dagcb


title: Unicode or control sequences?

text: What kind of troubles may occur if Unicode characters will be entered directly in the following situations (English, no math):   1. Diacritics: for example, `ö` instead of `\"{o}`.   2. Em, en dashes and minuses.   3. Quotes (assuming that it's an English text anyway and rules are applied correctly) In this domain, what approach (direct Unicode or traditional input) is more flexible in terms of possible export options (html and its archived brother epub)?


title: How to cite a dictionary entry

text: What is the recommended BibTeX way to cite a single entry inside a dictionary? I do not want to cite a dictionary in its entirety, I want to point to a single entry in that dictionary. For example, I would like to cite the entry " _Élégie_ " from the dictionary " _Le Dictionnaire Historique de la langue française_ " (page 349), published by Le Robert. Which BibTex entry type should I use to store this in my `.bib` file? Which field for the lemma?


title: Remove dot-after-number in figure captions while keeping the dot in chapter/section captions

text: In my document (using KOMAScript and babel[ngerman]) I have various figures which get captions like "Abbildung 1: ...". However, as soon as I add a `\appendix` to the document all those captions change to "Abbildung 1.: ..." (dot in front of the colon). Apparently this is a feature - I want to disable it anyway! Using `pointlessnumbers` in the `\documentclass` options I can get rid of this dott - but then I also lose the dot in chapter/section numbers which I want to keep since "1. Introduction" looks much better than just "1 Introduction".


title: Conditionally remove the space before a one-letter operator

text: I'm pursuing the Math Expectation operator (`\mathbb{E}`). As `\DeclareMathOperator` is not very good for one-letter operators (since it adds some spacing after itself), I use a plain `\newcommand`. But here comes the problem that there's no space _before_ it, so writing something like `X \MyExpct X` turns into something without spaces, while I would like to see a space between the first `X` and `\MyExpct`. But adding a spacing into `\newcommand` before `\mathbb{E}`, like               \newcommand{\MyExpct}{\,\mathbb{E}}      fails when my operator stand in the beginning of an expression! So what I want is a space which would be added before the operator if something (but not a binary operation or a opening bracket!) stands before it, and which would be removed otherwise. I tried to play with `\unskip`, `\ignorespaces`, and even looked into how `\DeclareMathOperator` deals with it (via `\kern`) but failed to find the solution.


title: Moving a node a bit

text: The following code instructs TikZ to draw an obtuse triangle. Except for the placement of the letter "C" in the diagram, the diagram is drawn correctly. I want to move the letter "C" downwards a little more so that it is not on the triangle.               \documentclass[10pt]{amsart}     \usepackage{tikz}     \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}     \usepackage{tkz-euclide}     \usetkzobj{all}          \begin{document}          \begin{tikzpicture}     \path (110:4.5) coordinate (A) (-30:3) coordinate (B) (0:0) coordinate (C);     \draw (A)     -- (B) node [at start, above left]{$A$} node [midway, right]{$c$}     -- (C) node [at start, right]{$B$} node [midway, below] {$a$}     -- (A) node [at start, below, left]{$C$} node [midway, left]  {$b$} -- cycle;     \coordinate (P) at ($(B)!(A)!(C)$);     \draw[dashed] (A) -- (P) node [below, left]{$P$} node [midway, left]{$h$} -- (C);     \draw[dashed] (P) -- node [midway, below]{$x$}(C);     \draw[|<->|] ($(B)!7mm!90:(P)$)--node[fill=white,sloped] {$a + x$} ($(P)!7mm!-90:(B)$);     \draw pic[draw, angle radius=2mm,"$\theta$",angle eccentricity=2] {angle = B--C--A};     \tkzMarkRightAngle(A,P,C);     \end{tikzpicture}          \end{document}


title: How to get rid of the viewer's (incorrect) axes in an Asymptote 3D graphics

text: I have an Asymptote graph of a 3D surface (code below) that I export into 3D PDF file (containing PRC). I include nice axes with LaTeX labels on them, but in addition to these the viewer displays very small axes in the lower left corner (I tried with both Adobe Acrobat Pro X, and Adobe Reader 9): ![enter image description here](http://i.stack.imgur.com/XCGsB.png) What's really bugging me is that these viewer axes don't correpond to my model axes really, which makes them not only ugly, but confusing. How can I disable these in my PDF, from the Asymptote source code? **Edit:** According to this Adobe Forums thread, I'm supposed to use `scene.showOrientationAxes = false;` in some Javascript. How can I attach that to my Asymptote source code?       * * * The Asymptote source code for the figure is below:               import graph3; import solids;     settings.outformat="pdf";     size(200,0); currentprojection=orthographic(-0.1,1,0.2);     real pow2(real x) { return (x)*(x); }     real pow4(real x) { return pow2(x)*pow2(x); }     triple sph2cart (triple t)     { return (t.x*sin(t.y)*cos(t.z),t.x*sin(t.y)*sin(t.z),t.x*cos(t.y)); }     triple f(pair t) {       return sph2cart((1/(0. - 1.3005572680251514*pow2(cos(t.x))*pow2(cos(t.y))*pow2(sin(t.x)) + 0.13201243635761023*pow2(cos(t.x))*pow2(sin(t.x))*pow2(sin(t.y)) + 1.110738498635555*pow4(cos(t.x)) + 0.11721516517669359*pow2(cos(t.y))*pow2(sin(t.y))*pow4(sin(t.x)) + 0.40749453039149086*pow4(cos(t.y))*pow4(sin(t.x)) + 0.01640741258244529*pow4(sin(t.x))*pow4(sin(t.y))), t.x, t.y));     }          pen p=rgb(0.2,0.5,0.7);     surface s=surface(f,(0,0),(pi,2pi), 30, 30, Spline);     draw(s,lightred);          real max=94.7252;     xaxis3("$x$",-max,max,red,Arrow3);     yaxis3("$y$",-max,max,green,Arrow3);     zaxis3("$z$",-max,max,blue,Arrow3);      It should be run with `asy -tex pdflatex input.asy`.


title: Selectively suppress caption numbering when using xtable

text: I have a chunk of code which is producing table output using Xtable and I would like to suppress the table numbering. I know I can suppress numbering using \caption* outside of Xtable but I'm stumped as to how to use \caption* or it's equivalent in Xtable. I'm afraid I'm only a few days in to using KnitR, Sweave and LaTeX so forgive my ignorance and thanks for the assistance. The working example is below, I'd like to remove the Table 1. disclaimer - the code below is a modification of http://christophj.github.io/replicating/r/how-to-produce-nice-tables-in-pdfs- using-knitr-sweave-and-r/ **edit:** I suppose I could use `\captionsetup[table]{labelformat=empty}` in the preamble as in this document I don't think I will be numbering any tables, using \captionsetup within the specific table environment would be preferable though.               \documentclass[draft]{article}     \usepackage{booktabs}          \begin{document}          <<results='asis', echo=FALSE>>=     library(xtable)     strCaption<- paste0("Sample table")     df<-data.frame(Area=1:5, n=seq(0,50, length.out=5))     print(xtable(df, digits=1, caption=strCaption, label="Test_table"),           size="footnotesize",           include.rownames=FALSE,           include.colnames = FALSE,           caption.placement = "top",           hline.after=NULL,           add.to.row = list(pos=list(-1,                                      nrow(df)),                             command = c(paste("\\toprule \n",                                               "Stratum & Sets \\\\\n",                                               "\\midrule \n"),                                         "\\bottomrule \n")                             )           )          @               \end{document}


title: How do I write \underline text but with a dotted line

text: Like               Hello World      ...........          or               Hello World     -----------      And not so               Hello World  // \underline{Hello World}     ___________  //


title: Prevent a paragraph break before a section heading

text: How can I prevent a paragraph break _before_ a section heading? To prevent it _after_ , I know that I can use `runin` like               \titleformat{\section}[runin]{\Large\bf}{\thesection\quad}{0pt}{}      However, how can I prevent _before_? I want something like: **1. First section heading** _Text..._ (no line break here) **2. Second Section Heading** _Text..._ * * * EDIT. I am trying in the following way for `\subsection`. I created a new command like:               \newcommand{\subsectionnlb}[1]{        \stepcounter{subsection}        {\normalfont\bf\thesubsection \hspace{0.3em} #1\hspace{0.3em}}     }      How can I call the formatting of `\subsection` and apply to the custom command `\subsectionnlb`?


title: Using \footnotesize in tikz node labels

text: I have used `\footnotesize` to scale labels before and it has produced the desired results. But am having problems when I pass this as part of the label to a macro. The following MWE compiles but not if I comment out the line that redefines `\footnotesize`. If needed, further details of `\ShowIntersection` can be found in Intersections in PGFplots and `GetListMember` can be found in Macro to access a specific member of a list               \documentclass{standalone}          \usepackage{xstring}     \usepackage{pgfplots}     \usetikzlibrary{intersections}          \pgfkeys{/pgfplots/Linear Axis Style/.style={             clip=true,             minor tick num=0,             axis y line=center,             axis x line=middle,              x axis line style={name path global=XAxisLine},             y axis line style={name path global=YAxisLine}         }     }          \begin{document}          \newcommand*\GetListMember[2]{\StrBetween[#2,\number\numexpr#2+1]{,#1,},,}%          \newcommand*{\ShowIntersection}[3]{     \fill          [name intersections={of=#1 and #2, name=i, total=\t}]          [red, opacity=1, every node/.style={black, opacity=1}]          \foreach \s in {1,...,\t}{(i-\s) circle (2pt)             node [above left, blue] {\GetListMember{#3}{\s}}};     }          \begin{tikzpicture}     \begin{axis}[Linear Axis Style,         xmin=-1.5, xmax=1.51,% Need asymmetry here due to bug in PGFplots         ymin=-1, ymax=3,         ]          \addplot[name path global=a, mark=none, domain=-2.5:2.5, thick] ({x},{x*x-0.5});%          \def\footnotesize{}% Why can I not comment this out?     \ShowIntersection{a}{XAxisLine}{{\footnotesize{$X_1$}},{$(A,B)$}}     \ShowIntersection{a}{YAxisLine}{{\footnotesize{$Y$}}}           \end{axis}      \end{tikzpicture}     \end{document}


title: Removing side captions from list of figures

text: How can I remove a side caption from a list of figures? I have been trying to use the following code:               \documentclass[12pt, a4paper]{book}     \usepackage[pdftex]{graphicx}     \usepackage{sidecap}     \begin{document}     \listoffigures     \begin{SCfigure}     \centering     \includegraphics[width=0.5\textwidth]{blank.jpg}     \caption*{Caption}     \end{SCfigure}     \end{document}      However, including an `*` within `\caption*{Caption}` does not seem to work. Rather, in the list of figures, it simply replaces the word 'Caption' with an asterix.


I want to convert PDF or EPS to EPS using the following commands, respectively.               gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=epswrite -sOutputFile=output.eps input.pdf      or               gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=epswrite -sOutputFile=output.eps input.eps      How to prevent GhostScript from rastering the font when converting PDF or EPS to EPS?


title: Why nomenclature text is not English when loading additional languages in document class?

text: I have troubles in getting the right language in nomenclature. Here is a minimal example:               \documentclass[english,italian]{article}          \usepackage[english,refpage]{nomencl}          \makenomenclature          \begin{document}          text          \nomenclature{Item}{Any kind of item}          \printnomenclature{}          \end{document}      My document is written in English but some of it has also an Italian translation, hence I load both languages. However by doing so the nomenclature gets Italian text: ![enter image description here](http://i.stack.imgur.com/4j5zm.png) As you may guess _Elenco dei simboli_ means _List of symbols_ (or _Nomenclature_ ) and _pagina 1_ means _page 1_. If I load only English they are in English. I could just redefine the commands to print those texts:               \renewcommand*{\nomname}{Nomenclature}     \renewcommand*{\pagedeclaration}[1]{, page~#1}      but I wondered why they showed up in Italian in first place. Perhaps I am loading the languages in a wrong way (actually I got this source by exporting from LyX, and then trimmed it to the minimum, so it would be its fault).


Where is the TexLive 2010 default package directory located in Windows 7 64-bit? I'm led to believe it should be in C:\texlive\2010\texmf\tex\latex but that appears not to be the case and I cannot find the place where .sty files are held.


title: Put equation numbers in the sidemargin with Tufte-Latex class

text: In Tufte-Latex all captions etc. are in the side margin. I want to put the equation numbers there as well. Is it possible to do this?


title: Alignment in multiple locations of a single equation based on first line

text: I want to align a multi-line equation so that it basically looks like this:               a = (b + c        + d + e)     f = g      The requirements of this alignment are:   1. The equal signs should be aligned.   2. The beginning of "b" should be aligned with the beginning of "d".   3. There should be no introduction of white space in the middle of the lines. To satisfy the alignment requirements, the whole line should be shifted horizontially. I do not know how to accomplished this. When using the `alignat` environment, even putting an alignment sign (`&`) between the "(" and the "b" (to try to align the beginning of "b" and "d") introduces white space between them, which is not allowed. Can this be done? (Note: the letters are just variables for any math expression. Make sure your solution does not depend on, say, the width of "a" and "f" being the same.) # EDIT: As my note says, the letters are just variables for any math expression to give a MWE. I am actually interested in setting `d = \left[\begin{smallmatrix} 1 \\\ 0 \end{smallmatrix}\right]`. Qrrbrbirlbel's current solution works using the letters but not after setting `d` as above: ![enter image description here](http://i.stack.imgur.com/6AFog.png) As you can see, the beginning of `d` matches the beginning of `b`, but the beginning of `[` is further right than the beginning of `b`. The `[`'s should be aligned in this example: ![enter image description here](http://i.stack.imgur.com/0XIJV.png) The source for the two images above is:               \documentclass{article}          \usepackage{mathtools} % amsmath is loaded by mathtools     \usepackage{xcolor}     \newcommand*{\gphantom}[1]{{\color[gray]{.75}#1}}          \begin{document}     \begin{align*}         a & = (b + c \\           & \hphantom{{}={} (}\mathllap{{}+{}}d + e) \\           & \hphantom{{}={} (}\mathllap{{}+{}}\left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right] + e) \\         f & = g     \end{align*}          \begin{align*}         a & = (\left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right] + c \\           & \hphantom{{}={} (}\mathllap{{}+{}}\left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right] + e) \\         f & = g     \end{align*}     \end{document}      # Solution For clarity, simplicity, and further understanding, I am posting the (current best) solution here. This is a slight modification Qrrbrbirlbel's solution bases on his own comments. ![enter image description here](http://i.stack.imgur.com/4Rjn5.png)               \documentclass{article}     \usepackage{mathtools} % amsmath is loaded by mathtools     \begin{document}     \begin{align*}         a & = (\left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right] + c \\           & \hphantom{{}={} (}\mathllap{{}+{}}{\left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right]} + e) \\         f & = g     \end{align*}     \end{document}


title: How can I draw inside a block?

text: I am trying to build up a PID control block with anti windup               \tikzstyle{controller} = [draw, fill=blue!20, rectangle,          minimum height=3.5em, minimum width=6em]          \tikzstyle{subblock} = [draw, fill=blue!5, rectangle,          minimum height=3.5em, minimum width=6em]          \tikzstyle{pidblocks} = [draw, fill=green!5, rectangle,          minimum height=3.5em, minimum width=6em, text width= 6em]              \tikzstyle{transformation} = [draw, fill=red!5, rectangle,          minimum height=3.5em, minimum width=6em]                \tikzstyle{filter} = [draw, fill=green!10, rectangle,          minimum height=3.5em, minimum width=6em]          \tikzstyle{block} = [draw, fill=windblue!20, rectangle,          minimum height=3.5em, minimum width=6em]                        \tikzstyle{sum} = [draw, circle, node distance=1.5cm, inner sep=0.15cm]     \tikzstyle{disturbance} = [draw=none, node distance=1.5cm, line width=0pt]      \tikzstyle{input} = [coordinate]     \tikzstyle{output} = [coordinate]          \begin{figure}[!h]         \centering         \begin{tikzpicture}[auto, scale=0.8, node distance=3cm,>=latex', every             node/.style={transform shape}]                       % We start by placing the blocks                 \node [input, name=input1] {};                 \node [sum, right of=input1] (sumofinputerror) {};                  \node [pidblocks, right= 5cm of sumofinputerror, yshift=1.5cm] (kp) {P\hfill$k_p e(t)$};                 \node [pidblocks, right= 5cm of sumofinputerror, yshift=-1.5cm] (ki) {I\hfill$k_i \int{e(t)dt}$};                      \node [sum, left = 0cm of $(sumofinputerror)!0.5!(ki.west)$, xshift=0.2cm, yshift=-0.8cm] (sumofantiwindup) {};                      \node [sum, right = 2cm of $(kp.east)!0.5!(ki.east)$] (controlsum) {};                       \node [pidblocks, right of= controlsum] (antiwindup) {};                      \draw [->] (input1) -- node[name=inputerror] {$y_{ref}(t)$} (sumofinputerror);                 %\draw [->] (sumofinputerror) -| ($(sumofinputerror)!0.5!(kp.west)$);                 \draw [->] (sumofinputerror) -| (sumofantiwindup);                 \draw [->] (sumofantiwindup) -- (ki);                      \draw [->] (ki) -| node[pos=0.95]{$+$}(controlsum);                 \draw [->] (kp) -| (controlsum);              \end{tikzpicture}            \label{fig:torque_pid_block}         \caption{Individual pitch and trailing edge flap control block.}     \end{figure}      ![Antiwindup](http://i.stack.imgur.com/m7Hug.png) Instead of the `ANTI-WINDUP Symbol` I would like to insert the symbol like as follow ![enter image description here](http://i.stack.imgur.com/9rjSW.png)


title: Correct symbol for the Laplace operator ($\Delta$)

text: What is the correct symbol to use for the Laplace operator? It looks almost like the big Delta `$\Delta$`, but it should look different so that it is not confused with the Delta. Currently, I use `$\vec \nabla^2$`, which is unambiguous, but not pretty.


title: how to decrease spacing after item (using mbox)

text: In the following example I am facing some issues regarding enumerate: Firstly, in order to make sure the items start in separate line, I used \mbox{}\, however the items have shifted a bit more downwards than needed. Secondly, how can I start numbering (3.1), (3.4) etc. rather than 3...4 in the example above? I tried using 3.\arabic as an option for enumerate but there are 5 errors. Thirdly, after using \mbox my enumeration disappears (item titled "Linear Function" should be enumerated as (4).               \documentclass[leqno,10pt]{article}     \usepackage{soul}     \usepackage[margin=0.75in]{geometry}     \def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}     \let\endchangemargin=\endlist      \usepackage{fancyhdr}     \pagestyle{fancy}     \lhead{Lecture 1}     \rhead{Handout 2}     \usepackage{mathtools}     \usepackage{enumitem,array}     \usepackage{relsize}     \usepackage{amsmath}     \usepackage{amsthm} %for proof      \newtheorem*{mythm}{Theorem}     \newtheorem*{mydef}{Definition}     \title{\ul{Expectations in Bivariate Probability Distribution}}     \date{}     \newenvironment{mydescription}{%        \renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textbf{{##1}}}%        \begin{description}%     }{%        \end{description}%     }     \newenvironment{definition}[1][Definition]{\begin{trivlist}     \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}     \begin{document}     \newcommand{\myitem}{\stepcounter{enumi}\item[(\theenumi)]}%for enumerate with no. in brackets     \newcommand\litem[1]{\item{\bfseries {#1}}}          \thispagestyle{fancy}          \begin{definition}      Let the random vector $(X,Y)$ have a joint \textbf{pdf} $f(x,y)$, and let $Z=h(X,Y)$ be a (single-valued) function of (X,Y). Then the expectation of the random variable $Z$ is      \begin{equation}     E(Z)=\int_{-\infty}^{\infty}{\int_{-\infty}^{\infty}{h(x,y)f(x,y)dxdy}}     \label{eq:}     \end{equation}     \end{definition}              \begin{mydescription}     \item[Moments] For non-negative integers $j,k$:             \begin{enumerate}[leftmargin=-0.3cm,start=2]             \myitem Let $Z=X^{j}Y^{k}$. Then $E(Z)=E(X^{j}Y^{k})$ is called the $(j,k)$ raw moment ($=$ moment about the origin) of the bivariate distribution.             \myitem Let $Z=X^{*^{j}}Y{*^{k}}$, where $X^{*}=X-E(X)$ and $Y^{*}=Y-E(Y)$. Then $E(Z)=E(X^{*^{j}}Y{*^{k}})$ is called the $(j,k)$ central moment ($=$ moment about the mean) of the bivariate distribution.              \end{enumerate}     \item[Variance and Covariance as Special cases of Central Moments]\mbox{}\\     \begin{enumerate}[leftmargin=-0.3cm,start=3]         \item $j=2,k=0$         \item $j=1,k=1$     \end{enumerate}          \item[Theorems]          \begin{enumerate}[leftmargin=*,start=4]\mbox{}\\             \litem{Linear function}               \end{enumerate}          \end{mydescription}     \end{document}


title: Theory of Mind Type Figure

text: I am trying to draw this picture. ![enter image description here](http://i.stack.imgur.com/KKuXX.jpg) I have produced multiple balloons etc., but it would be nice to produce exactly same figure. In case my primitive code may help someone, I am also adding it below:               \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{calc,shapes.callouts,shapes.arrows}          \newcommand{\bubblethis}[2]{     \tikz[remember picture,baseline]{\node[anchor=base,inner sep=0,outer sep=0]%     (#1) {#1};\node[overlay,cloud callout,callout relative pointer={(-0.1cm,-0.1cm)},%     aspect=10,fill=yellow!90] at ($(#1.north)+(0.8cm,1.5cm)$) {#2};}%     }%          \newcommand{\bubblethat}[2]{     \tikz[remember picture,baseline]{\node[anchor=base,inner sep=0,outer sep=0]%     (#1) {#1};\node[overlay,cloud callout,callout relative pointer={(0cm,-0.5cm)},%     aspect=10,fill=yellow!90] at ($(#1.north)+(0.1cm,2.2cm)$) {#2};}%     }%           \newcommand{\bubble}[3]{      \tikz[remember picture,baseline]{\node[anchor=base,inner sep=0,outer sep=0] %     (#1)  {#1};\node[overlay,cloud callout,callout relative pointer={(0cm,-0.5cm)},aspect=8,fill=red] at($(#1.north)+(0.1cm,2.2cm)$) {#2};\node[overlay,cloud callout, callout relative pointer={((-0.4,-0.3))},aspect=2.5,fill=green] at($(#1.north)+(2cm,5cm)$) {#3};}     } %          \newcommand{\bubblesmall}[3]{     \tikz[remember picture,baseline]{\node[anchor=base,inner sep=0,outer sep=0] %     (#1)  {#1};\node[overlay,cloud callout,callout relative pointer={(0cm,-0.5cm)},aspect=8,fill=red] at($(#1.north)+(0.1cm,2.2cm)$) {#2};\node[overlay,cloud callout, callout relative pointer={((-0.4,-0.3))},aspect=2.5,fill=green] at($(#1.north)+(2cm,4cm)$) {#3};}     } %      Thanks for any help!


title: When should \cdot be used to indicate multiplication?

text: Is this purely personal style, or are the generally accepted guidelines? Clearly, when dealing with numbers either `$2 \cdot 2$` or `$2 \times 2$` is needed, but within formulae where an absence of an operator implies multiplication, when should a `\cdot` be used? I tend to use it only sparingly if it aids in grouping. (Of course, barring the cases where it's required, e.g. a dot product.)


title: New fontspec key/value pairs syntax?

text: I updated the packages in my TexLive distribution earlier today and noticed that one line of code in my project no longer worked properly, namely the one I used to set the fake options for my monospaced font in xelatex. In the previous version I was able to write               \setmonofont[AutoFakeBold=1.4, AutoFakeSlant=0.2]{Inconsolata}      But now I get the error               LaTeX error: "keyval/misplaced-equals-sign"     Misplaced equals sign in key-value input 9     Latex attempted to parse some key-value input but found two equals signs not separated by a comma.      So what is the correct syntax now? Here's a MWE:               %!TEX TS-program = XeLaTeX     %!TEX encoding = UTF-8 Unicode          \documentclass{article}          \usepackage{polyglossia}     \setmainlanguage{swedish}          \setmonofont[AutoFakeBold=1.4, AutoFakeSlant=0.2]{Inconsolata}          \usepackage{listings}     \lstset{     basicstyle=\ttfamily,     language=python     }               \begin{document}          Hello world          \begin{lstlisting}     print("print should be in bold")     # this should be slanted     \end{lstlisting}          \end{document}


title: Macro vs counter: How to store and operate with numbers in TeX without using (too many) counters

text: I need to store and use a large amount of integers (a little bit of "programming with `TeX`"), but I know that TeX has a limited (up to 256) number of counters that can be used simultaneously. How to work with these numbers using macros? I need basic numerical operations and comparison.


title: How to change the color of the hyperlink to mail address in moderncv class?

text: I am beginner in LaTeX, and experimenting with `moderncv`. I find that the hyperkink of the email is of the same light blue color as the surrounding info, failing to make clear that it is an hyperlink. A darker blue would be ideal. I have found below that one way to change this was to make a copy (and edit the copy) of the file `moderncv.cls`, into ie my `moderncv.cls`. I edited the two last lines below, and used the class `mymoderncv` but there is no change. I have tried the other suggestions without results either. What is the correct procedure, if any? Link formatting: colors, underlines in moderncv               \AtBeginDocument{         \hypersetup{           breaklinks,           baseurl       = http://,           pdfborder     = 0 0 1,           linkcolor      = red


title: Using \adjustwidth from changepage to make a narrower ToC introduces an extra blank page, how to remove it?

text: I am required to typeset a ToC that is narrower than the `\textwdith` or `\linewidth`. I use the `\adjustwidth` from the `changepage` package for this and it almost works except that it introduces a blank page before the actual ToC page. I simplified this into a minimal example so you can see what is happening here (please copy & paste these two code blocks into two named files and compile the `narrowtoc.tex`): ## `narrow-toc.cls`               \NeedsTeXFormat{LaTeX2e}[1995/06/01]     \ProvidesClass{narrow-toc}          \DeclareOption*{      \PassOptionsToClass{\CurrentOption}{report}     }     \ProcessOptions\relax          \LoadClass[12pt,letterpaper,oneside]{report}          \RequirePackage{changepage}          \let\cleardoublepage\clearpage     \renewcommand{\contentsname}{Table of Contents}          \let\oldtableofcontents = \tableofcontents     \renewcommand{\tableofcontents}{     %\clearpage % even after comment out this, there is still a blank page before the toc         \pagestyle{plain}         \begin{adjustwidth}{1cm}{1cm}             \oldtableofcontents         \end{adjustwidth}     }      ## `narrowtoc.tex`               \documentclass{narrow-toc}          \title{A normal title}     \author{My name}     \begin{document}          \maketitle     \tableofcontents          \chapter{My first chapter}     Texts          \end{document}      The produced pdf file has 4 pages: its "Table of Contents" is in page 3, while page 2 is blank and page 1 is the title page. How can I remove this blank page 2? Here the report document class is used, so this is not a problem solved by "oneside" option.


title: siunitx + fouriernc = Size substitutions with differences?

text: > **Possible Duplicate:**   >  xfrac + siunitx gives me a font warning This document (New Century Schoolbook font in `\SI`)               \documentclass{scrreprt}          \usepackage[utf8]{inputenc}     \usepackage{fouriernc}     \usepackage[T1]{fontenc}     \usepackage{siunitx}          \begin{document}          \SI{1}{\metre\per\second}          \end{document}      produces this warning               LaTeX Font Warning: Size substitutions with differences     (Font)              up to 2.01195pt have occurred.      Additional information: This does only happen with the NC font in `\SI` with `\per` ("power to the -1"). Outside of `\SI` this does not happen (for example `$a^{-1}$ does not produce the warning). This does only happen on the units, not on magnitudes (10^-1).   * Why does this happen?   * Does siunitx require another font size for powers? Why?   * How to fix this warning?


title: Arrows chemical equations

text: I want to write the following equation; note the arrow underneath `BaSO_4` and the `H_2O` over the `\longrightarrow`. ![enter image description here](http://i.stack.imgur.com/EIFBI.png) Is that possible with the `chemist` package, which I already use for my chemical equations? Any help would be appreciated.


title: How can I change the typeface used in my theorem environments

text: I know I can change the properties of theorem environments (using `\newtheoremstyle`, as shown below), but how can I change the font type from Computer Modern to Times New Roman? That change should be local: Times should only be used within theorem environments. Note: I compile my document with `pdflatex`.               \newtheoremstyle{mytheoremstyle} % name             {\topsep}                    % Space above             {\topsep}                    % Space below             {\itshape}                   % Body font             {}                           % Indent amount             {\scshape\color{blue}}                   % Theorem head font             {:}                          % Punctuation after theorem head             {.5em}                       % Space after theorem head             {}  % Theorem head spec (can be left empty, meaning ‘normal’)


title: Implementation of "Title Case" in Bibtex

text: How is "title case" defined in bibtex? Which is the list of words _not_ to capitalize, and in which file is it defined? Is it possible to change it? I checked the `.bst` file, but apparently it's delegated to a function `change.case` whose definition I cannot find.


title: acronym option passed at the class level rather than to the (glossaries) package level doesn't work

text: I was pretty sure that options (including unknown ones) passed at the class level were also passed to the loaded packages. Hence I don't understand why the following MCE works like a charm:               \documentclass{article}     \usepackage[acronym,nomain]{glossaries}     \makeglossaries     \newacronym{at}{at}{Acronym test}     \begin{document}     \glsaddall     \printglossary[type=\acronymtype]     \end{document}      but not the following one where the `acronym` option is passed to the class rather to the `glossaries` package:               \documentclass[acronym]{article}     \usepackage[nomain]{glossaries}     \makeglossaries     \newacronym{at}{at}{Acronym test}     \begin{document}     \glsaddall     \printglossary[type=\acronymtype]     \end{document}      This leads indeed to the following error message:               ! Missing \endcsname inserted.     <to be read again>                        \glsdefaulttype     l.6 \newacronym{at}{at}{Acronym test}          ? s     OK, entering \scrollmode...     ! Missing \endcsname inserted.     <to be read again>                        \glsdefaulttype     l.6 \newacronym{at}{at}{Acronym test}          ! Missing \endcsname inserted.     <to be read again>                        \glsdefaulttype     l.6 \newacronym{at}{at}{Acronym test}               ! Package glossaries Error: Glossary type '\glsdefaulttype ' has not     been defined.          [...]      Note that the following MCE (`acronym` option passed to the class, but no `nomain` `glossaries` option):               \documentclass[acronym]{myclass}     \usepackage{glossaries}     \makeglossaries     \newacronym{at}{at}{Acronym test}     \begin{document}     \glsaddall     %     \printglossary[type=\acronymtype]     \end{document}      does work (well, mostly: the name of the glossary is "Glossary" whereas it is "Acronym" if `acronym` option is passed not to the class but to `glossaries` directly). BTW, passing explicitly (thanks to `\PassOptionsToPackage`) the `acronym` class option to `glossaries` in a personal class gives the same error:               \begin{filecontents*}{myclass.cls}     \NeedsTeXFormat{LaTeX2e}     \newif\if@acronym\@acronymfalse     \DeclareOption{acronym}{\@acronymtrue}     \ProcessOptions\relax     \LoadClass{article}     %     \RequirePackage{filehook}     \RequirePackage{hopatch}     %     \hopatch@AfterPackage{glossaries}{%       \if@acronym       \PassOptionsToPackage{acronym}{glossaries}%       \fi     }     \endinput     \end{filecontents*}          \documentclass[acronym]{myclass}     \usepackage[nomain]{glossaries}     \makeglossaries     \newacronym{at}{at}{Acronym test}     \begin{document}     \glsaddall     %     \printglossary[type=\acronymtype]     \end{document}


title: How to access rows through naming or similar

text: I want to create a style for tables similar to               \documentclass{article}     \begin{document}     \begin{table}     \begin{tabular}{cc}     A & B \\     a & b \\     c & d \\     \multicolumn{2}{l}{\emph{C}} \\     e & f \\     \multicolumn{2}{l}{\emph{D}} \\     g & h \\     \end{tabular}     \end{table}     \end{document}      The main idea is as following:   * I have the hearder "A B", and then I can put any number of rows bellow. That I can solve with `pgfplotstable`.   * Then, I want to put some kind of "subsections" within the table. Those are the "C" and "D" rows that are in between the data and span several columns.   * However, I want to be able to typeset any data. So, I can't always assume that the subsections will be in a given number, so I can't access the rows using `every row no`. My idea was to generate a data file such that               # Header     A  B     a  b     c  d      # here I want to mark this row using a name or something to mark it as a subheader     C     e  f     # here again another marker     D     g  h      Then, I want to be able to load that table into my `\pgfplotstabletypeset` and get something similar to what I have at the begining. Note that another data set may have more subheaders, or more rows in between. Thus, I would like to mark the row, or access it by name. I didn't find a way of doing this in the manual. How can I achieve this using `pgfplotstable`? For example, what I'm doing is to manually put the subsection in the table using `\emph`. However, I would like to mark those rows to put some shading or even shade the entire section with different colors (something like dark bright dark, shading style). The main idea is to have those rows marked somehow (or access by name) to define a format for them.               \documentclass{article}          \usepackage{pgfplotstable}     \usepackage{booktabs}% this includes the rulers     \pgfplotsset{compat=newest}%          \pgfplotstableset{%       col sep=&,       string type,       every head row/.style={before row=\toprule, after row=\midrule},       % we need to set the first row by hand       every first row/.style={after row=\midrule},       % this takes care of the rest       every nth row={1}{after row=\midrule}     }          \begin{document}          \pgfplotstabletypeset{     Foo & Bar & Get     \emph{Subsection} & &     A & B &     C & D &     \emph{Subsection 2} & &     E & F &     }          \end{document}


title: Align marginpar with top of current paragraph

text: I am using `\usepackage{backref}` to create a back reference in my bibliography. That part is working fine. I am now attempting to use `\marginpar` to have those references show in the margin, like so: ![Bibliography with backreferences in the margin](http://i.stack.imgur.com/RSrNC.png) That, too, works pretty much as expected, with one big exception: as you can see, the references are aligned with the bottom of the entry. Is there a way to have them align with the top? I could simply push then up a few lines with `\vspace{}`, I suppose, but there is no way to know how many lines either the main entry or the backreferences will be taking. This is the code I am currently using:               \leavemode         \marginpar{             \raggedright              \scriptsize S.~#2                   }


title: Parentheses around superscript citations in article

text: I need to change the custom format of bibliography citations to fulfil the requirements of a Conference. In this case, I am using an `article` document with `unsrt` bibliography style. The citations should have the aspect in the caption below (superscript citations between parenthesis): ![enter image description here](http://i.stack.imgur.com/kZgHh.png) Besides that, I need the bibliography to be in the format you can see below: ![enter image description here](http://i.stack.imgur.com/Urjpa.png) I have tried the solution proposed in this post but it does not work for `article` document type. I have tried the code below, but parenthesis are not introduced. Moreover, I do not know how to change the format of the bibliography to adjust it to the requirements.               \documentclass[a4paper,12pt,oneside]{article}          \usepackage[superscript]{cite}     \renewcommand\citeleft{(}     \renewcommand\citeright{)}          \begin{document}          The reference point\cite{Camci2009} in the text\cite{Ben-Daya2009} should be formatted thus\cite{Berdinyazov2009}.          \bibliographystyle{unsrt}     \bibliography{mybib}          \end{document}


title: Creating new primitives

text: Consider the following TeX:               \tt          ~~~[def]: \meaning\def              \par     ~~~[let]: \meaning\let              \par     [define]: \meaning\define           \par     ~[macro]: \meaning\macro          \def\macro#1{some #1 transformation}          \let\define\def     \define\hi{hello,}          \let\let\define     \let\hello{world!}          \vskip 2ex          \centerline{       {\hi}       {\hello}       {\macro{argument-based}}     }          \vskip 2ex          ~~~[def]: \meaning\def              \par     ~~~[let]: \meaning\let              \par     [define]: \meaning\define           \par     ~~~~[hi]: \meaning\hi               \par     ~[hello]: \meaning\hello            \par     ~[macro]: \meaning\macro          \bye      which produces the output                  [def]:  \def        [let]:  \let     [define]:  undefined      [macro]:  undefined                     hello, world!  some argument-based transformation             [def]:  \def        [let]:  \def     [define]:  \def         [hi]:  macro:->hello,      [hello]:  macro:->world!      [macro]:  macro:#1->some #1 transformation      I had thought that `\let` only copied that _macro_ definition of a control sequence; is something more fundamental happening here? In fact, I would not expect `\let` to be able to redirect the control sequence for primitive functions to others at _all_. Even if `\let` is simply creating a new reference to a definition, as this related answer implies, primitives should not have 'definitions' as I understand them in the context of TeX. Do the primitives have such 'definitions' that are simply inexpressible in TeX, but still able to be referenced? * * * Consider also the extended scenario:               \def\def{bad}     \def                \par     [def]: \meaning\def \par     [let]: \meaning\let      would produce               bad     macro:->what?     \def      If `\let` is doing what it says it's doing, how is `\meaning` getting a value of `\def` at all?


title: How to draw an arrow with two colors?

text: I want to draw arrow with two colors, the resulted arrow should be filled by one color at the top and by other color at the bottom, like the following code do to a rectangle:               \draw[top color=blue,bottom color=green] (0,0) rectangle (2,1);      What should I do?


title: Path following color gradient in TikZ

text: How can I get a path following color gradient in TikZ? Here a quick example of the idea. On the left the result I'm looking for and on the right an example of a _non_ path following gradient applied on a path. ![path following shading](http://i.stack.imgur.com/uayUX.png) It looks like the TikZ shading library isn't covering this. Related questions:   * Tikz: Shading a path without any filling.    * Fading a path in TikZ   * How to draw an arrow with two colors?


title: Why is there an extra space when I create a reference location in a document in ConTeXt?

text: I am trying to create a simple cross-reference from one page to another, e.g., in part of the document, it says, "see bears, p. 3." From the ConTeXt manual, p. 170, I was able to determine that a method for this is with `\reference`, in the place which is referenced to, and `\at`, in the place where the text refers to the place. When I use `\reference` in my document, it is giving me an extra space, e.g.:               \starttext         \section{This is a section}             \reference[1]{This is a reference}             This is some text.         \section{This is another section}             This is some more text.     \stoptext      This displays as:               1 This is a section          This is some text.          2 This is another section     This is some more text.      Notice, there is an added space between the first section and the text, while this extra space is not there.   * Am I creating references properly? Why are there so many different commands in the manual, but all seem to do the same thing, e.g. `\ref`, `\at`, `\in`, etc.?   * Why is `\reference` creating an extra space? How can I remove this extra space?   * Why do I need to place some text inside curly braces in `\reference[]{Some text here}`?


title: Indent first paragraph only once

text: I'm writing a document in English which includes an abstract in Spanish. In Spanish the first paragraph of a chapter should be indented, while in English shouldn't. If I use `indentfirst` package, all first paragraphs in the document would be indented. How can I indent a first paragraph only once, i.e., without affecting other first paragraphs in the document? EDIT: I only want to indent the first line of paragraphs. `\indent` doesn't do the job, maybe because it's overridden to not indent first paragraphs.


title: Is there a way to export XeLaTeX document into doc or similar?

text: I need to export my `.tex` file to .doc. I tried to do it using               mk4ht ooxelatex file.tex      but got complete garbage as output. The file itself is quite simple - some text and a pair of images. Is there a way to do it? EDIT: small example file


title: How to draw only the border for the nodes in TikZ Mindmap?

text: I was working on a PGF/TikZ Mindmap: ![tikz mindmap](http://i.stack.imgur.com/Y25e6.png) I cannot find a way to just draw the border, which looks like an easy action but I've tried everything! I manage to change the color of the nodes, but no control on the border. The code is this one (the same from the page above):               % Author: Till Tantau     % Source: The PGF/TikZ manual     \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{mindmap,trees}     \begin{document}     \pagestyle{empty}     \begin{tikzpicture}       \path[mindmap,concept color=black,text=white]         node[concept] {Computer Science}         [clockwise from=0]         child[concept color=green!50!black] {           node[concept] {practical}           [clockwise from=90]           child { node[concept] {algorithms} }           child { node[concept] {data structures} }           child { node[concept] {pro\-gramming languages} }           child { node[concept] {software engineer\-ing} }         }           child[concept color=blue] {           node[concept] {applied}           [clockwise from=-30]           child { node[concept] {databases} }           child { node[concept] {WWW} }         }         child[concept color=red] { node[concept] {technical} }         child[concept color=orange] { node[concept] {theoretical} };     \end{tikzpicture}\end{document}


title: PGF Plots compatible for black and white printing

text: A plot I originally prepared using colors needs to be printed in a journal that only permits black and white graphics. My question is two-fold:   1. What is the best way to clearly make different graphs distinguishable?   2. How can I to this with PGF plots? I searched through the manual of PGF plots but there seems to be no dedicated option "colors=bwonly" or something similar (maybe a convenient addition for future versions?). For reference, here is my original graph:               \documentclass{minimal}          \usepackage{pgf,tikz}     \pgfplotsset{compat=1.5.1}          \begin{document}          \begin{tikzpicture}     \begin{axis}[         %small,         ybar,%=8pt, % configures ‘bar shift’         enlargelimits=0.15,         ylabel={index},         symbolic x coords={1982, 1990, 1999, 2006},         %xtick=data,         %tick label style={font=\footnotesize},         legend style={at={(0.5,-0.15)},         anchor=north,legend columns=-1},         nodes near coords,         %every node near coord/.style={font=\footnotesize},         nodes near coords align={vertical},         ]     \addplot coordinates {(1982, 1.78) (1990, 1.71) (1999, 1.68) (2006, 1.62)};     \addplot coordinates {(1982,  1.70) (1990, 1.62) (1999, 1.59) (2006, 1.64)};     \addplot coordinates {(1982, 2.04) (1990, 1.96) (1999, 1.95) (2006, 1.91)};     \legend{A, B, C}          \end{axis}     \end{tikzpicture}          \end{document}


title: Circular drop shadow around a spy in pgfplots

text: The pgf manual isn't really explicit about it, so i'm here to ask it to the stack communauty. I tried to put some shadow/blur effect around the spyonnode but with no effect at all ! I tried this :               \begin{tikzpicture}[spy using overlays={                 circle,                 magnification=2,                 size=1.5cm,                 connect spies,                 Ggray1          }     ]     ...     \spy[circular drop shadow,          spy connection path={          \draw[thick] (tikzspyonnode) -- (tikzspyinnode);          }     ] on (spypoint) in node at (3.25,-1.35);     \end{tikzpicture}      Do someone have an idea?


title: wrapping up cell contents

text: My friends, in the following table, in the first row specifying the column names, I would like to move the "Nominal" and "Wholesale" to the next line (but of course in the same cell). ![enter image description here](http://i.stack.imgur.com/ZbgEi.png) I would also like to center the contents of those two columns. Please suggest               \documentclass{article}     %\usepackage{showframe}% http://ctan.org/pkg/showframe     \usepackage{booktabs}% http://ctan.org/pkg/booktabs     \usepackage{array}% http://ctan.org/pkg/array     \usepackage{tabularx}% http://ctan.org/pkg/tabularx     \usepackage{booktabs}% http://ctan.org/pkg/booktabs     \usepackage{array}% http://ctan.org/pkg/array     \usepackage{tabularx}% http://ctan.org/pkg/tabularx     \usepackage{calc}     \begin{document}          % Table generated by Excel2LaTeX from sheet 'Sheet2'     \begin{table}[htbp]       \noindent\hspace*{-1cm}\begin{tabularx}{\textwidth+2cm}{     >{\raggedleft\arraybackslash\advance\hsize1em}X     >{\raggedright\arraybackslash\advance\hsize1em }X     >{\raggedright\arraybackslash}X     >{\raggedright\arraybackslash\advance\hsize-1em }X     >{\raggedright\arraybackslash\advance\hsize-1em }X     }          \addlinespace     \toprule     \multicolumn{1}{c}{Country} & Price series selected & Retail/Wholesale & Real/Nominal &     Location \\     \midrule     Afghanistan & Bread & R     & R     & Kabul \\     \bottomrule     \end{tabularx}\hspace*{-1cm}%     \label{Selected food price series}%     \end{table}%     \end{document}


title: output of pdflatex in the command line is too narrow?

text: > **Possible Duplicate:**   >  Avoid linebreaks in LaTeX console / log output (in the mac) I find quite annoying that for example running:               $ /usr/textbin/pdflatex MyDocument.text      Results in an 80 characters wide chunk:               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)      restricted \write18 enabled.     entering extended mode     (./MyDocument.text     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,      icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or     (/usr/local/texlive/2011/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.co     de.tex)     (/usr/local/texlive/2011/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.cod     e.tex)     (/usr/local/texlive/2011/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.cod     e.tex     (/usr/local/texlive/2011/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.     code.tex))     (/usr/local/texlive/2011/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.co     de.tex)     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/omscmr.fd)pdfTeX warning (ex     t4): destination with the same identifier (name{page.1}) has been already used,      duplicate ignored     <to be read again>       It looks like `pdflatex` breaks its output string before sending it out. Apparently TexShop has the same problem (since the GUI shows the same issue). However, Latexian does show well formatted output so this should be possible. I wonder how can this be done? :) Some messages/errors/warning are really hard to see in this form. I have tried the `\--help` option and played with some arguments without luck. Is this a missconfiguration of pdflatex or my Terminal/Shell?


title: Arrows as subscripts

text: consider the following document:               \documentclass{minimal}          \begin{document}            Hello world            \begin{equation}         x_{1} x_{\uparrow} \uparrow       \end{equation}          \end{document}      The problem is that using arrows as subscripts looks kind of out of place compared to normal subscripts. Maybe the problem is that the arrows are just too large in general. Any ideas on how to achieve a more aesthetically pleasing result? ![Subscript size](http://i.stack.imgur.com/b7nWR.png)


title: cleveref: \lcnamecref fails to work with theorem names that are not pre-defined

text: I'm using `cleveref` with the `capitalise` option, and I'd like to use the `\lcnamecref` command to give the name of one of my theorems in the text. But if this is not one of the theorem types pre-defined in `cleveref` (Lemma, Theorem etc.) then I get an error message. Here's a MWE:               \documentclass{article}     \usepackage{amsthm}     \usepackage[capitalise]{cleveref}          \crefname{mythm}{Mytheorem}{Mytheorems}     \newtheorem{mythm}{Mytheorem}          \begin{document}     \begin{mythm}\label{m}     foo     \end{mythm}     That was a \lcnamecref{m}.     \end{document}      When I compile I get the error message               ! Argument of \MakeUppercase has an extra }.      What am I doing wrong?


title: How to snap the page dimensions to the grid in ConTeXt?

text: In ConTeXt, I am using the setting `grid=yes` to make all of the text in a document use grid typesetting. ConTeXt seems to automatically adjust the height of this grid based on the size of the font selected. I found that these grid dimensions do not match the vertical height of the page, so the grid overflows and some lines are not of full height. I would like to adjust the page dimensions so that it matches the grid. I will assume that the designers of this system used a good algorithm for deciding which grid size should be used, so I will not attempt to adjust that measurement.   * How can I obtain the value of the vertical distance of the grid?   * Is there any way to set the vertical and horizontal dimensions of the text area on a page to snap to the grid?


title: Create a capitalized macro token using \csname

text: Two things I understand and one thing I don't: I often use `\csname` to create user-defined tokens. For instance, the following code uses `\expandafter` to expand everything between `\csname` and `\endcsname` before `\gdef`ing the result:               \newcommand{\mycommand}[1]{%       \expandafter\gdef\csname #1\endcsname{Here is #1 printed.}%     }          \begin{document}     \mycommand{abc} % Creates a macro \abc     Demonstration: \abc % Prints Demonstration: Here is abc printed.     \end{document}      I wanted to do something similar by using `\mycommand{abc}` to create a macro `\Abc` (note the capital letter). Unfortunately, `\uppercase` cannot be used inside `\csname`. (I'm guessing some parts expand to TeX primitives?) But I found a somewhat related answer from Heiko Oberdiek (http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2006-02/msg01220.html) and created the following, which I don't entirely understand. It should create a new uppercase token, and I think it is working, since I can then `\let` it to another macro and it does not error.               \newcommand{\mycommand}[1]{%        \uppercase\expandafter{\expandafter\csname #1}\endcsname% Creates token      }%     \def\temp{if it worked}     \let\Abc\temp% Now \Abc expands to something other than \relax          \begin{document}     \mycommand{abc}% Creates \Abc     This lets you see \Abc.% Prints This lets you see if it worked.     \end{document}      So my question is: how can I create an uppercase token and define the expansion _at the same time_? (Basically, I want to combine both of the above approaches.) Here are two ways I have tried (both return Error: extra \endcsname).               \newcommand{\mycommand}[1]{%        \expandafter\gdef%   I think this tries to do \gdef\uppercase = bad        \uppercase\expandafter{\expandafter\csname #1}\endcsname{the macro #1 expanded}%       }%     \mycommand{abc}     Use \Abc. % Should print Use the macro abc expanded.      or               \newcommand{\mycommand}[1]{%        \expandafter\gdef\expandafter{%        \uppercase\expandafter{\expandafter\csname #1}\endcsname}{the macro #1 expanded}%      }%     \mycommand{abc}     Use \Abc. % Should print Use the macro abc expanded.