From 2061fece3dc46f745cc983935ae930ce84092dfa Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 10 Feb 2026 00:13:05 +0100 Subject: Migrate documentation to LaTeX --- rakelib/doc.rake | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 rakelib/doc.rake (limited to 'rakelib/doc.rake') diff --git a/rakelib/doc.rake b/rakelib/doc.rake new file mode 100644 index 0000000..d719c80 --- /dev/null +++ b/rakelib/doc.rake @@ -0,0 +1,23 @@ +# This Source Code Form is subject to the terms of the Mozilla Public License, +# v. 2.0. If a copy of the MPL was not distributed with this file, You can +# obtain one at https://mozilla.org/MPL/2.0/. +# frozen_string_literal: true + +require 'pathname' +require 'rake/clean' + +CLEAN.include 'build/doc' + +directory 'build/doc' + +rule /build\/doc\/\w+.pdf/ => lambda { |t| + [ + Pathname.new(t).relative_path_from('build').sub_ext('.tex').to_path, + 'build/doc' + ] +} do |t| + sh 'pdflatex', '--output-directory', 'build/doc', t.prerequisites.first +end + +desc 'Generate documentation' +task doc: 'build/doc/language.pdf' -- cgit v1.2.3