ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* i18n in BibTeX
@ 2005-09-25 21:02 Adam Duck
  2005-09-25 22:03 ` Mojca Miklavec
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Duck @ 2005-09-25 21:02 UTC (permalink / raw)


So, I've stumbled across a problem: if you have only two authors in a
BibTeX entry, cont-au.bst sets "AuthorA and AuthorB" which is -- IMHO
-- unaccaptable for a german document.  I had to manually edit
cont-au.bst and change a line in

FUNCTION {format.lab.names}
{ 's :=
  s #1 "{vv~}{ll}" format.name$
  s num.names$ duplicate$
  #2 >
    { pop$ " et~al." * }
    { #2 <
        'skip$
        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
            { " et~al." * }
            { " and " * s #2 "{vv~}{ll}" format.name$ * }
          if$
        }
      if$
    }
  if$
  "{" swap$ * "}," *
}

from "and" to "und".  Is there a cleaner way?  If I typeset an english
document now, I'll get an "und"...

bye, Adam.

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

* Re: i18n in BibTeX
  2005-09-25 21:02 i18n in BibTeX Adam Duck
@ 2005-09-25 22:03 ` Mojca Miklavec
  2005-09-25 23:45   ` Adam Duck
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mojca Miklavec @ 2005-09-25 22:03 UTC (permalink / raw)


Adam Duck wrote:
> So, I've stumbled across a problem: if you have only two authors in a
> BibTeX entry, cont-au.bst sets "AuthorA and AuthorB" which is -- IMHO
> -- unaccaptable for a german document.  I had to manually edit
> cont-au.bst and change a line in
/.../
> from "and" to "und".  Is there a cleaner way?  If I typeset an english
> document now, I'll get an "und"...

Take a look at bibl-apa.tex and bibl-aps.tex.

Depending on what kind of citing you use, you may say something like
	\setupcite[authoryear][lastpubsep={ und }]
and for all the other citing modes the same.

However, there are many hard coded English words present in the style 
(in contrast to the rest of ConTeXt this doesn't support automatic 
language specific behaviour (yet?)). Since there are other specifics for 
German bibliography layout as well, it may even be a good idea to make 
your own style if this one is not OK for you. It's much easier (and 
extremely user-friendly) to modify the layout in Taco's module than 
changing the .bst files.


Since there is already a discussion on this topic:
Someone on "TeX Stammtisch München" asked if it would be possible to use 
an additional field language=something within BibTeX entries, which 
would typeset the authors, titles, ... and everything else in the 
language specified, so that hyphenation are OK and possibly some other 
stuff as well. They stated it approximately like that: "if someone is 
writing a document in Arabic script and wants to cite a German book, 
"publisher", "thesis", "volume", ... must remain in Arabic, but the 
language=de/german field should turn all the German language specifics 
on (writing direction, fonts, hyphenation, ...)".

He mentioned a flavour of BibTeX modification that does that, but I 
don't remember which one. The main problem is that most BibTeX packages 
are not aware of any language other than English and those that are, 
don't offer as wide range of possibilities as the others (shortly: you 
can't combine a fancy BibTeX style and language awareness in LaTeX).


To make this work \insertWhatevers (and much more) should probably be 
redefined to obey language specific behaviour for both the global 
document language and the language specified in the bib Entry if any, 
but I'm afraid that there are also some other tricky details behind.


Mojca

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

* Re: i18n in BibTeX
  2005-09-25 22:03 ` Mojca Miklavec
@ 2005-09-25 23:45   ` Adam Duck
  2005-09-26  6:03     ` Mojca Miklavec
  2005-09-26  7:01     ` Taco Hoekwater
  2005-09-26  6:39   ` r.ermers
  2005-09-26 11:17   ` Taco Hoekwater
  2 siblings, 2 replies; 8+ messages in thread
From: Adam Duck @ 2005-09-25 23:45 UTC (permalink / raw)


Mojca Miklavec <mojca.miklavec.lists@gmail.com> writes:

> Adam Duck wrote:
>
>> So, I've stumbled across a problem: if you have only two authors in a
>> BibTeX entry, cont-au.bst sets "AuthorA and AuthorB" which is -- IMHO
>> -- unaccaptable for a german document.  I had to manually edit
>> cont-au.bst and change a line in
> /.../
>> from "and" to "und".  Is there a cleaner way?  If I typeset an english
>> document now, I'll get an "und"...
>
> Take a look at bibl-apa.tex and bibl-aps.tex.
>
> Depending on what kind of citing you use, you may say something like
> 	\setupcite[authoryear][lastpubsep={ und }]
> and for all the other citing modes the same.
>
< 38 lines deleted by Adam Duck >

Yes, this I've done and it works.  But that's not the problem I was
referring to.  `lastpubsep' is used if you have more than one paper to
refer to in the same \cite-command (\cite[paperA,paperB]) but it is
_not_ used if a paper has only two authors (\cite[paperC]).

