GeneralDeclareOptionX

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
erwann
Posts: 75
Joined: Thu Aug 25, 2016 2:24 am

DeclareOptionX

Post by erwann »

How would I modify skeleton.dtx to pass an option with a default value?

Code: Select all

% \section{Implementation}
%
%    \begin{macrocode}
\DeclareOptionX{cartoon}[Betty Boop]{
\def\the@cartoon
	{
		#1
	}
}
%    \end{macrocode}
Where would I put

Code: Select all

\RequirePackage{xkeyval}
?
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

erwann
Posts: 75
Joined: Thu Aug 25, 2016 2:24 am

DeclareOptionX

Post by erwann »

No luck with Skeleton's template. But by rearranging things, I got DeclareOptionX to work:

Code: Select all

% \section{Implementation}
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{foo}[2018/02/12 v1.0]
\RequirePackage{xkeyval}
\DeclareOptionX{option}[value]{---code---}
\ProcessOptionsX
%    \end{macrocode}
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)
erwann
Posts: 75
Joined: Thu Aug 25, 2016 2:24 am

DeclareOptionX

Post by erwann »

x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)
Post Reply