Book in English

Thomas Weise

2022‑11‑01



Preface

Hello. This is a Minimum Working Example for all the features provided by the bookbuilderpy Tool Suite. bookbuilderpy is available as Python package on pypi as well as a docker image containing all required libraries and tools (of which there are many). You can use this example as a blueprint for making your own books.

As an example for a citation, I cite my old book [1]. This is then resolved to a BibTeX record in the file bibliography.bib. You can now continue to read Section 1.

1 First Chapter

Welcome to the first chapter.

1.1 First Section of First Chapter

With #, you start a chapter heading, as in Section 1. With ##, you start a section heading, as in Section 1.1. ### begins a subsection, and so on.

Figure 1.1: This is a figure caption.

Take a look at Figure 1.1.

Take a look at Equation 1.1. We can also embedd formulas directly in the text and write something like .

Table 1.1: This is the table caption.
centered columnright-aligned columnleft-aligned column
blarl
blub blub blubabc123

Table 1.1 is also important. Definitions can also be included and referenced. See, for instance, Definition 1 below.

Definition 1. This is a definition of something.

Listing 1.1: This is a local code file but we only use lines 6 to 12 and apply automatic simplification. (src)

def log(message):
    print(f"{datetime.datetime.now()}: {message}")

Listing 1.2: This is a code file from a GitHub repository. We again only use lines 6 to 12, but without simplification. (src)

def log(message: str) -> None:
    """
    Write a message to the log.

    :param str message: the message
    """
    print(f"{datetime.datetime.now()}: {message}")

Listing 1.1 is a local code file, which resides in the same folder as the markdown file of this chapter. Listing 1.2 comes from GitHub, from the repository bb declared in the metadata.

You can also access the book metadata via the command meta. Example are:

  1. Book-related metadata:
    • title: Book in English
    • author: Thomas Weise
    • keywords: English, Book
  2. Date-related metadata:
    • time: 2022‑11‑01 05:29 UTC
    • date: 2022‑11‑01
    • year: 2022
  3. Language:
    • lang: en
    • locale: en_US
    • lang.name: English
  4. Repository-related metadata (only available if the book is written as a git repository):
    • repo.name: thomasWeise/bookbuilderpy-mwe
    • repo.url: https://github.com/thomasWeise/bookbuilderpy-mwe
    • repo.commit: b24990965fbefa9228db4f26bee1f0e7fe6dd8cd
    • repo.date: 2022‑11‑01 13:27 UTC+08:00
  5. External repository information is accessible via the command repo, using the repository key and the repository information query1:
    • repo.name for bb: thomasWeise/bookbuilderpy-mwe
    • repo.commit for bb: b24990965fbefa9228db4f26bee1f0e7fe6dd8cd
    • repo.date for bb: 2022‑11‑01 13:27 UTC+08:00

References

[1] 
Thomas Weise. 2009. Global optimization algorithms theory and application. it-weise.de (self-published), Germany. Retrieved from http://www.it-weise.de/projects/book.pdf

  1. Notice that we use bb to also identify the GitHub repository of this example to make the example self-contained.↩︎