Questions tagged [definition]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
57 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
38 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
25 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
59 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
176 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
53 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 ...
5
votes
2answers
97 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
81 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
52 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
750 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
71 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
69 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
259 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
45 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
17 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
14 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
80 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
32 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
70 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
28 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
139 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
40 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
46 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
91 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
54 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
39 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
24 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
52 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
24 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
52 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
166 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
160 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 #...
4
votes
3answers
361 views

\edef\relax{\relax} makes \relax hang forever

Previously I thought it is always safe to \edef a macro to its existing definition. But \edef\relax{\relax} makes \relax hang forever and CPU is very busy. So what is TeX doing there?
0
votes
1answer
30 views

How to customise two different powers at the same time

Is it possible to define shorthand for a definition as follows: \def\par#1{\frac{x_{#1}}{y^{#1}}} In the document I have \par1 + \par2 + \par3 whereas for \par2 and \par3 this is expected outcome, ...
3
votes
1answer
138 views

backslash in macro name

Very simple code: \def\a{12} \def\a\b{34} \a\b % ok: 34 \a % error \bye Very simple question: I would like to know how \def\a\b{34} is processed by the tex engine and why \a no longer ...
2
votes
2answers
54 views

The “\newcommand”, with 25 parameters, recursively defined through other “\newcommand” does not work

I defined a custom command with 25 parameters with the "newcommand" that I called "commandM". I am working with block matrices. You need to repeat them in the text with one or two modified entries. ...
2
votes
1answer
56 views

How does \let effect when combined with \@gobble?

I read everywhere (e.g. https://en.wikibooks.org/wiki/TeX/let) that \let copies the content of a command into a new command. My question is, why do we expect \let\comdwithtwoargs\@gobble makes \...
1
vote
2answers
464 views

Moodle package. Problem with definitions and environments

I'm compiling this simple quiz under LaTex TexShop 4.27 \documentclass[12pt]{article} \usepackage{moodle} \def\EN{{\bf A}} \def\XV{3} \def\YV{4} %--------------------------- \begin{document} \begin{...
2
votes
1answer
49 views

problem in \def with if

I would like to make a definition in the form: \def\nameMYdef#1{ if (length of text #1) <= (width of the text on the page (? \textwidth ?) ) then (center(#1)) else ( justification(#1)) } Of ...
2
votes
2answers
73 views

Formatting: Double hanging indent of an entire paragraph

How would I format the following in LaTeX: My current LaTeX code provides this: (Forgetting the Bolded text for now) My code looks like this: \documentclass [a4paper,12pt]{report} \edef\...
14
votes
2answers
738 views

Trying to understand the definition of \newcommand (complex handling of parameter tokens)

I'm still trying to understand how exactly tex parses documents. This time I'm trying to understand all the parameter-tokens-handling in \newcommand and friends, which looks like black magic to me - ...
3
votes
0answers
205 views

How is TeX/LaTeX parsed?

I have some questions about TeX/LaTeX parser and parsing TeX/LaTeX after reading the following: Limitations when parsing TeX as a context-free grammar This is a PEG parser, which means it interprets ...
2
votes
1answer
72 views

Defining `\subsetcong` and `\subsetsim` via proper tilde over and under `\subset`

I'd like to define a new command \subsetcong that would typeset a tilde over \subseteq to make it look similar to how tilde is over = in \cong. And also, I'd like to define \subsetsim to mean a \...
1
vote
5answers
131 views

Align sentences beneath each other. Like ruler in word!

Essentially, I want to be able align the non-bold sentences underneath each other. In word I would use a ruler. As you would if you ignored all the underlines Canonical Ensemble: System with fixed ...
1
vote
0answers
20 views

Listing theorems or definitions

I followed this Marking the end of a definition to create an specific environment definition for my theorems. Is there any easy way of listing all declared definitions/theorems? I want a list similar ...
0
votes
1answer
293 views

Theorem/Definition/… with individual numbering

I would like to give the theorem/lemma/definition/... environment an individual number. For example: 1 Section Theorem 20.1. (XXX) ... Definiton 21.2.1.: ... Here is the "20.1." and "21.2....
0
votes
1answer
49 views

How do I create multiple definition boxes in Beamer?

I wanted to create a particular slide in beamer. Please find below the pic for the same. How do I do it? Thank you.
2
votes
1answer
190 views

How to delete a counter?

I am trying to delete a counter in my ".sty" file. Right now I have a few ".tex" files that use the same ".sty". They use the same ".sty" file to use \newcommands. However, when I go to make a new ...