Spaces in newenvironment

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I observed an unwanted behavior of my self-made environment. The following code sometimes creates spaces after the environment head and sometimes doesn't.



documentclass[a4paper]article

usepackage[utf8]inputenc
usepackageifthen

newenvironmentTheorem[1]%
medskip%
par%
noindent%
textbfTheorem.%
ifthenelse equal#1 (#1)%
it%
%
%
smallskippar%


newenvironmentTheorem2%
medskip%
par%
noindent%
textbfTheorem.%
it%
%
%
smallskippar%


begindocument

beginTheorem
That is a cool Theorem
endTheorem

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

beginTheorem2
another cool theorem
endTheorem2

beginTheorem2%
another cool theorem
endTheorem2

enddocument


The result is:



Code result



Is there a way of forcing LaTeX to ignore all normal spaces in the definition of an environment such that I can only add spaces by space?



And can I add something to the definition of the environment such that it ignores all spaces and pars that appear directly after the call of the environment such that



beginTheorem2
some text
endTheorem2


produces the same as



beginTheorem2%
some text
endTheorem2


?







share|improve this question






















  • What's wrong with usepackageamsthm and newtheorem*TheoremTheorem?
    – egreg
    Sep 6 at 12:16










  • the space is not space in your definition it is space added (or not) in the document
    – David Carlisle
    Sep 6 at 12:32














up vote
2
down vote

favorite












I observed an unwanted behavior of my self-made environment. The following code sometimes creates spaces after the environment head and sometimes doesn't.



documentclass[a4paper]article

usepackage[utf8]inputenc
usepackageifthen

newenvironmentTheorem[1]%
medskip%
par%
noindent%
textbfTheorem.%
ifthenelse equal#1 (#1)%
it%
%
%
smallskippar%


newenvironmentTheorem2%
medskip%
par%
noindent%
textbfTheorem.%
it%
%
%
smallskippar%


begindocument

beginTheorem
That is a cool Theorem
endTheorem

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

beginTheorem2
another cool theorem
endTheorem2

beginTheorem2%
another cool theorem
endTheorem2

enddocument


The result is:



Code result



Is there a way of forcing LaTeX to ignore all normal spaces in the definition of an environment such that I can only add spaces by space?



And can I add something to the definition of the environment such that it ignores all spaces and pars that appear directly after the call of the environment such that



beginTheorem2
some text
endTheorem2


produces the same as



beginTheorem2%
some text
endTheorem2


?







share|improve this question






















  • What's wrong with usepackageamsthm and newtheorem*TheoremTheorem?
    – egreg
    Sep 6 at 12:16










  • the space is not space in your definition it is space added (or not) in the document
    – David Carlisle
    Sep 6 at 12:32












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I observed an unwanted behavior of my self-made environment. The following code sometimes creates spaces after the environment head and sometimes doesn't.



documentclass[a4paper]article

usepackage[utf8]inputenc
usepackageifthen

newenvironmentTheorem[1]%
medskip%
par%
noindent%
textbfTheorem.%
ifthenelse equal#1 (#1)%
it%
%
%
smallskippar%


newenvironmentTheorem2%
medskip%
par%
noindent%
textbfTheorem.%
it%
%
%
smallskippar%


begindocument

beginTheorem
That is a cool Theorem
endTheorem

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

beginTheorem2
another cool theorem
endTheorem2

beginTheorem2%
another cool theorem
endTheorem2

enddocument


The result is:



Code result



Is there a way of forcing LaTeX to ignore all normal spaces in the definition of an environment such that I can only add spaces by space?



And can I add something to the definition of the environment such that it ignores all spaces and pars that appear directly after the call of the environment such that



beginTheorem2
some text
endTheorem2


produces the same as



beginTheorem2%
some text
endTheorem2


?







share|improve this question














I observed an unwanted behavior of my self-made environment. The following code sometimes creates spaces after the environment head and sometimes doesn't.



documentclass[a4paper]article

usepackage[utf8]inputenc
usepackageifthen

newenvironmentTheorem[1]%
medskip%
par%
noindent%
textbfTheorem.%
ifthenelse equal#1 (#1)%
it%
%
%
smallskippar%


