From 70090ba022efa56166989367404fb9c6136f388c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 8 Jun 2024 11:12:02 +0100 Subject: Fix: make list of definitions and etimologies configurable --- TODO.md | 2 +- structure/00-header.tex | 3 +++ structure/99-end.tex | 14 ++++++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index 57b9f09..12b175c 100644 --- a/TODO.md +++ b/TODO.md @@ -18,7 +18,7 @@ ## Issues -* [ ] List of definitions and etimologies breaks build if they're empty +* [x] List of definitions and etimologies breaks build if they're empty (`99-end.tex`). * [ ] Bug no `pandoc` ou `citeproc` ignorando citações dentro de blocos LaTeX. Afetando o formato PDF. Vide projeto `test`, em `~/code/test/pandoc`. diff --git a/structure/00-header.tex b/structure/00-header.tex index 48b7150..ded10bd 100644 --- a/structure/00-header.tex +++ b/structure/00-header.tex @@ -79,3 +79,6 @@ % See https://stackoverflow.com/questions/45963505/coverpage-and-copyright-notice-before-title-in-r-bookdown \let\oldmaketitle\maketitle \AtBeginDocument{\let\maketitle\relax} + +% Custom header +\IfFileExists{snippets/header.tex}{\input{snippets/header.tex}}{} diff --git a/structure/99-end.tex b/structure/99-end.tex index f1657bd..1959646 100644 --- a/structure/99-end.tex +++ b/structure/99-end.tex @@ -16,14 +16,20 @@ Listas de tabelas, figuras etc. % Print the list of definitions % See https://latex.org/forum/viewtopic.php?t=17679 % https://ctan.org/pkg/thmtools -%\renewcommand\listtheoremname{Lista de Definições} -%\listoftheorems[ignoreall,show={definition}] +\ifx\BookupListDefinitions\undefined +\else + \renewcommand\listtheoremname{Lista de Definições} + \listoftheorems[ignoreall,show={definition}] +\fi % Print the list of etimologies % The "proposition" theorem type is allocated for etimologies in this book % See the _bookdown.yml at the top-level project folder for more information -%\renewcommand\listtheoremname{Lista de Etimologias} -%\listoftheorems[ignoreall,show={proposition}] +\ifx\BookupListEtimologies\undefined +\else + \renewcommand\listtheoremname{Lista de Etimologias} + \listoftheorems[ignoreall,show={proposition}] +\fi % Print the index \printindex -- cgit v1.2.3