Changeset a3b0a40 in rtems-docs


Ignore:
Timestamp:
Feb 6, 2019, 6:02:18 AM (10 days ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
6f18d69
Parents:
2a68e9d
Message:

Fix building with Sphinx 1.8 and later.

  • Provide the pytnon.ist file for makeindex.
  • Add support for xelatex building so we can switch if we want too.

Closes #3669

Location:
common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • common/conf.py

    r2a68e9d ra3b0a40  
    166166
    167167# -- Options for LaTeX output --------------------------------------------------
     168latex_engine = 'pdflatex'
     169
     170latex_use_xindy = False
     171
    168172latex_paper_size = 'a4'
    169173
     
    177181    'papersize':    'a4paper',
    178182    'pointsize':    '11pt',
     183    'releasename':  '',
    179184    'preamble':     r'''
    180185\newcommand{\rtemscopyright}{%s}
     
    184189}
    185190
    186 
    187191latex_additional_files = ['../common/rtemsstyle.sty', '../common/minted.sty', '../common/logo.pdf']
    188192latex_use_modindex = False
    189 
    190193
    191194# The name of an image file (relative to this directory) to place at the top of
     
    205208#latex_domain_indices = True
    206209
    207 
    208210# Example configuration for intersphinx: refer to the Python standard library.
    209211#intersphinx_mapping = {'http://docs.python.org/': None}
  • common/waf.py

    r2a68e9d ra3b0a40  
    1515
    1616import latex
     17import conf
    1718
    1819sphinx_min_version = (1, 3)
     
    222223    ctx.env.BUILD_PDF = 'no'
    223224    if ctx.options.pdf:
    224         check_tex = not ctx.env.PDFLATEX
    225         if check_tex:
    226             ctx.load('tex')
    227             if not ctx.env.PDFLATEX or not ctx.env.MAKEINDEX:
    228                 ctx.fatal('The programs pdflatex and makeindex are required for PDF output')
    229             if 'PDFLATEXFLAGS' not in ctx.env or \
    230                '-shell-escape' not in ctx.env['PDFLATEXFLAGS']:
    231                 ctx.env.append_value('PDFLATEXFLAGS', '-shell-escape')
    232             latex.configure_tests(ctx)
     225        if conf.latex_engine == 'xelatex':
     226            if not ctx.env.LATEX_CMD:
     227                ctx.load('tex')
     228                if not ctx.env.XELATEX or not ctx.env.MAKEINDEX:
     229                    ctx.fatal('The programs xelatex and makeindex are required for PDF output')
     230                ctx.env.LATEX_CMD = 'xelatex'
     231                latex.configure_tests(ctx)
     232                # Minted needs 'shell-escape'
     233                if 'XELATEXFLAGS' not in ctx.env or \
     234                   '-shell-escape' not in ctx.env['XELATEXFLAGS']:
     235                    ctx.env.append_value('XELATEXFLAGS', '-shell-escape')
     236                ctx.env.append_value('MAKEINDEXFLAGS', ['-s', 'python.ist'])
     237        elif conf.latex_engine == 'pdflatex':
     238            if not ctx.env.LATEX_CMD:
     239                ctx.load('tex')
     240                if not ctx.env.PDFLATEX or not ctx.env.MAKEINDEX:
     241                    ctx.fatal('The programs pdflatex and makeindex are required for PDF output')
     242                if 'PDFLATEXFLAGS' not in ctx.env or \
     243                   '-shell-escape' not in ctx.env['PDFLATEXFLAGS']:
     244                    ctx.env.append_value('PDFLATEXFLAGS', '-shell-escape')
     245                ctx.env.append_value('MAKEINDEXFLAGS', ['-s', 'python.ist'])
     246                ctx.env.LATEX_CMD = 'pdflatex'
     247                latex.configure_tests(ctx)
     248        else:
     249            ctx.fatal('Unsupported latex engine: %s' % (conf.latex_engine))
    233250        ctx.env.BUILD_PDF = 'yes'
    234251
     
    287304        features     = 'tex',
    288305        cwd          = output_dir,
    289         type         = 'pdflatex',
     306        type         = ctx.env.LATEX_CMD,
    290307        source       = "%s/%s.tex" % (buildtype, ctx.path.name),
    291308        prompt       = 0
     
    385402            target       = tgt,
    386403            install_path = None
    387     )
     404        )
    388405
    389406
Note: See TracChangeset for help on using the changeset viewer.