Skip to main content

All Questions

Tagged with
0 votes
1 answer
22 views

Variables set within tables and reused later in the document

I am writing a document that involves a table of information for many sections, something like: \textbf{Details:} \begin{table}[H] \begin{center} \begin{tabularx}{\linewidth}{|X|c|c|c|c|c|} ...
BugInACode's user avatar
2 votes
3 answers
79 views

How to detect if a command, which is undefined in the current scope, also is undefined in all superordinate scopes?

Theoretical question/moot point: Scenario: You wish to have defined a command globally. But you wish to have it defined only if it is undefined both in the current scope and in all superordinate ...
Ulrich Diez's user avatar
  • 29.7k
4 votes
2 answers
87 views

smuggling macro out of a group in tex core results in undefined control sequence

I am trying to re-apply changes done in a group directly afterwards with the following code similar to the approach in here \def\smuggle#1\endgroup{% \expandafter\endgroup\expandafter\edef\...
Fabian Schneider's user avatar
4 votes
1 answer
135 views

Can I change a \def inside a \foreach loop without making it visible to the whole document?

I understand that a \foreach loop creates a group and local definitions are, of course, local. Is there a way to skip just one level of the scoping? I mean I wish to make a local change inside the ...
Jander's user avatar
  • 1,160
2 votes
1 answer
322 views

Why does the \centering command affect prior text?

Usually commands of the form: {\command <text>} affect only <text> and nothing else. In other words, the scope of such commands is limited to the group they are nested in. In the case of ...
The Riddler's user avatar
6 votes
2 answers
398 views

Why can't I use braces in an \if... \fi group?

I am starting to use \newif in a LaTeX class definition to finally stop carrying around all my definitions and imports from article to article. Since I am trying to define options, I am ending ...
Jérémie's user avatar
  • 3,011
4 votes
2 answers
147 views

Loading an array of fontfaces with fontspec and pgffor

I'm trying to produce a document to compare a bunch of fontfaces. I'd like to parse an array to load and try them all. This is what I have done: \documentclass{article} \usepackage{lipsum} \...
Paolo Brasolin's user avatar