I've seen some language specific functions in geralpha.bst.  Perhaps I
should dive into it a bit...  But I don't really understand bst-syntax
:).

bye, Adam.

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

* Re: i18n in BibTeX
  2005-09-25 23:45   ` Adam Duck
@ 2005-09-26  6:03     ` Mojca Miklavec
  2005-09-26  7:01     ` Taco Hoekwater
  1 sibling, 0 replies; 8+ messages in thread
From: Mojca Miklavec @ 2005-09-26  6:03 UTC (permalink / raw)


Adam Duck wrote:
> Mojca Miklavec writes:
> > Adam Duck wrote:
> >
> >> So, I've stumbled across a problem: if you have only two authors in a
> >> BibTeX entry, cont-au.bst sets "AuthorA and AuthorB" which is -- IMHO
> >> -- unaccaptable for a german document.  I had to manually edit
> >> cont-au.bst and change a line in
> > /.../
> >> from "and" to "und".  Is there a cleaner way?  If I typeset an english
> >> document now, I'll get an "und"...
> >
> > Take a look at bibl-apa.tex and bibl-aps.tex.
> >
> > Depending on what kind of citing you use, you may say something like
> >       \setupcite[authoryear][lastpubsep={ und }]
> > and for all the other citing modes the same.
> >
> < 38 lines deleted by Adam Duck >
>
> Yes, this I've done and it works.  But that's not the problem I was
> referring to.  `lastpubsep' is used if you have more than one paper to
> refer to in the same \cite-command (\cite[paperA,paperB]) but it is
> _not_ used if a paper has only two authors (\cite[paperC]).

Sorry, my mistake. Does \setuppublicationlist[lastnamesep={ und }]
solve the problem?
(But English words are spread over the whole bibl-*.tex file, so there
are surely much more strings to modify.)

> I've seen some language specific functions in geralpha.bst.  Perhaps I
> should dive into it a bit...  But I don't really understand bst-syntax
> :).

I've heard many people complaining about unreadability of bst. The
nice part of ConTeXt bib module is that you generally don't have to
understand/modify it except for very special purposes.If I understood
it properly, you only have to modify .bst in case you have weird
entries & fields in .bib format and you don't want to ignore them. If
you write bibliography directly in ConTeXt, it's more user friendly.

Mojca

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

* Re: i18n in BibTeX
  2005-09-25 22:03 ` Mojca Miklavec
  2005-09-25 23:45   ` Adam Duck
@ 2005-09-26  6:39   ` r.ermers
  2005-09-26 20:35     ` Adam Duck
  2005-09-26 11:17   ` Taco Hoekwater
  2 siblings, 1 reply; 8+ messages in thread
From: r.ermers @ 2005-09-26  6:39 UTC (permalink / raw)


Hello Adam,

Why not save the document as cont.au-de.bst and use it when you write
German. When you need the English version, you simply switch back to
cont.au.bst?

The adaptations in the bst file are not many, unless you want to change
the commas and periods as well.

The only serious problem I encounter now is the language of the notes that
are printed in the bibliography.

Regards,

Robert



Op Ma, 26 september, 2005 12:03 am schreef Mojca Miklavec:
> Adam Duck wrote:
>
>> So, I've stumbled across a problem: if you have only two authors in a
>> BibTeX entry, cont-au.bst sets "AuthorA and AuthorB" which is -- IMHO
>> -- unaccaptable for a german document.  I had to manually edit
>> cont-au.bst and change a line in
> /.../
>
>> from "and" to "und".  Is there a cleaner way?  If I typeset an english
>> document now, I'll get an "und"...
>
> Take a look at bibl-apa.tex and bibl-aps.tex.
>
>
> Depending on what kind of citing you use, you may say something like
> \setupcite[authoryear][lastpubsep={ und }]
> and for all the other citing modes the same.
>
> However, there are many hard coded English words present in the style
> (in contrast to the rest of ConTeXt this doesn't support automatic
> language specific behaviour (yet?)). Since there are other specifics for
> German bibliography layout as well, it may even be a good idea to make
> your own style if this one is not OK for you. It's much easier (and
> extremely user-friendly) to modify the layout in Taco's module than
> changing the .bst files.
>
>
> Since there is already a discussion on this topic:
> Someone on "TeX Stammtisch München" asked if it would be possible to use
> an additional field language=something within BibTeX entries, which would
> typeset the authors, titles, ... and everything else in the language
> specified, so that hyphenation are OK and possibly some other stuff as
> well. They stated it approximately like that: "if someone is writing a
> document in Arabic script and wants to cite a German book, "publisher",
> "thesis", "volume", ... must remain in Arabic, but the
> language=de/german field should turn all the German language specifics on
> (writing direction, fonts, hyphenation, ...)".
>
>
> He mentioned a flavour of BibTeX modification that does that, but I
> don't remember which one. The main problem is that most BibTeX packages are
> not aware of any language other than English and those that are, don't
> offer as wide range of possibilities as the others (shortly: you can't
> combine a fancy BibTeX style and language awareness in LaTeX).
>
>
> To make this work \insertWhatevers (and much more) should probably be
> redefined to obey language specific behaviour for both the global document
> language and the language specified in the bib Entry if any, but I'm
> afraid that there are also some other tricky details behind.
>
>
> Mojca
> _______________________________________________
> ntg-context mailing list ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
>

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

* Re: i18n in BibTeX
  2005-09-25 23:45   ` Adam Duck
  2005-09-26  6:03     ` Mojca Miklavec
@ 2005-09-26  7:01     ` Taco Hoekwater
  1 sibling, 0 replies; 8+ messages in thread
