Smart quotes and DocBook

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Smart quotes and DocBook

pela

Running asciidoctor with docbook output the sentence.

A "`double-quoted word`" and a '`single-quoted word`'.

Gives the translation:
<simpara>A
double-quoted word
 and a
single-quoted word
.</simpara>

Is this intended? How can I differentiate the quote marks?

pela
Reply | Threaded
Open this post in threaded view
|

Re: Smart quotes and DocBook

mojavelinux
Administrator
That's a good question. It's a consequence of this change: https://github.com/asciidoctor/asciidoctor/issues/2272

How are single and double quotes differentiated in DocBook? I actually don't know. If I knew, it would be straightforward to add additional markup since we know which one it is at the time of conversion.

Cheers,

-Dan

On Mon, Oct 29, 2018 at 1:45 PM pela [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Running asciidoctor with docbook output the sentence.

A "`double-quoted word`" and a '`single-quoted word`'.

Gives the translation:
<simpara>A
double-quoted word
 and a
single-quoted word
.</simpara>

Is this intended? How can I differentiate the quote marks?

pela


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Smart-quotes-and-DocBook-tp6566.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Smart quotes and DocBook

mojavelinux
Administrator
It seems like the DocBook toolchain only alternates the quotes by the depth. So there's no way to specify the quote used specifically (by default, at least), even if we were to add an attribute.


Cheers,

-Dan

On Mon, Oct 29, 2018 at 3:23 PM mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
That's a good question. It's a consequence of this change: https://github.com/asciidoctor/asciidoctor/issues/2272

How are single and double quotes differentiated in DocBook? I actually don't know. If I knew, it would be straightforward to add additional markup since we know which one it is at the time of conversion.

Cheers,

-Dan

On Mon, Oct 29, 2018 at 1:45 PM pela [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Running asciidoctor with docbook output the sentence.

A "`double-quoted word`" and a '`single-quoted word`'.

Gives the translation:
<simpara>A
double-quoted word
 and a
single-quoted word
.</simpara>

Is this intended? How can I differentiate the quote marks?

pela


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Smart-quotes-and-DocBook-tp6566.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Smart-quotes-and-DocBook-tp6566p6567.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Smart quotes and DocBook

Andrew Carver
This post was updated on .
In DocBook, this customization relates to the rather obscure, "Gentext" (Generated text) customization files:

http://docbook.10921.n7.nabble.com/changing-output-of-chars-in-lt-quote-gt-td3869.html#a3870

On the general subject of Gentext-customization, see http://www.sagehill.net/docbookxsl/CustomGentext.html#CustomGenText

In short: One's customization of, say, what a
<quote>
 at a certain depth gets turned into, goes (not into the Gentext files, but) into your customization layer--where "you create local versions of the generated text elements". But therefore, one's understanding of what pertinent options there are derives from knowing what pertinent "generated text elements" reside in your natural language's Gentext file.

Cheers,
Andy

<quote author="mojavelinux">
It seems like the DocBook toolchain only alternates the quotes by the
depth. So there's no way to specify the quote used specifically (by
default, at least), even if we were to add an attribute.

See
https://github.com/docbook/xslt10-stylesheets/blob/76a3690fa5d6adc5915ceed299d263a825e20e79/xsl/fo/inline.xsl#L794-L813

Cheers,

-Dan

On Mon, Oct 29, 2018 at 3:23 PM mojavelinux [via Asciidoctor :: Discussion]
<[hidden email]> wrote:

> That's a good question. It's a consequence of this change:
> https://github.com/asciidoctor/asciidoctor/issues/2272
>
> How are single and double quotes differentiated in DocBook? I actually
> don't know. If I knew, it would be straightforward to add additional markup
> since we know which one it is at the time of conversion.
>
> Cheers,
>
> -Dan
>
> On Mon, Oct 29, 2018 at 1:45 PM pela [via Asciidoctor :: Discussion] <[hidden
> email] <http:///user/SendEmail.jtp?type=node&node=6567&i=0>> wrote:
>
>>
>> Running asciidoctor with docbook output the sentence.
>>
>> A "`double-quoted word`" and a '`single-quoted word`'.
>>
>> Gives the translation:
>> <simpara>A
>>
>> double-quoted word
>>
>>  and a
>>
>> single-quoted word
>>
>> .</simpara>
>>
>> Is this intended? How can I differentiate the quote marks?
>>
>> pela
>>
<snip>
Reply | Threaded
Open this post in threaded view
|

Re: Smart quotes and DocBook

pela
In reply to this post by pela
As the author of a custom DocBook->latex translator, this is bad news and means that there is no way to take advantage of the asciidoctor syntax for double-quoted and single-quoted words. Maybe this info could be supplied to the docbook output, e.g. in the form of:

* a custom role for the quote element
* a custom processing instruction (<?dblatex single/double>) before or after

or some other form which do not sabotage for normal DocBook readers?

pela
Reply | Threaded
Open this post in threaded view
|

Re: Smart quotes and DocBook

mojavelinux
Administrator
I'm totally fine with adding an attribute. I just need to know which one to add that doesn't impact DocBook validation.

It seems very strange to me that DocBook doesn't account for this case. On the other hand, we can't go back on hard coding the smart quotes for English as that sabotages other languages.

This issue is really in DocBook's court, though we can certainly do something as an interim measure.

Please file an enhancement request so we can track it.

Cheers,

-Dan


On Tue, Oct 30, 2018, 09:38 pela [via Asciidoctor :: Discussion] <[hidden email]> wrote:
As the author of a custom DocBook->latex translator, this is bad news and means that there is no way to take advantage of the asciidoctor syntax for double-quoted and single-quoted words. Maybe this info could be supplied to the docbook output, e.g. in the form of:

* a custom role for the quote element
* a custom processing instruction (<?dblatex single/double>) before or after

or some other form which do not sabotage for normal DocBook readers?

pela



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Smart-quotes-and-DocBook-tp6566p6574.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Smart quotes and DocBook

pela
In reply to this post by pela
Ok, I have file a issue report. Understand the problem with the DocBook format. Thanks for your help and comments.

pela