Re: [toolbox] Extended Attributes
Status: Planning
Brought to you by:
jlaurens
From: Maarten S. <maa...@xs...> - 2005-07-02 21:45:38
|
Sorry to jump back so far, but I had another look at the dtx files, =20 and it seems rather easy. To remind you what I'm responding to: On 1 Jul 2005, at 16:48, J=E9r=F4me Laurens wrote: > in C there is an official "#pragma mark" for that purpose. > > I don't get the meaning of "pragma" but let me suggest something like: > > %! pragma ... > > for any "texnical" inline comment > > something like > > %! pragma mark My Mark Comment Here > > But is it strong enough for dtx files? Yes, I think it is in a slightly different shape. dtx files can =20 contain code for may different output files. Here's something I =20 prepared earlier. It sets up the dtx for printing (in the driver =20 section), and adds the version to the output style-file (in the =20 package section). Note that this is all kept out of the printed file =20 with the \iffalse ... \fi grouping. A section metadata could be added =20= without harm, either printed or hidden. First the example: % \iffalse % %<*driver> \ProvidesFile{xmpincl.dtx} %</driver> %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{xmpincl} %<*package> [2005/02/15 v2.1 Include XMP data in pdflatex] %</package> % %<*driver> \documentclass{ltxdoc} \usepackage{hyperref} \usepackage{url} \usepackage{xmpincl} \hypersetup{colorlinks=3Dtrue, pdftitle=3D{Including XMP in pdflatex}, pdfauthor=3D{Maarten Sneep <sn...@na...>}, pdfsubject=3D{pdflatex and XMP inclusions.}, pdfkeywords=3D{XMP, =20 Creative Commons}, pdfview=3D{FitH}, pdfstartview=3D{FitH}, pdfstartpage=3D{1}, =20 plainpages=3Dfalse} \includexmp{license} \DisableCrossrefs %\CodelineIndex %\RecordChanges %\OnlyDescription \begin{document} \DocInput{xmpincl.dtx} \end{document} %</driver> % \fi And for metadata: % \iffalse %<*metadata> %! pragma mark My marker. %</metadata> % \fi Is this a workable suggestion? Since dtx files are processed at =20 different levels, I think you get more room to play with and add your =20= own stuff. On the other hand, Most dtx files are also pure ASCII, so =20 the encoding is less important, and sectioning is already rather =20 clearly indicated (making markers less of an issue). Maarten |