From 9328f4cd3d5d5b96e7783b419214bd8599c17ebc Mon Sep 17 00:00:00 2001 From: mb21 Date: Sat, 17 Oct 2015 14:48:31 +0200 Subject: LaTeX and ConTeXt writers: support lang attribute on divs and spans MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- README | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'README') diff --git a/README b/README index f10de123c..7bf28873e 100644 --- a/README +++ b/README @@ -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`). -- cgit v1.2.3