Language specific quotation marks

100 views
Skip to first unread message

zany

unread,
Jan 26, 2011, 10:47:14 AM1/26/11
to asciidoc
I'd like to propose the addition of language specific quotation marks
to the lang-*.conf files.
The proper quote marks differ somewhat in each language, see
http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks

Here is an example for the german language (lang-de.conf)

[tags]
ifdef::basebackend-docbook[]
singlequoted={amp}#8218;{1?<phrase role="{1}">}|{1?</phrase>}{amp}
#8216;
doublequoted={amp}#8222;{1?<phrase role="{1}">}|{1?</phrase>}{amp}
#8220;
endif::basebackend-docbook[]

ifdef::basebackend-html[]
singlequoted={amp}#8218;{1?<span class="{1}">}|{1?</span>}{amp}#8216;
doublequoted={amp}#8222;{1?<span class="{1}">}|{1?</span>}{amp}#8220;
endif::basebackend-html[]

(The only difference here from default are the actual quote symbols.)

I'm using this in a custom conf file and it works as expected. It
would be a great addition to properly support (some major) languages
in the default conf files.

Stuart Rackham

unread,
Jan 26, 2011, 3:13:41 PM1/26/11
to asci...@googlegroups.com
I never knew that quotes were so diverse.

It would simpler to define a quote character attributes rather than redefine the
markup for each backend. For example put this in the lang-de.conf file
[attributes] section:

# Left and right single and double quote characters.
lsq=&#8218;
rsq=&#8216;
ldq=&#8222;
rdq=&#8220;

The shared backend definitions would also need to be changed e.g.

singlequoted={lsq}{1?<span class="{1}">}|{1?</span>}{rsq}
doublequoted={ldq}{1?<span class="{1}">}|{1?</span>}{rdq}

This scheme has the added advantage of allowing quotes to be easily redefined on
a document by document basis.

What do you think?


Cheers, Stuart

zany

unread,
Jan 26, 2011, 3:31:53 PM1/26/11
to asciidoc
Quote character attributes look like the perfect solution to this.
Clean and easy customizable.
I just tried this (using an asciidoc.conf file) and it works as
expected.

Stuart Rackham

unread,
Jan 26, 2011, 4:51:33 PM1/26/11
to asci...@googlegroups.com

On 27/01/11 09:31, zany wrote:
> Quote character attributes look like the perfect solution to this.
> Clean and easy customizable.
> I just tried this (using an asciidoc.conf file) and it works as
> expected.

I've committed a patch to the trunk (with en and de quotes):
http://code.google.com/p/asciidoc/source/detail?r=895be0df73b9a1d3b85bf463e319eef158ce7ca9

Other language speakers please submit relevant patches for the lang-*.conf files.


Cheers, Stuart

kpy...@gmail.com

unread,
Jan 28, 2011, 7:10:57 AM1/28/11
to asci...@googlegroups.com
On Thu, 27 Jan 2011, Stuart Rackham wrote:

>
>
> On 27/01/11 09:31, zany wrote:
>> Quote character attributes look like the perfect solution to this.
>> Clean and easy customizable.
>> I just tried this (using an asciidoc.conf file) and it works as
>> expected.
>
> I've committed a patch to the trunk (with en and de quotes):
> http://code.google.com/p/asciidoc/source/detail?r=895be0df73b9a1d3b85bf463e319eef158ce7ca9
>
> Other language speakers please submit relevant patches for the lang-*.conf
> files.
>

Hi all,

I suggest patch attached to message for russian and ukrainian
languages.

Diff consist of quotes addon to lang-ru.conf and configuration for
ukrainian. As single quotes AFAIK almost not used in Ukraine and Russia
(except for some very rare conditions) i commented them.

Suggestions and comments are welcome.

--
WBR Lavruschenko Oleksandr

quotes-ru-and-langconf-uk.diff

Stuart Rackham

unread,
Jan 30, 2011, 5:04:24 PM1/30/11
to asci...@googlegroups.com
Hi Oleksandr

Thanks for the patch, I've committed it to the trunk:

http://code.google.com/p/asciidoc/source/detail?r=9e3ec54fd3c42f6faf5217f6d9180abd60ad9e1b

I've also:
- Added a uk language test (check that I've cut and pasted the uk section titles
correctly).
- In lieu of inline explanation dropped commented out quote attributes.
- Normalized lang-uk.conf attribution text.

http://code.google.com/p/asciidoc/source/detail?r=22271da37aa1a826866620b64477fe5f43cc45b9

I've also Renamed lsq, rsq, ldq, rdq attributes to lsquo, rsquo, ldquo, rdquo to
bring them in line with Unicode naming conventions and to make their
purpose more obvious:

http://code.google.com/p/asciidoc/source/detail?r=3894dca2409cfcce675a61b216f216ce10bea1c4


Cheers, Stuart

Kpykcъ

unread,
Feb 4, 2011, 9:08:30 AM2/4/11
to asci...@googlegroups.com
On Mon, 31 Jan 2011, Stuart Rackham wrote:

> Hi Oleksandr
>
> Thanks for the patch, I've committed it to the trunk:
>
> http://code.google.com/p/asciidoc/source/detail?r=9e3ec54fd3c42f6faf5217f6d9180abd60ad9e1b
>
> I've also:
> - Added a uk language test (check that I've cut and pasted the uk section
> titles correctly).

Hi,

I'm sorry, i found that i missed to translate Annotation in ukrainian
conf.

So i attached translation diff, to lang-uk.conf and test file.

Sorry again.

--
WBR Lavruschenko Oleksandr

lang-uk-fix-annotation.diff

Kpykcъ

unread,
Feb 4, 2011, 9:12:13 AM2/4/11
to asci...@googlegroups.com
On Fri, 4 Feb 2011, KpykcО©╫ wrote:

> I'm sorry, i found that i missed to translate Annotation in ukrainian conf.

I mean "Abstract".

--
WBR Lavruschenko Oleksandr

Yves-Alexis Perez

unread,
Feb 4, 2011, 11:17:23 AM2/4/11
to asci...@googlegroups.com
On jeu., 2011-01-27 at 10:51 +1300, Stuart Rackham wrote:
>
> On 27/01/11 09:31, zany wrote:
> > Quote character attributes look like the perfect solution to this.
> > Clean and easy customizable.
> > I just tried this (using an asciidoc.conf file) and it works as
> > expected.
>
> I've committed a patch to the trunk (with en and de quotes):
> http://code.google.com/p/asciidoc/source/detail?r=895be0df73b9a1d3b85bf463e319eef158ce7ca9
>
> Other language speakers please submit relevant patches for the
> lang-*.conf files.
>
Here's the lang-fr.conf one.

Regards,
--
Yves-Alexis

french-quotes.patch

Stuart Rackham

unread,
Feb 4, 2011, 2:18:49 PM2/4/11
to asci...@googlegroups.com

Stuart Rackham

unread,
Feb 4, 2011, 2:25:48 PM2/4/11
to asci...@googlegroups.com

Thank you Yves-Alexis. Committed to trunk:
http://code.google.com/p/asciidoc/source/detail?r=e746906343943e5dbe5221c30778abd6ade19811


Cheers, Stuart


>
> Regards,

Reply all
Reply to author
Forward
0 new messages