title: Personalizing chapter lines in table of contents

text: I am using `scrbook` and would like to tune my table of contents to look like the one in this book : http://biblefacts.org/church/Charisma.pdf , with a text saying "Chapter #" on top of each entry. I can't figure out how to do that. Currently, my code only shows a number in front of each line.


title: Why couldn't (La)TeX's layout model be as simple as CSS's layout model?

text: I feel CSS's layout model is simpler than (La)TeX's layout model. At the time Knuth developed TeX, the idea leading to CSS model is a "difficult" things? Or the CSS layout model is not appropriate to be applied to (La)TeX.


title: TikZ: Alternative for `use as bounding box`? Or a another way to handle it in external pictures?

text: I've been using TikZ to draw graphs (pgfplots) and pictures for my physics courses etc. Because I like it when (for example) the box of graph is centered on the page without looking at the stuff that comes with it (`ylabel`, `yticks`, etc.), I draw a rectangle on top of like this:               \draw[draw=none, use as bounding box](0,0) rectangle (\figurewidth,\figureheight);      This way only the the box of the graph is considered when the figure is to be placed on the page. This approach works for me ad I've applied it many times. However, I seem to get in to trouble when using the `externalize` library. Because the created external figures are cut off at the edges of the `bounding box`, I lose all that's outside (without `externalize` this wasn't happening, everything was drawn). I can see two possible solutions to my problem:   1. Use another command that makes the centering correct, e.g.:              \draw[center on this, draw=none](0,0)rectangle(\figurewidth, \figureheight);        2. Tell the `external` package not to clip at `bounding box` Any ideas?


title: How does TeX know how to space different typefaces?

text: My understanding of how TeX makes things look so nice is that it goes over each paragraph and spaces each letter/word to look 'right' based on how dark it is, how wide it is, and the characteristics of the letters around it. My question is: How does this work with different typefaces? Each one could have totally different letter sizes and empty space within them and whatnot. Is it based on some trait of the typeface that TeX can determine, such as width? Is it embedded in the fonts file? Or am I giving TeX far too much credit? I am wondering as I always assumed that this was part of what the packages that I used to activate the font did, but LuaTeX and XeTeX allow you to use TTF and OTF font files, which I'm assuming don't contain anything fancy like this.


title: How do I use LuaTex in MikTeX?

text: I am using MikTeX 2.9 version and although the manual says I can use LuaTeX, there is nothing in the TeXworks menu. I can see all the other members of the TeX family but none for LuaTeX. Can someone point me as to how to configure it? I am using Windows Vista.


title: Sorting a manual bibliography alphabetically by their labels

text: How to sort the bibliography alphabetically by their labels               \begin{the bibliography}{10}     \bibitem[Polchinski, 1984]{jpol}     Polchinski,~J.     \newblock{(1984)},     \newblock Renormalization group and effective lagrangians.     \newblock {\textbf{ Nuclear Physics B}}, 231:269--295.          \bibitem[Binney \textit{et al.}, 1992]{binney}     Binney,~J.~J., Dowrick,~N.~J.,  Fisher,~A.~J. and Newman,~M.~E.~J.     \newblock{(1992)},     \newblock \textbf{The Theory of critical phenomena: An introduction to the renormalization group}.     \newblock {Clarendon Press, Oxford, UK}.          \bibitem[Politzer, 1974]{politzer}     Politzer,~H.~D.     \newblock{(1974)},     \newblock Asymptotic freedom: An approach to strong interactions.     \newblock {\textbf{ Physics Reports}}, 14(4):129--180.     \end {the bibliography}      i.e. I need the order to be Binney then Polchinski then Politzer (in the above example)


title: mdframed: how to prevent a box from splitting?

text: I would like to prevent an `mdframed` box to split. I know it could sound absurd, since `mdframed` is designed to allow splitting but if it could be done, I would be interested in modifying `mdframed` so that I can decide whenever I want to split or not. Does anyone has a clue on this?


title: LuaLaTeX error when compiling visual counter

text: I asked a question about visual counters in `beamer`, for which I got this answer. Now I need to compile it by LuaLaTeX in order to use the package `luapersian`(below code), but it returns some errors.   Luapersina can be downloaded from this link.                \documentclass{beamer}     \usepackage{lmodern}     \usepackage{tikz}     \usetikzlibrary{calc}          \setbeamertemplate{navigation symbols}{}          \pgfkeys{/visual counter/.cd,      thickness/.store in=\thickness,      thickness=0.4ex,      radius/.store in=\radius,      radius=1.5ex,      segment distance/.store in=\segdist,      segment distance=8,      color current frame/.store in=\colcurrframe,      color current frame=orange,      color old frame/.store in=\cololdframe,      color old frame=blue,      color next frame/.store in=\colnextframe,      color next frame=gray!30,      color page number/.store in=\colpagenum,      color page number=white,      current value/.store in=\currentv,      current value=1,      total value/.store in=\totalv,      total value=2,      circled page number/.code={         \begin{tikzpicture}[fill color/.style={}]          \pgfkeys{/visual counter/.cd,             current value=\insertframenumber,            total value=\inserttotalframenumber,          }         \pgfmathtruncatemacro\current{\currentv+1}         \def\tot{\totalv}         \def\radiusout{\radius}         \def\radiusin{\radius-\thickness}              \foreach \s in {1,...,\tot}         {           \ifnum\s>\current%             \tikzset{fill color/.append style={\colnextframe}}%           \fi%           \ifnum\s=\current%             \tikzset{fill color/.append style={\colcurrframe}}%           \fi%           \ifnum\s<\current%             \tikzset{fill color/.append style={\cololdframe}}%           \fi%           \fill[fill color]             ({90-360/\tot * (\s - 1)-\segdist}:\radiusout) arc              ({90-360/\tot * (\s - 1)-\segdist}:{90-360/\tot * (\s)+\segdist}:\radiusout) --             ({90-360/\tot * (\s)+\segdist}:\radiusin) arc              ({90-360/\tot * (\s)+\segdist}:{90-360/\tot * (\s - 1)-\segdist}:\radiusin);             % new addition             \node[inner sep=0pt,text=\colpagenum] at (0,0){\insertframenumber};         }         \end{tikzpicture}      },     }          % new footline with      \setbeamertemplate{footline}{     \begin{beamercolorbox}[wd=0.95\textwidth, ht=2ex,dp=1ex,sep=1ex]{footline}     \hfill%     \tikz\node[/visual counter/.cd,     segment distance=-2pt,     radius=0.5cm, thickness=0.5cm,     color old frame=orange!50,     color current frame=cyan!80!gray!50,     color next frame=cyan!80!gray!50,     circled page number,     ]{};     \end{beamercolorbox}     }          \usepackage{luapersian}          \begin{document}               \begin{frame}          \end{frame}          \end{document}


title: A command for including a folder of macros

text: Is there any command to include a folder of macros(such as sty,def,... files) in preamble like one for graphics (`\graphicspath{{figures/}}`).


title: Error \pdfendlink ended up in different nesting level than > \pdfstartlink

text: When compiling this tex file in ShareLaTeX, I get the following error: > Error in English1213/LaTeX_English_def.tex (line 96): pdfTeX error (ext4): > \pdfendlink ended up in different nesting level than \pdfstartlink. > \AtBegShi@Output ...ipout \box \AtBeginShipoutBox \fi \fi l.96 > \end{document} This error started occurring from the moment I placed a second \citeA{} command in my text. When I compile it with only 1 `\citeA{}` command, there is no problem.... Can somebody help me with this?               \documentclass[a4paper]{article}     \usepackage{StyleEN}          \usepackage{hyperref}     \usepackage{flushend}     \usepackage{graphicx}          \usepackage{amsmath,amssymb}     \usepackage[english]{babel}     \usepackage[numberedbib]{apacite}          % Title.     % ------     \title{FEASIBILITY STUDY OF HEAT NETWORK IMPLEMENTATION}               % Authors     % -------     \author{Peter Vanvoorden\supit{*}\\ \vspace*{0.25cm}                 \small{\supit{*}Master student $<$Biochemical Engineering$>$, GROUP T - Leuven Engineering College, Vesaliusstraat 13, 3000 Leuven \\ \vspace*{1.5cm}                 Supervisor(s): $<$Koen Pelsmaekers$>$ \\                             Unit $<$Informatietechnologie$>$, GROUP T - Leuven Engineering College, Vesaliusstraat 13, 3000 Leuven, $<$\href{mailto:koen.pelsmaekers@groept.be}{koen.pelsmaekers@groept.be}$>$} \\ \vspace*{1em}                 Co-supervisor(s): $<$Stijn De Jonge\supit{1}, Dries Haeseldonckx\supit{2}, Nicolas Dosselaere\supit{3}$>$\\                 Coöperatief Ondernemen in Rationeel Energiegebruik (CORE) cvba-so, Naamsestraat 96, 3000 Leuven - Belgium\supit{1,2}\\ Nazka Mapps bvba, Ravesteinstraat 48A, 3191 Hever - Belgium\supit{3}                 }               \begin{document}          \input{TitlePageEN.tex}          %\pagebreak     \twocolumn          \section{Introduction}     \label{sec:intro}          Focusing on Belgium, statistics from \citeA{tradeco} point out that currently 97.51 \% of its population is living in urban areas while less than 1\% of them is connected to a DH network \cite{Euroheat1}. A study of \citeA{Santens} recapitulates the causes for this low adaptivity to three major categories: Economical, Institutional and Carbon-dioxide/Price related barriers. Within these, most emphasis is placed on following topics which could be considered potential fields of improvement: uncertainty of stable profits, non-recoverable costs in terms of existing individual and distribution infrastructure, a low priority and engagement from local governments, and the low availability of data concerning heat demand and heat supply.\\          %\renewcommand{\refname}{REFERENCES}     \bibliographystyle{apacite}     \bibliography{mybib}          \end{document}


title: Itemize left margin

text: I'm using itemize with the option               [leftmargin=5.5mm]      How can I extend this option to all itemizes in the whole document? I'm on               \documentclass[11pt,a4paper,book,twoside]      Thanks!


title: Separate List of Appendices in new page

text: I need to get a separate List of Appendices in a new page, but I get an error               Undefined control sequence      My code is               \documentclass[12pt,a4paper,oneside]{report}     \usepackage[titletoc]{appendix}     \usepackage{tocloft}     \begin{document}          \addcontentsline{toc}{chapter}{TABLE OF CONTENTS}     \tableofcontents     \newpage          \listofappendices          \newpage          \chapter{a1}     aaaaaaaaaaaaaaaaaa     \chapter{b1}     bbbbbbbbbbbbbbbbbbbb          \addcontentsline{toc}{chapter}{APPENDICES}     \begin{appendices}     \chapter{MY}     ccccccccccccccccccccccccccc     \chapter{DFG}     dddddddddddddddd     \end{appendices}          \end{document}


title: Issue with acronym being only a math mode symbol in glossaries with xindy