newenvironmentTheorem2%
medskip%
par%
noindent%
textbfTheorem.%
it%
%
%
smallskippar%


begindocument

beginTheorem
That is a cool Theorem
endTheorem

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

beginTheorem2
another cool theorem
endTheorem2

beginTheorem2%
another cool theorem
endTheorem2

enddocument


The result is:



Code result



Is there a way of forcing LaTeX to ignore all normal spaces in the definition of an environment such that I can only add spaces by space?



And can I add something to the definition of the environment such that it ignores all spaces and pars that appear directly after the call of the environment such that



beginTheorem2
some text
endTheorem2


produces the same as



beginTheorem2%
some text
endTheorem2


?









share|improve this question













share|improve this question




share|improve this question








edited Sep 6 at 17:00









Peter Mortensen

48736




48736










asked Sep 6 at 12:04









Nathanael Skrepek

1376




1376











  • What's wrong with usepackageamsthm and newtheorem*TheoremTheorem?
    – egreg
    Sep 6 at 12:16










  • the space is not space in your definition it is space added (or not) in the document
    – David Carlisle
    Sep 6 at 12:32
















  • What's wrong with usepackageamsthm and newtheorem*TheoremTheorem?
    – egreg
    Sep 6 at 12:16










  • the space is not space in your definition it is space added (or not) in the document
    – David Carlisle
    Sep 6 at 12:32















What's wrong with usepackageamsthm and newtheorem*TheoremTheorem?
– egreg
Sep 6 at 12:16




What's wrong with usepackageamsthm and newtheorem*TheoremTheorem?
– egreg
Sep 6 at 12:16












the space is not space in your definition it is space added (or not) in the document
– David Carlisle
Sep 6 at 12:32




the space is not space in your definition it is space added (or not) in the document
– David Carlisle
Sep 6 at 12:32










2 Answers
2






active

oldest

votes

















up vote
4
down vote



accepted










Yes! Use ignorespaces at the end of the first argument to newenvironment



documentclassarticle
newenvironmentTheorem2%
medskip%
par%
noindent%
textbfTheorem.%
itshapeignorespaces%
%
%
smallskippar%

begindocument
beginTheorem2
some text
endTheorem2
enddocument


ignorespaces is a primitive that ignores the next spaces until some text is to be output. When you do e.g. newenvironmentthm then a macro thm is made, which in turn is the last macro executed by the beginthm command.






share|improve this answer


















  • 1




    okay thanks I will try that. But is there also a way to ignore all normal space signs in the definition of an environment?
    – Nathanael Skrepek
    Sep 6 at 12:11










  • @NathanaelSkrepek not that I know of.
    – Andreas Storvik Strauman
    Sep 6 at 12:12










  • hmm anyway your command seems enough to make the environment do what it was supposed to do.
    – Nathanael Skrepek
    Sep 6 at 12:15






  • 2




    @NathanaelSkrepek No, Inside a definition, you just have to write a space where you want one, and not write a space where you don't want one! (That's why lines in definitions often end with %, of course)
    – alephzero
    Sep 6 at 12:15






  • 1




    @AndreasStorvikStrauman The OP says the unwanted behaviour is that it sometimes creates spaces and sometimes doesn't. I assumed that in normal English text, you always want a space in the output after 'Theorem.'
    – alephzero
    Sep 6 at 12:23

















up vote
4
down vote













Yes, there is: use xparse and exploit that in the scope of ExplSyntaxOn spaces are ignored; one can use ~ to insert a real space.



documentclass[a4paper]article

usepackagexparse

ExplSyntaxOn
NewDocumentEnvironmentTheoremo

paraddvspacemedskipamount
noindent
normalfont
textbfTheorem.~
IfValueT#1(#1)~
itshapeignorespaces


paraddvspacesmallskipamount

ExplSyntaxOff

begindocument

Some text before the theorem to see the vertical spacing
in context.

beginTheorem
That is a cool Theorem
endTheorem

Some text after and before the theorem to see the vertical spacing
in context.

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

Some text after the theorem to see the vertical spacing
in context.

enddocument


I made some adjustments: medskip and smallskip are wrong in this context. However, smallskipamount is definitely too small as the image shows. With addvspace the vertical spaces don't accumulate; with your code two consecutive theorems would be separated by a small skip plus a medium skip.



