mirror of https://github.com/eyhc1/rendercv.git
add text alignment options
This commit is contained in:
parent
50ef298011
commit
ab13bbccdf
|
@ -535,7 +535,7 @@ def run_latex(latex_file_path: str) -> str:
|
||||||
)
|
)
|
||||||
|
|
||||||
run()
|
run()
|
||||||
run() # run twice for cross-references
|
run() # run twice for cross-references
|
||||||
|
|
||||||
# check if the PDF file is generated:
|
# check if the PDF file is generated:
|
||||||
if not os.path.exists(output_file_path):
|
if not os.path.exists(output_file_path):
|
||||||
|
|
|
@ -84,11 +84,16 @@
|
||||||
\newcolumntype{R}[1]{
|
\newcolumntype{R}[1]{
|
||||||
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
|
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
|
||||||
} % right-aligned fixed width column type
|
} % right-aligned fixed width column type
|
||||||
|
((* if theme_options.text_alignment == "justified" *))
|
||||||
\newcolumntype{K}[1]{
|
\newcolumntype{K}[1]{
|
||||||
>{\let\newline\\\arraybackslash\hspace{0pt}}X
|
>{\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
|
\setlength\tabcolsep{-1.5pt} % no space between columns
|
||||||
|
|
||||||
\newenvironment{highlights}{
|
\newenvironment{highlights}{
|
||||||
\begin{itemize}[
|
\begin{itemize}[
|
||||||
topsep=0pt,
|
topsep=0pt,
|
||||||
|
@ -132,7 +137,10 @@
|
||||||
<<header(name=cv.name, connections=cv.connections)|indent(4)>>
|
<<header(name=cv.name, connections=cv.connections)|indent(4)>>
|
||||||
((* if cv.summary is not none *))
|
((* if cv.summary is not none *))
|
||||||
\section{Summary}
|
\section{Summary}
|
||||||
|
{
|
||||||
|
((* if theme_options.text_alignment == "left-aligned" *))
|
||||||
|
\raggedright
|
||||||
|
((* endif *))
|
||||||
\setlength{\leftskip}{<<theme_options.margins.entry_area.left_and_right>>}
|
\setlength{\leftskip}{<<theme_options.margins.entry_area.left_and_right>>}
|
||||||
\setlength{\rightskip}{<<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{\leftskip}{0cm}
|
||||||
\setlength{\rightskip}{0cm}
|
\setlength{\rightskip}{0cm}
|
||||||
|
}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
|
|
||||||
\centering
|
\centering
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
((* endmacro *))
|
((* endmacro *))
|
||||||
|
|
||||||
((* macro one_line(name, details, markdown_url=none, link_text=none) *))
|
((* 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>>
|
\leftskip=<<theme_options.margins.entry_area.left_and_right>>
|
||||||
\advance\csname @rightskip\endcsname <<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>>
|
\advance\rightskip <<theme_options.margins.entry_area.left_and_right>>
|
||||||
|
|
Loading…
Reference in New Issue