Cookbook /
LinguisticGlosses
Summary: Adds markup for entering glossed text
Version: 2012-12-08
Status: Beta
Prerequisites: pmwiki-2.1, PHP 5.2+
Maintainer: DzmitryKushnarou? (dmytro_kushnariov@lavabit.com)
Categories: Markup
Download: glosses.phpΔ
Discussion: LinguisticGlosses-Talk?
Question answered by this recipe
- How can I add glossed text markup for the wiki about linguistics?
- How can I add pinyin pronounciation under Chinese text?
- How can I add furigana (ruby markup) over Japanese text?
Description
'Linguistic Glosses' recipe allows to add glossed text for your site.
- Glosses can be put over or under the main text.
- Glosses text is word-wrapped.
- The resulting layout can be modified via CSS.
- Text is viewable by modern browsers (supporting display: inline-block) or by text-only browsers like Lynx (not supporting display at all).
- An argument
nospaces
to delete whitespace in the text (useful for Chinese and Japanese). - An argument
above
for glosses above the text (useful for furigana). - An argument
larger
,larger=2
,larger=3
to make the main text larger (useful for Chinese and Japanese). - An easy way to make your own arguments (argument xxx adds a class .gloss-xxx to the respective paragraph tag, so just add CSS).
Notes
Glosses works in all modern browsers; however, older browsers (e.g. Opera below 9) can have trouble displaying glosses.
Installation
- Download and copy glosses.phpΔ to the cookbook/ directory.
- Enable the recipe in your local/config.php file with:
include_once("$FarmD/cookbook/glosses.php");
Markup
Once installed, it adds markup of the form:
(:gloss PARAMETERS... :)
word{gloss} word{gloss} ``word with spaces``{gloss for it}
(:glossend:)
with the following optional PARAMETERS:
above
to make gloss display above the text,larger{=1,2,3}
to make text larger,nospaces
to ignore whitespace in the markup,rtl
to override the default text direction.
Release Notes
- 2012-12-08
- First version.
Contributors
Comments
See discussion at LinguisticGlosses-Talk?
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.