enter image description here



On the other hand, newtheorem* from amsthm is much simpler.



documentclass[a4paper]article

usepackageamsthm

newtheorem*TheoremTheorem

begindocument

Some text before the theorem to see the vertical spacing
in context.

beginTheorem
That is a cool Theorem
endTheorem

Some text after and before the theorem to see the vertical spacing
in context.

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

Some text after the theorem to see the vertical spacing
in context.

enddocument


enter image description here






share|improve this answer




















  • So if you do at the beginning and at the end medskip and one theorem follows an other then between them is still one medskip instead of two?
    – Nathanael Skrepek
    Sep 6 at 12:37










  • @NathanaelSkrepek With addvspace only one, with medskip two.
    – egreg
    Sep 6 at 12:38










  • okay thanks this a helpful command
    – Nathanael Skrepek
    Sep 6 at 12:39










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f449677%2fspaces-in-newenvironment%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
4
down vote



accepted










Yes! Use ignorespaces at the end of the first argument to newenvironment



documentclassarticle
newenvironmentTheorem2%
medskip%
par%
noindent%
textbfTheorem.%
itshapeignorespaces%
%
%
smallskippar%

begindocument
beginTheorem2
some text
endTheorem2
enddocument


ignorespaces is a primitive that ignores the next spaces until some text is to be output. When you do e.g. newenvironmentthm then a macro thm is made, which in turn is the last macro executed by the beginthm command.






share|improve this answer


















  • 1




    okay thanks I will try that. But is there also a way to ignore all normal space signs in the definition of an environment?
    – Nathanael Skrepek
    Sep 6 at 12:11










  • @NathanaelSkrepek not that I know of.
    – Andreas Storvik Strauman
    Sep 6 at 12:12










  • hmm anyway your command seems enough to make the environment do what it was supposed to do.
    – Nathanael Skrepek
    Sep 6 at 12:15






  • 2




    @NathanaelSkrepek No, Inside a definition, you just have to write a space where you want one, and not write a space where you don't want one! (That's why lines in definitions often end with %, of course)
    – alephzero
    Sep 6 at 12:15






  • 1




    @AndreasStorvikStrauman The OP says the unwanted behaviour is that it sometimes creates spaces and sometimes doesn't. I assumed that in normal English text, you always want a space in the output after 'Theorem.'
    – alephzero
    Sep 6 at 12:23














up vote
4
down vote



accepted










Yes! Use ignorespaces at the end of the first argument to newenvironment



documentclassarticle
newenvironmentTheorem2%
medskip%
par%
noindent%
textbfTheorem.%
itshapeignorespaces%
%
%
smallskippar%

begindocument
beginTheorem2
some text
endTheorem2
enddocument


ignorespaces is a primitive that ignores the next spaces until some text is to be output. When you do e.g. newenvironmentthm then a macro thm is made, which in turn is the last macro executed by the beginthm command.






share|improve this answer


















  • 1




    okay thanks I will try that. But is there also a way to ignore all normal space signs in the definition of an environment?
    – Nathanael Skrepek
    Sep 6 at 12:11










  • @NathanaelSkrepek not that I know of.
    – Andreas Storvik Strauman
    Sep 6 at 12:12










  • hmm anyway your command seems enough to make the environment do what it was supposed to do.
    – Nathanael Skrepek
    Sep 6 at 12:15






  • 2




    @NathanaelSkrepek No, Inside a definition, you just have to write a space where you want one, and not write a space where you don't want one! (That's why lines in definitions often end with %, of course)
    – alephzero
    Sep 6 at 12:15






  • 1




    @AndreasStorvikStrauman The OP says the unwanted behaviour is that it sometimes creates spaces and sometimes doesn't. I assumed that in normal English text, you always want a space in the output after 'Theorem.'
    – alephzero
    Sep 6 at 12:23












up vote
4
down vote



accepted







up vote
4
down vote



accepted






Yes! Use ignorespaces at the end of the first argument to newenvironment



documentclassarticle
newenvironmentTheorem2%
medskip%
par%
noindent%
textbfTheorem.%
itshapeignorespaces%
%
%
smallskippar%

begindocument
beginTheorem2
some text
endTheorem2
enddocument


