Functions | |
| def | file_read |
| Read file contents. More... | |
| def | insert_references |
| Insert references to paradigms. More... | |
| def | tex_write |
| Write a LaTeX file. More... | |
| def | handle_font |
| Functions to process LaTeX layout. More... | |
| def | handle_reserved |
| def | handle_fi |
| def | handle_fv |
| def | handle_fn |
| def | handle_pinyin |
| def | handle_caps |
| def | handle_quotes |
| def | format_uid |
| Functions to process LaTeX fields (output) More... | |
| def | format_link |
| Display hyperlink to a lexical entry in LaTeX format. More... | |
| def | format_lexeme |
| 'lx', 'hm' and 'lc' fields are flipped if 'lc' field has data. More... | |
| def | format_audio |
| Embed sound file into PDF. More... | |
| def | format_part_of_speech |
| Display part of speech in LaTeX format. More... | |
| def | format_definitions |
| Glosses are supplanted by definitions. More... | |
| def | format_lt |
| Display 'lt' in LaTeX format. More... | |
| def | format_sc |
| Display 'sc' in LaTeX format. More... | |
| def | format_rf |
| Display 'rf' in LaTeX format. More... | |
| def | format_examples |
| Display examples in LaTeX format. More... | |
| def | format_usage_notes |
| Display usage notes in LaTeX format. More... | |
| def | format_encyclopedic_informations |
| Display encyclopedic informations in LaTeX format. More... | |
| def | format_restrictions |
| Display restrictions in LaTeX format. More... | |
| def | format_lexical_functions |
| Display lexical functions in LaTeX format. More... | |
| def | format_related_forms |
| Display related forms in LaTeX format. More... | |
| def | format_variant_forms |
| Display variant forms in LaTeX format. More... | |
| def | format_borrowed_word |
| Display borrowed word in LaTeX format. More... | |
| def | format_etymology |
| Display etymology in LaTeX format. More... | |
| def | format_paradigms |
| Display all paradigms in LaTeX format. More... | |
| def | format_table |
| Display a table in LaTeX format. More... | |
| def | format_semantic_domains |
| Display semantic domains in LaTeX format. More... | |
| def | format_bibliography |
| Display bibliography in LaTeX format. More... | |
| def | format_picture |
| Display a picture in LaTeX format. More... | |
| def | format_notes |
| Display all notes in LaTeX format. More... | |
| def | format_source |
| Display source in LaTeX format. More... | |
| def | format_status |
| Display status in LaTeX format. More... | |
| def | format_date |
| Do not display date in LaTeX format. More... | |
| def pylmflib.pylmflib.output.tex.file_read | ( | filename | ) |
| def pylmflib.pylmflib.output.tex.format_audio | ( | lexical_entry, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.format_bibliography | ( | lexical_entry, | |
| font | |||
| ) |
Display bibliography in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_borrowed_word | ( | lexical_entry, | |
| font | |||
| ) |
Display borrowed word in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_date | ( | lexical_entry, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.format_definitions | ( | sense, | |
| font, | |||
languages = None |
|||
| ) |
Glosses are supplanted by definitions.
| sense | The current Sense LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| languages | A list of languages to consider for definitions and glosses (all by default). |
| def pylmflib.pylmflib.output.tex.format_encyclopedic_informations | ( | sense, | |
| font | |||
| ) |
Display encyclopedic informations in LaTeX format.
| sense | The current Sense LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_etymology | ( | lexical_entry, | |
| font | |||
| ) |
Display etymology in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_examples | ( | sense, | |
| font, | |||
languages = None |
|||
| ) |
Display examples in LaTeX format.
| sense | The current Sense LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| languages | A list of languages to consider for examples (all by default). |
| def pylmflib.pylmflib.output.tex.format_lexeme | ( | lexical_entry, | |
| font | |||
| ) |
'lx', 'hm' and 'lc' fields are flipped if 'lc' field has data.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_lexical_functions | ( | lexical_entry, | |
| font | |||
| ) |
Display lexical functions in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_link | ( | lexical_entry, | |
| font | |||
| ) |
Display hyperlink to a lexical entry in LaTeX format.
| lexical_entry | The targeted Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_lt | ( | sense, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.format_notes | ( | lexical_entry, | |
| font | |||
| ) |
Display all notes in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_paradigms | ( | lexical_entry, | |
| font | |||
| ) |
Display all paradigms in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_part_of_speech | ( | lexical_entry, | |
| font, | |||
mapping = partOfSpeech_tex, |
|||
language = None |
|||
| ) |
Display part of speech in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| mapping | A Python dictionary giving the mapping between LMF part of speech LexicalEntry attribute value and LaTeX layout. |
| language | Language to consider to display part of speech. |
| def pylmflib.pylmflib.output.tex.format_picture | ( | lexical_entry, | |
| font | |||
| ) |
Display a picture in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_related_forms | ( | lexical_entry, | |
| font | |||
| ) |
Display related forms in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_restrictions | ( | sense, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.format_rf | ( | sense, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.format_sc | ( | sense, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.format_semantic_domains | ( | lexical_entry, | |
| font | |||
| ) |
Display semantic domains in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_source | ( | lexical_entry, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.format_status | ( | lexical_entry, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.format_table | ( | lexical_entry, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.format_uid | ( | lexical_entry, | |
| font | |||
| ) |
Functions to process LaTeX fields (output)
Transform unique identifier of a lexical entry in ASCII format.
| lexical_entry | The targeted Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.format_usage_notes | ( | sense, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.format_variant_forms | ( | lexical_entry, | |
| font | |||
| ) |
Display variant forms in LaTeX format.
| lexical_entry | The current Lexical Entry LMF instance. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| def pylmflib.pylmflib.output.tex.handle_caps | ( | text | ) |
| def pylmflib.pylmflib.output.tex.handle_fi | ( | text | ) |
| def pylmflib.pylmflib.output.tex.handle_fn | ( | text, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.handle_font | ( | text | ) |
| def pylmflib.pylmflib.output.tex.handle_fv | ( | text, | |
| font | |||
| ) |
| def pylmflib.pylmflib.output.tex.handle_pinyin | ( | text | ) |
| def pylmflib.pylmflib.output.tex.handle_quotes | ( | text | ) |
| def pylmflib.pylmflib.output.tex.handle_reserved | ( | text | ) |
| def pylmflib.pylmflib.output.tex.insert_references | ( | lexical_entry | ) |
| def pylmflib.pylmflib.output.tex.tex_write | ( | object, | |
| filename, | |||
preamble = None, |
|||
introduction = None, |
|||
lmf2tex = lmf_to_tex, |
|||
font = None, |
|||
items = lambda lexical_entry: lexical_entry.get_lexeme(), |
|||
sort_order = None, |
|||
paradigms = [], |
|||
tables = [], |
|||
title = None, |
|||
tex_language = None |
|||
| ) |
Write a LaTeX file.
Note that the lexicon must already be ordered at this point. Here, parameters 'items' and 'sort_order' are only used to define chapters.
| object | The LMF instance to convert into LaTeX output format. |
| filename | The name of the LaTeX file to write with full path, for instance 'user/output.tex'. |
| preamble | The name of the LaTeX file with full path containing the LaTeX header of the document, for instance 'user/config/japhug.tex'. Default value is None. |
| introduction | The name of the LaTeX file with full path containing the LaTeX introduction of the document, for instance 'user/config/introduction.tex'. Default value is None. |
| lmf2tex | A function giving the mapping from LMF representation information that must be written to LaTeX commands, in a defined order. Default value is 'lmf_to_tex' function defined in 'pylmflib/config/tex.py'. Please refer to it as an example. |
| font | A Python dictionary giving the vernacular, national, regional fonts to apply to a text in LaTeX format. |
| items | Lambda function giving the item to sort. Default value is 'lambda lexical_entry: lexical_entry.get_lexeme()', which means that the items to sort are lexemes. |
| sort_order | Default value is 'None', which means that the LaTeX output is alphabetically ordered. |
| paradigms | A Python list of LaTeX filenames with full path containing the paradigms in LaTeX format. Default value is an empty list. |
| tables | The name of the LaTeX file with full path containing some notes to add at the end of the LaTeX document, for instance 'user/config/conclusion.tex'. Default value is None. |
| title | A Python string containing the title of the LaTeX document. Default value is None. |
| tex_language | A Python string giving the default language to set in LaTeX. |
1.8.7