classic: add education_degree_width design option

This commit is contained in:
Sina Atalay 2024-04-08 00:23:55 +00:00 committed by GitHub
parent 57722a1b58
commit 43f938d1bb
2 changed files with 30 additions and 5 deletions

View File

@ -79,7 +79,7 @@
\titlespacing{\section}{ \titlespacing{\section}{
% left space: % left space:
0pt -1pt
}{ }{
% top space: % top space:
<<design.margins.section_title.top>> <<design.margins.section_title.top>>
@ -94,10 +94,12 @@
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>, parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
partopsep=0pt, partopsep=0pt,
itemsep=0pt, itemsep=0pt,
leftmargin=<<design.margins.highlights_area.left>> + 3pt leftmargin=<<design.margins.highlights_area.left>> + 10pt
] ]
}{ }{
\end{itemize} \end{itemize}
\vspace{-0.20cm}
} % new environment for highlights } % new environment for highlights
@ -114,7 +116,7 @@
\newenvironment{twocolentry}[2][]{ \newenvironment{twocolentry}[2][]{
\onecolentry \onecolentry
\def\secondColumn{#2} \def\secondColumn{#2}
\setcolumnwidth{\fill, 4.2cm} \setcolumnwidth{\fill, <<design.margins.entry_area.date_and_location_width>>}
\begin{paracol}{2} \begin{paracol}{2}
}{ }{
\switchcolumn \raggedleft \secondColumn \switchcolumn \raggedleft \secondColumn
@ -125,7 +127,7 @@
\newenvironment{threecolentry}[3][]{ \newenvironment{threecolentry}[3][]{
\onecolentry \onecolentry
\def\thirdColumn{#3} \def\thirdColumn{#3}
\setcolumnwidth{1cm, \fill, 4.2cm} \setcolumnwidth{1cm, \fill, <<design.margins.entry_area.date_and_location_width>>}
\begin{paracol}{3} \begin{paracol}{3}
\raggedright #2 \switchcolumn \raggedright #2 \switchcolumn
}{ }{

View File

@ -2,7 +2,30 @@ from typing import Literal
import pydantic import pydantic
from .. import ThemeOptions from .. import ThemeOptions, EntryAreaMargins, Margins, LaTeXDimension
class EntryAreaMarginsForClassic(EntryAreaMargins):
"""This class is a data model for the entry area margins."""
education_degree_width: LaTeXDimension = pydantic.Field(
default="1 cm",
title="Date and Location Column Width",
description=(
"The width of the degree column in EducationEntry. The default value is"
" 1 cm."
),
)
class MarginsForClassic(Margins):
"""This class is a data model for the margins."""
entry_area: EntryAreaMarginsForClassic = pydantic.Field(
default=EntryAreaMarginsForClassic(),
title="Entry Area Margins",
description="Entry area margins.",
)
class ClassicThemeOptions(ThemeOptions): class ClassicThemeOptions(ThemeOptions):