title: How do I automate writing list of symbols in my masters thesis?

text: I'm using `documentclass{article}`. I have symbols, both in inline text and inside equations. How can I automate the process of listing them?


title: moderncv: unwanted punctuation

text: I am trying to prepare my resume using LaTeX but everytime after I compile I see an unnecessary '.' after the sentence. The code snippet looks like this:               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % "ModernCV" CV and Cover Letter     % LaTeX Template     % Version 1.1 (9/12/12)     %     % This template has been downloaded from:     % http://www.LaTeXTemplates.com     %     % Original author:     % Xavier Danaux (xdanaux@gmail.com)     %     % License:     % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)     %     % Important note:     % This template requires the moderncv.cls and .sty files to be in the same      % directory as this .tex file. These files provide the resume style and themes      % used for structuring the document.     %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %----------------------------------------------------------------------------------------     %   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS     %----------------------------------------------------------------------------------------          \documentclass[10pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman          \moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'     \moderncvcolor{black} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'          \usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template     \usepackage[german]{babel}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}          \usepackage[scale=0.85]{geometry} % Reduce document margins     %\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column     %\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name          %----------------------------------------------------------------------------------------     %   NAME AND CONTACT INFORMATION SECTION     %----------------------------------------------------------------------------------------          \firstname{Dilip} % Your first name     \familyname{Rachuri} % Your last name          % All information in this block is optional, comment out any lines you don't need     \title{Lebenslauf}     \address{xx}{xxxx, xx}     \mobile{(xx) xx}     \email{xx.xxx}          %\homepage{staff.org.edu/~jsmith}{staff.org.edu/$\sim$jsmith} % The first argument is the url for the clickable link, the second argument is the url displayed in the template - this allows special characters to be displayed such as the tilde in this example          \photo[70pt][0.4pt]{pictures/picture} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)     %\quote{"A witty and playful quotation" - John Smith}          %----------------------------------------------------------------------------------------          \begin{document}          \makecvtitle % Print the CV title          %----------------------------------------------------------------------------------------     %   EDUCATION SECTION     %----------------------------------------------------------------------------------------     \section{Angaben zur Person}     \medskip     \cventry{Name}{xxx}{}{}{\textit{}}{}  % Arguments not required can be left empty     \cventry{Adresse}{xxx}{xx, xx}{}{\textit{}}{}  % Arguments not required can be left empty     \cventry{Telefon}{xx-xx}{}{}{\textit{}}{}  % Arguments not required can be left empty     \cventry{E-Mail}{xx.xx@xx.com}{}{}{\textit{}}{}  % Arguments not required can be left empty     \cventry{Staatsh\"origskeit}{xx}{}{}{\textit{}}{}  % Arguments not required can be left empty     \cventry{Geburtsdatum}{x xx}{}{}{\textit{}}{}  % Arguments not required can be left empty     \cventry{Geschlecht}{xx}{}{}{\textit{}}{}  % Arguments not required can be left empty     \cventry{Gew\"unschtes Berufsfeld}{Ingenieur}{}{}{\textit{}}{}  % Arguments not required can be left empty     \end{document}      The failure can be replicated if the same code above is compiled. Can someone help me? Thank You Dilip


title: Creating a LaTeX Template which is filled by a script

text: I have create some sort of Template I'm using for my reports. The Data shown in those document is collected by a script running on a webserver. I was wondering if there is an appropriate method for creating the whole reports via scripting. My first intention was to simply replace strings withing the `.tex`file but this seems to be a very dirty method. I'm considering writing my own tool which should be capable of setting some sort of variables within the `.tex` file. Maybe in combination with a package created for this purpose. The final goal would be, to run everything as a web- service giving you the ability to simply download the finished report. Are there any Tools which are already doing this?


title: How to draw a small brace in tikz?

text: I'm trying to draw a small brace. For example the latex code is like this:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.pathreplacing}     \begin{document}     \begin{tikzpicture}         \draw[decorate,decoration={brace,mirror}] (0,0) -- (0,0.1);     \end{tikzpicture}     \end{document}      but all I got is like this(after zoomed in): ![enter image description here](http://i.stack.imgur.com/mww9b.png) How can I deal with it?


title: How to increase the size of first character in a chapter (Drop-Caps)

text: I would like to know how I can increase the size of the first alphabet of first paragraph of a chapter using (Xe/La/?)tex. Please look at the image shown below. ![Image related to question](http://i.stack.imgur.com/To5SI.jpg)   1. What is such an effect called? How do I achieve it using Latex?   2. Are there any special fonts to be used for this purpose that contain ornamental/decorative alphabet faces? Or can it be achieved by some manipulation of existing alphabet glyphs?   3. I am not a designer. I know this site is focused on Tex and not typography but I'd appreciate any pointers to popular typeface combinations for this purpose with popular text faces. E.g. If I am using Adobe Garamond Pro as my text face, what would be a suitable type to use for such a first-alphabet-decoration?   4. And finally _(this question may tantamount to heresy here)_ : Is there a way to do this in Microsoft Word / OpenOffice?


title: Packages for documenting self written packages (sty-files)

text: I am looking for packages useful for creating a documentation for a self written package. I have found `doc`, but the documentation `ltxdoc.pdf` did not give me any useful example. Also I know of `docstrip`, but reading `dtxtut.pdf` was mostly scary for me. Preceding the whole documenting code with comments is not what I am looking for. (I know emacs has a special setup for `docstrip`, but I do not consider to switch to emacs) I know that many packages are documented in different classes/templates. If some of them should be packaged and documented I would like to know about them.


title: package quotchap vertical space before \chapter*

text: I use the package `quotchap` it is very nice. But for the star chapters, if I use quotation, there is no space between quotation and the title of the chapter. I tried, but witout any success, to add `\vspace` or `\bigskip` or `minipage`, but nothing works. Do you have any idea? here a file               \documentclass[a4paper,12pt]{book}     \usepackage{natbib}%authoryear[round]     \usepackage[utf8]{inputenc} % Pour utiliser les lettres accentues     \usepackage[T1]{fontenc}     \usepackage[francais]{babel}     \usepackage[grey]{quotchap}     \usepackage{lipsum}     \begin{document}          \begin{savequote}[8cm]     Oh          le ciel est gris          il fait pas beau     \medskip          Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pou     \end{savequote}            \chapter*{Introduction\markboth{INTRODUCTION}{INTRODUCTION}}       \lipsum          \end{document}      thanks a lot!


title: Breaking a theorem between pages

text: I currently have this custom `myexample` theorem environment that is working absolutely great.               \newtheoremstyle{myexamplestyle}{}{}{}{}{\bfseries}{.}{ }{}     \theoremstyle{myexamplestyle}\newtheorem{myexample}{Example}      However, can you please help me enhance this environment such that if it splits between two pages, then an **"Example 1 (Cont.)"** shows up on the next page? The "Example 1 (Cont.)" should appear on its own non-indented line/paragraph on the next page, followed by the continuation of the example on the next line. (That continuation may or may not be a new "paragraph", depending on whether a new paragraph is starting on the next page, or whether a paragraph from the previous page is being continued on the next page. In other words, the solution should support both cases.) This should of course not affect anything else, including my other custom theorem environments and styles. * * * The purpose of this is that without something like this, the new paragraph on the next page doesn't look like it's a part of the example.               \documentclass{article}          \usepackage{amsthm}     \newtheoremstyle{myexamplestyle}{}{}{}{}{\bfseries}{.}{ }{}     \theoremstyle{myexamplestyle}\newtheorem*{myexample}{Example}          \usepackage{lipsum}          \begin{document}          \lipsum[1-8]     Some more text for custom adjustment. Some more text for custom adjustment. Some more text for custom adjustment. Some more text for custom adjustment. Some more text for custom adjustment. Some more text for custom adjustment. Some more text for custom adjustment. Some more text for custom adjustment.           \begin{myexample}       \lipsum[4-5]       A new paragraph. Is it clear that this is a part of the example?       \lipsum[6]     \end{myexample}          Isn't the space above this paragraph somewhat confusing? The reader now has     to go back to the last page, and compare spacing, in order to finally realize     that the above paragraph was (probably) a part of the example.          \lipsum[6]          \end{document}      Here is the result (even though you can't really read the text): ![result](http://i.stack.imgur.com/ULivY.png)


title: Multilanguage in LaTeX?

text: \documentclass[12pt]{article}          \usepackage{polyglossia}          \setmainlanguage{english}          \setotherlanguage[numerals=western]{urdu}          \newfontfamily\urdufont[Script=Arabic,Scale=1]{Jameel Noori Nastaleeq}          \begin{document}          \hfill \texturdu{   مجھ سے کہے ایک جل پری۔ مندرجہ ذیل مساوات کو حل کریں}          \\          \textenglish{Solve the equation.}          \end{document}      This code works fine. I want to add arabic language as well but I don't know how to add more languages using `polyglossia`. So if anybody know then tell me how to add more languages in this program.


title: How to change font size in verse environment?

text: How to center a verse horizontally I am using solution give by @Herbet I try to add desired font size to the verse environment but it did not work for me. my entire document appears at font size 12. I want the verse to appear in font size 18. Rest of the document can stay at size 12. There is a one line text on top of the verse, I want it to appear in font size 8 bold in red color. I do not know how to create a command for this so that I can use it and be able to change properties later. I would appreciate your help


title: How do I tell the arrow pointing to my start state to point from up?

text: I am drawing finite automata in Tex using the tikz automata library. Here is how my figure begins.               \begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto]      \node[state,initial] (q_start)   {$q_start$};      This creates an initial node. The "start ->" arrow is pointing to the node from the left. How do I change this direction? I want "start ->" to point at the initial node from the top.


title: Italic roman page numbering in frontmatter

text: I'm using the `memoir` documentclass, and I would like to have `roman` page numbering, in the `front matter`, in `italic`. Does anyone know how to do it or can reference me something to read? P.S. I am looking _just_ for italicising the `roman` page numbering of the preface and _not_ for patching multiple things (I'd like to add only what I understand, and since I am a newby, I understand just a little)


title: Consume/absorb a token

text: How does consume/absorb/remove a token from then token stream in TeX? I'm using `@ifnextchar` and would like to remove the character it matches.


title: Physymb not working with fontspec unless a different font is loaded not via fontspec

