diff --git a/rendercv/renderer.py b/rendercv/renderer.py index 247c8b5e..cffdaff4 100644 --- a/rendercv/renderer.py +++ b/rendercv/renderer.py @@ -132,7 +132,9 @@ class LaTeXFile(TemplatedFile): sections: list[tuple[str, list[str], str]] = [] for section in self.cv.sections: section_beginning = self.template( - "SectionBeginning", section_title=section.title + "SectionBeginning", + section_title=section.title, + entry_type=section.entry_type, ) entries: list[str] = [] for i, entry in enumerate(section.entries): @@ -143,10 +145,15 @@ class LaTeXFile(TemplatedFile): section.entry_type, entry=entry, section_title=section.title, + entry_type=section.entry_type, is_first_entry=is_first_entry, ) ) - section_ending = self.template("SectionEnding", section_title=section.title) + section_ending = self.template( + "SectionEnding", + section_title=section.title, + entry_type=section.entry_type, + ) sections.append((section_beginning, entries, section_ending)) return preamble, header, sections @@ -255,7 +262,9 @@ class MarkdownFile(TemplatedFile): sections: list[tuple[str, list[str]]] = [] for section in self.cv.sections: section_beginning = self.template( - "SectionBeginning", section_title=section.title + "SectionBeginning", + section_title=section.title, + entry_type=section.entry_type, ) entries: list[str] = [] for i, entry in enumerate(section.entries): @@ -268,6 +277,7 @@ class MarkdownFile(TemplatedFile): section.entry_type, entry=entry, section_title=section.title, + entry_type=section.entry_type, is_first_entry=is_first_entry, ) ) diff --git a/rendercv/themes/classic/BulletEntry.j2.tex b/rendercv/themes/classic/BulletEntry.j2.tex index 981d14cd..d1f56971 100644 --- a/rendercv/themes/classic/BulletEntry.j2.tex +++ b/rendercv/themes/classic/BulletEntry.j2.tex @@ -1,7 +1 @@ -((* if not is_first_entry *)) -\vspace{<>} -((* endif *)) - -\begin{onecolentry} - \textbullet \hspace{3pt} <> -\end{onecolentry} +\item <> diff --git a/rendercv/themes/classic/Preamble.j2.tex b/rendercv/themes/classic/Preamble.j2.tex index 8989b2f8..bc59e329 100644 --- a/rendercv/themes/classic/Preamble.j2.tex +++ b/rendercv/themes/classic/Preamble.j2.tex @@ -122,6 +122,18 @@ \end{itemize} } % new environment for highlights +\newenvironment{highlightsforbulletentries}{ + \begin{itemize}[ + topsep=<>, + parsep=<>, + partopsep=0pt, + itemsep=0pt, + leftmargin=10pt + ] +}{ + \end{itemize} +} % new environment for highlights for bullet entries + \newenvironment{onecolentry}{ \begin{adjustwidth}{ diff --git a/rendercv/themes/classic/SectionBeginning.j2.tex b/rendercv/themes/classic/SectionBeginning.j2.tex index b72afb44..c80738d8 100644 --- a/rendercv/themes/classic/SectionBeginning.j2.tex +++ b/rendercv/themes/classic/SectionBeginning.j2.tex @@ -1 +1,6 @@ -\section{<>} \ No newline at end of file +\section{<>} + +((* if entry_type == "BulletEntry" *)) +\begin{onecolentry} + \begin{highlightsforbulletentries} +((* endif *)) diff --git a/rendercv/themes/classic/SectionEnding.j2.tex b/rendercv/themes/classic/SectionEnding.j2.tex index e69de29b..7e2aaa1e 100644 --- a/rendercv/themes/classic/SectionEnding.j2.tex +++ b/rendercv/themes/classic/SectionEnding.j2.tex @@ -0,0 +1,4 @@ +((* if entry_type == "BulletEntry" *)) + \end{highlightsforbulletentries} +\end{onecolentry} +((* endif *)) \ No newline at end of file diff --git a/rendercv/themes/engineeringresumes/BulletEntry.j2.tex b/rendercv/themes/engineeringresumes/BulletEntry.j2.tex index 981d14cd..d1f56971 100644 --- a/rendercv/themes/engineeringresumes/BulletEntry.j2.tex +++ b/rendercv/themes/engineeringresumes/BulletEntry.j2.tex @@ -1,7 +1 @@ -((* if not is_first_entry *)) -\vspace{<>} -((* endif *)) - -\begin{onecolentry} - \textbullet \hspace{3pt} <> -\end{onecolentry} +\item <> diff --git a/rendercv/themes/engineeringresumes/Preamble.j2.tex b/rendercv/themes/engineeringresumes/Preamble.j2.tex index 624a75bc..a2e6f7d9 100644 --- a/rendercv/themes/engineeringresumes/Preamble.j2.tex +++ b/rendercv/themes/engineeringresumes/Preamble.j2.tex @@ -112,6 +112,18 @@ } % new environment for highlights +\newenvironment{highlightsforbulletentries}{ + \begin{itemize}[ + topsep=<>, + parsep=<>, + partopsep=0pt, + itemsep=0pt, + leftmargin=10pt + ] +}{ + \end{itemize} +} % new environment for highlights for bullet entries + \newenvironment{onecolentry}{ \begin{adjustwidth}{ <> + 0.00001 cm diff --git a/rendercv/themes/engineeringresumes/SectionBeginning.j2.tex b/rendercv/themes/engineeringresumes/SectionBeginning.j2.tex index b72afb44..c80738d8 100644 --- a/rendercv/themes/engineeringresumes/SectionBeginning.j2.tex +++ b/rendercv/themes/engineeringresumes/SectionBeginning.j2.tex @@ -1 +1,6 @@ -\section{<>} \ No newline at end of file +\section{<>} + +((* if entry_type == "BulletEntry" *)) +\begin{onecolentry} + \begin{highlightsforbulletentries} +((* endif *)) diff --git a/rendercv/themes/engineeringresumes/SectionEnding.j2.tex b/rendercv/themes/engineeringresumes/SectionEnding.j2.tex index e69de29b..7e2aaa1e 100644 --- a/rendercv/themes/engineeringresumes/SectionEnding.j2.tex +++ b/rendercv/themes/engineeringresumes/SectionEnding.j2.tex @@ -0,0 +1,4 @@ +((* if entry_type == "BulletEntry" *)) + \end{highlightsforbulletentries} +\end{onecolentry} +((* endif *)) \ No newline at end of file diff --git a/rendercv/themes/sb2nov/BulletEntry.j2.tex b/rendercv/themes/sb2nov/BulletEntry.j2.tex index 0bb89298..d1f56971 100644 --- a/rendercv/themes/sb2nov/BulletEntry.j2.tex +++ b/rendercv/themes/sb2nov/BulletEntry.j2.tex @@ -1,7 +1 @@ -((* if not is_first_entry *)) -\vspace{<>} -((* endif *)) - -\begin{onecolentry} - $\circ$ <> -\end{onecolentry} +\item <> diff --git a/rendercv/themes/sb2nov/Preamble.j2.tex b/rendercv/themes/sb2nov/Preamble.j2.tex index b2924d91..ac0e8864 100644 --- a/rendercv/themes/sb2nov/Preamble.j2.tex +++ b/rendercv/themes/sb2nov/Preamble.j2.tex @@ -111,6 +111,18 @@ \end{itemize} } % new environment for highlights +\newenvironment{highlightsforbulletentries}{ + \begin{itemize}[ + topsep=<>, + parsep=<>, + partopsep=0pt, + itemsep=0pt, + leftmargin=10pt + ] +}{ + \end{itemize} +} % new environment for highlights for bullet entries + \newenvironment{onecolentry}{ \begin{adjustwidth}{ diff --git a/rendercv/themes/sb2nov/SectionBeginning.j2.tex b/rendercv/themes/sb2nov/SectionBeginning.j2.tex index b72afb44..c80738d8 100644 --- a/rendercv/themes/sb2nov/SectionBeginning.j2.tex +++ b/rendercv/themes/sb2nov/SectionBeginning.j2.tex @@ -1 +1,6 @@ -\section{<>} \ No newline at end of file +\section{<>} + +((* if entry_type == "BulletEntry" *)) +\begin{onecolentry} + \begin{highlightsforbulletentries} +((* endif *)) diff --git a/rendercv/themes/sb2nov/SectionEnding.j2.tex b/rendercv/themes/sb2nov/SectionEnding.j2.tex index e69de29b..7e2aaa1e 100644 --- a/rendercv/themes/sb2nov/SectionEnding.j2.tex +++ b/rendercv/themes/sb2nov/SectionEnding.j2.tex @@ -0,0 +1,4 @@ +((* if entry_type == "BulletEntry" *)) + \end{highlightsforbulletentries} +\end{onecolentry} +((* endif *)) \ No newline at end of file