add text alignment options

This commit is contained in:
Sina Atalay 2023-11-20 20:11:08 +01:00 committed by Jeffrey Goldberg
parent 50ef298011
commit ab13bbccdf
3 changed files with 15 additions and 6 deletions

View File

@ -535,7 +535,7 @@ def run_latex(latex_file_path: str) -> str:
)
run()
run() # run twice for cross-references
run() # run twice for cross-references
# check if the PDF file is generated:
if not os.path.exists(output_file_path):

View File

@ -84,11 +84,16 @@
\newcolumntype{R}[1]{
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
} % right-aligned fixed width column type
((* if theme_options.text_alignment == "justified" *))
\newcolumntype{K}[1]{
>{\let\newline\\\arraybackslash\hspace{0pt}}X
} % left-aligned (but justified) flexible width column type
} % justified flexible width column type
((* elif theme_options.text_alignment == "left-aligned" *))
\newcolumntype{K}[1]{
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}X
} % left-aligned flexible width column type
((* endif *))
\setlength\tabcolsep{-1.5pt} % no space between columns
\newenvironment{highlights}{
\begin{itemize}[
topsep=0pt,
@ -132,7 +137,10 @@
<<header(name=cv.name, connections=cv.connections)|indent(4)>>
((* if cv.summary is not none *))
\section{Summary}
{
((* if theme_options.text_alignment == "left-aligned" *))
\raggedright
((* endif *))
\setlength{\leftskip}{<<theme_options.margins.entry_area.left_and_right>>}
\setlength{\rightskip}{<<theme_options.margins.entry_area.left_and_right>>}
@ -140,6 +148,7 @@
\setlength{\leftskip}{0cm}
\setlength{\rightskip}{0cm}
}
((* endif *))
\centering

View File

@ -95,7 +95,7 @@
((* endmacro *))
((* macro one_line(name, details, markdown_url=none, link_text=none) *))
\begingroup\raggedright
\begingroup((* if theme_options.text_alignment == "left-aligned" *))\raggedright((* endif *))
\leftskip=<<theme_options.margins.entry_area.left_and_right>>
\advance\csname @rightskip\endcsname <<theme_options.margins.entry_area.left_and_right>>
\advance\rightskip <<theme_options.margins.entry_area.left_and_right>>