From: Joshua Slive Date: Wed, 4 Jun 2003 19:38:19 +0000 (+0000) Subject: A first attempt at xslt to create a latex file from our xml docs. X-Git-Tag: pre_ajp_proxy~1567 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=321387b331502bd0583acc822b402dafae59f698;p=apache A first attempt at xslt to create a latex file from our xml docs. Lots of things remain to be done here; see TODO for some ideas. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100172 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/style/latex/TODO b/docs/manual/style/latex/TODO new file mode 100644 index 0000000000..53faedf869 --- /dev/null +++ b/docs/manual/style/latex/TODO @@ -0,0 +1,44 @@ +Some things that need to be done with the LaTeX transforms: + +- Finish special pages: + * module index + * directive index + * quick reference + * faq + +- Fix tables + + Perhaps we need to add some xml hints about the size of different + columns in the source files. For example: + +
... + +- href + + External hrefs should be transformed to \footnote{}s, but it's not + working at the moment. It is easy enough just to the @href, + but this won't work because the result needs to be run through the + escaping routines or LaTeX will barf. + +- Images + + A quick search makes me believe that pdftex will not handle gifs. + It probably will handle png. + +- Fix quotes + + In LaTeX, quotes should be like ``This''. This may + not be feasible for us, in which case we could simply replace + " with \texttt{"} or something, so that the quotes are all straight. + +- Add hyperlinks for directives and modules (for online use only, + not page number references). + +- Reduce the size of the pdf (both bytes and pages) in any way possible. + +- Hundreds of other little problems with presentation, cross-referencing, + etc. + +- Fix build system + +- Cleanup xsl to make it more readable. \ No newline at end of file diff --git a/docs/manual/style/latex/atbeginend.sty b/docs/manual/style/latex/atbeginend.sty new file mode 100644 index 0000000000..8729fa6cae --- /dev/null +++ b/docs/manual/style/latex/atbeginend.sty @@ -0,0 +1,65 @@ +% atbeginend.sty +% +% defines +% \BeforeBegin{environment}{code-to-execute} +% \BeforeEnd {environment}{code-to-execute} +% \AfterBegin {environment}{code-to-execute} +% \AfterEnd {environment}{code-to-execute} +% +% Save \begin and \end to \BeginEnvironment and \EndEnvironment +\let\BeginEnvironment=\begin +\let\EndEnvironment=\end + +\def\IfUnDef#1{\expandafter\ifx\csname#1\endcsname\relax} + +% Null command needed to for \nothing{something}=.nothing. +\def\NullCom#1{} + +\def\begin#1{% +% +% if defined \BeforeBeg for this environment, execute it +\IfUnDef{BeforeBeg#1}\else\csname BeforeBeg#1\endcsname\fi% +% +% +% +\IfUnDef{AfterBeg#1}% This is done to skip the command for environments + % which can take arguments, like multicols; YOU MUST NOT + % USE \AfterBegin{...}{...} for such environments! + \let\SaveBegEng=\BeginEnvironment% +\else% + % Start this environment + \BeginEnvironment{#1}% + % and execute code after \begin{environment} + \csname AfterBeg#1\endcsname% + % + \let\SaveBegEng=\NullCom% +\fi% +\SaveBegEng{#1}% +} + + +\def\end#1{% +% +% execute code before \end{environment} +\IfUnDef{BeforeEnd#1}\else\csname BeforeEnd#1\endcsname\fi% +% +% close this environment +\EndEnvironment{#1}% +% +% and execute code after \begin{environment} +\IfUnDef{AfterEnd#1}\else\csname AfterEnd#1\endcsname\fi% +} + + +%% Now, define commands +% \BeforeBegin{environment}{code-to-execute} +% \BeforeEnd {environment}{code-to-execute} +% \AfterBegin {environment}{code-to-execute} +% \AfterEnd {environment}{code-to-execute} + +\def\BeforeBegin#1#2{\expandafter\gdef\csname BeforeBeg#1\endcsname +{#2}} +\def\BeforeEnd #1#2{\expandafter\gdef\csname BeforeEnd#1\endcsname +{#2}} +\def\AfterBegin #1#2{\expandafter\gdef\csname AfterBeg#1\endcsname {#2}} +\def\AfterEnd #1#2{\expandafter\gdef\csname AfterEnd#1\endcsname{#2}} diff --git a/docs/manual/style/latex/common.xsl b/docs/manual/style/latex/common.xsl new file mode 100644 index 0000000000..3ab1872eee --- /dev/null +++ b/docs/manual/style/latex/common.xsl @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + +\subsection*{ + +} + + + + + +\subsubsection*{ + +} + + + + + +\subsubsection*{ + +} + + + + + + + + + + +\label{ +: + +} + + + + + + + + + +\par\medskip\begin{center} +\fbox{ +\begin{minipage}{.8\textwidth}\begin{flushleft} + +{\ttfamily +\noindent +} +\end{flushleft}\end{minipage} +} +\end{center}\par\medskip + + + +\textbf{ + +}\\ + + + + + + + +\hfill\begin{minipage}{.9\textwidth}{\texttt + +}\end{minipage} + + + + + + +\par\medskip +{\Huge $\Longrightarrow$}\begin{minipage}[t]{.8\textwidth} +\noindent + + +\end{minipage}\par\medskip + + + +\textbf{ + +} \\ +\noindent + + + + + + + + + +\textsc{ + \textless{} + + \textgreater{} +} + + + + + + + + +\textsc{ + +} + + + + + + + + + + +\fbox{\begin{tabular}{rr} +\begin{minipage}[t]{.4\linewidth} +\textbf{ + +} \\ + + + + \\ + + + +\end{minipage} & +\begin{minipage}[t]{.4\linewidth} +\textbf{ + +} \\ + + + + \\ + + + +\end{minipage} +\end{tabular}} +\medskip + + + + \ No newline at end of file diff --git a/docs/manual/style/latex/html.xsl b/docs/manual/style/latex/html.xsl new file mode 100644 index 0000000000..a4d75ae8c3 --- /dev/null +++ b/docs/manual/style/latex/html.xsl @@ -0,0 +1,205 @@ + + + + + + + + + +\begin{itemize} + + +\end{itemize} + + + + +\begin{enumerate} + + +\end{enumerate} + + + + +\item + + + + + + +\begin{description} + + +\end{description} + + + + +\item[ +] + + + + + + + + + + +\smallskip + + + + + \smallskip + + + \\ + + + + +\\ + + + + + + +\par + + + + +\texttt{ + +} + + + +\textbf{ + +} + + + +\textit{ + +} + + + + +\begin{verbatim} + + +\end{verbatim} + + + + +\begin{quotation} + + +\end{quotation} + + + + +\begin{tabular}{ll} + + + \begin{minipage}{.5\linewidth} + + \end{minipage} + + & + + + \\ + + +\end{tabular} + + + + + + + + + + + + + + + + + + + + + + \footnote{ + + + + + + } + + + + + + + (p.\ \pageref{ + + + + + + + + + + + + + + + + + + + + + + }) + + + + + + +[Image not coverted] + + + + \ No newline at end of file diff --git a/docs/manual/style/latex/latex.xsl b/docs/manual/style/latex/latex.xsl new file mode 100644 index 0000000000..bfbe7ce09e --- /dev/null +++ b/docs/manual/style/latex/latex.xsl @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + +\documentclass[11pt]{book} +\usepackage{fullpage,hyperref} +\usepackage{style/latex/atbeginend} + +% Let LaTeX be lenient about very-bad line wrapping. +\tolerance=9999 +\emergencystretch=40pt + +% Keep paragraphs flush left (rather than the default of indenting +% the first line) and put a space between paragraphs. +\setlength{\parindent}{0ex} +\addtolength{\parskip}{1.5ex} + +% Shrink the inter-item spaces +\AfterBegin{itemize}{\addtolength{\itemsep}{-.8\baselineskip}} + +\pagestyle{headings} + +\title{ + + + + + + + +} +\author{Apache Software Foundation} +\date{\today} + +\begin{document} +\maketitle +\tableofcontents + + + + \chapter{ + + } + + + + +\end{document} + + + +\include{ + + + + + + + + +} + + + + + + + + + + + + + + +\include{mod/ + +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/manual/style/latex/manualpage.xsl b/docs/manual/style/latex/manualpage.xsl new file mode 100644 index 0000000000..a5a0237d5e --- /dev/null +++ b/docs/manual/style/latex/manualpage.xsl @@ -0,0 +1,33 @@ + + + + + + +\section{ +} +\label{ +} + + + + + + \bigskip\noindent\textbf{ + + } + \begin{itemize} + + \item + + \end{itemize} + + + + + + \ No newline at end of file diff --git a/docs/manual/style/latex/synopsis.xsl b/docs/manual/style/latex/synopsis.xsl new file mode 100644 index 0000000000..29d31aca88 --- /dev/null +++ b/docs/manual/style/latex/synopsis.xsl @@ -0,0 +1,343 @@ + + + + + + + + + + +\section{ + + + + + + + + + + + + + + + + + + +}\label{ + +} + + + +\begin{tabular}{lp{.75\linewidth}} +\hline + + +: & + +\\ + + + +: & + +\\ + + + + +: & + +\\ + + + + + +: & + +\\ + + + + + +: & + + \\ + + +\hline \end{tabular} + + + + + \subsection*{ + + } + + + + + +\medskip\textbf{ + + } + + + + + \begin{itemize} + + + \item + + \textless{} + + + + \textgreater{} + + + + (p.\ \pageref{ + + }) + + + + + \end{itemize} + + + + + + + + + + + + + + \textbf{ + + }\begin{itemize} + + \item + + + + +\end{itemize} + + + + + + + + + + + + + + + + + + +\textless{} + +\textgreater{} + + + +\subsection*{ + + + +}\label{ + +} + + + + + + + + +\begin{tabular}{lp{.8\linewidth}} +\hline + + +: & \begin{minipage}{.8\linewidth} + +\end{minipage} \\ + + + +: & \begin{minipage}{.8\linewidth}{\ttfamily + +}\end{minipage} \\ + + + + +: & \begin{minipage}{.8\linewidth}{\ttfamily + +}\end{minipage} \\ + + + + +: & + + \\ + + + + +: & + + \\ + + + + +: & + + \\ + + + +: & + + + + + + + + + \\ + + + + +: & + + \\ + + + +\hline +\end{tabular} + + + + + + +\textbf{ + +} + +\begin{itemize} + + +\item + + +\end{itemize} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + unknown context: + + + + + + , + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file