public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Single and double quotes in Context with British English
@ 2023-08-02 14:10 Thomas Hodgson
       [not found] ` <6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Hodgson @ 2023-08-02 14:10 UTC (permalink / raw)
  To: pandoc-discuss


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

When I have a markdown file like this:

```
'foo'
"bar"
```

The result of `pandoc --to=context foo.md` is `\quote{foo} 
\quotation{bar}`. The result of `pandoc --to=context --output=foo.pdf 
foo.md` is what I would expect: single quotes around 'foo' and double 
quotes around 'bar'. The output of `pandoc --metadata=lang:en-GB 
--to=context foo.md` is the same. But, the output of `pandoc 
--metadata=lang:en-GB --to=context --output=foo.pdf foo.md` has double 
quotes around 'foo' and single quotes around 'bar'.

I could solve this by using double quotes where I want single, and vice 
versa. But that will give the wrong result for HTML from the same source. 
Also, I'm sure that I would forget half the time.

I assume that this happens because Pandoc treats the double quote as the 
'top' level of quotes, which in US English is a double quote 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 and 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 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/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com.

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

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

* Re: Single and double quotes in Context with British English
       [not found] ` <6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-08-02 14:55   ` Bastien DUMONT
  2023-08-02 16:27     ` Thomas Hodgson
  2023-08-02 17:50   ` Pablo Rodríguez
  1 sibling, 1 reply; 14+ messages in thread
From: Bastien DUMONT @ 2023-08-02 14:55 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

As you saw in the ConTeXt outputs, whatever language you set in the metadata, Pandoc will always identify double quotes as primary quotes and single quotes as secondary quotes. How they are rendered in PDF depends on ConTeXt. To alter the rendering of British English, you will need to use the macro \setuplanguage (https://wiki.contextgarden.net/Command/setuplanguage).

Le Wednesday 02 August 2023 à 07:10:40AM, Thomas Hodgson a écrit :
> When I have a markdown file like this:
> 
> ```
> 'foo'
> "bar"
> ```
> 
> The result of `pandoc --to=context foo.md` is `\quote{foo} \quotation{bar}`.
> The result of `pandoc --to=context --output=foo.pdf foo.md` is what I would
> expect: single quotes around 'foo' and double quotes around 'bar'. The output
> of `pandoc --metadata=lang:en-GB --to=context foo.md` is the same. But, the
> output of `pandoc --metadata=lang:en-GB --to=context --output=foo.pdf foo.md`
> has double quotes around 'foo' and single quotes around 'bar'.
> 
> I could solve this by using double quotes where I want single, and vice versa.
> But that will give the wrong result for HTML from the same source. Also, I'm
> sure that I would forget half the time.
> 
> I assume that this happens because Pandoc treats the double quote as the 'top'
> level of quotes, which in US English is a double quote 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 and 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 subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [2]https://groups.google.com/d/msgid/
> pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com.
> 
> References:
> 
> [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://groups.google.com/d/msgid/pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
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/ZMpuXcHRHh3M6jPe%40localhost.


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

* Re: Single and double quotes in Context with British English
  2023-08-02 14:55   ` Bastien DUMONT
@ 2023-08-02 16:27     ` Thomas Hodgson
       [not found]       ` <a416671d-1c67-4f4b-97c4-24b18e440466n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Hodgson @ 2023-08-02 16:27 UTC (permalink / raw)
  To: pandoc-discuss


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

Thank you.

I tried this (included in my header) and I get the result I want visually 
in the PDF:

```
\setuplanguage[en-gb][
  leftquotation=“,
  rightquotation=”,
  leftquote=‘,
  rightquote=’,
]
```

On Wednesday, 2 August 2023 at 16:55:36 UTC+2 Bastien DUMONT wrote:

