use .ipa on gloss pronunciation

This commit is contained in:
Rhiannon Morris 2021-04-28 12:34:32 +02:00
parent 7234ad089e
commit 3aba096598
2 changed files with 10 additions and 14 deletions

View file

@ -52,6 +52,10 @@ glosses = \case
[RawBlock (Format "html") "</figure>"] [RawBlock (Format "html") "</figure>"]
b -> [b] b -> [b]
pattern Gloss l g w t = BulletList [[Plain l], [Plain g], [Plain w], [Plain t]]
pattern PGloss l p g w t =
BulletList [[Plain l], [Plain p], [Plain g], [Plain w], [Plain t]]
glossTable :: Block -> Maybe Block glossTable :: Block -> Maybe Block
glossTable = \case glossTable = \case
Gloss l s g t -> Just $ make l Nothing s g t Gloss l s g t -> Just $ make l Nothing s g t
@ -68,16 +72,16 @@ glossTable = \case
Table ("", ["gloss"], []) (Caption Nothing []) colspecs Table ("", ["gloss"], []) (Caption Nothing []) colspecs
(TableHead mempty []) (TableHead mempty [])
[TableBody mempty (RowHeadColumns 0) [] $ concat [TableBody mempty (RowHeadColumns 0) [] $ concat
[[row "gloss-lang" [l']], [[row ["gloss-lang", "lang"] [l']],
maybe [] (pure . row "gloss-pron" . pure) p', maybe [] (pure . row ["gloss-pron", "ipa"] . pure) p',
[row "gloss-split" ss], [row ["gloss-split", "lang"] ss],
[row "gloss-gloss" gs], [row ["gloss-gloss"] gs],
[row "gloss-trans" [t']]]] [row ["gloss-trans"] [t']]]]
(TableFoot mempty []) (TableFoot mempty [])
cell is = Cell mempty AlignDefault (RowSpan 1) (ColSpan 1) [Plain is] cell is = Cell mempty AlignDefault (RowSpan 1) (ColSpan 1) [Plain is]
cell1 n is = Cell mempty AlignDefault (RowSpan 1) (ColSpan n) [Plain is] cell1 n is = Cell mempty AlignDefault (RowSpan 1) (ColSpan n) [Plain is]
cells = map (cell . concatMap abbrs) . splitInlines cells = map (cell . concatMap abbrs) . splitInlines
row c = Row ("", [c], []) row c = Row ("", c, [])
endash :: Text -> Text endash :: Text -> Text
endash = Text.map \case '-' -> ''; '_' -> ' '; c -> c endash = Text.map \case '-' -> ''; '_' -> ' '; c -> c
@ -102,10 +106,6 @@ splitInlines is = filter (not . null) $ go is where
let (is1, is') = break (== Space) is in let (is1, is') = break (== Space) is in
fromList is1 : splitInlines (dropWhile (== Space) is') fromList is1 : splitInlines (dropWhile (== Space) is')
pattern Gloss l g w t = BulletList [[Plain l], [Plain g], [Plain w], [Plain t]]
pattern PGloss l p g w t =
BulletList [[Plain l], [Plain p], [Plain g], [Plain w], [Plain t]]
makeFigures :: Block -> [Block] makeFigures :: Block -> [Block]
makeFigures (Div ("", ["figure"], []) blks) = makeFigures (Div ("", ["figure"], []) blks) =

View file

@ -164,10 +164,6 @@ figure table {
border: none; border: none;
text-align: left; text-align: left;
} }
.gloss-lang, .gloss-pron, .gloss-split {
font-family: var(--ipa-font);
line-height: 115%;
}
figure ul { figure ul {
text-align: left; text-align: left;