title: Upright greeks in Asana-math?

text: I'm using   * XeTeX,   * unicode-math with   * Asana-math.otf and required to make all greek letters in math -- upright. Asana-math seem to have upright greek letters: ![enter image description here](http://i.stack.imgur.com/QVF2D.jpg) (on the contrary I can't find italic greek letters in the file). But if I call `\mathnormal` I don't get any output at all:               \documentclass{article}          \usepackage{fontspec} % enagles loading of OpenType fonts     \usepackage{polyglossia} % support for languages          % fonts:     \defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} % without this XeLaTeX won't turn "--" into dashes     \setmainfont{DejaVu Sans}     \setsansfont{DejaVu Sans}     \setmonofont{DejaVu Sans Mono}          % math:     \usepackage{amsmath} % for some math commands/symbols     \usepackage{amssymb} % for commands like \gg and \ll     \usepackage{mathtools} % for things like Vmatrix*     \usepackage{IEEEtrantools} % for advanced typesetting like multiline equations, and the likes.     \usepackage{unicode-math} % to use unicode in the formulas -- to improve readability of sources     \setmathfont{Asana-Math.otf} % it is important to have this line after the amsmath, mathtools and other maths          \begin{document}          Test upright greeks:     \begin{IEEEeqnarray}{rCl}       α & = & \mathnormal{α} \;.     \end{IEEEeqnarray}          \end{document}      I get no upright letter at all: ![enter image description here](http://i.stack.imgur.com/ch4uO.jpg) Is there a way I can get upright greeks with unicode-math, Asana-math font? **Edit** : I thought maybe it's a font issue. So I tried `Latin Modern Math`:               \setmathfont[Path=fnt/]{latinmodern-math.otf}      but no luck! **Edit 2** : In my complex setup I get issues with sqrt and few other symbols -- when I specify range as in egreg solution. I added expression with sqrt to egreg's solution to reproduce the error: ![enter image description here](http://i.stack.imgur.com/eKdcs.jpg) As You see I can't reproduce the sqrt issue, but I get box on the second line. **Edit 3** : After I upgraded unicode-math to `0.7e` I can reproduce the sqrt issue: ![enter image description here](http://i.stack.imgur.com/EzDRQ.jpg) Here's a full log. I read it and I noted:               Missing character: There is no ϵ in font [Asana-Math.otf]/ICU:script=math;lang     uage=DFLT;mapping=tex-text;!     Missing character: There is no ≫ in font cmr10!     Missing character: There is no ≪ in font cmr10!      lines. So probably have outdated `Asana-Math.otf`. **Edit 4** : After I updated `Asana-Math` the epsilon issue is resolved, but not the sqrt one: ![enter image description here](http://i.stack.imgur.com/uHC99.jpg) And I still get:               Missing character: There is no ≫ in font cmr10!      What is that `cmr10`?


title: Combine geometry and KOMA-Script’s DIV calculation (or: Make \newgeometry only set the explictitly given values)

text: I wonder if it is possible to combine `geometry` and the type area calculation of KOMA-Script. I’d like to use the calculated area but set (e.g.) the top margin to 1cm, without touching the other values. The problem is that `\newgeometry` set the explicitly given values (`top=1cm`) – which is desired – but it also sets the not given values (like `bottom`, `left`, `right` etc.) to `geometry`’s defaults. An alternative question is:   **How can I make`\newgeometry` set only the explictit given values?**               \documentclass[DIV=calc]{scrartcl}          \usepackage[pass,showframe]{geometry}     \newgeometry{top=1cm}               \begin{document}     Text     \end{document}      Please edit the question title if you can provide a better one than I do …


title: Using \columncolor outside column definition

text: I'm trying to create a command, which calls on an environment, which defines a custom column definition with one argument using `\newcolumntype`, and defines a second command, containing parameters for a table column. Then, still within the first command, I begin the tabular environment and call the custom column, with the second command as its argument. I always get an undefined control sequence error, though. Any thoughts on why that might be? I'm sure that was clear as mud, but I've cut it down to a minimal example, which follows:               \documentclass{article}     \usepackage{array}     \usepackage[table,dvipsnames]{xcolor}     \usepackage{colortbl}          \newenvironment{tablecolor}{         \newcommand{\tlight}{\columncolor{SkyBlue!30}\color{black}}         \newcolumntype{C}[1]{>{##1}c}     }{}          \newcommand{\tablegoals}{     \begin{tablecolor}     \begin{tabular}{l|C{\tlight}}     Goal 7  & \\     \end{tabular}     \end{tablecolor}     }          \begin{document}         \tablegoals     \end{document}      * * * Here's my second attempt. Different approach, same undefined control sequence error with `\columncolor`.               \documentclass{article}     \usepackage{array}     \usepackage[table,dvipsnames]{xcolor}     \usepackage{colortbl}     \usepackage{ifthen}          \newenvironment{tablecolor}{         \newcolumntype{C}[1]{>{             \ifthenelse{\equal{dark}{##1}}{                 \columncolor{Cyan}\color{white}                 }{                 \columncolor{SkyBlue!30}\color{black}             }         }c}     }{     }          \newcommand{\tablegoals}[1]{         \begin{tablecolor}             \begin{tabular}{l|C{dark}}                 Goal 7  &   #1             \end{tabular}         \end{tablecolor}     }          \begin{document}         \tablegoals{Check mark}     \end{document}


title: Aligning the bottom of a picture and a chapter title

text: Consider the following example, where the chapter number is ginormous and put in a blue box:               \documentclass[svgnames]{scrbook}          \usepackage{titlesec}     \usepackage{tocloft}     \usepackage{tikz}               \usepackage{lipsum}% http://ctan.org/pkg/lipsum               \tikzstyle{block} = [rectangle, draw, fill=blue!20,          text width=5em, text centered, rounded corners, minimum height=4em]     \renewcommand*{\chapterformat}{%     \begin{tikzpicture}[node distance = 2cm, auto]%         \node [block] (init) {\fontsize{80}{88}\selectfont\thechapter};%     \end{tikzpicture}\enskip}               \begin{document}          \chapter{Short Title}          \section{Rectangular coordinates} \lipsum[1]     \section{Projections of a segment on the axes} \lipsum[2]     \section{Distance between two points} \lipsum[3]     \section{The mid-point of a segment} \lipsum[4]     \section{Division of a segment in any ratio} \lipsum[5]     \section{Oblique coordinates} \lipsum[6]          \chapter{Title Which is Really Just Way Too Long}          \section{First illustrations} \lipsum[1]     \section{Curve plotting} \lipsum[2]     \section{Test that a point lie on a curve} \lipsum[3]     \section{Intercepts} \lipsum[4]     \section{Points of intersection of two curves} \lipsum[5]     \section{Oblique coordinates} \lipsum[6]          \end{document}      The first chapter is fine: the baseline of the rectangle is aligned with the baseline of the title. This is not the case for the second chapter, however. Is there a way to fix this, so that the baseline of the blue box is aligned with the baseline of the chapter title, regardless of length? This is tricky because in the body of the document, there are several possible solutions. But all won't work (apparently) when formatting a chapter heading. And of course, if you can think of a better way to make this big ol' blue box, I'd be happy to hear about it! :)


title: Myanmar (Burmese) line breaking with XeLaTeX

text: I am having trouble getting Myanmar text to break at the end of lines properly. The previous question How do I wrap text that doesn't use SPACE character to segment word would appear to solve my problem. However, it is not working for me. I am on Linux Mint. XeTeX version is 0.9995. Here is what my document looks like _(font source:Padauk SIL Font)_:               \documentclass{article} % save as utf-8, run with xelatex     \usepackage{fontspec}     \XeTeXlinebreaklocale "my"     \XeTeXlinebreakskip = 0pt plus 0.1pt          \begin{document}     \fontspec[Script=Myanmar]{Padauk}     လၢထံးလၢသီန့ၣ်ယွၤတ့လီၤမူခိၣ်ဒီးဟီၣ်ခိၣ်လီၤ ... (multiple paragraphs of text)     \end{document}      Running this through XeLaTeX, I get an error: `Undefined control sequence \XeTeXlinebreaklocale`, etc.. It appears that the compiler knows nothing about the `\XeTeXlinebreaklocale` \- do I need to include some additional package? If I remove the `\XeTeXlinebreaklocale` and `\XeTeXlinebreakskip` lines, my document compiles very nicely... with Myanmar text breaking only on spaces (but, unfortunately, not even on zero width spaces). So, the basic question is, what am I doing wrong here. How do I get the 'my' line breaking local to work? OR How do I get XeLaTeX to break lines on zero width spaces? OR What is the correct way to typeset Myanmar text? Note: This is actually not Myanmar, it's Sgaw Karen - which is implemented in Unicode as a subset of Myanmar. It's rules are much simpler than Myanmar: a line may break directly before a set of 25 characters. Is there an easy way to do that? If so, that would be the very best solution.


title: multicols breaking in middle causing out of ordered matrix

text: The following example shows that multicols treats pagebreaks as separate orderings.               \documentclass{article}          \usepackage[margin=0.5in]{geometry}\geometry{a4paper}     \usepackage{multicol,tikz}     \scrollmode          \begin{document}     \newcommand{\drawrect}[1]{\begin{tikzpicture} \draw (-1.5,-1.5) rectangle (1.5,1.5); \node at (0,0) {#1}; \end{tikzpicture}}          \begin{multicols}{3}\raggedright     \drawrect{1}     \drawrect{2}     \drawrect{3}     \drawrect{4}     \drawrect{5}     \drawrect{6}     \drawrect{7}     \drawrect{8}     \drawrect{9}     \drawrect{10}     \drawrect{11}     \drawrect{12}     \end{multicols}          \renewcommand{\drawrect}[1]{\begin{tikzpicture} \draw (-2.5,-3.5) rectangle (2.5,3.5); \node at (0,0) {#1}; \end{tikzpicture}}          \begin{multicols}{3}\raggedright     \drawrect{1}     \drawrect{2}     \drawrect{3}     \drawrect{4}     \drawrect{5}     \drawrect{6}     \drawrect{7}     \drawrect{8}     \drawrect{9}     \drawrect{10}     \drawrect{11}     \drawrect{12}     \end{multicols}          \end{document}       I want the 2nd ordering to be exactly like the first. Example using parcolumns:               \documentclass{article}          \usepackage[margin=0.5in]{geometry}\geometry{a4paper}     \usepackage{multicol,tikz}     \usepackage{parcolumns}     \scrollmode          \begin{document}     \newcommand{\drawrect}[1]{\begin{tikzpicture} \draw (-1.5,-1.5) rectangle (1.5,1.5); \node at (0,0) {#1}; \end{tikzpicture}}          \begin{parcolumns}[nofirstindent]{3}     \colchunk{     \drawrect{1}     \drawrect{2}     \drawrect{3}     \drawrect{4}}     \colchunk{     \drawrect{5}     \drawrect{6}     \drawrect{7}     \drawrect{8}}     \colchunk{     \drawrect{9}     \drawrect{10}     \drawrect{11}     \drawrect{12}}     \end{parcolumns}          \renewcommand{\drawrect}[1]{\begin{tikzpicture} \draw (-2.5,-3.5) rectangle (2.5,3.5); \node at (0,0) {#1}; \end{tikzpicture}}          \begin{parcolumns}[nofirstindent]{3}     \colchunk{     \drawrect{1}     \drawrect{2}     \drawrect{3}     \drawrect{4}}     \colchunk{     \drawrect{5}     \drawrect{6}     \drawrect{7}     \drawrect{8}}     \colchunk{     \drawrect{9}     \drawrect{10}     \drawrect{11}     \drawrect{12}}     \end{parcolumns}               \end{document}


title: Align cell height of the tabularx rows

text: The following latex code prints rows one at a time. However all the cells of the rows don't come out aligned. How can I fix it.               \documentclass{beamer}         \usepackage{tabularx}            \begin{document}          \begin{frame}{}      \begin{tabularx}{3.50in}{lXX}               \hline               & Observation & Conclusion \\               \hline                 \uncover<2->{1.} & \uncover<2->{Observation 1 } & \uncover<2->{Conclusion 1} \\       \uncover<3->{2.} & \uncover<3->{Observation 2} & \uncover<3->{Conclusion 2} \\               \end{tabularx}          \end{frame}       \end{document}      The output looks as follows : ![enter image description here](http://i.stack.imgur.com/JVhU7.png) As we can see cells in first column do not align with the rest of the rows. Will appreciate any input as to how to fix this.


title: algorithm2e - Apply commands to content block of IF ... THEN ... ELSE

text: In the following picture, I use a verbose but very pedagogical style for algorithms. ![enter image description here](http://i.stack.imgur.com/nYzXB.png) I would like to automatically use macros that act on the content of block like in the first example but with typing just the 2nd one. Juste see the MWE. This will allow to always type the same LaTeX code but to use them in different.               \documentclass[10pt,a4paper]{article}         \usepackage[vlined]{algorithm2e}              \newcommand\BlockIf[1]{\KwSty{Start If} \\ #1 \\ \KwSty{End If}}         \newcommand\BlockElseIf[1]{\KwSty{Start Else If} \\ #1 \\ \KwSty{End Else If}}         \newcommand\BlockElse[1]{\KwSty{Start Else} \\ #1 \\ \KwSty{End Else}}          \begin{document}          \begin{algorithm}[H]         \uIf{1}{\BlockIf{if...}}         \uElseIf{2}{\BlockElseIf{else if...}}         \Else{\BlockElse{else...}}     \end{algorithm}           \begin{algorithm}[H]         \uIf{1}{if...}         \uElseIf{2}{else if...}         \Else{else...}     \end{algorithm}           \end{document}


title: Write a macro which is called with \begin and \end

text: I would like to write a macro `scaleblock` which takes 2 arguments `title` and `content`. It can be called like:               \begin{scaleblock}{a_title}        a_content     \end{scaleblock}      And it is equivalent to the follows:               \begin{block}{\scalebox{0.8}{a_title}}       \scalebox{0.8}{\vbox{a_content}}     \end{block}      Does anyone know how to write this kind of macro (with `\begin` and `\end`)?


title: Too many commas in name: Using Jabref and Texmaker

text: I'm using the natbib package in Latex with the \bibliographystyle{apalike}. I'm getting errors from my citations and it's due to how I'm listing the authors. The error I'm getting is "Too many commas in name 1 of..." with any citation with three or more authors causing problems. In my author list, I am separating all authors using the "\&" command. The .bbl file looks like (for one that is causing problems):               \bibitem[Chella, 2012]{Chella2012}     **Chella, M. A. \&~Torum, A. . M.~D. (2012).**     \newblock An overview of wave impact forces on offshore wind turbine       substructures.     \newblock {\em Energy Procedia}, 20:217--226.      How would I enter all of the author names without causing this problem? The second line seems to be causing the problem. (With stars on it) Second question: I want to have the citations appear as [Last name, year]. I thought I needed to use \citep{} for this but it still just brings up the number. Any ideas on what I need to include in my \usepackage[?]{natbib} call? Assuming this is where the problem is. Thanks in advance for your help!


title: Syntax Highlight in "Insert TeX code" in LyX?

text: Is it possible to show syntax highlighting in the "Insert TeX code" boxes in LyX? This would be very handy when one wants to input something longer using code.


title: Problem resizing an itemize environment with a \scalebox: "Something's wrong"

text: I have a `\block` containing a `\itemize`:               \begin{block}{title}       % \scalebox{0.8}{       \begin{itemize}           \item 1...           \item 2...       \end{itemize}       % }       \end{block}      I try to use `\scalebox`and `resizebox` to scale it, but I got an error `ERROR: LaTeX Error: Something's wrong--perhaps a missing \item.` Could anyone help?


title: What is the best way to obtain a "vertical" subset symbol?

text: I am trying to typeset a table indicating various kinds of `$\subset$` relations for objects in a grid. Is there a way to obtain a subset symbol that applies vertically, between objects where one is above the other? Detexify doesn't seem to have a symbol like this, although there are many vertical arrow-like objects in the Comprehensive LaTeX Symbol List. This can be done by drawing a picture (e.g. with TiKZ or Xy-pic), or one could apply a rotation somehow to a standard "horizontal" symbol. I would be happy with a solution that only worked with PDF files. Is there a "best practice" for rotating individual symbols?


title: Appendices title in ToC without appendices list

text: How can I make that the appendices list (numbered with `\chapter{}`) not appear in ToC, but appears the title "Appendices" instead. I'm using the `book` documentclass, and the default `\appendix` command to begin the appendices. In ToC, I have this:               1. CHAPTER ...        1.1 Section ...          A. Appendix A ...        A.1 Section ...          B. Appendix B ...        B.1 Section ...      I need this:               1. CHAPTER ...        1.1 Section ...          Appendices ...      But, I also need the Appendix A and B numbered in document. Some solutions raise change the `tocdepth` counter after the declaration of the start of the appendices, but can interfere with other lists (LoT, LoF) and the package hyperref and PDF bookmarks. Here a MWE:               \documentclass[11pt]{report}     \usepackage[T1]{fontenc}     \usepackage{blindtext}     \usepackage{hyperref}        \hypersetup{hidelinks}          \begin{document}       \tableofcontents       \listoftables       \blinddocument       \begin{table}\centering           \begin{tabular}{|c|c|c|}             \hline             1 & 2 & 3 \\             4 & 5 & 6 \\             7 & 8 & 9 \\             \hline           \end{tabular}           \caption{Test}       \end{table}       \appendix         \blinddocument         \blinddocument     \end{document}      The solution should not affect the other lists and PDF bookmarks.


title: What's the proper way to typeset a differential operator?

text: I can't seem to find any consensus on the right way to typeset a differential operator, whether it is:   * in a standalone context: ![standalone differential](http://i.stack.imgur.com/R1V5R.png)   * as part of a derivative: ![derivative](http://i.stack.imgur.com/QRs5z.png)   * as part of an integral: ![integral](http://i.stack.imgur.com/Kr2Ql.png) In all of these cases, I have seen them sometimes italicized like variables (as in the second and third examples above) and sometimes not italicized like operator names (as in the first example above). There is also additional variation in how much spacing goes between the "d" and whatever it is acting on. Seeing as this is an incredibly common symbol in many branches of mathematics, I am curious about the lack of standardization -- I've seen all possible combinations used in all possible contexts by many respected authors and publishers. Are there any rules of thumb that I can follow? I personally tend to prefer the non-italicized version with very little space next to it, so I add:               \renewcommand{\d}[1]{\ensuremath{\operatorname{d}\!{#1}}}      to my default preamble, and use that everywhere, but I'd like to know if I'm breaking any hard-and-fast rules here.


title: new command for the dx of intergral.

text: > **Possible Duplicate:**   >  What’s the proper way to typeset a differential operator?               \newcommand{d}[1]{\:\textrm{d}{#1}}       That is my new comamnd for writing the _dx_ of an intergral. Just wanted to be able to type this in my code.               \d{x}  <<<where the x is the variable of integration>>>      What did I do wrong?


title: multido variable in \paragraph prematurely incremented by one

text: The compilation of the following MCE:               \documentclass{report}     \usepackage{fixltx2e}     \usepackage{multido}     \begin{document}     \multido{\i=1+1}{4}{%       \chapter{I am the chapter \i}       \section{I am a section of chapter \i}       \subsection{I am a subsection of chapter \i}       \subsubsection{I am a subsubsection of chapter \i}       % \paragraph{I am a paragraph of chapter \i}       % \subparagraph{I am a subparagraph of chapter \i}     }     \end{document}      leads to:   1. the expected result,   2. a strange result if the line `% \paragraph{...}` is commented out because the variable `\i` is prematurely incremented by one and the last corresponding occurrence doesn't appear. If the line `% \subparagraph{...}` is additionally commented out, it is subject to this strange behavior, the `\paragraph{...}` working as expected. In this thread of the French TeX forum : (in French, sorry), some contributors isolated the trouble that seems to be a real anomaly.


title: Using option for sty file

text: I would like to create and option (namely `grid`) to my `sty` file to produce a grid covering the whole page. I had success using               \newif\if@sigur@grid     \DeclareOption{grid}{\@sigur@gridtrue}      and using the code below, which I copied from somewhere here on SE, inside some blocks of codes.               \if@sigur@grid       \IfFileExists{tikz.sty}         {\RequirePackage{tikz}%         \usetikzlibrary{shapes.misc}%         \usepackage{eso-pic}%         }         {\PackageWarning{sigur}{You requested `tikz.sty' %MessageBreak          which doesn't exist on your system}         }         \AtBeginDocument{          \AddToShipoutPicture{%          \begin{tikzpicture}[overlay,remember picture]          \draw[red!30!white]                      (current page.south west) grid[step=1mm]                      (current page.north east);          \draw[red!80!white]                      (current page.south west) grid[step=10mm]                      (current page.north east);          \end{tikzpicture}           }          }     \fi      Well, this is fine and it is working. I simply load my `sty` file with the option `grid` and the red grid appears. **Now here comes my problem.** As you can see the grid was drawn in red color. I'd like to be able to pass its color to the `grid` option when loading it. For example, the default color is red but if I want blue grid I'd simply use `grid=blue` as option and the grid would appear in blue color. How to do this? **ps:** I'd like to test first if some additional package is installed. I'm doing this for other packages using `\IfFileExists{}` and it is working. But I'm not able to do this for the solution proposed by @cgnieder below. The reason for the test is that sometimes I share this style file with other users and I'd like to inform them with some option is not working instead of just show many errors caused by the missing packages.


title: Is there a list of the approximate dates when the various versions of achemso were released?

text: # Question I am using the `achemso` package to typeset a manuscript in the American Chemical Society format. Near the end of the package documentation for the `achemso` package, there is a section, **Change History** (section 8), that lists the versions of `achemso` and what was modified in each version. However, that listing only includes the version numbers, not the (approximate) dates, or even just the years, when each version was released. Is there a listing somewhere of the (approximate) dates that each version of `achemso` was released? # Reason for asking question The reason that I have asked the above question is that I am using MiKTeX on Windows, but my boss uses TeXShop on Mac. In MiKTeX, packages are automatically downloaded if needed. Thus, the first time I compiled a file with `\usepackage{achemso}`, MiKTeX automatically downloaded and installed the `achemso` package. I am not familiar with TeXShop or Mac, but it seems that in TeXShop packages are _not_ installed automatically. It seems that in that system, one needs to periodically "update" TeXShop to obtain the latest ctan packages such as `achemso`. My boss knows the _date_ of release of the TeXShop version that he has on his computer, but he doesn't know the version of `achemso` that he has in his current TeXShop. So I am trying to "work backwards" and try to determine the _approximate_ version of `achemso` that he has in his current TeXShop. For example, if his TeXShop is dated May 2012, then _perhaps_ it is reasonable to guess that at least the 2011 version of `achemso` is included. With this guess of 2011, I would like to find out from the **Change History** what features he probably has in his distribution of `achemso`.


title: Rendering EPS in Kile under kubuntu

text: I am aware of that I need to include `epstopdf` in order to PDFLaTeX. However, it says "file not found", and I couldn't find `epstopdf.sty` as well. I also tried LaTeX it, still says "extension not found". Any suggestions? I am using Kile in kubuntu.


title: Can PDF search find words with ligatures in XeLaTeX-documents?

text: Is there some way allow PDF search to find words with ligatures? I use XeLaTeX.               \documentclass{book}     \begin{document}     Prefix.     \end{document}      In the resulting pdf file, searching for the word "Prefix" fails.


title: How to align right within equation array

text: Suppose I have something like the following:                   \begin{eqnarray*}     \mathrm{gcd}(x^3 + 6x^2 + 5x + 5, x^3 + 13x^2 + 6x + 3) &=& 102x^2 + 108x + 2 \ \mathrm{with} \ p = 109 \\     \mathrm{gcd}(x^3 + 2x^2 + 9x + 4, x^3 + 3x^2 + 7x + 9) &=& 1 \ \mathrm{with} \ p = 131 \\     \mathrm{gcd}(x^3 + 3x^2 + 9x + 12, x^3 + 6x^2 + 12x + 4) &=& 6x + 122 \ \mathrm{with} \ p = 157     \end{eqnarray*}      How do I align the statements at the end of each line (i.e. the "with p = ..." bit) to the right?


title: Texmaker and MacTex are unable to compile Index, Nomenclature and Biber

text: On Mac (Maverick) with MacTex (up-to-date), I can compile the following (A) MWE using the Engine (B) for Texshop, however not using the (C) custom command for Texmaker. I searched for two days and found no solution: (A) MWE.tex for my setup of Biber, Index and Nomenclature (using Makeindex)               \listfiles          \documentclass{article}          \usepackage[authordate,backend=biber]{biblatex-chicago}     \usepackage{makeidx}     \usepackage{robustindex}     \makeindex     \usepackage{nomencl}     \makenomenclature          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @misc{A01,       author = {Author, A.},       year = {2001},       title = {Alpha},     }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          \printnomenclature          \nomenclature{Alpha}{alpha test}%          Here is \index{some} text \autocite{A01}.          \printbibliography          \printindex          \end{document}        (B) Functioning Engine for Texshop:               #!/bin/bash     pdflatex -synctex=1 "$1"     for file in *.idx ; do     makeindex -s *.ist $file     done     for file in *.bcf ; do     biber $file     done     pdflatex -synctex=1 "$1"     for file in *.nlo ; do     bfname=$(dirname "$1")/"`basename "$1" .tex`"     makeindex "$bfname".nlo -s nomencl.ist -o "$bfname".nls     done     pdflatex -synctex=1 "$1"      (C) Not working command for Texmaker (note: my_index_style.ist in working directory with mwe.tex)               "/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode|"/usr/texbin/biber" %|"/usr/texbin/makeindex" %.idx -s my_index_style.ist|"/usr/texbin/makeindex" %.nlo -s nomencl.ist -o %.nls|"/usr/texbin/pdflatex"  -synctex=1 -interaction=nonstopmode|"/usr/texbin/pdflatex"  -synctex=1 -interaction=nonstopmode|open %.pdf      results in               Input index file MWE.idx not found. Usage: makeindex [-ilqrcgLT] [-s sty] [-o ind] [-t log] [-p num] [idx0 idx1 ...]          Process exited with error(s)      (D) Of course I tried to run the commands separately in Texmaker:   1. `"/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode %.tex` works a. `"/usr/texbin/biber" %` seems 99 of 100 times it freezes Texmaker (seeing a circle with two white and two black quarters?!), so I need to `killall texmaker`. b. `"/usr/texbin/makeindex" %.idx -s index_style_wenger.ist` process exited normally (after first running pdflatex) c. `"/usr/texbin/makeindex" %.nlo -s nomencl.ist -o %.nls` process exited normally (after first running pdflatex) Could someone please help? I want to use Texmaker for its better functions for handling large multi file projects. **Update:** As suggested in the comment below I tried:               "/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode && “/usr/texbin/biber" % && “/usr/texbin/makeindex" %.idx -s index_style_wenger.ist && “/usr/texbin/makeindex" %.nlo -s nomencl.ist -o %.nls && “/usr/texbin/pdflatex"  -synctex=1 -interaction=nonstopmode| && “/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode && open %.pdf      which resulted in               Process started          This is makeindex, version 2.15 [TeX Live 2013] (kpathsea + Thai support). Scanning style file ./index_style_wenger.ist.....          .....done (10 attributes redefined, 2 ignored). Scanning input file MWE.idx....done (1 entries accepted, 0 rejected). Sorting entries...done (0 comparisons). Generating output file MWE.ind....done (6 lines written, 0 warnings). Output written in MWE.ind. Transcript written in MWE.ilg.          Process exited normally      but, in the end the bibliography and the index are ok, but no nomenclature is shown.


title: How to declare a macro with a variable argument list?

text: I am looking for a macro with two optional arguments and tried the following code:               \documentclass{tufte-handout}     %     \usepackage{xparse}     \usepackage{lipsum}     \usepackage[demo]{graphics}     \usepackage{easyfig}     %     %% Usage \mfig[position][trim]{name-figure}{caption}{label}     %     \NewDocumentCommand{\mfig}{o o m m m}{%         \begin{marginfigure}[\IfValueTF{#1}{#1}{0}cm]             \Figure[trim={.0\width} {\IfValueTF{#2}{#2}{.05}\height}%                 {.0\width} {.0\height},clip,%                 width=\linewidth,keepaspectratio=true,%                 caption={#4},label={#5},center,here]{#3}         \end{marginfigure}%     }     %     \begin{document}          \section{A simple test}          \lipsum[1]     \mfig{myfigure}{This is just a caption to the demo figure.}{fig:test}     Figure~\ref{fig:test} shows a test. \lipsum[3].     \end{document}      The first optional argument gives the margin figure vertical position and the second gives the trim coordinates (an inferior cut-off actually). It is ok to to use:               \mfig[-1.5]{name}{caption}{label}      to move vertically the margin figure about 1.5cm up, for instance, and with the default trim coordinates of .05, but I am unable to use               \mfig[.55]{name}{caption}{label}      to cut-off 55% of my graphic, while using the default position of 0cm, because my "macro" is unable to recognize the optional argument #2 without to explicitly use the #1. So, my question is: is there any way to specify only the #2 optional argument while the macro accepts the default #1 argument like the above?


title: Justify text inside itemize environment with beamer class

text: I would like to justify text inside an `itemize` environment with the `beamer` class. Text appears to be justified by default with the `article` class, but not with the `beamer` class. The following code justifies text left and right:                   \documentclass{article}         \usepackage{lipsum}         \begin{document}         \begin{itemize}         \item \lipsum[1-1]         \end{itemize}         \end{document}      The following code does not:                   \documentclass{beamer}         \usepackage{lipsum}         \begin{document}         \begin{frame}         \begin{itemize}         \item \lipsum[1-1]         \end{itemize}         \end{frame}         \end{document}      I have tried this:                   \documentclass{beamer}         \usepackage{ragged2e}         \usepackage{lipsum}         \let\olditemize=\itemize          \renewenvironment{itemize}{\olditemize\justify}{\endlist}          \begin{document}         \begin{frame}         \begin{itemize}         \item \lipsum[1-1]         \end{itemize}         \end{frame}         \end{document}      but it won't justify text on the right. Any suggestions welcome!


title: Is it possible to create a table and bar chart on the fly?

text: I am a beginner in Latex, using it tentatively for industrial documents. I have reached a point where the anticipated benefits from using it in a Corporate environment appear to me very significant. I am trying to write a paper explaining this to my company. I have made a quick comparison in the table of the MWE below. However, (in order to demonstrate a unique capability of LaTex) I would like to illustrate the point by a bar chart, possibly generated on the fly from the raw data I would embed in the Latex source. I have been trying to use `\pgfplotstableread` and `\pgfplotstabletypeset` to generate the table instead of the tabular option, but I could not succeed, probably due to the white spaces of the text.   1. Could someone suggest a way to generate such a table outside of a tabular environment? Some reformatting of the text contents of the table is possible if there is no other way.    2. Is there a way to generate a bar chart illustrating the point of file size without manually entering the coordinates?   3. As a side request, could someone perhap suggest a presentation format that would provide the maximum evidence of the point illustrated?              \documentclass[11pt]{article}     \usepackage{graphicx}     \usepackage{siunitx}     \usepackage{pgfplotstable}     \sisetup{table-figures-decimal = 3}     \sisetup{table-number-alignment=center-decimal-marker}     \begin{document}     \centering     \begin{table}     \begin{tabular}{|l|S|S|}     File type&{Word 2003}&{\LaTeX} \\     \hline     Native file size (Mo)& 1.07&.112\\     Compressed native file size (Mo)&.268 & 0.022\\     Final PDF file size (Mo) &.302& .272\\     \end{tabular}     \caption{Comparison of file size Word 2003 vs \LaTeX}     \end{table}     \end{document}


title: sidewaystable will not plot side ways

text: I am unable to get a `sidewaystable` to plot even with simple documents. I've copied this code directly and I can get it to plot as a normal table. It does not work when I change it to sideways. Does anyone have any suggestions? Here's the code I'm using for the `.tex` file:               \documentclass[a4paper]{article}     \usepackage{graphics}     \usepackage{rotating}          \begin{document}          \begin{sidewaystable}     \begin{tabular}{l*{6}{c}r}     Team              & P & W & D & L & F  & A & Pts \\     \hline     Manchester United & 6 & 4 & 0 & 2 & 10 & 5 & 12  \\     Celtic            & 6 & 3 & 0 & 3 &  8 & 9 &  9  \\     Benfica           & 6 & 2 & 1 & 3 &  7 & 8 &  7  \\     FC Copenhagen     & 6 & 2 & 1 & 2 &  5 & 8 &  7  \\     \end{tabular}     \caption{This should be a sideways table}     \end{sidewaystable}     \end{document}      This code plots the table horizontal and half off the page in the bottom corner. Why does it not create a vertical table? Yep -- using pdflatex sorts the problem out.


title: Conflict between TikZ and university thesis class file

text: When compiling a document using my university's thesis class file and the TikZ package I receive an error message (missing number, treated as zero). Would someone know how I can solve this problem?               \documentclass[phd,bottom,nosig]{usbthesis}     \usepackage{tikz}     \begin{document}     Test 1-2-3     \end{document}      The class file can be found here: http://graduate.physics.sunysb.edu/faq/thesis_template/usbthesis.cls


title: How can I avoid widows and orphans after displayed equations?

text: **Edit:** The original title of this question was "How can I avoid widows and orphans with the geometry package?" However, as egreg pointed out, the `geometry` package was not the cause of the problem. So, I have corrected the title. I am writing my dissertation. My university specifies the page margins and absolutely forbids widows and orphans. To avoid the latter, I have set both `clubpenalty` and `widowpenalty` to 10000. I am using the `geometry` package to set the margins. As the following example shows (or, at least, does when I run pdfLaTeX), this can create widows and orphans. I've tried using `geometry` with various options, such as including or ignoring this or that. How can I keep to the required margins without creating widows and orphans?               \documentclass{article}     \usepackage[lmargin=1.5in,rmargin=1.0in,tmargin=1.0in,bmargin=1in]{geometry}     \usepackage{lipsum}          \widowpenalty = 10000     \clubpenalty = 10000          \begin{document}          \lipsum          This text is boring and repetitive.          This text is boring and repetitive.          This text is boring and repetitive.  However, it is easy to see that     \[x^n + y^n = z^n\]     has no solutions for $n \geq 3$.  This text is boring and repetitive.  This text is boring and repetitive.          This text is boring and repetitive.          This text is boring and repetitive.          \end{document}


title: Crop package axes marks

text: I am preparing a document for printing. My bookbinder asked for long (vertical) axes marks on every page, for folding the signatures. The axes marks should start 1cm from the final page and go all the way to the edge of the real paper. I'm using the `crop` package. On the documentation, I found the definition of the axes:               \newcommand*\CROP@@upaxis{%     \begin{picture}(0,0)     \unitlength\p@\thinlines     \put(0,2){\line(0,1){11}}     \end{picture}%     }          \newcommand*\CROP@@loaxis{%     \begin{picture}(0,0)     \unitlength\p@\thinlines     \put(0,-2){\line(0,-1){11}}     \end{picture}%     }      How can I modify these definitions in order to make those axes longer? A rather naïve MNWE would go like this:               \documentclass{article}     \usepackage[paperwidth=550mm,paperheight=210mm]{geometry}     \usepackage[cam,axes,center,width=590mm,height=300mm,landscape,noinfo]{crop}          \makeatletter     \renewcommand*\CROP@@upaxis{%     \begin{picture}(0,0)     \unitlength\p@\thinlines     \put(0,2){\line(0,1){11}}     \end{picture}%     }          \renewcommand*\CROP@@loaxis{%     \begin{picture}(0,0)     \unitlength\p@\thinlines     \put(0,-2){\line(0,-1){11}}     \end{picture}%     }     \makeatother          \begin{document}     \includepdf[pages=-,signature=16,noautoscale]{mnwe.pdf}%     \end{document}      But I changed the numbers in `\put(){\line(){}}` and nothing happened. Note: I also checked other packages, like `zwpagelayout` and they don't have axes marks.


title: long URL's containing "-" in bibtex going beyond page

text: I have tried several top answers with no luck. Here is what I have in my preamble(compiling with xelatex and bibtex).               \documentclass[a4paper,12pt]{article}     \usepackage{fontspec}     \usepackage{natbib}     \usepackage{fancyhdr}     \usepackage{lastpage}     \usepackage{setspace}     \usepackage{url}      Here is a sample reference in Bibtex               @misc{DemandAccounting,     author={Henry Blodget},     title={Demand Media's Q3 revenue and pageview growth looks fine. But the company continues to capitalize its content costs,...},     month={November},     year={2011},     url={http://www.businessinsider.com/demand-medias-q3-revenue-and-pageview-growth-looks-fine-but-the-company-continues-to-capitalize-its-content-costs-2011-11},     publisher={Business Insider},     note={[10/11/2011]}     }      ![Here is the output](http://i.stack.imgur.com/xuoGs.png) Even pointing out which solution is right for me and closing this questions down would hugely helpful. Thank you


title: Several lines of formulas to the left of one curly brace pointing to equation number

text: How to make several lines of equations under one curly brace from the left side, such that it point to a reference number. Now I do something like this:               \begin{align}     \left.     \begin{array}{ll}     a = b + c \\     & \dots  \\     a = b + c \\     & \dots  \\     a = b + c      \end{array}     \right\} \label{formulas}\\     \end{align}      But equation number appears in the bottom of curly brace.


title: using section types inside of blockquote

text: I'm still new to latex, but can someone explain to me why this one works:               \begin{document}     \begin{quote}     \subsubsection{Just some Text}     \end{quote}     \end{document}      but this one does not:               \begin{document}     \begin{quote}     \paragraph{Just some Text}     \end{quote}     \end{document}      The second example results in the following error:               ! LaTeX Error: Something's wrong--perhaps a missing \item.      complete file is the following:               \documentclass[]{article}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{amssymb,amsmath}     \usepackage{ifxetex,ifluatex}     \usepackage{fixltx2e} % provides \textsubscript     % use upquote if available, for straight quotes in verbatim environments     \IfFileExists{upquote.sty}{\usepackage{upquote}}{}     \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex       \usepackage[utf8]{inputenc}     \else % if luatex or xelatex       \usepackage{fontspec}       \ifxetex         \usepackage{xltxtra,xunicode}       \fi       \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}       \newcommand{\euro}{€}     \fi     % use microtype if available     \IfFileExists{microtype.sty}{\usepackage{microtype}}{}     \ifxetex       \usepackage[setpagesize=false, % page size defined by xetex                   unicode=false, % unicode breaks when used with xetex                   xetex]{hyperref}     \else       \usepackage[unicode=true]{hyperref}     \fi     \hypersetup{breaklinks=true,                 bookmarks=true,                 pdfauthor={},                 pdftitle={},                 colorlinks=true,                 urlcolor=blue,                 linkcolor=magenta,                 pdfborder={0 0 0}}     \urlstyle{same}  % don't use monospace font for urls     \setlength{\parindent}{0pt}     \setlength{\parskip}{6pt plus 2pt minus 1pt}     \setlength{\emergencystretch}{3em}  % prevent overfull lines     \setcounter{secnumdepth}{0}          \author{}     \date{}          \begin{document}     \begin{quote}     \subsubsection{Just some Textj}     \end{quote}     \end{document}      \--- EDIT ---- In case anyone else is looking for a solution to this, I added the following to my preamble and it seems to work. If there is a better way please chime in.               % added to fix paragraphs and subparagraphs     \makeatletter         \renewcommand\paragraph{%             \@startsection{paragraph}{4}{0mm}%                 {-\baselineskip}%                 {.3\baselineskip}%                 {\normalfont\normalsize\bfseries}}         \renewcommand\subparagraph{%             \@startsection{subparagraph}{5}{0mm}%                 {-\baselineskip}%                 {.3\baselineskip}%                 {\normalfont\normalsize\bfseries}}     \makeatother


title: How to add an arbitrary item to the TOC in OPmac

text: While trying to customize my TOC for a book project, I wanted to add some vertical space between two items in the TOC. From reading the OPmac source, it seems that the TOC is generated from the .ref file at the time that `\input opmac` is read by TeX. So in order to add a custom TOC entry, one would need to write the code before the `\input opmac` line. To that end I wrote this:               \def\Xspace#1{\addto\toclist{\par#1}}     \input opmac     .     .     .     \Xspace{{\vskip 20pt}}     .     .     .     \bye      I do in fact achieve my goal of inserting 20pt of vertical space at the point I expect to see it, but I'm not thrilled with the need to put things in {{ }} double braces and not sure how to resolve that. My question is this: is there a more idiomatic way in OPmac to achieve my goal of adding arbitrary content to the TOC?


title: Error (Incomplete \iffalse) with enumerate and Hebrew

text: I have got the following problem: Trying to have an enumerate environment in an all Hebrew document (i.e. main document language is Hebrew) causes `Incomplete \iffalse`. The same with with German as main document language works fine. What is the reason?               % !TEX encoding = UTF-8 Unicode     % !TEX TS-program = xelatex          \documentclass[14pt,a4paper]{scrbook}          \usepackage[nouppercase,headsepline]{scrpage2}          \usepackage{fontspec}     %\usepackage{xltxtra}     \usepackage{polyglossia}          \setmainlanguage{hebrew}     \setotherlanguage{german}          %\setmainlanguage{german}     %\setotherlanguage{hebrew}          \newfontfamily{\germanfont}{Times New Roman}     \newfontfamily{\hebrewfont}{David CLM}          \begin{document}          טקסט          \begin{enumerate}     \item מבוא     \begin{enumerate}     \item מקור המובא     \item דוגמת אבי     \item המינוח מאת דיטריך בונהויפֿר     \end{enumerate}     \item התפתחות בכנסיה     \item חטא וסליחה     \item חזרה בתשובה ובשאלה     \end{enumerate}          טקסט          \end{document}      A run with Hebrew as the main language causes the following error:               ! Incomplete \iffalse; all text was ignored after line 28.     <inserted text>                      \fi      <*> test_enum.tex          The file ended while I was skipping conditional text.     This kind of error happens when you say `\if...' and forget     the matching `\fi'. I've inserted a `\fi'; this might work.          ! Emergency stop.     <*> test_enum.tex          *** (job aborted, no legal \end found)      \listfiles (with German as the main language which causes no error) yields:               *File List*      scrbook.cls    2010/09/17 v3.07 KOMA-Script document class (book)     scrkbase.sty    2010/09/17 v3.07 KOMA-Script package (KOMA-Script-dependent bas     ics and keyval usage)      scrbase.sty    2010/09/17 v3.07 KOMA-Script package (KOMA-Script-independent b     asics and keyval usage)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     scrlfile.sty    2009/03/25 v3.03 KOMA-Script package (loading files)     tocbasic.sty    2010/09/14 v3.06a KOMA-Script package (handling toc-files)       size14.clo    1999/11/11 v1.4a NON-Standard LaTeX file (size option)     typearea.sty    2010/09/17 v3.07 KOMA-Script package (type area)     scrpage2.sty    2010/04/22 v2.5 LaTeX2e KOMA-Script package     polyglossia.sty    2010/07/27 v1.2.0a Babel replacement for XeLaTeX     etoolbox.sty    2010/09/12 v2.0a e-TeX tools for LaTeX         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     makecmds.sty    2009/09/03 v1.0a extra command making commands     fontspec.sty    2010/11/17 v2.1e Advanced font selection for XeLaTeX/LuaLaTeX        expl3.sty    2010/11/13 v2083 L3 Experimental code bundle wrapper      l3names.sty    2010/10/03 v2064 L3 Experimental Naming Scheme for TeX Primitiv     es     l3basics.sty    2010/10/03 v2063 L3 Experimental basic definitions      l3expan.sty    2010/09/20 v2037 L3 Experimental Argument Expansion module         l3tl.sty    2010/12/18 v2103 L3 Experimental Token Lists        l3int.sty    2010/10/17 v2077 L3 Experimental Integer module      l3quark.sty    2010/09/20 v2036 L3 Experimental Quark Commands        l3seq.sty    2010/03/29 v1879 L3 Experimental sequences and stacks       l3toks.sty    2010/09/20 v2037 L3 Experimental Token Registers        l3prg.sty    2010/10/03 v2063 L3 Experimental control structures      l3clist.sty    2010/10/09 v2071 L3 Experimental comma separated lists      l3token.sty    2010/10/03 v2063 L3 Experimental token investigation and manipu     lation       l3prop.sty    2010/11/23 v2087 L3 Experimental Property Lists        l3msg.sty    2010/10/02 v2052 L3 Experimental LaTeX Messages module         l3io.sty    2010/10/03 v2063 L3 Experimental i/o module       l3skip.sty    2010/11/23 v2088 L3 Experimental skip registers        l3box.sty    2010/09/26 v2048 L3 Experimental Box module     l3keyval.sty    2010/04/11 v1890 L3 Experimental keyval processing       l3keys.sty    2010/11/11 v2082 L3 Experimental key-value support     l3precom.sty    2010/02/09 v1793 L3 Experimental precompilation module       l3xref.sty    2010/02/09 v1786 L3 Experimental cross referencing       l3file.sty    2010/03/21 v1853 L3 Experimental file loading         l3fp.sty    2010/12/18 v2104 L3 Experimental floating-point operations     l3luatex.sty    2010/07/18 v1985 L3 Experimental LuaTeX functions         calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)       xparse.sty    2010/10/13 v2073 Generic document command parser      xkeyval.sty    2008/08/13 v2.6a package option processing (HA)      xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)     fontspec-patches.sty    2010/11/17 v2.1e Advanced font selection for XeLaTeX/Lu     aLaTeX     fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX      fontenc.sty       eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings       eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern     xunicode.sty    2010/11/06 v0.96 provides access to latin accents and many othe     r characters in Unicode lower plane     fontspec.cfg     gloss-german.ldf    polyglossia: module for german      babelsh.def    2009/05/07 Babel common definitions for shorthands      Taken verbatim from babel.def (2008/07/06 v3.8l)     gloss-hebrew.ldf    polyglossia: module for hebrew         bidi.sty    2010/09/28 v1.1.5a <commit 98> Bidirectional typesetting in pla     in TeX and LaTeX        iftex.sty    2010/07/25 v0.2 Provides if(tex) conditional for PDFTeX, XeTeX,      and LuaTeX     loadingorder-bidi.def    2010/07/25 v0.5 making sure that bidi is the last pack     age loaded     xetex-bidi.def    2010/08/01 v0.8 bidi adaptations for XeTeX engine     footnote-xetex-bidi.def    2010/07/25 v0.5 bidi footnote macros for XeTeX engin     e     scrbook-xetex-bidi.def    2010/07/25 v0.3 bidi adaptations for scrbook class fo     r XeTeX engine     hebrewcal.sty    2008/07/01 v2.4 Hebrew calendar for polyglossia (adapted from      hebcal.sty in Babel)     cal-util.def     babel-hebrewalph.def    2010/03/02 Babel definitions for Hebrew numerals      Adapted from hebrew.ldf (2005/03/30 v2.3h)      ***********


title: Front page in document class book not centered

text: I'm using the document class book and I am designing my front page atm. I try it like this:               \documentclass{book}          \begin{document}          \thispagestyle{empty}          \begin{center}     FRONT PAGE \\     \end{center}          \newpage          \chapter{First chapter}          Foo          \end{document}      But this way it isn't really centered.. It's a bit on the left side, isn't it? I hope you know this issue and know how to fix it! Thanks for your help!


title: Biblatex format for oral talks (needs to print conference and date)

text: I want to use biblatex for an appendix that contains a list of presentations given. I want to add entries for oral presentations, where there are no corresponding proceedings. E.g. the output should look like: > Agent Smith (1st June 2010), ‘Entangled in the Matrix’, _Cyberwhatever > Symposium_ , Berlin The problem is, there seems no template which gets the fields right. The closest match would be `@inproceedings`:               @inproceedings{author2010title,       AUTHOR   = {Smith, Agent},       TITLE    = {{Entangled in the Matrix}},       BOOKTITLE= {Cyberwhatever Symposium},       ADDRESS  = {Berlin},       DATE     = {2010-06-01}     }      Which is rendered with an `in:` > Agent Smith (1st June 2010), ‘Entangled in the Matrix’, in: _Cyberwhatever > Symposium_ , Berlin If I use `@article`:               @article{author2010title,       AUTHOR   = {Smith, Agent},       TITLE    = {{Entangled in the Matrix}},       JOURNAL  = {Cyberwhatever Symposium},       ADDRESS  = {Berlin},       DATE     = {2010-06-01}     }      The address is dropped: > Agent Smith (1st June 2010), ‘Entangled in the Matrix’, _Cyberwhatever > Symposium_ I don't want to modify the formatting of `article` or `inproceedings`, because they will affect a lot of already correctly typeset published entries.


title: TeXShop Console messages (XeTeX)

text: Can someone explain what the messages in the gist at https://gist.github.com/anonymous/8181888 mean? This is what TeXShop's console says when I typeset my notes. The `.tex` file of the notes is at https://gist.github.com/anonymous/8181948.


title: Background colour of LaTeX template

text: How to change the background colour of LaTeX file template? Not the output file. I have a white background and white font. So I am not able to see the text I am typing.


title: How to install Myriad Pro on Windows 7 with TeX Live 2013?

text: I was trying to install Myriad Pro into my TeX Live 2013 and it comes up with this error:               !pdfTeX error: pdflatex.exe (file pmyb8a.pfb): cannot open Type 1 font file for reading      Since there are lots of information on the Internet, but none are specific to TeX Live 2013. What I have done is as the following:   1. Install TeX Live 2013;   2. Use LCDF Tools to convert the `.otf` files to `.pfb` files;   3. Type in commands `texhash` and `updmap-sys`. Then I got this error, but I am sorry this is not the whole story, since I don't really remember what I have done. I suspect what I have not done is the `.afm` files, or where to let the system notice there are the font files. So could anyone provide a solution for anyone who is using TeX Live 2013, but also want to use Myriad / Minion Pro? **Edit:** I managed to get the Myriad Pro on the document. Which I have done the following:   1. Install TeX Live 2013;   2. Use LCDF Tools to convert the `.otf` files to `.pfb` files, _and correct them to the correct file names_ ;   3. Put the files into `\texlive\2013\texmf-dist\fonts\type1\adobe\minion` and `\texlive\2013\texmf-dist\fonts\type1\adobe\myriad` (You need to create these folders first)   4. Type in commands `texhash` and `updmap-sys`; **Edit 2:**   1. Use the following commands in your document:     * `\usepackage[T1]{fontenc}`     * `\renewcommand*\sfdefault{pmy}`     * `\usepackage{textcomp}` And, finish...


title: How to encapsulate a package to rename keys defined in it?

text: I use `pst-eucl` package and I am not so happy with the names defined for its keys (because the names are difficult to remember). I want to rename some of the keys for my own purpose by creating a new package wrapping the package. For example, I want to rename:   * `PtNameMath` to `PointLabelMath`.   * `PointNameSep` to `PointLabelSep`.   * `PosAngle` to `PointLabelAngle`.   * `PointName` to `PointLabel`. Could you show me the new package wrapping `pst-eucl` with renamed keys above.


title: Working with margins

text: I'm redacting a document, adding the correct tags and syntax for LaTeX. I have come with a "problem" with margins. Or rather with environments that answer differently to margins, making them appear as not organized and consistent. It's not a fatal error, but a good looking document is as important as the content. I have two choices now.   1. The **first one** is setting the margins so that the content goes in the center (as usual), while the list items, for example, go outside of the document content. Something like this: ![Outside](http://i.stack.imgur.com/1Sunm.png)   2. The **second one** instead, positions everything inside the document content line, strictly within the margins. The list items are aligned to the right, in order to give the list a better shape (this is already done by the current `enumerate` and `itemize` environments): ![Inside](http://i.stack.imgur.com/ohaHY.png) My questions are: which solution is the best, considering the current standards? What about the one that is easier to implement? How is the proper way to proceed doing this (in other words: are there packages, what syntax, etc)?


title: flyspell, emacs and aspell seem to diverge

text: I'm using the following configuration for aspell in my .emacs file               (setq ispell-program-name "/opt/local/bin/aspell")     (setq ispell-list-command "list")     (setq ispell-extra-args '("--dont-tex-check-comments"))      and my ~/.aspell.conf contains the following line               add-tex-command bibliographystyle p      trying this latex file:               \documentclass{article}     \begin{document}     \bibliographystyle{plainnat}     \end{document}      emacs flyspell mode shows me plainnat as an error. ![enter image description here](http://i.stack.imgur.com/3fU2r.png) When I invoke aspell from the command line with the following command               aspell --dont-tex-check-comments -c ~/test.tex      it shows no errors. Flyspell does not seem to use aspell or the aspell config. How can I change this in such a manner that I only have to maintain one config for my spell checking needs and not have an extra config for flyspell?


title: Wanting to expedite formatting

text: I have a long LaTeX document and in TeXworks, I want to be able to put dollar signs around things that should be in math mode without going through line by line and manually typing dollar signs. Even if I could highlight the text and do a ctrl command, line-by-line, (if any ctrl command is known), it would be helpful to have this information. Does anyone know how to help me with this problem?


title: Box plots with symbolic x coords

text: I'd like to use box plots with pgfplots. As an additional feature, I'd want my x coordinates to be symbolic. Currently, only the last line from the file `data/gp.dat` is plotted. It works fine, if I use numeric indices and comment the `symbolic x coords` line. The data file contains only 2 lines:               a   119.94081065    131.10653025    114.344300825   144.7370542 77.9689369     b   231.9431665 243.81039325    212.0580355 271.590434  188.711343      This is the LaTeX code I use to make plots:               \pgfplotsset{         % cf. http://tex.stackexchange.com/a/22618/15110     }          \begin{figure}     \center     \caption{This is a figure}     \label{fig:lbl}     \begin{tikzpicture}     \begin{axis}[         legend style={legend pos=outer north east},         symbolic x coords={a,b},         ylabel={time [s]},         xtick=data, enlarge x limits=0.5     ]          \addplot [box plot median] table {data/gp.dat};     \addplot [box plot box] table {data/gp.dat};     \addplot [box plot top whisker] table {data/gp.dat};     \addplot [box plot bottom whisker] table {data/gp.dat};     \end{axis}     \end{tikzpicture}     \end{figure}


title: \ref, \autoref and hyperref expansion

text: I'm trying to write section numbers to a file with the `newfile` package. In details, this MWE basically tries to write to a `.ref` file with lines like `A-B`. The `A` and `B` are generated by `\label` and `\ref` commands: if `\ref{A}` is written in section 2 and `\label{A}` is defined in section 1, then we should write `2|1` in the file. This example actually fails to expand the `\ref` command, probably due to the insertion of the `hyperref` package, which makes `\ref` robust. How can one avoid this?               \documentclass{article}          \usepackage{newfile}     \newoutputstream{refFile}     \openoutputfile{\jobname.ref}{refFile}          \let\oldref\ref     \let\oldAutoref\autoref     \usepackage[linktoc=all,backref=page]{hyperref}          %%      %% Write SRC-DST of \ref to file     %%     \newcommand{\myref}[1]{%         \def\val{\thesection|\ref{#1}}         \addtostream{refFile}{\val}     }          %%      %% Redefine \autoref     %%     \let\oldAutoref\autoref     \renewcommand{\autoref}[1]{%         \oldAutoref{#1}         \myref{#1}     }          \begin{document}          \section{S1}\label{sec:one}     \autoref{sec:three}          \section{S2}\label{sec:two}     \autoref{sec:one}          \section{S3}\label{sec:three}     \autoref{sec:two}          \closeoutputstream{refFile}          \end{document}      The current content of the `.ref` file is               1|\ref {sec:three}     2|\ref {sec:one}     3|\ref {sec:two}      but I would like the expansion of the `\ref` to give:               1|3     2|1     3|2


title: why doesn't latex start a new page when showing multiple figures

text: \documentclass{article}     \usepackage{graphicx}          \begin{document}          \begin{figure}[ht]     \begin{center}$     \begin{array}{ccc}          \includegraphics[width=2in]{stick/Alexis_view1.png}&     \includegraphics[width=2in]{sdk/Alexis_view1.png}&     \includegraphics[width=2in]{sdk_extension/Alexis_view1.png} \\          \includegraphics[width=2in]{stick/Alexis_view2.png}&     \includegraphics[width=2in]{sdk/Alexis_view2.png}&     \includegraphics[width=2in]{sdk_extension/Alexis_view2.png} \\          \includegraphics[width=2in]{stick/Hongzhu_view1.png}&     \includegraphics[width=2in]{sdk/Hongzhu_view1.png}&     \includegraphics[width=2in]{sdk_extension/Hongzhu_view1.png} \\          \includegraphics[width=2in]{stick/Hongzhu_view2.png}&     \includegraphics[width=2in]{sdk/Hongzhu_view2.png}&     \includegraphics[width=2in]{sdk_extension/Hongzhu_view2.png} \\          \includegraphics[width=2in]{stick/Kiki_view1.png}&     \includegraphics[width=2in]{sdk/Kiki_view1.png}&     \includegraphics[width=2in]{sdk_extension/Kiki_view1.png} \\          \includegraphics[width=2in]{stick/Kiki_view2.png}&     \includegraphics[width=2in]{sdk/Kiki_view2.png}&     \includegraphics[width=2in]{sdk_extension/Kiki_view2.png} \\          \includegraphics[width=2in]{stick/Liang_view1.png}&     \includegraphics[width=2in]{sdk/Liang_view1.png}&     \includegraphics[width=2in]{sdk_extension/Liang_view1.png} \\          \includegraphics[width=2in]{stick/Liang_view2.png}&     \includegraphics[width=2in]{sdk/Liang_view2.png}&     \includegraphics[width=2in]{sdk_extension/Liang_view2.png} \\          \includegraphics[width=2in]{stick/Miao_view1.png}&     \includegraphics[width=2in]{sdk/Miao_view1.png}&     \includegraphics[width=2in]{sdk_extension/Miao_view1.png}          \end{array}$     \end{center}     \end{figure}          \end{document}      Latex==>PDF I'm using the above code to show multiple figures. But latex only prints one page and ignores other figures. Can anyone explain it and help me solve it? Thanks,


title: table from pdf to latex

text: Ciao guys I am making a presentation using beamer. It is based on an online research article. Let's say there's a pdf file with a table consisting of 4 columns and 5 rows. What would be the easiest way (besides manual) to get just the rows 1-5 and columns 1-3?


title: How to keep track of packages one has already used?

text: I have been using LaTeX for quite some time but never on a daily basis. As I've used it to write many different documents I came across many useful packages but I have trouble keeping track with all of them. Do you have any suggestions on how to keep a record of the LaTeX packages that you have already used along with a brief description of their functionality? It would be nice if the solution included using a single file or a web service.


title: Should I emphasize the hyphen, here?

text: I need to emphasize one part of a combined word containing a hyphen ( _cis_ -Golgi). What would be correct? Including or excluding the hyphen / minus in `\emph{}`? Does it make a difference?


title: Beamer - handoutWithNotes not working properly

text: I'm using the handoutWithNotes package but I have the problem that whenever the number of slides is not a multiple of the number of slides per page, too many notes pages are printed. As an example, suppose I have 3 slides and I'm using               \pgfpagesuselayout{4 on 1 with notes}[a4paper,border shrink=5mm]      then 3 slides will be printed on the left and 4 notes on the right. Now I'd like the notes section to not be printed when there is no corresponding slide. Can anybody give me a hint on how to do that? Thanks in advance! P.S. A temporary fix is commenting out the `copy from=8` part from the definition of page 8 of that layout, but I'd like something more flexible, which would work for any number of slides when using this layout. **\-- Edit --** Here's the simplified version of my own presentation.               \documentclass[12 pt,handout]{beamer}      \usetheme[titleline=true,% Show a line below the frame title.               alternativetitlepage=true,% Use the fancy title page.               ]{Torino}     \graphicspath{{images/}}    % Put all images in this directory. Avoids clutter.          \usepackage{handoutWithNotes}     \pgfpagesuselayout{4 on 1 with notes}[a4paper,border shrink=5mm]          \title{Test title}     \author [X.Y.] {X Y}     \date [November 2013] {November 9, 2013}          \defbeamertemplate*{footline}{shadow theme}     {%       \leavevmode%       \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%         \usebeamerfont{title in head/foot}\insertshorttitle\hfill\insertframenumber\,/\,\inserttotalframenumber       \end{beamercolorbox}}%       \vskip0pt%     }          \setbeamertemplate{headline}     {%       \leavevmode%       \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%         \hbox to .5\paperwidth{\hfil\insertsectionhead\hfil}       \end{beamercolorbox}%       \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%         \hbox to .5\paperwidth{\hfil\insertsubsectionhead\hfil}       \end{beamercolorbox}%       \vspace*{2pt}     }          \setbeamertemplate{navigation symbols}{}          \begin{document}               \begin{frame}[plain,noframenumbering]         \titlepage     \end{frame}               \begin{frame}{Overview}         \tableofcontents     \end{frame}          \section{Section 1}     \begin{frame}[t]{Frame 1}     \end{frame}          \end{document}      And the output is like this: http://i.stack.imgur.com/lc3Iw.png. What I want to avoid is the last Notes section, since there is no corresponding slide.


title: retain space before \section heading in Memoir class at top of page

text: I am using xelatex and the Memoir class. By default, the empty vertical space before the section heading does not show after a `pagebreak`. How do I modify it if I want it to show instead, even if it is at the top of a new page? I can see in `memoir.cls` that there is a length named `\beforesecskip` and a `\setbeforesecskip` command, but I don't know enough to be able to figure about how to achieve the desired effect. Any help is appreciated.               \documentclass[11pt]{memoir}     \usepackage{showframe}     %%% Book Layout %%%     \setstocksize{7.5in}{5in}     \settrimmedsize{7.5in}{5in}{*}     \setlength{\trimtop}{0pt}     \setlength{\trimedge}{\stockwidth}     \addtolength{\trimedge}{-\paperwidth}     \settypeblocksize{6in}{4in}{*}     \setulmargins{0.5in}{*}{*}     \setlrmargins{0.5in}{*}{*}     \setmarginnotes{0pt}{0pt}{0pt}     \checkandfixthelayout     %%% Other Settings %%%     \raggedbottom     \setsecheadstyle{\large\centering}          \long\def\sometext{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. 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.}          %%% Document Proper %%%     \begin{document}          \section*{Section 1}          \sometext          \section*{Section 2}          \sometext          \section*{Section 3}          \sometext          \section*{Section 4}          \sometext          \section*{Section 5}          \sometext          \section*{Section 6}          \sometext          \end{document}      As you can see. There is no vertical skip before section 1 and 4 since they are at the top of the page.


title: chemfig: Colored atoms don't align, and how to draw bonds to an electric charge?

text: So I want to show the ionic interaction between a molecule and a charged element. But when I use color to highlight a part of the molecule, the bond alignment is no longer correct. The first example is ok, the other two shows the problem. I've tried two different ways to draw lines between the calcium and the electeric charge (\ominus), with strange results. I'm using texlive and chemfig v1.0h Nov 28 2013. ![enter image description here](http://i.stack.imgur.com/Saeu7.png)               \documentclass{article}     \usepackage{chemfig,amsmath}     \newcommand{\gammach}{$\gamma$}     \begin{document}          \schemedebug{false}     \definesubmol{Glu}{         [:0,0.75]\phantom{X}-[:30]HN-          ([:60]           --[:0]            (-[:60]COO^{\ominus}            )          )         (-[::-60]CO-[:0,0.5]\vphantom{X})     }     \schemestart      \chemname{  \chemfig{ !{Glu} }}{glutamic acid}     \arrow{->[\gammach-carboxylase]}     \chemname{\chemfig{         [:0,0.75]\phantom{X}-[:30]HN-          ([:60]           --[:0]            (-[:60]COO^{\ominus}             (-[:-40,0.975,,,dotted]Ca^{2+}?[Cahook])            )            (-[:-60]COO^{\ominus}-[,0.2,,,draw=none]?[Cahook,1,dotted,red])          )         (-[:-60]CO-[:0,0.5]\phantom{X})     }}{\gammach-carboxylated glutamic acid}     \schemestop          \schemestart     \chemname{\chemfig{ !{Glu} }}{glutamic acid}     \arrow{->[\gammach-carboxylase][\+ \color{red}CO$_2$]}     \chemname{\chemfig{         [:0,0.75]\phantom{X}-[:30]HN-          ([:60]           --[:0]            (-[:60]COO^{\ominus}             (-[:-40,0.975,,,dotted]Ca^{2+}?[Cahook])            )        (-[:-60]{\color{red}COO^{\ominus}}-[,0.2,,,draw=none]?[Cahook,1,dotted,red])          )         (-[:-60]CO-[:0,0.5]\phantom{X})      }}{\gammach-carboxylated glutamic acid}     \schemestop          \qquad          \schemestart     \chemname{\chemfig{ !{Glu} }}{glutamic acid}     \arrow{->[\gammach-carboxylase][\+ \color{red}CO$_2$]}     \chemname{\chemfig{         [:0,0.75]\phantom{X}-[:30]HN-          ([:60]           --[:00]            (-[:60]COO^{\ominus{}}@{higherCOO}             (-[:-30,0.975,,,dotted,red]Ca^{2+}@{ca})            )            (-[:-60,,,,blue]{\color{red}COO^{\scriptstyle\ominus{}}                    }@{lowerCOO}-[:30,0.975,,,green,dotted]            )          )         (-[:-60]CO-[:0,0.55])      }}{\gammach-carboxylated glutamic acid}     \schemestop          \chemmove{ \draw[red,dotted] (ca)--(lowerCOO); }          \end{document}


title: How do I make ``` appear as ' + " and not "+ '?

text: It may look like a minor difference, but I'm trying to put quotation marks between single quotes, e.g. > ‘“go away” he said’ but `'''` results in > “‘go away” he said’ which is not what I want...


title: How can I control which file errors are reported in?

text: Here is a class that can generate errors in two ways. It yields an error unless given one of two options, and also it has a command that always yields an error.               \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{foo}[2014/05/06 foo]          \newif\iffoo@foo     \newif\iffoo@bar     \DeclareOption{foo}{\foo@footrue}     \DeclareOption{bar}{\foo@bartrue}     \ProcessOptions          \iffoo@foo         \AtBeginDocument{foo}     \else       \iffoo@bar         \AtBeginDocument{bar}       \else         \PackageError{foo}{Always use foo or bar option}{Please}       \fi     \fi          \newcommand*{\foobar}{       \PackageError{foo}{The \protect\foobar\space command is obsolete}{}}     \endinput      The document               \documentclass{article}     \usepackage{foo}          \begin{document}          hello     \foobar          \end{document}      triggers them both:               ! Package foo Error: Always use foo or bar option.          See the foo package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.16 ...foo}{Always use foo or bar option}{Please}      and               ! Package foo Error: The \foobar command is obsolete.          See the foo package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.7 \foobar      I would like the first one to be more like the second one. That is, I'd like it to indicate the `\usepackage{foo}` line instead of a line in the sty file. After all, that's what the user of the class should edit. How can I control that?


title: ytick=\empty not working with semilogyaxis

text: see what's below. I can't compile it. It works with `xtick=\empty` though.               \documentclass[12pt]{book}     \usepackage{tikz,pgfplots}     \pgfplotsset{compat=newest}     \begin{document}     \begin{tikzpicture}     \begin{semilogyaxis}[ytick=\empty]     \addplot[mark=square*,blue]     coordinates{(1, 1)(2, 5)(3, 20)};     \end{semilogyaxis}     \end{tikzpicture}     \end{document}


title: How to change the font style in theorem environment?

text: I have a constant defined by               \newcommand{\Lip}{\textrm{Lip}}      or               \def\Lip{\text{Lip}}      I use this constant in equations. But in the theorem environment, it appears in italic style. Does anyone know how to make it appear the same as it being put outside of theorem environment? Thank you very much!


title: Placing a node on top of lines in TikZ

text: I'm using TikZ to draw a polytope/simplicial complex and I'd like to label the vertices with their names (which are numbers). However, in the picture below, the node seems to be placed behind the polytope, which looks ugly. ![Picture of portion of a polytope](http://i.stack.imgur.com/cIB3O.png) Is there a way to place the nodes on top of the polytope? Below is the relevant portion of my code:               \begin{tikzpicture}[line join=bevel,x = {(.5cm,-0.7cm)}, y={(0.6cm,0.4cm)}, z={(-0.0cm,1.5cm)},scale=2]     \coordinate (G) at (0,0,1.5);   % 6     %% ...more coordinates           \definecolor{cof}{RGB}{219,144,71}     \definecolor{pur}{RGB}{186,146,162}     \definecolor{greeo}{RGB}{91,173,69}     \definecolor{greet}{RGB}{52,111,72}          \draw (A) -- (B) -- (C) -- (D) --(E) -- (F)-- cycle;     \draw (A) --(G);     \draw (G) --(I); %%     % ...more of the same          \tikzstyle{every node} = [circle, shade,ball color=green,inner sep=0pt,       text width=8pt,font=\tiny,align=center, fill=cyan!20]     \node at (G) {\color{white}6};      % ...more nodes          \draw[fill=pur,opacity=0.4] (A) -- (B) -- (G);     ... more fillings     \end{tikzpicture}      Thanks.


title: tick removal with pfgplots

text: To remove the ticks of a figure (and not the tick labels), I could only find the opacity trick, that I find odd. Is there any better way?               \documentclass[12pt]{book}     \usepackage{tikz,pgfplots}     \begin{document}     \begin{tikzpicture}     \pgfplotsset{minor grid style={color=black!20,line width=0.25pt},major grid style={color=black!30,line width=0.35pt},tick style={opacity=0}}     \begin{semilogyaxis}[grid=both,scale only axis,width=7cm,height=5cm,xmin=0,xmax=2.4,ymin=1e-008,ymax=0.01,,axis background/.style={fill=black!3},xlabel=$\omega$,ylabel=$|X_5(\omega)|$,xtick={0,0.4,0.8,1.2,1.6,2,2.4},xticklabels={$0$,$$,$50$,$$,$100$,$$,$150$},ytickten={-8,-7,-6,-5,-4,-3,-2},yticklabels={$10^{-8}$,$$,$10^{-6}$,$$,$10^{-4}$,$$,$10^{-2}$}]     \addplot[color=blue,solid]     coordinates{(0,6.09811e-005)(2.4,6.10675e-003)};     \end{semilogyaxis}     \end{tikzpicture}     \end{document}


title: putting the caption of a table on its right

text: I have a table environment, which has a tabular environment inside, and I would like to put the caption on its right (the table is narrow enough for that), and not below it. How would that be possible?


title: Because of long row, table not set in page cleanly

text: I create a table,but some rows are very long.Because of that table could't set on page...What is a solution for that?my code is,               \begin{table}[!ht]     \renewcommand{\arraystretch}{1.5}     \caption[Set of Reports]{ Set of Reports}     \label{Set of Reports}\centering          \begin{tabular}{|l|l|l|}     \hline     \bfseries Document/Report & \bfseries tbBOSS & \bfseries Remarks \\ \hline     aaaaaaa  & bbbbb  & ccccccccccc  \\ \hline     ddddd & eeeee & fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff \\ \hline     gggg  & hhhh & iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii \\ \hline     \end{tabular}     \end{table}


title: Is there a convention for making text as an index in math

text: Taking an example from category theory, given a category "C", the opposite category is usually denoted "C^op". Where "op" is an abbreviation for opposite. Now there are three ways to put this in latex:   * As `C^{op}`   * As `C^\operatorname{op}`   * As `C^\text{op}` While I wouldn't use the first one, thw second and third both make sense to me in some way. So is their a convention which one should use, and if so, what's the reasoning behind it


title: PSTricks, draw line only knowing one point.

text: I would like to use PSTricks to draw a line. However, I only have one point, but I know at which angle I want to draw the line, and how long I want it. Is there some way to draw a line from a point (x,y) at a given angle, for a given length? Are there any macro packages that would help me out here?


title: Selectively apply \global to some tokens set via an \input file

text: This should be simple, but I can't quite guess the correct combination of `\expandafter` needed. The value of `\MyTokenGlobal` should _not_ be changed via the `\input`, but the value of `\MyTokenLocal` should change. The code below produces: ![enter image description here](http://i.stack.imgur.com/JDAxv.png) The desired output is: ![enter image description here](http://i.stack.imgur.com/EmzwQ.png) ## Notes:   * The `\begingroup`, `\endgroup` is necessary so that I can select which tokens get effected via the `\input`.   * Using an `xdef` where I have an `\edef` yields the correct result, but I think that might be problematic if the value of `\TempTokenLocal` were to change after `\MyInput` and before I used it. Hence, the request for a solution not using an `\xdef`. ## Code:               \documentclass{article}          \newtoks{\MyTokenGlobal}     \newtoks{\MyTokenLocal}          %\usepackage{filecontents}% Commented to protect overwriting foo.tex     \begin{filecontents}{foo.tex}         \MyTokenGlobal={Global XXX}         \MyTokenLocal={Local}     \end{filecontents}          \MyTokenGlobal={Global}     \MyTokenLocal={Local XXX}          \newcommand*{\TempTokenLocal}{}% Temporary variable     \newcommand*{\MyInput}[1]{%         \begingroup%             \input{#1}%             \edef\TempTokenLocal{\the\MyTokenLocal}% Don't want to use \xdef here.             \global\MyTokenLocal={\TempTokenLocal}% <-- Need \expansion magic here I think.         \endgroup%     }%          \begin{document}          BEFORE:      MyTokens = ``\the\MyTokenGlobal/\the\MyTokenLocal"          \MyInput{foo}          AFTER:      MyTokens = ``\the\MyTokenGlobal/\the\MyTokenLocal"          \end{document}


title: Force different TeX engine for specific files

text: I use Emacs and AucTeX as my writing environment. Pleasantly, I can pick an engine (PDFTeX, LuaTeX, XeTeX) and have it execute as default for all my compilations. However, I have one project where I need a different engine than what I use as a default. I tried setting this the Emacs way, with a local variable               %%% TeX-engine: "default"      line along with the lines that specify master file for the project, but this seems to not set the appropriate variable, and Emacs locks up completely if I try to compile without a decent value set for `TeX-engine`. Is there some way to signal to XeTeX that the incoming file should be compiled with PDFTeX instead? Or some good way to signal to Emacs that this particular file should use a different program for the compilation?


title: Managing margin notes

text: In order to define a margin note, I use:               \marginpar{Add formula for curvature}      However, in a thesis full of margin notes, lots of them overlap, and the only solution I've found so far was to manually push them up or down. Problem is, everytime I refactor the comment, it's a new complete mess... So, does anyone know how to cleanly manage the sidenotes, so that they "float" to a "best position", and avoid overlaping?


title: LaTeX not hyphenating properly, text running off page

text: I'm having a problem with LaTeX not hyphenating `$\beta$-galactosidase`, and the word as a result running off the page. I have narrowed down the problem to a particular package, as a bare minumum LaTeX preamble with no packages avoids this problem. Please help me to identify the offending package by process of elimination, and suggest a solution that retains the use of the package where possible.               \documentclass[a4paper,12pt]{article}          \usepackage[a4paper]{geometry}          \begin{document}     Finally, all of the three antibiotics examined had a negative effect on $\beta$-galactosidase activity from the time they were introduced to the assay.  It is to be noted that chloramphenicol interferes with the 50S ribosomal subunit which negatively implicates peptide bond formation~\cite{chloram1962}, streptomycin interrupts the initiation stage of protein synthesis~\cite{strepto1968}, while rifampicin is an RNA-polymerase inhibitor~\cite{rifam1983}.  These results verify that both transcription and translation are needed for the gene product $\beta$-galactosidase to arise, which is probably not much more than a validation of the flow of genetic information in accordance with central dogma.  An interruption at the transcription or translational stage would prematurely or directly halt the production of $\beta$-galactosidase, in the two respective cases.     \end{document}      Sample output: ![enter image description here](http://i.stack.imgur.com/4uC75.png)


title: Tex file is no longer generating pdf

text: I am creating an article on tex works. I managed to generate a title page, contents and first section, everything compiled fine. I added a subsection and now the pdf will not update. It does not require any extra files. I have tried to create a new file of the same content (with and without the most recent code added) with no success. I have tried a different directory. Now not even a simple Hello world file will create and with this, I am generating this error:               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode     (./3.tex     LaTeX2e <2011/06/27>     Babel <3.9f> and hyphenation patterns for 21 languages loaded.     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2013basic/texmf-dist/tex/latex/base/size10.clo))     No file 3.aux.          ! LaTeX Error: \begin{document} ended by \end{docuemnt}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.4 \end{docuemnt}          ?       Any help would be greatly appreciated!


title: Remove metadata of pdf generated by LaTeX

text: Not sure how relevant my question is to this forum but I will go ahead and ask anyway :). I use LaTeX to create pdf which, as expected, indicates "TeX" as the source. I need to upload this pdf online but want to avoid uploading original LaTeX files. I removed the metadata of the pdf using AdobePro, "PDF Optimizer" option. But somehow the site still detects the pdf as TeX generated file. Does anyone know how to make the pdf completely clean?


title: Typo in TikZ manual?

text: First of all, I resort to asking this here because it seemed a less bad idea then emailing Till Tantau directly. Now, onto what I think is a typo. On the fourth paragraph of section 2.21 of the fine manual, one reads that «there is an option called below, which does the same as anchor=north. Similarly, above right does the same as anchor=south east». Now, according to the explanation (given in the previous page of the manual), `anchor=south east` would mean the current position would be set "south east" of the text; or in other words, the text would be placed above **left**. Right (if you'll excuse the pun)? Or am I making some trivial mistake? PS: While trying to put the link to the manual, I had to delete the `.pdf` part, then add it again, otherwise the link would not be recognised... EDIT: Updated with info from Paul Gessler's comment.


title: How to get AucTex to prompt me for a name, when inserting an environment using Ctrl-C, Ctrl-E?

text: I'm using emacs auctex. I've defined an environment template, as follows.               \documentclass{article}          \newtheorem{definition}{Definition}[section]          \begin{document}     \end{document}      I insert instances of this environment into the document using the `Ctrl-C, Ctrl-E` keyboard shortcut. Upon doing so, I'd like to be prompted for a name, which will be included in square brackets thus:               \begin{definition}[Cauchy-Schwartz]     \end{definition}      How can I do it?


title: How to put tabularx inside tabularx

text: I am trying to make a complicated table, where each cell itself can be a table. I found I can include tabularx inside tabular*, but unable to figure out why I get an error with the outer table is tabularx as well. May be someone can see what I am doing wrong. This MWE works. The one below it does not work.               \documentclass[10pt,notitlepage]{article}%     \usepackage{tabularx}     \usepackage{hyperref}     \usepackage{array}     \newcolumntype{Y}{>{\centering\arraybackslash}X}     \begin{document}          \begin{tabular*}{\textwidth}{p{\textwidth}}\hline      \begin{tabularx}{\textwidth}{@{}|Y|Y|Y|@{}}\hline              \href{foo/index.htm}{A}         \begin{enumerate}           \item item 1           \item item 2         \end{enumerate}&          \href{foo/index.htm}{B}&          \href{foo/index.htm}{C}\\\hline      \end{tabularx}          \end{tabular*}     \end{document}      ![Mathematica graphics](http://i.stack.imgur.com/959M0.png) Now I change the outer table to tabularX and it failed:               \documentclass[10pt,notitlepage]{article}%     \usepackage{tabularx}     \usepackage{hyperref}     \usepackage{array}     \newcolumntype{Y}{>{\centering\arraybackslash}X}     \begin{document}          \begin{tabularx}{\textwidth}{@{}Y@{}}\hline      \begin{tabularx}{\textwidth}{@{}|Y|Y|Y|@{}}\hline              \href{foo/index.htm}{A}         \begin{enumerate}           \item item 1           \item item 2         \end{enumerate}&          \href{foo/index.htm}{B}&          \href{foo/index.htm}{C}\\\hline      \end{tabularx}          \end{tabularx}     \end{document}      error is               (./foo2.out) (./foo2.out)     ! Extra }, or forgotten \endgroup.     \TX@trial ...er \tabular \the \toks@ \endtabular }                                                       \TX@ckpt \TX@typeout@ {\@s...     l.18  \end{tabularx}          ?       Using texlive 2013 on linux


title: Drawing the Celestial Sphere with Tikz Package

text: I am new to tikz and have been working from the following example ( http://www.texample.net/tikz/examples/map-projections/ ) to get a head start. For better or worse I have managed to get what I need, minus a few things to make the picture look even better. I would like to hide some (not all) of the dashed lines, specifically only when they are behind the Earth. I would like to add text similar to this picture from google What are the best ways and commands to go about doing this? I am uploading my modified tex file for reference. Also, I googled around for a model of the Earth as tikz picture and didn't come up with anything fruitful. Anyone here know of anything like this (or maybe how to outline the continents on the sphere, haha)?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc,fadings,decorations.pathreplacing}     \usepackage{verbatim}     %% helper macros     \newcommand\pgfmathsinandcos[3]{%       \pgfmathsetmacro#1{sin(#3)}%       \pgfmathsetmacro#2{cos(#3)}%     }     \newcommand\LongitudePlane[3][current plane]{%       \pgfmathsinandcos\sinEl\cosEl{#2} % elevation       \pgfmathsinandcos\sint\cost{#3} % azimuth       \tikzset{#1/.estyle={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}     }     \newcommand\LatitudePlane[3][current plane]{%       \pgfmathsinandcos\sinEl\cosEl{#2} % elevation       \pgfmathsinandcos\sint\cost{#3} % latitude       \pgfmathsetmacro\yshift{\cosEl*\sint}       \tikzset{#1/.estyle={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %     }     \newcommand\DrawLongitudeCircle[2][1]{       \LongitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}        % angle of "visibility"       \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %       \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1);       \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1);     }     \newcommand\DrawLatitudeCircle[2][1]{       \LatitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}       \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}       % angle of "visibility"       \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}       \draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1);       \draw[current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:1);     }          %% document-wide tikz options and styles          \tikzset{%       >=latex, % option for nice arrows       inner sep=0pt,%       outer sep=2pt,%       mark coordinate/.style={inner sep=0pt,outer sep=0pt,minimum size=4pt,       fill=black,circle}%     }          \begin{document}     \begin{tikzpicture}[rotate=-23.5] % "THE GLOBE" showcase                   \def\R{2} % sphere radius         \def\angEl{5} % elevation angle         \def\angAz{105} % azimuth angle         \def\angPhi{-40} % longitude of point P         \def\angBeta{19} % latitude of point P              \pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole         \tikzset{xyplane/.estyle={cm={cos(\angAz),sin(\angAz)*sin(\angEl),-sin(\angAz),                                       cos(\angAz)*sin(\angEl),(0,-\H)}}}         \LongitudePlane[xzplane]{\angEl}{\angAz}         \LatitudePlane[equator]{\angEl}{0}               \filldraw[ball color=green, fill opacity=1] (0,0) circle (\R);         \draw (0,0) circle (\R);         \coordinate (O) at (0,0);         \coordinate[mark coordinate] (N) at (0,\H);         \coordinate[mark coordinate] (S) at (0,-\H);                        \draw[<->] (0,-\H-5) -- (0,\R+5) node[above] {}; %axis of rotation         \draw[<->,rotate=23.5] (0,-\H-5) -- (0,\R+5) node[above] {}; %axis of rotation              \path[xzplane] (\R,0) coordinate (XE);              \DrawLatitudeCircle[\R,color=red]{0} % equator              \node[above=10pt, right=6pt] at (N) {\bf{North}};         \node[above=2pt, right=9pt] at (N) {\bf{Pole}};              \node[below=3pt, left=6pt] at (S) {\bf{South}};         \node[below=12pt, left=9pt] at (S) {\bf{Pole}};              \def\R{6} % sphere radius         \def\angEl{5} % elevation angle         \def\angAz{105} % azimuth angle         \def\angPhi{-40} % longitude of point P         \def\angBeta{19} % latitude of point P              \pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole         \tikzset{xyplane/.estyle={cm={cos(\angAz),sin(\angAz)*sin(\angEl),-sin(\angAz),                                       cos(\angAz)*sin(\angEl),(0,-\H)}}}         \LongitudePlane[xzplane]{\angEl}{\angAz}         \LatitudePlane[equator]{\angEl}{0}               \filldraw[ball color=blue, fill opacity=0.3] (0,0) circle (\R);         \draw (0,0) circle (\R);              \coordinate (O) at (0,0);         \coordinate[mark coordinate] (N) at (0,\H);         \coordinate[mark coordinate] (S) at (0,-\H);         \path[xzplane] (\R,0) coordinate (XE);                   \DrawLatitudeCircle[\R,fill=red,fill opacity =0.1,color=red]{0} % equator         \DrawLatitudeCircle[\R,rotate=23.5, color=yellow]{0} % ecliptic              \DrawLongitudeCircle[\R]{\angAz+15} % xzplane              \node[above=10pt, right=5pt] at (N) {\bf{North Celestial Pole}};         \node[below=10pt, left=5pt] at (S) {\bf{South Celestial Pole}};              \end{tikzpicture}         \end{document}


title: How to make width of an inner table use full column width of an outer table?

text: When making `tabularx` one need to give a table width. For the outermost table, one can use `\textwidth`. When making one or more inner table(s) inside outer table(s), the inner table(s) also need a width, which will be in this case the width of the column of the outer table that this inner table happened to be in. It is hard to keep track of the the context and to manually give hardcoded values. I am not able to figure how to tell LaTeX to use all the available column width from the outer table, and let LaTeX do the calculation. Need something similar to `X` but for the tablewidth itself. Here is a MWE one one table inside another.               \documentclass[10pt,notitlepage]{article}%     \usepackage{tabularx}     \usepackage{hyperref}     \usepackage{array}     \newcolumntype{Y}{>{\centering\arraybackslash}X}     \begin{document}          %have to use tabular* for outer table since I can't figure how to use tabularx     \begin{tabular*}{\textwidth}{|p{0.5\textwidth}|p{0.5\textwidth}|}\hline           \begin{tabularx}{0.5\textwidth}{@{}|Y|Y|Y|@{}}\hline  % how to automate this?                                                            % instead of 0.5\textwidth                                                            % use full column width              \href{foo/index.htm}{A}         \begin{enumerate}           \item item 1           \item item 2         \end{enumerate}&          \href{foo/index.htm}{B}&          \href{foo/index.htm}{C}\\\hline      \end{tabularx}             &            second column          \end{tabular*}     \end{document}      ![Mathematica graphics](http://i.stack.imgur.com/LynEf.png)


title: Handling Truncated Listings

text: I included some listing in my document using the listings package but some of the lines are rather long and are being truncated. How do I best handle this issue?


title: LaTeX viewer and forward search: how to achieve?

text: (solved) I am facing some problem with viewing the PDF. I am using TeXnicCenter on windows. How can I direct Adobe Reader 10.1 so that it opens at the place where the file was last edited? This is my setup: (but this does not do what I want...) I tried with Sumatra, it says command cannot be execute... Foxit does not close before opening.... Path               \Adobe\Reader 10.0\Reader\AcroRd32.exe      View output:               [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]     AcroViewR10  control      Forward Search               [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]     AcroViewR10  control      Close:               [DocClose("%bm.pdf")]     AcroViewR10  control      I want to achieve:   1. The viewer should close before opening... (so that I do not have to close before compile)   2. Should open at the place where I am currently editing... If you are willing to reply, please kindly try to reply only if you know it works/worked for you.


title: How to avoid wrong hyphenation in headings?

text: I have the problem, that I am writing a (long) document. Now I found while checking the document for errors a very bad formatting of some heading: The headline is quite long and therefore it has to be broken. For now I get a hyphenation quite few letters before the end of the headline. So it looks like:               Chapter 2: Fooooooo baaaaaaar fooooooo baaa-                                               ar      Of course this is not what I want. I'd like to have the whole `baaaar` on the second line. For the moment I am not able to reproduce the problem in a minimal example, I will try this evening when I am at home again. One other problem is that LaTeX breaks at a wrong position in heading sometimes. In normal Text I give a minus-sign to correct the hyphenation position but in headings this does not work properly, because in the headline (using `fancyhdr` or similar pagestyle) the minus also appears. I think, general deactivation of hyphenation is not a good idea. I (have to) work on A5 paper and therefore it is easy to gain a complete line with few words. So hyphenation will be needed for a good look of the document, I think. So in sum:   * How to get rid of orphans in headings?   * How to set the positions for the hyphenations in headings correctly?


title: Newline in a table cell which is centered

text: This question may look like a duplicate but, none of the answers given to the possible duplicates contain the answer to this specific case. I have a tabular, say `\begin{tabular}{ccc}`. While adding a new line to a cell, I want both resulting lines to be horizontally centered. Is there an elegant solution to this? If not is there a solution to this?


title: Transparent block and picture inside the environment itemize

text: Using Beamer I have one `figure` inside the environment `block` that is also inside the environment `itemize`. Using `begin{itemize}[<+->]` I have 3 items and the block with the figure is the 4th item. How do I keep the figure and block transparent until it is their time?.


title: float placement using endfloat

text: I have a lyx file in which there are several figures and tables. The preamble has been amended to have:                \usepackage{multirow}      \usepackage{rotating}      \usepackage{subfig}      \usepackage{longtable,lscape}      \usepackage[nolists,tablesfirst]{endfloat}      \usepackage{caption}       \captionsetup[table]{skip=20pt}      When I added a new figure after all my other figures, in the lyx screen it numbers it Figure 5. However, when I actually export to PDF LaTeX seems to number it Figure 1. Any ideas on this? This latest figure is an eps graphic. The other figures are all pdf documents. EDIT: Interesting: I figured out the issue (or atleast what fixes it). This figure was specified to be sideways. Once I removed that the ordering became correct. Any ideas what's going on?