Directory macros/latex/contrib/makegobbler
Table of Contents
Purpose
The purpose of the makegobbler package is to make easy to gobble (drop) or ungobble (keep) some part of your LaTeX source code, conditionally or unconditionally. The part that is to be gobbled/ungobbled is delimited with a user-defined delimiter control sequence.
Installation
One can use the following bash script with the current directory containing the archive makegobbler.zip.
# make a temp dir for easier cleanup work_dir=$(mktemp -d /tmp/makegobbler-install.XXXXXX) cp makegobbler.zip $work_dir pushd $work_dir # unzip unzip makegobbler.zip cd makegobbler # set TEXMF_INSTALL_DIR to the installation target TEXMF [ -d "$TEXMF_INSTALL_DIR" ] || TEXMF_INSTALL_DIR=$(HOME)/texmf pdftex makegobbler.ins mkdir -p "$TEXMF_INSTALL_DIR/tex/latex/makegobbler" cp makegobbler.sty "$TEXMF_INSTALL_DIR/tex/latex/makegobbler" # doc generation, skip if you don't want to recompile the manual latexmk -pdf makegobbler.dtx mkdir -p "$TEXMF_INSTALL_DIR/doc/latex/makegobbler" cp makegobbler.pdf "$TEXMF_INSTALL_DIR/doc/latex/makegobbler/makegobbler-doc.pdf" # cleanup popd rm -fr $work_dir
Request for help
Any volunteer to translate the manual to your favorite language is welcome.
License
Le package is dual licensed.
Download the contents of this package in one zip archive (509.8k).
makegobbler – Keep or drop some part of LaTeX source code
The makegobbler package provides a mechanism to selectively drop (gobble) or keep (“ungobble”) portions of LaTeX source code, either conditionally or unconditionally. The affected code is delimited by user-defined control sequences that act as explicit markers.
For example, you can define a conditional as follows: \newif\ifkeep
You can then make a portion of the source conditional like this: \keepfalse
\MGBkeep*\ifkeep\SomeArbitraryDelimitingControlSequence
Here, everything — including \fi#!{}_^$ — is dropped.
\SomeArbitraryDelimitingControlSequence
| Package | makegobbler |
| Version | 0.3 2025-11-29 |
| Licenses | The LaTeX Project Public License 1.3c Free license not otherwise listed |
| Copyright | 2025–2026 Vincent Belaïche |
| Maintainer | Vincent Belaïche |
| Topics | Conditional compilation Macro support |
| See also | etoolbox |