mirror of https://github.com/eyhc1/rendercv.git
themes: add five font options for classic, sb2nov, and engineeringresumes themes: "Latin Modern Serif", "Latin Modern Sans Serif", "Latin Modern Mono", "Source Sans 3", and "Charter."
This commit is contained in:
parent
0249d69793
commit
f7ed843209
|
@ -180,10 +180,23 @@ class ThemeOptions(pydantic.BaseModel):
|
||||||
duplication.
|
duplication.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
theme: Literal["tobeoverwritten"]
|
|
||||||
|
|
||||||
model_config = pydantic.ConfigDict(extra="forbid")
|
model_config = pydantic.ConfigDict(extra="forbid")
|
||||||
|
|
||||||
|
theme: Literal["tobeoverwritten"]
|
||||||
|
|
||||||
|
font: Literal[
|
||||||
|
"Latin Modern Serif",
|
||||||
|
"Latin Modern Sans Serif",
|
||||||
|
"Latin Modern Mono",
|
||||||
|
"Source Sans 3",
|
||||||
|
"Charter",
|
||||||
|
] = pydantic.Field(
|
||||||
|
default="Latin Modern Serif",
|
||||||
|
title="Font",
|
||||||
|
description=(
|
||||||
|
"The font family of the CV. The default value is Latin Modern Serif."
|
||||||
|
),
|
||||||
|
)
|
||||||
font_size: Literal["10pt", "11pt", "12pt"] = pydantic.Field(
|
font_size: Literal["10pt", "11pt", "12pt"] = pydantic.Field(
|
||||||
default="10pt",
|
default="10pt",
|
||||||
title="Font Size",
|
title="Font Size",
|
||||||
|
|
|
@ -34,17 +34,27 @@
|
||||||
\usepackage{needspace} % for avoiding page brake right after the section title
|
\usepackage{needspace} % for avoiding page brake right after the section title
|
||||||
\usepackage{iftex} % check if engine is pdflatex, xetex or luatex
|
\usepackage{iftex} % check if engine is pdflatex, xetex or luatex
|
||||||
|
|
||||||
% Theme specific:
|
|
||||||
\usepackage[default, type1]{sourcesanspro} % for using source sans 3 font
|
|
||||||
|
|
||||||
% Ensure that generate pdf is machine readable/ATS parsable:
|
% Ensure that generate pdf is machine readable/ATS parsable:
|
||||||
\ifPDFTeX
|
\ifPDFTeX
|
||||||
\input{glyphtounicode}
|
\input{glyphtounicode}
|
||||||
\pdfgentounicode=1
|
\pdfgentounicode=1
|
||||||
\usepackage[T1]{fontenc}
|
\usepackage[T1]{fontenc}
|
||||||
\usepackage[utf8]{inputenc}
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage{lmodern}
|
||||||
\fi
|
\fi
|
||||||
|
|
||||||
|
((* if design.font == "Latin Modern Serif" *))
|
||||||
|
|
||||||
|
((* elif design.font == "Latin Modern Sans Serif" *))
|
||||||
|
\renewcommand{\familydefault}{\sfdefault}
|
||||||
|
((* elif design.font == "Latin Modern Mono" *))
|
||||||
|
\renewcommand{\familydefault}{\ttdefault}
|
||||||
|
((* elif design.font == "Source Sans 3" *))
|
||||||
|
\usepackage[default, type1]{sourcesanspro}
|
||||||
|
((* elif design.font == "Charter" *))
|
||||||
|
\usepackage{charter}
|
||||||
|
((* endif *))
|
||||||
|
|
||||||
% Some settings:
|
% Some settings:
|
||||||
((* if design.text_alignment == "justified-with-no-hyphenation" *))
|
((* if design.text_alignment == "justified-with-no-hyphenation" *))
|
||||||
\usepackage[none]{hyphenat}
|
\usepackage[none]{hyphenat}
|
||||||
|
|
|
@ -32,6 +32,17 @@ class ClassicThemeOptions(ThemeOptions):
|
||||||
"""This class is the data model of the theme options for the `classic` theme."""
|
"""This class is the data model of the theme options for the `classic` theme."""
|
||||||
|
|
||||||
theme: Literal["classic"]
|
theme: Literal["classic"]
|
||||||
|
font: Literal[
|
||||||
|
"Latin Modern Serif",
|
||||||
|
"Latin Modern Sans Serif",
|
||||||
|
"Latin Modern Mono",
|
||||||
|
"Source Sans 3",
|
||||||
|
"Charter",
|
||||||
|
] = pydantic.Field(
|
||||||
|
default="Source Sans 3",
|
||||||
|
title="Font",
|
||||||
|
description="The font family of the CV. The default value is Source Sans 3.",
|
||||||
|
)
|
||||||
show_timespan_in: list[str] = pydantic.Field(
|
show_timespan_in: list[str] = pydantic.Field(
|
||||||
default=[],
|
default=[],
|
||||||
title="Show Time Span in These Sections",
|
title="Show Time Span in These Sections",
|
||||||
|
|
|
@ -34,17 +34,27 @@
|
||||||
\usepackage{needspace} % for avoiding page brake right after the section title
|
\usepackage{needspace} % for avoiding page brake right after the section title
|
||||||
\usepackage{iftex} % check if engine is pdflatex, xetex or luatex
|
\usepackage{iftex} % check if engine is pdflatex, xetex or luatex
|
||||||
|
|
||||||
% Theme specific:
|
|
||||||
\usepackage{charter} % for using charter font
|
|
||||||
|
|
||||||
% Ensure that generate pdf is machine readable/ATS parsable:
|
% Ensure that generate pdf is machine readable/ATS parsable:
|
||||||
\ifPDFTeX
|
\ifPDFTeX
|
||||||
\input{glyphtounicode}
|
\input{glyphtounicode}
|
||||||
\pdfgentounicode=1
|
\pdfgentounicode=1
|
||||||
\usepackage[T1]{fontenc}
|
\usepackage[T1]{fontenc}
|
||||||
\usepackage[utf8]{inputenc}
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage{lmodern}
|
||||||
\fi
|
\fi
|
||||||
|
|
||||||
|
((* if design.font == "Latin Modern Serif" *))
|
||||||
|
|
||||||
|
((* elif design.font == "Latin Modern Sans Serif" *))
|
||||||
|
\renewcommand{\familydefault}{\sfdefault}
|
||||||
|
((* elif design.font == "Latin Modern Mono" *))
|
||||||
|
\renewcommand{\familydefault}{\ttdefault}
|
||||||
|
((* elif design.font == "Source Sans 3" *))
|
||||||
|
\usepackage[default, type1]{sourcesanspro}
|
||||||
|
((* elif design.font == "Charter" *))
|
||||||
|
\usepackage{charter}
|
||||||
|
((* endif *))
|
||||||
|
|
||||||
% Some settings:
|
% Some settings:
|
||||||
((* if design.text_alignment == "justified-with-no-hyphenation" *))
|
((* if design.text_alignment == "justified-with-no-hyphenation" *))
|
||||||
\usepackage[none]{hyphenat}
|
\usepackage[none]{hyphenat}
|
||||||
|
|
|
@ -100,6 +100,17 @@ class EngineeringresumesThemeOptions(ThemeOptions):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
theme: Literal["engineeringresumes"]
|
theme: Literal["engineeringresumes"]
|
||||||
|
font: Literal[
|
||||||
|
"Latin Modern Serif",
|
||||||
|
"Latin Modern Sans Serif",
|
||||||
|
"Latin Modern Mono",
|
||||||
|
"Source Sans 3",
|
||||||
|
"Charter",
|
||||||
|
] = pydantic.Field(
|
||||||
|
default="Charter",
|
||||||
|
title="Font",
|
||||||
|
description="The font family of the CV. The default value is Charter.",
|
||||||
|
)
|
||||||
header_font_size: LaTeXDimension = pydantic.Field(
|
header_font_size: LaTeXDimension = pydantic.Field(
|
||||||
default="25 pt",
|
default="25 pt",
|
||||||
title="Header Font Size",
|
title="Header Font Size",
|
||||||
|
|
|
@ -40,8 +40,21 @@
|
||||||
\pdfgentounicode=1
|
\pdfgentounicode=1
|
||||||
% \usepackage[T1]{fontenc} % this breaks sb2nov
|
% \usepackage[T1]{fontenc} % this breaks sb2nov
|
||||||
\usepackage[utf8]{inputenc}
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage{lmodern}
|
||||||
\fi
|
\fi
|
||||||
|
|
||||||
|
((* if design.font == "Latin Modern Serif" *))
|
||||||
|
|
||||||
|
((* elif design.font == "Latin Modern Sans Serif" *))
|
||||||
|
\renewcommand{\familydefault}{\sfdefault}
|
||||||
|
((* elif design.font == "Latin Modern Mono" *))
|
||||||
|
\renewcommand{\familydefault}{\ttdefault}
|
||||||
|
((* elif design.font == "Source Sans 3" *))
|
||||||
|
\usepackage[default, type1]{sourcesanspro}
|
||||||
|
((* elif design.font == "Charter" *))
|
||||||
|
\usepackage{charter}
|
||||||
|
((* endif *))
|
||||||
|
|
||||||
% Some settings:
|
% Some settings:
|
||||||
((* if design.text_alignment == "justified-with-no-hyphenation" *))
|
((* if design.text_alignment == "justified-with-no-hyphenation" *))
|
||||||
\usepackage[none]{hyphenat}
|
\usepackage[none]{hyphenat}
|
||||||
|
|
|
@ -31,6 +31,19 @@ class Sb2novThemeOptions(ThemeOptions):
|
||||||
"""This class is the data model of the theme options for the `sb2nov` theme."""
|
"""This class is the data model of the theme options for the `sb2nov` theme."""
|
||||||
|
|
||||||
theme: Literal["sb2nov"]
|
theme: Literal["sb2nov"]
|
||||||
|
font: Literal[
|
||||||
|
"Latin Modern Serif",
|
||||||
|
"Latin Modern Sans Serif",
|
||||||
|
"Latin Modern Mono",
|
||||||
|
"Source Sans 3",
|
||||||
|
"Charter",
|
||||||
|
] = pydantic.Field(
|
||||||
|
default="Latin Modern Serif",
|
||||||
|
title="Font",
|
||||||
|
description=(
|
||||||
|
"The font family of the CV. The default value is Latin Modern Serif."
|
||||||
|
),
|
||||||
|
)
|
||||||
header_font_size: LaTeXDimension = pydantic.Field(
|
header_font_size: LaTeXDimension = pydantic.Field(
|
||||||
default="24 pt",
|
default="24 pt",
|
||||||
title="Header Font Size",
|
title="Header Font Size",
|
||||||
|
|
Loading…
Reference in New Issue