如何禁用 LaTeX 列表项的缩进? [英] How to disable indentation of LaTeX list items?

查看:56
本文介绍了如何禁用 LaTeX 列表项的缩进?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

By default the "enumerate" environment is indented with respect to the current environment. How can I disable this indentation so that an enumerate environment of three items would produce the same output as the following piece of code?

documentclass{article}
egin{document}
  paragraph{1.}
  paragraph{2.}
  paragraph{3.}
end{document}

解决方案

I compiled the three suggested methods into one file to be able to compare them side by side. Note that setlength{leftmargin}{0pt} does not have any effect on the "enumerate" environment. So far, the best solution is the "list" environment using the option "leftmargin=1.4em". However, I do not like a constant number in my code for it makes the code fragile. Does anyone know how to compute this constant (1.4em) in terms of available LaTeX variables?

documentclass{article}
egin{document}

section*{Paragraph}
paragraph{1.} First
paragraph{2.} Second
paragraph{3.} Third

section*{list}


ewcounter{itemcounter}
egin{list}
{	extbf{arabic{itemcounter}.}}
{usecounter{itemcounter}leftmargin=1.4em}
item First
item Second
item Third
end{list}

section*{enumerate with leftmargin}
egin{enumerate}

enewcommand{labelenumi}{	extbf{	heenumi}.}
setlength{leftmargin}{0pt}
item First
item Second
item Third
end{enumerate}

end{document}

这篇关于如何禁用 LaTeX 列表项的缩进?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