Define a and end pair directly rather than define an environment called ?
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
While defining an environment <env>
also defines the <env>
and end<env>
declarations, what are the circumstances where defining those declarations directly (without defining an environment) is preferable?
I see the following use where proof
and endproof
are defined separately in the informs3
document class file:
%% Use for proper proofs that end with extra space (regardless of the use
%% or non-use of qed (=the black box)
defproof#1Trivlistitem[hspace*1emhskiplabelsepit #1enskip ]ignorespaces
defendproofendTrivlistaddvspace0pt
Is there any reason not to do newenvironmentproof[1]......
instead?
macros environments
add a comment |
up vote
3
down vote
favorite
While defining an environment <env>
also defines the <env>
and end<env>
declarations, what are the circumstances where defining those declarations directly (without defining an environment) is preferable?
I see the following use where proof
and endproof
are defined separately in the informs3
document class file:
%% Use for proper proofs that end with extra space (regardless of the use
%% or non-use of qed (=the black box)
defproof#1Trivlistitem[hspace*1emhskiplabelsepit #1enskip ]ignorespaces
defendproofendTrivlistaddvspace0pt
Is there any reason not to do newenvironmentproof[1]......
instead?
macros environments
2
I'm always amazed when journal styles reinvent the wheel, making it worse than the available models.
– egreg
Nov 17 at 16:43
@egreg Totally.
– Fang Jing
Nov 17 at 17:07
There are pieces of code which you can use both in LaTeX asbeginenvname
..endenvname
and, e.g., in plain-TeX (, where you neither have LaTeX 2e'snewenvironment
-command nor have LaTeX 2e's environment-mechanism,) asenvname
..endenvname
.
– Ulrich Diez
2 days ago
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
While defining an environment <env>
also defines the <env>
and end<env>
declarations, what are the circumstances where defining those declarations directly (without defining an environment) is preferable?
I see the following use where proof
and endproof
are defined separately in the informs3
document class file:
%% Use for proper proofs that end with extra space (regardless of the use
%% or non-use of qed (=the black box)
defproof#1Trivlistitem[hspace*1emhskiplabelsepit #1enskip ]ignorespaces
defendproofendTrivlistaddvspace0pt
Is there any reason not to do newenvironmentproof[1]......
instead?
macros environments
While defining an environment <env>
also defines the <env>
and end<env>
declarations, what are the circumstances where defining those declarations directly (without defining an environment) is preferable?
I see the following use where proof
and endproof
are defined separately in the informs3
document class file:
%% Use for proper proofs that end with extra space (regardless of the use
%% or non-use of qed (=the black box)
defproof#1Trivlistitem[hspace*1emhskiplabelsepit #1enskip ]ignorespaces
defendproofendTrivlistaddvspace0pt
Is there any reason not to do newenvironmentproof[1]......
instead?
macros environments
macros environments
asked Nov 17 at 15:48
Fang Jing
5691612
5691612
2
I'm always amazed when journal styles reinvent the wheel, making it worse than the available models.
– egreg
Nov 17 at 16:43
@egreg Totally.
– Fang Jing
Nov 17 at 17:07
There are pieces of code which you can use both in LaTeX asbeginenvname
..endenvname
and, e.g., in plain-TeX (, where you neither have LaTeX 2e'snewenvironment
-command nor have LaTeX 2e's environment-mechanism,) asenvname
..endenvname
.
– Ulrich Diez
2 days ago
add a comment |
2
I'm always amazed when journal styles reinvent the wheel, making it worse than the available models.
– egreg
Nov 17 at 16:43
@egreg Totally.
– Fang Jing
Nov 17 at 17:07
There are pieces of code which you can use both in LaTeX asbeginenvname
..endenvname
and, e.g., in plain-TeX (, where you neither have LaTeX 2e'snewenvironment
-command nor have LaTeX 2e's environment-mechanism,) asenvname
..endenvname
.
– Ulrich Diez
2 days ago
2
2
I'm always amazed when journal styles reinvent the wheel, making it worse than the available models.
– egreg
Nov 17 at 16:43
I'm always amazed when journal styles reinvent the wheel, making it worse than the available models.
– egreg
Nov 17 at 16:43
@egreg Totally.
– Fang Jing
Nov 17 at 17:07
@egreg Totally.
– Fang Jing
Nov 17 at 17:07
There are pieces of code which you can use both in LaTeX as
beginenvname
..endenvname
and, e.g., in plain-TeX (, where you neither have LaTeX 2e's newenvironment
-command nor have LaTeX 2e's environment-mechanism,) as envname
..endenvname
.– Ulrich Diez
2 days ago
There are pieces of code which you can use both in LaTeX as
beginenvname
..endenvname
and, e.g., in plain-TeX (, where you neither have LaTeX 2e's newenvironment
-command nor have LaTeX 2e's environment-mechanism,) as envname
..endenvname
.– Ulrich Diez
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
newenvironment
other than checking that the name is "safe" to define does nothing different to the def
forms that you show (apart from using longdef
unless the *
form is used).
Especially in older code you will often see the lower level form, going back to when it could take several minutes to load a style file and not doing the checks in often used but unchanging definitions was a useful saving.
I realize I can actually dobeginproofProof. It's obvious. endproof
.
– Fang Jing
Nov 17 at 17:08
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
newenvironment
other than checking that the name is "safe" to define does nothing different to the def
forms that you show (apart from using longdef
unless the *
form is used).
Especially in older code you will often see the lower level form, going back to when it could take several minutes to load a style file and not doing the checks in often used but unchanging definitions was a useful saving.
I realize I can actually dobeginproofProof. It's obvious. endproof
.
– Fang Jing
Nov 17 at 17:08
add a comment |
up vote
4
down vote
accepted
newenvironment
other than checking that the name is "safe" to define does nothing different to the def
forms that you show (apart from using longdef
unless the *
form is used).
Especially in older code you will often see the lower level form, going back to when it could take several minutes to load a style file and not doing the checks in often used but unchanging definitions was a useful saving.
I realize I can actually dobeginproofProof. It's obvious. endproof
.
– Fang Jing
Nov 17 at 17:08
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
newenvironment
other than checking that the name is "safe" to define does nothing different to the def
forms that you show (apart from using longdef
unless the *
form is used).
Especially in older code you will often see the lower level form, going back to when it could take several minutes to load a style file and not doing the checks in often used but unchanging definitions was a useful saving.
newenvironment
other than checking that the name is "safe" to define does nothing different to the def
forms that you show (apart from using longdef
unless the *
form is used).
Especially in older code you will often see the lower level form, going back to when it could take several minutes to load a style file and not doing the checks in often used but unchanging definitions was a useful saving.
edited Nov 17 at 16:34
Phelype Oleinik
20.4k54277
20.4k54277
answered Nov 17 at 16:33
David Carlisle
477k3811061840
477k3811061840
I realize I can actually dobeginproofProof. It's obvious. endproof
.
– Fang Jing
Nov 17 at 17:08
add a comment |
I realize I can actually dobeginproofProof. It's obvious. endproof
.
– Fang Jing
Nov 17 at 17:08
I realize I can actually do
beginproofProof. It's obvious. endproof
.– Fang Jing
Nov 17 at 17:08
I realize I can actually do
beginproofProof. It's obvious. endproof
.– Fang Jing
Nov 17 at 17:08
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460467%2fdefine-a-name-and-endname-pair-directly-rather-than-define-an-environment%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
I'm always amazed when journal styles reinvent the wheel, making it worse than the available models.
– egreg
Nov 17 at 16:43
@egreg Totally.
– Fang Jing
Nov 17 at 17:07
There are pieces of code which you can use both in LaTeX as
beginenvname
..endenvname
and, e.g., in plain-TeX (, where you neither have LaTeX 2e'snewenvironment
-command nor have LaTeX 2e's environment-mechanism,) asenvname
..endenvname
.– Ulrich Diez
2 days ago