title: Switch from in-code data table to external file in macro

text: I have used the very nice grouping macro described here: How can I mix an "ybar" and an "ybar stacked" with pgfplots? I would like to be able to use it with data that I have read from a file. How can that be achieved? Instead of the data table written into the tex file, I would like to have it outside, in its own file. How can I do that so that the references to \datatable in the grouping function still work?


title: pgfdeclareshape: label size independent of node size

text: Reading of PGF3 manual (pp. 1038-1044) and some examples on the web allow me to declare the following shapes but FIRST : I have little big problems with size(s)   * How to declare a "fixed" size for the form   * How do I text below the drawing without expanding the shape    * How to allow (force) the return line in long descriptions SECOND : I can't place the anchor easily where I will. In my MWE, the south west for 'repository' should go to the end of line and not on the circle... FUTURE : drawing the (uml) 'actor' with a small circle and lines below with correct anchors around the silhouette ... My MWE :                   \documentclass[tikz,border=20pt]{standalone}          %\usetikzlibrary{backgrounds,arrows,shapes,fit,shadows,decorations.markings}     \usetikzlibrary{plotmarks}     \usetikzlibrary{positioning}          \makeatletter          \pgfdeclareshape{robustness repository}     {       \inheritsavedanchors[from=circle]       \inheritanchorborder[from=circle]            \inheritanchor[from=circle]{north}       \inheritanchor[from=circle]{north west}       \inheritanchor[from=circle]{north east}       \inheritanchor[from=circle]{center}       \inheritanchor[from=circle]{west}       \inheritanchor[from=circle]{east}       \inheritanchor[from=circle]{base}       \inheritanchor[from=circle]{base west}       \inheritanchor[from=circle]{base east}       \inheritanchor[from=circle]{south}       \inheritanchor[from=circle]{south west}       \inheritanchor[from=circle]{south east}             %\saveddimen{\rayon}{\pgf@x=\radius}% pas reconnu comme dimension !!!!              %\anchor{south east}{%         %%\pgfutil@tempdima=\radius         %%\pgf@x=2\pgfutil@tempdima         %%\pgf@y=-1\pgfutil@tempdima         %\centerpoint \pgf@xa=\pgf@x \pgf@ya=\pgf@y         %\pgf@x=2\pgf@xa         %\pgf@y=-1\pgf@ya         %}             %\anchor{south west}{%         %\pgfutil@tempdima=\radius         %\pgf@x=0\pgfutil@tempdima         %\pgf@y=-1\pgfutil@tempdima         %}            \savedanchor{\text}{%             %\pgf@y=.\ht\pgfnodeparttextbox % height of box             %\pgf@x=.\wd\pgfnodeparttextbox % width of box             \pgf@x=.\wd\pgfshapeminwidth % width of shape             \setlength{\pgf@xa}{\pgfshapeminheight} % it is not the real height :-(             \pgf@y=-.75\pgf@xa         }       \anchor{text}{\text}            % recup circle form native node (good/bad idee : impact text width => node width !)       \inheritbackgroundpath[from=circle]       % TODO : circle free from text node : HOW ?            \foregroundpath{         % variable coord ref : \pgf@xa = x du centerpoint ; \pgf@ya = y du centerpoint         \centerpoint \pgf@xa=\pgf@x \pgf@ya=\pgf@y          % variable 'rayon' : \pgfutil@tempdima = radius         \pgfutil@tempdima=\radius            % line below circle         % goto below left         \pgfpathmoveto{\pgfpointadd{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{-1\pgfutil@tempdima}{-1\pgfutil@tempdima}}}         % draw line to below right         \pgfpathlineto{\pgfpointadd{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{1\pgfutil@tempdima}{-1\pgfutil@tempdima}}}       }          }          \pgfdeclareshape{robustness interface}     {       \inheritsavedanchors[from=circle]       \inheritanchorborder[from=circle]            \inheritanchor[from=circle]{north}       \inheritanchor[from=circle]{north west}% to be updated       \inheritanchor[from=circle]{north east}       \inheritanchor[from=circle]{center}       \inheritanchor[from=circle]{west}       \inheritanchor[from=circle]{east}       \inheritanchor[from=circle]{base}       \inheritanchor[from=circle]{base west}       \inheritanchor[from=circle]{base east}       \inheritanchor[from=circle]{south}       \inheritanchor[from=circle]{south west}% to be updated       \inheritanchor[from=circle]{south east}                 \savedanchor{\text}{%             \pgf@x=.\wd\pgfshapeminwidth % width of shape             \setlength{\pgf@xa}{\pgfshapeminheight} % it is not the real height :-(             \pgf@y=-.75\pgf@xa         }       \anchor{text}{\text}            \inheritbackgroundpath[from=circle]            \foregroundpath{         % variable coord ref : \pgf@xa = x du centerpoint ; \pgf@ya = y du centerpoint         \centerpoint \pgf@xa=\pgf@x \pgf@ya=\pgf@y          % variable 'rayon' : \pgfutil@tempdima = radius         \pgfutil@tempdima=\radius            % goto below left and draw line to above left         \pgfpathmoveto{\pgfpointadd{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{-1.2\pgfutil@tempdima}{-0.9\pgfutil@tempdima}}}         \pgfpathlineto{\pgfpointadd{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{-1.2\pgfutil@tempdima}{0.9\pgfutil@tempdima}}}         % goto mid and draw line to circle         \pgfpathmoveto{\pgfpointadd{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{-1.2\pgfutil@tempdima}{0\pgfutil@tempdima}}}         \pgfpathlineto{\pgfpointadd{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{-1.0\pgfutil@tempdima}{0\pgfutil@tempdima}}}       }     }          \pgfdeclareshape{robustness control}     {       \inheritsavedanchors[from=circle]       \inheritanchorborder[from=circle]            \inheritanchor[from=circle]{north}       \inheritanchor[from=circle]{north west}       \inheritanchor[from=circle]{north east}       \inheritanchor[from=circle]{center}       \inheritanchor[from=circle]{west}       \inheritanchor[from=circle]{east}       \inheritanchor[from=circle]{base}       \inheritanchor[from=circle]{base west}       \inheritanchor[from=circle]{base east}       \inheritanchor[from=circle]{south}       \inheritanchor[from=circle]{south west}       \inheritanchor[from=circle]{south east}                 \savedanchor{\text}{%             \pgf@x=.\wd\pgfshapeminwidth % width of shape             \setlength{\pgf@xa}{\pgfshapeminheight} % it is not the real height :-(             \pgf@y=-.75\pgf@xa         }       \anchor{text}{\text}            \inheritbackgroundpath[from=circle]            \foregroundpath{         % variable coord ref : \pgf@xa = x du centerpoint ; \pgf@ya = y du centerpoint         \centerpoint \pgf@xa=\pgf@x \pgf@ya=\pgf@y          % variable 'rayon' : \pgfutil@tempdima = radius         \pgfutil@tempdima=\radius            % goto below left and draw line to above left         \pgfpathmoveto{\pgfpointadd{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{-0.60\pgfutil@tempdima}{1\pgfutil@tempdima}}}         \pgfpathlineto{\pgfpointadd{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{-0.70\pgfutil@tempdima}{0.70\pgfutil@tempdima}}}         \pgfpathlineto{\pgfpointadd{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{-0.40\pgfutil@tempdima}{0.75\pgfutil@tempdima}}}       }     }          \makeatother               \begin{document}     \begin{tikzpicture}%[robustness repository/.style={draw,minimum size=15mm}]          \node[robustness repository, draw,minimum size=10mm] (c1) at (0,1.5) {};     \node[below] at (c1.south) {the long description};          \node[robustness repository, draw,minimum size=10mm] (c2) at (3,3) {short};     \node[robustness interface, draw,minimum size=10mm] (c3) at (5,0) {the long description};     \node[robustness interface, draw,minimum size=10mm] (c4) at (5,3) {short};     \node[robustness control, draw,minimum size=10mm] (c4) at (7,3) {short};          \draw[blue, ->] (c1.north east) to (c2.south west);     \draw[red, ->] (c1) to (c3);     \end{tikzpicture}          % http://texwelt.de/wissen/fragen/1180/wie-kann-ich-mit-tikz-node-formen-zeichnen-die-entgegengesetzt-abgerundet-sind          \begin{tikzpicture}       \node[robustness repository, draw, thick, minimum size=3cm](s){A very very very, but very long, description};       \foreach \anchor/\placement in {north west/above left, north/above, north east/above right,                                       west/above left, center/above, east/above right,                                       base west/below left, base/below, base east/below right,                                       south west/below left, south/below, south east/below right,                                       text/left,                                        30/below left, 145/below right%                                      }     \draw[shift=(s.\anchor),text=blue] plot[mark=x] coordinates{(0,0)} node[\placement] {\scriptsize\texttt{(\anchor)}};     \end{tikzpicture}          \end{document}      ![the size of description => enlarge the shape :-\( ](http://i.stack.imgur.com/BAfhy.png) ![size of description + positioning of anchors](http://i.stack.imgur.com/hDWD8.png)


title: Install plasTeX on Windows 7

text: PlasTeX is a free, open-source tool to process (La)TeX files and convert them to xHTML by default, but also docbook, text, and others. It is fully customizable. How do I install plasTeX on Windows 7? Give detailed steps and instructions to get a working plastex command


title: Using the glossaries package for English acronyms in German documents

