public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* LaTeX template and options for other languages
@ 2022-04-24  1:28 Lyndon Drake
       [not found] ` <9d3c0e5b-ba6c-4268-bbc8-4ee57d0e0722n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Lyndon Drake @ 2022-04-24  1:28 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1451 bytes --]

Hi,

Would there be any openness to a modification to the LaTeX template to 
allow passing in options for other languages? babel has become pretty good 
at multilingual documents where the script can be used to identify the 
language, so I prefer writing my Markdown documents without the extra 
clutter of the span/div markup for the other languages (in my case, Greek, 
Hebrew, and Syriac).

My best option at the moment is to put the correct babel macros in 
header-includes, which seems to work well, e.g.:

```
      \babelprovide[import,onchar=ids,mapfont=direction]{hebrew}
      \babelfont[hebrew]{rm}[Renderer = Harfbuzz, Ligatures = TeX, 
ItalicFont = TaameyDavidCLM-MediumOblique, BoldFont = TaameyDavidCLM-Bold, 
BoldItalicFont = TaameyDavidCLM-BoldOblique]{TaameyDavidCLM-Medium}
```

This causes a duplicate babelprovide (the one without the options produced 
by the default template) if I do mark any spans or divs with the lang 
attribute, but it gets overridden by my second babelprovide so it works out 
ok.

Best,
Lyndon

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/9d3c0e5b-ba6c-4268-bbc8-4ee57d0e0722n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1937 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LaTeX template and options for other languages
       [not found] ` <9d3c0e5b-ba6c-4268-bbc8-4ee57d0e0722n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-04-24  4:44   ` Werner LEMBERG
       [not found]     ` <20220424.064450.715388246013095648.wl-mXXj517/zsQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Werner LEMBERG @ 2022-04-24  4:44 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw, isenguard-Re5JQEeQqe8AvxtiuMwx3w

> ```
>       \babelprovide[import,onchar=ids,mapfont=direction]{hebrew}
>       ...
> ```

Are you sure about this?  The documentation of Babel v3.73 says the
following for option `onchar`:

  This option is not compatible with `mapfont`.


    Werner


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LaTeX template and options for other languages
       [not found]     ` <20220424.064450.715388246013095648.wl-mXXj517/zsQ@public.gmane.org>
@ 2022-04-24  5:54       ` Lyndon Drake
  0 siblings, 0 replies; 3+ messages in thread
From: Lyndon Drake @ 2022-04-24  5:54 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1657 bytes --]

Good point, I was looking at an out-of-date babel documentation PDF. I've 
altered it to:

\babelprovide[import,onchar=ids fonts]{hebrew}
\babelfont[*hebrew]{rm}[Renderer = Harfbuzz, ItalicFont = 
TaameyDavidCLM-MediumOblique, BoldFont = TaameyDavidCLM-Bold, 
BoldItalicFont = TaameyDavidCLM-BoldOblique]{TaameyDavidCLM-Medium}

which I think is the correct approach (font change not needed if the main 
font already provides the appropriate script).

My main question still stands though regarding the \babelprovide. I don't 
know if we could potentially change the default LaTeX template to have this:

\babelprovide[import,onchar=ids fonts]{$babel-otherlangs$}

to get the automatic font/script switching that the bidi algorithm provides?

And is there a way to tell pandoc that there are additional languages, in a 
way that feeds into the babel-otherlangs variable and triggers that section 
of the default template?

Lyndon

On Sunday, 24 April 2022 at 16:45:00 UTC+12 Werner wrote:

> > ```
> > \babelprovide[import,onchar=ids,mapfont=direction]{hebrew}
> > ...
> > ```
>
> Are you sure about this? The documentation of Babel v3.73 says the
> following for option `onchar`:
>
> This option is not compatible with `mapfont`.
>
>
> Werner
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c873e83b-6b98-45c7-971c-9ce76db4e761n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2437 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-24  5:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24  1:28 LaTeX template and options for other languages Lyndon Drake
     [not found] ` <9d3c0e5b-ba6c-4268-bbc8-4ee57d0e0722n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-04-24  4:44   ` Werner LEMBERG
     [not found]     ` <20220424.064450.715388246013095648.wl-mXXj517/zsQ@public.gmane.org>
2022-04-24  5:54       ` Lyndon Drake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).