TeX - LaTeX Asked by Dilawar on June 25, 2021
Here is MWE.
documentclass[a4paper,10pt]{article}
begin{document}
begin{description}
item{Foo Bar Baz }
: Foo, Bar and Baz are friends.
item a, b, c
end{description}
end{document}
It produces this:
Linebreaks are working fine but Foo
, Bar
and Baz
are not aligning to the left. Is there a way to fix this? I rather redefine the description
environment rather than change the text inside item{}
everywhere in my current doc which has many description
s.
Two observations. First, in LaTeX's description
environment, the argument of item
should be encased in square brackets, not curly braces. Second, to place several items in the argument of item
[pun intended] in a vertical stack, you could use a tabular
environment. The following example code provides short-hand macro called mystack
that simplifies the creation of a stack of items.
documentclass{article}
newcommandmystack[1]{begin{tabular}[t]{@{}l@{}} #1 end{tabular}}
begin{document}
begin{description}
item[mystack{Foo Bar Baz}]: Foo, Bar, and Baz are friends.
item[a, b, c] dots
end{description}
end{document}
Answered by Mico on June 25, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP