diff options
author | mb21 <mb21@users.noreply.github.com> | 2015-10-17 14:48:31 +0200 |
---|---|---|
committer | mb21 <mb21@users.noreply.github.com> | 2015-10-18 17:01:37 +0200 |
commit | 9328f4cd3d5d5b96e7783b419214bd8599c17ebc (patch) | |
tree | c8f3f7ac6b146978fcb6c954698d80a98ac7e929 /README | |
parent | 7f5a677bbff1a99d36a81312140dcd928d05262d (diff) | |
download | pandoc-9328f4cd3d5d5b96e7783b419214bd8599c17ebc.tar.gz |
LaTeX and ConTeXt writers: support lang attribute on divs and spans
For LaTeX, also collect lang and dir attributes on spans and divs to set the lang,
otherlangs and dir variables if they aren’t set already. See #895.
Diffstat (limited to 'README')
-rw-r--r-- | README | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -1047,12 +1047,21 @@ Language variables format stored in the additional variables `babel-lang`, `polyglossia-lang` (LaTeX) and `context-lang` (ConTeXt). + Native pandoc `span`s and `div`s with the lang attribute + (value in BCP 47) can be used to switch the language in + that range. + `otherlangs` : a list of other languages used in the document in the YAML metadata, according to [BCP 47]. For example: `otherlangs: [en-GB, fr]`. - Currently only used by `xelatex` through the generated - `polyglossia-otherlangs` variable. + This is automatically generated from the `lang` attributes + in all `span`s and `div`s but can be overriden. + Currently only used by LaTeX through the generated + `babel-otherlangs` and `polyglossia-otherlangs` variables. + The LaTeX writer outputs polyglossia commands in the text but + the `babel-newcommands` variable contains mappings for them + to the corresponding babel. `dir` : the base direction of the document, either `rtl` (right-to-left) @@ -1065,10 +1074,6 @@ Language variables (e.g. the browser, when generating HTML) supports the [Unicode Bidirectional Algorithm]. - LaTeX and ConTeXt assume by default that all text is left-to-right. - Setting `dir: ltr` enables bidirectional text handling in a document - whose base direction is left-to-right but contains some right-to-left script. - When using LaTeX for bidirectional documents, only the `xelatex` engine is fully supported (use `--latex-engine=xelatex`). |