Skip to contents

The function returns the selected sentence as properly formatted html/latex code.

Usage

typeset_gloss(lexadb, text, sentence, format = "latex")

Arguments

lexadb

A lexadb object (created with load_lexadb).

text

Text id.

sentence

Sentence id to print.

format

Format to print out with (either html or latex).

Examples

db_path <- system.file("extdata/albanian_lexadb", package = "lexa")
albanian <- load_lexadb(db_path)
#>  Loading lexa database...

typeset_gloss(albanian, 1, 1)
#> ```{=latex}
#> \ex \begingl
#> \glpreamble Era e Veriut dhe Dielli po ziheshin se kush ishte më i fortë.//
#> \glpreamble [eɽa e veɽiut | ðe dielˠi | pɔ ziheʃin se kuʃ iʃte mɜ i fɔɽtɜ ‖]//
#> \gla er-a e ver-iut  dhe diell-i  po zihe-shin se kush ishte më i fort-ë//
#> \glb wind-\F{}.\Sg{}.\Nom{}.\Def{} \F{}.\Sg{}.\Gen{}.\Def{} north-\M{}.\Sg{}.\Gen{}.\Def{}  and sun-\M{}.\Sg{}.\Nom{}.\Def{}  \Prog{} fight-\Impf{}.\Ind{}.3\Pl{} that who be.\Impf{}.\Ind{}.3\Sg{} more \M{}.\Sg{}.\Acc{}.\Def{} strong-\M{}.\Sg{}.\Acc{}.\Def{}//
#> \glft `The North Wind and the Sun were disputing which was the stronger,'//
#> \endgl \xe
#> ```
typeset_gloss(albanian, 1, 1, format = "html")
#> <div data-gloss>
#>   <p class="gloss__line--original">Era e Veriut dhe Dielli po ziheshin se kush ishte më i fortë.</p>
#>   <p class="gloss__line--original" style="font-weight: 400;">[eɽa e veɽiut | ðe dielˠi | pɔ ziheʃin se kuʃ iʃte mɜ i fɔɽtɜ ‖]</p>
#>   <p>er-a e ver-iut  dhe diell-i  po zihe-shin se kush ishte më i fort-ë</p>
#>   <p>wind-F.SG.NOM.DEF F.SG.GEN.DEF north-M.SG.GEN.DEF  and sun-M.SG.NOM.DEF  PROG fight-IMPF.IND.3PL that who be.IMPF.IND.3SG more M.SG.ACC.DEF strong-M.SG.ACC.DEF</p>
#>   <p>‘The North Wind and the Sun were disputing which was the stronger,’</p>
#> </div>