Mentor light markup language
version available in : it ru zh es ja de nl pt fr
date of creation : 20220620- date of update : 20220620- generation date : 20240612_171241
This document is the specification of the Mentor system's lightweight markup language - known as LBL Mentor.
The design of this language is to François_Xavier_Pincemin designer and developer of the Mentor system.
2.Presentation of the Mentor Lightweight Markup Language
2.1.Presentation of the form of hypertext
The text block is the structure under which a text is stored.
- It is composed of four types of elements delimited by pairs of delimiters < >, ( ), { } and [ ]
So we have a general form:
<etiquette_de_bloc_en>(title) [une_reference_en]
{
...
... [une_reference_en] ...
...
<etiquette_de_sous_bloc_en>(sub block label)
{
...
... [une_reference_en] ...
...
... <etiquette_dans_texte_en> ... ... ... <une_reference_en>(it is the label of the example of a reference in fact)
...
... [une_reference_en] ...
...
etc...
}
}
which can therefore be nested: A text block can contain other text blocks.
A particular block is the block of the whole file whose label line contains:
- for example for a file named filename.ext on a :
<nomfichier_extension_en>(file title)[nomfichier_extension_en_som]
the macro to generate this line is fnt_en for a text file.
There are other macros: fnc for a C source, fns for a unix shell, etc...
example : <nomfichier_extension_en>(: file title) which gives in the html:
2.1.1.2.. nomfichier extension : file title
Otherwise it is the comment alone that is edited in the HTML:
example : <nomfichier_extension_en>(file title) which gives in the html:
2.1.1.3.File title
Mentor develops the concept of infix which is generally a 3 letters code which if present in a label will be interpreted during html generation as a text to replace if the infix is present in the infix file named infix.
lst and present under the working directory of the program utags.
The infix is the generalization of the concepts of prefix and suffix.
For example : <nom_spe_en>(special name) which gives :
The replacement is done in such a way that the replaced text is placed at the beginning of the title for the French version and at the end for the English version.
The character following the opening parenthesis of a text block, if it exists, specifies the type of block.
This type will be used by different modules that complete the hypertext management module.
2.1.2.Tables of block specifiers
character name meaning of text block (accolades) comment (brackets)
: colon main block : the next block specifies the META tags concatenation of the label and the comment in the HTML title
= equal sign preservation of the form of the source text, if dubbed == source code lbl ! exclamation mark the text displayed in the HTML is the source of the lbl in fixed font - tiret chips ` backcote numbered bullets | pipe HTML comment, if doubled absent from the HTML page % percent text generated in bicolumn table for orthoptic exercise # hash translation specification by the Deepl API ~ tilde assisted reading in a foreign language (tooltip translated word) semicolon CSV block . point comments out the block specification that will not be displayed in the HTML nbr
character
10.000000
Block types used by the HTML page generator module.
- The blocks generating bullets will be defined by the dash character : {- ... }.
The chip level is automatically defined by the block level.
The numbered chips are defined by blocks whose code is backcote {` ... }.
examples:
{- niv1 lib1 - niv1 lib2 {- level 2 lib1 - niv2 lib2 {- niv3 lib1 - niv3 lib2 } - niv2 lib3 } - niv1 lib3 } et {` niv1 lib1 - niv1 lib2 {` level 2 lib1 - niv2 lib2 - niv2 lib3 - niv2 lib4 } - niv1 lib3 - niv1 lib4 }This gives in the HTML :
- A block with a code equal to "=" will generate a text with preservation of the block shape (HTML tag PRE). The font remains the default font which is proportional.
- A block with a code equal to "==" will also generate a text with preservation of the block shape (HTML tag PRE) and also with no interpretation of the other LBL tags,
the text of the block will be copied without any lexical analysis. This is the case of the present block. In order to be able to present in an HTML page the very structure of the language.
- A block of type {! } will generate a text with preservation of the form of the text of the block. ( PRE beacon ) with the additional use of a fixed font (mail)
this to preserve the alignment of the text in the case of screen copy for example. Case of the higher levels and the lower planets table.
- Un bloc de type underscore {| |} will be interpreted as an HTML comment. See the HTML source at this point in the text.
- Un bloc de type double underscore {|| ||} will be removed from the HTML generation
- A CSV block will be defined by {; ... } This block contains a data table where the column separator is the semicolon.
An HTML table will be generated and the header defined by the "CSV_COL specification:" at the beginning of the first line containing the column names
will be displayed in the HTML in a particular color (blue steel by default).
example :
<planète_tab_en>(planet tab) {; CSV_REG:0 ;1 ; 2; 3;4 ; CSV_COL:Planets;revolution ;Sun_Distance Mkm;Diameter km;Rotation ; CSV_TYP:sN ;s ; n0; n0;s ; Sun ; ; 0; 1392684;26 hours ; Mercury ;88 j ; 58; 4878;59 days ; Venus ;225 j ; 108; 12104;243 days ; Moon ;28 j ; 149; 3474; ; Earth ;365.25 j ; 149; 12756;24 hours ; Mars ;687 j ; 228; 6794;24 h 1/2 ; Jupiter ;12 years old; 778; 142800;10 hours ; Saturn ;29 years old; 1427; 120000;10 h 1/4 ; Uranus ;84 ans ; 2870; 52400;15 h 1/2 ; Neptune ;164.86 ans ; 4497; 48000;16 hours ; Pluton ;247.74 ans ; 5913; 2400;6 days 1/3; }This gives in the HTML page :
Planets revolution Sun_Distance Mkm Diameter km Rotation
Sun 0 1392684 26 hours
Mercury 88 j 58 4878 59 days Venus 225 j 108 12104 243 days Moon 28 j 149 3474 Earth 365.25 j 149 12756 24 hours Mars 687 j 228 6794 24 h 1/2 Jupiter 12 years old 778 142800 10 hours Saturn 29 years old 1427 120000 10 h 1/4 Uranus 84 ans 2870 52400 15 h 1/2 Neptune 164.86 ans 4497 48000 16 hours Pluton 247.74 ans 5913 2400 6 days 1/3
- The CSV type block seen previously {; ... } is processed by a module ensuring the formatting of the table. When editing the table, the command
assigned to this module to reshape the table, so we only have to insert the data.
- the processing of structured data is possible in these CSV table blocks by means of a table calculation module, which is a spreadsheet program.
In this spreadsheet, the commands are specified by specification lines at the beginning of the table, which starts with a string indicating the nature of the specification.: "CSV_SPE: ; ; ;"
or SPE is the specification.
This calculation module will be able to generate, according to the calculation specifications of the table, edition blocks {@ } with the CSV_EDT specification
or newspaper blocks (detail card) { } (journal type column).
3.1.Orthoptic reading in convergence or divergence
- A block of type % will generate an HTML page with a bicolumn table with the text displayed in each column to allow its joint reading with an orthoptic exercise of convergence or divergence.
This page presents the text in duplicate so that at the same time of the reading, one can make an exercise of convergence or occular divergence similar to those which one makes at an orthoptist.
With the advantage that we can dimension the window and thus the convergence effort, without needing a series of progressive convergence prism.
If the width of the page is reduced, it is easy to merge the two images, the wider it is, the more effort is required from the eye muscles.
It is possible to merge the two images in two ways: in convergence and divergence. Convergence contracts the muscles and divergence stretches them (muscles in extension).
By combining the two ways we obtain a complete orthoptic session : muscle strengthening work (musculation) and their relaxation (stretching).
The modulation of the width of the window corresponds to the succession of the sessions where we use more and more convergent or divergent prism, it is thus necessary to go there gradually.
I noticed that the modulation of the width being done in a continuous way, it allows greater performances of the occular system particularly in the divergence (relaxation des muscles).
See in the generated HTML :
With the advantage that we can dimension the window and thus the convergence effort, without needing a series of progressive convergence prism.
If the width of the page is reduced, it is easy to merge the two images, the wider it is, the more effort is required from the eye muscles.
It is possible to merge the two images in two ways: in convergence and divergence. Convergence contracts the muscles and divergence stretches them (muscles in extension).
By combining the two ways we obtain a complete orthoptic session : muscle strengthening work (musculation) and their relaxation (stretching).
The modulation of the width of the window corresponds to the succession of the sessions where we use more and more convergent or divergent prism, it is thus necessary to go gradually.
I noticed that the modulation of the width is done in a continuous way, it allows greater performances of the occular system particularly in the divergence (relaxation des muscles).
Start with the smallest width of the window and gradually widen.
With the advantage that we can dimension the window and thus the convergence effort, without needing a series of progressive convergence prism.
If the width of the page is reduced, it is easy to merge the two images, the wider it is, the more effort is required from the eye muscles.
It is possible to merge the two images in two ways: in convergence and divergence. Convergence contracts the muscles and divergence stretches them (muscles in extension).
By combining the two ways we obtain a complete orthoptic session : muscle strengthening work (musculation) and their relaxation (stretching).
The modulation of the width of the window corresponds to the succession of the sessions where we use more and more convergent or divergent prism, it is thus necessary to go gradually.
I noticed that the modulation of the width is done in a continuous way, it allows greater performances of the occular system particularly in the divergence (relaxation des muscles).
Start with the smallest width of the window and gradually widen.
This page presents the text in duplicate so that at the same time of the reading, one can make an exercise of convergence or occular divergence similar to those which one makes at an orthoptist.
This page presents the text in duplicate so that at the same time of the reading, one can make an exercise of convergence or occular divergence similar to those which one makes at an orthoptist.
3.2.Text translation with deepl api
- A hash-type block "#" {.#en:fr: } causes the translation in the source of the text itself.
3.2.1.Assisted reading in a foreign language
- A tilde type block "~" is used for foreign language reading assistance.
- The translation specification follows the tilde character example : {~es:fr: hello the world }
<lecture_aidée_en_langue_étrangère_en>(assisted reading in a foreign language)
This gives in the html page, words underlined in dotted line which have a tooltip containing the translated word.
hello the world
inverse dictionary : {~fr:es: hello world }
hello world
A Spanish-French dictionary of approximately 26,000 words is provided as an example. Other dictionaries can be instantiated by the user mentor.
They can be shared by the user by sending them to the editor for integration in the utags package.
If there is no dictionary, you can create a dictionary of a text with a mentor command and then translate the list of words in the dictionary
by a translator such as deepl
3.2.2.Example the lyrics of the song la cucaracha
la cucaracha, la cucaracha que ya no puede caminar porque no tiene porque le falta la marijuana que fumar
en la misa y en la feria todo el mundo ya lo sabe los que llegan al gobierno porque se puede comprar
del partido comunista ya no queda casi nada ahora todos van buscando como hacerse millonadas
fue la junta de naciones pa' poner sus opiniones todos no estaban de acuerdo donde y cuando bombardear se sientan los presidentes en la silla del gobierno luego mandan a la guerra a la gente de su pueblo
la cucaracha, la cucaracha que ya no puede caminar porque no tiene porque le falta la marijuana que fumar
huaracha muchacha que vamoa huarachar va una cucaracha que quiere comerciar, toca, loca ábreme la boca, buscame una coca que no quiero trabalear, mica, rica para zapatear,
pido a victor jara no me vaya a doblegar, Cha-ma Chama Che Guevara una petición, una cucaracha, por culpa y omisión,
la cucaracha, la cucaracha que ya no puede caminar porque no tiene porque le falta la marijuana que fumar
todos se pelean la silla que les deja mucha plata en el norte pancho villa y en el sur viva Zapata!
ya murió la cucaracha ya la llevan a enterrar entre cuatro zopilotes y un ratón de sacristan
- A label of type <_file> will generate an HTML reference to a.
- example :
<lien_document_local_en_file>(/home/me/Documents/document.pdf)
- A label of type <_web> will generate an HTML reference to the net.
- example :
<alwaysdata_en_nweb>(www.alwaysdata.com)
- if the infix is "nweb" instead of "web" Click on the link to open a new tab in the browser.
<alwaysdata_en_nweb>(www.alwaysdata.com)
which gives in the html : alwaysdata
or lien_vers_alwaysdata_dans_un_nouvel_onglet
- A label of type <_hil> for "html_inline" indicates to take the html code contained in the block and add it
directly to the html page. This is used for special cases to automatically generate HTML pages more specialized than a simple text
or to include style sheets.
3.4.Management of bold characters
- A text in parenthesis followed by an exclamation mark (! will appear ) and grass.
- example : (! texte en gras ) :
texte en gras