# All Questions

1k views

### How to implement a command that checks for loaded packages?

I use the following code to check if a package is loaded: \RequirePackage{ltxcmds} \newcommand{\IfPackageLoaded}[2]{\ltx@ifpackageloaded{#1}{#2}{}} However, sometimes I want to check if more than ...
173 views

### Ledpar: Does the function “ledgroup” work with ledpar

Setting a critical editions of (Greek) fragments with facing translations works fine with ledmac and ledpar. Even the critical apparatuses (up to 3) are there (at the bottom of the page). Now I have ...
4k views

### biblatex: multiple bibliographies categorised by different .bib files

biblatex supports multiple bibliographies by looking up the 1) entry type, 2) keyword, or 3) category. This is all fine, but in the use case of primary sources and secondary sources: 1) the 'type' ...
718 views

### Is there a way to control scope of fontspec font change?

I would like to limit the scope of \fontspec to just one or a couple of words in my paragraph, for example: Vivamus gravida lacus a sapien \fontspec{The Font Name}{interdum} eget interdum mi ...
404 views

### Same distance between chapter head and text / toc

With the following example, I get a different vertical distance between "Contents" and "1 bar 5" and "foo" and "Lorem". How do I get the first entry of the TOC to the same height as "Lorem ipsum", ...
1k views

### Hexagon with exscribed triangle

I am learning tikz now, it is painfully slow, but I am slowly learning. I am trying to reproduce the image below. Here is my code so far. This is basically a rip of from the pgf manual. ...
361 views

### Is there an “endproof” package?

You may be familiar with the endfloat package, which moves all figures and tables to the end of your document. Is there a similar package for achieving that kind of results with proof environments ...
2k views

### Tikz Polar Grid

I'm working on a Smith Chart using TikZ. Currently I'm writing it with everything scaled to a unit circle (centered on 0,0 with a radius of 1) without units. Then scaling so it's a reasonably sized ...
6k views

### How do you get two lines between nodes that have paths to each other instead of a double ended line? [duplicate]

Possible Duplicate: Double arrow in TIKZ? \begin{tikzpicture} [->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,semithick,font=\tiny] \tikzstyle{every state}= ...
320 views

### What does \errorcontextlines do?

In the rotating package examples there is a command included before the document class. \errorcontextlines32 \documentclass[twoside]{report} When I apply \meaning\errorcontextlines to it, it does ...
1k views

### biblatex shorthand and Biblatex authortitle

I have a problem with Biblatex Authortitle. I am trying to define the shorthand field connected with the style. the program I use (Citavi) creates the shorthands such as Gozzoli The Writing of ...
631 views

### Extract the numerical and non-numerical portion from text

I would like to extract the leading number and subsequent text from a string. I have an idea of using the xstring package to gobble characters from the right until I end up with a number or an empty ...
2k views

### \ref not working with achemso

I'm trying to write a document with the achemso package, but my \ref are not working right. achemso links to a package called cleveref, then renames cleveref's \cref into \ref, so any answers for ...
320 views

### Putting a function into a new command with optional arguments

I know I have asked this before. But I just can not wrap my head around some things in LaTeX. Like the optional arguments. I have gotten some clues how to do it for comands, but not quite sure how to ...
5k views

### Special arrangement of subfigures

I need an image with five subfigures arranged this way. I have tried to use subfig and floatrow, but I haven't been able to place the figures as I need them
409 views

### Crop in Standalone class [duplicate]

Possible Duplicate: Standalone package creates a page with a fixed width How do I get the class standalone crop the image just as you would preview the package? I must get over the side ...
2k views

### Defining repeated tabular/array columns using a computed value to specify the number

Background: I just recently saw that one could define multiple columns in a tabular or array using the syntax: *{num}{<align>} So, for example \begin{tabular}{r*{3}{l}r} is the identical to ...
17k views

### Bibtex and Chicago style citations?

In the Chicago Manual of Style citation guidelines I find that one is to quote journal articles and italicize journals, books, and theses. But when I run the code below the output shows the journal ...
1k views

### mathptmx vs mtpro2 for mathematical typesetting

Is there any serious advantage of using the commercial mtpro2 fonts over mathptmx?
778 views

### Footception: Footnote within a footnote within a footnote

Inspired by the question Footnote to a footnote (where it was asked if one could have a footnote reference in a footnote), I'm asking something a bit more complex. Before I ask though, let me prefence ...
2k views

### Passing arguments to \def inside \newcommand (TikZ/PGF)

I'm having trouble passing an argument to \pgfmathparse inside a macro I defined. Here is the code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \newcommand{\drawmestg}[2]{ ...
1k views

### A \boxed alternative with nicer spacing?

I like using \boxed to emphasize my answers in homework problem sets. However, whenever I use superscripts/exponents inside the box, the box becomes taller than it seems it should. This causes two ...
5k views

### Using the amsbook Class

I am trying to figure out how to tweak various stylistic aspects of the amsbook class. For example, I would like for the chapter and section headers to be left-aligned instead of centered. Also, using ...
1k views

### generation of sty file from dtx fails

I have implemented a dtx file with listings code according to the answer of this question: How to add listings environment to DTX files where the listings code is placed in the dtx file as % ...
3k views

### \numcases with \tag

I would like to label some cases with specific tags, and was hoping for something like \begin{numcases}{A = } \frac{r}{a} & r > a \tag{G} \\ \frac{a}{r} & r < a \tag{H} \end{numcases} ...
2k views

