Migrate documentation to LaTeX

This commit is contained in:
2026-02-10 00:13:05 +01:00
parent e9bcd234e5
commit 2061fece3d
8 changed files with 446 additions and 393 deletions

23
rakelib/doc.rake Normal file
View File

@@ -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'

View File

@@ -3,6 +3,7 @@
# obtain one at https://mozilla.org/MPL/2.0/.
# frozen_string_literal: true
require 'pathname'
require 'rake/clean'
CLEAN.include 'build/boot', 'build/valid'