CTAN Comprehensive TeX Archive Network

sty2dtx – Create a .dtx file from a .sty file

The pack­age pro­vides a Perl script that con­verts a .sty file ( pack­age) to .dtx for­mat (doc­u­mented source), by sur­round­ing macro def­i­ni­tions with macro and macrocode en­vi­ron­ments. The macro name is au­to­mat­i­cally in­serted as an ar­gu­ment to the macro en­vi­ronemnt.

Code lines out­side macro def­i­ni­tions are wrapped only in macrocode en­vi­ron­ments. Empty lines are re­moved.

The script should not be thought to be fool proof and 100% ac­cu­rate but rather as a good start to the busi­ness of mak­ing a .dtx file from an un­doc­u­mented style file.

Full .dtx files are gen­er­ated. A tem­plate based on the skele­ton file from 'dtx­tut' is used. User level macros are added au­to­mat­i­cally to the 'Usage' sec­tion of the .dtx file. A cor­re­spond­ing .ins file can be gen­er­ated as well.

Li­censesGNU Gen­eral Public Li­cense, ver­sion 3
Copy­right2010–2011 Martin Schar­rer
Main­tainerMartin Schar­rer
Con­tained inTeX Live as sty2dtx
MiKTeX as sty2dtx
TopicsPack­age de­vel­op­ment
See alsomakedtx

Down­load the con­tents of this pack­age in one zip archive (150.8k).

Com­mu­nity Com­ments



Here you can see a re­spec­tive di­a­gram in newer browsers.


Guest Book Sitemap Contact Contact Author