Better examples

This commit is contained in:
Greg Shuflin 2023-09-19 03:40:56 -07:00
parent 1eead20457
commit 34ae1b4df6
4 changed files with 10 additions and 7 deletions

View File

@ -4,5 +4,6 @@
## 0.2.0 (upcoming) ## 0.2.0 (upcoming)
* renamed `numbered_gloss` to `numbered-gloss`, `gloss_count` to `gloss-count`, in light of the * renamed `numbered_gloss` to `numbered-gloss`, `gloss_count` to `gloss-count`, in light of the
Typst style preference for kebab-case Typst style preference for kebab-case. Also renamed their arguments to use snake-case as well.
* Documented standard abbreviations * Documented standard abbreviations
* Removed all default gloss line formatting

Binary file not shown.

View File

@ -1,7 +1,6 @@
#import "leipzig-gloss.typ": abbreviations, gloss, numbered-gloss, gloss-count #import "leipzig-gloss.typ": abbreviations, gloss, numbered-gloss, gloss-count
#show link: x => underline[*#x*] #show link: x => underline[*#x*]
//#show raw: x => text(fill: rgb("#43464b"))[#x]
#let codeblock-old(contents) = block(fill: luma(230), inset: 8pt, radius: 4pt, breakable: false, contents) #let codeblock-old(contents) = block(fill: luma(230), inset: 8pt, radius: 4pt, breakable: false, contents)
@ -48,6 +47,8 @@ parameters. For more information or to inform devs of a bug or other issue,
visit the module's Github repository visit the module's Github repository
#link("https://github.com/neunenak/typst-leipzig-glossing") #link("https://github.com/neunenak/typst-leipzig-glossing")
#show raw: x => highlight(fill: luma(230), extent: 1pt)[#x]
= Basic glossing functionality = Basic glossing functionality
@ -72,8 +73,9 @@ for common glossing abbreviations:
source: ([I'm], [eat-ing], [your], [head]), source: ([I'm], [eat-ing], [your], [head]),
source-style: (item) => text(fill: red)[#item], source-style: (item) => text(fill: red)[#item],
morphemes: ([1#sg.#sbj\=to.be], [eat-#prog], [2#sg.#poss], [head]), morphemes: ([1#sg.#sbj\=to.be], [eat-#prog], [2#sg.#poss], [head]),
morphemes-style: text.with(fill: blue), morphemes-style: text.with(size: 10pt, fill: blue),
translation: text(weight: \"semibold\")[I'm eating your head!], translation: text(weight: \"semibold\")[I'm eating your head!],
translation-style: (item) => [\"#item\"],
) )
", addl-bindings: (poss: poss, prog: prog, sg: sg, sbj: sbj)) ", addl-bindings: (poss: poss, prog: prog, sg: sg, sbj: sbj))
@ -90,6 +92,7 @@ text and translation, without a gloss:
#codeblock( #codeblock(
"#gloss( "#gloss(
source: ([Trato de entender, debo comprender, qué es lo que ha hecho conmigo],), source: ([Trato de entender, debo comprender, qué es lo que ha hecho conmigo],),
source-style: emph,
translation: [I try to understand, I must comprehend, what she has done with me], translation: [I try to understand, I must comprehend, what she has done with me],
) )
") ")
@ -130,7 +133,6 @@ same arguments as `gloss`:
#codeblock( #codeblock(
"#gloss( "#gloss(
source: ([გვ-ფრცქვნ-ი],), source: ([გვ-ფრცქვნ-ი],),
source-style: none,
transliteration: ([gv-prtskvn-i],), transliteration: ([gv-prtskvn-i],),
morphemes: ([1#pl.#obj\-peel-#fmnt],), morphemes: ([1#pl.#obj\-peel-#fmnt],),
translation: \"You peeled us\", translation: \"You peeled us\",
@ -139,7 +141,6 @@ same arguments as `gloss`:
#numbered-gloss( #numbered-gloss(
source: ([მ-ფრცქვნ-ი],), source: ([მ-ფრცქვნ-ი],),
source-style: none,
transliteration: ([m-prtskvn-i],), transliteration: ([m-prtskvn-i],),
morphemes: ([1#sg.#obj\-peel-#fmnt],), morphemes: ([1#sg.#obj\-peel-#fmnt],),
translation: \"You peeled me\", translation: \"You peeled me\",

View File

@ -39,7 +39,7 @@
header: none, header: none,
header-style: none, header-style: none,
source: (), source: (),
source-style: emph, source-style: none,
transliteration: none, transliteration: none,
transliteration-style: none, transliteration-style: none,
morphemes: none, morphemes: none,
@ -47,6 +47,7 @@
additional-lines: (), //List of list of content additional-lines: (), //List of list of content
translation: none, translation: none,
translation-style: none, translation-style: none,
item-spacing: 1em, item-spacing: 1em,
gloss-padding: 2.0em, //TODO document these gloss-padding: 2.0em, //TODO document these
left_padding: 0.5em, left_padding: 0.5em,
@ -101,7 +102,7 @@
linebreak() linebreak()
if translation-style == none { if translation-style == none {
["#translation"] translation
} else { } else {
translation-style(translation) translation-style(translation)
} }