Welcome to pythonimmediate’s documentation!¶
This package is a Python-TeX binding. It requires the pythonimmediate
TeX package to be installed.
The package works both ways – you can run Python code from TeX, or TeX code from Python.
There are different sections of the documentation:
pythonimmediate.simple
– interface that “just works” for typical users of thepythonimmediate
TeX package, to use Python coding from TeX, who does not know TeX inner details such as category codes.Note that this should be read in conjunction with the
pythonimmediate
TeX package documentation.Some properties of the parent TeX interpreter can be accessed from
default_engine
.The rest: contain functions to control the precise category codes of the tokens.
Read
expand_once()
andNTokenList
for some examples.See the documentation of
pythonimmediate.engine.ChildProcessEngine
for ways to create a TeX engine from inside Python, and explanation of theengine=
optional argument for most functions.The command-line arguments that the Python component accepts (can be specified through the
args=
TeX module option) are documented inpythonimmediate.pytotex
.
- pythonimmediate package
- Submodules
- pythonimmediate.communicate module
- pythonimmediate.copy_to_stderr module
- pythonimmediate.decode_8bit module
- pythonimmediate.engine module
- pythonimmediate.pytotex module
- pythonimmediate.simple module
define_char()
execute()
f1()
fully_expand()
get_arg_estr()
get_arg_str()
get_multiline_verb_arg()
get_next_char()
get_optional_arg_estr()
get_optional_arg_str()
get_verb_arg()
is_balanced()
newcommand()
newenvironment()
newenvironment_verb()
peek_next_char()
print_TeX()
put_next()
renewcommand()
run_tokenized_line_local()
split_balanced()
strip_optional_braces()
undefine_char()
var
- pythonimmediate.textopy module
- Module contents
BalancedTokenList
BlueToken
C
Catcode
Catcode.active
Catcode.alignment
Catcode.begin_group
Catcode.bgroup
Catcode.comment
Catcode.egroup
Catcode.end_group
Catcode.end_of_line
Catcode.escape
Catcode.for_token
Catcode.ignored
Catcode.invalid
Catcode.letter
Catcode.line
Catcode.math
Catcode.math_subscript
Catcode.math_superscript
Catcode.math_toggle
Catcode.other
Catcode.paragraph
Catcode.param
Catcode.parameter
Catcode.space
Catcode.subscript
Catcode.superscript
CharacterToken
ControlSequenceToken
ControlSequenceTokenMaker
FrozenRelaxToken
NToken
NTokenList
PTTBalancedTokenList
PTTBlock
PTTInt
PTTTeXLine
PTTVerbatimLine
PTTVerbatimRawLine
PyToTeXData
PythonCallTeXFunctionType
PythonCallTeXSyncFunctionType
Python_call_TeX_data
Python_call_TeX_extra
Python_call_TeX_local()
RedirectPrintTeX
TTPBalancedTokenList
TTPBlock
TTPEBlock
TTPELine
TTPEmbeddedLine
TTPLine
TTPRawLine
TeXToPyData
Token
Token.assign()
Token.assign_future()
Token.assign_futurenext()
Token.assign_value()
Token.assignable
Token.blue
Token.can_blue
Token.deserialize()
Token.deserialize_bytes()
Token.get_next()
Token.no_blue
Token.noexpand
Token.peek_next()
Token.put_next()
Token.serialize()
Token.simple_detokenize()
Token.value()
Token.value_str()
TokenList
TokenList.balanced
TokenList.balanced_parts()
TokenList.bool()
TokenList.check_balanced()
TokenList.deserialize()
TokenList.deserialize_bytes()
TokenList.doc()
TokenList.e3()
TokenList.execute()
TokenList.expand_x()
TokenList.force_token_list()
TokenList.from_string()
TokenList.is_balanced()
TokenList.iterable_from_string()
TokenList.put_next()
TokenList.serialize()
TokenList.serialize_bytes()
TokenList.simple_detokenize()
TokenList.str()
TokenList.str_unicode()
bootstrap_code_functions
build_Python_call_TeX()
can_be_mangled_to()
check_line()
continue_until_passed_back()
continue_until_passed_back_str()
debug()
define_Python_call_TeX()
define_TeX_call_Python()
define_internal_handler()
eval_with_linecache()
exec_or_eval_with_linecache()
exec_with_linecache()
expand_once()
export_function_to_module()
get_bootstrap_code()
get_random_identifier()
have_naive_replace()
mark_bootstrap()
mark_bootstrap_naive_replace()
naive_replace()
normalize_line()
parse_meaning_str()
peek_next_meaning()
postprocess_send_code()
py()
pyc()
pycq()
pyfile()
random_identifiers()
read_block()
readline()
run_block_finish()
run_block_local()
run_code_redirect_print_TeX()
run_error_finish()
run_main_loop()
run_main_loop_get_return_one()
run_none_finish()
run_tokenized_line_peek()
scan_Python_call_TeX()
scan_Python_call_TeX_module()
send_bootstrap_code()
send_finish()
send_raw()
substitute_private()
surround_delimiter()
template_substitute()
user_documentation()
wrap_naive_replace()