Migrate documentation to LaTeX
This commit is contained in:
23
rakelib/doc.rake
Normal file
23
rakelib/doc.rake
Normal 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'
|
||||
Reference in New Issue
Block a user