ignorespaces is a primitive that ignores the next spaces until some text is to be output. When you do e.g. newenvironmentthm then a macro thm is made, which in turn is the last macro executed by the beginthm command.






share|improve this answer














Yes! Use ignorespaces at the end of the first argument to newenvironment



documentclassarticle
newenvironmentTheorem2%
medskip%
par%
noindent%
textbfTheorem.%
itshapeignorespaces%
%
%
smallskippar%

begindocument
beginTheorem2
some text
endTheorem2
enddocument


ignorespaces is a primitive that ignores the next spaces until some text is to be output. When you do e.g. newenvironmentthm then a macro thm is made, which in turn is the last macro executed by the beginthm command.







share|improve this answer














share|improve this answer



share|improve this answer








edited Sep 6 at 12:53

























answered Sep 6 at 12:07









Andreas Storvik Strauman

2,187418




2,187418







  • 1




    okay thanks I will try that. But is there also a way to ignore all normal space signs in the definition of an environment?
    – Nathanael Skrepek
    Sep 6 at 12:11










  • @NathanaelSkrepek not that I know of.
    – Andreas Storvik Strauman
    Sep 6 at 12:12










  • hmm anyway your command seems enough to make the environment do what it was supposed to do.
    – Nathanael Skrepek
    Sep 6 at 12:15






  • 2




    @NathanaelSkrepek No, Inside a definition, you just have to write a space where you want one, and not write a space where you don't want one! (That's why lines in definitions often end with %, of course)
    – alephzero
    Sep 6 at 12:15






  • 1




    @AndreasStorvikStrauman The OP says the unwanted behaviour is that it sometimes creates spaces and sometimes doesn't. I assumed that in normal English text, you always want a space in the output after 'Theorem.'
    – alephzero
    Sep 6 at 12:23












  • 1




    okay thanks I will try that. But is there also a way to ignore all normal space signs in the definition of an environment?
    – Nathanael Skrepek
    Sep 6 at 12:11










  • @NathanaelSkrepek not that I know of.
    – Andreas Storvik Strauman
    Sep 6 at 12:12










  • hmm anyway your command seems enough to make the environment do what it was supposed to do.
    – Nathanael Skrepek
    Sep 6 at 12:15






  • 2




    @NathanaelSkrepek No, Inside a definition, you just have to write a space where you want one, and not write a space where you don't want one! (That's why lines in definitions often end with %, of course)
    – alephzero
    Sep 6 at 12:15






  • 1




    @AndreasStorvikStrauman The OP says the unwanted behaviour is that it sometimes creates spaces and sometimes doesn't. I assumed that in normal English text, you always want a space in the output after 'Theorem.'
    – alephzero
    Sep 6 at 12:23







1




1




okay thanks I will try that. But is there also a way to ignore all normal space signs in the definition of an environment?
– Nathanael Skrepek
Sep 6 at 12:11




okay thanks I will try that. But is there also a way to ignore all normal space signs in the definition of an environment?
– Nathanael Skrepek
Sep 6 at 12:11












@NathanaelSkrepek not that I know of.
– Andreas Storvik Strauman
Sep 6 at 12:12




@NathanaelSkrepek not that I know of.
– Andreas Storvik Strauman
Sep 6 at 12:12












hmm anyway your command seems enough to make the environment do what it was supposed to do.
– Nathanael Skrepek
Sep 6 at 12:15




hmm anyway your command seems enough to make the environment do what it was supposed to do.
– Nathanael Skrepek
Sep 6 at 12:15




2




2




@NathanaelSkrepek No, Inside a definition, you just have to write a space where you want one, and not write a space where you don't want one! (That's why lines in definitions often end with %, of course)
– alephzero
Sep 6 at 12:15




@NathanaelSkrepek No, Inside a definition, you just have to write a space where you want one, and not write a space where you don't want one! (That's why lines in definitions often end with %, of course)
– alephzero
Sep 6 at 12:15




1




1




@AndreasStorvikStrauman The OP says the unwanted behaviour is that it sometimes creates spaces and sometimes doesn't. I assumed that in normal English text, you always want a space in the output after 'Theorem.'
– alephzero
Sep 6 at 12:23




