title: A tool for creating bibtex entries from MARC tags?

text: My library provides citation information for books in several formats, but not as bibtex entries. One standard format is the so-called MARC manual tags, which are human incomprehensible, but at least standard. Is there a tool that can convert these tags to a nice bibtex entry? here's an example of MARC tags:               FMT BK     LDR 01344nam  2200385   45q0     001 000155833     003 MCM     005 20010608085926.0     008 820506s1981    enka          001 0 eng       010 |a    80042162 //r854     020 |a 0080264808 (pbk.)     035 |a MITb10155833     035 |a (OCoLC)08160923     035 |a GLIS00155833     035 |a (OCoLC)08161698     035 |a (OCoLC)12231338     040 |a DLC |c DLC |d m/c |d MYG     0411    |a eng |h rus     0500    |a QC718 |b .L48 1981     099 |a QC718.L48 1981     1001    |a Lifshit͡s, E. M. |q (Evgeniĭ Mikhaĭlovich)     24510   |a Physical kinetics / |c by E.M. Lifshitz and L.P. Pitaevskiĭ ; translated from the Russian by J.B. Sykes and R.N. Franklin.     250 |a 1st ed.     260 |a Oxford ; |a New York : |b Pergamon Press, |c 1981.     300 |a xi, 452 p. : |b ill. ; |c 25 cm.     4901    |a Pergamon international library of science, technology, engineering, and social studies     4901    |a Course of theoretical physics ; |v v. 10     500 |a Includes index.     650 0   |a Plasma (Ionized gases)     650 0   |a Kinetic theory of gases.     650 0   |a Solid state physics.     7001    |a Pitaevskiĭ, L. P. |q (Lev Petrovich)     8001    |a Landau, L. D. |q (Lev Davidovich), |d 1908-1968. |t Teoreticheskai͡a fizika. |l English ; |v v. 10.     830 0   |a Pergamon international library of science, technology, engineering, and social studies.     CAT |a CONV |b 00 |c 20010620 |l MIT01 |h 1628     CAT |a AIDA |b 00 |c 20030812 |l MIT01 |h 1037     CAT |a lti0904 |b 00 |c 20090523 |l MIT01 |h 1459     049 |a MYGY     910 |a je870930     949 |a MYGY |b 39080004296429     PST0    |0 Z30 |1 000155833000020 |b PHY |c STACK |o BOOK |d 02 |y 00000 |f N |r MIT60-000339160 |n 0 |h QC718.L48 1981 |a MCM |3 Book |4 Physics Dept. Reading Room |5 Stacks |6 Room Use Only |p Avail     PST0    |0 Z30 |1 000155833000010 |b SCI |c STACK |o BOOK |d 01 |y 00000 |f N |r MIT60-000214187 |n 0 |h QC718.L48 1981 |a MCM |3 Book |4 Hayden Library |5 Stacks |6 30 Day Loan     LDR      nx   22     zn 4500     008 0106230u    0   4   uu   1           004 000155833     8520    |a MCM |b SCI |c STACK |h QC718.L48 1981 |z     LDR      nx   22     zn 4500     008 0106230u    0   4   uu   1           004 000155833     8520    |a MCM |b PHY |c STACK |h QC718.L48 1981 |z     SFX 1   |s 0-0-0-1-5-5-8-3-3 |l MIT01 |9 00 |z ~~~~~~~~~ |p Avail |a Click button for available online volumes     SYS 000155833      from which I would like to create               @Book{PhysicalKinetics,       author =   {E. H. Lipshitz and L. P. Pitaevskii},       title =    {Physical Kinetics},       publisher =    {Pergamon Press},       year =     {1981},       address =      {NY}     }      or something similar....


title: How to increase the spacing between equations in "gather"?

text: Is there a way to consistently increase the vertical spacing between equation lines in a `gather` (or `gather*`) environment from `amsmath`? Specifically, I want to produce something like               \begin{gather*}     a = b \\[2ex]     c = d \\[2ex]     e = f     \end{gather*}      without having to write `[2ex]` at the end of each equation line. I can think of some hacks that redefine `\\\` to automatically add the spacing, but is there some cleaner/better way to achieve this?


title: Changing the entries of a list environment

text: If I have a new list environment like so:               \newenvironment{textblockX}     {          \begin{list}         {Question}         {}     }     {         \end{list}     }      How would I refer to an item of the list within the environment? As an example, how could I modify the code above such that every entry is now bold, but the word question stays in normal text? Is this where the `##1` is used?


title: How to change an environment into newcommand?

text: Suppose that I want to create a new command named _step_ , which functionally add **Step 1.** , **Step 2.** , and so on in the proof. This can be done by:               \newcounter{stepnum}     \newcommand{\step}{\stepcounter{stepnum}\textbf{Step \arabic{stepnum}}.}      The problem is, which will not automatically start a newline at the end of each **step** , but this can be fixed by:               \newcounter{stepnum}     \newenvironment{step}{\stepcounter{stepnum}\textbf{Step \arabic{stepnum}}.}{\par}      I "hate" to write **\begin{step}** and **\end{step}** each time, clearly the command **\step** is more simple, but in the later case **\step** will not add a **par** at the end of line. How can I fix this?


title: error when patching with etoolbox \apptocmd: "the patching command seems to be nested in the argument to some other command"

text: The `\apptocmd` command from `etoolbox` is giving me an error I don't understand. I know how to work around the error in this particular case, but I'd like to understand what it's complaining about so that I can fix similar errors in the future. This is the error I'm getting:               [debug] tracing \apptocmd on input line 28     [debug] analyzing \H@old@part     [debug] ++ control sequence is defined     [debug] ++ control sequence is a macro     [debug] ++ control sequence is a macro with parameters     [debug] -- nested patching command and parameters in patch     [debug] -> the patching command seems to be nested in the     [debug]    argument to some other command     [debug] -> the patch text seems to contain # characters     [debug] -> either avoid nesting or use # characters with     [debug]    category code 12 in the patch text     [debug] -> simply doubling the # characters will not work          ! Package cont Error: can't patch \H@old@part.          See the cont package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.28     }          ?       The following produces the above error:               \documentclass{report}     \usepackage{etoolbox}     \tracingpatches     \usepackage{hyperref}     \makeatletter          % error handler for patching commands     \newrobustcmd{\cont@err}[1]{\PackageError{cont}{can't patch \protect#1}{}}%          % contains the name of the current part     \gdef\cont@name@part{\PackageError{cont}{not in a part}{}}          % patch \part to save the part name to \cont@name@part.  note     % that \part is a parameterless macro that has \@part as its last     % token, which does take the arguments.  Thus, \part can't be     % appended to; \@part has to be appended to instead.     %     % The hyperref package redefines \@part, so when hyperref is     % loaded \H@old@part needs to be patched instead.     \ifdef{\H@old@part}{       \apptocmd{\H@old@part}{%         \gdef\cont@name@part{#2}%       }{}{\cont@err{\H@old@part}}     }{       \apptocmd{\@part}{%         \gdef\cont@name@part{#2}%       }{}{\cont@err{\H@old@part}}     }          \begin{document}     \part{first part}     this part's name is ``\cont@name@part''     \end{document}      The following also doesn't work:               \catcode`\#=12     \ifdef{\H@old@part}{       \apptocmd{\H@old@part}{%         \gdef\cont@name@part{#2}%       }{}{\cont@err{\H@old@part}}     }{       \apptocmd{\@part}{%         \gdef\cont@name@part{#2}%       }{}{\cont@err{\H@old@part}}     }     \catcode`\#=6      It produces the following error:               [debug] analyzing \H@old@part     [debug] ++ control sequence is defined     [debug] ++ control sequence is a macro     [debug] ++ control sequence is a macro with parameters     [debug] -- macro cannot be retokenized cleanly     [debug] -> the macro may have been defined under a category     [debug]    code regime different from the current one     [debug] -> the replacement text may contain special control     [debug]    sequence tokens formed with \csname...\endcsname;     [debug] -> the replacement text may contain carriage return,     [debug]    newline, or similar characters      I can work around the problem by doing the following instead:               \expandafter\apptocmd\expandafter{%       \csname\ifdef{\H@old@part}{H@old}{}@part\endcsname%     }{%       \gdef\cont@name@part{#2}%     }{}{\cont@error{\@part}}      However, I'd like to know how to fix the error while using the former approach (`\apptocmd` in an argument of `\ifdef`).


title: Newenvironment and floating figures

