mathmaker.lib.machine package

Submodules

mathmaker.lib.machine.LaTeX module

class mathmaker.lib.machine.LaTeX.LaTeX(language, create_pic_files=True, **options)[source]

Bases: mathmaker.lib.machine.Structure.Structure

addvspace(height='30.0pt', **options)[source]

Add a vertical space.

create_table(size, content, **options)[source]
insert_dashed_hline(**options)[source]
insert_nonbreaking_space(**options)[source]
insert_picture(drawable_arg, **options)[source]
insert_vspace(**options)[source]
reset_exercises_counter()[source]
set_font_size_offset(arg)[source]
set_redirect_output_to_str(arg)[source]
translate_font_size(arg)[source]
type_string(objct, **options)[source]
write(given_string, **options)[source]
write_document_begins(variant='default')[source]
write_document_ends()[source]
write_document_header(variant='default')[source]
write_exercise_number()[source]
write_frame(content, uncovered=False, only=False, duration=None, numbering='')[source]

Write a slideshow’s frame to the output

Parameters:
  • content (str) – the frame’s content
  • uncovered (bool) – whether to split the content in several slides that will show one after the other. Mostly useful for title. The content’s parts must be delimited by SLIDE_CONTENT_SEP (from lib.constants).
  • only (bool) – whether to split the content in several slides that will show one after the other. Mostly useful for answers. The content’s parts must be delimited by SLIDE_CONTENT_SEP (from lib.constants). Difference with uncovered is the text will be replaced, not only made invisible.
  • duration (number (int or float)) – the duration of the frame. If it’s None, then no duration will be set.
Return type:

str

write_jump_to_next_page()[source]
write_layout(size, col_widths, content, **options)[source]
write_math_style1(given_string)[source]
write_math_style2(given_string, **kwargs)[source]
write_new_line(check='', check2='', check3='', check4='')[source]
write_new_line_twice(**options)[source]
write_out(latex_document: str, pdf_output=False)[source]

Writes the given document to the output.

If pdf_output is set to True then the document will be compiled into a pdf and the pdf content will be written to output.

Parameters:
  • latex_document – contains the entire LaTeX document
  • pdf_output – if True, output will be written in pdf format
write_set_font_size_to(arg)[source]

mathmaker.lib.machine.Structure module

class mathmaker.lib.machine.Structure.Structure(language)[source]

Bases: object

Abstract mother class of machine objects.

clone(language)[source]
create_table(size, content, **options)[source]
insert_dashed_hline(**options)[source]
insert_nonbreaking_space(**options)[source]
insert_picture(drawable_arg, **options)[source]
insert_vspace(**options)[source]
reset_exercises_counter()[source]
set_font_size_offset(arg)[source]
set_redirect_output_to_str(arg)[source]
translate_font_size(arg)[source]
type_string(objct, **options)[source]
write(given_string, **options)[source]
write_document_begins()[source]
write_document_ends()[source]
write_document_header()[source]
write_exercise_number()[source]
write_frame(content, uncovered=False, only=False, duration=None, numbering='')[source]

Write frame to the output

write_jump_to_next_page()[source]
write_layout(size, col_widths, content, **options)[source]
write_math_style1(given_string)[source]
write_math_style2(given_string)[source]
write_new_line(**options)[source]
write_new_line_twice(**options)[source]
write_out(given_string, **options)[source]
write_set_font_size_to(arg)[source]

Module contents