mirror of https://github.com/eyhc1/rendercv.git
renderer: update BulletEntry
This commit is contained in:
parent
039c2bd74f
commit
ff8f5de20d
|
@ -132,7 +132,9 @@ class LaTeXFile(TemplatedFile):
|
||||||
sections: list[tuple[str, list[str], str]] = []
|
sections: list[tuple[str, list[str], str]] = []
|
||||||
for section in self.cv.sections:
|
for section in self.cv.sections:
|
||||||
section_beginning = self.template(
|
section_beginning = self.template(
|
||||||
"SectionBeginning", section_title=section.title
|
"SectionBeginning",
|
||||||
|
section_title=section.title,
|
||||||
|
entry_type=section.entry_type,
|
||||||
)
|
)
|
||||||
entries: list[str] = []
|
entries: list[str] = []
|
||||||
for i, entry in enumerate(section.entries):
|
for i, entry in enumerate(section.entries):
|
||||||
|
@ -143,10 +145,15 @@ class LaTeXFile(TemplatedFile):
|
||||||
section.entry_type,
|
section.entry_type,
|
||||||
entry=entry,
|
entry=entry,
|
||||||
section_title=section.title,
|
section_title=section.title,
|
||||||
|
entry_type=section.entry_type,
|
||||||
is_first_entry=is_first_entry,
|
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))
|
sections.append((section_beginning, entries, section_ending))
|
||||||
|
|
||||||
return preamble, header, sections
|
return preamble, header, sections
|
||||||
|
@ -255,7 +262,9 @@ class MarkdownFile(TemplatedFile):
|
||||||
sections: list[tuple[str, list[str]]] = []
|
sections: list[tuple[str, list[str]]] = []
|
||||||
for section in self.cv.sections:
|
for section in self.cv.sections:
|
||||||
section_beginning = self.template(
|
section_beginning = self.template(
|
||||||
"SectionBeginning", section_title=section.title
|
"SectionBeginning",
|
||||||
|
section_title=section.title,
|
||||||
|
entry_type=section.entry_type,
|
||||||
)
|
)
|
||||||
entries: list[str] = []
|
entries: list[str] = []
|
||||||
for i, entry in enumerate(section.entries):
|
for i, entry in enumerate(section.entries):
|
||||||
|
@ -268,6 +277,7 @@ class MarkdownFile(TemplatedFile):
|
||||||
section.entry_type,
|
section.entry_type,
|
||||||
entry=entry,
|
entry=entry,
|
||||||
section_title=section.title,
|
section_title=section.title,
|
||||||
|
entry_type=section.entry_type,
|
||||||
is_first_entry=is_first_entry,
|
is_first_entry=is_first_entry,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,7 +1 @@
|
||||||
((* if not is_first_entry *))
|
\item <<entry.bullet>>
|
||||||
\vspace{<<design.margins.entry_area.vertical_between>>}
|
|
||||||
((* endif *))
|
|
||||||
|
|
||||||
\begin{onecolentry}
|
|
||||||
\textbullet \hspace{3pt} <<entry.bullet>>
|
|
||||||
\end{onecolentry}
|
|
||||||
|
|
|
@ -122,6 +122,18 @@
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
} % new environment for highlights
|
} % new environment for highlights
|
||||||
|
|
||||||
|
\newenvironment{highlightsforbulletentries}{
|
||||||
|
\begin{itemize}[
|
||||||
|
topsep=<<design.margins.highlights_area.top>>,
|
||||||
|
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
|
||||||
|
partopsep=0pt,
|
||||||
|
itemsep=0pt,
|
||||||
|
leftmargin=10pt
|
||||||
|
]
|
||||||
|
}{
|
||||||
|
\end{itemize}
|
||||||
|
} % new environment for highlights for bullet entries
|
||||||
|
|
||||||
|
|
||||||
\newenvironment{onecolentry}{
|
\newenvironment{onecolentry}{
|
||||||
\begin{adjustwidth}{
|
\begin{adjustwidth}{
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
\section{<<section_title>>}
|
\section{<<section_title>>}
|
||||||
|
|
||||||
|
((* if entry_type == "BulletEntry" *))
|
||||||
|
\begin{onecolentry}
|
||||||
|
\begin{highlightsforbulletentries}
|
||||||
|
((* endif *))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
((* if entry_type == "BulletEntry" *))
|
||||||
|
\end{highlightsforbulletentries}
|
||||||
|
\end{onecolentry}
|
||||||
|
((* endif *))
|
|
@ -1,7 +1 @@
|
||||||
((* if not is_first_entry *))
|
\item <<entry.bullet>>
|
||||||
\vspace{<<design.margins.entry_area.vertical_between>>}
|
|
||||||
((* endif *))
|
|
||||||
|
|
||||||
\begin{onecolentry}
|
|
||||||
\textbullet \hspace{3pt} <<entry.bullet>>
|
|
||||||
\end{onecolentry}
|
|
||||||
|
|
|
@ -112,6 +112,18 @@
|
||||||
} % new environment for highlights
|
} % new environment for highlights
|
||||||
|
|
||||||
|
|
||||||
|
\newenvironment{highlightsforbulletentries}{
|
||||||
|
\begin{itemize}[
|
||||||
|
topsep=<<design.margins.highlights_area.top>>,
|
||||||
|
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
|
||||||
|
partopsep=0pt,
|
||||||
|
itemsep=0pt,
|
||||||
|
leftmargin=10pt
|
||||||
|
]
|
||||||
|
}{
|
||||||
|
\end{itemize}
|
||||||
|
} % new environment for highlights for bullet entries
|
||||||
|
|
||||||
\newenvironment{onecolentry}{
|
\newenvironment{onecolentry}{
|
||||||
\begin{adjustwidth}{
|
\begin{adjustwidth}{
|
||||||
<<design.margins.entry_area.left_and_right>> + 0.00001 cm
|
<<design.margins.entry_area.left_and_right>> + 0.00001 cm
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
\section{<<section_title>>}
|
\section{<<section_title>>}
|
||||||
|
|
||||||
|
((* if entry_type == "BulletEntry" *))
|
||||||
|
\begin{onecolentry}
|
||||||
|
\begin{highlightsforbulletentries}
|
||||||
|
((* endif *))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
((* if entry_type == "BulletEntry" *))
|
||||||
|
\end{highlightsforbulletentries}
|
||||||
|
\end{onecolentry}
|
||||||
|
((* endif *))
|
|
@ -1,7 +1 @@
|
||||||
((* if not is_first_entry *))
|
\item <<entry.bullet>>
|
||||||
\vspace{<<design.margins.entry_area.vertical_between>>}
|
|
||||||
((* endif *))
|
|
||||||
|
|
||||||
\begin{onecolentry}
|
|
||||||
$\circ$ <<entry.bullet>>
|
|
||||||
\end{onecolentry}
|
|
||||||
|
|
|
@ -111,6 +111,18 @@
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
} % new environment for highlights
|
} % new environment for highlights
|
||||||
|
|
||||||
|
\newenvironment{highlightsforbulletentries}{
|
||||||
|
\begin{itemize}[
|
||||||
|
topsep=<<design.margins.highlights_area.top>>,
|
||||||
|
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
|
||||||
|
partopsep=0pt,
|
||||||
|
itemsep=0pt,
|
||||||
|
leftmargin=10pt
|
||||||
|
]
|
||||||
|
}{
|
||||||
|
\end{itemize}
|
||||||
|
} % new environment for highlights for bullet entries
|
||||||
|
|
||||||
|
|
||||||
\newenvironment{onecolentry}{
|
\newenvironment{onecolentry}{
|
||||||
\begin{adjustwidth}{
|
\begin{adjustwidth}{
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
\section{<<section_title>>}
|
\section{<<section_title>>}
|
||||||
|
|
||||||
|
((* if entry_type == "BulletEntry" *))
|
||||||
|
\begin{onecolentry}
|
||||||
|
\begin{highlightsforbulletentries}
|
||||||
|
((* endif *))
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
((* if entry_type == "BulletEntry" *))
|
||||||
|
\end{highlightsforbulletentries}
|
||||||
|
\end{onecolentry}
|
||||||
|
((* endif *))
|
Loading…
Reference in New Issue