\ProvidesFile{blog.tex}[2011/09/02 documenting blog.sty]
\title{\textsf{blog.sty}\\---\\%
       Generating \acro{HTML} Quickly with \TeX\thanks{This 
       document describes version 
       \textcolor{blue}{\UseVersionOf{\jobname.sty}} 
       of \textsf{\jobname.sty} as of \UseDateOf{\jobname.sty}.}}
% \listfiles 
{ \RequirePackage{makedoc} \ProcessLineMessage{} 
  \renewcommand\mdSectionLevelOne{\string\subsection}
  \renewcommand\mdSectionLevelTwo{\string\subsubsection}
  \MakeJobDoc{17}{\SectionLevelTwoParseInput}  }
\documentclass{article}%% TODO paper dimensions!?
\input{makedoc.cfg} %% shared formatting settings
\ReadPackageInfos{blog}
  %% \tagcode seems to be a quite recent pdfTeX primitive, 
  %% cf. microtype.pdf ... %% 2010/11/06
\newcommand*{\xmltagcode}[1]{\texttt{<#1>}}
\sloppy
\begin{document}
\maketitle
\begin{abstract}\noindent
'blog.sty' provides \TeX\ macros for generating web pages, 
based on processing text files using the 'fifinddo' package. 
Some \LaTeX\ 
commands %%% command names 
are redefined to access their \acro{HTML} 
equivalents, other new macro names ``quote" the names of 
\acro{HTML} elements. The package has evolved in several little steps 
each aiming at getting pretty-looking ``hypertext" \textbf{notes}
with little effort, 
where ``little effort" also has meant avoiding studying 
documentation of similar packages already existing. 
[TODO: list them!]
% Version v0.3 is the remainder of v0.2 after moving some stuff 
% to 'fifinddo.sty' (especially `\CopyFile'); 
% moreover, the new `\BlogCopyFile' replaces empty source lines 
% by \acro{HTML}'s \xmltagcode{p} (starting a new paragraph).---Real 
% \emph{typesetting} from the same `.tex' source 
% (pretty printable output) has not been tried yet.
%% <- 2011/01/24 ->
The package %%% rather 
\emph{``misuses"} \TeX's macro language 
for generating \acro{HTML} code and entirely \emph{ignores} 
\TeX's typesetting capabilities.%%%---What about 
% such a ``small" \TeX\ with macros only and 
% \emph{no} typesetting capabilities ...!?
\end{abstract}
\tableofcontents

\section{Installing and Usage}
The file 'blog.sty' is provided ready, 
\strong{installation} only requires 
putting it somewhere where \TeX\ finds it 
(which may need updating the filename data 
 base).\urlfoot{ukfaqref}{inst-wlcf}

\strong{User commands} are described near their implementation below.

However, we must present an \strong{outline} of the procedure 
for generating \acro{HTML} files: 

At least one \strong{driver} file and one \strong{source} file are 
needed.

The \strong{driver} file's name is stored in `\jobname'. 
It loads 'blog.sty' by 
\begin{verbatim}
  \RequirePackage{blog}
\end{verbatim}
and uses file handling commands from 'blog.sty' and 
\CtanPkgRef{nicetext}{fifinddo} 
(cf. `mdoccheat.pdf' from the \ctanpkgref{nicetext} bundle). 
It chooses \strong{source} files and the name(s) for the resulting 
\acro{HTML} file(s). It may also need to load local settings, such as 
for the language 
%% modified 2011/01/25:
(`lang-de.fdf', `lang-en.fdf'), 
and settings for converting the editor's text encoding 
into the encoding that the head of the resulting \acro{HTML} file advertises 
(`atari.fdf' in the 'nicetext' bundle). 

The driver file could be run a terminal dialogue in order to choose source 
and target files and settings. So far, I rather have programmed a 
dialogue just for converting UTF-8 into an encoding that my 
Atari editor \textsc{xEDIT} can deal with. 
I do not present this now because it was conceptually mistaken, 
I must set up this conversion from scratch some time.
% [TODO: present in 'nicetext'].    %% 2011/01/24

The \strong{source} file(s) should contain user commands defined below 
to generate the necessary \xmltagcode{head} section and the 
\xmltagcode{body} tags. 

\section{Examples}
\subsection{A Very Plain Style}
My ``\TeX-generated 
pages"{\foothttpurlref{www.webdesign-bu.de/%
                       uwe\string_lueck/texmap.htm}}
use a \strong{driver} file `makehtml.tex'. 
To choose a page to generate, I ``uncomment"ed just one 
of several lines that set the ``current conversion job" 
from a list (for some time). 
I choose the example of a simple ``site map:" 
`texmap.htm' is generated from \strong{source} file 
`texmap.tex'.---More recently however, I have started to 
read the job name and perhaps extra settings from a file 
`jobname.tex' that is created by a Bash script.

In order to make it easier for the reader to see what is essential, 
I~have moved many `.cfg'-like extra definitions into a file 
`texblog.fdf'. Some of these definitions may later move into 
`blog.sty'. You should find `makehtml.tex', `texmap.tex', and 
`texblog.fdf' in a directory `demo/texblog', perhaps you can use them 
as templates.

\begingroup
  \MakeOther\|\MakeOther\`\MakeOther\'\MakeOther\<
  \MakeActive\� \def�{\"u}
  \hfuzz=\textwidth \advance \hfuzz by 28pt
\subsubsection{Driver File `makehtml.tex'}
  \listinginput[5]{1}{CTAN/morehype/demo/texblog/makehtml.tex}
\subsubsection{Source File `texmap.tex'}
  \listinginput[5]{1}{CTAN/morehype/demo/texblog/texmap.tex}
\endgroup

\subsection{A Style with a Navigation Column}
A style of web pages looking more professional than 
`texmap.htm'                        %% was `texhax.hmt' 2011/09/02
(while perhaps becoming outdated) has a small navigation column 
on the left, side by side with a column for the main content. 
Both columns are spanned by a header section above and a footer 
section below. The package 'lnavicol.sty' provides commands 
`\PAGEHEAD', `\PAGENAVI', `\PAGEMAIN', `\PAGEFOOT', `\PAGEEND' 
(and some more) for structuring the source so that the code 
following `\PAGEHEAD' generates the header, the code following 
`\PAGENAVI' forms the content of the navigation column, etc.
For real professionality, somebody must add some fine \acro{CSS}, 
and the macros mentioned may need to be redefined to use the `@class' 
attribute. Also, I am not sure about the table macros in 'blog.sty', 
so much may change later.

With things like these, can 'blog.sty' become a part of a 
``\Wikienref{content management system}" for \TeX\ addicts? 
This idea rather is based on the 
\wikideref{Content Management System}{\meta{German}} 
Wikipedia article.

As an example, I present parts of the source for my 
``home page"{\foothttpurlref{www.webdesign-bu.de/%
                             uwe\string_lueck/schreibt.html}}.
As the footer is the same on all pages of this style, 
it is added in the driver file `makehtml.tex'. 
`schreibt.tex' is the source file for generating `schreibt.html'.
You should find \emph{this} `makehtml.tex', a cut down version of 
`schreibt.tex', and `writings.fdf' with my extra macros for these pages 
in a directory `demo/writings', hopefully useful as templates.

\begingroup
  \MakeOther\|\MakeOther\`\MakeOther\'\MakeOther\<
  \MakeActive\� \def�{\"u}
  \hfuzz=\textwidth \advance \hfuzz by 10pt
\subsubsection{Driver File `makehtml.tex'}
  \listinginput[5]{1}{CTAN/morehype/demo/writings/makehtml.tex}
\subsubsection{Source File `schreibt.tex'}
  \listinginput[5]{1}{CTAN/morehype/demo/writings/schreibt.tex}
\endgroup


\section{The Package File}
\subsection{Package File Header (Legalize)}
  \errorcontextlines=5
 \ResetCodeLineNumbers
\input{blog.doc}
\end{document}

HISTORY

2010/11/05  for v0.2
2010/11/11  for v0.3
2011/01/23  using readprov and color
2011/01/27  using \urlfoot
2011/09/01  using new makedoc.cfg incl. \acro and \foothttp...; 
            extension for twocolpg.sty
with morehype release r0.4
2011/09/02  twocolpg.sty renamed into lnavicol.sty, typo fixes
