* Changing the style of author’s surname in a custom bibliographical style
@ 2021-09-11 10:04 Tomáš V via ntg-context
2021-09-15 16:40 ` Tomáš V via ntg-context
0 siblings, 1 reply; 2+ messages in thread
From: Tomáš V via ntg-context @ 2021-09-11 10:04 UTC (permalink / raw)
To: ntg-context; +Cc: Tomáš V
Greetings,
I am trying to make a bibliographical style that would comply to the ISO
690 standard and I have a few questions:
1) The name of the author need to be written in the inverted format
(e.g. Knuth, Donald). It is also customary to write the surname either
in uppercase or in small caps (e.g. KNUTH, Donald). If I wanted to
change the whole name to small caps I’d do something like this:
\btxdoif {author} {
{\sc \btxflush{author}}
\btxperiod
}
How do I change the “font” of the surname only? Can this be done by
redefining a TeX macro (like in BibLaTeX’s \mkbibnamefamily) or is this
done by changing some Lua code?
2) As I have said, the name has to be inverted. This is done by setting
authorconversion to inverted. I’ve tried doing this like this:
\setupbtx[iso690:list][authorconversion=inverted,]
and this:
\setupbtxlist[iso690][authorconversion=inverted,]
Neither of these options work, but this works:
\setupbtx[default:list][authorconversion=inverted,]
I’m confused—why does changing the default option work and changing the
option for my style doesn’t?
Here's a MWE for both of my problems:
% publ-imp-iso690.mkiv
\startbtxrenderingdefinitions[iso690]
\definebtx
[iso690]
[
default=default,
specification=iso690,
]
\definebtxrendering
[iso690]
[
specification=iso690,
numbering=yes,
]
\setupbtx[default:list]
[
authorconversion=inverted,
]
% field definitions
\starttexdefinition btx:iso690:author
\btxdoif {author} {
\btxflush{author}
\btxperiod
}
\stoptexdefinition
% book definition
\startsetups btx:iso690:list:book
\texdefinition{btx:iso690:author}
\removeunwantedspaces
\stopsetups
% publ-imp-iso690.lua
local specification = {
name = "iso690",
categories = { },
}
local categories = specification.categories
categories.book = {
required = { "title" },
optional = {"author"},
}
return specification
Thanks for your help,
Tomáš
___________________________________________________________________________________
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: Changing the style of author’s surname in a custom bibliographical style
2021-09-11 10:04 Changing the style of author’s surname in a custom bibliographical style Tomáš V via ntg-context
@ 2021-09-15 16:40 ` Tomáš V via ntg-context
0 siblings, 0 replies; 2+ messages in thread
From: Tomáš V via ntg-context @ 2021-09-15 16:40 UTC (permalink / raw)
To: ntg-context; +Cc: Tomáš V
[-- Attachment #1.1: Type: text/plain, Size: 2171 bytes --]
I’ve found an answer to my first problem. The functions, that print out
the names in the list, are defined in publ-imp-author.mkvi. I copied the
responsible function to publ-imp-iso690.mkiv, edited one line (see code
below) and everything works as intended.
Tomáš
% publ-imp-iso690.mkiv
\startbtxrenderingdefinitions[iso690]
\definebtx
[iso690]
[
default=default,
specification=iso690,
]
\definebtxrendering
[iso690]
[
specification=iso690,
numbering=yes,
]
\setupbtx[default:list]
[
authorconversion=inverted,
]
% field definitions
\starttexdefinition btx:iso690:author
\btxdoif {author} {
\btxflush{author}
\btxperiod
}
\stoptexdefinition
% book definition
\startsetups btx:iso690:list:book
\texdefinition{btx:iso690:author}
\removeunwantedspaces
\stopsetups
% surname to small caps in list
\startsetups \s!btx:\s!list:\s!author:inverted
\fastsetup{\s!btx:\s!list:\s!author:concat}
\ifx\currentbtxvons\empty \else
\texdefinition{\s!btx:\s!cite:\s!author:\s!de}
\doifnotmode {\s!btx:\s!de} {
\currentbtxvons
\btxparameter{\c!separator:vons}
}
\fi
\ifx\currentbtxsurnames\empty \else
\WORDS{\currentbtxsurnames} % <-- changed line
\ifx\currentbtxjuniors\empty \else
\btxparameter{\c!separator:juniors}
\currentbtxjuniors
\fi
\fi
\ifx\currentbtxfirstnames\empty
% firstnames are optional
\else
\btxparameter{\c!separator:invertedfirstnames}
\currentbtxfirstnames
\fi
\ifx\currentbtxvons\empty \else
\doifmode {\s!btx:\s!de} {
\btxparameter{\c!separator:vons}
\currentbtxvons
}
\fi
\fastsetup{\s!btx:\s!list:\s!author:others}
\stopsetups
[-- Attachment #1.2: Type: text/html, Size: 3136 bytes --]
[-- Attachment #2: 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:[~2021-09-15 16:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11 10:04 Changing the style of author’s surname in a custom bibliographical style Tomáš V via ntg-context
2021-09-15 16:40 ` Tomáš V via ntg-context
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).