text: I am using `glossaries` package to create a list of abbreviations. I need to use `xindy` because otherwise the character `\"{o}` breaks an acronym by being in the definition (and it sorts them better). However, I also use some acronyms that are just mathmode symbols such as `$\alpha$`. For some reason, when I have that as the acronym that should be displayed, no glossary displays at all. Taking out the symbol, using a non-mathmode symbol, or adding a normal character to the acronym all make it work just fine. Here is a simple example that does not work for me (using `xindy` makes no glossary, not using `xindy` only gives one glossary entry).               \documentclass[]{article}          \usepackage[xindy]{glossaries}          \makeglossaries          \newacronym{test}{$\alpha$}{this is a test word}     \newacronym{test1}{\AA}{\aa \"{o}this is a test word}          \begin{document}          This is an example \gls{test}. and again \gls{test1}.          \printglossary          \end{document}      Using Latexian, the PDF is made with no fatal errors, though the makeglossaries returns this: `ERROR: CHAR: index 0 should be less than the length of the string`. I saw other questions that had errors with using `xindy` with `glossaries`, but they mostly seemed to deal with foreign language support. Any help would be appreciated. One thing I just found to work (that I will probably do if I don't get a better answer, but I doesn't explain the error) is adding a non-breaking space after the mathmode symbol: `$\alpha$~` though this makes the abbreviation "wider" than it should be.


title: Using the "combine" document class with the listings package

text: I am trying to use the `combine` document class (manual) to combine several pre-existing documents into a single file with consistent formatting. It works great, except that there is a conflict of some kind with the listings pacakge. When I try compiling with `\usepackage{listings}` in my main document file, I get               ERROR: LaTeX Error: Command \c@lstlisting already defined.          --- TeX said ---                Or name \end... illegal, see p.192 of the manual.      This happens even without any usage of the package. My guess is that the listings package automatically defines some things at each `\begin{document}`, and this is causing the trouble? (I'm really not sure if that is even possible, but that's what it looks like...) Does anybody have any ideas for a workaround? (For the time being I'll just use `verbatim` environments for my code snippets, but I'd love to have the syntax highlighting etc. provided by listings.) Edit: Here's a minimal version of a document with the error:               \documentclass{combine}     \usepackage{listings}     \begin{document}          \begin{papers}       \coltoctitle{Title}       \coltocauthor{Author}       \label{lbl}       \import{test}     \end{papers}     \end{document}      with another file, `test.tex` in the same directory, which can have anything in it, so long as its valid tex. For my minimal example, I did               \documentclass{article}     \begin{document}      Hello world     \end{document}      If `\usepackage{listings}` is commented out, it compiles fine. If it is uncommented, it gives the error as shown.


title: Embed TeX as a typesetting system for an eBook reading application

text: Are there any projects or information on how to use TeX to typeset texts for screen reading? That is, I want to get the beautiful output of TeX to render in a browser-like desktop application. I want the output to be as near real- time as possible. Basically, I want a browser for TeX files that reads the files like a traditional browser reads HTML files and then renders them. The screen size should be able to dynamically resize, unlike with pre-rendered PDFs or other traditional output formats. Each resize would trigger a screen update with the new parameters (potentially overriding the file's settings). This is more of a programming question and I'm interested in libraries that may achieve my goal rather than simple solutions such as workarounds.


title: Shifting (sub)figure caption in case of merged figures

text: I have a small piece of code that merges two figures:               \begin{figure}     \centering     \begin{minipage}{.5\textwidth}       \hspace*{-1.5cm}       \includegraphics[scale=0.45]{images/Figure1.pdf}       \captionof{figure}{My Figure1 Caption}       \label{Figure1}     \end{minipage}     \begin{minipage}{.4\textwidth}       \hspace*{2cm}{       \includegraphics[scale=0.4]{images/Figure2.pdf}       \captionof{figure}{My Figure2 Caption}}       \label{Figure2}     \end{minipage}     \end{figure}      **Question** : Any idea how to shift the caption of the second figure (i.e. the text "Figure2: My Figure2 Caption") to the right, so that it aligns with the second figure which has been shifted?


I am a casual TeX user. Mostly I have used it to type up some reports/homeworks for class in my graduate engineering work. In the past I have used document type "article". And then kept all the defaults. I need to self publish something online. At the highest level I would like to know: **How do you setup a TeX document to self publish a book online?** Some more low level questions:   * **Is there a document type for "book" and what is its name?**   * I am looking at Amazon Createspace. Amazon Createspace's requirements are: filetype=pdf, trim size, margins (gutter and outside margins). **All of these various trim size, margins gutter/outside can be adjusted in the Tex document?**     * Has anyone seen any good TeX templates for Amazon Createspace?     * If you could demonstrate how to tweak a specific "book" document type that would be very helpful also. Other than the above questions, please feel free to offer any other sort of help since I am completely new to this process (advice, links to good tutorials, links to wikibooks).


title: How to prevent a TikZ arrow from touching a node?

text: I am using TikZ to draw some trees in my thesis. This is a sample of what is being done:               \documentclass{article}     \usepackage{tikz-qtree}          \newcommand{\Ta}{     \begin{tikzpicture}[level distance=30pt, sibling distance=90pt]       \node {}             child {node {$p(x)$}             child{node {$skipped$} edge from parent[draw=none]}         }             child {node {$s(x)$}             child {node {$\sim s(x)$}                 child{node {$closed$} edge from parent[draw=none]}             }            };     \end{tikzpicture}     }          \newcommand{\Tb}{     \begin{tikzpicture}[level distance=30pt, sibling distance=90pt]     \tikzstyle{level 2}=[level distance=30pt, sibling distance=80pt]       \node {}             child {node {$p(x)$}             child{node {$q(x)$}                 child{node {$skipped$} edge from parent[draw=none]}             }             child{node {$\sim p(x)$}                 child{node {$closed$} edge from parent[draw=none]}             }         }             child {node {$s(x)$}             child {node {$\sim s(x)$}                 child{node {$closed$} edge from parent[draw=none]}}          };     \end{tikzpicture}     }               \newcommand{\Tc}{     \begin{tikzpicture}[level distance=30pt, sibling distance=90pt]     \tikzstyle{level 1}=[sibling distance=90pt]     \tikzstyle{level 2}=[sibling distance=80pt]     \tikzstyle{level 3}=[sibling distance=40pt]       \node {}             child {node (n1) {$p(x)$}             child{node {$q(x)$}                 child{node (n2) {$\sim p(x)$}                     child{node {$closed$} edge from parent[draw=none]}                 }                 child{node {$\sim q(x)$}                     child{node {$closed$} edge from parent[draw=none]}                 }                 child{node {$ r(x)$}                     child{node {$skipped$} edge from parent[draw=none]}                 }             }             child{node {$\sim p(x)$}                 child{node {$closed$} edge from parent[draw=none]}             }         }             child {node {$s(x)$}             child {node {$\sim s(x)$}                 child{node {$closed$} edge from parent[draw=none]}}          };          \path[dashed, <->](n1)edge [bend right=45]  node[above left]{reduction}(n2);          \end{tikzpicture}     }          \begin{document}     \pgfversion          \begin{figure}     \centering     \begin{minipage}{0.45\textwidth}     \centering\Ta     \caption{$Ta$}     \end{minipage}     \begin{minipage}{0.45\textwidth}     \centering\Tb     \caption{$Tb$}     \end{minipage}     \vspace{15pt}     \vspace{15pt}     \begin{minipage}{0.45\textwidth}     \centering\Tc     \caption{$Tc$}     \end{minipage}     \end{figure}               \end{document}      There is one little problem I cannot solve. The command:               \path[dashed,<->](n1)edge [bend right=45]  node[above left]{reduction}(n2);      produces a line that is touching the bottom node, and this is a little annoying. ![enter image description here](http://i.stack.imgur.com/3lx7H.png) I tried different approaches but nothing seemed to work. Can anyone help me figure this out?


title: Fit tables read in with \input to page-width

text: I'm trying to fit tables to page-width that I include in the .tex document via the /input method. I'm doing this because I'm exporting tables from Stata to Latex with the estout methods, and include these tables into my document. However, some tables are too wide and I'd like to scale them down to make them fit. I think this question is different from many questions that ask to fit tables because I'm calling the table through the /input{} method. However, I'm a beginner in Latex and might just not have tried the right things yet. Ideally, i don't want to change the stata latex output manually but rather have either a) some option in Stata estout or b) some latex code in the main document. Thanks in advance for any help! The main document:               \documentclass[•]{article}     \usepackage{booktabs}          \begin{document}          \input{tables/desstat_behav_corr}          \end{document}      And the input document:               \begin{table}[htbp]     \centering      \caption{Pairwise correlations of behavioural variables}     \begin{tabular*}{\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{8}{c}}      \toprule &\multicolumn{8}{c}{}   \\           &  ceo\_age&   cfo\_age&CapIQ\_CEOfixed\_to\_total&CapIQ\_CEObonus\_to\_total&CapIQ\_CEOlongterm\_to\_total&CapIQ\_CFOfixed\_to\_total&CapIQ\_CFObonus\_to\_total&CapIQ\_CFOlongterm\_to\_total\\     \midrule     ceo\_age   &        1&         &         &         &         &         &         &          \\     cfo\_age   &    0.260&        1&         &         &         &         &         &         \\     CapIQ\_CEOfixed\_to\_total&   0.0202&  -0.0563&        1&         &         &         &         &         \\     CapIQ\_CEObonus\_to\_total&   0.0323&   0.0844&   -0.442&        1&         &         &         &         \\     CapIQ\_CEOlongterm\_to\_total&  0.00911&   0.0740&   -0.316&   0.0130&        1&         &         &         \\     CapIQ\_CFOfixed\_to\_total&  -0.0748&  -0.0879&    0.673&   -0.308&   -0.279&        1&         &         \\     CapIQ\_CFObonus\_to\_total&   0.0708&   0.0534&   -0.380&    0.794&  -0.0360&   -0.361&        1&         \\     CapIQ\_CFOlongterm\_to\_total&   0.0766&   0.0395&   -0.318&  -0.0245&    0.814&   -0.325&  -0.0415&        1\\     \bottomrule     \end{tabular*}     \end{table}


title: Don't count backup slides

text: I prepare some backup slides at the end of my presentation. I don't want them to be counted in terms of pages, which is displayed at the footer of each slide. Does anyone know how to do that?


title: Adding dotted lines to the LOF and LOT

text: I am trying to add dotted lines in the table of contents using the `tocloft` package.               \usepackage{tocloft}     \renewcommand\cftchapdotsep{\cftdotsep}     \renewcommand\cftchapleader{\cftdotfill{\cftchapdotsep}}     \renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}      I succeeded in getting them on the table of contents page, but I can't seem to figure out how to get them to show up on my list if figures and list of tables.


title: Creating 'document' environment using AUCTeX leaves a blank line after \end{document}

text: If I type `C-c C-e document` in AUCTeX mode using Eamcs, I end up with a blank line after `\end{document}`; see ![output](http://i.stack.imgur.com/7JrQc.jpg) Can I stop AUCTeX from producing this extra line at the end? Notes: I use Emacs 24.3-13 with AUCTeX 11.87-7 on a Fedora system.


title: newcommand with node confusion

text: I'm just getting warmed to tikz so please forgive me if this is a dumb question I want to declare an newcommand containing a node with text:               \newcommand{\mydoor}[1] {     \draw[black] (1,-1) -- (1,-0) node[right,near start] {{#1}};     }          \begin{tikzpicture}     \mydoor[mytext];     \end{tikzpicture}      The output I get is not "| mytext" but "| [" What on earth am I missing and how can I design a simple line with a configurable text (I want to use this on a more complicated polygon, therefore the environment)?


title: Header font in LyX

text: I would like to change the header font in my book ms from serif to sans serif. I've spent much time trying to find the answer on the web. I'm using `book (KOMA script)` and `fancyhdr`. Can some kind soul show me the light? A minimal *.lyx file that produces this problem on my system is shown below:               #LyX 2.0 created this file. For more info see http://www.lyx.org/     \lyxformat 413     \begin_document     \begin_header     \textclass scrbook     \begin_preamble     % DO NOT ALTER THIS PREAMBLE!!!     %     % This preamble is designed to ensure that the User's Guide prints     % out as advertised. If you mess with this preamble,     % parts of the User's Guide may not print out as expected.  If you     % have problems LaTeXing this file, please contact     % the documentation team     % email: lyx-docs@lists.lyx.org          \usepackage{ifpdf} % part of the hyperref bundle     \ifpdf % if pdflatex is used           % set fonts for nicer pdf view      \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}          \fi % end if pdflatex is used          % for correct jump positions whe clicking on a link to a float     \usepackage[figure]{hypcap}          % the pages of the TOC is numbered roman     % and a pdf-bookmark for the TOC is added     \let\myTOC\tableofcontents     \renewcommand\tableofcontents{%       \frontmatter       \pdfbookmark[1]{\contentsname}{}       \myTOC       \mainmatter }          % define a short command for \textvisiblespace     \newcommand{\spce}{\textvisiblespace}          % macro for italic page numbers in the index     \newcommand{\IndexDef}[1]{\textit{#1}}          % for customized page headers/footers     % only needed because they are only used in one section of the document     \usepackage{fancyhdr}     % change header rule width     \renewcommand{\headrulewidth}{1pt}     % workaround for a makeindex bug,     % see sec. "Index Entry Order"     % only uncomment this when you are using makindex     %\let\OrgIndex\index     %\renewcommand*{\index}[1]{\OrgIndex{#1}}     \setkomafont{pagehead}{\normalfont\sffamily\upshape}     \end_preamble     \options refpage,intoc,bibliography=totoc,index=totoc,BCOR7.5mm,captions=tableheading     \use_default_options false     \begin_modules     enumitem     customHeadersFooters     \end_modules     \maintain_unincluded_children false     \language english     \language_package default     \inputencoding utf8     \fontencoding global     \font_roman palatino     \font_sans helvet     \font_typewriter courier     \font_default_family default     \use_non_tex_fonts false     \font_sc true     \font_osf false     \font_sf_scale 100     \font_tt_scale 100          \graphics default     \default_output_format default     \output_sync 0     \bibtex_command default     \index_command default     \paperfontsize 12     \spacing single     \use_hyperref true     \pdf_title "The LyX User's Guide"     \pdf_author "LyX Team"     \pdf_subject "LyX"     \pdf_keywords "LyX"     \pdf_bookmarks true     \pdf_bookmarksnumbered true     \pdf_bookmarksopen false     \pdf_bookmarksopenlevel 1     \pdf_breaklinks false     \pdf_pdfborder false     \pdf_colorlinks true     \pdf_backref false     \pdf_pdfusetitle false     \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"     \papersize custom     \use_geometry true     \use_amsmath 1     \use_esint 1     \use_mhchem 1     \use_mathdots 1     \cite_engine basic     \use_bibtopic false     \use_indices false     \paperorientation portrait     \suppress_date true     \use_refstyle 0     \notefontcolor #0000ff     \boxbgcolor #e6e6e6     \branch Question     \selected 1     \filename_suffix 0     \color #00ff00     \end_branch     \branch Answer     \selected 0     \filename_suffix 0     \color #aa55ff     \end_branch     \index Index     \shortcut idx     \color #008000     \end_index     \paperwidth 7.5in     \paperheight 9.25in     \secnumdepth 2     \tocdepth 2     \paragraph_separation indent     \paragraph_indentation default     \quotes_language english     \papercolumns 1     \papersides 2     \paperpagestyle fancy     \tracking_changes false     \output_changes false     \html_math_output 0     \html_css_as_file 0     \html_be_strict true     \end_header          \begin_body          \begin_layout Title     Build it with Nitrogen     \end_layout          \begin_layout Subtitle          \shape italic     \size larger     The fast-off-the-block Erlang web framework     \end_layout          \begin_layout Author          \family sans     Lloyd R.      Prentice & Jesse Gumm     \end_layout          \begin_layout Standard     \begin_inset CommandInset toc     LatexCommand tableofcontents          \end_inset               \end_layout     \begin_layout Chapter     You want me to build what?     \end_layout          \begin_layout Standard          \end_layout          \begin_layout Chapter     Enter the lion's den     \end_layout          \begin_layout Standard     Whoa! Day after tomorrow? That's harsh.      But that's Bossman--- no moss under that dude's feet.      So we best get crackin'.     \end_layout          \begin_layout Standard     These three boxes power our trusted in-house development network.      We call them Alice, Bob, and Mallory.      Yes, indeed, we take security seriously.      Rusty will read you in on our security practices later.     \end_layout          \begin_layout Standard     We also have a remote server--- hostname Charlie.      Plan to lease another--- probably call it Dora.     \end_layout          \begin_layout Standard     Why all the hardware?     \end_layout          \begin_layout Standard     Erlang was explicitly designed to support distributed computing     \begin_inset Index idx     status open          \begin_layout Plain Layout     distributed computing     \end_layout          \end_inset          .      So we use the machines on this network to develop and test distributed      applications and databases.      Set it up on the cheap.          \end_layout          \begin_layout Standard     Alice and Mallory are old Dell Optiplex 745s running Linux Debian     \begin_inset Index idx     status open     \begin_layout Plain Layout     Debian     \end_layout          \end_inset           Linux Wheezy.      Dual-core, gig of RAM.      Company up the road traded up so Bossman picked these puppies up for fifty      bucks apiece.      Bossman likes to say lean-and-mean.      Truth--- the dude's a cheap skate.     \end_layout          \begin_layout Standard     Yes, we could we use     \shape italic     Vagrant,     \shape default     the cloud, or some such, instead of physical machines.      But Bossman is old school.      We're trying to talk him around.     \end_layout          \begin_layout Standard     Bob is a custom built PC running Ubuntu     \begin_inset Index idx     status open          \begin_layout Plain Layout     Ubuntu     \end_layout          \end_inset           14.04.      Three-core AMD processor, six gigs of RAM.     \end_layout          \begin_layout Standard     I tap into the network with my personal MacBook Pro     \begin_inset Index idx     status open          \begin_layout Plain Layout     MacBook Pro     \end_layout          \end_inset          .     \end_layout          \begin_layout Standard     Fact is, you don't need all this kit to develop Nitrogen apps.      You can do it on your Windows     \begin_inset Index idx     status open          \begin_layout Plain Layout     Windows     \end_layout          \end_inset           notebook at Starbucks if you're so inclined.      I've heard of folks running Nitrogen on     \shape italic     Raspberry Pi     \shape default          \begin_inset Index idx     status open          \begin_layout Plain Layout     Raspberry Pi     \end_layout          \end_inset          .          \end_layout          \begin_layout Standard     But we're looking toward bigger things here--- reliable, industrial strength,      scalable apps.     \end_layout          \begin_layout Section*     The big picture     \end_layout          \begin_layout Standard     Before we begin, let me paint the big picture.          \end_layout          \begin_layout Standard     The challenge of web application development comes down to managing a jumble      of languages and network protocols.          \end_layout          \begin_layout Standard     You, Dude, learned your native language effortlessly in the bosum of your      family.      But as a web application developer your task is to convince hardware on      both server and client sides to do your bidding.      Problem is, the stupid machines don't speak your native language.          \end_layout     \begin_layout Standard     On the client side, the browser responds to HTTP/HTTPS protocols carrying      HTML, CSS, and JavaScript messages which, in turn, convey and present informati     on structured as natural language, sound, and images both still and moving.          \end_layout          \begin_layout Standard     The server responds to some babel of computer languages to marshal the HTTP/HTTP     S, HTML, CSS, JavaScript, natural language, sound, and images both still      and moving through the Internet to the client.     \end_layout          \begin_layout Standard     It's almost too much for the feeble human mind to encompass.      The nitty gritty tedium of it all is mind numbing.     \end_layout          \begin_layout Standard     So this is where Nitrogen comes in.          \end_layout          \begin_layout Standard     Nitrogen harness the power of Erlang to manage all--- well, most all---      of the fiddly semantics and syntax of HTTP/HTTPS, HTML, CSS, and JavaScript.      This means that you have that much less to think about when you craft your      cunning web application.      In the spell of creative ferment, you can produce cool web chops all that      much faster.     \end_layout          \begin_layout Standard     We're not saying that you don't have to understand the alphabet soup of      web technologies.      The deeper you understand them the better.      We are saying that mastery of Erlang Nitrogen will make you far more fluent      and productive.     \end_layout          \begin_layout Standard     What's the trick?     \end_layout          \begin_layout Standard     Nitrogen combines the structural convenience of Erlang records, the fluency      of Erlang functions to execute logic and embed JavaScript, and the power      of Erlang as a development platform to organize and abstract the semantic      and syntactical fussiness of server/web/browser communication.     \end_layout          \begin_layout Standard     Enough already.      Let's install Nitrogen.     \end_layout          \end_body     \end_document


title: Tkz-fct can't run in another drive (Windows User)

text: I try to run tkz-fct in drive D with location D:\latexrun but it can not work. Then I notice that package only run well in drive C as my Miktex location in **C:\Program Files\MiKTeX 2.9** and in **C:\Users\user\AppData\Roaming\MiKTeX** . In drive D the message show :               ! Undefined control sequence.     l.10 \tkzSetUpColors     ! Undefined control sequence.     l.17 \tkzAxeY     !  Undefined control sequence.     l.19 \tkzDefPoint     Undefined control sequence.     \pgfutil@reserved@c ->\tkzActivOff     ! File ended while scanning use of \pgfkeys@code.      This is sample I got from author's site which is run well in drive C but not in drive D.               \documentclass{scrartcl}     \usepackage[utf8]{inputenc}       \usepackage[upright]{fourier}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{fullpage,amsmath,tkz-fct}     \definecolor{fondpaille}{cmyk}{0,0,0.1,0}     \pagecolor{fondpaille}     \color{Maroon}     \tkzSetUpColors[background=fondpaille,text=Maroon]     \thispagestyle{empty}          \begin{document}          \begin{tikzpicture}[scale=3]     \tkzInit[xmax=3,ymax=2];     \tkzAxeX     \tkzAxeY     \tkzGrid(0,0)(3,2)     \tkzFct[color  = red, domain = 1./3:3]{0.125*(3*\x-1)+0.375*(3*\x-1)/(\x*\x)}     \tkzDefPointByFct[draw](2)      \tkzDefPointByFct[draw](3)     \tkzDrawTangentLine[color = blue,line width = .8pt](1)      \tkzFct[color   = green, domain  =  1./3:3]{0.125*(3*x-1)}     \tkzSetUpPoint[size=8,fill=orange]      \tkzDefPointByFct[draw](3)      \tkzDefPointByFct[draw](1/3)      \tkzDefPoint(1,1){f}     \tkzDrawPoint(f)     \tkzText[draw,fill = red!20,text=red!50!black](1,1.5)%     {$f(x)=\dfrac{1}{8}(3x-1)+\dfrac{3}{8}\left(\dfrac{3x-1}{x^2}\right)$}     \tkzText[draw,fill = green!20,text=green!50!black](2,0.4){$g(x) = \dfrac{3x-1}{8}$}         \end{tikzpicture}     \end{document}      I have no problem calling gnuplot or another packages in drive D previously. I use Windows Vista Japanese Version SP2. Please help what should I do to make tkz-fct can run in another drive.


title: Wrong scaling in xyz coordinate systems

text: As stated in the Manual in section 10.2.1 "the default z-vector points to (-sqrt(2), -sqrt(2)). But when I draw:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[axis/.style={thick,->}]         \coordinate (O) at (0, 0, 0);         \draw[axis] (O) -- +(1, 0, 0) node [right] {$X$};         \draw[axis] (O) -- +(0, 1, 0) node [right] {$Y$};         \draw[axis] (O) -- +(0, 0, 1) node [above] {$Z$};         \draw[red, thick]   (O) -- +(-0.70710678, -0.70710678);     \end{tikzpicture}     \end{document}      I get this: ![TikZ output](http://i.stack.imgur.com/N6Gyk.png) As you can see: the red line is clearily longer than the z-axis, whereas it should be equal in length. Can someone point me to the right direction? During my investigations I found another strange behaviour:               \documentclass[11pt]{minimal}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}         \draw[red]          (-2cm,-2cm) grid (3,2cm);         \coordinate         (O) at (0, 0, 0);         \draw[blue]         (O) -- +(0, 1cm, 0);     \end{tikzpicture}     \end{document}      Yields two pages: the first one is empty, and the second one looks like: ![output](http://i.stack.imgur.com/g4OwH.png) This is the whole page, I didn't clip anything. I am totally confused.


title: Getting lilyglyphs working in LuaTeX

text: The package `lilyglyphs` provides a set of macros for incorporating Lilypond fonts easily into XeLaTeX files. That package is available here. I am using TeXLive 2013. With the following MWE it works as expected with XeLaTeX:               \documentclass{memoir}     \usepackage{fontspec}     \usepackage{lilyglyphs}     \begin{document}     \lilyTimeC     \end{document}      Running it with LuaLaTeX results in the following error:               ! Undefined control sequence. \lilyGetGlyph #1^^@-\XeTeXglyph     \XeTeXglyphindex "#1"      I traced this back to the `core/genericAccess.inp` file which contains the following line:               \newcommand*{\lilyGetGlyph}[1]{\XeTeXglyph\XeTeXglyphindex"#1" }      OK, that's a XeTeX-specific command. I need the LuaTeX version in order to make this work with LuaLaTeX. I found this answer which suggests something like this:               \def\lilyGetGlyph#1{\directlua{fonts.otf.char("#1")}}      But when I run LuaLaTeX on the MWE I get the following error:               ! LuaTeX error [string "\directlua "]:1: attempt to index field 'otf' (a nil value)     stack traceback:     [string "\directlua "]:1: in main chunk.     \lilyGetGlyph ...\directlua {fonts.otf.char("#1")}      I have no idea what that means but neither do I understand the syntax of my attempted fix (I just keep putting in words and symbols hoping something will work). So what I'm looking for is the LuaTeX version of that XeLaTeX bit of code that will allow the package `lilyglyphs` to work with LuaLaTeX. Assuming, of course, that's the proper way to fix this.


title: Draw a picture of primes ideal lying over a prime ideal

text: Let $K$ be a number field and $L$ be a finite extension of $K$. Then, let $\mathfrak{p}$ be a prime in $K$ and $\mathfrak{P}$ be a prime lying over $\mathfrak{p}$. I would like to draw the following picture:                     L              \mathfrak{P}             R_L/\mathfrak{P}           |finite             |unramified                 |extension of           |extension          |prime                      |finite fields           K              \mathfrak{p}             R_K/\mathfrak{p}      How should I go about it? Can I do it with use `amscd` or `tikz`? Or must I use fancier packages?


title: ucs clashes with DeclareUnicodeChar?

text: I'm forced to work with `latex`, and want to make use of unicode chars in math. So I write:               \documentclass{article}     \usepackage[utf8]{inputenc}     \DeclareUnicodeCharacter{B7}{\cdot}     \usepackage[mathletters]{ucs}     \begin{document}     $a · b$     \end{document}      But it gives:               aΔb      Is there a way to `DeclareUnicodeChars` after `ucs`? * * * The `ucs` manual has something to say about `DeclareUnicodeChars`:               Several options have a special hardcoded meaning:     ...     Every character you define in your document using \DeclareUnicodeCharacter     has the option document. This option is activated per     default having the priority 1000, therefore manually declared characters take     precedence over all other characters, unless some other option has explicitly     gotten a higher priority.     ...      So I tried the way I understood it:               \DeclareUnicodeCharacter[document]{B7}{\cdot}      and               \DeclareUnicodeCharacter{B7}[document]{\cdot}      but it doesn't work. * * * Also tried:               \DeclareUnicodeOption{document}      and it also doesn't work. **Edit** :               \documentclass{article}          \usepackage[mathletters]{ucs}          \usepackage[utf8x]{inputenc}          \begin{document}     \DeclareUnicodeCharacter{00B7}{\cdot} % U+00B7 = cdot     $a · b$     \end{document}      Gives:               ! Missing = inserted for \ifnum.     <to be read again>                         B     l.10 \DeclareUnicodeCharacter{00B7}{\cdot}                                                % U+00B7 = cdot      Also after reading `ucs` sources I tried:               \documentclass{article}          \usepackage[mathletters]{ucs}          \usepackage[utf8x]{inputenc}          \uc@dclc{183}{mathletters}{\ensuremath{\cdot}}%·          \begin{document}     $a · b$     \end{document}      but it gives:               ! Undefined control sequence.     l.7 \uc            @dclc{183}{mathletters}{\ensuremath{\cdot}}%·


title: package fancyhdr: no dot behind chapter number in header

text: I am using a university template and want to modify it just a little bit. How can I remove the dot behind the chapter in the headings? Here is a "minimal" example.               \documentclass[paper=a4 , twoside=false, 11pt, numbers=noenddot, bibliography=totoc, listof=totoc]{scrreprt}          \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage[ngerman,USenglish]{babel}          \usepackage{helvet}     \renewcommand{\familydefault}{cmss}          \usepackage{type1ec}          \usepackage{fancyhdr}     \lfoot[\fancyplain{}{}]{\fancyplain{}{}}     \rfoot[\fancyplain{}{}]{\fancyplain{}{}}     \cfoot[\fancyplain{}{\footnotesize\thepage}]{\fancyplain{}{\footnotesize\thepage}}     \lhead[\fancyplain{}{\footnotesize\nouppercase\leftmark}]{\fancyplain{}{}}     \chead{}     \rhead[\fancyplain{}{}]{\fancyplain{}{\footnotesize\nouppercase\sc\leftmark}}               \begin{document}          \pagestyle{plain}          \chapter*{Abstract}          \pagenumbering{Roman}          \tableofcontents     \newpage          \newcounter{romancount}     \setcounter{romancount}{\value{page}}          \setcounter{page}{1}     \pagenumbering{arabic}          \pagestyle{fancy}          \chapter{Introduction}     text     \clearpage     text     \clearpage          \chapter{Conclusion and Outlook}          \newpage     \pagenumbering{Roman}     \setcounter{page}{\value{romancount}}          \listoffigures     \clearpage          \listoftables     \clearpage          \addchap{List of Abbreviations}                 %adds a chapter without numerating it     \markboth{List of Abbreviations}{}          %add the name of the chapter to headings          \end{document}      ![enter image description here](http://i.stack.imgur.com/t2t97.png) ### Edit changing to a more simple fancyhdr setup like               \fancyfoot[C]{\footnotesize\thepage}     \fancyhead[R]{\footnotesize\scshape\nouppercase{\leftmark}}      and then removing the dots with the mentioned code is not working for me, because it also changes the style of the header. And I don't want to change the appearance of the template my setup ![enter image description here](http://i.stack.imgur.com/DIjRz.png) simpler but changed setup ![enter image description here](http://i.stack.imgur.com/Bnrc9.png) isn't there a way of leaving my setup/the template as it is and just remove the dots?


From time to time, I need to typeset Welsh. Sometimes, I need to typeset citations and bibliographies in Welsh. I think that last time I did this, I may still have been using BibTeX although I am honestly not sure. In any case, my entire work-flow now uses `biber` and `biblatex`... I found lockstep's excellent answer on changing the names of things, including the names of things used by `biblatex`. However, that cannot deal with the case of an unsupported language. Suppose that I want to typeset a document in Welsh:               \documentclass[a4paper,welsh]{article}          \usepackage{babel}     \usepackage[utf8]{inputenc}% welsh needs utf8x but biblatex doesn't like it     \usepackage[T1]{fontenc}% not great for Welsh but the best pdfTeX can do     \usepackage{csquotes}% doesn't like Welsh though biblatex likes csquotes on account of babel...     \usepackage[backend=biber]{biblatex}     \bibliography{biblatex-examples}          \title{Fy Dogfen}     \author{Rhywun}          \begin{document}       \maketitle       \tableofcontents       \section{Cyntaf}       \autocite{westfahl:space}            \printbibliography          \end{document}      There are multiple problems in such a case. (One is that I need `utf8x` but can't use it on account of `biblatex`. Another is that I need `utf8x` at all. Another is that `biblatex` likes `csquotes` but `csquotes` doesn't do Welsh. But these are irrelevant to this question.) The output is as follows: ![problemau](http://i.stack.imgur.com/vUwtR.png) Note that the use of the English citation is just so this is easy to reproduce. Obviously, the content of the reference might well be in Welsh. (Though it might be in English, too.) As can be seen, while elements of the document controlled by `babel` are handled correctly, those under the control of `biblatex` are not. However, I cannot simply modify the solution offered by lockstep for changing strings to customised English variants. That is, I can't just use a Welsh version of               \DefineBibliographyStrings{english}{%       bibliography = {Works Cited},       references = {Works Cited},     }      because `biblatex` has never heard of it. What is the most appropriate way to configure `biblatex` for use with an unsupported language?


title: Header wrapped over two lines with pgfplotstable

text: I have a table produced by pgfplotstable. I want to force two headers to wrap on two lines but I can't get it working. This is in my script:               \documentclass{article}          % Set the values for the biblography     \usepackage[         isbn=false,         url=false,         doi=false,         eprint=false,     ]{biblatex}          % For tables     \usepackage{pgfplotstable}     \usepackage{booktabs}     \usepackage{array}     \usepackage{caption}          \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}          \pgfplotstableset{         font={\small},         empty cells with={--}, %  replace empty cells with ’--’         every head row/.style={before row=\toprule,after row=\midrule},         every last row/.style={after row=\bottomrule}     }          \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}          %Set column width (This is my fix...)     \setlength{\tabcolsep}{3.5pt}          % Create command for paragraph style (new line after)     \newcommand{\myparagraph}[1]{\paragraph{#1}\mbox{}\\}          \begin{document}               \myparagraph{paragraph}     Blalalala          % Add table     \begin{table}     \caption{My table}     \centering     \pgfplotstabletypeset[         columns/City/.style={string type},         columns/Wrap it/.style={column type=|C},         col sep=comma]{table.csv},     \end{table}               \end{document}      I got the error `Paragraph ended before \NC@find was complete.` before the `\end{table}` line. This is my table.csv               City,Wrap it     London,12     Paris,12     Rome,323      I want the header "Wrap it" to be on two lines, so to reduce the width of only the second column.


title: How to caption with an arbitrary type

text: I want to include some text and equations into a framed environment like a box. And then I want to add captions above or underneath this "box", e.g. "Box.1. This is a box." Here is a MWE:               \documentclass[12pt,a4paper,bibtotoc,idxtotoc,headsepline,footsepline,footexclude,BCOR12mm,DIV13]{scrbook}              \usepackage{framed}                   \begin{document}                        \begin{framed}         This is a box.         \end{framed}                        \end{document}


title: How can I get my ellipses formatted correctly in XeTeX?

text: I've been using `\dots` and `\ldots` to try to get ellipses happening. Ellipses should look like this: Some text . . . and then some more text. But instead they look like this: Some text ...and some more text. I'm using XeTeX with the `mla` style from the texlive-humanities Ubuntu package. I should also add that I'm very new to TeX and have almost no idea what I'm doing. The top of my document looks like this:               \documentclass[11pt,letterpaper]{article}     \usepackage{ifpdf}     \usepackage{mla}          %Xelatex Stuff     \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}           \setmainfont[Mapping=tex-text]{Linux Libertine O}          \begin{document}


title: Pgfplots ybar option draws tickmarks outside the plot area

text: I'm seeing x tick marks drawn outside the plot area when `ybar` is active. Is this expected, why, and how can it be prevented? Here's a MWE:               \documentclass{article}          \usepackage{pgfplots}     \pgfplotsset{compat=1.10}          \begin{document}          \begin{tikzpicture}     \begin{axis}[         title=Test,         xlabel={X label},         ylabel={Y label},         ybar     ]     \end{axis}     \end{tikzpicture}          \begin{tikzpicture}     \begin{axis}[         title=Test,         xlabel={X label},         ylabel={Y label},         %ybar     ]     \end{axis}     \end{tikzpicture}          \end{document}      ![ybar](http://i.stack.imgur.com/SgSwy.png)


title: color only a cell of a table

text: > **Possible Duplicate:**   >  Color merged and regular cells in a table individually I tried to color only a cell of my table but I don't know how do it. I found the method to color an entire row.How could I color only a cell of my table of a precise color?


title: Color merged and regular cells in a table individually

text: In a LaTeX table with merged cells, how can I color each cell with a different color? ![alt text](http://i.stack.imgur.com/mEsng.png)               %% LyX 1.6.7 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}          \makeatother          \usepackage{babel}          \begin{document}     \begin{tabular}{|c|c|c|c|}     \cline{3-4}      \multicolumn{1}{c}{} &   & \multicolumn{2}{c|}{Overexpression}\tabularnewline     \cline{3-4}      \multicolumn{1}{c}{} &  & Cancer & Control \tabularnewline     \hline      Marked & Cancer  & 45  & 61\tabularnewline     \cline{2-4}      Cell Line & Control  & 42  & 52\tabularnewline     \hline     \end{tabular}     \end{document}


title: Parallel texts with header on each page?

text: I have two English language texts that are translations of the same work and that I want to put in parallel: I do not plan to include the original, non- English text. This is for a document (of ca. 100 pages), by the way, rather than for a book. I have actually created said document using `Open/Libre Office`, so I have a sort of a working copy. But I want to recreate the same document using `TeX/LaTeX`. With `Open/Libre Office` I used a table of two columns and three rows (the text of the translation occupies one row, while the other two rows are headings). I did some experimentation with `LaTeX` about a year ago and had some initial success using a table for the task, but eventually failed to complete the project. A description of the successful part, as well as the ultimate failure follows. I used only about one page of text for the initial tests. The output looked superb--much better than my `Open/Libre office` document. But my enthusiasm was short-lived: I found that the table packages I tried all lacked the ability to produce page-spanning columns. In other words, any column that ends up being longer than one page in length simply gets cut off unceremoniously at the bottom of the page. In a case like mine, where I had a column that would end up being many pages long, I would wind up with only one page of output (`overfull vbox` error, as I recall); none of the subsequent pages would be produced. I did look into other packages (`ledpar`, I believe?) that are made specifically for creating parallel texts and had some success with them as well. But in my view, the table solution output looked best. And as I recall, I had issues trying to introduce the material I had placed in the table headings using the `parallel text` packages, and I held it important to have a repeating header on each page (that would indicate which column contained which translation). So I got discouraged. I still hope I might be able to use a table for this project, even though it is a bit of a violation of the intended use for tables. Can anyone offer suggestions about how to accomplish the task I've described in `TeX/LaTeX`? Will it really be impossible, as it seems to me, using a table? * * * **UPDATE:** Thank you for the answers thus far provided. I had to go back and take another look at the experimental documents I created since this was done some time ago and my memory had gotten a bit vague. I should start this reply by stating that I somewhat over-simplified the description of my document in the OP--apologies for that. And, having looked at my sample files again, I now realize that I had problems with both the table packages (and yes, I did try `longtable`s) and with the parallel text package (which was, in fact, `parcolumns`, not `ledpar`). The final output looked a bit better using the table, but the look of the `parcolumns` experiment was nice as well. The problem with the table packages I've described: no table column is allowed to exceed page length (seems to be a limitation coded into the packages--yes, even the `longtable` packge, I believe). That's a show-stopper for this project: I would have many columns in this document that would exceed page length--which brings me to the over-simplified description I gave in the OP and the problem I had with the `parcolumns` package. The document actually could consist in many column chunks, and the `parcolumns` package does handle page-exceeding columns. The trouble I had with this package was inserting the table headings: they should appear on every page of the document, and I had trouble making that happen. I should probably leave it at that for now since a more detailed description of the document here is likely to confuse and leave me open to being criticized for "moving the goal post." But I will note in closing that there are actually several sub-section in the document, and each sub-section needs to have a set of headers that repeats on every page. Sorry for not having been more precise in my opening post. * * * **ANOTHER UPDATE:** Wow, this forum is great--so many wonderful suggestions. Thank you so much for the helpful comments and questions. I've struggled to understand and use `TeX/LaTeX` for years and only recently did I meet with any success. Had this forum existed when I first started studying `TeX/LaTeX` (about 10 years ago), I'd be much further along by now. Yes, it's true that the two translations can vary--sometimes wildly--in paragraph length. This is because one translation seems sometimes to give what seems more like a summary of a paragraph rather than an actual translation. So keeping the two in sync was a challenge. A table works well for that, since each paragraph of each translation is placed in a cell. That technique has the undesirable effect of introducing at some points a great deal of extraneous white space, but it does keep the paragraphs in sync. With `parcolumns`, I used paragraphs to keep the two translations in sync--to pretty much the same effect as with the table. It would be nice to be able to have the longer translation somehow flow around the shorter one in cases where one is significantly longer than the other, but with the headers I'm talking about using, that would probably not be feasible. The header suggestion provided by rdhs inspires me to resume my experiments using `parcolumns`--thanks so much for that. The header layout I implemented in my `Open/Libre Office` document is quite complex but results in the appearance I need. Implementing it in `TeX/LaTeX` is bound to be a challenge. What's needed is actually 3 sets of headers: one for the page (gives the title of the work); one for each section of the work (should contain a title like chapter 1, chapter 2, and should span both columns); and one for each column (containing titles something like `translation 1, translation 2`). With a table the last two can be easily done by specifying that the first two table rows are table headings to be repeated on each page, and the first row's columns get merged and the text centered. The first header described is just a standard page header. Those headers should all repeat on every page, and there might be more than one set of headers on any given page (where there is, say, an extremely short chapter than takes up less than a page). I actually managed to get that look using the table package. But, as I said, the page-exceeding cells (I said page-exceeding columns earlier, but it's probably more precise to say cells of the table) are not allowed by any table package. So the experiment failed and I turned to `parcolumns` to try and recreate the layout I'd achieved in `Open/Libre Office`. Again thanks for all the tips. This forum is really great (though a little confusing to use, at least for me) James


title: Emphasize text that is highlighted using the soul package

text: I can highlight a bit of text (i.e., make the background yellow) using the `soul` package like this:               \hl{a bit of text}      I figured I could also use italics like this:               \hl{\emph{a bit of text}}      ... but it doesn't seem to work --- the text is still "normal". What am I missing?


title: Customizing Gonzalo Medina's Award Winning Entry

text: I am trying to do few modifications to Gonzalo Medina(GM)'s award winning contest entry. I want to change the fonts GM used in the header box. I achieved partial success by changing following lines in GM's gridleno.sty               \color{headtitle}\Huge\lecturenotename \\[6pt]           \fontfamily{cmr}\fontsize{17pt}{20pt}\selectfont\scshape\@topic \\[6pt]           {\normalsize\rmfamily\scshape\@professor}%      to                \color{headtitle}\fontfamily{ptm}\fontsize{16pt}{20pt}\selectfont\scshape\lecturenotename \\[6pt]           \fontfamily{ptm}\fontsize{24pt}{20pt}\selectfont\scshape\@topic \\[6pt]           {\normalsize\rmfamily\scshape\@professor}%      See the attached figure. [I made few other changes, of course.] ![enter image description here](http://i.stack.imgur.com/iKFuK.png) In a comment to GM's entry, @dochar mentioned the following site. It says > If the font can be made generally available on your computer (e.g., to other > word processing programs), you can use XeTeX or LuaTeX to access it > directly, without any TeX-specific installation at all. How can I do that? That is, what do I have to change in GM's above lines to use, say, Braggadocio regular, a font available in my computer?


title: \DeclareUnicodeCharacter and LuaTeX

text: Is there an equivalent command to `\DeclareUnicodeCharacter` for LuaTeX that allows me to define alias commands for special UTF-8/Unicode characters? I am using a custom Fraktur font that uses Unicode's private use area for the definition of ligatures. I can enter those characters into my editor (Sublime Text 2) using copy-and- paste. LuaTeX correctly displays the ligatures in the output, but in the editor they are displayed as empty rectangles. This makes the source code hard to read. I know that in pdfLaTeX you can define commands for Unicode characters using               \usepackage[utf8]{inputenc}          \DeclareUnicodeCharacter{hexcode}{\alias}      so you can simply write `\alias` instead of the Unicode character itself. But this approuch doesn't work for LuaTeX. Is there another way to achieve this? You can find the Fraktur font (Normalfraktur UNZ1-genormt) on this website (German).


title: How do you define macros to toggle a character active and define a macro for it?

text: I'm experimenting with _core tex_ in order to learn some basics. My goal is to define a shorthand environment which makes use of active characters. The general idea is to activate the used characters and defining macros upon entering the environment while reverting the character codes upon leaving it. As simple as that sounds in theory, I'm running into a               "Missing control sequence inserted" ("\inaccessible")       error with the following imo relatively straight forward example (for a `{\bfseries ...}` shorthand)               \documentclass{minimal}          \def\beginshorthand{%              \makeatletter              \def\shorthand@catcode@plus{\the\catcode`+}              \catcode`\+=\active         \def+##1+{{\bfseries ##1}}              \makeatother          }     \def\endshorthand{%              \makeatletter              \catcode`\+=\shorthand@catcode@plus              \makeatother          }          \begin{document}          \beginshorthand     + bold span +     \endshorthand          + plain span +          \end{document}      (in TeXShop 3.11, Mac OS X 10.9.3) Is it possible? If so, how do i make it work?


title: How can I reduce the space between paragraphs and block quotes?

text: I'm using the `mla` package from the `texlive-humanities` ubuntu package to format an MLA-style paper. Unfortunately, something is a little off, and there's a little extra space between paragraphs and the beginning and end of a block quote. Am I writing this incorrectly, or is there a command to close the space?               \documentclass[11pt,letterpaper]{article}     \usepackage{ifpdf}     \usepackage{mla}          %Xelatex Stuff     \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}      \usepackage{ellipsis}            \setmainfont[Mapping=tex-text]{Linux Libertine O}          \begin{document}     \begin{mla}{John}{Reeve}{Professor So-and-So}{Nietzsche's Impact on 20th Century Thought}{\today}{Nietzsche as Anthropologist of Religion: Theogony, Purity, Anthropomorphism}         Of course, Nietzsche does not predicate his theories on cultural difference to the extent that ethnographers do. One could also argue that his differences are not as dramatic as theirs, and would hardly count as difference. After all, the culture of the ancient Greeks, the culture Nietzsche dicusses the most after that of Germany, forms such a central part of western culture that it would seem \emph{prima facie} to provide less of a delta-value than would, say, a comparison with Bantu culture. Yet his analysis of Greek religion is more in-depth, perhaps, than that of the likes of James Frazer, whose “butterfly-collecting” anthropology has been criticized as decontextualizing the cultures he proports to discuss.           In an early (1908) lecture in anthropology, J.L. Myres declares that there are     \begin{quote}     two kinds of anthropologists. \ldots\  There is an anthropologist to whom we go for our facts: the painful accurate observer of data, the storehouse of infinite detail. \ldots\ To him we go for our facts. \ldots\ His views may matter little. \ldots\ And there is an anthropologist to whom we look for our light. His learning may be fragmentary, \ldots\ but with shattered and ricketty instruments he attains results; heedless of epicycles, disrespectuful to the equator, he bequeaths his paradoxes to be demonstrated by another generation of men. [H]e has learnt to see; and what he sees he says (Haddon 100-1).      \end{quote}


title: Filling out page with tabular (width and height) with evently

text: I'm trying to make sticky labels with LaTeX. I thought this would be pretty simple because of LaTeX's nice support of absolute units, but it turned out to be quite difficult. This is the specification of the label paper:   * Left and right margin: 0mm   * Upper and lower margin: 8mm   * Label height: 25mm   * Label width: 52mm   * Inner label margin: 2mm That's 11 rows and 4 columns of labels. The label will contain just text. Here's what I've got to so far:               \documentclass[portrait,a4paper,danish,oneside,final,10pt]{memoir}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{babel}     \usepackage{geometry}     \usepackage{palatino}     \usepackage{tabularx}          \geometry{hoffset=0mm,               hmargin=0mm,               vmargin=8mm,               footskip=0mm,               papersize={210mm,297mm},               total={210mm,297mm}}          \pagestyle{empty}     \aliaspagestyle{chapter}{empty}     \aliaspagestyle{part}{empty}          \setlength{\tabcolsep}{2mm}          \newcommand{\labeltext}{\textbf{M\&M} er en sød vin lavet på hyben plukket ved Vemmingbund Strand i Sønderjylland. Vinen produceres.}          \begin{document}\noindent     \begin{tabularx}{\textwidth}{X|X|X|X}\hline     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \labeltext & \labeltext & \labeltext & \labeltext \vfill \\%[\mylabelheight]     \hline     \end{tabularx}%     \end{document}      This is almost correct. However, the table cells don't expand their height to fit the paper (this is, bottom row should touch the bottom margin). Also, I can't figure out how to get an upper and lower margin of 2mm inside each cell. I tried using `\vspace{2mm}`, but that produces a much larger space than requested. I tried posting a picture of the result, but I'm not allowed to at the moment. Sorry. Thanks in advance!


title: Scaling graph along x axis

text: I am trying to plot a symple graph with `pgfplots` but the numbers do not seem to appear right. Is it possible to somehow scale the left part of the graph? I would also like the numbers on the x axis not to appear as scientific notation.               \documentclass{scrartcl}     \usepackage[no-math]{fontspec}     \usepackage{polyglossia}     \setmainlanguage{brazil}       \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[ %     bar width=9pt,     nodes near coords,     yticklabel style={/pgf/number format/.cd,fixed,use comma},     scaled ticks=false,     width=1.0\textwidth,     %height=1.0\textheight,     xlabel={Ano},     ylabel={População},     xmin=0, ymin=0,     xmax=350,     ytick=data, xtick=data,     ]     \addplot coordinates {     (40,1000)     (50,1400)     (100,7530)     (150,40496)     (200,217795)     (250,1171356)     (300,6299832)     (350,33882008)     };     \end{axis}     \end{tikzpicture}          \end{document}      Maybe it would be better to plot a progression starting with 1000 at year 40 -- I just want to _visualize_ a 40% increase per decade between years 40 and 350. How can I do that?


title: indexed letters inside circles

text: I'm currently using this code               \raisebox{.5pt}{\textcircled{\raisebox{-.9pt} {f}}}       to get ![enter image description here](http://i.stack.imgur.com/RqxNR.png) I'm trying to index the function f inside the box, with say `$f_{n}$` but `\textcircled` doesn't seem to like this. Any suggestions? Thank you!


title: Delimiter for comments in text citations in biblatex

text: In the question Biblatex: No \postnotedelim for citations that aren't numerals, I learned how to remove a postnote delimiter when the citation doesn't contain a numeral, by adding this to the preamble:               \renewcommand{\postnotedelim}{\iffieldnums{postnote}{\addcolon}{\addspace}}      However, this also removes the delimiter between a regular citation and a "comment" style citation (such as "NN p.c.") (cf. Add custom information to text citations with biblatex). The question is, how do I make sure that the delimiter between the "regular" citations and the "comment" is the same character (comma, semicolon) as used to delimit the "regular" citations?               \documentclass{article}     \usepackage[style=authoryear]{biblatex}     \DeclareFieldFormat{postnote}{#1}     \renewcommand{\multicitedelim}{\addcomma\space}     \renewcommand{\postnotedelim}{\iffieldnums{postnote}{\addcolon}{\addspace}}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @book{lennon1972,         AUTHOR = "John Lennon",         TITLE = "Who did what in the Beatles",         YEAR = "1972"}     @book{starkey1994,         AUTHOR = "Richard Starkey",         TITLE = "I'm the drummer",         YEAR = "1994"}     @ONLINE{archiveZ,         TITLE = "Archive Z",         SHORTHAND = "Archive Z",         URL = "http://www.archivez.com",         URLDATE = "2013-03-22"}     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}     I know from books and people I have talked to that George Harrison     played the guitar in the Beatles \parencites(Paul McCartney p.c.)     [48]{lennon1972}[103]{starkey1994}[no. 58]{archiveZ}     \end{document}      ![enter image description here](http://i.stack.imgur.com/vobX4.png) The citation should ideally look like this: > (Lennon 1972:48, Starkey 1994:103, Archive Z no. 58, Paul McCartney p.c.)


title: How to keep group of elements on the same page

text: I have a custom heading with dynamic content. My content is composed with tabulars, itemize and paragraphs. I am using the environment (`samepage`) with severals `\nopagebreak` in each part of the content to ensure that the content between two `\nopagebreak` will be on a new page or at least will stay together on two pages. The content is correctly seperated. The problem is the header of the whole content doesn't follow the start of the content. The header stays in page 2 and the content starts at page 3. Here's the code that I use for the header.               \documentclass[12pt]{article}     \usepackage{lipsum}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{framed}     \usepackage[parfill]{parskip}     \definecolor{shadecolor}{RGB}{217,217,217}     \usepackage[left=0.75in,top=1.5in,right=0.75in,bottom=1in]{geometry}          \begin{document}     \lipsum[1]     \lipsum[2]     \lipsum[3]     \begin{samepage}     \nopagebreak     \begin{snugshade*}{\fontsize{13}{6}\selectfont\textbf{Testing}}\end{snugshade*}     \nopagebreak     \lipsum[4]     \nopagebreak     \lipsum[5]     \nopagebreak     \lipsum[6]     \end{samepage}          \end{document}      I saw that there's the minipage and needspace that I can use for undestructible blocks but the problem is that I have dynamic content so I do not know the lenght of it. I also try to put `\nopagebreak` after or before the header but it doesn't work. My header and the dynamic content are inside one `samepage` block. Any ideas how to fix this?


title: How to write above a line in a tikzpicture

text: How could I write just above the blue lines of this tikzpicture?               \begin{tikzpicture}[         scale=5,         IS/.style={blue, thick},         LM/.style={red, thick},         axis/.style={very thick, ->, >=stealth', line join=miter},         important line/.style={thick}, dashed line/.style={dashed, thin},         every node/.style={color=black},         dot/.style={circle,fill=black,minimum size=4pt,inner sep=0pt,             outer sep=-1pt},     ]     % axis     \draw[axis,-] (2.5,0) node(xline)[right] {$O_B$} -|                     (0,2.5) node(yline)[left] {$w$};     \draw[axis,-](2.5,0)--(2.5,2.5);      \node (0,0) [left]{$O_A$};       \draw[-, Blue] (0,2)--(1.4,.6)     \draw[-, Blue] (2.5,2)--(.8,.6);        \draw[dashed] (0,.87) node[left] {$w_0^*$}--(2.5,.87) node[right] {$w_0^*$};       \node[dot,label=above:$\epsilon_0$] at (1.13,.87) (int1) {};     \draw[dashed] (1.13,0) node[below]{$E_0$}--(1.13,0.87);     \end{tikzpicture}       The result of the code above: ![enter image description here](http://i.stack.imgur.com/85MwA.png) I would like something like as the "ABC" and "CBA" are from this picture. ![this picture](http://i.stack.imgur.com/r3YVB.png)


title: graphics in style file

text: I aim to create a reporting template for other TeX users to use at our work. My objective is creating an `.sty` file. The specifications are fairly simple but one is causing grief: that is including our logo in the upper left for a header. I've used the `fancyhdr` program to create a fancyhead like the following:               \RequirePackage{fancyhdr}     \fancypagestyle{everypage}{         \fancyhf{}         \fancyhead[R]{\includegraphics{LOGO.JPG}}       \fancyhead[L]{\huge{Report name} \\ \normalsize{\today}}            \fancyfoot[L]{XXX}       \fancyfoot[C]{YYY}       \fancyfoot[R]{ZZZ}            \renewcommand{\headheight}{.5in}       \renewcommand{\textheight}{6in}     }     \pagestyle{everypage}     \AtBeginDocument{\thispagestyle{everypage}}      But when compiling a `tex` document with this, I get the following error:               [Loading MPS to PDF converter (version 2006.09.02).]     ) <LOGO.JPG, id=1, 154.6578pt x 51.0708pt> <use LOGO.JPG>     ! You can't use `the character .' after \the.      Any idea what's going on here?


title: Wrapfigure and Math

text: Has anyone noticed that when using wrapfig around math environments (align, gather etc), when the argument is passed to constrain the number of 'lines', it fails to consider that math lines are generally bigger than the standard text lines. Shouldn't the constraint be on size, rather than number of lines? ![Example](http://i.stack.imgur.com/UO3hT.png)


title: Draw tally marks using PSTricks

text: Inspired by Paulo Cereda's question here, I would like to draw tally marks using PSTricks (or TikZ, if no one can help with PSTricks). I have no idea how to start, so I cannot even present a try myself. `:(` (This is not good, I know!) What I would like to have, is a command like `\tallymarks`;               \tallymarks{1}     \tallymarks{2}     ...     \tallymarks{10}      and get an output like the following: ![enter image description here](http://i.stack.imgur.com/GJdQo.gif) without the table and the arabic numerals, i.e., only the tally marks themselves. **Update 1** Inspired by Herbert idea, here is an attempt to use PSTricks.               \documentclass{article}          \usepackage{pstricks-add}          \newcommand*{\tallymarksOne}{       \pslineByHand(0,0)(0,1)     }     \newcommand*{\tallymarksTwo}{       \pslineByHand(0,0)(0,1)       \pslineByHand(0.25,0)(0.25,1)     }     \newcommand*{\tallymarksThree}{       \pslineByHand(0,0)(0,1)       \pslineByHand(0.25,0)(0.25,1)       \pslineByHand(0.5,0)(0.5,1)     }     \newcommand*{\tallymarksFour}{       \pslineByHand(0,0)(0,1)       \pslineByHand(0.25,0)(0.25,1)       \pslineByHand(0.5,0)(0.5,1)       \pslineByHand(0.75,0)(0.75,1)     }     \newcommand*{\tallymarksFive}{       \pslineByHand(0,0)(0,1)       \pslineByHand(0.25,0)(0.25,1)       \pslineByHand(0.5,0)(0.5,1)       \pslineByHand(0.75,0)(0.75,1)       \pslineByHand(-0.75,0)(1,1)     }          \newcounter{TallyTemp}     \def\tallymark#1{%       \setcounter{TallyTemp}{#1}%       \ifnum#1>5         {\Tally E}\addtocounter{TallyTemp}{-5}%       \else{\Tally%            \ifcase#1\or         \tallymarksOne\addtocounter{TallyTemp}{-1}\or         \tallymarksTwo\addtocounter{TallyTemp}{-2}\or         \tallymarksThree\addtocounter{TallyTemp}{-3}\or         \tallymarksFour\addtocounter{TallyTemp}{-4}\or         \tallymarksFive\addtocounter{TallyTemp}{-5}%         \fi}%       \fi%       \ifnum\theTallyTemp>0 \expandafter\tallymark\expandafter{\theTallyTemp}\fi     }          \begin{document}          \tallymark{0}     \tallymark{1}     \tallymark{2}     \tallymark{3}     \tallymark{4}     \tallymark{5}     \tallymark{14}          \end{document}      When compiling, I get an error:               ! Undefined control sequence.     \tallymark ...ounter {TallyTemp}{-5}\else {\Tally                                                        \ifcase #1\or \tallymarksO...     l.50 \tallymark{0}      **Update 2** Garbage Coloector's hinted me to the following in the PSTricks manual, but the code won't compile:               \documentclass{article}          \usepackage{pstricks-add}          \def\PstLineFuzzy[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){%     \pscurve[#1](! #2 rand 101 mod 1000 div sub     #3 rand 101 mod 1000 div sub)     (! #4 rand 101 mod 1000 div sub     #5 rand 101 mod 1000 div sub)     (! #6 rand 101 mod 1000 div sub     #7 rand 101 mod 1000 div sub)     (! #8 rand 101 mod 1000 div sub     #9 rand 101 mod 1000 div sub)}          \def\PstSticks#1{%     \multido{\iStick=0+1,\nXA=0.1+0.1,\nXB=-0.5+0.1,     \nXC=-0.35+0.10,\nXD=-0.15+0.10}{#1}{%     \pst@cnta=\iStick     \pst@cnth=\iStick     \divide\pst@cnth by 5     \multiply\pst@cnth by 5     \ifnum\iStick>0\relax     \ifnum\pst@cnta=\pst@cnth     \PstLineFuzzy[linecolor=red]%     (\nXB,0.2)(\nXC,0.4)(\nXD,0.6)(\nXA,0.8)     \hbox to 0.2\psxunit{}     \fi     \fi     \PstLineFuzzy[](\nXA,0.1)(\nXA,0.4)(\nXA,0.7)(\nXA,1)}}          \begin{document}          \psset{xunit=0.8,yunit=0.3}%     \begin{tabular}{|l|r|p{5.5cm}|}     \hline     Linux     & 27 & \PstSticks{27} \\ \hline     Mac OS X     & 14 & \PstSticks{14} \\ \hline     Windows XP & 43 & \PstSticks{43} \\ \hline     \end{tabular}          \end{document}      The error is               ! Undefined control sequence.     <inserted text> \pst                           @cnta=\iStick \pst @cnth=\iStick \divide \pst @cnth by ...     l.38 & 27 & \PstSticks{27}                                \\ \hline


title: Different margins for different page styles in memoir

text: I am trying to produce a document in `memoir` with a letterhead on the first page only. I have created a custom `pagestyle` for the letterhead with a larger upper margin to include the header; but this larger margin is preserved even when I revert to the `plain` pagestyle without a header. How can I change the upper margin only in one `pagestyle`?               %page style with different margins in memoir     \documentclass[oneside]{memoir}     \settypeblocksize{9in}{6.5in}{*}     \setlrmarginsandblock{1in}{1in}{*}     \setulmarginsandblock{1in}{1in}{*}     \checkandfixthelayout          \setheadfoot{5em}{2em}     \newlength{\marginPlusHead}     \setlength{\marginPlusHead}{1in}     \addtolength{\marginPlusHead}{\headsep}     \setulmarginsandblock{\marginPlusHead}{1in}{*}          \copypagestyle{letterhead}{plain}     \makeoddhead{letterhead}{}{{\Huge LETTERHEAD}}{}     \makeheadrule{letterhead}{\textwidth}{\normalrulethickness}     \checkandfixthelayout          \usepackage{lipsum}          \begin{document}          \pagestyle{plain}     \thispagestyle{letterhead}     \lipsum[1-15]          \end{document}


title: How to get rid of extra space before align and gather envronments, but allow page breaks?

text: I am editing a rather long text which contains many equations and floats, and encountered a problem with the `align` and `gather` environments. MWE:               \documentclass[preview]{standalone}     \usepackage{amsmath}     \begin{document}          Paragraph one. Lorem ipsum dolor sit amet, consecuteur adipiscing elit.          \begin{gather*}      \boxed{\sum_{x=1}^{N} A_x} \\      \boxed{\sum_{x=1}^{N} A_x}     \end{gather*}          Paragraph two. Lorem ipsum dolor sit amet, consecuteur adipiscing elit.          \end{document}      Result: ![enter image description here](http://i.stack.imgur.com/rLneh.png) There is too much vertical space between the first paragraph and the equation, as if an extra empty paragraph was inserted. If I delete the blank line between the first paragraph and the math environment, there is no extra space, but the page can't be broken at that point and I often I end up with orphans. The extra space is not present when I use the `equation` environment or `\\[ \\]`:               \documentclass[preview]{standalone}     \usepackage{amsmath}     \begin{document}          Paragraph one. Lorem ipsum dolor sit amet, consecuteur adipiscing elit.          \[ \boxed{\sum_{x=1}^{N} A_x} \]     \[ \boxed{\sum_{x=1}^{N} A_x} \]          Paragraph two. Lorem ipsum dolor sit amet, consecuteur adipiscing elit.          \end{document}      Result: ![enter image description here](http://i.stack.imgur.com/afqkV.png) How can I get rid of the unwanted vertical space, but at the same time allow page breaks before the environment?


title: Showstopper with better-biblatex+zotero?

text: I am using better-biblatex to access my Zotero collections of journal articles. Mostly it works fine, though duplicate keys are a bummer (the documentation for the alternate JabRef syntax based fields is not adequate). I am writing to discuss a different, somewhat scary feature of this combination - change in item keys. I was just writing a paper and added a citation to a journal article (call it \cite{Chen2014} for concreteness). While I was writing the conclusions, I found another article, also by a first author named Chen and added it to my Zotero collection. Using BibDesk, I refreshed the URL that provides the bib file to check the key for the new article. It was also Chen2014. However, to my horror, the citation key to the previous article (the one I had already cited to as \cite{Chen2014}) had changed to Chen2014a! Now, a typical user is going to have a dynamically growing library. He or she is also going to have a large static set of .tex files (those that have already been written, or the sections of a paper than have been finalized). This "feature" above means that everytime I have to use a previously written tract of LaTeX, I cannot be certain that article keys have not changed. If I am not messing up something, this is an utter show-stopper. Any suggestions?


title: drawing 2-D coordinates with 2 simple line in it

text: I want to draw this coordinates with straight lines in it... would you do me a favor and help me?![least squares description](http://i.stack.imgur.com/FXD79.png)


title: Reference citation from en dash to hyphen

text: I am currently using a `cite` package. In order to make the reference citation into [1-3] but I want to change the en dash to hyphen. Here is my sample file:               \documentclass{article}     \usepackage{cite}          \begin{document}          \title{Sample File}     \date{}     \maketitle     \cite{CR1,CR2,CR3} - current output          [1-3] - required output     %I want my output to be hyphen not en dash          \begin{thebibliography}{00}          \bibitem{CR1}     Author 1, title, journaltitle , year          \bibitem{CR2}     Author 2, title, journaltitle, year          \bibitem{CR3}     Author 3, title, journaltitle, year          \bibitem{CR4}     Author 4, title, journaltitle, year          \end{thebibliography}     \end{document}


title: Create bar graph wider

text: I created a bar graph using `pgfplot` and option `ybar`. I would get a graph wider. I used `width option`               \documentclass[12pt,a4paper,twoside,openright]{book}          \usepackage{tikz}     \usetikzlibrary{positioning}     \usepackage{pgfplots}                    \begin{document}     \begin{tikzpicture}     \begin{semilogxaxis}[ybar,                                  ymajorgrids=true,                                  xlabel=packet loss,ylabel=energia,                                  legend pos = north west]                 \addplot [fill=red!50,draw=red!50!black]                     table [x=pep,y=1]                     {./MATLAB/grafici/energia/broadcast_scenario/energy_broadcast_varpktslossprobability_100nodes.txt};                 \addplot [fill=blue!70, draw=blue!50!black]                     table [x=pep,y=20]                     {./MATLAB/grafici/energia/broadcast_scenario/energy_broadcast_varpktslossprobability_100nodes.txt};                 \addplot [fill=violet!70, draw=violet!50!black]                     table [x=pep,y=50]                     {./MATLAB/grafici/energia/broadcast_scenario/energy_broadcast_varpktslossprobability_100nodes.txt};                 \addplot [fill=orange!50, draw=orange!50!black]                     table [x=pep,y=100]                     {./MATLAB/grafici/energia/broadcast_scenario/energy_broadcast_varpktslossprobability_100nodes.txt};                 \legend{\footnotesize{$1$},\footnotesize{$20$},\footnotesize{$50$},\footnotesize{$100$}}             \end{semilogxaxis}         \end{tikzpicture}               \end{document}      but the plot became bigger in height and width. Instead I would have only a wider graph


title: Vector graphics using arbitrary functions (other than bezier, arcs etc) to create shapes

text: Is it possible to create vector graphics with latex or an external program that allows the usage of more or less arbitrary functions (other than beziers and standard shapes like circles etc) to define shapes? It would, for example, to actually use the function Y=sin(1/x) instead of having to use piecewise linear functions with finite steps. Of course the functions has to be evaluated for presentation on screen/printer, but then the steps could be adjusted to the given resolution. If its impossible, is there a limitation in the PDF/PostScript specification that prevents it or why isn't it possible?


title: Strange underfull hbox?

text: I'm not sure if I found a bug or I'm just missing an argument somewhere, but I get an underfull hbox with the following code, and I have no idea where it's coming from:               \documentclass[10pt]{article}          \usepackage[a4paper]{geometry}     \usepackage[T1]{fontenc}          \usepackage{pgfplots}          \usepackage{hyperref}     \pgfplotsset{compat=newest}     \usepackage{minted}          \begin{document}          \begin{figure}[ht]     \resizebox{\linewidth}{!}{\begin{tabular}[h]{c c}     \begin{tikzpicture}       \begin{axis}[%           xlabel = $q$,           ylabel = $d$,           xtick={-6,-4,...,7},ytick={.05,.1,...,.3},           height=7cm, width=7cm,           axis lines*=left,           xmin = -6, xmax = 6,           ymin = 0, ymax = .25,           every y tick label/.append style  =             {                /pgf/number format/.cd,                precision = 2,                 fixed zerofill,                fixed             },/pgf/number format/.cd,             use comma]       \end{axis}     \end{tikzpicture}     &     \begin{tikzpicture}       \begin{axis}[%           xlabel =$q$,           ylabel =$p$,           xtick={-6,-4,...,7},ytick={.1,.2,...,1},           height=7cm, width=7cm,           axis lines*=left,           xmin = -6, xmax = 6,           ymin = 0, ymax = 1,           every y tick label/.append style  =             {                /pgf/number format/.cd,                precision = 2,                 fixed zerofill,                fixed             },/pgf/number format/.cd,             use comma]       \end{axis}     \end{tikzpicture}     \end{tabular}}     \caption{stuff}     \end{figure}          \end{document}


title: codecogs like software/ IDE/ LaTeX environment ?

text: I have been using the website, codecogs for mathematical equations - and it is wonderful for a noob like me. However, I wish to avail of such support when I am offline, is there similar facility for providing a GUI for equations by any software/IDE/editors/LaTeX environment ? I am on Ubuntu 9.10.


title: Distance between related, but separate math terms

text: Say I have two equations that I would like to have in display math, `a_1 = 1` and `a_2 = 2`. If I just put them like this, they do not look separated enough:               \[ a_1 = 1, a_2 = 2 \]      I usually use `,\quad` for separation, but that looks wider than any spacing I have in the remaining document. What is the correct spacing to convey this sort of list?


title: What's the folk-lore on automatic testing of TeX programming?

text: Say you write a macro or a package, which goes through the usual course of software life-cycle. How would you define a set of tests, and have this set run automatically to make sure that changes to the code are in compatible, in some sense of the word?


title: Double subscript problem

text: The code               \DeclareMathOperator*{\FAggregate}{F}          \begin{equation}     q_k'(e) = \FAggregate\limits_{a \in R}_a (q_k(S(a)))     \end{equation}      causes a problem with an additional `_a`. What I want is the `a` to show in the subscript position as shown in the following picture: ![desired output](http://i.stack.imgur.com/zo1PV.png) How could I achieve that?


title: Moderncv: bulleted list in cvitem

text: I am using `moderncv` to write my CV. Therefore, I want to use a bulleted list withing `\cvitem`. In principle this works, but an extra line is added so that it is not on the same height as the first argument of `\cvitem`. Here is an example: It should look like this:               Language   - first                - second      But it looks like this:               Language                - first                - second      Here is the minimal code               \documentclass[11pt,a4paper,sans]{moderncv}          \moderncvstyle{classic}     \moderncvcolor{orange}             \firstname{John}     \familyname{Doe}     \begin{document}          \cvitem{test}{     \begin{itemize}     \item some bulleted item     \end{itemize}     }     \end{document}      Thanks for your help.


title: using references inside a table

text: I am trying to analyse my bibliography in a Tabular way, to obtain the following output: ![enter image description here](http://i.stack.imgur.com/gNaz5.png) for this, I use the following piece of code               \documentclass{article}         \usepackage{mathtools}     \usepackage{amsmath}         \begin{document}                \begin{tabular}{|l|l|l|l|}     \hline     reference & Charactersitic 1 & Charactersitic 2 & Charactersitic 3 \\      \hline     \cite{X} & method xx & method xy & method xz \\      \hline     \cite{Y} & method yx & method yy & method yz \\      \hline     \cite{Z} & method zx & method zy & method zz \\      \hline     \end{tabular}          \bibliographystyle{plain}     \bibliography{BibliographyTest}          \end{document}      The bibliography is in the followinf `BibliographyTest.bib` file as follows:               @ARTICLE{X,     AUTHOR = {X. Author},     TITLE = {Title 1},     JOURNAL = {Journal of X},     YEAR = {1961},     volume = {16},     pages = {8--37},     }           @BOOK{Y,     AUTHOR = {Y. Author},     TITLE = {Title 2},     PUBLISHER = {Publicher of Y},     YEAR = {2004},     edition = {2nd Edition},     }          @BOOK{Z,     AUTHOR = {Z. Author},     TITLE = {Title 3},     PUBLISHER = {Publicher of Z},     YEAR = {2004},     edition = {2nd Edition},     }      **Compile -> Bibtex -> Compile** produces no errors, no warning, but also, **no output PDF file !** Can anyone help please?


title: Beamer equivalent of Keynote's old web view

text: Is there a beamer package that will display a non-static, locally hosted web page? I think I am looking for something similar to Keynote's old web view, but since I have Keynote 09, I'm in a pickle. This question is similar to Beamer and JavaScript in a web browser, which currently does not have a satisfactory answer. Like this poster, I would prefer to not have to click on a link and navigate away from the presentation.


title: I want to embed plantuml diagram into lyx document

text: Please help me in embedding plantUML diagram in the LyX document. I am new to LyX, I could not figure out how to generate the diagram on the fly while converting the doc to the PDF. Let me write down on high level what I want to achieve.   1. Add a file format `.plantuml`   2. Add a converter for this file format, which will convert `.plantuml` to PNG    3. Include the `.plantuml` file in the master LyX document.    4. When I run the export to PDF. I should see image included in the PDF file. Please guide me how to achieve this.


title: svmono+amsmath causes a warning

text: \documentclass{svmono}     \usepackage{amsmath}          \begin{document}     \end{document}      generates the warning               Package amsmath Warning: Unable to redefine math accent \vec.      Is there any way to remove this warning?


title: In LaTeX, how to have a TextField with limited number of characters

text: I am using LaTeX to make a fillable PDF file. I use the `\TextField` command in the `hyperref` package to get the fillable field in the PDF file. In some places, I want to have a field which has a limited number of characters for input, e.g. the phone number or card number. How could I realize this effect? I looked up the `texdoc` for `hyperref` package but failed to find any information for this effect. Would anyone please give me some idea?


title: Insert title of table of contents into toc

text: I have a little bit of problem. I have to put the title of toc into toc. I've used the following code to do that and it works for me, kind of. The problem is in the title is aligned with the titles of the chapters and not with list of figures etc.               {     \makeatletter     \let\@oldstarttoc\@starttoc     \renewcommand{\@starttoc}{%       \addcontentsline{toc}{chapter}{\protect\numberline{}\contentsname}% Add ToC to ToC       \@oldstarttoc     }     \tableofcontents     \makeatother     }      Here is the picture of my toc. ![enter image description here](http://i.stack.imgur.com/Th3ds.png) My idea is to use the same code for Acknowledgements, Lists of... , Abbreviations etc. Is it ok to try that or there is an alternative?


title: Aligning listing frame width between two listings

text: I'm trying to get two listings side by side. One is shorter than the other, but I would like to have them aligned, meaning that the frame height of the short one should be longer to reach the baseline of the first. I am using minipages to put the listings in a single row. My current code is:               \documentclass[11pt,a4paper,italian,oneside]{book}     \usepackage{listings}     \begin{document}          \begin{center}     \begin{minipage}[t]{.49\textwidth}     \lstinputlisting[breaklines, language=Python, caption=Struttura dati Kinematic,         label=kinematic,tabsize=3, captionpos=b, frame=single, basicstyle=\small]        {listings/chapter02/kinematic.py}     \end{minipage}     \hfill     \begin{minipage}[t]{.49\textwidth}     \lstinputlisting[breaklines, language=Python, caption=Struttura dati SteeringOutput,         label=steeringoutput,tabsize=3,captionpos=b,frame=single, basicstyle=\small        {listings/chapter02/steeringoutput.py}     \end{minipage}     \end{center}          \end{document}      (I know that I can define separately the formatting settings, this is a fast example :P) For now the result is: ![enter image description here](http://i.stack.imgur.com/ROf5N.png) I tried some of the parameters listed on the listings documentation but I did not succeeded. Any advice?


How do I keep questions from splitting between pages in exam? For example in the MWE below, I'd like to have a page break after Question 2 so that Question 3 can start on a new page. I don't particularly care how this is done but I imagine a vertical fill would work. Is there a command within `exam` that does this? I only see the commands that specify what to do with the header/footer if there is continuation but nothing about disabling continuation. EDIT: Is there a way to make `exam` do this automatically instead of having me specify where to have a page break?               \documentclass[addpoints]{exam}     \usepackage{blindtext}          \begin{document}          \begin{questions}          \question     \blindtext[3]     \begin{choices}     \choice      \choice      \choice      \choice      \choice      \end{choices}          %          \question     \blindtext     \begin{choices}     \choice      \choice      \choice      \choice      \choice      \end{choices}          %          \question     \blindtext     \begin{choices}     \choice      \choice      \choice      \choice      \choice      \end{choices}          %          \end{questions}     \end{document}


title: How to view DVI on Mac OS X?

text: What are some good software to view DVI files on OS X?