Changing the style of author’s surname in a custom bibliographical style
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áš
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
participants (1)
-
Tomáš V