GuM
  • Member for 7 years
  • Last seen more than 1 year ago
  • Italy
Macro - How to reuse the n-th argument of the last occurrence of another command?
Accepted answer
2 votes

Why don’t you use \NewDocumentEnvironment instead of \NewDocumentCommand? You can access the arguments also from within the code that ends the environment. Here is an example of what I mean: % My ...

View answer
How can I define a big plus operator that works like \bigcup?
7 votes

You cannot copy LaTeX3 code into your preamble without taking appropriate preliminary actions. I’m showing below how the same idea could be implemented through LaTeX2e code. This solution also ...

View answer
Alignment after equal sign
Accepted answer
1 votes

Like this? Since a \medmuskip (normally 4.0mu plus 2.0mu minus 4.0mu) is inserted both before and after a binary operator (see the table on p. 170 of The TeXbook), and since you want to remove the ...

View answer
when using email id in \url it is showing the local drive path in pdf
Accepted answer
3 votes

I’d suggest to define a command for the purpose of typesetting e-mail addresses: \documentclass{book} \usepackage{hyperref} \DeclareRobustCommand*{\mailto}[1]{\href{mailto:#1}{\nolinkurl{#1}}} \...

View answer
How to set temporary math font?
1 votes

I regret to say that @egreg seems to have taken my criticism, that was meant to be constructive, amiss (I must admit, on the other hand, that I like to tease him by pointing out minor flaws in his ...

View answer
How to insert (left or right) only one figure in a minpage
Accepted answer
3 votes

You do not need to include a second, empty minipage in order to push the first one to the left, all the more so that this trick won’t work if the minipage is truly empty: you need to include at least ...

View answer
What do we call the vertical space between a list item label and the item text?
2 votes

My crystal ball suggests that you might be using the style=nextline key that the enumitem package provides for description environment. If this is the case, the workaround I suggested in a comment is ...

View answer
Are there other "fun" packages like the "coffee stains" package?
12 votes

Since @samcarter has mentioned her tikzducks package, I thought that, perhaps, I could cite my halloweenmath package as well.

View answer
How can I add vertical space between text and a minipage figure for all minipages?
Accepted answer
0 votes

I’d recommend that you do not redefine the minipage environment itself: you might still need the original version for something else. Rather, define a command that does what you want, that is, it ...

View answer
amsmath \overleftrightarrow with no added vertical space
Accepted answer
1 votes

Here’s a possible solution, with some code borrowed from my halloweenmath package: % My standard header for TeX.SX answers: \documentclass[a4paper]{article} % To avoid confusion, let us explicitly ...

View answer
\the\font produces no output
Accepted answer
6 votes

It turned out that the OP’s preference goes to \expandafter\string\the\font. The following (compilable) example compares three approaches that have been proposed: \documentclass[a4paper]{article} \...

View answer
In a tabular, how to make sure, previous line has ended?
3 votes

Just to illustrate the suggestion I made in a comment: % My standard header for TeX.SX answers: \documentclass[a4paper]{article} % To avoid confusion, let us explicitly ...

View answer
Is it possible to create a vertical space mid-sentence?
2 votes

Another possibility: centering along the math axis. This has the advantage that it automatically scales to different sizes without requiring to measure a temporary box; it has the downside that it ...

View answer
How to automatically number an equation like this
8 votes

You are worrying without reason: the coding is absolutely straightforward. For example (see also Christian Hupfer’s comment: % My standard header for TeX.SX answers: \documentclass[a4paper]{article} ...

View answer
Custom equation numbering
Accepted answer
3 votes

Let’s see if I guessed correctly what you wish to get: This output was generated by the following code: % My standard header for TeX.SX answers: \documentclass[a4paper]{article} % To avoid confusion,...

View answer
How to match codes with different lines with minipage and lstlisting?
Accepted answer
3 votes

Well, if you decide to have recourse to low-level TeX commands, as in @TH.’s answer, there’s no need to store the two listings into temporary boxes, neither—and this is much more important—to know in ...

View answer
Possible to change command output after first use?
Accepted answer
6 votes

You don’t need anything special: \documentclass{report} \newcommand{\mycommand}[1]{% \renewcommand{\mycommand}[1]{N.:\nobreak\space ##1}% NameOfPerson: #1% } \begin{document} % \show\...

View answer
Setting the first counter in amsthm
Accepted answer
1 votes

I’ll recapitulate the comments that have been made in an answer, so thar this question can be closed. % My standard header for TeX.SX answers: \documentclass[a4paper]{article} % To avoid confusion, ...

View answer
"Evaluated at" bar for derivatives: \Bigr, \biggr, or \left...\right?
1 votes

While trying to adapt Bernard’s answer to a similar question (Vertical bar for “evaluated at”), I noticed that it is defective in that it smashes the height of the “evaluated” subformula, as it can ...

View answer
Where have the legacy macros gone?
10 votes

If the question is “May I use font switching commands like \it or \sl”, then the answer usually depends on the document class you are using. Indeed, these commands are not defined by the LaTeX2e ...

View answer
How to install new listing language definitions?
4 votes

Quoting from the manual of the listings package, p. 43: Where should I put my language definition? If you need the language for one particular document, put it into the preamble of that ...

View answer
Why should one use pltotf AND vptovf to intall a font?
Accepted answer
2 votes

Quoting from Philipp Lehman's Font Installation Guide, section 1.3 (p. 16): In order to convert the TeX metrics into a binary format that TeX can read directly, we run the property list files (pl)...

View answer
Add a comment to the table of contents, in the space between "Contents" and the table
5 votes

Another possibility is to use the tocloft package, which features a \cftaftertoctitle command that can be stretched a little bit beyond what it was intended for in order to provide the required ...

View answer
Setting same distance between header rule, footer rule and text
Accepted answer
4 votes

The problem is well-known: it’s the “difference between \footSKIP and \headSEP”, as the comments in ltoutput.dtx say. In other words, while \headsep gives the vertical distance between the baseline ...

View answer
Vertical spacing of equations using align environment following short texts
2 votes

In the end, I’ve decided to expand my comment to an anwer. Many of the environments that the amsmath package defines for displaying math do not exploit the “display short skip” mechanism that TeX ...

View answer
Globally defined macro changes numerical value
3 votes

\ThisStyle is implemented through \mathchoice; in practice, this means that its argument is processed four times, one for each of the four possible math styles, and the resulting four math lists are ...

View answer
More elegant look in \equation for longer equations?
6 votes

Subsection 3.3.5b (p. 46) of Ellen Swanson's Mathematics into Type, Updated Edition (1999), to which @daleif drew our attention, recommends the following: % My standard header for TeX.SX answers: \...

View answer
Keyword Highlighting not working in Python with listings
Accepted answer
2 votes

Try this: % My standard header for TeX.SX answers: \documentclass[a4paper]{article} % To avoid confusion, let us explicitly % declare the paper format. \usepackage[...

View answer
Can I set \lineskiplimit in tabular?
Accepted answer
1 votes

In essence, no: any glue between the lines of the tabular will spoil the vertical rules. I’m afraid you need to give individual attention to exceptional lines, by making careful use of the optional ...

View answer
how to make shortcuts for the start and end of a "gather" environment
2 votes

If the problem is to define a custom environment that one can redefine, once and for all, as, say, either gather or gather*, as the OP noted in one of her/his comments (switching from gather to align, ...

View answer
1 2 3
4
5
11