Improve formatting of lists
List layout adjustments in the SKS LaTeX path: list item spacing and the surrounding document style tuned in list.py, latex_util.py, document.sty, and block.k. Assembled from dev commit f34e66a4dbfb. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,9 +81,12 @@ class Define(klammer_base.Klammer_base):
|
||||
'c' : r'\normalfont\ttfamily',
|
||||
's' : r'\normalfont\sffamily'}[self.font]
|
||||
return f"{font} {s}"
|
||||
result = "\n\n".join([f"\\item[{fontify(term)}]\\hfill\n\\newline {definition}"
|
||||
# The "\hfill\newline" was to force the description to the next line even if the item was small:
|
||||
# result = "\n\n".join([f"\\item[{{{fontify(term)}}}]\\hfill\n\\newline {definition}"
|
||||
strut = r"\rule[-8pt]{0pt}{8pt}"
|
||||
result = "\n\n".join([f"\\item[{{{fontify(term)}{strut}}}] {definition}"
|
||||
for term,definition in self.items])
|
||||
result = f"\\begin{{description}}[labelindent=12pt,nosep,itemsep=6pt]\n{result}\n\\end{{description}}"
|
||||
result = f"\\begin{{description}}[labelindent=12pt,nosep,itemsep=6pt,parsep=.5\parskip,style=nextline]\n{result}\n\\end{{description}}"
|
||||
return result
|
||||
|
||||
# Needs to be implemented:
|
||||
|
||||
Reference in New Issue
Block a user