indoctrinatr-tools 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.arcconfig +9 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +54 -0
- data/.rubocop.yml +10 -0
- data/.rvmrc +5 -0
- data/.travis.yml +19 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +74 -0
- data/Rakefile +32 -0
- data/assets/images/dkd_logo.png +0 -0
- data/assets/images/logo.png +0 -0
- data/bin/indoctrinatr +146 -0
- data/cucumber.yml +1 -0
- data/features/autocompletion_support.feature +9 -0
- data/features/demo.feature +17 -0
- data/features/documentation.feature +11 -0
- data/features/pack.feature +11 -0
- data/features/parse.feature +6 -0
- data/features/pdf.feature +10 -0
- data/features/scaffold.feature +23 -0
- data/features/step_definitions/common.rb +3 -0
- data/features/step_definitions/indoctrinatr_cli.rb +11 -0
- data/features/support/env.rb +1 -0
- data/features/version.feature +5 -0
- data/features/workflow.feature +8 -0
- data/indoctrinatr-tools.gemspec +39 -0
- data/lib/indoctrinatr/templates/configuration.yaml +17 -0
- data/lib/indoctrinatr/templates/documentation/indoctrinatr-technical-documentation-content.tex.erb +36 -0
- data/lib/indoctrinatr/templates/documentation/indoctrinatr-technical-documentation.sty +195 -0
- data/lib/indoctrinatr/templates/documentation/indoctrinatr-technical-documentation.tex.erb +89 -0
- data/lib/indoctrinatr/templates/documentation/indoctrinatr_letterpaper.pdf +0 -0
- data/lib/indoctrinatr/templates/template.tex.erb +8 -0
- data/lib/indoctrinatr/tools.rb +9 -0
- data/lib/indoctrinatr/tools/configuration_extractor.rb +27 -0
- data/lib/indoctrinatr/tools/default_values.rb +54 -0
- data/lib/indoctrinatr/tools/directory_helpers.rb +18 -0
- data/lib/indoctrinatr/tools/template_documentation_content.rb +52 -0
- data/lib/indoctrinatr/tools/template_documentation_helpers.rb +59 -0
- data/lib/indoctrinatr/tools/template_documentation_source_file.rb +31 -0
- data/lib/indoctrinatr/tools/template_pack_configuration.rb +7 -0
- data/lib/indoctrinatr/tools/template_pack_default_values_compiler.rb +38 -0
- data/lib/indoctrinatr/tools/template_pack_default_values_parser.rb +51 -0
- data/lib/indoctrinatr/tools/template_pack_demo.rb +23 -0
- data/lib/indoctrinatr/tools/template_pack_documentation.rb +111 -0
- data/lib/indoctrinatr/tools/template_pack_helpers.rb +38 -0
- data/lib/indoctrinatr/tools/template_pack_packer.rb +49 -0
- data/lib/indoctrinatr/tools/template_pack_scaffold.rb +57 -0
- data/lib/indoctrinatr/tools/version.rb +5 -0
- data/lib/redcloth_latex_formatter_patch/patch.rb +35 -0
- data/spec/indoctrinatr/templates/configuration_file_spec.rb +9 -0
- data/spec/indoctrinatr/templates/tex_file_spec.rb +9 -0
- data/spec/indoctrinatr/tools/textile_support_spec.rb +18 -0
- data/spec/indoctrinatr/tools/version_spec.rb +8 -0
- data/spec/redcloth_latex_formatter_patch/patch_spec.rb +30 -0
- data/spec/spec_helper.rb +2 -0
- metadata +304 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
Feature: Running the 'pack' command
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given the default aruba exit timeout is 20 seconds
|
5
|
+
|
6
|
+
Scenario:
|
7
|
+
Given I have an Indoctrinatr project 'demo'
|
8
|
+
When I successfully run `indoctrinatr parse demo`
|
9
|
+
And I run `indoctrinatr pdf demo`
|
10
|
+
And I run `indoctrinatr pack demo`
|
11
|
+
Then a file named "demo.zip" should exist
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Feature: Running the 'pdf' command
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given the default aruba exit timeout is 20 seconds
|
5
|
+
|
6
|
+
Scenario: for a given 'demo' project
|
7
|
+
Given I have an Indoctrinatr project 'demo'
|
8
|
+
When I successfully run `indoctrinatr parse demo`
|
9
|
+
And I run `indoctrinatr pdf demo`
|
10
|
+
Then a file named "demo_with_default_values.pdf" should exist
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Feature: Running the 'new' command
|
2
|
+
|
3
|
+
Scenario: with a valid name 'demo'
|
4
|
+
Given I do not have a 'demo' project
|
5
|
+
When I successfully run `indoctrinatr new demo`
|
6
|
+
Then the output should match /A template pack scaffold was created in folder 'demo'. Happy templating…/
|
7
|
+
And a directory named "demo" should exist
|
8
|
+
And a directory named "demo/assets" should exist
|
9
|
+
And the following files should exist:
|
10
|
+
| demo/configuration.yaml |
|
11
|
+
| demo/demo.tex.erb |
|
12
|
+
|
13
|
+
Scenario: with an empty name
|
14
|
+
Given I do not have a 'demo' project
|
15
|
+
When I run `indoctrinatr new`
|
16
|
+
Then the exit status should be 1
|
17
|
+
And the output should match /Please specify a template pack name/
|
18
|
+
|
19
|
+
Scenario: with the same name as an existing directory
|
20
|
+
Given I have an Indoctrinatr project 'demo'
|
21
|
+
When I run `indoctrinatr new demo`
|
22
|
+
Then the exit status should be 1
|
23
|
+
And the output should match /A folder with name 'demo' already exists/
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Given(/^I do not have (?:a|an) '(.*)' project$/) do |project_name|
|
2
|
+
FileUtils.rm_rf project_name
|
3
|
+
end
|
4
|
+
|
5
|
+
Given(/^I have an Indoctrinatr project '(.*)'$/) do |project_name|
|
6
|
+
step "I run the Indoctrinatr command 'new #{project_name}'"
|
7
|
+
end
|
8
|
+
|
9
|
+
When(/^I run the Indoctrinatr command '(.*)'$/) do |command|
|
10
|
+
step "I successfully run `indoctrinatr #{command}`"
|
11
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'aruba/cucumber'
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'indoctrinatr/tools/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'indoctrinatr-tools'
|
8
|
+
spec.version = Indoctrinatr::Tools::VERSION
|
9
|
+
spec.authors = ['Nicolai Reuschling']
|
10
|
+
spec.email = ['nicolai.reuschling@dkd.de']
|
11
|
+
spec.summary = 'indoctrinatr-tools provides a set of command line tools for Indoctrinatr (an Open Source Software project by dkd Internet Service GmbH, Frankfurt am Main, Germany.)'
|
12
|
+
# spec.description = %q{TODO: Write a longer description. Optional.}
|
13
|
+
spec.homepage = ''
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.required_ruby_version = '~> 2.0'
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0")
|
19
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.9'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.4'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.3'
|
26
|
+
spec.add_development_dependency 'cucumber', '~> 2.0'
|
27
|
+
spec.add_development_dependency 'aruba', '~> 0.9'
|
28
|
+
spec.add_development_dependency 'rubocop', '~> 0.33'
|
29
|
+
spec.add_development_dependency 'pry', '~> 0.10'
|
30
|
+
spec.add_development_dependency 'coveralls', '~> 0.8'
|
31
|
+
|
32
|
+
spec.add_dependency 'gli', '~> 2.12'
|
33
|
+
spec.add_dependency 'rubyzip', '~> 1.1'
|
34
|
+
spec.add_dependency 'erubis', '~> 2.7'
|
35
|
+
spec.add_dependency 'to_latex', '~> 0.5'
|
36
|
+
spec.add_dependency 'RedCloth', '~> 4.2'
|
37
|
+
|
38
|
+
spec.requirements << 'xelatex'
|
39
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
template_name: Hello World Template
|
2
|
+
textual_description: "This is your first Indoctrinatr template.
|
3
|
+
|
4
|
+
Edit is as you like. Read more at https://github.com/dkd/indoctrinatr."
|
5
|
+
fields:
|
6
|
+
-
|
7
|
+
name: variable1
|
8
|
+
presentation: text
|
9
|
+
default_value: "World"
|
10
|
+
description: "The first variable"
|
11
|
+
-
|
12
|
+
name: variable2
|
13
|
+
presentation: dropdown
|
14
|
+
default_value: "not enough"
|
15
|
+
available_options: "not enough, beautiful, your oyster, a template"
|
16
|
+
description: "The second variable. The description name can be very long and should adequately describe what the variable is for etc. pp."
|
17
|
+
required: "true"
|
data/lib/indoctrinatr/templates/documentation/indoctrinatr-technical-documentation-content.tex.erb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
% latex template author: Søren Schaffstein
|
2
|
+
% let compiler know which file is the root file
|
3
|
+
% !TEX root = indoctrinatr-technical-documentation.tex
|
4
|
+
|
5
|
+
\chapter{Template Structure}
|
6
|
+
|
7
|
+
|
8
|
+
\section{Files in Template}
|
9
|
+
\dirtree{%
|
10
|
+
.1 /.
|
11
|
+
<% list_of_files.each do |item| %>
|
12
|
+
<%= item.to_latex %>
|
13
|
+
<% end %>
|
14
|
+
}
|
15
|
+
|
16
|
+
<% @files.each do |file| %>
|
17
|
+
\section{<%= file.name.to_latex -%>}
|
18
|
+
|
19
|
+
\begin{lstlisting}<%="[language=#{file.language}]" unless file.language == 'unspecified' %>
|
20
|
+
<%= file.content.gsub('\end{lstlisting}', '\end{lstlisting}'.to_latex) %><%# this escaping is important, so that lstlisting does not break. \begin lstlisting is ignored %>
|
21
|
+
\end{lstlisting}
|
22
|
+
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
\chapter{Variables}
|
26
|
+
|
27
|
+
\begin{tabu}{ l l X l X }
|
28
|
+
\textbf{Variable} & \textbf{Presentation} & \textbf{Default Value} & \textbf{Required} & \textbf{Description} \\
|
29
|
+
<% @attributes.each do |attribute| %>
|
30
|
+
\texttt{<%= attribute['name'].to_latex -%>}
|
31
|
+
& <%= attribute['presentation'].to_latex -%>
|
32
|
+
& <%= attribute['default_value'].to_latex -%>
|
33
|
+
& <%= 'true' if attribute['required'] == 'true' -%> <%# empty if false or not set. Wish by Søren for better readability-%>
|
34
|
+
& <%= attribute['description'].to_latex -%>\\
|
35
|
+
<% end %>
|
36
|
+
\end{tabu}
|
@@ -0,0 +1,195 @@
|
|
1
|
+
% Author: Søren Schaffstein
|
2
|
+
% specify the page margins
|
3
|
+
\usepackage[top=41mm, bottom=25mm, left=24mm, right=12.4mm]{geometry}
|
4
|
+
|
5
|
+
|
6
|
+
% define macros for headers and footers
|
7
|
+
\newcommand{\customLHead}{\fontsize{7}{8}\mainFont \textcolor{hot-chocolate}{\customDocumentTitle{}}}
|
8
|
+
\newcommand{\customLFoot}{\fontsize{7}{8}\mainFont \textcolor{hot-chocolate}{\href{http://indoctrinatr.dkd.de}{indoctrinatr.dkd.de} powered by dkd Internet Service GmbH | Kaiserstraße 73 | 60329 Frankfurt | Germany}}
|
9
|
+
\newcommand{\customRFoot}{\fontsize{7}{8}\mainFont \textcolor{hot-chocolate}{Page \thepage/\pageref{LastPage}}}
|
10
|
+
|
11
|
+
|
12
|
+
% allow the usage of colour in the document
|
13
|
+
\usepackage[cmyk,table]{xcolor}
|
14
|
+
|
15
|
+
% define colors for use in the document
|
16
|
+
\definecolor{lime-green}{cmyk}{0.25,0,0.83,0}
|
17
|
+
\definecolor{hot-chocolate}{cmyk}{0,0.6,1,0.8}
|
18
|
+
\definecolor{alarm-red}{cmyk}{0.15,0.95,1,0.05}
|
19
|
+
\definecolor{light-gray}{cmyk}{0,0,0,0.1}
|
20
|
+
% use colors with \textcolor{<declared-color>}{<text>}
|
21
|
+
|
22
|
+
|
23
|
+
% define document language
|
24
|
+
\usepackage{polyglossia}
|
25
|
+
\setdefaultlanguage{english}
|
26
|
+
|
27
|
+
|
28
|
+
% use dkd letterpaper in background
|
29
|
+
\usepackage{wallpaper}
|
30
|
+
% use 2nd page letterpaper for all pages
|
31
|
+
\ULCornerWallPaper{1}{indoctrinatr_letterpaper.pdf}
|
32
|
+
|
33
|
+
% define fonts to use in this document
|
34
|
+
% fontspec allows the use of system fonts but requires the use of XeTeX
|
35
|
+
\usepackage{fontspec}
|
36
|
+
\setmainfont{Arial}
|
37
|
+
|
38
|
+
|
39
|
+
% define appearance of headlines
|
40
|
+
\usepackage{titlesec}
|
41
|
+
% Specify different font for section headings
|
42
|
+
\newfontfamily\mainFont[]{Arial}
|
43
|
+
\newfontfamily\headlineFont[]{Arial Bold}
|
44
|
+
|
45
|
+
% Setting of font and size
|
46
|
+
% {\fontsize{<font size>}{<line height>} \selectfont <Text>}
|
47
|
+
% {\fontsize{40}{48} \selectfont Lorem ipsum}
|
48
|
+
|
49
|
+
% \chapter can only be defined in document type report and only by using
|
50
|
+
% the advanced command \titleformat (\titleformat* does not work)
|
51
|
+
% \titleformat{\chapter}[hang]{\large\bfseries}{\thechapter\quad}{0pt}{}
|
52
|
+
% \titleformat{\section}[hang]{\large\bfseries}{\thesection\quad}{0pt}{}
|
53
|
+
% \titleformat{\subsection}[hang]{\large\bfseries}{\thesubsection\quad}{0pt}{}
|
54
|
+
% \titleformat{\subsubsection}[hang]{\large\bfseries}{\thesubsubsection\quad}{0pt}{}
|
55
|
+
% \titleformat{\paragraph}[hang]{\large\bfseries}{\theparagraph\quad}{0pt}{}
|
56
|
+
\titleformat{\chapter}[hang]{\fontsize{18}{19}\headlineFont}{\thechapter\quad}{0pt}{}
|
57
|
+
\titleformat*{\section}{\fontsize{13}{15}\headlineFont}
|
58
|
+
\titleformat*{\subsection}{\fontsize{11}{13}\headlineFont}
|
59
|
+
\titleformat*{\subsubsection}{\fontsize{10}{13}\headlineFont}
|
60
|
+
|
61
|
+
% define space before and after headlines
|
62
|
+
% \titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}[<right-sep>]
|
63
|
+
% \titlespacing{\chapter}{0pt}{-3em}{6pt}
|
64
|
+
% \titlespacing{\section}{0pt}{6pt}{6pt}
|
65
|
+
% \titlespacing{\subsection}{0pt}{6pt}{6pt}
|
66
|
+
% \titlespacing{\subsubsection}{0pt}{6pt}{6pt}
|
67
|
+
% \titlespacing{\paragraph}{0pt}{6pt}{6pt}
|
68
|
+
\titlespacing{\chapter}{0mm}{8.0mm}{8.0mm}
|
69
|
+
\titlespacing{\section}{0mm}{6.2mm}{2.0mm}
|
70
|
+
\titlespacing{\subsection}{0mm}{6.2mm}{2.0mm}
|
71
|
+
\titlespacing{\subsubsection}{0mm}{4.0mm}{0mm}
|
72
|
+
|
73
|
+
|
74
|
+
% define appearance of bullet lists
|
75
|
+
\renewcommand{\labelitemi}{$\bullet$}
|
76
|
+
\renewcommand{\labelitemii}{$\bullet$}
|
77
|
+
\renewcommand{\labelitemiii}{$\bullet$}
|
78
|
+
\renewcommand{\labelitemiv}{$\bullet$}
|
79
|
+
|
80
|
+
|
81
|
+
% use package 'last page' to be able to access the "number of pages in document" with \pageref{LastPage}
|
82
|
+
\usepackage{lastpage}
|
83
|
+
|
84
|
+
% define headers and footers
|
85
|
+
% use fancyhdr package for exact header and footer definition
|
86
|
+
\usepackage{fancyhdr}
|
87
|
+
% set \pagestyle{fancy} for "fancyhdr" package
|
88
|
+
\pagestyle{fancy}
|
89
|
+
|
90
|
+
% define position and height of header & footer
|
91
|
+
% define distance from (page edge + 1in)
|
92
|
+
\setlength{\topmargin}{-1.4mm}
|
93
|
+
% define height of the header
|
94
|
+
\setlength{\headheight}{3mm}
|
95
|
+
% define distance after header to text
|
96
|
+
\setlength{\headsep}{14.8mm}
|
97
|
+
% define distance from text end to footer baseline
|
98
|
+
\setlength{\footskip}{7mm}
|
99
|
+
|
100
|
+
% clear default header settings
|
101
|
+
\fancyhf{}
|
102
|
+
% possible header and footer commands
|
103
|
+
% \lhead[<ch-even>]{<ch-odd>}
|
104
|
+
% \chead[<ch-even>]{<ch-odd>}
|
105
|
+
% \rhead[<rh-even>]{<rh-odd>}
|
106
|
+
% \lfoot[<lf-even>]{<lf-odd>}
|
107
|
+
% \cfoot[<cf-even>]{<cf-odd>}
|
108
|
+
% \rfoot[<rf-even>]{<rf-odd>}
|
109
|
+
\lhead{\customLHead{}}
|
110
|
+
\lfoot{\customLFoot{}}
|
111
|
+
\rfoot{\customRFoot{}}
|
112
|
+
% remove lines in headers and footers
|
113
|
+
\renewcommand{\headrulewidth}{0pt}
|
114
|
+
\renewcommand{\footrulewidth}{0pt}
|
115
|
+
|
116
|
+
%redefine "plain" pagestyle to look like "fancy" so all pages look similar
|
117
|
+
\fancypagestyle{plain}{%
|
118
|
+
\fancyhf{}
|
119
|
+
\lhead{\customLHead{}}
|
120
|
+
\lfoot{\customLFoot{}}
|
121
|
+
\rfoot{\customRFoot{}}
|
122
|
+
|
123
|
+
% remove lines in headers and footers
|
124
|
+
\renewcommand{\headrulewidth}{0pt}
|
125
|
+
\renewcommand{\footrulewidth}{0pt}
|
126
|
+
}
|
127
|
+
|
128
|
+
|
129
|
+
% allow formatting of program code
|
130
|
+
\usepackage{listings}
|
131
|
+
% configure the style of listings
|
132
|
+
\lstset{
|
133
|
+
backgroundcolor=\color{light-gray},
|
134
|
+
basicstyle=\small,
|
135
|
+
numbers=left,
|
136
|
+
stepnumber=5,
|
137
|
+
breaklines=true,
|
138
|
+
defaultdialect=[LaTeX]TeX
|
139
|
+
}
|
140
|
+
% preload the language styles used in this documentation
|
141
|
+
\lstloadlanguages{TeX, Ruby}
|
142
|
+
|
143
|
+
|
144
|
+
% remove indentation of first line in paragraphs
|
145
|
+
\setlength{\parindent}{0mm}
|
146
|
+
|
147
|
+
% define empty space between paragraphs
|
148
|
+
\setlength{\parskip}{2mm}
|
149
|
+
|
150
|
+
% allow underlining and strikethrough of text
|
151
|
+
\usepackage[normalem]{ulem}
|
152
|
+
|
153
|
+
|
154
|
+
% use "csquotes" package to automatically create correct quotes
|
155
|
+
\usepackage{csquotes}
|
156
|
+
% define symbol used to create quotes
|
157
|
+
\MakeOuterQuote{"}
|
158
|
+
|
159
|
+
|
160
|
+
% package for better table creation
|
161
|
+
\usepackage{tabu}
|
162
|
+
% use "longtable" package to allow multi page tables
|
163
|
+
\usepackage{longtable}
|
164
|
+
|
165
|
+
|
166
|
+
% define horizontal lines for use in tables
|
167
|
+
\newcommand{\tabletoprule}{\tabucline[1pt]{-}}
|
168
|
+
\newcommand{\tablebottomrule}{\tabucline[1pt]{-}}
|
169
|
+
\newcommand{\tablemiddlerule}{\tabucline[0.5pt]{-}}
|
170
|
+
\newcommand{\tablesumrule}{\tabucline[0.5pt]{-}\tabucline[0.5pt]{-}}
|
171
|
+
|
172
|
+
% increase spacing between table rows
|
173
|
+
\tabulinesep=2mm
|
174
|
+
|
175
|
+
% have alternating row colours in tables
|
176
|
+
\rowcolors{1}{light-gray}{white}
|
177
|
+
|
178
|
+
% allow row spanning in tables
|
179
|
+
\usepackage{multirow}
|
180
|
+
|
181
|
+
|
182
|
+
% package for external pdf document inclusion
|
183
|
+
\usepackage{pdfpages}
|
184
|
+
|
185
|
+
|
186
|
+
% use "isodate" package for automatic formatting of dates
|
187
|
+
\usepackage[iso,english]{isodate}
|
188
|
+
|
189
|
+
|
190
|
+
% use "dirtree" package to show the directory tree of the Indoctrinatr-Template
|
191
|
+
\usepackage{dirtree}
|
192
|
+
|
193
|
+
% set space between dirtree lines
|
194
|
+
\setlength{\DTbaselineskip}{5mm}
|
195
|
+
|
@@ -0,0 +1,89 @@
|
|
1
|
+
% dkd technical documentation template
|
2
|
+
% Author (LaTeX): Søren Schaffstein
|
3
|
+
% Requires XeLaTeX to render!
|
4
|
+
% !TEX program = XeLaTeX
|
5
|
+
|
6
|
+
% create an A4 portrait format document with 10pt font size
|
7
|
+
\documentclass[10pt,a4paper]{report}
|
8
|
+
|
9
|
+
|
10
|
+
% use dkd-letter style to apply design styles
|
11
|
+
\usepackage{indoctrinatr-technical-documentation}
|
12
|
+
|
13
|
+
|
14
|
+
%define labels to use in this document
|
15
|
+
\newcommand{\dkd}{\emph{dkd}}
|
16
|
+
\newcommand{\customDocumentTitle}{Documentation for "<%= @template_name -%>"}
|
17
|
+
\newcommand{\customKeywords}{Indoctrinatr, Template}
|
18
|
+
|
19
|
+
|
20
|
+
% allow usage an inclusion of hyperlinks in the document
|
21
|
+
% IMPORTANT: package must be included last in the preamble
|
22
|
+
\usepackage{hyperref}
|
23
|
+
% define PDF metadata and link colors in document
|
24
|
+
\hypersetup{
|
25
|
+
pdftitle={\customDocumentTitle},
|
26
|
+
pdfauthor={indoctrinatr-tools},
|
27
|
+
pdfkeywords={\customKeywords},
|
28
|
+
pdfproducer={LaTeX with hyperref},
|
29
|
+
pdfcreator={LaTeX},
|
30
|
+
linkcolor=lime-green,
|
31
|
+
citecolor=black,
|
32
|
+
filecolor=black,
|
33
|
+
urlcolor=lime-green,
|
34
|
+
colorlinks=true
|
35
|
+
}
|
36
|
+
|
37
|
+
|
38
|
+
\begin{document}
|
39
|
+
% define title page of the report
|
40
|
+
\begin{titlepage}
|
41
|
+
% set all text aligned left
|
42
|
+
\begin{flushleft}
|
43
|
+
% start with vertical space (use \vspace* at beginning of page)
|
44
|
+
\vspace*{52mm}
|
45
|
+
% set document title
|
46
|
+
{\fontsize{18}{19}\headlineFont \customDocumentTitle{}}
|
47
|
+
% add vertical space after document title
|
48
|
+
\vspace{18.5mm}
|
49
|
+
% add document details in a tabbed format
|
50
|
+
\begin{tabbing}
|
51
|
+
% define tabstop distances
|
52
|
+
\hspace*{26.25mm}\=\hspace{26.25mm}\=\kill
|
53
|
+
% add document details separated by tabs
|
54
|
+
Document title: \>\customDocumentTitle{}\\
|
55
|
+
Date: \>\today\\ % use datetime2
|
56
|
+
\end{tabbing}
|
57
|
+
\end{flushleft}
|
58
|
+
\end{titlepage}
|
59
|
+
|
60
|
+
|
61
|
+
% add table of contents
|
62
|
+
\tableofcontents
|
63
|
+
|
64
|
+
% include a LaTeX file with the actual documentation content
|
65
|
+
\input{indoctrinatr-technical-documentation-content.tex}
|
66
|
+
|
67
|
+
% add prrendered templates in the appendix
|
68
|
+
\appendix
|
69
|
+
\chapter{Template filled with sample data}
|
70
|
+
% remove default wallpaper
|
71
|
+
\ClearWallPaper
|
72
|
+
% include the prerendered template
|
73
|
+
% pages=- selects all pages
|
74
|
+
\includepdf[pages=-]{<%= @default_values_pdf_path -%>} % template_with_default_values.pdf "#{@template_name}_with_default_values.pdf"
|
75
|
+
% restore wallpaper
|
76
|
+
\ULCornerWallPaper{1}{indoctrinatr_letterpaper.pdf}
|
77
|
+
|
78
|
+
% this feature is postponed, until LaTeX complications with image tags are resolved:
|
79
|
+
%
|
80
|
+
%\chapter{Template filled with variable names}
|
81
|
+
% remove default wallpaper
|
82
|
+
%\ClearWallPaper
|
83
|
+
% include the prerendered template
|
84
|
+
% pages=- selects all pages
|
85
|
+
%\includepdf[pages=-]{template_with_variable_names.pdf}
|
86
|
+
% restore wallpaper
|
87
|
+
%\ULCornerWallPaper{1}{indoctrinatr_letterpaper.pdf}
|
88
|
+
|
89
|
+
\end{document}
|