TransWikia.com

Enumeration inside a paragraph

TeX - LaTeX Asked on April 9, 2021

For starters this question might have already been asked and answered, but as I do not know how to properly call what I want, I cannot find an answer.

So I was wondering how can you do enumeration inside paragraphs? the begin{enumerate}...end{enumerate} is nice, but it is not quite what I want. I want to insert same enumeration in my paragraphs without the enumeration part having its own newline (if that makes sense). So something like: "[…] Note that (1.) …. By (1.), we conclude that…".

Is there a way to do with LaTeX, or does everyone just insert the enumeration by hand?

2 Answers

You can use the enumitem package with the inline option. Starred enumerate environments will look like what you are asking for.

documentclass{article}
usepackage[inline]{enumitem}
begin{document}
This is an example paragraph meant to demonstrate
begin{enumerate}[label=(arabic*)]
    item how enumitem works
    item with the inline option
    item compared to the unstarred version
end{enumerate}

This is an example paragraph meant to demonstrate
begin{enumerate*}[label=(arabic*)]
    item how enumitem works
    item with the inline option
    item compared to the unstarred version
end{enumerate*}
end{document}

enter image description here

Correct answer by Khodatis on April 9, 2021

You can load the enumitem package with the option inline. It defines the environment enumerate* which does exactly what you want.

If you also want to change the default numbering from 1. to (1.) you can also do that within enumitem. The following MWE does what you want.

documentclass{article}

usepackage[inline]{enumitem}

begin{document}
    Note that
    begin{enumerate*}[label=(arabic*.)]
        item  label{1} this is an answer. 
        item  By ref{1}, we conclude that the answer works.
    end{enumerate*}
end{document}

Answered by ɪdɪət strəʊlə on April 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP