With indentation set to `0em`, when using a line break, there is still an indentation of a size of a space Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraInclude a line break in algorithmic while maintaining indentationHanging line indentation with enumerateBibLaTeX: Wrong indentation when changing font size?algorithm2e indentation / line breakIndentation with “paracol” on multi-line text?Indentation and lacking space when using gb4e with minipagesUsing blank line as indentation: some sections it works, others it inserts a white lineAlgorithmicx - Indentation problem when using skipnumber to suppress line numbers?Unwanted caption indentation with longtable, when using width in captionsetupHow do I get indentation after automatic line break?

Can you stand up from being prone using Skirmisher outside of your turn?

How to open locks without disable device?

All ASCII characters with a given bit count

Why did C use the -> operator instead of reusing the . operator?

How would I use different systems of magic when they are capable of the same effects?

How to not starve gigantic beasts

std::is_constructible on incomplete types

PIC mathematical operations weird problem

Are all CP/M-80 implementations binary compatible?

Why isn't everyone flabbergasted about Bran's "gift"?

Has a Nobel Peace laureate ever been accused of war crimes?

A strange hotel

Raising a bilingual kid. When should we introduce the majority language?

What's the difference between using dependency injection with a container and using a service locator?

Why is this method for solving linear equations systems using determinants works?

Co-worker works way more than he should

What is this word supposed to be?

Need of separate security plugins for both root and subfolder sites Wordpress?

Seek and ye shall find

"Rubric" as meaning "signature" or "personal mark" -- is this accepted usage?

Multiple fireplaces in an apartment building?

What is a 'Key' in computer science?

How to keep bees out of canned beverages?

Is Bran literally the world's memory?



With indentation set to `0em`, when using a line break, there is still an indentation of a size of a space



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraInclude a line break in algorithmic while maintaining indentationHanging line indentation with enumerateBibLaTeX: Wrong indentation when changing font size?algorithm2e indentation / line breakIndentation with “paracol” on multi-line text?Indentation and lacking space when using gb4e with minipagesUsing blank line as indentation: some sections it works, others it inserts a white lineAlgorithmicx - Indentation problem when using skipnumber to suppress line numbers?Unwanted caption indentation with longtable, when using width in captionsetupHow do I get indentation after automatic line break?










4















Problem Description



I am quite a newbie at *TeX, but I defined some newcommands as some kind of paragraph styles (maybe not the proper way to do so, maybe someone could tell me how to accomplish this better).



I want to have default paragraph style with no indentation, space after paragraph should be 0.08", space before paragraph should be 0". However, any of the paragraph style could change any of these settings and some something more (like character styles, e.g. bold, italics, underline, etc).



Now, sometimes I want to insert a paragraph in particular paragraph style without space after that paragraph. For that I use line break (\), which usually does the job. However, with the paragraphStyle below, this is broken.



It seems like if in the first paragraph, there is an indentation of a size of a space, which I cannot elimininate, no matter what I do.



What I have Tried



I tried to use noindent and setlengthparindent0em in many different combinations.



Minimal Working Example



%%%%% Preamble %%%%%
documentclass[10pt]book
usepackage[a4paper]geometry
geometry
a4paper,
left=1in,
right=1in,
top=1in,
bottom=1in,
portrait


usepackagexcolor

% Font family
usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
setmainfontLibertinus Serif

% Paragraph and line settings
setlengthparindent0em % Set paragraph indentation
setlengthparskip0.08in % Paragraph spacing
renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

% Custom commands
newcommandparagraphStyle[1]setlengthparindent0ptsetlengthparskip0.16inrenewcommandbaselinestretch2.0colorblack!100fontsize20pt24ptselectfonttextbf#1colorblack!100normalsizesetlengthparindent0emsetlengthparskip0.08inselectfontrenewcommandbaselinestretch1.0%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

begindocument
pagestyleempty

This is wrong:

paragraphStyle
First line\
Second line


This is correct:

paragraphStyleFirst line\
paragraphStyleSecond line


Also this is correct in indentation, but not in space after paragraph:

First Line\
Second Line
enddocument


Output



enter image description here










share|improve this question
























  • this is really a very strange definition you are setting parindent and parskip hidden inside pargraphStyle but they are not in any local group so they apply to the rest of the document not just the text in the argument. I would seriously consider not using this markup and using a more normal latex constrict.

    – David Carlisle
    5 hours ago











  • @DavidCarlisle, what do you advise to do? How should I define styles correctly? What markup should I use?

    – tukusejssirs
    4 hours ago











  • You don't give any indication of the intended use, what is this large text for, is it some kind of heading? It is hard to suggest a reasonable markup with the information given.

    – David Carlisle
    4 hours ago











  • This particular style is a text body paragraph with large(r) font size for easier readability. In the end, I’d like to create more styles (just imagine those of any word processor like LibreOffice Writer or MS Office Word). Anyway, here’s an actual pdf I am currenly working on—I’d like to create a style for all different styles I need to create that file.

    – tukusejssirs
    4 hours ago















4















Problem Description



I am quite a newbie at *TeX, but I defined some newcommands as some kind of paragraph styles (maybe not the proper way to do so, maybe someone could tell me how to accomplish this better).



I want to have default paragraph style with no indentation, space after paragraph should be 0.08", space before paragraph should be 0". However, any of the paragraph style could change any of these settings and some something more (like character styles, e.g. bold, italics, underline, etc).



Now, sometimes I want to insert a paragraph in particular paragraph style without space after that paragraph. For that I use line break (\), which usually does the job. However, with the paragraphStyle below, this is broken.



It seems like if in the first paragraph, there is an indentation of a size of a space, which I cannot elimininate, no matter what I do.



What I have Tried



I tried to use noindent and setlengthparindent0em in many different combinations.



Minimal Working Example



%%%%% Preamble %%%%%
documentclass[10pt]book
usepackage[a4paper]geometry
geometry
a4paper,
left=1in,
right=1in,
top=1in,
bottom=1in,
portrait