@AndreasStorvikStrauman The OP says the unwanted behaviour is that it sometimes creates spaces and sometimes doesn't. I assumed that in normal English text, you always want a space in the output after 'Theorem.'
– alephzero
Sep 6 at 12:23










up vote
4
down vote













Yes, there is: use xparse and exploit that in the scope of ExplSyntaxOn spaces are ignored; one can use ~ to insert a real space.



documentclass[a4paper]article

usepackagexparse

ExplSyntaxOn
NewDocumentEnvironmentTheoremo

paraddvspacemedskipamount
noindent
normalfont
textbfTheorem.~
IfValueT#1(#1)~
itshapeignorespaces


paraddvspacesmallskipamount

ExplSyntaxOff

begindocument

Some text before the theorem to see the vertical spacing
in context.

beginTheorem
That is a cool Theorem
endTheorem

Some text after and before the theorem to see the vertical spacing
in context.

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

Some text after the theorem to see the vertical spacing
in context.

enddocument


I made some adjustments: medskip and smallskip are wrong in this context. However, smallskipamount is definitely too small as the image shows. With addvspace the vertical spaces don't accumulate; with your code two consecutive theorems would be separated by a small skip plus a medium skip.



enter image description here



On the other hand, newtheorem* from amsthm is much simpler.



documentclass[a4paper]article

usepackageamsthm

newtheorem*TheoremTheorem

begindocument

Some text before the theorem to see the vertical spacing
in context.

beginTheorem
That is a cool Theorem
endTheorem

Some text after and before the theorem to see the vertical spacing
in context.

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

Some text after the theorem to see the vertical spacing
in context.

enddocument


enter image description here






share|improve this answer




















  • So if you do at the beginning and at the end medskip and one theorem follows an other then between them is still one medskip instead of two?
    – Nathanael Skrepek
    Sep 6 at 12:37










  • @NathanaelSkrepek With addvspace only one, with medskip two.
    – egreg
    Sep 6 at 12:38










  • okay thanks this a helpful command
    – Nathanael Skrepek
    Sep 6 at 12:39














up vote
4
down vote













Yes, there is: use xparse and exploit that in the scope of ExplSyntaxOn spaces are ignored; one can use ~ to insert a real space.



documentclass[a4paper]article

usepackagexparse

ExplSyntaxOn
NewDocumentEnvironmentTheoremo

paraddvspacemedskipamount
noindent
normalfont
textbfTheorem.~
IfValueT#1(#1)~
itshapeignorespaces


paraddvspacesmallskipamount

ExplSyntaxOff

begindocument

Some text before the theorem to see the vertical spacing
in context.

beginTheorem
That is a cool Theorem
endTheorem

Some text after and before the theorem to see the vertical spacing
in context.

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

Some text after the theorem to see the vertical spacing
in context.

enddocument


I made some adjustments: medskip and smallskip are wrong in this context. However, smallskipamount is definitely too small as the image shows. With addvspace the vertical spaces don't accumulate; with your code two consecutive theorems would be separated by a small skip plus a medium skip.



enter image description here



On the other hand, newtheorem* from amsthm is much simpler.



documentclass[a4paper]article

usepackageamsthm

newtheorem*TheoremTheorem

begindocument

Some text before the theorem to see the vertical spacing
in context.

beginTheorem
That is a cool Theorem
endTheorem

Some text after and before the theorem to see the vertical spacing
in context.

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

Some text after the theorem to see the vertical spacing
in context.

enddocument


enter image description here






share|improve this answer




















  • So if you do at the beginning and at the end medskip and one theorem follows an other then between them is still one medskip instead of two?
    – Nathanael Skrepek
    Sep 6 at 12:37










  • @NathanaelSkrepek With addvspace only one, with medskip two.
    – egreg
    Sep 6 at 12:38










  • okay thanks this a helpful command
    – Nathanael Skrepek
    Sep 6 at 12:39












up vote
4
down vote










up vote
4
down vote









Yes, there is: use xparse and exploit that in the scope of ExplSyntaxOn spaces are ignored; one can use ~ to insert a real space.



documentclass[a4paper]article

usepackagexparse

ExplSyntaxOn
NewDocumentEnvironmentTheoremo

paraddvspacemedskipamount
noindent
normalfont
textbfTheorem.~
IfValueT#1(#1)~
itshapeignorespaces


