summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/morehype/blog.sty
blob: bcf0bc0d0ac0dfad5063b99d040c2c82066dbbf3 (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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
\NeedsTeXFormat{LaTeX2e}[1994/12/01] %% \newcommand* etc. 
\ProvidesPackage{blog}[2011/10/15 v0.61 simple fast HTML (UL)] 
%% copyright (C) 2010 2011 Uwe Lueck, 
%% http://www.contact-ednotes.sty.de.vu 
%% -- author-maintained in the sense of LPPL below.
%%
%% This file can be redistributed and/or modified under 
%% the terms of the LaTeX Project Public License; either 
%% version 1.3c of the License, or any later version.
%% The latest version of this license is in
%%     http://www.latex-project.org/lppl.txt
%% We did our best to help you, but there is NO WARRANTY. 
%%
%% Please report bugs, problems, and suggestions via 
%% 
%%   http://www.contact-ednotes.sty.de.vu 
%%
%% == Processing ==
%% We are building on the 'fifinddo' package:
\RequirePackage{fifinddo} 
%% |\CLBrk| is a \emph{code line break} 
%% (also saving subsequent comment mark):
\newcommand*{\CLBrk}{^^J}
%% |\htmakeext| is the extension of the generated file. 
%% Typically it should be `.html', as set here, 
%% but my Atari emulator needs `.htm' 
%% (see `texblog.fdf'):
\newcommand*{\htmakeext}{.html}
%% |\BlogCopyFile[<changes>]{<src-file>}|
%% ``copies" the \TeX\ source file <src-file> 
%% into the file specified by `\ResultFile'. 
%% As in \TeX\ an empty line starts a new paragraph, 
%% we ``interpret" an empty source line as 
%% \HTML\ tag \xmltagcode{p} for starting a new paragraph. 
%% Empty source lines following some first empty source 
%% line immediately are ignored 
%% (``compression" of empty lines).---However, 
%% I am not entirely sure that this won't have 
%% unwanted effects, so it must be required 
%% explicitly by |\BlogAutoPars|, or by calling the
%% package with option |[autopars]|.
%% In the latter case, it can be turned off by 
%% |\noBlogAutoPars|
\newif\ifBlogAutoPars
\newcommand*{\BlogAutoPars}{\BlogAutoParstrue}
\newcommand*{\noBlogAutoPars}{\BlogAutoParsfalse}
\DeclareOption{autopars}{\BlogAutoPars}
\ProcessOptions
\MakeOther\< \MakeOther\>               %% TODO ...
\newcommand*{\BlogCopyFile}[2][]{%
    \typeout{^^J\screenqtd{blog.sty} generating         %% 2011/10/05
                \screenqtd{\htmljob\htmakeext}}%
    \ProcessFileWith[\BlogCodes 
                     \let\ProvidesFile\BlogProvidesFile %% 2011/02/24 
                     \let\protect\@empty                %% 2011/03/24
                     #1]{#2}{%
        \IfFDinputEmpty
            {\IfFDpreviousInputEmpty
                \relax
                {\WriteResult{\ifBlogAutoPars<p>\fi}}}% 
            \CopyLine
    }%
}
%% For a while, line endings swallowed inter-word spaces, 
%% until I found the setting of `\endlinechar' 
%% ('fifinddo''s default is `-1') 
%% in |\BlogCodes|:
\newcommand*{\BlogCodes}{%                              %% 2010/09/07
    \endlinechar`\ \catcode`\~\active \BasicNormalCatCodes}
%% The tilde is active as in Plain~TeX too, it is so natural to 
%% use it for abbreviating \HTML's `&nbsp;'!
%%
%% %% v0.42:
%% |\ProvidesFile{<file-name>.tex}[<file-info>]| \ is supported 
%% for use with the \CtanPkgRef{morehype}{myfilist} 
%% package  %% TODO \urlpkgfoot!? 2011/02/22
%% to get a list of source file infos. 
%% In generating the \HTML\ file, the file infos are transformed 
%% into an \HTML\ comment. Actually it is 
%% |\BlogProvidesFile| (for the time being, 2011/02/22):
\@ifdefinable\BlogProvidesFile{%
    \def\BlogProvidesFile#1[#2]{%
        \comment{ generated from\CLBrk\CLBrk
                  \ \ \ \ \ \ \ \ \ #1, #2,\CLBrk\CLBrk
                  \ \ \ \ \ with blog.sty,
                  \GenDate\ }}}                 %% TODO predefine?
%% %% changes 2011/02/24:
%% (TODO: customizable style.)---Due to the limitations 
%% of the approach reading the source file
%% line by line, the ``optional argument" `[<file-info>]' 
%% of `\ProvidesFile' must appear in the same line as 
%% the closing brace of its mandatory argument.
%% The feature may require inserting 
%% \[`\let\ProvidesFile\BlogProvidesFile'\] 
%% somewhere, e.g., in `\BlogCopyFile'. 
%%
%%  \pagebreak                                      %% 2011/10/10
%% == General \HTML\ Matters ==
%% The following stuff is required for any web page 
%% (or hardly evitable).
%% === General Tagging ===
%% %% $$ -> \[ ... 2011/10/10:
%% \[|\TagSurr{<el-name>}{<attr>}{<content>}|\]
%% (I hoped this way code would be more readable 
%%  than with `\TagSurround' ...)
%% and \[|\SimpleTagSurr{<el-name>}{<content>}|\]
%% are used to avoid repeating element names <el-name> in 
%% definitions of \TeX\ macros that refer to ``entire" 
%% elements---as opposed to elements whose content often
%% spans lines (as readable \HTML\ code). 
%% We will handle the latter kind of elements 
%% using \LaTeX's idea of ``environments."
%% `\TagSurr' also inserts specifications of element
%% \textbf{attributes}, 
%% [TODO: 'wiki.sty' syntax would be so nice here]
%% while `\SimpleTagSurr' is for elements used without 
%% specifying attributes. |\STS| is an abbreviation for 
%% `\SimpleTagSurr' that is useful as the `\SimpleTagSurr'
%% function occurs so frequently: 
\newcommand*{\SimpleTagSurr}[2]{<#1>#2</#1>}
\newcommand*{\STS}{} \let\STS\SimpleTagSurr %% 2010/05/23
\newcommand*{\TagSurr}[3]{<#1 #2>#3</#1>}
%%
%% === Attributes === %%% (General) %%% 
%% Inspired by the common way to use `@' for referring 
%% to element attributes---i.e., `@<attr>' refers to attribute
%% `<attr>'---in \HTML/\acro{XML} documentation, we often use 
%% \[`\@<attr>{<value>}' \qquad 
%%   \mbox{to ``abbreviate"}\qquad  `<attr>="<value>"'\] 
%% within the starting tag of an \HTML\ element.
%% This does not really 
%% make typing easier or improve readability, 
%% it rather saves \TeX's memory by using a single token 
%% for referring to an attribute.
%% This ``abbreviation" is declared by 
%% |\declareHTMLattrib{<attr>}|, even with a check 
%% whether `\@<attr>' has been defined before: 
\newcommand*{\declareHTMLattrib}[1]{%
  \def\reserved@a{@#1}%
  \@ifundefined{@#1}%
               {\@namedef{@#1}##1{#1="##1"}}%
               \@notdefinable}
%% So after `\declareHTMLattrib{<attr>}', `\@<attr>' is a 
%% \TeX\ macro expecting one parameter for the specification. 
%%
%% A few frequent attributes are declared this way here. 
%% %% 2011/09/27:
%% |@class|, |@id|, |@style|, |@title|, |@lang|, and |@dir|
%% are the ones named on 
%% \wikienref{HTML\#Attributes}{\meta{Wikipedia}}:
\let\@class\relax     %% for tab/arr in latex.ltx
\declareHTMLattrib{class} 
\declareHTMLattrib{id} 
\declareHTMLattrib{style} 
\let\@title\relax     %% for \title in latex.ltx
\declareHTMLattrib{title}                       %% 2011/04/26
\declareHTMLattrib{lang} 
\declareHTMLattrib{dir} 
%% |@type| is quite frequent too:               %% doc. 2011/09/27
\declareHTMLattrib{type}
%% |@href| is most important for that ``hyper-text:"
\declareHTMLattrib{href} 
%% ... and |@name| (among other uses) is needed for 
%% |@name| for                                  %% 2011/04/26
%% hyper-text anchors: 
\declareHTMLattrib{name}                        %% 2010/11/06
%% |@bgcolor| is used in tables as well as 
%% for the appearance of the entire page:
\declareHTMLattrib{bgcolor} 
%% 
%% %%% Attributes (Tables) %%%
%% Of course, conflicts may occur, as the form 
%% `\@<ASCII-chars>' of macro names is used for internal 
%% (La)\TeX\ macros. 
%% Indeed, `\@width' that we want to have for the |@width|
%% attribute already ``abbreviates" 
%% \TeX's ``keyword" (\TeX book p.~61) %% 2010/11/27
%% `width' in \LaTeX\ 
%% (for specifying the width of a `\hrule' or `\vrule' from \TeX; 
%%  again just saving \TeX\ tokens rather than for readibility).
\PackageWarning{blog}{Redefining \protect\@width}
\let\@width\relax
\declareHTMLattrib{width} 
%% Same with |@height|:
\PackageWarning{blog}{Redefining \protect\@height}
\let\@height\relax
\declareHTMLattrib{height}              %% 2010/07/24
%% We can enumerate the specifications allowed for 
%% |@align|:                            %% reimpl. 2011/04/24
\newcommand*{\@align@c}{\@align{center}} 
\newcommand*{\@align@l}{\@align{left}} 
\newcommand*{\@align@r}{\@align{right}} 
\newcommand*{\@align}[1]{align="#1"}
%% |@valign@t|:
\newcommand*{\@valign@t}{v\@align{top}} %% 2011/04/24
%% Some other uses of `\declareHTMLattrib' essential for 
%% \emph{tables:}                       %% emph 2011/04/24
\declareHTMLattrib{border}              %% 2011/04/24
\declareHTMLattrib{cellpadding}         %% 2010/07/18
\declareHTMLattrib{cellspacing}         %% 2010/07/18
\declareHTMLattrib{colspan}             %% 2010/07/17
\declareHTMLattrib{frame}               %% 2010/07/24
%% \textbf{Another problem} with this namespace idea is that 
%% \emph{either} this reference to attributes cannot be used in 
%% ``author" source files for generating HTML---\emph{or} `@' 
%% cannot be used for ``private" (internal) macros. 
%% Cf. |\ContentAtt| for \xmltagcode{meta} tags ...
%% well, not so bad, as the main purpose of this namespace 
%% is saving tokens \emph{in macros.}
%%
%% === \HTML's Special Symbols ===
%% |#| is needed for numerical specifications in \HTML, 
%% especially colors and Unicode symbols,
%% while it plays a different (essential) role in our 
%% definitions of \TeX\ macros here. 
%% We redefine \LaTeX's |\#| 
%% for a kind of ``quoting" `#' in macro definitions 
%% in order to refer to their \HTML\ meaning.---I \textbf{wonder} 
%% what I had in mind with the |&| things here. 
%% I cannot find any use of |\AmpMark| in my code 
%% (including my web pages). There is no real problem 
%% with calling special \HTML\ symbols, `&' is simply 
%% made `other' already here for macros calling those symbols 
%% (below), and in processing source files, it is as well 
%% `other' by default. The symbols section, however, redefines |\&| 
%% for calling \HTML's ampersand symbol. 
{\catcode`\&=12   \catcode`\#=12 
 \gdef\AmpMark{&} \gdef\#{#}}
%% ... `\CompWordMark' etc.?
%%
%% === Head ===
%% |\head| produces the first two tags that an \HTML\ file must start: 
\newcommand*{\head}{<html><head>}   %% ^^J rm 2010/10/10
%% |\MetaTag{<inside>}| and |\ContentAtt{<value>}| 
%% are internal shortcuts:
\newcommand*{\MetaTag}[1]{\space\space<meta #1>}
\newcommand*{\ContentAtt}[1]{content="#1"}
%% |\charset{<code-page>}|
\newcommand*{\charset}[1]{%
  \MetaTag{http-equiv="Content-Type" \ContentAtt{text/html; #1}}}
%% |\description{<text>}| for web searches (I think):
% \newcommand*{\description}[1]{%
%   \MetaTag{\@name{description} \ContentAtt{#1}}}
%% ... an outright \textbf{mistake!} %% commented out 2011/10/05
%% The definition is overridden 
%% to get the \HTML\ equivalent to \LaTeX's `description' environment. 
%% `\newcommand' did not warn here because we don't load any \LaTeX\ 
%% class for text-processing macros and code generation.---And so 
%% some |\MetaDescr| should be defined---and used finally! TODO
%% 
%% |\robots{<instructions>}|: 
\newcommand*{\robots}[1]{%% juergenf: index, follow, noarchive
  \MetaTag{\@name{robots} \ContentAtt{#1}}}
%% |\norobots| for privacy:                 %% 2011/03/16
\newcommand*{\norobots}{\robots{noarchive,nofollow,noindex}}
%% |\stylesheet{<media>}{<css>}| uses <css>`.css' for 
%% `media="<media>"':
\newcommand*{\stylesheet}[2]{%
  \space\space                      %% 2010/09/10
  <link rel="stylesheet" media="#1" 
        \@type{text/css}            %% \@type 2011/10/05
        \@href{#2.css}>}
%% %% 2011/10/05:
%% Alternatively, style declarations may occur in the 
%% \xmltagcode{style} element. It can be accessed by the 
%% |{style}| environment (cf. Sec.~\ref{sec:env}):
\newenvironment*{style}[1]
                {<style \@type{text/css} media="#1">}
                {</style>}
%% With |\title{<text>}|, <text> heads %% grammar? TODO 2010/04/08
%% the browser window: 
\renewcommand*{\title}[1]{\space\space<title>#1</title>} 
%%
%% === Body === 
%% |\body| separates the `head' element from the `body' element 
%% of the page.
\newcommand*{\body}{</head><body>}
%% |\topofpage| generates an anchor `top-of-page':
\newcommand*{\topofpage}{\hanc{top-of-page}{}}
%% |\finish| finishes the page, closing the `body' and `html'
%% elements.
\newcommand*{\finish}{</body></html>}
%%
%%
%% == Fonts ==
%% |\heading{<level>}{<text>}| prints <text> with size dependent 
%% on <level>. The latter may be one out of 
%% `1', `2', `3', `4', `5', `6'.                    %% 2011/05/12
\newcommand*{\heading}[1]{\SimpleTagSurr{h#1}}
%% ... I might use `\section' etc. one day, I made `\heading'
%% when I could not control the sizes of the section titles 
%% properly and decided first to experiment with the level numbers.
%% %% <- TODO re-order alltogether, cf. SelfHTML       2011/05/12
%%
%% We ``re-use" some \LaTeX\ commands for specifying font attributes, 
%% rather than (re)defining macros `\i', `\b', `\tt', ...
%% \[|\textit{<text>}| \qquad 
%%   \mbox{just expands to}\qquad 
%%   \xmltagcode{i}<text>\xmltagcode{/i}\]
\renewcommand*{\textit}{\SimpleTagSurr i}
%% etc. for |\textbf|, |\texttt| ...:
\renewcommand*{\textbf}{\SimpleTagSurr b}
\renewcommand*{\texttt}{\SimpleTagSurr{tt}}         %% 2010/06/07
%% |\textsf{<text>}| TODO (see some `makehtml.tex') %% 2011/05/11
%%
%% |\textcolor| is from \LaTeX's 'color' package 
%% that we won't load for generating \HTML, 
%% so it is ``new" here, it is just natural to use it 
%% for colored text (2010/05/15):
\newcommand*{\textcolor}[1]{\TagSurr{font}{color="#1"}}
%%
%% == Logical Markup ==
%% |\code{<text>}| marks <text> as ``code," 
%% just accessing te \xmltagcode{code} element, 
%% while standard \LaTeX\ does not provide a `\code' command:
\newcommand*{\code}{\SimpleTagSurr{code}}   %% 2010/04/27
%% |\emph{<text>}| is \LaTeX's command again, but somewhat abused, 
%% expanding to \lq\xmltagcode{em}<text>\xmltagcode{/em}\rq:
\renewcommand*{\emph}  {\SimpleTagSurr{em}}
%% ... Note that \LaTeX's `\emph' feature of switching to `up' 
%% when `\emph' appears in an italic context doesn't work here ...
%% 
%% |\strong{<text>}| again just calls an \HTML\ element. 
%% It may behave like `\textbf{<text>}', or ... I don't know ...
\newcommand*{\strong}{\SimpleTagSurr{strong}}
%% %% 2011/03/09:
%% |\var{<symbol(s)>}| accesses the \xmltagcode{var} element:
\newcommand*{\var}{\SimpleTagSurr{var}}
%% |\acronym{<chars>}| ... there is `\acro' in the TUGboat 
%% macros, while \HTML\ provides an \xmltagcode{acronym}
%% environment ...                          %% 2011/09/21
\newcommand*{\acronym}{\SimpleTagSurr{acronym}}
%%
%% == Environments ==
%% \label{sec:env}
%% We reduce \LaTeX's |\begin| and |\end| to their most primitive 
%% core.
%% \begin{description}
%% \cmdboxitem|\begin{<command>}| just executes the macro `\<command>', 
%% and 
%% \cmdboxitem|\end{<command>}| just executes the macro `\end<command>'.
%% \end{description}
%%
%% They don't constitute a group with local settings. 
%% Indeed, the present (2010/11/07) version of 'blog.sty'
%% does not allow any assignments while ``copying" 
%% the \TeX\ source into the `.htm'.
%% There even is no check for proper nesting.
%% `\begin' and `\end' just represent \HTML\ elements 
%% (their starting/ending tags)
%% that typically have ``long" content. 
%% (We might ``intercept" `\begin' and `\end' before 
%%  copying for executing some assignments in a future version.)
\let\begin\@nameuse
\def\end#1{\csname end#1\endcsname}
%% ... moving |{english}| to `xmlprint.cfg' 
%% 2010/05/22 ...%% doc 2010/11/06
%%
%% As formerly with ``fonts," we have \emph{two} policies for 
%% \textbf{choosing macro names}: 
%% (i)~using an \emph{existing} \HTML\ element name, 
%% (ii)~using a \LaTeX\ command name for accessing a somewhat 
%% similar \HTML\ element having a \emph{different} name. 
%% [\,2011/10/05: so what? TODO\,]
%%
%% New 2011/10/05:
%% With |\useHTMLelement{<ltx-env>}{<html-el>}|, 
%% you can access the \xmltagcode{<html-el>} element 
%% by the `<ltx-env>' environment. 
%% The ``starred" form is for ``list" environments 
%% where I observed around 2011/10/01 that certain links 
%% (with Mozilla Firefox) need \xmltagcode{/li}: 
\newcommand*{\useHTMLelement}{%
    \@ifstar{\@useHTMLelement[</li>]}{\@useHTMLelement}}
\newcommand*{\@useHTMLelement}[3][]{%
    \@namedef{#2}{<#3>}%
    \@namedef{end#2}{#1</#3>}}
%% Applications: 
%%
%% \acro{CARE:} |{small}| is an environment here, 
%% it is not in \LaTeX:
\useHTMLelement{small}{small}
%% |{center}|: %% TODO von 2010/07/18, weiter oben
% \renewenvironment*{center}{<p align="center">}{</p>}
% \renewenvironment*{center}{<p \@align@c>}{</p>}
\useHTMLelement{center}{center}
%% The next definitions for |{enumerate}|, |{itemize}|, 
%% `{verbatim}' follow policy~(ii):
\useHTMLelement*{enumerate}{ol}
\useHTMLelement*{itemize}  {ul}
%% %% 2010/11/16:
%% With 'blog.sty', |{verbatim}| really doesn't work much 
%% like its original \LaTeX\ variant. \TeX\ macros inside 
%% still are expanded, and you must care yourself for 
%% wanted \dqtd{quoting}:
\useHTMLelement{verbatim} {pre}
%% |{quote}|:
\useHTMLelement{quote}{blockquote}
%% For list |\item|s, I tried to get readable \HTML\ code
%% using `\indenti'. This fails with nested lists. 
%% The indent could be increased for nested lists 
%% if we supported assignments with `\begin' and `\end'.
%% 2011/10/04 including \xmltagcode{</li>}, 
%% repairs more links in \acro{DANTE} talk
%% (missing again 2011/10/11!?):
\renewcommand*{\item}{%
    \indenti</li>\CLBrk                             %% 2011/10/11
    \indenti<li>}
%% \LaTeX's |{description}| environment redefines the 
%% label format for the optional argument of `\item'.
%% Again, \emph{we} cannot do this here 
%% (we even cannot use optional arguments, 
%%  at least not easily). 
%% Instead we define a different |\ditem{<term>}| 
%% having a \emph{mandatory} argument 
%% (TODO star?). %% 2011/10/05
\useHTMLelement{description}{dl} 
\newcommand*{\ditem}[1]{\indenti<dt>\strong{#1}<dd>}
%%
%% == Links ==
%% === Basic Link Macros ===
%% |\hanc{<id>}{<text>}| makes <text> an anchor with 
%% \HTML\ label <id> (like 'hyperref''s `\hypertarget'): 
\newcommand*{\hanc}[1]{\TagSurr a{\@name{#1}}}
%% |\hancref{<id>}{<url>}{<text>}| makes <text> an anchor with 
%% \HTML\ label <id> and at the same time a link to <url>: 
\newcommand*{\hancref}[2]{\TagSurr a{\@name{#1} \@href{#2}}}
%% |\href{<id>}{<text>}| makes <text> a link to <url>: 
\newcommand*{\href}[1]{\TagSurr a{\@href{#1}}}
%%
%% === Special cases of Basic Link Macros ===
%% |\autanc{<text>}| creates an anchor where <text> is 
%% the text and the internal label at the same time:
\newcommand*{\autanc}[1]{\hanc{#1}{#1}}             %% 2010/07/04
%% |\ancref{<id>}{<text>}| makes <text> a link to 
%% an anchor <id> on the same web page.
%% This is especially useful for a ``table of contents"---a 
%% list of links to sections of the page. 
\newcommand*{\ancref}[1]{\href{\##1}}
%% |\autref{<text>}| makes <text> a link to an anchor 
%% named <text> itself: 
\newcommand*{\autref}[1]{\ancref{#1}{#1}}           %% 2010/07/04
%%
%% === Italic Variants ===
%% Some of the link macros get ``emphasized" or ``italic" 
%% variants. Originally I used ``emphasized," later I decided 
%% to replace it by ``italic," as I found that I had used 
%% italics for another reason than emphasizing. 
%% E.g., <text> may be \qtd{bug,} and I am not referring to 
%% some bug, but to the Wikipedia article \textit{Bug.}
%% This has been inspired by some Wikipedia typography convention 
%% about referring to titles of books or movies. 
%% (The `em'\,->\,`it' replacement has not been completed yet.)
% \newcommand*{\emhref}[2]{\href{#1}{\emph{#2}}}
\newcommand*{\ithref}[2]{\href{#1}{\textit{#2}}}
\newcommand*{\itancref}[2]{\ancref{#1}{\textit{#2}}}%% 2010/05/30
\newcommand*{\emancref}[2]{\ancref{#1}{\emph{#2}}}
%%
%% === Built Macros for Links to Local Files ===
%% Originally, I wanted to refer to my web pages only, 
%% using \[|\fileref{<filename-base>}|.\] I have used 
%% extension `.htm' to avoid disturbing my Atari 
%% editor 'xEDIT' or the the Atari emulator (Hatari). 
%% %% rm. 2011/08/18:
%% % I could switch to `.html' some time using symbolic links. 
%% The extension I actually use is stored as macro 
%% |\htext| in a more local file (e.g., `.cfg').---Later 
%% I realized that I may want to refer to local files 
%% other than web pages, and therefore I introduced a more
%% %% mod. 2011/08/18:
%% general `\FileRef{<filename>}|', overlooking 
%% that it was the same as |\href|.
% \newcommand*{\FileRef}[1]{\TagSurr a{\@href{#1}}}
\newcommand*{\htext}{.htm}                              %% 2011/10/05
\newcommand*{\fileref}[1]{\href{#1\htext}}
% \newcommand*{\emfileref}[2]{\fileref{#1}{\emph{#2}}}
\newcommand*{\itfileref}[2]{\fileref{#1}{\textit{#2}}}
%% |\fileancref{<file>}{<anchor>}{<text>}| links to 
%% %% <- `text' added 2011/03/19
%% anchor <anchor> on web page <file>:
\newcommand*{\fileancref}[2]{%
  \TagSurr a{\@href{#1\htext\##2}}}
% \newcommand*{\emfileancref}[3]{\fileancref{#1}{#2}{\emph{#3}}}
%% <- 2010/05/31 ->
\newcommand*{\itfileancref}[3]{\fileancref{#1}{#2}{\textit{#3}}}
%%
%% === Built Macros for Links to Remote Files ===
%% 'blog.sty' currently (even 2011/01/24) implements my style 
%% \emph{not} to open a new browser window or tab for \emph{local} 
%% files but to open a new one for \emph{remote} files, i.e., 
%% when a file is addressed by a full URL. 
%% This may change (as with 'blogdot.sty', 2011/10/12, 
%% or more generally with local non-\HTML\ files),
%% so let us have a backbone 
%% |\hnewref{<prot>}{<host-path[#frag]>}{<text>}| 
%% makes <text> a link to <prot><host-path[#frag]>:
\newcommand*{\hnewref}[2]{%
    \TagSurr a{\@href{#1#2" target="_blank}}}
%% So \[|\httpref{<host-path[#frag]>}{<text>}|\] 
%% makes <text> a link to \urlfmt{http://}<host-path[#frag]>:
\newcommand*{\httpref}{\hnewref{http://}}
%% With v0.4, macros based on `\httpref' are moved to 'texlinks.sty': 
\RequirePackage[blog]{texlinks}[2011/02/10]
%% Former |\urlref| appears as |\urlhttpref| there ...
\newcommand \urlref {}      \let\urlref\urlhttpref
%% ... and |\ctanref| has been replaced by `\tugctanref'.
%% Let's go on playing with the difference ...
\newcommand*{\ctanref}[1]{\httpref{ctan.org/tex-archive/#1}}
%% %% 2011/02/07:
%% 'texlinks' sometimes uses a ``permanent alias" 
%% |\NormalHTTPref| of `\httpref':
\@ifdefinable \NormalHTTPref {\let\NormalHTTPref\httpref}
%% |\httpsref| is the analogue of `\httpref' for `https://':
\newcommand*{\httpsref}{\hnewref{https://}}
%%
%% == Characters/Symbols ==         %% `Symbols' until 2011/09/25 
%% === Basic Preliminaries ===
%% |&| is made `other' for using it to call \HTML's 
%% ``character entities."   %% dot inside 2011/02/25 
\@makeother\&
%% Again we have the two policies about choosing macro names
%% and respectively two new definition commands. 
%% |\declareHTMLsymbol{<name>}| defines a macro `\<name>'
%% expanding to `&<name>;'. Checking for prior definedness 
%% hasn't been implemented yet. 
%% (TODO; but sometimes redefining ...)         %% 2011/02/26
\newcommand*{\declareHTMLsymbol}[1]{\@namedef{#1}{&#1;}}
%% |\renderHTMLsymbol{<macro>}{<name>}| \emph{redefines} 
%% macro <macro> to expand to `&<name>;':
\newcommand*{\renderHTMLsymbol} [2]{\renewcommand*{#1}{&#2;}}
%% Redefinitions of |\&| and |\%| 
%% (well, `\PercentChar' is 'fifinddo''s %% add. apostroph 2011/07/22
%%  version of \LaTeX's `\@percentchar'):
\renderHTMLsymbol{\&}{amp}
\let\%\PercentChar 
%%
%% \pagebreak        %% output routine problem 2011/10/05
%% === Diacritics ===                       %% changed 2011/03/04
%% For the difference between \dqtd{diacritic} and 
%% \dqtd{accent,} see \wikienref{Diacritic}{Wikipedia}.
%% 
%% |\ccedil|: %%%, |\eacute|, |\ocirc| (``r\^ole") 
\declareHTMLsymbol{ccedil} 
%% %% 2011/03/04:
%% \HTML\ entities |&eacute;|, |&ocirc;| etc. can be accessed 
%% by \TeX's accent commands |\'|, |\^|, |\`|, |\"|:
% \declareHTMLsymbol{eacute}
% \declareHTMLsymbol{ocirc}
\renewcommand*{\'}[1]{&#1acute;}
\renewcommand*{\^}[1]{&#1circ;}
\renewcommand*{\`}[1]{&#1grave;}
\renewcommand*{\"}[1]{&#1uml;}
%% |\uml{<char>}| % yields the umlaut for <char> 
%% may have been overestimated:
%% % (useful in macro definitions):       %% 2010/11/13
% \newcommand*     {\uml}[1]  {&#1uml;}   %% 2010/08/24
%%
%% === Greek ===                            %% 2011/02/26
\declareHTMLsymbol{Alpha} 
\declareHTMLsymbol{alpha} 
\declareHTMLsymbol{Beta} 
\declareHTMLsymbol{beta} 
\declareHTMLsymbol{Gamma} 
\declareHTMLsymbol{gamma} 
\declareHTMLsymbol{Delta} 
\declareHTMLsymbol{delta} 
\declareHTMLsymbol{Epsilon} 
\declareHTMLsymbol{epsilon} 
\declareHTMLsymbol{Zeta} 
\declareHTMLsymbol{zeta} 
\declareHTMLsymbol{Eta} 
\declareHTMLsymbol{eta} 
\declareHTMLsymbol{Theta} 
\declareHTMLsymbol{theta} 
\declareHTMLsymbol{Iota} 
\declareHTMLsymbol{iota} 
\declareHTMLsymbol{Kappa} 
\declareHTMLsymbol{kappa} 
\declareHTMLsymbol{Lambda} 
\declareHTMLsymbol{lambda} 
\declareHTMLsymbol{My} 
\declareHTMLsymbol{my} 
\declareHTMLsymbol{Ny} 
\declareHTMLsymbol{ny} 
\declareHTMLsymbol{Xi} 
\declareHTMLsymbol{xi} 
\declareHTMLsymbol{Omikron} 
\declareHTMLsymbol{omikron} 
\declareHTMLsymbol{Pi} 
\declareHTMLsymbol{pi} 
\declareHTMLsymbol{Rho} 
\declareHTMLsymbol{rho} 
\declareHTMLsymbol{Sigma} 
\declareHTMLsymbol{sigma} 
\declareHTMLsymbol{sigmaf} 
\declareHTMLsymbol{Tau} 
\declareHTMLsymbol{tau} 
\declareHTMLsymbol{Upsilon} 
\declareHTMLsymbol{upsilon} 
\declareHTMLsymbol{Phi} 
\declareHTMLsymbol{phi} 
\declareHTMLsymbol{Chi} 
\declareHTMLsymbol{chi} 
\declareHTMLsymbol{Psi} 
\declareHTMLsymbol{psi} 
\declareHTMLsymbol{Omega}           %% render -> declare 2011/02/26
\declareHTMLsymbol{omega} 
\declareHTMLsymbol{thetasym} 
\declareHTMLsymbol{upsih} 
\declareHTMLsymbol{piv} 
%% 
%% === Arrows ===
%% Arrows: |\gets|, |\to|, |\uparrow|, |\downarrow| ...
\renderHTMLsymbol {\gets}     {larr}
\renderHTMLsymbol {\to}       {rarr}
\renderHTMLsymbol {\uparrow}  {uarr}    %% 2010/09/15
\renderHTMLsymbol {\downarrow}{darr}    %% 2010/09/15
%% 
%% === Dashes ===
%% The ligatures `--' and `---' for en~dash and em~dash 
%% don't work in our expanding mode. Now, \HTML's policy 
%% for choosing names often prefers shorter names than 
%% are recommended for (La)\TeX, so here I adopt a \emph{third}
%% police besides (i) and (ii) earlier; cf. \LaTeX's
%% `\textemdash' and `\textendash'.---`\newcommand' 
%% does not accept macros whose names start with `end', so:
%% |\endash|, |\emdash| ...
\def         \endash  {&ndash;}         %% \end... illegal
\newcommand*{\emdash} {&mdash;}
%% 
%% === Spaces ===
%% ``Math" (not only!)\ spaces |\,|, |\enspace|, |\quad|, |\qquad|: 
%% %% <- 2011/04/26
\renderHTMLsymbol{\enspace}{ensp}
\renderHTMLsymbol{\quad}   {emsp} 
\renewcommand*   {\qquad}  {\quad\quad} 
%% 2011/07/22: `&thinsp;' allows line breaks, 
%% so we introduce |\thinsp| to access `&thinsp;', 
%% while |\thinspace| and |\,| use Unicode ``Narrow No-Break Space" 
%% (`U+202F', see \meta{Wikipedia \Wikienref{Space (punctuation)}}; 
%%  browser support?):
% \renderHTMLsymbol{\thinspace}{thinsp}
% \renderHTMLsymbol{\,}        {thinsp}
\declareHTMLsymbol{thinsp}
\renderHTMLsymbol{\thinspace}{\#8239}
\renderHTMLsymbol{\,}        {\#8239}
%% |\figurespace|                                   %% 2011/09/25
%% (U+2007, cf.~\wikienref{Figure space}{\meta{Wikipedia}}): 
\newcommand*{\figurespace}{&\#8199;}
%%
%% === Quotes, Apostrophe, Prime ===
%% |\lq|, |\rq| 
\renderHTMLsymbol{\lq}    {lsquo}
\renderHTMLsymbol{\rq}    {rsquo}
%% In order to use the right single quote for the \HTML\ apostrophe, 
%% we must save other uses before. 
%% |\screentqtd{<text>}| is used for screen messages, 
%% and |\urlapostr| is the version of the right single quote 
%% for \acro{URL}s of Wikipedia articles:   %% 2011/08/31
\newcommand*{\screenqtd}[1]{`#1'}
\newcommand*{\urlapostr}   {'}              %% 2010/09/10
%% Here finally is the change of |'|:
\MakeActiveDef\'{&rsquo;}
%% ... TODO \verb+\MakeActiveLet\'\rq+! 
%% And this might better be in `\BlogCodes'! would 
%% save `\screenqtd'! Tilde likwise!?
%% ... TODO change `\catcode`\`'!? 2010/04/26
%%
%% |\bdquo|, |\ldquo|, |\rdquo|, |\sbquo|, |\prime|, |\Prime| ...
\declareHTMLsymbol{bdquo}                   %% 2011/09/23
\declareHTMLsymbol{ldquo}
\declareHTMLsymbol{rdquo}
\declareHTMLsymbol{sbquo}                   %% 2010/07/01 
\renewcommand*{\prime}{&prime;}
\declareHTMLsymbol{Prime}
% \newcommand*{\Prime}{&Prime;}
%% |\endqtd{<text>}| quotes in the English style using double quote 
%% marks, |\enqtd{<text>}| uses single quote marks instead, and 
%% |\dedqtd{<text>}| quotes in German style:
\def\endqtd#1{\ldquo#1\rdquo}       %% \newcommand: ``\end"
\newcommand*\enqtd[1]{\lq#1\rq}     %% 2010/09/08, \new... 2010/11/08
\newcommand*{\dedqtd}[1]{\bdquo#1\ldquo}
\newcommand*{\deqtd}[1]{&sbquo;#1&lsquo;}   %% corr. 2011/05/14
%% TODO `\glqq' from 'german.sty' etc.      %% 2011/09/22
%%
%% === Math ===
%% %% doc. extended 2011/05/08:
%% Because \verb+<+ and \verb+>+ are used for \HTML's
%% element notation, we provide aliases |\gt|, |\lt| 
%% for mathematical $\lt$ and $\gt$:
\declareHTMLsymbol{gt} 
\declareHTMLsymbol{lt} 
%% |\ge|, |\le|, and |\ne| for $\geq$, $\leq$, and $\neq$ resp.:
\declareHTMLsymbol{ge} 
\declareHTMLsymbol{le} 
\declareHTMLsymbol{ne} 
%% We also provide their \TeX\ aliases 
%% |\geq|, |\leq|, |\neq|:              %% 2011/05/11
\let\geq\ge
\let\leq\le
\let\neq\ne
%% Angle braces |\langle| and |\rangle|:
\renderHTMLsymbol{\langle}{lang}
\renderHTMLsymbol{\rangle}{rang}
%% The one-argument macro |\angled{<angled>}| 
%% allows better readable code                  %% TODO:
%% (\textcolor{red}{should be in a more general package}): 
\newcommand*{\angled}[1]{\langle#1\rangle}
%% Curly braces |\{| and |\}| \textcolor{red}{\dots}: 
\begingroup
    \Delimiters\[\] \gdef\{[{] \gdef\}[}]
\endgroup
%% \TeX's |\ast| corresponds to the ``lower" version 
%% of the asterisk:
\renderHTMLsymbol{\ast}{lowast}                 %% 2011/03/29
%% Besides \TeX's |\subset| and |\subseteq|, 
%% we provide short versions |\sub| and |\sube| %% 2011/05/08
%% inspired by \HTML:
\declareHTMLsymbol{sub}                         %% 2011/04/04
\let\subset\sub                                 %% 2011/05/08
\declareHTMLsymbol{sube}                        %% 2011/03/29
\let\subseteq\sube                              %% 2011/05/08
%% \TeX\ and \HTML\ agree on |\cap|, |\cup|,      %% 2011/05/08
%% and |\times|:
\declareHTMLsymbol{cap}                         %% 2011/04/04
\declareHTMLsymbol{cup}                         %% 2011/04/04
\declareHTMLsymbol{times}                       %% 2011/04/04
%% We stick to \TeX's |\emptyset|               %% 2011/05/08
\renderHTMLsymbol{\emptyset}{empty}             %% 2011/04/14
%% We need |\minus| since math mode switching is 
%% not supported by 'blog':                     %% 2011/05/08
\declareHTMLsymbol{minus}                       %% 2011/03/31
%% We override \HTML's \lq`&circ;'\rq\   %% \lq\rq 2011/09/08 
%% to get \TeX's \cs{circ} 
%% (i.e., $\circ$;                              %% 2011/05/08:
%%  \textcolor{red}{but I cannot see it 
%%                  on my own pages!?}):
\renderHTMLsymbol{\circ}{\#x2218}               %% 2011/04/28
\renderHTMLsymbol{\cdot}{middot}                %% 2011/05/07
%% |\sdot| generates `&sdot,', a variant of of `&middot;'
%% reserved for the \Wikienref{dot product} according to 
%% the \wikideref{Malzeichen\#Skalarprodukt}
%%               {German \meta{Wikipedia}}      %% 2011/09/08!
\declareHTMLsymbol{sdot}                        %% 2011/05/08
%% I provide |\degrees| for the degree symbol. 
%% \LaTeX\ already has `\deg' as an operator, 
%% therefore I do not want to use `\declareHTMLsymbol'
%% here.
\newcommand*{\degrees}{&deg;}
%% 
%% === Other ===
%% The tilde |~| is used for its wonderful purpose, 
%% by analogy to \TeX:
\renderHTMLsymbol{~}{nbsp} 
%% But now we need a replacement |\tilde| for URLs involving 
%% home directories of institution members 
%% (should better be |\tildechar| or `\TildeChar', 
%%  cf.~'fifinddo'):                    %% 2011/04/29
{\@makeother\~ \gdef\tilde{~} \gdef\tildechar{~}} 
%% % <- more elegant macro                          %% 2011/05/18
%% %    \newcommand*{\StoreOtherCharAs}[2]{%
%% %                 \edef#2{\expandafter\@gobble\string#1}}
%% Horizontal ellipsis: |\dots| ...
\renderHTMLsymbol {\dots} {hellip}
%%
%% |\copyright|:
\renderHTMLsymbol{\copyright}{copy} 
%% |\bullet|                                %% 2011/03/29
\renderHTMLsymbol{\bullet}{bull}
%% |\euro|:                                 %% 2011/05/09
\declareHTMLsymbol{euro}
%% \LaTeX's |\S| prints the \dqtd{\Wikienref{section sign}}
%% \qtd{\S}. In \HTML, the latter accessed by `&sect;', 
%% we \dqtd{redirect} `\S' to this:         %% 2011/05/18
\renderHTMLsymbol{\S}{sect}
%% |\dagger|, |\ddagger|:                   %% 2011/10/01
\renderHTMLsymbol{\dagger}{dagger}
\renderHTMLsymbol{\ddagger}{Dagger}
%% 
%% 
%% == \TeX-related ==                               %% 2010/08/24
%% Somebody actually using 'blog.sty' must have a need to put down 
%% notes about \TeX\ for her own private purposes at least---I expect.
%% === Logos ===
%% ``Program" names might be typeset in a special font, 
%% I once thought, and started tagging program names with 
%% |\prg|. It could be `\texttt' or `\textsf' like in 
%% documentations of \LaTeX\ packages. However, 
%% sans-serif is of doubtable usefulness on web pages, 
%% and typewriter imitations usually look terrible on 
%% web pages. So I am waiting for a better idea and 
%% let `\prg' just remove the braces. 
\newcommand*{\prg}[1]{} \let\prg\@firstofone 
\newcommand*{\BibTeX}{\prg{BibTeX}} %% 2010/09/13
\renewcommand*{\TeX}{\prg{TeX}}
\renewcommand*{\LaTeX}{\prg{LaTeX}}
\newcommand*{\allTeX}{\prg{(La)TeX}}%% 2010/10/05
\newcommand*{\LuaTeX}{\prg{LuaTeX}}
\newcommand*{\pdfTeX}{\prg{pdfTeX}}
\newcommand*{\XeTeX}{\prg{XeTeX}}   %% 2010/10/09
\newcommand*{\TeXbook}{TeXbook}     %% 2010/09/13
%%
%% === Describing Macros ===
%% With v0.4, \TeX-related \emph{links} are moved to 'texlinks.sty'.
%%
%% |\texcs{\<tex-cmd-name>}| or `\texcs\<tex-cmd-name>'
%% (care for spacing yourself):
\newcommand*{\texcs}[1]{\code{\string#1}}           %% 2010/11/13
%% Good old |\cs{<tex-cmd-name>}| may be preferable: 
\def\cs#1{\code{\BackslashChar#1}}                  %% 2011/03/06
%% |\metavar{<name>}|:                              %% 2011/09/22
\newcommand*{\metavar}[1]{\angled{\meta{#1}}}
%%
%% == Tables ==
%% %% 2011/04/24: rm. remark on doubtful stability, ordered
%% === Indenting === 
%% There are three levels of indenting:
%% \[|\indenti|, \quad 
%%   |\indentii|,\quad \mbox{and}\quad 
%%   |\indentiii|.\] 
%% The intention for these was to get readable \HTML\ code. Not sure ...
{\catcode`\ =12%% 2010/05/19
\gdef\indenti{  }\gdef\indentii{    }\gdef\indentiii{      }}
%%
%% === Starting/Ending Tables ===
%% 2010/07/17:
\newcommand*{\startTable}[1]{<table #1>}
\def\endTable{</table>}
\newcommand*{\@frame@box}{\@frame{box}}
\newcommand*{\@frame@groups}{\@frame{groups}}
\newenvironment{allrulestable}[2]
  {\startTable{\@cellpadding{#1} \@width{#2} 
               \@frame@box\ rules="all"}\CLBrk  %% \ 2011/10/12
   \indenti\tbody}               %% <- tbody 2011/10/13 ->
  {\indenti\endtbody\CLBrk\endTable}
%% \xmltagcode{tbody}...\xmltagcode{/tbody} seemed to be 
%% better with `\HVspace' for 'blogdot.sty',    %% 2011/10/13
%% so it gets a macro:
\useHTMLelement{tbody}{tbody}
%% 
%% === Rows ===
%% I first thought it would be good for readability if 
%% some \HTML\ comments explain nesting or briefly describe 
%% the content of some column, row, or cell. 
%% But this is troublesome when you want to comment out 
%% an entire table ...
\newenvironment*{TableRow}[2]{%% lesser indentation 2011/04/25
  \ \comment{ #1 }\CLBrk
  \indenti<tr #2>%
  }{%
  \indenti</tr>}
\newenvironment{tablecoloredrow}[2]
  {\TableRow{#1}{\@bgcolor{#2}}}
  {\endTableRow}
%% ``top" 2010/05/18:
\newenvironment{tablerow}[1]{\TableRow{#1}{\@valign@t}}
                            {\endTableRow}
%% 2010/07/18:
\newcommand*{\starttr}{<tr>} 
\def\endtr{</tr>} 
%%
%% === Cells === 
\newcommand*{\simplecell}{\SimpleTagSurr{td}}   %% 2010/07/18
% \newcommand*{\TableCell}[2]{\indentiii<td #1>#2</td>}
% \newcommand*{\TableCell}[2]{\indentiii\TagSurr{td}{#1}{#2}}
  %% <- 2010/07/18 ->
\newcommand*{\TableCell}[2]{\indentiii\startTd{#1}#2\endTd}
%% 2010/06/15:
\newcommand*{\colorwidthcell}[2]{\TableCell{\@bgcolor{#1}\@width{#2}}}
\newcommand*{\tablewidthcell}[1]{\TableCell{\@width{#1}}}
\newcommand*{\tablecell}        {\TableCell{}}
\newcommand*{\tableCell}        {\TableCell\@align@c}
%% Idea: use closing star for environment variants!?
% %% 2010/05/19:
\newenvironment{bigtablecell}[1]{\BigTableCell{#1}{}}
                                {\endBigTableCell}
%                {\ifx\\#1\\%             %% 2010/05/30
%                   \indentii\ \comment{#1}\CLBrk
%                 \fi
%                 \indentiii<td>}
%                {\indentii</td>}         %% !? 2010/05/23
%% 2010/06/05:
\newenvironment{BigTableCell}[2]
    {\ifx\\#1\\\indentii\ \comment{#1}\CLBrk\fi
     \indentiii\startTd{#2}}
    {\indentii\endTd}           %% TODO indent? 2010/07/18
%% 2010/07/18:
\newcommand*{\startTd}[1]{<td #1>} 
\def\endTd{</td>} 
\newcommand*{\emptycell}{<td />}    %% 2011/10/07
%% 
%% === Filling a Row with Dummy Cells ===
%% Generalization 2010/06/28:
% \newcommand*{\FillRow}[2]{%             %% broke line 2011/01/24
%                   \indentiii\TagSurr{td}{\@colspan{#1} #2}{}} 
  %% <- 2010/07/18 ->
\newcommand*{\FillRow}[2]{\indentiii\startTd{\@colspan{#1} #2}\endTd}
\newcommand*{\fillrow}[1]{\FillRow{#1}{}}
\newcommand*{\fillrowcolor}[2]{\FillRow{#1}{\@bgcolor{#2}}}
%% === Skipping Tricks ===
%% %% 2011/10/13
%% |\HVspace{<text>}{<width>}{<height>}| may change, 
%% needed for 'blogdot.sty' but also for |\vspace{<height>}|
%% with 'texblog'. It is now here so I will be careful 
%% when I want to change something. \xmltagcode{tbody}
%% improved the function of `\HVspace' constructions 
%% as link text with 'blogdot.sty'.
\newcommand*{\HVspace}[3]{% 
    \CLBrk
    \startTable{\@width{#2} \@height{#3}
                \@border{0} 
                \@cellpadding{0} \@cellspacing{0}}%
      \tbody
       \CLBrk                                       %% 2011/10/14
        \tablerow{HVspace}%                         %% 2011/10/13
%% <- inserting text at top for 'blogdot' attempts---that 
%%    finally did not help anything (2011/10/15) ->
          \simplecell{#1}%
        \endtablerow                                %% 2011/10/13
       \CLBrk                                       %% 2011/10/14
      \endtbody
    \endTable
    \CLBrk}
%% |\hvspace{<width>}{<height>}| ...:
\newcommand*{\hvspace}{\HVspace{}}
%% |\vspace{<height>}| ... (TODO: `{0}'!?):
\renewcommand*{\vspace}[1]{\hvspace{}{#1}}
%%
%% == Misc ==
%% |\comment{<comment>}| produces a one-line \HTML\ comment. 
%% By contrast, there is an environment 
%% |{commentlines}{<comment>}|
%% for multi-line comments.           %% was mult-l... 2011/09/08
%% It is convenient for ``commenting out" 
%% code (unless the latter contains other \HTML\ comments ...)
%% where <comment> is a \emph{comment} for explaining what is 
%% commented out.                                   %% 2010/11/14
\newcommand*{\comment}[1]{<!--#1-->}
% \newcommand{\commentlines}[1]{\comment{^^J#1^^J}} %% 2010/05/07
%   %% <- TODO bzw. \endlinechar=`\^^J 2010/05/09 back 2010/05/10
\newenvironment{commentlines}[1]                    %% 2010/05/17
  {<!--#1}
  {-->}
%% \TeX's |\hrule| (rather deprecated in \LaTeX) is redefined 
%% to produce an \HTML\ horizontal line:
\renewcommand*{\hrule}{<hr>}
%% Redefining |\ | to be the same as `\space' may be helpful 
%% for manual indenting or spacing of \HTML\ code. 
%% Or better (just now remembering): I used it for making 
%% ``ASCII trees" with the \xmltagcode{pre} element 
%% (redefined `verbatim').
\let\ \space
%% I couldn't find a perfect way to generate \xmltagcode{p}. 
%% Actually I started completing the present documentation 
%% when I had decided to implement automatic generation 
%% of \xmltagcode{p} from empty lines. 
% \def\par{<p>} %% + empty lines !? 2010/04/26
%% <- difficult with `\stop'; 2010/09/10:
%% |\endgraf| produces \xmltagcode{/p}!?
\renewcommand*{\endgraf}{</p>}
%% 2010/04/28:
%% \xmltagcode{br} can be generated either by |\newline|
%% or by |\\|: 
\renewcommand*{\newline}{<br>}
\let\\\newline
%% |\rightpar{<text>}| places <text> flush right. 
%% I have used this for \qtd{Last revised \dots} and for placing 
%% navigation marks. 
\newcommand*{\rightpar}{\TagSurr p\@align@r}  %% 2010/06/17
%% %% 2011/04/29:
%% Often I use `\rightpar' with \textit{italics}, 
%% now there is |\rightitpar{<text>}| for this purpose:
\newcommand*{\rightitpar}[1]{\rightpar{\textit{#1}}}
%% For references, there were 
% \catcode`\^=\active
% \def^#1{\SimpleTagSurr{sup}{#1}}
%% and 
% \newcommand*{\src}[1]{\SimpleTagSurr{sup}{[#1]}}
%% as of 2010/05/01, inspired by the \xmltagcode{ref} element 
%% of MediaWiki; moved to `xmlprint.tex' 2010/06/02. 
%%
%% == The End ==
\endinput
%%
%% == VERSION HISTORY ==
v0.1    2010/08/20  final version for DFG
v0.2    2010/11/08  final documentation version before
                    moving some functionality to 'fifinddo' 
v0.3    2010/11/10  removed ^^J from \head
        2010/11/11  moving stuff to fifinddo.sty; \BlogCopyFile
        2010/11/12  date updated; broke too long code lines etc.;
                    \CatCode replaced (implemented in niceverb only); 
                    \ifBlogAutoPars etc. 
        2010/11/13  doc: \uml useful in ...; \texcs
        2010/11/14  doc: argument for {commentlines}, 
                         referring to environments with curly braces, 
                         more on \ditem
        2010/11/15  TODO: usage, templates
        2010/11/16  note on {verbatim}
        2010/11/23  doc. corr. on \CtanPkgRef
        2010/11/27  "keyword"; \CopyLine without `fd'
        2010/12/03  \emhttpref -> \ithttpref
        2010/12/23  `%' added to \texhaxpref
        2011/01/23  more in \Provides...
        2011/01/24  updated copyright; resolving `td' ("today")
        JUST STORED as final version before texlinks.sty
v0.4    2011/01/24  moving links to texlinks.sty
v0.41   2011/02/07  \NormalHTTPref
        2011/02/10  refined call of `texlinks'
part of MOREHYPE RELEASE r0.3
v0.5    2011/02/22  \BlogProvidesFile
        2011/02/24  ... in \BlogCopyFile
        2011/02/25  ordering symbols
        2011/02/26  subsection Greek; note on \declareHTMLsymbol
        2011/03/04  diacritics
        2011/03/06  \cs
        2011/03/09  \var
        2011/03/16  \robots
        2011/03/19  doc. \fileancref arg.s corr.
        2011/03/29  \Sigma, ...
        2011/03/31  \minus
        2011/04/04  \times, \sub, \delta
        2011/04/11  Greek completed
        2011/04/14  \emptyset
        2011/04/22  \deqtd
        2011/04/24  doc.: folding, \stylesheet, ordered "tables"; 
                    @border, @align, @valign
        2011/04/25  lesser indentation with TableRow
        2011/04/26  \,, \thinspace, \@title; doc. \@name
        2011/04/28  [\circ] PROBLEM still 
        2011/04/29  \rightitpar
        2011/05/07  \cdot
        2011/05/08  extended doc. on math symbols; \sdot; 
                    \ast replaces \lowast; \subset, \subseteq; 
                    \angled
        2011/05/09  \euro
        2011/05/11  |\geq| etc.; new section "logical markup"
        2011/05/12  corr. doc. \heading
        2011/05/14  right mark of \deqtd was rsquo instead of lsquo!
        2011/05/18  \S and note on \StoreOtherCharAs
        2011/06/27  \httpsref; doc: \acro
        2011/07/22  \thinspace vs. \thinsp; 'fifinddo''s
        2011/07/25  "todo" on \description
        2011/08/18f.removing \FileRef, 0.42-> 0.5
        2011/08/31  clarified use of \urlapostr
part of MOREHYPE RELEASE r0.4
v0.6    2011/09/08  doc. uses \HTML, \lq/\rq with &circ;, 
                    doc. fix `mult-'; \degrees
        2011/09/21  \acronym
        2011/09/22  \metavar; TODO \glqq...
        2011/09/23  \bdquo 
        2011/09/25  doc. `Characters/Symbols'; \figurespace
        2011/09/27  "universal" attributes completed, reworked doc.
        2011/09/30  end lists with </li>
        2011/10/01  \dagger, \ddagger
        2011/10/04  \item includes </li> [2011/10/11: ???]
        2011/10/05  {style}; doc. \acronym -> \acro, \pagebreak, 
                    rm. \description; {center} accesses <center>, 
                    \useHTMLenvironment replaces \declareHTMLelement
                    and \renderHTMLelement, message "generating"
        2011/10/07  \emptycell
        2011/10/10  doc.: page breaks, $$->\[/\]
part of MOREHYPE RELEASE r0.5
v0.61   2011/10/11  </li> in \item again, \Provides... v wrong
        2011/10/12  \hnewref, `\ ' in allrulestable
        2011/10/14  \CLBrk's
        2011/10/15  doc. note on \HVspace/blogdot