From: Taco Hoekwater @ 2005-09-26  7:01 UTC (permalink / raw)



Hi Adam,

Hold on. A patch is coming (in a day or so)

Taco
Adam Duck wrote:
> 
> I've seen some language specific functions in geralpha.bst.  Perhaps I
> should dive into it a bit...  But I don't really understand bst-syntax
> :).

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

* Re: i18n in BibTeX
  2005-09-25 22:03 ` Mojca Miklavec
  2005-09-25 23:45   ` Adam Duck
  2005-09-26  6:39   ` r.ermers
@ 2005-09-26 11:17   ` Taco Hoekwater
  2 siblings, 0 replies; 8+ messages in thread
From: Taco Hoekwater @ 2005-09-26 11:17 UTC (permalink / raw)



Hi Mojca,

Mojca Miklavec wrote:
> 
> However, there are many hard coded English words present in the style 
> (in contrast to the rest of ConTeXt this doesn't support automatic 
> language specific behaviour (yet?)). 

True, because ...

> Since there are other specifics for 
> German bibliography layout as well, it may even be a good idea to make 
> your own style if this one is not OK for you. 

of this.

I thought there would not be much point in adding lots of labeltexts,
when the actual punctuation probably needs changes as well. Also, I
am a tad concerned about adding too many configuration layers.

> It's much easier (and 
> extremely user-friendly) to modify the layout in Taco's module than 
> changing the .bst files.

Thanks!

> Since there is already a discussion on this topic:
> Someone on "TeX Stammtisch München" asked if it would be possible to use 
> an additional field language=something within BibTeX entries, which 
> would typeset the authors, titles, ... and everything else in the 
> language specified, so that hyphenation are OK and possibly some other 
> stuff as well. They stated it approximately like that: "if someone is 
> writing a document in Arabic script and wants to cite a German book, 
> "publisher", "thesis", "volume", ... must remain in Arabic, but the 
> language=de/german field should turn all the German language specifics 
> on (writing direction, fonts, hyphenation, ...)".

The bst files in fact support the language= field. I just have to add
the macro code to do something useful with it.

> He mentioned a flavour of BibTeX modification that does that, but I 
> don't remember which one. The main problem is that most BibTeX packages 
> are not aware of any language other than English and those that are, 
> don't offer as wide range of possibilities as the others (shortly: you 
> can't combine a fancy BibTeX style and language awareness in LaTeX).

MlBibTeX has a way of dealing with multi-linguality of references,
but I do not know precisely what that is without reading the manual.

For now, I will stick with 'normal' bibtex and move the language-
specific code from the bst to the bibl-XXX files, that has to be
sufficient for the short term.

Cheers, Taco

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

* Re: i18n in BibTeX
  2005-09-26  6:39   ` r.ermers
@ 2005-09-26 20:35     ` Adam Duck
  0 siblings, 0 replies; 8+ messages in thread
From: Adam Duck @ 2005-09-26 20:35 UTC (permalink / raw)


Hello R. :),

r.ermers@hccnet.nl writes:

> Hello Adam,
>
> Why not save the document as cont.au-de.bst and use it when you write
> German. When you need the English version, you simply switch back to
> cont.au.bst?
Oh yes...  That's so obvious I haven't thought of it :).

> The adaptations in the bst file are not many, unless you want to change
> the commas and periods as well.
No, the standards in typesetting are not that different from English.
Perhaps there's even an include-command...

> The only serious problem I encounter now is the language of the notes that
> are printed in the bibliography.
< 72 lines deleted by Adam Duck >
There are notes in the bibliography? ... Hmm...

cu, Adam.

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

end of thread, other threads:[~2005-09-26 20:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-25 21:02 i18n in BibTeX Adam Duck
2005-09-25 22:03 ` Mojca Miklavec
2005-09-25 23:45   ` Adam Duck
2005-09-26  6:03     ` Mojca Miklavec
2005-09-26  7:01     ` Taco Hoekwater
2005-09-26  6:39   ` r.ermers
2005-09-26 20:35     ` Adam Duck
2005-09-26 11:17   ` Taco Hoekwater

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