Questions tagged [definition]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
3answers
70 views

LaTeX3 - Test string equality + Star version

I'm looking for some good advice on switching from (La)TeX to LaTeX3 Here is the first questions corresponding to the toy code below. What is a good way to manage an optional argument with LaTeX3? ...
0
votes
0answers
19 views

Definition starting at A.1 (Appendix)

I'm trying to get the definition ("definição" in portuguese) to start at A.1 instead of 1. The problem is that I have several appendices and every time I add an appendix, the definition ...
1
vote
0answers
38 views

Determining the RGB Definitions of Modified Colors in LaTeX [duplicate]

After defining certain colors and modifying them as the following code indicates, I then would like to determine the equivalent RGB definitions of the modified colors. For example, \documentclass{...
1
vote
4answers
135 views

Failing with TeX expansion

I'm trying to achieve a (seemingly simple) thing. I'd like to define a custom command \Symbol that receives a single parameter and prints that parameter. In addition, I'd like to have another series ...
4
votes
2answers
73 views

\NewDocumentCommand without xparse

I noticed that I can use \NewDocumentCommand without loading xparse. Why is that? How universal is that? And where can I read more about this? (My search terms always pointed to xparse.) \...
0
votes
1answer
58 views

Adjust the code to get TikTok symbol

This question it is related to this. Considering the link of my answer where there are the conditions to have the tiktok symbol https://github.com/liweitianux/resume/blob/master/fontawesome5/...
0
votes
1answer
25 views

Read out (and edit) data from a table with def, xdef, let etc. (by using a pgf-loop and pgfplotstable)

If I read out from a table with \def, say \pgfplotstablegetelem{\row}{No}\of{\mytable} \def\No{\pgfplotsretval} it becomes wrong. By using \xdef \pgfplotstablegetelem{\row}{No}\of{\mytable} \xdef\No{\...
5
votes
4answers
98 views

Store the expanded version of a macro into another macro in the plain format

I wrote the following macro that prints a range of numbers separated by commas: \newcount\tmpnum \def\range#1#2#3{\tmpnum=#2 \loop\the\tmpnum\advance\tmpnum by #1 \ifnum\tmpnum<#3,\...
1
vote
0answers
10 views

Error when citing definitions [duplicate]

I'm looking to cite the source of a definition, but there seems to be a bug. An example of something I'm looking to type: \begin{definition}[\cite[Definition 1.4.2]{Hilbert10}] content \end{...
3
votes
1answer
32 views

Non letter name in command definition

I'd like to define similar commands one with underscore the other — without. However such an approach throws me an error \def\Fix#1{\mathrm{Fix}(#1)} \def\Fix_#1#2{\mathrm{Fix}_{\,#1}(#2)} I tried to ...
1
vote
2answers
51 views

Add optional parameter to def

So I was looking for a way to do something in latex, and I ran across the following MWE: \documentclass{article} \def\foo{1} \def\bar#1 #2{% \expandafter\def\expandafter\foo\expandafter{\foo {}#1}...
1
vote
0answers
34 views

Missing { inserted: \DeclarePairedDelimiterX

The following code \documentclass{scrartcl} \usepackage{mathtools} \DeclarePairedDelimiterX\innerp[2]{\left(}{\right)}{#1 \delimsize\vert \mathopen{}#2} \DeclarePairedDelimiterX{\dualp}[2]{\langle}{\...
0
votes
1answer
21 views

Restating a part of the definition

I am repeating a single definition several times, and I use restatable to do so. But I want the first occurrence of a definition to contain a qualification which is not repeated in the next ...
1
vote
1answer
38 views

I want to retrieve the first and second elements from one argument of \def

\documentclass[border=1cm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[help lines](0,0)grid(3,3); \def\line_segment#1; { \draw(#1[0],#1[1])-...
3
votes
1answer
30 views

The definition in my recompiled pdf is not working like I want

I have a hard time with the definition display. See below, to notice that the Definition A. n supposed to read Definition. An expression... How do I this: "supposed to read Definition. An ...
1
vote
1answer
29 views

Specifying macro definitions via command line arguments to make4ht

I want to learn if there is a way to make make4ht pass some macro definitions to the LaTeX engine during compilation time. Let me explain what I am talking about with pdflatex as an example first. I ...
2
votes
1answer
71 views

Redefine \choose as \binom

I did not know that I should be using \binom instead of \choose (and I ignored all the warnings). Now, instead of manually changing it at all places where I used \choose, I think there should be a way ...
0
votes
0answers
46 views

How to create a TeX variable whose name depends on a parameter

I would like to create multiple \newwrite in my document, for instance: one by chapter. I've tried the following but it doesn't work. I guess, in the end, my question falls back to: giver a parameter #...
0
votes
0answers
28 views

How to select a font in a way that work everywhere in the document?

My document look like this \documentclass{article} \usepackage[T1]{fontenc} \begin{document} \fontfamily{augie}\selectfont Some text \begin{figure} Some other text \end{figure} \end{...
0
votes
1answer
86 views

tcolorbox for definition

How can I make the grey upper box similar to the yellow bottom box. I mean I want the definition counter works with the chapter number. I tried a code and the yellow box is exactly what I want but the ...
0
votes
1answer
208 views

Multiple ornaments between the corners

I would like to bring in several ornamental elements in the lines between the corners. I'am usigng, \begin{tikzpicture}[every node/.style={inner sep=0pt}] \node[shift={(1.cm,-1cm)},anchor=north west](...
0
votes
1answer
95 views

How to use input in newcommand?

I want to implement an insert text wrapped in some additional tags using the \input command. But I get LaTeX Error: There's no line here to end.. How to do it properly? Here is my minimal reproducible ...
4
votes
2answers
113 views

Macro \ifx \else - sex output alternating (help please)

I attempted to write some code that would take the sex of my animal patients (neutered male, spayed female, intact male, intact female) that would apply that to usage of the correct form of he/she, ...
0
votes
1answer
99 views

What is MVE an abreviation for?

I tried searching but neither google nor stackexchange gave me anything. I can almost infer that MVE is the header file of a latex document but I see some examples that include the header the body and ...
2
votes
1answer
72 views

How to make a variable-sized \nmid symbol for “does not divide”?

For a variable-sized bar denoting "a divides b", I normally use \divides \newcommand{\zerodel}{.\kern-\nulldelimiterspace} %removes extraneous spacing after \right etc. \newcommand{\divides}[...
12
votes
2answers
878 views

How to define a new triangle symbol with middle line for use as a maths operator?

I would like to use a specific symbol, a triangle with a middle line, as a mathematical operator. Here is roughly how the symbol ought to look like: [This was generated with tikz by appropriating the ...
2
votes
1answer
78 views

Dynamic definitions not working in ttabbox

I made a macro called \uref with some help from around here. It creates dynamic definitions that produce unique labels. If I call it with \uref{first} it returns a, and every subsequent call with the ...
1
vote
2answers
125 views

How to create a compact glossary / dictionary using words in bold as keys and appending the list at the end of the page, section or chapter?

Here it is an example of compacted glossary with words' meaning. First the text, then the glossary: The combination of photovoltaic technology, solar thermal technology, and reflective or refractive ...
1
vote
1answer
61 views

Are there any commands that cannot be redefined?

i.e. Can I redefine \def, or \renewcommand? Is there a definitive list?
7
votes
1answer
271 views

A macro for defining macros and invoke them sequentially (Tex)

Briefly, In Pure Tex % THE FIRST ARGUMENT SHOULDN'T NEED TO RECEIVE \ AS FIRST CHARACTER \global\def\futuredef#1#2{\global\def\#1{#2}#2} \futuredef{love}{doesn't exist} \love % Gives a error! and % ...
0
votes
1answer
63 views

Create exact same Tufte-style headers

I would like to have the exact same headers, fonts etc. as in the "tufte-book" documentclass for all my \chapters, \sections and \subsections etc. using the "book" documentclass. ...
0
votes
1answer
25 views

Definition counter resetting on new section

I encountered this behavior from LaTex: last definition from section 2.1 was labeled (correctly) as 2.1.8. Then, the first definition of the next section was 2.2.9. I would like it to be 2.2.1 (don't ...
1
vote
0answers
17 views

Abbreviate \begin{frame} [duplicate]

I would like to abbreviate \begin{frame} \end{frame} environment of Beamer. For most Latex environments, I could do this using a basic \def command: \documentclass{article} \def\be{\begin{enumerate}\...
3
votes
1answer
89 views

Subscripts and the `\mathrm{}` command

Consider a library of symbol definitions. Which of the following uses of the \mathrm{} command is preferred? \def\phosphoricacid{\mathrm{H_{3}PO_{4}}}% \def\phosphoricacid{\mathrm{H}_{3}\mathrm{PO}_{...
1
vote
1answer
44 views

Changing the formatting of the Theorem and Proof environment

I ask the question directly in the code. \documentclass[ 11pt, ]{scrbook} % KOMA-Script book \usepackage[T1]{fontenc} \usepackage[linedheaders,parts,...
0
votes
2answers
75 views

How to redefine `\mathrel` without breaking `\overset`?

It seems that I cannot modify \mathrel without breaking \overset, and I do not understand why. The following fails to compile even when the redefinition of \mathrel does exactly the same as the ...
3
votes
1answer
36 views

Referencing a Specific Citation in a Theorem or Definition Statement [duplicate]

Let's say I want to write Definition 1.1 of a source I call \cite{fr82}. I can write \cite[Definition 1.1]{fr82} without any trouble, and I can write \begin{defn}[\cite{fr82}] blah blah \end{defn} ...
3
votes
2answers
145 views

Make equality-sign automatically blue

I know that we can redefine inequality-signs such as \le by simply doing \let\oldle\le and \def\le{\mathrel{...}}. But I have no idea how to redefine the equality-sign =. So if I want to automatically ...
2
votes
1answer
46 views

How to allow exceptions to \MakeLowercase or alternative macro

Please see attached mwe. How can we optionally protect characters or words from the effect of \MakeLowercase{}? \documentclass{article}% \def\thestring{A Pacific hurricane is a mature tropical ...
1
vote
1answer
47 views

issues about argument substitution and control sequence definition

I want to define a command to receive an environment name list (and other argument to control the behavior of the environment, I remove them for simplify) and define these environments, but it does ...
2
votes
2answers
94 views

How do I add a list of definitions following “where?” [closed]

I have one small equation with two supportive terms to explain the equation. \begin{equation} [\mathrm{d}[\mathrm{i}], \mathrm{a}[\mathrm{i}]]=\mathrm{f}_{i}(\mathrm{M}[\mathrm{i}] \cdot \mathrm{f}) \...
1
vote
2answers
62 views

What's wrong? $GL(V):= \{V\in \mathbb{C}^n : \exists W\in \mathbb{C}^n , VW = WV = 1\}$

I used $GL(V)=: \{V\in \mathbb{C}^n : \exists W\in \mathbb{C}^n, VW = WV = 1\}$, which is to express as highlighted. But it sounds having errors, although it can compile. But I want to know is there ...
0
votes
0answers
44 views

Changing \definecolor{lime}{HTML}{A6CE39} statement to a \newcommand statement

I am using Springer journals template (SVJour3). The template says that do not use \def but use \newcommand{}{} to make your own definitions. I had a statement \definecolor{lime}{HTML}{A6CE39} which I ...
0
votes
0answers
26 views

How to add a point inside \newtheorem (definition)?

Good day, please give me the idea to add the point right after number of the definition? My MWE is: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{amssymb}...
1
vote
1answer
74 views

Provided Definition and Example with an Outdent/Aligned text

I am not sure what to even search or how to describe what I'm trying to do here. I'm trying to do a definition-example type of thing. Here's an example: For the Term definition part, I am using \...
2
votes
1answer
28 views

Glossary-esque list of macros in package documentation

I've been on an hours-long journey looking for what should be common TeX knowledge, but without avail. I might just not know the correct search terms to do an efficient search, so I think it's worth ...
2
votes
1answer
32 views

Using \def inside mathematical environment

I have the following: \documentclass{article} \usepackage{amsmath} \usepackage{witharrows} \begin{document} \def\var{x} \[ \begin{WithArrows} \var\var&=\def\var{y}\var\var\\...
1
vote
1answer
54 views

Addressing package collusion when building a library

I wish to create a "library" of commands that I often use, say lib.tex, so that every time I wish to use them, I write \input{lib} and get on with life. The problem, however, arises when my ...
3
votes
2answers
170 views

Define a command that prints the first letter of its input argument

Is there a way to define a command or macro that outputs only the first letter of its argument? Example: my name is Joaquim Brasil. I could define a macro \def\WhatIsYourName#1{\@WhatIsYourName{#1}} ...
5
votes
3answers
236 views

How to name command arguments [duplicate]

Is there a way to give a "name" to the arguments of a command and use them in its definition? What I'd like to do is to be able to get the value of an argument with a "label" like #...