Skip to main content

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.

5 votes
1 answer
53 views

Task Consider the following: One needs to store a over time varying amount of pgfkeys entries with a nested data structure. All the entries have the same structure, but the content may vary. So one ...
dsacre's user avatar
  • 1,210
7 votes
2 answers
173 views

I would have thought that if I declare \let\stdeqref\eqref, then the \stdeqref macro and the \eqref macro would be interchangeable. But here is an example where it fails! Moreover, this failure is (...
John Pardon's user avatar
3 votes
2 answers
87 views

An error occurs when I try to create the point C1. How can I fix this? \documentclass[12pt,a4paper]{book} \usepackage[left=1cm, right=1cm, top=2cm, bottom=2cm]{geometry} \usepackage{mathtools, amssymb,...
Khánh Bùi's user avatar
3 votes
3 answers
240 views

I noticed that when I start from a custom environment, and then decide to do something slightly non-trivial with its content (like hide it, or typeset in a different color), I end up switching to a ...
Alexey's user avatar
  • 2,425
9 votes
1 answer
192 views

I ask this question only out of curiousity's sake. I am not actually planning on defining a new command called \cmd because the usual \cs macro has superior syntax. (\cmd<command name, including ...
User23456234's user avatar
  • 2,528
8 votes
3 answers
180 views

I’m defining datas in LaTeX with a custom command that stores both a label and a number: \documentclass{article} \usepackage{parskip} \newcommand{\data}[3]{% \expandafter\newcommand\csname #1\...
taiwan12's user avatar
  • 438
6 votes
4 answers
236 views

I am new to latex. I need to create a text that has a bunch of entries that have the same structure, so I thought I would create a macro for it. However there are 7 moving parts, so it needs 7 ...
user1724887's user avatar
3 votes
5 answers
269 views

To make my library (robust-externalize) more robust, I need to check if a list of macro contains internal macros like \foo@bar (I may also need to do that for latex3 macros, but let's start simple). I ...
tobiasBora's user avatar
4 votes
1 answer
63 views

I have defined a command called \defn which formats its argument in bold and creates an index entry for it. I use it when defining a term in the text of the document. Here's a MWE showing a ...
richard's user avatar
  • 880
0 votes
2 answers
116 views

Consider the epigraph macro in the following MWE: \documentclass[11pt,twoside]{report} \usepackage[T1]{fontenc} \usepackage[tt=false]{libertinus} \usepackage[french]{babel} \usepackage[stretch=50]{...
Cham's user avatar
  • 2,870
5 votes
1 answer
68 views

Disclaimer: This is a bit a XY problem, or rather: I have a problem X and I have a solution Y which works but does not really make me happy. Background: I have an environment, say {foo}, which I use ...
campa's user avatar
  • 33.6k
3 votes
2 answers
102 views

I'm trying to customize the quote environment for a novel (citations at the beginning of each chapter), and I'm having troubles in setting custom vertical line spacing, horizontal line length, the ...
Cham's user avatar
  • 2,870
4 votes
4 answers
199 views

I came up with a resursive macro method to achieve my previous plot question: \documentclass[tikz,border=10pt]{standalone} \def\totalwidth{8} \def\totalheight{2} \def\mysep{0.5} \newcommand\mynode[3]{%...
Explorer's user avatar
  • 9,423
5 votes
2 answers
92 views

I have a number of commands that work a lot like the \ref command in that its true typeset value is only defined after an initial pass is performed. In the first pass they typeset ? - like the \ref ...
Jason's user avatar
  • 1,065
3 votes
2 answers
191 views

I came across the following extensive list of symbols defined by unicode-math and am struggling to implement them in my document. Attempting to to use certain commands mentioned in the linked list I ...
userא0's user avatar
  • 233

15 30 50 per page
1
2 3 4 5
571