title: \displaystyle and \mathbf with cmbright font

text: I would like to use bold symbols in superscript equations. To do so, I use `\displaystyle` as in               \documentclass{standalone}     \usepackage{amsmath}     \begin{document}         $e^{\mathbf{A}t}=e^{\displaystyle \mathbf{A}t}=e^{{\displaystyle \mathbf{A}}t}$     \end{document}      The corresponding output is: ![good output with cmroman](http://i.stack.imgur.com/s7KvE.png) The first exponential is exactly what I'm looking for. Now, if I add the `cmbright` package, the corresponding code               \documentclass{standalone}     \usepackage{amsmath}     \usepackage{cmbright}     \begin{document}         $e^{\mathbf{A}t}=e^{\displaystyle \mathbf{A}t}=e^{{\displaystyle \mathbf{A}}t}$     \end{document}      yields: ![image showing problem with cmbright](http://i.stack.imgur.com/5R0Ts.png) As one can see, in the left exponential the A symbol is not bold, and the other symbols are larger (as expected with `\displaystyle`). I guess there is a pretty simple explanation about `cmbright` but I am not aware of it. Any clues to get the bold symbol AND the normal size with `cmbright`?


title: Grid typesetting with LaTeX3

text: Grid typesetting is something that is rather hard to achieve with LaTeX and as this question states there are currently two packages, e.g. `grid` and `gridset`, that can help to use grids. Unfortunately none of these packages seem to work flawlessly, `gridset` takes many compilations and `grid` has some limitations, according to the manual e.g. footnotes are not placed correctly. Since the mentioned question already is some years old and I have read that LaTeX3 may make it easier to achieve grid typesetting, I wanted to know if there have been any improvements or new devlopements. I have found the `xo- grid` package on the LaTeX3 project page and was willing to give a try, but I couldn't really get it work. Is it already possible to work with `xo-grid` or is not yet ready for use? Or is there another package that I've overlooked?


title: Using ctable package with apa6 class

text: I'm trying to use `ctable` since it's much easier to work with than `threeparttable` and all of its additional packages but I get an error stating that "Command `\tnote` already defined". I think it's something to do with the `apa6` class but I don't know how to change that.               \documentclass[man]{apa6}     \usepackage{ctable}     \shorttitle{}          \begin{document}          \ctable[     caption = Some caption,     pos = h     ]{ccc}{     }{\FL     A & B & C\ML     1 & 2 & 3\NN     4 & 5 & 6\LL     }          \end{document}


title: LaTeX template for 3 ring binder tabs

text: I have a three ring binder and it has eight page dividers. On each page divider is a clear slot to enter a tab for the name of the subject. The tabs are 0.5 inches by 1.5 inches. Is there a way to setup an easy environments for these tabs so I can print out a bunch and quickly customize them? Also the tabs get folded over to make them double thick this way I can write on both sides of the tab. When I print it out and then fold it over and the name will appear on both sides. Also is it possible to place a box around it so I know where to cut out. When I print it out and cut it out is should look something like this: ![enter image description here](http://i.stack.imgur.com/Qg1WW.jpg) I'm pretty new to Latex so I apologize for not trying anything myself. But I feel you guys are smart enough here to do something like this in no time.


title: How to compare two counters using TeX conditionals in ConTeXt?

text: I have two counters, `\definenumber[words]` and `\definenumber[items]`. I have tried to use TeX conditionals to compare them, e.g.:               \ifnum\getnumber[words]=\getnumber[items]         This will print some text if the two counters have the same value.     fi      This does not work. How can I use TeX conditionals to compare two counters in ConTeXt?


title: Disable MiKTeX proxy setting on the command line?

text: I am using the latest version of MiKTeX (updated a few days ago) on Windows XP (yeah, I know...). Usually I am connecting from work via an internal proxy. Now I am off the corporate network for a few days and need to install an additional package and need to turn the proxy off. Environment variable `http_proxy` is not there (renamed to `http_2_proxy`). `proxycfg` says I'm connecting directly. The problem I have is that the proxy cannot be disabled via the GUI (I tick the checkbox off and get the `get proxy host by name failed in tcp_connect()` error in the next step). When the connection dialog starts anew the checkbox is selected again. I even started `mpm` (and `mpm_admin` and `mo` and `mo_admin`) from a new cmd shell to be sure that the environment has no `http_proxy`. Any other way how I can "convince" MiKTeX of turning the proxy off? (I know about manual installation of packages, but I just want to TURN OFF THE PROXY).


title: Possible ways to format a specific century in LaTeX?

text: I'm writing I little bit of history in my report and I wonder which are the possible ways to format a century in LaTeX (e.g XX century) and in typography which is the most used and accepted. This is actually what I'm using: `XX$^{\circ}$` so I have something like XX° but I don't like it very much, the circle is too low...


title: Listings - break on whitespace+

text: I'm using `listings` for the first time, and have some rather long lines of code. I get that I can break lines automatically with `breaklines=true`, and I can break only on whitespace with `breakatwhitespace=true`, but is there any way to add more breaking characters to the list? For example:               \documentclass[a4paper,twoside]{book}     \usepackage{listings}     \usepackage{xcolor}          \definecolor{mygreen}{rgb}{0,0.6,0}     \lstset{ %       basicstyle=\footnotesize\ttfamily,        % the size of the fonts that are used for the code       breakatwhitespace=true,          % sets if automatic breaks should only happen at whitespace       breakindent=1em,       breaklines=true,                 % sets automatic line breaking       commentstyle=\color{mygreen},  % comment style       keepspaces=true,                 % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)       keywordstyle=\color{blue},       % keyword style       linewidth=\textwidth,       morekeywords={*,...},            % if you want to add more keywords to the set       numbers=left,                    % where to put the line-numbers; possible values are (none, left, right)       numbersep=5pt,                   % how far the line-numbers are from the code       numberstyle=\tiny\color{gray},   % the style that is used for the line-numbers       showlines=true,       stepnumber=1,                    % the step between two line-numbers. If it's 1, each line will be numbered       stringstyle=\color{red},         % string literal style       tabsize=2,                       % sets default tabsize to 2 spaces       title=\lstname                   % show the filename of files included with \lstinputlisting; also try caption instead of title     }          \begin{document}         \lstinputlisting[language=Python,caption={},firstline=202,lastline=203]{somefile.py}     \end{document}      gives: ![enter image description here](http://i.stack.imgur.com/JDoOE.png) i.e. the first line extends past the right margin. I can obviously do one of two things to the source:   * break lines manually   * manually add spaces after commas (for example), as necessary But is there any way to automate breaking after commas (or some other character, but commas would work nicely for me). The manual doesn't seem to give me anything. I see a similar question has been asked before with no answer - so I'm not all that hopeful. **Edit:** After trawling through the package code, which is largely beyond me as I suspected, I can't find a `listings`-specific definition of whitespace - can I assume this is a LaTeX-wide definition?


title: Are there any projects which try to provide a subset of LaTeX functionality without being LaTeX?

text: I need some Information for my Bachelor Thesis and I couldn't find something in the web...because I didn't know exactly which term I should google... I'm interested in everything which try to provide some LaTeX features, like auto generated tables of content ore sections and subsections... Are there any Markup Languages or Web Projects?


title: Are there any open research problems in the world of TeX?

text: For a year-long capstone project in computer science, I have to do some 'original research.' I'm still not entirely sure what this entails, but it just struck me that perhaps I can do research and simultaneously help the only open source project I truly believe in. Are there any open problems in TeX or LaTeX that I could attempt to solve over the course of a year? If possible, one problem per answer. (Note you can still post multiple answers.) * * * To clarify, I'm _not_ looking for ideas that would make cool packages per se. I'm not looking to add some neat package on CTAN; that isn't nearly fundamental enough. I'm not even looking for high-scale programming project either; those are things you can just truck through (with the possible exception of a BibLaTeX style editor; I understand that's a doosie). I'm looking for problems that   * have (or need) a clear definition of the problem   * are fundamentally applicable to the _core_ of TeX's typesetting (To clarify, I'm not _expecting_ to re-code TeX for this, but it's not out of the question. The 'rivers' problem may have to lead to this, whoever does it.)   * are within the scope of an undergraduate/graduate final year. (I go to a weird school; we have some pretty amazing research going on at the undergraduate level. See the project's official specification, keeping in mind that each department has its own spin.) * * * I ended up going with 're-evaluating and improving Knuth-Plass for modern hardware' as my proposal, and my adviser was enthusiastic about it (at least upon realizing I wasn't wanting to extend the _language_ of TeX). So I began my research and, lo and behold, it's already been looked at! (This isn't surprising, but it's definitely depressing.) Perhaps this algorithm could be implemented in one of the newer TeX engines, but that is beyond the scope of CS research. (For example, it could be applied to avoid rivers and stacks, to improve pagination, etc.) Thanks for all of your suggestions!


title: “Math paragraphs”: display a lot of small formulas, automatically placing line and page breaks

text: I have a lot of short formulas that I want to set out all together—short enough that usually two or three will fit on each line—so I would like to simply give all the formulas, and let TeX place the line- and page-breaks between them. The `mathpar` environment, from the `mathpartir` package, provides almost exactly what I want, allowing one to write e.g.               \begin{mathpar}       x = y     \and       y = z^2     \and       z = w^3     \end{mathpar}      According to the documentation, this is implemented using TeX's usual paragraph mechanism. However, `mathpar` paragraphs do not break across pages, it seems. Is there another package/environment similar to this but allowing page-breaks? Or is there a way to modify `mathpar` to allow them?


title: Centering memoir frontmatter and backmatter chapter titles

text: How can I center the titles of the chapters in the frontmatter and the backmatter of a document written using `memoir`? Keep in mind that the mainmatter chapters should not be affected at all.


title: TeXstudio and viewing multiple pdf files

text: I am editing two different TeX files simultaneously, the manuscript and the response for the referees, and generating pdf files through pdfLaTeX. How can I go from one pdf to another in the internal PDF viewer without recompiling the other file?


title: 2 questions about page layout - multi "row" and "central" header

text: I have tried to google a lot, but I didn't get a clue. Maybe my request is a little special. :) What I want to is to set the page with 2 part top and bottom, it's just like "multicolumn", but transpose. Another request is to set header(section name and page) to the central of page, where is the blank by two "rows" texts. I am not sure if I have put this clearly. I have draw a draft and attached to make a better presentation. ![enter image description here](http://i.stack.imgur.com/PUll7.png)


title: How to Place 2 TikZ Plots Side by Side

text: I'm working on something that involves placing plot sketches side by side. The trouble is, even though I begin the next picture on the same line as the previous one ends, it doesn't look nice:               \begin{tikzpicture}          \draw [->] (0,0) -- (0,2) node [left,pos=1] {$\Delta x$} node [above right] at (0.5,2) {Guy};     \draw [->] (0,0) -- (2.1,0) node [below, pos=0.9] {$\Delta t$};     \draw (0,-1) -- (1,0) -- (2,1);          \end{tikzpicture} \begin{tikzpicture}          \draw [->] (0,0) -- (0,2) node [left,pos=1] {$\Delta x$} node [above right] at (0.5,2) {Car};     \draw [->] (0,0) -- (2.1,0) node [below, pos=0.9] {$\Delta t$};     \draw [domain=0:0.89] plot (\x, {2.5*\x*\x});          \end{tikzpicture}      What is wrong, and how can I fix it?


title: Biblatex ignore postnode in \cites

text: I want to have a flag to ignore all page numbers that are given to citations within the document. The goal is that these two commands show the same result: `\cite[1]{mykey}`   `\cite{mykey}` I achieved this for the `\cite` command using the following statements: `\let\oldcite\cite`   `\renewcommand{\cite}[2][]{\oldcite[]{#2}}` How would I do this for the `\cites` command? The goal is to get the same result from these two commands: `\cites[1]{mykey}[10-15]{mykey2}`   `\cites{mykey}{mykey2}` Thanks


title: XeLaTeX fonts don't work well on Windows?

text: I have recently downloaded the template for a CV from http://www.latextemplates.com/template/plasmati-graduate-cv. It is supposed to be compiled using XeLaTeX, with previous installation of the Fontin font which can be downloaded from http://www.exljbris.com/fontin.html. In Linux everything works great, but under Windows it is a catastophe: all letters are written in small caps. The problem is in this line:               \setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin} % Main document font      I have contacted the author of the template and he has suggested that I use Fontin Regular instead of Fontin SmallCaps:               \setmainfont[SmallCapsFont = Fontin Regular]{Fontin} % Main document font      But, if I do that I am unable to use `\textsc` at all. Does anyone have any suggestion? **Addendum:** One other thing. I have noticed that within this enviroment I cannot use some accents, e.g.`\v{c}`, `\'{c}` etc. Is this normal?


title: Multiple indexes in Legrand Orange Book template

text: I am currently using the Legrand Orange Book template. Is there any way to create multiple indexes for the template? I tried to use `multind.sty` but seems it doesn't create anything.


title: Argument diagram (logic)

text: I need to diagram arguments (Beamer). I've tried to use tikzcd but it doesn't work. How can I draw a diagram as the following one? ![Diagram](http://i.stack.imgur.com/8Yfdx.png)


title: BiBTeX Name: First/last order

text: My reference look like this (example): ![enter image description here](http://i.stack.imgur.com/TWRNr.png) I would like the names ordered as follow: Holler, J. N. & C. D. Koller (2011) Furthermore I would like my editors listed as: First Last, First Last et al. I use a (modified form of) `apalike` as my bibliography style.


title: Stacking floats vertically

text: How do I stack say three floats on top of each other vertically such that the height of each plot is approximately the third of the text height of the page? (i.e. so they all fit including captions and subcaptions). I don't care about float width as long as the scale to fit the linewidth. I'd prefer to use the subcaption package. Appreciate any support,


title: How to check if my child document is being loaded by parent document when using standalone?

text: When I use standalone package to load a child .tex file into a main.tex file, then parts of the title and table of content heading `Contents` still shows up in the main document. The problem is that I need to build the child.tex on its own, and also be able to build main.tex later to collect all files into one. Hence in child.tex I also use `\tableofcontents` and use `\title`. And I do not know how to remove these when building main.tex, since these do not go to the `preamble` of the child, and must be in the body of the child, and `standalone` only strips off stuff in the `preamble`. So I need some kind of logic or flag, as follows that I can add to each child document:               \begin{document}     ....     \ifstandalone     % do nothing, I am being loaded by parent     \else     title{title of child document}     \author{me}     \maketitle     \tableofcontents     \fi      Now `standalone` does have such switch `\ifstandalone`, but I can't figure how to use it in the child document. Here is from the PDF of the package (the package is too advanced for me to understand it all at this time). ![enter image description here](http://i.stack.imgur.com/rBH1b.png) I tried many things, and none are working. Does any one knows how to do this? Here is a MWE, parent.tex and child.tex. Both are in the same folder.               \documentclass[12pt,notitlepage]{report}     \usepackage{standalone}%       \usepackage{import}            \begin{document}       \author{me}     \title{This is my document home parent.tex title}     \maketitle     \tableofcontents          \chapter{HWs}     now include the other document            \subimport{.}{child}   %make sure no empty line after this     \end{document}      and this is child.tex               \documentclass{article}     \begin{document}     \title{my child.tex file}  %need a way to remove this when compiling parent.     \author{me}     \maketitle     \tableofcontents          \section{problem 1}     test 1     \section{problem 2}     test 2     \end{document}      Now if I do               rm *.aux; rm *.toc; pdflatex child.tex       it works. But when I do `pdflatex parent.tex` I still get parts of the TOC and title from child showing up in main.tex, which messes up the layout in the parent document: ![enter image description here](http://i.stack.imgur.com/xZUWR.png) ps. Here is something I tried in the child.tex               \documentclass{article}     \usepackage{standalone}% added this so to be able to use the ifstandalone flag     \begin{document}     \ifstandalone  %but this had no effect when build the parent.tex, the title and                    %part of the TOC still showed up in the parent, causing problems     %     \else     \title{child.tex title}     \author{me}     \maketitle     \tableofcontents     \fi          \section{problem 1}     test 1     \section{problem 2}     test 2     \end{document}


title: char to integer cast in latex

text: I am wondering what an integer in LaTeX is. I take this from pdfTeX release notes (2005-08-01) >   * `\pdfelapsedtime` is a read-only integer that (initially) returns the > amount of time passed since the start of this run. This amount is given in > `scaled seconds': the value 65536 counts as one second. If more time has > passed than 32767 seconds, (2^31)-1 will be returned. >   * `\pdfresettimer` updates the internal timer, such that subsequent calls > to `\pdfelapsedtime` will restart from 0. > so I guess the return value from `\pdfelapsedtime` is an integer. I have to use `\the\pdfelapsedtime` to cast it to string value (please correct my words to the LaTeX conventions, I hope everybody knows what I mean). To further elucidate my problem, please look at the following MWE:               \documentclass{minimal}          \newcount\benchmarkcount          \begin{document}     \pdfelapsedtime     \benchmarkcount          \end{document}      The first error is `! You can't use '\pdfelapsedtime' in vertical mode.` while the second one gives `! Missing number, treated as zero.` So an integer is not the same as a counter either. Is there anything -- let me call it `\foo` -- that casts a string to become an integer, e.g. `\foo\the\pdfelapsedtime`. Or, that would solve my problem as well, is there an analog to `\directlua{tex.print(...)}` that gives an integer back? background: I am working on the answer to this question and try to make the lualatex `\pdfelapsedtime` macro as identical to the pdflatex one as possible.


title: Multiply defined label warnings when using Subcaption in a Tikz picture

text: In an earlier question, I asked how to create zoomed highlights of a larger image automatically. User Jake provided an excellent solution using TikZ. However, when subcaptions and hyperref are added to the mix, we start getting multiply defined label warnings. Can anyone help diagnose the simplified example below? When I compile this, I get the warning `Label 'test' multiply defined`. Code example, courtesy of Jake:               \documentclass{article}      \usepackage{tikz}      \usetikzlibrary{spy}           \begin{document}           \begin{figure}\centering              \begin{tikzpicture}[spy using outlines]                      \node{\label{test} Testcontent};                      \spy on (0,0) in node (0,0);              \end{tikzpicture}      \caption{Testfigure}      \end{figure}           \end{document}


title: Configure tex4ht for package scrjura

text:
I'm drafting agreements on the topic of renewable energies. Trouble is, clients sometimes need a word-version = my agreement in `html`. The package `tex4ht` does the job pretty well, unless I use the package `scrjura`, a part of the KOMA-Script-bundle. But `scrjura` makes writing my agreements a lot easier, I would not like to do without it. The package allows to print the agreement in accordance to German standards. See this example:               \documentclass{article}     \usepackage[english]{babel}     \usepackage{scrjura, indentfirst}     %\usepackage{tex4ht}              \begin{document}         \begin{contract}           \Paragraph{title=Does it make sense?}              This first sentences usually talk about the sense of the whole         contract / agreement / whatever. Unlike many people think, it is not         forbidden to lawyers to write plain text.              But there are obstacles. We need some definitions.              \Paragraph{title=Share-purchase}              Let's assume we talk about a share-deal agreement. We'd have to name         the shares.              And the price.              \end{contract}              \end{document}      Ok, the output with pdflatex is: ![Agreement pdftex](http://i.stack.imgur.com/0V1vN.png) Now let's add `\usepackage{tex4ht}`, save the file and compile with `htlatex filename.tex`. The result is a miss, but not by a mile:               <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"         "http://www.w3.org/TR/html4/loose.dtd">             <title></title>      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">      <meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">      <meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">            <meta name="src" content="stackexchange-html.tex">      <meta name="date" content="2011-08-12 16:00:00">      <link rel="stylesheet" type="text/css" href="stackexchange-html.css">
§ 1 Does it make sense?        (1) This first sentences usually talk about the sense of the whole contract /     agreement / whatever. Unlike many people think, it is not forbidden to lawyers to     write plain text.        (2) But there are obstacles. We need some definitions.             § 2 Share-purchase        (1) Let’s assume we talk about a share-deal agreement. We’d have to name the     shares.        (2) And the price.                 If you save this as a html-file and open it into your browser, you will notice that everything is ok, except that there are no paragraphs. The fat printed titles appear in the same line as the numbered "paragraphs", of which each one should have it's own, well, paragraph, as in the picture above. Can anybody help me to write a config-file for tex4ht to get an output including proper paragraphs? **EDIT:** The command `\Paragraph{title= ...}` provides a headline to the following text. How can I inform tex4ht about this?


title: Boxed equation with number

text: My minimum working example:               \documentclass{report}          \usepackage{amsmath}          \begin{document}          \begin{center}     \boxed{K_{k+1}=P_ka_{k+1}^T(a_{k+1}P_ka_{k+1}^T+I_N)^{-1}}     \end{center}          \end{document}      The result: ![enter image description here](http://i.stack.imgur.com/zXXkb.png) Now how can I number this equation?


title: Use of \scshape or \textsc in beamer \institute

text: I need to set a piece of my `\institute` name in small caps in my beamer presentation. Now I set:               \institute{Dipartimento di Tecnologie dell'Infomazione \\ Corso di Laurea        in: {\scshape Sicurezza dei Sistemi e delle Reti Informatiche}}      but the small caps setting is completely ignored. Same for `\textsc{}` Any clue?


title: latex compiler hangs, no error message shown

text: When I am compiling my .tex file using Kile GUI, if there is no syntax error in my .tex file then it works properly and show a message that there is no error. But latex compiler hangs if there is any syntax error in my .tex file and does not show any error message. How can I see the error messages. Should I have to add some package?


title: How do I insert an image in LaTeX so it looks good on print?

text: LaTeX documents print beautifully, but images often looks "ugly", "pixelated" or "low-res" compared to the text. By images I don't mean photos, which I rarely use, but rather diagrams, charts and drawings made in other programs such as Visio, Excel and Photoshop. I would love for these to look just as good as the rest of the report when printed.


title: How does one set custom labels for description lists?

text: Every now and then I use the description list environment               \begin{description}     \item[foo]  foo is good     \item[bar]  bar is bad     \end{description}      to create lists with non-numerical labels. Unfortunately the description list does not support the label-reference pair as normal latex: i.e. if I write               \begin{description}     \item[foo] \label{foo} foo is good     ....     \end{description}     ....     For good things (see, for example \ref{foo})...       the reference does not point to the item in the list. Instead it points to the closest environment that supports labeling (usually the subsection). So instead of showing the text foo (in boldface), it shows something like 2.2.1 (the subsection corresponding to where the description environment is sitting). My question: is there a way or a package which allows references to description list items? My current work-around is to just type the text myself in the spot (since I named it myself, and it is not numbered, the formatting is unlikely to change the label =). But one of the good things about the label/reference pairs in latex is the implementation in pdflatex that allows in PDF hyperlinks between references and the objects referred to, this I cannot replicate myself. **Edit** : let me rephrase my question. The primary goal is _not_ to display `\ref` to something other than what LaTeX thinks the `\label` is. There are many ways to deal with it, some of which outlined in Michael Underwood's helpful answer below. What I am looking at is whether there exists an implementation of a list environment which is like the built-in `description` environment in that the displayed "title" for the list item is completely customized, while having support for `\label`s. (The built-in `description` environment does not support `\label`s, whereas the built-in `enumerate` environment does not support customized "title"s.) The `enumitem` package adds some customizability to the environments, but as far as I can tell it doesn't support exactly what I want.


title: Good way to "ensure" a return value

text: I want to describe an algorithm, which is not changing a given input but it is producing a new element:               \documentclass[a4paper, 11pt]{scrbook}     \usepackage{algorithm}     \usepackage{algorithmic}     ...     \begin{algorithmic}     \REQUIRE $\mathcal{P} \subset F[X_1 \dots X_{k-1 }][X_k]$     \ENSURE % something about the return value     \RETURN $\operatorname{Elim}_{X_k}(\mathcal{P})$     \end{algorithmic}      Ensure is not quite the thing I'm looking for because I want to make a statemanent about the output which does not have its own name. Another thing is that I want to name the algorithm and lateron call it. I know that the algorithm does not to anthing different than call the function Elim but I want to underline the difference between the existence of a mathematical function and the algorithm (e.g. I don't want to discuss the computional complexity of a mathematical function). Any ideas?


title: How to make expanding middle delimitors like in the braket package

text: The braket package has convenient commands like `\Braket` and `\Set`, where `|` are automatically expanded vertically. This allows to easily typeset expressions like               \documentclass{minimal}     \usepackage{braket}     \begin{document}     $$\Braket{\psi |i\hbar\frac{\partial}{\partial t}|\phi}$$      \end{document}      I'd like to do the same thing with other delimiters, for example to typeset conditional probabilities like `$P(A=\frac12|B)$`. _Edit to clarify the question_ I'm interested to cases where I don't know which size of the `|`-sign is the biggest. An example could be `$P(A=\frac12|B=2^{2^2})$`.


title: What are other good resources on-line for information about TeX, LaTeX and friends?

text: Are there newsgroups, forums, FAQs, and other sites that provide quality information on TeX, LaTeX and friends? Are all of these in English, or is there one in "my language of choice"?


title: \emph in math mode

text: I am new to LaTeX and have a problem with the line               The difference is that the signing key \emph{x} is split into two pieces, \begin{math}     \emph{x_{L}}\end{math} and \begin{math}\emph{x_{R}}\end{math} and are both elements of the      \begin{math}\textbf{Z}_{q}\end{math}.      I get the error               ! Missing $ inserted.     <inserted text>       I am a little confused why I am getting this error since I have put the `_` in a `math` section. Any help would be great. Thanks!


title: How can I change the whitespace above and below center?

text: Is it possible to control the space above and below `center`, e.g. the way it can be controlled above and below math display? In other words, is there an equivalent to, say,               \setlength\abovedisplayskip{3pt plus 2pt minus 2pt}     \setlength\belowdisplayskip{3pt plus 2pt minus 2pt}


title: How to automatically include PDFs from my bib file

text: I use the BIB list generated by Mendeley, with contains an item called "file" with the path to the PDF of each entry. I need to generate a compilation of papers and I would like to do it automatically in the following manner.               \usepackage{biblatex}     \usepackage{pdfpages}          \fullcite{foo}     \includepdf{\readfilefrom{foo}}.      So, what I'm looking for is a function that given a bib item, it will return the path saved in the `file` entry of my bib file. Example of bib entry:               @inproceedings{foo,     address = {Aachen, Germany},     author = {Masiero, Bruno },     booktitle = {DAGA},     file = {:D\:/Users/masiero/Documents/My Dropbox/Literature/pdf/Masiero, Fels_2011_Equalization for Binaural Synthesis with Headphone.pdf:pdf},     month = mar,     title = {Equalization for Binaural Synthesis with Headphone},     year = {2011}     }      Some other examples of the file field would be:               file = {:D\:/Users/masiero/Documents/My Dropbox/Literature/pdf/Masiero, Pelzer\_2010\_Study of Phase Reconstruction Methods Employed at Room Acoustic Simulation.pdf:pdf},          file = {:D\:/Users/masiero/Documents/My Dropbox/Literature/pdf/Masiero, Pollow\_2010\_A review of the compressive sampling framework in the lights of spherical harmonics applications to distributed spherical arrays.pdf:pdf},          file = {::D\:/Users/masiero/Documents/My Dropbox/Literature/pdf/Masiero, Pollow, Fels\_2011\_Design of a Fast Broadband Individual Head-Related Transfer Function Measurement System.pdf:pdf},          file = {:D\:/Users/masiero/Documents/My Dropbox/Literature/pdf/Masiero, Qiu\_2009\_Two Listeners Crosstalk Cancellation System Modelled by Four Point Sources and Two Rigid Spheres.pdf:pdf},          file = {:D\:/Users/masiero/Documents/My Dropbox/Literature/pdf/Masiero, Ribeiro, Nascimento\_2008\_Transducer Placement Strategy for Active Noise Control of Power Transformers\_Fortschritte der Akustik -- DAGA.pdf:pdf},


title: Ideal Setup for Swiss-Style Quotes (Quotation Marks in German-speaking Switzerland)

text: As far as I know Switzerland uses French quotes but without whitespace. So instead of               « citation »      it goes like this               «citation»      (to make it more confusing, in Germany they have the alternative use of `»citation«`) I am going quite well with the double quotes because on one side I do find them on my Swiss keyboard (AltGr+y/x) and there is also a nice way on English or German keyboards which then gets rendered               <<citation>>      So the first question actually is if it is fine to just use the French quotes without spaces. Typographically there is quite some difference. Do I completely mess it up by just miss-using this stuff for Swiss citation? I also do have a problem with the single quotes.               ‹ french › and ‹swiss›      I don't find them on my keyboard and simply use of English keys like `<cite>` does not work either. What I do for now is just copy and paste the original letters which I copied from wikipedia. Of course I can also use `\flq` and `\frq` (or `\frqq` and `\flqq` for double quotes) but this does still not answer the above question. So again:   * Any ideas and hints for simplifying single quotes?   * Is the approach of turned French quotes the right solution at all for Swiss style? Or in general terms: What would be a recommended ideal setup for Swiss quotations?


title: How to render a normal and compressed version of the bibliography in one document?

text: I use biblatex and biber for the bibliography and I came to the problem that I need a subset of the bibliography to be in verbose style (all authors for 5 references) and at another place in the document I need all entries as compressed as possible (about 200-300 references). So I currently I employed `style=numeric-comp` and `maxnames=1`. The drawback is that the `maxnames` options are global only options since biblatex 1.6. (Currently I use biblatex 1.7) So how do I render a subset in verbose style and the rest in compressed style?


title: tikz graphs: draw an edge from a node without a goal node

text: Is it possible to write an edge going from a node but out into nowhere, see image below (ignore the trace of goal node that is visible) ![enter image description here](http://i.stack.imgur.com/jF9yi.png)


title: Not breaking the start of an environment for solution of exercises

text: Let suppose that I have an environment `\begin{sol} ... \end{sol}` for writing solutions of exercises in a test. For practical reasons, I would like that two or more solutions can be put in the same page only if their whole contents are only in this page. For example, if the solutions of exercises 1 and 2 are only in the page, they can be put together, but if not, the solution 1 must be alone, and then the solution 2 must starts at a new page. The main problem is that the sizes of the solutions are not fixed, and they can be smaller or not that one page. It can have one small solution followed by another small one, or not. The number of solutions is not fixed neither. Indeed, in reality I need less than 10 solutions.


title: How to plot a curve in a polar form r = f(Θ)?

text: Can we use LaTeX to make the graph of `$\rho = \sec(\theta)$`?


title: Double Spacing Footnotes but having it up against line

text: I have looked around but I can't compute how to fix my problem. My footnotes have to be single spaced in the footnote and double spaced between them. They must also rest against the black line that marks the footnote area. I can't determine how to have the double spacing between footnotes, but still be flush against the line. Here is some code as to what I am doing               \documentclass[12pt]{report}     \usepackage[pdftex]{graphicx}          \usepackage{fullpage}     \usepackage{setspace}         \doublespacing     \setlength{\footnotesep}{\baselineskip}          \begin{document}     \begin{table}[htbp]       \centering       \caption{Commitment Variables}         \begin{tabular}{p{5cm}p{10cm}} \\ \hline         \multicolumn{1}{c}{Variable Name} & \multicolumn{1}{c}{Description} \\         \hline         $commitmentcounter$\tablefootnote{Words used: pride, visit, leader, unity, campus, legacy, important, environment, only, home, comfort, mom, dad, mother, father, family} & The number of words in both essays used by people who did come to Baylor. \\        $commitmentpercent$ & The percentage of words that are commitment words. \\         $faithcounter$\tablefootnote{Words used: shall, unto, lord, thou, thy, ye, God, son, hath, Israel, king, people, house, before, children, against, shalt, land, day, hand, behold, saith, sons, hast, o, over, she, David, great, Jesus, thine, father, neither, give, take, am, forth, brought, name, away, pass, two, according, days, city, earth, Moses, thereof, whom, know} & The number of words in both essays used to express their faith. \\         $faithpercent$ & The percentage of words that are faith words. \\         $baylorcounter$\tablefootnote{Words Used: Baylor, bears, bear, Waco, oso, quadrangle, ivy, burleson, hankamer, Louise, Herrington, truett, dia del     } & The number of words in both essays used to signal their knowledge of Baylor. \\         $baylorpercent$ & The percentage of words that are Baylor specific. \\         $totalbible$ & The number of times in both essays that a book of the Bible was referenced. \\         $biblepercent$ & The percentage of words that are books of the Bible. \\         $admincounter$\tablefootnote{Words Used: top, choice, first, dream, dreamed, always, growing, grown, grow, wonderful, visit, blessed, experience, passion, passionate, tradition, atmosphere, values, perfect, heart} & The number of times in both essays in which words given my by the admissions team were used. \\         $adminpercent$ & The percentage of words that are from the admissions team. \\ \hline         \end{tabular}%       \label{tab:addlabel}%     \end{table}          \end{document}


title: Tables with labeled lines

text: I have a little question concerning the layout of tables. Does LaTeX provide a way to create tables like shown in the picture below? ![enter image description here](http://i.stack.imgur.com/MB6Lx.png) I am referring to the two axes of the table that are labeled "K" and "n". Is there a way to have labeled axes in a table (with a little arrow at the end) instead of just having normal vertical and horizontal lines? Can I use the tabular environment or do I have to use something fancier? Here is how my table would look without labeled axes:               \documentclass{scrartcl}          \begin{document}       \begin{tabular}{l|cccc}                   & 0 & 1 & 2 & 3 \\ \hline         $k_1 = 3$ & O & - & - & I \\         $k_2 = 4$ & O & - & - & O \\       \end{tabular}     \end{document}      Btw, does anybody know what those characters in the table in the screen caption above are? I approximated them with "I" and "O" but it doesn't look quite right. I would be grateful for any help (and excuse my English, it's not my native tongue)!


title: `edge quotes mid` TikZ issue

text: When I render this with LuaLaTex:               \documentclass[border=4mm]{standalone}          \usepackage{tikz}     \usetikzlibrary{graphdrawing,graphs}      \usegdlibrary{layered,trees,circular,force}          \begin{document}          \tikz \graph [spring layout,     edge quotes mid,     edges={nodes={font=\scriptsize, fill=white, sloped, inner sep=1pt}}]      {     1 ->["Das"] 2 ->["ist"] 3 ->["das"] 4 ->["Haus"]      2 ->["vom" near start] 5 ->["Ni"] 4 ->["ko" near start]      1 ->["laus", orient=right] 5;      };          \end{document}      I get this error: > Line 8: Package pgfkeys Error: I do not know the key '/tikz/"{Das}"' and I > am going to ignore it. Perhaps you misspelled it. Why?


title: Missing bullet when itemize \item content is empty and buried within a group

text: When writing my question about various approaches to creating loops, I stumbled across the following _anomaly_               \documentclass{article}     \usepackage{pgffor}     \begin{document}          \begin{itemize}     \foreach \x in {apples, oranges,pears,,peaches}       { \item \x }     \end{itemize}          \end{document}      which results in: ![enter image description here](http://i.stack.imgur.com/Ub0Lc.png) This is can be duplicated by just writing:               \begin{itemize}       \item apples       \item oranges       \item pears       {\item }       \item peaches     \end{itemize}      I cannot think of a reason why you would want to write `{\item }`. But, since I'm a teacher writing exams and quizzes, I often may want to use an `\item` with no following text. What's happening here that the grouping is causing the `\item` not to render the bullet?


title: Index not printing after files are removed

text: I'm using Sublime Text with the LaTexTools package to build from within Sublime. Everything was working fine on my documents, until today, when I decided to remove all LaTeX temporary files for one of my documents. Now, the index doesn't print. I suspected a custom command I built (`emphi` that makes some index words less visible than others) to break make index, but while troubleshooting with a new test file, I wasn't even able to get an index without it. Here is an example that doesn't print any index on my system :               % !TEX encoding = UTF-8 Unicode     % !Mode:: "TeX:UTF-8"     % !TEX program = lualatex     \documentclass[11pt,a4paper,fleqn,pdftex]{report}          \usepackage[dvipsnames, table]{xcolor}     % to have colors     \usepackage{lipsum}                 % for sample text     \usepackage[leqno]{amsmath}         % for mathematical content     \usepackage[amsmath]{ntheorem}      % for theorem-like environments     \usepackage[framemethod=TikZ]{mdframed}          \usepackage{imakeidx} % I also tried with makeidx, but none works     \makeindex     \usepackage[totoc]{idxlayout}     \usepackage[utf8]{luainputenc}     \usepackage[french]{babel} % I'm French     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          % Macro     \definecolor{colorGrey}{RGB}{233,233,233}  %Grey Color     \newcommand{\emphi}[1]{\textcolor{colorGrey!90!Black}{#1}} % Index emphasizer          \begin{document}     \chapter{Pellentesque habitant}          Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum      ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu      libero, nonummy eget, consectetuer id, vulputate a, ma- gna. Donec vehicula augue      eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada      fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et      lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor      gravida placerat. Integer sapien est, ia- culis in, pretium quis, viverra ac, nunc.      Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla,      malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec      varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis,      diam. Duis eget orci sit amet orci dignissim rutrum.          Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Morbi auctor      lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et,      tellus. Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna,      vitae ornare odio metus a mi. Morbi ac orci\index{orci@\emphi{ac }orci} et nisl      hendrerit mol- lis. Suspendisse ut massa. Cras nec ante. Pellentesque a nulla. Cum      sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.      Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. Pellentesque cursus      luctus mauris.\par          Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat at,      tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec no- nummy      pellentesque ante. Phasellus adipiscing semper elit. Proin fermentum massa ac quam.      Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia.      Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit      ligula feugiat magna. Nunc eleifend consequat lorem. Sed lacinia nulla vitae enim.      Pellentesque tincidunt purus vel magna. Integer non enim. Praesent euismod nunc eu      purus. Donec bibendum quam in tellus. Nullam cursus pulvinar lectus. Donec et mi.      Nam vulputate metus eu enim. Vestibulum pellentesque felis eu massa.          Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae lacus      tincidunt ultrices. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In      hac habitasse platea dictumst. Integer tempus convallis augue. Etiam facilisis.      Nunc elementum fermentum wisi. Aenean placerat. Ut imperdiet, enim sed gravida      sollicitudin, felis odio placerat quam, ac pulvinar elit purus eget enim. Nunc      vitae tortor. Proin tempus nibh sit amet nisl. Vivamus quis tortor vitae risus      porta vehicula.\par          Fusce mauris. Vestibulum luctus nibh at lectus. Sed bibendum, nulla a faucibus      semper, leo velit ultricies tellus, ac venenatis arcu wisi vel nisl. Vestibulum      diam. Aliquam pellentesque, augue quis sagittis posuere, turpis lacus congue quam,      in hendrerit risus eros eget felis. Maecenas\index{Maecenas} eget erat in sapien      mattis porttitor. Vestibulum porttitor. Nulla facilisi. Sed a turpis eu lacus      commodo facilisis. Morbi fringilla, wisi in dignissim interdum, justo lectus      sagittis dui, et vehicula libero dui cursus dui. Mauris tempor ligula sed          1lacus. Duis cursus enim ut augue. Cras ac magna. Cras nulla. Nulla egestas.      Curabitur a leo. Quisque egestas wisi eget nunc. Nam feugiat lacus vel est.      Curabitur consectetuer.          \chapter{Commodo pretium}          Suspendisse vel felis. Ut lorem lorem, interdum eu, tincidunt sit amet, laoreet      vitae, arcu. Aenean faucibus pede eu ante. Praesent enim elit, rutrum at, molestie      non, nonummy vel, nisl. Ut lectus eros, malesuada sit amet, fer- mentum eu, sodales      cursus, magna. Donec eu purus. Quisque vehicula, urna sed ultricies auctor, pede      lorem egestas dui, et convallis elit erat sed nulla. Donec luctus. Curabitur et      nunc. Aliquam dolor odio, commodo pretium, ultricies non, pharetra in, velit.      Integer arcu est, nonummy in, fermentum faucibus, egestas vel, odio.          Sed commodo posuere pede. Mauris ut est. Ut quis purus. Sed ac odio. Sed vehicula      hendrerit sem. Duis non odio. Morbi ut dui. Sed accumsan risus eget odio. In hac      habitasse platea dictumst. Pellentesque non elit. Fusce sed justo eu urna porta      tincidunt. Mauris felis odio, sollicitudin sed, volutpat a, ornare ac, erat. Morbi      quis dolor. Donec pellentesque, erat ac sagittis sem- per, nunc dui lobortis purus,      quis congue purus metus ultricies tellus. Proin et quam. Class aptent taciti      sociosqu ad litora torquent per conubia nos- tra, per inceptos hymenaeos. Praesent      sapien turpis, fermentum vel, eleifend faucibus, vehicula eu, lacus.          \printindex          \end{document}      For both files, I get an `.idx` file as expected. Can anyone help me figure out what I'm missing?


title: Compile tex dependency before compiling main file

text: I need to include a letter in my report, and I'm doing this using the `pdfpages` package. I'd like it so that when my report, `report.tex` goes to compile and include `letter.pdf`, it first compile `letter.tex` and then, after having compiled `letter.tex`, include `letter.pdf` into the report. I've thought of writing a script to do this, but the solution needs to be cross- platform (the report is being worked on by five people using both Linux and Windows). Thanks.


title: Exam Class : With Question with images and border

text: I'm learning Exam Class to generate question paper. Sample tex code is mentioned below:               \documentclass{exam}     \usepackage{tikz}          \newcommand*\circled[1]{\tikz[baseline=(char.base)]{                 \node[shape=circle,fill,inner sep=1.5pt, text=white] (char) {#1};}}     \renewcommand{\questionlabel}{\circled{\thequestion}}     \begin{document}     \begin{questions}     \question[4] Choose the correct reponse:      \begin{choices} \choice Option A     \choice Option B     \choice Option C     \choice Option D      \end{choices}     \end{questions}     \end{document}      Can you please give some direction to add questions [37 & Passage for 15-19] mentioned below: ![37](http://i.stack.imgur.com/W9fq8.png) ![Passage for 15-19](http://i.stack.imgur.com/h9MIh.png)


title: How to use crossref with biblatex correctly?

text: I am building a database reference in `JabRef` with `biblatex` entries. I try to use right all the entry types that the packages offers. So I found few interesting types such as `mvbook` and `bookinbook`. In fact I'm citing two editions of a book, one independent and another as part of the collected works of the author. As the collected works are divided in several volumes, it's clear for me that I should use the `mvbook`entry type. My problems start when I want to quote the works reprinted and contained within the collected works. I think that I can use `bookinbook` for it, but I don't know if I should use the `crossref` field also to the concatenation is correct or it's optional. Searching in the web I found this question that is related with mine, but although explains why `bibtex` fails to take advantage of `crossref` and ratifies the convenience of working with `biblatex` now, does not contain a clear example of how to use `crossref` to compile correctly with `biber`. That's (in part) the reason of this question. My MWE:               \documentclass[10pt,twoside,symmetric]{tufte-book}     \usepackage[utf8]{inputenx}     \usepackage[T1]{fontenc}     \usepackage[spanish,mexico]{babel}     \usepackage{marginfix}          \usepackage[backend=biber]{biblatex}       \addbibresource{testBib.bib}       %\usepackage{hyphenat}       %\usepackage[style=german,french,mexican]{csquotes}            \hypersetup{colorlinks}          \begin{document}          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat.~\cite{Doe1917} Duis aute irure dolor in reprehenderit in voluptate      velit esse cillum dolore eu fugiat nulla pariatur.~\cite{Doe1981} Excepteur      sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt      mollit anim id est laborum.               Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod     tempor incididunt ut labore et dolore magna aliqua.~\cite{Doe1981a} Ut enim      ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip      ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate      velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat      cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id      est laborum.          \printbibliography          \end{document}      With the following bib entries:               @Mvbook{Doe1981,       Title                    = {Opera Omnia},       Author                   = {John Doe},       Year                     = {1981},       Edition                  = {5},       Language                 = {Español},       Origlanguage             = {Polish},       Publisher                = {Grenda},       Volumes                  = {55}     }          @Bookinbook{Doe1981a,       Title                    = {Principles},       Author                   = {John Doe},       Booktitle                = {Opera Omnia},       Year                     = {1981},       Volume                   = {24}     }          @Book{Doe1917,       Title                    = {Principles},       Author                   = {John Doe},       Year                     = {1917},       Language                 = {Español},       Location                 = {Kraków},       Publisher                = {Listopad},       Origlanguage             = {Polish},       Owner                    = {aradnix}     }      I don't know if I should use a `crossref` field in the `mvbook` such as `Crossref = {jdoo81},` and use the argument inside instead of the `mvtitle` in the `bookinbook` field of `title`. I also don't know if the contents of the fields `origlanguage` and `language` should always be in English and later `babel` will translate them correctly or should I write in the language in which the document is? So I highlighted deliberately that ambivalence. Finally I have not used any bibliographic style yet, as you see, my main file using the `Tufte-book` class, so the references will appear as marginal notes (side notes), but I know that citations (in my case, not in general terms) should include Latin expressions as _Op. Cit., Idem, ibid_ , etc.


title: Getting vdots in graph tree

text: \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{tikz}     \tikzstyle{vertex}=[auto=left,circle,fill=black!25,minimum size=20pt,inner sep=0pt]          \begin{document}              \begin{tikzpicture}           \node[vertex] (n1)  at (1,4)  {s};           \node[vertex] (n2)  at (3,2)  {};           \node[vertex] (n3)  at (3,3)  {};           \node[vertex] (n4)  at (3,4)  {};           \node[vertex] (n5)  at (3,6)  {};           \node[vertex] (n6)  at (9,4)  {t};           \node[vertex] (n7)  at (7,6)  {};           \node[vertex] (n8)  at (7,4)  {};           \node[vertex] (n9)  at (7,3)  {};           \node[vertex] (n10) at (7,2)  {};                \foreach \from/\to in {n1/n2,n1/n3,n1/n4,n1/n5,                     n6/n7,n6/n8,n6/n9,n6/n10}           \draw[densely dotted] (\from) -- (\to);           \foreach \from/\to in {n2/n10,n3/n9,n4/n8,n5/n7}           \draw(\from) -- (\to);           \end{tikzpicture}          \end{document}      I am trying to get vertical dots between nodes `(n4,n5)` and `(n6,n7)`. I have tried many ways but nonetheless. Also I am trying t add edge weights to the graph. I keep finding links to those written in the form of a matrix. I need to add text representing the left and right nodes on the tree. How do we add text at desired place in the tree?


title: hyperref link to file at position

text: I'm a newbie. I've figured out how to set up a hyperlink link to a file (in my case, a PDF) on the hard drive. But I would also like to change the starting position when this PDF opens up. This PDF has no sections or anything like that. I'd like to jump to a line in the PDF. Anybody know of an easy way to do this?


title: Installing package in TeX Live with kpathsea

text: I use to put packages in `/usr/share/texmf/tex/latex/` and to run `texhash` after. Now, with `kparthsea`, it seems not working. Where do I need to put my packages in order to TeX Live "sees" them or is there a _new_ way to install packages?               # texhash     texhash: Updating /usr/local/share/texmf/ls-R...      texhash: Updating /var/lib/texmf/ls-R-TEXLIVEDIST...      texhash: Updating /var/lib/texmf/ls-R-TEXMFMAIN...      texhash: Updating /var/lib/texmf/ls-R...      texhash: Done.


title: How do I center this wide table in LaTeX?

text: I have a very wide table (wider than `textwidth`) generated with `Hmisc`. The table is so wide that when centering is used it is automatically left aligned. However, everything that I have tried gives an error or just keeps the table left alligned.               \documentclass[a4paper,12pt]{report}     \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}     \linespread{2}     \usepackage{setspace}     \usepackage{booktabs,caption,fixltx2e}     \usepackage{subfig}     \usepackage{adjustbox}     \captionsetup{belowskip=12pt,aboveskip=4pt}          \begin{document}               \begin{table}[h!]     \footnotesize     \begin{center}     \begin{tabular}{lrrrcrrrcrrrcrrr}     \hline\hline     \multicolumn{1}{l}{\bfseries Trans}&\multicolumn{3}{c}{\bfseries 50}&\multicolumn{1}{c}{\bfseries }&\multicolumn{3}{c}{\bfseries 100}&\multicolumn{1}{c}{\bfseries }&\multicolumn{3}{c}{\bfseries 200}&\multicolumn{1}{c}{\bfseries }&\multicolumn{3}{c}{\bfseries 400}\tabularnewline     \cline{2-4} \cline{6-8} \cline{10-12} \cline{14-16}     \multicolumn{1}{l}{}&\multicolumn{1}{c}{b0}&\multicolumn{1}{c}{b1}&\multicolumn{1}{c}{b2}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{b0}&\multicolumn{1}{c}{b1}&\multicolumn{1}{c}{b2}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{b0}&\multicolumn{1}{c}{b1}&\multicolumn{1}{c}{b2}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{b0}&\multicolumn{1}{c}{b1}&\multicolumn{1}{c}{b2}\tabularnewline     \hline     {\bfseries No}&&&&&&&&&&&&&&&\tabularnewline     ~~fw&$0.83$&$$&$-0.0017$&&$0.90$&$ 0.01018$&$-1.2e-03$&&$0.94$&$$&$$&&$0.97$&$$&$-0.00042$\tabularnewline     ~~bw&$0.88$&$$&$$&&$0.94$&$$&$$&&$$&$$&$$&&$0.98$&$$&$$\tabularnewline     ~~sp&$0.81$&$0.0031$&$$&&$$&$$&$$&&$$&$$&$$&&$$&$$&$$\tabularnewline     \hline     {\bfseries Blom}&&&&&&&&&&&&&&&\tabularnewline     ~~fw&$1.00$&$$&$$&&$1.00$&$-0.00024$&$ 2.3e-05$&&$1.00$&$$&$$&&$1.00$&$$&$$\tabularnewline     ~~bw&$0.90$&$$&$-0.0667$&&$0.95$&$$&$-9.1e-02$&&$0.97$&$$&$$&&$0.99$&$$&$$\tabularnewline     ~~sp&$0.81$&$$&$$&&$0.90$&$-0.07838$&$-9.6e-02$&&$0.95$&$$&$$&&$0.98$&$$&$$\tabularnewline     \hline     {\bfseries Log}&&&&&&&&&&&&&&&\tabularnewline     ~~fw&$0.86$&$$&$$&&$0.92$&$$&$$&&$$&$$&$$&&$$&$$&$$\tabularnewline     ~~bw&$$&$$&$$&&$$&$$&$-9.4e-03$&&$$&$$&$$&&$$&$$&$$\tabularnewline     ~~sp&$$&$$&$$&&$$&$$&$$&&$$&$$&$$&&$$&$$&$$\tabularnewline     \hline     \end{tabular}     \end{center}     \end{table}               \end{document}      I have tried everything that could find on this site and on other sites, but can not find a solution that works for me.


title: TikZ intersections and opacity

text: I am trying to recreate this image right here to practice myself in TikZ (I am new): ![](http://i.stack.imgur.com/T7aY4.png) What I have right now is this: ![](http://i.stack.imgur.com/M0Voc.png) The problems I have is that I want the bottom arc to extend just until it hits the horizontal arc (xy-plane) (see red circle). A second problem I have is that I want to change the opacity of the intersection of the bottom two arcs (see red arrow and blue lines). Is there anyone who can give me some help? I'm new to TikZ. Thank you!               \documentclass{article}     \usepackage{tikz}  %TikZ is required for this to work.  Make sure this exists before the next line     \usepackage{tikz-3dplot}     \usepackage[active,tightpage]{preview}  %generates a tightly fitting border around the work     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{2mm}          \def\radius{6}     \def\Alpha{20}     \def\Beta{20}     \def\Gamma{20}          \begin{document}          \tdplotsetmaincoords{70}{150}          \begin{tikzpicture}[tdplot_main_coords]     % Axis: x, y, z     \tdplotsetrotatedcoords{0}{0}{0}     \draw[very thick,tdplot_rotated_coords,-o,shorten >=-3pt] (0,0,0) -- (\radius,0,0) node[anchor=north east]{$x$};     \draw[very thick,tdplot_rotated_coords,-o,shorten >=-3pt] (0,0,0) -- (0,\radius,0) node[anchor=north west]{$y$};     \draw[very thick,tdplot_rotated_coords,-o,shorten >=-3pt] (0,0,0) -- (0,0,\radius) node[anchor=south]{$z=z'$};          % Axis: x', y', z'     \tdplotsetrotatedcoords{\Alpha}{0}{0}     \draw[thick,tdplot_rotated_coords,-] (0,0,0) -- (\radius,0,0) node[anchor=north east]{$x'$};          % Axis: x'', y'', z''     \tdplotsetrotatedcoords{\Alpha}{\Beta}{0}     \draw[thick,tdplot_rotated_coords] (0,0,0) -- (\radius,0,0) node[anchor=north east]{$x''$};     \draw[thick,tdplot_rotated_coords] (0,0,0) -- (0,\radius,0) node[anchor=west]{$y'=y''$};     \draw[tdplot_rotated_coords] (0,-\radius,0) -- (0,\radius,0);          % Axis: X, Y, Z     \tdplotsetrotatedcoords{\Alpha}{\Beta}{\Gamma}     \draw[very thick,tdplot_rotated_coords,-*,shorten >=-3pt] (0,0,0) -- (\radius,0,0) node[anchor=north east]{$X$};     \draw[very thick,tdplot_rotated_coords,-*,shorten >=-3pt] (0,0,0) -- (0,\radius,0) node[anchor=west]{$Y$};     \draw[very thick,tdplot_rotated_coords,-*,shorten >=-3pt] (0,0,0) -- (0,0,\radius) node[anchor=east]{$z''=Z$};          % Circles     \tdplotsetrotatedcoords{\Alpha}{0}{0}     \draw [tdplot_rotated_coords,domain=-90:90] plot ({\radius*cos(\x)}, {\radius*sin(\x)});     \tdplotsetrotatedcoords{\Alpha}{90}{0}     \draw [tdplot_rotated_coords,domain=90:270] plot ({\radius*cos(\x)}, {\radius*sin(\x)});     \tdplotsetrotatedcoords{\Alpha+90}{90}{0}     \draw [tdplot_rotated_coords,domain=90+\Beta:270+\Beta] plot ({\radius*cos(\x)}, {\radius*sin(\x)});     \tdplotsetrotatedcoords{\Alpha}{\Beta}{0}     \draw [tdplot_rotated_coords,fill=black,fill opacity=0.1,domain=0:90] plot ({\radius*cos(\x)}, {\radius*sin(\x)});          \tdplotsetrotatedcoords{\Alpha}{\Beta}{0}     \draw [tdplot_rotated_coords,domain=-50:0] plot ({\radius*cos(\x)}, {\radius*sin(\x)});               % Arrows for alpha, beta, gamma     \tdplotsetrotatedcoords{0}{0}{0}     \tdplotdrawarc[tdplot_rotated_coords,-latex]{(0,0,0)}{0.8*\radius}{0}{\Alpha}{anchor=east}{$\alpha$}     \tdplotsetrotatedcoords{\Alpha+90}{90}{0}     \tdplotdrawarc[tdplot_rotated_coords,-latex]{(0,0,0)}{0.8*\radius}{-90}{-90+\Beta}{anchor=east}{$\beta$}     \tdplotsetrotatedcoords{\Alpha}{\Beta}{\Gamma}     \tdplotdrawarc[tdplot_rotated_coords,-latex]{(0,0,0)}{0.8*\radius}{-\Gamma}{0}{anchor=east}{$\gamma$}          \tdplotsetrotatedcoords{0}{0}{0}     \tdplotdrawarc[tdplot_rotated_coords,-latex]{(0,0,0)}{0.8*\radius}{90}{90+\Alpha}{anchor=east}{$\alpha$}     \tdplotsetrotatedcoords{\Alpha+90}{90}{0}     \tdplotdrawarc[tdplot_rotated_coords,-latex]{(0,0,0)}{0.8*\radius}{-180}{-180+\Beta}{anchor=east}{$\beta$}     \tdplotsetrotatedcoords{\Alpha}{\Beta}{\Gamma}     \tdplotdrawarc[tdplot_rotated_coords,-latex]{(0,0,0)}{0.8*\radius}{90-\Gamma}{90}{anchor=east}{$\gamma$}          \end{tikzpicture}     \end{document}


title: Drawing Bruhat--Tits trees with TikZ

text: I am not a regular user of TikZ, and I was wondering if there was a quick way of drawing trees that look like ![this](https://encrypted- tbn0.gstatic.com/images?q=tbn%3aANd9GcTqMalkyWU5ptV8ZN1gmdl3wZSFzLTmfgmPAyl9IicEeVCy8Xl4Lg) ? (the picture seems to have been taken from page 71 of J. P. Serre's book on trees). Here is some motivation for my quiry: I am using some elementary rank-one Bruhat--Tits theory in a project that I'm currently writing up, and I feel it would be nicer with some pictures (the main reason I'm using trees rather than matrix computations is to make things more understandable).


title: Who uses the "\smile" symbol, and what for?

text: I am reading a textbook which uses the LaTeX `\smile` symbol (a sort of sideways parenthesis) for concatenation of lists. I have never seen this symbol anywhere before except in the document which lists all LaTeX symbols. It may be that this use of `\smile` for concatenation is standard, and has passed me by. I myself either simply use + for concatenation, or if in pseudo code write it out in words. Anyway, I'm just curious as to this use of the smile symbol.


title: Different heights of elements of subfloat

text: I am using "subfloat" to visualize both an image and a table inside the same figure as follows:               \begin{figure}     \centering     \subfloat[Summary statistics\label{subfig-1:tab}]{%       \begin{tabular}{|l|r|}\hline                 \textbf{Min.}           & 0      \\ \hline                 \textbf{1st Qu.}        & 0             \\ \hline                 \textbf{Median}         & 0         \\ \hline                 \textbf{Mean}           & 88.37  \\ \hline                 \textbf{3rd Qu.}        & 0         \\ \hline                 \textbf{Max.}           & 4356          \\ \hline                 \textbf{Std}        & 404.3     \\ \hline                             \end{tabular}     }     \hfill     \subfloat[Histogram\label{subfig-2:histogram}]{%       \includegraphics[width=0.60\textwidth]{capital_loss_histogram.pdf}     }     \caption{Summary statistics and histogram of the attribute capital-loss}     \label{fig:attribute_capital-loss}     \end{figure}      The problem is that the image is not displayed at the same level as the table, as in the following image: ![The problem](http://i.stack.imgur.com/7JBme.png) How can I fix this?


title: Can I automatically generate abbreviated citations in Tufte documents after the first occurrence?

text: In documents using Tufte document classes (tuft-handout or tuft-book) `\cite` is replaced by a footnote (which appears as a sidenote) corresponding to the full bibliography entry for the cited work. This is fine for the first occurrence, but (generally) not what I want for subsequent occurrences of the same work. _Is there a way to automatically generate abbreviated citations after the first, using_ `\cite` _alone?_ For example, I'd like something like this: ![Rendered MWE](http://i.stack.imgur.com/Q0Wnx.png) But in order to get that I need to manually use something like               \footnote{\citealp{...}}      for citations after the first:               \documentclass[]{tufte-handout}          \begin{document}          This is the first occurrence of a citation,\cite{Deutsch:2002} which works as expected. I would also ideally like to be able to cite the same paper again, and have it appear automatically in some abbreviated form but instead I have to do this manually with a footnote and ERT\footnote{\citealp{Deutsch:2002}}. Is there a way to ensure that citations automatically appear in this "abbreviated" form after the first occurrence in Tufte documents?           \bibliographystyle{unsrtnat}     \bibliography{References}          \end{document}      This not is not only brittle within the document (if the first citation is moved after one of these hand-coded ones) but destroys portability across classes (since the subsequent citations are all explicitly implemented as footnotes). * * * References.bib:               @article{Deutsch:2002,     author = {Deutsch, D},     title = {{The structure of the multiverse}},     journal = {Proceedings: Mathematical, Physical and Engineering Sciences},     year = {2002},     volume = {458},     number = {2028},     pages = {2911--2923},     }


title: xetexCV vertical alignment

text: I'm using Rob Oakes' xetexCV document class. Everything works fine except for the vertical alignment of the years. When there are two lines, the years are aligned to the bottom, I, however want them to be aligned to the top. Consider the following code where 1998-1999 would be aligned to the bottom.               \documentclass[english]{xetexCV}     \usepackage{fontspec}     \setmainfont[Mapping=tex-text]{Minion Pro}     \setcounter{secnumdepth}{2}     \setcounter{tocdepth}{2}     \makeatletter     \cvimage{/Users/bob/somepic.jpg}     \usepackage{cvsplitbib}     \makeatother     \usepackage{xunicode}     \usepackage{polyglossia}     \setdefaultlanguage{english}     \begin{document}     \cvname{Sponge Bob}     \makecvtitle     \cvsection{Academical Degress}     Learnt to make fire under water in the Pacific Ocean\\     (More precisely: Magnetic Island, Australia)\years{1998-1999}     \end{document}      I have found that the years-macro is defined as:               \newcommand{\years}[1]{\marginpar{\hspace{5.13cm}\parbox{3.0cm}{\emph{#1}}}}      How can this be changed to be aligned to the top?


title: How to convert all numbers into math mode

text: I have a table converted from excel. I want to transform the numbers in the table to the math mode, i.e., 15 -> $15$. Is there any visual way I can use it. I am using TexStudio. CODE:               \begin{table}[htbp]       \centering       \caption{Comparison of microaggregation algorithms to protect different datasets for $k=\{3,4,\ldots,10\}$}         \begin{tabular}{cr|rrrrrrrrc}         \multirow{2}[1]{*}{Dataset} & \multicolumn{1}{c|}{\multirow{2}[1]{*}{Method}} & \multicolumn{8}{c}{Information Loss (\%)}                     & \multirow{2}[1]{*}{Elapsed time (sec)} \\               & \multicolumn{1}{c|}{} & $k=3$   & $k=4$   & $k=5$   & $k=6$   & $k=7$   & $k=8$   & $k=9$   & $k=10$  &  \\         \hline         \multirow{3}[1]{*}{\dataset{Tarragona}}  & KD-CBFS & 16.9500 & 19.7700 & 22.8900 & 26.4100 & 28.2600 & 29.3100 & 31.6200 & 33.2600 & $<1$ \\               & V-MDAV & 16.9507 & 19.7695 & 22.8867 & 26.4131 & 28.2616 & 29.3119 & 31.6184 & 33.2601 & $<1$ \\               & FDM   & 15.8548 & 17.8439 & 22.6442 & 25.1970 & 27.7465 & 28.9472 & 30.0313 & 32.8549 & $<1$ \\ \hline         \multirow{3}[0]{*}{\dataset{Census}} & KD-CBFS & 5.6620 & 7.5140 & 9.0070 & 10.3654 & 11.6688 & 12.3068 & 13.3368 & 14.0730 & $<1$ \\               & V-MDAV & 5.6620 & 7.5140 & 9.0070 & 10.3654 & 11.6688 & 12.3068 & 13.3368 & 14.0730 & $<1$ \\                & FDM   & 5.3828 & 7.0645 & 8.7178 & 10.1436 & 11.3940 & 12.6727 & 13.7732 & 14.7735 & $<1$ \\ \hline         \multirow{3}[0]{*}{\dataset{EIA}} & KD-CBFS & 0.4883 & 0.6727 & 1.7764 & 1.3157 & 2.2141 & 2.9910 & 3.4086 & 3.5474 & $<1$ \\               & V-MDAV & 0.4884 & 0.6718 & 1.7693 & 1.3157 & 2.2081 & 2.9917 & 3.4086 & 3.5474 & $1$ \\                & FDM   & 0.4808 & 0.7311 & 1.0678 & 1.3533 & 1.7343 & 1.9019 & 2.0491 & 2.1674 & $<1$ \\ \hline         \multirow{3}[0]{*}{\dataset{Income}} & KD-CBFS & 0.675015 & 0.928399 & 1.19127 & 1.4107 & 1.58581 & 1.80879 & 1.94347 & 2.12738 & $1$ \\                & V-MDAV & 0.655816 & 0.928362 & 1.19121 & 1.41074 & 1.58681 & 1.80878 & 1.94346 & 2.12738 & $90$ \\               & FDM   & 0.593726 & 0.838746 & 1.0747 & 1.30892 & 1.5398 & 1.75383 & 1.95588 & 2.15949 & $1$ \\ \hline         \multirow{3}[0]{*}{\dataset{Forest}} & KD-CBFS & 0.494946 & 0.703865 & 0.885494 & 1.05023 & 1.20079 & 1.33881 & 1.46986 & 1.59104 & $67$ \\               & V-MDAV &       &       &       &       &       &       &       &       & $>3600$ \\               & FDM   & 0.426531 & 0.608566 & 0.782772 & 0.952619 & 1.11867 & 1.28177 & 1.44231 & 1.59784 & $65$ \\ \hline         \end{tabular}%       \label{tab:results1}%     \end{table}%


title: Numbering of listings

text: I would like to numerate listings according to sections. If the listing is in subsection then it should have subsection numbers. This example is very good and I'm using it for some other numbering, but it gives me error because I can't seem to guess the parameter for `renewcommand`               \renewcommand{\thelstlistingname}{%       \ifnum\value{subsection}=0         \thesection.\arabic{lstlistingname}%       \else         \ifnum\value{subsubsection}=0           \thesubsection.\arabic{lstlistingname}%         \else           \thesubsubsection.\arabic{lstlistingname}%         \fi       \fi     }      This is the MWE               \documentclass[11pt]{article}     \usepackage{listings}     \renewcommand{\lstlistingname}{Pseudokod}           \begin{document}     \section{Section}     \subsection{Subsection}          \begin{lstlisting}[caption=Pseudokod za algoritam segmentacije slike u boji.]       ...       ucitaj sliku       ucitaj zeljeni prag ili pragove za segmentaciju       podijeli sliku na kanale //ako je u pitanju RGB slika podijela je na R, G i B kanal boje       primjeni prag na svakom kanalu       AND operacija na kanalima       prikazi sliku       ...     \end{lstlisting}     \end{document}        Since the listing is in section 1.1 I would like it to be numbered like 1.1.1. Next listing in that section would be 1.1.2, etc.


title: Tikz: Styling a node to display text on the right of a dot

text: I am trying to create a LaTeX document using the Tikz library, more particularly an E/R Diagram. I have downloaded the `tikz-er2` additional library, but I am having an issue with the display of attributes. In my class we've always used a different notation, putting the name of the attribute on the right of a dot, and linking the entity to this dot. How would I accomplish this using tikz styling? EDIT: This is a (very) simplyfied version of my code, which compiles just fine:               \documentclass[a4paper,12pt,landscape]{article}          \usepackage[landscape]{geometry}     \usepackage{graphicx}          \usepackage{tikz-er2}     \usepackage{verbatim}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{5pt}          \begin{document}          \thispagestyle{empty}          \usetikzlibrary{positioning}     \usetikzlibrary{shadows}          \tikzstyle{every entity} = [top color=white, bottom color=blue!40,                                  draw=blue!20!black!70, drop shadow, thin, rounded corners=2pt]     \tikzstyle{every attribute} = [shading=radial, inner color=white, outer color=yellow!50!gray!20!white,                                     draw=yellow, node distance=1cm, drop shadow, thin,align=center]          \centering     \begin{tikzpicture}[node distance=1.5cm]            \node[entity] (ent1) {Entity1};       \node[attribute] (attr1) [right=of ent1] {\key{Attr1}} edge (ent1);          \end{tikzpicture}          \end{document}      The above code produces this diagram: ![enter image description here](http://i.stack.imgur.com/XQZf5.png) But I am trying to accomplish something like this: ![enter image description here](http://i.stack.imgur.com/yM1Yo.png)


title: Get number of elements in enumerate

text: Suppose, I have the following code:               \documentclass{article}     \begin{document}     We have totally 7 columns, describing the user:     \begin{enumerate}     \item ID --- users.name     \item Forename --- users\_profiles.first\_name     \item Surname --- users\_profiles.last\_name     \item Email --- users.mail     \item Primary Service --- services.name     \item Start date --- FROM\_UNIXTIME(users.created)     \item Employment Status --- users\_profiles.employment\_status     \end{enumerate}     \end{document}      Producing this document: ![enter image description here](http://i.stack.imgur.com/jD3HM.png) Is it possible to set the value 7 automatically, depending upon number of elements in the list? The problem is, that it resides before the list.


title: ToC on the title page in a report

text: I am writing a thesis, and as long as it's a draft, I would like to keep the amount of non-content to a minimum. That said, I would like my title page to be just a heading with the name of the thesis, a short abstract and the ToC. The ToC itself is problematic for me. Using report, the ToC does reserve a full page for itself, probably given the chapter-style heading. I have tried several packages (like minitoc, titletoc, ...) to no avail, I have tried redefining the command, but that only worked in article mode. So I only need the contents of the ToC, without the heading (or without the heading forcing a new page), to be generated.


title: How do I make [\makeindex] work fully on my WinXP system (works on a different system)

text: I cannot create glossaries on my WinXP setup of MiKTeX 2.8, which I installed about half a year ago together with a TeXnicCenter from a distribution that I downloaded from TUG. The document does compile correctly on my friend's LaTeX setup (on a Linux computer), so as far as I can tell the code is correct, but something is wrong with my compiler. The following three lines appear in the Output Window of TeXnicCenter: > >     Couldn't find input index file C:\Test-mapp\Testfil nor >     C:\Test-mapp\Testfil.idx. >   >     Usage: C:\Program Files\MiKTeX 2.8\miktex\bin\makeindex.exe >     [-ilqrcgLT] [-s sty] [-t log] [p num] [idx0 ix1 ...] >   >     Scanning style file >     C:/Test-mapp/Testfil.ist...........................done (27 attributes >     redefined, 0 ignored). >   In my document, I have the following lines:               \usepackage{glossaries} % this is in the preamble          \makeglossaries % also in the preamble          \printglossaries % in one of the sections of the document      Since the document compiles on my friend's system, I am quite sure that the problem is with my compiler, not the LaTeX code. Do you have any suggestions on what is happening or what I can do to solve this? Other functions of the glossaries package do work also on my system, like for example the use of abbreviations, so I do have the package installed. It is only \makeindex that does not work. edit: Thank you for your input. The code below does not generate any glossaries on my system, and I believe it should.               \documentclass{article}          \usepackage{glossaries}               \newacronym{SEM}{SEM}{scanning electron microscope}          \newacronym{TEM}{TEM}{transmission electron microscopy}          \newacronym{UHV}{UHV}{ultra-high vacuum}          \makeglossaries          \begin{document}               \section{First Section}          \label{Intro}          Intro          \section{List of variables}          \label{LoV}          \printglossaries           \end{document}


title: Are there any (La)TeX editors that accept pasting rich text?

text: If I copy text to the clipboard from a PDF file, web page, email, or Word document and then paste it to Word or Thunderbird, it is recognized as rich text and converted to Word's or Thunderbird's native format. Does anyone know of a LaTeX GUI (editor) that can do the same? For example, if I copy "Do _this_ **now!!!** " from this webpage and paste it into my favorite LaTeX editor, it should become `Do \emph{this} \textbf{now!!!}`. But all the LaTeX editors I've ever tried will handle pastes as plain text. **Addendum:** There's nothing technically difficult about accepting _some_ rich text features from pastes. Applications put objects on the clipboard in multiple formats, and the receiving application can choose a format it can handle. Any editor could request HTML and map all sorts of structured mark-up to LaTeX, from bold or centering to hyperlinks, to section headings and table structure, etc. Is there really no LaTeX editor that goes to the trouble?


title: xeLaTeX: Not enough room in an internal buffer

text: So i'm compiling and this is what it says. The documentation is extensive. Does anyone know how to fix this?


title: \takeargs{n} = take n arguments and print them, space separated?

text: I'm looking for a command `\takeargs{n}` (in either TeX or LaTeX) such that               f \takeargs{n} {x_1} ... {x_n} = f\ x_1\ ...\ x_n      , that is (if I understood that part)               \takeargs{0} =     \takeargs{n} \sometoken = \ \sometoken \takeargs{n-1}      Background: In my document, I define some functions (in Haskell-Syntax, which uses spaces for function application). On my constant striving towards don't-ever-repeat-yourself, I'd like to have newcommands for them defined automatically as I go, so I can write               \declarefunction{LaunchRockets}{2}{Coords}{Warhead}{IO ()}     % ^ Prints the function name and type and creates \CallLaunchRockets     % ...     Let $p$ be the target coordinates. Then for a huge boom we could e.g.     do a $\CallLaunchRockets p \Nuclear$ ...     % ^ Expands to $\mycodefont{LaunchRockets}\ p\ \Nuclear$


title: Failure to insert into document an .eps figure generated by OriginPro 8

text: When using the following code to insert an eps file created in `OriginPro 8`:               \begin{figure}[!hb]          \epsscale{0.4}          \plotone{Graph1.eps}          \caption{Random caption here.}          \end{figure}      No image appears in the compiled pdf, and the following error is returned twenty (20) times:               File         Type     Line     Message     Graph1.eps   error    line442  Text line contains an invalid character \plotone{Graph1.eps}      I am required to eps figures for this document, with no other graphics formats permitted. The `.eps` file itself opens perfectly well in (for example) Adobe Illustrator. Thanks in advance for your help.


title: Is it safe to update LaTeX package with tlmgr on debian?

text: I using debian (unstable) and have installed most of my LaTeX packages from the official repositories (except few ones which I copied directly inside a folder recognized by `texhash`). I just learned it is possible to update package with `tlmgr` utility and commands like :               tlmgr update --self --all      I am wondering how this command is "safe" on my debian. Indeed, if I update my texlive distro like this, my packages will be newer than what debian offers (inside meta-packages like `texlive-latex-extra`). So, what happens when there is a debian update? Isn't there some kind of conflict?


title: Create custom logic symbols for TikZ circuits

text: I would like to use custom logic symbols with the TikZ `circuit` library. For example some symbols of the 7400 series. What would be the best approach to easily create different symbols, that cant be used with the `circuit` library? Here an example of an 74hc238: ![74hc238](http://i.stack.imgur.com/qq2Ck.png)


title: Beamer - aligning text and images in columns

text: I am making a slide with beamer where I would like to have 3 columns, each with an image and a caption underneath. The images are to be animated. While I got the images to align nicely, I'm having some difficulty with the captions. In particular, I am unable to position them under the image. Here is my code for the frame:               \frame{     \begin{column}{0.3 \textwidth}     \centering         \includegraphics<1>[scale=.3]{subplotA1}             \includegraphics<2>[scale=.3]{subplotA2}             \includegraphics<3>[scale=.3]{subplotA3}         caption A          \end{column}          \begin{column}{0.3 \textwidth}     \centering         \includegraphics<1>[scale=.3]{subplotB1}             \includegraphics<2>[scale=.3]{subplotB2}             \includegraphics<3>[scale=.3]{subplotB3}         caption B     \end{column}          \begin{column}{0.3 \textwidth}     \centering         \includegraphics<1>[scale=.3]{subplotC1}             \includegraphics<2>[scale=.3]{subplotC2}             \includegraphics<3>[scale=.3]{subplotC3}                  caption C              \end{column}               \end{columns}     }


title: (How) Can I write a .dtx file without having to comment out *everything*?

text: I have a reasonable understanding now of how `.dtx` files work. But it's a great pain having to put a `%` character before every line of documentation. Also, depending on which editor you're using, it basically means: _no syntax highlighting_. This problem has been noted before. But the only solutions offered were about editor settings. Plus, even if we forget about syntax highlighting, the `%` thing is just... inconvenient. So I'm looking for a way to dispense with all the commenting. Basically, I'd like to delimit documentation code using guard modifiers. Something like this:               %<*documentation>     I'm going to introduce a cool new \LaTeX macro:     \begin{macrocode}     %</documentation>          \newcommand{\CoolNewMacro}{...}          %<*documentation>     \end{macrocode}     Cool, huh?     %</documentation>      I think I could figure out how to do it by first extracting the documentation code into a separate file. But... do I need to? Is there a better way?


title: Can't use collectcell within environment on last column if missing trailing \\ on last line

text: Well it's embarrassing question time again. What am I doing wrong here with the `collcell` package? I have used this pacakge often, but am stumped on this trivial example. I have defined a `newcolumntype`, `C` which applies a color to the text. This works fine, but _only_ on the first column. It fails if I attempt to use on the second column with: > ! Argument of `\collect@cell@arg` has an extra }. `\par` l.20 `a & b \\\` The MWE as below yields the following which illustrates that the `collcell` package is doing its job: ![enter image description here](http://i.stack.imgur.com/BlW6a.png) ## Notes:   * This example could certainly be done with just the `array` pacakge, but I need to use `collcell` as there is more processing that needs to be done. ## Code:               \documentclass{article}     \usepackage{xcolor}     \usepackage{collcell}          \newcommand*{\NewData}[1]{\textcolor{red}{#1}}%     \newcolumntype{C}{>{\collectcell\NewData}c<{\endcollectcell}}          \newenvironment{MyTabular}[1]{% ignore user specified column spec for now...         \begin{tabular}{Cr}% <--- This works just fine         %\begin{tabular}{rC}% <--- but this does not!!         %\begin{tabular}{CC}% <--- neither does this does (I want this)!!     }{%         \end{tabular}%     }%          \begin{document}     \begin{MyTabular}{ll}         a & b \\         c & d     \end{MyTabular}     \end{document}


title: TeX Live in .iso or .exe file

text: Is there a way to get TeX Live in a `.iso` or `.exe` file with all required files and packages instead of downloading the net downloader/installer? I would download TeX Live just one time, and install it where I need without waiting every time long hours for the download. Also if the TeX Live version couldn't be the last; one time that I have installed I can update it with the TeX Live Manager...


title: Half-point size fonts in LaTeX

text: How can I get a half point size in LaTeX? Many books use 10.5 pt. Setting point size to 10.5 seems to have no effect. Is there a package that can do that?


title: hyperref and \renewcommand\appendix

text: `hyperref` messes up with `\renewcommand\appendix`. This even tho `\appendix` is renewed _exactly_ as it is defined in `report.cls` (and works with `hyperref` !) The problem: .toc file 4th entry of `\contentsline` changes (i.e links go wrong). Without redefining `\appendix` .toc file is               \contentsline {chapter}{\numberline {1}Chap}{2}{chapter.1}     \contentsline {chapter}{\numberline {A}App}{3}{appendix.A}      As `\appendix` is redefined, .toc file becomes               \contentsline {chapter}{\numberline {1}Chap}{2}{chapter.1}     \contentsline {chapter}{\numberline {A}App}{3}{chapter.1}      MWE:               \documentclass{report}     \usepackage{hyperref}     %\makeatletter     %\renewcommand\appendix{\par     %  \setcounter{chapter}{0}%     %  \setcounter{section}{0}%     %  \gdef\@chapapp{\appendixname}%     %  \gdef\thechapter{\@Alph\c@chapter}}     %\makeatother     \begin{document}     \tableofcontents     \chapter{Chap}     \appendix     \chapter{App}     \end{document}      Why? And how to fix?


title: What is a trapped pdf?

text: I noticed in the `hyperref` documentation that there is an entry for `pdftrapped` in the `hypersetup`. I went over google to find out what it was, but all I came up with was this: https://groups.google.com/forum/#!topic/latexusersgroup/rXrrHOpbbxU which, in my opinion, does not answer the question. So, what is a trapped pdf? Why are we able to set it up with `hyperref`? What does it mean for our .pdf document? and how does it translate to our printed version?


title: Avoiding the floating symbols when exporting (eps + Latex) from Inkscape

text: I am following the CTAN documentation for exporting an SVG image with LaTeX symbols from Inkscape to embed as an EPS figure in my latex document. MWE is below:               \documentclass[]{article}     \usepackage{epsfig,graphicx,amsmath,amsfonts}     \usepackage{xcolor,import}     \usepackage{transparent}     \begin{document}      \begin{figure}[h]        \centering          \def\svgwidth{70mm}           \import{}{foo.eps_tex}        \end{figure}     \end{document}      where the file `foo.eps_tex` is generated from Inkscape (File -> Save As... -> Encapsulated PostScript (*.eps) -> EPS+LaTeX). The original Inkscape drawing is shown below: ![enter image description here](http://i.stack.imgur.com/aALIn.png) and the resulting image in the PDF (LaTeX + DVItoPs + PStoPDF ) is as seen below: ![enter image description here](http://i.stack.imgur.com/YADQO.png) Though, more or less, the symbols are pretty much where I wanted them, they are not placed exactly at the place as per the original SVG drawing. Of course, I could always go back to my drawing, tweak a little and generate the PDF to see if it looks OK. However, I have many such figures to make and this process is not desirable. How do I get my LaTeX symbols not float when I export the SVG? The `foo.eps_tex` file is appended below.               \begingroup%     \makeatletter%     \providecommand\color[2][]{%     \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package  'color.sty' is not loaded}%     \renewcommand\color[2][]{}%     }%     \providecommand\transparent[1]{%     \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%     \renewcommand\transparent[1]{}%     }%     \providecommand\rotatebox[2]{#2}%     \ifx\svgwidth\undefined%     \setlength{\unitlength}{495.90927734bp}%     \ifx\svgscale\undefined%       \relax%     \else%       \setlength{\unitlength}{\unitlength * \real{\svgscale}}%     \fi%     \else%     \setlength{\unitlength}{\svgwidth}%     \fi%     \global\let\svgwidth\undefined%     \global\let\svgscale\undefined%     \makeatother%     \begin{picture}(1,0.91319971)%     \put(0,0){\includegraphics[width=\unitlength]{foo.eps}}%     \put(0.12591704,0.64997299){\color[rgb]{0,0,0}\makebox(0,0) [lb]{\smash{$\Gamma_s$}}}%     \put(0.12401264,0.02224006){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$\Omega_ \infty$}}}%     \put(0.45672106,0.40227734){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$\Omega_s$}}}%     \put(0.22841188,0.84721223){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$p^{\mathrm{inc}}$}}}%     \put(0.70651045,0.02827193){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$\Gamma_s^e$     $\mbox{Element}$}}}%     \put(0.86737431,0.22302397){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$\mbox{Node}$}}}%     \end{picture}%     \endgroup%      The reason for using `\import` instead of `\input` is to be able to provide the path for the figure data. For example if the Inkscape file `foo.svg` and the corresponding `foo.eps_tex` are located in `./Chapter1/` then I would use (also see a similar question here)               \import{./Chapter1/}{foo.eps_tex}


title: Plot doesn't care about axis setting

text: I have a Pgfplot and for some reason it does not care about my y-axis settings... I have set ymax to 15 but for some reason it only goes up to ymax is 14 or something... Can anyone explain why? And how I fix this? Since my plot is based on coordinate data (and the complete source) exceeds the input limit of a question you can download the complete source here: http://pastebin.com/nwNwuFam However I also noticed that this also occures when I don't set any coordinate data... ![enter image description here](http://i.stack.imgur.com/idcST.jpg)               \documentclass{standalone}     \usepackage{graphics}     \usepackage{siunitx}     \usepackage{tikz}     \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}     \pgfplotsset{compat=newest}     \pgfplotsset{plot coordinates/math parser=false}          \begin{document}      \begin{tikzpicture}          \pgfplotsset{%       width=4cm,       height=4cm,       scale only axis,       every x tick label/.append style={font=\scriptsize\color{gray!80!black}},       xmajorgrids,       xminorgrids,       every y tick label/.append style={font=\scriptsize\color{gray!80!black}},       ymajorgrids,       yminorgrids     }          \begin{axis}[%     xmin=0, xmax=0.015,     xlabel={Time [\si{\second}]},     ymin=-10, ymax=15,     ylabel={$x_i$},     scaled x ticks=base 10:2]          \addplot [     color=blue,     solid     ]     coordinates{};          \addplot [     color=green!50!black,     solid     ]     coordinates{};          \end{axis}          \end{tikzpicture}     \end{document}


title: please help me fit my equation into my margins!

text: I have this equation. It is quite wide, and I've had to split things over two lines. However, the part to the left of the `=` is quite long, and it's causing me some issues. I've posted a MWE here. This produces the following that I could just about live with (it is 7.6 pt too wide apparently): ![This is OK](http://i.stack.imgur.com/NKZxB.jpg) The problem is that when I have the same equation in my full document, it adds extra space after the `=` and is now definitely not OK: ![This is not OK](http://i.stack.imgur.com/T9DLQ.jpg) I presume this is a consequence of the longer equation number. Can anyone suggest a way to get my equation fitted into the margins? I have thought of breaking the line after the `=` sign, but I'd like the `=` sign on the lower line to line up and that's the one that is spilling off to the right. I have also thought of breaking before the `=`, and aligning the `=` signs at the left hand end, which would be the best solution, but I honestly can't work out how to do it. I suspect I need some combination of `gather`/`split` or something, but it's doing my head in!               \documentclass[12pt, a4paper, oneside, fleqn]{report}          % Page geometry etc     %----------------------------     \usepackage{setspace}                % allow different line spacing     \renewcommand{\topfraction}{0.85}     \renewcommand{\textfraction}{0.1}     \usepackage[top=2.5cm, left=3.5cm, bottom=2.5cm, right=2.5cm, includehead]{geometry}     \geometry{headheight=28pt, headsep=18pt}          % Maths stuff     %------------     \usepackage{amsmath}          \begin{document}          \onehalfspacing     \mathindent=\parindent          The equation below is too wide for the page margins. The question is how best to format it so that it looks sensible but doesn't spill off the right hand margin?     \begin{alignat}{2}     {\textstyle \frac{1}{2}} \textrm{Cov}(\Delta_{i,p1}-\Delta_{i,p2},\Delta_{j,p1}-\Delta_{j,p2})     & = && {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p1},\Delta_{j,p1})     + {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p2},\Delta_{j,p2})  - \notag \\     &   && {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})     - {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p2},\Delta_{j,p1}) \\     & = && \textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})|_{p1=p2}     - \textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})|_{p1 \ne p2}     \end{alignat}               \end{document}      **UPDATE:** I've just had a go with gather, but now my equation numbers are way off to the right, even in my test document:               \begin{gather}     {\textstyle \frac{1}{2}} \textrm{Cov}(\Delta_{i,p1}-\Delta_{i,p2},\Delta_{j,p1}-\Delta_{j,p2}) \notag \\     \begin{alignat}{2}     & = {} && {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p1},\Delta_{j,p1})     + {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p2},\Delta_{j,p2})  - \notag \\     &   && {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})     - {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p2},\Delta_{j,p1}) \\     & = {} && \textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})|_{p1=p2}     - \textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})|_{p1 \ne p2}     \end{alignat}     \end{gather}      ![gather](http://i.stack.imgur.com/Ts3Gh.jpg)


title: Combine single and double space

text: I need to write a bibligraphy with single space for each entry, but double space between entries, before inserting the bibliography I write               \begin{singlespace}      which makes the whole thing single spaced, is there a way I can order that between entries there should be double space?               \documentclass{report}          \usepackage{booktabs}     \usepackage{tabularx}     \usepackage{multirow}     \usepackage{setspace}           \usepackage{titlesec}          \RequirePackage{setspace}[1998/04/8]          \begin{document}          \title{Three Essays on Meritocracy for Teachers and Teacher Quality in Colombia}           \tableofcontents            \listoffigures           \listoftables          \topmatter{Acknowledgments}          \topmatter{Abstract}          \clearpage          \newpage          \newpage \addcontentsline{toc}{chapter}{References}            \begin{singlespace}          bibligraphy should go here          \end{singlespace}       * * * The document class is report and the relevant packages are \usepackage{booktabs} \usepackage{tabularx} \usepackage{multirow} \usepackage{setspace} \usepackage{titlesec} \RequirePackage{setspace}[1998/04/8] And this is what I'm running \title{Three Essays on Meritocracy for Teachers and Teacher Quality in Colombia} \tableofcontents \listoffigures \listoftables \topmatter{Acknowledgments} \topmatter{Abstract} \clearpage \newpage \newpage \addcontentsline{toc}{chapter}{References} \begin{singlespace} bibligraphy should go here \end{singlespace} Thanks!