diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/morehype/blog.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/morehype/blog.sty | 416 |
1 files changed, 296 insertions, 120 deletions
diff --git a/Master/texmf-dist/tex/latex/morehype/blog.sty b/Master/texmf-dist/tex/latex/morehype/blog.sty index 174ef0c5638..5b99b2758de 100644 --- a/Master/texmf-dist/tex/latex/morehype/blog.sty +++ b/Master/texmf-dist/tex/latex/morehype/blog.sty @@ -1,4 +1,4 @@ -\ProvidesPackage{blog}[2012/05/15 v0.7 simple fast HTML (UL)] +\ProvidesPackage{blog}[2012/11/29 v0.8 simple fast HTML (UL)] %% copyright (C) 2010 2011 2012 Uwe Lueck, %% http://www.contact-ednotes.sty.de.vu %% -- author-maintained in the sense of LPPL below. @@ -14,8 +14,11 @@ %% %% http://www.contact-ednotes.sty.de.vu %% +%% == \cs{newlet} == %% 2012/10/03 +%% |\newlet<cmd><cnd>| is also useful in surrounding files: +\newcommand*{\newlet}[2]{\@ifdefinable#1{\let#1#2}} +%% %% == Processing == -%% \label{sec:process} %% === Requirement === %% We are building on the 'fifinddo' package %% (using `\protected@edef' for \secref{ligs}): @@ -46,6 +49,7 @@ %% |\BlogProvidesFile| (for the time being, 2011/02/22): \@ifdefinable\BlogProvidesFile{% \def\BlogProvidesFile#1[#2]{% + <!DOCTYPE html>\CLBrk %% TODO more!? 2012/09/06 \comment{ generated from\CLBrk\CLBrk \ \ \ \ \ \ \ \ \ #1, #2,\CLBrk\CLBrk \ \ \ \ \ with blog.sty, @@ -76,7 +80,7 @@ % \catcode`\~\active \MakeActiveDef\~{ }%% for \FDpseudoTilde 2012/01/07 %% \qtd{&'} for \HTML\ convenience (cf. \secref{quotes}): - \MakeActiveDef\'{’}% %% here 2011/11/08 + \MakeActiveLet\'\rq %% actcodes 2012/08/28 \BasicNormalCatCodes} % \MakeOther\< \MakeOther\> %% rm. 2011/11/20 %% @@ -146,7 +150,7 @@ %% OK, let's not remove |\BlogCopyFile| altogether, rebirth: \newcommand*{\BlogCopyFile}{\BlogCopyLines\BlogProcessFile} %% -%% === ``Ligatures" === +%% === ``Ligatures", Package Options === %% \label{sec:ligs} %% With v0.7, we introduce a preliminary method to use the %% ``ligatures" `--' and `---' with pure expansion. @@ -169,10 +173,14 @@ %% could apply the replacements on their arguments---using %% |\ParseLigs{<arg>}|: %% 2011/11/27 \newcommand*{\ParseLigs}[1]{\ProcessStringWith{#1}{BlogLIGs}} -%% (`\ProcessStringWith' is from 'fifinddo'.) +%% (`\ProcessStringWith' is from 'fifinddo'.)---The package +%% 'blogligs.sty' described in \secref{moreligs} does these +%% things in a more powerful way. You can load it by calling +%% 'blog.sty''s package option |[ligs]| (v0.8): +\DeclareOption{ligs}{\AtEndOfPackage{\RequirePackage{blogligs}}} %% %% The replacement chain follows (TODO move to `.cfg'). -%% As opposed to `mdoccorr.cfg' for 'makedoc.sty', +%% As opposed to the file `mdoccorr.cfg' for 'makedoc.sty', %% we are dealing with ``normal \TeX" code %% (regarding category codes, 'fifinddo.sty' %% as of 2011/11/21 is needed for `\protect'). @@ -196,6 +204,11 @@ \CopyFDconditionFromTo{blog<-}{BlogLIGs} %% % TODO: Seems to slow down processing by a major part of a second. %% % Reduce replacements? Maybe do all of this within source file!? +%% The package 'markblog.sty' described in \secref{mark} extends this +%% to some markup resembling \Wikiref{wiki} editing. +%% This package may be loaded by 'blog.sty''s package option |[mark]| +%% (v0.8): +\DeclareOption{mark}{\AtEndOfPackage{\RequirePackage{markblog}}} %% %% === \xmltagcode{p} from Empty Line, Package Option === %% \label{sec:autopars} @@ -224,12 +237,12 @@ %% The following stuff is required for any web page %% (or hardly evitable). %% === General Tagging === -%% %% $$ -> \[ ... 2011/10/10: -%% \[|\TagSurr{<el-name>}{<attr>}{<content>}|\] +%% %% $$ -> \[ ... 2011/10/10 el-name -> elt-name 2012/09/14: +%% \[|\TagSurr{<elt-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 +%% and \[|\SimpleTagSurr{<elt-name>}{<content>}|\] +%% are used to avoid repeating element names <elt-name> in %% definitions of \TeX\ macros that refer to ``entire" %% elements---as opposed to elements whose content often %% spans lines (as readable \HTML\ code). @@ -243,7 +256,15 @@ %% `\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 +\newlet\STS\SimpleTagSurr %% 2010/05/23 +%% %% 2012/09/08: +%% With the space in `\declareHTMLattrib' as of 2012/08/28, +%% we remove the space between #1 and #2. +%% (Doing this by an option may be better TODO; +%% any separate attribute definitions must take care of this.) +% \newcommand*{\TagSurr}[3]{<#1#2>#3</#1>} +%% ... undone 2012/11/16, bad with ``direct" use of #2 +%% (with attributes not declared): \newcommand*{\TagSurr}[3]{<#1 #2>#3</#1>} %% %% === Attributes === %%% (General) %%% @@ -262,8 +283,8 @@ %% whether `\@<attr>' has been defined before: \newcommand*{\declareHTMLattrib}[1]{% \def\reserved@a{@#1}% - \@ifundefined{@#1}% - {\@namedef{@#1}##1{#1="##1"}}% + \@ifundefined\reserved@a %% \res... 2012/09/06 + {\@namedef{@#1}##1{ #1="##1"}}%% space 2012/08/28 \@notdefinable} %% So after `\declareHTMLattrib{<attr>}', `\@<attr>' is a %% \TeX\ macro expecting one parameter for the specification. @@ -311,14 +332,17 @@ \PackageWarning{blog}{Redefining \protect\@height} \let\@height\relax \declareHTMLattrib{height} %% 2010/07/24 +%% \pagebreak[3] %% 2012/09/08 %% 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"} +% \newcommand*{\@align}[1]{ align="#1"} +\declareHTMLattrib{align} %% 2012/09/08 %% |@valign@t|: -\newcommand*{\@valign@t}{v\@align{top}} %% 2011/04/24 +% \newcommand*{\@valign@t}{v\@align{top}} %% 2011/04/24 +\newcommand*{\@valign@t}{ valign="top"} %% 2012/09/08 %% Some other uses of `\declareHTMLattrib' essential for %% \emph{tables:} %% emph 2011/04/24 \declareHTMLattrib{border} %% 2011/04/24 @@ -361,39 +385,70 @@ %% \label{sec:html-verb} %% 2011/11/23 %% |\xmltagcode{<chars>}| yields \qtd{\xmltagcode{<chars>}}: \newcommand*{\xmltagcode}[1]{\code{\lt#1\gt}} +%% %% elements 2012/09/14: +%% |\xmleltcode{<name>}{<content>}| displays the code for an entire +%% <name> element containing <content> without attributes: +\newcommand*{\xmleltcode}[2]{\code{\lt#1\gt#2\lt/#1\gt}} +%% |\xmleltcode{<name>}{<attrs>}{<content>}| displays the code for an entire +%% <name> element \emph{with} attribute text \qtd{<attrs>} +%% containing <content>: +\newcommand*{\xmleltattrcode}[3]{\code{\lt#1 #2\gt#3\lt/#1\gt}} %% |\xmlentitycode{<name>}| yields the code \qtd{`&&<name>;'} for an %% entity with name <name>: \newcommand*{\xmlentitycode}[1]{\code{\}} %% %% === Head === %% |\head| produces the first two tags that an \HTML\ file must start: -\newcommand*{\head}{<html><head>} %% ^^J rm 2010/10/10 +\newcommand*{\head}{<html><head>} %% ^^J rm 2010/10/10 %% |\MetaTag{<inside>}| creates a \xmltagcode{meta} tag: -\newcommand*{\MetaTag}[1]{\indenti<meta #1>} %% \indenti 2011/11/05 -%% |\charset{<code-page>}| +\newcommand*{\MetaTag}[1]{\indenti<meta #1>} +%% |\charset{<code-page>}| %% Content-T -> content-t 2012/09/06 \newcommand*{\charset}[1]{% - \MetaTag{http-equiv="Content-Type" \@content{text/html; #1}}} -%% TODO: \xmltagcode{meta \@name{description} \@content{<text>}} -%% %% <- 2011/11/05 -%% -%% |\robots{<instructions>}|: -\newcommand*{\robots}[1]{%% juergenf: index, follow, noarchive - \MetaTag{\@name{robots} \@content{#1}}} -%% |\norobots| for privacy: %% 2011/03/16 + \MetaTag{ http-equiv="content-type"\@content{text/html; #1}}} + %% <- space 2012/09/08 +%% \pagebreak[3] %% 2012/09/07 +%% |\metanamecontent{<name>}{<content>}| obviously: %% 2012/09/06 +\newcommand*{\metanamecontent}[2]{% + \MetaTag{\@name{#1}\@content{#2}}} +%% %% 2012/09/07: +%% |\author{<name>}| and |\date{<date>}| set according metadata, +%% somewhat opposing \LaTeX\ (TODO!?): +\renewcommand*{\author}{\metanamecontent{author}} +\renewcommand*{\date}{\metanamecontent{date}} +%% The name of |\metadescription{<text>}| allows using +%% `\begin{description}' (cf. secref{env}): +\newcommand*{\metadescription}{\metanamecontent{description}} +%% |\keywords{<text>}|: +\newcommand*{\keywords}{\metanamecontent{keywords}} +%% |\robots{<instructions>}|: %% using above 2012/09/06 +\newcommand*{\robots}{\metanamecontent{robots}} + %% #2 juergenf: index, follow, noarchive +%% |\norobots| for privacy %% 2011/03/16 +%% (cf. \urlhttpref{noarchive.net/meta} %% 2012/09/07 +%% and \wikienref{Robots meta tag\#The_robots_attribute}{% +%% \meta{Wikipedia}}: \newcommand*{\norobots}{\robots{noarchive,nofollow,noindex}} +%% |\metanamelangcontent{<name>}{<lang>}{<content>}|,\\ %% 2012/09/06 +%% in addition to the above, uses language code <lang>: %% 2012/09/07 +\newcommand*{\metanamelangcontent}[3]{% + \MetaTag{\@name{#1}\@lang{#2}\@content{#3}}} +%% So there can be language-dependent descriptions and keywords:\\ +%% |\langdescription{<text>}| and |\langkeywords{<>}| +\newcommand*{\langdescription}{\metanamelangcontent{description}} +\newcommand*{\langkeywords} {\metanamelangcontent{keywords}} %% |\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 + \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. \secref{env}): \newenvironment*{style}[1] - {<style \@type{text/css} media="#1">} + {<style\@type{text/css} media="#1">} {</style>} %% With |\title{<text>}|, <text> heads %% grammar? TODO 2010/04/08 %% the browser window: @@ -426,6 +481,11 @@ \newenvironment{commentlines}[1] %% 2010/05/17 {<!--#1} {-->} +%% === \CSS === %% 2012/07/30 spanstyle -> stylespan 2012/10/28 +%% |\stylespan{<css-style>}{<text>}| applies the \CSS\ styling +%% <css-style> to <text>: +\newcommand*{\stylespan}[1]{\TagSurr{span}{\@style{#1}}} +%% Not sure about \xmltagcode{div} yet ... TODO %% %% == Paragraphs and Line Breaks == %% \label{sec:p-br} @@ -443,8 +503,8 @@ %% commands---or ...: %% 2011/11/23 % \def\par{<p>} %% + empty lines !? 2010/04/26 %% <- difficult with `\stop'; 2010/09/10: -%% |\endgraf| produces \xmltagcode{/p}---TODO!? %% todo 2011/11/23 -\renewcommand*{\endgraf}{</p>} +%% |\endgraf| produces \xmltagcode{p}---TODO!? %% todo 2011/11/23 +\renewcommand*{\endgraf}{<p>} %% was </p> 2012/11/19 %% %% 2011/11/23: %% However, I rather have decided for inserting a literal %% \qtd{\xmltagcode{p}} using an editor (keyboard) shortcut. @@ -452,23 +512,14 @@ %% |\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 +\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}}} %% -%% == Fonts == -%% \label{sec: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 -%% +%% == Physical Markup (Inline) == %% mod. 2012/09/13 +%% \label{sec:phys} %% We ``re-use" some \LaTeX\ commands for specifying font attributes, %% rather than (re)defining macros `\i', `\b', `\tt', ... %% \[|\textit{<text>}| \qquad @@ -477,20 +528,35 @@ \renewcommand*{\textit}{\SimpleTagSurr i} %% etc. for |\textbf|, |\texttt| ...: \renewcommand*{\textbf}{\SimpleTagSurr b} -\renewcommand*{\texttt}{\SimpleTagSurr{tt}} %% 2010/06/07 -%% |\textsf{<text>}| chooses some sans-serif: %% 2011/10/20 -\renewcommand*{\textsf}{% - \TagSurr{span}{\@style{font-family:sans-serif}}} -%% |\textcolor| is from \LaTeX's 'color' package +\renewcommand*{\texttt}{\SimpleTagSurr{tt}} %% 2010/06/07 +%% |\textsf{<text>}| chooses some sans-serif: %% 2011/10/20 2012/07/30 +\renewcommand*{\textsf}{\stylespan{font-family:sans-serif}} +%% |\textup{<text>}| may undo surrounding slanting or ...: %% 2012/08/01 +\renewcommand*\textup{\stylespan{font-style:normal}} +%% |\textcolor{<color>}{<text>}| %% args 2012/08/01 +%% 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 coloured text. %% (2010/05/15): -%% \xmltagcode{font} is deprecated, use %% 2011/10/20 -%% \xmltagcode{span} instead: -% \newcommand*{\textcolor}[1]{\TagSurr{font}{color="#1"}} -\newcommand*{\textcolor}[1]{\TagSurr{span}{\@style{color:#1}}} +%% for coloured text. %% (2010/05/15): +%% \xmltagcode{font} is deprecated, use %% 2011/10/20 +%% \xmltagcode{span} instead: %% \span... 2012/07/30: +\newcommand*{\textcolor}[1]{\stylespan{color:#1}} +%% %% moves here from "Misc." 2012/09/13: +%% \TeX/\LaTeX's |\underbar{<text>}| is redirected to the \xmltagcode{u} +%% element: %% 2012/06/07 +\renewcommand*{\underbar}{\SimpleTagSurr u} +%% +%% == Logical Markup == +%% %% \heading moves here from former section 2012/09/13: +%% |\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 %% -%% == Logical Markup == %% |\code{<text>}| marks <text> as ``code," %% just accessing te \xmltagcode{code} element, %% while standard \LaTeX\ does not provide a `\code' command: @@ -511,18 +577,25 @@ %% For tagging acronyms, %% \HTML\ offers the \xmltagcode{acronym} element, %% and the \httpref{ctan.org/pkg/tugboat}{\acro{TUG}boat macros} -%% provide |\acro{<chars>}|. I have used the latter for some +%% provide |\acro{<LETTERS>}|. I have used the latter for some %% time in my package documentations anyway. For v0.7, %% 2012/01/06 -%% I add the latter here as an alias for |\acronym{<chars>}| -%% (supporting both naming policies mentioned in Sec.~\ref{name-policy}): +%% I add the latter here as an alias for |\acronym{<LETTERS>}| +%% (supporting both naming policies mentioned in \secref{name-policy}): \newcommand*{\acronym}{\SimpleTagSurr{acronym}} -\newcommand*{\acro}{} \let\acro\acronym +\newlet\acro\acronym %% %% 2012/02/04: %% |\newacronym{<LETTERS>}| saves you from doubling the <LETTERS> %% when you want to create the shorthand macro `\<LETTERS>': \newcommand*{\newacronym}[1]{% \expandafter\newcommand\expandafter*\csname#1\endcsname{% \acronym{#1}}} +%% However, \xmltagcode{acronym} is +%% \wikienref{HTML elements#Phrase_elements}{deprecated}. +%% You may use |\abbr{<LETTERS>}| and |\newabbr{<LETTERS>}| instead: +\newcommand*{\abbr}{\SimpleTagSurr{abbr}} %% 2012/09/13 +\newcommand*{\newabbr}[1]{% + \expandafter\newcommand\expandafter*\csname#1\endcsname{% + \abbr{#1}}} %% %% == Environments == %% \label{sec:env} @@ -550,9 +623,9 @@ %% 2010/05/22 ...%% doc 2010/11/06 %% %% As formerly with -%% \hyperref[sec:fonts]{fonts}, %% \hyperref 2012/01/06 +%% \hyperref[sec:phys]{physical markup}, %% \hyperref 2012/01/06 %% we have \emph{two} policies for -%% \label{name-policy} %% 2012/01/06 +%% \label{sec:name-policy} %% 2012/01/06 2012/11/28 %% \textbf{choosing macro names}: %% (i)~using an \emph{existing} \HTML\ element name, %% (ii)~using a \LaTeX\ command name for accessing a somewhat @@ -622,7 +695,7 @@ %% (that we actually provide as well, %% towards printing from the same source): \newcommand*{\hanc}[1]{\TagSurr a{\@name{#1}}} -\@ifdefinable\hypertarget{\let\hypertarget\hanc} +\newlet\hypertarget\hanc %% |\hancref{<name>}{<target>}{<text>}| makes <text> an anchor with %% \HTML\ label <name> and at the same time a link to <target>: \newcommand*{\hancref}[2]{\TagSurr a{\@name{#1} \@href{#2}}} @@ -640,7 +713,7 @@ %% list of links to sections of the page. %% It is just like 'hyperref''s |\hyperlink{<name>}{<text>}|: \newcommand*{\ancref}[1]{\href{\##1}} -\@ifdefinable\hyperlink{\let\hyperlink\ancref} +\newlet\hyperlink\ancref %% |\autref{<text>}| makes <text> a link to an anchor %% named <text> itself: \newcommand*{\autref}[1]{\ancref{#1}{#1}} %% 2010/07/04 @@ -707,15 +780,16 @@ %% 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 +\newlet\urlref\urlhttpref %% ... and `\ctanref' has changed its meaning there as of 2011/10/21. %% %% 2011/02/07: %% 'texlinks' sometimes uses a ``permanent alias" %% |\NormalHTTPref| of `\httpref': -\@ifdefinable \NormalHTTPref {\let\NormalHTTPref\httpref} +\newlet\NormalHTTPref\httpref %% |\httpsref| is the analogue of `\httpref' for `https://': \newcommand*{\httpsref}{\hnewref{https://}} %% +%% % \pagebreak %% 2012/07/30 rm. 2012/09/13 %% == Characters/Symbols == %% `Symbols' until 2011/09/25 %% === Basic Preliminaries === %% |&| is made `other' for using it to call \HTML's @@ -729,7 +803,7 @@ %% (TODO; but sometimes redefining ...) %% 2011/02/26 \newcommand*{\declareHTMLsymbol}[1]{\@namedef{#1}{}} %% %% TODO replace \@namedef with \defcsname -%% |\declareHTMLsymbols{{<name>}<list>}| essentially issues +%% |\declareHTMLsymbols{<name>}{<list>}| essentially issues %% corr. br. 2012/08/02 %% \[`\declareHTMLsymbol{<attr>}\declareHTMLsymbols{<list>}'\] %% while `\declareHTMLsymbols{}' essentially does nothing---great, %% this is an explanation by recursion! @@ -780,18 +854,36 @@ {thetasym}{upsih}{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 +%% ---somewhat completed 2012/07/25. +%% +%% |\downarrow|, |\leftarrow|, |\leftrightarrow|, |\rightarrow|, |\uparrow|: +\renderHTMLsymbol {\downarrow} {darr} %% 2010/09/15 +\renderHTMLsymbol {\leftarrow} {larr} +\renderHTMLsymbol {\leftrightarrow}{harr} +\renderHTMLsymbol {\rightarrow} {rarr} +\renderHTMLsymbol {\uparrow} {uarr} %% 2010/09/15 +%% Aliases |\gets| and |\to| were implemented first as stand-alones, +%% now are treated by `\let': +\let \gets \leftarrow +\let \to \rightarrow +%% |\Downarrow|, |\Leftarrow|, |\Leftrightarrow|, +%% |\Rightarrow|, |\Uparrow| (i.e., double variants): +\renderHTMLsymbol {\Downarrow} {dArr} +\renderHTMLsymbol {\Leftarrow} {lArr} +\renderHTMLsymbol {\Leftrightarrow}{hArr} +\renderHTMLsymbol {\Rightarrow} {rArr} +\renderHTMLsymbol {\Uparrow} {uArr} +%% |\crarrow| accesses \HTML's `crarr' entity (symbol for return key), +%% named ``downwards arrow with tip leftwards" in Unicode (U+21b2): +\newcommand*{\crarrow}{↵} %% 2012/09/13 %% %% === 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 +%% policy %% was "police" 2012/07/25 +%% besides (i) and (ii) earlier; cf. \LaTeX's %% `\textemdash' and `\textendash'.---`\newcommand' %% does not accept macros whose names start with `end', so: %% |\endash|, |\emdash| ... @@ -818,7 +910,7 @@ %% (U+2007, cf.~\wikienref{Figure space}{\meta{Wikipedia}}): \newcommand*{\figurespace}{&\#8199;} %% -%% === Quotes, Apostrophe, Prime === +%% === Quotes, Apostrophe === %% \label{sec:quotes} %% |\lq|, |\rq| \renderHTMLsymbol{\lq} {lsquo} @@ -832,42 +924,75 @@ % \newcommand*{\screenqtd}[1]{`#1'} %% rm. 2011/11/08 \newcommand*{\urlapostr} {'} %% 2010/09/10 %% The actual change of |'| is in `\BlogCodes' -%% (\secref{process}). +%% (\secref{catcodes}). %% -%% |\bdquo|, |\ldquo|, |\rdquo|, |\sbquo|, |\prime|, |\Prime| ... +%% %% mod. 2012/10/24f.: +%% |\bdquo| (bottom), |\ldquo|, |\rdquo|, |\sbquo| (single bottom): \declareHTMLsymbol{bdquo} %% 2011/09/23 -\declareHTMLsymbol{ldquo} -\declareHTMLsymbol{rdquo} +\declareHTMLsymbols{{ldquo}{rdquo}} \declareHTMLsymbol{sbquo} %% 2010/07/01 -\renewcommand*{\prime}{′} -\declareHTMLsymbol{Prime} -%% A special 'blog.sty' service is |\asciidq| for a ``straight" -%% double quotation mark. It is useful for \emph{typesetting code} -%% and also can be used to get around automatical conversion -%% of straight into typographical quotation marks as with -%% `\catchdq': %% 2011/12/21 -\newcommand*{\asciidq}{\string"} +\declareHTMLsymbols{{laquo}{raquo}} +%% Angled quotes |\laquo| and |\raquo| as well as their +%% ``single" versions |\lsaquo| and |\rsaquo|: +\declareHTMLsymbols{{laquo}{lsaquo}{raquo}{rsaquo}} %% 2012/10/25 +%% As of 2012/09/17, |\asciidq| and |\asciidqtd{<no-dqs>}| +%% (e.g., for attributes after `\catchdqs' +%% or typesetting code) +%% move to package 'catchdq.sty' in the 'catcodes' bundle. +%% %% |\quot| accesses the same symbol in \HTML's terms %% (e.g., for displaying code): \declareHTMLsymbol{quot} %% 2012/01/21 %% |\endqtd{<text>}| quotes in the English style using double quote %% marks, |\enqtd{<text>}| uses single quote marks instead, %% |\dedqtd{<text>}| quotes in German style, %% 2011/12/21: -%% and |\asciidqtd{<text>}| and |\quoted{<text>}| %% 2012/01/21 -%% use straight double quotation marks: -\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]{‚#1‘} %% corr. 2011/05/14 -\newcommand*{\asciidqtd}[1]{\asciidq#1\asciidq} %% 2011/12/21 +%% |\quoted{<text>}| uses straight double quotation marks. +%% %% 2012/10/24: +%% Settings from the \ctanpkgref{langcode} package may need to +%% be overridden. (A warning might be nice then TODO) +\def\endqtd#1{\ldquo#1\rdquo} +\def\enqtd #1{\lq#1\rq} %% 2010/09/08 +\def\dedqtd#1{\bdquo#1\ldquo} +\def\deqtd #1{\sbquo#1\lq} %% corr. 2012/10/25 \newcommand*{\quoted} [1]{\quot#1\quot} %% 2012/01/21 %% |\squoted{<text>}| surrounds <text> with ``straight" %% single quotation marks, useful for other kinds %% of quoting in computer code: \newcommand*{\squoted}[1]{\urlapostr#1\urlapostr} %% 2012/01/21 -%% TODO `\glqq' from 'german.sty' etc. %% 2011/09/22 +%% +%% === (Sub- and) Superscript Digits/Letters === %% 2012/10/25 +%% As Plain \TeX\ and \LaTeX\ provides an alias `\sp' for +%% `^', I use |\spone|, |\sptwo|, |\spthree|, |\spa|, and +%% |\spo| for superscript 1, 2, 3, \qtd{a}, and \qtd{o}: +\newcommand*{\spone}{¹} +\newcommand*{\sptwo}{²} +\newcommand*{\spthree}{³} +\newcommand*{\spa}{ª} +\newcommand*{\spo}{º} +%% For slanted fractions, I think of \ctanpkgref{xfrac}'s +%% `\sfrac{<numerator>}{<denominator>}'. +%% |\sfrac{1}{2}|, |\sfrac{1}{4}|, and |\sfrac{3}{4}| work so far: +\newcommand*{\sfrac}[2]{&frac#1#2;} %% %% === Math === +%% %% divided/reordered section 2012/08/07 +%% ==== Symbols ==== +%% (\TeX\ math type ``Ord")---|\aleph|: +\renderHTMLsymbol{\aleph}{alefsym} +%% 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}{°} +%% We stick to \TeX's |\emptyset| %% 2011/05/08 +\renderHTMLsymbol{\emptyset}{empty} %% 2011/04/14 +%% |\exists| and |\forall|: %% 2012/10/05 +\renderHTMLsymbol{\exists}{exist} +\declareHTMLsymbol{forall} +%% |\prime| can be used for minutes, |\Prime| for seconds: +\renderHTMLsymbol{\prime}{prime} \declareHTMLsymbol{Prime} +%% +%% ==== Relations ==== %% %% doc. extended 2011/05/08: %% Because \verb+<+ and \verb+>+ are used for \HTML's %% element notation, we provide aliases |\gt|, |\lt| @@ -880,6 +1005,15 @@ %% We also provide their \TeX\ aliases %% |\geq|, |\leq|, |\neq|: %% 2011/05/11 \let\geq\ge \let\leq\le \let\neq\ne +%% 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 +%% +%% ==== Delimiters ==== %% Angle braces |\langle| and |\rangle|: \renderHTMLsymbol{\langle}{lang} \renderHTMLsymbol{\rangle}{rang} @@ -891,24 +1025,22 @@ \begingroup \Delimiters\[\] \gdef\{[{] \gdef\}[}] \endgroup +%% +%% ==== Binary Operations ==== %% \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|: %% 2011/04/04 +%% of the asterisk: %% here 2012/10/05 +\renderHTMLsymbol{\ast}{lowast} %% 2011/03/29 +%% |\pm| renders the plus-minus symbol: %% 2012/08/07 +\renderHTMLsymbol{\pm}{plusmn} +%% \TeX\ and \HTML\ agree on |\cap|, |\cup|, +%% and |\times|: +%% 2011/05/08 +%% 2011/04/04 \declareHTMLsymbols{{cap}{cup}{times}} %% 2012/01/06 -%% 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`ˆ'\rq\ %% \lq\rq 2011/09/08 %% to get \TeX's \cs{circ} %% (i.e., $\circ$; %% 2011/05/08: @@ -921,11 +1053,17 @@ %% 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}{°} +%% +%% ==== Operators ==== %% 2012/08/07 +%% |\prod|, |sum|: +\renderHTMLsymbol{\prod}{product} +\declareHTMLsymbol{sum} +%% +%% +%% === Currencies === %% 2012/08/06 +%% |\cent|, |\currency|, |\euro|, |\pound|, |\yen|: %% ...symbols 2012/08/07: +\declareHTMLsymbols{{cent}{currency}{euro}{pound}{yen}} +%% You get the \$ symbol simply by |$|. %% %% === Other === %% The tilde |~| is used for its wonderful purpose, @@ -947,17 +1085,17 @@ \renderHTMLsymbol{\ss}{szlig} %% |\copyright|: \renderHTMLsymbol{\copyright}{copy} -%% |\bullet| %% 2011/03/29 +%% |\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 `§', %% we \dqtd{redirect} `\S' to this: %% 2011/05/18 \renderHTMLsymbol{\S}{sect} -%% |\dagger|, |\ddagger|: %% 2011/10/01 +%% |\dagger|, |\ddagger|: %% 2011/10/01 \renderHTMLsymbol{\dagger}{dagger} \renderHTMLsymbol{\ddagger}{Dagger} +%% |\P| renders the paragraph sign or pilcrow: %% 2012/08/07 +\renderHTMLsymbol{\P}{para} %% Sometimes (due to certain local settings) the notations %% \dqtd{`&&<characters>;'} or \dqtd{`&&&#<number>;'} %% (for \Wikienref{Unicode}) may not be available. @@ -984,7 +1122,7 @@ %% 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 +\newlet\prg\@firstofone \newcommand*{\BibTeX}{\prg{BibTeX}} %% 2010/09/13 \renewcommand*{\TeX}{\prg{TeX}} \renewcommand*{\LaTeX}{\prg{LaTeX}} @@ -1026,7 +1164,7 @@ \newcommand*{\startTable}[1]{<table #1>} \def\endTable{</table>} %% |\@frame@box| among the `\startTable' <attributes> -%% draws a frame about the table, |\@frame@groups| +%% draws a frame around the table, |\@frame@groups| %% about -> around %% separates ``groups" by rules: \newcommand*{\@frame@box}{\@frame{box}} \newcommand*{\@frame@groups}{\@frame{groups}} @@ -1205,10 +1343,10 @@ %% Plain \TeX's and \LaTeX's |\cr| and |\endline| are redefined %% for closing and opening rows and cells, including code cosmetic: \renewcommand*{\cr}{\indentii\endTd\CLBrk\indenti\endtr\CLBrk - \indenti\starttr\CLBrk\indentii\StartTd} + \indenti\startTR\CLBrk\indentii\StartTd} \let\endline\cr -%% TODO variants like `\CR' for special (colored, boldface?) cells -%% starting row +%% |\startTR| is a hook defaulting to `\starttr': %% 2012/08/23 +\newlet\startTR\starttr %% %% === Filling a Row with Dummy Cells === %% These macros were made, e.g., for imitating a program window @@ -1399,3 +1537,41 @@ v0.7 2011/11/03 {tablecoloredboldrow} 2012/05/13 \ss; better comment on \uml; #EEEEEE not "web-safe" 2012/05/15 xEDIT folding in tables section +part of MOREHYPE RELEASE r0.6 +v0.8 2012/06/07 \underbar + 2012/07/25 arrows completed [no: 2012/09/13]; + doc. "police" -> "policy" + 2012/07/30 \spanstyle, applied; doc. \pagebreak + 2012/08/01 \textup + 2012/08/02 doc. corr. braces for \DeclareHTMLsymbols + 2012/08/06 sec. currencies + 2012/08/07 divided math section, using \declareHTMLsymbols, + various additional symbols + 2012/08/23 \startTR + 2012/08/28 \MakeActiveLet\'\rq with `actcodes.sty', + attributes start with space + 2012/09/02 about -> around + 2012/09/06 Content-T -> content-t - bugfix?, + \BlogProvidesFile with DOCTYPE, some attribute + lists rely on space from \declareHTMLattrib, + there another \reserved@a; + "Head": \metanamecontent, \metanamelangcontent + 2012/09/07 "Head": \author, \date, \metadescription, + \keywords; lang variants + 2012/09/08 \TagSurr and \MetaTag without space, + \declareHTMLattrib{align}, \@valign@t adjusted; + \pagebreak[3] + 2012/09/13 \crarrow, "Fonts" -> "Physical markup" etc., + \abbr, \newabbr + 2012/09/14 \xmleltcode, \xmleltattrcode; el-name -> elt-name + 2012/09/17 \asciidq + \asciidqtd move to `catchdq.sty' + 2012/10/03 \newlet; + doc.: label process -> catcodes, using \secref + 2012/10/05 moved \ast; \exists, \forall + 2012/10/24 quotes: completed, override `langcode.sty' + 2012/10/25 using \DeclareHTMLsymbols for quotes, corr. there, + \spone etc., \sfrac + 2012/10/28 spanstyle -> stylespan + 2012/11/16 \TagSurr and \MetaTag with space again + 2012/11/19 \endgraf -> <p> + 2012/11/29 `blogligs.sty', `markblog.sty' ([ligs], [mark]) |