summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/morehype/blog.tex
blob: cf46597d22598eef4728d7108eb145e72fbf6050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
\ProvidesFile{blog.tex}[2011/01/27 documenting blog.sty]
\title{\textsf{blog.sty}\\---\\%
       Generating 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}
\usepackage{color}
  %% \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 HTML 
equivalents, other new macro names ``quote" the names of 
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 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 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 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 
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 HTML file advertises 
(`atari.fdf'). 

The driver file can 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 xEDIT can deal with 
[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{Example}
My ``\TeX-generated 
pages"{\footnote{\urlhttpref{www.webdesign-bu.de/uwe\underscorechar 
                             lueck/texmap.htm}}} 
use a \strong{driver} file `makehtml.tex'. 
To choose a page to generate, I ``uncomment" just one 
of several lines that set the ``current conversion job" 
from a list. I choose the example of a simple ``site map:" 
`texmap.htm' is generated from \strong{source} file `texmap.tex'.

\begingroup
  \MakeOther\|\MakeOther\`\MakeOther\'\MakeOther\<
  \MakeActive\ \def{\"u}
  \hfuzz=\textwidth \advance \hfuzz by 28pt
\subsection{Driver File \texttt{makehtml.tex}}
  \listinginput[5]{1}{makehtml.tex}
\subsection{Source File \texttt{texmap.tex}}
  \listinginput[5]{1}{texmap.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