text: This is a repost of the original message I posted to comp.text.tex in August, which is still unanswered there. I'm sorry for reposting, but I want to spread this to a wider readership. I found couple of similar questions (along with helpful answers) on StackExchange, however, they are more focused on how to deal with the variety of cases the German language has. This is not my actual problem, since the suggested workarounds for this issue are sufficient. They mostly incorporate the use of `\glslink` and `\glsdisp`. Below is the text of my original post. I would like to use the glossaries package for German documents including many English based acronyms. For better understanding, let's have a look at a simple example:   * Acronym: PSK   * English long: Phase Shift Keying   * German long: Phasenumtastung  Im most cases, there is not corresponding acronym in German, therefore I would like to use the English acronym in my document. Upon first use, the inserted text shall look like _Phasenumtastung (PSK, Phase Shift Keying)_ Upon further use, only _PSK_ shall be used. Finally, in the list of acronyms, it shall look like: _PSK - Phasenumtastung (Phase shift Keying)_ I tried to to setup something customized by renewing `\CustomAcronymFields`, `\SetCustomDisplayStyle` and `\glossaryentryfield` following the user documentation. I'm using the current version 3.01 of glossaries. My approach is basically to put the string `", Phase Shift Keying"` into the description field while defining with `\newacronym` and then use it with customized `\defglsdisplayfirst` and `\glossaryentryfield`. This is to demonstrate how it should look like:               % compile this with     %    pdflatex example.tex     %    makeindex  -s "example.ist" -t "example.alg" -o "example.acr" "example.acn"     %    pdflatex example.tex          \documentclass{scrartcl}          \usepackage[ngerman]{babel}          \usepackage[acronym,nomain,sanitize={description=false,symbol=false}]{glossaries}     \makeglossaries          %% Desired style:     % first: "German long (acronym[, English long])"     % following: "acronym"     \renewcommand*{\CustomAcronymFields}{%         name={\the\glsshorttok},%         symbol={\the\glslongtok},%         text={\the\glsshorttok},%         plural={\the\glsshorttok\noexpand\acrpluralsuffix}%     }          \renewcommand*{\SetCustomDisplayStyle}[1]{%       % ##1 corresponds to the 'first' key       % ##2 corresponds to the 'description' key       % ##3 corresponds to the 'symbol' key       % ##4 is the inserted text given by the final optional argument to       % commands like \gls       % The short form can be obtained via \glsentryshort{\glslabel}       % The plural short form can be obtained via       %\glsentryshortpl{\glslabel}       % The long form can be obtained via \glsentrylong{\glslabel}       % The plural long form can be obtained via       %\glsentrylongpl{\glslabel}       \defglsdisplayfirst[#1]{##3 (##1##4##2##4)}%       % ##1 corresponds to the 'text' key       % the rest as above       \defglsdisplay[#1]{##1##4}%     }     \SetCustomStyle          % start the glossary entries with capitals     \newglossarystyle{superuc}{%       \glossarystyle{super}%       \renewcommand*\glossaryentryfield[5]{%         \glstarget{##1}{##2} & \makefirstuc{##4}##3\glspostdescription\space##5\\       }     }                    %% acronym definitions     % italic typeset foreign language terms     \newcommand{\foreignlang}[1]{\emph{#1}}     % define acronym with both German and English long     \newcommand{\newacropair}[4]{\newacronym[description={, \foreignlang{#4}}]{#1}{#2}{#3}}     % define acronym with only German long     \newcommand{\newacrogerman}[3]{\newacronym[description={}]{#1}{#2}{#3}}     % define acronym with only English long     \newcommand{\newacroenglish}[3]{\newacronym[description={}]{#1}{#2}{\foreignlang{#3}}}          % sample acronyms     % English acronym along with its common German counterpart     \newacropair{acr:adc}{ADC}{Analog-Digital-Umsetzer}{Analog to Digital Converter}     % English acronym without a common German counterpart     \newacroenglish{acr:dect}{DECT}{Digital Enhanced Cordless Telecommunications}     % German acronym     \newacrogerman{acr:din}{DIN}{Deutsches Institut fuer Normung}               % Alternative first - to be used if the first use is not nominative singular.     % Problem: I do not find a way to use glossaries' integrated 'first use' flag.     % This macro is my current dirty implementation. It always displays the full form     % and unsets the 'first use' flag afterwards. Bad things happen if at a later point     % it time, I decide to mention the same acronym earlier. I'll be using \glsalt again     % and end up in a double definition of the acronym, which I would like to avoid.     \newcommand{\glsalt}[2]{\glslink{#1}{#2 (\acrshort*{#1}\glsdesc*{#1})}\glsunset{#1}}               \begin{document}          \section{Problems}          % For the first mention, I'll be using \glsalt, since I need to display the      % German text in genitive.     Die Aufloesung des \glsalt{acr:adc}{Analog-Digital-Umsetzers} beeinflusst\dots          % In the example below, I would need a plural form. That means an 's' would     % have to be attached to both the English acronym as well as the English long form.     % I have no clue how to implement that cleanly, due to my changes in     % \SetCustomDisplayStyle in the preamble.     Die Aufloesung der \glsalt{acr:adc}{Analog-Digital-Umsetzer} beeinflusst\dots               \section{Normal Cases}          \glsreset{acr:adc}          % These are only to show how it should look like for the 'normal' cases.     \gls{acr:adc} -- \gls{acr:adc}          \gls{acr:dect} -- \gls{acr:dect}          \gls{acr:din} -- \gls{acr:din}          \printglossary[type=\acronymtype,style=superuc,nonumberlist=false]          \end{document}      This works for me unless I don't have to use the plural form upon the first occurence. From then on, the concept behind glossaries, so far I can understand, does not really allow my tweak. The main reason, to my understanding, is the fact that when defining a new acronym by `\newacronym`, besides the label, only one short form and one long form can be passed and accessed in `\CustomAcronymFields`. These two can be accessed by `\glsshorttok` and `\glslongtok` for storing them under the user- defined keys, such as `name`, `symbol`, `text`, etc. Especially the `description` key itself cannot be accessed at this stage. From the conceptual point of view, it would be helpful if all three forms (short, English long, German long) could be passed to `\newacronym` separately and then concatenated in a customized fashion to be finally stored with their corresponding keys, including `firstplural` and `longplural`. Note that for my example, I would e.g. have to append an "s" for the plural forms of the short form as well as to the English long form and provide a used-defined plural form for the German long form in most cases. For now, my only question is whether you think that my problem can still be solved with what glossaries offers so far. If not, would it make sense to try to redefine a couple of commands? I've had the impression that e.g. `\glsentryfull` has to be redefined. However, one major problem I fear is that most of these commands only take a subset of keys, such as only `short` and `long` (not `description`) in case of `\glsentryfull`. Or is there even another package which would do my task without modifications?


title: What to do so text won't splitted on the edge of paragraph?

text: I don't know if my title is descriptive enough, but that is my problem. In justified paragraph some text will be splitted, like 'descriptive' become 'des-criptive' and the 'criptive' part is on the next line, I hope you understand. Please this file for better example, I've included the lyx, tex, and pdf output. I don't want the text to be splitted, can I adjust some settings so it behave just like the default behaviour on LO Writer, Ms. Word, or another WYSIWYG text editor? I'm using LyX on Linux.


title: Unwanted line breaks in middle of words

text: > **Possible Duplicate:**   >  How to prevent LaTeX from hyphenating the entire document? I have a two-column article with custom margins. In some points of the text, line breaks occur in the middle of words. For instance, "results" appears as "re-[break]sults" although no hypen is typed in the word. I have several instances of this in the same text. Is there a hint I can provide to tell `latex` not to insert line breaks in the middle of words?


title: Stop all hyphenation in beamerposter

text: I'm using `beamerposter` for the first time. I want to prevent all hyphenation. How can this be done?


title: How to prevent LaTeX from hyphenating the entire document?

text: I can't find where I can remove any kind of hyphenation and just have LaTeX just do a line break. **edit:** Honestly speaking I just don't like to read hyphenation anywhere and that's the only reason why I wanted to remove it. It is a matter of style, probably unexpected in LaTeX. The document has only a summary in a different language and I used the language packages to hyphenate properly.


title: How to set main file in latextools with Sublime Text 3 editor

