public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Paulo Ney de Souza <pauloney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Lua filters and possible error
Date: Sun, 19 Nov 2023 20:00:39 -0800	[thread overview]
Message-ID: <CAFVhNZOqQoFuEXJgnHvp7HLwE3wpmAfs7S+PCGLwe0dG2JBEfA@mail.gmail.com> (raw)
In-Reply-To: <8B6C889E-AE79-464D-A28C-6AADC2D28FB0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2636 bytes --]

I think we will need a bit more. The space of Language Tags in LaTeX is
all over the place, Babel and Polyglossia alike.

Things like:

\foreignlanguage{farsi}
\begin{otherlanguage}{farsi} ...\end{otherlanguage}
\textpersian{}
\begin{persian} ... \end{persian}

will all have to be translated to the "almost" BCP-47 Language Tags used by
Aspell,
which in this case is:

        fa

I say "almost" because Aspell uses an underscore for dictionaries like
"en_GB" instead
of the correct "en-GB", for British English.

The Polyglossia package already has this equivalence
(Babel--Polyglossia--BCP-47) in
a table. We should use it. It is not easy to write it down.

Paulo Ney



On Sun, Nov 19, 2023 at 6:35 PM John MacFarlane <fiddlosopher@gmail.com>
wrote:

>
> \begin{otherlanguage}{english}
> Here's a div in English. Code is ignored: \texttt{baoeuthasoe}. So are
> \href{http://example.com/notaword}{URLs}.
> \end{otherlanguage}
>
> is being parsed as
>
> [ Div
>     ( "" , [ "otherlanguage" ] , [] )
>  [ Para
>         [ Span ( "" , [] , [] ) [ Str "english" ]
>         , SoftBreak
> ...
>
> That could definitely be improved; we can teach pandoc that the
> otherlanguage
> environment has an argument for the language which should be put in the
> lang
> attribute of the div. Once that is done I think the filter will work.
>
> I added an issue for this: https://github.com/jgm/pandoc/issues/9202
>
>
> > On Nov 19, 2023, at 4:45 PM, Apprentice Ship <tex.apprentice-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> wrote:
> >
> >
> > \begin{otherlanguage}{english}
> > Here's a div in English. Code is ignored: \texttt{baoeuthasoe}. So are
> > \href{http://example.com/notaword}{URLs}.
> > \end{otherlanguage}
>
> --
> 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/8B6C889E-AE79-464D-A28C-6AADC2D28FB0%40gmail.com
> .
>

-- 
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/CAFVhNZOqQoFuEXJgnHvp7HLwE3wpmAfs7S%2BPCGLwe0dG2JBEfA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4272 bytes --]

  parent reply	other threads:[~2023-11-20  4:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-18 23:39 Apprentice Ship
     [not found] ` <CAH114nCcs0R1-ayRGf5W+R7VAAMLAYY-L62MvSK4AtWoqON=tw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-19 19:02   ` John MacFarlane
     [not found]     ` <69D4EAA3-A22A-47BA-ACD5-3F694B47CEAB-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-11-19 19:16       ` Bastien DUMONT
2023-11-19 20:14         ` John MacFarlane
     [not found]           ` <F948E13C-92F3-45B2-987E-9A5652BDBD58-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-11-20  0:45             ` Apprentice Ship
     [not found]               ` <CAH114nD0y-fygRpqFHQsUCc3ORh5d_-G5SpJPDn-5OQFcqFYBw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-20  2:35                 ` John MacFarlane
     [not found]                   ` <8B6C889E-AE79-464D-A28C-6AADC2D28FB0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-11-20  4:00                     ` Paulo Ney de Souza [this message]
     [not found]                       ` <CAFVhNZOqQoFuEXJgnHvp7HLwE3wpmAfs7S+PCGLwe0dG2JBEfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-20 17:54                         ` John MacFarlane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFVhNZOqQoFuEXJgnHvp7HLwE3wpmAfs7S+PCGLwe0dG2JBEfA@mail.gmail.com \
    --to=pauloney-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).