Questions tagged [definition]
The definition tag has no usage guidance.
178
questions
14
votes
1
answer
609
views
TeX jargon - Difference between "argument" and "parameter" in TeX?
What's the difference between the term "parameter" and the term "argument" in TeX jargon?
Are outermost enclosing pairs of matching curly braces of undelimited arguments to be ...
3
votes
1
answer
217
views
Where is the definition of the math mod environment `$$...$$`?
I have a problem with display math modes $$...$$ and \[...\], see The display math mode and the `center` environment. So, I want to find the definition of the display math mode $$...$$ for ...
1
vote
0
answers
80
views
How to delete a command in the \BODY macro of environment defined by \NewEnviron
My environment defined by \NewEnviron macro contains a macro \mymacro. How can to delete the macro \mymacro in the \BODY macro, when it executes?
\documentclass{article}
\NewEnviron{myenviron}{\...
0
votes
1
answer
58
views
Commands already defined [duplicate]
I am getting the following problem
(/home/hagbard/Opstk/bld/texlive/2022/texmf-dist/tex/latex/amsmath/amsopn.sty)
! LaTeX Error: Command \iint already defined.
Or name \end... illegal, ...
2
votes
0
answers
55
views
Expl3: understand how new command using sequence processes arguments
I'm just getting started with expl3. I had a previous question which initiated about automating the process of printing authors of a specific paper and their further informations.
The solution by Alan ...
1
vote
1
answer
44
views
Function of "Elements" without Backslash in Command-Definitions
I have a general question which I couldn't solve so far. It came up a few days ago, while I was trying to redefine the different parts of the footer of the scrlayer-scrpage package (this still isn't ...
1
vote
2
answers
57
views
How to find macros to adjust footer (lefoot, cefoot etc.) with scrlayer-scrpage
I'm still working on a Latex-template for my institution. So far everything runs fine and the former questions i asked here helped me a lot.
Now, i want to adjust the different parts of the journals ...
1
vote
1
answer
24
views
Beamer: Definitions not in blocks [duplicate]
In my Beamer presentation I would like to write definition as in the Article environment, so without blocks. How can I do it?
\documentclass[10pt,aspectratio=169]{beamer}
\usetheme{Frankfurt}
\...
0
votes
1
answer
33
views
How to place a defined variable at multiple locations
I would like to use the defined variable - \arrows[#1] - from this tikz example:
https://texample.net/tikz/examples/overlapping-arrows/
% Overlapping arrows
% Author: Elena Botoeva
\documentclass{...
1
vote
0
answers
18
views
beamer definition numbered [duplicate]
I would like to display a definition block in beamer (I'm preparing some slides) but block should be numbered, something link "Definition 1", "Definition 2", etc.
Using the code ...
0
votes
0
answers
84
views
Redefinition of \maketitle is ignored
I would like to change some elements of my title page, but without completely creating my own titlepage environment (as e.g. demonstrated here), because I am using commands like \extratitle and \...
2
votes
2
answers
98
views
How to Produce a Footnote Like This for Some Lyric Sheets
Consider the code
\documentclass[14pt]{memoir}
\begin{document}
\thispagestyle{empty}
\begin{verse}
\begin{bfseries}
\hskip -12pt* A special footnote \\[1pt]
\hskip 15pt To be put \textit{this way;} \\...
0
votes
1
answer
52
views
Define coloneq (def) with redefined \=
For my own convenience, I tried to define some short-cut key for ``define'' as
\usepackage{mathtools}
\NewCommandCopy{\tmp}{\=}
\AtBeginDocument{%
\DeclareRobustCommand{\=}{\ =\ }%
}
\def\:={\ \...
8
votes
2
answers
340
views
Opposite of csname
If I have a macro \Name that expands to a macro name, I can use that with \csname or the various tools from etoolbox. Can I do the opposite, i.e., get the name of a macro?
My use case is the following:...
1
vote
0
answers
33
views
Looking for Global Solution to Insufficient Apostrophe Kerning with Cabin
In How to Increase the Space Between a Letter and Its Apostrophe with Cabin, it was suggested that in order to increase the kerning between a letter and the adjoining apostrophe, one may use
\mbox{'} ...
2
votes
1
answer
41
views
use \def\@plus{plus} etc to save token space
In the LaTeX kernel, we can see these definitions:
\def\@plus{plus}
\def\@minus{minus}
\def\@height{height}
\def\@depth{depth}
\def\@width{width}
It is said that these definitions can be used to save ...
1
vote
0
answers
27
views
Using \ifdefined for a definition inside \DeclareOption
I'm checking for a command declared inside \DeclareOption but \ifdefined doesn't seem to work as expected. Here's a MWE:
% example23.sty
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{example23}[2023/01/01 ...
1
vote
2
answers
118
views
Custom colorful definition
My MWE:
\documentclass[a4paper]{article}
\usepackage[most]{tcolorbox}
\usepackage{xcolor, soul}
\usepackage{amsthm}
\definecolor{columbiablue}{rgb}{0.61, 0.87, 1.0}
\newcommand{\highlight}[1]{\...
2
votes
1
answer
71
views
Why doesn't TikZ accept conditional colors?
I want to use conditional colors.
I produced the following MWE but it does not work. What is the issue?
\documentclass{article}
\usepackage{tikz}
\begin{document}
%\def\versionNB{}
\def\versionColor{...
5
votes
2
answers
295
views
What is the definition of \abc in this case?
When I compile the following code I get the error:
"use of \abc doesn't match its definition"
What is the definition of \abc?
\documentclass{article}
\begin{document}
\def\foo#1{\def\abc#1{...
4
votes
4
answers
1k
views
What is \fam command?
I defined the following command
\NewDocumentCommand{\fam}{O{\mathbb{N}}mm}{\left\{ #2_#3 \right\}_{#3 \in #1}} % Family notation (set with indices)
but I get the compile error Command '\fam' ...
11
votes
2
answers
588
views
Is this the right way to understand \let \def \edef \gdef \xdef \newcommand \renewcommand \providecommand?
I've already looked at at least ten different q&as explaining the differences of a subset of the commands listed above. While experimenting with them and trying to understand the subtle ...
0
votes
0
answers
63
views
Change definition title to textsc?
How may one change the following MWE (which is useful for including enumeration), so that we instead of the title Definition 0.1. have \textsc{Definition} 0.1.?
\usepackage{amsmath, amsthm}
\...
8
votes
3
answers
432
views
TeX point command
I try to get my own command to work to output a point in standard german notation.
My code (adapted version of wipet's code):
\documentclass[12pt]{article}
\def\punkt#1{\left(\punktA#1,,\right)}
\def\...
0
votes
0
answers
18
views
Page of definitions and theorems
As the title says, I am looking to put a page of definitions and theorems ideally at the start of the document (the end is fine too). If my document has theorem environments throughout, I would like ...
5
votes
2
answers
108
views
Redefine a definition with itself, without evaluate its content
I have this MWE :
\documentclass{article}
\usepackage[TS1,T1]{fontenc}
\usepackage[french]{babel}
\newcounter{nbrefpage}
\newcommand\setindex[1] {%
\stepcounter{nbrefpage}%
...
0
votes
2
answers
47
views
Evaluate just one part of a definition, and not the other part
Let's assume we have:
\def\tmpnbrefpage{sometestpagetoken}
how can we define a storedpageref variable, like (in pseudo-language):
"storedpageref" = \pageref{\tmpnbrefpage}
where ...
1
vote
1
answer
38
views
Redefine def by itself without evaluate
If I have \csname var:\foo\endcsname, how can I do that : \expandafter\gdef\csname var:\foo\endcsname{\csname var:\foo\endcsname, \bar} ?
I know I can do it with edef (or xdef for global), but in my ...
1
vote
3
answers
101
views
Defining an Em Dash with Length Greater Than the Cabin Default
I have noticed that the length of an em dash is not always uniform, depending upon the font being used.
Consider the following code which defines an em dash:
\documentclass{book}
\usepackage[T1]{...
5
votes
1
answer
111
views
Using \def in csv range
I would like to use a predefined list of numbers in the csvsimple-l3 range option.
The MWE will explain better:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{csvsimple-l3}
\...
0
votes
1
answer
409
views
Simple boxes for definitions, theorems, lemmas, and proofs with tcolorbox
I would like to have something that looks like this:
I don't want to add Box 1 to the definition environment each time. And this also goes for properties, lemmas, and theorems of the environment
\...
8
votes
3
answers
475
views
How to create \in-symbol with underbar that has rounded edges and correct vertical spacing?
The aim is to create a new symbol \ineq. The appearence of \ineq would be to \in as \subseteq is to \subset.
Output from attempt at making \ineq:
Problems with attempt in decreasing order of ...
1
vote
1
answer
102
views
Why does this command defined with \NewDocumentCommand behave differently from \def inside tabular column specification?
On the first glance
\NewDocumentCommand{\foo}{m}{#1}
and
\def\foo#1{#1}
should be identical and in most scenarios they actually are, but when the argument is not explicitly follows \foo, the command ...
4
votes
1
answer
218
views
How to limit scope of microtype's letterspacing command \textls to non-math environment?
Package microtype has the command \textls to manipulate letterspacing in an ad hoc manner. While its use is usually frowned upon by typographists, according to microtype's user manual (p 23 footnote), ...
4
votes
3
answers
229
views
How would I define a character to start and end an environment in plain TeX?
In TeX, starting and ending math mode is done with the same symbol, namely $. Suppose I would like to start and end an environment like this, perhaps with the text italic, using the character *, as ...
0
votes
1
answer
52
views
Declare new command to denote the condition with additional settings
Can someone tell me how to set the parameters of a declared new command similar to how it is set in the TikZ package? More specifically, I would like to declare a function \condVert{} that sets a ...
2
votes
1
answer
209
views
Changing theoremstyle
I wanted to change the way "Definition 1.1" is displayed. Specifically, I want to make the name of the definition (green box in attached image) appear in bold (which I know I could do with \...
1
vote
3
answers
104
views
How to define a LaTeX shorthand for nested indentation "contexts"
I am looking for a convenient way to code nestable "contexts" whose extents are displayed through indentation. Each context consists of a sequence of "statements" (i.e. lines) and/...
0
votes
1
answer
56
views
Why is this \def failing?
This is just a small snippet, for debugging:
\documentclass[12pt]{article}
\usepackage{amsmath}
\def\block#1{\begin{array}{ll}\ &{#1}\end{array}}
\def\sub#1#2{\text{#1}:\\\block{#2}}
\begin{...
2
votes
2
answers
373
views
Defining a new command, the output of which depends on an internal parameter
Maybe someone can tell me how to define a new command in \LaTeX, which can take one mandatory value and another optional value (parameter) as input. In this case, depending on the value of the ...
2
votes
2
answers
73
views
Generate command definitions that take arguments
I want to define a command \NewSmartOp such that:
\NewSmartOp \MYOP \myop
would produce the following code (or anything equivalent):
\makeatletter
\def\MYOP{\@ifstar\MYOP@star\MYOP@nostar}
\def\...
2
votes
1
answer
333
views
Why double curly brackets in `\long\def\bold#1{{\bf#1}}`
I'm reading The TeXbook by Knuth.
Page 205 has
If you actually want a control sequence to allow arguments with \par
tokens, you can define it to be a “long” macro by saying ‘\long’ just
before ‘\def’. ...
0
votes
2
answers
481
views
Constructing \definition in latex
Does there exist \begin{definition} in latex? And how can I construct one? Is everything derived from \newtheorem command.
0
votes
2
answers
266
views
How to adapt \crefrangelabelformat to subexample formatting?
I would like to be able to redefine something which is supposed to be defined in the preamble.
In this example and in relation to this question :
Cross-referencing: more sublevels, and presets,
I want ...
0
votes
0
answers
138
views
! Missing \endcsname inserted . Problem with \def
I am trying to compile and OLD LaTex file from my PhD thesis, using PDFLatex. However, now it does not compile anymore. It keep me giving this error. Below I give a MWE:
\documentclass[12pt,...
1
vote
1
answer
727
views
Declare math operator
I'm trying to create a command with which to write
\declaremathoperator{ABC}
to get
\def\ABC{\operatorname{ABC}}
I tried to implement it like
\def\declaremathoperator#1
{ \def\csname #1\endcsname{\...
2
votes
1
answer
123
views
new, renew, provide and declare commands naming conventions
When defining new macros (or more general/abstract: resources), we have to consider the case of the macro already being defined. xparse handles this (imho) quite nicely, by using the four prefixes
\...
1
vote
1
answer
211
views
Huge set definition in latex
I am trying to write a set definition like the picture below in latex:
How can I make such a clean set definition?
1
vote
1
answer
71
views
Writing (nested) argument specifier to aux file
This is a follow-up to this question:
where I explained that I want to write some definitions into an aux file and use hooks to achieve this. Refer to this question for context why I want to do the ...
2
votes
1
answer
89
views
On Stacking Asterisks to Form Chapter Dividers with Stackengine
This question is an extension of the earlier post Best Way to Produce This Chapter Divider Image
Consider the code:
\documentclass{book}
\usepackage{stackengine}
\usepackage{graphicx}
\def\asterisks{\...