public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* citations localization question
@ 2015-01-28 17:09 Jan Ulrich Hasecke
       [not found] ` <54C917D0.7010900-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Ulrich Hasecke @ 2015-01-28 17:09 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi,

I thought that I had understood how it works, but now I am confused.

When I point to a page in a citation like this

Blah blah [@doe99, p 33]

I want to see the german translation "S. 33" or "Seite 33" in my book.

I thought that it would suffice to use a german csl-style, but somehow
it does not work like this. "p." is used.

But it works like this (which is even better):

Blah blah [@doe99, Seite 33]

becomes

... S. 33

in the citation with my current CSL.

I thought that we always had to use the english abbreviation p. to
achieve this.

Can somebody shed some light on this?

Is there a list of words we can use? Or does it depend on the CSL-file
you use?

There are some other strange things though:

[@doe, Seite 22, 33-44, Kapitel 4]

becomes

... S. 22, 33-44, Kapitel 4

[@doe, Kapitel 4, Seite 22, 33-44]

becomes

... Kap. 4, Seite 22, 33-44

TIA
juh



-- 
Software-Dokumentation mit Sphinx
http://www.amazon.de/dp/1497448689/
Paperback: 224 Seiten


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

* Re: citations localization question
       [not found] ` <54C917D0.7010900-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
@ 2015-01-30 22:19   ` nickbart1980-Re5JQEeQqe8AvxtiuMwx3w
       [not found]     ` <91d573a8-137e-4b3f-8958-b22150db7479-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: nickbart1980-Re5JQEeQqe8AvxtiuMwx3w @ 2015-01-30 22:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw; +Cc: juh+pandoc-cl+VPiYnx/1AfugRpC6u6w


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

Well, adding `locale: de-DE` to the YAML metadata block, at least when 
using apa.csl, seems to lead to the expected localization:

```
pandoc -s -F pandoc-citeproc -t markdown-citations <<EOT

Foo [@doe1, 28].  
Foo [@doe1, p. 28].  
Foo [@doe1, S. 28].  
Foo [@doe1, Seite 28].  
Foo [@doe1, ch. 28].  
Foo [@doe1, chapter 28].  
Foo [@doe1, Kap. 28].  
Foo [@doe1, Kapitel 28].  
Foo [@doe1, § 28].


# References {-}

---
locale: de-DE
#locale: fr-FR
#locale: it-IT
csl: apa.csl
references:
- author:
  - family: Doe
    given: Ann
  id: doe1
  issued:
    date-parts:
    - - 1999
  title: Title
  type: book
...
EOT
```

Output:

```
---
csl: 'apa.csl'
locale: 'de-DE'
references:
- author:
  - family: Doe
    given: Ann
  id: doe1
  issued:
    date-parts:
    - - 1999
  title: Title
  type: book
...

Foo (Doe, 1999, S. 28).\
Foo (Doe, 1999, p. 28).\
Foo (Doe, 1999, S. 28).\
Foo (Doe, 1999, S. 28).\
Foo (Doe, 1999, ch. 28).\
Foo (Doe, 1999, chapter 28).\
Foo (Doe, 1999, Kapitel 28).\
Foo (Doe, 1999, Kapitel 28).\
Foo (Doe, 1999, Abschn. 28).

<div class="references">

References {#references .unnumbered}
==========

Doe, A. (1999). *Title*.

</div>
```

