title: Font changes in `tikz`

text: I have this code:               \documentclass[tikz,border=10pt]{standalone}     \begin{document}          \newcommand{\pythagwidth}{3cm}     \newcommand{\pythagheight}{2cm}     \begin{tikzpicture}            \coordinate [label={below right:$A$}] (A) at (0, 0);       \coordinate [label={above right:$B$}] (B) at (0, \pythagheight);       \coordinate [label={below left:$C$}] (C) at (-\pythagwidth, 0);            \coordinate (D1) at (-\pythagheight, \pythagheight + \pythagwidth);       \coordinate (D2) at (-\pythagheight - \pythagwidth, \pythagwidth);            \draw [thick,red] (A) -- (C) -- (B) -- (A);            \newcommand{\ranglesize}{0.3cm}       \draw [red] (A) -- ++ (0, \ranglesize) -- ++ (-\ranglesize, 0) -- ++ (0, -\ranglesize);            \draw [help lines] (A) -- node [below] {$b$} ++ (-\pythagwidth, 0)                 -- node [right] {$b$} ++ (0, -\pythagwidth)                 -- node [above] {$b$} ++ (\pythagwidth, 0)                 -- node [left]  {$b$} ++ (0, \pythagwidth);            \draw [help lines] (A) -- node [right] {$c$} ++ (0, \pythagheight)                 -- node [below] {$c$} ++ (\pythagheight, 0)                 -- node [left]  {$c$} ++ (0, -\pythagheight)                 -- node [above] {$c$} ++ (-\pythagheight, 0);            \draw [help lines] (C) -- node [above left]  {$a$} (B)                      -- node [below left]  {$a$} (D1)                      -- node [below right] {$a$} (D2)                      -- node [above right] {$a$} (C);     \end{tikzpicture}     \end{document}      I want to change the typeface of the labels to Biolinum, which is the sans- serif typeface in the `libertine` package. I tried `\usepackage{libertine}` and `\sffamily`, which didn't work. I also tried declaring `libertine` as an option on the document class. That didn't work either. What should I do instead?


title: \parbox vs. minipage: Differences in applicability

text: Lamport, _LaTeX: A document preparation system_ , states on p. 104: > There are two ways to make a parbox at a given point in the text: with the > `\parbox` command and the `minipage` environment. They can be used to put > one or more paragraphs of text inside a picture on in a table item. `\parbox` and `minipage` share one mandatory argument (width of the parbox) and the optional argument (vertical alignment). (The second mandatory argument of `\parbox` _"is the text to be put in the parbox"_ [p. 105].) Lamport recommends the use of minipages instead of parboxes in some cases (e.g. a parbox containing a `tabbing` or a list-making environment), but doesn't substantiate his advice (or at least I skipped that part). Finally, from Hendrik Vogt's comment to this answer, I gather that one reason to prefer minipages is that _"[y]ou don't have to wait that long for the matching closing brace"_. I'm aware that the `\footnote` command doesn't work with `\parbox`; by contrast, it _"puts a footnote at the bottom of the parbox produced by the [`minipage`] environment"_ (Lamport, p. 105). Are there other differences in applicability between `\parbox` and the `minipage` environment? P.S.: Kopka and Daily, _A guide to LaTeX_ , state on p. 89: > The _text_ in a `\parbox` may not contain any of the centering, list, or > other environments described in Sections 4.2 through 4.5. These may, on the > other hand, appear within a `minipage` environment. However, I did some tests using `center`, `itemize` and `tabbing` environments within a `\parbox`, and LaTeX did not throw error messages. Are Kopka and Daly wrong, or did I miss something?


title: Why does fit not scale? (tikz)

text: I have a problem with the fit library in TikZ. When I scale the figure (with the tikz scale command), the fit box doesn't! Why is that? Could I somehow change it? Example:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{fit}     \begin{document}          \begin{tikzpicture}[state/.style={circle,draw,thick,loop above,inner sep=0,minimum width=10}]     \node[state] (a) at (0,1) {} edge [loop above, thick] coordinate (al) ();     \node[state] (b) at (1,1) {} edge [loop above, thick] coordinate (bl) ();          \node[draw,rectangle,fit=(a) (b) (al) (bl)] {};     \end{tikzpicture}               \begin{tikzpicture}[scale=2,state/.style={circle,draw,thick,loop above,inner sep=0,minimum width=10}]     \node[state] (a) at (0,1) {} edge [loop above, thick] coordinate (al) ();     \node[state] (b) at (1,1) {} edge [loop above, thick] coordinate (bl) ();          \node[draw,rectangle,fit=(a) (b) (al) (bl)] {};     \end{tikzpicture}          \end{document}      ![output](http://i.stack.imgur.com/yQ8is.png)


title: Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX?

text: I understand that `\bf` and `\it` are now obsolete in LaTeX and that `\textbf` and `\textit` are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font style. I have read the English version of "Obsolete commands and packages", v. 1.8.5.7 of l2tabu, Sec. 2.1 and I understand the rules and their reasons, as well as the several other commands that are affected. However, I find it convenient to use LaTeX for notetaking during lectures, and in that rushed environment, shortening a command by any number of keystrokes helps keep me from falling behind. `\bf` and its two-letter kin are still very useful to me for that reason, and once a presentation is finished I can go through and replace all appearances of `\bf` et al. with `\textbf` et al. My question is this: is there a plan eventually to replace the short font style commands like `\bf` with the implementations of `\textbf` etc. some day, or should I expect `\bf` always to remain in existence but obsolete, for reasons of backward compatibility with original TeX? Original TeX has been greatly improved on in countless ways, but in the heat of transcription I sometimes miss its conciseness.


title: Creating a table that uses all available space

text: Is there a way to use tabular or some other method to create a table that expands to use the entire available space? So if I created a table with 4 rows, each row would use 25% of the space. Thanks!


title: Shortest code causing "Emergency stop." error

text: This question is purely academic. TeXing a file containing               \valign{\halign#\cr!      causes an `! Emergency stop.` error. Is that the shortest code which produces a fatal error in TeX?


title: How to frame a pdf image with a coordinate system (Tikz?)

text: I would like to know whether it is possible to put a frame around an included image (via `\includegraphics`). I would like to add a coordinate system to an image.


title: How to copy the content of an aux file to another aux file?

text: I have two aux files attached to my LaTeX document : aux_1 and aux_2. I would like, at some point, to copy the content of aux_1 to aux_2. More precisely, the file aux_1 does already contain some text. I want to copy the content of aux_2 after the already existing text. Is it possible to do it ? I use the `newfile` package to deal with the aux files. PS : _If possible_ , I would like a LaTeX-friendly answer :)


title: Does hyperref work between two files?

text: Can I create a link from one file into another one. So that when the resulting pdf files are in the same directory the link takes me from one to the other? Does another package do that? Added on 1/20/2012, Reason for the question: I want to submit a document to an organization which wants it to be split into A.pdf for body of paper and B.pdf for the references, C.pdf etc. I assume they will reside in a common directory. They may be viewed individually or coalesced together into a single document.


title: xr and hyperref to link between two PDF documents

text: > **Possible Duplicate:**   >  Does hyperref work between two files? I am using the `xr` package to write a PDF document that contains references to another PDF document, like "in section bla of the other document...". For example, in the referred document there is this code:               \section{Bla}     \label{sec:bla}      and in the referring document there is this code:               \usepackage{hyperref}     \usepackage{xr}     ...     in Section~\ref{sec:bla} in the other document...      The cross-referencing works - the ref appears with the correct section number. Can I use `hyperref` together with `xr` to make the link actually point to a page in the other document, so when it is clicked, the right place in the other document will pop up? It is OK to assume that both file are in the same dir. Comment: I saw that this can be done explicitly using `\hyperdef` and `\hyperref` here. Can it be done automatically just using `xr` and cross- references?


title: How to make a link to a chapter in a local pdf file?

