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
Below TEXMF_INSTALL_DIR environment variable points at the TEXMF directory desired for installation.
Installation from CTAN
One can use the following bash script to get and install the package from CTAN, you will need tools like wget, latexmk, perl (to run latexmk) and a LaTeX distro :
# make a temp dir for easier cleanup work_dir=$(mktemp -d /tmp/makegobbler-install.XXXXXX) pushd $work_dir # get the paquetage wget https://mirror.ctan.org/macros/latex/contrib/makegobbler.zip # 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
Installation from the SVN report
If you wish the very latest dev version possibly not yet released to CTAN — at your own perils — then you may use the following script. You will need a svn client, as well as GNU make.
# make a temp dir for easier cleanup work_dir=$(mktemp -d /tmp/makegobbler-install.XXXXXX) pushd $work_dir # get the package source svn checkout https://svn.gnu.org.ua/sources/latex-makegobbler/trunk . # set TEXMF_INSTALL_DIR to the installation target TEXMF [ -d "$TEXMF_INSTALL_DIR" ] || TEXMF_INSTALL_DIR=$(HOME)/texmf export TEXMF_INSTALL_DIR # make is GNUmake make install README_EXT=org # cleanup popd rm -fr $work_dir
Project page & bug reports
- Project page : https://puszcza.gnu.org.ua/projects/latex-makegobbler
- Please submit bug reports here : https://puszcza.gnu.org.ua/bugs/?group=latex-makegobbler
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 (497.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 |
| Home page | https://puszcza.gnu.org.ua/projects/latex-makegobbler |
| Bug tracker | https://puszcza.gnu.org.ua/bugs/?group=latex-makegobbler |
| Repository | https://svn.gnu.org.ua/sources/latex-makegobbler/trunk |
| Version | 0.3.2 2026-02-15 |
| Licenses | The LaTeX Project Public License 1.3c Free license not otherwise listed |
| Copyright | 2025–2026 Vincent Belaïche |
| Maintainer | Vincent Belaïche |
| Contained in | TeX Live as makegobbler MiKTeX as makegobbler |
| Topics | Macro support Conditional compilation |
| See also | etoolbox |