Skip to content

AlphaJack/antanilipsum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

antanilipsum

kantlipsum come se fosse antani

Description

"Supercazzola is an italian nonsense phrase composed of invented words, which is used as a joke in order to mock or confuse the person to whom the phrase is addressed."

taganaka

The package spits out supercazzole in Amici Miei style, the text is taken both from the original movies and online generators, but user produced content is also available in the git repo.

The package is a modified version of kantlipsum by Enrico Gregorio and can easily be hacked with texts of your choice.

File organization

This repo is organized in various folders:

  • build, which contains the script used to generate the package;

  • dist, which contains the package file and its documentation;

  • example, which contains an example document;

  • sources, which contains the files used to generate the package;

  • sources-extra, which contains additional text files not read by the build script.

Usage

Installation

Package manager

antanilipsum is available from the CTAN website

DIY approach

Place antanilipsum.sty in your project folder

Commands

\usepackage{antanilipsum} % uses the package

\usepackage[nopar]{antanilipsum} % doesn't end paragraphs with a \par command, as "[par]" is the default option

\usepackage[numbers]{antanilipsum} % each paragraph will be preceded by its number

\usepackage[index]{antanilipsum} % each paragraph will generate an index entry that will appear with packages like "imakeidx" with the command \makeindex and \printindex

\antani % prints the first 7 paragraphs

\antani* % if "[par]" is set, the asterisk behaves like "[nopar]", and vice versa

\antani[1] % prints the paragraph #1

\antani[2-4] % prints the paragraphs #2 to #4

\antani[5][6-8] % prints the sentences #6 to #8 of the paragraph #5

\antanidef{\barilotto}{8} % defines the variable "barilotto" as the paragraph #8
\barilotto % prints the paragraph #8
\\ % adds a new line
\barilotto % prints again the paragraph #8

Instructions unclear, got scappellamento a destra? Read dist/antanilipsum.pdf

Build

Default process

You may need to install the csquotes and alphalph packages if you don't have them already.

Clone or download this repository, then modify sources/template.dtx, sources/readme-ctan.md, sources/words.txt (used to generate the index with imakeidx) and the files you want inside the sources folder, make sure that:

  • paragraph files begin with par;

  • every paragraph is contained in a single line.

Go inside the build folder and run the build.sh script. It will:

  1. make a copy of sources/template.dtx called build/antanilipsum.dtx;
  2. copy the content of sources/readme-ctan.md to antanilipsum.dtx replacing the string %replacemewithctanreadme;
  3. read the files starting with par inside the sources folder and format their paragraphs to be compiled in $\LaTeX$ ;
  4. write the modified paragraphs to antanilipsum.dtx replacing the string %replacemewithparagraphs;
  5. read the word list inside sources/words.txt and format it to be compiled in $\LaTeX$ ;
  6. write the modified word list to antanilipsum.dtx replacing the string %replacemewithwords;
  7. compile the modified antanilipsum.dtx with lualatex;
  8. create a build/dist folder and move inside it
    • antanilipsum.dtx, the file it just compiled;
    • antanilipsum.sty, the file sourced with the command \usepackage{antanilipsum};
    • antanilipsum.pdf, the documentation that explains the code;
    • README.md, a brief description of the package.
  9. create a build/buildfiles folder and move inside it the other files it generates.

These two folders will be automatically deleted the next time the script is run.

Custom package

If you want to make your own package, simply replace the value of packageprefix in build/build.sh with something of your choice, like "fuffaro". This will make the package work with commands like:

\usepackage{fuffarolipsum}
\fuffaro[4]
\fuffarodef{\turbocapitalismo}{6}
\turbocapitalismo

Manual edits of sources/template.dtx and sources/readme-ctan.md are required if you want to modify the description and publish your package.

Credits

Kantlipsum

https://ctan.org/pkg/kantlipsum

Used sources

http://web.archive.org/web/20060306103011/http://www.ilcineforum.it/frasi/supercazzole.asp

http://www.polygen.org/it/grammatiche/musica_cinema_e_spettacolo/ita/antani.grm

https://github.com/esseks/monicelli

https://antanipsum.com/

Extra sources

https://twitter.com/FuffaroDiego

http://it.heracleums.org/fun/supercazzole/

https://nonciclopedia.org/wiki/Supercazzola

License

LPPL 1.3c

A TL;DR summary is available here