LaTeXDocumentHandler

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjadext.book" { graph [label="abjadext.book"]; node [color=1]; "abjadext.book.LaTeXDocumentHandler.LaTeXDocumentHandler" [URL="../api/abjadext/book/LaTeXDocumentHandler.html#abjadext.book.LaTeXDocumentHandler.LaTeXDocumentHandler", color=black, fontcolor=white, label="La\nTe\nXDocument\nHandler", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=2]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "builtins.object" -> "abjadext.book.LaTeXDocumentHandler.LaTeXDocumentHandler"; }

class abjadext.book.LaTeXDocumentHandler.LaTeXDocumentHandler(assets_directory=None, input_file_contents=None, input_file_path=None, latex_root_directory=None)

A LaTeX document handler.

>>> input_file_contents = '''Let's print something:
... 
... \\begin{comment}
... <abjad>
... print("hello, world!")
... </abjad>
... \\end{comment}
... 
... This is just a simple Python string:
... 
... \\begin{comment}
... <abjad>
... just_a_string = \'\'\'
... abjad.show(Nothing!)
... \'\'\'
... </abjad>
... \\end{comment}
... 
... And let's show some music too:
... 
... \\begin{comment}
... <abjad>
... abjad.show(Note("c'4"))
... </abjad>
... \\end{comment}
... 
... \\begin{comment}
... <lilypond>
... { c'4 d'4 e'4 f'4 }
... </lilypond>
... \\end{comment}
... 
... That's it!
... '''
>>> import abjadext.book
>>> document_handler = abjadext.book.LaTeXDocumentHandler(
...     input_file_contents=input_file_contents,
...     input_file_path='test.tex.raw',
...     assets_directory='images',
...     )

Attributes Summary

__call__ Call self as a function.
assets_directory
collect_asset_output_proxies
collect_input_blocks
collect_output_blocks
console
errored
extract_code_block_options
from_path
get_default_stylesheet
input_directory
input_file_contents
input_file_path
interpret_input_blocks
latex_assets_prefix
latex_root_directory
rebuild_source
register_error
render_asset_output_proxies
report
unregister_error
write_rebuilt_source

Special methods

__call__(clean=None, configuration=None, output_file_path=None, return_source=None, skip_rendering=None, stylesheet=None, verbose=None)

Call self as a function.


Methods

collect_asset_output_proxies(input_blocks)
collect_input_blocks(input_file_contents, stylesheet=None)
collect_output_blocks(input_file_contents, configuration=None)
get_default_stylesheet()
interpret_input_blocks(input_blocks, console, verbose=True)
rebuild_source(input_blocks, output_blocks, input_file_contents, configuration=None)
register_error()
render_asset_output_proxies(input_blocks)
report(output_file_path=None, stylesheet=None, verbose=None)
unregister_error()
write_rebuilt_source(rebuilt_source, output_file_path=None)

Class & static methods

static extract_code_block_options(source_line)
classmethod from_path(input_file_path=None, assets_directory=None, latex_root_directory=None)

Read-only properties

assets_directory
console
errored
input_directory
input_file_contents
input_file_path
latex_assets_prefix
latex_root_directory