Automatically adjust size of subsection numbers using adjustbox
This commit is contained in:
parent
4ccf1db4b2
commit
da6a35b0d6
@ -185,7 +185,7 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer):
|
|||||||
else:
|
else:
|
||||||
hyperlink = '{}'
|
hyperlink = '{}'
|
||||||
|
|
||||||
return format(r'\N{\par<hyperlink>\leftskip=\dimexpr\quotemargin+<lmarg>+<level>cm\relax\hangindent=1cm\parskip=<parskip>\makebox[<lmarg>][l]{<label>}<content><pagebreak>\par}\N',
|
return format(r'\N{\par<hyperlink>\leftskip=\dimexpr\quotemargin+<lmarg>+<level>cm\relax\hangindent=1cm\parskip=<parskip>\makebox[<lmarg>][l]{\maxsizebox{\dimexpr<lmarg>-1mm\relax}{!}{<label>}}<content><pagebreak>\par}\N',
|
||||||
hyperlink=hyperlink,
|
hyperlink=hyperlink,
|
||||||
parskip=r'\parskip',# if token.level <= 1 else '0cm',
|
parskip=r'\parskip',# if token.level <= 1 else '0cm',
|
||||||
label=token.label,
|
label=token.label,
|
||||||
@ -279,6 +279,7 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer):
|
|||||||
\setlength{\emergencystretch}{3em}
|
\setlength{\emergencystretch}{3em}
|
||||||
\usepackage{microtype}
|
\usepackage{microtype}
|
||||||
\usepackage{longtable}\usepackage{tabu}\usepackage{booktabs}
|
\usepackage{longtable}\usepackage{tabu}\usepackage{booktabs}
|
||||||
|
\usepackage{adjustbox}
|
||||||
\newlength\quotemargin
|
\newlength\quotemargin
|
||||||
\newlength\notetaglength
|
\newlength\notetaglength
|
||||||
% TOC format
|
% TOC format
|
||||||
|
Loading…
Reference in New Issue
Block a user