> As you saw in the ConTeXt outputs, whatever language you set in the 
> metadata, Pandoc will always identify double quotes as primary quotes and 
> single quotes as secondary quotes. How they are rendered in PDF depends on 
> ConTeXt. To alter the rendering of British English, you will need to use 
> the macro \setuplanguage (
> https://wiki.contextgarden.net/Command/setuplanguage).
>
> Le Wednesday 02 August 2023 à 07:10:40AM, Thomas Hodgson a écrit :
> > When I have a markdown file like this:
> > 
> > ```
> > 'foo'
> > "bar"
> > ```
> > 
> > The result of `pandoc --to=context foo.md` is `\quote{foo} 
> \quotation{bar}`.
> > The result of `pandoc --to=context --output=foo.pdf foo.md` is what I 
> would
> > expect: single quotes around 'foo' and double quotes around 'bar'. The 
> output
> > of `pandoc --metadata=lang:en-GB --to=context foo.md` is the same. But, 
> the
> > output of `pandoc --metadata=lang:en-GB --to=context --output=foo.pdf 
> foo.md`
> > has double quotes around 'foo' and single quotes around 'bar'.
> > 
> > I could solve this by using double quotes where I want single, and vice 
> versa.
> > But that will give the wrong result for HTML from the same source. Also, 
> I'm
> > sure that I would forget half the time.
> > 
> > I assume that this happens because Pandoc treats the double quote as the 
> 'top'
> > level of quotes, which in US English is a double quote 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 and 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 subscribed to the Google Groups
> > "pandoc-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email
> > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit [2]
> https://groups.google.com/d/msgid/
> > pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com.
> > 
> > References:
> > 
> > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [2] 
> https://groups.google.com/d/msgid/pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium=email&utm_source=footer
>
>

-- 
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/a416671d-1c67-4f4b-97c4-24b18e440466n%40googlegroups.com.

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

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

* Re: Single and double quotes in Context with British English
       [not found] ` <6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2023-08-02 14:55   ` Bastien DUMONT
@ 2023-08-02 17:50   ` Pablo Rodríguez
       [not found]     ` <fc349c18-6989-67be-6a64-e701b4a06d16-S0/GAf8tV78@public.gmane.org>
  1 sibling, 1 reply; 14+ messages in thread
From: Pablo Rodríguez @ 2023-08-02 17:50 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 8/2/23 16:10, Thomas Hodgson wrote:
> [...]
> I assume that this happens because Pandoc treats the double quote as the
> 'top' level of quotes, which in US English is a double quote and in UK
> English (in this case, confusingly) is a single quote. I don't think
> it's a bug, therefore.

Hi Thomas,

I think this is how ConTeXt configures the default values for different
languages.

US English is the default
(https://github.com/contextgarden/context/blob/25db3a7c9d8720471ac3740cba828d73f87365ff/tex/context/base/mkxl/lang-def.mkxl#L24).

British English has the opposite values of US English
(https://github.com/contextgarden/context/blob/25db3a7c9d8720471ac3740cba828d73f87365ff/tex/context/base/mkxl/lang-def.mkxl#L24)
for both the \quote and the \quotation commands.

Because of issues similar to this one, I always type quotes in their
final character.

I hope it helps,

Pablo


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

* Re: Single and double quotes in Context with British English
       [not found]       ` <a416671d-1c67-4f4b-97c4-24b18e440466n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-08-02 17:57         ` Thomas Hodgson
       [not found]           ` <a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Hodgson @ 2023-08-02 17:57 UTC (permalink / raw)
  To: pandoc-discuss


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

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.)

On Wednesday, 2 August 2023 at 18:27:38 UTC+2 Thomas Hodgson wrote:

> Thank you.
>
> I tried this (included in my header) and I get the result I want visually 
> in the PDF:
>
> ```
> \setuplanguage[en-gb][
>   leftquotation=“,
>   rightquotation=”,
>   leftquote=‘,
>   rightquote=’,
> ]
> ```
>
> On Wednesday, 2 August 2023 at 16:55:36 UTC+2 Bastien DUMONT wrote:
>
>> As you saw in the ConTeXt outputs, whatever language you set in the 
>> metadata, Pandoc will always identify double quotes as primary quotes and 
>> single quotes as secondary quotes. How they are rendered in PDF depends on 
>> ConTeXt. To alter the rendering of British English, you will need to use 
>> the macro \setuplanguage (
>> https://wiki.contextgarden.net/Command/setuplanguage). 
>>
>> Le Wednesday 02 August 2023 à 07:10:40AM, Thomas Hodgson a écrit : 
>> > When I have a markdown file like this: 
>> > 
>> > ``` 
>> > 'foo' 
>> > "bar" 
>> > ``` 
>> > 
>> > The result of `pandoc --to=context foo.md` is `\quote{foo} 
>> \quotation{bar}`. 
>> > The result of `pandoc --to=context --output=foo.pdf foo.md` is what I 
>> would 
>> > expect: single quotes around 'foo' and double quotes around 'bar'. The 
>> output 
>> > of `pandoc --metadata=lang:en-GB --to=context foo.md` is the same. But, 
>> the 
>> > output of `pandoc --metadata=lang:en-GB --to=context --output=foo.pdf 
>> foo.md` 
>> > has double quotes around 'foo' and single quotes around 'bar'. 
>> > 
>> > I could solve this by using double quotes where I want single, and vice 
>> versa. 
>> > But that will give the wrong result for HTML from the same source. 
>> Also, I'm 
>> > sure that I would forget half the time. 
>> > 
>> > I assume that this happens because Pandoc treats the double quote as 
>> the 'top' 
>> > level of quotes, which in US English is a double quote 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 and 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 subscribed to the Google 
>> Groups 
>> > "pandoc-discuss" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email 
>> > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
>> > To view this discussion on the web visit [2]
>> https://groups.google.com/d/msgid/ 
>> > pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com. 
>>
>> > 
>> > References: 
>> > 
>> > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> > [2] 
>> https://groups.google.com/d/msgid/pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium=email&utm_source=footer 
>>
>>

-- 
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/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com.

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

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

* Re: Single and double quotes in Context with British English
       [not found]           ` <a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-08-02 18:19             ` Bastien DUMONT
  2023-08-02 18:54               ` Thomas Hodgson
  2023-08-02 19:33             ` BPJ
  1 sibling, 1 reply; 14+ messages in thread
From: Bastien DUMONT @ 2023-08-02 18:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

What would the change be exactly?

Le Wednesday 02 August 2023 à 10:57:11AM, Thomas Hodgson a écrit :
> 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.)
> 
> On Wednesday, 2 August 2023 at 18:27:38 UTC+2 Thomas Hodgson wrote:
> 
>     Thank you.
> 
>     I tried this (included in my header) and I get the result I want visually
>     in the PDF:
> 
>     ```
>     \setuplanguage[en-gb][
>       leftquotation=“,
>       rightquotation=”,
>       leftquote=‘,
>       rightquote=’,
>     ]
>     ```
> 
>     On Wednesday, 2 August 2023 at 16:55:36 UTC+2 Bastien DUMONT wrote:
> 
>         As you saw in the ConTeXt outputs, whatever language you set in the
>         metadata, Pandoc will always identify double quotes as primary quotes
>         and single quotes as secondary quotes. How they are rendered in PDF
>         depends on ConTeXt. To alter the rendering of British English, you will
>         need to use the macro \setuplanguage ([1]https://wiki.contextgarden.net
>         /Command/setuplanguage).
> 
>         Le Wednesday 02 August 2023 à 07:10:40AM, Thomas Hodgson a écrit :
>         > When I have a markdown file like this:
>         >
>         > ```
>         > 'foo'
>         > "bar"
>         > ```
>         >
>         > The result of `pandoc --to=context foo.md` is `\quote{foo} \quotation
>         {bar}`.
>         > The result of `pandoc --to=context --output=foo.pdf foo.md` is what I
>         would
>         > expect: single quotes around 'foo' and double quotes around 'bar'.
>         The output
>         > of `pandoc --metadata=lang:en-GB --to=context foo.md` is the same.
>         But, the
>         > output of `pandoc --metadata=lang:en-GB --to=context --output=foo.pdf
>         foo.md`
>         > has double quotes around 'foo' and single quotes around 'bar'.
>         >
>         > I could solve this by using double quotes where I want single, and
>         vice versa.
>         > But that will give the wrong result for HTML from the same source.
>         Also, I'm
>         > sure that I would forget half the time.
>         >
>         > I assume that this happens because Pandoc treats the double quote as
>         the 'top'
>         > level of quotes, which in US English is a double quote 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 and 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 subscribed to the Google
>         Groups
>         > "pandoc-discuss" group.
>         > To unsubscribe from this group and stop receiving emails from it,
>         send an email
>         > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>         > To view this discussion on the web visit [2][2]https://
>         groups.google.com/d/msgid/
>         > pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%[3]
>         40googlegroups.com.
>         >
>         > References:
>         >
>         > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>         > [2] [4]https://groups.google.com/d/msgid/pandoc-discuss/
>         6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium=
>         email&utm_source=footer
> 
> 
> --
> 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 [5]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [6]https://groups.google.com/d/msgid/
> pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com.
> 
> References:
> 
> [1] https://wiki.contextgarden.net/Command/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%40googlegroups.com?utm_medium=email&utm_source=footer
> [5] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [6] https://groups.google.com/d/msgid/pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
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/ZMqeG5N04dvzxiRd%40localhost.


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

* Re: Single and double quotes in Context with British English
  2023-08-02 18:19             ` Bastien DUMONT
@ 2023-08-02 18:54               ` Thomas Hodgson
       [not found]                 ` <1513fe42-80ad-4acd-bb53-85a04ed52a7cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Hodgson @ 2023-08-02 18:54 UTC (permalink / raw)
  To: pandoc-discuss


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

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 
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 
used to typing in the US style. They then want their output to be the 
British style, so they change the language variable. And now they get the 
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 
template sets this CSS: `q { quotes: "“" "”" "‘" "’"; }`. So, it forces the 
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? 

Le Wednesday 02 August 2023 à 10:57:11AM, Thomas Hodgson a écrit : 
> 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.) 
> 
> On Wednesday, 2 August 2023 at 18:27:38 UTC+2 Thomas Hodgson wrote: 
> 
> Thank you. 
> 
> I tried this (included in my header) and I get the result I want visually 
> in the PDF: 
> 
> ``` 
> \setuplanguage[en-gb][ 
>   leftquotation=“, 
>   rightquotation=”, 
>   leftquote=‘, 
>   rightquote=’, 
> ] 
> ``` 
> 
> On Wednesday, 2 August 2023 at 16:55:36 UTC+2 Bastien DUMONT wrote: 
> 
> As you saw in the ConTeXt outputs, whatever language you set in the 
> metadata, Pandoc will always identify double quotes as primary quotes 
> and single quotes as secondary quotes. How they are rendered in PDF 
> depends on ConTeXt. To alter the rendering of British English, you will 
> need to use the macro \setuplanguage ([1]https://wiki.contextgarden.net 
> /Command/setuplanguage). 
> 
> Le Wednesday 02 August 2023 à 07:10:40AM, Thomas Hodgson a écrit : 
> > When I have a markdown file like this: 
> > 
> > ``` 
> > 'foo' 
> > "bar" 
> > ``` 
> > 
> > The result of `pandoc --to=context foo.md` is `\quote{foo} \quotation 
> {bar}`. 
> > The result of `pandoc --to=context --output=foo.pdf foo.md` is what I 
> would 
> > expect: single quotes around 'foo' and double quotes around 'bar'. 
> The output 
> > of `pandoc --metadata=lang:en-GB --to=context foo.md` is the same. 
> But, the 
> > output of `pandoc --metadata=lang:en-GB --to=context --output=foo.pdf 
> foo.md` 
> > has double quotes around 'foo' and single quotes around 'bar'. 
> > 
> > I could solve this by using double quotes where I want single, and 
> vice versa. 
> > But that will give the wrong result for HTML from the same source. 
> Also, I'm 
> > sure that I would forget half the time. 
> > 
> > I assume that this happens because Pandoc treats the double quote as 
> the 'top' 
> > level of quotes, which in US English is a double quote 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 and 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 subscribed to the Google 
> Groups 
> > "pandoc-discuss" group. 
> > To unsubscribe from this group and stop receiving emails from it, 
> send an email 
> > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> > To view this discussion on the web visit [2][2]https:// 
> groups.google.com/d/msgid/ 
> > pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%[3] 
> 40googlegroups.com. 
> > 
> > References: 
> > 
> > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> > [2] [4]https://groups.google.com/d/msgid/pandoc-discuss/ 
> 6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium= 
> email&utm_source=footer 
> 
> 
> -- 
> 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 [5]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> To view this discussion on the web visit [6]
https://groups.google.com/d/msgid/ 
> pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com. 
> 
> References: 
> 
> [1] https://wiki.contextgarden.net/Command/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%40googlegroups.com?utm_medium=email&utm_source=footer 
> [5] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> [6] 
https://groups.google.com/d/msgid/pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com?utm_medium=email&utm_source=footer 

-- 
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/1513fe42-80ad-4acd-bb53-85a04ed52a7cn%40googlegroups.com.

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

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

* Re: Single and double quotes in Context with British English
       [not found]     ` <fc349c18-6989-67be-6a64-e701b4a06d16-S0/GAf8tV78@public.gmane.org>
@ 2023-08-02 18:54       ` Thomas Hodgson
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Hodgson @ 2023-08-02 18:54 UTC (permalink / raw)
  To: pandoc-discuss


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

Thank you. That works if the 'smart' extension is turned off. It might be 
the best way to be sure that what I type is what I get in the PDF.

On Wednesday, 2 August 2023 at 19:51:05 UTC+2 Pablo Rodríguez wrote:

> On 8/2/23 16:10, Thomas Hodgson wrote:
> > [...]
> > I assume that this happens because Pandoc treats the double quote as the
> > 'top' level of quotes, which in US English is a double quote and in UK
> > English (in this case, confusingly) is a single quote. I don't think
> > it's a bug, therefore.
>
> Hi Thomas,
>
> I think this is how ConTeXt configures the default values for different
> languages.
>
> US English is the default
> (
> https://github.com/contextgarden/context/blob/25db3a7c9d8720471ac3740cba828d73f87365ff/tex/context/base/mkxl/lang-def.mkxl#L24
> ).
>
> British English has the opposite values of US English
> (
> https://github.com/contextgarden/context/blob/25db3a7c9d8720471ac3740cba828d73f87365ff/tex/context/base/mkxl/lang-def.mkxl#L24
> )
> for both the \quote and the \quotation commands.
>
> Because of issues similar to this one, I always type quotes in their
> final character.
>
> I hope it helps,
>
> Pablo
>

-- 
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/07895878-c333-4bc3-9455-5ad04108593an%40googlegroups.com.

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

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

* Re: Single and double quotes in Context with British English
       [not found]                 ` <1513fe42-80ad-4acd-bb53-85a04ed52a7cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-08-02 19:23                   ` Bastien DUMONT
  2023-08-02 20:26                   ` Pablo Rodríguez
  1 sibling, 0 replies; 14+ messages in thread
From: Bastien DUMONT @ 2023-08-02 19:23 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

DoubleQuote is for primary quotations and SingleQuotes for secondary (i.e. nested) ones, whatever language you set in the metadata. It is purely semantic markup, unrelated to the formatting of the quotes in the language of the document (e.g. in French, " " corresponds to « » and ' ' to “ ”). In ConTeXt, it is the same thing for \quotation and \quote, so this mapping is appropriate. Again, if you want to use US-style quotation marks in a document which follows British conventions otherwise, the proper solution is to configure the formatting using the means provided by each format.

Of course, you can disable “smart” (I do it myself), but this will have other consequences documented in the manual (notably, “...” will no longer be turned to an ellipsis).

Le Wednesday 02 August 2023 à 11:54:05AM, Thomas Hodgson a écrit :
> 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
> 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 used to
> typing in the US style. They then want their output to be the British style, so
> they change the language variable. And now they get the 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 template
> sets this CSS: `q { quotes: "“" "”" "‘" "’"; }`. So, it forces the 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?
> 
>     Le Wednesday 02 August 2023 à 10:57:11AM, Thomas Hodgson a écrit :
>     > 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.)
>     >
>     > On Wednesday, 2 August 2023 at 18:27:38 UTC+2 Thomas Hodgson wrote:
>     >
>     > Thank you.
>     >
>     > I tried this (included in my header) and I get the result I want visually
>     > in the PDF:
>     >
>     > ```
>     > \setuplanguage[en-gb][
>     >   leftquotation=“,
>     >   rightquotation=”,
>     >   leftquote=‘,
>     >   rightquote=’,
>     > ]
>     > ```
>     >
>     > On Wednesday, 2 August 2023 at 16:55:36 UTC+2 Bastien DUMONT wrote:
>     >
>     > As you saw in the ConTeXt outputs, whatever language you set in the
>     > metadata, Pandoc will always identify double quotes as primary quotes
>     > and single quotes as secondary quotes. How they are rendered in PDF
>     > depends on ConTeXt. To alter the rendering of British English, you will
>     > need to use the macro \setuplanguage ([1][1]https://
>     wiki.contextgarden.net
>     > /Command/setuplanguage).
>     >
>     > Le Wednesday 02 August 2023 à 07:10:40AM, Thomas Hodgson a écrit :
>     > > When I have a markdown file like this:
>     > >
>     > > ```
>     > > 'foo'
>     > > "bar"
>     > > ```
>     > >
>     > > The result of `pandoc --to=context foo.md` is `\quote{foo} \quotation
>     > {bar}`.
>     > > The result of `pandoc --to=context --output=foo.pdf foo.md` is what I
>     > would
>     > > expect: single quotes around 'foo' and double quotes around 'bar'.
>     > The output
>     > > of `pandoc --metadata=lang:en-GB --to=context foo.md` is the same.
>     > But, the
>     > > output of `pandoc --metadata=lang:en-GB --to=context --output=foo.pdf
>     > foo.md`
>     > > has double quotes around 'foo' and single quotes around 'bar'.
>     > >
>     > > I could solve this by using double quotes where I want single, and
>     > vice versa.
>     > > But that will give the wrong result for HTML from the same source.
>     > Also, I'm
>     > > sure that I would forget half the time.
>     > >
>     > > I assume that this happens because Pandoc treats the double quote as
>     > the 'top'
>     > > level of quotes, which in US English is a double quote 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 and 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 subscribed to the Google
>     > Groups
>     > > "pandoc-discuss" group.
>     > > To unsubscribe from this group and stop receiving emails from it,
>     > send an email
>     > > to [1][2]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     > > To view this discussion on the web visit [2][2]https://
>     > [3]groups.google.com/d/msgid/
>     > > pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%[3]
>     > [4]40googlegroups.com.
>     > >
>     > > References:
>     > >
>     > > [1] mailto:[5]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     > > [2] [4][6]https://groups.google.com/d/msgid/pandoc-discuss/
>     > 6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%[7]40googlegroups.com?utm_medium=
>     > email&utm_source=footer
>     >
>     >
>     > --
>     > 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 [5][8]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     > To view this discussion on the web visit [6][9]https://groups.google.com/
>     d/msgid/
>     > pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%[10]
>     40googlegroups.com.
>     >
>     > References:
>     >
>     > [1] [11]https://wiki.contextgarden.net/Command/setuplanguage
>     > [2] [12]https://groups.google.com/d/msgid/
>     > [3] [13]http://40googlegroups.com/
>     > [4] [14]https://groups.google.com/d/msgid/pandoc-discuss/
>     6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium=email&
>     utm_source=footer
>     > [5] mailto:[15]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     > [6] [16]https://groups.google.com/d/msgid/pandoc-discuss/
>     a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com?utm_medium=email&
>     utm_source=footer
> 
> 
> --
> 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 [17]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [18]https://groups.google.com/d/msgid/
> pandoc-discuss/1513fe42-80ad-4acd-bb53-85a04ed52a7cn%40googlegroups.com.
> 
> References:
> 
> [1] https://wiki.contextgarden.net/
> [2] -
> [3] http://groups.google.com/d/msgid/
> [4] http://40googlegroups.com/
> [5] -
> [6] https://groups.google.com/d/msgid/pandoc-discuss/
> [7] http://40googlegroups.com/?utm_medium=
> [8] -
> [9] https://groups.google.com/d/msgid/
> [10] http://40googlegroups.com/
> [11] https://wiki.contextgarden.net/Command/setuplanguage
> [12] https://groups.google.com/d/msgid/
> [13] http://40googlegroups.com/
> [14] https://groups.google.com/d/msgid/pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium=email&utm_source=footer
> [15] -
> [16] https://groups.google.com/d/msgid/pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com?utm_medium=email&utm_source=footer
> [17] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [18] https://groups.google.com/d/msgid/pandoc-discuss/1513fe42-80ad-4acd-bb53-85a04ed52a7cn%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
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/ZMqtLuFvp_zPo3CC%40localhost.


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

* Re: Single and double quotes in Context with British English
       [not found]           ` <a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2023-08-02 18:19             ` Bastien DUMONT
@ 2023-08-02 19:33             ` BPJ
  1 sibling, 0 replies; 14+ messages in thread
From: BPJ @ 2023-08-02 19:33 UTC (permalink / raw)
  To: pandoc-discuss

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

You can swap single/double quotes in the Pandoc AST with a simple filter:

``````lua
local swap = {
  DoubleQuote = 'SingleQuote',
  SingleQuote = 'DoubleQuote'
}
function Quoted (elem)
  elem.quotetype = swap[elem.quotetype]
  return elem
end
``````

Den ons 2 aug. 2023 19:59Thomas Hodgson <thomas.hodgson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> 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.)
>
> On Wednesday, 2 August 2023 at 18:27:38 UTC+2 Thomas Hodgson wrote:
>
>> Thank you.
>>
>> I tried this (included in my header) and I get the result I want visually
>> in the PDF:
>>
>> ```
>> \setuplanguage[en-gb][
>>   leftquotation=“,
>>   rightquotation=”,
>>   leftquote=‘,
>>   rightquote=’,
>> ]
>> ```
>>
>> On Wednesday, 2 August 2023 at 16:55:36 UTC+2 Bastien DUMONT wrote:
>>
>>> As you saw in the ConTeXt outputs, whatever language you set in the
>>> metadata, Pandoc will always identify double quotes as primary quotes and
>>> single quotes as secondary quotes. How they are rendered in PDF depends on
>>> ConTeXt. To alter the rendering of British English, you will need to use
>>> the macro \setuplanguage (
>>> https://wiki.contextgarden.net/Command/setuplanguage).
>>>
>>> Le Wednesday 02 August 2023 à 07:10:40AM, Thomas Hodgson a écrit :
>>> > When I have a markdown file like this:
>>> >
>>> > ```
>>> > 'foo'
>>> > "bar"
>>> > ```
>>> >
>>> > The result of `pandoc --to=context foo.md` is `\quote{foo}
>>> \quotation{bar}`.
>>> > The result of `pandoc --to=context --output=foo.pdf foo.md` is what I
>>> would
>>> > expect: single quotes around 'foo' and double quotes around 'bar'. The
>>> output
>>> > of `pandoc --metadata=lang:en-GB --to=context foo.md` is the same.
>>> But, the
>>> > output of `pandoc --metadata=lang:en-GB --to=context --output=foo.pdf
>>> foo.md`
>>> > has double quotes around 'foo' and single quotes around 'bar'.
>>> >
>>> > I could solve this by using double quotes where I want single, and
>>> vice versa.
>>> > But that will give the wrong result for HTML from the same source.
>>> Also, I'm
>>> > sure that I would forget half the time.
>>> >
>>> > I assume that this happens because Pandoc treats the double quote as
>>> the 'top'
>>> > level of quotes, which in US English is a double quote 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 and 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 subscribed to the Google
>>> Groups
>>> > "pandoc-discuss" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> an email
>>> > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> > To view this discussion on the web visit [2]
>>> https://groups.google.com/d/msgid/
>>> > pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%
>>> 40googlegroups.com.
>>> >
>>> > References:
>>> >
>>> > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>> > [2]
>>> https://groups.google.com/d/msgid/pandoc-discuss/6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn%40googlegroups.com?utm_medium=email&utm_source=footer
>>>
>>> --
> 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/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADAJKhCx%3DxbPgcQF7EQef4keqpiV%2BjNywXoPf%3DLpAaBL%2BhYefQ%40mail.gmail.com.

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

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

* Re: Single and double quotes in Context with British English
       [not found]                 ` <1513fe42-80ad-4acd-bb53-85a04ed52a7cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2023-08-02 19:23                   ` Bastien DUMONT
@ 2023-08-02 20:26                   ` Pablo Rodríguez
       [not found]                     ` <8e63fe5e-de8b-1bdb-27d7-60fab49f2b7b-S0/GAf8tV78@public.gmane.org>
  1 sibling, 1 reply; 14+ messages in thread
From: Pablo Rodríguez @ 2023-08-02 20:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 8/2/23 20:54, Thomas Hodgson wrote:
> 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 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.

After having using ConTeXt for more than a decade (mainly without
pandoc), I think this is an issue with ConTeXt, not with pandoc.

Quotes or quotation marks aren’t set in stone. I mean, for Spanish and
any language with diacritical marks I would never use these “quotes”,
but these «ones» (either single or double). They don’t interfere with
the marks (such as “ñandú” and «ñandú»).

I’m not a native speaker and I’m mainly exposed to US English. If
British English uses double quotes for \quotation and single quotes for
\quote, you could do the following:

Either you suggest to change the default in ConTeXt itself, or you place
a file that includes the following in your local tree:

  \setuplanguage[en-gb][
    leftquotation=“,
    rightquotation=”,
    leftquote=‘,
    rightquote=’,
  ]

I don’t have myself TeX Live installed (I use a pure ConTeXt
distribution) and in my case the file is
"$HOME/texmf/texmf-local/cont-loc.mkxl".

If you are on Windows, it would read
"%USERPROFILE%/texmf/texmf-local/cont-loc.mkxl".

After creating the file and saving the contents, it might be wise to
clean the cache and generate it again.

"mtxrun --scripts cache --erase && mtxrun --generate" does this in part.

After that, the next compilation would take longer, since it will have
to create the format file (required by ConTeXt).

Just in case it helps,

Pablo

-- 
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/8e63fe5e-de8b-1bdb-27d7-60fab49f2b7b%40web.de.


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

* Re: Single and double quotes in Context with British English
       [not found]                     ` <8e63fe5e-de8b-1bdb-27d7-60fab49f2b7b-S0/GAf8tV78@public.gmane.org>
@ 2023-08-03  9:46                       ` Thomas Hodgson
       [not found]                         ` <d9bcf5be-c7f3-4225-ab9e-0d4cdc8de1e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Hodgson @ 2023-08-03  9:46 UTC (permalink / raw)
  To: pandoc-discuss


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

Thanks everybody. I understand better how this works.

The thing I still find awkward is that I can treat the quotes as semantic 
markup only for some output formats. It works that way for Context. And for 
LaTeX with csquotes, and HTML with q tags (and custom CSS). But for LaTeX 
without csquotes, html without q tags, or ODT (for example) a double quote 
in my source is a double quote in my output and no language setting will 
change it. For example, with LaTeX:

'foo' -> Quoted SingleQuote [ Str "foo" ] -> `foo'
"bar" -> Quoted DoubleQuote [ Str "bar" ] -> ``bar'' 

On Wednesday, 2 August 2023 at 22:26:53 UTC+2 Pablo Rodríguez wrote:

On 8/2/23 20:54, Thomas Hodgson wrote: 
> 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 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. 

After having using ConTeXt for more than a decade (mainly without 
pandoc), I think this is an issue with ConTeXt, not with pandoc. 

Quotes or quotation marks aren’t set in stone. I mean, for Spanish and 
any language with diacritical marks I would never use these “quotes”, 
but these «ones» (either single or double). They don’t interfere with 
the marks (such as “ñandú” and «ñandú»). 

I’m not a native speaker and I’m mainly exposed to US English. If 
British English uses double quotes for \quotation and single quotes for 
\quote, you could do the following: 

Either you suggest to change the default in ConTeXt itself, or you place 
a file that includes the following in your local tree: 

\setuplanguage[en-gb][ 
leftquotation=“, 
rightquotation=”, 
leftquote=‘, 
rightquote=’, 
] 

I don’t have myself TeX Live installed (I use a pure ConTeXt 
distribution) and in my case the file is 
"$HOME/texmf/texmf-local/cont-loc.mkxl". 

If you are on Windows, it would read 
"%USERPROFILE%/texmf/texmf-local/cont-loc.mkxl". 

After creating the file and saving the contents, it might be wise to 
clean the cache and generate it again. 

"mtxrun --scripts cache --erase && mtxrun --generate" does this in part. 

After that, the next compilation would take longer, since it will have 
to create the format file (required by ConTeXt). 

Just in case it helps, 

Pablo 

-- 
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/d9bcf5be-c7f3-4225-ab9e-0d4cdc8de1e6n%40googlegroups.com.

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

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

* Re: Single and double quotes in Context with British English
       [not found]                         ` <d9bcf5be-c7f3-4225-ab9e-0d4cdc8de1e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-08-03 10:16                           ` Bastien DUMONT
  2023-08-03 14:23                             ` Thomas Hodgson
  0 siblings, 1 reply; 14+ messages in thread
From: Bastien DUMONT @ 2023-08-03 10:16 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Yes, you're right.

One of the Lua filters in the official repo replaces the Quoted elements with typographic quotes. Since the transformation is performed on the AST, it will apply to all output formats. https://github.com/pandoc/lua-filters/tree/master/pandoc-quotes.lua

In your case, you would just have to write in your YAML block:

lang: en-GB
quot-lang: en-US

Le Thursday 03 August 2023 à 02:46:58AM, Thomas Hodgson a écrit :
> Thanks everybody. I understand better how this works.
> 
> The thing I still find awkward is that I can treat the quotes as semantic
> markup only for some output formats. It works that way for Context. And for
> LaTeX with csquotes, and HTML with q tags (and custom CSS). But for LaTeX
> without csquotes, html without q tags, or ODT (for example) a double quote in
> my source is a double quote in my output and no language setting will change
> it. For example, with LaTeX:
> 
> 'foo' -> Quoted SingleQuote [ Str "foo" ] -> `foo'
> "bar" -> Quoted DoubleQuote [ Str "bar" ] -> ``bar''
> 
> On Wednesday, 2 August 2023 at 22:26:53 UTC+2 Pablo Rodríguez wrote:
> 
>     On 8/2/23 20:54, Thomas Hodgson wrote:
>     > 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 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.
> 
>     After having using ConTeXt for more than a decade (mainly without
>     pandoc), I think this is an issue with ConTeXt, not with pandoc.
> 
>     Quotes or quotation marks aren’t set in stone. I mean, for Spanish and
>     any language with diacritical marks I would never use these “quotes”,
>     but these «ones» (either single or double). They don’t interfere with
>     the marks (such as “ñandú” and «ñandú»).
> 
>     I’m not a native speaker and I’m mainly exposed to US English. If
>     British English uses double quotes for \quotation and single quotes for
>     \quote, you could do the following:
> 
>     Either you suggest to change the default in ConTeXt itself, or you place
>     a file that includes the following in your local tree:
> 
>     \setuplanguage[en-gb][
>     leftquotation=“,
>     rightquotation=”,
>     leftquote=‘,
>     rightquote=’,
>     ]
> 
>     I don’t have myself TeX Live installed (I use a pure ConTeXt
>     distribution) and in my case the file is
>     "$HOME/texmf/texmf-local/cont-loc.mkxl".
> 
>     If you are on Windows, it would read
>     "%USERPROFILE%/texmf/texmf-local/cont-loc.mkxl".
> 
>     After creating the file and saving the contents, it might be wise to
>     clean the cache and generate it again.
> 
>     "mtxrun --scripts cache --erase && mtxrun --generate" does this in part.
> 
>     After that, the next compilation would take longer, since it will have
>     to create the format file (required by ConTeXt).
> 
>     Just in case it helps,
> 
>     Pablo
> 
> --
> 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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [2]https://groups.google.com/d/msgid/
> pandoc-discuss/d9bcf5be-c7f3-4225-ab9e-0d4cdc8de1e6n%40googlegroups.com.
> 
> References:
> 
> [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://groups.google.com/d/msgid/pandoc-discuss/d9bcf5be-c7f3-4225-ab9e-0d4cdc8de1e6n%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
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/ZMt-jqUcF0aH34BJ%40localhost.


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

* Re: Single and double quotes in Context with British English
  2023-08-03 10:16                           ` Bastien DUMONT
@ 2023-08-03 14:23                             ` Thomas Hodgson
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Hodgson @ 2023-08-03 14:23 UTC (permalink / raw)
  To: pandoc-discuss


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

Thanks! Yes, that solves my problem with writing to ODT etc.

On Thursday, 3 August 2023 at 12:16:58 UTC+2 Bastien DUMONT wrote:

> Yes, you're right.
>
> One of the Lua filters in the official repo replaces the Quoted elements 
> with typographic quotes. Since the transformation is performed on the AST, 
> it will apply to all output formats. 
> https://github.com/pandoc/lua-filters/tree/master/pandoc-quotes.lua
>
> In your case, you would just have to write in your YAML block:
>
> lang: en-GB
> quot-lang: en-US
>
> Le Thursday 03 August 2023 à 02:46:58AM, Thomas Hodgson a écrit :
> > Thanks everybody. I understand better how this works.
> > 
> > The thing I still find awkward is that I can treat the quotes as semantic
> > markup only for some output formats. It works that way for Context. And 
> for
> > LaTeX with csquotes, and HTML with q tags (and custom CSS). But for LaTeX
> > without csquotes, html without q tags, or ODT (for example) a double 
> quote in
> > my source is a double quote in my output and no language setting will 
> change
> > it. For example, with LaTeX:
> > 
> > 'foo' -> Quoted SingleQuote [ Str "foo" ] -> `foo'
> > "bar" -> Quoted DoubleQuote [ Str "bar" ] -> ``bar''
> > 
> > On Wednesday, 2 August 2023 at 22:26:53 UTC+2 Pablo Rodríguez wrote:
> > 
> > On 8/2/23 20:54, Thomas Hodgson wrote:
> > > 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 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.
> > 
> > After having using ConTeXt for more than a decade (mainly without
> > pandoc), I think this is an issue with ConTeXt, not with pandoc.
> > 
> > Quotes or quotation marks aren’t set in stone. I mean, for Spanish and
> > any language with diacritical marks I would never use these “quotes”,
> > but these «ones» (either single or double). They don’t interfere with
> > the marks (such as “ñandú” and «ñandú»).
> > 
> > I’m not a native speaker and I’m mainly exposed to US English. If
> > British English uses double quotes for \quotation and single quotes for
> > \quote, you could do the following:
> > 
> > Either you suggest to change the default in ConTeXt itself, or you place
> > a file that includes the following in your local tree:
> > 
> > \setuplanguage[en-gb][
> > leftquotation=“,
> > rightquotation=”,
> > leftquote=‘,
> > rightquote=’,
> > ]
> > 
> > I don’t have myself TeX Live installed (I use a pure ConTeXt
> > distribution) and in my case the file is
> > "$HOME/texmf/texmf-local/cont-loc.mkxl".
> > 
> > If you are on Windows, it would read
> > "%USERPROFILE%/texmf/texmf-local/cont-loc.mkxl".
> > 
> > After creating the file and saving the contents, it might be wise to
> > clean the cache and generate it again.
> > 
> > "mtxrun --scripts cache --erase && mtxrun --generate" does this in part.
> > 
> > After that, the next compilation would take longer, since it will have
> > to create the format file (required by ConTeXt).
> > 
> > Just in case it helps,
> > 
> > Pablo
> > 
> > --
> > 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 [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit [2]
> https://groups.google.com/d/msgid/
> > pandoc-discuss/d9bcf5be-c7f3-4225-ab9e-0d4cdc8de1e6n%40googlegroups.com.
> > 
> > References:
> > 
> > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [2] 
> https://groups.google.com/d/msgid/pandoc-discuss/d9bcf5be-c7f3-4225-ab9e-0d4cdc8de1e6n%40googlegroups.com?utm_medium=email&utm_source=footer
>
>

-- 
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/a15e8946-9e61-4034-ab90-4613a233b204n%40googlegroups.com.

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

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

end of thread, other threads:[~2023-08-03 14:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-02 14:10 Single and double quotes in Context with British English Thomas Hodgson
     [not found] ` <6bf5b865-b98a-4eab-ac15-9ca58d38e6cfn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-08-02 14:55   ` Bastien DUMONT
2023-08-02 16:27     ` Thomas Hodgson
     [not found]       ` <a416671d-1c67-4f4b-97c4-24b18e440466n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-08-02 17:57         ` Thomas Hodgson
     [not found]           ` <a1f39c5a-624a-48d7-af9a-d4b7dd66f3bbn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-08-02 18:19             ` Bastien DUMONT
2023-08-02 18:54               ` Thomas Hodgson
     [not found]                 ` <1513fe42-80ad-4acd-bb53-85a04ed52a7cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-08-02 19:23                   ` Bastien DUMONT
2023-08-02 20:26                   ` Pablo Rodríguez
     [not found]                     ` <8e63fe5e-de8b-1bdb-27d7-60fab49f2b7b-S0/GAf8tV78@public.gmane.org>
2023-08-03  9:46                       ` Thomas Hodgson
     [not found]                         ` <d9bcf5be-c7f3-4225-ab9e-0d4cdc8de1e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-08-03 10:16                           ` Bastien DUMONT
2023-08-03 14:23                             ` Thomas Hodgson
2023-08-02 19:33             ` BPJ
2023-08-02 17:50   ` Pablo Rodríguez
     [not found]     ` <fc349c18-6989-67be-6a64-e701b4a06d16-S0/GAf8tV78@public.gmane.org>
2023-08-02 18:54       ` Thomas Hodgson

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).