LaTeX forum ⇒ GeneralDeclareOptionX Topic is solved

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

DeclareOptionX

Postby erwann » Sat Feb 24, 2018 1:11 am

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

  1. % \section{Implementation}
  2. %
  3. % \begin{macrocode}
  4. \DeclareOptionX{cartoon}[Betty Boop]{
  5. \def\the@cartoon
  6. {
  7. #1
  8. }
  9. }
  10. % \end{macrocode}


Where would I put

  1. \RequirePackage{xkeyval}


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

Tags:

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

Postby erwann » Thu Mar 01, 2018 2:47 am

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

  1. % \section{Implementation}
  2. % \begin{macrocode}
  3. \NeedsTeXFormat{LaTeX2e}
  4. \ProvidesPackage{foo}[2018/02/12 v1.0]
  5. \RequirePackage{xkeyval}
  6. \DeclareOptionX{option}[value]{---code---}
  7. \ProcessOptionsX
  8. % \end{macrocode}
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

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

Postby erwann » Tue Mar 06, 2018 2:55 am

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


Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests