From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: Bibliography in MKIV, custom rendering
Date: Tue, 1 Aug 2017 16:26:51 +0200 [thread overview]
Message-ID: <b3458be1-8ccd-ef75-2615-42620f8adfda@wxs.nl> (raw)
In-Reply-To: <2235680.c66zc2aTri@gump>
On 7/31/2017 9:28 PM, Gerion Entrup wrote:
> Am Montag, 31. Juli 2017, 04:23:16 CEST schrieb Gerion Entrup:
>> Hi,
>>
>> I need your help again. I've a bibliography and some entries references to
>> websites. Unfortunately the URL is not always rendered and the name ist always
>> parsed as name of a person, not from an organisation etc.
>>
>> What I want to achieve is to use the standard aps style, but with additionally
>> the following two rules:
>> 1. The name is always rendered without abbrevations (I guess, this is
>> authorconversion=normal).
>> 2. If an URL is given, it is always rendered.
>>
>> My input is a bib-file. Here is a minimal example:
>>
>> input.bib
>> ```
>> @misc{objective-c,
>> author = "Apple Inc.",
>> note = "Online; accessed at 31-July-2017",
>> title = "About Objective-C",
>> url = "https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html",
>> year = "2014"
>> }
>> ```
>>
>> test.tex
>> ```
>> \usebtxdataset[default][input.bib]
>> \usebtxdefinitions[aps]
>> \setupbtx[default:cite][alternative=num]
>> \setupbtx[default:list][authorconversion=normal]
>>
>> \starttext
>> According to Apple Inc., Objective-C is the main programming language, when writing software for MacOS~\cite[objective-c].
>>
>> \placelistofpublications
>> \stoptext
>> ```
>>
>> I've tried to understand the manual, yout can see some of my attempts in the
>> minimal example. But I don't get really far.
>>
>> Can you give me a hint?
>
> I have "fixed" this with directly modifying the publ-imp-aps.mkvi. I guess,
> this is the worst way to achive this thing, but I don't know a better one.
>
> Here is the patch, if someone is interested.
>
> Gerion
>
> --- publ-imp-aps.mkvi.original 2017-07-31 21:23:14.736856430 +0200
> +++ publ-imp-aps.mkvi 2017-07-31 21:24:46.860462851 +0200
> @@ -58,7 +58,7 @@
> \definebtx
> [aps:\s!list]
> [aps]
> - [\c!authorconversion=normalshort]
> + [\c!authorconversion=normal]
>
> \definebtx
> [aps:\s!list:author]
> @@ -1117,6 +1117,12 @@
>
> \startsetups btx:aps:list:misc
> \fastsetup{btx:aps:list:electronic}
> + \btxdoif {url} {
> + \btxspace
> + \btxleftparenthesis
> + \goto{\hyphenatedurl{\btxflush{url}}}[url(\btxflush{url})]
> + \btxrightparenthesis
> + }
> % Note that organization is an "ignored" field.
> \stopsetups
just load the aps style and then in your own style put the overloads
(you can then use \setupbtx)
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2017-08-01 14:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 2:23 Gerion Entrup
2017-07-31 19:28 ` Gerion Entrup
2017-08-01 14:26 ` Hans Hagen [this message]
2017-08-11 14:01 Alan Braslau
2017-08-11 18:58 ` Rik Kabel
2017-08-12 8:54 ` Hans Hagen
2017-08-12 15:28 ` Rik Kabel
2017-08-12 15:48 ` Rik Kabel
2017-08-12 16:10 ` Hans Hagen
2017-08-13 2:38 ` Alan Braslau
2017-08-13 3:13 ` Rik Kabel
2017-08-13 7:34 ` Hans Hagen
2017-08-14 2:50 ` Alan Braslau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3458be1-8ccd-ef75-2615-42620f8adfda@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).