Inline list: How to insert a non-stretching but line-breaking thin space?











up vote
1
down vote

favorite












This is a follow-up to How to insert a non-stretching but line-breaking thin space?, but in reference to an inline list. The MWE below attempts to use each of the solutions mentioned there, but the best I can using:



sloppyRaggedRight
%ttfamily


is shown in the image below. Ultimately, I want to use ttfamily in this list (but that is another problem entirely and should probably be a separate question), thus the use of normalfont in:



setlist[MyList*]{..., itemjoin={normalfont,BreakableSpace{,}}, ...}


enter image description here



Notes:




  • I attempted to use the solutions in What is the meaning of fussy, sloppy, emergencystretch, tolerance, hbadness?, but was not able to get them to work either.

  • It seems that I have asked a similar question a long time ago Why is text being placed beyond the specified line width?, but here I am using sloppy and RaggedRight but that still is not sufficient.


Question:



What options do I have to force the text to stay within the specified area?



Slightly Better Results:



It seems that if I move the sloppyRaggedRight to be before I call TypesetMyList as in:



{sloppyRaggedRightTypesetMyList{Title}{MyList*}}


the results are better but still has some additional leading space at the beginning of lines:



enter image description here



References





  • How to insert a non-stretching but line-breaking thin space?.

  • What is the meaning of fussy, sloppy, emergencystretch, tolerance, hbadness?


Code:



documentclass{article}
usepackage[inline]{enumitem}
usepackage{ragged2e}
usepackage{xcolor}
usepackage{microtype}

usepackage[showframe, paperwidth=5cm]{geometry}

newlist{MyList*}{enumerate*}{1}
setlist[MyList*]{label={}, itemsep=0pt, itemjoin={normalfont,BreakableSpace{,}}, after={.}}


%% https://tex.stackexchange.com/questions/78914/
%% how-to-insert-a-non-stretching-but-line-breaking-thin-space

newcommand*{addthinspace}{hskip0.16667emrelax}% lockstep

newcommandbigspace{kern 0.1em}% <-- Changed amount here as I don't want large space
newcommandbreakingspaceJfbuA{allowbreakbigspaceallowbreak}% jfbu's 1st solution
newcommandbreakingspaceJfbuB{allowbreakbigspace}% jfbu's 2nd solution

newcommand{breakingspaceEgregA}[1]{#1hspace{0pt}}% egreg's 1st solution
newcommand{breakingspaceEgregB}[1]{{letkernhskip#1}}% egreg's 2nd solution
newcommand{badbreakingspace}[1]{penalty 0 #1}% egreg's 3rd solution


%% Select which breakable space we want to try. First uncommented one here gets used:
providecommand*{BreakableSpace}[1]{addthinspace}

providecommand*{BreakableSpace}[1]{breakingspaceJfbuA}
providecommand*{BreakableSpace}[1]{breakingspaceJfbuB}

providecommand*{BreakableSpace}[1]{breakingspaceEgregA{#1}}
providecommand*{BreakableSpace}[1]{breakingspaceEgregB{#1}}
providecommand*{BreakableSpace}[1]{badbreakingspace{#1}}


newcommand*{TypesetMyList}[2]{%
smallskip%
parnoindent{bfseries#1:}~%
begingroup
sloppyRaggedRight
%ttfamily
begin{#2}
item First Item
item Second item in list
item Third item
item Fourth item in list
item Fifth item
item Sixth item in list
item Seventh item
item Eighth item in list
end{#2}%
endgroupsmallskippar%
}%

begin{document}
Some text before the start of the list.
TypesetMyList{Title}{MyList*}
Some text after the end of the list.
end{document}









share|improve this question
























  • ttfamily would change things quite a bit as the inter-word space is then not stretchy by default, so if that's what you want, possibly the initial exampe should use that.
    – David Carlisle
    3 hours ago










  • @DavidCarlisle: Yeah I normally would have included ttfamily, but as it seemed to be another can of worms as per How to automatically hyphenate within texttt?, I decided not too. As egreg's solution already seems to work for that case I won't post a new question (unless some other issue comes up).
    – Peter Grill
    2 hours ago















up vote
1
down vote

favorite












This is a follow-up to How to insert a non-stretching but line-breaking thin space?, but in reference to an inline list. The MWE below attempts to use each of the solutions mentioned there, but the best I can using:



sloppyRaggedRight
%ttfamily


is shown in the image below. Ultimately, I want to use ttfamily in this list (but that is another problem entirely and should probably be a separate question), thus the use of normalfont in:



setlist[MyList*]{..., itemjoin={normalfont,BreakableSpace{,}}, ...}


enter image description here



Notes:




  • I attempted to use the solutions in What is the meaning of fussy, sloppy, emergencystretch, tolerance, hbadness?, but was not able to get them to work either.

  • It seems that I have asked a similar question a long time ago Why is text being placed beyond the specified line width?, but here I am using sloppy and RaggedRight but that still is not sufficient.


Question:



What options do I have to force the text to stay within the specified area?



Slightly Better Results:



It seems that if I move the sloppyRaggedRight to be before I call TypesetMyList as in:



{sloppyRaggedRightTypesetMyList{Title}{MyList*}}


the results are better but still has some additional leading space at the beginning of lines:



enter image description here



References





  • How to insert a non-stretching but line-breaking thin space?.

  • What is the meaning of fussy, sloppy, emergencystretch, tolerance, hbadness?


Code:



documentclass{article}
usepackage[inline]{enumitem}
usepackage{ragged2e}
usepackage{xcolor}
usepackage{microtype}

usepackage[showframe, paperwidth=5cm]{geometry}

newlist{MyList*}{enumerate*}{1}
setlist[MyList*]{label={}, itemsep=0pt, itemjoin={normalfont,BreakableSpace{,}}, after={.}}


%% https://tex.stackexchange.com/questions/78914/
%% how-to-insert-a-non-stretching-but-line-breaking-thin-space

newcommand*{addthinspace}{hskip0.16667emrelax}% lockstep

newcommandbigspace{kern 0.1em}% <-- Changed amount here as I don't want large space
newcommandbreakingspaceJfbuA{allowbreakbigspaceallowbreak}% jfbu's 1st solution
newcommandbreakingspaceJfbuB{allowbreakbigspace}% jfbu's 2nd solution

newcommand{breakingspaceEgregA}[1]{#1hspace{0pt}}% egreg's 1st solution
newcommand{breakingspaceEgregB}[1]{{letkernhskip#1}}% egreg's 2nd solution
newcommand{badbreakingspace}[1]{penalty 0 #1}% egreg's 3rd solution


%% Select which breakable space we want to try. First uncommented one here gets used:
providecommand*{BreakableSpace}[1]{addthinspace}

providecommand*{BreakableSpace}[1]{breakingspaceJfbuA}
providecommand*{BreakableSpace}[1]{breakingspaceJfbuB}

providecommand*{BreakableSpace}[1]{breakingspaceEgregA{#1}}
providecommand*{BreakableSpace}[1]{breakingspaceEgregB{#1}}
providecommand*{BreakableSpace}[1]{badbreakingspace{#1}}


newcommand*{TypesetMyList}[2]{%
smallskip%
parnoindent{bfseries#1:}~%
begingroup
sloppyRaggedRight
%ttfamily
begin{#2}
item First Item
item Second item in list
item Third item
item Fourth item in list
item Fifth item
item Sixth item in list
item Seventh item
item Eighth item in list
end{#2}%
endgroupsmallskippar%
}%

begin{document}
Some text before the start of the list.
TypesetMyList{Title}{MyList*}
Some text after the end of the list.
end{document}









share|improve this question
























  • ttfamily would change things quite a bit as the inter-word space is then not stretchy by default, so if that's what you want, possibly the initial exampe should use that.
    – David Carlisle
    3 hours ago










  • @DavidCarlisle: Yeah I normally would have included ttfamily, but as it seemed to be another can of worms as per How to automatically hyphenate within texttt?, I decided not too. As egreg's solution already seems to work for that case I won't post a new question (unless some other issue comes up).
    – Peter Grill
    2 hours ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











This is a follow-up to How to insert a non-stretching but line-breaking thin space?, but in reference to an inline list. The MWE below attempts to use each of the solutions mentioned there, but the best I can using:



sloppyRaggedRight
%ttfamily


is shown in the image below. Ultimately, I want to use ttfamily in this list (but that is another problem entirely and should probably be a separate question), thus the use of normalfont in:



setlist[MyList*]{..., itemjoin={normalfont,BreakableSpace{,}}, ...}


enter image description here



Notes:




  • I attempted to use the solutions in What is the meaning of fussy, sloppy, emergencystretch, tolerance, hbadness?, but was not able to get them to work either.

  • It seems that I have asked a similar question a long time ago Why is text being placed beyond the specified line width?, but here I am using sloppy and RaggedRight but that still is not sufficient.


Question:



What options do I have to force the text to stay within the specified area?



Slightly Better Results:



It seems that if I move the sloppyRaggedRight to be before I call TypesetMyList as in:



{sloppyRaggedRightTypesetMyList{Title}{MyList*}}


the results are better but still has some additional leading space at the beginning of lines:



enter image description here



References





  • How to insert a non-stretching but line-breaking thin space?.

  • What is the meaning of fussy, sloppy, emergencystretch, tolerance, hbadness?


Code:



documentclass{article}
usepackage[inline]{enumitem}
usepackage{ragged2e}
usepackage{xcolor}
usepackage{microtype}

usepackage[showframe, paperwidth=5cm]{geometry}

newlist{MyList*}{enumerate*}{1}
setlist[MyList*]{label={}, itemsep=0pt, itemjoin={normalfont,BreakableSpace{,}}, after={.}}


%% https://tex.stackexchange.com/questions/78914/
%% how-to-insert-a-non-stretching-but-line-breaking-thin-space

newcommand*{addthinspace}{hskip0.16667emrelax}% lockstep

newcommandbigspace{kern 0.1em}% <-- Changed amount here as I don't want large space
newcommandbreakingspaceJfbuA{allowbreakbigspaceallowbreak}% jfbu's 1st solution
newcommandbreakingspaceJfbuB{allowbreakbigspace}% jfbu's 2nd solution

newcommand{breakingspaceEgregA}[1]{#1hspace{0pt}}% egreg's 1st solution
newcommand{breakingspaceEgregB}[1]{{letkernhskip#1}}% egreg's 2nd solution
newcommand{badbreakingspace}[1]{penalty 0 #1}% egreg's 3rd solution


%% Select which breakable space we want to try. First uncommented one here gets used:
providecommand*{BreakableSpace}[1]{addthinspace}

providecommand*{BreakableSpace}[1]{breakingspaceJfbuA}
providecommand*{BreakableSpace}[1]{breakingspaceJfbuB}

providecommand*{BreakableSpace}[1]{breakingspaceEgregA{#1}}
providecommand*{BreakableSpace}[1]{breakingspaceEgregB{#1}}
providecommand*{BreakableSpace}[1]{badbreakingspace{#1}}


newcommand*{TypesetMyList}[2]{%
smallskip%
parnoindent{bfseries#1:}~%
begingroup
sloppyRaggedRight
%ttfamily
begin{#2}
item First Item
item Second item in list
item Third item
item Fourth item in list
item Fifth item
item Sixth item in list
item Seventh item
item Eighth item in list
end{#2}%
endgroupsmallskippar%
}%

begin{document}
Some text before the start of the list.
TypesetMyList{Title}{MyList*}
Some text after the end of the list.
end{document}









share|improve this question















This is a follow-up to How to insert a non-stretching but line-breaking thin space?, but in reference to an inline list. The MWE below attempts to use each of the solutions mentioned there, but the best I can using:



sloppyRaggedRight
%ttfamily


is shown in the image below. Ultimately, I want to use ttfamily in this list (but that is another problem entirely and should probably be a separate question), thus the use of normalfont in:



setlist[MyList*]{..., itemjoin={normalfont,BreakableSpace{,}}, ...}


enter image description here



Notes:




  • I attempted to use the solutions in What is the meaning of fussy, sloppy, emergencystretch, tolerance, hbadness?, but was not able to get them to work either.

  • It seems that I have asked a similar question a long time ago Why is text being placed beyond the specified line width?, but here I am using sloppy and RaggedRight but that still is not sufficient.


Question:



What options do I have to force the text to stay within the specified area?



Slightly Better Results:



It seems that if I move the sloppyRaggedRight to be before I call TypesetMyList as in:



{sloppyRaggedRightTypesetMyList{Title}{MyList*}}


the results are better but still has some additional leading space at the beginning of lines:



enter image description here



References





  • How to insert a non-stretching but line-breaking thin space?.

  • What is the meaning of fussy, sloppy, emergencystretch, tolerance, hbadness?


Code:



documentclass{article}
usepackage[inline]{enumitem}
usepackage{ragged2e}
usepackage{xcolor}
usepackage{microtype}

usepackage[showframe, paperwidth=5cm]{geometry}

newlist{MyList*}{enumerate*}{1}
setlist[MyList*]{label={}, itemsep=0pt, itemjoin={normalfont,BreakableSpace{,}}, after={.}}


%% https://tex.stackexchange.com/questions/78914/
%% how-to-insert-a-non-stretching-but-line-breaking-thin-space

newcommand*{addthinspace}{hskip0.16667emrelax}% lockstep

newcommandbigspace{kern 0.1em}% <-- Changed amount here as I don't want large space
newcommandbreakingspaceJfbuA{allowbreakbigspaceallowbreak}% jfbu's 1st solution
newcommandbreakingspaceJfbuB{allowbreakbigspace}% jfbu's 2nd solution

newcommand{breakingspaceEgregA}[1]{#1hspace{0pt}}% egreg's 1st solution
newcommand{breakingspaceEgregB}[1]{{letkernhskip#1}}% egreg's 2nd solution
newcommand{badbreakingspace}[1]{penalty 0 #1}% egreg's 3rd solution


%% Select which breakable space we want to try. First uncommented one here gets used:
providecommand*{BreakableSpace}[1]{addthinspace}

providecommand*{BreakableSpace}[1]{breakingspaceJfbuA}
providecommand*{BreakableSpace}[1]{breakingspaceJfbuB}

providecommand*{BreakableSpace}[1]{breakingspaceEgregA{#1}}
providecommand*{BreakableSpace}[1]{breakingspaceEgregB{#1}}
providecommand*{BreakableSpace}[1]{badbreakingspace{#1}}


newcommand*{TypesetMyList}[2]{%
smallskip%
parnoindent{bfseries#1:}~%
begingroup
sloppyRaggedRight
%ttfamily
begin{#2}
item First Item
item Second item in list
item Third item
item Fourth item in list
item Fifth item
item Sixth item in list
item Seventh item
item Eighth item in list
end{#2}%
endgroupsmallskippar%
}%

begin{document}
Some text before the start of the list.
TypesetMyList{Title}{MyList*}
Some text after the end of the list.
end{document}






spacing line-breaking microtype






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 4 hours ago

























asked 4 hours ago









Peter Grill

163k24432743




163k24432743












  • ttfamily would change things quite a bit as the inter-word space is then not stretchy by default, so if that's what you want, possibly the initial exampe should use that.
    – David Carlisle
    3 hours ago










  • @DavidCarlisle: Yeah I normally would have included ttfamily, but as it seemed to be another can of worms as per How to automatically hyphenate within texttt?, I decided not too. As egreg's solution already seems to work for that case I won't post a new question (unless some other issue comes up).
    – Peter Grill
    2 hours ago


















  • ttfamily would change things quite a bit as the inter-word space is then not stretchy by default, so if that's what you want, possibly the initial exampe should use that.
    – David Carlisle
    3 hours ago










  • @DavidCarlisle: Yeah I normally would have included ttfamily, but as it seemed to be another can of worms as per How to automatically hyphenate within texttt?, I decided not too. As egreg's solution already seems to work for that case I won't post a new question (unless some other issue comes up).
    – Peter Grill
    2 hours ago
















ttfamily would change things quite a bit as the inter-word space is then not stretchy by default, so if that's what you want, possibly the initial exampe should use that.
– David Carlisle
3 hours ago




ttfamily would change things quite a bit as the inter-word space is then not stretchy by default, so if that's what you want, possibly the initial exampe should use that.
– David Carlisle
3 hours ago












@DavidCarlisle: Yeah I normally would have included ttfamily, but as it seemed to be another can of worms as per How to automatically hyphenate within texttt?, I decided not too. As egreg's solution already seems to work for that case I won't post a new question (unless some other issue comes up).
– Peter Grill
2 hours ago




@DavidCarlisle: Yeah I normally would have included ttfamily, but as it seemed to be another can of worms as per How to automatically hyphenate within texttt?, I decided not too. As egreg's solution already seems to work for that case I won't post a new question (unless some other issue comes up).
– Peter Grill
2 hours ago










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










You're forgetting to set afterlabel that, by default, is ~ (non breaking space).



documentclass{article}
usepackage[inline]{enumitem}
usepackage{ragged2e}
usepackage{xcolor}
usepackage{microtype}

usepackage[showframe, paperwidth=5cm]{geometry}

newlist{MyList*}{enumerate*}{1}
setlist[MyList*]{
label={},
itemsep=0pt,
itemjoin={normalfont,},
afterlabel={hspace{0.16667em}},
after={.}
}

begin{document}
Some text before the start of the list.

noindenttextbf{Title:}~%
begingroupsloppyRaggedRight
begin{MyList*}
ttfamily
item First Item
item Second item in list
item Third item
item Fourth item in list
item Fifth item
item Sixth item in list
item Seventh item
item Eighth item in list
end{MyList*}
parendgroup

end{document}


enter image description here



You can also use before to set up other features. If you add csname @@parendcsname to after, RaggedRight and sloppy will be honored. If you want to change the font for the items, but preserve normal font commas, use textnormal{,}.



documentclass{article}
usepackage[inline]{enumitem}
usepackage{ragged2e}
usepackage{xcolor}
usepackage{microtype}

usepackage[showframe, paperwidth=5cm]{geometry}

newlist{MyList*}{enumerate*}{1}
setlist[MyList*]{
label={},
itemsep=0pt,
itemjoin={textnormal{,}},
afterlabel={hspace{0.16667em}},
after={.csname @@parendcsname},
before={sloppyRaggedRightttfamily},
}

begin{document}
Some text before the start of the list.

noindenttextbf{Title:}~%
begin{MyList*}
item First Item
item Second item in list
item Third item
item Fourth item in list
item Fifth item
item Sixth item in list
item Seventh item
item Eighth item in list
end{MyList*}

end{document}


enter image description here






share|improve this answer






























    up vote
    1
    down vote













    raggedright handles the list, although the text before is ~2pt over



    documentclass{article}
    usepackage[inline]{enumitem}
    usepackage{ragged2e}
    usepackage{xcolor}
    usepackage{microtype}

    usepackage[showframe, paperwidth=5cm]{geometry}

    newlist{MyList*}{enumerate*}{1}
    setlist[MyList*]{label={}, itemsep=0pt, itemjoin={normalfont,BreakableSpace{,}}, after={.}}


    %% https://tex.stackexchange.com/questions/78914/
    %% how-to-insert-a-non-stretching-but-line-breaking-thin-space

    newcommand*{addthinspace}{hskip0.16667emrelax}% lockstep

    newcommandbigspace{kern 0.1em}% <-- Changed amount here as I don't want large space
    newcommandbreakingspaceJfbuA{allowbreakbigspaceallowbreak}% jfbu's 1st solution
    newcommandbreakingspaceJfbuB{allowbreakbigspace}% jfbu's 2nd solution

    newcommand{breakingspaceEgregA}[1]{#1hspace{0pt}}% egreg's 1st solution
    newcommand{breakingspaceEgregB}[1]{{letkernhskip#1}}% egreg's 2nd solution
    newcommand{badbreakingspace}[1]{penalty 0 #1}% egreg's 3rd solution


    %% Select which breakable space we want to try. First uncommented one here gets used:
    providecommand*{BreakableSpace}[1]{addthinspace}

    providecommand*{BreakableSpace}[1]{breakingspaceJfbuA}
    providecommand*{BreakableSpace}[1]{breakingspaceJfbuB}

    providecommand*{BreakableSpace}[1]{breakingspaceEgregA{#1}}
    providecommand*{BreakableSpace}[1]{breakingspaceEgregB{#1}}
    providecommand*{BreakableSpace}[1]{badbreakingspace{#1}}


    newcommand*{TypesetMyList}[2]{%
    smallskip%
    parnoindent{bfseries#1:}~%
    begingroup
    raggedright
    %ttfamily
    begin{#2}
    item First Item
    item Second item in list
    item Third item
    item Fourth item in list
    item Fifth item
    item Sixth item in list
    item Seventh item
    item Eighth item in list
    end{#2}%
    parendgroupsmallskippar%
    }%

    begin{document}
    Some text before the start of the list.
    TypesetMyList{Title}{MyList*}
    Some text after the end of the list.
    end{document}


    enter image description here






    share|improve this answer





















    • although you want to change , to an hskip (eg the addthinspace so it is discarded at start of line.
      – David Carlisle
      3 hours ago











    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: 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%2f463223%2finline-list-how-to-insert-a-non-stretching-but-line-breaking-thin-space%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    You're forgetting to set afterlabel that, by default, is ~ (non breaking space).



    documentclass{article}
    usepackage[inline]{enumitem}
    usepackage{ragged2e}
    usepackage{xcolor}
    usepackage{microtype}

    usepackage[showframe, paperwidth=5cm]{geometry}

    newlist{MyList*}{enumerate*}{1}
    setlist[MyList*]{
    label={},
    itemsep=0pt,
    itemjoin={normalfont,},
    afterlabel={hspace{0.16667em}},
    after={.}
    }

    begin{document}
    Some text before the start of the list.

    noindenttextbf{Title:}~%
    begingroupsloppyRaggedRight
    begin{MyList*}
    ttfamily
    item First Item
    item Second item in list
    item Third item
    item Fourth item in list
    item Fifth item
    item Sixth item in list
    item Seventh item
    item Eighth item in list
    end{MyList*}
    parendgroup

    end{document}


    enter image description here



    You can also use before to set up other features. If you add csname @@parendcsname to after, RaggedRight and sloppy will be honored. If you want to change the font for the items, but preserve normal font commas, use textnormal{,}.



    documentclass{article}
    usepackage[inline]{enumitem}
    usepackage{ragged2e}
    usepackage{xcolor}
    usepackage{microtype}

    usepackage[showframe, paperwidth=5cm]{geometry}

    newlist{MyList*}{enumerate*}{1}
    setlist[MyList*]{
    label={},
    itemsep=0pt,
    itemjoin={textnormal{,}},
    afterlabel={hspace{0.16667em}},
    after={.csname @@parendcsname},
    before={sloppyRaggedRightttfamily},
    }

    begin{document}
    Some text before the start of the list.

    noindenttextbf{Title:}~%
    begin{MyList*}
    item First Item
    item Second item in list
    item Third item
    item Fourth item in list
    item Fifth item
    item Sixth item in list
    item Seventh item
    item Eighth item in list
    end{MyList*}

    end{document}


    enter image description here






    share|improve this answer



























      up vote
      1
      down vote



      accepted










      You're forgetting to set afterlabel that, by default, is ~ (non breaking space).



      documentclass{article}
      usepackage[inline]{enumitem}
      usepackage{ragged2e}
      usepackage{xcolor}
      usepackage{microtype}

      usepackage[showframe, paperwidth=5cm]{geometry}

      newlist{MyList*}{enumerate*}{1}
      setlist[MyList*]{
      label={},
      itemsep=0pt,
      itemjoin={normalfont,},
      afterlabel={hspace{0.16667em}},
      after={.}
      }

      begin{document}
      Some text before the start of the list.

      noindenttextbf{Title:}~%
      begingroupsloppyRaggedRight
      begin{MyList*}
      ttfamily
      item First Item
      item Second item in list
      item Third item
      item Fourth item in list
      item Fifth item
      item Sixth item in list
      item Seventh item
      item Eighth item in list
      end{MyList*}
      parendgroup

      end{document}


      enter image description here



      You can also use before to set up other features. If you add csname @@parendcsname to after, RaggedRight and sloppy will be honored. If you want to change the font for the items, but preserve normal font commas, use textnormal{,}.



      documentclass{article}
      usepackage[inline]{enumitem}
      usepackage{ragged2e}
      usepackage{xcolor}
      usepackage{microtype}

      usepackage[showframe, paperwidth=5cm]{geometry}

      newlist{MyList*}{enumerate*}{1}
      setlist[MyList*]{
      label={},
      itemsep=0pt,
      itemjoin={textnormal{,}},
      afterlabel={hspace{0.16667em}},
      after={.csname @@parendcsname},
      before={sloppyRaggedRightttfamily},
      }

      begin{document}
      Some text before the start of the list.

      noindenttextbf{Title:}~%
      begin{MyList*}
      item First Item
      item Second item in list
      item Third item
      item Fourth item in list
      item Fifth item
      item Sixth item in list
      item Seventh item
      item Eighth item in list
      end{MyList*}

      end{document}


      enter image description here






      share|improve this answer

























        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        You're forgetting to set afterlabel that, by default, is ~ (non breaking space).



        documentclass{article}
        usepackage[inline]{enumitem}
        usepackage{ragged2e}
        usepackage{xcolor}
        usepackage{microtype}

        usepackage[showframe, paperwidth=5cm]{geometry}

        newlist{MyList*}{enumerate*}{1}
        setlist[MyList*]{
        label={},
        itemsep=0pt,
        itemjoin={normalfont,},
        afterlabel={hspace{0.16667em}},
        after={.}
        }

        begin{document}
        Some text before the start of the list.

        noindenttextbf{Title:}~%
        begingroupsloppyRaggedRight
        begin{MyList*}
        ttfamily
        item First Item
        item Second item in list
        item Third item
        item Fourth item in list
        item Fifth item
        item Sixth item in list
        item Seventh item
        item Eighth item in list
        end{MyList*}
        parendgroup

        end{document}


        enter image description here



        You can also use before to set up other features. If you add csname @@parendcsname to after, RaggedRight and sloppy will be honored. If you want to change the font for the items, but preserve normal font commas, use textnormal{,}.



        documentclass{article}
        usepackage[inline]{enumitem}
        usepackage{ragged2e}
        usepackage{xcolor}
        usepackage{microtype}

        usepackage[showframe, paperwidth=5cm]{geometry}

        newlist{MyList*}{enumerate*}{1}
        setlist[MyList*]{
        label={},
        itemsep=0pt,
        itemjoin={textnormal{,}},
        afterlabel={hspace{0.16667em}},
        after={.csname @@parendcsname},
        before={sloppyRaggedRightttfamily},
        }

        begin{document}
        Some text before the start of the list.

        noindenttextbf{Title:}~%
        begin{MyList*}
        item First Item
        item Second item in list
        item Third item
        item Fourth item in list
        item Fifth item
        item Sixth item in list
        item Seventh item
        item Eighth item in list
        end{MyList*}

        end{document}


        enter image description here






        share|improve this answer














        You're forgetting to set afterlabel that, by default, is ~ (non breaking space).



        documentclass{article}
        usepackage[inline]{enumitem}
        usepackage{ragged2e}
        usepackage{xcolor}
        usepackage{microtype}

        usepackage[showframe, paperwidth=5cm]{geometry}

        newlist{MyList*}{enumerate*}{1}
        setlist[MyList*]{
        label={},
        itemsep=0pt,
        itemjoin={normalfont,},
        afterlabel={hspace{0.16667em}},
        after={.}
        }

        begin{document}
        Some text before the start of the list.

        noindenttextbf{Title:}~%
        begingroupsloppyRaggedRight
        begin{MyList*}
        ttfamily
        item First Item
        item Second item in list
        item Third item
        item Fourth item in list
        item Fifth item
        item Sixth item in list
        item Seventh item
        item Eighth item in list
        end{MyList*}
        parendgroup

        end{document}


        enter image description here



        You can also use before to set up other features. If you add csname @@parendcsname to after, RaggedRight and sloppy will be honored. If you want to change the font for the items, but preserve normal font commas, use textnormal{,}.



        documentclass{article}
        usepackage[inline]{enumitem}
        usepackage{ragged2e}
        usepackage{xcolor}
        usepackage{microtype}

        usepackage[showframe, paperwidth=5cm]{geometry}

        newlist{MyList*}{enumerate*}{1}
        setlist[MyList*]{
        label={},
        itemsep=0pt,
        itemjoin={textnormal{,}},
        afterlabel={hspace{0.16667em}},
        after={.csname @@parendcsname},
        before={sloppyRaggedRightttfamily},
        }

        begin{document}
        Some text before the start of the list.

        noindenttextbf{Title:}~%
        begin{MyList*}
        item First Item
        item Second item in list
        item Third item
        item Fourth item in list
        item Fifth item
        item Sixth item in list
        item Seventh item
        item Eighth item in list
        end{MyList*}

        end{document}


        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 3 hours ago

























        answered 3 hours ago









        egreg

        702k8618723146




        702k8618723146






















            up vote
            1
            down vote













            raggedright handles the list, although the text before is ~2pt over



            documentclass{article}
            usepackage[inline]{enumitem}
            usepackage{ragged2e}
            usepackage{xcolor}
            usepackage{microtype}

            usepackage[showframe, paperwidth=5cm]{geometry}

            newlist{MyList*}{enumerate*}{1}
            setlist[MyList*]{label={}, itemsep=0pt, itemjoin={normalfont,BreakableSpace{,}}, after={.}}


            %% https://tex.stackexchange.com/questions/78914/
            %% how-to-insert-a-non-stretching-but-line-breaking-thin-space

            newcommand*{addthinspace}{hskip0.16667emrelax}% lockstep

            newcommandbigspace{kern 0.1em}% <-- Changed amount here as I don't want large space
            newcommandbreakingspaceJfbuA{allowbreakbigspaceallowbreak}% jfbu's 1st solution
            newcommandbreakingspaceJfbuB{allowbreakbigspace}% jfbu's 2nd solution

            newcommand{breakingspaceEgregA}[1]{#1hspace{0pt}}% egreg's 1st solution
            newcommand{breakingspaceEgregB}[1]{{letkernhskip#1}}% egreg's 2nd solution
            newcommand{badbreakingspace}[1]{penalty 0 #1}% egreg's 3rd solution


            %% Select which breakable space we want to try. First uncommented one here gets used:
            providecommand*{BreakableSpace}[1]{addthinspace}

            providecommand*{BreakableSpace}[1]{breakingspaceJfbuA}
            providecommand*{BreakableSpace}[1]{breakingspaceJfbuB}

            providecommand*{BreakableSpace}[1]{breakingspaceEgregA{#1}}
            providecommand*{BreakableSpace}[1]{breakingspaceEgregB{#1}}
            providecommand*{BreakableSpace}[1]{badbreakingspace{#1}}


            newcommand*{TypesetMyList}[2]{%
            smallskip%
            parnoindent{bfseries#1:}~%
            begingroup
            raggedright
            %ttfamily
            begin{#2}
            item First Item
            item Second item in list
            item Third item
            item Fourth item in list
            item Fifth item
            item Sixth item in list
            item Seventh item
            item Eighth item in list
            end{#2}%
            parendgroupsmallskippar%
            }%

            begin{document}
            Some text before the start of the list.
            TypesetMyList{Title}{MyList*}
            Some text after the end of the list.
            end{document}


            enter image description here






            share|improve this answer





















            • although you want to change , to an hskip (eg the addthinspace so it is discarded at start of line.
              – David Carlisle
              3 hours ago















            up vote
            1
            down vote













            raggedright handles the list, although the text before is ~2pt over



            documentclass{article}
            usepackage[inline]{enumitem}
            usepackage{ragged2e}
            usepackage{xcolor}
            usepackage{microtype}

            usepackage[showframe, paperwidth=5cm]{geometry}

            newlist{MyList*}{enumerate*}{1}
            setlist[MyList*]{label={}, itemsep=0pt, itemjoin={normalfont,BreakableSpace{,}}, after={.}}


            %% https://tex.stackexchange.com/questions/78914/
            %% how-to-insert-a-non-stretching-but-line-breaking-thin-space

            newcommand*{addthinspace}{hskip0.16667emrelax}% lockstep

            newcommandbigspace{kern 0.1em}% <-- Changed amount here as I don't want large space
            newcommandbreakingspaceJfbuA{allowbreakbigspaceallowbreak}% jfbu's 1st solution
            newcommandbreakingspaceJfbuB{allowbreakbigspace}% jfbu's 2nd solution

            newcommand{breakingspaceEgregA}[1]{#1hspace{0pt}}% egreg's 1st solution
            newcommand{breakingspaceEgregB}[1]{{letkernhskip#1}}% egreg's 2nd solution
            newcommand{badbreakingspace}[1]{penalty 0 #1}% egreg's 3rd solution


            %% Select which breakable space we want to try. First uncommented one here gets used:
            providecommand*{BreakableSpace}[1]{addthinspace}

            providecommand*{BreakableSpace}[1]{breakingspaceJfbuA}
            providecommand*{BreakableSpace}[1]{breakingspaceJfbuB}

            providecommand*{BreakableSpace}[1]{breakingspaceEgregA{#1}}
            providecommand*{BreakableSpace}[1]{breakingspaceEgregB{#1}}
            providecommand*{BreakableSpace}[1]{badbreakingspace{#1}}


            newcommand*{TypesetMyList}[2]{%
            smallskip%
            parnoindent{bfseries#1:}~%
            begingroup
            raggedright
            %ttfamily
            begin{#2}
            item First Item
            item Second item in list
            item Third item
            item Fourth item in list
            item Fifth item
            item Sixth item in list
            item Seventh item
            item Eighth item in list
            end{#2}%
            parendgroupsmallskippar%
            }%

            begin{document}
            Some text before the start of the list.
            TypesetMyList{Title}{MyList*}
            Some text after the end of the list.
            end{document}


            enter image description here






            share|improve this answer





















            • although you want to change , to an hskip (eg the addthinspace so it is discarded at start of line.
              – David Carlisle
              3 hours ago













            up vote
            1
            down vote










            up vote
            1
            down vote









            raggedright handles the list, although the text before is ~2pt over



            documentclass{article}
            usepackage[inline]{enumitem}
            usepackage{ragged2e}
            usepackage{xcolor}
            usepackage{microtype}

            usepackage[showframe, paperwidth=5cm]{geometry}

            newlist{MyList*}{enumerate*}{1}
            setlist[MyList*]{label={}, itemsep=0pt, itemjoin={normalfont,BreakableSpace{,}}, after={.}}


            %% https://tex.stackexchange.com/questions/78914/
            %% how-to-insert-a-non-stretching-but-line-breaking-thin-space

            newcommand*{addthinspace}{hskip0.16667emrelax}% lockstep

            newcommandbigspace{kern 0.1em}% <-- Changed amount here as I don't want large space
            newcommandbreakingspaceJfbuA{allowbreakbigspaceallowbreak}% jfbu's 1st solution
            newcommandbreakingspaceJfbuB{allowbreakbigspace}% jfbu's 2nd solution

            newcommand{breakingspaceEgregA}[1]{#1hspace{0pt}}% egreg's 1st solution
            newcommand{breakingspaceEgregB}[1]{{letkernhskip#1}}% egreg's 2nd solution
            newcommand{badbreakingspace}[1]{penalty 0 #1}% egreg's 3rd solution


            %% Select which breakable space we want to try. First uncommented one here gets used:
            providecommand*{BreakableSpace}[1]{addthinspace}

            providecommand*{BreakableSpace}[1]{breakingspaceJfbuA}
            providecommand*{BreakableSpace}[1]{breakingspaceJfbuB}

            providecommand*{BreakableSpace}[1]{breakingspaceEgregA{#1}}
            providecommand*{BreakableSpace}[1]{breakingspaceEgregB{#1}}
            providecommand*{BreakableSpace}[1]{badbreakingspace{#1}}


            newcommand*{TypesetMyList}[2]{%
            smallskip%
            parnoindent{bfseries#1:}~%
            begingroup
            raggedright
            %ttfamily
            begin{#2}
            item First Item
            item Second item in list
            item Third item
            item Fourth item in list
            item Fifth item
            item Sixth item in list
            item Seventh item
            item Eighth item in list
            end{#2}%
            parendgroupsmallskippar%
            }%

            begin{document}
            Some text before the start of the list.
            TypesetMyList{Title}{MyList*}
            Some text after the end of the list.
            end{document}


            enter image description here






            share|improve this answer












            raggedright handles the list, although the text before is ~2pt over



            documentclass{article}
            usepackage[inline]{enumitem}
            usepackage{ragged2e}
            usepackage{xcolor}
            usepackage{microtype}

            usepackage[showframe, paperwidth=5cm]{geometry}

            newlist{MyList*}{enumerate*}{1}
            setlist[MyList*]{label={}, itemsep=0pt, itemjoin={normalfont,BreakableSpace{,}}, after={.}}


            %% https://tex.stackexchange.com/questions/78914/
            %% how-to-insert-a-non-stretching-but-line-breaking-thin-space

            newcommand*{addthinspace}{hskip0.16667emrelax}% lockstep

            newcommandbigspace{kern 0.1em}% <-- Changed amount here as I don't want large space
            newcommandbreakingspaceJfbuA{allowbreakbigspaceallowbreak}% jfbu's 1st solution
            newcommandbreakingspaceJfbuB{allowbreakbigspace}% jfbu's 2nd solution

            newcommand{breakingspaceEgregA}[1]{#1hspace{0pt}}% egreg's 1st solution
            newcommand{breakingspaceEgregB}[1]{{letkernhskip#1}}% egreg's 2nd solution
            newcommand{badbreakingspace}[1]{penalty 0 #1}% egreg's 3rd solution


            %% Select which breakable space we want to try. First uncommented one here gets used:
            providecommand*{BreakableSpace}[1]{addthinspace}

            providecommand*{BreakableSpace}[1]{breakingspaceJfbuA}
            providecommand*{BreakableSpace}[1]{breakingspaceJfbuB}

            providecommand*{BreakableSpace}[1]{breakingspaceEgregA{#1}}
            providecommand*{BreakableSpace}[1]{breakingspaceEgregB{#1}}
            providecommand*{BreakableSpace}[1]{badbreakingspace{#1}}


            newcommand*{TypesetMyList}[2]{%
            smallskip%
            parnoindent{bfseries#1:}~%
            begingroup
            raggedright
            %ttfamily
            begin{#2}
            item First Item
            item Second item in list
            item Third item
            item Fourth item in list
            item Fifth item
            item Sixth item in list
            item Seventh item
            item Eighth item in list
            end{#2}%
            parendgroupsmallskippar%
            }%

            begin{document}
            Some text before the start of the list.
            TypesetMyList{Title}{MyList*}
            Some text after the end of the list.
            end{document}


            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 3 hours ago









            David Carlisle

            479k3811101844




            479k3811101844












            • although you want to change , to an hskip (eg the addthinspace so it is discarded at start of line.
              – David Carlisle
              3 hours ago


















            • although you want to change , to an hskip (eg the addthinspace so it is discarded at start of line.
              – David Carlisle
              3 hours ago
















            although you want to change , to an hskip (eg the addthinspace so it is discarded at start of line.
            – David Carlisle
            3 hours ago




            although you want to change , to an hskip (eg the addthinspace so it is discarded at start of line.
            – David Carlisle
            3 hours ago


















            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f463223%2finline-list-how-to-insert-a-non-stretching-but-line-breaking-thin-space%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

            Lallio

            Unable to find Lightning Node

            Futebolista