text: The title is self-explanatory. Anything of that sort               \href{run:path/to/file.pdf#chapter2}{go to chapter 2 of file.pdf}      ?


title: Link to local (PDF) file

text: > **Possible Duplicate:**   >  Does hyperref work between two files? I want to make a link in LaTeX to a PDF file on my local network drive, i.e. when you click on it then Adobe Reader should open and show the file. What I tried is the following:               \documentclass{article}     \usepackage{hyperref}     \begin{document}     \url{run:d:/my folder/test.pdf}     \end{document}      Does anyone have any suggestions?


title: Can somebody tell me why this command doesn't work?

text: $\frac{1-(-$\frac{1}{2}^t$) }{$\frac{3}{2}$}$      For some reason it gives me an error, something about a `Missing \endgroup`, be warned I'm new to Latex.


title: Chapter title template tweaking

text: I'm using this code to make a custom chapter title               \documentclass[12pt,oneside,a4paper]{memoir}     \usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}     \usepackage[T1]{fontenc}     \usepackage{lipsum}     \usepackage{etoolbox}     \usepackage{xparse}     \usepackage{bookmark}          % Basic header-footer     \makepagestyle{title}     \makeevenhead{title}{}{\leftmark}{}     \makeevenfoot{title}{}{\thepage}{}     \makeoddhead{title}{}{\leftmark}{}     \makeoddfoot{title}{}{\thepage}{}     \pagestyle{title}               % the \chapterhead command (partially memoir-dependent)     \makeatletter     \NewDocumentCommand {\chapterhead} {mmo}     {\IfNoValueTF{#3}%       {\clearforchapter         \phantomsection         \addcontentsline{toc}{chapter}{%           % \numberline{}% <-- required if 'chapters' are numbered...           \texorpdfstring{\MakeUppercase{#1}}{#1}\space #2}         \markboth{#2}{#2}%         \thispagestyle{chapter}%         \insertchapterspace         \chapterheadstart         \setauthorname{#1}%         \printauthorname         \settowidth{\authornamelength}{#1}%         \afterauthorname         \setmainchaptertitle{#2}%         \printchapterheadtitle         \afterchapterheadtitle         \printsubtitle         \finchapterhead         \@afterindentfalse\@afterheading% <-- prevent indentation at start of paragraph       }%       {\clearforchapter         \phantomsection         \addcontentsline{toc}{chapter}{%           % \numberline{}%           \texorpdfstring{\MakeUppercase{#1}}{#1}\space #2\space #3}         \markboth{#2}{#2}%         \thispagestyle{chapter}%         \insertchapterspace         \chapterheadstart         \setauthorname{#1}%         \printauthorname         \settowidth{\authornamelength}{#1}%         \afterauthorname         \setmainchaptertitle{#2}%         \printchapterheadtitle         \afterchapterheadtitle         \setsubtitle{#3}%         \printsubtitle         \finchapterhead         \@afterindentfalse\@afterheading% <-- prevent indentation       }%     }     \makeatother          % Auxiliary formatting macros:     \newlength\authornamelength     \newcommand*{\authornamefont}{\normalsize\normalfont}     \newcommand*{\mainchaptertitlefont}{\normalfont\large}     \newcommand*{\subtitlefont}{\normalsize\normalfont}     \newcommand{\afterauthorname}{%       \par\centerline{\parbox{\authornamelength}{\hrulefill}}\par}%     \newcommand{\afterchapterheadtitle}{%       {\par\addvspace{0.75\baselineskip}\noindent}}     \newcommand{\finchapterhead}{%       {\par\addvspace{2\baselineskip}\noindent}}               % ARG. #1: Author name     \newcommand*{\setauthorname}[1]{\csdef{authorname}{#1}}     \newcommand{\printauthorname}{{\par\centering       \authornamefont \scshape\MakeLowercase{\csuse{authorname}}\par}}%          % ARG. #2: Title     \newcommand*{\setmainchaptertitle}[1]{\csdef{mainchaptertitle}{#1}}     \newcommand{\printchapterheadtitle}{%       {\par\centering \mainchaptertitlefont         \MakeUppercase{\csuse{mainchaptertitle}}\par}}          % ARG. #3 (optional): Source     \newcommand*{\setsubtitle}[1]{\csdef{subtitle}{#1}}     \newcommand{\printsubtitle}{%       {\par\centering \subtitlefont         \textit{from} \csuse{subtitle}\par}}               \begin{document}          \tableofcontents          \chapterhead{P.A.M. Dirac (1902-1984)}{The quantum theory of the emission and absorption of radiation}[Proceedings of the Royal Society of London, Series A, Vol. 114, p. 243 (1927)]          \lipsum          \chapterhead{V.S. Weisskopf (1908-2002)}{On the self-energy and the electromagnetic field of the electron}[Physical Review, Vol. 56, p. 72 (1939)]          \lipsum          \end{document}      However, I would also like to add a command in the preamble so that the author's name appears in the index (ordered alphabetically according to surname). In addition, for cosmetic reasons, I want to push the author-title-subtitle block further up towards the top margin. I also want to include the author's name in the table of contents entry, followed by the title. I don't need their dates displayed here as well.


title: Trying to cite in LaTeX using biblatex but won't create bibliography or insert citations

text: I'm a new user and am trying to use biblatex to cite in LaTeX. Currently all my code is giving me is my citation put in to my text as my bibtexkey in brackets, or nothing at all. It is also not forming a bibliography. I build LaTeX-->PDF, followed by LaTeX--> bibtex , and then LaTeX-->PDF again. The .bib file has inserted and a .bbl file created. I'm using JabRef to manage my references. I don't understand where I am going wrong. Below is my minimal example.               \documentclass {report}          \usepackage[backend=biber,          style=authoryear,          maxcitenames=2,          sorting=nyt,         backref=true]{biblatex}          \bibliography{refs}          \let\cite\parencite          \begin{document}          Just to check referencing \citation{Bian2008}          \printbibliography          \enddocument


title: Adding a per-chapter image along with group of entries in ToC

text: Friends, I have an old analytic geometry book with an unusual table of contents: for every group of entries based on the current chapter, there is an image along with it. Well, let me show some actual code:               \documentclass{book}          \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{lipsum}          \begin{document}          \tableofcontents          \chapter{Coordinates of points}          \section{Rectangular coordinates}          \lipsum[1]          \section{Projections of a segment on the axes}          \lipsum[2]          \section{Distance between two points}          \lipsum[3]          \section{The mid-point of a segment}          \lipsum[4]          \section{Division of a segment in any ratio}          \lipsum[5]          \section{Oblique coordinates}          \lipsum[6]          \chapter{The locus of an equation}          \section{First illustrations}          \lipsum[1]          \section{Curve plotting}          \lipsum[2]          \section{Test that a point lie on a curve}          \lipsum[3]          \section{Intercepts}          \lipsum[4]          \section{Points of intersection of two curves}          \lipsum[5]          \section{Oblique coordinates}          \lipsum[6]          \chapter{The straight line}          \section{Equation in terms of point and slope}          \lipsum[1]          \section{Line through two points}          \lipsum[2]          \section{The general equation of first degree}          \lipsum[3]          \section{Parallel and perpendicular lines}          \lipsum[4]          \section{Angle between two lines}          \lipsum[5]          \section{Distance from a point to a line}          \lipsum[6]          \end{document}      The generated table of contents is as expected: ![ToC1](http://i.stack.imgur.com/5auLC.png) Now, this book has a table of contents similar to this one: ![ToC2](http://i.stack.imgur.com/iKSUR.png) I'm curious if there's a semi-automatic way of including a per-chapter image to appear in ToC. I can swear this geometry book was originally typeset in LaTeX! Any ideas or suggestions towards this result? `:-)`


title: Modifying the header in fancyhdr

text: I want the chapter name to appear on the header without numbering.What should I do?I tried removing the section mark but it doesn't just work? Here is the code:               %Template for Technical Document     \documentclass{book}     \usepackage[a4paper,margin=1in,bindingoffset=0.2in,centering,headheight=0.3in,heightrounded]{geometry}     \usepackage{fancyhdr}     \usepackage[a4paper,margin=1in,bindingoffset=0.2in,centering,headheight=0.3in,heightrounded]{geometry}     % Can also use centering, or hcentering               \fancypagestyle{myfancy}{     \fancyhf{}     \fancyhead[LE,RO]{\slshape\nouppercase{\rightmark}}     \fancyhead[LO,RE]{\slshape\nouppercase{\leftmark}}     \fancyfoot[LE,RO]{\thepage}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     }     \renewcommand{\chaptermark}[1]{%     \markboth{#1}{}     }     \renewcommand{\sectionmark}[1]{%     \markright{#1}{}}          \usepackage{microtype}          \usepackage{afterpage}     \let\oldcleardoublepage\cleardoublepage     \renewcommand{\cleardoublepage}{\afterpage{\thispagestyle{empty}}\oldcleardoublepage}          \pagestyle{myfancy}          \begin{document}     \chapter*{Install Backtrack on an Android Device}     \section{What is Backtrack?}     BackTrack is a distribution designed by Jason Dennis based on the Ubuntu Linux distribution aimed at digital forensics and penetration testing use. BackTrack provides users with easy access to a comprehensive and large collection of security-related tools ranging from port scanners to Security Audit. Support for Live CD and Live USB functionality allows users to boot BackTrack directly from portable media without requiring installation, though permanent installation to hard disk and network is also an option.\par     \section{Security Tools in Backtrack}     BackTrack includes many well known security tools including:     \begin{itemize}         \item Metasploit for integration         \item Wi-Fi drivers supporting monitor mode (rfmon mode) and packet injection         \item Aircrack-ng         \item Gerix Wifi Cracker         \item Kismet         \item Nmap         \item Ophcrack         \item Ettercap         \item Wireshark (formerly known as Ethereal)         \item BeEF (Browser Exploitation Framework)         \item Hydra         \item OWASP Mantra Security Framework, a collection of hacking tools, add-ons and scripts based on FirefoX.         \item Cisco OCS Mass Scanner, a very reliable and fast scanner for Cisco routers with telnet and enabling of a default password.     \end{itemize}          \section{Installing Backtrack on Android Device}     \subsection{Tools Required}     \begin{enumerate}     \item Backtrack 5 ARM.\\     Download Backtrack 5 ARM from Backtrack official site. Backtrack with ARM architecture only on Backtrack 5 version. ARM architecture not available for Backtrack 5 R1, Backtrack 5 R2, and Backtrack 5 R3.     \item Rooted android device \\     Why rooted android device ? Because we need install some application that need Android to be root     \item Busybox, Superuser, Terminal Emulator, and AndroidVNC. \\     You can download search and all of them on Google Play. BusyBox is installer and uninstaller Android program, Superuser is superuser rights manager for Android, Terminal Emulator is Android's built-in Linux command line shell program, and AndroidVNC is a VNC viewer for Android.     \end{enumerate}     \subsection{Installation}     \begin{enumerate}     \item Extract BT5-GNOME-ARM.7z to folder, for example "BT5" folder and then put on device root directory.     \item Open Terminal Emulator on device then go to BT5 folder using the command \verb+ cd sdcard/BT5 +     \item Then run this following command \verb+ su + and \verb+ sh bootbt + and you will see \verb+ root@localhost +     \item Now lets run Backtrack GUI with VNC viewer \verb+startvnc+     \item To connect wth VNC we must know the port where VNC listening. Run \verb+netstat -anpt+ and remember the port where VNC listening. In this case the port is 59016. Open AndroidVNC and fill the form like this: \\     Nickname : BT5\\     Password : toortoor\\     Address  : 127.0.0.1\\     Port     : 5901 \\     \item Connect it and you will see Backtrack 5 interface \par     \textit{Remember! Some of the Backtrack tools can't work properly and do it for your own risk. I hope you can Install Backtrack on Android device without any problems, tell me if you get problems.}     \end{enumerate}     \end{document}       When I use section* I don't get anything on the header. ![enter image description here](http://i.stack.imgur.com/yzWma.png)


title: Change \newcommand behaviour based on the environment

text: I'd like to define a command `\Lm`, such that if used in a maths environment it is replaced with `\mathcal{L}`, but when used outside of the maths environment it would be replaced with `$\mathcal{L}$`. This would allow me to write both a sentence like this:               $\langle \Lm, \R \rangle$ is a \emph{deductive system}     consisting of a language \Lm and a set of inference rules \R;      I know how to write either of those behaviours separately: `\newcommand{\Lm}{$\mathcal{L}$}`, `\newcommand{\Lm}{\mathcal{L}}`, but I'm not sure if there is a way to decide which one to use based on the environment I'm in.


title: What is the command for producing whitespace equal to the length of some string?

text: > **Possible Duplicate:**   >  Create empty box sized according to imaginary content I remember that there is some command for producing whitespace exactly equal to the length of the argument (a text string), but I can't remember what it is, and I can't find it in online references (probably because I'm searching for the wrong terms). Does anyone know the name of this command?


title: Running pdftex with specific map file

text: Is it possible to run `pdftex` with a specific map file that is not named `pdftex.map`? I am aware that I can specify a search path for map files using the environmentvariable `TEXFONTMAPS`, but it seems that `pdftex` only uses a map file from this path if it is called `pdftex.map`. Some background: I am developing a font package and would like to generate a font chart using `fontchart.tex` from the build directory without the need to install the font. `pdftex` has access to all necessary files (TFM, PFB and ENC files plus the map file), but doesn't process the map file since it is not called `pdftex.map`.


title: Use integral or sigma as delimiter?

text: I'm learning LaTeX as I go to write a proof, and I have this chunk of code:               \begin{align}     f(x) & = \displaystyle\sum\limits_{n=0}^{\infty}     \frac{(-1)^n(x^{2n})\left[1 \cdot 3 \cdot 5 \ldots \cdot (2n-1)\right]}     {\sqrt{2\pi}(2n)!}\\     \nonumber\\     f(x) & = \displaystyle\sum\limits_{n=0}^{\infty}     \frac{(-1)^n(x^{2n}) \displaystyle\prod\limits_{k=0}^{n-1}(2k-1)}     {\sqrt{2\pi}(2n)!}     \end{align}      The output is a very small sigma, which doesn't look very good. Is there any way I could use the sigma (or, in future problems, an integral) as a left delimiter to have it change size without using \huge?


title: TeXStudio: How to do the smallest match in regex replace

text: I using regex search to replace the following string:               \new{}\new{test1}\new{test2}      with               test1test2      I using regex replace with \new{(.*)} to find and \1 to replace. however the search always match the whole line of my original string and the replace reuslt is:               }\new{test1}\new{test2      far from what I need. In regex expression in Java, you can use a ? after a quantifier makes it a reluctant quantifier. It then tries to find the smallest match. So in java, my search regex expression would be               \\new\{(.*?)\}      I need the corresponding regex search string in TeXStudio to do the smallest match.


title: Is there a package for specifying optimization problems?

text: Is there a package for specifying optimization problems, such as in linear programming, quadratic programming, convex programming, etc.? Or do I have to write my own code with align, constraints and so on? I thought that there might be a very elegant way to specify a min/max problem with some constraints below it. I am talking about something like Example 2.2 in http://people.ucsc.edu/~rgil/Optimization.pdf. EDIT: Following a request below, I add an illustrating example of a problem I had with align.               \begin{alignat}{3}     \min && n \\     \mathrm{s.t.} && xxxxxxx \\     && yyyyyyyyyyyyyyyyyyy \\     && zzzzzzzzzzzzzzzzzzz     \end{alignat}      What happens is that n is aligned to the far left. I want all of the left columns to be centered below each other. This is my way of formulating a constrained optimization problem, if someone has a better idea I will be glad to hear about it. If I use only two columns, there is almost no space between $\min$ and $n$. I am almost tempted to use eqnarray :-)


title: TikZ Self Loops Style Question

text: I have a question on how to "style" the self loops in my diagram. Here is my preamble:               \documentclass[letterpaper]{tufte-handout}          % Additional LaTeX Packages          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}          % LaTeX TikZ Graphics Package          \usepackage{tikz}     \usetikzlibrary{arrows}     \tikzset{         >=stealth,         auto,         node distance=3.5cm,         font=\scriptsize,         possible world/.style={circle,draw,thick,align=center},         real world/.style={double,circle,draw,thick,align=center},         minimum size=40pt     }      and here is my current attempt at a diagram:               \begin{figure}     \centering     \begin{tikzpicture}     \node[real world] (1) {$\World_{1}$ \\ $H,L$};     \node[possible world] (2) [right of=1] {$\World_{2}$ \\ $\neg{H},L$};     \node[possible world] (3) [below of=1] {$\World_{3}$ \\ $\neg{H},L$};     \node[possible world] (4) [right of=3] {$\World_{4}$ \\ $\neg{H},L$};     \path[]         (1) edge [loop above,thick] node {$A,B,C$} (1)         (2) edge [loop above,thick] node {$A,B,C$} (2)         (3) edge [loop below,thick] node {$A,B,C$} (3)         (4) edge [loop below,thick] node {$A,B,C$} (4)         (1) [<->,thick] edge node[above] {$B$} (2)         (3) [<->,thick] edge node[below] {$A,B,C$} (4)         (1) [->,thick] edge node[left] {$C$} (3)         (1) [->,thick] edge node[right] {$C$} (4)         (2) [->,thick] edge node[left] {$C$} (3)         (2) [->,thick] edge node[right] {$C$} (4);     \end{tikzpicture}     \caption{Successor state, $\State_{2}$, obtained after $A$ peeks into the strongbox and learns that the coin is facing heads up without the knowledge of his fellow agents.}     \label{fig:multi-modal-strongbox:peek-2-successor}     \end{figure}      The picture that I am getting looks like this: ![enter image description here](http://i.stack.imgur.com/xEJGr.jpg) But I really want the arcs to look like the ones in this example: ![enter image description here](http://i.stack.imgur.com/VF5FI.jpg) I don't mind having the labels be above or below the arc and not in the middle, but the overall shape of the self loops is what I'm interested in replicating. Also, as a side note - I've been unable to find a way to increase the horizontal separation between the nodes. Any suggestions would be appreciated.


title: Subscript font size in Emacs TeX mode

text: In Emacs 23 TeX mode, subscripts and superscripts are displayed in smaller fonts. How can I configure Emacs to turn off this feature and use the same font size for all input?


title: Wrapfigure, \baselineskip if not top of page

text: ## TL;DR The wrapfigure environment aligns wrapped content differently, depending on if the page is still empty or not. If the page is not empty, it will lower the wrapped content by `\intextsep`. * * * I am using wrapfigure to embed little images into paragraphs. It works quite well, but I'm having this problem. The new problem for this question is, that the problem does not occur, when the paragraph starts on the first line of a page, so I need to detect the "first line on page" case. In the referenced problem, the wrapfigured paragraph can never on the first line of a page, hence adding `\vspace*{-1\baselineskip}%` at the beginning of the wrapfigure solves the issue. In my approach, it is entirely possible, sometimes even wanted, that the wrapfigured paragraph starts at the first line of a page. I use wrapfigure as follows:               \renewcommand{\subsubsubsection}[2][\relax]{%                   \ifx#1\relax                         \relax                   \else                         \settowidth\wrapwidth{\includegraphics{#1}}                         \begin{wrapfigure}{r}{\wrapwidth}\vspace*{-1\baselineskip}%                                 \includegraphics{#1}                         \end{wrapfigure}                   \fi%                   \@startsection{paragraph}{4}{\z@}%                         {3.25ex \@plus1ex \@minus.2ex}%                         {-1em}%                         {\raggedsection\normalfont\sc\nobreak\bfseries\small}%                         {#2}     }          \subsubsubsection{Just a title}     blah blah blah          \subsubsubsection[imagefile]{Title with image}     blah blah blah      How do I detect if my `\subsubsubsection` will be the first paragraph and line on a page, so that I can put `\vspace*{-1\baselineskip}%` only when needed? * * * Edit 1 I tried appending `%` to every line in the macro definition, but that didn't yield any visible changes. Here is a complete document illustrating the problem:               \documentclass{article}     \usepackage{wrapfig}     \usepackage{lipsum}          \makeatletter     \newcommand{\subsubsubsection}[2][\relax]{%         \begin{wrapfigure}{r}{1cm}\rule{1cm}{2cm}\end{wrapfigure}%         \@startsection{paragraph}{4}{\z@}{1em}{-1em}{\bfseries}{#2}%     }     \makeatother          \begin{document}          \subsubsubsection[foo]{This is how I want the black box align to the text}\lipsum[1]          \subsubsubsection[foo]{This is NOT how I want the black box to align with the text}\lipsum[1]          \newpage     \subsubsubsection[foo]{What I want}\lipsum          \subsubsubsection[foo]{Not what I want}     Now, if I just produce enough text to make the beginning of the next subsubsubsection      become the first line on the new page.It will work. Flip over, to see for yourself! I'll just add some text here to avoid the problems that arise when the wrapped paragraph is fewer lines long than the wrapfigure is high. I'll just add some text here to avoid the problems that arise when the wrapped paragraph is fewer lines long than the wrapfigure is high. I'll just add some text here to avoid the problems that arise when the wrapped paragraph is fewer lines long than the wrapfigure is high.          \rule{2pt}{.34\textheight}          Just a little more to fill up this page \ldots          \subsubsubsection[foo]{Happens to be what I want}\lipsum[2]          \end{document}      I threw out Koma-Script, the `\includegraphics`, as well as width-calculation and and the `\ifx`. It will be harder to see, but the problem also persists when replacing the line starting with `\@startsection` with simply `#2`. Here is a picture showing what I want and what I do not want: ![The upper paragraph is set at the first line of the page](http://i.stack.imgur.com/rvObw.png)


title: How to split the bibligraphy into two with different bibnames?

text: I'm using texclipse with MiKTeX 2.8. For my thesis I need to split my list of references into two parts: literature and online sources. I've so far:               \usepackage{url}     \usepackage{harvard}     \citationmode{abbr}      \bibliographystyle{agsm}         \renewcommand{\harvardurl}{URL: \url}      ...     \bibliography{../bibtex/Literatur}     \renewcommand\bibname{Online Quellenverzeichniss}     \bibliography{../bibtex/Online}      I assume my bib file entries are correct, no errors warnings, except it will not find the citation keys for the entries in Online.bib for the citations in my article. Though I will get the two chapters with different tiles, there are the same entries (of the first bib "Literatur") on both. Is there a way to get this to work properly or do I have to go another way?


title: Is it possible to \include a .TeX file compiled from .Rnw?

text: I have a document with this structure: `main.TeX` which (ideally) includes `bodytext.TeX` compiled with `knitr` from `bodytext.Rnw`. I say ideally because apparently it is not that simple. I noted that `knitr` adds lines to the preamble of the compiled `.TeX`. Then in my case, when the `.TeX` (without a preamble) is included into another document, compiling `main.TeX` will result in all sort of errors. Is it possible to include a `.TeX` compiled from a `.Rnw` then?


title: Trying Context in SciTE on windows, but

text: I've decided to give ConTeXt a try and I've been using these instructions http://wiki.contextgarden.net/Windows_Installation:_ConTeXt_Suite_with_SciTe If I type context --version in powershell (Windows 8.1) I get the message               mtx-context     | ConTeXt Process Management 0.61       mtx-context     |     mtx-context     | main context file: C:/context/tex/texmf-context/tex/context/base/context.mkiv     mtx-context     | current version: 2014.09.06 20:59PS C:\context>      So I'm thinking it has installed alright, and if I type in `$env:path` I get the path variable in which I can find `C:\context\tex\texmf- win64\bin;C:\Ruby193\bin`. So both ruby should be installed and both ruby and ConTeXt should be in the path. But after installing SciTe (I have tried reinstalling too), and copying all the described files from the ConTeXt folder into the SciTe folder I can't seem to build my first helloworld ConTeXt file. I'm trying               \starttext          Hello, world!          \stoptext      But when I press build I get               >texexec --pdf helloworld.tex     This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)     pdftex: The memory dump file could not be found.     pdftex: Data: cont-en.fmt     >Exit code: 1      I'm thinking maybe the problem is related to it talking about MikTex, where it should maybe be calling some ConTeXt thing instead? Also in the tutorial it was written I should press ctrl+F12 to build, but I could never get this to work and found F7 instead. Many thanks beforehand


title: Write a dictionary with LyX

text: How to make a dictionary with LyX ? I found this page about this in LaTeX. The `\newenvironment` and `\newcommand` i put in Preamble or inside the text?


title: Color Text and BG of Verbatim, without affecting `fancyvrb` line numbers

text: The MWE below aims to color the text and background of a `Verbatim` environment.               \documentclass{article}     \usepackage{fancyvrb}     \usepackage{color}     \usepackage{calc}          \definecolor{PYtxt}{rgb}{0.97,0.97,0.95}     \definecolor{PYbgc}{rgb}{0.15,0.16,0.13}          \newsavebox{\PYbgbox}     \newenvironment{PYcolorbox}%      {\noindent%       \begin{lrbox}{\PYbgbox}%       \begin{minipage}{\linewidth-2\fboxsep}%       \color{PYtxt}}%      {\ignorespacesafterend%       \end{minipage}%       \end{lrbox}%       \colorbox{PYbgc}{\usebox{\PYbgbox}}}          \begin{document}          \begin{PYcolorbox}     \begin{Verbatim}[commandchars=\\\{\},numbers=left,firstnumber=1,stepnumber=1]       File "<stdin>", line 1         1+          ^     SyntaxError: invalid syntax     \end{Verbatim}     \end{PYcolorbox}          \end{document}      The problem with the code above is that line numbers produced by `fancyvrb` are also colored white, and cannot be seen when compiled. How may I do both of the following (but not at the same time):   * independently change the text color and line number color?   * expand `PYcolorbox` to the left to include the (white) line numbers? Alternative code method: adding `formatcom=\color{white}` to the `Verbatim` arguments yields white text (including line numbers), but also affects the bottom margin of the color background. The goal would be to use this in tandem with `Pygments`. Any help would be appreciated.


title: Font problem - errors returned

text: I am using Ubuntu as OS. When I try to run a tex code, I receive this error from Textmaker :               ! Font T1/ppl/m/n/12=pplr8t at 12.0pt not loadable: Metric (TFM) file not found     ! Font T1/ppl/m/n/24.88=pplr8t at 24.88pt not loadable: Metric (TFM) file not found.     ! Font \T1/ppl/b/n/24.88=nullfont not loadable: Metric (TFM) file not found.     ...      It seems to be a Font problem, but I have no idea on how to fix it. Thank you in advance for your help. Please note that the same code could be run perfectly before. I tried to reinstall texmaker but it didn't helped. **EDIT** Please find on below the Packages used :               \documentclass[12pt,a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{mathrsfs}     \usepackage{fancybox}


title: What is the label of the glossary?

text: I'd like to add a link to the glossary in my main text.               See the \nameref{XXX} on page \ref{XXX}.      So far I couldn't find out the name of the label of the glossary. There should be one, since the link in my TOC works. How can I find out the name of the label?


title: ogctools in combination with beamer

text: I try to use ocgtools in a beamer presentation, which worked for me some time ago. But now (TeXLive 2013) this seems not wo work anymore. As soon as I include the ocgtool package there are errors like > ! Infinite glue shrinkage found in a paragraph. \@EveryShipout@Hook > ...\@cclv \unhbox \@cclv \fi } Here a minimal example               \documentclass{beamer}          \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{ocgtools}          \begin{document}     \frame{     \ocgpicture[width=.5\textwidth]{img}     }     \end{document}      Does anybody know how to circumvent this errormessages?


title: Reference Code snippet in latex using minted

text: I'm not really sure how to reference a code snippet in my text. I need also a caption for the code. The only working way I found is wrapping the minted in a figure. The problem is that I want to distinguish figures from code snippets..               \begin{figure} [ht]     \centering     \begin{minted}[mathescape,                    numbersep=5pt,                    frame=lines,                    framesep=5mm]{sql}     natural join library.Book with amazon.Book as jointarge.BookCollection     with keep attributes library.Book.title     \end{minted}     \caption{A Caption}     \label{fig:Figure}     \end{figure}


title: Fill table with dynamic amount of columns

text: I want to fill a table with a dynamic (calculated) amount of columns. The column should be filled with a value which the user should provide comma separated. I therefore tried to use forcsvloop, but I must have made some mistakes, as I got a strange error:               Undefined control sequence ^^I\entry{5,6,7}      with example               \documentclass{article}      \usepackage{etextools}          %Create a table with a specific amount of columns     \newenvironment{vartab}[1]     {         \begin{tabular}{ |c@{} *{#1}{r|} } \hline     }{         \end{tabular}     }          \newcommand{\entry}[1]{         \forcsvloop{#1}\do{             & ##1         }\\ \hline     }          \begin{document}          \begin{vartab}{3}         & 2 & 3 & 4 \\\hline         \entry{5,6,7}     \end{vartab}          \end{document}      Do you know what the problem might be?


title: Producing unformatted html with tex4ht?

text:
When using tex4ht, a formatted html file is obtained. It uses a css file and multiple classes such as               toto      However, when using a Content Management System (CMS) such as Joomla, such formatting classes are not desired since all the formatting is handled by the CMS. A clean html file is preferred with html tags such as
,
, ... but without formatting classes for each tag. Is it possible to obtain, with tex4ht, such a clean html file with no formatting classes but only with formatting html tags?


title: adding text onto pdf pages

text: This is related to the post How can I superimpose LaTeX / TeX output over a PDF file?. One of the answers is (which is the one I'm using now):               \documentclass[12pt]{article}     \usepackage{pdfpages}     \usepackage{tikz}     \begin{document}     \includepdf[pagecommand={\begin{tikzpicture}[remember picture, overlay]\node at (current page.center) {overlayed text};\end{tikzpicture}}]{filename}     \end{document}      I modified is to use absolute position:               \documentclass[12pt]{article}     \usepackage{pdfpages}     \usepackage{tikz}     \begin{document}     \includepdf[pagecommand={\begin{tikzpicture}[remember picture, overlay]\node at (0.5, 1) {overlayed text};\end{tikzpicture}}]{filename}     \end{document}      However when I tried it on a pdf document with multiple pages, only the _first_ page of the pdf document is extracted and used for the creation of the new pdf document. The text _is_ included the new pdf correctly. Question: How do I make sure that the text is included on every page?


title: How do I get that line that represents a repeating author in a bibliography or works cited page?

text: As I understand it, when there are several bibliographic entries from the same author, you represent all subsequent entries with a line, like this:               \bibent     Nietzsche, Friedrich, and Walter A. Kaufmann. \emph{The Gay Science: With a Prelude in Rhymes and an Appendix of Songs}. New York: Vintage Books, 1974. Print.           \bibent     ------. \emph{The Portable Nietzsche}. New York: Penguin Books, 1976. Print.       Where the ------. represents the fact that this book has the same author as the previous book listed. The six hyphens here get rendered as two em-dashes, which is OK, but I still feel like there's a better way to do this natively.


title: Adding background color to title slide in beamer

text: How can I add a solid background color only to the title slide in `beamer`? This is what I am doing after `\begin{document}`               \setbeamercolor{background canvas}{bg=blue}     \begin{frame}     Hello     \end{frame}     \setbeamercolor{background canvas}{bg=}


title: Is there a nice way to compile a beamer presentation without the pauses?

text: Say I made a beamer presentation and I want to print it out. Is there a nice way to make beamer ignore the pauses so that I don't get lots of pages with duplicate information? Of course there are some things one could do with find & replace, but I would prefer a more sophisticated solution if such exists.


title: Change fancyhdr settings in preamble after they have already been set

text: I have a "standard" preamble (portion in the code below that I indicated that I really don't want to change) that I am trying to reuse. But, I want to adjust the right margin for _one_ particular document. There is no problem in changing the `geometry`, nor a problem in modifying the text that is placed in the header -- that works just fine. But, how do I change the location of where the header text is placed? I want the "README" text to be right aligned with the text margin -- similar to what do not adjust the right margin -- by commenting out the line: `\geometry{right=1.0in}` When I attempt to adjust the right margin I get the header on the right and footer page number still at the old margin location: ![enter image description here](http://i.stack.imgur.com/ZvZiC.png) ## Notes:   * This is not a case of needing a `newgeometry` mid way in a document. This entire document needs the slightly tweaked settings.   * This question Problem with the header/ footer width seems to imply that `fancyhdr` must be loaded after the geometry settings, but that does not appear to be the case as the MWE below shows that the `geometry` settings after loading the `fancyhdr` package.   * An obvious solution is to just copy the preamble into a new file and change that, or add a `\def` before `\begin{document}` and only set thr right margin once, but I'd prefer to avoid those types of solutions if at all possible. ## Code:               \documentclass{article}     \usepackage[showframe]{geometry}%                 \usepackage{fancyhdr}     \usepackage{lipsum}               % ------------- Do not want to change this from here [------     \makeatletter%         \geometry{right=0.25in}%         \geometry{paperheight=3.5in}%          \geometry{paperwidth=8.5in}%         \geometry{showframe=true}%          %         \geometry{headsep=0.25in}         \geometry{headheight=14pt}         \let\ps@plain\ps@fancy%         %         \pagestyle{fancy}% <--- Removing this gives the desired output.         \fancyhead[R]{Don't READ}%         \fancyfoot[R]{Page \thepage}%     \makeatother%     % ------------- Do not want to change this to here ------]          % ------------- Only want to change below here     \makeatletter%         \geometry{right=1.0in}%         \let\ps@plain\ps@fancy%         %         \pagestyle{fancy}%         \fancyhead[R]{README}%         \fancyfoot[R]{Page \thepage}%     \makeatother%          \begin{document}     \lipsum[1]     \end{document}


title: Latex templates more suited to modern Tech (Web 2.0)

text: I would like to know the viability of using Latex for producing posters to promote an event. Something around the lines of this. And obviously, if there are any useful packages for this, or maybe some other tool other than latex. PS: i know what Photoshop is of course. I just want to know what if there are any more code-oriented alternatives for this. EDIT: After re-reading the question i guess it's not quite clear what i want. I know how to apply images (in response to the first comment), and any overall feature i need i guess i can easily search around. This is not a question about **"how do i do this"** , but more so **"is it a good idea?"** Let's say i'm not a Photoshop/design kind of guy, but i'm more into coding, and i can actually do some pretty stuff (HTML+CSS for example). Is it viable for me to use Latex to produce a poster like the example above? If yes: any package/env/template i should know about? If no: why? and what alternatives do i have?


title: Problem with ConTeXt (MkIV), Hebrew and ligatures

text: Since I last played with the latest ConTeXt MkIV, there has been introduced this new feature. It now seems to combine Hebrew characters automatically when possible to ligatures. So for example. If I have a word with following two characters:   * U+05D5 (HEBREW LETTER VAV)   * U+05BC (HEBREW POINT DAGESH OR MAPIQ) ConTeXt will combine these to:   * U+FB35 (HEBREW LETTER VAV WITH DAGESH) However, I would need to disable this feature for a number of reasons. For example, this breaks my little database query, because the query key is changed before(?) macro gets it. So if somebody would know how to turn this off and maybe also that what has changed.


title: moderncv left column resize from left?

text: the bar on the left uses a lot of empty space. I'd like text to a) run into it from the main text or b) have the column start from nearer the page edge. Any ideas how to do this? EDIT: My setup is:               \documentclass[11pt,a4paper,sans]{moderncv}     \begin{document}     \maketitle     \section{Education}     \cventry{This appears under the green line, I want this to appear further left}{BSc     Computer Science}{The University of Manchester}{Manchester}{\textit{Ongoing}}    {\begin{itemize}     \item{blah.}     \item{blah}     \item{blah}     \end{itemize}}          [...]          \end{document}


title: Numeration of equations starting from 1 in each section

text: I have two issues:   1. I want to change the numeration in section, now I have: ![enter image description here](http://i.stack.imgur.com/a9jaZ.png) but I would like to have: > 10 Charakteryzacje zmiennej losowej > >     1. Definition >     2. Theorem It means that the first number which indicates the section number is deleted.   1. Second issue is connected with the numeration too. Now I have that the numeration of all the equations spreads from 1 to ... in the entire document. I want it to start from 1 in each new section. Edit: Inside my document I have:                \newtheorem{tw}{Theorem}[section]      \renewcommand{\theorem}{\arabic{tw}}      \newtheorem{stw}[tw]{Stwierdzenie}      \newtheorem{fakt}[tw]{Fakt}      \newtheorem{lemat}[tw]{Lemat}           \theoremstyle{definition}      \newtheorem{df}[tw]{Definicja}      \newtheorem{ex}[tw]{Przykład}      \newtheorem{uw}[tw]{Uwaga}      \newtheorem{at}[tw]{Wniosek}      and it doesn't work in a correct way, below is the class I use:               \documentclass[12pt, a4paper]{article}     \usepackage{marginnote}     \usepackage[top=2.5cm, bottom=3.5cm, outer=2cm, inner=2cm, heightrounded, marginparwidth=2.5cm, marginparsep=2cm]{geometry}     \usepackage[polish]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[pdftex,linkbordercolor={0 0.9 1}]{hyperref}     \usepackage{amsthm,amsmath,amsfonts,amssymb,mathtools}     \usepackage{url}     \usepackage{enumerate}     \usepackage{graphicx}     \usepackage{bbm}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \fancyfoot[R]{\textbf{\thepage}}     \fancyhead[L]{\small\sffamily \nouppercase{\leftmark}}     \renewcommand{\headrulewidth}{0.4pt}      \renewcommand{\footrulewidth}{0.4pt}               \usepackage{chngcntr}          \counterwithin*{equation}{section}               \newtheorem{tw}{Theorem}[section]          \renewcommand{\theorem}{\arabic{tw}}          \newtheorem{stw}[tw]{Stwierdzenie}     \newtheorem{fakt}[tw]{Fakt}     \newtheorem{lemat}[tw]{Lemat}          \theoremstyle{definition}     \newtheorem{df}[tw]{Definicja}     \newtheorem{ex}[tw]{Przykład}     \newtheorem{uw}[tw]{Uwaga}     \newtheorem{at}[tw]{Wniosek}          \begin{document}     \end{document}


title: Latex \kbordermatrix with row labels on the right side

text: I'm needing to create a matrix enclosed with brackets `[]`, not parentheses `()`, with row labels on right side. Is this possible using `\kbordermatrix`? For instance, in the following:               \kbordermatrix{\mbox{}& C_1 & C_2& C_3\\     R_1&1&2&7\\     R_2&2&1&8     }      I would like the labels `R_1` and `R_2` to be on the right side of the matrix not the left.


title: Hyperref link placement: alignment to left page border and top of page

text: (a) Is is possible to have certain `hyperref`-hyperlinks (such as those to sections and also (when using `memoir`) to the table of contents, lists of figures and tables, and bibliography) point to the very left border of the page, not to the interior? Note that I have already tried the `hypcap` package, which positions figure and table links to the left edge of the text (just where the left margin ends) but not to the left page border. (For reading text, it is good if the text starts not exactly at the edge of one's viewing window but a tad into the window's border.) Also, `hypcap` doesn't deal with the table of contents, the lists of figures/tables, and the bibliography. (b) If, in addition, one could make hyperlinks point not only to the left page border but also to the top left corner of the respective page, that would be a useful option. Is that possible? If people would like starter code for this, here is some I've slightly adapted for another, related question:               \documentclass{memoir}       % using the memoir class here is necessary       % for all the desired hyperlinks to be created     \usepackage{hyperref}     \usepackage[all]{hypcap} % hypcap doesn't help here          \begin{document}          \tableofcontents          \section{A section}     This is the only section.          \listoftables     \listoffigures          \begin{thebibliography}{9}     \end{thebibliography}          \end{document}      Note: I am aware of the `hypcap` package but not sure whether/how it can be used to address this.


title: Entering text in the margins in enumerate environment

text: I currently trying to create a template that I could use for tests, and one thing I've always liked is when the possible points a question was worth was listed right next to the question itself. In the past, the way I've done this is to forego the `enumerate` package, and just manually type numbers in, such as:                $(+5)$ 2.  Let $U_0 = 9$ and let your common ratio be $\frac{1}{2}$. Find an explicit formula for the sequence and use this formula to find the tenth term of the sequence. Round your answer to the nearest thousandth.  \vspace{2in}      But for a template, it'd be nice to take advantage of the numbering the `enumerate` environment provides. So far, I have out put that looks like ![enter image description here](http://i.stack.imgur.com/QavZk.png) which is 99% there, if only I could figure out how to display the point value of a question. If it's a lot of work, I figure I can always just list the point value for a particular question at the end, instead of in the margin, but I figured I would see if anyone have any ideas.


title: Instant preview color in LyX

text: I'm using the instant preview feature in LyX, which as I understand is based on a LaTeX package of the same name. As I have LyX configured with a dark background - **Is there anyway to configure the instant preview to output a different color (say white)?**       **Edit:** It appears that LyX is using `dvipng` through `preview.sty` to generate the output, which does have a color option. If I knew where `dvipng` was being called from, perhaps I could add the color flag, but I can't seem to find it.


title: Problem Scaling Logarithmic function PSTricks

text: I'm trying to plot a function, but with the x-axis logarithmic. I use `PSTricks` and the package `pstricks-add`with the algebraic option, to write my function litterally. My function to be plotted is : ![Function to be plotted](http://i.stack.imgur.com/T7lqc.png) I want to have the X-axis logarithmic, from 10^-1 to 10^2... But I can't figure how to do it... Here's what I tried...               \psset{xunit=2,yunit=6, algebraic}     \begin{pspicture}[showgrid=false](0,0)(2,1)        \psaxes[xlogBase=10, comma,subticks=5,                 arrowscale=1.5]{->}(3,0.8)[Voltage (V),-90][Yield (\%),90]        \psplot[linecolor=red]{0.01}{2}{(x/(1+(1+x^2)^0.5))^2}     \end{pspicture}      That generates this : ![The Code](http://i.stack.imgur.com/XEiAh.png) What I want to have is this : ![My Objectif](http://i.stack.imgur.com/aZw2O.png) Does I have to adapt the function so that it fits the non-logarithmic grid once plotted ? I don't understand the principe of plotting a log function in a non-log grid... If you could also explain me that it would be great.


title: how to add list of collaboration in the title block of fancytikzposter?

text: I am preparing my poster for the first time using Latex. I found the tikZ poster sources made by Elena Botoeva, very easy, quick and beautiful. Since my Latex knowledge is poor, I do not know how to make some simple changes in the original source code. **My Goal:** I would like to replace the section of "Institute" which is right after the author name and instead use there "Representing the collaboration of:" and then put two more text column where I can put list of all the institute. For example see my old poster here. **Edit:** Thanks for the reply to my question. I made a little search and managed to do multicolumn in the section "\institute" as following:                   \institute{         \begin{multicols}{2}[\textbf{Representing the collaboration of:}]         Institute 1 \\         Institute 2 \\         Institute 3\\          \columnbreak         Institute 4\\         Institute 5\\         Institute 6         \end{multicols}         }


title: how to include tikz figure in beamer

text: While copy-pasting the following code from my article to one of the frames in my beamer presentation (along with all the packages), I get 11 errors that are mostly "undefined control sequence" and "missing number, treated as zero". Could you explain what is wrong and what additional packages I may have to include in the preamble?               \documentclass{beamer}     \usetheme{Warsaw}     \title{HH Decisions}     \author{Abhimanyu Arora}     \institute{Doctoral workshop}     \date{}     \usepackage{amsmath}     \usepackage{tikz}     \usepackage{comment}     \usepackage{graphicx}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{pgfplots}     \usepackage[capposition=top]{floatrow}     \pgfplotsset{compat=newest}     \usetikzlibrary{pgfplots.groupplots}     \usetikzlibrary{positioning}     \newtheorem{proposition}[theorem]{Proposition}          \begin{document}          \begin{frame}         \titlepage     \end{frame}          \begin{frame}{Results (contd.)}          \begin{figure}     \centering     \begin{tikzpicture}     \begin{axis}[     title=Share of expenditure,     xlabel={$z$},     ylabel={$S(z)$},     ]     \addplot [blue,domain=0:10]{(2*(0.45+x*0.55))/(2*(0.45+x*0.55)+0.55+x*0.45)};     \addplot [red,domain=0:10]{(2*(0.1+x*0.9))/(2*(0.1+x*0.9)+0.9+x*0.1)};     \legend{Case 1, Case 2}     \end{axis}     \end{tikzpicture}     \floatfoot{Case 1:$\alpha_W=\beta_H=0.55=1-\alpha_H=1-\beta_W$, Case 2:$\alpha_W=\beta_H=0.9=1-\alpha_H=1-\beta_W$}     \label{fig:share}     \end{figure}          \end{frame}               \end{document}


title: color block of text without repeatedly using /textcolor

text: I want to color the answers into blue however my current solution is not really viable as each line needs to be colored blue individually due to my use of `\par\bigskip` messes up `\textcolor` if its in the command ie:               \textcolor{blue}{$ =\frac{6}{3}$} \par\bigskip          $ = 2$ }      returns errors, (I don't even think this is the most efficient way to achieve what i want either but its the only way I can think of) Here is my source:               \documentclass{article}     \usepackage[margin=10pt, paperwidth=992pt, paperheight=1450pt]{geometry}     \usepackage[fleqn]{amsmath}     \usepackage{multicol}     \usepackage[shortlabels]{enumitem}     \usepackage[dvipsnames]{xcolor}     \usepackage{stix}     \begin{document}     \LARGE     \begin{enumerate}[\color{MidnightBlue} 1.]     \everymath{\displaystyle}     \item Simplify the following:     \begin{multicols}{3}     \begin{enumerate}[\color{MidnightBlue} (a),labelsep=5mm,itemsep=0.5\baselineskip,leftmargin=*]         \item $ \frac{2}{3} + \frac{4}{3}$ \par\bigskip         \textcolor{blue}{$ =\frac{6}{3}$} \par\bigskip         \textcolor{blue}{ $ = 2$ }                   \item  $ \frac{1}{4} + \frac{1}{2}$ \par\bigskip         \textcolor{blue}{$ =\frac{1}{4} + \frac{2}{4}$ }\par\bigskip         \textcolor{blue}{$ =\frac{3}{4}$}              \item $ \frac{4}{3} + \frac{2}{5}$ \par\bigskip         \textcolor{blue}{ $ =\frac{20}{15} + \frac{6}{15}$ }\par\bigskip         \textcolor{blue}{ $ =\frac{26}{15}$}              \item $ \frac{2}{3} + \frac{1}{4}$ \par\bigskip         $ =\frac{8}{12} + \frac{3}{12}$ \par\bigskip         $ =\frac{11}{12}$              \item $ \frac{4}{5} + \frac{3}{2}$ \par\bigskip         $ =\frac{8}{10} + \frac{15}{10}$ \par\bigskip         $ =\frac{23}{10}$              \item $ \frac{5}{6} + \frac{2}{3}$ \par\bigskip         $ =\frac{5}{6} + \frac{4}{6}$ \par\bigskip         $ =\frac{9}{6}$     \end{enumerate}     \end{multicols}     \end{enumerate}     \end{document}      and the output: ![enter image description here](http://i.stack.imgur.com/PtoY5.png)


title: I need some help debugging this LaTeX macro - TeX "skips past" a bunch of code?

text: I'm trying to test and debug a collection of LaTeX macros that I've been working on, and I have run into a problem that has me totally stumped. Essentially, the problem is that at a certain point in a nested macro, TeX seems to stop executing instructions entirely and/or to "jump" to (what should be) a much later point in the code. The point at which it stops doing what it's supposed to appears to be a `\foreach` command; the point at which it resumes is just after a conditional block ends. (The `\foreach` is inside a macro which is invoked from within the conditional block.) Compilation later fails because a macro is not defined which was meant to be defined by the apparently "skipped" code. My best guess would have been that something is being swallowed as an argument by a macro carelessly called with the wrong number of arguments, but a) I can't find such a macro invocation and b) I would expect the symptoms of this to be more along the lines of strange error messages than large blocks of code simply being skipped over. I'm at a loss. I'm afraid the macro collection is a fairly large file, but only a relatively small amount of it is directly relevant to the problem. You can download it here. I removed most of the code that is not required for the macro that is being tested (the original file has a little over twice as many lines). I really don't know what is causing this behaviour so I am unwilling to remove any more in case I change what's happening behind the scenes without realising it. Save it as "polygons.tex" and create the following example LaTeX document in the same directory:               \documentclass{amsart}          \usepackage{tikz, xparse, xstring}     \usetikzlibrary{shapes}          \input{polygons.tex}          \begin{document}          \begin{tikzpicture}        \roundpolygonwithedgejoiners{10}{g1; *3; g1; 1}     \end{tikzpicture}          \end{document}      The argument `g1; *3; g1; 1` is intended to be valid input for that macro. In the course of macro execution it gets transformed into `g1,*3,g1,1`; this is then used as the value list for the offending `\foreach` command. It doesn't appear to make a difference if you change it to other valid input, or even to invalid input. The macro collection file has had a number of `\message` and `\show` commands added as I have tried to keep track of what is going on in TeX's execution. These commands are all unindented, so as to stand out from surrounding code. When you run LaTeX on the file, you will get prompted due to `\show` commands 4 times before the error message appears. The first time is due to the `\show\ejlstc@oldlist` on line 964. This was added so that I could verify that the `\foreach` value list was what I thought it should be (it is). The other three times are due to the `\show` command inside the toy `\foreach` on line 966. (I added this to try to find out whether `\foreach` had somehow been redefined in some bizarre way at that point in execution. It hadn't.) Of note is the fact that several `\message` commands seemingly get ignored completely by TeX. The first is `\message{Inside "foreach"}` on line 969. After that point, there are four more `\message` invocations which by my reckoning should take effect, but don't (on lines 1014, 1240, 1244, and 1293). The next `\message` command to be executed is instead `\message{Outside of conditional}` on line 1297. If you want to see the log file I got from running LaTeX on this, you can get it here.


title: Pgfplots dynamic opacity

text: I'm trying to add multiple plots on one axis and I would like them to have different opacities (e.g. 0.1, 0.2 etc.). I have tried with different options:   1. The only thing that actually compiles is foreach with count variable. What it doesn't do is change the opacity of the plots:              \documentclass[a4paper,12pt]{article}     \usepackage{pgfplots}     \begin{document}         \begin{tikzpicture}             \begin{axis}[width=0.8\textwidth]                 \foreach [count=\op] \x in{1,...,10} {                 \addplot[thick, color=blue, opacity={0.1*\op}] table[x index = 0, y index = \op, col sep=tab]{data.csv};                 }             \end{axis}         \end{tikzpicture}     \end{document}        2. pgfmathsetmacro, doesn't compile:              \documentclass[a4paper,12pt]{article}     \usepackage{pgfplots}     \begin{document}         \begin{tikzpicture}             \begin{axis}[width=0.8\textwidth]                 \foreach \x in{1,...,10} {                 \pgfmathsetmacro\op{\x*0.1}                 \addplot[thick, color=blue, opacity={\op}] table[x index = 0, y index = \x, col sep=tab]{data.csv};                 }             \end{axis}         \end{tikzpicture}     \end{document}        3. Using evaluate, doesn't compile:              \documentclass[a4paper,12pt]{article}     \usepackage{pgfplots}     \begin{document}         \begin{tikzpicture}             \begin{axis}[width=0.8\textwidth]                   \foreach [evaluate=\x as \op using {0.1*\x}] \x in{1,...,10} {                   \addplot[thick, color=blue, opacity={\op}] table[x index = 0, y index = \x, col sep=tab]{data.csv};                   }             \end{axis}         \end{tikzpicture}     \end{document}      I am sure there is a possibility it's just that I have not had too much experience with pgfplots yet and am probably missing something obvious. Data file can be accessed here: data.csv


title: How to force single word spacing in section headings for two-column articles

text: I do not know how to force a single space between the words "Discussion" and "and" in the section heading below.               \documentclass[12pt,twocolumn]{article}     \begin{document}     \hyphenation{Conclusion}     \section{Discussion and Conclusion}     \end{document}      Thanks.


title: Changing author name in bibtex

text: I have to include a technical document in my citations. The document doesn't have a specific author, but is rather published by an Institute. The sample bibtex entry is given below:               @manual{river2009,     author = {Alternate Hydo Energy Centre},     institution = {Some Institute},      month = {August},      organization = {Some Organization},      publisher = {Some Directorate Ministry, Some Government},      title = {{Status Paper On Environment}},     year = {2009}     }      When I compile the document the author entry is automatically changed to following:               @manual{river2009,     author = {Energy, Centre Alternate Hydro},     institution = {Some Insitute},     month = {August},     organization = {Some Organization},     publisher = {Some Directorate Ministry, Some Government},     title = {{Status Paper On Environment}},     year = {2009}          }      And in the final citation the entry comes under the name of _Energy, C. A. H_ instead of _Alternate Hydo Energy Centre_. Is there anyway in which I can preserve the author name as it is, without the entry being juxtaposed and abbreviated? I am using `\bibliographystyle{kluwer}` .


title: Where do I find out how a command/environment is defined?

text: Say I want to redefine the `itemize` environment, or make a modified version of it. I want to know how it is currently defined. Where do I find this information? If it's some particular package command, I can just look at the `.sty` file for that package, but if it's something more basic, I don't know where to look... Is there a reference manual of where all this stuff is explained? Or is there a file in the depths of my texmf tree I should poke around in?


title: Macro find tool

text: Does there exist a tool to find in what package a given macro is defined? I have to work with LaTeX (not XeLaTeX, for legacy reasons). I'm dealing with very old code, which I have to get compiled. So, if I encounter an unknown command, I have to include the corresponding package. Currently, I just google and hope to find the right package. Does there exist something like Hoogle (which is a search engine for Haskell), but for LaTeX?


title: Getting to a command definition

text: > **Possible Duplicate:**   >  Where do I find out how a command/environment is defined? Is there a more or less general and (hopefully) convenient way to learn what is a command encountered in a source file? Let's take a few lines right at the beginning of book.cls:               \NeedsTeXFormat{LaTeX2e}[1995/12/01]     \ProvidesClass{book}               [2007/10/19 v1.4h               Standard LaTeX document class]     \newcommand\@ptsize{}     \newif\if@restonecol     \newif\if@titlepage     \@titlepagetrue     \newif\if@openright     \newif\if@mainmatter \@mainmattertrue     \if@compatibility\else     \DeclareOption{a4paper}      The subject question applies literally to every line:   * What is `\ProvidesClass` and how to look it up?   * What is `\newif` and how to look it up?   * What is `\DeclareOption` and how to look it up? I'd like to know where exactly the better known `\newcommand` is declared, for that matter.


title: Is there a way I can get the LaTeX environment?

text: > **Possible Duplicate:**   >  Where do I find out how a command/environment is defined? Is there a way I can get LaTeX environment for a given set-up? For example I want to get the value of some parameter (such as `\pagewidth`), or a definition of some macros (such as `\@partend`). Can I make LaTeX print that information -- of do I have to go down to the sty files for that?


title: PSTricks: charpath on a curve (like textpath)

text: I am interested in drawing a specially rendered text on a curve. The LaTeX package pst-text provides a function to draw text on a curve (`pstextpath`) and a function to specially render text (`pscharpath`): **MWE for what I want to combine:**                   \documentclass{scrartcl}         \usepackage{pstricks}         \usepackage{pst-plot}         \usepackage{pst-text}         \usepackage[final]{pst-pdf}              \begin{document}           \psset{unit=.5cm,plotpoints=200}           \begin{pspicture}(-5,-2)(5,1)             % Specially Rendered Text:             \rput(0,-1)             {                   \DeclareFixedFont{\RM}{T1}{ptm}{b}{n}{10pt}                                                              \pscharpath[linecolor=orange,fillstyle=solid,fillcolor=black,linewidth=0.3pt]{\RM Specially Rendered Text}             }                  % Text on a Curve:             \pstextpath[c](0,0)             {               \pscustom[linestyle=none]               {                 \psplot{-3}{3}{0.5 x x mul 0.1 mul sub}               }             }             {               \DeclareFixedFont{\RM}{T1}{ptm}{s}{n}{10pt}               \RM Text on a Curve             }                                  \end{pspicture}         \end{document}      ![Result](http://i.stack.imgur.com/BVWgx.png) Summary: How to write specially rendered text on a curve?


title: Wrong linear regression computing

text: I've just started to use pgfplot and I'm actually trying to get the equation from a plot, with the linear regression. However, I'm working in a loglog plot, and the resulting regression equation is wrong (excel is right). I'm wondering how to correct it, it should be : 0.734*x + 7e-10, not 1*x + 0.42 Thanks for your help ! that is the japan.dat               Q P1 P2     1.00E-07 3.01E-07 7.38E-08     1.00E-06 2.95E-06 7.35e-07     1.00E-05 2.95E-05 7.34E-06      and the .tex :               \documentclass[12pt]{article} % this must go first, there are many different classes     \usepackage{pgfplots}     \usepackage{pgfplotstable}          \begin{document}          \begin{tikzpicture}[scale=1]     \begin{loglogaxis}[     height=10cm,     width=10cm,     title=Required pumping speed,     xlabel=Q (mbar.L.s$^{-1}$),     ylabel=P (mbar),     ymin=1e-8, ymax=1e-3,     minor y tick num=1,     legend entries={P$_1$(50 L.s$^{-1}$),P$_2$(50 L.s$^{-1}$),$\pgfmathprintnumber{\pgfplotstableregressiona} \cdot x     \pgfmathprintnumber[print sign]{\pgfplotstableregressionb}$}]     \addplot[color=red,dashed]         table[x index=0,y index=1] {japan.dat};     \addplot[color=red]         table[x index=0,y index=2] {japan.dat};          \addplot table[     no marks,     red,     x index=0,y index=2,     y={create col/linear regression={y=P2}}]     {japan.dat};     \end{loglogaxis}          \end{tikzpicture}          \end{document}


title: A large amount of text below the sum or product sign

text: I want some advice about how to format it better if I have to write a long text below a `$\sum$` or a `$\prod$` sign. Basically I want to explain the restriction over which the sum or the product is being taken. For example how can I improve the looks of these equations,               $N_i (\rho) = \sum _ {B \in \rho s.t n_{\delta_j}(B) = 0        \forall j \neq i} n_{\delta_i} (B)$          $\sum _{ \rho s.t N_i(\rho) = a_i and M_i(\rho) = b_i}        \prod _{B \in \rho} \langle \prod_{i=1}^{n} \delta_i ^{n_{\delta_i}(B)}        y_i ^{n_{y_i}(B)} \rangle_c$


title: \framebox as \labelenumi

text: for a questionaire where possible answers appear as enumerate entries, I'm trying to have one document with plain squares and one where the squares are filled with either W or F. I tried               \renewcommand{\labelenumi}{{\framebox[1.5em][c]{\phantom{W}}} \hspace{2ex} \alph{enumi})}      but it doesn't work. It's kinda the other way around of this problem. EDIT: Heres the LWE as asked for: ` \documentclass[a4paper,12pt]{article} % european article %Neue Deutsche Rechtschreibung und Silbentrennung \usepackage[ngerman]{babel} %Auswahl der deutschen Varianten aller Befehle, z.B. \blindtext \selectlanguage{ngerman} % Schreiben von Umlauten auf einem LINUX-System \usepackage[utf8]{inputenc} % Math-Paket der American Mathematical Society \usepackage{amsmath,amscd,amssymb,amsbsy,amsthm,amsxtra} % Geometrie und vor allem margins des Papier angleichen \usepackage[margin=2cm]{geometry} % Anzeige Seite n von m \usepackage{lastpage} % Anpassung von Kopf- und Fußzeile \usepackage{fancyhdr} % Schriftgröße variieren \usepackage{txfonts} % Änderung der Titel- Formatierung \usepackage{titlesec} % Änderung des Einzugs der Aufzählung \usepackage{enumitem}               % Linksbündig     \raggedright     % Horizontale Einrückung zu Beginn neuer Absätze     \setlength{\parindent}{0cm}     % Vertikaler Abstand zwischen Absätzen     \setlength{\parskip}{1ex}     % Formattierung der section-Titel auf die Aufgaben     \renewcommand{\thesection}{\textbf{Aufgabe~\arabic{section}}}     \titleformat*{\section}{\normalsize}     \titlespacing*{\section}{0pt}{1ex}{0ex}     % Änderung der enumerate-Labels auf kleine Buchstaben          \newcommand{\Witem}{%     \refstepcounter{enumi}% Step enumerate counter     \item[{\framebox[1.5em]{W}\hspace{2ex}\alph{enumi}})]}     \newcommand{\Fitem}{%     \refstepcounter{enumi}% Step enumerate counter     \item[{\framebox[1.5em]{F}\hspace{2ex}\alph{enumi}})]}     \newcommand{\Bitem}{%     \refstepcounter{enumi}% Step enumerate counter     \item[{\framebox[1.5em]{\phantom{W}}\hspace{2ex}\alph{enumi}})]}          \renewcommand{\labelenumi}{{\framebox[1.5em][c]{\phantom{W}}} \hspace{2ex}     \alph{enumi})}     \setlist[enumerate,1]{leftmargin=2cm}     %~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~     \begin{document}          % ~=~=~ Frage 1 ~=~=~     \section{Abbildungen, Rang, Injektivität/Surjektivität/Bijektivität}     Sei $A=\begin{pmatrix}     1 & 2 & 3 \\     2 & 4 & 6     \end{pmatrix}$.\quad Zeige oder widerlege für $A$ folgende Aussagen\\          \begin{enumerate}     \item $\text{rang}(A)=2$     \Witem Die durch $A$ beschriebene lineare Abbildung ist injektiv.     \item Die durch $A$ beschriebene lineare Abbildung ist surjektiv.     \item Die durch $A$ beschriebene lineare Abbildung ist bijektiv.     \end{enumerate}          % ...          \end{document}      `


title: How to include arrows in a .tikz file, which is generated with matlab2tikz?

text: I made a plot with matlab. Then I generated a `.tikz` file with matlab2tikz. Now i want to insert arrows in the `.tikz` file and also write something left of the arrow. I can make arrows and text in the plot, but matlab2tikz don't know the textbox. So this doesn't work. This is my `.tikz` file:               % Copyright (c) 2008--2012, Nico SchlÃ¶mer <nico.schloemer@gmail.com>     % All rights reserved.     %      % The latest updates can be retrieved from     %   http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz     % where you can also make suggestions and rate matlab2tikz.     %      %      %      \begin{tikzpicture}          \begin{axis}[%     view={0}{90},     width=\figurewidth,     height=\figureheight,     scale only axis,     xmin=257.75, xmax=260.4,     xlabel={[t] = s},     ymin=67.3, ymax=70.5,     ylabel={[v] = km/h},     axis lines=left,     legend style={at={(0.03,0.97)},anchor=north west,nodes=right}]     \addplot [     color=blue,     solid,     line width=1.5pt     ]     coordinates{      (257.74,67.3076923076185)(257.75,67.323076923002)(257.76,67.3384615383854)(257.77,67.3538461537689)(257.78,67.3692307691524)(257.79,67.384615384536)(257.8,67.3999999999195)(257.81,67.4153846153031)(257.82,67.4462107691739)(257.83,67.4617649792577)(257.84,67.4774300990224)(257.85,67.4932043665521)(257.86,67.5090860199309)(257.87,67.5250732972429)(257.88,67.5411644365725)(257.89,67.5573576760036)(257.9,67.5736512536205)(257.91,67.5900434075073)(257.92,67.6065323757482)(257.93,67.6231163964273)(257.94,67.6397937076289)(257.95,67.656562547437)(257.96,67.6734211539357)(257.97,67.6903677652094)(257.98,67.7074006193421)(257.99,67.724517954418)(258,67.7417180085212)(258.01,67.7589990197359)(258.02,67.7763592261463)(258.03,67.7937968658364)(258.04,67.8113101768906)(258.05,67.8288973973929)(258.06,67.8465567654274)(258.07,67.8642865190784)(258.08,67.88208489643)(258.09,67.8999501355664)(258.1,67.9178804745717)(258.11,67.9358741515301)(258.12,67.9539294045257)(258.13,67.9720444716427)(258.14,67.9902175909652)(258.15,68.0084470005775)(258.16,68.0267309385636)(258.17,68.0450676430077)(258.18,68.063455351994)(258.19,68.0818923036067)(258.2,68.1003767359298)(258.21,68.1189068870476)(258.22,68.1374809950442)(258.23,68.1560972980038)(258.24,68.1747540340105)(258.25,68.1934494411485)(258.26,68.2121817575019)(258.27,68.2309492211549)(258.28,68.2497500701917)(258.29,68.2685825426964)(258.3,68.2874448767532)(258.31,68.3063353104462)(258.32,68.3252520818596)(258.33,68.3441934290775)(258.34,68.3631575901841)(258.35,68.3821428032636)(258.36,68.4011473064001)(258.37,68.4201693376778)(258.38,68.4392071351808)(258.39,68.4582589369933)(258.4,68.4773229811995)(258.41,68.4963975058835)(258.42,68.5154807491294)(258.43,68.5345709490215)(258.44,68.5536663436438)(258.45,68.5727651710806)(258.46,68.5918656694159)(258.47,68.6109660767341)(258.48,68.6300646311191)(258.49,68.6491595706552)(258.5,68.6682491334265)(258.51,68.6873315575172)(258.52,68.7064050810115)(258.53,68.7254679419934)(258.54,68.7445183785472)(258.55,68.763554628757)(258.56,68.782574930707)(258.57,68.8015775224814)(258.58,68.8205606421642)(258.59,68.8395225278396)(258.6,68.8584614175919)(258.61,68.8773755495051)(258.62,68.8962631616634)(258.63,68.9151224921511)(258.64,68.9339517790521)(258.65,68.9527492604507)(258.66,68.9715131744311)(258.67,68.9902417590774)(258.68,69.0089332524738)(258.69,69.0275858927044)(258.7,69.0461979178533)(258.71,69.0647675660048)(258.72,69.083293075243)(258.73,69.1017726836521)(258.74,69.1202046293161)(258.75,69.1385871503194)(258.76,69.1569184847459)(258.77,69.17519687068)(258.78,69.1934205462056)(258.79,69.2115877494071)(258.8,69.2296967183686)(258.81,69.2477456911741)(258.82,69.2657329059079)(258.83,69.2836566006542)(258.84,69.301515013497)(258.85,69.3193063825206)(258.86,69.3370289458091)(258.87,69.3546809414467)(258.88,69.3722606075174)(258.89,69.3897661821056)(258.9,69.4071959032953)(258.91,69.4245480091707)(258.92,69.4418207378159)(258.93,69.4590123273151)(258.94,69.4761210157525)(258.95,69.4931450412122)(258.96,69.5100826417784)(258.97,69.5269320555353)(258.98,69.5436915205669)(258.99,69.5603592749575)(259,69.5769335567912)(259.01,69.5934126041521)(259.02,69.6097946551245)(259.03,69.6260779477925)(259.04,69.6422607202402)(259.05,69.6583412105518)(259.06,69.6743176568115)(259.07,69.6901882971034)(259.08,69.7059513695117)(259.09,69.7216051121205)(259.1,69.7371477630139)(259.11,69.7525775602763)(259.12,69.7678927419916)(259.13,69.7830915462441)(259.14,69.7981722111179)(259.15,69.8131329746972)(259.16,69.8279720750661)(259.17,69.8426877503088)(259.18,69.8572782385095)(259.19,69.8717417777523)(259.2,69.8860766061213)(259.21,69.9002809617008)(259.22,69.9143530825748)(259.23,69.9282912068276)(259.24,69.9420935725433)(259.25,69.955758417806)(259.26,69.9692839806999)(259.27,69.9826684993092)(259.28,69.9959102117181)(259.29,70.0090073560106)(259.3,70.021958170271)(259.31,70.0347608925833)(259.32,70.0474137610318)(259.33,70.0599150137007)(259.34,70.072262888674)(259.35,70.0844556240359)(259.36,70.0964914578707)(259.37,70.1083686282623)(259.38,70.1200853732951)(259.39,70.1316399310532)(259.4,70.1430305396206)(259.41,70.1542554370817)(259.42,70.1653128615204)(259.43,70.1762010510211)(259.44,70.1869182436678)(259.45,70.1974626775447)(259.46,70.207832590736)(259.47,70.2180262213258)(259.48,70.2280418073983)(259.49,70.2378775870376)(259.5,70.247531798328)(259.51,70.2570026793534)(259.52,70.2662884681982)(259.53,70.2753874029465)(259.54,70.2842977216824)(259.55,70.2930176624901)(259.56,70.3015454634537)(259.57,70.3098793626574)(259.58,70.3180175981854)(259.59,70.3259584081218)(259.6,70.3337000305507)(259.61,70.3412407035564)(259.62,70.348578665223)(259.63,70.3557121536346)(259.64,70.3626394068754)(259.65,70.3693586630296)(259.66,70.3758681601814)(259.67,70.3821661364148)(259.68,70.388250829814)(259.69,70.3941204784632)(259.7,70.3997733204466)(259.71,70.4052075938482)(259.72,70.4104215367524)(259.73,70.4154133872431)(259.74,70.4201813834047)(259.75,70.4247237633212)(259.76,70.4290387650768)(259.77,70.4331246267556)(259.78,70.4369795864419)(259.79,70.4406018822197)(259.8,70.4439897521732)(259.81,70.4471414343867)(259.82,69.8513234785254)(259.83,69.8542387044367)(259.84,69.8570967690556)(259.85,69.8598987931917)(259.86,69.8626458756782)(259.87,69.8653390938021)(259.88,69.8679795037276)(259.89,69.8705681409094)(259.9,69.8731060204994)(259.91,69.8755941377445)(259.92,69.878033468377)(259.93,69.880424968997)(259.94,69.8827695774481)(259.95,69.8850682131844)(259.96,69.8873217776318)(259.97,69.8895311545409)(259.98,69.8916972103342)(259.99,69.8938207944453)(260,69.8959027396523)(260.01,69.8979438624042)(260.02,69.8999449631414)(260.03,69.9019068266092)(260.04,69.9038302221659)(260.05,69.9057159040842)(260.06,69.9075646118472)(260.07,69.9093770704385)(260.08,69.9111539906259)(260.09,69.9128960692411)(260.1,69.9146039894521)(260.11,69.9162784210315)(260.12,69.9179200206191)(260.13,69.9195294319795)(260.14,69.9211072862544)(260.15,69.9226542022102)(260.16,69.9241707864806)(260.17,69.9256576338045)(260.18,69.9271153272593)(260.19,69.9285444384895)(260.2,69.9299455279309)(260.21,69.9313191450303)(260.22,69.932665828461)(260.23,69.9339861063344)(260.24,69.9352804964062)(260.25,69.9365495062806)(260.26,69.9377936336084)(260.27,69.9390133662828)(260.28,69.9402091826302)(260.29,69.9413815515982)(260.3,69.9425309329394)(260.31,69.9436577773916)(260.32,69.9447625268545)(260.33,69.9458456145632)(260.34,69.9469074652581)(260.35,69.947948495351)(260.36,69.9489691130893)(260.37,69.949969718715)(260.38,69.9509507046225)(260.39,69.9519124555123)      };          \addlegendentry{$\text{v}_{\text{ang}}$};          \addplot [     color=green!50!black,     solid,     line width=1.5pt     ]     coordinates{      (257.74,67.3076923076185)(257.75,67.323076923002)(257.76,67.3384615383854)(257.77,67.3538461537689)(257.78,67.3692307691524)(257.79,67.384615384536)(257.8,67.3999999999195)(257.81,67.4153846153031)(257.82,67.4307692306867)(257.83,67.4461538460703)(257.84,67.4615384614539)(257.85,67.4769230768376)(257.86,67.4923076922213)(257.87,67.507692307605)(257.88,67.5230769229887)(257.89,67.5384615383724)(257.9,67.5538461537561)(257.91,67.5692307691399)(257.92,67.5846153845237)(257.93,67.5999999999075)(257.94,67.6153846152912)(257.95,67.6307692306751)(257.96,67.6461538460589)(257.97,67.6615384614428)(257.98,67.6769230768266)(257.99,67.6923076922105)(258,67.7076923075944)(258.01,67.7230769229783)(258.02,67.7384615383623)(258.03,67.7538461537462)(258.04,67.7692307691302)(258.05,67.7846153845141)(258.06,67.7999999998981)(258.07,67.8153846152821)(258.08,67.8307692306661)(258.09,67.8461538460501)(258.1,67.8615384614341)(258.11,67.8769230768181)(258.12,67.8923076922022)(258.13,67.9076923075862)(258.14,67.9230769229703)(258.15,67.9384615383544)(258.16,67.9538461537385)(258.17,67.9692307691226)(258.18,67.9846153845067)(258.19,67.9999999998908)(258.2,68.0153846152749)(258.21,68.030769230659)(258.22,68.0461538460432)(258.23,68.0615384614274)(258.24,68.0769230768115)(258.25,68.0923076921957)(258.26,68.1076923075799)(258.27,68.1230769229641)(258.28,68.1384615383483)(258.29,68.1538461537325)(258.3,68.1692307691167)(258.31,68.1846153845009)(258.32,68.1999999998851)(258.33,68.2153846152694)(258.34,68.2307692306536)(258.35,68.2461538460379)(258.36,68.2615384614221)(258.37,68.2769230768064)(258.38,68.2923076921906)(258.39,68.3076923075749)(258.4,68.3230769229592)(258.41,68.3384615383435)(258.42,68.3538461537278)(258.43,68.3692307691121)(258.44,68.3846153844964)(258.45,68.3999999998807)(258.46,68.415384615265)(258.47,68.4307692306493)(258.48,68.4461538460337)(258.49,68.461538461418)(258.5,68.4769230768023)(258.51,68.4923076921867)(258.52,68.507692307571)(258.53,68.5230769229554)(258.54,68.5384615383397)(258.55,68.5538461537241)(258.56,68.5692307691085)(258.57,68.5846153844928)(258.58,68.5999999998772)(258.59,68.6153846152616)(258.6,68.630769230646)(258.61,68.6461538460304)(258.62,68.6615384614148)(258.63,68.6769230767992)(258.64,68.6923076921836)(258.65,68.707692307568)(258.66,68.7230769229524)(258.67,68.7384615383369)(258.68,68.7538461537213)(258.69,68.7692307691057)(258.7,68.7846153844901)(258.71,68.7999999998745)(258.72,68.8153846152589)(258.73,68.8307692306434)(258.74,68.8461538460278)(258.75,68.8615384614123)(258.76,68.8769230767967)(258.77,68.8923076921812)(258.78,68.9076923075656)(258.79,68.9230769229501)(258.8,68.9384615383345)(258.81,68.953846153719)(258.82,68.9692307691035)(258.83,68.9846153844879)(258.84,68.9999999998724)(258.85,69.0153846152568)(258.86,69.0307692306413)(258.87,69.0461538460258)(258.88,69.0615384614103)(258.89,69.0769230767948)(258.9,69.0923076921792)(258.91,69.1076923075637)(258.92,69.1230769229482)(258.93,69.1384615383327)(258.94,69.1538461537172)(258.95,69.1692307691017)(258.96,69.1846153844862)(258.97,69.1999999998707)(258.98,69.2153846152552)(258.99,69.2307692306397)(259,69.2458521869017)(259.01,69.2606393989232)(259.02,69.275136665611)(259.03,69.2893496721676)(259.04,69.3032839923212)(259.05,69.316945090511)(259.06,69.3303383240304)(259.07,69.3434689451278)(259.08,69.3563421030665)(259.09,69.3689628461436)(259.1,69.3813361236702)(259.11,69.3934667879119)(259.12,69.4053595959921)(259.13,69.417019211757)(259.14,69.4284502076049)(259.15,69.4396570662793)(259.16,69.4506441826267)(259.17,69.4614158653203)(259.18,69.4719763385494)(259.19,69.4823297436758)(259.2,69.4924801408587)(259.21,69.5024315106457)(259.22,69.512187755535)(259.23,69.5217527015049)(259.24,69.5311300995146)(259.25,69.5403236269751)(259.26,69.5493368891913)(259.27,69.5581734207758)(259.28,69.5668366870351)(259.29,69.5753300853285)(259.3,69.5836569464005)(259.31,69.5918205356868)(259.32,69.5998240545949)(259.33,69.6076706417597)(259.34,69.6153633742742)(259.35,69.6229052688963)(259.36,69.6302992832316)(259.37,69.6375483168938)(259.38,69.6446552126409)(259.39,69.6516227574911)(259.4,69.6584536838148)(259.41,69.6651506704067)(259.42,69.671716343536)(259.43,69.6781532779764)(259.44,69.6844639980161)(259.45,69.6906509784472)(259.46,69.6967166455364)(259.47,69.7026633779769)(259.48,69.7084935078205)(259.49,69.7142093213926)(259.5,69.7198130601889)(259.51,69.7253069217538)(259.52,69.7306930605429)(259.53,69.7359735887676)(259.54,69.7411505772231)(259.55,69.7462260561011)(259.56,69.7512020157854)(259.57,69.7560804076327)(259.58,69.760863144738)(259.59,69.7655521026843)(259.6,69.7701491202787)(259.61,69.7746560002732)(259.62,69.7790745100718)(259.63,69.7834063824233)(259.64,69.7876533161013)(259.65,69.7918169765699)(259.66,69.7958989966371)(259.67,69.7999009770952)(259.68,69.8038244873483)(259.69,69.8076710660277)(259.7,69.8114422215958)(259.71,69.815139432937)(259.72,69.8187641499383)(259.73,69.8223177940571)(259.74,69.8258017588796)(259.75,69.8292174106662)(259.76,69.8325660888884)(259.77,69.8358491067534)(259.78,69.839067751719)(259.79,69.842223285999)(259.8,69.8453169470579)(259.81,69.8483499480959)(259.82,69.8513234785254)(259.83,69.8542387044367)(259.84,69.8570967690556)(259.85,69.8598987931917)(259.86,69.8626458756782)(259.87,69.8653390938021)(259.88,69.8679795037276)(259.89,69.8705681409094)(259.9,69.8731060204994)(259.91,69.8755941377445)(259.92,69.878033468377)(259.93,69.880424968997)(259.94,69.8827695774481)(259.95,69.8850682131844)(259.96,69.8873217776318)(259.97,69.8895311545409)(259.98,69.8916972103342)(259.99,69.8938207944453)(260,69.8959027396523)(260.01,69.8979438624042)(260.02,69.8999449631414)(260.03,69.9019068266092)(260.04,69.9038302221659)(260.05,69.9057159040842)(260.06,69.9075646118472)(260.07,69.9093770704385)(260.08,69.9111539906259)(260.09,69.9128960692411)(260.1,69.9146039894521)(260.11,69.9162784210315)(260.12,69.9179200206191)(260.13,69.9195294319795)(260.14,69.9211072862544)(260.15,69.9226542022102)(260.16,69.9241707864806)(260.17,69.9256576338045)(260.18,69.9271153272593)(260.19,69.9285444384895)(260.2,69.9299455279309)(260.21,69.9313191450303)(260.22,69.932665828461)(260.23,69.9339861063344)(260.24,69.9352804964062)(260.25,69.9365495062806)(260.26,69.9377936336084)(260.27,69.9390133662828)(260.28,69.9402091826302)(260.29,69.9413815515982)(260.3,69.9425309329394)(260.31,69.9436577773916)(260.32,69.9447625268545)(260.33,69.9458456145632)(260.34,69.9469074652581)(260.35,69.947948495351)(260.36,69.9489691130893)(260.37,69.949969718715)(260.38,69.9509507046225)(260.39,69.9519124555123)      };          \addlegendentry{$\text{v}_{\text{soll}}$};          \end{axis}     \end{tikzpicture}


title: Formatting and newcommand issues

text: Following from my problems from here - Formatting resume header! I wanted to make the code simpler by adding the tabular part under a method so I tried `\newcommand` Here is the code               \newcommand\headtitle[4]{     \begin{tabular}{p{\dimexpr\linewidth-2\tabcolsep}}     \textbf{#1} \\     \hline     {\bfseries #2, \hfill #3 \hfill #4} \\     \quad     \end{tabular}      Unfortunately after using this I am running into alignment issues- I dont want to over complex the code so I used it - Input for the above is --               \headtitle{Freelancer Work}{Author}{Linux Journal}{2011}      But if I use stuff after that - it appears like this ![enter image description here](http://i.stack.imgur.com/Gm77g.png) and i wanted an alignment like this - ![enter image description here](http://i.stack.imgur.com/PlHEU.png) Also I wanted to make it even simpler by seprating the `\hline` and the heading but removing the `\hline` too throws an error (from the original code) Any inputs will be good :) Edit - Complete code as of now ~               \documentclass[a4paper,10pt]{article}     \usepackage[margin=1in]{geometry}     \setlength{\parindent}{0pt}          %\newcommand\headone[1]{%     %  \begin{tabular}{@{}p{\linewidth}@{}}     % \textbf{#1} \\     % \hline     %\end{tabular}          \newcommand\headtitle[4]{%     \begin{tabular}{@{}p{\linewidth}@{}}     \textbf{#1} \\     \hline     {\bfseries #2 \hfill #3 \hfill #4} \\     %\mbox{}     \end{tabular}%     }          \renewcommand{\labelitemi}{\raise .5ex\hbox{\tiny$\bullet$}}               \begin{document}     \sffamily          % Top - Resume Header           {  \small  \begin{tabular}[c]{l}     \texttt{\#1212, Block xzxzx3} \\     \texttt{ABCD, XYX} \\     \texttt{US CAN (IL) 1212121}     \end{tabular}} \hfill %     {\LARGE\bfseries\begin{tabular}[c]{c}      SHASHWAT PANT     \end{tabular}}\hfill%     { \small \begin{tabular}[c]{r}      \texttt{(91) 1212122121}\\      \texttt{(91) 12333636 }\\      \texttt{@gmail.com}      \end{tabular}}           \vspace{.75 \baselineskip}           \headtitle{Author}{Linux Journal}{2011}      \quad Indepth Articles and Analysis      \begin {itemize}       \item Worked on an indepth  analysis on Secure boot, Intel's UEFI implementation, its       shortcommings and effect on Linux.      \item Worked on a comprehensive comparison of various Display Managers covering implementation, development and performance aspect of each.       \end{itemize}            \headtitle{Author}{Linux Journal}{2011}       \quad Indepth Articles and Analysis           \end{document}


title: How do I make custom float environments use the same numbering for captions.

text: I use a custom float environment that is basically used as a table environment that provides extra formatting. I would like this environment to use the same numbering as the regular table floats. Is there a way to do that? I have already changed the floatname to match Table by using the floatname command. Here is my initialization code:               \newfloat{newtable}{tbp}{lop}[chapter]     \floatname{newtable}{Table}      Regular tables numbering also span over chapters... do you have any ideas?


title: Write to log without wrapping

text: I'd like to to generate some metadata in the log file that I can copy to another application. But the log file is wrapped to 80 columns and I end up with newlines embedded in what I'm putting there. Is there a way around this? The two ways I know to write to the log file are `\message` and `\immediate\write17`. But both of these have the same effect. Is `\write17` a special filehandle that only writes wrapped text? My workaround so far is to write to the auxiliary file between `\iffalse`...`\fi`, but I know that's not what the aux file is for. I don't feel like writing this metadata to another file. Yes, I'm being stubborn, but TeX means you can usually get anything you want if you work hard enough. Can I do this? **Edit:** Here's something else that doesn't work. Open another filehandle with the same filename.               \newwrite\logfilenowrap     \immediate\openout\logfilenowrap=\jobname.log      Then `\immediate\write\logfilenowrap{long text}` will not wrap lines. But it lops off everything that was in the logfile before this point (of course it does. Opening a file handle usually puts the pointer at the front). **Edit 2:** Thanks for all the replies. Consensus is that this is "probably" not possible. I'll go the route of writing metadata to a separate text file.