Skip to content

maucejo/bookly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

118 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Book template

Generic badge MIT License User Manual

The bookly template is a Typst package designed for writing academic documents such as theses, French habilitations, or scientific books. It provides a structured format that adheres to academic standards, making it easier for authors to focus on content rather than formatting.

Basic usage

This section provides the minimal amount of information to get started with the template. For more detailed information, see the manual.

To use the bookly template, you need to include the following line at the beginning of your typ file:

#import "@preview/bookly:1.2.0": *

Initializing the template

After importing bookly, you have to initialize the template by a show rule with the #bookly() command. This function takes a set of argument to customize the document.

  • title: Title of the book
  • author: Author of the book
  • book-config: The dictionary allows you to customize various aspects of the book

Example

#show: bookly.with(
  author: "Author Name",
  fonts: (
    body: "Lato",
    math: "Lete Sans Math"
  ),
  theme: modern,
  lang: "en",
  title-page: book-title-page(
    series: "Typst book series",
    institution: "Typst community",
    logo: image("images/typst-logo.svg"),
    cover: image("images/book-cover.jpg", width: 45%)
  )
)

Main features

  • Themes: classic, modern, fancy, orly, pretty
  • Layout: "standard" and "tufte"
  • Language support: English, Chinese, French, German, Italian, Portuguese, Spanish
  • Font customization: Body, math and raw fonts can be customized
  • Environments: front-matter, main-matter, appendix, back-matter
  • Outlines: tableofcontents, listoffigures, listoftables, minitoc
  • Part and chapter definition: part, chapter, chapter-nonum

Note: The chapters can be also written using the Typst standard markup syntax.

Helper functions

  • Subfigures - based on the subpar package

    #subfigure(
        figure(image("image1.png"), caption: []),
        figure(image("image2.png"), caption: []), <b>,
        columns: (1fr, 1fr),
        caption: [Figure title],
        label: <fig:subfig>,
    )
  • Equations

    • Boxed equations

      $
          #boxeq[$p(A|B) prop p(B|A) space p(A)$]
      $
    • Unnumbered equations

      #nonumeq[$integral_0^1 f(x) dif x = F(1) - F(0)$]
    • Subequation numbering based on the equate package

  • Information boxes

    • #info-box for remarks
    • #tip-box for tips
    • #important-box for important notes
    • proof-box for proofs
    • question-box for questions
    • custom-box for user defined boxes
  • book-title-page for defining the title page of a book

  • thesis-title-page for defining the title page of a thesis

  • back-cover for defining the back cover of a book

For more information, please refer to the manual.

Licence

MIT licensed

Copyright © 2026 Mathieu AUCEJO (maucejo)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6