summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/morehype/docsrc/blogexec.tex
blob: 791cfdafde4136f1957af6804a69d126654931cb (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
\ProvidesFile{blogexec.tex}[2012/12/20 documenting blogexec.sty]
\title{{\huge\pkg{blogexec.sty}}\\---\\Overcoming 
       \pkg{blog.sty}'s Pure Expansion\thanks{This
       document describes version
       \textcolor{blue}{\UseVersionOf{\jobname.sty}}
       of \textsf{\jobname.sty} as of \UseDateOf{\jobname.sty}.}}
% \listfiles
{ \RequirePackage{makedoc} 
  \ProcessLineMessage{} %%% {\message{.}} 
  \MakeJobDoc{17} 
  {\SectionLevelThreeParseInput}  }
\documentclass[fleqn]{article}%% TODO paper dimensions!?
\input{makedoc.cfg} %% shared formatting settings
\usepackage{filesdo} \MDfinaldatechecks     %% 2012/12/20
\providecommand*{\HTML}{\acro{HTML}}
\ReadPackageInfos{blogexec}
\sloppy
\begin{document}
\maketitle
\begin{abstract}\noindent
'blog.sty' before v0.7 generated \HTML\ by pure macro expansion 
and could use \LaTeX\ macros (redefined) only to a very limited 
extent. On adding 'blogexec.sty', some macros (configurable) are 
``intercepted" before expansion in a 'blog' run for 
``running" some code, basically `\begin', `\end', 
and a new general `\EXECUTE'. 
A table environment with active characters inside only is 
provided---perhaps ``nicer than \LaTeX."
\end{abstract}
\tableofcontents

%   \newpage
\section{Features and Usage}

% \subsection{Installing and Calling}
The file 'blogexec.sty' is provided ready, installation only requires
putting it somewhere where \TeX\ finds it
(which may need updating the filename data
 base).\urlfoot{ukfaqref}{inst-wlcf}           %% corr. 2011/02/08

'blogexec.sty' may be loaded by
\begin{verbatim}
  \RequirePackage{blogexec}
\end{verbatim}
in a driver file for 'blog.sty'. \strong{Alternatively}, 
the following commands in a 'blog' driver file 
(in a certain way even in a \emph{source} file)
load 'blogexec.sty' and then are carried out according to their 
definitions in 'blogexec':
\begin{description}
  \cmdboxitem|\BlogInterceptExecute| \ intercepts |\EXECUTE| only. 
  \cmdboxitem|\BlogInterceptEnvironments| \ intercepts |\EXECUTE|,
    |\begin|, and |\end| only; the latter two then work much 
    as with \LaTeX. They expand to \HTML\ code as with 'blog'; 
    `\begin{<env>}' additionally executes commands according 
    to an (optional) 
    \[|\MakeBlogBeginRun{<env>}<arguments>{<begin-code>}|.\]
  \cmdboxitem|\BlogInterceptExtra| \ intercepts all the commands 
    in certain lists (using the \ctanpkgref{dowith} package), 
    including `\EXECUTE', `\begin', `\end'. E.g., 
    \[|\MakeBlogOneArgInterception{<cmd>}{<run>}{<write>}|\]
    adds <cmd> to such a list and tells that <run> should be 
    carried out and that <cmd><one-argument> should be replaced 
    by <write> in a line containing <cmd> 
    (not hidden in braces, and there better should not be much more 
     in the line).
  \cmdboxitem|\BlogInterceptHash| \ does \emph{not} choose an 
    \strong{``interception level"} as the previous commands do, 
    but may be necessary for allowing parameters in macro 
    definitions to be run in the course of an interception.
    It is automatically (``implicitly") envoked by the star forms 
    of the above commands, i.e., by either of
    \begin{itemize}
      \item |\BlogInterceptExecute*|
      \item |\BlogInterceptEnvironments*|
      \item |\BlogInterceptExtra*|
    \end{itemize}
\end{description}
The reader may find additional details in the following sections 
near the code implementing the commands.

'blogexec.sty' also modifies 'blog.sty''s (v0.7) 
|{stdallrulestable}| environment as follows:
\begin{itemize}
  \item[\InlineCmdBox{\texttt{&|}}] 
    The vertical stroke becomes an active character 
    that closes a table cell and opens another one 
    (being an alias for 'blog.sty''s v0.7 `\endcell')---just
    as |&| does it with \TeX/\LaTeX. 
  \cmdboxitem|&| The ampersand becomes an active character 
    that---\strong{differently to \TeX\slash\LaTeX}---as an alias for 
    'blog.sty''s |\figurespace| produces the Unicode figure space 
    for alignment of figures. 
\end{itemize}
\emph{Outside} the `{stdallrules}' environment, both characters 
have their ``usual" meaning, i.e., |&| may be used for accessing 
\HTML\ entities (as 'blog.sty' allows it). |\cr| (and |\endline|, 
provided by 'blog.sty' v0.7) ends a table row and starts a new one. 
|\\| is not touched---a \strong{difference to \LaTeX} and may still be 
used for breaking a line within a table cell. 

% \section{Example}

%   \pagebreak
% \section{Implementation}
\section{Package File Header (Legalize)}
\input{blogexec.doc}
\end{document}

VERSION HISTORY

2011/11/04  for v0.1    very first
2011/11/09f.            something more
2011/11/20              star forms
2012/12/20  for v0.21   date checks