Character sheet PDF's now have outline bookmarks.

This commit is contained in:
Mark Wolfman
2021-07-01 22:29:42 -05:00
parent 27cbd7c8a2
commit dbea8f5dce
6 changed files with 24 additions and 13 deletions
@@ -1,7 +1,9 @@
\pdfbookmark[0]{Known Beasts}{Known Beasts}
\section*{Known Beasts}
[% if use_dnd_decorations %]
[% for shape in character.all_wild_shapes|sort(attribute='challenge_rating') %]
\pdfbookmark[1]{[[ shape.name ]]}{Known Beasts - [[ shape.name ]]}
[% if not character.can_assume_shape(shape) %]
\subsection*{Cannot assume form}
[% endif %]
@@ -42,6 +44,7 @@
[% else %]
[% for shape in character.all_wild_shapes|sort(attribute='challenge_rating') %]
\pdfbookmark[1]{[[ shape.name ]]}{Known Beasts - [[ shape.name ]]}
[% if not character.can_assume_shape(shape) %]
{\color{mygrey}
[% else %]
+3 -1
View File
@@ -1,13 +1,15 @@
\pdfbookmark[0]{Features}{Features}
\section*{Features}
[% if use_dnd_decorations %]
[% for feat in character.features %]
\pdfbookmark[1]{[[ feat.name ]]}{Features - [[ feat.name ]]}
\DndFeatHeader{[[ feat.name ]]}[Source: [[ feat.source ]]]
[[ feat.__doc__|rst_to_latex ]]
[% endfor %]
[% else %]
[% for feat in character.features %]
\pdfbookmark[1]{[[ feat.name ]]}{Features - [[ feat.name ]]}
\subsection*{[[ feat.name ]]}
\noindent
+2 -1
View File
@@ -1,6 +1,7 @@
\pdfbookmark[0]{Infusions}{Infusions}
\section*{Infusions}
[% for inf in character.infusions %]
\pdfbookmark[1]{[[ inf.name ]]}{Infusions - [[ inf.name ]]}
\subsection*{[[ inf.name ]]}
[% if inf.prerequisite %]%
+3 -1
View File
@@ -1,7 +1,9 @@
\pdfbookmark[0]{Magic Items}{Magic Items}
\section*{Magic Items}
[% if use_dnd_decorations %]
[% for mitem in character.magic_items %]
\pdfbookmark[1]{[[ mitem.name ]]}{Magic Items - [[ mitem.name ]]}
\DndItemHeader{[[ mitem.name ]]}{[% if mitem.item_type %][[ mitem.item_type ]], [[ mitem.rarity.lower() ]][% else %][[ mitem.rarity ]] item[% endif %][% if mitem.requires_attunement %] (requires attunement)[% endif %]}
[% if mitem.needs_implementation %] %
\textbf{**Not included in stats on Character Sheet} %
@@ -11,7 +13,7 @@
[% endfor %]
[% else %]
[% for mitem in character.magic_items %]
\pdfbookmark[1]{[[ mitem.name ]]}{Magic Items - [[ mitem.name ]]}
\subsection*{[[ mitem.name ]]}
\noindent
+2 -1
View File
@@ -1,7 +1,8 @@
\pdfbookmark[0]{Spells}{Spells}
\section*{Spells}
[% for spl in character.spells %]
\pdfbookmark[1]{[[ spl.name ]]}{Spells - [[ spl.name ]]}
[% if use_dnd_decorations %]
\DndSpellHeader
{[[ spl.name ]]}
+3 -1
View File
@@ -1,6 +1,8 @@
\pdfbookmark[0]{Subclasses}{Subclasses}
\section*{Subclasses}
[% if use_dnd_decorations %]
[% for sc in character.subclasses if sc not in ['', None, 'None', 'none']%]
\pdfbookmark[1]{[[ sc.name ]]}{Subclasses - [[ sc.name ]]}
\DndFeatHeader{[[ sc.name ]]} % Would like to add source here
[[ sc.__doc__ | rst_to_latex(top_heading_level=2) ]]
@@ -8,7 +10,7 @@
[% endfor %]
[% else %]
[% for sc in character.subclasses if sc not in ['', None, 'None', 'none']%]
\pdfbookmark[1]{[[ sc.name ]]}{Subclasses - [[ sc.name ]]}
\subsection*{[[ sc.name ]]}
[[ sc.__doc__ | rst_to_latex(top_heading_level=2) ]]