|
18 | 18 | #
|
19 | 19 | import os
|
20 | 20 | import sys
|
| 21 | +import time |
| 22 | +import re |
| 23 | +import string |
21 | 24 | sys.path.insert(0, os.path.abspath('.'))
|
22 | 25 | import f5_sphinx_theme
|
23 | 26 |
|
|
86 | 89 | copyright = u'2017, F5 Networks, Inc.'
|
87 | 90 | author = u'https://github.com/f5devcentral/f5-automation-labs/graphs/contributors'
|
88 | 91 |
|
| 92 | +classname = project |
| 93 | +cleanname = re.sub('\W+','',project) |
| 94 | +year = time.strftime("%Y") |
| 95 | +eventname = "Agility %s Hands-on Lab Guide" % (year) |
| 96 | + |
89 | 97 | # The version info for the project you're documenting, acts as replacement for
|
90 | 98 | # |version| and |release|, also used in various other places throughout the
|
91 | 99 | # built documents.
|
|
299 | 307 |
|
300 | 308 | # -- Options for LaTeX output ---------------------------------------------
|
301 | 309 |
|
302 |
| -latex_elements = { |
303 |
| - # The paper size ('letterpaper' or 'a4paper'). |
304 |
| - # |
305 |
| - # 'papersize': 'letterpaper', |
| 310 | +front_cover_image = 'front_cover' |
| 311 | +back_cover_image = 'back_cover' |
| 312 | + |
| 313 | +front_cover_image_path = os.path.join('_static', front_cover_image + '.png') |
| 314 | +back_cover_image_path = os.path.join('_static', back_cover_image + '.png') |
306 | 315 |
|
307 |
| - # The font size ('10pt', '11pt' or '12pt'). |
308 |
| - # |
309 |
| - # 'pointsize': '10pt', |
| 316 | +latex_additional_files = [front_cover_image_path, back_cover_image_path] |
310 | 317 |
|
311 |
| - # Additional stuff for the LaTeX preamble. |
312 |
| - # |
313 |
| - # 'preamble': '', |
| 318 | +template = string.Template(open('preamble.tex').read()) |
314 | 319 |
|
315 |
| - # Latex figure (float) alignment |
316 |
| - # |
317 |
| - # 'figure_align': 'htbp', |
| 320 | +latex_contents = r""" |
| 321 | +\frontcoverpage |
| 322 | +\contentspage |
| 323 | +""" |
| 324 | + |
| 325 | +backcover_latex_contents = r""" |
| 326 | +\backcoverpage |
| 327 | +""" |
| 328 | + |
| 329 | +latex_elements = { |
| 330 | + 'papersize': 'letterpaper', |
| 331 | + 'pointsize': '10pt', |
| 332 | + 'fncychap': r'\usepackage[Bjornstrup]{fncychap}', |
| 333 | + 'preamble': template.substitute(eventname=eventname, |
| 334 | + project=project, |
| 335 | + author=author, |
| 336 | + frontcoverimage=front_cover_image, |
| 337 | + backcoverimage=back_cover_image), |
| 338 | + |
| 339 | + 'tableofcontents': latex_contents, |
| 340 | + 'printindex': backcover_latex_contents |
318 | 341 | }
|
319 | 342 |
|
320 | 343 | # Grouping the document tree into LaTeX files. List of tuples
|
321 | 344 | # (source start file, target name, title,
|
322 | 345 | # author, documentclass [howto, manual, or own class]).
|
323 | 346 | latex_documents = [
|
324 |
| - (master_doc, 'F5ProgrammabilityTraining.tex', u'F5 Programmability Training', |
325 |
| - u'https://github.com/f5devcentral/f5-automation-labs/graphs/contributors', 'manual'), |
| 347 | + (master_doc, '%s.tex' % cleanname, u'%s Documentation' % classname, |
| 348 | + u'F5 Networks, Inc.', 'manual', True), |
326 | 349 | ]
|
327 | 350 |
|
328 | 351 | # The name of an image file (relative to this directory) to place at the top of
|
|
0 commit comments