Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Results tagged with macros
Search options not deleted
user 5626
{macros} is for questions specifically concerning TeX's macro processor. Note that, because TeX uses macros ubiquitously, most questions about code that uses macros are not looking for information about how macros work, and so are not appropriate for this tag.
31
votes
6
answers
3k
views
Ways to grab and store larger amount of text
A standard way to grab and store a short text (say, a title of a document) is to use something like
\def\title#1{\def\@title{#1}}.
But if the content to be stored is longer (say, an abstract}, I gu …
5
votes
Accepted
\takeargs{n} = take n arguments and print them, space separated?
What about this (plain-TeX) code? (Note: I did it in 5 minutes without thorough testing, there might be some bug, but it seems to work. Also, I used exactly your idea of a tail-recursive structure.) …
2
votes
Print macro signature
Well, you may of course use \verb|\myCommand[my optional argument]{my mandatory argument}|, but then you don't get any syntax highlighting.
You can also use the minted package (remember to call (pdf) …
33
votes
Stop LaTeX compile with a command?
Maybe not the best solution, but for the sake of completeness:
\stop
in LaTeX and
\bye
in plain TeX.
22
votes
1
answer
604
views
Is it possible to define a command taking an optional star and working in a subscript?
Note: this is more or less a cross-post from my blog. I hope this is acceptable, especially that this is a genuine question!
I’m currently writing a (longish) document on mathematics. Among other th …
3
votes
Macro or package for typesetting "LaTeX" (the name)?
Actually, the gmutils package contains some improvements: not only logos typeset using that package work better with non-CM fonts, but it also defines a \DeclareLogo command, which takes care of logos …
2
votes
How does one append material to a token list?
WARNING: as Joseph Wright pointed out in the comments section, this won't work in newer versions of expl3.
And using LaTeX3 (man, this is my first try of it, so forgive (and correct) me if I get so …
12
votes
How does one append material to a token list?
What about this?
\documentclass{article}
\newtoks\abc
\newcommand{\appendtotoks}[2]{% #1=toks register, #2-toks to append
#1=\expandafter{\the #1#2}%
}
\begin{document}
\abc={A. B. C.}
\the\abc
…