### How to render XML tag brackets bold with listings package?

I'm currently using the listings package to render my XML snippets. The default XML language settings recognize elements, attribute and text properly and my style is set to render tag names bold, ...
109 views

### How to type hyperbolic secant (sech)? [duplicate]

Possible Duplicate: Define additional math operators to be typeset in roman I'm trying to type the sech (Hyperbolic Secant) in LaTeX, but when I do use \sech(z) it will be known as an ...
600 views

### Formatting of multiline chapter headings using KOMA

I need (publisher requirement) to format the chapter headings in a document in such a way, that the chapter number is aligned with the text on the page, but if the chapter is longer than one line, the ...
3k views

### Footnotes in Tabulars?

Is there a simple, elegant solution to add footnotes in a table (tabular)? Preferably, the solution can also support the cleveref package. EDIT: My intended effect is that, the footnotes should be ...
862 views

### Margins for proof environment

The code below is (almost) the proof environment of amsthm: \newenvironment{proof}[1][\proofname]% {% \par\pushQED{\qed}\normalfont\topsep6\p@\@plus6\p@\relax% ...
188 views

### Appendices in PDF Outline appear as children of first appendix and problem with headers

I have a problem similar to the one in Appendices in PDF Outline appear as childs of last section But the solution hasn't worked for me, and I even get errors when I try to \includepackage{bookmark}. ...
2k views

### How to sweave Matlab or Mathematica code into LaTeX.

There is a package called pgfsweave for R. It can sweave R code into a LaTeX document. I found we can gain some advantage from this method. The report document can reproduce. The font in figure ...
2k views

### pgf-tikz problem with 'declare function'

I need to make a plot of a non-linear functions. To get familiar with the 'declare function' capability of pgf-tikz, I tried the following code: \documentclass[10pt]{article} \usepackage{amsmath} ...
3k views

### Listing of a file with underscores in its name/path

I am writing a report with LaTeX and I need to list some source code. One of the files has some underscores in its path/name. When compiling the following line : ...
317 views

### LaTex i18n (integrate a new package's strings with babel)

Suppose I'm preparing LaTeX package to give the abstraction of admonition boxes (warning, error, tip, note, fyi, ...). I'd like to have theses strings internationalized. I wouldn't appreciate the ...
666 views

### mdframed and ntheorem counters

In the code below, counters defined by mdframed seem to not be accessible to ntheorem environments which is problematic but ntheorem counters can be read by mdframed. I could not find a work around ...
9k views

### Best way to create an system of equations environment?

I am trying to write a few systems of equations, and I want the terms to be nicely spaced as below 2x + y + 3z = 10 \\ x + y + z = 6 \\ x + 3y + 2z = 13 Now, using ...
173 views

### TortoiseHg with word diffs and LaTeX [closed]

I am having a hard time figuring out how to configure TortoiseHg to do colored word diffs for my TeX and LaTeX documents. I found the following two threads How to use Mercurial for version control ...
3k views

### colortbl: \rowcolor in tables with \begin{tabular}{@{}ccc@{}}

I'm trying to make a table with the following code: \begin{tabular}{@{}ccc@{}} \hline \rowcolor[gray]{.9} a & b & c \\ \hline \end{tabular} Unfortunately the \rowcolor command seems ...
1k views

### Highlighting strings between [ and ] in lstlistings

I want to use lstlisting to present a file like this: #comment [keyword] key1=value1 key2=value with RegEx [keyword:NewKeyword] key1 = value1 key2=value with RegEx and this is my language ...
15k views

### how can I remove the institute from the author footline on beamer?

I'm using the Madrid theme. I have defined \institute as \institute[]{\pgfuseimage{logo} \\ my-institute} because I want the logo to appear at the title frame. Also, since all viewing the ...
870 views

### Automatic hyphenation of compound words

When I was learning to drive a typewriter (shortly after the death of my pet sabre-tooth), I picked up the habit of using a double hyphen when splitting compound words, thus: The system has a ...
661 views

### Odd interaction of secnumdepth and section-based counters

In the following MWE: \documentclass{book} \newcounter{exnum}[subsection] \begin{document} \chapter*{Chapter} \section*{Section 1} \subsection{Subsection A} \setcounter{exnum}{1} ...
1k views

I am writing a package which requires the xcolor package with table option. It is loaded in the package with \PassOptionsToPackage{table}{xcolor} \RequirePackage{xcolor} which works if my package ...
8k views

### lstlisting in two columns

I would like to have two listings, side by side. They have approximately the same length, therefore I don't care about how it's layed out if one part is longer. I tried \begin{minipage}{\textwidth} ...
2k views

### Multilinetext in beamercolorbox

I'm try to customize a beamer theme with some additional text and logos. I added some pictures already and everything looks fine. Now I want to add a three line text in the head of a presentation. I ...
2k views

### Maintaining layout of Tikz diagrams with TeX4ht (converting as single pictures)

A Tikz diagram such as \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path (0,0) node[draw] (A) {A}; \path (2,0) node[draw] (B) {B}; \draw (A) -- (B) ...
4k views

### How to rotate a box in-place

The following LaTeX code illustrates my question. Is it possible to get what I want without doing the negative \hskip, as I want a simple generic solution which will rotate the box to any angle ...