Skip to content

Commit

Permalink
Add parameter to specify lowercase-references
Browse files Browse the repository at this point in the history
  • Loading branch information
flavio20002 committed Oct 6, 2024
1 parent c6d10a5 commit 14f8cd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,16 @@
})
}

#let book(title: "", subtitle: "", date: "", author: (), paper-size: "a4", logo: none, cover: none, image-index:none, body, main-color: blue, copyright: [], lang: "en", list-of-figure-title: none, list-of-table-title: none, supplement-chapter: "Chapter", supplement-part: "Part", font-size: 10pt, part-style: 0) = {
#let book(title: "", subtitle: "", date: "", author: (), paper-size: "a4", logo: none, cover: none, image-index:none, body, main-color: blue, copyright: [], lang: "en", list-of-figure-title: none, list-of-table-title: none, supplement-chapter: "Chapter", supplement-part: "Part", font-size: 10pt, part-style: 0, lowercase-references: false) = {
set document(author: author, title: title)
set text(size: font-size, lang: lang)
set par(leading: 0.5em)
set enum(numbering: "1.a.i.")
set list(marker: ([•], [--], [◦]))

set ref (supplement: (it)=>{lower(it.supplement)}) if lowercase-references


set math.equation(numbering: num =>
numbering("(1.1)", counter(heading).get().first(), num)
)
Expand Down Expand Up @@ -410,6 +413,7 @@
}
}


show heading: it => {
set text(size: font-size)
if it.level == 1 {
Expand Down
3 changes: 2 additions & 1 deletion tests/sample-book/test.typ
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
See the License for the specific language governing permissions and limitations under the License.

_First printing, July 2023_
]
],
lowercase-references: false
)

#part("Part One Title")
Expand Down

0 comments on commit 14f8cd7

Please sign in to comment.