usepackagexcolor

% Font family
usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
setmainfontLibertinus Serif

% Paragraph and line settings
setlengthparindent0em % Set paragraph indentation
setlengthparskip0.08in % Paragraph spacing
renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

% Custom commands
newcommandparagraphStyle[1]setlengthparindent0ptsetlengthparskip0.16inrenewcommandbaselinestretch2.0colorblack!100fontsize20pt24ptselectfonttextbf#1colorblack!100normalsizesetlengthparindent0emsetlengthparskip0.08inselectfontrenewcommandbaselinestretch1.0%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

begindocument
pagestyleempty

This is wrong:

paragraphStyle
First line\
Second line


This is correct:

paragraphStyleFirst line\
paragraphStyleSecond line


Also this is correct in indentation, but not in space after paragraph:

First Line\
Second Line
enddocument


Output



enter image description here










share|improve this question
























  • this is really a very strange definition you are setting parindent and parskip hidden inside pargraphStyle but they are not in any local group so they apply to the rest of the document not just the text in the argument. I would seriously consider not using this markup and using a more normal latex constrict.

    – David Carlisle
    5 hours ago











  • @DavidCarlisle, what do you advise to do? How should I define styles correctly? What markup should I use?

    – tukusejssirs
    4 hours ago











  • You don't give any indication of the intended use, what is this large text for, is it some kind of heading? It is hard to suggest a reasonable markup with the information given.

    – David Carlisle
    4 hours ago











  • This particular style is a text body paragraph with large(r) font size for easier readability. In the end, I’d like to create more styles (just imagine those of any word processor like LibreOffice Writer or MS Office Word). Anyway, here’s an actual pdf I am currenly working on—I’d like to create a style for all different styles I need to create that file.

    – tukusejssirs
    4 hours ago













4












4








4








Problem Description



I am quite a newbie at *TeX, but I defined some newcommands as some kind of paragraph styles (maybe not the proper way to do so, maybe someone could tell me how to accomplish this better).



I want to have default paragraph style with no indentation, space after paragraph should be 0.08", space before paragraph should be 0". However, any of the paragraph style could change any of these settings and some something more (like character styles, e.g. bold, italics, underline, etc).



Now, sometimes I want to insert a paragraph in particular paragraph style without space after that paragraph. For that I use line break (\), which usually does the job. However, with the paragraphStyle below, this is broken.



It seems like if in the first paragraph, there is an indentation of a size of a space, which I cannot elimininate, no matter what I do.



What I have Tried



I tried to use noindent and setlengthparindent0em in many different combinations.



Minimal Working Example



%%%%% Preamble %%%%%
documentclass[10pt]book
usepackage[a4paper]geometry
geometry
a4paper,
left=1in,
right=1in,
top=1in,
bottom=1in,
portrait


usepackagexcolor

% Font family
usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
setmainfontLibertinus Serif

% Paragraph and line settings
setlengthparindent0em % Set paragraph indentation
setlengthparskip0.08in % Paragraph spacing
renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

% Custom commands
newcommandparagraphStyle[1]setlengthparindent0ptsetlengthparskip0.16inrenewcommandbaselinestretch2.0colorblack!100fontsize20pt24ptselectfonttextbf#1colorblack!100normalsizesetlengthparindent0emsetlengthparskip0.08inselectfontrenewcommandbaselinestretch1.0%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

begindocument
pagestyleempty

This is wrong:

paragraphStyle
First line\
Second line


This is correct:

paragraphStyleFirst line\
paragraphStyleSecond line


Also this is correct in indentation, but not in space after paragraph:

First Line\
Second Line
enddocument


Output



enter image description here










share|improve this question
















Problem Description



I am quite a newbie at *TeX, but I defined some newcommands as some kind of paragraph styles (maybe not the proper way to do so, maybe someone could tell me how to accomplish this better).



I want to have default paragraph style with no indentation, space after paragraph should be 0.08", space before paragraph should be 0". However, any of the paragraph style could change any of these settings and some something more (like character styles, e.g. bold, italics, underline, etc).



Now, sometimes I want to insert a paragraph in particular paragraph style without space after that paragraph. For that I use line break (\), which usually does the job. However, with the paragraphStyle below, this is broken.



It seems like if in the first paragraph, there is an indentation of a size of a space, which I cannot elimininate, no matter what I do.



What I have Tried



I tried to use noindent and setlengthparindent0em in many different combinations.



Minimal Working Example



%%%%% Preamble %%%%%
documentclass[10pt]book
usepackage[a4paper]geometry
geometry
a4paper,
left=1in,
right=1in,
top=1in,
bottom=1in,
portrait


usepackagexcolor

% Font family
usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
setmainfontLibertinus Serif

% Paragraph and line settings
setlengthparindent0em % Set paragraph indentation
setlengthparskip0.08in % Paragraph spacing
renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

% Custom commands
newcommandparagraphStyle[1]setlengthparindent0ptsetlengthparskip0.16inrenewcommandbaselinestretch2.0colorblack!100fontsize20pt24ptselectfonttextbf#1colorblack!100normalsizesetlengthparindent0emsetlengthparskip0.08inselectfontrenewcommandbaselinestretch1.0%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

begindocument
pagestyleempty

This is wrong:

paragraphStyle
First line\
Second line


This is correct:

paragraphStyleFirst line\
paragraphStyleSecond line


Also this is correct in indentation, but not in space after paragraph:

First Line\
Second Line
enddocument


Output



enter image description here







luatex indentation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 6 hours ago









Sebastiano

11.4k42366




11.4k42366










asked 6 hours ago









tukusejssirstukusejssirs

948