text: The point is simple, how to set the "master file" that always will be compiled in Sublime Text 3 editor using standard `Ctrl-b` command (it could using sublime's projects). Additional feature I'm looking for is setting compilation directory. Where it should be specified?


title: Link to Appendix (from anywhere in the document) goes to the wrong place.

text: I have several chapters and several appendices. I am using the hyperref package, and everything is numbered (all the chapters, appendices, etc...) My appendices also have sections within them and I refer to those sections in the text. All the links to the appendices or anywhere in them go to the wrong place. For example, my toc links to appendix 1 go to chapter 1, not appendix 1. Links to appendix 2 go to chapter 2, etc... Also, links to sections within an appendix go to a random page in the chapter in the document (not to the appendix). This is somewhat urgent so any help is greatly appreciated. If I can't make the links work, is there a way to disable the linking just for appendices? Links work fine all over the document otherwise.


title: Long List of Files Names with Paths

text: I need to keep a list of files (max of around 500) along with the path. Based on the fact that each file name and path could be up to 100 characters, should I just save it in a comma separated list using `\g@addto@macro`, or should I use the datatool package, or something else? My main concern is any limitations I might run into. In case it matters, the list processing that I am contemplating is to simply iterate through each file via `pgf`'s `\foreach` to   1. Count the types of files.   2. Perhaps keep create separate sub-lists based on the file attributes/contents.   3. Generate a PDF with links to the files. ## References   * How keep a running list of strings and then process them one at a time


title: MiKTeX 2.9, LyX 2.1, BibLaTeX: How do I suppress language after title field in references?

text: I am using BibLaTeX with LyX and have the following as my TeX file:               %% LyX 2.1.0 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[11pt,letterpaper,english]{scrbook}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \usepackage{setspace}     \onehalfspacing          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \pdfpageheight\paperheight     \pdfpagewidth\paperwidth               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     %\documentclass{scrbook}     %\usepackage[english]{babel}     \usepackage[colorlinks=true]{hyperref}     \usepackage[style=chem-acs,hyperref=true,babel=hyphen,doi=true]{biblatex}     \usepackage{filecontents}          %page header and footer                    %Superscripts and brackets in citation footnotes can be obtained by redefining \@makefntext.           %Citation and "vanilla" footnotes can be printed as separate lists using the manyfoot package.     \usepackage{manyfoot}          % Citation footnotes: use \footnoteA     %\DeclareNewFootnote{A}[roman]     %     %% Vanilla footnotes: use \footnoteB     %\DeclareNewFootnote{B}          % Number of each bibliography entry in brackets     \DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}          \makeatletter          \newtoggle{cbx@togcite}          % Citation number superscript in brackets     \renewcommand\@makefntext[1]{%       \iftoggle{cbx@togcite}         {\@textsuperscript{\normalfont[\@thefnmark]}\enspace #1}         {\@textsuperscript{\normalfont\@thefnmark}\enspace #1}%       \global\togglefalse{cbx@togcite}}               \ExecuteBibliographyOptions{%       citetracker=true,sorting=none,alldates=long,dateabbrev=false,%       articletitle=true,maxcitenames=1}          % No brackets around the number of each bibliography entry     \DeclareFieldFormat{labelnumberwidth}{#1\addperiod}          % Suppress article title, doi, url, etc. in citations     \AtEveryCitekey{%       \ifentrytype{article}         {\clearfield{title}}         {}%       \clearfield{doi}%       \clearfield{url}%       \clearlist{publisher}%       \clearlist{location}%       \clearfield{note}}          % Print year instead of date, when available; make use of urldate     \DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}     \renewbibmacro*{date}{% Based on date bib macro from chem-acs.bbx       \iffieldundef{year}         {\ifentrytype{online}            {\printtext[urldate]{\printurldate}}            {\printtext[date]{\printdate}}}         {\printfield[date]{year}}}          % Remove period from titles     \DeclareFieldFormat*{title}{#1}               %---------------------------------------------------------------     % Essentially verbatim from Joseph Wright     % http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/     \makeatletter          \DeclareCiteCommand{\sfcite}[\cbx@superscript]%       {\usebibmacro{cite:init}%        \let\multicitedelim=\supercitedelim        \iffieldundef{prenote}          {}          {\BibliographyWarning{Ignoring prenote argument}}%           \iffieldundef{postnote}             {}             {\BibliographyWarning{Ignoring postnote argument}}}       {\usebibmacro{citeindex}%        \usebibmacro{sfcite}%        \usebibmacro{cite:comp}}       {}       {\usebibmacro{cite:dump}}          \newbibmacro*{sfcite}{%       \ifciteseen       {}       {\xappto\cbx@citehook{%        \noexpand\footnotetext[\thefield{labelnumber}]{%          \fullcite{\thefield{entrykey}}\addperiod}}}}          \newrobustcmd{\cbx@superscript}[1]{%       \mkbibsuperscript{#1}%       \cbx@citehook%       \global\let\cbx@citehook=\empty}     \let\cbx@citehook=\empty          \makeatother     %---------------------------------------------------------------          \long\def\footnote#1{%       \begingroup%       \def\thefootnote{\roman{footnote}}\footnote{#1}%       \endgroup}          \begin{filecontents*}{\jobname.bib}     @Article{Benfield2003,       Title                    = {Changing trends in pediatric transplantation: 2001 Annual Report of the North American Pediatric Renal Transplant Cooperative Study.},       Author                   = {Benfield, Mark R. and McDonald, Ruth A. and Bartosh, Sharon and Ho, P. L. and Harmon, William},       Journal                  = {Pediatr Transplant},       Language                 = {eng},        Pages                    = {321--335},       Volume                   = {7},       Year                     = {2003},       Month                    = {Aug},       Number                   = {4}     }          \end{filecontents*}     \addbibresource{\jobname.bib}          \makeatother          \usepackage{babel}     \begin{document}               The first citation.\sfcite{Benfield2003}          \printbibliography      \end{document}      The resultant PDF has reference in footnote as > 1 Beneld, M. R. et al., eng Pediatr Transplant 2003, 7, 321335. The title field is suppressed correctly. How do I suppress the eng after title field?


title: How to control float element to achieve compact output?

text: You may say the second question is duplicated. There are so many discussions about how to control the position of float. But they don't meet my needs. I want to reduce the blank area whilst float element should be surrounded with text. That is said, it can't place on the top or the bottom. I want to place it on the center of body. But I don't care it floats before or after text.


title: Multiple align environments for defining a function into a function

text: I use the amsmath and the diagram.sty from A, but I have nearly no control over the alignment.               \begin{align*}     A \colon A &\longrightarrow A \\     X &\longmapsto AAAAAA \\     A &\longmapsto AAA \colon      {     \begin{diagram}[h=2.5ex,w=4.5ex]\small     AAAA & \longrightarrow & AAAAAA \\     AAA & \longmapsto & AAAAA     \end{diagram}     }     \end{align*}      ![to output something like this](http://i.stack.imgur.com/w0fzs.png) It is likely that I should not use diagram.sty for that, but I do not find another solution. In general, the `AAAAAA` "overlaps" with the second function below it


title: Workaround for align without using amsmath

text: I'm preparing a manuscript for a journal that demands a style file (`copernicus2.cls`) that's not compatible with `amsmath`. I want to display some aligned equations, but the lack of `amsmath` means I can't use the `align` environment. `eqnarray`'s inconsistent spacing offends me, so I'm wondering if there's some kind of workaround that will let me achieve the effect of `align` without including the `amsmath` package?


title: How to place label in middle of line (above and below) with TikZ

text: \fbox{     \begin{tikzpicture}[scale=1,auto=center]       \node[circle,fill=gray!20] (n1) at (2,8) {Node A};       \node[circle,fill=gray!20] (n2) at (8,8) {Node B};       \foreach \from/\to in {n1/n2}       \draw (\from) -- (\to) node[draw=none,fill=none,font=\scriptsize,midway,below] {text below};     \end{tikzpicture}     }      The example show how to put text below the line in middle, but how to write the text below and above the line in middle (simultaneously) between two nodes? ...


title: tlmgr error: perl.exe has stopped working

text: I have been using TeX Live 2010 on my Windows 7 computer for some time now, without problems. Recently I decided to use the TeX Live Manager to check for updates, which were successfully installed. The next time I tried to start the Manager, I started getting the **perl.exe has stopped working** error. The TeX Live Installation itself is working just fine, the only problem is the TeX Live Manager. I have tried restarting the computer but it didn't help. What should I do to get it to work?


title: Different hyphenation pattern when using oldstyle figures?

text: It appears that there are different hyphenation patters when using oldstyle figures or not. Consider the following MWE:               \documentclass[a4paper,10pt]{scrartcl}     \areaset[current]{336pt}{600pt}     \overfullrule=5pt          \usepackage{mathpazo}          %\usepackage[osf]{mathpazo}          %\usepackage{fontspec}     %\setmainfont[     %   Numbers={OldStyle,Proportional},     %       ]   {TeX Gyre Pagella}          \begin{document}     \noindent Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum     ut     \end{document}      Which generates an overfull hbox: ![Hyphenation with mathpazo](http://i.stack.imgur.com/bo2tb.jpg) If we activate old style figures, that problem does not occur: ![Hyphenation with osf-mathpazo](http://i.stack.imgur.com/chSK1.jpg) I have two questions:   1. What is going on here? I don't see any numbers in the text, so why would XeLaTeX generate different output?   2. Ultimately I want to use the Open Type Font TeX Gyre Pagella. If we generate this example the result is identical to the first picture, i.e. we get an overfull hbox. How can I achieve the same result as with osf-mathpazo?


title: Failing to connect to tug.org

text: I have been trying to connect to the Tex Users Group (TUG) website for the past few days with no success at all. I keep getting the **connection has timed out** error message. I was wondering if someone in the TeX community knows what is going on, perhaps they have changed their domain or maybe they are updating their servers - I have no idea. Thanks


title: I cannot understand the error msgs in my Latex file, and can't run it

text: Here is my first LaTeX attempt. I understand the warnings, but I don't understand the errors. I can't find anything on these questions in the guides:   1. missing characters from the LaTeX script listed in LOG (whitespace, and 'a' with some mark over it--I didn't use anything like that. I did paste in the early part of the manuscript from a WORD document, without math)   2. When I use `$` or `$$` for math expressions with Greek letters, it says I am not in the math environment, but when I use `\\[` and `\\]`, it says it doesn't understand these commands (undefined).    3. I can't understand what's wrong with the second to last display equation (the one after the words 'hyperbolic functions that'.   4. How do I do an inner product to look like ((x,it),(y,iu)). Is this right (with $ signs)?   5. I read in one of the guides that Latex will compile even with errors, but if 'compile' means 'run', it does not run. I'm told to put `latex rel3.tex` or `dvipdf` on the command line to run. What do they mean by the 'command line'? Nothing happens when I type these into my LaTeX file. Where are the resulting files supposed to be?   6. Where is an explanation of the color codes (pink, dark pink, green, yellow, red ,etc.? I would really appreciate a detailed solution of these problems, not a rough indication or direction to another document). Best of all, please show me the corrected form of my document in addition to explaining how to fix the errors. I am at my wit's end. Research in relativity is a lot easier than figuring out LaTeX! --Thanks, Murray PS: How can I attach the Latex file to this msg, so someone can edit it? I copied in the log below the latex.               \documentclass{article}          \title{Superluminal Velocities as Subluminal Motion Backward in Time}     \author{M.E.Denofsky}          \begin{document}          \begin{abstract}          A consideration of invariant complex angles in Minkowski space-time shows that space-like and time-like worldlines lie in orthogonally complementary planes. The imaginary Lorentz angle of rotation $i\phi$ and Majernik’s real angle $\theta$, where $\beta=v/c=\sin \theta$, combine into a consistent space-time representation of 4 complex dimensions, in a manner suggesting that rotation of the axes beyond $v=c$ corresponds to backward movement in time at a subluminal velocity.      Many of the paradoxes associated with the Lorentz transformation can be resolved by such transformations of coordinate systems.           \end{abstract}          \section{Introduction}     \label{sec-Introduction}     It appears to be generally assumed that the angle between the space and time axes of an inertial frame is a real right angle, as in Galilean coordinates, presumably from analogical and symmetry arguments, as there is no reason to select any other value. But this is far from obvious, in particular when we employ Minkowski coordinates, in which one of time or space is imaginary, and the other real. Nevertheless, we will show that, viewing a Lorentz transformation (LT) as a rotation, the angle is indeed a real right angle, despite the fact that the rotation angle between the two time axes is imaginary.          However, Majernik~\cite{maj} (1986), commented on in Wilkins and Williams (2000, appendix), shows that an alternative viewpoint has much to be said for it, viz.: that the angle between the two time axes is real, but that it already reaches $\pi/2$ when the moving time axis reaches that of a light ray ($v=c$). Under this approach, as the above authors point out, space-like intervals and superluminal velocities are not represented in the real $x-t$ plane, which is in keeping with physical reality. Space-like intervals can then be represented in the orthogonal complement plane, the $ix-it$ plane, where there is no temptation to interpret them as velocities.           More important, this representation is consistent with the values of the complex angles that we shall show to exist between the space-like and time-like zones of Minkowski space-time, suggesting that rotation beyond $v=c$ corresponds to backward movement in time at a subluminal velocity. This is in keeping with what one might expect if acceleration is a process of rotation, rather than a limitless increase of velocity along a linear dimension. It is also consistent with the fact that a particle crossing a Schwarzschild radius, while continuing to accelerate due to the black hole’s gravity, is actually moving backward in time in our frame, and so has negative energy, as in the case of the infalling Hawking radiation particle.          Finally, if we          In this paper, we shall restrict ourselves to one space dimension, as that is sufficient to demonstrate our results, although I mention in the bibliography some papers that explore various unexpected difficulties in generalizing the standard LT equations to two and three spatial dimensions.          \section{Invariant Complex Angles}     The standard approach to the LT emphasizes  the invariant measure $\tau$ of a space-time interval, but neglects that, where there are invariant measures for lengths, there must also be invariant measures for angles. Interval invariance implies a metric for both intervals and angles, the latter obtainable from the former via the cosine law~/footnote{As in the customary representation of a LT as a rotation through an imaginary angle, we take the length of a complex segment $z$ to be its actual complex value, rather than its absolute value, $\sqrt{z\ast z}$, the practice when using complex amplitudes in quantum mechanics to define probabilities, which have to be real positive. Thus we are using analytic expressions, and complex analysis tells us that the laws of real analysis still hold, including common geometric and trigonometric results, such as Euclid’s theorem on the sum of the angles of a triangle, the Pythagorean theorem, and the cosine law.} Thus, taking the letters denoting the vertices to also denote the (possibly) complex angles at these vertices, a complex triangle $UVW$ with sides \mbox{$u$, $v$, $w$} obeys       \[ w^{2} = u^{2} + v^{2} - 2uv \cos W \].          Now consider the special case $u^{2} + v^{2} = w^{2}$, as for a proper time $\tau$ corresponding to a time $it$ and a distance $x$.~\footnote{Although $t$ and $x$ depend on the frame, we may take them as invariant here, since they are the proper time and proper distance for our original frame, which we are not changing. They are invariant as long as we use them only to measure their own intervals, not the time and distance of the moving body.  The angle between the frame axes, measured in this same frame, may be defined as the \emph{proper frame angle}, also invariant, as are the other angles in our right triangle, as they are determined by the invariant measures of the sides.} Letting $W = a+ib$, and expanding $\cos W$ by the cosine addition formula, noting that $\cos ib  = \cosh b$ and $\sin ib  =i \sinh b$, it is easy to show from the functional equations of the circular and hyperbolic functions that                                 $$\cos W = 0  \mbox{ iff  /( a=\pm \pi /2 \) and \(b=0\)}$$          This proves our claim at the beginning of Section, that Einstein’s invariant interval formula implies that the angle (proper frame angle) between the time and space axes is real, and is $\pi/2$. Thus, if the angle between $it$ and $i\tau$ is $i\phi$\footnote{A good exposition of the LT in terms of $i\phi$ is given in \cite{cpxangle}.}, then the angle between $i\tau$ and the space axis $x$ must be $\pi /2-i\phi$. (The angle sum theorem may  be verified for the right triangle by adding the three angles we now know; the imaginary components add to zero, as they must for any complex triangle.)           Since our frame was an arbitrary one, and since the same reasoning can be applied to the angles between the frame axes and the space axis of the moving body, it follows that in Minkowski space the angle between two worldlines of the same kind (space-like\footnote{but in the same space direction; it will be complex if 3-space is used} or time-like) is purely imaginary if they both go in the same time (or space) direction from their common vertex, while the angle between two lines of opposite kind is an imaginary angle plus $\pi ⁄2$. It follows also that the angle between two time-like (space-like) vectors going in opposite time (space) directions is an imaginary angle plus $\pi$, since the angle is the sum of two complex angles like that between the $\tau$-vector and the $x$-axis. These two angles add, as they are in the same plane. These results can be verified by taking the inner product of two general space-time vectors:     $$((x,it),(y,iu))$$               or the fact that a distant particle approaching us from beyond our cosmic event horizon at the speed of light, before crossing which it must have been accelerating to accelerate due to tour expansion of the universe)     \end{document}      Log file:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2014.2.9)  13 FEB 2014 13:34     entering extended mode     **rel3.tex     (C:\Users\User\Downloads\rel3.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.          ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.1 d          vipdfm     You're in trouble here.  Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.          Missing character: There is no d in font nullfont!     Missing character: There is no v in font nullfont!     Missing character: There is no i in font nullfont!     Missing character: There is no p in font nullfont!     Missing character: There is no d in font nullfont!     Missing character: There is no f in font nullfont!     Missing character: There is no m in font nullfont!          Overfull \hbox (20.0pt too wide) in paragraph at lines 1--2     []       []          ("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102      [1{C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}]) (C:\Users\User\Downlo     ads\rel3.aux)     LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 8.     LaTeX Font Info:    ... okay on input line 8.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 8.     LaTeX Font Info:    ... okay on input line 8.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 8.     LaTeX Font Info:    ... okay on input line 8.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 8.     LaTeX Font Info:    ... okay on input line 8.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 8.     LaTeX Font Info:    ... okay on input line 8.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 8.     LaTeX Font Info:    ... okay on input line 8.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <9> on input line 12.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <6> on input line 12.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <5> on input line 12.     Missing character: There is no â in font cmr9!     Missing character: There is no  in font cmr9!     Missing character: There is no  in font cmr9!               LaTeX Warning: Citation `maj' on page 2 undefined on input line 21.          LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <7> on input line 21.     Missing character: There is no â in font cmr10!     Missing character: There is no  in font cmr10!     Missing character: There is no  in font cmr10!     Missing character: There is no â in font cmr10!     Missing character: There is no  in font cmr10!     Missing character: There is no  in font cmr10!     [2          ]     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <8> on input line 33.          ! Missing $ inserted.     <inserted text>                      $     l.34 ...mbox{ iff  /( a=\pm \pi /2 \) and \(b=0\)}                                                       $$     I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.          Missing character: There is no â in font cmr10!     Missing character: There is no  in font cmr10!     Missing character: There is no  in font cmr10!          LaTeX Warning: Citation `cpxangle' on page 3 undefined on input line 36.          Missing character: There is no â in font cmr10!     Missing character: There is no  in font cmr10!     Missing character: There is no  in font cmr10!     [3] [4] (C:\Users\User\Downloads\rel3.aux)          LaTeX Warning: There were undefined references.           )      Here is how much of TeX's memory you used:      242 strings out of 493921      2630 string characters out of 3147286      56031 words of memory out of 3000000      3606 multiletter control sequences out of 15000+200000      8257 words of font info for 29 fonts, out of 3000000 for 9000      841 hyphenation exceptions out of 8191      23i,8n,24p,1148b,158s stack positions out of 5000i,500n,10000p,200000b,50000s     <C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmbx10.pfb><C:/Pr     ogram Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmbx12.pfb><C:/Program Fi     les/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmbx8.pfb><C:/Program Files/MiKTe     X 2.9/fonts/type1/public/amsfonts/cm/cmbx9.pfb><C:/Program Files/MiKTeX 2.9/fon     ts/type1/public/amsfonts/cm/cmmi10.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1     /public/amsfonts/cm/cmmi8.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/public/a     msfonts/cm/cmmi9.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/c     m/cmr10.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr6.pf     b><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr7.pfb><C:/Prog     ram Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr8.pfb><C:/Program Files/     MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr9.pfb><C:/Program Files/MiKTeX 2.9     /fonts/type1/public/amsfonts/cm/cmsy10.pfb><C:/Program Files/MiKTeX 2.9/fonts/t     ype1/public/amsfonts/cm/cmti8.pfb>     Output written on rel3.pdf (4 pages, 163177 bytes).     PDF statistics:      71 PDF objects out of 1000 (max. 8388607)      0 named destinations out of 1000 (max. 500000)      1 words of extra memory for PDF output out of 10000 (max. 10000000)


title: Bind reports/articles into a book, but keep the ability to compile them individually

text: I see a few questions and answers about writing a book/thesis in LaTeX (here's one). But I would like to be able to compile reports separately as I write them to have a bunch of standalone documents. Is this possible without a lot of editing each time? The context: every week for class I have to write a few summaries of the papers we read (some assigned, some just for my own benefit later). So I like the ability to compile each individually each week, then at the end of the semester bind them all into one "book" with pagination and a TOC. Should I just make standalone articles each week, then edit all manually at the end of the semester into a book? Thanks!


title: Replacing fancyhdr with scrpage2

text: I'm trying to reduce the number of packages I'm loading in my documents and I read on the KOMA documentation (and elsewhere) that it can define page styles better than `fancyhdr`. But each time I try to set up `scrpage2` I get weird results, such as with the wrong section titles or positioning of elements. How can I rewrite my `fancyhdr` layout to `scrpage2`?               \usepackage{fancyhdr}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}          \pagestyle{fancy}     \fancyhf{}     \fancyhead[LO]{\textit{\nouppercase{\scshape \mytitle{}}}}     \fancyhead[RE]{\textit{\nouppercase{\scshape \thechapter. \leftmark{}}}}     \fancyfoot[CE,CO]{\thepage{}}          \fancypagestyle{plain}{       \fancyhf{}       \fancyfoot[CE,CO]{\thepage{}}     }          \fancypagestyle{preface}{       \fancyhf{}       \fancyhead[RE]{\textit{\nouppercase{\scshape \leftmark{}}}}       \fancyhead[LO]{\textit{\nouppercase{\scshape \mytitle{}}}}       \fancyfoot[CE,CO]{\thepage{}}     }      The `preface` style is used for the pages before Chapter 1; other pages just use the default `fancy` style.


title: auctex does not parse own sty file

text: a own sty file is not parsed to find commands, it means they can not use with C-c C-m I use the following .emacs               (load "auctex.el" nil t t)     (load "preview-latex.el" nil t t)     (require 'tex-site)     (setq TeX-auto-save t)     (setq TeX-parse-self t)     (setq-default TeX-master nil)     (setq TeX-save-query nil)     (setq TeX-PDF-mode t)      (set-default-coding-systems 'utf-8-unix)      This is a test sty file (test.sty)               \NeedsTeXFormat{LaTeX2e}[1994/06/01]     \ProvidesPackage{test}       [2013/03/19 v0.01 LaTeX package for my own purpose]     \newcommand{\mysecondtest}{My second test}      And this is my MWE               \documentclass{article}     \usepackage{test}     \newcommand{\myfirsttest}{My first test}     \begin{document}     \myfirsttest{}     \end{document}      With C-c C-m I can use only myfirsttest, but not mysecondtest. What can I do, to use the own commands with auctex? I use auctex 11.87 and emacs23 23.4+1-4 on Debian Linux. Thanks for helpful hints


title: Aligning the header in LaTeX

text: How do I align the text to center in the header and the date , below the horizontal line,               \documentclass{letter}          \usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage{geometry}     \usepackage{lipsum}          \geometry{headheight = 35pt}     \fancypagestyle{firstpage}{\fancyhf{}\fancyhead[C]{\includegraphics[scale=0.35]{pecemblem}}\textsc{Pondicherry Engineering College\\ \textsc{Pillaichavady}\\ \textsc{Puducherry-605014}}}      %\fancypagestyle{plain}{\fancyhf{}\fancyhead[C]{\includegraphics[height=0.5in]{pecemblem}}}     \pagestyle{plain}     \begin{document}%         \begin{letter}{}%             \opening{Dear Some Name,}             \lipsum[1-10]         \end{letter}%     \end{document}%      ![enter image description here](http://i.stack.imgur.com/6zlk2.png)


title: Substitute italic ampersand with alternative ampersand in Linux Libertine O

text: Based in this answer I want to create a command `\amper` that uses the alternative ampersand of Linux Libertine O and leaves the regular `\&` alone. The problem with the MWE below is that hyperref does not like the unicode substitution and consequently screws the title in the pdf-info up. I guess the best solution would be to substitute the regular italic ampersand of Linux Libertine with the alternative one, but I don't know how to do that. **Edit:** I should add that the `\amper` command as defined here works perfectly with hyperref with fonts that have an alternative italic ampersand by default, such as Adobe Garamond Pro, Sabon etc.               \documentclass{article}          \usepackage{libertineotf}     \usepackage{xspace}          \usepackage{relsize}     \newcommand*\scname{sc}          \makeatletter     \DeclareRobustCommand{\amper}{%     \ifx\f@shape\scname     {\smaller[1.2]\char"E050}%     \else     \char"E050     \fi     \xspace}     \makeatother          \newcommand{\myTitle}{Italic Ampersand \amper Linux Libertine O\xspace}          \usepackage{hyperref}     \hypersetup{unicode=true,pdftitle={\myTitle}}          \begin{document}          \title{\myTitle}          \maketitle          Text \amper test.          \end{document}


title: Currency symbol: French franc

text: Is there a LaTeX symbol for French franc; the F-like symbol with a lower horizontal bar -- see http://en.wikipedia.org/wiki/French_franc? I have had a look a both Detexify and The Comprehensive LaTeX Symbol List without any luck. **Update** If I try the follwing, the symbol is not written; only `123` is:               \documentclass{article}          \usepackage{fontspec}     \usepackage{siunitx}          \fontspec{FreeSerif.otf}     \DeclareSIUnit{\franc}{^^^^20a3}          \begin{document}          \SI{123}{\franc}          \end{document}      How should I change the code?


title: Self similar fractal with first iteration highlighted

text: I want to draw some self similar fractals and highlight the first iteration. I was able to do so for the Sierpinski Triangle, although my code is somewhat ugly. (A minimal working example is included at the end of this post.) But how to achieve similar results for the Sierpinski Carpet, Box Fractal, Cantor Dust, Koch curve and others? The googleable l-systems do help me, as they often only look similar to the fractal in high orders. For example: Can I use this Koch Curve l-system for my purpose? As promised, finally the code:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{lindenmayersystems}     \pgfdeclarelindenmayersystem{Sierpinski triangle}{         \symbol{X}{\pgflsystemdrawforward}         \symbol{Y}{\pgflsystemdrawforward}         \rule{X -> X-Y+X+Y-X}         \rule{Y -> YY}     }     \begin{document}          \begin{tikzpicture}       \def\trianglewidth{5.5cm}       \def\level{7}       \fill[black] (0,0) -- ++(0:\trianglewidth) -- ++(120:\trianglewidth) -- cycle;       \path l-system       [l-system={Sierpinski triangle, axiom=X, step=\trianglewidth/(2^\level), order=\level, angle=-120},fill=blue!25];       \path l-system       [l-system={Sierpinski triangle, axiom=X, step=\trianglewidth/(2^1), order=1, angle=-120},fill=white];     \end{tikzpicture}            \end{document}


title: Align subscripts vertically

text: I would like to align the subscripts in an expression such as this one:               \documentclass{article}     \usepackage{amsmath}     \begin{document}         $$\sup_{f\in\mathcal H}\lim_{\epsilon\downarrow 0}\sup_{g\in\mathcal H,0<\|g\|<\epsilon} \text{something}$$     \end{document}      This is how it looks like: ![misaligned subscripts](http://i.stack.imgur.com/4fokM.png) and I'd like the `\epsilon \downarrow 0` to be on the same line as the other two subscripts.


title: Problem with letter "\dj" in small-caps font

text: The letter `\dj` has its bar placed too high when used in lower case small caps, e.g.               \documentclass[a4paper]{article}     \usepackage[croatian]{babel}          \begin{document}     \textsc{\dj}     \end{document}      What do I need to add to the preamble in order to correct this?


title: Presentation recommendation

text: I am a rusty, irregular LaTeX user and I am would like to create a presentation with LaTeX. I am hoping to get good screen, html and pdf output. I dont want anything fancy, mostly just a simple clean look. What should I be looking at? I had a quick look around and found Beamer, but was wondering if that is my best option or if I should look around for other options. My main desire is to use a plain text input so that I can use git properly to track changes rather than mucking around with some WYSIWYG package none of which I like anyway..


title: How to place image at the bottom of the titlepage

text: I would like to place a picture at the bottom of the titlepage and include some text on the picture and above it. As the sample attached demonstrates. ![enter image description here](http://i.stack.imgur.com/Q1Urm.jpg)


title: PGF Math Function to compute cube root

text: When I found that a simple `x^(1.0/3.0)` does not yield a graph in PGFplots for negative values of x, I attempted to define my own function for CubeRoot using `pgfmathdeclarefunction` as below. But, am not able to get them to work. These are based on this example for a Gaussian distribution, and another one here. This compiles as is, but has a problem if I set `\DomainMin` to a negative value. The `CubeRootB` function does not even compile, and I do not see what the problem with it is.               \documentclass{article}     \usepackage{tikz}          \newcommand*{\DomainMin}{0.1}     %\newcommand*{\DomainMin}{-2.0} % CubeRootA gives and error if DomainMin < 0          \tikzstyle{MyPlotStyle}=[domain=\DomainMin:2,samples=100,smooth]          \pgfmathdeclarefunction{gauss}{3}{% From links mentioned in the question         \pgfmathparse{1/(#3*sqrt(2*pi))*exp(-((#1-#2)^2)/(2*#3^2))}%     }          \pgfmathdeclarefunction{CubeRootA}{1}{%         \pgfmathparse{%             ifthenelse(equal(#1,abs(#1)),%                 (#1)^(1.0/3.0),%            #1 >= 0                 -1.0*((abs(#1))^(1.0/3.0))% #1 is negative             )%         }%     }          \pgfmathdeclarefunction{CubeRootB}{1}{%         \pgfmathparse{%             \pgfmathifthenelse                 {\pgfmathequal{#1}{\pgfmathabs{#1}}}%                 {exp(ln(#1)/3.0)}%            #1 >= 0                 {-1.0*(exp(ln(abs(#1))/3.0))}% #1 is negative         }%              }          % Modified version of CubeRootB per Caramdir's suggestion     \pgfmathdeclarefunction{CubeRootC}{1}{%             \pgfmathparse{%                 ifthenelse(                     equal(#1,abs(#1)),%                     exp(ln(#1)/3.0),%            #1 >= 0                     -1.0*(exp(ln(abs(#1))/3.0))% #1 is negative                 )             }%         }              \begin{document}     \begin{tikzpicture}     \draw [help lines] (-2,-2) grid [step=0.5] (2,2);     \draw plot [MyPlotStyle] (\x,{gauss(\x,0,0.5)});     %     \draw plot [MyPlotStyle] (\x,{    CubeRootA(\x)});% Error if DomainMin < 0     %\draw plot [MyPlotStyle] (\x,{1.0+CubeRootB(\x)});% Does not compile     \draw plot [MyPlotStyle] (\x,{    CubeRootC(\x)});% Error if DomainMin < 0     \end{tikzpicture}     \end{document}


title: How do I typeset morse code with LaTeX

text: I am writing an article regarding the history of the Morse code and I am having difficulties printing the dots and dashed (they get combined when the document is printed). Is it also possible to write a macro that can map the Morse code to words and letterrs? For example the letter a is ".-" etc.


title: single-column revtex4-1 adds a page break after the title section

text: Using `revtex4-1` in single-column mode produces a page break after the abstract. This is not the behavior with `revtex4`. The minimal example is really simple:               \documentclass{revtex4-1}     \begin{document}     \title{Some stupid title}     \maketitle     The body of the paper goes here.     \end{document}      Adding author, abstract, whatever, doesn't make any difference. The result is two pages, where the title is on page 1, but the text is on page 2. Just switching the documentclass back to `revtex4` gives me a single page, as expected. What's going on? I've updated my entire installation through texlive (2010), and have revtex4-1 2010/07/25/20:33:00 4.1r Looking at the aps website, this looks like it's the most recent version.


title: Prevent \caption from expanding argument too early

text: I have a macro that defines some internal macros and does so locally as to not clutter the global namespace. However, `\caption` seems to expand the macro's argument too early. Here is a minimal example.               \documentclass{article}     \begin{document}     \DeclareRobustCommand\aaaa[1]{%       \bgroup%       \def\bbbb{bbbb}% exists only inside \aaaa (as not to clutter global namespace)       #1%        \egroup%     }     \aaaa{\bbbb}% ok     \begin{figure}       \caption{long \aaaa{\bbbb}}% not ok     \end{figure}      What is causing this? Is there a way to work around that issue? (A LaTeX3 solution for my macro would be fine as well.)


title: footsmisc perpage-option applied to other but standard footnote

text: I have two sets of footnotes defined in the document (Basically I am trying to get around a "counter too large" error on the second set.):               \usepackage{bigfoot}     \DeclareNewFootnote[para]{default} % standard, loads of them = \footnote{}     \DeclareNewFootnote[para]{D}[alph] % about 75 = \footnoteD{}          %\usepackage{perpage}     %   \MakePerPage{footnoteD}     \usepackage[multiple,perpage]{footmisc}      (no point in providing a working example with 27+ footnotes) As is it works resetting \footnote{} as desired. Instead I'd like to have \footnoteD{} reset on every page. The following alternatives do not work (compiling with XeTeX):   * Using perpage (see above) throws an error: Command \c@abspage already defined. \newcounter{abspage}   * Setting \DeclareNewFootnote[para]{D}[Roman] would be an alternative, but results in a rather odd display of the Roman footnote numbers (see image below), in that only some characters are above baseline. (Using a different font is not feasible due to large number of "odd" glyps required) If necessary, I could live with reseting \footnote{} every page using alaph- Footnote marks and arabic numerals for \footnoteD{} but don't know how to define that. ![Roman XXX not as footnote](http://i.stack.imgur.com/c1i3f.jpg)


title: How to locate problematic character in .bib file

text: I received this message when I try to include my bibliography in the document with `\printbibliography`               ! Package inputenc Error: Unicode char \u8:‐ not set up for use with LaTeX.          See the inputenc package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.174 ...rintbibliography[heading=subbibliography]      I would say the problem is with some character in my .bib file. But if I receive no error message from Biber how do I locate the problematic character?


title: How can I force some options and discard others in a custom class?

text: I'm creating a document class based upon `memoir`. For this, I allow several class options to be passed to my code. Options that are not recognized will simply be passed to `memoir`. Now my question is: how can I force `a4paper` even if the user of my class passes `letterpaper` as an option? In other words: is there a possibility to disable the other document size options (`letterpaper`, `a5paper`, `ebook`, etc.) while keeping it possible to pass on options such as `ms` or `fleqn`?


title: How do I use Bakoma fonts in my text?

text: I find the information on Computer Modern and Bakoma fonts confusing. I really want to change font and see what I get. How do I change my font to Bakoma? These are the fonts I want: Bakoma Computer Modern


title: Is it already possible to use the STIX fonts?

text: The STIX Fonts Project would provide consistent fonts for some things that are currently missing in LaTeX (e.g. lowercase `\mathcal` and `\mathbb`). The website says LaTeX support "will follow in 2011". Until then is there some way to already use the fonts? Maybe using `xelatex` instead of `pdflatex`?


title: Horizontal spacing

text: I want to do some horizontal spacing. I tried with `\hspace{6cm}` but it doesn't work, and I don't know why. I also tried `\\\\[.6cm]` but since I want to make space between two tables, it doesn't work because it needs to be written after a line, and there is no line. Is there any other way to make some space? EDIT: It is very hard to make an small compilable example, that's why I didn't posted it. It is a really big document to extract an SCE from it. But I'm doing the table as it follows. Perhaps that's enough clue for you to help:               \leftskip-1.5cm\begin{tabular}{lr}     \toprule     Detalle      & Importe\\     \midrule     Adquisición de equipos y software  & 1574.17 \euro \\     Material inventariable &  182.45 \euro \\     Mano de obra &  8430.00 \euro TODO \\     Fungibles & TODO \euro \\                                                         \textsc{Total} & \fbox{TODO \euro} \\     \bottomrule                     \end{tabular}      Problem appears then I use \hspace between 2 of these tabulars, or even between a tabular and a text line.


title: Use catcode for alternative way of writing fractions

text: Writing fractions using different syntax would sometimes be useful, instead of using `\frac{ab}{cd}`, I would prefer to write something like `\frac{ab⌂cd}` where the Unicode `⌂` is the `}{`. **n.b.** , I don't want to mess with the `\frac` definition, but rather something like `\newcommand{\myfrac}[2]{#1⌂#2}` **Approach** -My understanding of TeX is limited, but I think I can use catcode to do this, My understanding is that:   * `\catcode `@=2` is equivalent to `}`   * `\catcode `@=1` is equivalent to `{` However just writing               \catcode`\⌂=\active     \def ⌂{ \catcode `@=2 \catcode `@=1 }


title: Ignore spaces and \par's after an environment

text: In defining an environment, I could use `\ignorespacesafterend` to ignore all spaces after the environment. But how could I also ignore all `\par`s and empty lines after the environment? In other word, how could I modify the following latex source               \documentclass{article}          \newenvironment{abc}{\ignorespaces}{\ignorespacesafterend}          \begin{document}          \begin{abc}     One     \end{abc}      \par     \begin{abc}     Two     \end{abc}           \begin{abc}     Three     \end{abc}          \end{document}      to get the following result?               OneTwoThree


title: PGFplots and boxplots: How to tune width and separation of boxes?

text: I would like to use pgfplots to draw boxplots. This minimal example works fine for me. But I would like to display more data in this form               \begin{filecontents}{testdata.dat}      0 1 1.2 0.4 1.5 0.2      1 2 2.3 1.5 2.7 1      2 0.7 1.4 0.5 1.9 0.1      3 1 1.2 0.4 1.5 0.2      4 2 2.3 1.5 2.7 1      5 0.7 1.4 0.5 1.9 0.1     \end{filecontents}      When I run this minimal example mentioned above I get touching or overlapping boxes. Unfortunately I am not allowed to attach images. Just run the example below by yourself. What do I need to adjust in the code provided, in order account for more data and remove overlapping graphs? Could this width be adjusted manually or is there even an option to do this automatically?               \documentclass{minimal}     \usepackage{pgfplots}     \usepackage{filecontents}          \begin{filecontents}{testdata.dat}      0 1 1.2 0.4 1.5 0.2      1 2 2.3 1.5 2.7 1      2 0.7 1.4 0.5 1.9 0.1      3 1 1.2 0.4 1.5 0.2      4 2 2.3 1.5 2.7 1      5 0.7 1.4 0.5 1.9 0.1     \end{filecontents}          \pgfplotsset{      box plot/.style={         /pgfplots/.cd,         black,         only marks,         mark=-,         mark size=1em,         /pgfplots/error bars/.cd,         y dir=plus,         y explicit,      },      box plot box/.style={         /pgfplots/error bars/draw error bar/.code 2 args={%             \draw  ##1 -- ++(1em,0pt) |- ##2 -- ++(-1em,0pt) |- ##1 -- cycle;         },         /pgfplots/table/.cd,         y index=2,         y error expr={\thisrowno{3}-\thisrowno{2}},         /pgfplots/box plot      },      box plot top whisker/.style={         /pgfplots/error bars/draw error bar/.code 2 args={%             \pgfkeysgetvalue{/pgfplots/error bars/error mark}%             {\pgfplotserrorbarsmark}%             \pgfkeysgetvalue{/pgfplots/error bars/error mark options}%             {\pgfplotserrorbarsmarkopts}%             \path ##1 -- ##2;         },         /pgfplots/table/.cd,         y index=4,         y error expr={\thisrowno{2}-\thisrowno{4}},         /pgfplots/box plot      },      box plot bottom whisker/.style={         /pgfplots/error bars/draw error bar/.code 2 args={%             \pgfkeysgetvalue{/pgfplots/error bars/error mark}%             {\pgfplotserrorbarsmark}%             \pgfkeysgetvalue{/pgfplots/error bars/error mark options}%             {\pgfplotserrorbarsmarkopts}%             \path ##1 -- ##2;         },         /pgfplots/table/.cd,         y index=5,         y error expr={\thisrowno{3}-\thisrowno{5}},         /pgfplots/box plot      },      box plot median/.style={         /pgfplots/box plot      }     }          \begin{document}     \begin{tikzpicture}     \begin{axis} [enlarge x limits=0.5,xtick=data]      \addplot [box plot median] table {testdata.dat};      \addplot [box plot box] table {testdata.dat};      \addplot [box plot top whisker] table {testdata.dat};      \addplot [box plot bottom whisker] table {testdata.dat};     \end{axis}     \end{tikzpicture}     \end{document}      Thank you very much for your time.


title: Space after LaTeX commands

text: I have a definition               \newcommand{\arnold}{Arnold Schwarzenegger}      when I refer to it by               \arnold is a      it is rendered as > >     Arnold Schwarzeneggeris a >   In order to have a space in front of "is" I would need to write               \arnold\ is a      Is there another and shorter way?


title: Missing space after "ø" \o

text: I am writing a German text with some Scandinavian names which include characters like ø. In one case the ø is at the end of the word and the following whitespace is ignored. MWE:               \documentclass{article}          \begin{document}          Near the town of Errits\o is Fredericia.           \end{document}      appears as ![enter image description here](http://i.stack.imgur.com/bQCh6.png) The word separation between "Erritsø" and "is" is missing. What is causing this problem and how can I solve it? (How) Is it affected by inputenc and/or fontenc?


title: Error in spacing when using custom command

text: > **Possible Duplicate:**   >  Space after LaTeX commands I`ve made a few very short commands, and they work, alas the spacing after them is wrong.               \newcommand{\yaksen}{$y$-aksen}     \newcommand{\xaksen}{$x$-aksen}     \newcommand{\zaksen}{$z$-aksen}      This produces no space after the commands, so if i type               this is an example \yaksen, is the norwegian term for the y-axis.     and the \zaksen is perpendicular to both the \xaksen and the \yaksen.      The output is               this is an example y-aksen, is the norwegian term for the y-axis.     and the z-aksenis perpendicular to both the x-aksenand the y-aksen.      However, putting blank spaces after the commands. Like this               \newcommand{\yaksen}{$y$-aksen }     \newcommand{\xaksen}{$x$-aksen }     \newcommand{\zaksen}{$z$-aksen }      Produces this               this is an example y-aksen , is the norwegian term for the y-axis.     and the z-aksen is perpendicular to both the x-aksen and the y-aksen .      Is there any easy way to obtain correct spacing? I think I`ve read something about it, but my searches ended in vain.


title: \newcommand that behaves like a normal word

text: Is there any way to define a `\newcommand` that behaves like a normal word? I have a few names for Objects, that might change later. To keep my flexibility i use `\newcommand{\superprod}{superPRODUCT}`. If later on the name of "superPRODUCT" has to be changed to "uberPr0duct", I just have to change the new command. But it really bothers me, that i have always have to type `\superprod\`or `\superprod{}` in my text. Is there any way to make latex realise that a space has to be inserted after the word (except at the end of a sentence)? Edit: No real solution, best way:               \newcommand{\superprod}{}% To make sure that \naive isn't already defined         \def\superprod/{superPRODUCT}          in text:     Lorem \superprod/ ipsum \superprod/.


title: Problem with spacing after abbreviation

text: > **Possible Duplicate:**   >  \newcommand and spacing   >  No space following macro without argument I want to use `\newabbrev` for some abbreviations, but the spacing is off. With `\newabbrev`, I get spacing both before a new word and before a period. With a simple `\newcommand` it's the other way around. What do I do?               \documentclass{article}     \usepackage{abbrevs}     \newabbrev{\whp}{with high probability}     \newcommand{\whpcmd}{with high probability}     \begin{document}     \setlength{\parindent}{0in}     The event occurs \whp by our previous argument. We get spacing, using \verb|\newabbrev|.      **Edit:** Specifically, why does the abbreviation get the space before the period? That doesn't seem to make sense.               The event occurs \whpcmd by our previous argument. No spacing (bad), Using \verb|\newcommand|.          The event occurs \whp. We get spacing (bad), using \verb|\newabbrev|.          The event occurs \whpcmd. No spacing, Using \verb|\newcommand|.          \end{document}


title: No space after the word when I defined a macro, bug?

text: I defined a macro but I found the word spacing is gone. Am I missing something?               \documentclass[11pt, oneside]{article}          \newcommand{\abc}{$abc$}     \newcommand{\abcSpace}{$abc$ }          \begin{document}          Word spacing here $abc$ is correct.          Word spacing here \abc is incorrect.          Why do I need to define macro like this \abcSpace in order to have a space?          But within brackets, this space again is not what I want: (\abcSpace).               \end{document}


title: Problem with \newcommand, no space after calling new command in the compiled text

text: > **Possible Duplicate:**   >  \newcommand and spacing In my latex document I have defined a new command to force a consistency in naming of a product I talk in my document:               \newcommand{\fancyName}{\emph{ABC}}       However I experience a problem that:               \fancyName is a wonderfull and fancy product.      is compiled to:               ABCis a wonderfull and fancy product.      without a space after \fancyName in the compiled text. Does anybody know how to define a new command and avoid this issue?


title: How to insert a space after a substitution of a variable or a command?

text: I am trying to learn how to define **commands** `(\newcommand`) and **variables** `(\def)` in LaTeX. When I try:               \def \new {$new$}      or               \newcommand{\new}{$new$}      and substitute it in the text:               \documentclass{article}          %\def \new {$new$}                %\newcommand{\new}{$new$}          \begin{document}     lala \new lala     \end{document}      The substituted text sticks to the following text as shown here: ![enter image description here](http://i.stack.imgur.com/AE1He.png) no matter how many spaces I put after the command. What causes this behavior and how can I change it?


title: Write command so that commas appear properly

text: > **Possible Duplicate:**   >  \newcommand and spacing I want to write a command as a shortcut to insert text.               \newcommand{\bl}{$blah blah$}      When I write the command like this, "blah blah" runs into the next word. If I put a space after the second "$", then when I have               \bl,      I get > blah blah , with a space before the comma. What's the proper way of doing this.


title: In text mode space being taken away

text: Why does the space after `\AA` disappear?               \documentclass{article}     \begin{document}     5 \AA wavelength     \end{document}      ![enter image description here](http://i.stack.imgur.com/8wVmw.png) Since extra spaces don't achieve anything in LaTeX, what can be done besides forcing a space? Also, why is this symbol causing this affect?


title: Is it possible to create an assertion of minimum spacing in a command?

text: > **Possible Duplicate:**   >  Horizontal Spacing: double \hspace removal? I'm trying to keep my document as abstract as possible since I'm likely to change representation of the terms I'm using on a regular basis. For this reason, I have created a number of commands similar to the following:               \newcommand{\gtDepth}{\texttt{depth}}     \newcommand{\gnInt}{\textit{int}}     \newcommand{\gtSemi}{\texttt{;}}      I can then use these commands to describe a simple grammar rule:               \gtDepth \gnInt \gtSemi      The problem is, of course, that there is no spacing between these terms. I would like to write something like the following:               \newcommand{\gspc}{\minspace{3mm}}     \newcommand{\gtDepth}{\gspc\texttt{depth}\gspc}     \newcommand{\gnInt}{\gspc\textit{int}\gspc}     \newcommand{\gtSemi}{\gspc\texttt{;}\gspc}      Specifically, I want this "minspace" construct to create space only if it is not already adjacent to that much space. For instance, I would like               a\minspace{3mm}b      to be equivalent to               a\minspace{3mm}\minspace{2mm}b      because the 3mm space is larger. It seems that `\mathop` provides this behavior in a very crude sort of way: things in `\mathop` are padded on the left and the right, but two `\mathop`s adjacent to each other don't create twice as much space. Any thoughts? Thanks!


title: Why don't I get any space after \thepage?

text: The code `\thepage of` yields the output `3of`. I can fix it by writing `\thepage~of`, but what causes this in the first place? I can't imagine when it would be useful.


title: Text in command gets glued to following text

text: I made this command `\newcommand{\BR}{MyBrand\superscript{\scriptsize ™}}`, when I use it and write something like this `\BR is awesome` the ouput is: MyBrand™is awesome What am I doing wrong here?


title: \newcommand and spacing

text: How can I define my own shorthand command, but making sure that the spacing afterwards is correct? `\newcommand{\abc}{\textsc{abc}}` produces 'ABC,' but has the problem 'ABCmoretexthere' (i.e. no space before the next word). Vice versa `\newcommand{\abc}{\textsc{abc} }` produces 'ABC moretexthere' but has the problem 'ABC ,' (i.e. one space before the comma). How can I make both work?


title: Declare macro for simple text snippets

text: I want to use something like this:               \newcommand{\favouritealgorithm}{\texttt{Gaussian elimination}}      so that               My favourite algorithm is \favouritealgorithm written in C.      produces               My favourite algorithm is \texttt{Gaussian elimination} written in C.      However, the space after the word "elimination" is omitted. Which macro provides the correct behaviour?


title: how to use tags or symbols in latex?

text: I am writing report using Latex software but I got stuck while using tags. consider a statement( for example): > for any A ∈ Γ, B ⊆ A implies B ∈ Γ. The traditional (t, n) threshold secret > sharing [3 - 9] is a special case of general secret sharing.Their qualified > subsets are those that have at least a certain, per-determined number of > participants. And my latex code :               for any A \in T, B  \subseteq A implies B \in T.The traditional (t, n)      threshold secret sharing [3 - 9] may be a special case of general secret sharing.     Their qualified subsets area unit those who have a minimum of an exact,      pre-determined variety of participants.      The output generated in the PDF look like: > for any A ∈ T;B ⊆ AimpliesB ∈ T.Thetraditional(t,n)thresholdsecretsharing[ > 3-9]maybeaspecialcaseofgeneralsecretsharing:T > heirqdeterminedvarietyofparticipants. My questions is when I am using some tags, after using tags text occurring after that tag is displayed without space between them as you can see in the latex output above. I have referred latex pdf also but I am not getting my answer. so please suggest to me some way so I can display my text in original form as you can see in example statement.


title: No space following macro without argument

text: With a macro such as:               \def\naive{na\"{\i}ve}      I find that the space which I would hope to follow it, is absent. So, with               the \naive approach      I get > the naïveapproach in the output. How do I bring back the space?


title: How to avoid having to use the tilde with every macro?

text: I am relatively new to LaTeX, so please bear with me. I have just started using macros and finding them quite useful. However, I find myself having to use the tilde (`~`) a lot of times to get a space between the macro defined string and the next word. Example:               \newcommand{\ftp}{File Transfer Protocol}      but when I write this:               The \ftp is awesome because blah blah blah.      I get this (note there isn't a space between 'Protocol' and 'is'):               The File Transfer Protocolis awesome blah blah blah.      so I have to use the tilde:               the \ftp~is awesome because blah blah blah.      so that I can get that space:               The File Transfer Protocol is awesome blah blah blah.      **My question is then:** is there anyway I can avoid having to type the tilde every time?


title: Horizontal Spacing: double \hspace removal?

text: `\addvspace` can be used to create commands which can be stacked together without creating unnecessary padding. This is useful for creating commands which start and end with `\addvspace` so that they can be placed adjacent to each other without using up twice as much padding space as they need. Does anyone know of a similar command for horizontal space? I have a number of commands of the form               \newcommand{\fooAnd}{\hspace{1ex}\texttt{and}\hspace{1ex}}      that I would like to string together, but I only want them separated from each other by 1ex each. (And I want to use commands in the interim that don't have `\hspace` in them, so just cutting the space down to 0.5ex is not a solution.) Any thoughts?


title: Escape character in LaTeX

text: I need to output the below text but since `\` is a special character, I cannot:               [RegularExpression(@"\d+")]      Also sometimes I need use dollar sign `$` as well but it seems to be a special char, too. What is the way to escape those in LaTeX? **UPDATE:** I used `\verb` as suggested but I am unable to run commands inside it. Also, in the output the font and the opacity of the text is different than the default one:               \verb|[RegularExpression(\newline @"\d+")]|


title: textsuperscript and hash symbol

text: How can I get a text superscript of the hash (#) symbol in Latex to work? I tried `\textsuperscript{\\#}` to no avail. I should have been more specific in my question. I am using `\usepackage{fontspec}` and `\usepackage{xltxtra}`, with `\setmainfont{Calibri}`. While Latex/Xelatex prints the #, it does not print it as superscript. When I use fonts Arial, Computer Modern, or Palatino, Latex correctly prints the # as superscript.               \documentclass[10pt, a4paper]{article}     \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage{microtype}      \defaultfontfeatures{Mapping=tex-text,Ligatures=TeX}     \setmainfont{Calibri}     \begin{document}     \textsuperscript{\#}example     \end{document}


title: LaTeX wont compile because of use of _ in text

text: LaTeX wont let me use _ in my text, it keeps trying to compile it as math and therefor wont compile my pdf. Anyone know how i can make it not do that? Im using it in the following:               \textit{item_name}     \textit{current_item.name}     \textit{_qty}     \textit{id='small_qty'}


title: Printing >, <, and % in LaTeX

text: Please help me with this. How to print `>`, `<` and `%` in LaTeX. Backslash doesn't seem to work!


title: Hash character in LaTeX

text: > **Possible Duplicate:**   >  Escape character in LaTeX How do you write the # character in LaTeX?


title: How to type & in LaTeX?

text: > **Possible Duplicate:**   >  Escape character in LaTeX I'm trying to type the word & but I encounter with error : > misplaced alignment tab character & And when I put it into verbatim it will show Q&A in a seperated line! So how should I type & in LaTeX?


title: Create automata with LaTeX

text: I failed to create this automata with LaTeX: ![enter image description here](http://i.stack.imgur.com/V0vYO.png)               \documentclass{article}          \usepackage{pgf}     \usepackage{tikz}     \usetikzlibrary{arrows,automata}     \usepackage[latin1]{inputenc}          \begin{document}     \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm,semithick]     \node[initial,state] (A) {$1$};     \node[state] (B) [right of=A] {$2$};     \node[state] (C) [right of=B] {$3$};     \path     (A) edge node {\t,\n,' '} (B)     (B) edge node {other} (C);     \end{tikzpicture}          \end{document}      The error: `(A) edge node {\t,\n,' '} (B)`


title: Write $ in latex in the final pdf file

text: Dear i'm writing a code on latex with codes retrieved from R. As you may know, the symbol $ is inserte in R statistical software. At the same time it is used to represent equations in $. This is the code i have used: predictionTable<-data.frame(AGE=unique(italyLCA$age),Ax=italy.lca$ax,bx=italyLca$bx) predictionTable$kt=ktSubset[1:nrow(predictionTable)] predictionTable$mux=with(predictionTable,exp(Ax+bx*kt)) #fit mux I want to get my pdf file on latex with the symbol $ written in this way:![enter image description here](http://i.stack.imgur.com/kNDub.jpg) What i must add to my code above to get the final code in pdf with the symbol ($). I don't want to remove the symbol $ on my final code. Please is someone can help?


title: Writing text in math mode

text: I was writing an IEEE paper.I wanted to insert some texts like **IMAGE_NEW** and **IMAGE_OLD** but when I am writing it is showing me some error.How to solve this issue.


title: Typing "&" in tables

text: > **Possible Duplicate:**   >  Escape character in LaTeX   >  How to type & in LaTeX?               \begin{tabular}{ l | c || r | }       A&B & 2 & 3 \\       4 & 5 & 6 \\       7 & 8 & 9 \\     \end{tabular}      How would I type `&` in LaTeX? Because I want for example, `A&B` to be in one box, but I cant seem to figure out how.


title: How to type this in text?

text: How to type the ASCII characters, like               ! " # $ % & ' ( ) * + , - . / :


title: How to solve "Missing $ inserted" error?

text: Here is my LaTeX code block.. It's combination of formula and sentences. If I run it, an error always occurs: "Missing $ inserted" in that part (code block part).                \begin{itemize}      \item      \begin{singlespace}      \begin{verbatim}       se=strel('disk',9);       citra_dilasi=imdilate(cropped_img,se);       \end{verbatim}       \end{singlespace}            The morphological dilation is performed to "\emph{cropped_img}" with the SE           (structuring element), where the SE is a disk-shaped structuring element and the        radius is 9. \emph{cropped_img} is the image that has crop horizontally.      The error is like this. ![Error Messege](http://i.stack.imgur.com/qyLTm.png) How to solve it??


title: How do I print $ in LaTeX

text: > **Possible Duplicate:**   >  Escape character in LaTeX I have some equations where I am using `$`.But when I execute my `.tex` file with that particular equation the `$` sign disappears in the pdf. Can someone help me regarding this.


title: Including brackets inside text function

text: I am having a programming function with name `WorkFunction_()`. I am trying to highlight this function using `\texttt{}`, something like `\texttt{WorkFunction_()}`. However this ends in error. Could anyone suggest an alternate for this?


title: When I use the elsarticle, I cannot compile through only when adding "\ead"

text: %% This is file `elsarticle-template-1-num.tex',     %%     %% Copyright 2009 Elsevier Ltd          \documentclass[preprint,12pt]{elsarticle}          \usepackage{amssymb}          \journal{Journal}          \begin{document}          \begin{frontmatter}          \title{PAS}          \author[a]{A\fnref{fn1}}     \ead{A@163.com} %%%%%%%%%%%%%%%%%%%%%%%%%          \author[b]{B}          \author[a]{C\corref{cor1}}          \cortext[cor1]{Corresponding author}     \fntext[fn1]{das}          \address[a]{UA}     \address[b]{UB}          \begin{abstract}     %% Text of abstract     \end{abstract}          \begin{keyword}          \end{keyword}          \end{frontmatter}          \section{Introduction}     \label{}          \bibliographystyle{model1-num-names}     \bibliography{<your-bib-database>}          \end{document}


title: Underscore character (_) that's part of a word

text: > **Possible Duplicate:**   >  Escape character in LaTeX   >  Underscore in words I want to write a name like **LKU_IF** which contains an underline. When I write it in Latex it doesn't show the result properly. Does anybody know what should I do?


title: How i can insert "%" symbol in my writing context?

text: while writing % in the sentence it is considering as a comment . Just like i wana write this sentence **25% of this bottle is empty.** But texnic does not showing remaining text in the output. kindly give me some suggestion . Regards


title: When should one use \verb and when \texttt

text: Sometimes people here use `\verb!A SHORT COMMAND!` and sometimes `\textt{A SHORT COMMAND}`. I'm unsure when to use which. Are there any guidelines or arguments for `\verbatim` vs. `\texttt`?


title: How can I print escape characters in LaTeX?

text: How can I print `\n`, `\t`, `\v` and so on in LaTeX document? I mean I want in my output two chars: `\n` not a new line. I tried:   1. `\\\n`   2. `\verb!\\\n!` With no effects...


title: How to write "@(x)x.^2" in latex?

text: I tried `\texttt{@(x)x.^2}` or directly `@(x)x.^2` but texmaker gives `Missing $ inserted`. I gues it is because `x.^2` which is assumed to be math syntax. Can you help?


title: Underscores in words (text)

text: How can I produce the text `Word_one_two` in LaTeX? I tried:               Samp\_Dist\_Corr      But, it doesn't quite look right. Also, I want it in the typewriter font, so actually, I'm doing:               \texttt{Samp\_Dist\_Corr}      I find it looks a bit like the underscore is merging in to the bottom of the "D", but maybe it's just because of the typewriter D?


title: Ignore math symbols (want underscore in regular text)

text: I want to include the following expression without any changes in my LaTeX document:               RES_0.5_SE_5      If I just type like that, LaTeX wants it to be math mode because of the underscores. If I use               \verb|RES_0.5_SE_5|      the text has a different font. Is there a command to just use ignore math symbols? Thanks!


title: Is it possible to calculate the ganttgroup progress automatically?

text: Is it possible to calculate the progress of the ganttgroup automatically. If the Task 1 progress changes than the ganttgroup progress will be recalculated automatically?               \documentclass[a4paper,landscape]{article}          \usepackage[top=2cm, bottom=2cm, left=1.5cm, right=1.5cm]{geometry}     \usepackage{pgfgantt}                         \definecolor{barblue}{RGB}{153,204,254}     \definecolor{groupblue}{RGB}{51,102,254}     \definecolor{linkred}{RGB}{165,0,33}     \renewcommand\sfdefault{phv}     \renewcommand\mddefault{mc}     \renewcommand\bfdefault{bc}          \sffamily     \begin{document}             \centering \Large\textbf{Time Table}         \begin{center}           \noindent\resizebox{\textwidth}{!}{             \begin{tikzpicture}[x=0cm, y=0cm]                \begin{ganttchart}[                     canvas/.append style={  fill=none,                                              draw=black!5,                                              line width=1pt},                                                         hgrid style/.style={    draw=black!5,                                              line width=1pt},                                                         vgrid={*1{  draw=black!5,                                  line width=1pt}},                                            today=2,                                 today rule/.style={                         draw=black!64,                         dash pattern=on 3.5pt off 4.5pt,                         line width=1.5pt                     },                               today label font=\small\bfseries,                     title/.style={draw=none, fill=none},                     title label font=\bfseries\footnotesize,                     title label node/.append style={below=7pt},                     include title in canvas=false,                     bar label font=\mdseries\small\color{black!70},                     bar label node/.append style={left=1cm},                     bar/.append style={draw=none, fill=black!63},                     bar incomplete/.append style={fill=barblue},                     bar progress label font=\mdseries\footnotesize\color{black!70},                     group incomplete/.append style={fill=groupblue},                     group left shift=0,                     group right shift=0,                     group height=.5,                     group peaks tip position=0,                     group label node/.append style={left=1cm},                     group progress label font=\bfseries\small,                     link label font=\scriptsize\bfseries,                     link label node/.append style={below left=-2pt and 0pt},                     ]{1}{52}                  \ganttgroup[progress=80]{Big task}{1}{52} \\             \ganttbar[progress=90]{Task 1}{1}{3} \\             \ganttbar[progress=70]{Task 2}{2}{4} \\           \end{ganttchart}         \end{tikzpicture}         }         \end{center}          \end{document}


title: Print a short title in the header

text: I'm creating a style file to use as a template for submissions to a specific journal. That journal requires a short title in the header. I could easily hard-code such a short title in the style file itself, following the answer to Page header alternatively author name and short title, but that's clearly not a good solution in this case, as I would need to change the template `.sty` file for every document I write. Any suggestions how I can do this? Dummy lines with `\shorttitle` are commented out in the MWE below.               \documentclass{article}     \usepackage{lipsum,filecontents}     \begin{filecontents}{mystyle.sty}     %% My package starts here     \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{mystyle}     \usepackage{titling}     \usepackage{fancyhdr}         \pagestyle{fancy}         \fancyhf{}         \fancyhead[R]{\thetitle\ \thepage} % Instead of this     %   \fancyhead[R]{\theshorttitle\ \thepage} % do something like this     \endinput     %% And ends here     \end{filecontents}     \usepackage{mystyle}          \begin{document}     \title{This is my long title}     %\shorttitle{This is my short title} % This short title should not be printed here - only in the header     \maketitle     \lipsum[1-6]     \end{document}


title: How to make equation fit in the column

text: HI here is the latex code                   \documentclass{sig-alternate}         \usepackage{ctable}         \begin{document}        $G_{CS}(\mathbb{S_c})=     \begin{cases}     \displaystyle\sum_{k=1}^{r} \frac{Gmax(k)-q_k(s)}{Gmax(k)-Gmin(k)}.w_k & if\ Gmax(k) \neq Gmin(k)\\     1 & if\ Gmax(k) = Gmin(k)     \end{cases}$        This is boundary This is boundary This is boundary This is boundary This is boundary This is boundary This is boundary This is boundaryThis is boundary This is boundary This is boundary This is boundary This is boundary This is boundary This is boundary This is boundary              \end{document}       And here is the latex ![enter image description here](http://i.stack.imgur.com/iU1vw.png) I am using two columns in with ACM SIG Proceedings template http://www.acm.org/sigs/publications/proceedings-templates The equation has gone out from the boundary, is there a way to make it within the boundary? One way I can think of is make the space of red circle becomes smaller, and the font in red rectangle becomes smaller, but i am not sure how to achieve it. Furthermore, two multilines of equation are too near(draw by red line) is there a way to seperate it further?


title: Makeindex warning

text: During `\makeglossaries` run I get warning: > Process started: makeglossaries "settings" > > makeglossaries version 2.12 (2014-01-20) added glossary type 'main' > (glg,gls,glo) makeindex -s "settings.ist" -t "settings.glg" -o > "settings.gls" "settings.glo" > > WARNING: Unable to fork "makeindex": Bad file descriptor Retrying without > redirection. This is makeindex, version 2.15 [MiKTeX 2.9] (kpathsea + Thai > support). Scanning style file > C:/Users/asus/Downloads/settings.ist.............................done (29 > attributes redefined, 0 ignored). Scanning input file settings.glo....done > (1 entries accepted, 0 rejected). Sorting entries...done (0 comparisons). > Generating output file settings.gls....done (6 lines written, 0 warnings). > Output written in settings.gls. Transcript written in settings.glg. Process exited normally               \documentclass{article}          \usepackage{glossaries}     \makeglossaries          \newglossaryentry{gloss}{     name=glossaries,     description=A package for generating glossaries in many styles     }          \begin{document}     \texttt{\gls{gloss}} is a great package!ds     \printglossaries     \end{document}      How this warning can be avoided? What is wrong with my settings?


title: Rendering the same bibliography database in different styles

text: I am trying to put together an example document (more like the one here, for some kind of official decision, I will not bore you with the details) which shows how the references change with the change of bibliography styles. I planned to use the same bibliography database which will be rendered again and again in different styles. My minimal working example is something like this.               \documentclass{article}          \usepackage{multibbl}          \begin{document}          \section{ACM Format}     \newbibliography{ACM}     We can cite an article in journal~\cite{ACM}{artjournal}          \bibliographystyle{ACM}{acm}     \bibliography{ACM}{mybibdb}{References}               \section{IEEE Format}          \newbibliography{IEEE}     We can cite an article in journal~\cite{IEEE}{artjournal}          \bibliographystyle{IEEE}{ieeetr}     \bibliography{IEEE}{mybibdb}{References}          \end{document}      * * * And here is, `mybibdb.bib`.               @Article{artjournal,       author =   {Author Name},       title =    {Article name in Journal},       journal =      {Journal Name},       year =     {2012}     }      * * * The problem is, when compiled, I get the multiply defined label message for `artjournal`. And this is something I can not simply ignore since the reference numbers assigned will come out to be incorrect when I add more references. Is there any way to use the same database again and again without going through the painstaking process of making the keys different for multiple similar entries in the bib file? (Or using several standalone main files?) **Complete Bunch After Solution** The complete _(non MWE)_ bunch of my working files (with the excellent solution incorporated) can found here for those who may need it.


title: How do I make LaTeX push long citations to a new line?

text: When I use the `\cite` command for my citations, often LaTeX will overflow the margins for my lines, and the text looks pretty bad. How can I make LaTeX push long citations to the next line automatically?


title: Citations go out of margins

text: Some of my citations overflow into my margins. See below. I am wondering if there is any solution to this? I am using `\bibliographystyle{apalike}`. ![enter image description here](http://i.stack.imgur.com/0ITaW.png)