text: I want to create an environment for a list of items, that should look like this for each item:                Name     Image      .......  Image      ..............      ..............      with this environment `\begin{cuitem}{Name} ...... \end{cuitem}` and this definition:               \newenvironment{cuitem}[1]     {      \textbf{#1}       \input{imagefile}     }{     }      where imagefile is a .tex that contains a tikzpicture wrapped inside a `\begin{wrapfigure}{r}{0.5\textwidth}`. This works fine if I use only one of these `cuitem`. As soon as I use more than one they start being rendered into each other with the text overlaying the figure. What is the correct way to ensure the separation of two consecutive environments and is the wrapfigure the best solution for this problem?


title: how to redefine \begin{align*} ... \end{align*} to \begin{eqnarray*} .... \end{eqnarray*}

text: Scientific word insists in generating displayed math using               \begin{align*} ... \end{align*}      and htlatex has a bug in that it does not generate bit mapped images in this case. The fix that I found after trial and error is to replace the above with                 \begin{eqnarray*} ....  \end{eqnarray*}      So I just need to know what the syntax is supposed to be. The bug that describes this more is here http://puszcza.gnu.org.ua/bugs/?179


title: Unicode characters do not appear in IEEE style bibliography

text: I cannot get Unicode characters to appear in the IEEE style bibliography with `biblatex` and `biber`. Shown below are minimal working examples.               \documentclass[journal]{IEEEtran}          \usepackage[style=ieee, bibencoding=utf8, backend=biber]{biblatex}     \usepackage[utf8]{inputenc}     \addbibresource{Bibliography.bib}          \begin{document}          \nocite{lee12b}     \renewcommand*{\UrlFont}{\rmfamily}     \printbibliography          \end{document}      And here are the contents of the `.bib` file. Note the following Unicode characters: µ (Greek mu) and ° (degree sign).               % Bibliography.bib     @article{lee12b,         Author = {Lee, Junghyup and Cho, SeongHwan},         Date-Added = {2013-01-23 07:05:03 +0800},         Date-Modified = {2013-02-11 13:58:24 +0800},         Doi = {10.1109/JSSC.2012.2204475},         Issn = {0018-9200},         Journal = {Solid-State Circuits, IEEE Journal of},         Month = {Oct},         Number = {10},         Pages = {2527--2533},         Printed = {1},         Title = {{A 1.4-µW 24.9-ppm/°C Current Reference With Process-Insensitive Temperature Compensation in 0.18-µm CMOS}},         Volume = {47},         Year = {2012},         }


title: Which commands exist to define new commands?

text: Which commands are there that one can use to define new commands in (La)TeX? There are: `\let`, `\def`, `\\[re]newcommand[*]`, `\DeclareRobustCommand[*]`, _and_ ...? (And I've seen things like `\DeclareMathOperator`.)


title: Do starred commands eat up space after them?

text: Do starred commands eat up spaces after them, like unstarred ones do? That is, is `\somecommand* nextword` equivalent to `\somecommand*nextword`? And: Does it depend on the particular way a starred command is defined? **Edit:** Note that the original version of my question left out me considering only zero-argument commands. I was assuming this, and it was mostly clear (albeit implicit) from the question statement. User @tohecz has written a valuable answer (to the pre-edit version) addressing this detail. Note that I'm asking about commands with a star at the end of their name (`\somecommand*`), **not** about whether the command was defined using a starred defining command (e.g. with `\newcommand*`).


title: A beautiful border style

text: I need a border style that has a nice appearance. I've found something like this:               \documentclass{book}          \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{decorations.pathmorphing}          \usepackage{lipsum}% dummy text     \begin{document}          \begin{titlepage}         \centering     \begin{tikzpicture}[overlay,remember picture]         \draw [line width=1mm,decorate%,decoration={snake             %,segment length=<length>,amplitude=<length>     %        }             ]             ($ (current page.north west) + (0.3cm,-0.3cm) $)             rectangle             ($ (current page.south east) + (-0.3cm,0.3cm) $);     \end{tikzpicture}         \huge Ejemplo de margenes          \end{titlepage}     \end{document}      But it looks neither beautiful nor formal. Perhaps something like this:               \documentclass{article}     \usepackage{fancybox}% http://ctan.org/pkg/fancybox     \usepackage{lipsum}% http://ctan.org/pkg/fancybox     \begin{document}          \thisfancyput(3.25in,-4.5in){%       \setlength{\unitlength}{1in}\fancyoval(7,9.5)}%     \lipsum[1-20]          \end{document}      But I don't know how to set the margin to the complete document.


title: Why are these options passed to \LoadClass ignored?

text: Consider the following simple example:               % === this is simple.tex ===     \documentclass[paper=a5,pagesize]{scrbook}     \usepackage{lipsum}     \begin{document}     \lipsum{1-10}     \end{document}      When processing this source file with `pdflatex`, the output file has the correct page size of the DIN A5 format. Now for some reasons I want to introduce my own document class:               % === this is myclass.cls ===     \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{myclass}[2014/07/01 1.0 current]     \LoadClass[paper=a5,pagesize]{scrbook}          % === this is withclass.tex ===     \documentclass{myclass}     \usepackage{lipsum}     \begin{document}     \lipsum{1-10}     \end{document}      As you can see, I am passing exactly the same options. In this case, the output file is created using the system default page size, in my case DIN A4. I suspect that somehow the parameters do not get propagated from `\LoadClass` in the same way - is this correct and what can I do about it?


title: Beamer frame with two columns and sequential uncover of toc sections

text: I know that there is already this question, but I couldn't apply the answer on my problem: I want to uncover the sections that first section, than second section, ... , than 10th section will uncover in toc if possible with the `<+->` syntax. Here the MWE, which will uncover both sides at same time...:               \documentclass{beamer}     \begin{document}          \begin{frame}         \frametitle{Outline splitted}         \begin{columns}[t]             \begin{column}{.5\textwidth}                 \tableofcontents[pausesections,sections={1-5}]             \end{column}             \begin{column}{.5\textwidth}                 \tableofcontents[pausesections,sections={6-}]             \end{column}         \end{columns}     \end{frame}               \section{Test1}     \frametitle{Test}     \begin{frame}      Test     \end{frame}          \section{Test2}     \frametitle{Test}     \begin{frame}      Test     \end{frame}          \section{Test3}     \frametitle{Test}     \begin{frame}      Test     \end{frame}          \section{Test4}     \frametitle{Test}     \begin{frame}      Test     \end{frame}          \section{Test5}     \frametitle{Test}     \begin{frame}      Test     \end{frame}          \section{Test6}     \frametitle{Test}     \begin{frame}      Test     \end{frame}          \section{Test7}     \frametitle{Test}     \begin{frame}      Test     \end{frame}          \section{Test8}     \frametitle{Test}     \begin{frame}      Test     \end{frame}          \section{Test9}     \frametitle{Test}     \begin{frame}      Test     \end{frame}          \section{Test10}     \frametitle{Test}     \begin{frame}      Test     \end{frame}          \end{document}


title: How to cite full author name

text: I have been looking for a way to cite full authors with natbib. I have found some answers that I are (to me) somewhat incomprehensible, seeing that I am still a novice at Latex. So I'll ask here... I just want both the first and the last name displayed, along with the publishing year, like this: "According to John Doe (1978) one third of the moon is made of cheese, and two thirds are made of macaroni!" I only want this displayed, whenever I choose to do so, so I don't want the first citation of a new author to be like this. I have looked through the manuals I could find for natbib, but none contained a command for this. I trust you don't need a test document or anything, since it isn't really the case that something isn't working, just that I cannot seem to find what is in my mind, a fairly straight forward function.


title: Plot a range/subset of coordinates in Tikz

text: **SOLVED:** How would you plot subset of a function in Tikz: In Syntax for smoothing a coordinate plot with the foreach command               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{intersections,calc}          \begin{document}          \begin{tikzpicture}     % red line     \path[draw,red,name path=one] plot [smooth] coordinates {(0,0) (7.5,0) (8,6) (8.5,0) (10,0)};     % function     \path[draw,blue,name path=three]     plot[domain=0:10,samples=100,smooth] (\x,{0.5*rand+2});     red line + function     \foreach \c in {0,...,100} {       \pgfmathsetmacro{\x}{\c/10}       \path[name path=line] (\x,-1) -- (\x,4);       \path[name intersections={of=one and line,name=newone}];       \path[name intersections={of=three and line,name=newthree}];       \path let \p1=(newone-1), \p2=(newthree-1) in        (\x1,\y1+\y2) coordinate (sum-\c);     }     \def\pts{}     \foreach \x in {0,...,100} { \xdef\pts{\pts (sum-\x)}; }     \draw[black] plot[smooth] coordinates {\pts};     \end{tikzpicture}          \end{document}      I would like to plot only the 23 first coordinates of `\pts` This is not correct but looking for something like:               \path[draw,black] plot [smooth] coordinates {\pts(sum-0),...,\pts(sum-23)};      **Solution:**               \def\ptsa{}     \foreach \a in {0,...,23} {\xdef\ptsa{\ptsa(sum-\a)}; }     \path[draw,green] plot [smooth] coordinates {\ptsa};      Produces:![enter image description here](http://i.stack.imgur.com/JpgPQ.png)


title: How do I use custom fonts?

text: > **Possible Duplicate:**   >  Installing TTF fonts in LaTeX I have some fonts I bought a while ago I wish to use in some Latex documents. Can I use them in Latex and if so, how? Please note I am new to Latex so will need any answers to be explicit (sorry in advance).


title: The lightning symbol in an equation environment

text: I tried to use the lightning symbol but when I use it together with equations it becomes an ''E'' Why is that?               \documentclass[11pt,a4paper,oneside]{report}      \usepackage[pdftex]{graphicx}      \usepackage[T1]{fontenc}      \usepackage{fouriernc}     \usepackage{mathtools}     \usepackage{amsfonts,amsmath,amssymb,amsthm}      \usepackage[a4paper, hmargin={3.5cm,3cm}, vmargin={2.5cm,2.5cm}]{geometry} %margin     \usepackage{multicol}     \usepackage{enumerate}     \usepackage{ marvosym }               \begin{document}     \Lightning     but when used in an equation environment it becomes ''E''     \begin{equation}     \Lambda\gamma \Lightning     \end{equation}     \end{document}      the output ![enter image description here](http://i.stack.imgur.com/mPQH1.jpg) What can be done to use \Lightning in equations? Thank you


title: Break box (a long caption) over pages

text: I want to have text of a certain width less than the page width, which goes across several pages. Normally you’d put text into a (`\par`)`box` to set its width but these boxes cannot be broken across pages so I can’t use it here. I tried looking at the internal definition of `\parbox` (more precisely `\@iiiparbox`) but I cannot make heads nor tails of it – it doesn’t look like it can be adapted to allow page breaks, though. ### Background: The reason I want to do this is that I have a figure caption (which is centered and of a given text width) and is too long for the page and thus cut off. There are numerous questions about how to solve this (e.g. Break figure description over two pages) but none offers an actual solution to the problem. For now I’ve simply opted out of using a `float` and use the following instead:               \begin{center}         \includegraphics         \captionof{figure}{looooong caption}     \end{center}      … but that always puts the figure caption on the next page in its entirety, rather than breaking it. (Locally) redefining `\@iiiparbox` makes it possible to break the figure caption across pages smoothly but then the figure caption takes up the complete page width which is undesired.


title: I want to start using LaTeX on Ubuntu. Where do I start?

text: There are many different kind of options that you can do in order to start using LaTeX on Ubuntu. I would prefer doing that through Eclipse, but if there is a better way of doing it, feel free to write your opinion on why using this instead of something else.


title: Catcode of \endlinechar when its charcode is less than 1

text: When `\endlinechar` is less than 1, how do we access its catcode? The following gives the error shown below:               ! Bad character code (-1).     l.34 ...ndlinechar\string=\the\catcode\endlinechar                                                       \relax%     ? x          \endlinechar=\m@ne     \edef\restorecatcodes{%       \let\noexpand\restorecatcodes\relax%       \endlinechar\string=\the\endlinechar\relax%       \catcode\the\endlinechar\string=\the\catcode\the\endlinechar\relax%       \catcode\string`\noexpand`\string=\the\catcode\string``\relax%       \catcode\string`\noexpand=\string=\the\catcode\string`=\relax%     }%      **EDIT** I have seen an approach by Michael Downes (in the _pcatcode_ package). It looks like the following:               \begingroup%     \let\e\endlinechar\edef\p{\the\e}\e13\edef\n{\the\catcode\e}%     \xdef\restorecatcodes{%       \let\noexpand\restorecatcodes\relax%       \endlinechar=\p\relax\catcode\number\e=\n\relax%       \catcode\string`\noexpand`\string=\the\catcode\string``\relax%       \catcode\string`\noexpand=\string=\the\catcode\string`=\relax%     }%     \endgroup%      I think his assumption is that changing the charcode will not affect the catcode.


title: How to format the extrayear field in biblatex

text: In author-year citation/bibliography styles, multiple publications by the same author in the same year are formatted with a lowercase letter after the year: _Smith 2011a ... Smith 2011b_ etc. In `biblatex` this works fine with numeric dates, but fails with non-numeric dates like "in progress". (The `natbib` style I use handles these cases correctly by putting parentheses around the letter if the year field is non- numeric.) How do I do the same thing in `biblatex`? So the expected output is: Smith, 2011a Smith, 2011b Smith, in progress(a) Smith, in progress(b) Sample file and output:               \documentclass{article}     \usepackage[style=authoryear,labelyear=true]{biblatex}     \usepackage{filecontents}     \bibliography{test}     \begin{document}     \cite{test1,test2}     \printbibliography     \begin{filecontents}{test.bib}     @unpublished{test1,         Author = {John Smith},         Date-Added = {2011-02-21 13:41:09 -0500},         Date-Modified = {2011-02-21 13:42:02 -0500},         Note = {ms. MSU},         Title = {A great paper in progress},         Year = {in progress}}          @unpublished{test2,         Author = {John Smith},         Date-Added = {2011-02-21 13:42:09 -0500},         Date-Modified = {2011-02-21 13:42:46 -0500},         Note = {ms. MSU},         Title = {Another great paper in progress},         Year = {in progress}}     \end{filecontents}     \end{document}      ![Output image](http://i.stack.imgur.com/e8guY.png)


title: Tables arrangement

text: I have two tables, which are rotated 90 degree to align vertically from bottom to top. That works fine. I want to make two tables on the same page. Now each rotated table is on its own page. I want both on the same page. How can achieve that? Here is the example for table which I have.               \begin{table}[ht]      \caption{{Numbers digits}}      \centering     \rotatebox{90}{         \begin{tabular}{l|l| l| l|ll|ll}           \hline     a & b & C & d& e& f& g7 h\     1& 2&3&4&5&2&9&3\        \hline     \end{tabular}     }         \label{gas1}     \end{table}


title: udots in TikzPic problem

text: I'm having a problem making a diagram in tikzpicture. Here's the code:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{MnSymbol}     \usepackage[.3]{fullpage}     \usepackage{tikz}     \usepackage{tkz-fct}     \usetikzlibrary{matrix,arrows}          \begin{document}     The wedge $W = A_1 \wedge \cdots \wedge A_n$ is a pushout in the category  of topological spaces, $\textbf{Top}$.     \begin{center}     \begin{tikzpicture}[node distance=2cm, auto]     \node (one) at (0,2) {\textbf{1}};     \node (A1) at (2, 2) {$A_1$};     \node (An) at (0, 0) {$A_n$};     \node (W) at (2, 0) {$W$};     \node (dots) at (1,1) {$\udots$};     \draw[->] (one) to node {}(A1);     \draw[->] (one) to node {}(An);     \draw[->] (An) to node {}(W);     \draw[->] (A1) to node {} (W);     \node[->] (one) to node {} (dots);     \node[->] (dots) to node {} (W);     \end{tikzpicture}     \end{center}          \end{document}      And the output lacks the two last arrows. The error message is from tikz and says "A node must have a (possibly empty) label text." The problems only started when I tried to add the dots in there. Any help would be appreciated. Also, better suggestions for the diagram would also be welcome! Thanks


title: Using the filename in the document?

text: I have a bunch of documents called `wk01.tex` `wk02.tex` and so on up to (eventually) 20. These are weekly handouts for a course I TA. Currently, each document starts with a `\def\classweek{5}` or whatever. I then use this in the document header. Now what I'd really like to do is have latex take the document name, do some sed-fu to strip out just the number (without its initial 0 if applicable) and then use this number in the definition of `\classweek` automatically. I've spotted reference to `\jobname` once or twice, but I'm not sure how to use that. Is what I want to do possible? [Are there tags appropriate for this sort of question? I couldn't think of any...]


title: How to left align caption inside subtable?

text: I have the following code:               \documentclass[letterpaper,12pt]{article}          % things needed to include figures     \usepackage{subfigure, graphicx}     % float must be included for the [H] to actually work     \usepackage{float}     % formulas     \usepackage{amsmath}     % Added to adjust captions     \usepackage[singlelinecheck=false]{caption}     % added to adjust margins at the suggestion of Dr. Matt     \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}     \usepackage{fullpage}          \begin{document}     % 2 column side by side table     \begin{table}[H]       \subtable[Half-life for $^{108}$Ag] {%              % -----------------------------------------------------%         \begin{tabular}{c@{\hskip 1cm} c}           \hline\noalign{\smallskip}           Accepted $T_{1/2}$ & Experimental $T_{1/2}$\\           (s) & (s)\\           \hline\noalign{\smallskip}           142.92 & 158 $\pm$ 7\\           \hline\noalign{\smallskip}         \end{tabular}         \label{lefttable}         % -----------------------------------------------------%            }       \subtable[Half-life for $^{110}$Ag] {%              % -----------------------------------------------------%         \begin{tabular}{c@{\hskip 1cm} c}           \hline\noalign{\smallskip}           Accepted $T_{1/2}$ & Experimental $T_{1/2}$\\           (s) & (s)\\           \hline\noalign{\smallskip}           24.6 & 21 $\pm$ 2\\           \hline\noalign{\smallskip}         \end{tabular}         \label{righttable}         % -----------------------------------------------------%            }       \caption{2 Column tables side by side}       \label{sidebysidetable}     \end{table}     \end{document}      That produces this result: ![enter image description here](http://i.stack.imgur.com/SOy7O.png) I'd like the captions to be left aligned. How would I go about doing this?


title: Change caption name of an appendix

text: I want to change the caption name of a figure for an appendix. For example I have `\caption{This is a supplemental figure.}` and by default the caption appears as               Figure 1: This is a supplemental figure.      However I want               Figure S1 - This is a supplemental figure.      I tried this `\renewcommand{\figurename}{Figure S}` but it adds a space in between and results in               Figure S 1 - This is a supplemental figure.


title: How to define a command \exponent that transforms $\exponent^e$ to $a^eb^ec^e$?

text: I have tried to define a command `$\exponent$` that would look for next exponent and would put a copy of this exponent after `a`, another after `b` and a last one after `c`. `$\exponent^e$` would transform to `$a^e b^e c^e$`. And if this is possible, I would like `$\exponent^e_f$` and `$\exponent_f$` to generate `$a^e_f b^e_f c^e_f$` and `$a_f b_f e_f$`. The difficult part is to make `$\exponent^\frac12$` be automatically replaced by `$a^\frac12 b^\frac12 c^\frac12$`, but comments are suggesting that `^\frac12` is forbidden in TeX.


title: \scalebox doesnt compile

text: I want to scale down an equation and after trying lots of examples found on the internet I still cannot compile or see what is wrong. My code looks like:               \usepackage{graphicx}     ....     \scalebox{0.7}{     \begin{equation} \label{eq_iinf}      entropy(C_j)=-{\sum_{c_j \in C_j}{P(c_j)\log_2 P(c_j)}}     \end{equation}     \begin{equation} \label{eq_P}      P(c_j)=\frac{fs(c_j)}{\sum_{c'_j \in C_j}{fs(c'_j)}}     \end{equation}     }      And the errors are very long, but it complains something like "missing $ inserted" and "you can't use `eqno` in math mode" which doesnt make any sense to me.


title: Automatic switching of math font based on current text font

text: I'm writing a document using `xelatex` and have set up my document fonts using `fontspec` as follows:               \usepackage{fontspec}     \setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}     \setsansfont[Mapping=tex-text,Numbers=OldStyle,Scale=MatchLowercase,SmallCapsFont={Linux Biolinum Capitals O}]{Linux Biolinum O}     \setmonofont[Mapping=tex-text,Scale=MatchLowercase]{DejaVu Sans Mono}      In my document, I'd like the math font to use either Linux Libertine or Linux Biolinum based on whether the surrounding text font is serif or sans serif. For example:               \normalfont This text is Linux Libertine as is the following math: $a^2 + b^2 = c^2$.     \sffamily This text is Linux Biolinum as is the following math: $a^2 + b^2 = c^2$.      Here's what I've tried so far and the components of the problem I'd like to solve:   1. The normal math text should be set in Linux Libertine, not Computer Modern. CM can serve as a fallback provide any glyphs that LL doesn't provide, however (e.g., large symbols and operators, but not Greek letters). The `mathspec` package handles this requirement fairly well.   2. If the surrounding body text is set in sans serif (this is used for tables, figures, and captions), then the math should be set in sans serif. I'd prefer this be done automatically, but I don't mind adding a `\sfmath` command (or the like) if necessary. Unfortunately, I couldn't figure out how to coerce `mathspec` into handling this part. A few things to note:   1. Neither Linux Libertine nor Linux Biolinum have much if anything in the Unicode range for math glyphs. Therefore, the Greek letters should be pulled from the Greek alphabet block and not the math Greek block, for instance.   2. I'm not using `\mathsf` or the math sans alphabet to indicate anything special in this document so there won't be any confusion when the math is set in sans serif solely to match the surrounding text. The similar questions I've found on TeX.sx appear to be for `pdflatex` or to make use of the `\mathsf` command.


title: Horizontal centering with \subfloat

text: Please how to horizontally center-justify the following array of figures with the `subfig` package ?               \documentclass[11pt]{article}     \usepackage[dvips]{graphicx}     \usepackage{subfig}          \begin{document}          \begin{figure}[htp]       \centering         \subfloat[From $n=0$ to $n=-1$]{\label{fig:a}         \includegraphics[scale=0.45]{Figures/IncludePyramid_a_reverse.eps}         }                       \qquad\qquad\qquad         \subfloat[From $n=-1$ to $n=0$]{\label{fig:aa}         \includegraphics[scale=0.45]{Figures/IncludePyramid_a.eps}       } \\         \subfloat[From $n=-1$ to $n=-2$]{\label{fig:b}         \includegraphics[scale=0.45]{Figures/IncludePyramid_b_reverse.eps}         }                       \qquad\qquad\qquad         \subfloat[From $n=-2$ to $n=-1$]{\label{fig:bb}             \includegraphics[scale=0.45]{Figures/IncludePyramid_b.eps}       }       \\         \subfloat[From $n=-2$ to $n=-3$]{\label{fig:c}         \includegraphics[scale=0.45]{Figures/IncludePyramid_c_reverse.eps}         }                       \qquad\qquad\qquad         \subfloat[From $n=-3$ to $n=-2$]{\label{fig:cc}             \includegraphics[scale=0.45]{Figures/IncludePyramid_c.eps}       }           \caption{Random walk on the Pascal pyramid}       \label{fig:bratelli}     \end{figure}          \end{document}      ![enter image description here](http://i.stack.imgur.com/edPCC.png)


title: I want to start using LaTeX on Mac OS X. Where do I start?

text: I want to write my final thesis using LaTeX, what should I do in order to be able to do that through Eclipse on a Mac OS X? If any another good editor exists, feel free to write your opinion on why using this instead of something else.


title: Tikz: Combining nodes (creating a matchstick object)

text: I'm a newbie trying to learn some basic tikz usage. I'm getting along pretty well with the manual, but it seems I'm overlooking something as this question seems basic to me and still I can't find an answer to it. Essentially I want to create one node out of two smaller ones. The object I want is a matchstick, which at the moment looks like this:               \usetikzlibrary{shapes}     \definecolor{brun}{HTML}{974806}     \definecolor{gul}{cmyk}{0,0.11,0.93,0}          \begin{tikzpicture}     [scale=1,     head/.style={draw, very thin, inner sep = 0, minimum height=0.35cm, minimum width=0.5cm, ellipse, ball color=brun, fill},     stick/.style={rectangle, draw, very thin, brown, anchor=north west, fill=gul!70, inner sep =0, minimum height=0.22cm, minimum width=2.6cm}]          \node [head, rotate=0] (ex) at (0,0) {};     \node [stick, rotate=0] (ex1) at (ex.30){};     \end{tikzpicture}      (I have to read up on how to include graphics in these questions, sorry) The overall objective is to create matchstick patterns, so I'd like to have the match defined as a single object (node, I suppose) which then can easily be placed relative to each other and rotated. At the moment I have to rotate and scale each part (head and stick) individually, which obviously is less than ideal. Also, positioning is now tricky since the object stems from the head, so in order to place a match I have to figure out where the head should be, which can be quite cumbersome. Any ideas on how to improve my code or general tips are much appreciated! Also, is there a place to go for tikz exercises? With example images to try and create yourself, and then with different solutions to compare your own to? Or other tips on how to best learn Tikz as I'm currently just playing around with it and the manual.


title: How can I optimize the keyboard for frequent LaTeX input?

text: I have started the practice of live-texing my math/physics notes. Although I am not practicising it in a live-lecture, I am doing it for the online lectures I am viewing to get fast and accustomed to it. I am not a pro touch typer, but have a decent speed of about 60 wpm. Some of the tricks I have used are to use lots of `\newcommand` to ease it down. Most helpful would be something to substitute equation delimiters that do not involve pressing a dead key. For various reasons (portability to an online CMS) I have begun using `\\(..\\)` instead of `$..$` the former involves six key strokes and the latter involves three. For the display mode the former style involves four keystrokes while the latter involves five. I would like to accomplish that in a single keystroke. What keyboard shortcuts can I set, or is there something I can do within latex? Similarly, is it possible to have one keystroke for `{` ,`}`,`_`,`^` etc? At present I ignore the delimiters when the lecturer is going really fast, and after the lecture have an extremely buggy and ugly tex file which I have to edit. I would like to have as finished a file as possible. Normal sentences do not pose much of a problem, but the math is slowing me down. I would prefer not to download another keyboard though.


title: Beamer & MetaUML - can't see any diagram

text: On compilation, I just see ![enter image description here](http://i.stack.imgur.com/2TLQj.png) Why isn't the class visible? Here is the code:               \documentclass{beamer}     \usepackage[shellescape,latex]{gmp}     \usetheme{Montpellier}     \title{Something}     \date{\today}          \begin{document}          \frame{\titlepage}          \section[Outline]{}     \frame{\tableofcontents}          \section{something}     \subsection{Class Diagram}     \frame     {     \frametitle{Frame 1}         \begin{figure}             \centering             \begin{mpost}[mpsettings=input metauml;]                 Usecase.U("Authenticate user",                 "by name, password");                 drawObject(U);                     \end{mpost}             \caption{Something}         \end{figure}     }     \end{document}


title: Setting the path to textlive installation, round 2

text: It seems like everytime I install textlive distro on one of my computers I have the same problem:               peter@msideb:~$ tlmgr --gui     bash: tlmgr: command not found      The below reflects the current state of my .profile:                   # ~/.profile: executed by the command interpreter for login shells.     # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login     # exists.     # see /usr/share/doc/bash/examples/startup-files for examples.     # the files are located in the bash-doc package.          # the default umask is set in /etc/profile; for setting the umask     # for ssh logins, install and configure the libpam-umask package.     #umask 022          # if running bash     if [ -n "$BASH_VERSION" ]; then         # include .bashrc if it exists         if [ -f "$HOME/.bashrc" ]; then         . "$HOME/.bashrc"         fi     fi          # set PATH so it includes user's private bin if it exists     if [ -d "$HOME/bin" ] ; then         PATH="$HOME/bin:$PATH"     fi          PATH=/home/peter/texlive/2011/bin/i386-linux:/home/peter/bin/:$PATH; export PATH     MANPATH=/home/peter/texlive/2011/texmf/doc/man:$MANPATH; export MANPATH     INFOPATH=/home/peter/texlive/2011/texmf/doc/info:$INFOPATH; export INFOPATH      My system: Deb 6 testing, 32 bit, xfce desktop environment. And yes, I did log off after I edited the .profile file. Yes, I appear to have the .bashrc file:               # ~/.bashrc: executed by bash(1) for non-login shells.     # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)     # for examples          # If not running interactively, don't do anything     [ -z "$PS1" ] && return          # don't put duplicate lines in the history. See bash(1) for more options     # don't overwrite GNU Midnight Commander's setting of `ignorespace'.     HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups     # ... or force ignoredups and ignorespace     HISTCONTROL=ignoreboth          # append to the history file, don't overwrite it     shopt -s histappend          # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)          # check the window size after each command and, if necessary,     # update the values of LINES and COLUMNS.     shopt -s checkwinsize          # make less more friendly for non-text input files, see lesspipe(1)     #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"          # set variable identifying the chroot you work in (used in the prompt below)     if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then         debian_chroot=$(cat /etc/debian_chroot)     fi          # set a fancy prompt (non-color, unless we know we "want" color)     case "$TERM" in         xterm-color) color_prompt=yes;;     esac          # uncomment for a colored prompt, if the terminal has the capability; turned     # off by default to not distract the user: the focus in a terminal window     # should be on the output of commands, not on the prompt     #force_color_prompt=yes          if [ -n "$force_color_prompt" ]; then         if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then         # We have color support; assume it's compliant with Ecma-48         # (ISO/IEC-6429). (Lack of such support is extremely rare, and such         # a case would tend to support setf rather than setaf.)         color_prompt=yes         else         color_prompt=         fi     fi          if [ "$color_prompt" = yes ]; then         PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '     else         PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '     fi     unset color_prompt force_color_prompt          # If this is an xterm set the title to user@host:dir     case "$TERM" in     xterm*|rxvt*)         PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"         ;;     *)         ;;     esac          # enable color support of ls and also add handy aliases     if [ -x /usr/bin/dircolors ]; then         test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"         alias ls='ls --color=auto'         #alias dir='dir --color=auto'         #alias vdir='vdir --color=auto'              #alias grep='grep --color=auto'         #alias fgrep='fgrep --color=auto'         #alias egrep='egrep --color=auto'     fi          # some more ls aliases     #alias ll='ls -l'     #alias la='ls -A'     #alias l='ls -CF'          # Alias definitions.     # You may want to put all your additions into a separate file like     # ~/.bash_aliases, instead of adding them here directly.     # See /usr/share/doc/bash-doc/examples in the bash-doc package.          if [ -f ~/.bash_aliases ]; then         . ~/.bash_aliases     fi          # enable programmable completion features (you don't need to enable     # this, if it's already enabled in /etc/bash.bashrc and /etc/profile     # sources /etc/bash.bashrc).     if [ -f /etc/bash_completion ] && ! shopt -oq posix; then         . /etc/bash_completion     fi


title: Use format [xxxYY] instead of [n] as reference of manual bibliography

text: I'm using:               \begin{thebibliography}{9}     \bibitem{mer04}       N. Meratnia, A. de By       \emph{Spatio-temporal compression techniques for moving objects},       Springer Berlin, Heidelberg,       2004.     \end{thebibliography}      So when printed, the bibliography appear as: > [1] N. Meratnia, A. de By _Spatio-temporal compression techniques for moving > objects_ , Springer Berlin, Heidelberg, 2004. and wherever I get the command `\ref{mer04}`, the reference string `[1]` appears. It's perfect, but my professor prefers the notation `[mer04]` instead of `[1]`, and wants the entire bibliography page ordered alphabetically. How can I do that?


title: How do I get the numbers for theorems, lemmas, examples, etc. before the type?

text: I am using the `article` document class with `amsthm`. I would like number the theorems/corollaries/examples, etc., consecutively as follows: > 1.1 Theorem > > 1.2 Example > > 1.3 Example > > 1.4 Proposition However, what my LaTeX renders is > Theorem 1.1 > > Example 1.2 > > Example 1.3 > > Proposition 1.4 How do I get a numbering as in the first?


title: Suggestion of activities calendar in LaTeX

text: Is there any way to make a kind of activities calendar to put five activities per month in LaTeX, what would you recommend to make it look nice. Something like:               Month      Activities         ---------------------     January   1.               2.               3.     February  1.               2.               3.     ....      I was thinking in               \begin{center}     \begin{table}       \begin{tabular}{|l|c|p{3.5in}|}             \hline             Month      & Activities \\ \hline             January   &  1.  \\\newline &2.  \\\newline &3 \\ \hline             February & 1.  \\\newline &2.  \\\newline &3 \\ \hline            March       & 1.  \\\newline &2.  \\\newline &3 \\ \hline             ~        & ~          \\             \hline         \end{tabular}     \end{table}     \end{center}      Is there a more elegant way to do this, also I am not getting that centered.


title: multirow in a table

text: I have the follwing table               \begin{table}[t]     \center     \footnotesize     \caption{the capt}     \label{thelabel}     \begin{tabular}{ | c | c | } \hline     %\multirow{2}{*}{\textbf{Name}} & \multirow{2}{*}{\textbf{Value}} \\ \hline     \textbf{Name} & \textbf{Value} \\ \hline     \textbf{-} & \textbf{-} \\ \hline     \textit{CoCo} & 23 \\ \hline     \textit{KiKi} & 49 \\ \hline     \end{tabular}          \end{table}      How can I have the cells "Name" and "Value" on two rows by removing the cells containing "-", when I use 1`\multirow{2}{*}{\textbf{Name}} & \multirow{2}{*}{\textbf{Value}}` it doesnt work


title: How do I enable package encxvlna?

text: Encxvlna is a package that inserts non-breaking space into Czech documents. However, it does not seem to work with texlive-2009-11 (the version in Ubuntu Natty). There is a manual describing its usage here: http://www.bakoma- tex.com/doc/generic/encxvlna/encxvlna.pdf . I am using utf8 encoding in my documents (i.e. \usepackage[utf8]{inputenc} ). If I understand the manual correctly, I should modify files in /etc/texmf/fmt.d directory as follows: 10texlive-base.cnf should be               # 10texlive-base.cnf     # You can change/add entries to this file and changes will be preserved     # over upgrades, even if you have removed the main package prior     # (not if you purged it). You should leave the following pseudo comment     # present in the file!     # -_- DebPkgProvidedMaps -_-     #      etex pdftex language.def -translate-file=cp227.tcx *etex.ini     pdfetex pdftex language.def -translate-file=cp227.tcx *pdfetex.ini     luatex luatex language.def luatex.ini     dviluatex luatex language.def dviluatex.ini     pdftex pdftex - -enc cslatex-utf8.ini     mf mf-nowin - -translate-file=cp227.tcx mf.ini     tex tex - tex.ini      10texlive-latex-base.cnf should be               # 10texlive-latex-base.cnf     # You can change/add entries to this file and changes will be preserved     # over upgrades, even if you have removed the main package prior     # (not if you purged it). You should leave the following pseudo comment     # present in the file!     # -_- DebPkgProvidedMaps -_-     #      latex pdftex language.dat -enc cslatex-utf8.ini     dvilualatex luatex language.dat dvilualatex.ini     lualatex luatex language.dat lualatex.ini     pdflatex pdftex language.dat -enc  cslatex-utf8.ini      I am not sure if I need to modify 10texlive-lang-czechoslovak.cnf if I am using babel for Czech support, but it shoud do no harm but:               # 10texlive-lang-czechslovak.cnf     # You can change/add entries to this file and changes will be preserved     # over upgrades, even if you have removed the main package prior     # (not if you purged it). You should leave the following pseudo comment     # present in the file!     # -_- DebPkgProvidedMaps -_-     #      csplain         pdftex         -       -etex -enc csplain-utf8.ini     pdfcsplain      pdftex         -       -etex -enc csplain-utf8.ini     cslatex         pdftex         -       -etex -enc cslatex-utf8.ini     pdfcslatex      pdftex         -       -etex -enc cslatex-utf8.ini      Then, I should apply my changes with:               sudo update-fmtutil     sudo dpkg-reconfigure texlive-base      But then even a minimal document such as this:               \documentclass[12pt,a4paper]{article}     \usepackage[T1]{fontenc}      \usepackage{lmodern}      \usepackage[utf8]{inputenc}     \usepackage[czech]{babel}     \usepackage{encxvlna}      \begin{document}     bla     \end{document}      Triggers following error message:               ! Package encxvlna Error: encTeX of Feb 2003 or later not detected,     (encxvlna) the rest of the package will be ignored.     See the encxvlna package documentation for explanation.     Type H return for immediate help.     ...     l.40 }     % Package error message     This package is implemented by new primitives of encTeX of Feb 2003     but this extension was not detected in your system. You can continue     but all commands of `encxvlna' will be ignored. If your TeX distribution     contains encTeX but does not activate it, you have to create the format     using the -enc switch (e.g. in fmtutils.cnf). If you do not have encTeX     at all, you have to compile it from the source code. You can find     the source code including documentation at     http://math.feld.cvut.cz/olsak/enctex.html      But it is not clear to me what to do with it. According to this mailing-list post, it seems to be broken, but I have no idea how to fix it.


title: How to combine bigdelim and alternate row coloring inside a longtable in LyX?

text: It seems that it's quite a conflict to use some big (multirow) delimiter (bigdelim) and applying alternate row coloring inside a longtable at the same time (using LyX). The following example demonstrates the use of big delimiters, stretched over multiple rows, inside a longtable in LyX.               %% LyX 2.1.0 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \RequirePackage{fix-cm}     \documentclass[12pt,a4paper,english,table, notumble, nofoldmark]{leaflet}     \usepackage{amssymb}     \usepackage{fontspec}     \setlength{\parskip}{\smallskipamount}     \setlength{\parindent}{0pt}     \usepackage{color}     \definecolor{note_fontcolor}{rgb}{0.80078125, 0.80078125, 0.80078125}     \usepackage{array}     \usepackage{longtable}     \usepackage{rotating}     \usepackage{multirow}     \usepackage{fixltx2e}     \usepackage{setspace}     \onehalfspacing     \usepackage[unicode=true,      bookmarks=true,bookmarksnumbered=false,bookmarksopen=true,bookmarksopenlevel=1,      breaklinks=true,pdfborder={0 0 1},backref=false,colorlinks=true]      {hyperref}     \hypersetup{pdftitle={Sport climbing routes in Little Gorge, Pyli, Trikala, Thessaly, Greece},      pdfauthor={Nikos Alexandris},      pdfkeywords={climbing routes, Little Gorge, Pyli, Trikala, Thessaly, Greece}}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \pdfpageheight\paperheight     \pdfpagewidth\paperwidth          \newcommand{\noun}[1]{\textsc{#1}}     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}     %% The greyedout annotation environment     \newenvironment{lyxgreyedout}       {\textcolor{note_fontcolor}\bgroup\ignorespaces}       {\ignorespacesafterend\egroup}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.      \usepackage{etoolbox}      \AtEndPreamble{\usepackage{csquotes}}      \usepackage{fixme}          \@ifundefined{date}{}{\date{}}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     % Needs leaflet.cls     % www.ctan.org/tex-archive/macros/latex/contrib/leaflet/%          % to get "leaflet.cls" working to LyX use the default "article.layout":     %     %   a. copy "leadlet.cls" in the directory where LyX looks for classes (".cls" files)     %   b. copy "article.layout" as "leaflet.layout" in the directory where LyX looks for layouts     %   c. edit the "leaflet.layout" and change the second line     %       from "\DeclareLaTeXClass{article}"     %       to "\DeclareLaTeXClass{leaflet}"     %   d. reconfigure LyX     %     % source: http://www.mail-archive.com/lyx-users@lists.lyx.org/msg52621.html          % class Macros     \CutLine*{3}% Dotted line without scissors     \CutLine*{4}% Dotted line without scissors     %\CutLine{6}%  Dotted line with scissors          % foldmark     \renewcommand*{\foldmarkrule}{.3mm}     \renewcommand*{\foldmarklength}{10mm}               % Colors     \usepackage[table]{xcolor}          % define lightgray     \definecolor{lightgray}{gray}{0.9}               % Tables          % scale tables     \usepackage{graphicx}          % multirows     \usepackage{multirow}     \renewcommand{\multirowsetup}{\centering}          % big delimiters spanning over n rows     \usepackage{bigdelim}          % align table cells     \usepackage{warpcol}          \AtBeginDocument{       \def\labelitemii{\(\blacktriangleright\)}     }          \makeatother          \usepackage{xunicode}     \usepackage{polyglossia}     \setdefaultlanguage{english}     \begin{document}     \noindent \begin{center}     \begin{longtable}[l]{lclll}     \multirow{11}{*}{\begin{turn}{90}     \noun{Roof}     \end{turn}} & \rowcolors{} & Dirty Jobs & 6a+ & \tabularnewline      &  & Dirty Moves & 6a & \tabularnewline      &  & Dirty Moves + Ext. & 7b/c & \tabularnewline      &  & Todo Miente & 6c+ & \tabularnewline      &  & Todo Miente + Ext. & %     \begin{lyxgreyedout}     ?%     \end{lyxgreyedout}     {} & \tabularnewline      &  & Mentholius & 6b & \tabularnewline      &  & Ehenikos & 7a+ & \tabularnewline      &  & Ayahuasca & 7a+ & \tabularnewline      &  & Ergometrix & 7b+ & \tabularnewline      &  & Rockaholic & 7a+ & \tabularnewline      & \ldelim\{{-11}{0.5cm} & Rockaliptic & %     \begin{lyxgreyedout}     ?%     \end{lyxgreyedout}     {} & \tabularnewline     \rowcolor{white} &  &  &  & \tabularnewline     \multirow{14}{*}{\begin{turn}{90}     \noun{Nemesis}     \end{turn}} &  & Project & %     \begin{lyxgreyedout}     ?%     \end{lyxgreyedout}     {} & \tabularnewline      &  & Sex Drive & 7c/+ & \tabularnewline      &  & Iera Exetasis & 7b+/c & 25\tabularnewline      &  & Dizzy Dolls & 7b+/c & 25\tabularnewline      &  & Holy Grail & 7c+%     \begin{lyxgreyedout}     ?%     \end{lyxgreyedout}     {} & 25\tabularnewline      &  & Unforgiven & 7c & 25\tabularnewline      &  & Bushido & 7c+ & 25\tabularnewline      &  & Nemesis & 7c+/8a & 18\tabularnewline      &  & Nemesis Ext. & 8b & 25\tabularnewline      &  & Katana & 8a/+ & 25\tabularnewline      &  & Super Highball & 8a/+ & 25\tabularnewline      &  & Anaconda Var. & 8a & 25\tabularnewline      &  & Anaconda & 7c+/8a & 25\tabularnewline      & \ldelim\{{-14}{0.5cm} & Damoklios Spathi & 7b & \tabularnewline     \end{longtable}     \par\end{center}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ZXXV4.png) Applying alternate row coloring via               \let\oldlongtable\longtable     \let\endoldlongtable\endlongtable     \renewenvironment{longtable}{\rowcolors{2}{white}{lightgray}\oldlongtable} {     \endoldlongtable}      covers the content of multirow cells. ![enter image description here](http://i.stack.imgur.com/p1GEn.png) **Is there an easy way to combine the use of both, bigdelim and rowcolors, inside a longtable?**


title: DIN conform arrowheads and hatching in TikZ?

text: I'm curious how the following simple figure can be recreated with all its characteristics, i.e the DIN correct arrow tips and the hatched areas. I'm very aware of various packages for tikz, where you can specify the arrow tips and fillings, but none of them met my requirements yet. ![enter image description here](http://i.stack.imgur.com/1D4c1.jpg) Please note that this is an economic diagram and therefore has just an illustrative function—no real data points. Furthermore the correct DIN norm of the arrowheads is 5mm in length and 1mm in height.


title: How to escape xml code?

text: How to escape this kind of expression and make in typewritter font? I added `$` dollars to both ends, it did work - warnings dissapear. But text became _italic_ of unknown font and it doesn't jump on next line upon reaching margins, but goes directly to the edge of the page.               $       <context:component-scan base-package=``com.secret.internal.secret'' />      $


title: \quote{} in IEEETrans misaligns following text

text: I'm writing my LaTeX document using the IEEE LaTeX template. I sometimes use the `\quote{some text here}` command to block quote a single paragraph. It tabs the text one to the right. Unfortunately this causes the text below it to also be tabbed one to the right. **How do I stop text below`\quote{}` from being misaligned?**


title: Custom LaTeX Report Class

text: This is my first question and I'm new to LaTeX. I've probably jumped into the deep end here, but I found an interesting class that I want to learn how to use. First of all, I have Tex Live 2011 installed on Ubuntu 11.10. I found this custom class by a user on Reddit: http://pastebin.com/x2UukDaP Through the use of that class, he produced the following: http://media.stochastictechnologies.com/files/sample-letterhead.pdf He graciously uploaded some instructions on how he achieved that result. I have reproduced them here verbatim: >   1. Design the thing in InDesign (not required, you can just use Inkscape > or anything else that gives you an eps). >   2. Get an EPS of all the graphics at the size of the page you need. >   3. Use the fancyhdr package to include it in every page. >   4. Use the textpos package to position it absolutely in the background at > 0,0. >   5. Use the textpos package to position the main text area where you want > it. >   6. Create a macro that will insert a back cover, positioned in the same > way as the regular pages. > Further, the author provided the following code to use the class:               \documentclass{stochastic}          \title{Letterhead test}          \begin{document}     \maketitle          \section{Large headline}     \subsection{Small headline}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis justo lorem.     Nulla sit amet tempus sem.          \begin{verbatim}     def lorem(ipsum):         dolor(sit, amet)     \end{verbatim}          \subsubsection{Δοκιμή}          Ελληνικό κείμενο, για δοκιμή.          \subsubsection{Smaller headline}          Nam aliquet, quam ut fringilla pulvinar, neque          \makelightcover     \makedarkcover     \end{document}      So my question is, given that I'm new to this, (a) which of the packages included in that class are not installed by default (so that I can install them), (b) how do I install his class (or can I just drop it in the same directory as the .tex file?), and (c) is anyone more experienced willing to reproduce the author's PDF result and see whether his instructions work? I think the result if quite nice, so I want to share this and see if I'm missing something fatal before I get in too deep. Original source: Ask me, it won't let me post more than two links.


title: Align plots in pgfplots

text: Can somebody help me? I try to align two plots horizontally in pgfplots! In the preamble I have: **MWE*** * * *               \documentclass[12pt]{article}     \usepackage{pgfplots,subcaption}     \pgfplotsset{ compat=1.7,     dacrip plot/.style={ % Set common styles that can be applied to the axis environment         x=2cm, y=2cm,                   % Unit vector length         axis lines=middle,              % Axis lines go through (0,0)         xtick=\empty, ytick=\empty,     % No tick marks         ymin=0, ymax=1.75,              % Y axis range         enlargelimits=upper,            % Increase upper range a bit         clip=false,                     % Allow labels to extend beyond the axis         disabledatascaling,             % Allow to draw TikZ objects without having to use (axis cs:<x>,<y>)         x label style={anchor=north},   % Alignment of axis labels         y label style={anchor=east},         yticklabel style={align=right}     }     }         \begin{document}          \begin{figure}[!h]\centering     \begin{subfigure}[t]{0.48\textwidth} \centering     \begin{tikzpicture}[baseline]     \begin{axis}[dacrip plot, xlabel=$f$, ylabel=$U$]            \addplot [blue, ultra thick] coordinates {(0,0) (1,1) (2,1) };             \draw [dashed] (0,1) -- (1,1) node [pos=0, anchor=east] {$U_{max}$};        \end{axis}     \end{tikzpicture}     \subcaption{Plot 1}\label{fig:ufMna}     \end{subfigure}     \begin{subfigure}[t]{0.48\textwidth} \centering          \begin{tikzpicture}[baseline]     \begin{axis}[dacrip plot, xlabel=$n$, ylabel=$M$ ]            \addplot [blue, ultra thick] coordinates {(0,1) (1,1)} parabola [bend at end] (2,0.3);        \end{axis};          \end{tikzpicture}     \subcaption{Plot 2}\label{fig:ufMnb}     \end{subfigure}     \caption{2 Plots}     \label{fig:ufMn}     \end{figure}     \end{document}      * * * ![enter image description here](http://i.stack.imgur.com/NzUH4.png) The problem is that the x-axis of Plot 2 is to short. Another problem is that the alignment of the x-axis is there, but the captions of the two plots aren't aligned! * * * ***** Modified from OP's snippet


title: change the rotation in tikz 3d?

text: \documentclass{minimal}     \usepackage{tikz,tikz-3dplot}          \begin{document}       \tdplotsetmaincoords{70}{115}            \begin{tikzpicture}[scale=4,tdplot_main_coords]                   \coordinate (O) at (1,1,1);         \tdplotsetcoord{P}{1.414213}{54.68636}{45}              \draw[fill=gray!50,fill opacity=0.5] (O) -- ($(O) + (Py)$) -- ($(O) + (Pyz)$) -- ($(O) + (Pz)$) -- cycle;         \draw[fill=blue,fill opacity=0.5] (O) -- ($(O) + (Px)$) -- ($(O) + (Pxy)$) -- ($(O) + (Py)$) -- cycle;        \draw[fill=green,fill opacity=0.5] (O) -- ($(O) + (Px)$) -- ($(O) + (Pxz)$) -- ($(O) + (Pz)$) -- cycle;        \draw[fill=yellow,fill opacity=0.5] ($(O) + (Pz)$) -- ($(O) + (Pyz)$) -- ($(O) + (P)$) -- ($(O) + (Pxz)$) -- cycle;         \draw[fill=red,fill opacity=0.5] ($(O) + (Px)$) -- ($(O) + (Pxy)$) -- ($(O) + (P)$) -- ($(O) + (Pxz)$) -- cycle;         \draw[fill=pink,fill opacity=0.5] ($(O) + (Py)$) -- ($(O) + (Pxy)$) -- ($(O) + (P)$) -- ($(O) + (Pyz)$) -- cycle;           \tdplotsetmaincoords{10}{10}%%%%%%%%%%%%this is not changing the rotation since the begin tikzpicture has alread used it once           \coordinate (M) at (3,2,1);         \tdplotsetcoord{P}{1.414213}{54.68636}{45}              \draw[fill=gray!50,fill opacity=0.5] (M) -- ($(M) + (Py)$) -- ($(M) + (Pyz)$) -- ($(M) + (Pz)$) -- cycle;         \draw[fill=blue,fill opacity=0.5] (M) -- ($(M) + (Px)$) -- ($(M) + (Pxy)$) -- ($(M) + (Py)$) -- cycle;        \draw[fill=green,fill opacity=0.5] (M) -- ($(M) + (Px)$) -- ($(M) + (Pxz)$) -- ($(M) + (Pz)$) -- cycle;        \draw[fill=yellow,fill opacity=0.5] ($(M) + (Pz)$) -- ($(M) + (Pyz)$) -- ($(M) + (P)$) -- ($(M) + (Pxz)$) -- cycle;         \draw[fill=red,fill opacity=0.5] ($(M) + (Px)$) -- ($(M) + (Pxy)$) -- ($(M) + (P)$) -- ($(M) + (Pxz)$) -- cycle;         \draw[fill=pink,fill opacity=0.5] ($(M) + (Py)$) -- ($(M) + (Pxy)$) -- ($(M) + (P)$) -- ($(M) + (Pyz)$) -- cycle;     \end{document}      I want both cubes to have different orientations as well as be in the same figure? How can I do this?


title: Defining a new style in xskak

text: I am experimenting with the various styles for displaying `\mainline` chess moves and observed that `\styleC` displays moves as a column of two half-moves per line. Ulrike Fischer informed me that the display width used in `\styleC` is `\linewidth` (which of course it would be unwise to tamper with) and suggested the alternative of creating my own style, call it `\styleD`. Locating `skak.sty` in my MiKTeX2.9 distribution I located one block with one reference and another block with 2 references to `\styleC`, pasted these blocks into the preamble section of my document and renamed the three occurences of `\styleC` to read `\styleD` (not bothering at this stage to change the definition itself). My MWE (or should I call it Minimal Not-Working Example?) thus created won't compile, with error `undefined control sequence \styleD`:               \documentclass[10pt]{article}     \usepackage{xskak}     %following code pasted from xskak.sty with a view to redefining \styleC to my own \styleD (suggested by Ulrike Fischer 20 Feb 13):     \xskaknewstyleitem[%      opencommands={\begin{tabbing}%     \hspace{.2\linewidth}\=\hspace{.2\linewidth}\=%     \hspace{.2\linewidth}\= \kill},      closecommands={\end{tabbing}},      blackopen=\>\ldots,      beforenumber=\>,      beforewhite=\>,      beforeblack=\>,      afterblack=\\]{styleD}     %      \xskaknewstyle[level= 1,styleitem=styleD,font=\bfseries,                    level= 2,styleitem=styleB,                    level= 3,font=\itshape]{styleD}     %end of \typeD definition.     %     \begin{document}     \newchessgame     \styleC     \textbf{styleC}\\     \mainline{1.e4 c5 2.Nf3 Nc6 3.Bc4 Bc5 4.c3 Nf6 5.d3}%      \newchessgame     \styleD     \textbf{styleD}\\     \mainline{1.e4 c5 2.Nf3 Nc6 3.Bc4 Bc5 4.c3 Nf6 5.d3}%      \end{document}      I am doing something wrong, but what is it?


title: Hyperref font selection problem with babel and french

text: How one can change font in the text form?               \documentclass{standalone}          \usepackage{xcolor}     \usepackage[utf8]{inputenc}     \usepackage[T2A]{fontenc}     \usepackage[english,russian,french]{babel}     \usepackage{hyperref}          \begin{document}         \pagestyle{empty}         \begin{Form}             \TextField[bordercolor=white                 ,borderwidth=0                 ,width=2.5in                 ,name=name.1                 ,format={                     var f = this.getField('name.1');                     f.textFont = 'Europe';                     f.userName = 'first name'                 }                 ,value=something                         ,charsize=7pt]{Type:}         \end{Form}     \end{document}      This example is not working. If I open the Adobe Acrobat Pro it says that the forms font is helvetica. If I change `\usepackage[english,russian,french]{babel}` to `\usepackage[english]{babel}` or `\usepackage[russian]{babel}` everything works.


title: Automatically line breaking text, or extending arrows in tikz

text: Is it possible to automatically make the text line break so that it does not overflow into the nodes? An alternative is to have the nodes automatically moved farther away to accommodate the longer text (keeping as much as possible to the way that I am setting up the nodes, I would like to avoid manual coordinate entry as much as possible). While this is sometimes manually possible with the `text width` option, that also has the effect of making the text off center in some cases, and should not be necessary. MWE:               \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{automata,positioning,arrows}     \begin{document}         \begin{tikzpicture}[shorten >=2pt,node distance=4cm,on grid,auto]             \node[state] (Rd) {Ready};             \node[state] (Rn) [above right =of Rd] {Run};             \node[state] (Bl) [below right =of Rd] {Blocked};             \node[state] (Nr) [below right =of Rn] {Dead};             \path[->]             (Rd)    edge  node[sloped, anchor=center, above] {Given a timeslice}     (Rn)             (Rd)    edge  node[sloped, anchor=center, below] {Asks for I/O}          (Bl)             (Rd)    edge  node {Gets killed by kernel} (Nr)             (Bl)    edge  node {Out of memory}         (Nr);         \end{tikzpicture}     \end{document}      Related: Rotate/align text on arrows in tikz **Update:** Example of issues with `text width`. Notice how the center shifts, even though `anchor = center` (`text width = 3cm` and `text width = 2.7cm` were used). ![enter image description here](http://i.stack.imgur.com/UL9xs.jpg)


title: why cant I use style with every draw command in tikz, why can I only set it for the whole picture?

text: \documentclass{minimal}     \usepackage{tikz,tikz-3dplot}          \begin{document}       \tdplotsetmaincoords{70}{115}            \begin{tikzpicture}[scale=4,tdplot_main_coords]                   \coordinate (O) at (1,1,1);         \tdplotsetcoord{P}{1.414213}{54.68636}{45}              \draw[fill=gray!50,fill opacity=0.5] (O) -- ($(O) + (Py)$) -- ($(O) + (Pyz)$) -- ($(O) + (Pz)$) -- cycle;         \draw[fill=blue,fill opacity=0.5] (O) -- ($(O) + (Px)$) -- ($(O) + (Pxy)$) -- ($(O) + (Py)$) -- cycle;        \draw[fill=green,fill opacity=0.5] (O) -- ($(O) + (Px)$) -- ($(O) + (Pxz)$) -- ($(O) + (Pz)$) -- cycle;        \draw[fill=yellow,fill opacity=0.5] ($(O) + (Pz)$) -- ($(O) + (Pyz)$) -- ($(O) + (P)$) -- ($(O) + (Pxz)$) -- cycle;         \draw[fill=red,fill opacity=0.5] ($(O) + (Px)$) -- ($(O) + (Pxy)$) -- ($(O) + (P)$) -- ($(O) + (Pxz)$) -- cycle;         \draw[fill=pink,fill opacity=0.5] ($(O) + (Py)$) -- ($(O) + (Pxy)$) -- ($(O) + (P)$) -- ($(O) + (Pyz)$) -- cycle;           \tdplotsetmaincoords{10}{10}%%%%%%%%%%%%this is not changing the rotation since the begin tikzpicture has alread used it once           \coordinate (M) at (3,2,1);         \tdplotsetcoord{P}{1.414213}{54.68636}{45}              \draw[fill=gray!50,fill opacity=0.5] (M) -- ($(M) + (Py)$) -- ($(M) + (Pyz)$) -- ($(M) + (Pz)$) -- cycle;         \draw[fill=blue,fill opacity=0.5] (M) -- ($(M) + (Px)$) -- ($(M) + (Pxy)$) -- ($(M) + (Py)$) -- cycle;        \draw[fill=green,fill opacity=0.5] (M) -- ($(M) + (Px)$) -- ($(M) + (Pxz)$) -- ($(M) + (Pz)$) -- cycle;        \draw[fill=yellow,fill opacity=0.5] ($(M) + (Pz)$) -- ($(M) + (Pyz)$) -- ($(M) + (P)$) -- ($(M) + (Pxz)$) -- cycle;         \draw[fill=red,fill opacity=0.5] ($(M) + (Px)$) -- ($(M) + (Pxy)$) -- ($(M) + (P)$) -- ($(M) + (Pxz)$) -- cycle;         \draw[fill=pink,fill opacity=0.5] ($(M) + (Py)$) -- ($(M) + (Pxy)$) -- ($(M) + (P)$) -- ($(M) + (Pyz)$) -- cycle;     \end{document}      according to http://latex-community.org/tikz-3dplot_example.pdf instead of                     \tdplotsetmaincoords{70}{115}            \begin{tikzpicture}[scale=4,tdplot_main_coords]      I can do                     \tdplotsetmaincoords{70}{115}            \draw[fill=gray!50,fill opacity=0.5,tdplot_main_coords] (O) -- ($(O) + (Py)$) -- ($(O) + (Pyz)$) -- ($(O) + (Pz)$) -- cycle;%inlcude the style for every draw separately.      Why might this not be working in my case? I want to do this so that I can change the style per `\draw` command. * * * The problem seems to be with `\tdplotsetcoord{P}{1.414213}{54.68636}{45}` even if I use the `tdplot_main_coords` style `\draw[fill=gray!50,fill opacity=0.5,tdplot_main_coords]` the position of P, Px...etc is returned same as to when the style is not used How to counter this?


title: "direct" quotations and "entire paragraph" quotations

text: I need two types of citations which I have not figured out how to define: (see highlighted in grey) > 1) As Owens stated (2008, p.97), `‘the value of...’` > > 2) Simone de Beauvoir (1972, p.365) examined her own past and wrote rather > gloomily: >   >   >     The past is not a peaceful landscape lying there behind me, a country in > which I >     can stroll wherever I please, and will gradually show me all its secret > hills and >     dates. As I was moving forward, so it was crumbling. >   I am confused about how to use `\begin{quotation}` or similar machineries (`quote`|`quotation`|`verse`|etc.) to define quotes/quotations, etc. I use `natbib` (this might be irrelevant). I would normally define a quote as `\begin{quote}...\end{quote}` but I find the lack of _association_ between the quoted text and the actual bibliographic reference strange. I don't know how to format a simple, in-text, quotation other than `blah' for single smart quotes and ``blah'' for double smart quotes. Again, the fact that I am putting a "quote object" inside some flowing text and I am not associating it, even in a hidden way, with the bibliography database sounds strange to me. I would find this more natural: `\shortquote[BibTeX:Reference][singlesmart]{Aha!}`, or something to that effect. Any help would be greatly appreciated.


title: Aligning the Left Hand Side of a big equation with fraction

text: After spending quite some time making sure this wasn't already answered, I decided to post this anyway, as I haven't found what I'm looking for. I have this equation with nested fractions, and I want the Left Hand Side to be centered with respect to the Right Hand Side. It now appears at the hard left corner, I want it to be in the middle. See the picture below for an example.               \documentclass[]{Article}     \usepackage{amssymb,amsmath}      \begin{document}          \begin{math}          \ C(m) =  \cfrac{D_1(K_1+mK_2)}{1- \cfrac{1}{ \left(  \cfrac{D_1+D_2}{D_2} \right) ^{m+1}- \cfrac{D_1}{D_2}}}     \end{math}          \end{document}      ![example](http://i.stack.imgur.com/nC2ZC.png)


title: Diereses (German Umlauts) in math?

text: Is it possible to enter Umlauts directly in math? I would like to do something like the following (using XeLaTex):               \documentclass{article}     \usepackage{amsmath}     \usepackage[silent,no-math]{fontspec}          \usepackage{unicode-math}     \setmathfont[math-style=TeX]{XITS Math}               \begin{document}          \begin{align*}     äöüÄÜÖ     \end{align*}          \end{document}      I know that I can also use `\ddot{a}`, but I would like my source file to be easily readable; and besides, things like `\ddot{a}_j^i` give bad positioning of the dots. Any help would be appreciated. Clarification: In my case, e.g. `ü` is not the second derivative of `u`, but rather it is a symbol representing _Überschüsse_ (german for: surplus / excess). In the context of the document, confusion with the second derivative is unlikely.


title: No room for a new \read/\write

text: I've already searched a lot about it and there seems to be no possible way of increasing the number of files (La)TeX can open. This for example, gives an explanation about the error message. I've also seen some solutions for this problem, but all were specifically for graphics instead of files. So basically, I want to open several files, currently in total possibly more than 16 (which is the current limit), and together with some packages that also use some slots. There should be at least 2 possible solutions for me:   1. Increase the amount of files that can be opened at the same time. This however is an inefficient way of doing things.   2. Closing and removing the file completely out of the register. I noticed that using the command `\closein` or `\closeout` does not free up space in the register. Opening a new one will still fill the next slot instead of overwriting the closed ones. For me, a max of 2 files are open at once. (I use the package `datatool` though, that possibly uses at least one slot too) If anyone has an idea how to implement one of these solutions? * * * EDIT: Also, the first source mentioned something about e-TeX, Omega and LuaTeX. What are those and how do they help? I tried searching for them too, but I don't seem to understand if they are extensions of TeX or whole new languages. Someone also mentioned something about ConTeXt which seems to be an editor instead of language, according to Google, for Java and C++ etc.


title: showlabels: wrap labels in marginpar

text: I use the `showlabels` package to highlight labels, references and citations. It appears that, by default, `showlabels` cannot wrap the keys in the marginpar. If I have a series of citations in one line, only one or two keys are shown and the rest disappears. Is it possible to force the wrapping of keys in the marginpar? MWE:               \documentclass{article}          % \usepackage{showkeys}          \usepackage{showlabels}     \showlabels{cite}          \usepackage{filecontents}     \usepackage[         style=alphabetic,         sorting=nyt,         firstinits=true,         backend=biber     ]{biblatex}          \begin{filecontents}{references.bib}       @report{example1,         author={{Archibald Author}},         title={Archies first report}         }       @report{example2,         author={{Archibald Author}},         sortname={Author, Archibald},         title={Archies second report}         }       @report{example3,         author={Archibald Author},         sortname={Author, Archibald},         title={Archies third report}         }       @report{example4,         author={Buthor, Baltasar},         title={Balties report}         }       @report{example5,         author={Cuthor, Charlie},         title={Charlies report}         }     \end{filecontents}     \bibliography{references.bib}          \begin{document}       \cite{example1,example2,example3,example4,example5}       \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/y6t0h.png)


title: How to remove the trailing escape character in an argument?

text: \documentclass{article}     \usepackage{pstricks-add}     \usepackage{fp}          \def\newconst#1#2{%         \expandafter\FPeval\csname#1\endcsname{#2}%         \pstVerb{/#1 \csname#1\endcsname\space def}%     }               \begin{document}          % I want to define a macro that can only be invoked as below     %\newconst\speed{3*10^8}          % rather than     \newconst{speed}{3*10^8}          \end{document}      If I do as follows, then I have to remove the trailing `\` in `#1` before appending it to `\pstVerb{/`. How to do this?               \documentclass{article}     \usepackage{pstricks-add}     \usepackage{fp}          \def\newconst#1#2{%         \FPeval#1{#2}%         \pstVerb{/#1%<==== we must remove the trailing escape character \ in #1.          #1\space def}%     }               \begin{document}          % I want to invoke     %\newconst\speed{3*10^8}          % instead of     \newconst{speed}{3*10^8}          \end{document}


title: Bent paths via relative point from node to node

text: I'm trying to draw a network flow diagram in tikz, and am having some problems. Here is what I have so far: ![Current diagram](http://i.stack.imgur.com/h4l5x.png) However I'm having 2 problems with it currently. First of all, for some reason, arrow appear at _both ends_ of my lines if I specify an anchor of my source node. If you look carefully at the picture, you can see some arcs have arrows at both ends. All arcs should be point left to right only. For example `(h1) edge [bend left=15] (1_1)` will give an arrow only at the end, as I expect; however `(h1.east) edge [bend left=15] (1_1)` will put an arrow on both sides. The second problem is that I need additional arcs that are longer and should avoid the existing arcs and nodes. Like this: ![Extra arcs](http://i.stack.imgur.com/nc82p.png) Here is my code so far:               \begin{tikzpicture}         \node [pattern=north east lines, circle, draw, inner sep=0.25cm] at (0,0) (h1);              \node [circle, draw, inner sep=0.075cm, fill=blue,  fill opacity=0.33, text opacity=1] at (1.5,1.5) (1_1) { 1:1 };         \node [circle, draw, inner sep=0.075cm, fill=green, fill opacity=0.33, text opacity=1] at (1.5,0) (2_1) { 2:1 };         \node [circle, draw, inner sep=0.075cm, fill=red,   fill opacity=0.33, text opacity=1] at (1.5,-1.5) (3_1) { 3:1 };              \node [pattern=north east lines, circle, draw, inner sep=0.25cm] at (3,0) (h2);              \node [circle, draw, inner sep=0.075cm, fill=orange, fill opacity=0.33, text opacity=1] at (4.5,0.75) (4_1) { 4:1 };         \node [circle, draw, inner sep=0.075cm, fill=orange, fill opacity=0.33, text opacity=1] at (6.0,0.75) (4_2) { 4:2 };         \node [circle, draw, inner sep=0.075cm, fill=purple, fill opacity=0.33, text opacity=1] at (4.5,-0.75) (5_1) { 5:1 };         \node [circle, draw, inner sep=0.075cm, fill=purple, fill opacity=0.33, text opacity=1] at (6.0,-0.75) (5_2) { 5:2 };              \node [pattern=north east lines, circle, draw, inner sep=0.25cm] at (7.5,0) (h3);              \node [circle, draw, inner sep=0.075cm, fill=teal,  fill opacity=0.33, text opacity=1] at (9.0,0.75) (6_1) { 6:1 };         \node [circle, draw, inner sep=0.075cm, fill=teal,  fill opacity=0.33, text opacity=1] at (10.5,0.75) (6_2) { 6:2 };         \node [circle, draw, inner sep=0.075cm, fill=olive, fill opacity=0.33, text opacity=1] at (9.75,-0.75) (7_1) { 7:1 };              \node [pattern=north east lines, circle, draw, inner sep=0.25cm] at (12,0)   (h4);         \node [pattern=north east lines, circle, draw, inner sep=0.25cm] at (13.5,0) (h5);              \draw [->] (0.333,-2.5) -- (13.3335,-2.5) node [midway, below] {Time};              \path [line, ->] (h1) edge [bend left=15] (1_1);         \path [line, ->] (h1) edge (2_1);         \path [line, ->] (h1) edge [bend right=15] (3_1);         \path [line, ->] (1_1) edge [bend left=15] (h2);         \path [line, ->] (2_1) edge (h2);         \path [line, ->] (3_1) edge [bend right=15] (h2);         \path [line, ->] (h2.20) edge [bend left=15] (4_1);         \path [line, ->] (h2.-20) edge [bend right=15] (5_1);         \path [line, ->] (4_1) -- (4_2);         \path [line, ->] (5_1) -- (5_2);         \path [line, ->] (4_2) edge [bend left=15] (h3.160);         \path [line, ->] (5_2) edge [bend right=15] (h3.200);         \path [line, ->] (h3) edge [bend left=15] (6_1);         \path [line, ->] (h3) edge [bend right=15] (7_1);         \path [line, ->] (6_1) -- (6_2);         \path [line, ->] (6_2) edge [bend left=15] (h4);         \path [line, ->] (7_1) edge [bend right=15] (h4);         \path [line, ->] (h4) -- (h5);              \path [line, ->] (h2.60) edge [bend left=60] (4_2.north west);         \path [line, ->] (h2.-60) edge [bend right=60] (5_2.south west);         \path [line, ->] (4_1.north east) edge [bend left=60] (h3.120);         \path [line, ->] (5_1.south east) edge [bend right=60] (h3.240);         \path [line, ->] (h3.0) edge [bend right=15] (6_2.south west);         \path [line, ->] (6_1.south east) edge [bend right=15] (h4.180);              \path [line, ->] (4_1) -- (5_2);         \path [line, ->] (5_1) -- (4_2);              \draw [decorate, decoration={brace, amplitude=8pt, raise=8pt}] (0.2, 2)  -- (2.8, 2)  node [midway, above, yshift=0.5cm] {Day 1};         \draw [decorate, decoration={brace, amplitude=8pt, raise=8pt}] (3.2, 2)  -- (7.3, 2)  node [midway, above, yshift=0.5cm] {Day 2};         \draw [decorate, decoration={brace, amplitude=8pt, raise=8pt}] (7.7, 2)  -- (11.8, 2) node [midway, above, yshift=0.5cm] {Day 3};         \draw [decorate, decoration={brace, amplitude=8pt, raise=8pt}] (12.2, 2) -- (13.3, 2) node [midway, above, yshift=0.5cm] {Day 4};     \end{tikzpicture}


title: Newton finite differences with Tikz

text: I am trying to picture Newton's finite differences method with a Tikz tree. Unfortunately, a few nodes are doubled. Is the approach wrong or is there a solution?               \documentclass{article}     \usepackage{tikz}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{0pt}%          \tikzset{root/.style={align=center,draw=none},level 2/.style={align=center,left=1.5cm}}          \begin{document}     \begin{tikzpicture}[grow=left,     level 1/.style={sibling distance=15mm},edge from parent/.style={<-,draw},>=latex]          \node[root] {$\delta_{[x_0,x_1,x_2,x_3]}$}          child {node[level 2] (c1) {$\delta_{[x_0,x_1,x_2]}$}                child {node[level 2] (c11) {$\delta_{[x_0,x_1]}$}                      child {node[level 2] (c111) {$\delta_{[x_0]}$}}                      child {node[level 2] (c112) {$\delta_{[x_1]}$}}                  }            child {node[level 2] (c12) {$\delta_{[x_1,x_2]}$}                  }            }      child {node[level 2] (c2) {$\delta_{[x_1,x_2,x_3]}$}            child {node[level 2] (c21) {$\delta_{[x_1,x_2]}$}}            child {node[level 2] (c22) {$\delta_{[x_2,x_3]}$}                  child {node[level 2] (c221) {$\delta_{[x_2]}$}}                  child {node[level 2] (c222) {$\delta_{[x_3]}$}}                  }            };     \end{tikzpicture}     \end{document}      For instance, nodes c12 and c21 are identical. I want to keep them both without drawing one of them. ![enter image description here](http://i.stack.imgur.com/alzWR.png)


title: Abstracts in different languages on the same page

text: How to place 3 abstracts (English, French and Arabic) on on the same page? I tried to put them in a single page, but it does not work :               \documentclass[12pt,a4paper]{report}     \usepackage[Bjornstrup]{fncychap}     \usepackage[utf8]{inputenc}     \usepackage{arabtex}     \begin{document}      \begin{abstract}        %abstract in french      \end{abstract}     \renewcommand{\abstractname}{Abstract}     \begin{abstract}        %abstract in english      \end{abstract}     \renewcommand{\abstractname}{ملخص}     \begin{abstract}        %abstract in arabic      \end{abstract}     \end{document}


title: Space between text area and footer area

text: How to control the vertical space between the text area and the footer area? If I change the value of `\textheight` the footer comes together. If I change the value of `bottom` using `geometry` package, the footer is always exactly below the last line of the text. Even if I use the `includefoot` option. I know that the space between the header and the text area is controllable. Why is not possible to do the same with the footer? For example, how to always keep (without overfull) a vertical space of 4cm between the last line and the footer?


title: Why is this CSV form letter code incompatible with the table of contents in ConTeXt?

text: Using the code in the answer to How to create form letters from spreadsheet data in ConTeXt?, I am building a document from data in a CSV file. I found that some part of the code is incompatible with chapter titles, such that, if I add a table of contents using `\completecontent` or add headers using `\getmarkings{chapter}`, it will not compile.               % macros=mkvi          \unprotect     \startluacode       local datasets = { }            local buffersraw   = buffers.raw       local context      = context       local ioloaddata   = io.loaddata       local lpegmatch    = lpeg.match       local stringformat = string.format       local stringmatch  = string.match       local stringsub    = string.sub       local tableconcat  = table.concat       local tableswapped = table.swapped            local die = function (msg) print(msg or "ERROR") os.exit(1) end            local csv_parser       do         --- This is (more than) an RFC 4180 parser.         --- http://tools.ietf.org/html/rfc4180         local C, Cg, Cs, Ct, P, S, V             = lpeg.C, lpeg.Cg, lpeg.Cs, lpeg.Ct, lpeg.P, lpeg.S, lpeg.V              local backslash = P[[\letterbackslash]]         local comma     = ","         local dquote    = P[["]]         local eol       = S"\n\r"^1         local noquote   = 1 - dquote         local unescape  = function (s) return stringsub(s, 2) end         csv_parser = P{           "file",           file    = Ct((V"header" * eol)^-1 * V"records"),           header  = Cg(Ct(V"name" * (comma * V"name")^0), "header"),           records = V"record" * (eol * V"record")^0 * eol^0,           record  = Ct(V"field" * (comma * V"field")^0),           name    = V"field",           field   = V"escaped" + V"non_escaped",           --- Deviate from rfc: the “textdata” terminal was defined only           --- for 7bit ASCII. Also, any character may occur in a quoted           --- field as long as it is escaped with a backslash. (\TEX\           --- macros start with two backslashes.)           escaped     = dquote                       * Cs(((backslash * 1 / unescape) + noquote)^0)                       * dquote                       ,           non_escaped = C((1 - dquote - eol - comma)^0),         }       end            local process = function (id, raw)         --- buffers may have trailing EOLs         raw = stringmatch(raw, "^[\n\r]*(.-)[\n\r]*$")         local data = lpegmatch(csv_parser, raw)         --- map column name -> column nr         data.header = tableswapped(data.header)         datasets[id] = data       end            --- escaping hell ahead, please ignore.       local s_item = [[       \bgroup         \string\def\string\insert{\string\getvalue{csv_insert_field}{%s}{%s}}%%     %s%% template       \egroup     ]]            local typeset = function (id, template)         local data   = datasets[id] or die("ERROR unknown dataset: " .. id)         template     = stringmatch(buffersraw(template), "^[\n\r]*(.-)[\n\r]*$")         local result = { }         local last = \letterhash data         for i=1, last do           result[i] = stringformat(s_item, id, i, template)         end         context(tableconcat(result))       end            local insert = function (id, n, field)         local this = datasets[id]         context(this[n][this.header[field]])       end            commands.process_csv      = process       commands.process_csv_file = function (id, fname)         process(id, ioloaddata(fname, true))       end       commands.typeset_csv_job  = typeset       commands.insert_csv_field = insert          \stopluacode          \startinterface all       \setinterfaceconstant{template}{template}       \setinterfaceconstant    {data}{data}     \stopinterface          \def\processcsvbuffer[#id][#buf]{%       \ctxcommand{process_csv([[#id]], buffers.raw(\!!bs#buf\!!es))}%     }          \def\processcsvfile[#id][#filename]{%       \ctxcommand{process_csv_file([[#id]], \!!bs\detokenize{#filename}\!!es)}%     }          %% modeled after \startbuffer     \setuvalue{\e!start csvtemplate}{%       \begingroup       \obeylines       \dosingleempty\csv_template_start%     }          \def\csv_template_start[#id]{%       \buff_start_indeed{}{#id}{\e!start csvtemplate}{\e!stop csvtemplate}%     }          \installnamespace                  {csvjob}     \installcommandhandler \????csvjob {csvjob} \????csvjob          \appendtoks       \setuevalue{\currentcsvjob}{\csv_job_direct[\currentcsvjob]}     \to \everydefinecsvjob          \unexpanded\def\csv_job_direct[#id]{%       \edef\currentcsvjob{#id}%       \dosingleempty\csv_job_indeed%     }          \def\csv_job_indeed[#setups]{%       \iffirstargument\setupcurrentcsvjob[#setups]\fi       \ctxcommand{typeset_csv_job(                     [[\csvjobparameter\c!data]],                     [[\csvjobparameter\c!template]])}%     }          \def\csv_insert_field#id#n[#field]{%       \ctxcommand{insert_csv_field([[#id]], #n, [[#field]])}%     }          \protect          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%                               demo     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %% Stepwise instructions.     %% step 1: Define template.     \startcsvtemplate [tpl]     \chapter{\insert[Name]}          You owe \insert[Amount]. Please send it before \insert[Date].     \par     \stopcsvtemplate          %% step 2: Define an input (CSV).     \startbuffer[csdata]     Name,Amount,Date     "Mr. White","\\letterdollar 300","Dec. 2, 1911"     "Mr. Brown","\\letterdollar 300","Dec. 3, 1911"     "Ms. Premise","\\letterdollar 42","Dec. 4, 1911"     "Ms. Conclusion","\\letterdollar 23","Dec. 5, 1911"     \stopbuffer          %% step 3: Parse and store the input.     \processcsvbuffer[one][csdata]     %\processcsvfile[two][test.csv]          %% step 4: Declare a job, joining dataset and template.     \definecsvjob [testing] [       data=one,       template=tpl,     ]          %% step 5: Enjoy!     \starttext        \completecontent       \testing     \stoptext      The above example contains a table of contents, but it will not compile. If I delete `\completecontent`, the document compiles fine. How can I add a table of contents and headers to my document when it is built from this CSV form letter code?


title: using macro to simplify the code

text: I got my code working with net and SO help. But now I want to simplify it using macro. I dont know macro, but people says it makes code more simplified. can some one guide me to have macro for this. How to use it define?               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{hyperref}     \usepackage[a4paper, total={6in, 8in}]{geometry}     \setlength\parindent{0pt}     \usepackage{xcolor}     \usepackage{setspace}     \begin{document}          \colorbox{black}{\makebox[\dimexpr\linewidth-2\fboxsep]{\color{white}\textbf {User schema}}}          \[       \text{Users} \left\{ \begin{tabular}{@{}p{.8\linewidth}@{}}         \textbf{ID}:  \textcolor{red}{ObjectId} -- Id do registro \\         \textbf{Name}: \textcolor{red}{String} -- Name co usuario \\         \textbf{date}: \textcolor{red}{Date} -- Date de Cadastro \\         \textbf{ren\_date}: \textcolor{red}{Date} -- Data de \\         \textbf{email}: \parbox[t]{.9\linewidth}{\raggedright\textcolor{red}{String} -- Lorem ipsum dolorsitamet, consecteturadipisicingelit, sed do            eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minimveniam, exercitationullamcolaborisnisi ut            aliquipexeacommodoconsequat. Duisautereprehenderit in voluptatevelit esse cillumdolore eu fugiatnullapariatur. Occaecatcupidatat            non proident, sunt in culpa quiofficiadeseruntmollit.\strut} \\         \textbf{accesslog}: \textcolor{red}{Array} \begin{tabular}[t]{@{\ }|l@{}}           \strut \\[-\normalbaselineskip]           $\left\{\begin{tabular}{p{.7\linewidth}}              \textbf{date}: \textcolor{red}{string} Data -- da ocorrncia. \\              \textbf{user}: \textcolor{red}{ObjectId} -- que executou. \\              \textbf{action}: \textcolor{red}{String} --  Aço Executada. \\            \end{tabular}\right.\kern-\nulldelimiterspace$ \\           $\left\{\begin{tabular}{p{.7\linewidth}}              \textbf{date}: \textcolor{red}{string} Data -- da ocorrncia. \\              \textbf{user}: \textcolor{red}{ObjectId} -- que executou. \\              \textbf{action}: \textcolor{red}{String} -- Aço Executada. \\            \end{tabular}\right.\kern-\nulldelimiterspace$         \end{tabular}              \\     \textcolor{blue} {\hyperlink{page.2}{\textbf {group\_id : }}} \textcolor{red}{ ObjectId } - Id do  grupo.             \end{tabular}\right.\kern-\nulldelimiterspace     \]


title: What parameter is available to remove the thin border around \ncput*?

text: The objective is to make the background color of the box containing the label transparent.               \documentclass[pstricks]{standalone}     \usepackage{pst-eucl}          \begin{document}     \begin{pspicture}[showgrid=false](4,4)         \pstGeonode[PosAngle={90}]             (1,1){A}             (3,3){B}         \ncarc[arcangle=-30,linestyle=dashed,linecolor=gray]{A}{B}       \ncput*[nrot=:0]{$2\sqrt2$}        \end{pspicture}     \end{document}      I use `-transparent white` when invoking ImageMagick's `convert`. Unfortunately there is still a thin yet visible border around the box as follows. Is there any option to remove such an unwanted border? > ![enter image description here](http://i.stack.imgur.com/ky6lF.png) This question is my attempt to solve my other question here.


title: Automatic long word breaking in whole document

text: In my document some of long words are not automatically broken at the end of the line. Is there a way to fix that?


title: Are (La)TeX macro/command names restricted to ASCII code characters (letters)?

text: Perhaps this question has been asked already, but my search efforts were unsuccessful. Is it necessary to have ASCII characters (i.e. letters basically [a..z,A..Z], special characters such as `\\(` etc are not important for this question) for a macro name or is it possible to say, e.g. with cyrillic letters               \я      or with any other alphabet not being the (western) Latin Alphabet? This is somehow connected to input encoding, but on the other hand it is not connected to it, since I am not interested what (La)TeX generates of ordinary words entered in another alphabet/encoding, say **я не понимаю** , generating the corresponding output using the correct font. How's the situation with LaTeX 3, or ConTeXt, Xe/LuaLaTeX?