text: I am having trouble using the `physymb` and `fontspec` packages together. When I compile using `PDFLaTeX`, everything works, even with the `lmodern` package. However, when I compile with `XeLaTeX`, it does not work if I've loaded `fontspec` (even if I don't use it), but it does work if I later load the package `mathpazo` (which I don't really want to use, but found via debugging). My question is, where are these errors coming from and is there a workaround? Will loading only certain fonts work? The document I'm using to test is               \documentclass[]{article}     \usepackage{ifxetex}     \ifxetex         \usepackage[cm-default]{fontspec}         %\usepackage{mathpazo} % If you commento ut this line you get many errors.     \else         \usepackage{lmodern}     \fi          \usepackage{physymb}          \begin{document}         This is sample text.     \end{document}


title: How to create a table of contents with thumb indexes?

text: > **Possible Duplicate:**   >  Adding chapter marker to far right edge of page How do I create a table of contents with thumb indexes as shown in chapter 21 of the fancyhdr manual? The manual provides an example with a manually defined table of contents. I'm wondering if it is possible to do this automatically. I'm still deciding between `book` and `scrbook` but my thesis can be build in both.


title: Table of Contents: Titles for Parts with \tocloft

text: I use the `tocloft` package to design the Table of Contents. I wanted to add the word Part before the numbers of parts in TOC (f.e. using `\cftpartpresnum`), but I want to add it only for numbered parts. For example I want to have:               Intro ..... 1     Part I Lalala ...2     Part II Lalalala...4     Conclusion ....6      Is it possible? `\cftpartpresnum` adds to all parts.


title: Symbol for skeptical consequence

text: I'm looking for a symbol for skeptical consequence so that I can write that something, _B_ , is a skeptical consequence of something else, _A_. In a book I read it's written like `\(A \vdash B\)` or `\(A \sststile{}{} B\)` but the horizontal line is wavy like `\sim`, has the same width as the vertical line and does _not_ vary in width. So, what I'm looking for is a binary relation symbol that is similar to the combination of the first two and the last relation in the following image: ![I'm looking for the relation symbol that is the synthesis of these](http://i.stack.imgur.com/3vKhE.png) That is, something similar to the following mockup but the wavy line should be such that it has a constant width and the same width as the vertical line: ![Mockup of what I want](http://i.stack.imgur.com/xWCvX.png) I've tried Detexify without success.


title: Looking for an efficient way to create polished scientific graphics

text: I’m looking for a professional and efficient way to create scientific graphics. There are basically two types of graphics I want to create (and maybe not a joint approach works for both): Plots of functions and data, and free body-type diagrams. Until now I’ve been using Mathematica with MathPSfrag, but this seems too bulky now. I know about gnuplot, TikZ, and Inkscape, although I haven’t used them extensively. So I come here looking for suggestions. Some requirements:   * Pdf-output to a separate file, since some journals want it that way.   * Have the typesetting of text and math done by a TeX-engine to get a coherent look between main text and text in figures (probably by adding a LaTeX- or XeTeX- header).   * Cross-platform (Windows/Linux). Also, feel free to post your workflow for creating graphics.


title: Difference between measures of \vskip in plain TeX and LaTeX

text: I have recently heard the argument that "plain TeX is superior to LaTeX because TeX gets the measures right". The example given was that a `\vskip 2 cm`, when run in tex, would measure exactly 2 cm from baseline to baseline, whereas the same running latex would result in 2 cm from baseline to topline. TeX MWE:               One line.     \vskip 2cm     One line.     \vskip 2cm     One line.     \vskip 2cm     \bye      LaTeX MWE:               \documentclass{article}     \usepackage{lineno}          \begin{document}          \linenumbers          One line.     \vskip 2cm     One line.     \vskip 2cm     One line.     \vskip 2cm               \end{document}      What makes the result different?


title: Why my parameter is set to zero when command is called from inner brace?

text: I have this piece of code:               \documentclass{scrartcl}     \usepackage{pbox,calc}          \makeatletter     \newcommand*{\strippt}[1]{\strip@pt#1}     \makeatother          \newlength{\pointsExo}     \setlength{\pointsExo}{4pt}     \newlength{\pointsSousTotal}     \setlength{\pointsSousTotal}{0pt}          \newlength{\souspointsExo}     \newcommand{\sousPoints}[1]{         \setlength{\souspointsExo}{#1pt}         \setlength{\pointsSousTotal}{\pointsSousTotal + #1pt}         {\scriptsize{(#1~\ifdim#1pt=1pt point\else points\fi/\strippt\pointsExo)}}     }          \newcommand{\subexo}[2]{         \textsf{ %%If I comment these two lines, the sub-total is correct             #1\hfill\sousPoints{#2}% Points         }        %%If I comment these two lines, the sub-total is correct         \medskip     }          \newcommand{\exercice}[2]{         \setlength{\pointsExo}{#2pt}         \setlength{\pointsSousTotal}{0pt}         \medskip         #1\hfill#2 Points% Points         \medskip     }          \begin{document}     \exercice{A first one}{2.5}     \subexo{Anything}{2}          \subexo{Something}{0.5}          Sub-Total: \strippt\pointsSousTotal %should display 2.5          \exercice{A title}{4}     \subexo{another thing}{2.5}          \subexo{and a thing}{1.5}          Sub-Total: \strippt\pointsSousTotal %should display 4          \end{document}       The problem with this is that it should display something like this: > A first one 2.5 Points > > Anything (2 points/2.5) > > Something (0.5 points/2.5) > > Sub-Total: 2.5 > > A title > > another thing (2.5 points/4) > > and a thing (1.5 points/4) > > Sub-Total: 4 But, unless I comment the two indicated lines (currently, an enclosing \textsf{...}, but the problem is the same as soon as I enclose the \sousPoints{#2} between two curly braces), I get this: > A first one 2.5 Points > > Anything (2 points/2.5) > > Something (0.5 points/2.5) > > Sub-Total: 0 > > A title > > another thing (2.5 points/4) > > and a thing (1.5 points/4) > > Sub-Total: 0 What is wrong with using length inside an enclosing brace {...} ? Is it a bug ? A bad understanding of how commands work ?


title: What is the best way to setup this statblock as a macro?

text: I'd like to get a macro setup for this statblock format. Basically, I will be converting an XML document containing the data for the instances within the document. This is a sample of the format I am looking for: ![example statblock](http://i.stack.imgur.com/nZVRU.png)


title: drawing a matrix with its minors

text: I want to create something like this: ![a busy cat](http://i57.tinypic.com/4ieiow.png) This should be a matrix and I want to consider its minors which are drawn by __|. I want to draw also a line from one minor to a place outside of the matrix to explain something ('text'). After a short internet search I've tried some stuff and got a very ugly matrix:               \begin{align*}     \begin{pmatrix}     \rule[-.5ex]{1em}{0.4pt}|\rule[-.5ex]{1em}{0.pt}| \rule[-.5ex]{1.em{0.0pt}|  \rule[-.5ex]{1.em}{0.0pt}| \\     \rule[-.5ex]{2.3em}{0.4pt}| \rule[-.5ex]{1.em}{0.0pt}| \rule[-.5ex]{1.em}{0.0pt}|  \\     \rule[-.5ex]{3.6em}{0.4pt}| \rule[-.5ex]{1.em}{0.0pt}| \\     \rule[-.5ex]{4.9em}{0.4pt}|        \end{pmatrix}\end{align*}      How can you do it better (tikz?) and how do you get those lines from a minor to a place outside the matrix?


title: Is it possible to create a box with a fixed dimension, regardless of how large its content is?

text: Is that possible to create a box (without frame) so that, even though its content is pretty big, it only occupies a small space in the text follow. For example, a tikz picture, however large it is, only takes a size of 1cm x 1cm if you put it into a text flow. * * * **Update:** To clarify the confusions, I meant to draw a box, visually large, but only occupy a small space on the text flow. For example, like the star in the picture below: ![enter image description here](http://i.stack.imgur.com/wlza7.png)


title: Is there such a thing as `\sectionref{}`?

text: My sections are labeled, for example, as " **5.3** ," where the 5 is the chapter number and the 3 is the section number. Using `\ref{}` to refer to that section would produce "5.3"; however, I would only like it to return "3" (the § number only, without the chapter number). Is this possible? How?


title: Biblatex: Abbreviating authoring organisations in citations

text: In my manuscript (`apa6`) I'm citing a report by the World Health Organisation. The .bib-file entry looks like this:               @techreport{WHO_2001,         Author = {World Health Organization},         Address = {Genf, Schweiz},         Title = {The world health report 2001 - {Mental} Health: {New} Understanding, New Hope},         Url = {http://www.who.int/whr/2001/en/index.html},         Urldate = {2012-3-7},         Year = {2001}     }      The manuscirpt has to adhere to APA style guide 6th ed., which states that recognizable abbreviations for authoring organisations should be used. The first time I'm citing this book in the text, it should look like this: > Foo bar (World Health Organization [WHO], 2001). Subsequent citations should look like this: > Foo bar (WHO, 2001). Is there an easy way to do this? This is my preamble:               \documentclass[doc]{apa6}     \usepackage[ngerman]{babel}     \usepackage[style=apa,sortcites=true]{biblatex}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}    % Umlaute     \usepackage{csquotes}          \DeclareLanguageMapping{ngerman}{ngerman-apa}


title: Compiles to PDF but not DVI

text: I just installed TeX Live on Ubuntu 10.04 using the `install-tl-unx.tar.gz` package. However, when I tested the installation I noticed that it cannot compile to DVI but it can compile to PDF. My document for testing the installation is simply as follows:               \documentclass{article}     \begin{document}     This is a document     \end{document}      which I compile using `latex test.tex`. This results in the compiled file `test.dvi`, however it cannot be opened and is only 240 bytes. The contents of the compilation log is below. Any ideas on what is causing this problem and how I can fix it?               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)     (format=latex 2012.3.8)  8 MAR 2012 18:43 entering extended mode      restricted \write18 enabled.  %&-line parsing enabled.     **test.tex (./test.tex LaTeX2e <2011/06/27> Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek,     ibycus, arabi c, armenian, basque, bulgarian, catalan, pinyin, coptic,     croatian, czech, danis h, dutch, ukenglish, usenglishmax, esperanto,     estonian, ethiopic, farsi, finnis h, french, galician, german,     ngerman, swissgerman, monogreek, greek, hungarian,  icelandic,     assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or     iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,     kurmanji,  lao, latin, latvian, lithuanian, mongolian, mongolianlmc,     bokmal, nynorsk, pol ish, portuguese, romanian, russian, sanskrit,     serbian, serbianc, slovak, sloven ian, spanish, swedish, turkish,     turkmen, ukrainian, uppersorbian, welsh, loaded .     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/size10.clo File:     size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option) )     \c@part=\count79 \c@section=\count80 \c@subsection=\count81     \c@subsubsection=\count82 \c@paragraph=\count83     \c@subparagraph=\count84 \c@figure=\count85 \c@table=\count86     \abovecaptionskip=\skip41 \belowcaptionskip=\skip42     \bibindent=\dimen102 ) No file test.aux. \openout1 = `test.aux'.          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line     2. LaTeX Font Info:    ... okay on input line 2. LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 2. LaTeX Font Info:        ... okay on input line 2. LaTeX Font Info:    Checking defaults for     OT1/cmr/m/n on input line 2. LaTeX Font Info:    ... okay on input     line 2. LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on     input line 2. LaTeX Font Info:    ... okay on input line 2. LaTeX Font     Info:    Checking defaults for OMX/cmex/m/n on input line 2. LaTeX     Font Info:    ... okay on input line 2. LaTeX Font Info:    Checking     defaults for U/cmr/m/n on input line 2. LaTeX Font Info:    ... okay     on input line 2. [1          ] (./test.aux) )  Here is how much of TeX's memory you used:  198     strings out of 493630  2112 string characters out of 3143368  49273     words of memory out of 3000000  3591 multiletter control sequences out     of 15000+200000  3640 words of font info for 14 fonts, out of 3000000     for 9000  831 hyphenation exceptions out of 8191  23i,4n,17p,151b,107s     stack positions out of 5000i,500n,10000p,200000b,50000s          Output written on test.dvi (1 page, 240 bytes).


title: Custom topmatter variable

text: In a simple documentclass for homework assignments, how should I go about specifying a few attributes in addition to `title` and `author` in the topmatter?               \begin{document}     \acadclass{Linear Algebra}     \psetnum{2}     \title{Some Title}     \author{Joe Shmoe}      I would like this to render stuff like "Linear Algebra - Pset 2" in the header by evaluating `\@acadclass - Pset \@psetnum`. How can I declare these variables in the documentclass such that I could access them from `\@acadclass`?


title: Is there a way to change behaviour of a (math)command depending on the display style?

text: I want to define a command that changes behaviour depending on weather it is written in inline or disply mode. For example I want to define `\backlim`, such that it prints `\lim_\leftarrow` when used in an `$` environment and `\lim_\longleftarrow` if used in `$$` or align.


title: When can we create our own abbreviations for the document?

text: In a paper, there can be a few authors whose work is cited very often in the document. If the names are a bit long, then I noticed that some papers use an abbreviation, citing it once in full(e.g. Percival & Walden 1993) and then they say "PW1993" thereafter or maybe some other format. Is this abbreviation allowed and if yes, what is the standard way to write this abbreviation? Are there any conventions for writing short forms for other long words used very frequently in the journal articles?


title: McGill Style for Legal Citation for Latex

text: I was curious if there was a style package for the Canadian Guide to Uniform Legal Citation, 7th Edition, or affectionally known as the McGill citation style? I found LawTex, however it uses the bluebook style. Any guidance would be appreciated. Thank you


title: How to backup TeX documents efficiently?

text: Currently I'm finishing my master thesis. During time I was systematically copying entire file (TeX, bibitex etc.) on external drive. Are there any better ways than that? What ways of backup you can recommend based on your experience? I don't want to set up my own repository on external server or buy a RAID. What I'm looking for is a rather easy solution.


title: Order of the pages in the front matter of a book

text: Following "A few notes on book design" from Peter Wilson (author of the `memoir` class) the order of the pages of the front matter is:   1. Half-title page   2. Blank   3. Title page    4. Copyright page   5. Dedication    6. Blank   7. ToC   8. LoF   9. LoT   10. Forewords   11. Preface   12. Aknowledg(e)ments   13. Introduction   14. Abreviations Again for the case of my master's thesis I have a few questions: Where should I include the **Abstract** ? Item 12 'introduction' should be there if the introduction is not part of the main matter which is clearly not the case in a scientific writting. So I was thinking about replacing that by the abstract. But at this location the abstract seems to be a bit "hidden" in the middle of all these pages. So my second idea would be to put it just after the LoT. But in don't know if this is optimal. My layout, removing what I think are unnecessary parts would then be:   1. Title page   2. Blank   3. Title page (only the title, nothing else)   4. Blank   5. Dedication    6. blank   7. ToC   8. LoF   9. LoT   10. Abstract   11. Preface   12. Aknowledg(e)ments   13. Abreviations   14. and then start the first numbered chapter "Introduction" What do you think ?


title: How to draw a closed curve with a flag-like path and attach some labels to them?

text: I'm trying to draw some arbitrary closed two dimensional curve where I'm focusing on only part of the boundary. I want to label the diameter of the part of the boundary I'm focusing on. Last, I'd like to put a tube encompassing this part of the boundary, and label both. Here is a picture of the situation I desire: ![enter image description here](http://i.stack.imgur.com/btNkm.jpg) The symbols are `$\Omega$`, `$\operatorname{diam} (\partial \varphi)$`, `$\operatorname{diam} (\mathcal{R}_i)$`, and `$\partial \phi^2$`. Any help would be greatly appreciated. I understand how to get one simple closed curve, but not two overlapping as in the picture above with two straight lines stretching as shown labeled above.


title: Multiple figures inside a subsection

text: I have an x amount of figures that I want to display inside a subsection. The subsection doesn't contain anything else. Currently the images are automagically put on pages from other sections. What is the correct way to force the images to be put on pages **inside** the subsection?


title: Create a series of connected, list-filled boxes (flowchart?)

text: I would like to create a series of horizontally linked 'text boxes', with arrows between each one. Each box will contain some text (probably a list with a title). I would like it to look something like this: ![enter image description here](http://i.stack.imgur.com/MiiA2.png) What would be the best package/method for going about doing this? Ideally, the overall width of the three boxes would be automatically resized to fill the full width of the column they are in, but this is only a secondary requirement. (I realise that this is effectively a flow chart—however, all the flowchart packages I've come across seem more suited to the free-form, spidery flowcharts and seem to be overkill for this purpose. Feel free to suggest them nonetheless if they are suitable.)


title: Survey or questionnaire document class or package?

text: I like to create surveys and questionnaires, what would be a good `\documentclass` or `package` to use?


title: How i can tranform my PDF file so that it will not be readable by the system

text: I see one document (PDF), when i try to copy its text (one paragraph), it gives me as: > Theunderlyingproblemisageneralmodelselectionproblem,wherewehavetocompare > twomodelsM1andM2suchthatmodelM1isevaluatedwithrespecttothetrainingsetD1, > whilemodelM2isevaluatedwithrespecttothetrainingsetD2.Ofcourse,forthisproblem > tobemeaningful,weassumethatD1andD2arebothsampledfromthesameunderlying > distribution. That mean it is in combined form (removed spaces) so that we can extract individual words directly. Now, i would also like to transform my personal writings (pdf) in Latex so that it will not be readable by the system. If some one copy its text and past in other editor, then it will removes inter word spaces. Or any text reading software could not read it. For example: if some one copy above paragraph from my PDF file and past in another editor, then it will be looks like: > Now,iwouldalsoliketotransformmypersonalwritings (pdf) in > Latexsothatitwillnotbereadablebythesystem.Ifsomeonecopy > itstextandpastinothereditor,thenitwillremovesinterword > spaces.Oranytextreadingsoftwarecouldnotreadit. Thanks in advance.


title: obfuscate latex->pdf document

text: Is there any package that can easily allow you to obfuscate a Latex->PDF generated document such that copy-paste is not longer possible and produces random letters for instance. And if yes, is it possible to control which letters get modified? Mailin


title: Protect text in PDF from being copied

text: > **Possible Duplicate:**   >  PDF with un-copyable text What is the most effective ways to protect text in a PDF from being copied with `Ctrl`+`C`? I know about standard PDF copy protection, and also know that it can be removed relatively easily. [BTW: Can this copy protection be added to a PDF directly from Latex?] Inspired by "Is it possible to provide alternative text to use when copying text from the PDF?", I tried:               \documentclass{article}     \usepackage{blindtext}\usepackage{accsupp}          \begin{document}     \BeginAccSupp{method=escape,ActualText=}     \Blindtext[3][2]      \EndAccSupp{}     \end{document}      This appears to protect the first page in Adobe Reader 9 against simple copying. The second page is not protected anymore. Is it possible to extend the protection to the entire document? It also appears that all text remains accessible in Foxit Reader 4.3. I imagine a very effective approach would be to add invisible garbage text after each few letters. This would increase the size of the PDF a bit but this would not be a problem. Any ideas are much appreciated. * * * A powerful approach is redefining the Cmaps of the fonts, suggested in an answer to "PDF with un-copyable text". How can this approach be used together with non-standard fonts? E.g. such as Times loaded through package `\usepackage{times}` or `\usepackage{mathptmx}`?


title: Deny copy in pdf

text: I want to create a pdf file with non-copyable properties for text. It can encrypt text to some code (such as ASCII), deny copy paragraph. I found some examples on web about this. I must use font 13pt with Times New Roman for my thesis, so I use package `extbook`, `type1cm`, `mathptmx`. When I use these pacakges, I can't encrypt my text to deny copy. Please help me solve this problem. I see you marked this question already answered. I know this answer but it can't solve my problem. I must use `extbook` and some more package. And this answer not working. Please see my code:               \documentclass[13pt]{extbook}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage[utf8]{vietnam}       \usepackage{type1cm}      \usepackage{mathptmx}     \usepackage{setspace}     \usepackage[UKenglish]{babel}     \usepackage[dayofweek]{datetime}     \usepackage[pdftex,bookmarks=true,bookmarksnumbered,hidelinks]{hyperref}     \usepackage[           paperwidth=210mm,           paperheight=297mm,           left=35mm,right=20mm,top=35mm,bottom=30mm         ]{geometry}     \usepackage{nameref}     \usepackage{makeidx}     \usepackage{graphicx}          \usepackage{array}     \usepackage{booktabs}     \usepackage{epstopdf}          \usepackage{fancyvrb}     \begin{VerbatimOut}{OT1.cmap}     %!PS-Adobe-3.0 Resource-CMap     %%DocumentNeededResources: ProcSet (CIDInit)     %%IncludeResource: ProcSet (CIDInit)     %%BeginResource: CMap (TeX-OT1-0)     %%Title: (TeX-OT1-0 TeX OT1 0)     %%Version: 1.000     %%EndComments     /CIDInit /ProcSet findresource begin     12 dict begin     begincmap     /CIDSystemInfo     << /Registry (TeX)     /Ordering (OT1)     /Supplement 0     >> def     /CMapName /TeX-OT1-0 def     /CMapType 2 def     1 begincodespacerange     <00> <7F>     endcodespacerange     8 beginbfrange     <00> <01> <0000>     <09> <0A> <0000>     <23> <26> <0000>     <28> <3B> <0000>     <3F> <5B> <0000>     <5D> <5E> <0000>     <61> <7A> <0000>     <7B> <7C> <0000>     endbfrange     40 beginbfchar     <02> <0000>     <03> <0000>     <04> <0000>     <05> <0000>     <06> <0000>     <07> <0000>     <08> <0000>     <0B> <0000>     <0C> <0000>     <0D> <0000>     <0E> <0000>     <0F> <0000>     <10> <0000>     <11> <0000>     <12> <0000>     <13> <0000>     <14> <0000>     <15> <0000>     <16> <0000>     <17> <0000>     <18> <0000>     <19> <0000>     <1A> <0000>     <1B> <0000>     <1C> <0000>     <1D> <0000>     <1E> <0000>     <1F> <0000>     <21> <0000>     <22> <0000>     <27> <0000>     <3C> <0000>     <3D> <0000>     <3E> <0000>     <5C> <0000>     <5F> <0000>     <60> <0000>     <7D> <0000>     <7E> <0000>     <7F> <0000>     endbfchar     endcmap     CMapName currentdict /CMap defineresource pop     end     end     %%EndResource     %%EOF     \end{VerbatimOut}          \usepackage{lipsum}          \begin{document}          \lipsum          \end{document}      Please help me , I really want to know how to get it.


title: Strange line spacing effects in longtabu

text: I got some strange effect with `longtabu`:   ![enter image description here](http://i.stack.imgur.com/GT12K.jpg)   As you can see the line with **λ** seems to be closer to the above line than to the one below of it. I cant’t figure out why … This is the code with which I produced the above picture:               \documentclass[         fontsize=11pt,     ]{scrbook}          \usepackage{xltxtra}          \usepackage{array}     \usepackage{tabu}     \usepackage{longtable}          \usepackage[osf]{libertine}          \begin{document}         \begin{longtabu} to \textwidth {lX}              \textbf{L} & Musica incantans sive poema exprimens musicae vires per illam juvene in insaniam             acto et musici inde periculum. Authore Roberto South Art. Bac. ex Aede Christi. Oxonii, Typis             Leon. Lichfield Academiae Typographi, Impensis Tho. Robinson. Anno 1655. \\               \textbf{λ} & \textit{Überarbeitete, zweite Fassung des Gedichts zwischen 1655 und 1667.} \\               \textbf{W} & Musica incantans sive poema exprimens musicae vires juvenem in insaniam adigentis et             musici inde periculum. Authore Roberto South Art. Bac. ex Aede Christi. Oxonii, Typis W.\,H.,             Impensis G. West. Anno Dom. 1667. \\          \end{longtabu}%     \end{document}      The workaround is to put an invisible rule to the **λ** line to make it higher.


title: pgfplots - highlighting/filling an area in a data file

text: How does one highlight a specific domain range of a datafile in pgfplots? For example I'd like do do something like:               \begin{tikzpicture}[baseline,trim axis left]     \begin{axis}[      ylabel=frequency,      y unit=\si{\hertz},     ]     \addplot file {mydata.dat};     % mystery addplot goes here     \end{axis}     \end{tikzpicture}      Where the "% mystery addplot goes here" line would generate something like the three colored boxes below, which could be specified by the domain only. Something like               \addplot [color=colora,fill,domain=2500:3500] file {mydata.dat} \closedcycle;      ![example of the highlighting I'm looking for](http://i.stack.imgur.com/qJM3I.png) Any ideas?


title: Horizontal bargraph pgfplot

text: I'd like to make two graphs using TiKz pgfplots or otherwise using this table below. But get the error > ! Package pgfplots Error: Sorry, the input coordinate `Bloodstream Infection > (B SI' has not been defined with 'symbolic y coords={Bloodstream Infection > (BSI),S urgical site infections (SSI),Ventilator-associated pneumonia > (VAP),Urinary tra ct infection (UTI),Others}... Maybe it has been > misspelled?. Have I not correctly defined the names in `y coords`?               **Type of infection Mean cost   Stdev   St dev Min  Stdev Max   %**     Bloodstream Infection (BSI) 36441   37078   2883    207256  14     Surgical site infections (SSI)  25546   39875   1783    134602  17     Ventilator-associated pneumonia (VAP)   9969    2920    7904    12034   14     Urinary tract infection (UTI)   1006    503 650 1361    33     Others  1000    1000    800 5000    22      ![Type of infection vs Cost](http://i.stack.imgur.com/8kY0c.png) ![Type of infection vs %](http://i.stack.imgur.com/VuY5F.png)                \documentclass{article}     \usepackage{tikz}      \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \begin{document}           \begin{tikzpicture}     \begin{axis}[      xbar, xmin=0,     xlabel={Percentage \%},     symbolic y coords={{Bloodstream Infection (BSI)},{Surgical site infections (SSI)},{Ventilator-associated pneumonia (VAP)},{Urinary tract infection (UTI)},{Others}},     ytick=data,     nodes near coords, nodes near coords align={horizontal},     ytick=data,     ]     \addplot coordinates {(14,{Bloodstream Infection (BSI)}) (17,{Surgical site infections (SSI)}) (14,{Ventilator-associated pneumonia (VAP)}) (33,{Urinary tract infection (UTI)})(22, {Others})};     \end{axis}     \end{tikzpicture} %width=6cm,height=7.59cm          \end{document}


title: What is the easiest way to automatically keep the fluid surface horizontal and the liquid's volume conserved when the container is rotated?

text: I have a symmetric container (a hollow object of revolution) that is partially filled with liquid. When we rotate the container about any axis perpendicular to our display, the surface of liquid must be parallel to the surface of liquid in a not-rotated container. > To be more realistic, the volume of liquid must be conserved. ~~In other > words, the area of the shaded region must be invariant under this > rotation.~~ I want to make an animation by changing the rotation angle so automatic adjustment is a must. ![enter image description here](http://i.stack.imgur.com/DFcvZ.png)               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-eucl}     \psset     {         PointName=none,         PointSymbol=none,     }          \def\containerpath     {%         \pstGeonode             (0,4){Top}             (0,0){Bottom}             (1,0){BottomRight}             (3,2){Right}             (1,3.5){NeckRight}             (1,4){TopRight}         \pstOrtSym{Top}{Bottom}{BottomRight,Right,NeckRight,TopRight}[BottomLeft,Left,NeckLeft,TopLeft]         \pscustom         {             \pscurve(BottomRight)(Right)(NeckRight)             \psline(TopRight)(TopLeft)(NeckLeft)             \pscurve(Left)(BottomLeft)             \closepath         }     }          \def\container     {%         \psset{unit=0.5cm}         \begin{pspicture}(-3,0)(3,4)             \psclip{\containerpath}                 \psframe[linewidth=0,linestyle=none,fillstyle=solid,fillcolor=gray](-3,0)(3,2)             \endpsclip             \containerpath         \end{pspicture}     }          \begin{document}     \begin{pspicture}(6,2)         \rput(1.5,1){\container}         \rput{45}(5,1){\container}     \end{pspicture}     \end{document}      What is the easiest way to automatically keep the fluid surface horizontal and the volume of liquid conserved when the container is rotated? The top of the container is open so the angle of rotation must not make the liquid spilled out. It is free for you to use either PSTricks or TikZ or others!


title: Changing the margins of a single page while keeping the headline the same

text: I need to print a huge figure in my latex document on one single page. I'm currently using               \newgeometry{left=10mm, right=10mm, top=25mm, bottom=30mm}     \begin{figure}[thb]          ....          \end{figure}     \restoregeometry      which works nearly perfectly for me. The figures look very nice and I can also refer to the usage of `\def\svgwidth{.47\textwidth}` to place two subfigures just side by side. The only problem I've got with this is that the header-line is also moved to the top AND expanded to the width of the page. Is there some option to keep the header of the page the same? I already tried the package `\usepackage{changepage}` but couldn't achieve the same effect like using the changegeometry... Edit: Thanks in advance


title: How to make pgfplotstable read tables with macros

text: I want to migrate my tables to pgfplotstables. I used to have a macro for the rows of my tables, partly, because Kile used to. So currently, my tables more or less look like:               oldtable:     \begin{tabular}{ccc}     1&2&3\\     \myrow{}     \rowentry{1}{2}{3}{4}{5}{6}     \end{tabular}      And I want to migrate that to something like:               newtable:     \pgfplotstabletypeset[debug]{     one & two & three\\     \myrow{}     \rowentry{1}{2}{3}{4}{5}{6}     }      But that fails with the following error:               ./main.tex:28: Package pgfplots Error: input table '<inline_table>' has an unba     lanced number of columns in row '1' (expected '3' cols; got '1'). Maybe the inp     ut table is corrupted? If you need unbalanced data, consider using 'nan' in emp     ty cells (perhaps combined with 'unbounded coords=jump').          ------- PGFPLOTSTABLE DEBUG MODE: --------     ./main.tex:28: Undefined control sequence.     \\  ->\let \reserved@e                             \relax \let \reserved@f \relax \@ifstar {\let \reserv...     l.28 }      I suppose that is because the macros don't get expanded. I don't necessarily want to edit all the tables. So my question is: How to make pgfplotstables read my table definition? Full example:               \documentclass{article}     \usepackage{booktabs}     \usepackage{pgfplotstable}          % global settings     \pgfplotstableset{         col sep = &,         row sep=\\,         %string type, %% The error changes when enabling this type     }          \newcommand{\myrow}{foo & bar & baz\\}     \newcommand*{\rowentry}[6]{#1 & #2 & #3\\} %& #4}\\}     \begin{document}          oldtable:     \begin{tabular}{ccc}     1&2&3\\     \myrow{}     \rowentry{1}{2}{3}{4}{5}{6}     \end{tabular}          newtable:     \pgfplotstabletypeset[debug]{     one & two & three\\     \myrow{}     \rowentry{1}{2}{3}{4}{5}{6}     }          \end{document}


title: How put Minimize in place of min in a typical optimization problem?

text: The typical is               $\displaystyle{\min_{x\in S} f(x)}$      but I want to view the word "Minimize" in place of "mín" how can I obtain this?


title: How to justify text after using image in LaTeX?

text: I am inserting a jpg/png image in my LaTeX document in `center` environment. The problem is when I insert the image, the text following the image loses the justify property. Also the itemize does not work well, probably looks like the previous line overflowed. How can i justify the text?


title: Uneven spacing around a hyphen in sans-serif?

text: I am used to writing the names of categories in sans-serif. Thus, for the category of R-modules, I have been using               $R\textrm{-}\textsf{Mod}$      However, the kerning/spacing this produces has never been pleasing (click for larger version): ![](http://i.stack.imgur.com/PqlJL.png) Playing around a bit, I think maybe I'm not crazy, but perhaps there's something actually wrong with how the hyphen is being spaced in sans-serif. For example, the following code               \documentclass[11pt]{article}     \usepackage{amsmath,amssymb,amsfonts,graphicx}     \renewcommand{\familydefault}{\sfdefault}     \begin{document}     M-M \vspace{-0.45cm}     \rotatebox{180}{M-M}     \end{document}      produces (click for larger version): ![](http://i.stack.imgur.com/OwZe1.png) I'm not sure how to calculate lengths in LaTeX, but just by putting a ruler on my screen, I'm sure this is uneven. Now, I wouldn't expect it to be even in the usual serif font, because then `M` is not a fully symmetric letter, but in the sans-serif font, it seems to me that `M` is completely symmetric and should be spaced as such. So, I suppose I have three questions:   1. Is this how it is intended to look, or am I doing something wrong?   2. While it seems like an error to my sensibilities, is there a reason why it might have been intentionally designed this way?   3. How can I get the spacing on each side of the hyphen to be equal in sans-serif, _particularly_ for my original goal of writing the category of R-modules?


title: Add own macros to ".emacs"

text: I'm using KOMA-script, which offers the use of letter-class-options, which can be stored in a file: *.lco. One command I define in a "zrp.lco" is very simple:               \newcommand{\Beweis}[1]{Beweis: #1}      Now I'd like to teach Emacs to know about this command. I tried to put into my .emacs:                (TeX-add-style-hook           "zrp"           (lambda ()             (TeX-add-symbols          '("Beweis" 1))))      But Emacs spills out an error while loading:               eval-buffer: Symbol's function definition is void: TeX-add-style-hook      What is wrong?


title: Shading in TikZ calendar

text: I’ve produced the calendar below with TikZ but I think the colourings need to be made more salient by shading a box around the coloured dates (as there will be four of these years on a page and the colouring gets drowned out). How can I do that? ![](http://i.stack.imgur.com/H4GX1.png)               \documentclass[12pt]{article}     \usepackage{mathptmx}     \usepackage{tikz}     \usetikzlibrary{calendar}         \begin{document}     \begin{figure}     \sffamily\scriptsize     \begin{center}     \makebox[0pt]{\tikz     \colorlet{darkgreen}{green!60!black}     \calendar [dates=2012-01-01 to 2012-12-31,     month list,month label left,month yshift=1.25em]     if (Sunday) [black!50]     % GROUP 1     if (between=2012-08-09 and 2012-08-12)[orange]     if (between=2012-06-01 and 2012-06-03)[orange]     if (between=2012-04-05 and 2012-04-07)[orange]     if (between=2012-12-22 and 2012-12-27)[orange]     % GROUP 2     if (between=2012-09-10 and 2012-09-15)[blue]      if (between=2012-08-17 and 2012-08-21)[blue]      if (between=2012-06-29 and 2012-07-02)[blue]      if (between=2012-05-14 and 2012-05-21)[blue]      % GROUP 3     if (between=2012-11-02 and 2012-11-09)[darkgreen]      if (between=2012-01-01 and 2012-01-27)[darkgreen]      ;}     \end{center}     \end{figure}\end{document}


title: Logo in footer with aligned text

text: I want to create a latex class to create documents for my company. There is an example style for a word document but it looks more complex as most headers/footers I have found till now to re-create in LaTeX (at least for me). The example looks like the attached picture. I tried to play with `fancyhdr`, but didn't succeed with the problems: inserting the logo in a way that does not screw up the rest of the footer, aligning the text left and right, text above and under the line... ![enter image description here](http://i.stack.imgur.com/zrB50.png)


title: Errors using dmath for multiline equation breaking in a table with booktabs package?

text: I would appreciate if you can help me find a solution/way out to the following problem. I am using the `booktabs` package to get a nice looking table. I have a long equation in the table which I split using the `death` environment provided by the `breqn` package (to keep the left and right parentheses' size the same). Without using the `booktabs` package, it works as expected, but with `booktabs` the table generates many errors of the type `Missing \endgroup inserted`, `missing \cr inserted`. My goal is to do both, equation breaking without delimiters of `\right` and `\left` problems and still use the `booktabs` package for a professionally- looking table. Here is a sample of the code               \documentclass[journal,12pt,draftcls,onecolumn,a4paper]{IEEEtran}     %\usepackage{amsmath,amssymb,amsthm}     \usepackage{array}     \usepackage{breqn}     \usepackage{booktabs}     \newcommand{\tn}{\tabularnewline}          \begin{document}          % This table can not be generated (many errors) when using dmath environment in conjunction with booktabs table          \begin{table}     \begin{tabular}{@{}ll@{}}\toprule     Scheme & rule \\ \midrule     Scheme name &     \begin{dmath*}     a\left(1- \frac{1}{c!}\binom{N-1}{j-1}\sum\limits_{l=N-j}^{N-1}\binom{j-1}{N-l}(-1)^{l-N}\frac{l!}{(1+l)^{c-1}}\\     \sum\limits_{i_0,i_1,\ldots,i_{c-1}=0}^{l}\left(\prod\limits_{t=0}^{c-1}\frac{\left(\frac{1}{(1+l)t}\right)}{i_t!}\right)\left(c+\sum\limits_{t=0}^{c-1}\, i_t\right)\right)     \end{dmath*} \\ \hline      \bottomrule     \end{tabular}            \end{table}           %This way does work (normal table style)          \begin{table}     \begin{tabular}{|>{\arraybackslash}m{2.3cm}||>{\arraybackslash}m{14.3cm}|}\hline     Scheme & rule \tn[5pt] \hline     Scheme name &     \begin{dmath*}     a\left(1- \frac{1}{c!}\binom{N-1}{j-1}\sum\limits_{l=N-j}^{N-1}\binom{j-1}{N-l}(-1)^{l-N}\frac{l!}{(1+l)^{c-1}}\\     \sum\limits_{i_0,i_1,\ldots,i_{c-1}=0}^{l}\left(\prod\limits_{t=0}^{c-1}\frac{\left(\frac{1}{(1+l)t}\right)}{i_t!}\right)\left(c+\sum\limits_{t=0}^{c-1}\, i_t\right)\right)     \end{dmath*} \tn[5pt] \hline     \end{tabular}            \end{table}          \end{document}


title: Read file without file extension from hidden directory

text: I'm trying to read some data from a file and use the following approach:               \documentclass{minimal}     \newcommand{\file}{./.dir/.testFile}     \begin{document}     \newread\myread     \openin\myread=\file\relax     \loop       \read\myread to \data       \unless\ifeof\myread         \data       \repeat     \closein\myread     \end{document}      This works for the following files (specified in the `\file` macro):   * `testFile.txt` \--> Normal file   * `dir/testFile.txt` \--> Normal file in folder   * `.dir/testFile.txt` \--> Normal file in hidden folder   * `.dir/.testFile` \--> Hidden file in hidden folder But exactly the case which I need is not working: `.dir/testFile`. Why is it not possible to read a file without file extension and is there a way to get around this? Renaming the file is no option for me as the file is used/modified/created by another application. I need just the first line of the file, if this simplifies the problem in any way. According to this question/answer, the extension `.tex` is always appended to the file name if no extension is given (even by using low-level commands). But I still think there must be a way to bypass this. System:   * pdfTeX, Version 3.1415926-2.4.1.40.13   * MiKTeX 2.9 (Revision 2.9.4533, 32 bit)   * Windows 7 Professional (64 bit)


title: Add line "Draft: Please do not quote or cite" to the maketitle

text: I'd like to add a `\fbox` with "Draft: Please Do Not Quote or Cite" at the top right of my title page which I generate with maketitle. Does somebody know how to elegantly add the line `\fbox{\small Draft: Please Do Not Quote or Cite}` to the title?               \documentclass[twoside,a4paper]{article}     \title{         \vspace{-15mm}         \fontsize{24pt}{10pt}\selectfont         \textbf{\ttitle} % title defined above         }        \author{         \large         \textsc{...}\\[2mm]         \vspace{-5mm}         }     \date{\normalsize \today}     \begin{document}          \maketitle          \end{document}


title: How do I create a Tikz mindmap that has two connected roots?

text: I am creating a mindmap that has multiple root concepts instead of just one. How can I create such a mindmap using Tikz? These are the mindmaps:               \begin{tikzpicture}[small mindmap,concept color=brown!30]     \node (right) at (2,0) [concept] {Right}       [clockwise from=70]       child { node[concept] {R.1} }       child { node[concept] {R.2} }     ;     \node (left) at (-2,0) [concept] {Left}       [counterclockwise from=210]       child { node[concept] {L.1}  }       child { node[concept] {L.2} }     ;     \end{tikzpicture}       Looking like this: ![enter image description here](http://i.stack.imgur.com/sH2Il.png) It would be nice if they were of different color and the connecting line a gradient matching those colors.


title: Arabic font for Listing

text: Currently, I am using Listings package in order to insert my XML text in the document. For example the code:               \begin{lstlisting}        <Product Title="نوکیا" Type="گوشی">     \end{lstlisting}      The problem in here is that **Listings** does not support **Arabic** font. As a result 'نوکیا' and 'گوشی' can not be shown. Is there any solution to make Arabic font be supported by the Listings package?


title: biber does not seem to work even though the command is found

text: just manually installed biber (/usr/bin/biber) but it does not work at all. "biber --version" does nothing at all but the command is definitely found. screenshot: https://dl.dropboxusercontent.com/u/2109282/Unbenannt.png OS: sabayon 14.01 maybe it is missing some required packages?


title: Adding a ruled area for notes in beamer handouts?

text: I want to make a handout that has a ruled area for students to jot down notes. Here's how I envision this looking: there is a 2x2 array on each page with the left column being slides 1 and 2, while the right column consists of two separate ruled regions where students can write notes pertaining to the corresponding slide in the left column. I was thinking that I could just use a mode specification like this:               \begin{frame}     \frametitle{Frame Title}     Frame Contents     \end{frame}          \begin{frame}<handout>     \frametitle{Notes}     \hline     \hline     ...     \hline     \end{frame}      This seems a bit clumsy to me, so do any of you know a better way to do this?


title: Tikz or tabular to build up a table

text: To build up a table like the one from the picture with this wierd shape and diferent line thikness, would you go with tabular or with tikz ?![enter image description here](http://i.stack.imgur.com/Cvmbc.jpg)


title: How can I display a short chapter name in the header and a long chapter name in the ToC?

text: I am writing a book and one of my chapter has a very long title. As it can't be displayed correctly on the top of even pages, I provide a "short title name" via the `\chapter[short title]{long title}` command. But then, "short title" appears in the table of contents, instead of the original/true/long one. How can i have the "short title" in the header of even pages, and the "long title" in the ToC and in the "Title header"? For reference, here is the code I use:               \documentclass[11pt,a4paper]{book}          \begin{document}          \tableofcontents          \chapter[Short title]{Very vey very very very very very very long title         i can't display in the header}          Lorem ipsum dolor sit amet, consectetur adipiscing elit.          \cleardoublepage          \end{document}


title: Chapter title in header too long

text: How can I format the header on every page displaying the title of the current chapter? In one of my chapters the title is too long so it is running out of the page. Here's a minimal example of my document:               \documentclass[bibliography=totoc,version=first,listof=totoc,BCOR5mm,DIV12,index=totoc,numbers=noenddot]{scrbook}     \usepackage{bibgerm}     \usepackage[english,german]{babel}     \usepackage[utf8]{inputenc}     \usepackage{a4wide}     \usepackage{wrapfig}     \usepackage{caption}          \begin{document}     \frontmatter     \mainmatter     \chapter{Very long title}     \backmatter     \end{document}      Here's a screenshot of my problem: ![enter image description here](http://i.stack.imgur.com/QGVWt.png)


title: How to wrap text in toc?

text: I have long titles for my document chapter. These titles are going beyond the right margin. How to word wrap section and subsection headings in toc?


title: How to achieve different page Heading and Table of Contents entry?

text: > **Possible Duplicate:**   >  How can I display a short chapter name in the header and a long chapter > name in the ToC? Sometimes the name of a chapter or section is too long and in the headings it exceeds the page length, so I use the OPTIONAL field in `\section[OPTIONAL]{LONG TITLE}`, where OPTIONAL appears in the headings, for example:               \section[Práctica y evaluación]{Práctica y evaluación del capítulo: frases de niños y desarrollo cognitivo}      The problem is that then in the table of contents it also appears OPTIONAL, instad of the LONG TITLE. So my question is: how can I tell latex that I want something in the ToC and something different in the headings? Do you know any related package? In the example, I need:   * Chapter name: Práctica y evaluación del capítulo: frases de niños y desarrollo cognitivo   * Page heading: Práctica y evaluación   * ToC: Práctica y evaluación del capítulo: frases de niños y desarrollo cognitivo


title: How to replace a string with another string in my table of contents?

text: To preface, I'm using the book class for writing a technical document for set of C++ files. It's not really tailored for some things that I'd like, and one of those things is formatting of subsections in the table of contents. For example, I could have a subsection:               \subsection{void foo()}      Which appears in the table of contents, and that's all well and good. However, when I have the subsection:               \subsection{void bar(17 variables)}      There is a significant amount of space that is taken up on the table of contents. And all that is truly important is the name of the function. So what I'm asking is how do I make:               \subsection{void bar(17 variables)}      Appear in the table of contents as if I had:               \subsection{void bar}


title: Overflow in LaTeX scrbook Header

text: > **Possible Duplicate:**   >  How can I display a short chapter name in the header and a long chapter > name in the TOC? I do the typesetting for a book. There are large chapter and section headers, so that the pageheader overflows. Is there a possibility to limit or shorten the page header with "..." for example? I know that i can use `\section[short]{long}` but in my case I want only to short it. Compare: ![enter image description here](http://i.stack.imgur.com/Twx69.png) **Here is the very simple solution:**               \usepackage{scrpage2}     \usepackage[fit]{truncate}     \pagestyle{scrheadings}     \clearscrheadfoot     \clearscrheadings     \clearscrplain     \lehead{\truncate{\textwidth}{\headmark}}     \rohead{\truncate{\textwidth}{\headmark}}     \lefoot{\pagemark}     \rofoot{\pagemark}      Compare: ![enter image description here](http://i.stack.imgur.com/ObciG.png) References:   * truncate   * KOMA-script


title: How to handle Overfull \hbox cause by the reference of the chapter in the upper side of the page?

text: My chapter title is to long to be print in the upper side of the page. You can see from the image that the "reference to the chapter" (what's its name?) go beyond the .pdf page, `'UTLIZZATE'` is truncated at the `"T"` letter. ![enter image description here](http://i.stack.imgur.com/kIj3m.png) I can't find any answer to it? How can I handle it?


title: Overlapping Page Headers

text: > **Possible Duplicate:**   >  Chapter title in header too long I'm using LaTeX to write a report, but some of the sections and subsections have long titles, and these titles overlap in the header of the pages. An example code of what I mean is below.               \documentclass[a4paper,11pt]{article}     \usepackage{fancyhdr} % Used for header          \begin{document}     \pagestyle{fancy} % makes the header look fancy          \section{this is a very long section}     \subsection{this is a bery long subsection. Going to overlap}          test1          \newpage          test2          \end{document}      If you look at the second page of the PDF that is generated the header is overlapping. Is there a way of auto-scaling or manually scaling the header sizes so they don't overlap?


title: chapter title on two lines in the TOC

text: > **Possible Duplicate:**   >  How can I display a short chapter name in the header and a long chapter > name in the ToC? I have a quite long chapter title that I break into two lines as follows:               \chapter{long \newline title}      This works well for the title in itself and how it is shown in the table of contents. The problem lies in the header where the title become `longtitle` (no space between the two words). Would there be an easy way to solve this? I was thinking of using the optional field of the `\chapter` command but it will also modify what is shown in the TOC (which I am so far happy with).


title: coloring text in a dcolumn aligned cell of a table

text: I need to color some text red (not color the cell background) in cell in a table to highlight it. The numbers in the column are aligned on the decimal using the `dcolumn` package. The problem is that               \color{red}{0.044}       doesn't compile it's saying               } inserted at     \color{red}{0.     044}      and then saying that there is one too many `}`. Can anyone help me with this?


title: Space character: stretch after full stop

text: Is there a way to define certain instances of the space character to occupy a certain length in justfied text? The consistency of the size of the space after a full stop in a 12pt article (using lmodern) is too inconsistent for my taste, and I am not able to change to `\raggedright`


title: Insert pages from a PDF file to fit at the entire page using \includepdf

text: I want to insert every page of a PDF file so I used:               \documentclass{customized_class}     \begin{document}     \usepackage{pdfpages}     \includepdf[fitpaper,pages={-}]{filename}     \end{document}      This works fine when using any standard classes like report. Now I have to use a customized class for the document. This causes that the pages do not cover a whole page but are slightly over the edges so that I have margins to the left and to the bottom of every page. So that the option `fitpaper` doesn't seem to work correctly. Link to download the class file "mpreport.cls" \- You can open it with WinRAR. There are other files as well to create that document which are less important for this question. Is there a way to change the class just for all the pages I will include or maybe just the pre-settings of the borders or margins created by the class file? Maybe I could also use `\includegraphics`? I tried it but couldn't figure out how one option will include every page of the PDF file on a new page in the document and covering the whole page as well so that the page number will be left out. This is how it looks like after I included the "pdfpages" documentation. ![First page of the "pdfpages" documentation](http://i.stack.imgur.com/bZx5l.png)


title: How to set lining numbers in math in Beamer (with EB Garamond) under XeLaTeX

text: I'm using EB Garamond with XeLaTeX and Beamer as follows. (I'm not actually sure whether it's all necessary--advice accepted.):               \usepackage[T1]{fontenc}  % not sure why     \usepackage[urw-garamond]{mathdesign} % use URW Garamond rather than Computer Modern in math when EB Garamond is missing a character     \usepackage{fontspec,xltxtra,xunicode}     \defaultfontfeatures{Mapping=tex-text} % not sure why     \setromanfont[Mapping=tex-text]{EB Garamond}      (I previously loaded EB Garamond as a system font on a Mac using its Font book app.) EB Garamond uses oldstyle numbers by default. I can easily change to lining numbers in regular text by various means, e.g. by inserting this at the top of the document: `\addfontfeatures{Numbers=Lining}`. However, none of the methods I've tried has any effect on math in `$$`, `\[\]`, etc.; the oldstyle numbers remain. This is a Beamer issue--the problem doesn't occur with the article class. How can I switch to lining numbers in math mode (without resorting to `\mbox`)? A full minimal working example is below. Thanks!               \documentclass[12pt]{beamer}          \usepackage[T1]{fontenc}     \usepackage[urw-garamond]{mathdesign}     \usepackage{fontspec,xltxtra,xunicode}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont[Mapping=tex-text]{EB Garamond}          \usefonttheme{serif}          \begin{document}     \begin{frame}     text (default, oldstyle): 1234567890\\     \addfontfeatures{Numbers=Lining}     text (lining): 1234567890\\     math (why is this oldstyle?): $1234567890$     \end{frame}          \end{document}


title: What free math font could/should accompany Linux Libertine and Linux Biolinum?

text: Well, the title of the question pretty much says everything. To be more precise: I'd like to know (1) what font would be visually suitable to use with Linux Libertine and/or Linux Biolinum as the main text font (I haven't decided which of the two I'll use) and (2) how to enable it (as a math font) in XeTeX.


title: Can't enable shell-escape

text: I've been trying to add the --shell-escape argument to my `pdflatex`, and right about nothing works. I'll summarize what I've done so far:   1. Add --shell-escape to existing `pdflatex.exe`   2. Add --shell-escape to `\texlive\2013\bin\win32\pdflatex.exe`   3. The console either gets stuck at "`ABD: EveryShipout initializing macrosgnuplot not recognized`", or   4. "`Package gnuplottex Warning: Shell escape not enabled. (gnuplottex) You'll need to convert the graphs yourself..`", or   5. TeXworks produces no PDF   6. I have also tried running different compilers such as `miktex-pdftex.exe`, `pdftex.exe`, etc.   7. I'm running the latest MikTeX / TeX distributions, packages, etc. (just updated _everything_ in my TeX Live Manager) This only seems to be a big deal when I run anything `GNUplot` related. What's going on here? ![ScreenshotOfArgumentsPdflatex](http://i.stack.imgur.com/BYLQ0.png)


title: How can I get capitalised cross references in LyX with refstyle

text: LyX (v2.03) uses `refstyle` for cross references. By default if you use the GUI to create a reference it produces source that looks like:               \tabref{label1}     \figref{label2}      which produces an output like "figure 1.1 and table 1.1". What I want is the capitalised equivalent:               \Tabref{label1}     \Figref{label2}      Which will give "Figure 1.1 and Table 1.1". Is there a switch or something to pass to the `refstyle` package to always do uppercase? Or do I have to manually enter the `\Tabref` each time?


title: Spacing before theorem with scrbook

text: I recently changed from `book` to `scrbook`. Because of this there is now no spacing before a `theorem` enviroment. I now want to change this back, i.e. I want to have an extra spacing before a theorem starts. Here is a minimal example:               \documentclass[12pt,a4paper]{scrbook}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}          \theoremstyle{plain}     \newtheorem{thm}{Theorem}[section]               \begin{document}          After this text I would like to have more space.          \begin{thm}     Here comes a Theorem.     \end{thm}          \end{document}      EDIT: What I know is that you can do this by redefining the `plain` theoremstyle e.g. with taking `{6pt}` as first argument. Is there a more elegant way?


title: bibliography problem

text: This is what I write with latex:               \documentclass{iserc}           \begin{document}      ...     \begin{thebibliography}{1}     \bibliography{my-biblio}     \end{thebibliography}          \end{document}      but when I compile it, it gives me an error:               !Latex error: something's wrong-- perhaps a missing \item


title: Creating a flexible space between a few lines of text on a beamer slide

text: I think this is a very basic problem but somehow I don't know how to solve it. I am working with the `beamer` class and want to create slides where there are two columns. One of the two columns contains only a few lines of text but I want the lines be separated by a flexible amount of space. Unfortunately the `\vspace{\stretch{1}}` seems not to work anymore in the `column` environment. A short example-code:               \documentclass{beamer}          \begin{document}     \begin{frame}     The text on this line should be nicely separated\dots          \vspace{\stretch{1}}          \dots from the text on this line. (Which is the case here.)     \end{frame}          \begin{frame}     \begin{columns}     \begin{column}{0.5\textwidth}     Imagine some graphics here.     \end{column}     \begin{column}{0.5\textwidth}     The text on this line should be nicely separated\dots          \vspace{\stretch{1}}          \dots from the text on this line. (Which is not the case here.)     \end{column}     \end{columns}     \end{frame}     \end{document}


title: PostScript operators and Reverse Polish Notation for plotting using PSTricks

text: I know that the PSTricks packages for plotting, `pst-plot` and `pst-3dplot`, use PostScript operators and Reverse Polish Notation. Is there a comprehensive list of all the operators available, with a guide on such notation?


title: Context-sensitive newline macro

text: I'd like to write a new command `putOnNewLine` such that `\putOnNewLine{ABC}` puts ABC on a new line, with exactly one line's vertical space separating it from what has gone before. It must also respect the boundaries of any environment it is inside. For example, if I have a `\putOnNewLine` at the start of an environment (say at the start of a proof following a theorem) then I don't want a new line in that case. So I suppose I am also looking for some sort of logic that is sensitive to the context in which the command appears.


title: Chart showing the relative number of pages in the document

text: I'm playing with the idea of adding a chart in the begining of my thesis, showing the relative dimension of each chapter (or section, maybe). This is something that I would want to generate automatically. **Is there a package somewhere that already allows me to do this?** ... or, failing that ... **Is there any way I can automatically determine the number of pages of each chapter/section, so that I can feed that data to an external tool to generate the chart?** Here's an example of how the chart could be displayed: ![Chart of the relative dimension of each chapter](http://i.stack.imgur.com/AKijt.png)


title: Rotate every letter/character by 90 deg, keeping left-to-right letterflow intact

text: I'd lik to rotate every letter/character of a paragraph 90 degrees counterclockwise, yet keeping the left-to-right flow intact. Everything I have found so far only rotates one letter at a time and not multiple letters. This is what I use now:               \documentclass[a4paper,12pt,landscape]{article}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{soul}     \usepackage{graphicx}     \usepackage{lipsum}     \usepackage[left=1cm,right=1cm,top=1cm,bottom=1cm,includeheadfoot]{geometry}          \makeatletter     \newlength\srotate@axis     \DeclareRobustCommand*{\srotate}{%       \SOUL@setup       \let\SOUL@everyhyphen\srotate@everyhyphen       \let\SOUL@everyexhyphen\srotate@everyexhyphen       \let\SOUL@everytoken\srotate@everytoken       \settoheight\srotate@axis{$\vcenter{}$}%       \SOUL@     }     \newcommand*{\srotate@everytoken}{%       \srotate@token{\the\SOUL@token}%     }     \newcommand*{\srotate@everyexhyphen}[1]{%       \srotate@token{\raisebox{-\srotate@axis}[.1ex][.1ex]{#1}}%     }     \newcommand*{\srotate@everyhyphen}{%       \discretionary{%         \srotate@everyexhyphen{-}%       }{}{}%     }     \newcommand*{\srotate@token}[1]{%       \kern.2ex       \raisebox{\srotate@axis}{\rotatebox[origin=B]{90}{#1}}%       \kern.2ex     }     \makeatother     \renewcommand{\familydefault}{\ttdefault}     \begin{document}     \noindent          01: \srotate{AST0S Q0LEA NTQOS 2SE2N EA0S9 9ST9Q E9S0Q ST0NV LASLN 2E22L 0ALOT 2OSTO +}          02: \srotate{0O0VV 9N9QO ETVAN V2VST N9OVL 2SOAT ET2S2 LATO0 EL0OA LO0V9 VVEE2 AETSA +}          03: \srotate{00AVS 0E2ON 2ASQE A9NTQ EQ220 92SA9 00OSQ AEVV0 AA9NT STV0L 2NN29 VN9SS +}          04: \srotate{VE2V0 VSASO EL9EO S2TNQ QOSTE N99A0 VQ9LV TV20E L9ESV QO2L2 E0Q2S TOE02 +}          05: \srotate{E2VSQ L0VEN 9A2VA QNQ0V EO00N T909Q STLNV 0LTNO NS9TT T2Q0Q NATAE ENOLE +}     \end{document}


title: Can LuaTeX create HTML?

text: I hear that LuaTeX provides access to internals of TeX.   * Is it possible to modify the output routine with LuaTeX so that HTML is produced instead of DVI or PDF?   * If possible, are there any projects aiming at this?


title: Unicode emoticons with pdflatex

text: Following this answer, I tried to use Unicode emoticons with `pdflatex` like so:               {\fontfamily{DejaVuSans-TLF}\selectfont }      The font is selected but the emoticon does not show. There are some TTF fonts which support the characters, such as Symbola, but apparently getting TTF fonts to work with `pdflatex` is a pain in the butt. Is there a way out?


title: How to define date range format for biblatex

text: I have a `biblatex` entry with `eventdate` defined as:               eventdate = {2012-09-01/2012-09-04}      Using the `apa` style, which does not have definitions for a _date range_ , `\printeventdate` results in > September 1, 2012– 4 How do I format it such that it produces: > 1-4 September, 2012 for               eventdate = {2012-09-01/2012-09-04}      and > 28 September, 2012 - 3 October, 2012 for               eventdate = {2012-09-28/2012-10-03}      ? In another words, the day and month need to be reversed, and it needs to decide whether the month and year are both the same, if so compress the day field such that `eventday-eventendday eventmonth, eventyear`. Otherwise use `eventday eventmonth, eventyear-eventendday eventendmonth, eventendyear`. **MWE**               \documentclass{article}     \usepackage[american]{babel}     \usepackage{csquotes}      \usepackage[style=apa,sorting=none,backend=biber]{biblatex}     \DeclareLanguageMapping{american}{american-apa}     %Add eventdate     \DeclareBibliographyDriver{inproceedings}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author}%       \setunit{\labelnamepunct}\newblock       \usebibmacro{title}%       \ifthenelse{\NOT\iffieldundef{title}\OR\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock       \usebibmacro{editor+trans}%       \setunit*{\addcomma\addspace}\newblock       \usebibmacro{maintitle+booktitle}%       \setunit{\addcomma\addspace}\newblock       \printeventdate%       \setunit*{\addspace}\newblock       \usebibmacro{addinfo}%       \newunit\newblock       \printfield{series}%       \newunit\newblock       \printfield{note}%       \newunit\newblock       \printlist{organization}%       \newunit       \printfield[apacase]{eventtitle}%       \newunit       \printfield{venue}%       \newunit\newblock       \usebibmacro{location+publisher}%       \newunit\newblock        \usebibmacro{origyear}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \printfield{addendum}%       \newunit\newblock       \usebibmacro{related}%       \usebibmacro{apa:pageref}%       \usebibmacro{apa:finpunct}%       \usebibmacro{finentry}}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @INPROCEEDINGS{anon1,       author = {Anon, A. N.},       title = {A very interesting paper},       booktitle = {Proc. {UKACC} International Conference on Control},       date = {2010-09},       eventdate = {2010-09-07/2010-09-10},       venue = {Coventry},       pages = {1--3}     }     \end{filecontents}          \addbibresource{\jobname.bib}          \nocite{*}          \begin{document}          \printbibliography          \end{document}      > Anon, A. N. (2010, September). A very interesting paper. In Proc. UKACC > international conference on control, September 7, 2010– 10 (pp. 1–3). > Coventry.


title: \topsep not taken account in a new list

text: My overall goal is to redefine the [ ] , I have done that actually and it works well, but I just noted that my new trivlist, trivilist2, does not behave well regarding the space left between the above text line and \item. According to the books on latex, the speration from the text to the list is \topsep+\parskip. But when I set \topsep to -\parskip, I still have a space left !               \documentclass[twoside,a4paper, 11pt]{article}     \usepackage{amsmath}     \usepackage{lipsum}          %\parskip=0.5\baselineskip %\advance\parskip by 0pt plus 2pt     \parskip=1ex     \parindent=0ex          \newenvironment{trivlist2}     {\begin{list}     {}     {     \setlength{\labelwidth}{0ex}     \setlength{\leftmargin}{0ex}     \setlength{\labelsep}{0ex}     \setlength{\itemindent}{1\parindent}     \setlength{\listparindent}{1\parindent}     \setlength{\itemsep}{0ex}     %\setlength{\topsep}{0.5\parskip plus 0.25\parskip minus 0\parskip}     \setlength{\topsep}{-3\parskip}     \setlength{\parsep}{0ex}     %useless only \topsep counts anyway as there is no \[ ]\ alone in an environment     \setlength{\partopsep}{0ex}     }}     {\end{list}}          \begin{document}     blablablablablablablablablablablablablablablablablabla,     \begin{trivlist2}     \item blablablablablablablablablablablablablablablablablabla     \end{trivlist2}     blablablablablablablablablablablablablablablablablabla     \end{document}      only the space between the list and the bottom text is eaten up... I do not see why. I need \setlength{\topsep}{-3\parskip} for the bottom text to touch the \item.


title: Position of page numbers

text: I want to move the position of my page numbers to the bottom right of the page. Is there a way to do it _without_ using the `fancyhdr` package? Right now I just use               \pagenumbering{roman}      and it does the job, but the default setting is to put the page number in the bottom middle. If it makes a difference, I am using TeXworks.


title: The same height of text in a large document

text: I’m typesetting a large document that contains a lot of mathematics. The only problem is that the height of text on some pages that ends with a displayed formula is less than (about 3-6mm) the height of pages that ends normally (without displayed formula).   I want that the height of text on all of my pages is quite the same. Does anybody know how to solve this problem? Is there any command that I should use in those pages in order to solve the problem?   By the way, I’m using options `a4paper`, `twoside` and `book` class in my document.


title: Tabular has empty row after hline

text: I made 100 of tabulars like this and never had this problem. I want to end the tabular with an `\hline`, but after that there is a new line with 2 lines. How do I get rid of it?               \begin{table}[H]     \centering     \begin{tabular}{|l|l|l|}     \hline     - & private & onzichtbaar voor de buitenwereld\\     + & public & zichtbaar voor de buitenwereld \\     \# & protected & zichtbaar voor subklassen\\     $\sim$ & geen naam & zichtbaar voor alles in dezelfde package\\     \hline     \centering     \end{tabular}     \caption{Visibiliteit van toestand en gedrag}     \end{table}


title: Background color for fancyvrb

text: For reasons unclear to me, fancyvrb doesn't have a background option. However, the minted package, which it is based on, has one, which suggests it should not be too difficult to add. The relevant code from `minted.sty` might be               \newenvironment{minted@colorbg}[1]{       \def\minted@bgcol{#1}       \noindent       \begin{lrbox}{\minted@bgbox}       \begin{minipage}{\linewidth-2\fboxsep}}      {\end{minipage}       \end{lrbox}%       \colorbox{\minted@bgcol}{\usebox{\minted@bgbox}}}      I've only a sketchy idea what this code is doing, but I think it is defining the `bgcolor` option. Both How to change the background color of \framebox?, and Background color in Verbatim seem relevant, but don't answer this question, at least the way I would like. I also found http://groups.google.com/group/latexusersgroup/browse_thread/thread/c8c2e5dd1e9ff5cf, which has the following code               \documentclass{report}     \usepackage{fancybox, fancyvrb, calc}     \usepackage[svgnames]{xcolor}          \newenvironment{colframe}{%       \begin{Sbox}         \begin{minipage}           {\columnwidth-\leftmargin-\rightmargin-2\fboxsep-2\fboxrule-4pt}         }{%         \end{minipage}       \end{Sbox}       \begin{center}         \fcolorbox{black}{LightSteelBlue}{\TheSbox}       \end{center}     }          \begin{document}         \begin{colframe}         \begin{Verbatim}[frame=single]           auto eth0         \end{Verbatim}       \end{colframe}     \end{document}      For some reason this produces a double line round the box, but is in the ballpark of what I want. I would prefer a bgcolor option like `minted` has, so one can do something like the following code. I spent some time fiddling with this, but quickly realised I had no idea what I was doing. Maybe I'll learn how to program in LaTeX someday, but it probably won't be today. Thanks.               \documentclass{article}     \usepackage{xcolor}     \definecolor{bg}{rgb}{0.95, 0.95, 0.95}     \usepackage{minted} % syntax coloring.     \newminted{c}{frame=single, bgcolor=bg}     \begin{document}     \begin{ccode*}{}     for(int i=0; i< 5; i++)         x[i];     \end{ccode*}     \end{document}


title: Unbalanced output routine

text: The TeX primitive `\output` behaves almost like a toks register, except in the fact that it is always surrounded by braces. For instance, after `\output={\plainoutput}`, the result of `\showthe\output` is `{\plainoutput}`, instead of what we could naively expect (no braces). The status of the surrounded braces is a little odd. My specific problem happens when replacing the closing brace with an explicit or implicit end- group character which does not directly come from TeX's internal mechanisms. Specifically, compiling the following example in plain TeX triggers the `! Unbalanced output routine.` error at line 6: the first case works, but not the second.               \output{\plainoutput \afterassignment\next \let\next}     \hbox{} \vfill \penalty -10000          \def\Next{\next}     \output{\plainoutput \afterassignment\Next \let\next}     \hbox{} \vfill \penalty -10000      In both cases, I redefine the output routine, then force TeX to call it (with `\penalty-10000`). I keep the normal `\plainoutput` routine, and afterwards grab the closing brace in `\next`, and put it back, either directly (`\next`), or indirectly (`\Next`). In the first, direct, case, TeX recognizes the closing brace as being from the `\output` routine, while in the second case, TeX doesn't, and gets into a state where nothing I type has any effect.   1. Why are the two situations different?   2. Assuming that I have typed the code above in the command line, is there any way to recover?


title: Customizing Page Size in Memoir

text: How do I customize the size of the output pages in the `memoir class`? For example, how could I change the page size to `6x9` (while preserving the margin proportions and headers/footers I use) in the following MWE?               \documentclass[11pt,a4paper]{memoir}          % customize     \setstocksize{297mm}{210mm}     \settrimmedsize{\stockheight}{195mm}{*}     \settypeblocksize{671.6pt}{335.8pt}{*}     \setlrmargins{*}{*}{4}     \setulmargins{*}{*}{2}     \setmarginnotes{5mm}{45.23mm}{\onelineskip}     \setlength{\footskip}{3.0\baselineskip}     \checkandfixthelayout          % headers and footers     \nouppercaseheads     \makepagestyle{mystyle}      \setlength{\headwidth}{\dimexpr\textwidth+\marginparsep+\marginparwidth\relax}     \makerunningwidth{mystyle}{\headwidth}     \makeevenhead{mystyle}{\itshape\leftmark}{}{}     \makeoddhead{mystyle}{}{}{\itshape\leftmark}     \makeevenfoot{mystyle}{\thepage}{}{}     \makeoddfoot{mystyle}{}{}{\thepage}     \makepsmarks{mystyle}{\createmark{chapter}{left}{}{}{}}     \makeatletter     \makepsmarks{mystyle}{\createmark{chapter}{left}{shownumber}{\@chapapp\ }{:\ }}     \makeatother     \makepagestyle{plain}     \makerunningwidth{plain}{\headwidth}     \makeevenfoot{plain}{\thepage}{}{}     \makeoddfoot{plain}{}{}{\thepage}     \pagestyle{mystyle}          \begin{document}     Here is some text.     \end{document}      P.S. Currently, my document has `\documentclass[11pt,a4paper]{memoir}` at the top--does this control the page size?


title: fancybox conflict with fancyvrb?

text: > **Possible Duplicate:**   >  Error using \usepackage{fancyvrb, fancybox} I try to implement a simple environment to highlight source code in LaTeX. My solution is :   1. use `VerbatimOut` to write text in a file   2. use `\write18` to execute source-hightlight to handle the saved file   3. `\input` the result in the `\shadowbox` And it works. The code looks like:               %%%     %%% A simple environment used to highlight source code     %%% Only usable in linux with source-highlight installed     %%% wwthunan@gmail.com     %%% 2012-07-05 Thu 16:00 PM CST+0800     %%%          \usepackage[usenames, dvipsnames]{color}     \usepackage{fancybox} % must placed before "fancyvrb"     \usepackage{fancyvrb}          \newcommand{\SourceTabWidth}{4}          \makeatletter     %% USAGE:      %% \HandleCode{input}{output}{tabwidth}{source language}     \newcommand\HandleCode[4] {         \immediate\write18{source-highlight --tab=#3 --src-lang=#4 --out-format=latexcolor -i #1 -o #2}     }          %%      %% USAGE:     %% \begin{SourceCode}{language}     %%      ...code...     %% \end{SourceCode}     %%      \newenvironment{SourceCode}[1] %     { %         \def\mySourceCodeLanguage{#1}         \def\mySourceCodeInput{\jobname.code.#1}%         \def\mySourceCodeOutput{\jobname.hcode.tex}%         \VerbatimEnvironment%         %% codes option to make sure TAB intact         \begin{VerbatimOut}[codes={\catcode`\^^I=12}]{\mySourceCodeInput}}%     {\end{VerbatimOut}%         \HandleCode{\mySourceCodeInput}{\mySourceCodeOutput}{\SourceTabWidth}{\mySourceCodeLanguage} %         \shadowbox{%             \parbox{0.8\textwidth}{%             \input{\mySourceCodeOutput} %             }%         }%         %% delete temp files          \immediate\write18{rm \mySourceCodeInput; rm \mySourceCodeOutput}%     }     \makeatother      However, there is a problem. When I put `fancyvrb` before `fancybox` package.               [codes={\catcode`\^^I=12}]       option doesn't work, and a file `[.tex` will be created. So I guess `fancybox` have changed some internel state. But I can't figure it out. Any advice will be appreciated! Save the code to source-highlight.sty. The sample code(sample.tex) is:               \documentclass{article}     \usepackage{source-highlight}     \begin{document}     \begin{SourceCode}{cpp}     int main(int argc, char* argv[]) {         return 0;     }     \end{SourceCode}     \end{document}      And the compile command is:               pdflatex --shell-escape sample.tex


title: Tikz: Arrowheads in the center

text: For arrows I have gone through options like ->, ->>, <-, <<\- but havent found one for making the arrowhead appear in the center of the line of the curve (something like ->-) How do I do it in TIkz?


title: Test whether \end will really end the run

text: Can I test whether calling the `\end` primitive will really end the run? The naive `\ifdim\pagegoal=16383.99998pt yes\else no\fi` is not sufficient (even adding to that mix `\deadcycles`). According to Victor Eijkhout's _TeX by Topic_ , section 27.2: > The `\end` command --- which is only allowed in external vertical mode --- > terminates a TeX job, but only if the main vertical list is empty and > `\deadcycles=0`. Unfortunately, `\pagegoal` can be 16383.99998pt even with a non-empty main vertical list: the following produces one page of output.               \write16{}     \message{\the\pagegoal}     \end      There may be another way to do what I am trying to do. The context is that I have full control on every token that is sent to TeX (parsing TeX in TeX --- don't tell me I shouldn't), and I need to do some action after the last page is output (namely, write `</body></html>` to an file), in a reliable way. Doing it when the `\end` primitive is sensed may not be late enough.


title: header rule margin with boxes

text: I'm creating a document with a box in the header and an other one in the footer. But I would like to have the same space between the bottom of the top box and header rule and between the top of the bottom box and the footer rule. Here is an example:               \documentclass[onecolumn,twoside,openright,a4paper,11pt]{report}              \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}              \usepackage{xcolor}      \usepackage{blindtext}     \usepackage{lipsum}               %\usepackage[top=2.25cm, bottom=1.5cm, left=2.25cm, right=2.25cm]{geometry}           \usepackage{layout}     %\setlength{\hoffset}{1cm}          % 1     %\setlength{\voffset}{1cm}          % 2     %\setlength{\oddsidemargin}{0.5cm}  % 3      %\setlength{\evensidemargin}{-0.5cm}         %\setlength{\topmargin}{.cm}        % 4     %\setlength{\headheight}{17pt}      % 5      %\setlength{\headsep}{.5cm}         % 6      %\setlength{\textheight}{1cm}       % 7      %\setlength{\textwidth}{1cm}        % 8     %\setlength{\marginparsep}{1cm}     % 9     %\setlength{\marginparwidth}{1cm}   % 10      %\setlength{\footskip}{1.5cm}       % 11      %\setlength{\marginparpush}{1cm}    % 12     \setlength{\parindent}{57pt}          \usepackage{fancyhdr}        \fancyhf{}          \lhead[\textcolor{black}{A}]{\textcolor{gray}{B}}     \chead{\textcolor{red}{\fbox{C}}}                    \rhead[\textcolor{black}{D}]{\textcolor{gray}{E}}            \lfoot[\textcolor{gray}{page \thepage}]{\textcolor{gray}{F}}         \cfoot{\textcolor{red}{\fbox{G}}}                                    \rfoot[\textcolor{black}{\today}]{\textcolor{gray}{page \thepage / }}                 \fancyhfoffset{50pt}     \renewcommand{\headrule}{{%         \color{red}\hrule \headwidth \headrulewidth \vskip-\headrulewidth}}     \renewcommand\footrulewidth{\headrulewidth}     \renewcommand{\footrule}{{%          \color{blue}\vskip-\footruleskip\vskip-\footrulewidth     \hrule \headwidth \footrulewidth\vskip\footruleskip}}          \pagestyle{fancy}                 \begin{document}             \lipsum \lipsum      \end{document}      I tried to change all the values in the `layout` options but none of them change the space between the C `fbox` and the header rule or between the G `fbox` and the footer rule. I found nothing on the Internet about this kind of settings. Someone can help me to solve this ?


title: Voltage sign convention (European vs. American) in Circuitikz

text: This time I dive into Circuitikz. Anyway, I've got a problem with the american and european styles of e.g. voltages. IIRC Voltage drops are counted positive which means the voltage arrow in the pictures goes from `+` to `-`, where the current flows.               \documentclass{article}     \usepackage{tikz}     \usepackage[european]{circuitikz}     \begin{document}     \begin{circuitikz}%[american]       \draw       (0,0) node[ground] {}       to [V,v=$U_0$] (0,3) {}       to [cspst=$t_0$] (2,3) {}       to [L=$L$,v=$u_L$] (3,3) {}       to [R=$R$,v=$u_R$] (6,3) {}       to [C,l_=$C$,v^=$u_C$,i=$i$] (6,0) {}       to [ground] (6,0) {};     \end{circuitikz}     \end{document}      ![enter image description here](http://i.stack.imgur.com/OUsxh.png) ![enter image description here](http://i.stack.imgur.com/W34Tc.png) Please use with/without american option. Please note the signs in american and the arrows in european style which are opposite. As the result the equations would be different using the common laws. Is it a bug, intentionally or I'm wrong? Further more, this example shows some other problems: At european style the inductor's arrow is not shown/hidden. At american the inductor's signs are cluttered also. And, probably a TikZ problem, how to get the 2nd ground symbol? PS: What's the preferred way to append pictures/pdf here - where to store?


title: cmbright with Xelatex and lyx

text: Is it possible to use cmbright with xelatex for both math and text? The way to use it in the text is here Use cmbright with unicode text under XeLaTeX But the math still appear in usual latin form. COuld you help me? Fabien


title: Problem with pst-barcode when using \usepackage[utf8]{inputenc}

text: I've tried to use the pst-barcode to generate QR codes, and ran into an issue with foreign characters.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{pst-barcode}          \begin{document}     \begin{pspicture}(1in,1in)       \psbarcode{ÆØÅæøå}{width=1.0 height=1.0}{qrcode}     \end{pspicture}     ÆØÅæøå     \end{document}      ![Incorrect \(and complex\) QR code](http://i.stack.imgur.com/TwnAD.png)   _Incorrect (and complex) QR code_ This does not give the expected (or wanted) result. Removing the `\usepackage[utf8]{inputenc}` solves the pst-barcode problem:               \documentclass{article}     \usepackage{pst-barcode}          \begin{document}     \begin{pspicture}(1in,1in)       \psbarcode{ÆØÅæøå}{width=1.0 height=1.0}{qrcode}     \end{pspicture}     ÆØÅæøå     \end{document}      ![Correct QR code, but wrong encoding for text in LaTeX](http://i.stack.imgur.com/vjRI7.png)   _Correct QR code, but wrong encoding for text in LaTeX_ However, this breaks the input encoding of LaTeX... I presume that pst-barcode does not support UTF8. What would be the best way to get both UTF-8 encoded LaTeX and correct QR codes for foreign characters?