* Creating one's own style
@ 2019-05-18 6:16 Dmitry Starostin
2019-05-18 20:37 ` Alan Braslau
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Starostin @ 2019-05-18 6:16 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 795 bytes --]
Thank you for the instructions on how to make one's own style.
I only need to change the formatting in the bibliography list, the
formatting of the notes in the text is entirely up to the requirement.
A strange effect (full MWE in attachment):
\btxdoifelse {address} {
{\btxspace \emdash \btxspace \btxflush{address} \btxcomma}
}
\btxdoifelse {year} {
{\btxspace \btxflush{year} \btxperiod}
}
gives "year 2000", but throw out the "address" part, and the year goes
straight without the 'year' part.
\btxdoifelse {year} {
{\btxspace \btxflush{year} \btxperiod}
}
if you add publisher between the address and the year, then it says
"publisher Brill"
\btxdoifelse {publisher} {
{\btxspace \btxflush{publisher} \btxcomma}
}
Where does it pull it up from?
[-- Attachment #1.2: Type: text/html, Size: 1827 bytes --]
[-- Attachment #2: Context_bib.tex --]
[-- Type: application/octet-stream, Size: 1489 bytes --]
\setuplanguage[ru]
\setupbodyfont[dejavu]
\mainlanguage[russian]
\startbuffer[bib]
@Book{Declercq:2000,
author = {Declercq, Georges},
title = {Anno Domini: The origins of the Christian era},
address = {Turnhout},
publisher = {Brill},
year = {2000},
shorttitle = {Anno Domini},
shorthand = {Declercq},
language = {english},
hyphenation = {english},
pagetotal = {206},
}
\stopbuffer
\usebtxdataset[default][bib.buffer]
%\loadbtxdefinitions[aps]
\loadbtxdefinitionfile[apa]
\usebtxdefinitions[apa]
\setupbtx[dataset=default]
\definebtxrendering[default][apa][specification=apa,sorttype=authoryear,numbering=no]
\setupindenting[big,yes]
\loadbtxdefinitionfile[apa]
\setbreakpoints[compound]
\setupbtx[apa:cite:authoryear][left={[},right={]}]
\startsetups btx:apa:list:book
\btxdoif {author} {
{\btxflush{author}}
\btxcomma
}
\btxdoifelse {title} {
{\btxflush{title} \btxperiod}
} {
No Title
}
\btxdoifelse {address} {
{\btxspace \emdash \btxspace \btxflush{address} \btxcomma}
}
\btxdoifelse {publisher} {
{\btxspace \btxflush{publisher} \btxcomma}
}
\btxdoifelse {year} {
{\btxspace \btxflush{year} \btxperiod}
}
\removeunwantedspaces
\stopsetups
\starttext
\startbodymatter
Test.\cite[Declercq:2000]
\stopbodymatter
\startbackmatter
\startchapter[title=Bibliography]
\placelistofpublications[criterium=all,sorttype=authoryear]
\stopchapter
\stopbackmatter
\stoptext
[-- Attachment #3: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Creating one's own style
2019-05-18 6:16 Creating one's own style Dmitry Starostin
@ 2019-05-18 20:37 ` Alan Braslau
0 siblings, 0 replies; 2+ messages in thread
From: Alan Braslau @ 2019-05-18 20:37 UTC (permalink / raw)
To: Dmitry Starostin; +Cc: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 382 bytes --]
On Sat, 18 May 2019 09:16:24 +0300
Dmitry Starostin <starostin.dmitry@gmail.com> wrote:
> Thank you for the instructions on how to make one's own style.
>
> I only need to change the formatting in the bibliography list, the
> formatting of the notes in the text is entirely up to the requirement.
>
> A strange effect (full MWE in attachment):
Corrected MWE attached.
--
Alan
[-- Attachment #2: Context_bib.pdf --]
[-- Type: application/pdf, Size: 8098 bytes --]
[-- Attachment #3: Context_bib.tex --]
[-- Type: text/x-tex, Size: 1358 bytes --]
%\enabletrackers[publications.setups]
\setuplanguage[ru]
\setupbodyfont[dejavu]
\mainlanguage[russian]
\setupindenting[big,yes]
\setbreakpoints[compound]
\startbuffer[bib]
@Book{Declercq:2000,
author = {Declercq, Georges},
title = {Anno Domini: The origins of the Christian era},
address = {Turnhout},
publisher = {Brill},
year = {2000},
shorttitle = {Anno Domini}, % ignored
shorthand = {Declercq}, % ignored
language = {english},
hyphenation = {english}, % ignored
pagetotal = {206}, % ignored
pages = {206},
}
\stopbuffer
\usebtxdataset[bib.buffer]
\usebtxdefinitions[apa]
\setupbtx[apa:cite:authoryear][left={[},right={]}]
\startsetups btx:apa:list:book
\btxdoif {author} {
\btxflush{author}
\btxcomma
}
\btxdoifelse {title}
{\btxflush{title}\btxperiod}
{No Title}
\btxdoif {address}
{\btxspace\emdash\btxspace\btxflush{address}\btxcomma}
\btxdoif {publisher}
{\btxspace\btxflush{publisher}\btxcomma}
\btxdoif {year}
{\btxspace \btxflush{year} \btxperiod}
\removeunwantedspaces
\stopsetups
\starttext
\startbodymatter
Test.\cite[Declercq:2000]
\stopbodymatter
\startbackmatter
\startchapter[title=Bibliography]
\placelistofpublications[criterium=all,sorttype=authoryear]
\stopchapter
\stopbackmatter
\stoptext
[-- Attachment #4: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-18 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-18 6:16 Creating one's own style Dmitry Starostin
2019-05-18 20:37 ` Alan Braslau
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).