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?
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}
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
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP