From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33014 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Hodgson Newsgroups: gmane.text.pandoc Subject: Re: Single and double quotes in Context with British English Date: Wed, 2 Aug 2023 11:54:05 -0700 (PDT) Message-ID: <1513fe42-80ad-4acd-bb53-85a04ed52a7cn@googlegroups.com> References: <6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_96_1729377132.1691002445994" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38329"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCEYTH5K2IARBQWNVKTAMGQECCX2VCY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Aug 02 20:56:06 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f59.google.com ([209.85.161.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qRH0w-0009jZ-Mc for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 02 Aug 2023 20:56:06 +0200 Original-Received: by mail-oo1-f59.google.com with SMTP id 006d021491bc7-56c877bb4a9sf74789eaf.2 for ; Wed, 02 Aug 2023 11:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1691002565; x=1691607365; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=tMcaiKq6FoF1oAyS9FetTSpjhJV88q0eczgJpmpGyHw=; b=LPo5GuJtMgN6BT/bDaKiI9pr1xMrzMuZFmviDbLMhY58qKDfyDI6jZEinBQj50JSBq LfQY8pcX6yeIHtBSlaX/y4qYF7+nwbjdBv1zl3xx9XGTKovPoQsUoQsZsI8ZbIZvdQCK LhaY/erlklSC7aZW/XOJIzVdPqeKi/S6is7aLjDEZRvLFpTMXRMU/PzfIK+y6nnYgJPn 0LO6mY/O77E5oKvbAUbY0P/XTp+1EpX2sWz2Riij+hAOEz9RxC0ZMgyPQFKFTlANVHsL dBcafqotWDE54HIFTQuIeG0akH6qwLezvA4ZrP/l7p/RA+8hmrcpfynH39CUpHrBTMXC 5mgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691002565; x=1691607365; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=tMcaiKq6FoF1oAyS9FetTSpjhJV88q0eczgJpmpGyHw=; b=lD+WblqmdAPo8nZMWomlHjZqIe2j6xdL/iR2umW83IjCm0AuX2JHLNdMKINxc1rApT TlGf1aWcsq/bUE1ewsMr4oHLCrVVBJrduYWHFeTxDqdP3Dn8leD5j0kiljqPpxwUc3U6 iJzXvxcClhPxQs0Y9AQvX+7wTIuoH4Dj0hU2ilbcmFZ50NpqM4f8buSOPUed7tLQcble hqUxz1+PFRuWMolmH/HCIrbjxDr1prqAW79PQZmDFq7V98SRFVH9evRG3KdAi1wz0bKU n5J+8BkpoJ0md8eC0P/IF2QIGYydGJaXWfhVaMWjVbuUHAFycOqtt3VI/DGQx6UGeTVC jGuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691002565; x=1691607365; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=tMcaiKq6FoF1oAyS9FetTSpjhJV88q0eczgJpmpGyHw=; b=QwccdEDq/nj2ZNyxYBukauffG1W57XFKOwTfvSy8f74cXq3lJXG1OsvVdj+SpUhJ6X QHQrD/Sb+iHFYtBevcxuGox/BgPk7Y57KiHJ+6/6Ju37hU0vqu7ItfhunlorZA0rRr2N nuKF+F34MLR0gRpCUiLonxKwT65rRaGDYBVvYhznxWcaxelgD/IQ82f9BHm3wLDx9Lmd yncQZKUAlkvhCYbpSiNar9B6P8aTGzKIVL1gnERZJnSJ5sV70JRjWTo6jStwSKgcZllA zk2r7AVFln1wwwGpNkC4lhOouRvvv+2AeBmW/GoAfPBb3vDpBk Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ABy/qLbgl3aFqsQ1hox+OROFW+SSiQsClXRxeDQhxc8FwIecPfdLibK8 Xf3GUWYVxOgRQ3OEeG0K8JM= X-Google-Smtp-Source: APBJJlHIaLZv3AxsCE1kA+d21fy63efCu/YIVQn/gzAQfpinY3AV5RD/R5YEOm0tYIggGIdCuiu2pA== X-Received: by 2002:a05:6358:720f:b0:130:f1e5:acc6 with SMTP id h15-20020a056358720f00b00130f1e5acc6mr10662604rwa.8.1691002565412; Wed, 02 Aug 2023 11:56:05 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a0c:e0cc:0:b0:63c:e0d4:98b2 with SMTP id x12-20020a0ce0cc000000b0063ce0d498b2ls385050qvk.0.-pod-prod-01-us; Wed, 02 Aug 2023 11:56:01 -0700 (PDT) X-Received: by 2002:a05:6808:10cf:b0:3a7:62f7:9c48 with SMTP id s15-20020a05680810cf00b003a762f79c48mr852613ois.11.1691002446675; Wed, 02 Aug 2023 11:54:06 -0700 (PDT) In-Reply-To: X-Original-Sender: thomas.hodgson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:33014 Archived-At: ------=_Part_96_1729377132.1691002445994 Content-Type: multipart/alternative; boundary="----=_Part_97_695675345.1691002445994" ------=_Part_97_695675345.1691002445994 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Correct me if I'm wrong, but here is how I think it works now: 'foo' -> Quoted SingleQuote [ Str "foo" ] -> \quote{foo} "bar" -> Quoted DoubleQuote [ Str "bar" ] -> \quotation{bar} My suggestion is that if the language is British (and maybe for some other= =20 varieties, I haven't checked) the result should be: 'foo' -> Quoted SingleQuote [ Str "foo" ] -> \quotation{foo} "bar" -> Quoted DoubleQuote [ Str "bar" ] -> \quote{bar} That would avoid my problem. But, I think it might create one for a different user. Someone might be=20 used to typing in the US style. They then want their output to be the=20 British style, so they change the language variable. And now they get the= =20 wrong quote marks. So maybe it's not a good idea even if its possible. By the way, while I was thinking about this I noticed that the HTML=20 template sets this CSS: `q { quotes: "=E2=80=9C" "=E2=80=9D" "=E2=80=98" "= =E2=80=99"; }`. So, it forces the=20 US quote convention even if the language is set to British. On Wednesday, 2 August 2023 at 20:19:15 UTC+2 Bastien DUMONT wrote: What would the change be exactly?=20 Le Wednesday 02 August 2023 =C3=A0 10:57:11AM, Thomas Hodgson a =C3=A9crit = :=20 > I wonder whether it would be feasible/desirable for the Context writer to= =20 > change its mapping from DoubleQuote/SingleQuote to `\quotation`/`\quote`= =20 based=20 > on the language of the document? (And the same for `\enquote`/`\enquote*`= =20 for=20 > LaTeX.)=20 >=20 > On Wednesday, 2 August 2023 at 18:27:38 UTC+2 Thomas Hodgson wrote:=20 >=20 > Thank you.=20 >=20 > I tried this (included in my header) and I get the result I want visually= =20 > in the PDF:=20 >=20 > ```=20 > \setuplanguage[en-gb][=20 > leftquotation=3D=E2=80=9C,=20 > rightquotation=3D=E2=80=9D,=20 > leftquote=3D=E2=80=98,=20 > rightquote=3D=E2=80=99,=20 > ]=20 > ```=20 >=20 > On Wednesday, 2 August 2023 at 16:55:36 UTC+2 Bastien DUMONT wrote:=20 >=20 > As you saw in the ConTeXt outputs, whatever language you set in the=20 > metadata, Pandoc will always identify double quotes as primary quotes=20 > and single quotes as secondary quotes. How they are rendered in PDF=20 > depends on ConTeXt. To alter the rendering of British English, you will= =20 > need to use the macro \setuplanguage ([1]https://wiki.contextgarden.net= =20 > /Command/setuplanguage).=20 >=20 > Le Wednesday 02 August 2023 =C3=A0 07:10:40AM, Thomas Hodgson a =C3=A9cri= t :=20 > > When I have a markdown file like this:=20 > >=20 > > ```=20 > > 'foo'=20 > > "bar"=20 > > ```=20 > >=20 > > The result of `pandoc --to=3Dcontext foo.md` is `\quote{foo} \quotation= =20 > {bar}`.=20 > > The result of `pandoc --to=3Dcontext --output=3Dfoo.pdf foo.md` is what= I=20 > would=20 > > expect: single quotes around 'foo' and double quotes around 'bar'.=20 > The output=20 > > of `pandoc --metadata=3Dlang:en-GB --to=3Dcontext foo.md` is the same.= =20 > But, the=20 > > output of `pandoc --metadata=3Dlang:en-GB --to=3Dcontext --output=3Dfoo= .pdf=20 > foo.md`=20 > > has double quotes around 'foo' and single quotes around 'bar'.=20 > >=20 > > I could solve this by using double quotes where I want single, and=20 > vice versa.=20 > > But that will give the wrong result for HTML from the same source.=20 > Also, I'm=20 > > sure that I would forget half the time.=20 > >=20 > > I assume that this happens because Pandoc treats the double quote as=20 > the 'top'=20 > > level of quotes, which in US English is a double quote and in UK=20 > English (in=20 > > this case, confusingly) is a single quote. I don't think it's a bug,=20 > therefore.=20 > >=20 > > I think that the same thing happens with csquotes and LaTeX. But=20 > there I don't=20 > > turn on csquotes.=20 > >=20 > > Is there some way to get the behaviour I want while still using=20 > British=20 > > English?=20 > >=20 > > --=20 > > You received this message because you are subscribed to the Google=20 > Groups=20 > > "pandoc-discuss" group.=20 > > To unsubscribe from this group and stop receiving emails from it,=20 > send an email=20 > > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > > To view this discussion on the web visit [2][2]https://=20 > groups.google.com/d/msgid/=20 > > pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%[3]=20 > 40googlegroups.com.=20 > >=20 > > References:=20 > >=20 > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=20 > > [2] [4]https://groups.google.com/d/msgid/pandoc-discuss/=20 > 6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium=3D=20 > email&utm_source=3Dfooter=20 >=20 >=20 > --=20 > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group.=20 > To unsubscribe from this group and stop receiving emails from it, send an= =20 email=20 > to [5]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > To view this discussion on the web visit [6] https://groups.google.com/d/msgid/=20 > pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com.= =20 >=20 > References:=20 >=20 > [1] https://wiki.contextgarden.net/Command/setuplanguage=20 > [2] https://groups.google.com/d/msgid/=20 > [3] http://40googlegroups.com/=20 > [4]=20 https://groups.google.com/d/msgid/pandoc-discuss/6bf5b865-b98a-4eab-ac15-9c= a58d38e6cfn%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter=20 > [5] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=20 > [6]=20 https://groups.google.com/d/msgid/pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4= b7dd66f3bbn%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter=20 --=20 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 e= mail 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/1513fe42-80ad-4acd-bb53-85a04ed52a7cn%40googlegroups.com. ------=_Part_97_695675345.1691002445994 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Correct me if I'm wrong, but here is how I think it works now:

'foo' -> Quoted SingleQuote [ Str "foo" ] -> \quo= te{foo}
"bar" -> Quoted DoubleQuote [ Str "bar" ] -> = \quotation{bar}

My suggestion is that if the lan= guage is British (and maybe for some other varieties, I haven't checked) th= e result should be:

'foo' -> Quoted Sing= leQuote [ Str "foo" ] -> \quotation{foo}
"bar" -> Quo= ted DoubleQuote [ Str "bar" ] -> \quote{bar}

= That would avoid my problem.

But, I think it mig= ht create one for a different user. Someone might be used to typing in the = US style. They then want their output to be the British style, so they chan= ge the language variable. And now they get the wrong quote marks. So maybe = it's not a good idea even if its possible.

By th= e way, while I was thinking about this I noticed that the HTML template set= s this CSS: `q { quotes: "=E2=80=9C" "=E2=80=9D" "=E2=80=98" "=E2=80=99"; }= `. So, it forces the US quote convention even if the language is set to Bri= tish.

On Wednesday= , 2 August 2023 at 20:19:15 UTC+2 Bastien DUMONT wrote:
What would the change be exactly?

Le Wednesday 02 August 2023 =C3=A0 10:57:11AM, Thomas Hodgson a =C3= =A9crit :
> I wonder whether it would be feasible/desirable for the Context = writer to
> change its mapping from DoubleQuote/SingleQuote to `\quotation`/= `\quote` based
> on the language of the document? (And the same for `\enquote`/`\= enquote*` for
> LaTeX.)
>=20
> On Wednesday, 2 August 2023 at 18:27:38 UTC+2 Thomas Hodgson wro= te:
>=20
> Thank you.
>=20
> I tried this (included in my header) and I get the result I = want visually
> in the PDF:
>=20
> ```
> \setuplanguage[en-gb][
> =C2=A0 leftquotation=3D=E2=80=9C,
> =C2=A0 rightquotation=3D=E2=80=9D,
> =C2=A0 leftquote=3D=E2=80=98,
> =C2=A0 rightquote=3D=E2=80=99,
> ]
> ```
>=20
> On Wednesday, 2 August 2023 at 16:55:36 UTC+2 Bastien DUMONT= wrote:
>=20
> As you saw in the ConTeXt outputs, whatever language you= set in the
> metadata, Pandoc will always identify double quotes as p= rimary quotes
> and single quotes as secondary quotes. How they are rend= ered in PDF
> depends on ConTeXt. To alter the rendering of British En= glish, you will
> need to use the macro \setuplanguage ([1]https://wiki= .contextgarden.net
> /Command/setuplanguage).
>=20
> Le Wednesday 02 August 2023 =C3=A0 07:10:40AM, Thomas Ho= dgson a =C3=A9crit :
> > When I have a markdown file like this:
> >
> > ```
> > 'foo'
> > "bar"
> > ```
> >
> > The result of `pandoc --to=3Dcontext foo.md` is `\q= uote{foo} \quotation
> {bar}`.
> > The result of `pandoc --to=3Dcontext --output=3Dfoo= .pdf foo.md` is what I
> would
> > expect: single quotes around 'foo' and double quote= s around 'bar'.
> The output
> > of `pandoc --metadata=3Dlang:en-GB --to=3Dcontext f= oo.md` is the same.
> But, the
> > output of `pandoc --metadata=3Dlang:en-GB --to=3Dco= ntext --output=3Dfoo.pdf
> foo.md`
> > has double quotes around 'foo' and single quotes ar= ound 'bar'.
> >
> > I could solve this by using double quotes where I w= ant single, and
> vice versa.
> > But that will give the wrong result for HTML from t= he same source.
> Also, I'm
> > sure that I would forget half the time.
> >
> > I assume that this happens because Pandoc treats th= e double quote as
> the 'top'
> > level of quotes, which in US English is a double qu= ote and in UK
> English (in
> > this case, confusingly) is a single quote. I don't = think it's a bug,
> therefore.
> >
> > I think that the same thing happens with csquotes a= nd LaTeX. But
> there I don't
> > turn on csquotes.
> >
> > Is there some way to get the behaviour I want while= still using
> British
> > English?
> >
> > --
> > You received this message because you are subscribe= d to the Google
> Groups
> > "pandoc-discuss" group.
> > To unsubscribe from this group and stop receiving e= mails from it,
> send an email
> > to [1]pandoc-discus..= .@googlegroups.com.
> > To view this discussion on the web visit [2][2]http= s://
> groups.google.com/d/msgid/
> > pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cf= n%[3]
> 40googlegroups.com.
> >
> > References:
> >
> > [1] mailto:pandoc-dis= cus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [2] [4]https://groups.google.= com/d/msgid/pandoc-discuss/
> 6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40goog= legroups.com?utm_medium=3D
> email&utm_source=3Dfooter
>=20
>=20
> --
> You received this message because you are subscribed to the Goog= le Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it= , send an email
> to [5]pandoc-discus...@googlegroup= s.com.
> To view this discussion on the web visit [6]https://group= s.google.com/d/msgid/
> pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroup= s.com.
>=20
> References:
>=20
> [1] https://wiki.contextgarden.net/Comm= and/setuplanguage
> [2] https://groups.google.com/d/msgid/
> [3] http://40googlegroups.com/
> [4] https://groups= .google.com/d/msgid/pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40= googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter
> [5] mailto:pandoc-discus...@google= groups.com
> [6] https://groups= .google.com/d/msgid/pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40= googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/1513fe42-80ad-4acd-bb53-85a04ed52a7cn%40googlegroups.= com.
------=_Part_97_695675345.1691002445994-- ------=_Part_96_1729377132.1691002445994--