Render gloss from a dataframe
Arguments
- df
Dataframe one row per gloss. Columns
translation
,source
andlabel
have special meaning (seeas_gloss()
); all the others will be interpreted as lines to align in the order given.- output_format
(Optional) Whether it will use latex, word or html format.
- numbering
(Optional) Whether the gloss should be numbered (in Word and HTML).
Value
Object of class gloss
with the original input as data
attribute.
Examples
my_gloss <- data.frame(
first_line = "my first line",
second_line = "my second line",
translation = "Translation of my example",
label = "label"
)
gloss_df(my_gloss)
#> [1] "(@label) _my_ _first_ _line_ \n\n my second line \n\n 'Translation of my example'"
#> attr(,"class")
#> [1] "gloss" "character"
#> attr(,"data")
#> first_line second_line translation label
#> 1 my first line my second line Translation of my example label