LaTeX

The LaTeX part. Document is an abstraction for a document. A Document is instantiated from a preferences file.

IF preferences contains a single JSON file, THEN such file is the preferences file.

ELIF preferences contains more than one JSON file, THEN raise FileNotFoundError.

ELIF preferences contains no JSON file, THEN look for user_preferences input:

IF input is in {None, ‘’}, THEN use the default preferences.

ELIF input is a valid path, THEN preferences are set.

ELSE raise FileNotFoundError

class markdowntolatex.latex.document.Document(user_preferences=None)

Abstraction for document.

user_preferences is a path to a JSON preferences file.

Parameters:

user_preferences – A path to a preferences file.

Type:

str

Raise:

FileNotFoundError if the path is not valid.

Raise:

JSONDecodeError if the preferences file being deserialized is not a valid JSON document.

get_latex()

From Markdown to LaTeX.

Creates the latex code after the parsing is done.

Formally speaking, this method is a getter, since a dictionary dict {‘folder’, ‘document’} is returned.

Returns:

A dictionary dict{folder, document}.

Return type:

dict

get_markdownn(arg)
parse_markdown()

Parses the document.