paraddvspacesmallskipamount

ExplSyntaxOff

begindocument

Some text before the theorem to see the vertical spacing
in context.

beginTheorem
That is a cool Theorem
endTheorem

Some text after and before the theorem to see the vertical spacing
in context.

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

Some text after the theorem to see the vertical spacing
in context.

enddocument


I made some adjustments: medskip and smallskip are wrong in this context. However, smallskipamount is definitely too small as the image shows. With addvspace the vertical spaces don't accumulate; with your code two consecutive theorems would be separated by a small skip plus a medium skip.



enter image description here



On the other hand, newtheorem* from amsthm is much simpler.



documentclass[a4paper]article

usepackageamsthm

newtheorem*TheoremTheorem

begindocument

Some text before the theorem to see the vertical spacing
in context.

beginTheorem
That is a cool Theorem
endTheorem

Some text after and before the theorem to see the vertical spacing
in context.

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

Some text after the theorem to see the vertical spacing
in context.

enddocument


enter image description here






share|improve this answer












Yes, there is: use xparse and exploit that in the scope of ExplSyntaxOn spaces are ignored; one can use ~ to insert a real space.



documentclass[a4paper]article

usepackagexparse

ExplSyntaxOn
NewDocumentEnvironmentTheoremo

paraddvspacemedskipamount
noindent
normalfont
textbfTheorem.~
IfValueT#1(#1)~
itshapeignorespaces


paraddvspacesmallskipamount

ExplSyntaxOff

begindocument

Some text before the theorem to see the vertical spacing
in context.

beginTheorem
That is a cool Theorem
endTheorem

Some text after and before the theorem to see the vertical spacing
in context.

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

Some text after the theorem to see the vertical spacing
in context.

enddocument


I made some adjustments: medskip and smallskip are wrong in this context. However, smallskipamount is definitely too small as the image shows. With addvspace the vertical spaces don't accumulate; with your code two consecutive theorems would be separated by a small skip plus a medium skip.



enter image description here



On the other hand, newtheorem* from amsthm is much simpler.



documentclass[a4paper]article

usepackageamsthm

newtheorem*TheoremTheorem

begindocument

Some text before the theorem to see the vertical spacing
in context.

beginTheorem
That is a cool Theorem
endTheorem

Some text after and before the theorem to see the vertical spacing
in context.

beginTheorem[of some famous guy]
That is a cool Theorem
endTheorem

Some text after the theorem to see the vertical spacing
in context.

enddocument


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 6 at 12:29









egreg

681k8318103058




681k8318103058











  • So if you do at the beginning and at the end medskip and one theorem follows an other then between them is still one medskip instead of two?
    – Nathanael Skrepek
    Sep 6 at 12:37










  • @NathanaelSkrepek With addvspace only one, with medskip two.
    – egreg
    Sep 6 at 12:38










  • okay thanks this a helpful command
    – Nathanael Skrepek
    Sep 6 at 12:39
















  • So if you do at the beginning and at the end medskip and one theorem follows an other then between them is still one medskip instead of two?
    – Nathanael Skrepek
    Sep 6 at 12:37










  • @NathanaelSkrepek With addvspace only one, with medskip two.
    – egreg
    Sep 6 at 12:38










  • okay thanks this a helpful command
    – Nathanael Skrepek
    Sep 6 at 12:39















So if you do at the beginning and at the end medskip and one theorem follows an other then between them is still one medskip instead of two?
– Nathanael Skrepek
Sep 6 at 12:37




So if you do at the beginning and at the end medskip and one theorem follows an other then between them is still one medskip instead of two?
– Nathanael Skrepek
Sep 6 at 12:37












@NathanaelSkrepek With addvspace only one, with medskip two.
– egreg
Sep 6 at 12:38




@NathanaelSkrepek With addvspace only one, with medskip two.
– egreg
Sep 6 at 12:38












okay thanks this a helpful command
– Nathanael Skrepek
Sep 6 at 12:39




okay thanks this a helpful command
– Nathanael Skrepek
Sep 6 at 12:39

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f449677%2fspaces-in-newenvironment%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

Long meetings (6-7 hours a day): Being “babysat” by supervisor

Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

Confectionery