From 5c800a9274f0bd553ba2ced569480d5022d7c9d5 Mon Sep 17 00:00:00 2001 From: Frank Steimke Date: Sat, 16 Mar 2024 09:31:21 +0100 Subject: [PATCH 1/2] Support for titleabbrev in bibliography entries. --- src/main/xslt/modules/bibliography.xsl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/xslt/modules/bibliography.xsl b/src/main/xslt/modules/bibliography.xsl index 9b9bcc596e..57459eafc6 100644 --- a/src/main/xslt/modules/bibliography.xsl +++ b/src/main/xslt/modules/bibliography.xsl @@ -53,6 +53,12 @@

+ + + + + + @@ -222,6 +228,7 @@ + From 5353306a70b3027ac06176cd629f085cadb00ee2 Mon Sep 17 00:00:00 2001 From: Frank Steimke Date: Sat, 12 Oct 2024 19:23:10 +0200 Subject: [PATCH 2/2] Support of titleabbrev in Bibliography. New and changed tests. --- src/main/scss/media-all.scss | 4 +++ src/main/xslt/modules/templates.xml | 3 +- .../resources/expected/bibliography.001.html | 2 +- .../resources/expected/bibliography.002.html | 2 +- .../resources/expected/bibliography.012.html | 10 ++++++ .../resources/expected/bibliography.013.html | 6 ++++ src/test/resources/xml/bibliography.012.xml | 31 +++++++++++++++++++ src/test/resources/xml/bibliography.013.xml | 31 +++++++++++++++++++ 8 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 src/test/resources/expected/bibliography.012.html create mode 100644 src/test/resources/expected/bibliography.013.html create mode 100644 src/test/resources/xml/bibliography.012.xml create mode 100644 src/test/resources/xml/bibliography.013.xml diff --git a/src/main/scss/media-all.scss b/src/main/scss/media-all.scss index bd67bf7341..9f97141770 100644 --- a/src/main/scss/media-all.scss +++ b/src/main/scss/media-all.scss @@ -455,6 +455,10 @@ cite.title { font-family: inherit; } +.bibliography .titleabbrev {font-style:italic} +.bibliography .titleabbrev:before {content: ' ('} +.bibliography .titleabbrev:after {content: ')'} + .set > .list-of-titles > .lot > .title, .book > .list-of-titles > .lot > .title, .part > .list-of-titles > .lot > .title { diff --git a/src/main/xslt/modules/templates.xml b/src/main/xslt/modules/templates.xml index a681c37424..5ec50f7aa2 100644 --- a/src/main/xslt/modules/templates.xml +++ b/src/main/xslt/modules/templates.xml @@ -606,7 +606,7 @@ [] - . + . . . . @@ -642,6 +642,7 @@ . . . + . diff --git a/src/test/resources/expected/bibliography.001.html b/src/test/resources/expected/bibliography.001.html index 28d48e975e..640432ab3f 100644 --- a/src/test/resources/expected/bibliography.001.html +++ b/src/test/resources/expected/bibliography.001.html @@ -1 +1 @@ -Unit Test: bibliography.001

Unit Test: bibliography.001

[Abbrev] A Really Full BiblioEntry. Subtitle. Any Street / Anywhere, XX 99999 / USA. ArtPageNums. AuthorFirstname AuthorSurname. CorpAuthor. AuthorInitials. The names of some collaborators. confdates. conftitle. confnum. Any Street / Anywhere, XX 99999 / USAconfsponsor. . ContractNum. ContractSponsor. Copyright © 1998 Copyright holder. Date. Edition. EditorFirstName EditorSurname. ISBN. ISSN. OrgName. OCFirstName OCSurname. PageNums. ProductName. ProductNumber. . PubPublisherName. / Any Street / Anywhere, XX / 99999 / USA / . PublisherName. PubsNumber. ReleaseInfo. SeriesVolNums. VolumeNum.

\ No newline at end of file +Unit Test: bibliography.001

Unit Test: bibliography.001

[Abbrev] A Really Full BiblioEntryTitleAbbrev. Subtitle. Any Street / Anywhere, XX 99999 / USA. ArtPageNums. AuthorFirstname AuthorSurname. CorpAuthor. AuthorInitials. The names of some collaborators. confdates. conftitle. confnum. Any Street / Anywhere, XX 99999 / USAconfsponsor. . ContractNum. ContractSponsor. Copyright © 1998 Copyright holder. Date. Edition. EditorFirstName EditorSurname. ISBN. ISSN. OrgName. OCFirstName OCSurname. PageNums. ProductName. ProductNumber. . PubPublisherName. / Any Street / Anywhere, XX / 99999 / USA / . PublisherName. PubsNumber. ReleaseInfo. SeriesVolNums. VolumeNum.

\ No newline at end of file diff --git a/src/test/resources/expected/bibliography.002.html b/src/test/resources/expected/bibliography.002.html index 73508163ee..e84bcea545 100644 --- a/src/test/resources/expected/bibliography.002.html +++ b/src/test/resources/expected/bibliography.002.html @@ -1,4 +1,4 @@ -Unit Test: bibliography.002

Unit Test: bibliography.002

Entries using biblioentry

[AhoSethiUllman96] Compilers, Principles, Techniques, and Tools. Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Copyright © 1996 Bell Telephone Laboratories, Inc.. James T. DeWolf. 0-201-10088-6. Addison-Wesley Publishing Company.

[Walsh97] A Guide to XML. Norman Walsh. . Copyright © 1997 ArborText, Inc.. 97-108. XML: Principles, Tools, and Techniques.

[Abbrev] A Really Full BiblioEntry. Subtitle. Any Street / Anywhere, XX 99999 / USA. ArtPageNums. AuthorFirstname AuthorSurname. AuthorInitials. The names of some collaborators. confdates. conftitle. confnum. Any Street / Anywhere, XX 99999 / USAconfsponsor. . ContractNum. ContractSponsor. Copyright © 1998 Copyright holder. Date. Edition. EditorFirstName EditorSurname. ISBN. ISSN. CorpName. OrgName. OCFirstName OCSurname. PageNums. ProductName. ProductNumber. . PubPublisherName. / Any Street / Anywhere, XX / 99999 / USA / . PublisherName. PubsNumber. ReleaseInfo. SeriesVolNums. VolumeNum.

Entries using bibliomixed

[Walsh96-2] +Unit Test: bibliography.002

Unit Test: bibliography.002

Entries using biblioentry

[AhoSethiUllman96] Compilers, Principles, Techniques, and Tools. Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Copyright © 1996 Bell Telephone Laboratories, Inc.. James T. DeWolf. 0-201-10088-6. Addison-Wesley Publishing Company.

[Walsh97] A Guide to XML. Norman Walsh. . Copyright © 1997 ArborText, Inc.. 97-108. XML: Principles, Tools, and Techniques.

[Abbrev] A Really Full BiblioEntryTitleAbbrev. Subtitle. Any Street / Anywhere, XX 99999 / USA. ArtPageNums. AuthorFirstname AuthorSurname. AuthorInitials. The names of some collaborators. confdates. conftitle. confnum. Any Street / Anywhere, XX 99999 / USAconfsponsor. . ContractNum. ContractSponsor. Copyright © 1998 Copyright holder. Date. Edition. EditorFirstName EditorSurname. ISBN. ISSN. CorpName. OrgName. OCFirstName OCSurname. PageNums. ProductName. ProductNumber. . PubPublisherName. / Any Street / Anywhere, XX / 99999 / USA / . PublisherName. PubsNumber. ReleaseInfo. SeriesVolNums. VolumeNum.

Entries using bibliomixed

[Walsh96-2] Walsh, Norman. Introduction to Cascading Style Sheets. diff --git a/src/test/resources/expected/bibliography.012.html b/src/test/resources/expected/bibliography.012.html new file mode 100644 index 0000000000..145efcd660 --- /dev/null +++ b/src/test/resources/expected/bibliography.012.html @@ -0,0 +1,10 @@ +Unit Test Bibliography 012

Unit Test Bibliography 012

Frank Steimke

Checks the use of titleabbrev inside bibliography using + bibliomixed.

Support for titleabbrev within bibliographic entries is motivated by citation + of german laws, which have usually a very long full title and an official abbreviation. See + IdNrG as an example.

In this unit test we have an bibliomixed entry. Please note, that there are no + parenthesis around the abbreviated title. Parenthesis that show up in the generated HTML are + from CSS. This seems to be necessary, because we want them in the same + font-style as the abbreviated title.

Bibliography

[IdNrG] : Gesetz zur Einführung und + Verwendung einer Identifikationsnummer in der öffentlichen Verwaltung + Identifikationsnummerngesetz vom 28.3.2021. + Online erhältlich bei www.buzer.de/Identifikationsnummer-Gesetz.

\ No newline at end of file diff --git a/src/test/resources/expected/bibliography.013.html b/src/test/resources/expected/bibliography.013.html new file mode 100644 index 0000000000..4187f138a3 --- /dev/null +++ b/src/test/resources/expected/bibliography.013.html @@ -0,0 +1,6 @@ +Unit Test Bibliography 013

Unit Test Bibliography 013

Frank Steimke

Checks the use of titleabbrev inside bibliography using + biblioentry.

Support for titleabbrev within bibliographic entries is motivated by citation + of german laws, which have usually a very long full title and an official abbreviation. See + IdNrG as an example.

In this unit test we have an biblioentry. Parenthesis around the abbreviated + title that show up in the generated HTML are from CSS.

Bibliography

[IdNrG] Gesetz zur Einführung und Verwendung einer Identifikationsnummer in der + öffentlichen VerwaltungIdentifikationsnummerngesetz. 28.3.2021. www.buzer.de/Identifikationsnummer-Gesetz.

\ No newline at end of file diff --git a/src/test/resources/xml/bibliography.012.xml b/src/test/resources/xml/bibliography.012.xml new file mode 100644 index 0000000000..976fac9d33 --- /dev/null +++ b/src/test/resources/xml/bibliography.012.xml @@ -0,0 +1,31 @@ + + + +
+ + Unit Test Bibliography 012 + + FrankSteimke + + + Checks the use of titleabbrev inside bibliography using + bibliomixed. + + + Support for titleabbrev within bibliographic entries is motivated by citation + of german laws, which have usually a very long full title and an official abbreviation. See + IdNrG as an example. + In this unit test we have an bibliomixed entry. Please note, that there are no + parenthesis around the abbreviated title. Parenthesis that show up in the generated HTML are + from CSS. This seems to be necessary, because we want them in the same + font-style as the abbreviated title. + + IdNrG: Gesetz zur Einführung und + Verwendung einer Identifikationsnummer in der öffentlichen Verwaltung + Identifikationsnummerngesetz vom 28.3.2021. + Online erhältlich bei www.buzer.de/Identifikationsnummer-Gesetz. + +
diff --git a/src/test/resources/xml/bibliography.013.xml b/src/test/resources/xml/bibliography.013.xml new file mode 100644 index 0000000000..fe2acf806f --- /dev/null +++ b/src/test/resources/xml/bibliography.013.xml @@ -0,0 +1,31 @@ + + + +
+ + Unit Test Bibliography 013 + + FrankSteimke + + + Checks the use of titleabbrev inside bibliography using + biblioentry. + + + Support for titleabbrev within bibliographic entries is motivated by citation + of german laws, which have usually a very long full title and an official abbreviation. See + IdNrG as an example. + In this unit test we have an biblioentry. Parenthesis around the abbreviated + title that show up in the generated HTML are from CSS. + + + IdNrG + Gesetz zur Einführung und Verwendung einer Identifikationsnummer in der + öffentlichen Verwaltung + Identifikationsnummerngesetz + 28.3.2021 + www.buzer.de/Identifikationsnummer-Gesetz + + +