Is a `vspace` placed on the end of a paragraph a bad LaTeX coding?vspace doesn't work properlyLaTeX adds an additional blank paragraph after the end of my custom environmentAdd vertical space only if no vertical space was added previouslyHow can I eliminate section headers, while keeping the first paragraph of each section unindented?Should I use \ to end a line or a paragraph?Change paragraph spacing without messing up the rest of the documentClassicthesis: spacing after paragraph endSpacing between “clamped” paragraphs bad at end/start of pageIndent paragraph both on the left and right without any external packagesAdd text at end of paragraph that has an hbox:nSet vertical space after paragraph depending on the following text
What Happens when Passenger Refuses to Fly Boeing 737 Max?
Child Theme Path Being Ignored With wp_enqueue_scripts
Is it work or heat?
Is compression "encryption" under FCC regs?
Bash script should only kill those instances of another script's that it has launched
Is "history" a male-biased word ("his+story")?
PTIJ: Should I kill my computer after installing software?
Does the nature of the Apocalypse in The Umbrella Academy change from the first to the last episode?
Recommendation letter by significant other if you worked with them professionally?
How to draw cubes in a 3 dimensional plane
Motivation for Zeta Function of an Algebraic Variety
How can I get players to stop ignoring or overlooking the plot hooks I'm giving them?
Find longest word in a string: are any of these algorithms good?
Is "conspicuously missing" or "conspicuously" the subject of this sentence?
finite abelian groups tensor product.
Are babies of evil humanoid species inherently evil?
How can The Temple of Elementary Evil reliably protect itself against kinetic bombardment?
How is the wildcard * interpreted as a command?
What are some noteworthy "mic-drop" moments in math?
Latex does not go to next line
If I receive an SOS signal, what is the proper response?
Counting all the hearts
Error during using callback start_page_number in lualatex
List elements digit difference sort
Is a `vspace` placed on the end of a paragraph a bad LaTeX coding?
vspace doesn't work properlyLaTeX adds an additional blank paragraph after the end of my custom environmentAdd vertical space only if no vertical space was added previouslyHow can I eliminate section headers, while keeping the first paragraph of each section unindented?Should I use \ to end a line or a paragraph?Change paragraph spacing without messing up the rest of the documentClassicthesis: spacing after paragraph endSpacing between “clamped” paragraphs bad at end/start of pageIndent paragraph both on the left and right without any external packagesAdd text at end of paragraph that has an hbox:nSet vertical space after paragraph depending on the following text
After a comment of @DavidCarlisle in a question about vspace usage I tried to find out if, when and why a vspace command should be avoided to added as a last command of a paragraph in order to add or to remove space between paragraphs, like:
This is the text of a paragraph here.vspace1cm
This is the text of the next paragraph.
@DavidCarlisle answered in a comment of mine that:
"the blank line should be before the vspace. Using vspace in horizontal
mode is well defined but weird, you almost always want to avoid that."
So, the proposed "correction" (as far as I can understand) is:
This is the text of a paragraph here.
vspace1cmThis is the text of the next paragraph.
But I tried many examples and didn't found one that would give an unexpected output (in order of vertical spacing, but general too). Also, in my first LaTeX steps I was using this style:
This is the text of a paragraph here.
vspace1cm
This is the text of the next paragraph.
that now seems awful to me but could be consider as better LaTeX coding from my first example (the style that I am currently using).
So, my question is:
**
Should I avoid the coding style of the first example for some reason?- Is there any example that my style will fail in the expected spacing? (or this is just about code style)
MWE:
documentclassarticle
usepackageparskip
usepackagetikz
usetikzlibrarycalc
usetikzlibrarypositioning
setlengthparskip1cm plus 0cm minus 0cm
setlengthparindent0pt
newcommandexpectedVSkip[2][2.2cm]begintikzpicture[overlay,remember picture,baseline=0pt]node[use as bounding box,inner sep=0,outer sep=0] at (0,0) (A)vphantomtextttp;draw[->,blue] (A.south)--node[midway,right]$#2$($(A.south)+(0,-#2)$);draw[->,thin,blue] ($(A.south)+(-#1,0)$)--($(A.south)+(0,0)$);draw[->,thin,blue] ($(A.south)+(-#1,-#2)$)--($(A.south)+(0,-#2)$);endtikzpicture
begindocument
This is the first paragraph that will have a space of the verb|parskip|$=1;cm$ length from the following command since no verb|vspace|expectedVSkip1cm command is added here.
This is the second paragraph that will have a space of $0.5;cm$ from the folowing paragraph since a verb|vspace-0.5cm|expectedVSkip0.5cm command is added just in its end.vspace-0.5cm
Thisvspace2cm is the third paragraph with a verb|vspace2cm|expectedVSkip2cm command before the end of its first line. The paragpaph have enough text following, in order to let us discover if the verb|vspace| will act from the point of the first linebreak or from the end of this paragraph (Since the command is placed in its first line, the command is supposed to act just at the place that LaTeX will deside to break the line and the paragraph will be an ugly broken paragraph with a strange added vertical space of exactly $2;cm$). After this paragraph the following paragraph will be in distance of 2cm since an additional (just one) $cm$ have been added through a verb|vspace1cm|expectedVSkip2cm to the verb|parskip|.vspace1cm
This is just the fourth paragraph.
enddocument
and output of MWE:

PS: I will not tag the question with tikz tag, because I just used that to demonstrate the distances and to make them visible, feel free to use the command even if you have no idea about tikz, or to just ignore it and show the possible "failing" example of my style with another way or with just clear difference in the expected vertical space (or whatever).
spacing paragraphs vertical horizontal
add a comment |
After a comment of @DavidCarlisle in a question about vspace usage I tried to find out if, when and why a vspace command should be avoided to added as a last command of a paragraph in order to add or to remove space between paragraphs, like:
This is the text of a paragraph here.vspace1cm
This is the text of the next paragraph.
@DavidCarlisle answered in a comment of mine that:
"the blank line should be before the vspace. Using vspace in horizontal
mode is well defined but weird, you almost always want to avoid that."
So, the proposed "correction" (as far as I can understand) is:
This is the text of a paragraph here.
vspace1cmThis is the text of the next paragraph.
But I tried many examples and didn't found one that would give an unexpected output (in order of vertical spacing, but general too). Also, in my first LaTeX steps I was using this style:
This is the text of a paragraph here.
vspace1cm
This is the text of the next paragraph.
that now seems awful to me but could be consider as better LaTeX coding from my first example (the style that I am currently using).
So, my question is:
**
Should I avoid the coding style of the first example for some reason?- Is there any example that my style will fail in the expected spacing? (or this is just about code style)
MWE:
documentclassarticle
usepackageparskip
usepackagetikz
usetikzlibrarycalc
usetikzlibrarypositioning
setlengthparskip1cm plus 0cm minus 0cm
setlengthparindent0pt
newcommandexpectedVSkip[2][2.2cm]begintikzpicture[overlay,remember picture,baseline=0pt]node[use as bounding box,inner sep=0,outer sep=0] at (0,0) (A)vphantomtextttp;draw[->,blue] (A.south)--node[midway,right]$#2$($(A.south)+(0,-#2)$);draw[->,thin,blue] ($(A.south)+(-#1,0)$)--($(A.south)+(0,0)$);draw[->,thin,blue] ($(A.south)+(-#1,-#2)$)--($(A.south)+(0,-#2)$);endtikzpicture
begindocument
This is the first paragraph that will have a space of the verb|parskip|$=1;cm$ length from the following command since no verb|vspace|expectedVSkip1cm command is added here.
This is the second paragraph that will have a space of $0.5;cm$ from the folowing paragraph since a verb|vspace-0.5cm|expectedVSkip0.5cm command is added just in its end.vspace-0.5cm
Thisvspace2cm is the third paragraph with a verb|vspace2cm|expectedVSkip2cm command before the end of its first line. The paragpaph have enough text following, in order to let us discover if the verb|vspace| will act from the point of the first linebreak or from the end of this paragraph (Since the command is placed in its first line, the command is supposed to act just at the place that LaTeX will deside to break the line and the paragraph will be an ugly broken paragraph with a strange added vertical space of exactly $2;cm$). After this paragraph the following paragraph will be in distance of 2cm since an additional (just one) $cm$ have been added through a verb|vspace1cm|expectedVSkip2cm to the verb|parskip|.vspace1cm
This is just the fourth paragraph.
enddocument
and output of MWE:

PS: I will not tag the question with tikz tag, because I just used that to demonstrate the distances and to make them visible, feel free to use the command even if you have no idea about tikz, or to just ignore it and show the possible "failing" example of my style with another way or with just clear difference in the expected vertical space (or whatever).
spacing paragraphs vertical horizontal
Usevspaceinside a paragraph if you really want to space out two lines of that paragraph. If you want to space two paragraphs, use the code you find ugly, but which actually is the correct one.
– egreg
5 mins ago
You may also inadvertently usevspaceat the end of a line, then not leave a blank space, but think you've started a new paragraph. This is a special case of what @egreg mentions.
– Werner
1 min ago
add a comment |
After a comment of @DavidCarlisle in a question about vspace usage I tried to find out if, when and why a vspace command should be avoided to added as a last command of a paragraph in order to add or to remove space between paragraphs, like:
This is the text of a paragraph here.vspace1cm
This is the text of the next paragraph.
@DavidCarlisle answered in a comment of mine that:
"the blank line should be before the vspace. Using vspace in horizontal
mode is well defined but weird, you almost always want to avoid that."
So, the proposed "correction" (as far as I can understand) is:
This is the text of a paragraph here.
vspace1cmThis is the text of the next paragraph.
But I tried many examples and didn't found one that would give an unexpected output (in order of vertical spacing, but general too). Also, in my first LaTeX steps I was using this style:
This is the text of a paragraph here.
vspace1cm
This is the text of the next paragraph.
that now seems awful to me but could be consider as better LaTeX coding from my first example (the style that I am currently using).
So, my question is:
**
Should I avoid the coding style of the first example for some reason?- Is there any example that my style will fail in the expected spacing? (or this is just about code style)
MWE:
documentclassarticle
usepackageparskip
usepackagetikz
usetikzlibrarycalc
usetikzlibrarypositioning
setlengthparskip1cm plus 0cm minus 0cm
setlengthparindent0pt
newcommandexpectedVSkip[2][2.2cm]begintikzpicture[overlay,remember picture,baseline=0pt]node[use as bounding box,inner sep=0,outer sep=0] at (0,0) (A)vphantomtextttp;draw[->,blue] (A.south)--node[midway,right]$#2$($(A.south)+(0,-#2)$);draw[->,thin,blue] ($(A.south)+(-#1,0)$)--($(A.south)+(0,0)$);draw[->,thin,blue] ($(A.south)+(-#1,-#2)$)--($(A.south)+(0,-#2)$);endtikzpicture
begindocument
This is the first paragraph that will have a space of the verb|parskip|$=1;cm$ length from the following command since no verb|vspace|expectedVSkip1cm command is added here.
This is the second paragraph that will have a space of $0.5;cm$ from the folowing paragraph since a verb|vspace-0.5cm|expectedVSkip0.5cm command is added just in its end.vspace-0.5cm
Thisvspace2cm is the third paragraph with a verb|vspace2cm|expectedVSkip2cm command before the end of its first line. The paragpaph have enough text following, in order to let us discover if the verb|vspace| will act from the point of the first linebreak or from the end of this paragraph (Since the command is placed in its first line, the command is supposed to act just at the place that LaTeX will deside to break the line and the paragraph will be an ugly broken paragraph with a strange added vertical space of exactly $2;cm$). After this paragraph the following paragraph will be in distance of 2cm since an additional (just one) $cm$ have been added through a verb|vspace1cm|expectedVSkip2cm to the verb|parskip|.vspace1cm
This is just the fourth paragraph.
enddocument
and output of MWE:

PS: I will not tag the question with tikz tag, because I just used that to demonstrate the distances and to make them visible, feel free to use the command even if you have no idea about tikz, or to just ignore it and show the possible "failing" example of my style with another way or with just clear difference in the expected vertical space (or whatever).
spacing paragraphs vertical horizontal
After a comment of @DavidCarlisle in a question about vspace usage I tried to find out if, when and why a vspace command should be avoided to added as a last command of a paragraph in order to add or to remove space between paragraphs, like:
This is the text of a paragraph here.vspace1cm
This is the text of the next paragraph.
@DavidCarlisle answered in a comment of mine that:
"the blank line should be before the vspace. Using vspace in horizontal
mode is well defined but weird, you almost always want to avoid that."
So, the proposed "correction" (as far as I can understand) is:
This is the text of a paragraph here.
vspace1cmThis is the text of the next paragraph.
But I tried many examples and didn't found one that would give an unexpected output (in order of vertical spacing, but general too). Also, in my first LaTeX steps I was using this style:
This is the text of a paragraph here.
vspace1cm
This is the text of the next paragraph.
that now seems awful to me but could be consider as better LaTeX coding from my first example (the style that I am currently using).
So, my question is:
**
Should I avoid the coding style of the first example for some reason?- Is there any example that my style will fail in the expected spacing? (or this is just about code style)
MWE:
documentclassarticle
usepackageparskip
usepackagetikz
usetikzlibrarycalc
usetikzlibrarypositioning
setlengthparskip1cm plus 0cm minus 0cm
setlengthparindent0pt
newcommandexpectedVSkip[2][2.2cm]begintikzpicture[overlay,remember picture,baseline=0pt]node[use as bounding box,inner sep=0,outer sep=0] at (0,0) (A)vphantomtextttp;draw[->,blue] (A.south)--node[midway,right]$#2$($(A.south)+(0,-#2)$);draw[->,thin,blue] ($(A.south)+(-#1,0)$)--($(A.south)+(0,0)$);draw[->,thin,blue] ($(A.south)+(-#1,-#2)$)--($(A.south)+(0,-#2)$);endtikzpicture
begindocument
This is the first paragraph that will have a space of the verb|parskip|$=1;cm$ length from the following command since no verb|vspace|expectedVSkip1cm command is added here.
This is the second paragraph that will have a space of $0.5;cm$ from the folowing paragraph since a verb|vspace-0.5cm|expectedVSkip0.5cm command is added just in its end.vspace-0.5cm
Thisvspace2cm is the third paragraph with a verb|vspace2cm|expectedVSkip2cm command before the end of its first line. The paragpaph have enough text following, in order to let us discover if the verb|vspace| will act from the point of the first linebreak or from the end of this paragraph (Since the command is placed in its first line, the command is supposed to act just at the place that LaTeX will deside to break the line and the paragraph will be an ugly broken paragraph with a strange added vertical space of exactly $2;cm$). After this paragraph the following paragraph will be in distance of 2cm since an additional (just one) $cm$ have been added through a verb|vspace1cm|expectedVSkip2cm to the verb|parskip|.vspace1cm
This is just the fourth paragraph.
enddocument
and output of MWE:

PS: I will not tag the question with tikz tag, because I just used that to demonstrate the distances and to make them visible, feel free to use the command even if you have no idea about tikz, or to just ignore it and show the possible "failing" example of my style with another way or with just clear difference in the expected vertical space (or whatever).
spacing paragraphs vertical horizontal
spacing paragraphs vertical horizontal
asked 8 mins ago
koleygrkoleygr
12.4k11038
12.4k11038
Usevspaceinside a paragraph if you really want to space out two lines of that paragraph. If you want to space two paragraphs, use the code you find ugly, but which actually is the correct one.
– egreg
5 mins ago
You may also inadvertently usevspaceat the end of a line, then not leave a blank space, but think you've started a new paragraph. This is a special case of what @egreg mentions.
– Werner
1 min ago
add a comment |
Usevspaceinside a paragraph if you really want to space out two lines of that paragraph. If you want to space two paragraphs, use the code you find ugly, but which actually is the correct one.
– egreg
5 mins ago
You may also inadvertently usevspaceat the end of a line, then not leave a blank space, but think you've started a new paragraph. This is a special case of what @egreg mentions.
– Werner
1 min ago
Use
vspace inside a paragraph if you really want to space out two lines of that paragraph. If you want to space two paragraphs, use the code you find ugly, but which actually is the correct one.– egreg
5 mins ago
Use
vspace inside a paragraph if you really want to space out two lines of that paragraph. If you want to space two paragraphs, use the code you find ugly, but which actually is the correct one.– egreg
5 mins ago
You may also inadvertently use
vspace at the end of a line, then not leave a blank space, but think you've started a new paragraph. This is a special case of what @egreg mentions.– Werner
1 min ago
You may also inadvertently use
vspace at the end of a line, then not leave a blank space, but think you've started a new paragraph. This is a special case of what @egreg mentions.– Werner
1 min ago
add a comment |
0
active
oldest
votes
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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%2f478991%2fis-a-vspace-placed-on-the-end-of-a-paragraph-a-bad-latex-coding%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f478991%2fis-a-vspace-placed-on-the-end-of-a-paragraph-a-bad-latex-coding%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
Use
vspaceinside a paragraph if you really want to space out two lines of that paragraph. If you want to space two paragraphs, use the code you find ugly, but which actually is the correct one.– egreg
5 mins ago
You may also inadvertently use
vspaceat the end of a line, then not leave a blank space, but think you've started a new paragraph. This is a special case of what @egreg mentions.– Werner
1 min ago