948












  • this is really a very strange definition you are setting parindent and parskip hidden inside pargraphStyle but they are not in any local group so they apply to the rest of the document not just the text in the argument. I would seriously consider not using this markup and using a more normal latex constrict.

    – David Carlisle
    5 hours ago











  • @DavidCarlisle, what do you advise to do? How should I define styles correctly? What markup should I use?

    – tukusejssirs
    4 hours ago











  • You don't give any indication of the intended use, what is this large text for, is it some kind of heading? It is hard to suggest a reasonable markup with the information given.

    – David Carlisle
    4 hours ago











  • This particular style is a text body paragraph with large(r) font size for easier readability. In the end, I’d like to create more styles (just imagine those of any word processor like LibreOffice Writer or MS Office Word). Anyway, here’s an actual pdf I am currenly working on—I’d like to create a style for all different styles I need to create that file.

    – tukusejssirs
    4 hours ago

















  • this is really a very strange definition you are setting parindent and parskip hidden inside pargraphStyle but they are not in any local group so they apply to the rest of the document not just the text in the argument. I would seriously consider not using this markup and using a more normal latex constrict.

    – David Carlisle
    5 hours ago











  • @DavidCarlisle, what do you advise to do? How should I define styles correctly? What markup should I use?

    – tukusejssirs
    4 hours ago











  • You don't give any indication of the intended use, what is this large text for, is it some kind of heading? It is hard to suggest a reasonable markup with the information given.

    – David Carlisle
    4 hours ago











  • This particular style is a text body paragraph with large(r) font size for easier readability. In the end, I’d like to create more styles (just imagine those of any word processor like LibreOffice Writer or MS Office Word). Anyway, here’s an actual pdf I am currenly working on—I’d like to create a style for all different styles I need to create that file.

    – tukusejssirs
    4 hours ago
















this is really a very strange definition you are setting parindent and parskip hidden inside pargraphStyle but they are not in any local group so they apply to the rest of the document not just the text in the argument. I would seriously consider not using this markup and using a more normal latex constrict.

– David Carlisle
5 hours ago





this is really a very strange definition you are setting parindent and parskip hidden inside pargraphStyle but they are not in any local group so they apply to the rest of the document not just the text in the argument. I would seriously consider not using this markup and using a more normal latex constrict.

– David Carlisle
5 hours ago













@DavidCarlisle, what do you advise to do? How should I define styles correctly? What markup should I use?

– tukusejssirs
4 hours ago





@DavidCarlisle, what do you advise to do? How should I define styles correctly? What markup should I use?

– tukusejssirs
4 hours ago













You don't give any indication of the intended use, what is this large text for, is it some kind of heading? It is hard to suggest a reasonable markup with the information given.

– David Carlisle
4 hours ago





You don't give any indication of the intended use, what is this large text for, is it some kind of heading? It is hard to suggest a reasonable markup with the information given.

– David Carlisle
4 hours ago













This particular style is a text body paragraph with large(r) font size for easier readability. In the end, I’d like to create more styles (just imagine those of any word processor like LibreOffice Writer or MS Office Word). Anyway, here’s an actual pdf I am currenly working on—I’d like to create a style for all different styles I need to create that file.

– tukusejssirs
4 hours ago





This particular style is a text body paragraph with large(r) font size for easier readability. In the end, I’d like to create more styles (just imagine those of any word processor like LibreOffice Writer or MS Office Word). Anyway, here’s an actual pdf I am currenly working on—I’d like to create a style for all different styles I need to create that file.

– tukusejssirs
4 hours ago










3 Answers
3






active

oldest

votes


















4














As Marcel pointed out, there is a stray space in your input. You can remove that space, as Marcel suggests, or you can add ignorespaces, within your macro definition, to your argument of textbf, prior to #1. Also, there is no need for the textbf to be in its own braces, so I removed it.



Note: an alternative for that part of the definition that now reads textbfignorespaces#1 could also be bfseries#1. Here, the braces are now necessary to limit the scope, but the ignorespaces is no longer required because bfseries leaves you in vertical mode, so the leading space in #1 is ignored, whereas textbf puts you in horizontal mode, where the leading space counts.



Also, I reorganized your definition of paragraphStyle to make it easier for humans to read. Note the presence of % end-of-line delimiters, to avoid the very same problem again.



documentclass[10pt]book
usepackage[a4paper]geometry
geometry
a4paper,
left=1in,
right=1in,
top=1in,
bottom=1in,
portrait


usepackagexcolor

% Font family
%usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
%setmainfontLibertinus Serif

% Paragraph and line settings
setlengthparindent0em % Set paragraph indentation
setlengthparskip0.08in % Paragraph spacing
renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

% Custom commands
newcommandparagraphStyle[1]%
setlengthparindent0pt%
setlengthparskip0.16in%
renewcommandbaselinestretch2.0%
colorblack!100%
fontsize20pt24pt%
selectfont%
textbfignorespaces#1%
colorblack!100%
normalsize%
setlengthparindent0em%
setlengthparskip0.08in%
selectfont%
renewcommandbaselinestretch1.0%
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

begindocument
pagestyleempty

This is no longer wrong:

paragraphStyle
First line\
Second line


This is correct:

paragraphStyleFirst line\
paragraphStyleSecond line


Also this is correct in indentation, but not in space after paragraph:

First Line\
Second Line
enddocument


enter image description here






share|improve this answer




















  • 1





    ignorespaces is no longer required, because the space is absorbed in the aftermath of the macro bfseries no:-)

    – David Carlisle
    5 hours ago











  • @DavidCarlisle Why do you say that? bfseries<space><space><space><etc> #1 also produces no introduced spaces. What's the right terminology to describe this process?

    – Steven B. Segletes
    5 hours ago







  • 1





    ignorespaces was there to ignore spaces that are passed in at the start of #1 they would not be dropped in the way that a literal space after bfseries is dropped.

    – David Carlisle
    5 hours ago











  • @DavidCarlisle OK... But they are nonetheless dropped. Why?

    – Steven B. Segletes
    5 hours ago











  • @DavidCarlisle Is it a vertical/horizontal mode thing? That is, does bfseries not take one out of vertical mode? Whereas textbf does?

    – Steven B. Segletes
    5 hours ago



















3














The "indentation of a size of a space" actually isn't an indentation, it is a space at the start of the line:



Look at



 This is wrong:

paragraphStyle
First line\
Second line



The newline after paragraphStyle{ is converted to a space which results in the observed "indentation".
You can avoid this by adding a % to comment the newline, suppressing the space:



 This is wrong:

paragraphStyle%
First line\
Second line



The full document becomes



%%%%% Preamble %%%%%
documentclass[10pt]book
usepackage[a4paper]geometry
geometry
a4paper,
left=1in,
right=1in,
top=1in,
bottom=1in,
portrait


usepackagexcolor

% Font family
usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
setmainfontLibertinus Serif

% Paragraph and line settings
setlengthparindent0em % Set paragraph indentation
setlengthparskip0.08in % Paragraph spacing
renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

% Custom commands
newcommandparagraphStyle[1]setlengthparindent0ptsetlengthparskip0.16inrenewcommandbaselinestretch2.0colorblack!100fontsize20pt24ptselectfonttextbf#1colorblack!100normalsizesetlengthparindent0emsetlengthparskip0.08inselectfontrenewcommandbaselinestretch1.0%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

begindocument
pagestyleempty

This is wrong:

paragraphStyle%
First line\
Second line


This is correct:

paragraphStyleFirst line\
paragraphStyleSecond line


Also this is correct in indentation, but not in space after paragraph:

First Line\
Second Line
enddocument





share|improve this answer






























    1














    You should use grouping to isolate the changes in font and line spacing, so you don't have to revert them afterwards. However, since these changes have to be done, you need to end the previous paragraph, if not already done and also to end a paragraph at the end of the special setup, so as not to influence the following paragraphs.



    %%%%% Preamble %%%%%
    documentclass[10pt]book
    usepackage[a4paper]geometry
    geometry
    a4paper,
    left=1in,
    right=1in,
    top=1in,
    bottom=1in,
    portrait,


    usepackagexcolor

    % Font family
    usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
    setmainfontLibertinus Serif

    % Paragraph and line settings
    setlengthparindent0em % Set paragraph indentation
    setlengthparskip0.08in % Paragraph spacing
    renewcommandbaselinestretch1.0 % Line

    % Custom commands
    newcommandparagraphStyle[1]%
    par
    begingroup
    setlengthparindent0pt%
    setlengthparskip0.16in%
    renewcommandbaselinestretch2.0%
    fontsize20pt24ptselectfont
    noindentcolorblack!100%
    bfseriesignorespaces #1par
    endgroup


    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    begindocument

    pagestyleempty

    This is right:

    paragraphStyle
    First line\
    Second line


    Also this is correct in indentation, but not in space after paragraph:

    First Line\
    Second Line

    enddocument


    enter image description here






    share|improve this answer























      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
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487436%2fwith-indentation-set-to-0em-when-using-a-line-break-there-is-still-an-indent%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      As Marcel pointed out, there is a stray space in your input. You can remove that space, as Marcel suggests, or you can add ignorespaces, within your macro definition, to your argument of textbf, prior to #1. Also, there is no need for the textbf to be in its own braces, so I removed it.



      Note: an alternative for that part of the definition that now reads textbfignorespaces#1 could also be bfseries#1. Here, the braces are now necessary to limit the scope, but the ignorespaces is no longer required because bfseries leaves you in vertical mode, so the leading space in #1 is ignored, whereas textbf puts you in horizontal mode, where the leading space counts.



      Also, I reorganized your definition of paragraphStyle to make it easier for humans to read. Note the presence of % end-of-line delimiters, to avoid the very same problem again.



      documentclass[10pt]book
      usepackage[a4paper]geometry
      geometry
      a4paper,
      left=1in,
      right=1in,
      top=1in,
      bottom=1in,
      portrait


      usepackagexcolor

      % Font family
      %usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
      %setmainfontLibertinus Serif

      % Paragraph and line settings
      setlengthparindent0em % Set paragraph indentation
      setlengthparskip0.08in % Paragraph spacing
      renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

      % Custom commands
      newcommandparagraphStyle[1]%
      setlengthparindent0pt%
      setlengthparskip0.16in%
      renewcommandbaselinestretch2.0%
      colorblack!100%
      fontsize20pt24pt%
      selectfont%
      textbfignorespaces#1%
      colorblack!100%
      normalsize%
      setlengthparindent0em%
      setlengthparskip0.08in%
      selectfont%
      renewcommandbaselinestretch1.0%
      %

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      begindocument
      pagestyleempty

      This is no longer wrong:

      paragraphStyle
      First line\
      Second line


      This is correct:

      paragraphStyleFirst line\
      paragraphStyleSecond line


      Also this is correct in indentation, but not in space after paragraph:

      First Line\
      Second Line
      enddocument


      enter image description here






      share|improve this answer




















      • 1





        ignorespaces is no longer required, because the space is absorbed in the aftermath of the macro bfseries no:-)

        – David Carlisle
        5 hours ago











      • @DavidCarlisle Why do you say that? bfseries<space><space><space><etc> #1 also produces no introduced spaces. What's the right terminology to describe this process?

        – Steven B. Segletes
        5 hours ago







      • 1





        ignorespaces was there to ignore spaces that are passed in at the start of #1 they would not be dropped in the way that a literal space after bfseries is dropped.

        – David Carlisle
        5 hours ago











      • @DavidCarlisle OK... But they are nonetheless dropped. Why?

        – Steven B. Segletes
        5 hours ago











      • @DavidCarlisle Is it a vertical/horizontal mode thing? That is, does bfseries not take one out of vertical mode? Whereas textbf does?

        – Steven B. Segletes
        5 hours ago
















      4














      As Marcel pointed out, there is a stray space in your input. You can remove that space, as Marcel suggests, or you can add ignorespaces, within your macro definition, to your argument of textbf, prior to #1. Also, there is no need for the textbf to be in its own braces, so I removed it.



      Note: an alternative for that part of the definition that now reads textbfignorespaces#1 could also be bfseries#1. Here, the braces are now necessary to limit the scope, but the ignorespaces is no longer required because bfseries leaves you in vertical mode, so the leading space in #1 is ignored, whereas textbf puts you in horizontal mode, where the leading space counts.



      Also, I reorganized your definition of paragraphStyle to make it easier for humans to read. Note the presence of % end-of-line delimiters, to avoid the very same problem again.



      documentclass[10pt]book
      usepackage[a4paper]geometry
      geometry
      a4paper,
      left=1in,
      right=1in,
      top=1in,
      bottom=1in,
      portrait


      usepackagexcolor

      % Font family
      %usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
      %setmainfontLibertinus Serif

      % Paragraph and line settings
      setlengthparindent0em % Set paragraph indentation
      setlengthparskip0.08in % Paragraph spacing
      renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

      % Custom commands
      newcommandparagraphStyle[1]%
      setlengthparindent0pt%
      setlengthparskip0.16in%
      renewcommandbaselinestretch2.0%
      colorblack!100%
      fontsize20pt24pt%
      selectfont%
      textbfignorespaces#1%
      colorblack!100%
      normalsize%
      setlengthparindent0em%
      setlengthparskip0.08in%
      selectfont%
      renewcommandbaselinestretch1.0%
      %

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      begindocument
      pagestyleempty

      This is no longer wrong:

      paragraphStyle
      First line\
      Second line


      This is correct:

      paragraphStyleFirst line\
      paragraphStyleSecond line


      Also this is correct in indentation, but not in space after paragraph:

      First Line\
      Second Line
      enddocument


      enter image description here






      share|improve this answer




















      • 1





        ignorespaces is no longer required, because the space is absorbed in the aftermath of the macro bfseries no:-)

        – David Carlisle
        5 hours ago











      • @DavidCarlisle Why do you say that? bfseries<space><space><space><etc> #1 also produces no introduced spaces. What's the right terminology to describe this process?

        – Steven B. Segletes
        5 hours ago







      • 1





        ignorespaces was there to ignore spaces that are passed in at the start of #1 they would not be dropped in the way that a literal space after bfseries is dropped.

        – David Carlisle
        5 hours ago











      • @DavidCarlisle OK... But they are nonetheless dropped. Why?

        – Steven B. Segletes
        5 hours ago











      • @DavidCarlisle Is it a vertical/horizontal mode thing? That is, does bfseries not take one out of vertical mode? Whereas textbf does?

        – Steven B. Segletes
        5 hours ago














      4












      4








      4







      As Marcel pointed out, there is a stray space in your input. You can remove that space, as Marcel suggests, or you can add ignorespaces, within your macro definition, to your argument of textbf, prior to #1. Also, there is no need for the textbf to be in its own braces, so I removed it.



      Note: an alternative for that part of the definition that now reads textbfignorespaces#1 could also be bfseries#1. Here, the braces are now necessary to limit the scope, but the ignorespaces is no longer required because bfseries leaves you in vertical mode, so the leading space in #1 is ignored, whereas textbf puts you in horizontal mode, where the leading space counts.



      Also, I reorganized your definition of paragraphStyle to make it easier for humans to read. Note the presence of % end-of-line delimiters, to avoid the very same problem again.



      documentclass[10pt]book
      usepackage[a4paper]geometry
      geometry
      a4paper,
      left=1in,
      right=1in,
      top=1in,
      bottom=1in,
      portrait


      usepackagexcolor

      % Font family
      %usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
      %setmainfontLibertinus Serif

      % Paragraph and line settings
      setlengthparindent0em % Set paragraph indentation
      setlengthparskip0.08in % Paragraph spacing
      renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

      % Custom commands
      newcommandparagraphStyle[1]%
      setlengthparindent0pt%
      setlengthparskip0.16in%
      renewcommandbaselinestretch2.0%
      colorblack!100%
      fontsize20pt24pt%
      selectfont%
      textbfignorespaces#1%
      colorblack!100%
      normalsize%
      setlengthparindent0em%
      setlengthparskip0.08in%
      selectfont%
      renewcommandbaselinestretch1.0%
      %

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      begindocument
      pagestyleempty

      This is no longer wrong:

      paragraphStyle
      First line\
      Second line


      This is correct:

      paragraphStyleFirst line\
      paragraphStyleSecond line


      Also this is correct in indentation, but not in space after paragraph:

      First Line\
      Second Line
      enddocument


      enter image description here






      share|improve this answer















      As Marcel pointed out, there is a stray space in your input. You can remove that space, as Marcel suggests, or you can add ignorespaces, within your macro definition, to your argument of textbf, prior to #1. Also, there is no need for the textbf to be in its own braces, so I removed it.



      Note: an alternative for that part of the definition that now reads textbfignorespaces#1 could also be bfseries#1. Here, the braces are now necessary to limit the scope, but the ignorespaces is no longer required because bfseries leaves you in vertical mode, so the leading space in #1 is ignored, whereas textbf puts you in horizontal mode, where the leading space counts.



      Also, I reorganized your definition of paragraphStyle to make it easier for humans to read. Note the presence of % end-of-line delimiters, to avoid the very same problem again.



      documentclass[10pt]book
      usepackage[a4paper]geometry
      geometry
      a4paper,
      left=1in,
      right=1in,
      top=1in,
      bottom=1in,
      portrait


      usepackagexcolor

      % Font family
      %usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
      %setmainfontLibertinus Serif

      % Paragraph and line settings
      setlengthparindent0em % Set paragraph indentation
      setlengthparskip0.08in % Paragraph spacing
      renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

      % Custom commands
      newcommandparagraphStyle[1]%
      setlengthparindent0pt%
      setlengthparskip0.16in%
      renewcommandbaselinestretch2.0%
      colorblack!100%
      fontsize20pt24pt%
      selectfont%
      textbfignorespaces#1%
      colorblack!100%
      normalsize%
      setlengthparindent0em%
      setlengthparskip0.08in%
      selectfont%
      renewcommandbaselinestretch1.0%
      %

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      begindocument
      pagestyleempty

      This is no longer wrong:

      paragraphStyle
      First line\
      Second line


      This is correct:

      paragraphStyleFirst line\
      paragraphStyleSecond line


      Also this is correct in indentation, but not in space after paragraph:

      First Line\
      Second Line
      enddocument


      enter image description here







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited 5 hours ago

























      answered 6 hours ago









      Steven B. SegletesSteven B. Segletes

      163k9207420




      163k9207420







      • 1





        ignorespaces is no longer required, because the space is absorbed in the aftermath of the macro bfseries no:-)

        – David Carlisle
        5 hours ago











      • @DavidCarlisle Why do you say that? bfseries<space><space><space><etc> #1 also produces no introduced spaces. What's the right terminology to describe this process?

        – Steven B. Segletes
        5 hours ago







      • 1





        ignorespaces was there to ignore spaces that are passed in at the start of #1 they would not be dropped in the way that a literal space after bfseries is dropped.

        – David Carlisle
        5 hours ago











      • @DavidCarlisle OK... But they are nonetheless dropped. Why?

        – Steven B. Segletes
        5 hours ago











      • @DavidCarlisle Is it a vertical/horizontal mode thing? That is, does bfseries not take one out of vertical mode? Whereas textbf does?

        – Steven B. Segletes
        5 hours ago













      • 1





        ignorespaces is no longer required, because the space is absorbed in the aftermath of the macro bfseries no:-)

        – David Carlisle
        5 hours ago











      • @DavidCarlisle Why do you say that? bfseries<space><space><space><etc> #1 also produces no introduced spaces. What's the right terminology to describe this process?

        – Steven B. Segletes
        5 hours ago







      • 1





        ignorespaces was there to ignore spaces that are passed in at the start of #1 they would not be dropped in the way that a literal space after bfseries is dropped.

        – David Carlisle
        5 hours ago











      • @DavidCarlisle OK... But they are nonetheless dropped. Why?

        – Steven B. Segletes
        5 hours ago











      • @DavidCarlisle Is it a vertical/horizontal mode thing? That is, does bfseries not take one out of vertical mode? Whereas textbf does?

        – Steven B. Segletes
        5 hours ago








      1




      1





      ignorespaces is no longer required, because the space is absorbed in the aftermath of the macro bfseries no:-)

      – David Carlisle
      5 hours ago





      ignorespaces is no longer required, because the space is absorbed in the aftermath of the macro bfseries no:-)

      – David Carlisle
      5 hours ago













      @DavidCarlisle Why do you say that? bfseries<space><space><space><etc> #1 also produces no introduced spaces. What's the right terminology to describe this process?

      – Steven B. Segletes
      5 hours ago






      @DavidCarlisle Why do you say that? bfseries<space><space><space><etc> #1 also produces no introduced spaces. What's the right terminology to describe this process?

      – Steven B. Segletes
      5 hours ago





      1




      1





      ignorespaces was there to ignore spaces that are passed in at the start of #1 they would not be dropped in the way that a literal space after bfseries is dropped.

      – David Carlisle
      5 hours ago





      ignorespaces was there to ignore spaces that are passed in at the start of #1 they would not be dropped in the way that a literal space after bfseries is dropped.

      – David Carlisle
      5 hours ago













      @DavidCarlisle OK... But they are nonetheless dropped. Why?

      – Steven B. Segletes
      5 hours ago





      @DavidCarlisle OK... But they are nonetheless dropped. Why?

      – Steven B. Segletes
      5 hours ago













      @DavidCarlisle Is it a vertical/horizontal mode thing? That is, does bfseries not take one out of vertical mode? Whereas textbf does?

      – Steven B. Segletes
      5 hours ago






      @DavidCarlisle Is it a vertical/horizontal mode thing? That is, does bfseries not take one out of vertical mode? Whereas textbf does?

      – Steven B. Segletes
      5 hours ago












      3














      The "indentation of a size of a space" actually isn't an indentation, it is a space at the start of the line:



      Look at



       This is wrong:

      paragraphStyle
      First line\
      Second line



      The newline after paragraphStyle{ is converted to a space which results in the observed "indentation".
      You can avoid this by adding a % to comment the newline, suppressing the space:



       This is wrong:

      paragraphStyle%
      First line\
      Second line



      The full document becomes



      %%%%% Preamble %%%%%
      documentclass[10pt]book
      usepackage[a4paper]geometry
      geometry
      a4paper,
      left=1in,
      right=1in,
      top=1in,
      bottom=1in,
      portrait


      usepackagexcolor

      % Font family
      usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
      setmainfontLibertinus Serif

      % Paragraph and line settings
      setlengthparindent0em % Set paragraph indentation
      setlengthparskip0.08in % Paragraph spacing
      renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

      % Custom commands
      newcommandparagraphStyle[1]setlengthparindent0ptsetlengthparskip0.16inrenewcommandbaselinestretch2.0colorblack!100fontsize20pt24ptselectfonttextbf#1colorblack!100normalsizesetlengthparindent0emsetlengthparskip0.08inselectfontrenewcommandbaselinestretch1.0%

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      begindocument
      pagestyleempty

      This is wrong:

      paragraphStyle%
      First line\
      Second line


      This is correct:

      paragraphStyleFirst line\
      paragraphStyleSecond line


      Also this is correct in indentation, but not in space after paragraph:

      First Line\
      Second Line
      enddocument





      share|improve this answer



























        3














        The "indentation of a size of a space" actually isn't an indentation, it is a space at the start of the line:



        Look at



         This is wrong:

        paragraphStyle
        First line\
        Second line



        The newline after paragraphStyle{ is converted to a space which results in the observed "indentation".
        You can avoid this by adding a % to comment the newline, suppressing the space:



         This is wrong:

        paragraphStyle%
        First line\
        Second line



        The full document becomes



        %%%%% Preamble %%%%%
        documentclass[10pt]book
        usepackage[a4paper]geometry
        geometry
        a4paper,
        left=1in,
        right=1in,
        top=1in,
        bottom=1in,
        portrait


        usepackagexcolor

        % Font family
        usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
        setmainfontLibertinus Serif

        % Paragraph and line settings
        setlengthparindent0em % Set paragraph indentation
        setlengthparskip0.08in % Paragraph spacing
        renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

        % Custom commands
        newcommandparagraphStyle[1]setlengthparindent0ptsetlengthparskip0.16inrenewcommandbaselinestretch2.0colorblack!100fontsize20pt24ptselectfonttextbf#1colorblack!100normalsizesetlengthparindent0emsetlengthparskip0.08inselectfontrenewcommandbaselinestretch1.0%

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

        begindocument
        pagestyleempty

        This is wrong:

        paragraphStyle%
        First line\
        Second line


        This is correct:

        paragraphStyleFirst line\
        paragraphStyleSecond line


        Also this is correct in indentation, but not in space after paragraph:

        First Line\
        Second Line
        enddocument





        share|improve this answer

























          3












          3








          3







          The "indentation of a size of a space" actually isn't an indentation, it is a space at the start of the line:



          Look at



           This is wrong:

          paragraphStyle
          First line\
          Second line



          The newline after paragraphStyle{ is converted to a space which results in the observed "indentation".
          You can avoid this by adding a % to comment the newline, suppressing the space:



           This is wrong:

          paragraphStyle%
          First line\
          Second line



          The full document becomes



          %%%%% Preamble %%%%%
          documentclass[10pt]book
          usepackage[a4paper]geometry
          geometry
          a4paper,
          left=1in,
          right=1in,
          top=1in,
          bottom=1in,
          portrait


          usepackagexcolor

          % Font family
          usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
          setmainfontLibertinus Serif

          % Paragraph and line settings
          setlengthparindent0em % Set paragraph indentation
          setlengthparskip0.08in % Paragraph spacing
          renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

          % Custom commands
          newcommandparagraphStyle[1]setlengthparindent0ptsetlengthparskip0.16inrenewcommandbaselinestretch2.0colorblack!100fontsize20pt24ptselectfonttextbf#1colorblack!100normalsizesetlengthparindent0emsetlengthparskip0.08inselectfontrenewcommandbaselinestretch1.0%

          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

          begindocument
          pagestyleempty

          This is wrong:

          paragraphStyle%
          First line\
          Second line


          This is correct:

          paragraphStyleFirst line\
          paragraphStyleSecond line


          Also this is correct in indentation, but not in space after paragraph:

          First Line\
          Second Line
          enddocument





          share|improve this answer













          The "indentation of a size of a space" actually isn't an indentation, it is a space at the start of the line:



          Look at



           This is wrong:

          paragraphStyle
          First line\
          Second line



          The newline after paragraphStyle{ is converted to a space which results in the observed "indentation".
          You can avoid this by adding a % to comment the newline, suppressing the space:



           This is wrong:

          paragraphStyle%
          First line\
          Second line



          The full document becomes



          %%%%% Preamble %%%%%
          documentclass[10pt]book
          usepackage[a4paper]geometry
          geometry
          a4paper,
          left=1in,
          right=1in,
          top=1in,
          bottom=1in,
          portrait


          usepackagexcolor

          % Font family
          usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
          setmainfontLibertinus Serif

          % Paragraph and line settings
          setlengthparindent0em % Set paragraph indentation
          setlengthparskip0.08in % Paragraph spacing
          renewcommandbaselinestretch1.0 % Line expandafterselectlanguageexpandaftercvlang

          % Custom commands
          newcommandparagraphStyle[1]setlengthparindent0ptsetlengthparskip0.16inrenewcommandbaselinestretch2.0colorblack!100fontsize20pt24ptselectfonttextbf#1colorblack!100normalsizesetlengthparindent0emsetlengthparskip0.08inselectfontrenewcommandbaselinestretch1.0%

          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

          begindocument
          pagestyleempty

          This is wrong:

          paragraphStyle%
          First line\
          Second line


          This is correct:

          paragraphStyleFirst line\
          paragraphStyleSecond line


          Also this is correct in indentation, but not in space after paragraph:

          First Line\
          Second Line
          enddocument






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 6 hours ago









          Marcel KrügerMarcel Krüger

          13k11636




          13k11636





















              1














              You should use grouping to isolate the changes in font and line spacing, so you don't have to revert them afterwards. However, since these changes have to be done, you need to end the previous paragraph, if not already done and also to end a paragraph at the end of the special setup, so as not to influence the following paragraphs.



              %%%%% Preamble %%%%%
              documentclass[10pt]book
              usepackage[a4paper]geometry
              geometry
              a4paper,
              left=1in,
              right=1in,
              top=1in,
              bottom=1in,
              portrait,


              usepackagexcolor

              % Font family
              usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
              setmainfontLibertinus Serif

              % Paragraph and line settings
              setlengthparindent0em % Set paragraph indentation
              setlengthparskip0.08in % Paragraph spacing
              renewcommandbaselinestretch1.0 % Line

              % Custom commands
              newcommandparagraphStyle[1]%
              par
              begingroup
              setlengthparindent0pt%
              setlengthparskip0.16in%
              renewcommandbaselinestretch2.0%
              fontsize20pt24ptselectfont
              noindentcolorblack!100%
              bfseriesignorespaces #1par
              endgroup


              %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
              %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

              begindocument

              pagestyleempty

              This is right:

              paragraphStyle
              First line\
              Second line


              Also this is correct in indentation, but not in space after paragraph:

              First Line\
              Second Line

              enddocument


              enter image description here






              share|improve this answer



























                1














                You should use grouping to isolate the changes in font and line spacing, so you don't have to revert them afterwards. However, since these changes have to be done, you need to end the previous paragraph, if not already done and also to end a paragraph at the end of the special setup, so as not to influence the following paragraphs.



                %%%%% Preamble %%%%%
                documentclass[10pt]book
                usepackage[a4paper]geometry
                geometry
                a4paper,
                left=1in,
                right=1in,
                top=1in,
                bottom=1in,
                portrait,


                usepackagexcolor

                % Font family
                usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
                setmainfontLibertinus Serif

                % Paragraph and line settings
                setlengthparindent0em % Set paragraph indentation
                setlengthparskip0.08in % Paragraph spacing
                renewcommandbaselinestretch1.0 % Line

                % Custom commands
                newcommandparagraphStyle[1]%
                par
                begingroup
                setlengthparindent0pt%
                setlengthparskip0.16in%
                renewcommandbaselinestretch2.0%
                fontsize20pt24ptselectfont
                noindentcolorblack!100%
                bfseriesignorespaces #1par
                endgroup


                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

                begindocument

                pagestyleempty

                This is right:

                paragraphStyle
                First line\
                Second line


                Also this is correct in indentation, but not in space after paragraph:

                First Line\
                Second Line

                enddocument


                enter image description here






                share|improve this answer

























                  1












                  1








                  1







                  You should use grouping to isolate the changes in font and line spacing, so you don't have to revert them afterwards. However, since these changes have to be done, you need to end the previous paragraph, if not already done and also to end a paragraph at the end of the special setup, so as not to influence the following paragraphs.



                  %%%%% Preamble %%%%%
                  documentclass[10pt]book
                  usepackage[a4paper]geometry
                  geometry
                  a4paper,
                  left=1in,
                  right=1in,
                  top=1in,
                  bottom=1in,
                  portrait,


                  usepackagexcolor

                  % Font family
                  usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
                  setmainfontLibertinus Serif

                  % Paragraph and line settings
                  setlengthparindent0em % Set paragraph indentation
                  setlengthparskip0.08in % Paragraph spacing
                  renewcommandbaselinestretch1.0 % Line

                  % Custom commands
                  newcommandparagraphStyle[1]%
                  par
                  begingroup
                  setlengthparindent0pt%
                  setlengthparskip0.16in%
                  renewcommandbaselinestretch2.0%
                  fontsize20pt24ptselectfont
                  noindentcolorblack!100%
                  bfseriesignorespaces #1par
                  endgroup


                  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

                  begindocument

                  pagestyleempty

                  This is right:

                  paragraphStyle
                  First line\
                  Second line


                  Also this is correct in indentation, but not in space after paragraph:

                  First Line\
                  Second Line

                  enddocument


                  enter image description here






                  share|improve this answer













                  You should use grouping to isolate the changes in font and line spacing, so you don't have to revert them afterwards. However, since these changes have to be done, you need to end the previous paragraph, if not already done and also to end a paragraph at the end of the special setup, so as not to influence the following paragraphs.



                  %%%%% Preamble %%%%%
                  documentclass[10pt]book
                  usepackage[a4paper]geometry
                  geometry
                  a4paper,
                  left=1in,
                  right=1in,
                  top=1in,
                  bottom=1in,
                  portrait,


                  usepackagexcolor

                  % Font family
                  usepackage[math-style=ISO, bold-style=ISO, partial=upright, nabla=upright]unicode-math
                  setmainfontLibertinus Serif

                  % Paragraph and line settings
                  setlengthparindent0em % Set paragraph indentation
                  setlengthparskip0.08in % Paragraph spacing
                  renewcommandbaselinestretch1.0 % Line

                  % Custom commands
                  newcommandparagraphStyle[1]%
                  par
                  begingroup
                  setlengthparindent0pt%
                  setlengthparskip0.16in%
                  renewcommandbaselinestretch2.0%
                  fontsize20pt24ptselectfont
                  noindentcolorblack!100%
                  bfseriesignorespaces #1par
                  endgroup


                  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

                  begindocument

                  pagestyleempty

                  This is right:

                  paragraphStyle
                  First line\
                  Second line


                  Also this is correct in indentation, but not in space after paragraph:

                  First Line\
                  Second Line

                  enddocument


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 3 hours ago









                  egregegreg

                  736k8919353261




                  736k8919353261



























                      draft saved

                      draft discarded
















































                      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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487436%2fwith-indentation-set-to-0em-when-using-a-line-break-there-is-still-an-indent%23new-answer', 'question_page');

                      );

                      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







                      Popular posts from this blog

                      How to create a command for the “strange m” symbol in latex? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How do you make your own symbol when Detexify fails?Writing bold small caps with mathpazo packageplus-minus symbol with parenthesis around the minus signGreek character in Beamer document titleHow to create dashed right arrow over symbol?Currency symbol: Turkish LiraDouble prec as a single symbol?Plus Sign Too Big; How to Call adfbullet?Is there a TeX macro for three-legged pi?How do I get my integral-like symbol to align like the integral?How to selectively substitute a letter with another symbol representing the same letterHow do I generate a less than symbol and vertical bar that are the same height?

                      Българска екзархия Съдържание История | Български екзарси | Вижте също | Външни препратки | Литература | Бележки | НавигацияУстав за управлението на българската екзархия. Цариград, 1870Слово на Ловешкия митрополит Иларион при откриването на Българския народен събор в Цариград на 23. II. 1870 г.Българската правда и гръцката кривда. От С. М. (= Софийски Мелетий). Цариград, 1872Предстоятели на Българската екзархияПодмененият ВеликденИнформационна агенция „Фокус“Димитър Ризов. Българите в техните исторически, етнографически и политически граници (Атлас съдържащ 40 карти). Berlin, Königliche Hoflithographie, Hof-Buch- und -Steindruckerei Wilhelm Greve, 1917Report of the International Commission to Inquire into the Causes and Conduct of the Balkan Wars

                      Category:Tremithousa Media in category "Tremithousa"Navigation menuUpload media34° 49′ 02.7″ N, 32° 26′ 37.32″ EOpenStreetMapGoogle EarthProximityramaReasonatorScholiaStatisticsWikiShootMe