b

bookly

@preview

A clean, customizable template for writing and publishing structured books with front matter, chapters, and consistent styling.

v5.1.0
MIT
7 downloads
Template

Preview

Template preview

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/bookly:5.1.0

2. Initialize from template

Create a new project from this template:

typst init @preview/bookly:5.1.0

Version History

5.1.0
942fc9e4c204...
5.0.0
642db5c947fa...
4.1.3
e3edeeb3c47f...
4.1.2
6e1128fe91ad...
4.1.1
0e449e86e38d...
4.1.0
9ab28c417c56...
4.0.1
c3bbe1a16869...
4.0.0
82432f143f3b...
3.1.1
0372e0b96867...
3.1.0
087180198779...
3.0.0
e1fd6b0fb2cf...
2.1.2
6968b21eef02...
2.1.1
268fa729d9f4...
2.1.0
472d7d0aa1aa...
2.0.0
9ebc1d127e65...
1.2.0
34aa3c6380db...
1.1.2
2d3c0ccb573f...
1.1.1
8e3aad30baa4...
1.1.0
9ffc98dbacd4...
1.0.0
879bf9a5c6b1...
0.1.0
92c9f10e2eb9...

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:5.1.0": *

After importing bookly, you have to initialize the template by a show rule with the #bookly() command.

Example

#show: bookly.with(
  title: "My document",
  author: "Author Name",
  theme: modern,
  lang: "en",
  tufte: false,
  fonts: (
    body: "Lato",
    math: "Lete Sans Math"
  ),
  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%)
  ),
  config-options: (
    open-right: true,
    alt-margins: false
  )
)

Main features

  • Themes: classic, modern, fancy, obook, orly, pretty
  • Tufte layout powered by marginalia package
  • 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

      $
          integral_0^1 f(x) dif x = F(1) - F(0)
      $ <nonum-eq>
      
    • 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

Dependencies

bookly relies on the following packages:

  • marginalia:0.3.1: for tufte layout.

  • hydra:0.6.3 : for bibliography management.

  • equate:0.3.3 : for advanced equation numbering.

  • showybox:2.0.4 : for custom boxes.

  • suboutline:0.3.01 : for mini tables of contents in chapters.

  • subpar:0.2.2 : for subfigures.

Licence

MIT licensed

Copyright © 2026 Mathieu AUCEJO (maucejo)