Questions tagged [macros]
{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.
8,303
questions
1
vote
0
answers
56
views
MacTeX on macOS: how to get the SyncTeX library?
I have MacTeX installed on macOS, and an executable called synctex is already in my PATH. However, I cannot find a file named libsynctex.so anywhere on the system, which is what I need to compile some ...
1
vote
0
answers
14
views
Information about surrounding text [duplicate]
I'm trying to define a command which raises an issue about spaces.
Basically, I want to have a single command for these two :
\documentclass{article}
\newcommand{\Cinf}{$C^\infty$ }
\newcommand{\...
3
votes
2
answers
113
views
Error Handling for TeX Command Definition with Spaces in Arguments
I'm currently working with TeX to define a command, as shown below:
\def\@fancybook@reset@counter#1,#2\stop{%
\if\relax\detokenize{#1}\relax%
\else
\setcounter{#1}{0}%
\fi
\if\relax\...
1
vote
2
answers
41
views
`verbatim*` environment in a `minipage` defined by a `\newcommand` does not work
Still a novice at LaTeX - I was attempting to define a custom command for creating minipages of a certain width using this code:
\newcommand{\col}[2]{\begin{minipage}{#1\linewidth}#2\end{minipage}}
...
0
votes
1
answer
20
views
Define a new command with the same effect as \quad \text{...}
I have a tex file
\documentclass[11pt]{article}
\usepackage{mathtools,amssymb,amsthm,enumitem,fullpage,microtype}
\usepackage[hypertexnames=false]{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=...
3
votes
2
answers
119
views
Best Practices for Integrating Computer Algebra Systems (CAS) into LaTeX Documents
I am currently working on enhancing my LaTeX documents to involve complex mathematical equations. Managing these equations manually often leads to errors, especially when changing dependent equations ...
2
votes
1
answer
29
views
Remove "(chairman)" when using sapthesis
I'm using the sapthesis package. It allows for indicating multiple examiners via the command \examiner (e.g. \examiner{Jon Doe}). If at least one examiner is indicated, after the first one it appends ...
0
votes
0
answers
12
views
pgfplotstable: compute averages of columns
\documentclass{article}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotstableset{
create on use/mean/.style args={#1#2#3}{
create col/expr={(\thisrowno{#1} + \thisrowno{#2} + \...
3
votes
2
answers
107
views
How I can I set a default question point value in the exam class?
I'm writing an exam in the exam class and I'd like to set the point value for an entire group of questions at once. For example:
\documentclass{exam}
\title{Know your US States and Capitals!}
\begin{...
0
votes
3
answers
102
views
Associative arrays [duplicate]
I was trying to understand the article given at
Storing an array of strings in a command
but could not find the (obvious) solution to the following problem:
I have information about composer, title, ...
2
votes
1
answer
50
views
Function values in columns rather then rows with numerica-tables
Package numerica-tables helps create of multi-column tables of mathematical function values, the package arranges values on rows like in this simple example
\documentclass{article}
\usepackage{...
2
votes
1
answer
88
views
Definition of \sum -- how does the size selection work
When writing \[\sum\], a larger summation sign is used than when writing \(\sum\).
How does the \sum command find out which size to use?
What does \sum expand to? I am guessing it is just a shorthand ...
2
votes
1
answer
47
views
"Advanced section/subsection" custom command produces unexpected numbering behaviour
I am attempting to create new commands for "advanced sections/subsections" (similar to what you might see in a textbook, where a "starred section" indicates an advanced topic or a ...
4
votes
5
answers
320
views
Convert control sequence with a variable number of undelimited parameters into a token list
In expl3, I can translate a token list \l_greet_tl into a control sequence \greet that takes two parameters as follows:
\tl_new:N
\l_greet_tl
\tl_set:Nn
\l_greet_tl
{ Hello,~#1!~How~is~#2~doing? ...
0
votes
2
answers
40
views
Default not working for new command
\newcommand{\initialize}[2][tmargin=1in, bmargin=1in, right=0.75in, left=0.75in]{
\geometry{#1}
\ifthenelse{\equal{#2}{}}{\setboolean{indent}{false}}{\setboolean{indent}{true}}
\...