Re: [NTG-context] bibliography authoryears problem
On Dec 4, 2009, at 3:00 AM, ntg-context-request@ntg.nl wrote:
Message: 4 Date: Fri, 04 Dec 2009 09:23:13 +0100 From: Taco Hoekwater
To: mailing list for ConTeXt users Subject: Re: [NTG-context] bibliography authoryears problem Message-ID: <4B18C6F1.5090803@elvenkind.com> Content-Type: text/plain; charset=ISO-8859-1 Hi,
Michael Green wrote:
When using refcommand=authoryears and Mk IV the first reference is formatted incorrectly.
There is the left parenthesis, then a line break, then the rest of the reference followed by the right parenthesis.
Here is the cause: the first \cite in mkiv internally runs \usepublications[\jobname]. This inputs bib-test.bbl, which contains a \par, and that is where the new line comes from.
A workaround is to add
\usepublications[\jobname]
in the document preamble.
It works in mkii because in mkii, that command is executed at \starttext.
For Hans: perhaps \usemodule[bib] should run the command? I know that is supposed to be obsolete, but I assume you do not want to use the odd logic from mkii in mkiv.
Best wishes, Taco
That solves both the problems I noted. Thanks! mjg
Michael Green wrote:
On Dec 4, 2009, at 3:00 AM, ntg-context-request@ntg.nl wrote:
Message: 4 Date: Fri, 04 Dec 2009 09:23:13 +0100 From: Taco Hoekwater
To: mailing list for ConTeXt users Subject: Re: [NTG-context] bibliography authoryears problem Message-ID: <4B18C6F1.5090803@elvenkind.com> Content-Type: text/plain; charset=ISO-8859-1 Hi,
Michael Green wrote:
When using refcommand=authoryears and Mk IV the first reference is formatted incorrectly.
There is the left parenthesis, then a line break, then the rest of the reference followed by the right parenthesis.
Here is the cause: the first \cite in mkiv internally runs \usepublications[\jobname]. This inputs bib-test.bbl, which contains a \par, and that is where the new line comes from.
A workaround is to add
\usepublications[\jobname]
in the document preamble.
It works in mkii because in mkii, that command is executed at \starttext.
For Hans: perhaps \usemodule[bib] should run the command? I know that is supposed to be obsolete, but I assume you do not want to use the odd logic from mkii in mkiv.
Best wishes, Taco
That solves both the problems I noted. Thanks!
\unprotect \def\dousepublications#1% {\doonlyonce{#1.\f!bibextension} {\let\@@savedpar\par \let\par\ignorespaces \ifhmode\kern\zeropoint\fi \readfile{#1.\f!bibextension} {\showmessage\m!publications{4}{#1.\f!bibextension}} {\showmessage\m!publications{2}{#1.\f!bibextension}}% \ifhmode\removeunwantedspaces\fi \let\par\@@savedpar}} \protect should also work ... the reason for the automatic loading is that it circumvents problems with projects, products, components etc where settings can come after teh first starttext so that's not the best hook then of course implicit loading as suggested by taco is the best ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 04.12.2009 um 19:32 schrieb Hans Hagen:
\def\dousepublications#1% {\doonlyonce{#1.\f!bibextension} {\let\@@savedpar\par \let\par\ignorespaces \ifhmode\kern\zeropoint\fi \readfile{#1.\f!bibextension} {\showmessage\m!publications{4}{#1.\f!bibextension}} {\showmessage\m!publications{2}{#1.\f!bibextension}}% \ifhmode\removeunwantedspaces\fi \let\par\@@savedpar}}
why not \let\par\normalpar Wolfgang
Wolfgang Schuster wrote:
Am 04.12.2009 um 19:32 schrieb Hans Hagen:
\def\dousepublications#1% {\doonlyonce{#1.\f!bibextension} {\let\@@savedpar\par \let\par\ignorespaces \ifhmode\kern\zeropoint\fi \readfile{#1.\f!bibextension} {\showmessage\m!publications{4}{#1.\f!bibextension}} {\showmessage\m!publications{2}{#1.\f!bibextension}}% \ifhmode\removeunwantedspaces\fi \let\par\@@savedpar}}
why not \let\par\normalpar
actually i had that but then i was not sure if par might have been redefined as a \cite command can occure anywhere; it's also why we cannot use grouping ... or use \startnointerference \globaldefs\plusone ... \stopnointerference actually, it's not the \startpublication that is the problem as we can add \ignorespaces at the end, or use tricks that need grouping as they are defined global anyway, but it's the \setuppublciations in the bbl file that interferes Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Michael Green
-
Wolfgang Schuster