title: Tikz Drawing Arrow between nodes

text: \begin{tikzpicture}     \draw (0,2.5) node[minimum height=1cm,minimum width=3cm,draw] (A) {A};     \draw (5,0) node[minimum height=1cm,minimum width=3cm,draw] (B){B};     \draw (5,1.5) node[minimum height=1cm,minimum width=3cm,draw] (C) {C};     \draw (5,3) node[minimum height=1cm,minimum width=3cm,draw] (D) {D};     \draw (5,4.5) node[minimum height=1cm,minimum width=3cm,draw] (E) {E};          \draw[-latex] (A) -| (B);               \end{tikzpicture}      I managed to draw the boxed per my requirement, I want the arrow to connect to the left side of the box B. Not sure how to do it. Regards Aku


title: Expand LaTeX macros to modify

text: I am using the `polynom` package for polynomial long division. For example:               \documentclass{article}     \usepackage{polynom}          \begin{document}          \polylongdiv{x^3-x^2+d}{x-2}          \end{document}      Notice that I have another variable `d` there. `polynom` handles it well but calls it `1d`. ![screenshot](http://i.imgur.com/OfXBsN0.png) Is there any way to expand the code so I can edit out the `1`?


title: Macros: MS Word vs. TeX & friends

text: This is a follow-up question to How to convert TeX-illiterate coworkers to LaTeX?. To better demonstrate the power of TeX & friends and dismiss the competition (e.g. MS Word, Open Office), I need to cover all the bases. In particular, I know that MS Word offers the possibility of programming macros, to automate some repetitive tasks. I know close to nothing about Word macros and what they have to offer. Of course, I intend to do my homework and gauge their potential (or lack thereof :p ); but, for now, I'm interested in what you think. **If you are familiar with both Word macros and TeX & friends**, please give me your perspective on the comparative strengths & limitations of the former, when used to typeset a document.


title: Fill in boxes for forms in TikZ

text: I want to create a SEPA bank transfer form with IBAN How can I create a formfield with `N` fields, each 5 mm wide with separations like in the picture? ![formfield](http://i.stack.imgur.com/XS2UQ.png) At the moment I use a workaround with a for loop, but this renders the code hard to maintain. Finally I need a function `\formline{N}{cellwidth}{label}{value}` to create the complete formfield and fill it with an optional value: ![complete formfield](http://i.stack.imgur.com/Kg5EO.png) The following code is available on github too. 1               \documentclass[a4paper,11pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{shapes}          \thispagestyle{empty} % no pagenumber. The form should be a stand alone macro... later.          \definecolor{SEPAOrange}{RGB}{254,213,161}     \definecolor{SEPADOrange}{RGB}{253,185,19}     \definecolor{SEPABlindcolor}{RGB}{255,0,0}     \begin{document}     \begin{tikzpicture}[x=1 mm, y=-1mm]     \pgfmathsetmacro{\yh}{4.2333} % y heigth step defined as 1/6 inch => 1/6 * 25.4 mm = 4.2333 mm     \pgfmathsetmacro{\xs}{9} % x start (own definition)     \pgfmathsetmacro{\xe}{141.5} % x end (own definition)     \pgfmathsetmacro{\widefield}{4.9859} % def: 134.62 mm / 27     \pgfmathsetmacro{\narrowfiels}{3.9594} % def: 134.62 mm/ 34          \filldraw[draw=black,color=SEPAOrange] (7.62, 4.5*\yh) rectangle (149.86-7.62,105.83-1); %orange background          \filldraw[draw=black,color=white] (\xs, 5*\yh) rectangle (\xe, 6.5*\yh -1.5); %Recepient 27 Char     \foreach \x in {1,...,26}     {      \draw[color=SEPAOrange, line width=0.3mm] (7.62 + \x*\widefield, 5*\yh ) -- (7.62 + \x*\widefield, 6.5*\yh);      \draw[color=SEPAOrange, line width=0.7mm] (7.62 + \x*\widefield, 5.8*\yh ) -- (7.62 + \x*\widefield, 6.5*\yh);     }          \filldraw[draw=black,color=white] (\xs, 7*\yh) rectangle (\xe, 8.5*\yh -1.5); %IBAN 34 Char     \foreach \x in {1,...,33}      \draw[color=SEPAOrange, line width=0.3mm] (7.62 + \x*4, 7*\yh ) -- (7.62 + \x*4, 8.5*\yh);          \filldraw[draw=black,color=white] (\xs, 9*\yh) rectangle (\xe, 10.5*\yh -1.5); %BIC     \filldraw[draw=black,color=white] (\xe-12*5, 11*\yh) rectangle (\xe, 12.5*\yh -1.5); %Value 12 Char          \filldraw[draw=black,color=white] (\xs, 13*\yh) rectangle (\xe, 14.5*\yh -1.5); %Subject1     \filldraw[draw=black,color=white] (\xs, 15*\yh) rectangle (\xe, 16.5*\yh -1.5); %Subject2     \filldraw[draw=black,color=white] (\xs, 17*\yh) rectangle (\xe, 18.5*\yh -1.5); %Subject3          \filldraw[draw=black,color=white] (\xs, 19*\yh) rectangle (\xs+22*5, 20.5*\yh -1.5); % IBAN 22 Char          \filldraw[draw=black,color=white] (149.86-17.59, 19* \yh) rectangle (\xe, 20.5*\yh -1.5); % counter     \filldraw[draw=black,color=white] (\xs, 21* \yh) rectangle (42.52, 24.5*\yh); % date     \filldraw[draw=black,color=white] (42.52+5, 21*\yh) rectangle (149.86-17.59, 24.5*\yh); % signature          \draw[color=SEPADOrange] (0, 4.5 *\yh) --(149.86, 4.5*\yh); upper dark orange line     \draw[color=SEPADOrange] (0, 20.5 *\yh) --(149.86, 20.5*\yh); lower dark orange line     \draw[draw=black,color=black, line width=0.3mm] (0,0) rectangle (149.86,105.83); % black border     %\draw[align=left] at (\yh,\yh) {SEPA-Überweisung};          \end{tikzpicture}     \end{document}


title: Different content if command returns empty text (ConTeXt)

text: I have the following code in my ConTeXt environment:               \startsetups[sectioninfo]     \ss       \rlap{\userpagenumber}       \hfill       § \getmarking[sectionnumber][current]       \emspace       \bf \getmarking[section][current]       \hfill       \llap{}     \stopsetups          \setupheadertexts[\setups{chapterinfo}][]                      []                    [\setups{sectioninfo}]      My intention here is pretty simple; I want the page number on the left and the section name in the middle. However, if there's no section defined in this chapter yet, it will show the name of the last section defined in the previous chapter, or the one before that, and so forth, which is undesirable. It's also undesirable in the front matter, where no sections have yet been defined, to see the § in the header. So I'm asking three questions:   1. How does one conditionally display one thing or another, in particular if one thing is blank or empty in some sense? I think I mean this in a TeX sense primarily, but if there's a ConTeXt-specific way of doing this, that's fine too.   2. How does one determine if `\getmarking[section][current]` is giving me something from the previous chapter, or is there a different parameter to `\getmarking` that can be passed to get the most recent section _in this chapter only_? Any resources you can point me towards would be greatly appreciated! Thanks!


title: Help with a framed environment

text: Upon trying to create a framed environment using the `framed` package, I stumbled upon a problem I have not been able to resolve. What I am trying to achieve is the following: ![enter image description here](http://i.stack.imgur.com/iSjPD.png) Unfortunately with the code:               \documentclass[letterpaper]{article}     \usepackage{xcolor}     \usepackage{calc}     \usepackage{framed}          \newenvironment{defn}[1]{%     \def\FrameCommand{\fboxsep=\FrameSep%     {\color{#1}\hfil\hbox to \hsize{\leaders\hrule height 2pt depth 2pt\hfil}\hfil}\colorbox{yellow!20}%     }%     \MakeFramed {\advance\hsize -\width \FrameRestore}}%     {\endMakeFramed}     \begin{document}     \begin{defn}{blue}     test test     \end{defn}          \end{document}      I get ![enter image description here](http://i.stack.imgur.com/6b2NF.png) The problem is clear, the frame color is correct but the horizontal rule is not being placed correctly. I know that there should be some form of a `\vskip` or the sort but I cannot get how to put. If this has been asked, please redirect me. I prefer using the `framed` package (but and `mdframed` one is welcome.)


title: how to get the ws-procs9x6 document class to work with subcaption package?

text: I have a problem concerning the `ws-procs9x6` document class furnished by a conference. I can't get it work with the `caption` & `subcaption` or even `subfig` packages to work with it, which is a problem as I can't place my figures in my paper. Do you know how to make it work? The error I get is: > Command `\captionbox` already defined. \caption@withoptargs\caption@box}" > and "Unsupported document class (or package) detected,(caption) usage of the > caption package is not recommended." Here's a simple code :               \documentclass{ws-procs9x6}     \usepackage{subcaption}          \begin{document}     \begin{figure}     \psfig{file=coucou.eps,width=4.5in}     \caption{Coucou}     \label{fig:coucou}     \end{figure}     \end{document}


title: How to write $\~{B}$

text: How to write $\~{B}$ in latex. During writing it shows that ! Please use `\mathaccent` for accents in math mode. Please suggest me.


title: Smaller font size in quote environment relative to context

text: I want to have all quotes in the quote-environment in a smaller font. This is possible with the etoolbox-package and the command:               \AtBeginEnvironment{quote}{\small}      But if I use a quote-environment in a footnote, the quotation is set to fontsize 'small' and therefore larger than the footnote-size. In the footnote I would like it better to have the same size as the footnote text. Is it possible to redefine the quote-invironment relative to the context?


title: Why isn't XeTeX properly mapping this Th ligature to T_h?

text: I realize I am using a proprietary font here, but this is where I discovered this problem (it also applies to other ligatures as well as old style numbers).               \documentclass{article}     \usepackage{fontspec}     \setmainfont[             Path = M:/MyStuff/Fonts/timesnewroman6.80/,             UprightFont = times.ttf,             Ligatures = Discretionary]{tnr}     \begin{document}     Th     \end{document}      ![enter image description here](http://i.stack.imgur.com/25ulI.png) When I copy and paste this from the pdf, on the other hand, I get instead of the expected `Th`. Looking at how this ligature has been encoded (using FontForge), everything seems to have been done properly: ![enter image description here](http://i.stack.imgur.com/n5wSI.png) ![enter image description here](http://i.stack.imgur.com/YmvMn.png) ![enter image description here](http://i.stack.imgur.com/SDt2i.png) ![enter image description here](http://i.stack.imgur.com/S7An4.png)


title: show all equals

text: I'd like to show that for some function `C`, if `x_1 = x_2 = \ldots = x_n` then               \[C(\frac{1}{n}\sum_{i=1}^n x_i) = C(x_1) = C(x_2) = \ldots = C(x_n)\]       is there a way to do this with a single big equals sign just like the sum?


title: Polyline shading in TikZ

text: Is it possible to apply a shading effect on one side of a polyline in TikZ? I have the following simple code               \begin{tikzpicture}     \draw (1.06,9.56) -- (1.44,9.78) -- (1.78,9.56) -- (2.14,9.79) -- (2.48,9.29)               -- (2.83,9.79) -- (3.17,9.54) -- (3.54,9.76) -- (3.87,9.56);          \draw (1.06,8.94) -- (1.44,8.72) -- (1.78,8.93) -- (2.14,8.71) -- (2.48,9.21)                -- (2.83,8.72) -- (3.17,8.96) -- (3.54,8.74) -- (3.87,8.94);     \end{tikzpicture}      I want some shading above the upper line and below the lower line, as the lines represent air-solid boundaries and I need to convey this graphically.


title: How to prepare a template for a journal

text: I want to prepare a template for the new launch journal in LaTeX. How to prepare template in LaTeX for a journal? Is there any package for it? Please help in this regard. sushil


title: Splitting a CSV list from a xkeyval key argument into parts

text: Is it possible to store the key value argument (a cvs list) to a macro (via `\def`) and split/further process the content of that macro with `\forcsvlist` command from `etoolbox` package? I want to provide a list of index entries, separated by `,` such that each entry can be formatted and layout in a special way (as index/glossary, details will still have to be defined). It is possible (see MWE) to use the `\index` command directly in the body definition of the `\define@key` \- command within a a `\forcvslist` statement, leading to some kind of `\immediate\write` to the index file. I rather want to process the entries of the cvs list later on, say, in a special command called `\MyCmd`, saying `\forcvslist{\index}{\KVMacroCSVList}`, where the `\index` command may be wrapped by another one expecting the list splitting input as last argument. However, even the simplified form with `\index` as argument to `\forcsvlist` fails with the error message > ! Undefined control sequence. \string \indexentry {\KVMacroCSVList > }{\thepage } l.47 \MyCmd[IndexList={First,Second}] Here is my non-working MWE:               \documentclass{scrbook}     \usepackage{etoolbox}     \usepackage{makeidx}     \usepackage{xkeyval}          \makeatletter          \def\KeyFamilyName{SplitListFamily}          \define@key{\KeyFamilyName}{IndexList}[]{%     %Fails to recognize the comma input, does not split!!!     \def\KVMacroIndexList{#1}%     % Generating the index for testing purposes only     \index{#1}%     }%                    \define@key{\KeyFamilyName}{CSVList}[]{%       \def\KVMacroCSVList{#1}%       \forcsvlist{\index}{#1}% Works      }%                    \newcommand*{\MyCmd}[1][]{%     \setkeys{\KeyFamilyName}{#1}%          % Assume that \KVMacroCSVList is defined      % Process and format the List%     % However this fails     \forcsvlist{\index}{\KVMacroCSVList}%     }%          \makeatother          \makeindex%     \begin{document}          \chapter{Einstein's theory of relativity}%          \MyCmd[IndexList={First,Second}]          \MyCmd[CSVList={First,Second}]          \printindex     \end{document}      Here is an image that shows the behaviour, if one comments `\forcsvlist` in `\MyCmd`. The separate entries stem from the second call to `\MyCmd`, where as the single line originates from the first call to `\MyCmd`. ![enter image description here](http://i.stack.imgur.com/C992x.jpg) Is it an issue of `\expandafter`, `\protected` etc? **Edit** I am not sticking to `\forcvslist`, another approach will do also.


title: Small caps in footnote in title (amsart)

text: I am trying to add a footnote to a title in `amsart` in small caps, but constantly end up with upper case characters (even in math mode!)               \documentclass{amsart}     \title{ text \footnote{ text }}     \begin{document}     \maketitle     \end{document}      How can I get small caps in the footnote?


title: Installing Package Trouble

text: I've tried following several tutorials on installing a package and still can't get it to work. Here's what I'm using on Ubuntu:               $ pdflatex -v     pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)     kpathsea version 5.0.0     Copyright 2009 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.2.46; using libpng 1.2.46     Compiled with zlib 1.2.3.4; using zlib 1.2.3.4     Compiled with poppler version 0.18.2      I'm trying to install the `subcaption` package (which I guess needs several other files as well, according to the CTAN site for it). Is there not a simple way to get a package, e.g. just executing a single command to install it? Here's one tutorial I tried, namely the "Manual installation" part since the `tlmgr` command isn't recognized. I should mention that in step 2 in the installation instructions I get an error that certain other `.sty` files weren't found, e.g. `thumbpdf.sty` wasn't found when I executed `pdflatex caption.sty`, so I skipped this step since it doesn't seem necessary for the packages to be used. I then copied both `subcaption.sty` and `caption.sty` to `~texmf/tex/latex/` and ran `sudo texhash`. There are no `.map` files, so this seems to be all I need to do, and yet I still get the error               ! LaTeX Error: File `caption.sty' not found.      when compiling my `.tex` file that uses the `subcaption` package (is it weird that `caption` is not included in my tex file, yet this is the missing file? I only have the command `\usepackage{subcaption}`). Any help is appreciated!


title: Why is there extra whitespace to the left of this standalone document when using siunitx?

text: I'm using the `standalone` document class. Here is a minimal working example:               \documentclass{standalone}          \usepackage[siunitx]{circuitikz}          \begin{document}         Hello world     \end{document}      The problem lies with `siunitx`. Using any of the following preamble lines do not result in the extra whitespace:               \usepackage{tikz}        % or     \usepackage{circuitikz}      But the following preamble lines result in the extra whitespace:               \usepackage[siunitx]{circuitikz}  %or     \usepackage{siunitx}      The problem also appears when I draw figures in a `circuitikz` environment. Why is there extra whitespace to the left of the compiled PDF? How do I get rid of it?


title: Referencing a line starting with a keyword in algorithm2e

text: I want to describe parts of an algorithm, by linking to specific lines. I found that the package `algorithm2e` is great for typesetting algorithms, and it seems it is also able to handle labels. However, it doesn't seem to work as expected. Do I miss something in the correct syntax? As an example, see the MWE below, with its output. First and third attempts show that the `\ref` links to the line above the one I want to label. The second attempt is correct, except it skips a line. However, I assume it is normal, since this syntax is supposed to manually number a line when automatic numbering is disabled. I just included it here for completeness. Please note that the issue appears at least with `\For`, `\ForEach` and `\If` so I assumed it is the same for all keywords, that may of course be wrong. ## Code:               \documentclass{article}          \usepackage[linesnumbered]{algorithm2e}          \begin{document}          \begin{algorithm}       \caption{Algorithm 1}       First line \;       \label{line1}\For{Condition}{         Third line\;       }     \end{algorithm}          I want to refer to line 2: \ref{line1}.          \begin{algorithm}       \caption{Algorithm 2}       First line \;       \nl\label{line2}\For{Condition}{         Third line\;       }     \end{algorithm}          I want to refer to line 2: \ref{line2}.          \begin{algorithm}       \caption{Algorithm 3}       First line \;       \nllabel{line3}\For{Condition}{         Third line\;       }     \end{algorithm}          I want to refer to line 2: \ref{line3}.          \end{document}      ## Result: ![Output](http://i.stack.imgur.com/uERuj.png)


title: biblatex won't compile with XeLaTeX and print bibliography

text: I have been testing out `biblatex` to get more control over the bibliography format that you get from BibTeX. Therefore I have been trying to get this to compile. The problem is that bibliography does not print but the citations do. Here is the current minimal working example of the document I am using to test out `biblatex`:               \documentclass[a4paper,12pt]{article}     \usepackage{fontspec}     \usepackage[backend=bibtex]{biblatex}     \usepackage{fancyhdr}     \usepackage{lastpage}     \usepackage{setspace}     \usepackage{url}     \addbibresource{References.bib}     \pagestyle{fancy}     % clear any old style settings     \fancyhead{}     \fancyfoot{}     %new settings     \lhead{\footnotesize {Sebastian Stephenson}}     \rhead{\footnotesize{2812193}}     \rfoot{{\thepage} of \pageref{LastPage}}     %for hardvard style citation (check with a person at tutorial to see if what is being complied is ok)     %\citestyle{agms}     % addfont Times New Roman     \setmainfont{Times New Roman}     \begin{document}     \begin{doublespacing}         \title{The French New Wave}         %to remove the date that is added when it gets complied         \date{}         \maketitle         %Because the maketitle command has been used, it automatically         %issues \thispagestyle{plain} which overrides the fancy headings for         %this page.  Must now tell Latex to override this         \thispagestyle{fancy}         The French New Wave represents a diverse...Two by Jean-Luc Godard: Á bout du shofflle(Breathless)\cite{godardfilmb}and Alphaville\cite{godardfilma} and one by Jacques Rivette called Céline et Julie vont en bateau (Céline and Julie Go Boating)\cite{rivettemovie}.                    French New Wave would produce chain reactions around Europe\cite{newwavegen}. The work done during this period is important for medium of film.                   \end{doublespacing}         % \newpage         \defbibheading{Bibliography}         \printbibliography% [nottype=video]         % \defbibheading{Filmography}         %   \printbibliography[type=video]         \end{document}      The `\usepackage[backend=bibtex]{biblatex}` is because this is coming up in the log but does not seem to change anything.               Package biblatex Warning: Data encoding is 'utf8'.     (biblatex)                Use backend=biber.          (./Essay.bbl          Package biblatex Warning: BibTeX reported the following issues     (biblatex)                with 'rivettesense':     (biblatex)                - Invalid format of field 'month'.               Package biblatex Warning: BibTeX reported the following issues     (biblatex)                with 'sensegodard':     (biblatex)                - Invalid format of field 'month'.               Package biblatex Warning: BibTeX reported the following issues     (biblatex)                with 'reviewgoboating':     (biblatex)                - Invalid format of field 'month'.               Package biblatex Warning: BibTeX reported the following issues     (biblatex)                with 'godardportrait':     (biblatex)                - Invalid format of field 'month'.               Package biblatex Warning: BibTeX reported the following issues     (biblatex)                with 'madmen':     (biblatex)                - Invalid format of field 'month'.          )      This is what they entry for `rivettesense` is like. I did change the entry types which would have been in misc in the working original to try out the new entries I could use as well. in the origianl bib file this would have been under `@misc`               @online{rivettesense,     author={Saul Austerlitz},     title={Jacques Rivette | Senses of Cinema},     month={January},     year={2003},     url={http://sensesofcinema.com/2003/great-directors/rivette/},     publisher={Senses of Cinema},     address={Melbourne},     note={[30/10/12]}     }      If you need any more information, please comment below. Thank you very much


title: How to make a heading for an enumeration

text: I would like to do enumerations of the following form:               Here are some important points:         1. Stay productive         2. Discuss people, instead of ideas         3. Drink lots of beer      However, `\begin{enumerate}` inserts a large vertical space before the start of the list. How do I cope with this? The text, that I want to be glued to the list can be either a specific mini-heading (as in the example above), or be normal paragraph, in which I want to include enumeration, but not break the body of text in more than one paragraph (i.e. no space after the enumeration as well). By the way, here is what I am getting now:               Here are some important points:                        1. Stay productive         2. Discuss people, instead of ideas         3. Drink lots of beer


title: Create a static box in LaTeX

text: How can I make a command to automate the creation of a box? This box would enclose texts or statements, questions and the like when the command is used. Example: ![command and desired output](http://i.stack.imgur.com/OkaL8.png)


title: Incorrect reflection in Index part

text: I have the next defined command:               \def\underscore{\_\nobreak\hfil\protect\penalty0\hfilneg}      Then I want to set some text that usese my command into index:               \index{Items! New\underscore\Item}      I get incorrect reflection in Index part of my document: Items                  M Item      I cannot understand what I do wrong?


title: TikZ block diagram with multiple arrows not from centre of block

text: I'm trying to create a rather simple diagram but I don't know how to get the multiple arrows on the left not leaving the centre of the node. ![The block diagram I would like to create](http://i.stack.imgur.com/8Vqzh.png)


title: some Figures are cut from right side in dvi but correct when using the tex file

text: I am using winedt 6.0 and miktex 2.9 when i compile in winedt 6.0 using `ctrl`+`shift`+`p` , the output pdf file is perfect. but when creating the dvi file, some figures (eps files) are cut from the right side, i tried to make the figure smaller but still have the same problem. Sample :               \documentclass{IEEEtran}     \usepackage{graphicx}      \usepackage[cmex10]{amsmath}     \usepackage{balance}     \usepackage[numbers,square, sort&compress]{natbib}          \usepackage{epstopdf}          \begin{document}          \section{Introduction}          I am using winedt 6.0 , when i press Ctr+shift+p the pdf file is created without any    problems. But i need the (.dvi) file for the conference, when i create the dvi file some figures are cut from the right side and other are fine.           I am converting matlab figures to eps (save as eps), then used the command epstool.exe --bbox --copy old.eps new.eps . I tried also changing the width at includegraphic but still have the same problem.      \begin{figure}[t]     \centering     \includegraphics[keepaspectratio = false,width=0.95\linewidth, height =4.7cm]{fig2Resized2N.eps}     \caption{PCR versus the SNR for 3 available relay nodes case}     \label{PCR_vs_SNR}     \end{figure}          \end{document}      The eps file in the linke beow: http://www.mediafire.com/download/w055y467pcqmoko/fig2Resized2N.eps


title: enumitem package and description lists

text: Why does the following generate an error?               \documentclass{article}          \usepackage{enumitem}     \begin{document}      \begin{description}[label=\emph{\alph*})]      \item [aaa] bbbb      \item [eee] əəəə       \end{description}     \end{document}


title: Are there purely expandable variants of \MakeUppercase?

text: `\MakeUppercase` and `\uppercase` use TeX's uccode, and they are not purely expandable. Say,               \edef\temp{\MakeUppercase{abc}}      will fail. Sometimes purely expandable macros are very useful. They are robust, for example. I think we can use string substitution to implement such a function. Ideal result would be:               \Uppercase{abc} % expanded to -> ABC      And may also be:               \GetUppercase{abc} % \result is expanded to -> ABC      So far, what I can do, is this:               % \getuppercase{abc} => \result :-> A     \def\getupperchar#1{%       \edef\result{\ifcase`#1\relax          0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or 9\or         10\or11\or12\or13\or14\or15\or16\or17\or18\or19\or         20\or21\or22\or23\or24\or25\or26\or27\or28\or29\or         30\or31\or32\or33\or34\or35\or36\or37\or38\or39\or         40\or41\or42\or43\or44\or45\or46\or47\or48\or49\or         50\or51\or52\or53\or54\or55\or56\or57\or58\or59\or         60\or61\or62\or63\or64\or A\or B\or C\or D\or E\or          F\or G\or H\or I\or J\or K\or L\or M\or N\or O\or          P\or Q\or R\or S\or T\or U\or V\or W\or X\or Y\or          Z\or91\or92\or93\or94\or95\or96\or A\or B\or C\or          D\or E\or F\or G\or H\or I\or J\or K\or L\or M\or          N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or          X\or Y\or Z\or123\or124\or125\or126\or127\or128\or129\or         \fi}}      And this can be used to implement a naive variant of `mfirstuc`:               % \getfirstupper{abc} => \result :-> Abc     \def\getfirstupper#1{%       \getupperchar{#1}%       \edef\result{\result\gobble#1}}     \def\gobble#1{}      However, I cannot implement the full `\Uppercase` or `\GetUppercase` this way. I wonder if there is a smart way to define such commands. Any information is welcome. BTW, I know LuaTeX can be used, but I'm looking for a pure TeX solution.


title: How do I properly display chemical compounds within \equation? (mhchem won't do what I need)

text: I am trying to programmatically convert a very large number of documents that have chemical compounds represented within math equations. I am converting from some flavor of RUNOFF (I think..it isn't well documented). I am having a few related problems displaying compounds both in and outside of equations. The mhchem package is great until I encounter decimal values within a compounds formula (as shown below). What I need is for the compound to be displayed in normal (non-italicized) type. There are four lines in the body below that illustrate my issues. The first line results in the compound being italicized. The second illustrates a related problem, that being that the portion enclosed in parenthesis is italicized. The third is how the `\ce` command handles a decimal point. The fourth shows a workaround for using the `\ce` command. The third and fourth lines also result in the equation number being flush with the equation instead of over on the right margin -- why?               \documentclass{article}     \usepackage{ulem}     \usepackage{fixltx2e}     \usepackage[version=3]{mhchem}     \usepackage[utf8]{inputenc}     \usepackage{textcomp}     \begin{document}     \begin{equation} X_{Li_{2}(SO_{4})_{0.5}} \end{equation}          Li_{2}(SO_{4})_{0.5}          \begin{equation} X_{\ce{Li2(SO4)0.5} \end{equation}          \begin{equation} X_{\ce{Li2(SO4)_{0.5}} \end{equation}     \end{document}      I've started looking into perhaps doing some Lua or modifying `mhchem.sty`. I've also tried using `\text{}`, `\textnormal{}`, etc. within my equation but apparently I haven't done it correctly yet. I am not terribly experienced with `LaTeX` and was hoping that somebody with more experience than me might step forward with something tidy. Thanks for any help!!


title: Manually installed font looks bit-mappy and conflicts with microtype

text: Following the instructions here I tried to install the Vollkorn font. Now, after some fiddling (see the comments on the above linked blog post) I managed to get the font to work, but there are some problems. First, it looks kind of jagged. ![Vollkorn looks bitmappy](http://i.stack.imgur.com/8zEgV.png) Second, loading the `microtype` package seems to break it. I get this error:               LaTeX Font Warning: Font shape `LY1/vkn/bx/n' in size <10> not available     (Font)              Font shape `LY1/vkn/b/n' tried instead on input line 17.          [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}     ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.                             \endgroup \set@typeset@protect      l.22 \end{document}          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on test.log.      Also, running `pdffonts test.pdf` gets me some odd results:               name                                 type              emb sub uni object ID     ------------------------------------ ----------------- --- --- --- ---------     [none]                               Type 3            yes no  no       4  0     [none]                               Type 3            yes no  no       5  0     [none]                               Type 3            yes no  no       6  0      Something isn't working, but I'm not quite sure what. Any pointers on how to diagnose the problem? Minimal example (although you probably could have worked this out yourself)               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{microtype}     \usepackage{vollkorn}     \usepackage{lipsum}     \begin{document}     \textbf{Bold} \textit{Italic}     \lipsum[1]     \end{document}      Log with Microtype | Log without Microtype


title: Indent list bullet and add space between bullet and text

text: I am using this snippet to make list with default document line interval and it also indents only first line.               % Compact list     \newenvironment{compactlist}{      \begin{list}{{$\bullet$}}{       \setlength{\partopsep}{0pt}       \setlength{\parskip}{0pt}       \setlength{\parsep}{0pt}       \setlength{\topsep}{0pt}       \setlength{\itemsep}{0pt}       \setlength{\itemindent}{\leftmargin}       \setlength{\leftmargin}{0pt}      }     }{      \end{list}     }      But it indents text to default indentation level. How can I set up two horizontal spaces: between left margin and bullet (1.25cm), and between bullet and text (0.63cm)? update:               \usepackage{indentfirst}     %\setlength{\parindent}{1.25cm} %uncomment to break indentation      Looks like I need first to make lists respect indentadion level which was set for \parindent. ![list_indentation](http://i.stack.imgur.com/aGqK6.png)               \documentclass[oneside,draft,14pt]{extreport}     \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english, russian]{babel}     \usepackage{vmargin}     \setpapersize{A4}     \fussy     \usepackage{setspace}     \onehalfspacing          \usepackage{indentfirst}     %\setlength{\parindent}{1.25cm} %uncomment to break indentation          % List with default line intervals     \newenvironment{compactlist}{      \begin{list}{{$\bullet$}}{       \setlength{\partopsep}{0pt}       \setlength{\parskip}{0pt}       \setlength{\parsep}{0pt}       \setlength{\topsep}{0pt}       \setlength{\itemsep}{0pt}       \setlength{\itemindent}{\leftmargin}       \setlength{\leftmargin}{0pt}      }     }{      \end{list}     }          \begin{document}          In 1778, John Parke Custis purchased an 1,100-acre (450 ha) tract of     forested land on the Potomac River north of the town of Alexandria,     Virginia.          \begin{compactlist}      \item This land became the Arlington Estate. John Custis died in     September 1781, and in 1799 his son, George Washington Parke Custis     ("G.W.P.") step-grandson of George Washingto inherited the site. G.W.P     Custis and his wife, Mary, moved onto the estate, and between 1802 and     1814 they constructed Arlington House;      \item The Custises extensively developed the site.     \end{compactlist}          Much of the steep slope to the east of the house     became a cultivated English landscape park, while a large flower     garden with an arbor was constructed and planted south of the house.          \end{document}


title: problem in generating a reference

text: I had a problem with this reference, can someone assist me with it?. I do not know what could be wrong!.               @article{nnnnn,      author = {hku khfd},      journal = {Opt. Express},      keywords = {Guided waves; Surface plasmons},     number = {10},      pages = {329-335},      publisher = {OSA},     title = {Plasmon-polariton modes guided by a metal film of finite width bounded by different dielectrics},      volume = {7},      month = {Nov},     year = {2000},     url = {http://www.opticsexpress.org/abstract.cfm/URI=oe-7-10-329},     doi = {10.1364/OE.7.000329},     abstract = {hjjkjkgffdfs.},     }          @article{Jestl:89,        author   = {M. Jestl and I. Maran and A. K\"{o}ck and W. Beinstingl and E. Gornik},        journal  = {Opt. Lett.},        keywords = {},        number   = {14},        pages    = {719--721},        publisher= {OSA},        title    = {Polarization-sensitive surface plasmon Schottky detectors},        volume   = {14},        month    = {Jul},        year     = {1989},        url      = {ol.osa.org/abstract.cfm?URI=ol-14-14-719},        doi      = {10.1364/OL.14.000719},        abstract = {A polarization detectory.},      }


title: pgfgantt: Is it possible to create bars with "double" labels?

text: here's a problem I have: I want my gantt bars to have two types of labels -- one on the side of the chart, and one inline -- and I'm having a hard time making it work. The code I use to generate the chart is listed below:               \begin{ganttchart}[     vgrid,     x unit=1cm,     title height=1]{12}{12}       \gantttitle{Quarters}{12} \\       \gantttitlelist{1,...,12}{1} \\       \gantttitle{Year 1}{4}       \gantttitle{Year 2}{4}       \gantttitle{Year 3}{4}\\     \ganttbar{WP1 Theoretical part}{1}{5} \\     \ganttbar{WP1 Experimental part}{2}{6} \\     \ganttbar{WP2 Theoretical part}{7}{11}\\     \ganttbar{WP2 Experimental part}{8}{12}\\     \ganttbar[bar/.append style={fill=gray,pattern=north east lines}]{WP3 Theoretical part}{6}{12}\\     \ganttbar[bar/.append style={fill=gray,pattern=north east lines}]{WP3 Experimental part}{7}{12}     \end{ganttchart}      And the idea is to have WPx labels on the left of the chart, but "Theoretical/experimental part" labels inside the bars. Is it possible to make this with pgfgantt?


title: pdfx and "undefined control sequence" caused by Subject meta-tag

text: According to the pdfx documentation it should be possible to add a Subject field to the XMP metadata file. Addition of this field however seems to cause an unexpected error during compilation of the LaTeX source into a PDF/A-1b file (pdfLaTex). Try to compile the following source:               \documentclass[a4paper, 12pt]{article}     \usepackage[a-1b]{pdfx}     \begin{document}     Hello, World!     \end{document}      using this metadata:               \Author{Me}     \Title{Hello, World!}     \Subject{Hello, World! example.}     \Org{Me}     \Keywords{Hello\sep World}      The source compiles without errors after omission of the Subject tag. Thanks.


title: How specify tree levels nodes sizes?

text: I am working on a TikZ tree following the tutorial called `A Lecture Map for Johannes` from the TikZ manual. I am having trouble to get nodes from deeper level smaller than ones of previous level. I am not able to modify the following example to get this effect that seems to be done by default according to the documentation (because nothing is mentioned to do that). In the following example, with TexLive 2012/Debian, all the levels have the same size (even for the ones with smaller font). How should I change that ?               % Models of conurrency as a treewing the      \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{trees}     \usetikzlibrary{shadows}     \usetikzlibrary{mindmap}          \begin{document}          \begin{tikzpicture} [         mindmap,          every node/.style={concept, circular drop shadow, execute at begin node=\hskip0pt},          root concept/.append style={color=black, fill=white, line width=1ex, text=black},         shared concept/.append style={concept color=green!60!black},         %text width=2.5cm,         text=white,         grow cyclic,          align=flush center,         level 1/.style={level distance=5.5cm, sibling angle=90},         level 2/.style={level distance=5.5cm, sibling angle=55, font=\small}]     ]       \node[root concept, font=\bfseries] {Concurrency Programming Models}                    child [shared concept] { node {Shared State}                       child { node {Lock based}}                      child { node {Transaction based}}                    }                    child [concept color=orange]{ node {Message Passing}                       child { node {Asynchronous}}                      child { node {Synchronous}}                    }                    child [concept color=purple] { node {Functional Reactive Programming}                    }                    child [concept color=blue!80!black] { node {Declarative Concurrency}                    } ;                \end{tikzpicture}          \end{document}


title: Bibliography style - [AUTH YEAR]

text: I'm looking for a bst bibliography style that I could use, but I cannot find any site where I could see any list of styles ot theirs names. I would like my bibliography to be in a format:               [ALSA 1992] Alsabbagh J.R., Raghavan V.V., A framework for multiple query optimization, w:                  Proc. of Intern. Conf. on Data Eng., 1992, s. 157 − 162.       [BATO 1986] Batory D.S., et al, Extensible cost model and query optimization in Genezis, IEEE                  Database Eng., vol.9, No.4, 1986, s. 30 − 37.      I found only a similar style that is called _wmaainf_. Does anyone know where I could find a style that I described earlier?


title: references not printing

text: I've googled this (seems to be a problem others are having) and tried numerous things to no avail (including reinstalling both JabRef and MikTEx). 3 hours later I'm broken. My woes started when I deleted MikTex from my system and then reinstalled (I thought I was updating turns out 2.9 was what I had already). Now when I run mikTex no references in my documents will print (The PDF outputs with no reference section and the in text citations are bolded as if they don't exist or JabRef and MikTex aren't communicating). Thank you in advance. Here's what I'm using:               \documentclass[leavefloats]{apa6e}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=apa]{biblatex}     \addbibresource{Psychometrics}     \DeclareLanguageMapping{american}{american-apa}     \usepackage{enumerate}     \usepackage{hyperref}     \usepackage{graphicx}     \usepackage{ragged2e}     \usepackage{textcomp}     \usepackage[section]{placeins}     \usepackage{setspace}     \usepackage{appendix}     \usepackage{float}     \usepackage{subfig}     \usepackage{amsmath}     \usepackage{color}     \usepackage{ifthen}     \defbibheading{bibliography}{%     \section{\normalfont\refname}}     \title{TITLE}     \shorttitle{TITLE}     \author{ME}     \authornote{Nothing}     \date{\today}     \begin{document}     \maketitle          stuff          \cite{Bennett1954}     \clearpage      \printbibliography     \end{document}      I'm using MikTex 2.9 with JabRef 2.8 with winEdt 7 on a win 7 machine. The bib file `Psychometrics.bib` is located in the directory that the .tex file is located. **Here's the output:**               Command Line:   bibtex.exe "example"     Startup Folder: C:\Users\trinker\Desktop\PhD Program\CEP 510 Psychometrics\Assignments\Final paper          This is BibTeX, Version 0.99d (MiKTeX 2.9)     The top-level auxiliary file: example.aux     I found no \citation commands---while reading file example.aux     I found no \bibdata command---while reading file example.aux     I found no \bibstyle command---while reading file example.aux     (There were 3 error messages)               Command Line:   texify.exe --pdf --tex-option=--interaction=errorstopmode --tex-option=--synctex=-1 "C:\Users\trinker\Desktop\PhD Program\CEP 510 Psychometrics\Assignments\Final paper\example.tex"     Startup Folder: C:\Users\trinker\Desktop\PhD Program\CEP 510 Psychometrics\Assignments\Final paper          This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)     entering extended mode          ("C:/Users/trinker/Desktop/PhD Program/CEP 510 Psychometrics/Assignments/Final      paper/example.tex"     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat     vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm     an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,      romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis     sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u     senglishmax, welsh, loaded.     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\apa6e\apa6e.cls     Document Class: apa6e 2011/03/03 v0.3 APA 6e manuscript formatting     ("C:\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\MiKTeX 2.9\tex\latex\base\size12.clo"))     ("C:\MiKTeX 2.9\tex\latex\psnfss\times.sty")     ("C:\MiKTeX 2.9\tex\latex\psnfss\mathptmx.sty")     ("C:\MiKTeX 2.9\tex\latex\geometry\geometry.sty"     ("C:\MiKTeX 2.9\tex\latex\graphics\keyval.sty")     ("C:\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")     ("C:\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty")     ("C:\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")     ("C:\MiKTeX 2.9\tex\latex\geometry\geometry.cfg"))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\ms\ragged2e.sty     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\ms\everysel.sty)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\footmisc\footmisc.sty))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\fancyhdr\fancyhdr.sty)     ("C:\MiKTeX 2.9\tex\latex\float\float.sty")     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption.sty     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption3.sty))     ("C:\MiKTeX 2.9\tex\latex\base\ifthen.sty"))     ("C:\MiKTeX 2.9\tex\generic\babel\babel.sty"     *************************************     * Local config file bblopts.cfg used     *     ("C:\MiKTeX 2.9\tex\latex\00miktex\bblopts.cfg")     ("C:\MiKTeX 2.9\tex\generic\babel\english.ldf"     ("C:\MiKTeX 2.9\tex\generic\babel\babel.def")))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.sty     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\etoolbox\etoolbox.sty     ("C:\MiKTeX 2.9\tex\latex\misc\etex.sty"))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.def)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.cfg))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex.sty          Package biblatex Warning: No "backend" specified, using Biber backend.     (biblatex)                To use BibTeX, load biblatex with      (biblatex)                the "backend=bibtex" option.          (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex2.sty     ("C:\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty"     ("C:\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty")     ("C:\MiKTeX 2.9\tex\generic\oberdiek\kvsetkeys.sty"     ("C:\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")     ("C:\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"     ("C:\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"))))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\logreq\logreq.sty     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\logreq\logreq.def))     ("C:\MiKTeX 2.9\tex\latex\ltxmisc\url.sty")     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\blx-dm.def)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\blx-compat.def)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex.def)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex-apa\apa.bbx     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\bbx\standard.bb     x)          Package biblatex Warning: Macro 'reviewauthor' undefined.     (biblatex)                Using \newbibmacro.          ) (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex-apa\apa.cbx)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex.cfg)))      ("C:\MiKTeX 2.9\tex\latex\tools\enumerate.sty")     ("C:\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"     ("C:\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"     ("C:\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))     ("C:\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")     ("C:\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg"))          Package hyperref Message: Driver (autodetected): hpdftex.          ("C:\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"     ("C:\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))     ("C:\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"     ("C:\MiKTeX 2.9\tex\latex\graphics\graphics.sty"     ("C:\MiKTeX 2.9\tex\latex\graphics\trig.sty")     ("C:\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")     ("C:\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def")))     ("C:\MiKTeX 2.9\tex\latex\base\textcomp.sty"     ("C:\MiKTeX 2.9\tex\latex\base\ts1enc.def"))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\placeins\placeins.sty)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\setspace\setspace.sty)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\appendix\appendix.sty)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\subfig\subfig.sty)     ("C:\MiKTeX 2.9\tex\latex\ams\math\amsmath.sty"     For additional information on amsmath, use the `?' option.     ("C:\MiKTeX 2.9\tex\latex\ams\math\amstext.sty"     ("C:\MiKTeX 2.9\tex\latex\ams\math\amsgen.sty"))     ("C:\MiKTeX 2.9\tex\latex\ams\math\amsbsy.sty")     ("C:\MiKTeX 2.9\tex\latex\ams\math\amsopn.sty"))     ("C:\MiKTeX 2.9\tex\latex\graphics\color.sty"     ("C:\MiKTeX 2.9\tex\latex\00miktex\color.cfg"))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex-apa\american-ap     a.lbx     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\lbx\american.lb     x     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\lbx\english.lbx     )))     ("C:\Users\trinker\Desktop\PhD Program\CEP 510 Psychometrics\Assignments\Final      paper\example.aux") ("C:\MiKTeX 2.9\tex\latex\base\ts1cmr.fd")     ("C:\MiKTeX 2.9\tex\latex\psnfss\ot1ptm.fd")     *geometry* driver: auto-detecting     *geometry* detected driver: pdftex     ABD: EverySelectfont initializing macros     ("C:\Users\trinker\Desktop\PhD Program\CEP 510 Psychometrics\Assignments\Final      paper\example.bbl") ("C:\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"     ("C:\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))     ("C:\Users\trinker\Desktop\PhD Program\CEP 510 Psychometrics\Assignments\Final      paper\example.out")     ("C:\Users\trinker\Desktop\PhD Program\CEP 510 Psychometrics\Assignments\Final      paper\example.out")     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     )     Underfull \hbox (badness 10000) in paragraph at lines 33--33      []\OT1/ptm/m/n/12 TITLE           Underfull \hbox (badness 10000) in paragraph at lines 33--33      []\OT1/ptm/m/n/12 ME      ("C:\MiKTeX 2.9\tex\latex\psnfss\ot1pcr.fd")     Underfull \hbox (badness 10000) in paragraph at lines 33--33      \OT1/pcr/b/n/14.4 leavefloats \OT1/ptm/b/n/14.4 op-tion be-fore you sub-mit!           Underfull \hbox (badness 10000) in paragraph at lines 33--33      []\OT1/ptm/m/n/12 Author Note      [1{C:/Users/trinker/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]     Underfull \hbox (badness 10000) in paragraph at lines 33--33      [][]\OT1/ptm/m/n/12 Abstract      ! Undefined control sequence.     \HyOrg@maketitle ... \mspart {Abstract}\@abstract                                                        \mspart {\@title }     l.33 \cite               {Bennett1954}     ?      [2]     Underfull \hbox (badness 10000) in paragraph at lines 33--33      [][]\OT1/ptm/m/n/12 TITLE           LaTeX Warning: Citation 'Bennett1954' on page 3 undefined on input line 33.               LaTeX Warning: Citation 'Bennett1954' on page 3 undefined on input line 36.          [3]          LaTeX Warning: Empty bibliography on input line 38.               ("C:\Users\trinker\Desktop\PhD Program\CEP 510 Psychometrics\Assignments\Final      paper\example.aux")          LaTeX Warning: There were undefined references.               Package biblatex Warning: Please (re)run Biber on the file:     (biblatex)                example     (biblatex)                and rerun LaTeX afterwards.           )     (\end occurred when \ifx on line 46 was incomplete)     (\end occurred when \ifx on line 46 was incomplete)     (\end occurred when \ifx on line 46 was incomplete){C:/MiKTeX 2.9/fonts/enc/dvi     ps/fontname/8r.enc}<C:/MiKTeX 2.9/fonts/type1/urw/courier/ucrb8a.pfb><C:/MiKTeX      2.9/fonts/type1/urw/courier/ucrbo8a.pfb><C:/MiKTeX 2.9/fonts/type1/urw/times/u     tmb8a.pfb><C:/MiKTeX 2.9/fonts/type1/urw/times/utmbi8a.pfb><C:/MiKTeX 2.9/fonts     /type1/urw/times/utmr8a.pfb>     Output written on example.pdf (3 pages, 51420 bytes).     SyncTeX written on example.synctex.     Transcript written on example.log.     texify: pdflatex.exe failed for some reason (see log file).               _____________________________________________________________________           PDFTeXify Compilation Report (Pages: 3)           Errors: 1   Warnings: 7   Bad Boxes: 6     _____________________________________________________________________


title: Inconsistency with period at the end of bib entry with original date

text: `LaTeX` apparently treats the same case with two different outputs. When a bib entry has `origdate` according to the APA style, the string `(Original work published xxx)` should be appended at the end of the bib entry preceded by a period (`.`), separating it from the previous field (i.e., the publisher). Still, `LaTeX` does not always append the period after the publisher and before `(Original...` . The output from the following MWE produces only one correct result, i.e. the second, while the first and the last entries are missing the period.               \RequirePackage{filecontents}          \begin{filecontents*}{mybib.bib}     @book{test1,         address = {Edinburgh},         title = {I and thou},         publisher = {T. \& {T}. {Clark}},         author = {Buber, Martin},         translator = {Smith, Ronald Gregor},         year = {1937},         origdate = {1923}     }     @book{test2,         address = {Boston, {MA}},         title = {The theory of communicative action. {Reason} and the rationalization of society},         volume = {1},         publisher = {Beacon {Press}},         author = {Habermas, Jürgen},         translator = {{McCarthy}, Thomas},         year = {1984},         origdate = {1981}     }     @incollection{test3,         address = {Cambridge, {MA}},         title = {Deliberation and democratic legitimacy},         booktitle = {Deliberative democracy: {Essays} on reason and politics},         publisher = {MIT {Press}},         author = {Cohen, Joshua},         editor = {Bohman, James and Rehg, William},         year = {1997},         origdate = {1989},         pages = {67--91}     }     \end{filecontents*}          \documentclass{article}          \usepackage[         style=apa,         backend=biber,         isbn=false,         url=false,         doi=false,         eprint=false,         hyperref=true,         backref=false,         firstinits=false,     ]{biblatex}          \usepackage[utf8]{inputenc}     \usepackage{csquotes}     \usepackage{xpatch}          \usepackage[british]{babel}     \DeclareLanguageMapping{british}{british-apa}          \addbibresource{mybib.bib}          \begin{document}          \cite{test1}     \cite{test2}     \cite{test3}          \printbibliography     \end{document}       ![enter image description here](http://i.stack.imgur.com/yT9IN.png)


title: My BiBtex isn't compiling properly for articles

text: One of my references               @Article{Normark00c,     author =     {Kurt Nørmark},     title =      {Elucidative Programming},     journal =    {Nordic Journal of Computing},     year =   {2000},     volume =     {7},     number =     {2},     pages =        {87--105}     }      The output should look like > [2000, article] K. Nørmark, "Elucidative Programming," _Nordic Journal of > Computing_ , vol. 7, iss. 2, pp. 87-105, 2000. But in my LaTeX, I got > K. Nrmark, Nordic Journal of Computing 7, 87 (2000). Instead. My output completely skips the title of the article… My LaTeX Code is something like this                \documentclass[15pt]{article}            \usepackage{parskip}      \usepackage{mathtools}      \usepackage{graphicx}      \usepackage{amsmath}      \usepackage{amssymb}      \usepackage{mdframed}      \usepackage{dsfont}      \usepackage{hyperref}           \begin{document}           \cite{Normark00c}           \bibliographystyle{phaip}       \bibliography{science}           \end{document}


title: ModernCV classic style, change space below title

text: I found this post in the forums, and I want to do exactly the same but for moderncv's "classic" style. I am pretty new to LaTeX and all the maketitle thing makes me dizzy, I tried to understand it a little but I didn't achieve much. How would you do that?


title: Algorithms package ignores caption package

text: I'm using the `algorithms` package in my document to get a floating environment for algorithms to live in.               \usepackage{algorithm}      I'm using the `caption` package to make the captions on my figures smaller.               \usepackage[font=footnotesize,bf]{caption}      The `algorithms` package ignores the `caption` package. Is there any way to make it respond to `caption`'s options?


title: Change a specific label in enumerate environment

text: I'm using `arabtex`, and there is an error in the package. When using `\alph` as a label for `enumerate`, it works correctly, however it is not in Arabic alphabetical order. As you would expect for the latin `\alph` to go `a,b,c,d...etc.`, for Arabic it would go `أ، ب، ج، د،ذ...etc`. The wrong letter is the third one, it appears as something different. I'm aware of the fact that I can change any label manually by adding the label in square brackets after `\item`, however, that would be tedious especially if I have more than three items. If I edit the label of the third item, the wrong label will go to the fourth one and so on. My question is, can I change the third letter throughout the whole document either by using a command or editing the `arabtex` package if that's possible. Edit: MWE:               \documentclass{article}          \usepackage{arabtex}     \usepackage{utf8}     \begin{document}          \setcode{utf8}     \begin{arabtex}     \begin{enumerate}       \item         \begin{enumerate}         \item          \item           \item <Label of this item is wrong.>           \item           \item          \end{enumerate}     \end{enumerate}     \end{arabtex}     \end{document}      ![example of wrong behavior](http://i.stack.imgur.com/vcmqQ.jpg)


title: Two labels, one edge

text: Assume that I have a figure like the next one. How can I put two labels on the edge? For instance, here I would like to name the edge `a` and keep some auxiliary info associated with the edge.               \begin{figure}[b]        \centering         \begin{tikzpicture}          \SetUpEdge[lw         = 1pt,                     color      = black,                     labelcolor = white]           \SetVertexNoLabel           \GraphInit[vstyle=Normal]            \SetGraphUnit{3}           \tikzset{VertexStyle/.append  style={fill}}           \Vertex{s}           \NO(s){a}  \EA(a){b} \SO(b){c}           %\Edge[label={$a$}](s)(a) and the next line           \Edge[label={$\{g_1\}$}, labelstyle={left}](s)(a)           \Edge[label={$\{g_1\}$}, labelstyle={above}](a)(b)           \Edge[label={$\{g_1\}$}, labelstyle={right}](b)(c)         \end{tikzpicture}     \end{subfigure}      You need package `tkz-graph` to compile the document.


title: Disabling the arrows that appear in pgfplots on the axes

text: By default in PGFplots, when axes are only shown in the bottom left corner, arrows appear at the end of the ends of axes lines. How can I change the defaults so these arrows do not appear? Edit: Example code that produces plots with arrows at the tips of the axes lines               \documentclass{article}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}        \begin{axis}[axis x line=middle,axis y line=middle]           \addplot {x^3};        \end{axis}      \end{tikzpicture}     \end{document}


title: TikZ edge thickness causing errors in foreach loop

text: I'm experiencing some weirdness in making a simple TikZ diagram (a comb-shaped graph with variable number of nodes). The weirdness comes from the style applied to the edge paths. Here's the (minimal) example:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \begin{document}          \begin{tikzpicture}[auto,scale=1.0,%     block/.style = {draw,circle,very thick,minimum size=0.5cm},%     directed/.style ={draw,-triangle 45, shorten >= 0pt, very thick}]          % Parameters     \pgfmathsetmacro{\numXnodes}{int(3)}     \pgfmathsetmacro{\strch}{2}          \foreach \i in {1,...,\numXnodes}{         \path (\strch*\i-\strch, 0) node[block] (x\i) {\i};         \path (x\i) ++(0,-\strch) node[block] (z\i) {\pgfmathparse{int(\numXnodes+\i)}\pgfmathresult};         \path (x\i) [directed] -- (z\i);     }          \pgfmathsetmacro{\nnmo}{{int(\numXnodes-1)}}          \foreach \i in {1,...,\nnmo} {         \pgfmathparse{int(\i+1)}         \draw (x\i) [draw,-triangle 45,thick] -- (x\pgfmathresult);     }          \end{tikzpicture}     \end{document}      The above code draws a graph with the right structure/directionality. However, the edges between "x" nodes are very thin. The issue is that if I change the style on the line `\draw (x\i) [draw,-triangle 45] -- (x\pgfmathresult);` to `\draw (x\i) [draw,-triangle 45,thick] -- (x\pgfmathresult);` I get an error that says `Package pgf Error: No shape named x0 is known. } (followed by: )` Any thoughts on why this error would be occurring here and not in the first set of edges drawn with the defined `directed` style (i.e., in the first loop)? Thanks in advance!


title: Beamer buttons change zoom in Adobe Acrobat

text: I am using Beamer to create slides (the editor I'm using is Bakoma Tex). I can add buttons to go back and forth between slides using the \hyperlink command. When I open the slides as pdf (in Adobe Acrobat Professional 8), the buttons appear and work as intended; but when I press on them, the zoom in the destination slides changes. This messes up full screen views. I presume it is an issue of the settings in the viewer, but I need to fix this isue and I have no idea how to do it. Here is a short example of what I have:               \documentclass[xcolor=dvipsnames,serif]{beamer}          \usecolortheme[named=Maroon]{structure}          \usenavigationsymbolstemplate{}          \mode<presentation>     \usetheme{Pittsburgh}     \usepackage[sc]{mathpazo}     \usepackage[T1]{fontenc}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amssymb}     \setbeamercovered{transparent}     \setbeamertemplate{footline}[frame number]     \setbeamertemplate{items}[default]          \begin{document}          \title{My Example}          \begin{frame}            \titlepage          \end{frame}          \begin{frame}\label{back again}          \frametitle{Slide 1}          \begin{itemize}          \item          Starting point. \hyperlink{there}{\beamergotobutton{To Slide 2}}          \end{itemize}          \end{frame}          \begin{frame}\label{there}          \frametitle{Slide 2}          \begin{itemize}          \item          Ending point. \hyperlink{back again}{\beamerreturnbutton{To Slide 1}}          \end{itemize}          \end{frame}          \end{document}


title: pgfplots - draw boxplot without outliers

text: I am creating a `boxplot` with `pgfplots`, using the builtin `statistics` library. I load the input data from a table file.               \usepackage{pgfplots}     \usepgfplotslibrary{statistics}     ...     \begin{tikzpicture}     \begin{axis}[boxplot/draw direction=y]        \addplot+[boxplot] table[          col sep=tab,          x expr=\coordindex,          y=aColName] {aFileName};     \end{axis}     \end{tikzpicture}      Is it possible to draw the plot without outliers? Or hide them? I don't want to pre-calculate the `boxplot` values by hand.


title: Roman numerals appear in toc but not in document

text: I'm writing a thesis and sections are required to have roman numerals in both the toc and the document itself. The pertinent document code looks like this:               \documentclass[twoside,12pt]{report}     %%%%%%%%%%%%%%%%%%%Preamble%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%PACKAGES TO USE IN THE DOCUMENT:     \usepackage[indentfirst]{titlesec} %To allow for formatting section titles     \usepackage{ragged2e} %To allow for indentation with the raggedright command          %%%%%%%SET SECTION HEADING FORMATTING     \titleformat*{\section}{\Centering\normalsize\bfseries\uppercase}{\renewcommand\thesection{\Roman{section}.}     \titleformat*{\subsection}{\RaggedRight\normalsize\bfseries\uppercase}     \titleformat*{\subsubsection}{\RaggedRight\normalsize\bfseries}     \renewcommand\thesection{\Roman{section}.}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}     \SweaveOpts{concordance=TRUE}     \section{First Section}     \section{Second Section}     \subsection*{First Subsection}     \end{document}      This code gives me titles formatted according to my specifications, but the `\renewcommand\thesection{\Roman{section}.}` code only seems to affect the toc, not the actual section titles. As you can see, I have the command both on its own and with the `\titleformat` command, but neither one produces results. How can I get the number to show up in the actual section title?


title: Use of [ ] in BibTeX

text: I've got a BibTeX entry:               @ARTICLE{article-minimal,        author = {L[eslie] A. Lamport},        title = {The Gnats and Gnus Document Preparation System},        journal = {\mbox{G-Animal's} Journal},        year = 1986,     }      I couldn't figure out what the [] was for. As far as I searched, they are only used to pass arguments. What is their function here?


title: thmbox color bar

text: I would like to ask if anyone knows if it is possible to change the bar color in the thmbox package. One can change the thickness of the bar but not the color.               \usepackage{thmbox}     \newtheorem[style=M, thickness=1pt]{theoremExa}{Example}[chapter]     \begin{document}      \begin{theoremExa}[Example Bla]        .....      \end{theoremExa}     \end{document}


title: How to put arrows pointing to equalities to explain each step

text: What´s the best way to explain every equality? With arrows like in ![enter image description here](http://i.stack.imgur.com/rzLSp.png) Anything similar to this ![enter image description here](http://i.stack.imgur.com/9AkNE.png)


title: How to specify a very long page?

text: I want a long page length, and even though the PDF output shows the long page, I can only get text placed on a portion of it. I used code from this question about repeating a long block of text until it fills a page, and added the geometry package along with the adjustments for the width and height that I want. But, this does not fill up the page as I want. This is not a problem with the code in the above example, as I am seeing similar behavior in my own files: the page looks long, but has a lot of blank space and things get moved to the next page.               \documentclass{article}     \usepackage[left=10px,right=10px,top=10px,bottom=10px]{geometry}     \setlength{\paperwidth}{8.0in}     \setlength{\paperheight}{33.0in}          \usepackage{lipsum}     \newsavebox\widgetbox     \begin{document}          \setbox\widgetbox\vbox       {\vspace*{6pt}\noindent Type of Widget: \dotfill \break       Observations: \dotfill \break       \null\dotfill\par}          \lipsum[1]          \cleaders\copy\widgetbox\vskip0pt plus 1fill     \end{document}      Also, any idea why the lipsum text is getting cut of on the right? I would have though that LaTeX would have adjusted for the narrower text?


title: Define a new evironment by an existed environment, with its optional argument

text: Suppose there is an existed environment say, `existedenv`, with an optional argument, that is,               \begin{existedenv}[argument]     ....     \end{existedenv}      I want to define a new environment, say, `myenv`, which is a copy of `existedenv`, that is,               \begin{myenv}[argument]     ....     \end{myenv}      behavior is exactly like               \begin{existedenv}[argument]     ....     \end{existedenv}      How to write the code?


title: leading package and vertical space between footnotes

text: I'm using Will Robertson's `leading` package to set the leading in my documents. It usually works fine, but it seems to cause trouble with the vertical space between footnotes.* Consider the following example; the space between the footnotes is way too small.               \documentclass[fontsize=12pt]{scrartcl}     \usepackage{leading}     \usepackage{blindtext}     \leading{16pt}     \begin{document}     \blindtext     \footnote{\blindtext}     \footnote{\blindtext}     \end{document}      It seems that while `leading` adjusts the leading _within_ the footnotes just fine, it forgets to take care of `\footnotesep` as well. Body text is 12/16pt, footnotes are set to 10/13.3pt automatically (and correctly), but the leading between the footnotes, according to Acrobat Pro, is only 12.3pt, rather than 13.3, which is what I'm aiming for. Now I wouldn't mind adjusting `\footnotesep` manually as a workaround, but `\footnotesep` isn't simply 12.3pt. Rather, in this example, `\showthe\footnotesep` tells me it's 8.4pt. In order to obtain the correct spacing, I need to increase it by about 0.9pt, but that's just a rough result of trial and error; I can't see the logic behind it -- which would be necessary in order to code a general workaround that works for all fontsizes. But maybe a workaround isn't necessary at all; maybe I'm on the wrong track alltogether, so any hint is appreciated! * * * *) `Leading`, on a sidenote, IMHO is by far the best solution I've come across so far; I've been using it for years, and the only reason the following problem hasn't been a problem to me so far is that I've been using `footmisc's` `para` option, in which vertical spacing between footnotes isn't an issue, as all my footnotes (they usually contain mere references, author/year/page) are combined into one paragraph. Unfortunately, this seems to be confusing to some people who've read my stuff, so I'm thinking about going back to the traditional vertically stacked footnotes.  ![enter image description here](http://img403.imageshack.us/img403/6038/clipboard01ap.png)


title: Modifying the location of page number on the first page of chapter to fit within height

text: I am working on writing my masters thesis, for which the layout requirements are:   1. 1.5 inch margin on left, 1 inch on all other side   2. Page number on top right on every page, except for first page of chapter and preliminary pages where they occur at the center bottom.   3. **The page numbers should fit within the margin on everypage** I am using the `geometry` package to set the above layout as follows:               \usepackage[letterpaper, height = 9in, left =1.5in, right=1in, top=1in, includehead,includefoot]{geometry}      which works fine, except for the fact that on the subsequent pages of the chapter (after first page) the bottom margin is leaving margin > 1 inch. I think this is happening because of the fact that I have included `includefoot` in the `geometry` option, but since I need the page numbers within the margin, including the first page of the chapter, I had to do this. What is the correct method of setting the above layout so that page number falls in the margin, including the first page of chapter, and in subsequent pages, where the page number lies on top right, while leaving only 1 inch bottom margin?


title: Macro assignment problem

text: \docuentclass[pdftex,a4paper,12pt,oneside]{book}%          \begin{document}          \newcommand{\tmpa}{}     \newcommand{\tmpb}{}     \newcommand{\tmpc}{}          \renewcommand{\tmpc}{tmpc1}       \renewcommand{\tmpa}{\tmpc}     \renewcommand{\tmpb}{\tmpc}     \noindent tmpa: \tmpa \\     tmpb: \tmpb \\     tmpc: \tmpc \\     \renewcommand{\tmpc}{tmpc2}     tmpa: \tmpa \\     tmpb: \tmpb \\     tmpc: \tmpc           \end{document}      Result: tmpa: tmpc1 tmpb: tmpc1 tmpc: tmpc1 * * * tmpa: tmpc2 tmpb: tmpc2 tmpc: tmpc2 Changing the value of `tmpc` changes the values of the other two variables. How can I assign only the value of `tmpc` without this pointer like effect?


title: xstring character comparison and \meaning

text: \documentclass[pdftex,a4paper,12pt,oneside]{book}%          \usepackage{xstring}          \begin{document}          \newcommand{\tmpa}{}     \newcommand{\tmpb}{}     \newcommand{\tmpc}{}          \renewcommand{\tmpc}{abcdefg} \noindent tmpc: \tmpc \\     \renewcommand{\tmpa}{\meaning\tmpc} tmpa: \tmpa \\     len: \StrLen{\tmpa} \\     char(20): \StrChar{\tmpa}{20}[\tmpb] \tmpb \\     pos(f): \StrPosition{\tmpa}{f}           \end{document}      Result:               tmpc: abcdefg          tmpa: \long macro:->abcdefg          len: 21          char(20): f          pos(f): 0        Why? `tmpa` obviously contains character 'f' on the position of 20 as we can find it with `\StrChar`. But that 'f' not the same as the one we are trying to find with `StrPos`. I thought about catcode differences, but did not find anything usable (I might be wrong with changing catcode of 'f' before searching for it).


title: How to customize a document class?

text: In LaTeX, we modify a predefined `documentclass` to fit our need. I wonder how we can edit the original `documentclass` (e.g. article) to have our customized properties? I mean which file is responsible for the article `documentclass` and should be edited to be customized? I've seen some customized templates (`.cls` files), but they are indeed `templates` NOT `class`, as they somehow use the original class by `\LoadClass`. NOTE: The tag `documentclass-writing` was very useful for finding interesting questions/answers, but the case is not what I meant to customize an original class of LaTeX.


title: Latex not showing properly citations

text: I use the following latex command for citation at latex.               \subsection{Subsection Example 1}          some tex ~\cite{maccormack2003managing} some text      and I get the following result. ![enter image description here](http://i.stack.imgur.com/wyAlJ.png) As you can see the reference is not aligned with the rest of the text.


title: left margin not resetable

text: i am starting with latex and i have problems with the left margin of a book document. is there a way to reset the documents margin? i always have a small margin on the left side which i only can reset by setting the hoffset to a negative range. here is my latex:               \documentclass{scrbook}     \usepackage[utf8]{inputenc}     \usepackage{pdfpages}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{layout}     \usepackage[absolute,overlay]{textpos}     \usepackage{fullpage}% http://ctan.org/pkg/fullpage     \usepackage[top=0mm, bottom=0mm, left=0mm, right=0mm, paperwidth=20cm, paperheight=20cm]{geometry}     \title{bbbbbbbbbb}     \setlength{\hoffset}{0mm}      \setlength{\voffset}{0mm}       \author{blah}     \date{\today}     \begin{document}     \includegraphics{test.jpg}     \newpage     fhaiushfaoishf     \newpage     \layout     \end{document}      is there a better way? any ideas?


title: Wrapping two figures in one paragraph

text: I am trying to wrap two pictures in a paragraph, as shown in the two images below. The two red boxes show the desired locations for the two figures.![enter image description here](http://i.stack.imgur.com/mt2LN.png) Unfortunately, I cannot get the following code to work what I am looking for.               \documentclass{article}          \usepackage{wrapfig}     \usepackage{lipsum}          \begin{document}          \lipsum[1]          \begin{wrapfigure}{R}{3cm}         \centering         \rule{3cm}{3cm}     \end{wrapfigure}          \begin{wrapfigure}{L}{3cm}         \centering         \rule{3cm}{3cm}     \end{wrapfigure}          \lipsum[1-6]          \end{document}      How can I exactly specify the locations of the `wrapfigure`s?


title: Using mathematical function in PGF/TikZ

text: I want to use ProbXpos for example to position tic marks and to position line ends. It seems to calculate as I intend, but how can I use the calculated value? The example below prints a sample result value. If I un-comment the commented lines it won't even compile. Also -- minor point -- some is there a `ln 10` function? Doesn't work for me.               \documentclass{article} %maybe a better one?     \usepackage{tikz}     \newcommand{\ProbXpos}[1]{\pgfmathparse{ln(#1/(1-#1))/ln 10}\pgfmathresult }     \begin{document}     \begin{tikzpicture}     \draw (0,1) node {\ProbXpos{0.1} result prints ok} ;     %   \draw (\ProbXpos{.0001},0) -- (\ProbXpos{0.999},0)      %                   node    {cannot use result numerically} ;     \end{tikzpicture}       \end{document}


title: Can't turn off fontified subscripts in Emacs 24

text: Under Emacs 24.3 and Auctex, the sub/superscript fontification is occurring outside math modes. This appears in either Beamer or normal LaTeX docs. Per this question, I've included the following lines in my `.emacs.d`:                   ;; disable annoying fontification in latex         (setq font-latex-fontify-script nil)      However, this only appears to fix the behavior for a subset of letters for the subscript, and not at all for the superscript. Something like `_p` is fine. But `_v` gets set as the subscript. Both `^v` and `^p` get set as superscripts. Has anyone else run into this problem? This is AucTeX 11.86 and Emacs 24.3, running on ubuntu 12.04.


title: Changing the font for equation numbering

text: I know that I can change the font for the equation numbers by redefining the `\theequation` command by, say,               \renewcommand{\theequation}{{\sffamily\arabic{equation}}}      I am wondering if there's a better way of doing this. The reason I ask is because if I include the section number to the equation numbers using the following amsmath command               \numberwithin{equation}{section}      then this will nullify the previous redefinition. Of course an obvious solution for this is to just use               \renewcommand{\theequation}{{\sffamily\thesection.\arabic{equation}}}      but I am curious if there's another way.


title: Change chapter command

text: I am using the `book` class, is there a way to modify the `\chapter` command to avoid the "Chapter #" above the chapter name and keeping it numbered? Normally I get, for example               Chapter 2          The flight of the Bumblebee      But I would like only               The flight of the Bumblebee


title: pdflatex, latexmk, synctex: Adding an option to pdflatex causes synctex to fail

text: The user "Mike" kindly helped me on Latex, Emacs: automatically open _TeX Help_ buffer on error and close it after correction of the error? to create the following function which makes error detection to play nicely together with `latexmk`.               (defun run-latexmk ()       (interactive)       (let ((TeX-save-query nil)             (TeX-process-asynchronous nil)             (master-file (TeX-master-file)))         (TeX-save-document "")         (TeX-run-TeX "latexmk"              (TeX-command-expand "latexmk -pdf %s" 'TeX-master-file)                      master-file)         (if (plist-get TeX-error-report-switches (intern master-file))             (TeX-next-error t)           (progn         (demolish-tex-help)         (minibuffer-message "latexmk: done.")))))      I would like to add another option to the `latexmk` call like this:               (TeX-command-expand "latexmk -pdflatex='pdflatex -file-line-error' -pdf %s" 'TeX-master-file)      to make `pdflatex` to report not only the line of an error but also the file name (which is crucial for AUCTeX to open the correct buffer in case of an error). The problem is that after I add this option, a compiled `myfile.tex` does not have an accompanying `myfile.synctex.gz` anymore, which causes forward and backward search to fail (see How to set up Okular for forward/backward search with TeX Live 2011? (not trivial anymore)). Where is the problem?


title: tcolorbox: framing example problems that index in order and allow for a title as an argument

text: I would like to take this `tcolorbox` created by Gonzalo Medina here Typesetting a definition but have each usage of the box index starting from `1, 2, ...` which allows a title input. Currently my set up looks like: ![enter image description here](http://i.stack.imgur.com/ef5kz.png) So it says `Example Problem (number) (what the problem is about)`               \documentclass{article}     \usepackage[most]{tcolorbox}     \usepackage{lipsum}          \newtcolorbox{Examples}{           breakable,           fonttitle=\bfseries,           title={Example Problem (indexing number here) rest of title:}     }     \begin{document}     \begin{Examples}       \lipsum[4]     \end{Examples}     \end{document}      ![enter image description here](http://i.stack.imgur.com/xkcuJ.png) Can this something like this be done? **Edit 1:** Following Gonzalo Medina's first code, the first letter is being cut off in the box. ![enter image description here](http://i.stack.imgur.com/93jmO.png) That should be Calculate not alculate. So this was caused by having               \begin{examples}{Synodic Period of the Earth/Mars Orbits}       without `{test}`. Does `{test}` always have to end it? **Edit 2** The colon wont appear after the descriptions               \documentclass{article}     \usepackage{tikz}     \usepackage[most]{tcolorbox}     \usepackage{lipsum}     \usepackage{standalone}     \usepackage{capt-of}     \usepackage[pdfencoding = auto, psdextra, bookmarksdepth = 4]{hyperref}     \usepackage[noabbrev]{cleveref}          \tcbset{       theorem/.style args = {#1#2#3#4}{%                                                         step and label = {#2}{#4},%                                                              title = {\mbox{#1~\csname the#2\endcsname\ }#3:}}     }     \newcounter{exa}     \tcbmaketheorem{examples}{Example Problem}{       breakable,       fonttitle = \bfseries,     }{exa}{ex}          \begin{document}     \begin{examples}{example}{exa:test}       \lipsum[4]       \par\medskip       \begin{minipage}{\linewidth}         \centering         \includestandalone{line}         \captionof{figure}[line]{line}         \label{line}       \end{minipage}     \end{examples}     \cref{line}     \end{document}      ![enter image description here](http://i.stack.imgur.com/KVpKq.png)


title: Invisible math characters with unicode-math and ntheorem

text: When compiling this code with `lualaTeX` (from TeXLive 2011),               \documentclass{minimal}     \usepackage{unicode-math}     \usepackage{ntheorem,thmtools}     \setmathfont{xits-math}     \makeatletter     \newtheoremstyle{mathfonttest}       {\item[\theorem@headerfont $ABC$ DEF $:!?$ ]} % 1. option       {\item[$ABC$ DEF ]} % 2. option      \makeatother     \declaretheorem[style=mathfonttest]{test}          \begin{document}     \begin{test} % 1. option, ABC invisible       Something.      \end{test}     \begin{test}[triggers 2. option] % 2. option, ABC visible       Something.     \end{test}     \end{document}      the first ABC, and more generally any greek or latin character in inline math mode – when preceded by `\theorem@headerfont` – is invisible and I have no clue why. What I want to do is use math code in optional or alternative description to a definition like '1.1. Definition (of $pi$)'. Does anybody know how to solve this or circumvent it?


title: How can I create a chapter with graphics only divided into different sections?

text: I'm trying to create a chapter with pictures only, but keep running into troubles. The chapter is an appendix, where only some graphics should be displayed, placed in different sections. I don't need text in the secitons, just the pictures. After trying many things, I can't figure out, how to do it right. No matter whether I use bare `\includegraphics` or floats, Latex seems to randomly put the pictures on the pages, sometimes more, sometimes fewer. In most cases it breaks the pages before a new section, but sometimes it squeezes the next sections title onto the last page. It seems that using floats with the `[H]` options does almost what i want, except that the first page of each section is left blank and the pictures start on the next one. Also it breaks before each section. Any advice is highly appreciated!


title: Customize the appearance of citations in biblatex

text: One of the benefits with `natbib` is that it allows you to customize with simple commands in the preamble how you want your citations to appear, with respect to what symbols to use between multiple citations, etc. I have not been able to find anything similar in `biblatex`. To be concrete, using the `authoryear` style in `biblatex` will make citations appear as this: "See e.g. Smith (1983, pages 255 sqq.); Jones (2001, pages 112 sq.); Anderson (2004, page 85)." In my field, however, this is not how citations normally look. They will rather look like this: "See e.g. Smith (1983:255ff.), Jones (2001:112f.), Anderson (2004:85)." Is there any way I can customize these options in the preamble with `biblatex`?


title: Best Practice for nice layout with tikzDevice

text: R+tikDevice+LaTex+knitr is (as I understand it) the most efficient way to get relly nice looking publications from R, with maximum layout-support from LaTeX. I'm using R+LaTex+knitr now, but would like to let LaTex manage font-sizes and resolutions and proportions of plots better, so tikzDevice 0.7.0 seems to be the way to go. Here is a question that is somewhat related, but (I think) was answered pre-knitr+tikzDevice 0.7.0: Best practice regarding graphics size But all my attempts to use tikzDevice make it more complicated, so I fear I have missed something fundamental. Probably about where the sizes of the plots are defined. The following example tries to plot the same thing three times: First without tikzDevice and then in two tikzDevice-ways. The tikzDevice-slides are not very nice looking, which I can improve by manipulating the widths and heights. But I already defined column-with in LaTex so I shouldn't have to do more, or?               \documentclass{beamer}     \usepackage{tikz}          \begin{document}          \title{Beamer with 2+1 plots}     \author{Chris}          <<data.prep, include=FALSE>>=     library(ggplot2)     library(tikzDevice)     options(tikzDefaultEngine='xetex')     plot.data <- data.frame(days=c(1,2,3,4,5,6,7,8,9), price=c(2,3,4,3,5,6,5,7,8))     @          \begin{frame}{2+1 Plots (no Tikz)}     \begin{columns}     \begin{column}[t]{0.40\textwidth}     <<plot1, dev='pdf', fig.width=6, fig.height=5, dpi=144, echo=FALSE, message=FALSE, warning=FALSE, cache=FALSE>>=     p <- ggplot(plot.data, aes(x=days, y=price))     p <- p + geom_line()     p     @     <<plot2, dev='pdf', fig.width=6, fig.height=5, dpi=144, echo=FALSE, message=FALSE, warning=FALSE, cache=FALSE>>=     p <- ggplot(plot.data, aes(x=days, y=price))     p <- p + geom_line()     p     @     \end{column}     \begin{column}[t]{0.58\textwidth}     <<plot3, dev='pdf', fig.width=8, fig.height=9, dpi=144, echo=FALSE, message=FALSE, warning=FALSE, cache=FALSE>>=     p <- ggplot(plot.data, aes(x=days, y=price))     p <- p + geom_line()     p     @     \end{column}     \end{columns}     \end{frame}          \begin{frame}{2+1 Plots (Tikz Attempt 1)}     \begin{columns}     \begin{column}[t]{0.40\textwidth}     <<plot4, results='hide', echo=FALSE, message=FALSE, warning=FALSE>>=     tikz("TikzAttempt1.tex",width=1.8,height=1.6)     p <- ggplot(plot.data, aes(x=days, y=price))     p <- p + geom_line()     p     dev.off()     @     \input{TikzAttempt1.tex}     <<plot5, results='hide', echo=FALSE, message=FALSE, warning=FALSE>>=     tikz("TikzAttempt2.tex",width=1.8,height=1.6)     p <- ggplot(plot.data, aes(x=days, y=price))     p <- p + geom_line()     p     dev.off()     @     \input{TikzAttempt2.tex}     \end{column}     \begin{column}[t]{0.58\textwidth}     <<plot6, results='hide', echo=FALSE, message=FALSE, warning=FALSE>>=     tikz("TikzAttempt3.tex",width=2,height=3)     p <- ggplot(plot.data, aes(x=days, y=price))     p <- p + geom_line()     p     dev.off()     @     \input{TikzAttempt3.tex}     \end{column}     \end{columns}     \end{frame}          \begin{frame}{2+1 Plots (Tikz Attempt 2)}     \begin{columns}     \begin{column}[t]{0.40\textwidth}     <<plot7, echo=FALSE, dev='tikz', fig.width=6, fig.height=5, out.width='.40\\paperwidth'>>=     p <- ggplot(plot.data, aes(x=days, y=price))     p <- p + geom_line()     p     @     <<plot8, echo=FALSE, dev='tikz', fig.width=6, fig.height=5, out.width='.40\\paperwidth'>>=     p <- ggplot(plot.data, aes(x=days, y=price))     p <- p + geom_line()     p     @     \end{column}     \begin{column}[t]{0.58\textwidth}     <<plot9, echo=FALSE, dev='tikz', fig.width=8, fig.height=9, out.width='.58\\paperwidth'>>=     p <- ggplot(plot.data, aes(x=days, y=price))     p <- p + geom_line()     p     @     \end{column}     \end{columns}     \end{frame}          \end{document}      Where should the sizes of the plots be defined? In chunk-definition? In tikz- definition? In LaTex input-definition? Or includegraphics-settings in LaTex? Which of the two tikzDevice-ways is best to use? My presentations have many slides with plots, and I usually end up with pdf- files of 10MB+, which hopefully will be lower via Tikz. For font-reasons, compilation must be done with XeLatex. Markdown is not an option here as I need to do what only LaTex can do (not included in example).


title: Displaying subfigures of different aspect ratio to look same aspect ratio

text: I have some figures that came out from gnuplot that I would like to display. The only difference between them is that one has a legend and the other one does not. So although they have the same size (the whole picture) they look like different because of the legend. I am currently plotting them with `\subfloat` and I would like to know if there is a way to make them look almost identical in size:                \begin{figure}[!ht]         \subfloat[First sub-figure\label{subfig-1:dummy}]{%            \includegraphics[scale=0.6, width=0.6\textwidth]{./case1.eps}           }         \hfill         \subfloat[First sub-figure\label{subfig-2:dummy}]{%            \includegraphics[width=0.6\textwidth]{./case1_1.eps}         }         \caption{Dummy figure}         \label{fig:dummy}       \end{figure}      And this is more or less how it looks like: ![enter image description here](http://i.stack.imgur.com/7AqBW.png)


title: pgfplot pin length

text: Consider the following example from the `pgfplot` manual.               \begin{tikzpicture}       \tikzset{         every pin/.style={fill=yellow!50!white,rectangle,rounded corners=3pt,font=\tiny},         small dot/.style={fill=black,circle,scale=0.3}       }       \begin{axis}[         clip=false,         title=How \texttt{axis description cs} works       ]       \addplot {x};            \node[small dot,pin=120:{$(0,0)$}]       \node[small dot,pin=-30:{$(1,1)$}]       \node[small dot,pin=-90:{$(1.03,0.5)$}]       \node[small dot,pin=125:{$(0.5,0.5)$}]       \end{axis}     \end{tikzpicture}      That code gives the following image ![image produced by above code](http://i.stack.imgur.com/KV3IT.png) What I want to change and I couldn't found in the manual is to change the length of the pins. For example make the text of the pin in the middle appear closer to the value 5 of the y axis and make the connecting line extent to that point. The result I want appears in the following picture. ![enter image description here](http://i.stack.imgur.com/E4zOD.png) Is that possible somehow?


title: Box around raggedright links spanning two lines extends to right margin

text: I need to use boxed links and ragged right text. The problem is that when a link spans two lines, though the link is broken correctly (when using pdflatex) the box around the linked text extends until the right margin. Consider the following example:               \documentclass{article}     \usepackage[textwidth=45mm]{geometry}     \usepackage[colorlinks=false]{hyperref}          \begin{document}     \raggedright     \href{http://www.ctan.org/}{The Comprehensive TeX Archive Network}     \end{document}      In the output, the link box extends beyond the end of 'TeX' and up to the right margin, thus enclosing some white space. Is there a way to make the box around the link extend only up to the end of the text and not the right margin?


title: Offset a symbol without changing layout

text: I'm using a certain symbol that I would like to shift down without effecting it's layout(change the surrounding markup's positions): a test case is:               $\begin{array}{ccc}        a & b & c\\        a & b & e\\     \end{array}$      and I want to move c down just right on top of e so the bottom of c touches, or even overlap, the top of e without effecting the layout at all(except for c). The two matrices should look identical except for how c changes. (the answer should be relatively generic since the above is just a test case)


title: Mark a reflex angle in tikz

text: Based on the first answer given here, I was trying to mark different angles. However, I need that the last angle (`C_1 D C_6`) is to be measured from the other direction ( _reflex angle_ ) which I could not achieve:![](http://i.stack.imgur.com/tui2s.png) Here is my code:               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{calc}          \usepackage{color, amsmath}     \newcommand\ptext[1]{\textcolor{purple}{$#1$}}          \begin{document}          \newcommand{\tikzAngleOfLine}{\tikz@AngleOfLine}       \def\tikz@AngleOfLine(#1)(#2)#3{       \pgfmathanglebetweenpoints{         \pgfpointanchor{#1}{center}}{         \pgfpointanchor{#2}{center}}       \pgfmathsetmacro{#3}{\pgfmathresult}       }          \begin{tikzpicture}[dot/.style 2 args={circle, color={#2},outer sep=0pt, inner sep=1.5pt, fill ,name=#1},     dot/.default={}{blue},       ex line/.default = {1cm},       ex line/.style={shorten >=-#1, ->, color=blue},       line/.default=1cm,       line/.style={}]          \node [dot={C_1}{green}, label={[xshift=-0.15cm, yshift=0.05cm]\ptext{C_1}}] at (0, 0) {};     \node [dot={C_2}{green}, label={[xshift=0.1cm, yshift=0.1cm]\ptext{C_2}}] at (-2.3,1) {};     \node [dot={C_3}{green}, label={[xshift=0cm, yshift=0cm]\ptext{C_3}}] at (-4,4.3) {};     \node [dot={C_4}{green}, label={[xshift=-.05cm, yshift=0.05cm]\ptext{C_4}}] at (2.5,5) {};     \node [dot={C_5}{green}, label={[xshift=0cm, yshift=0cm]\ptext{C_5}}] at (4.9,3) {};     \node [dot={C_6}{green}, label={[xshift=-0.1cm, yshift=0cm]\ptext{C_6}}] at (4,1) {};          \draw [line] (C_1) -- (C_2);     \draw [line] (C_2) -- (C_3);     \draw [line] (C_3) -- (C_4);     \draw [line] (C_4) -- (C_5);     \draw [line] (C_5) -- (C_6);     \draw [line] (C_6) -- (C_1);          \node [dot={D}{blue},label={[xshift=0.15cm, yshift=-0.7cm]\ptext{D}}] at (.85,2.17) {};     \draw [ex line, very thick] (D) -- (C_1);          \tikzAngleOfLine(D)(C_1){\AngleStart}          \foreach \num in {2, 3, 4, 5, 6}{         \draw [ex line] (D) -- (C_\num);     \tikzAngleOfLine(D)(C_\num){\AngleEnd}          \draw[red,->] (D)+(\AngleStart:0.75+\num*0.15cm) arc (\AngleStart:\AngleEnd:0.75+\num*0.15cm);        }          \end{tikzpicture}     \end{document}      How to do that?


title: Side by side figures from tex input

text: I have some plots obtained through gnuplot with epslatex terminal. The output is in two files for each plot: (1) foo.eps and (2) foo.tex. I want to put these plots side by side in a tex document. But with subfigure or minipage I got some problems... I want to do something like this               \documentclass{toptesi}     \usepackage{graphicx}     \usepackage{subcaption}     \begin{document}          \begin{figure}     \begin{subfigure}{0.5\textwidth}     \input{foo1.tex}     \caption{bla bla}     \end{subfigure}     \begin{subfigure}{0.5\textwidth}     \input{foo2.tex}     \end{subfigure}     \end{figure}          \end{document}      but the images are not rescaled according to the subfigure width, even though caption is. How to do that?


title: XML style for Latex including Persian characters with some preferences

text: I am using the `listings` package to include some `XML` code in my document. Currently, I am using the following style:               \lstset{        basicstyle=\ttfamily,        columns=fullflexible,       showstringspaces=false,        commentstyle=\color{gray}\upshape }          \lstdefinelanguage{XML} {        morestring=[b]",        morestring=[s]{>}{<},       morecomment=[s]{<?}{?>},        stringstyle=\color{black},       identifierstyle=\color{darkblue},        keywordstyle=\color{cyan},       morekeywords={xmlns,version,type} }      I have two main problems: 1- if the size of an element is bigger than the size of the line, the rest of the element text does not go to the next line and continues in the same line and the text goes to the margin! 2- It does not support Persian characters. I mean for example if I have an attribute like               Root="گوشی"      it does not write the Persian word.


title: Specifying baseline in internal coordinates with graphicx package

text: I'm using the `graphicx` package. By default, included graphics are aligned with the baseline at the bottom of the image. I know how to make images vertically centered (using `\vcenter`) or top-aligned. But what I really want is to just use the origin of the included figure as the baseline. Is there any way to do this conveniently, using either `graphicx` or some other similar package?