So, whether there is nothing in front of the page number, or "S.", or 
"Seite", this is rendered as "S." (but *not* if it's "p."), "Kap." is 
expanded to "Kapitel", and "§" to "Abschn.".

@jgm: is this documented anywhere? I seem to remember that some aspects of 
this were discussed quite a while ago, but cannot locate any such 
discussion now, nor can I find anything relevant the source.



On Wednesday, 28 January 2015 17:09:40 UTC, Jan Ulrich Hasecke wrote:
>
> Hi, 
>
> I thought that I had understood how it works, but now I am confused. 
>
> When I point to a page in a citation like this 
>
> Blah blah [@doe99, p 33] 
>
> I want to see the german translation "S. 33" or "Seite 33" in my book. 
>
> I thought that it would suffice to use a german csl-style, but somehow 
> it does not work like this. "p." is used. 
>
> But it works like this (which is even better): 
>
> Blah blah [@doe99, Seite 33] 
>
> becomes 
>
> ... S. 33 
>
> in the citation with my current CSL. 
>
> I thought that we always had to use the english abbreviation p. to 
> achieve this. 
>
> Can somebody shed some light on this? 
>
> Is there a list of words we can use? Or does it depend on the CSL-file 
> you use? 
>
> There are some other strange things though: 
>
> [@doe, Seite 22, 33-44, Kapitel 4] 
>
> becomes 
>
> ... S. 22, 33-44, Kapitel 4 
>
> [@doe, Kapitel 4, Seite 22, 33-44] 
>
> becomes 
>
> ... Kap. 4, Seite 22, 33-44 
>
> TIA 
> juh 
>
>
>
> -- 
> Software-Dokumentation mit Sphinx 
> http://www.amazon.de/dp/1497448689/ 
> Paperback: 224 Seiten 
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/91d573a8-137e-4b3f-8958-b22150db7479%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: citations localization question
       [not found]     ` <91d573a8-137e-4b3f-8958-b22150db7479-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-01-30 23:14       ` John MacFarlane
       [not found]         ` <20150130231409.GA2430-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2015-01-30 23:14 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ nickbart1980-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [Jan 30 15 14:19 ]:
>   Well, adding `locale: de-DE` to the YAML metadata block, at least when
>   using apa.csl, seems to lead to the expected localization:

>   So, whether there is nothing in front of the page number, or "S.", or
>   "Seite", this is rendered as "S." (but *not* if it's "p."), "Kap." is
>   expanded to "Kapitel", and "§" to "Abschn.".
>   @jgm: is this documented anywhere? I seem to remember that some aspects
>   of this were discussed quite a while ago, but cannot locate any such
>   discussion now, nor can I find anything relevant the source.

This changed quite a while back. Andrea's original locator parsing was pretty simplistic; it worked well for Italian and English because the locators tended to start with the same letter, but not so well for German and other languages; you just had to use English locators.

So I switched things to use the locators defined in the locale.

See `locales/locales-de-DE.xml`, in particular this section, which should explain everything you're seeing.  The expansions have to do with the CSL style ("Abschn." is the short form, which apparently the style calls for), but all of these forms should be *recognized* as locators.


    <!-- LONG LOCATOR FORMS -->
    <term name="book">
      <single>Buch</single>
      <multiple>Bücher</multiple>
    </term>
    <term name="chapter">
      <single>Kapitel</single>
      <multiple>Kapitel</multiple>
    </term>
    <term name="column">
      <single>Spalte</single>
      <multiple>Spalten</multiple>
    </term>
    <term name="figure">
      <single>Abbildung</single>
      <multiple>Abbildungen</multiple>
    </term>
    <term name="folio">
      <single>Blatt</single>
      <multiple>Blätter</multiple>
    </term>
    <term name="issue">
      <single>Nummer</single>
      <multiple>Nummern</multiple>
    </term>
    <term name="line">
      <single>Zeile</single>
      <multiple>Zeilen</multiple>
    </term>
    <term name="note">
      <single>Note</single>
      <multiple>Noten</multiple>
    </term>
    <term name="opus">
      <single>Opus</single>
      <multiple>Opera</multiple>
    </term>
    <term name="page">
      <single>Seite</single>
      <multiple>Seiten</multiple>
    </term>
    <term name="number-of-pages">
      <single>Seite</single>
      <multiple>Seiten</multiple>
    </term>
    <term name="paragraph">
      <single>Absatz</single>
      <multiple>Absätze</multiple>
    </term>
    <term name="part">
      <single>Teil</single>
      <multiple>Teile</multiple>
    </term>
    <term name="section">
      <single>Abschnitt</single>
      <multiple>Abschnitte</multiple>
    </term>
    <term name="sub verbo">
      <single>sub verbo</single>
      <multiple>sub verbis</multiple>
    </term>
    <term name="verse">
      <single>Vers</single>
      <multiple>Verse</multiple>
    </term>
    <term name="volume">
      <single>Band</single>
      <multiple>Bände</multiple>
    </term>

    <!-- SHORT LOCATOR FORMS -->
    <term name="book" form="short">B.</term>
    <term name="chapter" form="short">Kap.</term>
    <term name="column" form="short">Sp.</term>
    <term name="figure" form="short">Abb.</term>
    <term name="folio" form="short">Fol.</term>
    <term name="issue" form="short">Nr.</term>
    <term name="line" form="short">Z.</term>
    <term name="note" form="short">N.</term>
    <term name="opus" form="short">op.</term>
    <term name="page" form="short">
      <single>S.</single>
      <multiple>S.</multiple>
    </term>
    <term name="number-of-pages" form="short">
      <single>S.</single>
      <multiple>S.</multiple>
    </term>
    <term name="paragraph" form="short">Abs.</term>
    <term name="part" form="short">Teil</term>
    <term name="section" form="short">Abschn.</term>
    <term name="sub verbo" form="short">
      <single>s.v.</single>
      <multiple>s.vv.</multiple>
    </term>
    <term name="verse" form="short">
      <single>V.</single>
      <multiple>V.</multiple>
    </term>
    <term name="volume" form="short">
      <single>Bd.</single>
      <multiple>Bde.</multiple>
    </term>

    <!-- SYMBOL LOCATOR FORMS -->
    <term name="paragraph" form="symbol">
      <single>¶</single>
      <multiple>¶¶</multiple>
    </term>
    <term name="section" form="symbol">
      <single>§</single>
      <multiple>§§</multiple>
    </term>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20150130231409.GA2430%40protagoras.berkeley.edu.
For more options, visit https://groups.google.com/d/optout.


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

* Re: citations localization question
       [not found]         ` <20150130231409.GA2430-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
@ 2015-01-31 13:24           ` Jan Ulrich Hasecke
       [not found]             ` <54CCD79E.2030308-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Ulrich Hasecke @ 2015-01-31 13:24 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Am 31.01.2015 um 00:14 schrieb John MacFarlane:
> +++ nickbart1980-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [Jan 30 15 14:19 ]:
>>   Well, adding `locale: de-DE` to the YAML metadata block, at least when
>>   using apa.csl, seems to lead to the expected localization:

With locale: de-DE I get the same result as nickbart1980.

> See `locales/locales-de-DE.xml`, in particular this section, which
> should explain everything you're seeing.  The expansions have to do with
> the CSL style ("Abschn." is the short form, which apparently the style
> calls for), but all of these forms should be *recognized* as locators.
> 
> 
>    <!-- LONG LOCATOR FORMS -->
>    <term name="book">
>      <single>Buch</single>
>      <multiple>Bücher</multiple>
>    </term>
>    <term name="chapter">
>      <single>Kapitel</single>
>      <multiple>Kapitel</multiple>
>    </term>
>    <term name="column">
>      <single>Spalte</single>
>      <multiple>Spalten</multiple>
>    </term>
>    <term name="figure">
>      <single>Abbildung</single>
>      <multiple>Abbildungen</multiple>
>    </term>
>    <term name="folio">
>      <single>Blatt</single>
>      <multiple>Blätter</multiple>
>    </term>
>    <term name="issue">
>      <single>Nummer</single>
>      <multiple>Nummern</multiple>
>    </term>
>    <term name="line">
>      <single>Zeile</single>
>      <multiple>Zeilen</multiple>
>    </term>
>    <term name="note">
>      <single>Note</single>
>      <multiple>Noten</multiple>
>    </term>
>    <term name="opus">
>      <single>Opus</single>
>      <multiple>Opera</multiple>
>    </term>
>    <term name="page">
>      <single>Seite</single>
>      <multiple>Seiten</multiple>
>    </term>
>    <term name="number-of-pages">
>      <single>Seite</single>
>      <multiple>Seiten</multiple>
>    </term>
>    <term name="paragraph">
>      <single>Absatz</single>
>      <multiple>Absätze</multiple>
>    </term>
>    <term name="part">
>      <single>Teil</single>
>      <multiple>Teile</multiple>
>    </term>
>    <term name="section">
>      <single>Abschnitt</single>
>      <multiple>Abschnitte</multiple>
>    </term>
>    <term name="sub verbo">
>      <single>sub verbo</single>
>      <multiple>sub verbis</multiple>
>    </term>
>    <term name="verse">
>      <single>Vers</single>
>      <multiple>Verse</multiple>
>    </term>
>    <term name="volume">
>      <single>Band</single>
>      <multiple>Bände</multiple>
>    </term>
> 
>    <!-- SHORT LOCATOR FORMS -->
>    <term name="book" form="short">B.</term>
>    <term name="chapter" form="short">Kap.</term>
>    <term name="column" form="short">Sp.</term>
>    <term name="figure" form="short">Abb.</term>
>    <term name="folio" form="short">Fol.</term>
>    <term name="issue" form="short">Nr.</term>
>    <term name="line" form="short">Z.</term>
>    <term name="note" form="short">N.</term>
>    <term name="opus" form="short">op.</term>
>    <term name="page" form="short">
>      <single>S.</single>
>      <multiple>S.</multiple>
>    </term>
>    <term name="number-of-pages" form="short">
>      <single>S.</single>
>      <multiple>S.</multiple>
>    </term>
>    <term name="paragraph" form="short">Abs.</term>
>    <term name="part" form="short">Teil</term>
>    <term name="section" form="short">Abschn.</term>
>    <term name="sub verbo" form="short">
>      <single>s.v.</single>
>      <multiple>s.vv.</multiple>
>    </term>
>    <term name="verse" form="short">
>      <single>V.</single>
>      <multiple>V.</multiple>
>    </term>
>    <term name="volume" form="short">
>      <single>Bd.</single>
>      <multiple>Bde.</multiple>
>    </term>
> 
>    <!-- SYMBOL LOCATOR FORMS -->
>    <term name="paragraph" form="symbol">
>      <single>¶</single>
>      <multiple>¶¶</multiple>
>    </term>
>    <term name="section" form="symbol">
>      <single>§</single>
>      <multiple>§§</multiple>
>    </term>
> 

So these terms are the terms I can use in my citation? I want to
document the behavior and I would put them in a table for my readers, if
this is correct.

Just a last question about the mechanics.

All terms listed in locales/locales-de-DE.xml are evaluated by
pandoc-citeproc and modified according to the rules in a CSL file. Is
that correct?

In nickbart1980's example with apa.csl, 'Seite' and 'Seiten' would
become 'S.'. But why does it recognize a number alone as page number? Is
that a default?

TIA
juh

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/54CCD79E.2030308%40mailbox.org.
For more options, visit https://groups.google.com/d/optout.


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

* Re: citations localization question
       [not found]             ` <54CCD79E.2030308-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
@ 2015-01-31 19:16               ` John MacFarlane
  0 siblings, 0 replies; 5+ messages in thread
From: John MacFarlane @ 2015-01-31 19:16 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Jan Ulrich Hasecke [Jan 31 15 14:24 ]:
>So these terms are the terms I can use in my citation? I want to
>document the behavior and I would put them in a table for my readers, if
>this is correct.

Yes.

>Just a last question about the mechanics.
>
>All terms listed in locales/locales-de-DE.xml are evaluated by
>pandoc-citeproc and modified according to the rules in a CSL file. Is
>that correct?

Yes.

>In nickbart1980's example with apa.csl, 'Seite' and 'Seiten' would
>become 'S.'. But why does it recognize a number alone as page number? Is
>that a default?

Yes, it's a default.


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

end of thread, other threads:[~2015-01-31 19:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 17:09 citations localization question Jan Ulrich Hasecke
     [not found] ` <54C917D0.7010900-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2015-01-30 22:19   ` nickbart1980-Re5JQEeQqe8AvxtiuMwx3w
     [not found]     ` <91d573a8-137e-4b3f-8958-b22150db7479-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-30 23:14       ` John MacFarlane
     [not found]         ` <20150130231409.GA2430-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2015-01-31 13:24           ` Jan Ulrich Hasecke
     [not found]             ` <54CCD79E.2030308-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2015-01-31 19:16               ` John MacFarlane

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