% \iffalse meta-comment % % Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) % % This system is released under the LaTeX Project Public License. % % This system is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. % %<*driver> \documentclass{ltxdoc} \usepackage{url} \newcommand{\makecolonletter}{\catcode`\:11\relax} \renewcommand{\MakePrivateLetters}{\makeatletter\makecolonletter} \EnableCrossrefs \CodelineIndex \setcounter{StandardModuleDepth}{1} \begin{document} \DocInput{step4ht.dtx} \end{document} % % % \fi % % \CheckSum{503} % % \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} % \DoNotIndex{\@centercr,\@cite} % \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} % \DoNotIndex{\@input,\@ixpt,\@m} % \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} % \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} % \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} % \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} % \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} % \DoNotIndex{\advance,\Alph,\alph} % \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} % \DoNotIndex{\bullet} % \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} % \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} % \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} % \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} % \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} % \DoNotIndex{\fbox} % \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} % \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} % \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} % \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} % \DoNotIndex{\input} % \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} % \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} % \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} % \DoNotIndex{\NeedsTeXFormat,\newdimen} % \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} % \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} % \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} % \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} % \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} % \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} % \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} % \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} % \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} % \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} % \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} % \DoNotIndex{\viipt,\vipt,\vskip,\vspace} % \DoNotIndex{\wd,\xiipt,\year,\z@} % \DoNotIndex{\HCode} % % \changes{v0.1}{2000/01/20}{First public release} % % \def\fileversion{v0.1} % \def\filedate{2000/01/20} % \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package % \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option % \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file % \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter % \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle % \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment % \newcommand*{\texht}{\Lpack{TeX4ht}} ^^A typeset TeX4ht % % \title{The \Lpack{step4ht} \texht{} package\thanks{This % file has version number \fileversion, last revised % \filedate.}} % % \author{% % Peter Wilson\\ % Catholic University of America \\ % Now at \texttt{peter.r.wilson@boeing.com} % } % \date{\filedate} % \maketitle % \begin{abstract} % The \Lpack{step4ht} package, in conjunction with \texht{} % can be used to convert \LaTeX{} % STEP documents into HTML tagged documents. % \end{abstract} % \tableofcontents % % \StopEventually{} % % % % \section{Introduction} % % The \Lpack{step4ht} package can be used in conjunction with % the \texht{} system to convert \LaTeX{} ISO~10303 (STEP) documents % into HTML tagged documents. % % Section~\ref{sec:usc} describes the package and % commented source code for the package is in Section~\ref{sec:code}. % % This manual is typeset according to the conventions of the % \LaTeX{} \textsc{docstrip} utility which enables the automatic % extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. % % \subsection{Acknowledgement} % % Development of the \Lpack{step4ht} package would not have been possible % without the help and expertise of Eitan Gurari, and in particular his % willingness to put up with the many questions I asked. % % % \section{The \Lpack{step4ht} package} \label{sec:usc} % % The \texht{} system has been developed by Eitan Gurari (see Chapter~4 % and Appendix~B in~\cite{GOOSSENS99}). It is a general purpose conversion % system to convert \LaTeX{} tagged documents into HTML (or other *ML) % tagged documents. \texht{} can be obtained from % \url{http://www.cis.ohio-state.edu/~gurari/TeX4ht/mn.html}. % The \Lpack{step4ht} % package is not guaranteed to work with versions of \texht{} earlier % than mid-January 2000. At the time of writing, the default \texht{} % distribution was dated mid-1999. The latest version of \texht{} is obtainable % from \url{http://www.cis.ohio-state.edu/~gurari/TeX4ht/bugfixes.html}. % % To use the \Lpack{step4ht} package, just process the \LaTeX{} document % as you would any other under \texht. That is, either call the |ht| script % on a document starting like: % \begin{verbatim} % \documentclass[...]{isov2} % \usepackage[...]{tex4ht} % \usepackage{isov13} % ... % \end{verbatim} % or call the |htlatex| script on a document without the % |\usepackage[...]{tex4ht}| line. % % % \section{The package code} \label{sec:code} % % The following code is based on \Lpack{html0.4ht}, % \Lpack{html32.4ht} and \Lpack{html4.4ht}, all written by Eitan Gurari, % together with code in the \Lpack{iso4ht} package. % % Most of the necessary work already exists in \Lpack{latex.4ht}, which % sets up the \LaTeX{} kernel code and the \Lpack{iso4ht} package % which provides the setup and configuration for the % \Lpack{iso} class, together with \Lpack{html0.4ht}, % \Lpack{html32.4ht} and \Lpack{html4.4ht} provide the HTML option-related % configurations for the kernel code. % The HTML option-related configurations are % embedded in \Lpack{stepv13.4ht} instead of being supplied as % seperate files. % % \changes{v0.1}{2000/01/20}{First public release} % % Announce the name and version of the package. % \begin{macrocode} %<*usc> \typeout{[stepv13.4ht 2000/01/20 version v0.1]} % \end{macrocode} % % \subsection{Setup and hooks} % % The first major part of the code deals with setting up for configuring % the \LaTeX{} commands and environments, which forms the second major % portion of the code. % % Setting up may involve adding hooks into commands, either by redefining % them or, in simpler cases prepending and/or appending code before and/or % after the original code. It can also involve specifying that commands % are configurable. % % % \subsubsection{The STEP cover page} % % The |\STEPcover| command is implemented as a |picture| environment. % \LaTeX{} pictures are usually presented as \file{.gif} images in \texht, % so some major surgery is done to avoid pictures in this case. % % First, we redefine the commands that correspond to the |\STEPcover| % picture placement commands. % % \DescribeMacro{\wg} % The Working Group. % \begin{macrocode} \renewcommand{\wg}[1]{\def\@wg{/#1}} % \end{macrocode} % % \DescribeMacro{\oldwg} % The old Working Group. % \begin{macrocode} \renewcommand{\oldwg}[1]{\def\@oldwg{/#1}} % \end{macrocode} % % \DescribeMacro{\@docnumber} % \DescribeMacro{\docnumber} % \DescribeMacro{\donumber} % The document number, where |\donumber| has hooks and typesets the number. % \begin{macrocode} \renewcommand{\@docnumber}{/N} \renewcommand{\docnumber}[1]{\def\@docnumber{/N#1}} \def\donumber{\a:donumber ISO TC 184/SC4\@wg\@docnumber \b:donumber} \NewConfigure{donumber}{2} % \end{macrocode} % % \DescribeMacro{\@docdate} % \DescribeMacro{\docdate} % \DescribeMacro{\dodocdate} % The document date, where |dodocdate| has hooks and typesets the date. % \begin{macrocode} \renewcommand{\@docdate}{Date: } \renewcommand{\docdate}[1]{\def\@docdate{\textbf{Date: #1}}} \def\dodocdate{\a:dodocdate \@docdate \b:dodocdate} \NewConfigure{dodocdate}{2} % \end{macrocode} % % \DescribeMacro{\@olddocnumber} % \DescribeMacro{\olddocnumber} % \DescribeMacro{\doolddocnumber} % The previous document number, where |\dooldnumber| has hooks and % typesets the number. % \begin{macrocode} \renewcommand{\@olddocnumber}{/N} \renewcommand{\olddocnumber}[1]{\def\@olddocnumber{/N#1}} \def\dooldnumber{\a:dooldnumber Supersedes ISO TC 184/SC4\@oldwg\@olddocnumber \b:dooldnumber} \NewConfigure{dooldnumber}{2} % \end{macrocode} % % \DescribeMacro{\dopartno} % Typeset the Part number (and ballot cycle). % \begin{macrocode} \newcommand{\dopartno}{% \ifnum\value{b@cyc} < 2\relax {\bf ISO\thest@tus\ 10303-\thespartno} \else {\bf ISO\thest@tus\ 10303-\thespartno.\theb@cyc} \fi} \pend:def\dopartno{\a:dopartno} \append:def\dopartno{\b:dopartno} \NewConfigure{dopartno}{2} % \end{macrocode} % % \DescribeMacro{\doptitle} % Typeset the Part title. % \begin{macrocode} \newcommand{\doptitle}{% {\bf \st@pn@me : \thes@ries : \thed@ctitle} } \pend:def\doptitle{\a:doptitle} \append:def\doptitle{\b:doptitle} \NewConfigure{doptitle}{2} % \end{macrocode} % % \DescribeMacro{\cpnotice} % Typeset the title COPYRIGHT NOTICE. % \begin{macrocode} \newcommand{\cpnotice}{\a:cpnotice COPYRIGHT NOTICE \b:cpnotice} \NewConfigure{cpnotice}{2} % \end{macrocode} % % \DescribeMacro{\@abstract} % \DescribeMacro{\abstract} % \DescribeMacro{\doabstract} % The abstract, where |\doabstract| has hooks and typesets the abstract. % \begin{macrocode} \renewcommand{\@abstract}{\textbf{ABSTRACT}: } \renewcommand{\abstract}[1]{\def\@abstract{\textbf{ABSTRACT}: #1}} \def\doabstract{\a:doabstract \@abstract \b:doabstract} \NewConfigure{doabstract}{2} % \end{macrocode} % % \DescribeMacro{\@keywords} % \DescribeMacro{\keywords} % \DescribeMacro{\dokeywords} % The KEYWORDS, where |\dokeywords| has hooks and typesets the keywords. % \begin{macrocode} \renewcommand{\@keywords}{\textbf{KEYWORDS}: } \renewcommand{\keywords}[1]{\def\@keywords{\textbf{KEYWORDS}: #1}} \def\dokeywords{\a:dokeywords \@keywords \b:dokeywords} \NewConfigure{dokeywords}{2} % \end{macrocode} % % \DescribeMacro{\@comread} % \DescribeMacro{\comread} % \DescribeMacro{\docomread} % The COMMENTS TO READERS, where |\docomread| has hooks and typesets the % comments. % \begin{macrocode} \renewcommand{\@comread}{\textbf{COMMENTS TO READER}: } \renewcommand{\comread}[1]{\def\@comread{\textbf{COMMENTS TO READER}: #1}} \def\docomread{\a:docomread \@comread \b:docomread} \NewConfigure{docomread}{2} % \end{macrocode} % % \DescribeMacro{\owner} % \DescribeMacro{\address} % \DescribeMacro{\telephone} % \DescribeMacro{\fax} % \DescribeMacro{\email} % Contact information for the project leader. % \begin{macrocode} \renewcommand{\owner}[1]{\def\@owner{#1}} \renewcommand{\address}[1]{\def\@address{#1}} \renewcommand{\telephone}[1]{\def\@telephone{#1}} \renewcommand{\fax}[1]{\def\@fax{#1}} \renewcommand{\email}[1]{\def\@email{#1}} % \end{macrocode} % % \DescribeMacro{\altowner} % \DescribeMacro{\altaddress} % \DescribeMacro{\alttelephone} % \DescribeMacro{\altfax} % \DescribeMacro{\altemail} % Contact information for the document editor. % \begin{macrocode} \renewcommand{\altowner}[1]{\def\@altowner{#1}} \renewcommand{\altaddress}[1]{\def\@altaddress{#1}} \renewcommand{\alttelephone}[1]{\def\@alttelephone{#1}} \renewcommand{\altfax}[1]{\def\@altfax{#1}} \renewcommand{\altemail}[1]{\def\@altemail{#1}} % \end{macrocode} % % % \DescribeMacro{\STEPcover} % The |\STEPcover| command is redefined to add hooks at the start and end. % \begin{macrocode} \renewcommand{\STEPcover}[1]{ \a:STEPcover #1 \drawcoversheet \b:STEPcover } \NewConfigure{STEPcover}{2} % \end{macrocode} % % \DescribeMacro{\drawcoversheet} % |\drawcoversheet| is redefined to typeset the cover instead of drawing it. % \begin{macrocode} \renewcommand{\drawcoversheet}{ \donumber \\ \dodocdate \\ \dooldnumber \\ \dopartno \\ \doptitle \\ \ifc@pyrightopt \ifisst@ndard \input{bpfsX} \fi % IS \iffdisst@ndard \input{bpfs2} \fi % FDIS \ifdisst@ndard \input{bpfs3} \fi % DIS \ifcdst@ndard \input{bpfs4} \fi % CD \ifwdst@ndard \input{bpfs4} \fi % WD \ift@chrep \input{bpfsX} \fi % Tech Report \fi \doabstract \\ \dokeywords \\ \docomread \\ \begin{tabular}{|l|p{0.3\textwidth}|p{0.3\textwidth}|} \hline & Project Leader & Project Editor \\ \hline Name & \@owner & \@altowner \\ Address & \@address & \@altaddress \\ Telephone & \@telephone & \@alttelephone \\ TeleFacsimile & \@fax & \@altfax \\ Email & \@email & \@altemail \\ \hline \end{tabular} % \end{macrocode} % And, as before, clear out the cover commands which are no longer needed. % \begin{macrocode} \undef@covercmds } % \end{macrocode} % % % \subsubsection{Miscellaneous} % % \DescribeMacro{\@presteptitle} % \DescribeMacro{\stepparttitle} % The |\stepparttitle| is redefined to use the |\titleclause*| command % as defined in the \Lpack{iso4ht} package. The |\@presteptitle| command % is just a helper. The configuration of |\titleclause*| is defined % in \Lpack{iso4ht}. % \begin{macrocode} \newcommand{\@presteptitle}{\scivm@in \stepc@mp \thisp@rtno{\thespartno}} \renewcommand{\stepparttitle}[1]{% \gdef\thestepparttitle{{\@presteptitle \sptitle{#1}}} \titleclause*{\thestepparttitle} } % \end{macrocode} % % % \subsection{Configuration} % % All, or nearly all, configurations depend on the HTML level option chosen. % Typically, html0 results in empty or null values of the hooks; % the |\NewConfigure| command provides empty configurations. html32 has % some simple hook values, while html4 are the most complex. % % % \subsubsection{STEP cover page} % % \begin{macro}{\STEPcover} % \begin{macro}{\donumber} % \begin{macro}{\dodocdate} % \begin{macro}{\dooldnumber} % \begin{macro}{\dopartno} % \begin{macro}{\doptitle} % \begin{macro}{\cpnotice} % \begin{macro}{\doabstract} % \begin{macro}{\dokeywords} % \begin{macro}{\docomread} % \begin{macrocode} \:CheckOption{0.0} \if:Option %%%% html0.0 \else \:CheckOption{3.2} \if:Option %%%% html3.2 \Configure{STEPcover}{\HCode{
}}{\HCode{}} \Configure{dokeywords}{\HCode{
}}{\HCode{}} \Configure{docomread}{\HCode{
}}{\HCode{}} \else %%%% html4.0 \Configure{STEPcover}{\HCode{
}}{\HCode{}} \Configure{dokeywords}{\HCode{
}}{\HCode{}} \Configure{docomread}{\HCode{
}}{\HCode{}} \fi \fi % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \subsubsection{Miscellaneous} % % \begin{macro}{\start:env} % \begin{macro}{\end:env} % Currently these are defined in the \file{html*.4ht} files but they might % dissapear in future, so make sure they are defined. % \begin{macrocode} \:CheckOption{0.0} \if:Option %%%% html0.0 \def\start:env#1{} \def\end:env{} \else \CheckOption{3.2} \if:Option %%%% html3.2 \def\start:env#1{\IgnorePar\HCode{<\tbl:XV{#1}>