Skip to content

rendercv.themes

The rendercv.themes package contains all the built-in templates and the design data models for the themes.

ClassicThemeOptions

Bases: ThemeOptions

This class is the data model of the theme options for the classic theme.

Source code in rendercv/themes/classic/__init__.py
class ClassicThemeOptions(ThemeOptions):
    """This class is the data model of the theme options for the `classic` theme."""

    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(
        default=[],
        title="Show Time Span in These Sections",
        description=(
            "The time span will be shown in the date and location column in these"
            " sections. The input should be a list of section titles as strings"
            " (case-sensitive). The default value is [] (no section will show the time"
            " span)."
        ),
    )
    margins: MarginsForClassic = pydantic.Field(
        default=MarginsForClassic(),
        title="Margins",
        description="Page, section title, entry field, and highlights field margins.",
    )

EngineeringresumesThemeOptions

Bases: ThemeOptions

This class is the data model of the theme options for the engineeringresumes theme.

Source code in rendercv/themes/engineeringresumes/__init__.py
class EngineeringresumesThemeOptions(ThemeOptions):
    """This class is the data model of the theme options for the `engineeringresumes`
    theme.
    """

    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(
        default="25 pt",
        title="Header Font Size",
        description=(
            "The font size of the header (the name of the person). The default value is"
            " 25 pt."
        ),
    )
    color: pydantic_color.Color = pydantic.Field(
        default="rgb(0,0,0)",  # type: ignore
        validate_default=True,
        title="Primary Color",
        description=(
            "The primary color of the theme. \nThe color can be specified either with"
            " their [name](https://www.w3.org/TR/SVG11/types.html#ColorKeywords),"
            " hexadecimal value, RGB value, or HSL value. The default value is"
            " rgb(0,0,0)."
        ),
        examples=["Black", "7fffd4", "rgb(0,79,144)", "hsl(270, 60%, 70%)"],
    )
    disable_external_link_icons: bool = pydantic.Field(
        default=True,
        title="Disable External Link Icons",
        description=(
            "If this option is set to true, then the external link icons will not be"
            " shown next to the links. The default value is true."
        ),
    )
    disable_page_numbering: bool = pydantic.Field(
        default=True,
        title="Disable Page Numbering",
        description=(
            "If this option is set to true, then the page numbering will not be shown."
            " The default value is true."
        ),
    )
    disable_last_updated_date: bool = pydantic.Field(
        default=True,
        title="Disable Last Updated Date",
        description=(
            "If this option is set to true, then the last updated date will not be"
            " shown in the header. The default value is true."
        ),
    )
    text_alignment: Literal[
        "left-aligned", "justified", "justified-with-no-hyphenation"
    ] = pydantic.Field(
        default="left-aligned",
        title="Text Alignment",
        description="The alignment of the text. The default value is left-aligned.",
    )
    seperator_between_connections: str = pydantic.Field(
        default="$|$",
        title="Seperator Between Connections",
        description=(
            "The separator between the connections in the header. The default value is"
            " empty string."
        ),
    )
    use_icons_for_connections: bool = pydantic.Field(
        default=False,
        title="Use Icons for Connections",
        description=(
            "If this option is set to true, then icons will be used for the connections"
            " (like phone, email, and website). The default value is false."
        ),
    )
    margins: MarginsForEngineeringresumes = pydantic.Field(
        default=MarginsForEngineeringresumes(),
        title="Margins",
        description="Page, section title, entry field, and highlights field margins.",
    )

ModerncvThemeOptions

Bases: RenderCVBaseModelWithoutExtraKeys

This class is the data model of the theme options for the moderncv theme.

Source code in rendercv/themes/moderncv/__init__.py
class ModerncvThemeOptions(RenderCVBaseModelWithoutExtraKeys):
    """This class is the data model of the theme options for the `moderncv` theme."""

    model_config = pydantic.ConfigDict(extra="forbid")

    theme: Literal["moderncv"]
    font_size: Literal["10pt", "11pt", "12pt"] = pydantic.Field(
        default="10pt",
        title="Font Size",
        description='The font size of the CV. The default value is "10pt".',
        examples=["10pt", "11pt", "12pt"],
    )
    page_size: Literal["a4paper", "letterpaper"] = pydantic.Field(
        default="letterpaper",
        title="Page Size",
        description='The page size of the CV. The default value is "letterpaper".',
        examples=["a4paper", "letterpaper"],
    )
    color: (
        Literal["blue"]
        | Literal["black"]
        | Literal["burgundy"]
        | Literal["green"]
        | Literal["grey"]
        | Literal["orange"]
        | Literal["purple"]
        | Literal["red"]
    ) = pydantic.Field(
        default="blue",
        validate_default=True,
        title="Primary Color",
        description='The primary color of the CV. The default value is "blue".',
        examples=[
            "blue",
            "black",
            "burgundy",
            "green",
            "grey",
            "orange",
            "purple",
            "red",
        ],
    )
    date_width: LaTeXDimension = pydantic.Field(
        default="3.8 cm",
        validate_default=True,
        title="Date and Location Column Width",
        description='The width of the date column. The default value is "3.8 cm".',
    )
    content_scale: float = pydantic.Field(
        default=0.75,
        title="Content Scale",
        description=(
            "The scale of the content with respect to the page size. The default value"
            ' is "0.75".'
        ),
    )
    show_only_years: bool = pydantic.Field(
        default=False,
        title="Show Only Years",
        description=(
            'If "True", only the years will be shown in the date column. The default'
            ' value is "False".'
        ),
    )
    disable_page_numbers: bool = pydantic.Field(
        default=False,
        title="Disable Page Numbers",
        description=(
            'If "True", the page numbers will be disabled. The default value is'
            ' "False".'
        ),
    )

Sb2novThemeOptions

Bases: ThemeOptions

This class is the data model of the theme options for the sb2nov theme.

Source code in rendercv/themes/sb2nov/__init__.py
class Sb2novThemeOptions(ThemeOptions):
    """This class is the data model of the theme options for the `sb2nov` theme."""

    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(
        default="24 pt",
        title="Header Font Size",
        description=(
            "The font size of the header (the name of the person). The default value is"
            " 24 pt. Unfortunately, sb2nov does not support font sizes bigger than"
            " 24 pt."
        ),
    )