TeXipedia

oberdiek

Provides a comprehensive collection of utility packages offering specialized functionality for document formatting, PDF handling, mathematical notation, and various LaTeX enhancements.

Overview

A diverse bundle of utility packages that extends LaTeX's capabilities across multiple domains, from basic document formatting to advanced PDF features. The collection addresses specific technical needs and common challenges in document preparation.

  • Includes tools for managing counters, handling colors, and controlling document formatting
  • Offers specialized mathematical notation features and equation handling capabilities
  • Provides PDF-specific utilities for encryption, bookmarks, and file handling
  • Contains packages for enhanced table formatting and parameter control
  • Features utilities for language handling, file inclusion based on timestamps, and documentation tools
  • Particularly useful for technical documentation, academic publishing, and complex document preparation where specialized formatting control is needed

Getting Started

The oberdiek package is a collection of utility packages rather than a single package. To use any of the packages in the bundle, include the specific package you need in your document preamble:

\documentclass{article}
\usepackage{aliascnt}     % For alias counters
\usepackage{bmpsize}     % For bitmap size information
\usepackage{centernot}   % For centered negation symbol
% ... and so on for other packages in the bundle

Each package in the bundle provides specific functionality and can be used independently of the others. Refer to the documentation of the individual package for its specific usage.

Examples

Using the 'centernot' package to create a horizontally-centered negation symbol in mathematical expressions.

\documentclass{article}
\usepackage{amsmath}
\usepackage{centernot}
\begin{document}
\section{Centered Negation Symbol Example}

Standard negation vs centered negation:

$x \not\in A$ (standard)

$x \centernot\in A$ (centered)

More examples:

$a \centernot= b$

$P \centernot\Rightarrow Q$

\end{document}

Using the 'ifdraft' package to conditionally display content based on whether the document is in draft mode.

\documentclass[draft]{article}
\usepackage{ifdraft}
\usepackage{lipsum}

\begin{document}
\section{Draft Mode Detection}

\ifdraft{\large\textbf{DRAFT VERSION -- NOT FOR DISTRIBUTION}\\[1em]}{}

\lipsum[1]

\ifdraft{%
  \begin{center}
    \fbox{\parbox{0.8\textwidth}{%
      This text only appears in draft mode. It can be used for notes,
      reminders, or editorial comments that shouldn't appear in the final version.
    }}
  \end{center}
}{}

\lipsum[2]

\end{document}

Using the 'twoopt' package to define commands with two optional arguments.

\documentclass{article}
\usepackage{xcolor}
\usepackage{twoopt}

% Define a command with two optional arguments
\newcommandtwoopt{\highlight}[3][yellow][black]{%
  \colorbox{#1}{\textcolor{#2}{#3}}%
}

\begin{document}
\section{Command with Two Optional Arguments}

Default highlighting: \highlight{Important text}

Custom background: \highlight[blue]{Important text}

Custom background and text color: \highlight[red][white]{Important text}

\end{document}