Questions tagged [definition]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
26 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
11 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
12 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
66 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
23 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
63 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
20 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
130 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
44 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
87 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
48 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
33 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
21 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
33 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
22 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
31 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
49 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
163 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
115 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
359 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
113 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
53 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
1answer
213 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
45 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
59 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
724 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
164 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
62 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
118 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
19 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
176 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
39 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
130 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 ...
0
votes
1answer
142 views

How can I get the Definition and Theorem environment like these in LaTeX package SVMono?

How can I get the Definition and Theorem environment like these in LaTeX package SVMono ?
1
vote
0answers
51 views

How to change the style of an environment

How would I display my definition as Definition 1.1 (Flow map)^1. (^1 is meant to be superscript and denotes a footnote). This is my code \documentclass[11pt,a4paper]{article} \usepackage{amsmath}...
3
votes
1answer
59 views

Editing a word in a sty file

I want to edit a word in a .sty file. I'm learning Latex and I don't know if it can be edited by using \makeatletter and \makeatother commands in the preamble. The .sty file (novel-PostLayout, from ...
1
vote
1answer
61 views

Random start of definition?

I'm currently writing my bachelor thesis and suddenly there's this random text "ärbung2.0.14" on the front page...I can't locate where its coming from. Does it look like its a counter for a definition ...
0
votes
2answers
53 views

Definitions for sections, subsections and subsubsections (+chapter?)

I want to change the commands of the article/ book class and want to know how sections, especially in the article class but also in the book class, are defined. I think it is something like this?: \...
3
votes
2answers
222 views

Why \countdef, \dimendef, and alike require custom-named register to be empty before assignment?

Why \dA can't be assigned a value before it is assigned to \dB? \documentclass[varwidth,border=5mm]{standalone} \begin{document} \newdimen\dA \dimendef\dB\dA % ERROR IF PRECEDED BY NEXT LINE \...
4
votes
2answers
152 views

What definition takes up more memory, \def or \chardef (considering \def contains a single character)?

The question is entirely in the title. Let's take \def\testName{a} and \chardef\testName`\a. Which of the definitions requires more memory?
1
vote
1answer
61 views

How does \newcommand work? Making easier color command

I'm trying to write an easier color command \c{} that is shorter and easier to use than \color{}. However, I do not want to overwrite an existing command, so I will use \providecommand{}[]{} to create ...
0
votes
1answer
97 views

How to write to the right of “Definition” and also enumerate within the definition?

The answer here shows how to enumerate within a definition. But what if I want to also write something to the right of Definition? For example, Definition. Let G be a group. (i) .... (ii) .... ...
7
votes
1answer
342 views

How do I get the hue, saturation and brightness values from a color?

I want to define a new colour (myorange) by changing the hue value of a previously given colour (oldcolour), thus maintaining its original saturation and brightness. Is there a way for doing this? I ...
0
votes
2answers
38 views

Define Terminology Within Document

Similar to the \newtheorem*{dfn}{Definition} statement, is there a way to define words in a document in this fashion, but instead of Definition. This is the definition being shown, it will show up ...
3
votes
2answers
88 views

Expand \def in \write18

I have defined the following command: \newcommand{\formatcommand}[1]{ \def\temp{#1} \def\s{\ifx\temp\empty empty\else not empty\fi} echo "\s" } This works correctly: \formatcommand{} \...
1
vote
1answer
55 views

Defining command part by part 2

This question is an extension to Defining command part by part thread. Let's say we have a command \foo with 1 argument. Can we produce a command \setfoo{aaa}{<some stuff>} which redefines \foo ...
2
votes
2answers
109 views

How to undefine a command with arguments?

I am trying to define \d as \delta in mathmode, but apparently \d is defined as a dot below and it needs an argument: \d{a} would give an a with a dot below. How can I do this? Here are the packages I ...