From 7a2c426add338b6fd3c62271903caa74118c92a2 Mon Sep 17 00:00:00 2001 From: Charlotte Koch Date: Tue, 16 Jul 2024 11:06:24 -0700 Subject: The 'lib' dir for the project is different from that for WilloraPDF itself --- .../lib/WilloraPDF_Manuscript_Reference.odt | Bin 0 -> 30819 bytes project-files/lib/willora_pdf_converter.rb | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 project-files/lib/WilloraPDF_Manuscript_Reference.odt create mode 100644 project-files/lib/willora_pdf_converter.rb (limited to 'project-files') diff --git a/project-files/lib/WilloraPDF_Manuscript_Reference.odt b/project-files/lib/WilloraPDF_Manuscript_Reference.odt new file mode 100644 index 0000000..79913fa Binary files /dev/null and b/project-files/lib/WilloraPDF_Manuscript_Reference.odt differ diff --git a/project-files/lib/willora_pdf_converter.rb b/project-files/lib/willora_pdf_converter.rb new file mode 100644 index 0000000..b2be0ea --- /dev/null +++ b/project-files/lib/willora_pdf_converter.rb @@ -0,0 +1,19 @@ +# +# WilloraPDF +# Charlotte Koch +# + +# With guidance from: +# - https://docs.asciidoctor.org/pdf-converter/latest/extend/create-converter/ +# - https://docs.asciidoctor.org/pdf-converter/latest/extend/use-cases/#custom-thematic-break +class WilloraPDFConverter < Asciidoctor::Converter.for('pdf') + register_for 'pdf' + + # My custom thematic break, which is just a blank space the size of the main + # font. (The default thematic break draws a horizontal rule.) + def convert_thematic_break(node) + theme_margin(:thematic_break, :top) + move_down(theme.base_font_size) + theme_margin(:thematic_break, ((block_next = next_enclosed_block node) ? :bottom : :top), block_next || true) + end +end -- cgit v1.2.3