Enhance latex text styling customizability

This commit is contained in:
jfbu
2016-06-17 19:32:16 +02:00
parent d4cdfc148b
commit b3d8961ca8
5 changed files with 66 additions and 22 deletions

View File

@@ -65,7 +65,8 @@ def test_code_block_caption_html(app, status, warning):
def test_code_block_caption_latex(app, status, warning):
app.builder.build_all()
latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
caption = '\\sphinxSetupCaptionForVerbatim{literal-block}{caption \\emph{test} rb}'
caption = '\\sphinxSetupCaptionForVerbatim{literal-block}' \
'{caption \\sphinxstyleemphasis{test} rb}'
label = '\\def\\sphinxLiteralBlockLabel{\\label{caption:caption-test-rb}}'
link = '\hyperref[caption:caption-test-rb]' \
'{Listing \\ref{caption:caption-test-rb}}'
@@ -252,7 +253,8 @@ def test_literalinclude_caption_html(app, status, warning):
def test_literalinclude_caption_latex(app, status, warning):
app.builder.build('index')
latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
caption = '\\sphinxSetupCaptionForVerbatim{literal-block}{caption \\textbf{test} py}'
caption = '\\sphinxSetupCaptionForVerbatim{literal-block}' \
'{caption \\sphinxstylestrong{test} py}'
label = '\\def\\sphinxLiteralBlockLabel{\\label{caption:caption-test-py}}'
link = '\hyperref[caption:caption-test-py]' \
'{Listing \\ref{caption:caption-test-py}}'