2k views

### TeX macro idioms, or: understanding advanced macros

I often find that when I look at solutions from the experts here, the macro definitions are completely inscrutable to me. Trying to use standard techniques one would use to understand code in most ...
4k views

### How can I save shell output to a variable in LaTeX? [duplicate]

I need to be able to execute a shell command through LaTeX [*] and have the resulting output available for use later on in the form of a LaTeX 'variable' (e.g., via a subsequent \newcommand command). ...
2k views

### How to get the string with \

Apologized for my unclear description. I wish I could explain my problem more clearly. In document, I wish I can just write something as "how to use \cmd \mbox in xxx" or "what is \cmd minipage xxx"....
2k views

### Efficient way to write backslash to a file

Say I have a writer and an environment (actually an Environ) defined as \documentclass{article} \usepackage{environ} % www.ctan.org/pkg/environ \newwrite\mywriter \NewEnviron{writethis} {\...
6k views

### How to create a link in a pdf document to open a file using a specified application installed on the machine?

Assume I have a file on my machine at file:///c:\figure.bmp. From my pdf document, that is created by LaTeX using hyperref.sty, how can I open figure.bmp using mspaint.exe (microsoft built-in image ...
508 views

### How to capture a colon in a macro?

I am trying to capture punctuation marks and I have a number of macros, two of which are shown in the minimal below: \documentclass{article} \usepackage[english]{babel} \def\isColon#1{% \ifx:#1 ...
1k views

### Active characters let to a (non-active) character

It seems that if I \let\amp&, the alignment tab & can be replaced by \amp everywhere (e.g., in the preamble and in the body of an \halign). It is also possible to make the character & ...
645 views

### How do I identify the encoding and family of a new math font?

In this question, sfranky asked to put a double accent over \bm{\phi}, produced by the bm package. Double accents are implemented in both the amsmath and accents packages, but those packages don't ...