On 07/17/2012 02:27 PM, Joseph Wright wrote:
> On 17/07/2012 18:38, Joel C. Salomon wrote:
>> I've been playing with some expl3 code on TeX.SX, and I'm trying to
>> turn some of that code into a package. Since I'm using expl3, I
>> figured I'd also experiment with l3doc. (Yes, I know it's labeled
>> "experimental"; I want to experiment.)
>> I started with Joseph Wright's model dtx file from
>> <http://texdev.net/2009/10/06/a-model-dtx-file/>, but I'm having some
>> trouble adapting it to l3doc. Does anyone have some boilerplate code I
>> can build off of?
>> BTW, should I also be using l3docstrip?
> There are a few approaches to building a .dtx file, as you can see if
> you look at the selection on CTAN. You will find 'traditional' .dtx
> files, which need an .ins file to be extracted, and 'all-in-one' .dtx
> files, which include their own .ins internally. My model .dtx file is of
> the latter type.
> I've attached a template for creating a 'self extracting' .dtx file
> using l3doc, based on the approach I use in notes2bib and siunitx. I've
> kept only the basics, and removed some code I use for including demos:
> look at "LaTeXdemo" in my .dtx files to see this.
> In the demo, I've stuck with hard-coding in the version, so the
> \ProvidesExplClass is less complex than the one you've mentioned.
> Although this does not pick up data directly from commits to a version
> control system, I think it works better over all. (Certainly if you use
> Git or Mercurial.)
Thanks; I've used that template to put together a simple package that
I've just uploaded to CTAN. Until it's up there, take a look at the
repository at <https://github.com/jcsalomon/xpeek>.
Regarding the use of l3docstrip, I had to downgrade to regular docstrip
because the l3 version is not yet in TeX Live. Maybe sometime soon.
There are some oddities regarding documenting messages defined with
\msg_new:* (they show up in the index with a leading backslash); and I
would welcome critique about my documentation style off-list or via the
GitHub issue tracker.
Thanks for the help,