[go: up one dir, main page]

Skip to content

Harry-Chen/kouhu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kouhu (口胡)

kouhu (口胡) is a Chinese lipsum text generator for Typst. It provides a set of built-in text samples containing both Simplified and Traditional Chinese characters. You can choose from generated fake text, classic or modern Chinese literature, or specify your own text.

kouhu is inspired by zhlipsum LaTeX package and roremu Typst package.

All sample text is excerpted from zhlipsum LaTeX package (see Appendix for details).

Usage

#import "@preview/kouhu:0.1.0": kouhu

#kouhu(indicies: range(1, 3)) // select the first 3 paragraphs from default text

#kouhu(builtin-text: "zhufu", offset: 5, length: 100) // select 100 characters from the 5th paragraph of "zhufu" text

#kouhu(custom-text: ("Foo", "Bar")) // provide your own text

See manual for more details.

What does kouhu mean?

GitHub Copilot says:

kouhu (口胡) is a Chinese term for reading aloud without understanding the meaning. It is often used in the context of learning Chinese language or reciting Chinese literature.

Changelog

0.1.1

  • Fix some wrong paths in README.md.
  • Fix genearation of indicies when not specified by user.
  • Add repetition of text until length is reached.

0.1.0

  • Initial release.

Appendix

Generating zhlipsum.json

First download the zhlipsum-text.dtx from CTAN or from local TeX Live (kpsewhich zhlipsum-text.dtx). Then run:

python3 utils/generate_zhlipsum.py /path/to/zhlipsum-text.dtx src/zhlipsum.json