diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/morehype/use |
Initial commit
Diffstat (limited to 'macros/latex/contrib/morehype/use')
-rw-r--r-- | macros/latex/contrib/morehype/use/atari_ht.fdf | 8 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/blog.sty | 1609 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/blogdot.cfg | 35 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/blogdot.css | 41 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/blogdot.sty | 333 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/blogexec.sty | 290 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/blogligs.sty | 103 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/hypertoc.sty | 37 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/lnavicol.sty | 224 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/markblog.sty | 70 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/texblog.fdf | 663 | ||||
-rw-r--r-- | macros/latex/contrib/morehype/use/texlinks.sty | 1554 |
12 files changed, 4967 insertions, 0 deletions
diff --git a/macros/latex/contrib/morehype/use/atari_ht.fdf b/macros/latex/contrib/morehype/use/atari_ht.fdf new file mode 100644 index 0000000000..864eb6773d --- /dev/null +++ b/macros/latex/contrib/morehype/use/atari_ht.fdf @@ -0,0 +1,8 @@ +\ProvidesFile{atari_ht.fdf}[2012/10/05 Atari umlauts for blog.sty] +\def\TextCodes{% + \MakeActiveDef{\"A}\MakeActiveDef{\"O}\MakeActiveDef{\"U}% + \MakeActiveDef{\"a}\MakeActiveDef{\"o}\MakeActiveDef{\"u}% + \MakeActiveLet\ss %% 2012/10/05 +} +\endinput + diff --git a/macros/latex/contrib/morehype/use/blog.sty b/macros/latex/contrib/morehype/use/blog.sty new file mode 100644 index 0000000000..a93f3084a8 --- /dev/null +++ b/macros/latex/contrib/morehype/use/blog.sty @@ -0,0 +1,1609 @@ +\ProvidesPackage{blog}[2013/01/21 v0.81a simple fast HTML (UL)] +%% copyright (C) 2010 2011 2012 2013 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 +%% +%% === \cs{newlet} === %% 2012/10/03 +%% |\newlet<cmd><cnd>| is also useful in surrounding files: +\newcommand*{\newlet}[2]{\@ifdefinable#1{\let#1#2}} +%% +%% == Processing == +%% === Requirement === +%% We are building on the 'fifinddo' package +%% (using `\protected@edef' for \secref{ligs}): +\RequirePackage{fifinddo}[2011/11/21] +%% +%% === Output File Names === +%% |\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} +%% +%% === General Insertions === +%% |\CLBrk| is a \emph{code line break} +%% (also saving subsequent comment mark in macro definitions): +\newcommand*{\CLBrk}{^^J} +%% |\ | is turned into an alias for `\space', +%% so it inserts a blank space. It even works at line ends, +%% thanks to the choice of `\endlinechar' in \secref{catcodes}. +\let\ \space +%% %% 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]{% + <!DOCTYPE html>\CLBrk %% TODO more!? 2012/09/06 + \comment{ generated from\CLBrk\CLBrk + \ \ \ \ \ \ \ \ \ #1, #2,\CLBrk\CLBrk + \ \ \ \ \ with blog.sty, + \isotoday\ }}} +\edef\isotoday{%% texblog 2011/11/02, here 2011/11/20 + \the\year-\two@digits{\the\month}-\two@digits{\the\day}} +%% %% 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 `\BlogProcessFile'. +%% +%% === Category Codes etc. === +%% \label{sec:catcodes} +%% 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`\ % +%% <- Comment character to get space rather than `^^M'!%%% 2011/11/08 +%% ---The tilde |~| is active as in Plain~TeX too, it is so natural to +%% use it for abbreviating \HTML's ` '! %% moved up 2011/11/08 +% \catcode`\~\active + \MakeActiveDef\~{ }%% for \FDpseudoTilde 2012/01/07 +%% \qtd{&'} for \HTML\ convenience (cf. \secref{quotes}): + \MakeActiveLet\'\rq %% actcodes 2012/08/28 + \BasicNormalCatCodes} +% \MakeOther\< \MakeOther\> %% rm. 2011/11/20 +%% +%% === The Processing Loop === +%% \[|\BlogProcessFile[<changes>]{<source-file>}|\] +%% %% <- display 2011/11/06 +%% ``copies" the \TeX\ source file <source-file> +%% into the file specified by `\ResultFile'. +\newcommand*{\BlogProcessFile}[2][]{% %% 2011/11/05 + \ProcessFileWith[\BlogCodes + \let\ProvidesFile\BlogProvidesFile %% 2011/02/24 + \let\protect\@empty %% 2011/03/24 + \let\@typeset@protect\@empty %% 2012/03/17 + #1]{#2}{% + \IfFDinputEmpty + {\IfFDpreviousInputEmpty + \relax + {\WriteResult{\ifBlogAutoPars<p>\fi}}}% + \BlogProcessLine %% 2011/11/05 + }% +} +%% 'fifinddo' v0.5 allows the following %% 2011/11/20 +%% \[|\BlogProcessFinalFile[<changes>]{<source-file>}|\] +%% working just like `\BlogProcessFile' except that the final +%% `\CloseResultFile' is issued automatically, no more need +%% having it in the driver file. +\newcommand*{\BlogProcessFinalFile}{% + \FinalInputFiletrue\BlogProcessFile} +%% TODO: %% 2011/11/20 +%% optionally include `.css' code with \xmltagcode{style}. +%% === \emph{Executing} Source File Code Optionally === +%% For v0.7, %% 2011/11/05 +%% `\BlogCopyFile' is renamed `\BlogProcessFile'; and in its code, +%% `\CopyLine' is replaced by `\BlogProcessLine'. The purpose +%% of this is supporting 'blogexec.sty' that allows intercepting +%% certain commands in the line. We provide initial versions of +%% 'blogexec''s switching commands that allow invoking 'blogexec' +%% ``on the fly": +\newcommand*{\ProvideBlogExec}{\RequirePackage{blogexec}} +%% \CtanPkgRef{dowith}{dowith.sty} is used in the %% 2012/01/06 +%% present package to reduce package code and documentation space: +\RequirePackage{dowith} +\setdo{\providecommand*#1{\ProvideBlogExec#1}} +\DoDoWithAllOf{\BlogInterceptExecute \BlogInterceptEnvironments + \BlogInterceptExtra \BlogInterceptHash } +%% %% <- Hash 2011/11/08 +%% |\BlogCopyLines| switches to the ``copy only" +%% (``compressing" empty lines) functionality of the original +%% `\BlogCopyFile': +\newcommand*{\BlogCopyLines}{% +% \let\BlogProcessLine\CopyLine} + \def\BlogProcessLine{% %% 2011/11/21, corr. 2012/03/14: + \WriteResult{\ProcessInputWith\BlogOutputJob}}} +%% <- This is a preliminary support for ``ligatures"---see +%% \secref{ligs}. %%% --, not working inside braces. +%% |\NoBlogLigs| sets the default to mere copying: +\newcommand*{\NoBlogLigs}{\def\BlogOutputJob{LEAVE}} +\NoBlogLigs +%% TODO more from `texblog.fdf' here, problems with `writings.fdf', +%% see its `makehtml.tex' +%% %% 2011/11/06: +%% % ... and this will be the setting with pure 'blog.sty': +%% +%% `\BlogCopyLines' %% 2011/11/21 +%% will be the setting with pure 'blog.sty': +\BlogCopyLines +%% OK, let's not remove |\BlogCopyFile| altogether, rebirth: +\newcommand*{\BlogCopyFile}{\BlogCopyLines\BlogProcessFile} +%% +%% === ``Ligatures", Package Options === +%% \label{sec:ligs} +%% With v0.7, we introduce a preliminary method to use the +%% ``ligatures" `--' and `---' with pure expansion. +%% At this occasion, we also can support the notation +%% \code{\dots} for `\dots', as well as arrows +%% (as in `mdoccorr.cfg'). Note that this is somewhat +%% \strong{dangerous}, especially the source must not +%% contain ``explicit" \HTML\ comment, comments must use +%% 'blog.sty''s `\comment' or the `{commentlines}' +%% environment. Therefore these ``ligatures" must be activated +%% explicitly by |\UseBlogLigs|: +\newcommand*{\UseBlogLigs}{\def\BlogOutputJob{BlogLIGs}} +%% In order to work inside braces, the source file better should +%% be preprocessed in ``plain text mode." +%% (TODO: Use `\ifBlogLigs', and in a group use +%% `\ResultFile' for an intermediate `\htmljob.lig'. +%% And TODO: Use `\let\BlogOutputJob'.) +%% On the other hand, the present approach allows switching +%% while processing with `\EXECUTE'! Also, intercepted commands +%% could apply the replacements on their arguments---using +%% |\ParseLigs{<arg>}|: %% 2011/11/27 +\newcommand*{\ParseLigs}[1]{\ProcessStringWith{#1}{BlogLIGs}} +%% (`\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 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'). +%% Moreover, space tokens after patterns are already there +%% and need not be inserted after control sequences. +\FDpseudoTilde +\StartPrependingChain +\PrependExpandableAllReplacer{blog...}{...}{\protect\dots} +\PrependExpandableAllReplacer{blog--}{--}{\protect\endash} +\PrependExpandableAllReplacer{blog---}{---}{\protect\emdash} +%% <- Cf. thin surrounding spaces with +%% `\enpardash' ('texblog', maybe \meta{hair space} U+200A +%% instead of thin space), difficult at code line beginnings +%% or endings and when a paragraph starts with an emdash. +%% I.e., perhaps better don't use it if you want to have +%% such spaces.---\qtd{`---'} must be replaced before \qtd{`--'}! +\PrependExpandableAllReplacer{blog->}{->}{\protect\to} +\PrependExpandableAllReplacer{blog<-}{<-}{\protect\gets} +%% You also could set `\BlogOutputJob' to a later part of the chain, +%% or more globally change the following: +\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} +%% As in \TeX\ an empty line starts a new paragraph, +%% we might ``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, this sometimes has unwanted effects +%% (comment lines TODO), %% 2011/11/20 +%% 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} +%% `\BlogAutoPars' is issued by package option %% 2011/11/20 +%% |[autopars]|: +\DeclareOption{autopars}{\BlogAutoPars} +\ProcessOptions +%% See \secref{p-br} for other ways of breaking paragraphs. +%% +%% == General \HTML\ Matters == +%% The following stuff is required for any web page +%% (or hardly evitable). +%% === General Tagging === +%% %% $$ -> \[ ... 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{<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). +%% 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>} +\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) %%% +%% 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\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. +%% +%% % |\declareHTMLattribs{{<attr>}<list>}| essentially issues +%% % \[`\declareHTMLattrib{<attr>}\declareHTMLattribs{<list>}'\] +%% % while `\declareHTMLattribs{}' essentially does nothing---great, +%% % this is an explanation by recursion! +%% % % \newcommand*{\declareHTMLattribs}{\DoWithAllOf\declareHTMLattrib} +%% 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 +\let\@title\relax %% for \title in latex.ltx, %% 2011/04/26 +\DoWithAllOf\declareHTMLattrib{{class}{id}{style}{title}{lang}{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 +%% hyper-text anchors: +\declareHTMLattrib{name} %% 2010/11/06 +%% |@content| appears with `\MetaTag' below: %% 2011/11/05 +\declareHTMLattrib{content} +%% |@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 +%% \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"} +\declareHTMLattrib{align} %% 2012/09/08 +%% |@valign@t|: +% \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 +\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.} +%% +%% === Hash Mark === +%% |#| is needed for numerical specifications in \HTML, +%% especially colours 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) %% (...) 2011/11/08 +%% in order to refer to their \HTML\ meaning.%%%---I wonder +%% %% <- rm. 2011/11/08 -> +%% % 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. +{ \MakeOther\# \gdef\#{#} %% \M... 2011/11/08 +% \catcode`\&=12 \gdef\AmpMark{&} %% rm. 2011/11/08 +} +%% ... `\CompWordMark' etc.? +%% +%% === ``Escaping" \HTML\ Code for ``Verbatim" === +%% \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 +%% |\MetaTag{<inside>}| creates a \xmltagcode{meta} tag: +\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}}} + %% <- 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 + \@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>} +%% With |\title{<text>}|, <text> heads %% grammar? TODO 2010/04/08 +%% the browser window: +%% % \renewcommand*{\title}[1]{\space\space<title>#1</title>} +%% %% <- 2011/12/12 -> +\renewcommand*{\title}{\space\space\SimpleTagSurr{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>} +%% +%% === Comments === +%% |\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} + {-->} +%% === \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} +%% 2010/04/28: +%% \xmltagcode{br} for manual line breaking +%% can be generated either by |\newline| or by |\\|: +\renewcommand*{\newline}{<br>} +\let\\\newline +%% Automatical insertion of \xmltagcode{p} tags +%% for starting new paragraphs according to +%% \secref{autopars} has been difficult, +%% especially comment lines so far insert unwanted +%% paragraph breaks (TODO 2011/11/20). +%% So here are some ways to use \LaTeX/ Plain \TeX\ +%% 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>} %% 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. +%% +%% |\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}}} +%% +%% == 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 +%% \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>}| 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: %% \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 +%% +%% |\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}} +%% %% 2011/09/21, 2012/01/06: +%% For tagging acronyms, +%% \HTML\ offers the \xmltagcode{acronym} element, +%% and the \httpref{ctan.org/pkg/tugboat}{\acro{TUG}boat macros} +%% 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{<LETTERS>}| +%% (supporting both naming policies mentioned in \secref{name-policy}): +\newcommand*{\acronym}{\SimpleTagSurr{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} +%% 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 +%% \hyperref[sec:phys]{physical markup}, %% \hyperref 2012/01/06 +%% we have \emph{two} policies for +%% \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 +%% 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\CLBrk</#3>}} %% \CLBrk 2012/04/03 +%% 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} +%% |\begin{enumtype}{<type>}| starts an enumeration +%% environment with enumeration type <type> +%% which can be one out of `1', `a', `A', `i', `I' +%% (somewhat resembling the functionality of the +%% \ctanpkgref{enumerate} package): +\newenvironment{enumtype}[1]{<ol \@type{#1}}{</ol>} +%% %% 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 === +%% %% doc. fixes + hyperref 2011/10/16: +%% |\hanc{<name>}{<text>}| makes <text> an anchor with +%% \HTML\ label <name> like \ctanpkgref{hyperref}'s +%% |\hypertarget{<name>}{<text>}| +%% (that we actually provide as well, +%% towards printing from the same source): +\newcommand*{\hanc}[1]{\TagSurr a{\@name{#1}}} +\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}}} +%% |\href{<name>}{<text>}| makes <text> a link to <name> +%% (as with 'hyperref'): +\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{<name>}{<text>}| makes <text> a link to +%% an anchor <name> on the same web page. +%% This is especially useful for a ``table of contents"---a +%% list of links to sections of the page. +%% It is just like 'hyperref''s |\hyperlink{<name>}{<text>}|: +\newcommand*{\ancref}[1]{\href{\##1}} +\newlet\hyperlink\ancref +%% |\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>}| +%% that %% 2011/10/21 +%% 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 ... +\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': +\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 +%% ``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}{}} +%% %% TODO replace \@namedef with \defcsname +%% |\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! +\newcommand*{\declareHTMLsymbols}{\DoWithAllOf\declareHTMLsymbol} +%% |\renderHTMLsymbol{<macro>}{<name>}| \emph{redefines} +%% macro <macro> to expand to `&<name>;': +\newcommand*{\renderHTMLsymbol} [2]{\renewcommand*{#1}{}} +%% Redefinitions of |\&| and |\%| +%% (well, `\PercentChar' is 'fifinddo''s %% add. apostroph 2011/07/22 +%% version of \LaTeX's `\@percentchar'): +\renderHTMLsymbol{\&}{amp} +\let\%\PercentChar +%% +%% === Diacritics === %% changed 2011/03/04 +%% For the difference between \dqtd{diacritic} and +%% \dqtd{accent,} see \wikienref{Diacritic}{\meta{Wikipedia.}} +%% +%% %% replacing \ccedil 2011/11/23: +%% %%|\ccedil|: %%%, |\eacute|, |\ocirc| (``r\^ole") +%% % \declareHTMLsymbol{ccedil} +%% %% 2011/03/04, added example results 2011/11/24: +%% \HTML\ entities |é| (\'e), +%% |ç| (\c{c}), %% 2011/11/23 +%% |ô| (\^o) etc. can be accessed +%% by \TeX's accent commands |\'|, |\c|, |\^|, |\`|, |\"|: +% \declareHTMLsymbol{eacute} +% \declareHTMLsymbol{ocirc} +\renewcommand*{\'}[1]{acute;} +\renewcommand*{\c}[1]{cedil;} +\renewcommand*{\^}[1]{circ;} +\renewcommand*{\`}[1]{grave;} +\renewcommand*{\"}[1]{uml;} +%% %% 2012/05/13: +%% ... former |\uml{<char>}| is obsolete, use |\"<char>| +%% (or `\"<char>') instead. +%% % may have been overestimated: +%% % (useful in macro definitions): %% 2010/11/13 +%% % \newcommand* {\uml}[1] {uml;} %% 2010/08/24 +%% +%% %% 2013/01/01: +%% |\v{<char>}| just works with $<char>=`s'$ and $<char>=`S'$ +%% for \v{s} and \v{S}: +\renewcommand*{\v}[1]{#1caron;} +%% +%% === Ligatures and the Like === %% 2013/01/01 +%% |\lig{<char1><char2>}| forms a ligature from <char1> and <char2>: +\newcommand*{\lig}[1]{lig;} +%% With v0.81, we use this to reimplement +%% |\ss| from Plain~\TeX\ and \LaTeX\ for the +%% putative %% 2013/01/01 +%% ``s-z ligature", the German ``\Wikienref{sharp s}" +%% (``\ss"): %% 2013/01/01 +% \renderHTMLsymbol{\ss}{szlig} +\renewcommand*{\ss}{\lig{sz}} +%% |\AE|, |\ae|, |\OE|, |\oe| (``\AE", ``\ae", ``\OE", ``\oe") +%% are reimplemented likewise: +\renewcommand*{\AE}{\lig{AE}} +\renewcommand*{\ae}{\lig{ae}} +\renewcommand*{\OE}{\lig{OE}} +\renewcommand*{\oe}{\lig{oe}} +%% +%% === Greek === %% 2011/02/26 +\declareHTMLsymbols{{Alpha}{alpha} %% 2012/01/06 + {Beta}{beta}{Gamma}{gamma}{Delta}{delta}{Epsilon}{epsilon} + {Zeta}{zeta}{Eta}{eta}{Theta}{theta}{Iota}{iota}{Kappa}{kappa} + {Lambda}{lambda}{My}{my}{Ny}{ny}{Xi}{xi}{Omikron}{omikron} + {Pi}{pi}{Rho}{rho}{Sigma}{sigma}{sigmaf}{Tau}{tau} + {Upsilon}{upsilon}{Phi}{phi}{Chi}{chi}{Psi}{psi} + {Omega}{omega} %% render -> declare 2011/02/26 + {thetasym}{upsih}{piv} } +%% +%% === Arrows === +%% ---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} +%% 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| ... +\def \endash {–} %% \end... illegal +\newcommand*{\emdash} {—} +%% +%% === Spaces === +%% ``Math" (not only!)\ spaces |\,|, |\enspace|, |\quad|, |\qquad|: +%% %% <- 2011/04/26 +\renderHTMLsymbol{\enspace}{ensp} +\renderHTMLsymbol{\quad} {emsp} +\renewcommand* {\qquad} {\quad\quad} +%% 2011/07/22: ` ' allows line breaks, +%% so we introduce |\thinsp| to access ` ', +%% 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 === +%% \label{sec:quotes} +%% |\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. +%% %% rm. \screenqtd 2011/11/08: +%% % |\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'} %% rm. 2011/11/08 +\newcommand*{\urlapostr} {'} %% 2010/09/10 +%% The actual change of |'| is in `\BlogCodes' +%% (\secref{catcodes}). +%% +%% %% mod. 2012/10/24f.: +%% |\bdquo| (bottom), |\ldquo|, |\rdquo|, |\sbquo| (single bottom): +\declareHTMLsymbol{bdquo} %% 2011/09/23 +\declareHTMLsymbols{{ldquo}{rdquo}} +\declareHTMLsymbol{sbquo} %% 2010/07/01 +\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: +%% |\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 +%% +%% === (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| +%% for mathematical $\lt$ and $\gt$---and for reference +%% to \HTML\ (or just \acro{XML}) code %% 2011/11/23 +%% (see \secref{html-verb}): +\declareHTMLsymbols{{gt}{lt}} +%% |\ge|, |\le|, and |\ne| for $\geq$, $\leq$, and $\neq$ resp.: +\declareHTMLsymbols{{ge}{le}{ne}} +%% 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} +%% 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 +%% +%% ==== Binary Operations ==== +%% \TeX's |\ast| corresponds to the ``lower" version +%% 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 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: +%% \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 `·' +%% reserved for the \Wikienref{dot product} according to +%% the \wikideref{Malzeichen\#Skalarprodukt} +%% {German \meta{Wikipedia}} %% 2011/09/08! +\declareHTMLsymbol{sdot} %% 2011/05/08 +%% +%% ==== 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, +%% by analogy to \TeX (TODO overridden by `\FDpseudoTilde'): +\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} +%% Plain~\TeX's and \LaTeX's |\-| becomes a soft hyphen: +\renderHTMLsymbol{\-}{shy} +%% |\copyright|: +\renderHTMLsymbol{\copyright}{copy} +%% |\bullet| %% 2011/03/29 +\renderHTMLsymbol{\bullet}{bull} +%% \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 +\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. +%% We provide +%% \[|\htmlentity{<characters>}|\] +%% as well as +%% \[|\unicodeentity{<decimal>}|\] +%% and +%% \[|\unicodehexentity{<hexadecimal>}|\] +%% for such situations: +\newcommand*{\htmlentity}[1]{} +\newcommand*{\unicodeentity}[1]{&\##1;} +\newcommand*{\unicodehexentity}[1]{&\#x#1;} +%% +%% == \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. +\newlet\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'. +%% +%% \leavevmode % \errorcontextlines=15 %% TODO 2011/11/05 +%% |\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 +%% I am not so sure about this section ... +%% === 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 === +%% |\startTable{<attributes>}| and |\endTable| have been made +%% for appearing in different macros, such as in the two parts +%% of a `\newenvironment': +%% %% 2010/07/17: +\newcommand*{\startTable}[1]{<table #1>} +\def\endTable{</table>} +%% |\@frame@box| among the `\startTable' <attributes> +%% draws a frame around the table, |\@frame@groups| %% about -> around +%% separates ``groups" by rules: +\newcommand*{\@frame@box}{\@frame{box}} +\newcommand*{\@frame@groups}{\@frame{groups}} +%% |\begin{allrulestable}{<cell-padding>}{<width>}| +%% starts a table environment with all possible rules +%% and some code cosmetic. <width> may be empty ... +\newenvironment{allrulestable}[2] + {\startTable{\@cellpadding{#1} \@width{#2} + \@frame@box\ rules="all"}\CLBrk %% \ 2011/10/12 + \ \tbody} %% <- tbody 2011/10/13, `\ ' 2011/11/09 -> + {\ \endtbody\CLBrk\endTable} +%% \xmltagcode{tbody}...\xmltagcode{/tbody} seemed to be +%% better with `\HVspace' for 'blogdot.sty', %% 2011/10/13 +%% so it gets an environment |{tbody}| +%% (i.e., macros |\tbody| and |\endtbody|): +\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 ... +%% +%% |\begin{TableRow}{<comment>}{<attributes>}|\\ starts an environment +%% producing an \HTML\ comment <comment> and a table row +%% with attributes <attributes>, including code cosmetic. +\newenvironment*{TableRow}[2]{%% lesser indentation 2011/04/25 + \ \comment{ #1 }\CLBrk + \indenti<tr #2>% + }{% + \indenti\endtr} %% \endtr 2011/11/08 +%% |\begin{tablecoloredrow}{<comment>}{<background-color>}|\\ +%% is a special case of `{TableRow}' where `@bgcolor' is the only +%% attribute: +\newenvironment{tablecoloredrow}[2] + {\TableRow{#1}{\@bgcolor{#2}}} + {\endTableRow} +%% |\begin{tablecoloredboldrow}{<comment>}{<background-color>}|\\ +%% is like `{tablecoloredrow}' except that content text is +%% rendered in boldface (TODO horizontal centering?): +\newenvironment{tablecoloredboldrow}[2] %% 2011/11/03/08 + {\TableRow{#1}{\@bgcolor{#2} + \@style{font-weight:bold}}} + {\endTableRow} +%% |\begin{tablerow}{<comment>}| %% rm. {<b...>} 2011/12/19 +%% is a special case of `{TableRow}' where the only attribute +%% yields ``top" vertical alignment (TODO strange): +%% %% ``top" 2010/05/18: +\newenvironment{tablerow}[1]{\TableRow{#1}{\@valign@t}} + {\endTableRow} +%% |\starttr| and |\endtr| delimit a row; these commands again +%% have been made for appearing in different macros. +%% There is \emph{no} code indenting, probably for +%% heavy table nesting where indenting was rather useless +%% (? TODO only in 'texblog.fdf'? there indents would have +%% been useful). +%% %% 2010/07/18: +\newcommand*{\starttr}{<tr>} +\def\endtr{</tr>} +%% +%% === Cells === +%% |simplecell{<content>}| produces the most \emph{simple} kind of +%% an \HTML\ table cell: +\newcommand*{\simplecell}{\SimpleTagSurr{td}} %% 2010/07/18 +%% |\TableCell{<attributes>}{<content>}| produces the most +%% \emph{general} kind of a cell, together with a code indent: +%% % \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} +%% |\colorwidthcell{<color>}{<width>}{<content>}| +%% uses just the `@bgcolor' and the `@width' attribute: +%% %% 2010/06/15: +\newcommand*{\colorwidthcell}[2]{\TableCell{\@bgcolor{#1}\@width{#2}}} +%% |\tablewidthcell{<color>}{<width>}{<content>}| +%% uses just the `@bgcolor' and the `@width' attribute: +\newcommand*{\tablewidthcell}[1]{\TableCell{\@width{#1}}} +%% %% |\tablewidthcell{<color>}{<width>}{<content>}| %% 2011/11/09 +%% %% uses just the `@bgcolor' and the `@width' attribute: +%% %\newcommand*{\tablecolorcell}[1]{\TableCell{\@bgcolor{#1}}} +%% |\tablecell{<content>}| is like `\simplecell{<content>}', +%% except that it has a code indent: +\newcommand*{\tablecell}{\TableCell{}} +%% |\tableCell{<content>}| is like `\tablecell{<content>}', +%% except that the content <content> is horizontically centered. +%% The capital `C' in the name may be considered indicating +%% ``\strong{c}entered": +\newcommand*{\tableCell}{\TableCell\@align@c} +%% Idea: use closing star for environment variants!? +%% +%% |\begin{bigtablecell}{<comment>}| +%% starts an \emph{environment} yielding a table cell element +%% without attributes, preceded by a \HTML\ comment +%% <comment> unless <comment> is empty. At least the \HTML\ tags +%% are indented: +%% %% 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 +%% |\begin{BigTableCell}{<comment>}{<attributes>}|\\ +%% is like `\begin{bigtablecell{<comment>}}' except that it uses +%% attributes <attributes>: +%% %% 2010/06/05: +\newenvironment{BigTableCell}[2] + {\ifx\\#1\\\indentii\ \comment{#1}\CLBrk\fi + \indentiii\startTd{#2}} + {\indentii\endTd} %% TODO indent? 2010/07/18 +%% |\startTd{<attributes>}| and |\endTd| delimit a cell element +%% and may appear in separate macros, e.g., in an environment +%% definition. There is no code cosmetic. And finally there is +%% |\StartTd| that yields less confusing code without attributes: +%% %% 2010/07/18: +\newcommand*{\startTd}[1]{<td #1>} +\newcommand*{\StartTd}{<td>} %% 2011/11/09 +\def\endTd{</td>} +%% |\emptycell| uses \xmltagcode{td /} instead of +%% \xmltagcode{td}\xmltagcode{/td} for an empty cell: +\newcommand*{\emptycell}{<td />} %% 2011/10/07 +%% +%% === ``Implicit" Attributes and a ``\TeX-like" Interface === +%% %% <- 2011/11/08 -> +%% After some more experience, much musing, and trying new tricks, +%% I arrive at the following macros (v0.7). \ +%% (i)\enspace When a page or a site has many tables that use the same +%% attribute values, these should not be repeated for the single +%% tables, rather the values should be invoked by shorthand macros, +%% and the values should be determined at a single separate place. +%% We will have |\stdcellpadding|, %%% |\stdtableheadrow|, +%% |\stdtableheadcolor| and +%% |\stdtableheadstyle|. \ +%% (ii)\enspace As with \TeX, `\cr' should suffice to \emph{close} +%% a \emph{cell} and a \emph{row}, and then to \emph{open} another +%% \emph{row} and its first \emph{cell}. And there should be a +%% single command to close a cell within a row and open a next one. +%% +%% We use `\providecommand' so the user can determine the values +%% in a file for 'blog' where 'blogexec' is loaded later. +%% |\stdcellpadding| should correspond to the \CSS\ settings, +%% the value of `6' you find here is just what I used recently. +\providecommand*{\stdcellpadding}{6} +%% For |\stdtableheadcolor|, I provide a +%% % ``web-safe" %% very wrong 2012/05/13 +%% gray, `#EEEEEE', that the German Wikipedia uses for articles about +%% \Wikienref{networking protocol}s +%% (unfortunately, it doesn't have a +%% \wikienref{Web colors\#X11_color_names}{% +%% \CSS-3}\wikienref{X11 color names}{X11} color name): +\providecommand*{\stdtableheadcolor}{\#EEEEEE} +%% |\stdtableheadstyle| demands a boldface font. +%% In general, it is used for the `@style' attribute: +\providecommand*{\stdtableheadstyle}{font-weight:bold} +%% |\begin{stdallrulestable}| starts an `{allrulestable}' +%% environment with ``standard" cell padding and empty width +%% attribute, then opens a ``standard" row element +%% with a ``standard" comment as well as a cell: +\newenvironment{stdallrulestable}{% + \allrulestable{\stdcellpadding}{}\CLBrk + \TableRow{standard all-rules table}% + {\@bgcolor{\stdtableheadcolor} + \@style{\stdtableheadstyle}}\CLBrk + \indentii\StartTd +%% `\end{stdallrulestable}' will provide closing of a cell +%% and a row, including a code cosmetic: + }{\indenti\endTd\CLBrk\endTableRow\CLBrk + \endallrulestable} +%% |\endcell| closes a cell and opens a new one. The idea behind +%% this is that an active character will invoke it. The name is +%% inspired by `\endgraf' and `\endline' from Plain \TeX\ and +%% \LaTeX\ (`\newcommand' does not work with `\end'\code{\dots}): +\def\endcell{\endTd\StartTd} +%% 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} +\let\endline\cr +%% |\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 +%% with a title bar (spanning someting more complex below), +%% perhaps also for a Gantt chart. +%% |\FillRow{<span>}{<attributes>}| produces a cell without text, +%% spanning <span> columns, with additional attributes <attributes>. +%% %% 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} +%% |\fillrow{<span>}| instead only uses the `@colspan' attribute: +\newcommand*{\fillrow}[1]{\FillRow{#1}{}} +%% |\fillrowcolor{<span>}{<color>}| just uses the `@colspan' +%% and the `@bgcolor' attributes: +\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 == +%% \TeX's |\hrule| (rather deprecated in \LaTeX) is redefined +%% to produce an \HTML\ horizontal line: +\renewcommand*{\hrule}{<hr>} +%% 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. +%% +%% == Leaving and HISTORY == +\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 ˆ, + 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 +part of MOREHYPE RELEASE r0.51 +v0.62 2011/10/16 \hyperlink, \hypertarget; doc. fixes there + 2011/10/20 \textcolor by <span>, \textsf + 2011/10/21 \ctanref now in texlinks.sty; + doc.: grammar with `that' + 2011/10/22 \BlogCopyFile message removed +part of MOREHYPE RELEASE r0.52 +v0.7 2011/11/03 {tablecoloredboldrow} + 2011/11/05 \ContentAtt -> \@content, + \BlogCopyFile -> \BlogProcessFile (blogexec), + doc. different \pagebreak's + 2011/11/06 run \BlogCopyLines, doc. \[...\] + 2011/11/07 \ProvideBlogExec + 2011/11/08 \endtr in \endTableRow, using \MakeOther, + right quote change moves to \BlogCodes, + \BlogInterceptHash; rm. \AmpMark & doc. about it, + mod. on #; doc. for tables; start doc. "implicit" + table attributes and "TeX-like" interface + 2011/11/09 \tablecolorcell(?); cont. "implicit" etc.; + \StartTd + 2011/11/20 \isotoday, \BlogProcessFinalFile, + catcodes of `<' `>' untouched; restructured, + structured processing, misc -> ordinary + 2011/11/21 BlogLIGs + 2011/11/23 \xmltagcode, \xmlentitycode, \c; + doc: <p>, \secref, \pagebreak + 2011/11/24 doc: example results for diacritics + 2011/11/27 \ParseLigs; doc. rm. \pagebreak + 2011/12/12 \title uses \SimpleTagSurr + 2011/12/19 doc. fix {tablerow} + 2011/12/21 \asciidq, \asciidqtd + 2012/01/06 \acro; using dowith.sty (\declareHTMLsymbols); + doc.: cross-referring for naming policies + 2012/01/07 \MakeActiveDef\~ for \FDpseudoTilde + 2012/01/11 (C) + 2012/01/21 \quot, \quoted. \squoted + 2012/02/04 \newacronym + 2012/03/14 removed hidden and another comment with + \BlogCopyLines, fixed latter, TODO on \NoBlogLigs + 2012/03/17 tweaked \@typeset@protect for \EXECUTE + 2012/03/30 space in stdallrules... after @bgcolor + 2012/04/03 \CLBrk in \@useHTMLelement + 2012/04/09 \htmlentity, \unicodeentity + 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]) +part of MOREHYPE RELEASE r0.7 +v0.81 2012/12/20 \-, {enumtype} + 2013/01/02 caron, "Ligatures ..." (æ etc.) + 2013/01/04 updating copyright +part of MOREHYPE RELEASE r0.81 +v0.81a 2013/01/21 \newlet in subsubsection diff --git a/macros/latex/contrib/morehype/use/blogdot.cfg b/macros/latex/contrib/morehype/use/blogdot.cfg new file mode 100644 index 0000000000..c0ca5dfc68 --- /dev/null +++ b/macros/latex/contrib/morehype/use/blogdot.cfg @@ -0,0 +1,35 @@ +\ProvidesFile{blogdot.cfg}[2011/10/21 local blogdot.sty config] +%% (U.L.:) For my 1024$\times$600 screen +%% (with Mozilla Firefox~3.6.22 for Ubuntu canonical~-~1.0), +%% the following choice of `\leftpagemargin' worked best +%% for my goal of 640px type area width. +%% (Finally it turned out that I needed more.) +%% When I increased it, actually the left margin shrunk. +%% I am not an HTML expert. I also tried increasing +%% body width (and "center" value of @align), in vain. +\renewcommand*{\leftpagemargin}{176} +% \renewcommand*{\rightpagemargin}{\leftpagemargin} +% \renewcommand*{\upperpagemargin}{80} +%% I prepared my presentation for a screen of +%% 600px height and tried to confine myself to a +%% type area height of 440px; a lower margin of 504px would hide +%% the next "page"/"slide" even on a screen 1024px high: +% \renewcommand*{\lowerpagemargin}{504} +% \renewcommand*{\typeareawidth}{640} +% \renewcommand*{\typeareaheight}{440} +% \ShowBlogDotBorders +% \ShowBlogDotFrame +%% Overall background color: +% \renewcommand*{\bodybgcolor}{\#ffffff} +%% Language choices: +% \input{lang-de.fdf} +% \input{lang-en.fdf} +%% ... `blogdot.cfg' may be a good idea for general settings; +%% recompiling the presentation of a given document source +%% `<job>.tex' may better be controlled in a file `<job>.cfg' ... +%% +%% Open CTAN files: %% 2011/10/21 +% \usemirrorctan +% \usecurrdirctan +%% Stop processing this file: +\endinput diff --git a/macros/latex/contrib/morehype/use/blogdot.css b/macros/latex/contrib/morehype/use/blogdot.css new file mode 100644 index 0000000000..31f8e9ddee --- /dev/null +++ b/macros/latex/contrib/morehype/use/blogdot.css @@ -0,0 +1,41 @@ +/* blogdot.css for blogdot.sty (morehype bundle) 2011/10/05 */ +/* (C) 2011 Uwe Lueck www.contact.uwe.lueck.de.vu */ +/* 2011/09/21 aus blog/plain.css, 2011/09/26 gekĂźrzt, Versuche, Umbau */ +/* +b, h1, h2, h3, h4, div, p, td, th, body, span, table, ol, li, a, ul { +font-family:Arial,Verdana,"Lucinda Sans",sans-serif; +color:#000000; +font-size:21px; +} +*/ + +h1 { font-size: 42px; margin-bottom: 21px } +h2 { font-size: 30px; margin-bottom: 21px } +h3 { font-size: 24px; } +h4 { font-size: 21px; } + +/* body, td, th, div, p, ul, li, em, strong */ +td { +font-family:Arial,Verdana,"Lucinda Sans",sans-serif; +color:#000000; +font-size: 21px +} + +p { margin-bottom:0px } +dl, ol, ul { +/* padding-left: 18px; */ +padding-left: 1em; +margin-left: 1em; margin-top: 18px; margin-bottom: 18px; +vertical-align: middle; +} +dt { margin: 0px; margin-top: 18px; margin-bottom: 9px; padding: 0px } +li { margin: 0px; margin-top: 9px; margin-bottom: 9px; padding: 0px } +blockquote { margin-left: 2em } +pre { margin-left:2em; margin-top:0px } + +/* table { margin: 0px; margin-top: 9px; margin-bottom: 18px; padding: 0px} */ + +a:link { color:#0000d0; text-decoration:none; } +a:visited { color:purple; text-decoration:none; } +a:hover { color:blue; text-decoration:underline; } +a:active { color:blue; text-decoration:underline; } diff --git a/macros/latex/contrib/morehype/use/blogdot.sty b/macros/latex/contrib/morehype/use/blogdot.sty new file mode 100644 index 0000000000..abcd41a3ba --- /dev/null +++ b/macros/latex/contrib/morehype/use/blogdot.sty @@ -0,0 +1,333 @@ +\NeedsTeXFormat{LaTeX2e}[1994/12/01] %% \newcommand* etc. +\ProvidesPackage{blogdot}[2013/01/22 v0.41b HTML presentations (UL)] +%% copyright (C) 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 +%% +%% == 'blog' Required == +%% 'blogdot' is an extension of 'blog' +%% (but what about options? TODO): +\RequirePackage{blog} +%% == Size Parameters == +%% \label{sec:dot-size} +%% I assume that it is clear what the following +%% six page dimension parameters +%% \begin{quote} +%% |\leftpagemargin|, |\rightpagemargin|, +%% |\upperpagemargin|,\\|\lowerpagemargin|, +%% |\typeareawidth|, |\typeareaheight| +%% \end{quote} +%% mean. +%% The choices are what I thought should work best +%% on my 1024$\times$600 screen (in fullscreen mode); +%% but I had to optimize the left and right margins experimentally +%% (with Mozilla Firefox~3.6.22 for Ubuntu canonical~-~1.0). +%% It seems to be best when the horizontal parameters +%% together with what the brouswer adds +%% (scroll bar, probably 32px with me) +%% sum up to the screen width. +\newcommand*{\leftpagemargin}{176} +\newcommand*{\rightpagemargin}{\leftpagemargin} +%% So |\rightpagemargin| ultimately is the same as +%% |\leftpagemargin| as long as you don't redefine it, +%% and it suffices to `\renewcommand' `\leftpagemargin' +%% in order to get a horizontically centered type area +%% with user-defined margin widths.---Something analogous +%% applies to |\upperpagemargin| and |\lowerpagemargin|: +\newcommand*{\upperpagemargin}{80} +\newcommand*{\lowerpagemargin}{\upperpagemargin} +%% A difference to the ``horizontal" parameters is +%% (I expect) that the position of the type area on the +%% screen is affected by |\upperpagemargin| only, +%% and you may choose |\lowerpagemargin| just large enough +%% that the next slide won't be visible on any computer screen +%% you can think of. +\newcommand*{\typeareawidth}{640} +\newcommand*{\typeareaheight}{440} +%% Centering with respect to web page body may work better on +%% different screens (2011/10/03), but it doesn't work here +%% (2011/10/04). +% \renewcommand*{\body}{% +% </head>\CLBrk +% <body \@bgcolor{\bodybgcolor} \@align@c>} +%% |\CommentBlogDotWholeWidth| procuces no \HTML\ code ... +\global\let\BlogDotWholeWidth\@empty +%% ... unless calculated with |\SumBlogDotWidth|: +\newcommand*{\SumBlogDotWidth}{% + \relax{% %% \relax 2011/10/22 magic ... + \count@\typeareawidth + \advance\count@ \leftpagemargin + \advance\count@\rightpagemargin + \typeout{ * blogdot slide width = \the\count@\space*}% + \xdef\CommentBlogDotWholeWidth{% + \comment{ slide width = \the\count@\ }}}} +%% +%% == (Backbone for) Starting a ``Slide" == +%% \label{sec:dot-start} +%% |\startscreenpage{<style>}{<anchor-name>}| +\newcommand*{\startscreenpage}[2]{%% 0 2011/09/25!?: + \\\CLBrk %% 2012/11/19 +%% <- `\\' suddenly necessary, likewise in `texblog.fdf' +%% with `\NextView' and `\nextruleview'. +%% Due to recent `firefox'? %% 2012/11/21 + \startTable{% + \@cellpadding{0} \@cellspacing{0}% + \maybe@blogdot@borders %% 2011/10/12 + \maybe@blogdot@frame %% 2011/10/14 + }% + \CLBrk %% 2011/10/03 + \starttr +%% First cell determines both +%% height of upper page margin |\upperpagemargin| +%% and +%% width of left page margin |\leftpagemargin|: + \startTd{\@width {\leftpagemargin }% + \@height{\upperpagemargin}}% +% \textcolor{\bodybgcolor}{XYZ}% + \endTd +%% Using |\typeareawidth|: +% \startTd{\@width{\typeareawidth}}\endTd + \simplecell{% + \CLBrk + \hanc{#2}{\hvspace{\typeareawidth}% + {\upperpagemargin}}% + \CLBrk + }% +%% Final cell of first row determines right margin width: + \startTd{\@width{\leftpagemargin}}\endTd + \endtr + \starttr + \emptycell\startTd{\@height{\typeareaheight}#1}% +} +%% |\titlescreenpage| \ (`\STARTscreenpage' TODO?) \ %% 2011/10/03 \ 2012/11/19 +%% opens the title page (I thought). To get it to your screen, +%% (make and) click a link like +%% \[`\ancref{START}{start presentation}':\] +\newcommand*{\titlescreenpage}{% + \startscreenpage{\@align@c}{START}} +%% +%% == Finishing a ``Slide" and ``Restart" (Backbone) == +%% \label{sec:dot-fin} +%% |\screenbottom{<next-anchor>}| finishes the current slide +%% and links to the <next-anchor>, the anchor of a slide opened by +%% \[`\startscreenpage{<style>}{<next-anchor>}'.\] +%% More precisely, the margin below the type area is that link. +%% The corner at its right is a link to the anchor to whose name +%% |\BlogDotRestart| expands. +\newcommand*{\screenbottom}[1]{% + \ifFillBlogDotTypeArea + <p>\ancref{#1}{\BlogDotFillText}% %% not </p> 2011/10/22 + \fi + \endTd\emptycell + \endtr + \CLBrk + \tablerow{bottom margin}% %% 2011/10/13 + \emptycell + \CLBrk + \startTd{\@align@c}% + \ancref{#1}{\HVspace{\BlogDotBottomFill}% +%% <- seems to be useless now (2011/10/15). + {\typeareawidth}% + {\lowerpagemargin}}% + \endTd + \CLBrk + \simplecell{\ancref{\BlogDotRestart}% + {\hvspace{\rightpagemargin}% + {\lowerpagemargin}}}% + \endtablerow + \CLBrk + \endTable +} +%% The default for |\BlogDotRestart| is |START|---the title page. +%% You can `\renew'\-`command' it so you get to a slide +%% containing an overview of the presentation. +\newcommand*{\BlogDotRestart}{START} +%% +%% == Moving to Next ``Slide" (User Level) == +%% \label{sec:dot-next} +%% |\nextscreenpage{<style>}{<anchor-name>}| +%% puts closing the previous slide and opening the next +%% one---having anchor name `<anchor-name>'---together. +%% <style> is for style settings for the next page, +%% made here for choosing between centering the page/slide content +%% and aligning it flush left. +\newcommand*{\nextscreenpage}[2]{% + \screenbottom{#2}\CLBrk + \hrule \CLBrk + \startscreenpage{#1}{#2}} +%% |\nextcenterscreenpage{<anchor-name>}| chooses centering +%% the slide content: +\newcommand*{\nextcenterscreenpage}{\nextscreenpage{\@align@c}} +%% |\nextnormalscreenpage{<anchor-name>}| chooses flush left +%% on the type area determined by |\typeareawidth|: +\newcommand*{\nextnormalscreenpage}{\nextscreenpage{}} +%% +%% == Constructs for Type Area == +%% \label{sec:dot-type} +%% If you want to get centered titles with \xmltagcode{h2} etc., +%% you should declare this in `.css' files. But you may consider +%% this way too difficult, and you may prefer to declare this +%% right in the \HTML\ code. That's what I do! I use +%% |\cheading{<digit>}{<text>}| for this purpose. +\newcommand*{\cheading}[1]{\CLBrk\TagSurr{h#1}{\@align@c}} +%% |\begin{textblock}{<width>}| opens a |{textblock}| +%% environment. The latter will contain text that will be flush left +%% in a narrower text area---of width <width>---than the one +%% determined by |\typeareawidth|. It may be used on +%% "centered" slides. It is made for lists whose entries are +%% so short that the page would look unbalanced under a +%% centered title with the list adjusted to the left +%% of the entire type area. (Thinking of standard \LaTeX, +%% it is almost the `{minipage}' environment, however lacking +%% the footnote feature, in that respect it is rather +%% similar to `\parbox' which however is not an environment.) +\newenvironment*{textblock}[1] + {\startTable{\@width{#1}}\starttr\startTd{}} + {\endTd\endtr\endTable} +%% +%% == Debugging and `.cfg's == +%% \label{sec:cfgs} +%% |\ShowBlogDotBorders| shows borders of the page margins +%% and may be undone by |\DontShowBlogDotBorders|: +\newcommand*{\ShowBlogDotBorders}{% + \def\maybe@blogdot@borders{rules="all"}} +\newcommand*{\DontShowBlogDotBorders}{% + \let\maybe@blogdot@borders\@empty} +\DontShowBlogDotBorders +%% %% 2011/10/14: +%% |\ShowBlogDotFrame| shows borders of the page margins +%% and may be undone by |\DontShowBlogDotFrame|: +\newcommand*{\ShowBlogDotFrame}{% + \def\maybe@blogdot@frame{\@frame@box}} +\newcommand*{\DontShowBlogDotFrame}{% + \let\maybe@blogdot@frame\@empty} +\DontShowBlogDotFrame +%% However, the rules seem to affect horizontal positions ... +%% +%% |\BlogDotFillText| is a dirty trick ... seems to widen +%% %% doc. extended 2011/10/13 +%% the type area and this way centers the text on wider screens +%% than the one used originally. Of course, this can corrupt +%% intended line breaks. +\newcommand*{\BlogDotFillText}{% %% 2011/10/11 + \center + \BlogDotFillTextColor{% %% 2011/10/12 +% X\\X %% insufficient + X X X X X X X X X X X X X X X X X X X X + X X X X X X X X X X X X X X X X X X X X + X X X X X X X X X X + X X X X X X X X X X +% X X X X X X X X X X X X X X X X X X X X + } + \endcenter +} +%% |\FillBlogDotTypeArea| fills `\BlogDotFillText' into the +%% type area, also as a link to the next slide. This may widen +%% the type area so that the text is centered on wider screens +%% than the one the \HTML\ page was made for. The link may serve +%% as an alternative to the bottom margin link +%% (which sometimes fails). +%% `\FillBlogDotTypeArea' %% 2011/10/22 +%% can be undone +%% by |\DontFillBlogDotTypeArea|: +\newcommand*{\FillBlogDotTypeArea}{% + \let\ifFillBlogDotTypeArea\iftrue + \typeout{ * blogdot filling type area *}} %% 2011/10/13 +\newcommand*{\DontFillBlogDotTypeArea}{% + \let\ifFillBlogDotTypeArea\iffalse} +\DontFillBlogDotTypeArea +%% |\FillBlogDotBottom| fills `\BlogDotFillText' into the +%% center bottom cell. I tried it before `\FillBlogDotTypeArea' +%% and I am not sure ... +%% It can be undone by +%% |\DontFillBlogDotBottom|: +\newcommand*{\FillBlogDotBottom}{% + \let\BlogDotBottomFill\BlogDotFillText} +%% ... actually, it doesn't seem to make a difference! +%% (2011/10/13) +\newcommand*{\DontFillBlogDotBottom}{\let\BlogDotBottomFill\@empty} +\DontFillBlogDotBottom +%% |\DontShowBlogDotFillText| makes `\BlogDotFillText' invisible,\\ +%% |\ShowBlogDotFillText| makes it visible. +%% Until 2011/10/22, `\textcolor' ('blog.sty') used the +%% \xmltagcode{font} element that is deprecated. +%% I still use it here because it seems to suppress the +%% `hover' \acro{CSS} indication for the link. +%% (I might offer a choice---TODO) +\newcommand*{\DontShowBlogDotFillText}{% +% \def\BlogDotFillTextColor{\textcolor{\bodybgcolor}}} + \def\BlogDotFillTextColor{% + \TagSurr{font}{color="\bodybgcolor"}}} +\newcommand*{\ShowBlogDotFillText}{% + \def\BlogDotFillTextColor{\textcolor{red}}} +\DontShowBlogDotFillText +%% As of 2013/01/22, 'texlinks.sty' provides %% adjusted 2013/01/22 +%% `\ctanfileref{<path>}{<file-name>}' that uses an online +%% \TeX\ archive randomly chosen or determined by the user. +%% This is preferable for an online version of the presentation. +%% In `dantev45.htm', this is used for example files. +%% When, on the other hand, internet access during the presentation is +%% bad, such example files may instead be loaded from the +%% ``current directory." \ |\usecurrdirctan| \ modifies `\ctanfileref' +%% for this purpose (i.e., it will ignore <path>): +\newcommand*{\usecurrdirctan}{% + \renewcommand*{\ctanfileref}[2]{% + \hnewref{}{##2}{\filenamefmt{##2}}}} +%% (Using a local \acro{TDS} tree would be funny, but I don't +%% have good idea for this right now. ) +%% +%% |\TryBlogDotCFG| looks for `blogdot.cfg', +%% \[|\TryBlogDotCFG[<file-name-base>]|\] %% \[...\] 2011/10/21 +%% looks for `<file-name-base>.cfg' +%% (for recompiling a certain file): +\newcommand*{\TryBlogDotCFG}[1][blogdot]{% + \InputIfFileExists{#1.cfg}{% + \typeout{ + * Using local settings from \string`#1.cfg\string' *}% + }{}% +} +\TryBlogDotCFG +%% +%% %% rm. \pagebreak 2013/01/04 +%% == The End and HISTORY == +\endinput +%% VERSION HISTORY +v0.1 2011/09/21f. started + 2011/09/25 spacing/padding off + 2011/09/27 \CLBrk + 2011/09/30 \BlogDotRestart + used for DANTE meeting +v0.2 2011/10/03 four possibly independent page margin + parameters; \hvspace moves to texblog.fdf + 2011/10/04 renewed \body commented out + 2011/10/07 documentation + 2011/10/08 added some labels + 2011/10/10 v etc. in \ProvidesPackage + part of morehype RELEASE r0.5 +v0.3 2011/10/11 \HVspace, \BlogDotFillText + 2011/10/12 commands for \BlogDotFillText + 2011/10/13 more doc. on "debugging"; + \ifFillBlogDotTypeArea, \tablerow, messages + 2011/10/14 \maybe@blogdot@frame + 2011/10/15 doc. note: \HVspace useless + part of morehype RELEASE r0.51 +v0.4 2011/10/21 \usecurrdirctan + 2011/10/22 FillText with <p> instead of </p>, its color + uses <font>; some more reworking of doc. + part of morehype RELEASE r0.6 +v0.41 2012/11/19 \startscreenpage with \\; doc. \ + 2012/11/21 updating version infos, doc. \pagebreak +v0.41a 2013/01/04 rm. \pagebreak + part of morehype RELEASE r0.81 +v0.41b 2013/01/22 adjusted doc. on `texlinks' diff --git a/macros/latex/contrib/morehype/use/blogexec.sty b/macros/latex/contrib/morehype/use/blogexec.sty new file mode 100644 index 0000000000..0767561cc8 --- /dev/null +++ b/macros/latex/contrib/morehype/use/blogexec.sty @@ -0,0 +1,290 @@ +\NeedsTeXFormat{LaTeX2e}[1994/12/01] %% \newcommand* etc. +\ProvidesPackage{blogexec}[2012/12/20 v0.21 + assignments with blog.sty (UL)] +%% copyright (C) 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 +%% +%% == Requirements == +%% The \ctanpkgref{dowith} package is needed for managing +%% and running lists of macros to be intercepted: +\RequirePackage{dowith} +%% Admittedly, `\do' and `\@elt' lists (as discussed in `dowith.pdf') +%% would be faster than the 'dowith' method, which might be relevant +%% here (TODO: how much?). I may abandon 'dowith' later, I just cannot +%% afford removing it now (2011/11/05, TODO). +%% +%% == Processing Source Files == +%% With |\BlogInterceptExtra|, 'blog.sty' +%% deals with \emph{empty} input lines just like +%% \[`\BlogCopyFile[<changes>]{<src-file>}'\] +%% does; \emph{otherwise} the content of `\fdInputLine' is copied to +%% |\fdOutputCode|. Before the latter is writen to the output file +%% <output> (as determined by a recent `\ResultFile{<output>}'), +%% |\BlogInterceptions| is run, its purpose is to extract assignment and other +%% ``execution" commands and to turn `\fdOutputCode' into an +%% expandable macro. We use `\def' because 'blog.sty' may have +%% provided a preliminary definition earlier: +\def\blog@icl@xtra{% + \let\BlogProcessLine\BlogAllowIntercepting + \let\BlogInterceptions\AllBlogInterceptions} +\def\BlogInterceptExtra{\@ifstar@intercept@hash\blog@icl@xtra} +\def\@ifstar@intercept@hash#1{\@ifstar{#1\BlogInterceptHash}#1} +%% And this is the default setting (TODO!?): +\BlogInterceptExtra +%% Below, there are commands for restricted (faster---TODO: relevant? +%% or less complex, to reduce danger) +%% interception functionality. (Maybe the file should be restructured.) +%% |\AllBlogInterceptions| first is nothing: +\InitializeListMacro\AllBlogInterceptions +%% ---and should become more below. +%% +%% |\BlogAllowIntercepting| stores the difference to 'blog.sty': +\newcommand*{\BlogAllowIntercepting}{% + \let\fdOutputCode\fdInputLine + \BlogInterceptions +%% When, after removing the intercepted command, the line is +%% empty, it is \emph{not} written into output: + \ifx\fdOutputCode\@empty \else + \WriteResult{% + \ProcessExpandedWith\fdOutputCode\BlogOutputJob}% +%% ... enabling ``ligatures" with 'blog.sty' v0.7. %% 2011/11/21 + \fi} +%% ... TODO: in 'fifinddo' with something like `\fdInterceptions'? +%% +%% Especially for storing file-specific macro definitions +%% with `\EXECUTE' (below), a parameter character +%% (usually hash mark) is needed. +%% %% mod. 2011/11/20: +%% 'fifinddo.sty' (so far---2011/11/20) +%% does not include it with `\BasicNormalCatCodes', +%% and 'blog.sty' +%% does not include it with `\BlogCodes' +%% ---the following |\BlogInterceptHash| does. +%% Moreover, |\MakeHashParameter| enables such definitions +%% when placed in a source file within the argument of a +%% separate(!) `\EXECUTE'. +\providecommand*{\MakeHashParameter}{\catcode`\#6 } +\def\BlogInterceptHash{% + \ToListMacroAdd\BlogCodes\MakeHashParameter + \MakeHashParameter} +%% TODO: default? 0-arg interception? +%% +%% == Intercepting Single-Parameter Commands == +%% === The General Method === +%% Macros to be intercepted that have a single argument will be +%% collected in |\blogOneArgInterceptions|: +\InitializeListMacro\blogOneArgInterceptions +\ToListMacroAdd\AllBlogInterceptions{% + \DoWithAllIn\blogTryOneArgCmd + \blogOneArgInterceptions} +%% Here |\blogTryOneArgCmd{<cmd>}| creates a ``sandbox" for parsing +%% in a similar way as 'fifinddo' does it, searching for <cmd>. +%% The method there was made thinking of reading files with +%% ``plain text" category codes, not aware of 'blog.sty'. +%% Maybe this was a mistake, and I will reconsider it. +%% There I also introduce a separate sandbox macro +%% for each search pattern, thinking of different types of sandboxes. +%% This is not done/needed here (strangely, TODO).---The sandbox +%% starts with the parsing macro. The latter's name derives from +%% <cmd> by prefixing something to its name. +%% |\StripEsc| is a little helper for removing the backslash +%% from a macro name. +\providecommand*{\StripEsc}{\expandafter\@gobble\string} +%% Name spaces: %% 2012/08/29 +\newcommand*{\blog@x}{\StripEsc\blogx} +\newcommand*{\blogTryOneArgCmd}[1]{% + \csname \blog@x:\StripEsc#1\expandafter\endcsname + \fdOutputCode \@gobble#1\@empty\@nil} +%% Here, `\@empty' is the dummy argument for <cmd>---this is what +%% must be modified for <cmd> with more than one parameter. +%% At present (2011/11/05), that tail starting with `\@gobble' +%% may stay at the end of `\fdOutputCode' for each interception per +%% `\fdInputLine', until it expands to nothing in the `\write'. +%% +%% |\MakeBlogOneArgInterception{<cmd>}{<run>}{<write>}| \ \ +%% says that when <cmd> is found in `\fdOutputCode', +%% <run> should be executed, and `<cmd><arg>' should be replaced +%% by <write> in `\fdOutputCode' where <arg> is the argument for +%% <cmd> found in `\fdOutputCode'. Let <arc> be <arg> without +%% delimiting braces if `<arg>' is `{<arc>}' +%% (otherwise `<arc>' is the same as `<arg>'). +%% Then use `#2' for referring to <arc> inside <run> and <write>. +%% (Sorry, I cannot afford replacing `#2' by a more natural +%% placeholder right now.) +\begingroup + \catcode`\|\z@ |MakeOther|\% %% \z@ 2011/11/22 + |@ifdefinable|MakeBlogOneArgInterception{% + |gdef|MakeBlogOneArgInterception#1#2#3{% +%% First we add <cmd> to `\blogOneArgInterceptions', +%% unless it is already there: %% 2011/11/07 + |TestListMacroForToken|blogOneArgInterceptions#1% + |ifin@ + |PackageWarning{blogexec}{Redeclaring |string#1.}% + |else + |ToListMacroAdd|blogOneArgInterceptions#1% + |fi +%% Now the parsing macro is defined, together with the actions +%% depending on the result: +%% %% TODO csnames/namemod.sty 2011/11/22 + |@namedef{|blog@x:|StripEsc#1}##1#1##2##3|@nil{% +%% #3 will be empty if and only if <cmd> does \emph{not} occur +%% in `\fdOutputCode'. A backslash made ``other" will not occur +%% in `\fdOutputCode', therefore the following +%% `\ifx' becomes true if and only if #3 is empty, i.e., +%% <cmd> does \emph{not} occur in `\fdOutputCode': + |ifx\##3\% +%% In this case we just do nothing. + |else +%% Otherwise, we apply <run> and <write>: + #2% + |def|fdOutputCode{##1#3##3}% + |fi}% + }% + }% +|endgroup +%% %% was single `%' 2011/11/20 +%% === &\EXECUTE === +%% |\EXECUTE{<run>}| runs <run> and is removed from the +%% output line: +\MakeBlogOneArgInterception\EXECUTE{#2}{} +%% You can \strong{store settings} <set> for processing a source +%% file in this file by `\EXECUTE{<set>}' +%% (e.g., shorthand macros only useful in this single file). +%% You even can switch off the interception functionality +%% after running the other settings <set> +%% by `\EXECUTE{<set>\BlogCopyLines}'. +%% +%% `\EXECUTE{<run>}' may be a great relief thinking of pure +%% expansion with 'blog.sty'. You may be happy enough with it +%% and \emph{restrict} the interception functionality to `\EXECUTE' +%% by |\BlogInterceptExecute|. Its definition may be a +%% redefinition of the preliminary macro in 'blog.sty'. +%% (TODO: option for stopping here, avoid 'dowith'.) +\def\blog@icl@exec{% + \let\BlogProcessLine\BlogAllowIntercepting + \def\BlogInterceptions{\blogTryOneArgCmd\EXECUTE}} +\def\BlogInterceptExecute{\@ifstar@intercept@hash\blog@icl@exec} +%% +%% === &\begin\ and &\end === +%% At present (2011/11/06), only |\begin{<env>}| will run %% box 2012/08/28 +%% settings. Macros `\<env>' and `\end<env>' will expand +%% in the `.html' as with 'blog.sty' alone, not touched here. +%% Settings to be \emph{run} must be stored in a macro +%% `\blogx.b:<env>'. If this has not been done, only `\relax' +%% (from `\csname') will be ``run." +\MakeBlogOneArgInterception\begin{% +%% Indeed, we have a ``modified selection" from \LaTeX's original `\begin': + \@ifundefined{#2}% + {\def\@tempa{\@latex@error{Environment #2 undefined}\@eha}}% + {\def\@tempa{\def\@currenvir{#2}% +% \edef\@currenvline{\on@line}% %% not in source + \csname \blog@x.b:#2\endcsname}}% %% \StripEsc->: 2012/08/28 + \begingroup \@tempa}{% + \csname #2\endcsname} +%% % %% TODO single token!? %% rm. 2011/12/15 +%% \[|\MakeBlogBeginRun{<env>}<args>{<begin-code>}|\] resembles +%% \[`\newenvironment*{<env>}<args>{<begin-code>}{<end-code>}'\] except that +%% it does not have `{<end-code>}': +\newcommand*{\MakeBlogBeginRun}{\@makeblogbeginrun\newcommand} +%% v0.2 allows redefinition by +%% \[|\ChangeBlogBeginRun{<env>}<args>{<begin-code>}|\] +\newcommand*{\@makeblogbeginrun}[2]{% + \expandafter #1\expandafter *% + \csname \blog@x.b:#2\endcsname} %% \StripEsc->: 2012/08/28 +\newcommand*{\ChangeBlogBeginRun}{\@makeblogbeginrun\renewcommand} +%% Moreover, v0.2 allows copying that action by +%% \[|\CopyBlogBeginRunTo{<env>}{<enw>}|\] +\newcommand*{\CopyBlogBeginRunTo}[2]{% + \withcsname \let \blog@x.b:#2\expandafter\endcsname + \csname \blog@x.b:#1\endcsname} +%% |\end{<env>}|: +\MakeBlogOneArgInterception\end{\@checkend{#2}\endgroup}{\end{#2}} +% \expandafter\show\csname blogx:end\endcsname +%% \[|\BlogInterceptEnvironments|\] restricts interception functionality +%% to `\EXECUTE', `\begin', and `\end': +\def\blog@icl@envs{% + \BlogInterceptExecute + \ToListMacroAdd\BlogInterceptions{% + \blogTryOneArgCmd\begin\blogTryOneArgCmd\end}} +\def\BlogInterceptEnvironments{\@ifstar@intercept@hash\blog@icl@envs} +%% TODO: \ 1.~imitate \LaTeX's toggling with `\emph' +%% (redefine it in italic environments) +%% \ 2.~code indenting (cf.~\ctanpkgref{inputtrc}) +%% +%% === Skipping Source Code === +%% The |{noblog}| environment ``suppresses" \TeX~source +%% code in the sense that it does not produce \HTML~code---while +%% 'blog.sty''s `{commentlines}' produces an \HTML~comment. +\newenvironment*{noblog}{}{} %% 2012/03/04 from ... +\MakeBlogBeginRun{noblog}{% + \BlogInterceptEnvironments %% 2012/06/22 + \let\WriteResult\@gobble} +%% +%% === A Comfortable Table Environment === +%% As an application of |\MakeBlogBeginRun| for 'blog.sty''s +%% |{stdallrulestable}|, we provide \lq`|'\rq\ as an active character +%% invoking 'blog.sty''s `\endcell' (move to next cell) %% was \cr 2011/11/10 +%% and an active character \lq`&'\rq\ for `\figurespace', +%% i.e., a Unicode symbol for aligning figures. +%% Indeed, we are \emph{not} going back to \LaTeX\ and Plain \TeX\ +%% by using `&' for moving to the next cell, I consider the present +%% choice more intuitive. +\MakeBlogBeginRun{stdallrulestable}{% + \MakeActiveDef\|{\endcell}\MakeActiveDef\&{\figurespace}} +%% I hope nobody will confuse `&' and `8'. A little drawback may be +%% that you now can't use `&' for inserting \acro{HTML} entities. +%% However, recall that these settings are restricted to the +%% `{stdrulestable}' environment, and that you can use +%% `\MakeBlogBeginRun{stdallrulestable}' again for your own choice +%% of shorthands. +%% (TODO: `\MakeActiveLet') +%% +%% +%% == Intercepting Two-Parameter Macros == +%% Here especially I have a macro +%% |\labelsection{<label>}{<title>}| \emph{in mind} +%% (TODO). +%% It could be handled by the one-argument approach +%% by storing the first argument and inserting another macro +%% that reads the second argument. Therefore I am not sure ... +%% (2011/11/04) +%% +%% == Leaving and HISTORY == +\endinput +%% \enlargethispage{2\baselineskip} %% 2012/08/28 + VERSION HISTORY + +v0.1 2011/11/04 started; arrived at \EXECUTE + 2011/11/05 rm. \blogx@dummy, corrected loop, + \BlogInterceptExtra, \BlogInterceptExecute + 2011/11/06 \BlogAllowIntercepting, emptiness test + with "other" backslash, \begin/\end + 2011/11/07 debugging (\catcode... in \@ifdefinable); + warning on reusing interceptor, + \BlogInterceptEnvironments; + doc.: raise interception level in \EXECUTE + 2011/11/08 \BlogInterceptHash (understanding needed hours) + 2011/11/10 `v0.1' in \Provides..., doc. fix, + removing experimental code, doc. all 1-arg + interceptions in one section + 2011/11/20 \BlogInterceptHash improved + 2011/11/20 doc. `%' doubled + 2011/11/21 \BlogOutputJob + 2011/11/22 TODO + \z@ for \MakeBlogOne... + 2011/12/15 rm. TODO +v0.2 2012/08/28 \begin/\end revised (\StripEsc wrong) + 2012/08/29 \ChangeBlogBeginRun, \CopyBlogBeginRun, + \blog@x +v0.21 2012/12/20 {noblog} diff --git a/macros/latex/contrib/morehype/use/blogligs.sty b/macros/latex/contrib/morehype/use/blogligs.sty new file mode 100644 index 0000000000..75beb5beff --- /dev/null +++ b/macros/latex/contrib/morehype/use/blogligs.sty @@ -0,0 +1,103 @@ +\NeedsTeXFormat{LaTeX2e}[1994/12/01] %% \newcommand* etc. +\ProvidesPackage{blogligs}[2012/11/29 v0.2 + pervasive blog ligatures (UL)] +%% copyright (C) 2012 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 +%% +%% == 'blog' Required == +%% 'blogdot' is an extension of 'blog', and must be loaded \emph{later} +%% (but what about options? TODO): +\RequirePackage{blog} +%% == Task and Idea == +%% |\UseBlogLigs| as offered by 'blog.sty' does not work +%% inside macro arguments. You can use |\ParseLigs{<text>}| +%% at such locations to enable ``ligatures" again. +%% 'blogligs.sty' saves you from this manual trick. +%% Many macros have one ``text" argument only, +%% others additionally have ``attribute" arguments. +%% Most macros `<elt-cmd>{<text>}' of the first kind are defined +%% to expand to `\SimpleTagSurr{<elt>}{<text>}' +%% or to `\TagSurr{<elt>}{<attrs>}{<text>}' for some +%% \HTML\ element <elt> and some attribute assignments <attrs>. +%% When a macro in addition to a ``text" element has +%% ``attribute" parameters, `\TagSurr' is used as well. +%% %% 2012/01/08, eigentlich schon 2012/01/04, verloren ...: +% \let\blogtextcolor\textcolor +% \renewcommand*{\textcolor}[2]{\blogtextcolor{#1}{\ParseLigs{#2}}} +%% +%% \pagebreak[2] +%% == Quotation Marks == +%% ``Inline quote" macros `<qtd>{<text>}' to surround <text> +%% by quotation marks do not follow this rule. We are just +%% dealing with English and German double quotes +%% that I have mostly treated by `catchdq.sty'. +%% `"<text>"' then (eventually) expands to either +%% `\deqtd{<text>}' or `\endqtd{<text>}', so we redefine these: +%% %% 2012/01/10: +\let\blogdedqtd\dedqtd +\renewcommand*{\dedqtd}[1]{\blogdedqtd{\ParseLigs{#1}}} +%% %% 2012/08/20: +\let\blogendqtd\endqtd +\renewcommand*{\endqtd}[1]{\blogendqtd{\ParseLigs{#1}}} +%% +%% == \HTML\ Elements == +%% When the above rule holds: +%% %% 2012/01/19: +\let\BlogTagSurr\TagSurr +\renewcommand*{\TagSurr}[3]{% + \BlogTagSurr{#1}{#2}{\ParseLigs{#3}}} +\let\BlogSimpleTagSurr\SimpleTagSurr +\renewcommand*{\SimpleTagSurr}[2]{% + \BlogSimpleTagSurr{#1}{\ParseLigs{#2}}} +%% +%% == Avoiding ``Ligatures" though == +%% |\noligs{<text>}| saves <text> from ``ligature" replacements +%% (except in arguments of macros inside <text> where +%% 'blogligs' enables ligatures): +\newcommand*{\noligs}{} \let\noligs\@firstofone %% !!! +%% I have found it useful to disable replacements within +%% |\code{<text>}|: +\renewcommand*{\code}[1]{\STS{code}{\noligs{#1}}} +%% TODO: kind of mistake, `\STS' has not been affected anyway so far, +%% then defining `\code' as `\STS{code}' should suffice. +%% +%% |\NoBlogLigs| has been meant to disable ``ligatures" altogether again. +%% I am not sure about everything ... +%% %% 2012/03/14, not optimal TODO: +\renewcommand*{\NoBlogLigs}{% + \def\BlogOutputJob{LEAVE}% +% \let\deqtd\blogdeqtd %% rm. 2012/06/03 + \let\TagSurr\BlogTagSurr + \let\SimpleTagSurr\BlogSimpleTagSurr + \FDnormalTilde + \MakeActiveDef\~{ }% %% TODO new blog cmd +} +%% TODO: |\UseBlogLigs| might be redefined likewise +%% (\textcolor{red}{in fact 'blogligs' activates ligatures +%% inside text arguments unconditionally at present}, +%% I keep this for now since I have used it this way with `texblog.fdf' +%% over months, and changing it may be dangerous +%% where I have used tricky workarounds to overcome the +%% `texblog.fdf' mistake). +%% But with \[`\BlogInteceptEnvironments'\] this is not needed +%% when you use `\NoBlogLigs' for the contents of some \LaTeX\ +%% environment. +%% +%% == The End and \acro{HISTORY} == +\endinput +%% VERSION HISTORY +v0.1 2012/01/08ff. developed in `texblog.fdf' +v0.2 2012/11/29 own file + diff --git a/macros/latex/contrib/morehype/use/hypertoc.sty b/macros/latex/contrib/morehype/use/hypertoc.sty new file mode 100644 index 0000000000..e78ca6fe8d --- /dev/null +++ b/macros/latex/contrib/morehype/use/hypertoc.sty @@ -0,0 +1,37 @@ +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{hypertoc}[2011/01/23 v0.1 pretty TOC links (UL)] + +%% Copyright (C) 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 +%% +%% Modifying |\@dottedtocline|: +\let\HTOC@@line\@dottedtocline +\renewcommand*{\@dottedtocline}[4]{% + \HTOC@@line{#1}{#2}{#3}{\mathstrut#4\mathstrut}} +%% `\mathstrut' is like `\vphantom{()}', it indeed expands to +%% `\vphantom(' in \LaTeX\ (as in plain \TeX). +%% +%% Modifying |\l@section|: +%% % TODO: next lines appropriate for 'acticle.cls' only!?---and +%% % `\chapter' still missing ... +\let\HTOC@@section\l@section +\renewcommand*{\l@section}[1]{% + \HTOC@@section{\mathstrut#1\mathstrut}} +%% Leaving: +\endinput +%% +%% == VERSION HISTORY == + +v0.1 2011/01/23 very first diff --git a/macros/latex/contrib/morehype/use/lnavicol.sty b/macros/latex/contrib/morehype/use/lnavicol.sty new file mode 100644 index 0000000000..f8a4cb399c --- /dev/null +++ b/macros/latex/contrib/morehype/use/lnavicol.sty @@ -0,0 +1,224 @@ +\ProvidesPackage{lnavicol}[2011/10/13 + left navigation column with blog.sty] +%% +%% Copyright (C) 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 +%% +%% == 'blog.sty' Required == +%% ---but what about options (TODO)? %% 2011/10/09 +\RequirePackage{blog} +%% +%% == Switches == +%% %% introduced 2011/04/29, it seems +%% There is a ``standard" page width and a ``tight one" +%% (the latter for contact forms)---|\iftight|: +\newif\iftight +%% In order to move an anchor to the \emph{top} of the screen +%% when the anchor is near the page end, the page must get +%% some extra length by adding empty space at its +%% bottom---|\ifdeep|: +\newif\ifdeep +%% +%% == Page Style Settings (to be set locally) == +% \newcommand*{\pagebgcolor}{\#f5f5f5} %% CSS whitesmoke +% \newcommand*{\pagespacing}{\@cellpadding{4} \@cellspacing{7}} +% \newcommand*{\pagenavicolwidth}{125} +% \newcommand*{\pagemaincolwidth}{584} +% \newcommand*{\pagewholewidth} {792} +%% == Possible Additions to 'blog.sty' == +%% === Tables === +%% |\begin{spancolscell}{<number>}{<style>}| +%% opens an environment that contains a row and a single cell +%% that will span <number> table cells and have style <style>: +\newenvironment{spancolscell}[2]{% + \starttr\startTd{\@colspan{#1} #2 % + \@width{100\%}}% %% TODO works? + }{\endTd\endtr} +%% The |{hiddencells}| einvironment contains cells that do not align +%% with other cells in the surrounding table. The purpose is using +%% cells for horizontal spacing. +\newenvironment{hiddencells} + {\startTable{}\starttr} + {\endtr\endTable} +%% |{pagehiddencells}| is like `{hiddencells}' except that +%% the \HTML\ code is indented: +\newenvironment{pagehiddencells} + {\indentii\hiddencells} + {\indentii\endhiddencells} +%% |\begin{FixedWidthCell}{<width>}{<style>}| \ opens the +%% `{FixedWidthCell}' environment. The content will form a cell +%% of width <width>. <style> are additional formatting parameters: +\newenvironment{FixedWidthCell}[2] + {\startTd{#2}\startTable{\@width{#1}}% + \starttr\startTd{}} + {\endTd\endtr\endTable\endTd} +%% |\tablehspace{<width>}| is a variant of \LaTeX's `\hspace{<glue>}'. +%% It may appear in a table row: +\newcommand*{\tablehspace}[1]{\startTd{\@width{#1} /}} +%% +%% === Graphics === +%% The command names in this section are inspired by the names +%% in the standard \LaTeX\ \ctanpkgref{graphics} package. +%% (They may need some re-organization TODO.) +%% +%% |\simpleinclgrf{<file>}| embeds a graphic file <file> without +%% the tricks of the remaining commands. +\newcommand*{\simpleinclgrf}[1]{\IncludeGrf{alt="" \@border{0}}% + {#1}} +%% |\IncludeGrf{<style>}{<file>}| embeds a graphic file <file> +%% with style settings <style>: +\newcommand*{\IncludeGrf}[2]{<img #1 src="#2">} +%% |\includegraphic{<width>}{<height>}{<file>}{<border>}{<alt>}{<tooltip>}| +%% ...: %% fine with mdoccorr 2011/10/13 +\newcommand*{\includegraphic}[6]{% + \IncludeGrf{% + \@width{#1} \@height{#2} %% data; presentation: + \@border{#4} + alt="#5" \@title{#6}}% + {#3}} +%% |\insertgraphic{<wd>}{<ht>}{<f>}{<b>}{<align>}{<hsp>}{<vsp>}{<alt>}{<t>}| +%% \\adds <hsp> for the `@hspace' and <vsp> for the `@vspace' +%% attribute: +\newcommand*{\insertgraphic}[9]{% + \IncludeGrf{% + \@width{#1} \@height{#2} %% data; presentation: + \@border{#4} + align="#5" hspace="#6" vspace="#8" + alt="#8" \@title{#9}}% + {#3}} +%% |\includegraphic{<wd>}{<ht>}{<file>}{<anchor>}{<border>}{<alt>}{<tooltip>}| +%% \\uses an image with `\includegraphic' parameters as a link to +%% <anchor>: +\newcommand*{\inclgrfref}[7]{% + \fileref{#4}{\includegraphic{#1}{#2}{#3}% + {#5}{#6}{#7}}} +%% +%% === \acro{HTTP}/Wikipedia tooltips === +%% |\httptipref{<tip>}{<www>}{<text>}| \ works like \ +%% `\httpref{<www>}{<text>}' except that <tip> appears as ``tooltip": +\newcommand*{\httptipref}[2]{% + \TagSurr a{\@title{#1}\@href{http://#2}\@target@blank}} +%% |\@target@blank| abbreviates the `@target' setting for +%% opening the target in a new window or tab: +\newcommand*{\@target@blank}{target="_blank"} +%% % |\wikitipref{<language-code>}{<lemma>}{<text>}| \ +%% |\wikitipref{<lc>}{<lem>}{<text>}| +%% works like +%% % \\ +%% % `\wikiref{<language-code>}{<lemma>}{<text>}' +%% `\wikiref{<lc>}{<lem>}{<text>}' +%% except that +%% ``Wikipedia" appears as ``tooltip". +%% |\wikideref| and |\wikienref| are redefined to use it: +\newcommand*{\wikitipref}[2]{% + \httptipref{Wikipedia}{#1.wikipedia.org/wiki/#2}} +\renewcommand*{\wikideref}{\wikitipref{de}} +\renewcommand*{\wikienref}{\wikitipref{en}} +%% +%% == Page Structure == +%% The body of the page is a table of three rows and two columns. +%% === Page Head Row === +%% |\PAGEHEAD| opens the head row and a single cell that will span +%% the two columns of the second row. +\newcommand*{\PAGEHEAD}{% + \startTable{% + \@align@c\ + \@bgcolor{\pagebgcolor}% + \@border{0}%% %% TODO local + \pagespacing + \iftight \else \@width\pagewholewidth \fi + }\CLBrk + %% omitting <tbody> + \ \comment{ HEAD ROW }\CLBrk + \indenti\spancolscell{2}{}% +} +% \newcommand*{\headgrf} [1]{% %% rm. 2011/10/09 +% \indentiii\simplecell{\simpleinclgrf{#1}}} +% \newcommand*{\headgrfskiptitle}[3]{% +% \pagehiddencells +% \headgrf{#1}\CLBrk +% \headskip{#2}\CLBrk +% \headtitle1{#3}\CLBrk +% \endpagehiddencells} +%% |\headuseskiptitle{<grf>}{<skip>}{<title>}| +%% first places <grf>, then skips horizontally by <skip>, +%% and then prints the page title as \xmltagcode{h1}: +\newcommand*{\headuseskiptitle}[3]{% + \pagehiddencells\CLBrk + \indentiii\simplecell{#1}\CLBrk + \headskip{#2}\CLBrk + \headtitle1{#3}\CLBrk + \endpagehiddencells} +%% |\headskip{<skip>}| is like `\tablehspace{<skip>}' +%% except that the \HTML\ code gets an indent. +\newcommand*{\headskip} {\indentiii\tablehspace} +%% Similarly, |\headtitle{<digit>}{<text>}| is like +%% `\heading<digit>{<text>}' apart from an indent and +%% being put into a cell: +\newcommand*{\headtitle}[2]{\indentiii\simplecell{\heading#1{#2}}} +%% +%% === Navigation and Main Row === +%% |\PAGENAVI| closes the head row and opens the ``navigation" +%% column, actually including an `{itemize}' environment. +%% Accordingly, `writings.fdf' has a command `\fileitem'. +%% But it seems that I have not been sure ... +\newcommand*{\PAGENAVI}{% + \indenti\endspancolscell\CLBrk + \indenti\starttr\CLBrk + \ \comment{NAVIGATION COL}\CLBrk + \indentii\FixedWidthCell\pagenavicolwidth + {\@class{paper} +%% <- using `@class'=`paper' here is my brother's idea, +%% not sure about it ... + \@valign@t} + %% omitting `\@height{100\%}' + \itemize} +%% |\PAGEMAINvar{<width>}| closes the navigation column +%% and opens the ``main content" column. The latter gets +%% width <width>: +\newcommand*{\PAGEMAINvar}[1]{% + \indentii\enditemize\ \endFixedWidthCell\CLBrk + \ \comment{ MAIN COL }\CLBrk + \indentii\FixedWidthCell{#1}{}} +%% ... The width may be specified as |\pagemaincolwidth|, +%% then |\PAGEMAIN| works like `\PAGEMAINvar{\pagemaincolwidth}': +\newcommand*{\PAGEMAIN}{\PAGEMAINvar\pagemaincolwidth} +%% +%% === Footer Row === +%% |\PAGEFOOT| closes the ``main content" column as well as +%% the second row, and opens the footer row: +\newcommand*{\PAGEFOOT}{% + \indentii\endFixedWidthCell\CLBrk +% \indentii\tablehspace{96}\CLBrk %% vs. \pagemaincolwidth + %% <- TODO margin right of foot + \indenti\endtr\CLBrk + \ \comment{ FOOT ROW / }\CLBrk + \indenti\spancolscell{2}{\@class{paper} \@align@c}% +%% <- again class ``paper"!? +} +%% |\PAGEEND| closes the footer row and provides all the rest +%% ... needed? +\newcommand*{\PAGEEND}{\indenti\endspancolscell\endTable} +%% +%% == The End and HISTORY == +\endinput + +HISTORY + +2011/04/29 started (? \if...) +2011/09/01 to CTAN as `twocolpg.sty' +2011/09/02 renamed +2011/10/09f. documentation more serious +2011/10/13 `...:' OK diff --git a/macros/latex/contrib/morehype/use/markblog.sty b/macros/latex/contrib/morehype/use/markblog.sty new file mode 100644 index 0000000000..0b0be279b9 --- /dev/null +++ b/macros/latex/contrib/morehype/use/markblog.sty @@ -0,0 +1,70 @@ +\NeedsTeXFormat{LaTeX2e}[1994/12/01] %% \newcommand* etc. +\ProvidesPackage{markblog}[2012/11/29 v0.2 + wiki markup with blog.sty (UL)] +%% copyright (C) 2012 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 +%% +%% == 'blog' Required == +%% 'blogdot' is an extension of 'blog' and must be loaded \emph{later} +%% (but what about options? TODO): +\RequirePackage{blog} +%% == Replacement Rules == +%% 2012/01/06f.: +\FDpseudoTilde +%% |[[<wikipedia-link>]]|: a 'fifinddo' job is defined that +%% passes to the ``ligature" job for arrows in 'blog.sty': +\MakeExpandableAllReplacer{blog[[}{[[}{\protect\catchdbrkt}{blog<-} +\def\catchdbrkt#1]]{\Wikiref{#1}} %% + t 2012/01/09 +%% The stars are inspired by \Wikiref{Markdown} +%% (thanks to Uwe Ziegenhagen October 2011), +%% while I have own ideas about them. +\MakeExpandableAllReplacer{blog**}{**} + {\protect\doublestar:}{blog[[} +\MakeExpandableAllReplacer{blog***}{***} + {\protect\triplestar:}{blog**} +% \CopyFDconditionFromTo{blog***}{BlogLIGs} +%% Apostrophes: %% 2012/01/11: +\MakeActiveDef\'{\noexpand'} +\MakeExpandableAllReplacer{blog\string'\string'}{''} + {\protect\doubleapostr:}{blog***} +\MakeExpandableAllReplacer{blog\string'\string'\string'}{'''} + {\protect\tripleapostr:}{blog\string'\string'} +\MakeOther\' +%% Replacing three apostrophes by `\tripleapostr' +%% becomes the first job called with `\UseBlogLigs': +\CopyFDconditionFromTo{blog'''}{BlogLIGs} +%% +%% == Connecting to \LaTeX\ commands == +%% |\MakePairLaTeXcmd#1#2| replaces `#1<text>#1' by `#2{<text>}': +\newcommand*{\MakePairLaTeXcmd}[2]{% + \@ifdefinable#1{\def#1:##1#1:{#2{##1}}}} + %% ":" for "..." 2012/01/30 +%% %% 2012/01/15: +%% |**<text>**| is turned into `\mystrong{<text>}', +%% and |***<text>***| is turned into `\myalert{<text>}'. +%% I have used two shades of red for them: +\MakePairLaTeXcmd\doublestar\mystrong +\MakePairLaTeXcmd\triplestar\myalert +%% As in editing Wikipedia, |''<text>''| renders <text> +%% in italics (or \emph{slanted}), +%% and |'''<text>'''| renders <text> bold. +\MakePairLaTeXcmd\doubleapostr\textit +\MakePairLaTeXcmd\tripleapostr\textbf +%% +%% == The End and \acro{HISTORY} == +\endinput +%% VERSION HISTORY +v0.1 2012/01/06ff. developed in `texblog.fdf' +v0.2 2012/11/29 own file diff --git a/macros/latex/contrib/morehype/use/texblog.fdf b/macros/latex/contrib/morehype/use/texblog.fdf new file mode 100644 index 0000000000..5bcf135ed7 --- /dev/null +++ b/macros/latex/contrib/morehype/use/texblog.fdf @@ -0,0 +1,663 @@ +\ProvidesFile{texblog.fdf}[2013/01/19 extra blog settings] +%% +%% macros I use for my note pages +%% -- Uwe Lueck, www.contact-ednotes.sty.de.vu +%% +%% page head: +\newcommand*{\texrobots}{\robots{index,follow,noarchive}} +%% TODO: all +\newcommand*{\texstylesheet}{\stylesheet{all}{plain}} +%% 2012/09/06: +\newcommand*{\texmetadata}{% + \metanamecontent{author}{Uwe L\"uck}\CLBrk + \metanamecontent{date}{\isotoday}\CLBrk + \texrobots} +%% 2011/04/24: +\newcommand*{\TeXtopofpage}{%% 2011/06/19, \gt 2012/09/08: + \topofpageline{\code{uwe_lueck} \code{\gt} }{\texmapName}} +\newcommand*{\texmapName}{texmap} +%% 2011/05/17, \pubfilename 2012/09/19: +\newcommand*{\pubfilename}{\htmljob} +\newcommand*{\reloadTeXtopofpage}[2]{% + \TeXtopofpage{\pardash\fileref\pubfilename{\meta{#1}}% + \pardash#2}} %% mv. brace here 2011/12/20 +\newcommand*{\deTeXtopofpage}{\reloadTeXtopofpage{neu~laden}} +\newcommand*{\enTeXtopofpage}{\reloadTeXtopofpage{reload}} +\newcommand*{\textopofpage}{\TeXtopofpage{}} +% \newcommand*{\enreloadthis}{% %% 2011/05/14 +% \pardash\fileref{\htmljob}{reload}} +%% 2011/06/19: +\newcommand*{\topofpageline}[3]{% +% \hanc{top-of-page}{% + \CLBrk\indenti %% 2011/10/12 + \begin{small}% + \hanc{top-of-page}{% %% 2012/09/08 + #1% + }% %% 2012/09/08 + \ifx\htmljob#2\else + \CLBrk\indenti + \Fileref{#2} \code{\gt} \fi %% \gt 2012/09/08 + \file\htmljob#3% + \end{small}% +% \CLBrk}% %% 2011/10/12 + \CLBrk %% 2012/09/08 +} +\newcommand*{\privtopofpage}[1]{% + \topofpageline{}{\privmapName}% + {\depardash\fileref{\htmljob}{\textit{neu~laden}}% + \depardash#1}} +\newcommand*{\privmapName}{privmap} +%% +\makeatletter %% 2011/10/12 +%% {noblog} moves to blogexec.sty 2012/12/20 +%% body colors (started 2010/09/15): +\let\simplebody\body +\renewcommand*{\body}{% +% </head><body \@bgcolor{\bodybgcolor}>} %% \@bgcolor 2011/10/03 + </head>% + <body\@style{background-color:\bodybgcolor}>} %% 2011/11/09 + %% <- no space 2012/09/08 +\newcommand*{\bodybgcolor}{\#ffffee} %% td +% \newcommand*{\bodybgcolor}{\#fffff8} %% 2012/12/06 +% \newcommand*{\bodybgcolor}{\#fff8dc} %% cornsilk 2012/12/06 +% \newcommand*{\bodybgcolor}{\#fefefa} %% baby powder 2012/12/06 +% \newcommand*{\bodybgcolor}{\#fffff0} %% CSS ivory 2011/08/03 +% \newcommand*{\bodybgcolor}{\#ffffe7} %% 2010/11/23 2011/06/29 +% \newcommand*{\bodybgcolor}{\#f5f5dc} %% CSS beige 2011/07/31 +% \newcommand*{\bodybgcolor}{\#f8f8ff} %% CSS ghostwhite 2011/07/31 +% \newcommand*{\bodybgcolor}{\#f0ffff} %% CSS azure 2011/08/01 +% \newcommand*{\bodybgcolor}{\#fdf5e6} %% CSS oldlace 2011/08/01 +% \newcommand*{\bodybgcolor}{\#fffafa} %% CSS snow 2011/07/31 +% \newcommand*{\bodybgcolor}{\#fafad2} %% CSS lightgol... 2011/07/31 +% \newcommand*{\bodybgcolor}{\#fffaf0} %% CSS floralwhite 2011/07/31 +% \newcommand*{\bodybgcolor}{\#ffffe0} %% CSS lightyellow 2011/07/31 + %% erneut probiert 2011/12/12 +% \newcommand*{\bodybgcolor}{\#fbfff0} %% 2011/07/31 +% \newcommand*{\bodybgcolor}{\#fdffee} %% 2011/07/31 +% \newcommand*{\bodybgcolor}{\#fefedd} %% 2011/07/31 +% \newcommand*{\bodybgcolor}{\#fcfffc} %% 2011/07/31 +% \newcommand*{\bodybgcolor}{\#fbffff} %% 2011/07/30 +% \newcommand*{\bodybgcolor}{\#fffded} %% 2011/06/29 +% \newcommand*{\bodybgcolor}{\#fcffef} %% 2011/06/28 +% \newcommand*{\bodybgcolor}{\#ffffef} %% 2011/06/27 +% \newcommand*{\bodybgcolor}{\#ffffff} +% \newcommand*{\bodybgcolor}{\#ffffdd} %% 2010/11/17 +% \newcommand*{\bodybgcolor}{\#faffe7} %% 2010/11/17 +% \newcommand*{\bodybgcolor}{\#fcffe7} %% 2010/11/23 +% \newcommand*{\bodybgcolor}{\#fbfff0} %% 2010/11/23 +% \newcommand*{\bodybgcolor}{\#fbfffe} %% 2010/11/23 +%% +%% dark body, aus ultrado.tex, gekuerzt, abgewandelt 2012/05/08: +\newcommand*{\darkbody}{% + \begin{style}{all}\CLBrk + b, h1, h2, h3, h4, div, p, td, th, body, span, table, ol, li, a, ul {\CLBrk + \lightplaincolor + \darkfonts\CLBrk %% light -> dark 2012/05/09 + \CLBrk}\CLBrk + body { \darkbackgroundcolor }\CLBrk + \CLBrk + a:link { \lightlinkcolor \lightfonts }\CLBrk +% a:visited { color:\#cc33cc; }\CLBrk + a:visited { \lightlinkcolor \lightfonts }\CLBrk + a:hover { \lightlinkcolor \lightfonts }\CLBrk + a:active { \lightlinkcolor \lightfonts }\CLBrk + \end{style}\CLBrk + </head><body>\CLBrk +} +%% requires: +% \newcommand*{\plainbody}{</head><body>} +\newcommand*{\lightlinkcolor}{color:% +% \#9999ff; } + \#ccffff; } %% 2012/05/10 +% \#99ccff; } %% 2012/05/10 +\newcommand*{\lightplaincolor}{color:% +% white; } +% \#fff8cc; } + \#ffffcc; } +% \#cccccc; } +\newcommand*{\boldcss}{font-weight:bold; } +% \newcommand*{\lightfonts}{\boldcss} +\newcommand*{\lightfonts}{} +% \newcommand*{\darkfonts}{\lightfonts} +\newcommand*{\darkfonts}{} +\newcommand*{\darkbackgroundcolor}{background-color:% +% \#333300; } +% black; } +% \#221100; } +% \#222200; } + \#001100; } %% 2012/05/10 +% \#110011; } %% 2012/05/10 +% \#111111; } %% 2012/05/10 +%% +%% table cell colors: %% 2011/11/08 +\newcommand*{\mylightblue}{\#eeeeff} %% Wiki TCP/IP +% \newcommand*{\mylightblue}{\#ddddff} %% auch nicht schlecht 2011/11/10 +% \newcommand*{\mylightblue}{\#ddeeff} %% auch nicht schlecht 2011/11/10 +% \newcommand*{\mylightblue}{\#eeefff} %% dantev45 +\newcommand*{\mylightyellow}{\#fff8cc} %% yellow 2011/11/09 +% \newcommand*{\mylightyellow}{\#ffeebb} + +%% internal navigation: +\renewcommand*{\autref}[1]{\ancref{#1}{\code{#1}}} %% 2011/05/16 +% \renewcommand*{\autref}[1]{\ancref{#1}{\code{#1}}} %% 2011/05/16 +% \renewcommand*{\autref}[1]{\ancref{\lowercase{#1}}{#1}} + %% <- does not expand 2011/05/10 +\newcommand*{\Autref}[1]{\ancref{#1}{#1}} %% 2011/08/16 +\newcommand*{\ancandref}[1]{\hancref{#1}{\##1}} %% 2011/07/04 +% \newcommand*{\lineanc}[1]{\TagSurr a{\@name{#1}}} +\newcommand*{\lineanc} [1]{\hanc{#1}{}} %% 2011/07/20 +%% TODO: one anchor element with more +%% than one name!? %% 2011/08/31 +\newcommand*{\sieheuref}[1]{\ancref{#1}{s.\,u.}} %% 2011/12/23 + +%% click to move to top of window: %% 2011/07/25 hier 2012/02/07 +\newcommand*{\entotopofpage}{% + \rightpar{\ancref{top-of-page}{[\textit{\to~top~of~page}~]}}} +\newcommand*{\detotopofpage}{% + \rightpar{\ancref{top-of-page}{[\textit{\to Seitenanfang}\,]}}} +\newcommand*{\nextview}[1]{% %% corr. 2010/09/15 + \rightpar{\ancref{#1}{[\to}|% + \ancref{top-of-page}{~\uparrow~]}}} +\newcommand*{\Nextview}[1]{% %% 2011/05/12 + \nextview{#1}\\\lineanc{#1}} %% \\ 2012/11/21 +\newcommand*{\nextruleview}[1]{% %% 2010/09/15 + \nextview{#1}\hrule\vspace{5}\lineanc{#1}} %% \vspace 2012/11/21 12/01 +\newcommand*{\NRV}{\nextruleview} %% 2011/03/15 +%% Diary date sections: +% \newcommand*{\datepar}[1]{% +%% <- 2012/10/24 -> +\newcommand*{\Datepar}[2]{% +% \endgraf\hanc{#1}{\latexdatepar#1\latexdatepar}}%% 2011/08/12: +% \vspace{3} %%% 2011/08/16 \\% + \vspace{12} %% 2012/09/13 + %% TODO CSS!? <- 2012/09/13 -> + \heading4{% %% wieder 2012/12/01 + \lineanc{\isodateplus#1\isodateplus}% + \lineanc{#1}% +% %% mod. 2012/10/24: +% \heading4{% + \noligs{\isodateplus#1\isodateplus + \ifx\@nnil#2\@nnil\else + \pardash\ParseLigs{#2}\fi}}} +% \isodateplus#1\isodateplus}} +\newcommand*{\datepar}[1]{\Datepar{#1}{}} +%% #5 allows modifications like time, `b', `f.': +% \def\latexdatepar#1/#2/#3#4#5\latexdatepar{% +% \endgraf\heading4{#1-#2-#3#4#5}} +\def\isodateplus#1/#2/#3#4#5\isodateplus{% %% 2011/08/15 + #1-#2-#3#4#5} +\def\isodate#1/#2/#3#4{#1-#2-#3#4} +\newcommand*{\Isodate}{\expandafter\isodate} %% 2011/08/21 +\newcommand*{\isodateref}[1]{% %% 2011/08/19 + \ancref{#1}{\isodateplus#1\isodateplus}} +%% "kw" is "Kalenderwoche" (English term?) +\newcommand*{\kwsec}[1]{% %% 2011/08/24 +% \heading4{% + \endgraf + \vspace{9}\endgraf + \strong{% + \hanc{kw#1}% + {KW#1\quad\ancref{kw#1}{\gets}}}% +% \endgraf +} +\newcommand*{\kwrule}[1]{% %% 2011/08/27 + \nextview{kw#1}\hrule + \hanc{kw#1}{\SimpleTagSurr{big}{KW#1}}% +} +%% 2012/10/26: +\newcommand*{\zeitref}[2]{\ancref{#1-#2}{#2}} +\newcommand*{\zeitanc}[2]{\hanc{#1-#2}{#2}} +%% 2011/08/18 [private - 2011/08/26]: +\newcommand*{\geldpref}{\ancref{geld}{\euro}} +\newcommand*{\jobspref}{\autref{jobs}} + +%% offline links: %% 2012/09/18 +\newcommand*{\Offlineref}[1]{% + \hnewref{}{../../www-Kopien/#1}{\offlinetext}} +\newcommand*{\offlinetext}{\small~[0]\endsmall} %% 2012/09/22 +%% bar of internal links %% 2011/12/23 / 2012/02/07 +\newcommand*{\internallinksbar}[1]{% +% \samehtmlline{% %% irrelevant 2011/12/25 + [\,\DoSeparateWithMore\ancref + \BlogVertNoBreakSep %% 2011/12/25 + #1\StopDoing\,]}% +% } +% \newcommand{\DoSeparateWith}[3]{#1{#3}\do@separate@with#1#2} +% \def\do@separate@with#1#2#3{% +% \ifx\StopDoing#3% +% \else#2#1{#3}% +% \expandafter\do@separate@with\expandafter +% #1\expandafter#2\fi} +%% More 2012/01/17 [`\Do...' moved to `domore.sty' 2012/08/07]: +% \newcommand*{\make@ancref}[1]{\ancref#1} +\newcommand*{\BlogVertNoBreakSep}{~|~} %% 2011/12/25 +\newcommand*{\BlogVertSep} {~| } %% 2011/12/25 +\newcommand*{\BlogVertLine} {~|\CLBrk} %% 2012/09/06 +\newcommand*{\ancrefs}[1]{% %% 2011/12/28 +% \DoSeparateWithMore\ancref\BlogVertSep %% 2012/01/17 + \DoSeparateWithMore\ancref\BlogVertLine %% 2012/01/17 + #1\StopDoing} +\newcommand*{\ancrefslist}{} \let\ancrefslist\ancrefs %% 2012/08/02 TODO +\newcommand*{\varancrefs}[2]{% %% 2012/06/19 /08/07 + \DoSeparateWithMore\ancref{#1}#2\StopDoing} +\newcommand*{\autrefs}[1]{% %% 2011/12/28 + \DoSeparateWith\autref\BlogVertSep #1\StopDoing} +%% 2012/01/17 later [moved to `domore.sty' 2012/08/07]: +\RequirePackage{domore} +%% 2012/01/18: +%% accesses all possibilities: +%% 2012/08/07 moved to `domodes.sty' + \iffalse %% TEST doowith 2012/06/03 +\let\DoWith\DoWithZ %% !!! +% \renewcommand*{\DoSeparateWithMore}[2]{% %% !!? +% \DoSeparateWithSetsPresentedAs{#1}{#2}{M}{Z}} +\renewcommand*{\DoSeparateWithMore}{\DoWithModes{Z}{M}} %% !!? +% \show\DoSeparateWithMore +%% ... including shorthand for `\do', 48 macros in mind. +% \newcommand*{\StripEsc}{\expandafter\@gobble\string} +%% ... lists of things capable of being an undelimited macro +%% argument. +% \newcommand*{\AddAncRef}[1]{\ancref#1~| } %% 2011/12/28 +% \newcommand*{\AddAutRef}[1]{\autref{#1}~| } %% 2011/12/28 + \fi +\newcommand*{\topfilesbar}[1]{% %% 2011/12/26 + |~% + \DoSeparateWith \Fileref + \BlogVertNoBreakSep + #1\StopDoing +} +%% +%% internal/external 2011/08/17f.: +% \newcommand*{\emailpref}{\ancref{email}{E-M@il}} +% \newcommand*{\emailpref}{% +% \ancref{email}{@\,}|\httpref{web.de/fm}{\,fm}} +\newcommand*{\ausflwpref}{% + \autref{ausfl-w}\pardash\wetterwpref +%% 2011/08/22: + \pardash\vrnpref} +\newcommand*{\vrnpref}{% +% \httpref{www.vrn.de/vrn/einfach-ankommen/fahrplanauskunft/}% + \httpref{www.vrn.de}% %% 2011/09/08 + {VRN}} +%% 2012/01/15: +\newcommand*{\webdefmref}{\httpref{web.de/fm}} +\newcommand*{\emailpref}{\ancref{email}{@\,}|\webdefmref{\,fm}} +%% TODO mit \EXECUTE auslagern? + +%% link in new code line TODO!? bad in parentheses: %% 2012/09/06 +% \renewcommand*{\href}[1]{\CLBrk\TagSurr a{\@href{#1}}} +% \renewcommand*{\hnewref}[2]{% +% \CLBrk\TagSurr a{\@href{#1#2" target="_blank}}} +%% 2012/09/08: +\newcommand*{\LinkLinesBroken}{% + \def\@href##1{\CLBrk\indenti href="##1"}} +\newcommand*{\LinkLinesNormal}{% + \def\@href##1{ href="##1"}} +%% +%% page bottom: +%% `\isotoday' moves to `blog.sty' 2011/11/20 +\newcommand*{\genlastrev}[2]{% %% 2011/11/02 + \rightpar{\textit{#1~% +% \Isodate\GenDate + \isotoday %% 2011/11/02 + \ \copyright~\href{#2.html}{Uwe~L\"uck}}}} +\newcommand*{\enlastrev}{\genlastrev{% +% Last~revised% + Last~generated% + }{contact}} +\newcommand*{\delastrev}{\genlastrev{% + Zuletzt neu erzeugt}{kontakt}} +\newcommand*{\Hrule}{\totopofpage\hrule} +\newcommand*{\fivebreaks}{\\\\\\\\\\} %% TODO \vspace + +%% external navigation: +\renewcommand*{\htmakeext}{.htm} %% 2011/10/05 +\newcommand*{\Fileref}[1]{\fileref{#1}{\file{#1}}} %% 2010/09/10 +\newcommand*{\Fileancref}[2]{% %% 2012/09/11 + \fileancref{#1}{#2}{\file{#1\##2}}} %% 2012/09/11 +\newcommand*{\urlhref}[1]{\href{#1}{\urlfmt{#1}}} %% 2011/08/19 +%% \domainref moves to texlinks.sty 2012/12/15 +\newcommand*{\localfilenewref}{\hnewref{}} %% 2011/10/12 +%% Ubuntu-Wiki 2012/09/13: +\newcommand*{\ubuntuurl}{wiki.ubuntuusers.de} +\newcommand*{\ubunturef}{\httpbaseref\ubuntuurl} +\newcommand*{\ubuntucmd}[1]{\ubunturef{#1}{\code{#1}}} +\newcommand*{\Ubunturef}[1]{\ubunturef{#1}{#1}} +\newcommand*{\siehewiki}[1]{% %% 2011/05/06 + \to\wikideref{#1}{\textit{Wikipedia}}} +\newcommand*{\Wref}[1]{\wikiref{#1}{Wikipedia}} %% 2012/01/19 +%% Wikipedia piped links emulation moves to `texlinks.sty' 2012/11/28 +%% 2011/11/23, 2012/01/06, 2012/03/11: +\newcommand*{\wiktionarylangref}[1]{% + \httpbaseref{#1.wiktionary.org/wiki}} +% \newcommand*{\Wiktenref}[1]{\wiktionarylangref{en}{#1}{#1}} +% \newcommand*{\Wiktderef}[1]{\wiktionarylangref{de}{#1}{#1}} +% \newcommand*{\Wiktref}[1]{% %% 2012/01/13 +% \wiktionarylangref\langcode{#1}{#1}} +% %% <- 2012/01/13 -> +% \newcommand*{\Wiktionarylangref}[2]{% +% \wiktionarylangref{#1}{#2}{#2}} +%% 2012/12/25 +\newcommand*{\Wiktionarylangref}{% + \@double@first@arg\wiktionarylangref} +% \newcommand*{\Wiktderef}{\Wiktionarylangref{de}} +%% <- 2012/12/25 -> +\newcommand*{\wiktderef}{\wiktionarylangref{de}} +\newcommand*{\Wiktderef}{\@double@first@arg\wiktderef} +\newcommand*{\wiktref}{\wiktionarylangref\langcode} +% \newcommand*{\Wiktenref}{\Wiktionarylangref{en}} +%% <- 2012/12/25 -> +\newcommand*{\wiktenref}{\wiktionarylangref{en}} +\newcommand*{\Wiktenref}{\@double@first@arg\wiktenref} +\newcommand*{\Wiktref}{\Wiktionarylangref\langcode} +%% 2011/11/23, 2012/01/06, 2012/03/11: +\newcommand*{\wikiquotelangref}[1]{% + \httpbaseref{#1.wikiquote.org/wiki}} +\newcommand*{\Wikquenref}[1]{\wikiquotelangref{en}{#1}{#1}} +%% 2012/11/15: +\newcommand*{\AAOwikiref}{% + \httpbaseref{vps8324694103.serverpool.info/aaowiki}} +%% to do: +\newcommand*{\wormsmusref}{% %% 2011/04/30, 2012/03/11 + \httpbaseref{www.worms.de/deutsch/kultur/museen}} +%% 2011/08/18: +\newcommand*{\facebookpref}{% + \httpref{de-de.facebook.com}{facebook}} +\newcommand*{\wetterwpref}{% +% \hanc{wetter}{\mystrong{Wetter:}} +% \Endash \httpref{www.wetteronline.de/Rheinland-Pfalz/Worms.htm% +% }{\code{www.wetteronline.de}} +% \Endash \httpref{m.wetter.net/1686/Worms}{\code{m.wetter.net}} +% \Endash \httpref{www.wetteronline.de/dldlsat.htm% +% }{Satellitenbild} + \httpref{www.wetteronline.de/Rheinland-Pfalz/Worms.htm}{% + \code{wol} }| + \httpref{m.wetter.net/1686/Worms}{\code{mww} }| + \httpref{www.wetteronline.de/dldlsat.htm}{\code{sat}} +} +%% 2011/08/19: +\newcommand*{\webdesignref}{% + \httpbaseref{www.webdesign-bu.de/uwe_lueck}} +\newcommand*{\webdesignurlref}[1]{% + \webdesignref{#1}% + {\urlfmt{www.webdesign-bu.de/uwe_lueck/#1}}} +%% TeX links: +% \newcommand*{\CPR}{\ctanpkgref} %% 2011/03/15, rm. 2011/11/06 +%% `\ctanpkgstyref' moves to `texlinks.sty' 2012/11/27 +\newcommand*{\THPR}{\texhaxpref} %% 2011/03/15 +\newcommand*{\THpref}[1]{\texhaxpref{#1}{texhax}} %% 2011/03/24 +%% month names move to `texlinks.sty' 2012/10/24 +\newcommand*{\TOPref}[1]{\bytopicref{#1}{JF\##1}} %% 2011/04/22 +% \newcommand*{\todobytopic}[1]{% %% 2011/04/22, rm. 2011/11/08 +% \myalert{\to\ \TOPref{#1}}} +\newcommand*{\UKFAQref}[1]{\ukfaqref{#1}{UK~FAQ}} %% 2011/01/03 +% \useTUGctanbases %% 2012/12/30 rm. 2013/01/19 +\renewcommand*{\ctanpkgauref}{\tugctanpkgauref} %% 2012/12/30 rm. 2013/01/04 +%% SelfHTML: +\newcommand*{\selfhtmlurl}{de.selfhtml.org} +\newcommand*{\selfhtmlref}{\httpbaseref\selfhtmlurl} +\newcommand*{\selfhtmlrefref}[1]{% + \selfhtmlref{/html/referenz/#1.htm}} +\newcommand*{\selfhtmlcsseigref}{% %% 2012/09/23 + \httpbaseref{\selfhtmlurl/css/eigenschaften}} +%% Recht: %% 2013/01/04 +\newcommand*{\dejuresprechref}[3]{% + \httpref{dejure.org/dienste/vernetzung/rechtsprechung/?% + Gericht=#1&Datum=#2&Aktenzeichen=#3}} +\newcommand*{\DJsprechref}[3]{% + \dejuresprechref{#1}{#2}{#3}{#1 v. #2 (#3)}} +%% BlogLIGs moves to `markblog.sty' 2012/11/28 +%% rm. HVspace etc. 2011/10/13 +%% font switching (logical): +% \renewcommand*{\textsf}{% %% 2011/05/12 +% \TagSurr{span}% +% {style="font-size:82\%; +% font-family:sans-serif"}} + %% <- rm. 2011/10/24 +\providecommand*{\file}{\code} %% provide 2011/03/07 +\newenvironment*{itquote}{\quote<i>}{</i>\endquote} +% \newcommand*{\mystrong}{\textcolor{\#aa0000}} +\newcommand*{\mystrong}{\textcolor{\#880000}} + %% <- 2012/12/06 TODO \spanclass +\providecommand*{\myalert}{\textcolor{red}} +% \newcommand*{\myalert}[1]{% +% \textcolor{red}{\ParseLigs{#1}}} %% 2011/12/20 +\newcommand*{\prl}[1]{#1} %% prg lang, corr. 2010/12/15 +\providecommand*{\pkg}{\pkgnamefmt} %% 2011/03/05 +% \renewcommand*{\pkgnamefmt}{\code} %% 2011/10/24 + %% <- for heyctan -> +\let\pkgnamefmt\@firstofone %% 2011/10/24 +\renewcommand*{\urlfmt}{\code} %% 2011/10/24 +\newcommand*{\meta}{\textit} %% 2011/05/16 +% \newcommand*{\acro}[1]{\small#1\endsmall} %% 2011/06/19 +% \newcommand*{\acro}[1]{#1} %% 2011/06/19 + %% <- rm. 2012/01/06 +\providecommand*{\metahttpref}[2]{% %% 2011/10/24 + \httpref{#1}{\meta{#2}}} +% {\catcode`\'\active \gdef\catchsq#1'{\code{#1}}} %% 2012/01/31 + %% <- \end occured when \ifeof on line 24 was incomplete + +%% involving font switching for special purposes: %% 2011/07/25 +\newcommand*{\src}[1]{\STS{sup}{[#1]}} %% 2010/09/12 +\newcommand*{\idx}[1]{% %% 2010/11/23: + \textcolor{green}{\code{\lt#1\gt}}} +% \providecommand*{\cb}[1]{\code{{#1}}} %% 2011/03/13 +\providecommand*{\cb}[1]{\code{\{#1\}}} %% 2012/01/31 +\newcommand*{\itqtd}[1]{\textit{\dqtd{#1}}} %% 2011/05/03 +\newcommand*{\ancstrong}[2]{\hanc{#1}{\strong{#2}}} %% 2011/05/05 +% \newcommand*{\answer}[1]{[\textcolor{\#006600}{#1}]} +\newcommand*{\answer}[1]{\textcolor{\#006600}{[#1]}} %% 2011/07/19 +\newcommand*{\Answer}[1]{\answer{\,#1\,}} %% 2011/08/25 +\newcommand*{\planh}[1]{\answer{#1\,h}} %% 2011/08/18 +\newcommand*{\TODO}{\myalert{\acronym{TODO}}} %% 2011/05/07 2011/12/29 +\newcommand*{\TODOs}{\acronym{TODOs}} %% 2011/12/29 +% \newcommand*{\HTML}{\acronym{HTML}} %% 2011/09/22 +% \newcommand*{\PDF} {\acronym{PDF}} %% 2011/09/22 +% \newcommand*{\CSS} {\acronym{CSS}} %% 2012/01/09 +% \newcommand*{\PHP} {\acronym{PHP}} %% 2012/01/09 +\DoWith\newacronym{HTML}{PDF}{CSS}{PHP} + {WP} %% 2012/10/06 + \StopDoing %% 2012/02/07 + +%% use \ParseLigs -- moves to `blogligs.sty' 2012/11/29 %% corr. 2012/12/21 +%% dashes: +% \newcommand*{\enpardash}{\,\emdash\,} %% 2011/05/12 +%% language-specific appear in `langcode.sty' +%% 2012/09/20 -> \renewcommand +\renewcommand*{\enpardash}{\thinsp\Enpardash} %% 2011/07/28 2012/09/20 +\newcommand*{\Enpardash}{\emdash\thinsp} %% 2011/07/28 +% \newcommand*{\depardash}{~\endash\ } %% 2011/05/12 +\renewcommand*{\depardash}{\ \Endash} %% 2011/07/28 2012/09/20 +\newcommand*{\Endash}{\endash\ } %% starting new line (German) + %% 2011/05/26 +\newcommand*{\enpardashed}[1]{% %% 2011/07/28 + \thinsp\emdash\,#1\,\Enpardash} +\newcommand*{\depardashed}[1]{% %% 2011/07/28 + \ \endash~#1~\Endash} +\def\endashed#1{\endash~#1~\endash} %% 2011/08/20 + +%% language codes move to `langcode.sty' 2012/09/17 +%% %% \catchdq moves to own package 2012/09/17 +\newcommand*{\Euro}{\,\euro} %% mod. 2011/05/25 2011/09/08 +\newcommand*{\degC}{\,\degrees C} %% 2011/09/20 +%% avoiding spaces at code line breaks: +\newcommand*{\bcmt}{<!-- } \newcommand*{\ecmt}{-->} %% 2011/05/02 +\newcommand*{\nix}[1]{} %% join lines without space 2011/07/24 +\newcommand*{\onehtmlline}[1]{#1} %% 2011/08/25 +\newcommand*{\samehtmlline}[1]{\ParseLigs{#1}} %% 2011/12/23 +%% +%% enumeration styles: +% \newenvironment{enumtype}[1]{<ol \@type{#1}}{</ol>} +%% <- moves to blog.sty 2012/12/20 +\newenvironment{enumerate-a}{\enumtype a} %% 2011/08/15 + {\endenumtype} +\newenvironment{enumerate-i}{\enumtype i} %% 2011/08/17 + {\endenumtype} +%% TODO 2012/02/07 for DVI/PDF interface to 'enumerate' +\newenvironment{tightenum} %% 2012/01/07 "tight" 2012/01/08 + {<ol \@style{margin:0px; padding:0px; + margin-left:2em}>} + %% <- TODO mit CSS-inherit auf Eintraege uebertragen? 2012/01/12 + {\endenumerate} + +\newenvironment{done}{<s>}{</s>} %% 2011/08/15 +\newcommand*{\Dots}{~\dots\ } %% 2011/08/24 +%% 2012/04/01 from autrado.fdf (2012/01/23): +\newenvironment*{codelines}{\quote<code>} + {</code>\endquote} +\MakeBlogBeginRun{codelines}{% + \NoBlogLigs %% 2012/01/24 + \MakeActiveOther\"\MakeActiveOther\' %% actcodes 2012/08/28 + \MakeActiveLet\<\lt\MakeActiveLet\>\gt %% actcodes 2012/08/28 + \let\/\\\let\\\BackslashChar} + +%% table rows (before blogexec): %% 2011/09/24 / 2012/02/07 +% \newcommand*{\rowoftwocells}[2]{% +% \starttr +% \simplecell{#1}\simplecell{#2}% +% \endtr} +%% back for ... 2012/07/03: +\newcommand*{\rowofthreecells}[3]{% + \starttr + \simplecell{#1}\simplecell{#2}\simplecell{#3}% + \endtr} +% \newcommand*{\rowoffourcells}[4]{% +% \starttr +% \simplecell{#1}\simplecell{#2}% +% \simplecell{#3}\simplecell{#4}% +% \endtr} +% \newcommand*{\rowoffivecells}[5]{% %% 2011/10/28 +% \starttr +% \simplecell{#1}\simplecell{#2}\simplecell{#3}% +% \simplecell{#4}\simplecell{#5}% +% \endtr} +% \newcommand*{\rowofsixcells}[6]{% %% 2011/10/28 +% \starttr +% \simplecell{#1}\simplecell{#2}\simplecell{#3}% +% \simplecell{#4}\simplecell{#5}\simplecell{#6}% +% \endtr} +% +%% |\begin{stdhiddentablerows}| %% 2012/09/03 +\newenvironment*{stdhiddentablerows} + {\startTable{\@cellpadding\stdcellpadding + \@cellspacing{0px} + \@style{border-collapse:collapse}}% + \startTR} + {\endtablerow\endTable} +\MakeBlogBeginRun{stdhiddentablerows} + {\def\startTR{\tablerow{hidden}}% + \def\cr{\endtr\startTR}} +%% |\begin{stdhiddentable}| %% 2012/05/15 +\newenvironment*{stdhiddentable} +% {\startTable{\@cellpadding\stdcellpadding} +% % \@cellspacing\stdcellspacing} %% 2012/08/28 +% \startTR\StartTd} + {\stdhiddentablerows\StartTd} +% {\endTd\endtablerow\endTable} + {\endTd\endstdhiddentablerows} +%% TODO colgroup alignment +\MakeBlogBeginRun{stdhiddentable}{% + \def\startTR{\tablerow{hidden}}% %% 2012/08/23 + \MakeActiveLet\|\endcell\MakeActiveLet\&\figurespace} %% actcodes 2012/08/28 +% \newcommand*{\stdcellspacing}{6} %% undone 2012/08/29 +%% +% %% |\begin{stdallrulestable*}| %% 2012/06/05 +% %% doesn't work with Firefox, +% %% w3schools.com/tags/att_col_align.asp; +% %% CSS seems to support +% %% alignment attributes for single cells only. +% \newenvironment{stdallrulestable*}[1]{% +% %% TODO what is shared with {stdallrulestable} +% \startTable{\@cellpadding{\stdcellpadding} \@width{} +% \@frame@box\ rules="all"}\CLBrk %% \ 2011/10/12 +% \ \STS{colgroup}{\DoWith\ColAlign#1\StopDoing}\CLBrk +% \ \tbody\CLBrk +% \TableRow{standard all-rules table}% +% {\@bgcolor{\stdtableheadcolor} +% \@style{\stdtableheadstyle}}\CLBrk +% \indentii\StartTd +% } +% {\endstdallrulestable} +% % {\endtbody\endTable} +% \newcommand*{\ColAlign}[1]{% +% \CLBrk\indenti<col \csname @align@#1\endcsname>} +% \MakeBlogBeginRun{stdallrulestable*}{% +% \MakeActiveDef\|{\endcell}\MakeActiveDef\&{\figurespace}} +% %% <- TODO or copy ntok(blogx.bstdallrulestable) +% +\newcommand*{\UseTabFigspVert}{% %% 2012/07/22 + \MakeActiveLet\&\figurespace\MakeActiveLet\|\endcell} %% actcodes 2012/08/28 +%% |\crspan{<cols>}| %% 2012/06/07 +\newcommand*{\crspan}[1]{% + \endTd\endtr\starttr\startTd{\@colspan{#1}}} +%% 2012/06/12: +%% |\Crspan{<total-cols>}{<cols>}| +\newcommand*{\Crspan}[2]{% + \endTd\endtr\starttr\fillrow{#1}\crspan{#2}} +%% table cell borders 2012/09/02 +\newcommand*{\cellborderthickness}{1px} +\newcommand*{\edge@csname}{\csname edge@} +% \edef\edge@csname{% +% \noexpand\csname\noexpand\expandafter +% \noexpand\StripEsc\withcsname\noexpand edge@\endcsname} +% \show\edge@csname +%% <- TODO save a lot of HTML/CSS code! +\def\do#1{\withcsname\def edge@#1\endcsname} +\do{b}{bottom} \do{l}{left} \do{r}{right} \do{t}{top} +% \withcsname\show edge@b\endcsname +\newcommand*{\border@edge}[1]{% + border-\edge@csname#1\endcsname-width:\cellborderthickness; + border-\edge@csname#1\endcsname-style:solid;} +\newcommand*{\stylecell}[2]{\startTd{\@style{#1}}#2\endTd} +\newcommand*{\edgeborderedcell}[1]{\stylecell{\border@edge#1}} +\newcommand*{\cornerborderedcell}[1]{\stylecell{\border@corner#1}} +\newcommand*{\border@corner}[2]{\border@edge#1\border@edge#2} +\newcommand*{\borderedcell}[1]{\csname edges@#1\endcsname} +\def\do#1{\withcsname\def edges@#1\endcsname} +\do b{\edgeborderedcell b} +\do l{\edgeborderedcell l} +\do r{\edgeborderedcell r} +\do t{\edgeborderedcell t} +%% TODO save more tokens?: +\do{bl}{\cornerborderedcell{bl}} +\do{br}{\cornerborderedcell{br}} +\do{lt}{\cornerborderedcell{lt}} +\do{rt}{\cornerborderedcell{rt}} +% \withcsname\show edges@rt\endcsname +\do{}{\simplecell} %% 2012/09/03 +%% +% %% Another try at `\HVspace' with ... %% 2011/11/10 +%% VERGEBLICH %% 2011/11/12 +% \let\HVSP\HVspace %% 2011/11/11 +% \renewcommand*{\HVspace}[3]{% +% % \TagSurr{div}{\@width{#2} \@height{#3}}{#1}} %% zu flach +% \TagSurr{div}{\@width{#2} \@height{#3}}{% +% \HVSP{#1}{#2}{#3}}} %% 2011/11/11 +% % \SimpleTagSurr{div}{\HVSP{#1}{#2}{#3}}} +% %% % Seiten zu kurz ... + +%% |\cheading{<digit>}{<text>}| as in 'blogdot.sty' %% 2012/05/15 +%% (TODO may crash with 'fifinddo-info'): +\providecommand*{\cheading}[1]{\CLBrk\TagSurr{h#1}{\@align@c}} +%% |\begin{centerpar}| %% 2012/05/15 +% \newenvironment*{centerpar}{<p \@align@c>}{</p>} +%% ... fails with tables in `texmap' ... TODO 2012/09/06 +%% |\imagesource{<graphic-file>}|: %% 2012/09/07 +\newcommand*{\imagesource}[1]{<img src="#1">} +\newcommand*{\deflag}{\imagesource{flag_de.gif}} %% 2012/09/08 +\newcommand*{\ukflag}{\imagesource{flag_uk.gif}} %% 2012/09/08 +%% 2012/09/26: +\newcommand*{\wikilangflagref}[3]{% + \wikilangref{#1}{#3}{\imagesource{flag_#2.gif}}} +\newcommand*{\wikideflagref}{\wikilangflagref{de}{de}} +\newcommand*{\wikienflagref}{\wikilangflagref{en}{uk}} +%% 2012/10/04: +\newcommand*{\wikideenflagref}[2]{% + \wikideflagref{#1}~\wikienflagref{#2}} +\newcommand*{\wikidebookref}{\wikilangbooksref{de}} +\newcommand*{\wikienbookref}{\wikilangbooksref{en}} +\newcommand*{\wikideenbookref}[2]{% + \wikidebookref{#1}{\deflag}~\wikienbookref{#2}{\ukflag}} +\renewcommand*{\acro}{\SimpleTagSurr{abbr}} %% 2012/09/18 +%% +\endinput diff --git a/macros/latex/contrib/morehype/use/texlinks.sty b/macros/latex/contrib/morehype/use/texlinks.sty new file mode 100644 index 0000000000..49469b247a --- /dev/null +++ b/macros/latex/contrib/morehype/use/texlinks.sty @@ -0,0 +1,1554 @@ +\NeedsTeXFormat{LaTeX2e}[1994/12/01] %% \newcommand* etc. +\ProvidesPackage{texlinks}[2015/07/20 v0.83 TeX-related links (UL)] +%% copyright (C) 2011 2012 2013 2015 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 +%% +%% === \cs{newlet} === %% 2013/01/21 +%% |\newlet<cmd><cnd>| is a guarded `\let': +\providecommand*{\newlet}[2]{\@ifdefinable#1{\let#1#2}} +%% +%% == Links in General == %% 2012/12/15 +%% === Outline === +%% % Almost %% 2011/07/23 +%% % all the %% including https 2011/08/27 +%% The link macros of 'texlinks' are based on macros +%% |\httpref| and |\httpsref|. For use of 'texlinks' with 'blog.sty', +%% the latter provides definitions of `\httpref' and `\httpsref' +%% suitable for \HTML, where a choice of opening a new +%% tab or window---or not---is relevant. +%% +%% For use with 'hyperref' (or ...?), 'texlinks' may +%% provide definitions of `\httpref' and `\httpsref' +%% based on `\href'. The decision to do so or not may happen at +%% `\begin{document}'. 'blog.sty' generates \HTML\ without +%% using the `{document}' environment, so we might assume +%% that when `\begin{document}' is found, we are running +%% 'hyperref', or just \emph{something} that provides a +%% useful `\href'. We might then execute a definition of +%% `\httpref' in terms of `\href'. Well, not sure ... +%% +%% Moreover, a \acro{PDF} file with links may be \emph{printed}, +%% and klicking the links on the paper may fail. +%% \URL s in main text, on the other hand, sometimes are +%% troublesome. I consider it a good idea to present +%% links with their \URL\ as the displayed text in \emph{footnotes} +%% (or endnotes). It may even be useful with \HTML\ to present +%% the \URL s displayed in some +%% %% 2011/01/27: %% rm. 2011/10/20 +%% ``appendix."---This idea has been resumed in v0.2 only, |\urlfoot| +%% (\secref{urlfoot}). %% 2012/12/15 +%% % +%% % I tend to introduce something for this ... and there might be a +%% % package option forcing `\httpref' to use this style. +%% % Well, better \emph{not today} ... [2011/01/24, TODO] +%% +%% === Package Options === +%% \label{sec:opt} %% 2013/01/21 +%% Somebody may want to suppress a definition of `\httpref' +%% at `\begin{document}' ... [2011/01/24, TODO] +%% %% 2011/02/10: +%% +%% v0.3: Package option |[blog]| suppresses \emph{any} +%% `\AtBeginDocument' actions---fine for use with 'blog.sty'. +\DeclareOption{blog}{\let\AtBeginDocument\@gobble} +%% This option may be improved, and another option may be +%% useful for different purposes than running 'blog.sty'. +\ProcessOptions +%% +%% === Obvious Shorthands === +%% |\htm|, |\html|, and |\pdf| for typical filename extensions +%% save a few tokens in macro definitions (v0.83): +\newcommand*{\htm}{.htm} +\newcommand*{\html}{\htm l} %% 2012/12/08 below previously +\newcommand*{\pdf}{.pdf} +%% |\DoubleArg{<cmd-maybe-args>}{<arg>}| (v0.83) works like +%% \[`<cmd-maybe-args>{<arg>}{<arg>}'\] +%% It replaces `\@double@first@arg' from v0.8; +%% it may also be useful as a user command. +%% It differs from \LaTeX's `\@dblarg' that adds +%% a missing optional argument: +\newcommand*{\DoubleArg}[2]{#1{#2}{#2}} +%% +%% === Formatting \URL s and File/Package Names === +%% %% <- was "Fonts for" 2013/02/20 +%% \label{sec:fonts} %% 2012/12/19 +%% %% ** Fonts for \URL s, File Names, and Package Names ** +%% %% new 2011/10/19, TODO: `meansltx'? vgl. `makedoc.cfg' +%% This section ``provides" markup for displaying \URL s (|\urlfmt|), +%% file names (|\filenamefmt|---thinking of single files +%% that may be found in the internet or on your computer---, +%% and ``packages" (|\pkgnamefmt|). +%% For the latter two, in certain files I use shorthands +%% |\file| and |\pkg|, resp., ... +%% `\providecommand' will be used so that the user may choose %% 2012/12/28 +%% the style before loading 'texlinks'. +%% (Once I may provide a variant of `\providecommand' %% 2012/12/28 +%% that postpones the ``provision" to the ``beginning" of the +%% ``document", even with 'blog.sty' TODO) +%% +%% It is usual to use +%% the same font as with %% 2012/12/28 +%% `\texttt' for formatting \TeX\ code +%% (``verbatim", `\verb' etc.). It may also be common to use +%% `\texttt' for file names, perhaps even for \URL s. +%% Therefore we provide |\urlfmt{<url>}| as follows: +\providecommand*{\urlfmt}{\texttt} +%% The user may (later) choose a more advanced treatment by +%% loading \ctanpkgstyref{url} and +%% \[`\renewcommand{\urlfmt}{\url}'\] +%% +%% The file name format |\filenamefmt{<file-name>}| +%% may differ from the format for \URL s---if somebody +%% wants/adjusts it, \emph{here} it is the \emph{same:} +\providecommand*{\filenamefmt}{\texttt} +%% ... +%% I favor `\code' over `\texttt' as ``logical markup," +%% inspired by the \xmltagcode{code} element in \HTML, +%% but it is too difficult to provide this right now here ... +%% +%% (TODO 2012/12/29: This section seems to be relevant for +%% \secref{url-text} only and might move there.) +%% +%% %% Instead of |\pkgnamefmt{<pack-name>}|, +%% %% 'blog.sty' had `\pkg{<pack-name>}', %% was `prg' 2011/10/20 +%% %% without a proper implementation. +%% |\pkgnamefmt{<package-name>}| displays the name of a ``package". +%% Using `\textsf' for `\pkgnamefmt' +%% seems to conform to common practice today---implemented here. +%% The following code may later be suppressed at some package options, +%% as with the choice for `\httpref': %% TODO 2011/01/24 +% \@ifdefinable\pkgnamefmt {\let\pkgnamefmt\@firstofone} +% \AtBeginDocument {\let\pkgnamefmt\textsf} +%% <- This was here until v0.7, makes a difference for \acro{PDF} +%% vs.\ 'blog'/\HTML. %% / 2012/12/28 +%% [Cf.~\secref{opt}!? TODO]---%% 2013/01/21 +%% Now we choose the same as with `\urlfmt': +\providecommand*{\pkgnamefmt}{\textsf} +%% Indeed, the same day we are providing `\textsf' in 'blog.sty'. +%% However, the rationale of the earlier solution was +%% that web pages use sans-serif as the \emph{normal} font ... +%% +%% %% moving \httpsref 2011/08/27: +%% === Providing &\httpref\ and &\httpsref === +%% %% rm. \kern-\baselineskip 2011/10/10 +%% \[|\httpref{<host-path[#frag]>}{<text>}|\] +%% should display <text> +%% as a link to `http://<host-path[#frag]>'; +%% \[|\httpsref{<host-path[#frag]>}{<text>}|\] +%% is the obvious analogue for `https:' \URL s. +%% In case `\begin{document}' is found with a definition of +%% `\href' present, we provide definitions of `\httpref' +%% and `\httpsref' in terms of `\href' there: +\AtBeginDocument{% + \@ifundefined{href}{% +% \PackageError ... TODO!? 2011/01/24 + }{\newcommand*{\httpref} [1]{\href {http://#1}}% + \newcommand*{\httpsref}[1]{\href{https://#1}}}} +%% +%% === Variants of &\httpref\ and &\httpsref === +%% |\NormalHTTPref| may be used as an alias for `\httpref' +%% in situations where the latter has been redefined %% v0.2 +%% (as in \secref{urlfoot}): +\AtBeginDocument{\newlet\NormalHTTPref\httpref} %% TODO: sec:opt +%% |\ithttpref{<url>}{<text>}| displays <text> in italics: +% \newcommand*{\ithttpref}[2]{\NormalHTTPref{#1}{\textit{#2}}} +%% However, I seem never to have used it. And I would now +%% prefer |\metahttpref| TODO ... +%% +%% ==== Protocol Prefix ==== %% 2012/12/15 +%% |\httpprefix| is an idea that was missing in 'blog.sty' up to v0.3. +%% It may be used to determine generally whether a display of an +%% \URL\ should include `http://'. I choose as default what was default +%% in 'blog.sty' +%% (i.e., ``don't include"): %% add. 2011/01/27 +\newlet\httpprefix\@empty %% \newlet 2015/05/25 +%% `\let\httpprefix\relax' would be bad for 'blog.sty' +%% (would display `\relax'), +%% while it would be somewhat more efficient.%%%---%%% +%% +%% Now you may customize `\httpprefix' by +%% \[`\renewcommand{\httpprefix}{http://}'\] +%% %% v0.2: +%% ---or by `\let\httpprefix'|\theHTTPprefix|: +\newcommand*{\theHTTPprefix}{http://} +%% With |\urlhttpsref{<url>}|, we \emph{force} displaying \qtd{`https://'}: +\newcommand*{\urlhttpsref}[1]{\httpsref{#1}{\urlfmt{https://#1}}} +%% +%% ==== The \URL\ (or a Part) as the Link Text Phrase ==== %% (...) 2012/12/28 +%% \label{sec:url-text} +%% With |\urlhttpref{<url>}|, that \URL\ <url> is displayed: +\newcommand*{\urlhttpref}[1]{% + \NormalHTTPref{#1}{\urlfmt{\httpprefix#1}}} +%% %% moved up here 2011/10/20 +%% In 'blog.sty' (as of 2010/05/26), there was a command +%% `\urlref' instead of `\urlhttpref'. It did not provide `\urlfmt'. +%% +%% |\domainref{<domain>}{<path>}| is similar, but is intended +%% to show the domain part <domain> of the \URL\ +%% `<domain>/<path>' only. +%% This may be useful when the entire \URL\ does not look +%% nice, while the domain name is a kind of logo, +%% and when comparing what different web portals have +%% to say about the same matter, such as the web versions +%% of newspapers or magazines. So you may compare how +%% %% v0.83 new example, \tugctanorg gone: +%% % \domainref{www.ctan.org}{pkg/morehype} and +%% % \domainref {\tugctanorg}{pkg/morehype} inform about %% \tugc... 2012/12/29 +%% % the 'morehype' bundle (v0.8). +%% \domainref{www.ctan.org}{tex-archive/macros} and +%% \domainref{tug.ctan.org}{tex-archive/macros} +%% display the top-level `macros' directory of the \TeX\ archive. +%% % The command is also used in \secref{wiki-stack} +%% % for `tex.stackexchange.com'. %% why? rm. 2015/05/24 -- see below +%% %% texblog 2012/06/08; v0.8 here +\newcommand*{\domainref}[2]{\httpref{#1/#2}{\urlfmt{#1}}} +%% Note that on some domains +%% only domain, an article \acro{ID} and maybe the `.html' +%% suffix and/or a ``category" between domain and \acro{ID} +%% is required for a working \URL, as opposed to an \URL +%% that is displayed in the browser's address line +%% and contains a kind of transcription of the article's title---e.g., +%% \urlhttpref{tex.stackexchange.com/questions/84878}. +%% +%% v0.83 adds \ |\prefixref{<prefix>}{<suffix>}{<text>}| \ +%% just as an alias for `\domainref' because the same function +%% may be useful in some cases when `<domain>/<path>', +%% for some code strings <prefix> and <suffix>, +%% is the same as `<prefix><suffix>' and `<prefix>' +%% for some <category>, +%% is the same as `<domain>/<category>': +\newlet\prefixref\domainref +%% Then you may compair how +%% \[\prefixref{www.ctan.org/tex-archive}{macros}\] +%% and \[\prefixref{tug.ctan.org/tex-archive}{macros}\] +%% display the `generic' subdirectory of the `macros' directory. +%% +%% ==== Linking \URL s in Footnotes ==== %% 2011/08/27 +%% \label{sec:urlfoot} +%% |\foothttpurlref{<url>}| just is like +%% `\footnote{\urlhttpref{<url>}}': +\newcommand*{\foothttpurlref}[1]{\footnote{\urlhttpref{#1}}} +%% |\urlfoot{<short>}{<id>}| +%% redefines `\httpref' so that you can use all the shorthand +%% macros based on `\httpref' to get the according \URL\ +%% display (as provided by `\urlhttpref') +%% in a footnote without the need to include the +%% entire \URL\ in your source code. `\urlfoot' is available +%% with <short> and <id> +%% when a shorthand |\<short>{<id>}{<text>}| has been defined +%% where `\<short>' is the macro name and <id> is the target +%% identifier (usually part of the \URL\ generated from <id>) +%% according to the syntax declaration of `\<short>'. +\newcommand*{\urlfoot}[2]{{% + \let\httpref\foothttpurlref + \let\httpprefix\theHTTPprefix %% TODO customizable!? + \csname #1\endcsname{#2}{}}} +%% \begin{example}\leavevmode +%% \[`\CtanPkgRef{morehype}{MoreHype}' +%% \mbox{\quad and\quad } `\ctanpkgref{morehype}'\] +%% are provided in \secref{sing-pkgs} for linking to +%% `http://ctan.org/pkg/morehype'. +%% \begin{itemize} +%% \item +%% % Try `CtanPkgRef' \emph{here}: +%% % \CtanPkgRef{morehype}{MoreHype},\\ +%% % for the \emph{footnote} try +%% % `\urlfoot{CtanPkgRef}{morehype}';%%% +%% % \urlfoot{CtanPkgRef}{morehype} +%% \simpleyields{\CtanPkgRef{morehype}{MoreHype}} %% etc. 2012/12/30 +%% \item +%% \simplecodefbox{\urlfoot{CtanPkgRef}{morehype}} +%% yields \urlfoot{CtanPkgRef}{morehype} +%% \item +%% % try `ctanpkgref' \emph{here}: \ctanpkgref{morehype},\\ +%% \simpleyields{\ctanpkgref{morehype}} +%% \item +%% % for the \emph{footnote} try +%% % `\urlfoot{ctanpkgref}{morehype}'.%%% +%% % \urlfoot{ctanpkgref}{morehype} +%% \simplecodefbox{\urlfoot{ctanpkgref}{morehype}} +%% yields \urlfoot{ctanpkgref}{morehype} +%% \end{itemize} +%% The lonely \qtd{\pkgnamefmt{morehype}} you see there above +%% demonstrates that it doesn't work with `ctanpkgref' because +%% `\ctanpkgref' doesn't have separate arguments for +%% <id> and <text>, it actually doubles <id>. +%% A local `\let\ctanpkgref\CtanPkgRef' could help, +%% but right now I prefer waiting for a better idea. +%% [TODO] %% 2011/01/27 +%% \end{example} +%% +%% v0.3: Now that using `\urlfoot' and `ctanpkgref' together +%% is so clumsy, while I use it quite often, %% 2011/02/10 +%% we get |\urlpkgfoot{<package-id>}|, abbreviating +%% `\urlfoot{CtanPkgRef}{<package-id>}': +\newcommand* {\urlpkgfoot} {\urlfoot{CtanPkgRef}} +%% ==== \URL\ Bases ==== %% 2012/03/09 +%% \label{sec:bases} +%% We typically refer to many web pages under a certain domain, +%% or in certain subdirectories there. Before v0.6, +%% I made many definitions like +%% \[`\newcommand*{\myref}[1]{\httpref{<my-base>/#1}}'\] +%% for this purpose. +%% Storing the definition of such a `\myref' uses 8 tokens +%% %% including parameter ... %% todo done 2012/12/17 +%% in addition to those from <my-base>. +%% With +%% \[`\newcommand*{\myref}{\httpbaseref{<my-base>}}'\] %% } 2012/12/17 +%% we need 5 %% was 3 2012/12/17 +%% tokens instead, using \ |\httpbaseref{<base>}{<rest>}{<text>}| \ +%% %% <- added text 2013/01/21 +%% defined as follows: +\newcommand*{\httpbaseref}[2]{\httpref{#1/#2}} +%% Then `\myref{<rest>}{<text>}' will work like %% 2013/01/21 +%% \[`\httpref{<my-base>/<rest>}{<text>}'\] +%% We change many definitions in ensuing sections accordingly---and +%% with v0.82 we add a shorthand for definitions like the avove one +%% for `\myref'. \[|\MakeBasedHref{<cmd>}{<base>}|\] may be applied +%% as \[`\MakeBasedHref{\myref}{<my-base>}'\] above. In the general +%% situation, `<cmd>{<path>}{<text>}' will work like +%% \[`\httpref{<base>/<path>}{<text>}'\] %% own line 2015/03/27 +%% v0.83 extends this to `https' +%% (has been tested in `texblog.fdf' for more than a year): +\newcommand*{\httpsbaseref}[2]{\httpsref{#1/#2}} %% 2014/03/21 +%% provides |\httpsbaseref{<base>}{<rest>}{<text>}|. +\newcommand*{\MakeBasedHref}[3][http]{% %% 2014/03/21 + \ifx#2\@undefined \else \ifx#2\relax %% was \ifx#1 2014/12/23 + \PackageWarning{texlinks}{Redefining \string#2.}% + \fi \fi + \expandafter\def\expandafter#2\expandafter{% +%% ... or `\DefExpandStart' from \ctanpkgstyref{dowith} TODO ... + \csname#1baseref\endcsname{#3}}% +} +%% This also provides an optional argument for choosing `https' +%% instead of `http': +%% \[|\MakeBasedHref[https]{<cmd>}{<base>}|\] +%% Now `\newcommand*{\mysecureref}{\httpsbaseref{<my-secure-base>}}' +%% may be replaced by +%% \[`\MakeBasedHref{\mysecureref}{<my-base>}'\] -- +%% However, `\MakeBasedHref' does not act like `\newcommand' +%% when <cmd> has been defined earlier, it rather resembles +%% `\DeclareRobustCommand', in that it just \emph{warns} in such a case. +%% I don't actually make <cmd> robust because I guess it is anyway: +%% The reason for allowing redefinitions has been application +%% to cases where the user should be able to customize commands +%% (\secref{custom-ref})---well, +%% I could have `\NewBasedHref' and `\RenewBasedHref' some time +%% TODO\footnote{And for sections \ref{sec:wiki-back} and +%% \ref{sec:wikibooks}, an optional argument +%% would have been nice.}; +%% TODO: `\@onlypreamble'? +%% +%% The situation is similar with (many) anchors of a (large) web page. +%% With v0.6, we introduce +%% \[|\httpancref{<page-url>}{<anchor>}|\]---\emph{perhaps}, +%% with `\mirrorctanref' (\secref{texcat}) etc.? TODO +% \newcommand*{\httpancref}[2]{\httpref{#1\##2}} +%% +%% +%% == Google == %% 2012/12/17 +%% |\googleref{<keywords>}{<text>}| \ generates a \Wikiref{Google} +%% search page with keywords from <keywords> in which they +%% are separated by \qtdcode{+}, as in +%% \[`\googleref{tex+friends}{\TeX~\& friends}'\] +%% which results in (I'm curious ...) +%% \googleref{tex+friends}{\TeX~\& friends:} +\newcommand*{\googlecom}{google.com/} +% \newcommand*{\googleref}[1]{\httpref{\googlecom\#q=#1}} +%% ... correct link has been very different since 2012: %% 2014/05/25 +\newcommand*{\googleref}[1]{\httpref{\googlecom/search?q=#1}} +%% |\googlemapsref{<keywords>}{<text>}| \ generates a +%% \wikiref{Google Maps}{Google map} from the <keywords>. +%% <keywords> may compose an address for a \TeX\ users' meeting, +%% so Google may show them their way. +%% \[<keywords>=\mbox{\qtdcode{munich+offenbachstrasse+21}}\] +%% results in \googlemapsref{munich+offenbachstrasse+21} +%% {where this has been written.} +\newcommand*{\googlemapsref}[1]{\httpref{maps.\googlecom maps?q=#1}} +%% +%% == Wikipedia == +%% === Overview === +%% \label{sec:wiki-stack} +%% The present section on links to Wikipedia articles +%% starts with the rather obvious +%% \[|\wikilangref{<language-code>}{<lemma>}{<text>}|\] +%% but then gets somewhat technical. \secref{langcode} +%% may please the user again by +%% \[|\Wikiref{<lemma>}|\] +%% where the language version of the Wikipedia is chosen +%% according to a macro `\langcode' expanding to \qtdcode{en} +%% by default. On +%% \domainref{tex.stackexchange.com}{/questions/84878}, +%% I have posted the following ``minimal working example:" +%% \begin{verbatim} +%% \documentclass{minimal} +%% \usepackage{hyperref,texlinks} +%% \begin{document} +%% Look up \wikiref{Charlie Bucket}{Wikipedia} +%% for \Wikiref{Charlie Bucket}. +%% \end{document} +%% \end{verbatim} +%% You may find it as `wiki_mwe.tex' with outcome `wiki_mwe.pdf'. +%% See \secref{langcode} for more examples. %% 2012/12/30 +%% +%% Apart from `\langcode', more advanced things are +%% \emph{disambiguation} (\secref{wiki-back}), +%% ``piped links" (\secref{wiki-pipe}), and +%% special characters in \URL s (\secref{wiki-urls}). +%% +%% %% 2015/05/19: +%% Starting in spring 2015, the 'morehype' bundle offers +%% an additional package 'wikimed.sty' that includes +%% Wikipedias ``sister projects" like Wiktionary and +%% provides a variant of \wikienref{URL encoding}{\URL\ encoding}, +%% converting punctuation and things like umlauts for valid \URL s. +%% +%% === Backbones === +%% \label{sec:wiki-back} +%% As of v0.6, we have a \dqtd{backbone} macro +%% \[|\wikilangref{<language-code>}{<lemma>}{<text>}|\] +%% for links to Wikipedia. +%% (It was |\wikiref| before, starting with v0.4---sorry!) +%% <language-code> consists of +%% two characters like \lq`de'\rq\ for German Wikipedia articles +%% or \lq`en'\rq\ for English ones. <lemma> is the identifier of +%% the article, and <text> is displayed as the link: +% \newcommand*{\wikilangref}[2]{\httpref{#1.wikipedia.org/wiki/#2}} +%% <- 2012/03/09 etc. with \secref{bases} -> +\newcommand*{\wikilangref}[1]{\httpbaseref{#1.wikipedia.org/wiki}} +%% There is |\Wikilangref{<language-code>}{<lemma>}| +%% for the case that <lemma> and <text> are the same. +%% With v0.7 however, this command becomes more powerful, +%% see \secref{wiki-pipe}. +% \newcommand*{\Wikilangref}[2]{\wikilangref{#1}{#2}{#2}} +%% `\wikilangref{<lang>}[<lemma>]{<text>}' would be nicer; +%% %% <- shortened 2012/01/06 -> +%% however, the present code is to work with 'blog.sty' +%% which does not support optional arguments.%%%--- +%% +%% Quite often, programs share their names with movies, +%% biological species, etc., then lemma disambiguation is required. +%% Usually, we don't want to display the disambiguation. +%% \[|\Wikilangdisambref{<language-code>}{<term>}{<tag>}|\] +%% will link to +%% \[`http://<language-code>.wikipedia.org/wiki/<term>_(<tag>)'\] +\newcommand*{\Wikilangdisambref}[3]{\wikilangref{#1}{#2 (#3)}{#2}} +%% There %% was `Their' 2011/07/23 +%% was something like a more general variant |\wikidisambref|, +%% now I doubt its usefulness and \textcolor{blue}{omit} it +%% in order to see where it occurs (2011/05/13). +%% +%% For \strong{anchors}, \qtd{&#} can be used with 'blog.sty'---and +%% even with 'hyperref'. +%% \simpleexample{\wikilangref{en}{TeX#History}{history}} +%% +%% === Piped Links === +%% \label{sec:wiki-pipe} +%% v0.7 emulates Wikipedia's +%% \wikiref{Help:Links\#Piped_link}{piped links} %% was "Piped links" 2012/12/01 +%% as with Wikipedia source code \[`[[Pipeline|Pipe]]'\] +%% to get a link to article \qtd{\Wikiref{Pipeline}} %% \Wikiref 2012/12/01 +%% with displayed text +%% \qtd{\wikiref{Pipeline}{Pipe}}. The same syntax +%% (double brackets) is actually supported by +%% 'blog.sty' with 'markblog.sty', %% was `blogexec' 2012/12/06 +%% while otherwise only +%% \[\GenCmdBox+\Wikilangref{<language-code>}{<lemma>|<text>}+\] +%% works---with settings more below something like +%% \GenCmdBox+\Wikiref{<lemma>|<text>}+---which +%% admittedly is not much better than the equivalent +%% \[`\wikiref{<lemma>}{<text>}'\] +%% +%% Even Wikipedia's feature that empty <text> removes +%% the disambiguation term as with `[[Pipe (computing)|]]' +%% resulting in \qtd{\wikiref{Pipe (computing)}{Pipe}} +%% is supported. +\newcommand*{\Wikilangref}[2]{% + \@wikilpref{#1}#2\BiteSep|\@nnil\BiteSep\@nil{#2}} +%% I have introduced `\BiteSep' and this kind of parsing +%% in the \ctanpkgdref{bitelist} package. +\def\@wikilpref#1#2|#3\BiteSep#4\@nil#5{% + \ifx\@nnil#3\@empty + \wikilangref{#1}{#5}{#5}% + \else + \wikilangref{#1}{#2}{% + \ifx\@three#3\@three + \wiki@noparen#2\@nil% + \else + #3% + \fi}% + \fi} +\def\wiki@noparen#1 (#2\@nil{#1} +%% (Removing 'bitelist' considerations 2015/05/22 ... +%% % I have thought about improving 'bitelist.sty', resulting +%% % in the following code. In the present application, +%% % I do not consider it superior. It uses +%% % the same number of tokens but new one has additional +%% % expansion step. The situation is different to the general case +%% % because doing everything before `\fi' is okay here. +%% % \newcommand*{\Wikilangref}[2]{% +%% % \@wikilPref{#1}#2\BiteSep\@secondoftwo +%% % |\BiteSep\@firstoftwo\@nil{#2}} +%% % \def\@wikilPref#1#2|#3\BiteSep#4#5\@nil#6{% +%% % #4{\wikilangref{#1}{#6}{#6}}% +%% % {\wikilangref{#1}{#2}{% +%% % \ifx\@three#3\@three +%% % \wiki@noparen#2\@nil% +%% % \else +%% % #3% +%% % \fi}}} +%% +%% === English and German === +%% The next macros just save you from typing braces around +%% the language codes for English and German: +%% |\wikienref{<lemma>}{<text>}| refers to the English Wikipedia, +%% |\wikideref{<lemma>}{<text>}| refers to the German one. +\newcommand*{\wikideref}{\wikilangref{de}} +\newcommand*{\wikienref}{\wikilangref{en}} +%% |\Wikideref{<lemma>}| refers to article <lemma> in the German +%% Wikipedia and displays <lemma> as <text>: +\newcommand*{\Wikideref}{\Wikilangref{de}} +%% |\Wikienref{<lemma>}| is `\Wikideref''s analogue for English: +\newcommand*{\Wikienref}{\Wikilangref{en}} +%% |\Wikidedisambref{<lemma>}{<tag>}| chooses a disambiguation +%% according to <tag> for the German Wikipedia, +%% |\Wikiendisambref{<lemma>}{<tag>}| for the English one: +\newcommand*{\Wikidedisambref}{\Wikilangdisambref{de}} +\newcommand*{\Wikiendisambref}{\Wikilangdisambref{en}} +%% +%% === ``Implicit" Choice of Language === %% 2012/01/06 +%% \label{sec:langcode} +%% With v0.6, |\wikiref{<lemma>}{<text>}| works like +%% \[`\wikilangref{<lc>}{<lemma>}{<text>}'\] %% ref 2012/10/24 +%% when |\langcode| expands to <lc> +%% (the two-letter language code according to \Wikiref{ISO 639-1}). +%% The default for <lc> is \qtdcode{en} for English. +%% It can be overridden even before loading 'texlinks' +%% (e.g., by an earlier `\newcommand\langcode{de}'): +\providecommand*{\langcode}{en} +%% %% mod. 2012/10/24: +%% For the German versions, use \ `\renewcommand{\langcode}{de}'. \ +%% The \ctanpkgref{langcode} package provides a command \ +%% |\uselangcode{<lc>}| \ that works like +%% \ `\renewcommand*{\langcode}{<lc>}' \ +%% and adjusts a number of other settings. +\newcommand*{\wikiref}{\wikilangref\langcode} +%% %% adding args 2012/12/17: +%% |\Wikiref{<lemma>}| and |\Wikidisambref{<term>}{<add>}| %% second \ 2012/12/29 +%% are the obvious analogues (cf. \secref{wiki-back}): +\newcommand*{\Wikiref}{\Wikilangref\langcode} +\newcommand*{\Wikidisambref}{\Wikilangdisambref\langcode} +%% \begin{simpleexamples} +%% \simpleexample{\Wikiref{LaTeX}} +%% \simpleexample{\wikiref{LaTeX}{&\LaTeX}} +%% \simpleexample{\Wikidisambref{Latex}{disambiguation}} +%% \end{simpleexamples} +%% +%% === Blanks and Umlauts in \URL s and Anchors === +%% \label{sec:wiki-urls} +%% %% <- renamed 2011/05/17 reworked: +%% |\underscorechar| seemed to be useful in macro +%% definitions. The name was inspired by \LaTeX's +%% `\@backslashchar' and `\@percentchar'. +%% However, I am now trying what happens without it. +%% It occurred in `blog.tex' for the documentation of +%% the 'blog' package, but `\string_' seems to be a good +%% replacement. +% \newcommand \underscorechar {} +% {\@makeother\_ \gdef\underscorechar{_}} +%% Anyway, in my notes I have a more elegant macro for +%% providing ``other" versions of special characters. +%% +%% Guessing what `\underscorechar' was good for (2011-05-17): +%% Wikipedia lemmas and anchors often or even \emph{typically} +%% contain \emph{blank spaces}. +%% The Wikipedia software usually converts them into +%% underscore characters. Blank spaces in \emph{lemmas} +%% seem \emph{not} to need treatment here in 'texlinks'. +%% However, Wikipedia also creates \emph{anchors} from +%% \emph{section headings}, which typically contain blank spaces. +%% This has been more difficult ... +%% +%% Likewise with umlauts: text encoding suffices for \emph{lemmas} +%% (my `\urluml' is not needed for this purpose). +%% But umlauts in \emph{anchors} +%% generated from \emph{section headings} are different. +%% While umlauts in \emph{lemmas} are represented by sequences +%% starting with a \emph{percent} character, the anchors +%% use a \emph{dot} instead of the percent character. +%% Therefore now |\ancuml{<char>}| is provided: +\newcommand*{\ancuml}[1]{\csname ancuml:#1\endcsname} +\@namedef{ancuml:a}{.C3.A4} +\@namedef{ancuml:o}{.C3.B6} +\@namedef{ancuml:u}{.C3.BC} +\@namedef{ancuml:s}{.C3.9F} +%% %% comments removed 2012/01/11: +%% % What you read in the rest of the section is +%% % \textcolor{blue}{wrong}, the commands are +%% % \textcolor{blue}{dropped} for testing as of 2011/05/13. +%% % |\itwikideref| is an italic variant of `\wikideref': +% \newcommand*{\itwikideref}[2]{\wikideref{#1}{\textit{#2}}} +%% % By analogy to `\Wikideref', +%% % The following macros save you from typing the underscore +%% % (didn't spaces suffice sometimes?) %% TODO 2011/01/24 +%% % and the round parantheses. +%% % Italic variant |\itwikienref| of `\wikienref' +%% % ('blog.sty' had `\emwikienref' instead): +% \newcommand*{\itwikienref}[2]{\wikienref{#1}{\textit{#2}}} +%% % |\urluml{<ascii-char>}| as of 2010/05/25 +%% % (not sure if it ever worked or was actually needed): +% \newcommand*{\urluml}[1]{\csname urluml:#1\endcsname} +% \@namedef{urluml:a}{\#C3\#A4} +% \@namedef{urluml:o}{\#C3\#B6} +% \@namedef{urluml:u}{\#C3\#BC} +% \@namedef{urluml:s}{\#C3\#9F} %% 2010/08/09 +%% +%% == \TeX-related == %% 2010/08/24 +%% === \CTAN === +%% \label{sec:ctan} +%% %% new from scratch 2015/05/16f.: +%% ==== Personal motivation ==== +%% When I created `texlinks.sty' originally, referring to +%% \CTAN\ material seemed simple to me. Well, what is \CTAN? +%% Please don't ask me, see the \wikiref{CTAN}{Wikipedia article} +%% and/or its major ``home page" \urlhttpref{www.ctan.org}---or +%% \CTAN\ introducing itself on \urlhttpref{ctan.org/ctan}---or +%% the \ukfaqref{ctan}{\acro{UK FAQ}!}---Well, +%% in order to generate \wikiref{URL}{\URL}s from human-readable +%% or memorizable input and to document my macros that try to +%% serve this purpose, I must guess what a domain or \CTAN\ has in +%% mind when they provide \URL s, while they don't seem to tell us +%% what they have in mind and what rules they follow. So I am just +%% reporting what I observed and what I guess, and I am trying to +%% introduce two technical terms ... \ The ``discovery" section +%% (\secref{ctan-discovery}) may be confusing, then I hope that +%% the ``summarizing section" (\secref{ctan-tables}) +%% will help by its tables.---The present \CTAN\ section (\secref{ctan}) +%% became especially difficult in December 2012 +%% (cf. \ctanannpref{12-12-006718}{\CTAN\ announcement}) +%% and January 2013 when some \URL s stopped to work +%% or changed their behavior---several times very much +%% within a few days---and I struggled to follow. +%% +%% ==== \CTAN ology: kinds of \CTAN\ \URL s (archives, bases) ==== +%% % \subsubsection{\CTAN ology:\titlefootnote{A moment ago, +%% % \wikienref{L. Ron Hubbard}{L.~Ron Hubbard} +%% % kindly suggested the section's title to me.} +%% % \ \ kinds of \CTAN\ \URL s (archives, bases)} +%% \label{sec:ctan-discovery} +%% \strong{One thing} are \strong{files} that have been \strong{contributed} +%% to the \strong{\CTAN\ archive} so that \strong{users} can download +%% them in order to run \TeX\ on their computers, especially for new +%% features that have been made available only in recent months. +%% Such files are submitted to the/a \CTAN\ archive, available through +%% certain \URL s over the internet. +%% +%% It seems that after some years it became difficult to understand +%% what features have been provided by so many contributors and +%% how to find them. For a while, the `help' subtree of a \CTAN\ archive +%% tried to help here (especially the \emph{\TeX\ catalogue}) ... +%% but eventually only experts could understand the abundance. +%% So a starting page just for providing tools for +%% \strong{exploring} the \TeX\ archive became useful and was +%% provided---over certain \URL s. Here I have called pages +%% available by such \URL s as ``\CTAN\ \strong{description}" +%% pages or so---\strong{second thing}. +%% +%% In order to save internet capacity (per time, +%% and to save users' patience), \strong{\Wikiref{web mirror}}s +%% of both archive and description pages have been established +%% and maintained---copies of the central directory structure. +%% +%% I have seen two kinds of \strong{\URL s} interesting here: +%% \begin{itemize} +%% \item \strong{domains} ending on `ctan.org' +%% \item \URL s ending on `/tex-archive' +%% \end{itemize} +%% +%% \TeX\ \strong{archive} \URL s show (only) a list of top-level +%% directories `biblio'..., `dviware', `fonts', `graphics', +%% `help', `indexing', `info', `install', `language'..., +%% `macros', `obsolete', `support', `systems', `tds', +%% `usergrps', and `web'. This is what characterizes \TeX\ +%% \emph{archives} or their \emph{roots}, as opposed to +%% \emph{description} pages, by their \strong{content} +%% (as opposed to characterization by the form of \strong{\URL s}). +%% Including deeper subdirectories, the directory structures +%% of all \TeX\ archives are the same (``mirrors"). They +%% change by new contributions, but within 24 hours, +%% other \TeX\ archives copy the changes of the first +%% one.---There are several \strong{designs} of archive root pages, +%% varying between archive \emph{mirrors.} +%% +%% \CTAN\ \strong{description} pages have \emph{roots} as well, +%% and 'texlinks' previously has chosen macro names containing +%% `ctanorgbase' for accessing them, so there is an idea to call those roots +%% \strong{\CTAN\ bases}. In spring 2015, all bases I know +%% have the same \strong{design}, and they actually \emph{combine} +%% archive and description: an upper section shows the +%% archive top-level directories, the remaining page offers +%% the description/exploring tools. To compare bases with archives +%% in terms of top-level subdirectories, I know of \CTAN\ base +%% subdirectories `pkg', `author', `topic', and `tex-archive'. +%% +%% +%% ==== Summary tables with macro names ==== +%% \label{sec:ctan-tables} +%% In the following tables, a macro in the right-hand column +%% is just \emph{one} to access paths under the corresponding +%% \URL\ in the left-hand column, so the list of macros +%% probably is not complete here, it just is to give an \emph{idea} +%% for the following sections. The `\nullctan'\codedots\ +%% macros keep some `\ctan'\codedots\ control sequences free +%% so the latter are available as shorthands for accessing the users' +%% favorite domains. +%% +%% \vskip\medskipamount %%% \noindent +%% The first table is a list of \URL s resolving to +%% \CTAN\ description bases according to the previous subsection +%% (\secref{ctan-discovery}) I know of. +%% (It shrinked and changed much after some very recent discoveries of mine.) +%% Sections starting at \secref{sing-pkgs} tell about many more +%% macros for accessing description pages. %% 2015/05/20 +%% \MakeOther\|\MakeNormal\& +%% % \noNiceVerb +%% \begin{center} +%% \begin{tabular}{|r|r|} +%% \hline +%% \multicolumn{2}{|c|}{\strong{\CTAN\ bases for package descriptions}} \\ +%% \hline \hline +%% \multicolumn{1}{|c|}{\strong{\URL}} & \multicolumn{1}{c|}{\strong{macro}} \\ +%% \hline \hline +%% \urlhttpref{www.ctan.org} & `\wwwctanorgbaseref{<path>}{<text>}' \\ +%% \hline +%% \urlhttpref{ctan.org} & `\nullctanorgbaseref{<path>}{<text>}' \\ +%% \hline +%% \urlhttpref{dante.ctan.org} & \multicolumn{1}{c|}{---}\\ +%% \hline +%% \end{tabular} +%% \end{center} +%% \MakeActiveLet\|\nvCmdBox\MakeActiveLet\&\CmdSyntaxVerb +%% % \useNiceVerb +%% \strong{Remarks:}\enspace (a)~|www.ctan.org| and |ctan.org| +%% have the same functionality. +%% +%% (b)~|\nullctanorgbaseref| appears here rather than |\ctanorgbaseref| +%% because the latter is used as an alias for either +%% |\wwwctanorgbaseref| or `\nullctanorgbaseref', by default for +%% `\ctanorgbaseref', cf. \secref{sing-pkgs}. +%% +%% (c)~|dante.ctan.org| just redirects to |www.ctan.org|. +%% \vskip\medskipamount %%% \pagebreak %%% \noindent +%% The second table is a list of \URL s resolving to +%% \CTAN\ \TeX\ archives according to the previous subsection +%% (\secref{ctan-discovery}) I know of. +%% Macros are described from \secref{texarc} onwards. +%% \MakeOther\|\MakeNormal\& +%% % \noNiceVerb +%% \begin{center} +%% \begin{tabular}{|r|r|} +%% \hline +%% \multicolumn{2}{|c|}{\strong{\CTAN\ archives}} \\ +%% \hline \hline +%% \multicolumn{1}{|c|}{\strong{\URL}} & \multicolumn{1}{c|}{\strong{macro}} \\ +%% \hline \hline +%% \urlhttpref{www.ctan.org/tex-archive} & `\wwwctanref{<path>}{<text>}' \\ +%% \hline +%% \urlhttpref{ctan.org/tex-archive} & `\nullctanref{<path>}{<text>}' \\ +%% \hline \hline +%% \urlhttpref{tug.ctan.org/tex-archive} & \multicolumn{1}{c|}{---} \\ +%% \hline +%% \urlhttpref{tug.ctan.org} & `\tugctanref{<path>}{<text>}' \\ +%% \hline +%% \urlhttpref{dante.ctan.org/tex-archive} & `\dantectanref{<path>}{<text>}'\\ +%% \hline +%% \urlhttpref{ctan.sciserv.eu} & `\sciservref{<path>}{<text>}' \\ +%% \hline \hline +%% \urlhttpref{mirror.ctan.org} & `\mirrorctanref{<path>}{<text>}'\\ +%% \hline +%% `<domain>/<path>tex-archive' & \multicolumn{1}{c|}{TODO} \\ +%% \hline +%% `<domain>/<path>ctan/' & \multicolumn{1}{c|}{TODO} \\ +%% \hline +%% `<domain>' & \multicolumn{1}{c|}{TODO} \\ +%% \hline +%% \end{tabular} +%% \end{center} +%% \MakeActiveLet\|\nvCmdBox\MakeActiveLet\&\CmdSyntaxVerb +%% % \useNiceVerb +%% \strong{Remarks:}\enspace \ \ (a)~|\nullctanref| +%% rather than |\ctanref| appears here because the latter +%% is used as an alias for one of the other `ctanref' commands, +%% by default for `\mirrorctanref', cf. \secref{texarc}. +%% +%% (b)~|tug.ctan.org/tex-archive|,\quad |tug.ctan.org|, +%% \[|dante.ctan.org/tex-archive|\mbox{,\quad and\quad} |ctan.sciserv.eu|\] +%% have the same functionality; +%% which includes (i)~that they show the same page of its own +%% design and (z)~that this page includes a few lines of links +%% to the basic functions of `www.ctan.org'. The design is much +%% less heavy than the design of `www.ctan.org' with respect +%% to ($\alpha$)~graphics and to ($\beta$)~the number of columns. +%% At its bottom, the page describes itself as ``experimental" +%% and as dating from February~2015 (observed in May 2015). +%% +%% (c)~\strong{Examples} for |<domain>/<path>/tex-archive|, %%%\quad +%% |<domain>/<path>ctan| and |<domain>| +%% (as listed below `mirror.ctan.org') +%% are \strong{\wikienref{web mirror}{mirrors}} of +%% \[|ctan.org/tex-archive|\mbox{\quad or \quad} +%% |www.ctan.org/tex-archive|\] +%% and appear as (somewhat random) resolutions of |mirror.ctan.org|. +%% <path> may be empty. +%% |tug.ctan.org| and |ctan.sciserv.eu| listed earlier +%% actually are examples of the last entry, +%% and |dante.ctan.org/tex-archive| exemplifies the other +%% lower entry. The file \ctanfileref{CTAN.sites} +%% in the root directory of any \TeX\ archive should +%% contain all the example \URL s to which `mirror.ctan.org' +%% resolves. However, my intention (which failed) for +%% the final table entries was that they exemplify mirrors +%% with rather \emph{simple} directory designs, +%% as opposed to the \URL s listed in the upper part +%% of the table. +%% +%% +%% ==== Some \CTAN\ Domains ==== +%% \label{sec:domains} %% 2015/05/22 +%% |\ctanorg| saves a few tokens, using |\nullctanorg| for |ctan.org| +%% (latter new with v0.83, keeping ultimate expansion of `\ctanorg' from prior +%% versions). +\newcommand*{\nullctanorg}{ctan.org} +\newcommand*{\ctanorg}{.\nullctanorg} +%% `\nullctanorg' and |\wwwctanorg| are useful both for +%% description pages and \TeX\ archives: +\newcommand*{\wwwctanorg}{www\ctanorg} +%% % Instances are |tug.ctan.org| (|\tugctanorg|), +%% % |www.ctan.org| (|\wwwctanorg|): +%% % |dante.ctan.org| (|\dantectanorg|): +%% % \newcommand*{\tugctanorg} {tug\ctanorg} +%% % \newcommand*{\wwwctanorg} {www\ctanorg} +%% % \newcommand*{\dantectanorg} {dante\ctanorg} +%% % \newcommand*{\mirrorctanorg}{mirror\ctanorg} +%% Referring to \strong{``description"} pages +%% according to \secref{ctan-discovery} +%% (`\httpbaseref' from \secref{bases}):\MDdocnewline +%% |\wwwctanorgbaseref{<path>}{<text>}| \ links to |www.ctan.org|: +\newcommand*{\wwwctanorgbaseref}{\httpbaseref\wwwctanorg} +%% |\nullctanorgbaseref{<path>}{<text>}| is like +%% the previous command without `www.': +\newcommand*{\nullctanorgbaseref}{\httpbaseref\nullctanorg} +%% |\metactan@ref{<sub>}{<ref-cmd>}| for some ``null" vs. +%% `www'-commands that are defined in \secref{sing-pkgs}: +\newcommand*{\metactan@ref}[3]{#2{#1/#3}} +%% +%% ==== Fixed Macros for Paths in Various \TeX\ Archives ==== %% 2015/05/22 +%% \label{sec:texarc} %% 2013/01/19 +%% \paragraph{Shorthands for paths.} +%% |\texarchive| saves a few tokens: %% 2015/05/21 +\newcommand*{\texarchive}{/tex-archive} +%% Typically, \LaTeX\ macro packages in `macros/latex/contrib/' +%% are discussed, so here is |\ltxcontrib| saving both characters +%% and tokens +%% (no starting slash so it can be used with `\httpbaseref'; +%% likewise no final one---hopefully only used in present demos +%% before v0.83): +\newcommand*{\ltxcontrib}{macros/latex/contrib} +%% We now proceed along the second table of \secref{ctan-tables}: +%% \paragraph{Advanced design of directories.} +%% \TeX\ archive directories on |www.ctan.org| +%% and |ctan.org| show an advanced design, +%% as compared with mirror \TeX\ archives. +%% They can be accessed by +%% \begin{itemize} +%% \item |\wwwctanref{<path>}{<text>}| and +%% \item |\nullctanref{<path>}{<text>}| respectively +%% \end{itemize} +%% (<path> without starting slash): +\MakeBasedHref{\wwwctanref} {\wwwctanorg/\texarchive} +\MakeBasedHref{\nullctanref}{\nullctanorg/\texarchive} +%% \begin{simpleexamples} +%% \simpleexample{\wwwctanref{}{Archive root}} +%% \simpleexample{\wwwctanref{macros/generic}{generic macros}} +%% \simpleexample{\nullctanref{macros/generic}{generic macros}} +%% % \longsimpleexample{\nullctanref{macros/generic}{generic macros}} +%% \simpleexample{\nullctanref{\nvCSV\ltxcontrib/morehype}{hypertext}} +%% \end{simpleexamples} +%% In the final example, you see that the ``directory" design +%% even includes something like the corrsponding +%% \strong{\ctanpkggenref{morehype}{package description}}---especially +%% the ``\acro{README}" is displayed in a ``frame." +%% +%% \paragraph{Advanced root page design.} +%% Next, there are archive roots showing a special \emph{starting page}, +%% while subdirectories show a rather simple design. +%% \begin{itemize} +%% \item |\tugctanref{<path>}{<text>}|, +%% \item |\dantectanref{<path>}{<text>}|, and +%% \item |\sciservref{<path>}{<text>}| +%% \end{itemize} +%% make <text> a link to a \TeX~Archive directory or file <path> +%% on the corresponding domain: +\MakeBasedHref{\tugctanref}{tug\ctanorg} +%% (`tug.ctan.org' once behaved like `alan.smcvt.edu', +%% Jim Hefferon's former \CTAN\ interface.) +\MakeBasedHref{\dantectanref}{dante\ctanorg/\texarchive} +\MakeBasedHref{\sciservref}{dante\ctanorg} +%% Using the \emph{empty} <path> may be most interesting +%% for that starting page; otherwise they may simply serve as +%% (known) \emph{nearby mirrors}---speed preferred over design. +%% \begin{simpleexamples} +%% \simpleexample{\tugctanref{}{Archive root}} +%% \simpleexample{\tugctanref{info}{Info}} +%% \end{simpleexamples} +%% \paragraph{Random mirrors.} +%% For speed, saving energy (i.e., the \emph{world}), +%% and certain servers from overload, +%% using |mirror.ctan.org| is recommended, +%% which automatically chooses a \CTAN\ \wikienref{web mirror}{\emph{mirror}}. +%% \[|\mirrorctanref{<path>}{<text>}|.\] %% 2011/10/10 :->.2011/10/21: +%% is provided for this purpose: +\MakeBasedHref{\mirrorctanref}{mirror\ctanorg} +%% Resulting design may be poor ... +%% \begin{simpleexamples} +%% \simpleexample{% +%% \mirrorctanref{}{Archive root}} +%% \simpleexample{% +%% \mirrorctanref{help}{Help}} +%% \end{simpleexamples} +%% +%% ==== \cs{ctanref} for Favourite Mirror, Customizing ==== %% fav. 2015/05/21 +%% \label{sec:custom-ref} +%% |\ctanref| should work like one out of +%% \begin{itemize} +%% \item `\wwwctanref', `\nullctanref', +%% \item `\tugctanref', `\dantectanref', `\sciservctanref', and +%% \item `\mirrorctanref', +%% \end{itemize} +%% %%%(as introduced in \secref{texarc}) +%% (as listed in the second table of \secref{ctan-tables}) +%% depending on which out of +%% \begin{itemize} +%% \item |\usewwwctan|, |\usenullctan|, +%% \item |\usetugctan|, |\usedantectan|, |\usesciservctan|, and +%% \item |\usemirrorctan|, +%% \end{itemize} +%% appeared most recently. +%% By \strong{default}, `\ctanref' works like `\mirrorctanref'. +%% So in any case its syntax is \[|\ctanref{<path>}{<text>}|.\] +%% The idea is that it is a shorthand to access the user's +%% favourite \CTAN\ mirror, or just to save the `www' +%% in `\wwwctanref', for instance. It may also be modified directly +%% using +%% \[|\MakeBasedHref{\ctanref}{<ctan-mirror>}|\] +%% where <ctan-mirror> is a \URL\ of a root of +%% a \CTAN\ mirror (imitate code from \secref{texarc}---TODO: +%% more \URL s in \secref{domains}?), +%% or by +%% \[|\renewcommand{\ctanref}{\<prefix>ctanref}|\] +\newcommand*{\let@ctanref}{\let\ctanref} %% v0.83 2015/05/22 +\newcommand*{\usemirrorctan}{\let@ctanref\mirrorctanref + %% v0.83 rm. reminiscence of \let\ctanfileref +} +%% |\usemirrorctan| \emph{sets} the \strong{default} +%% meaning for |\ctanref| as announced +%% (so it uses \urlhttpref{mirror.ctan.org}): +\usemirrorctan +\RequirePackage{domore} +\setdo[2]{\newcommand*#1{\let@ctanref#2}} +%% TODO `\DoDoWithMore'? +\DoWithMore\do{\usewwwctan \wwwctanref } + {\usenullctan \nullctanref } + {\usetugctan \tugctanref } + {\usedantectani \dantectanref} + {\usesciservctan \sciservref }\StopDoing +%% v0.83 drops |\myctanref|, while it might be useful for the user's +%% preferred mirror. However, \secref{texarc} should show how to +%% set up `\myctanref' then, and +%% \[|\renewcommand*{\ctanref}{\myctanref}|\] +%% could replace the |\usemyctan| I haven't put here. +%% % \begin{singthm}{Remark} (TODO) \ Another implementation +%% % of adjusting `\ctanref' I consider is +%% % using some `\ctanurl'\-`prefix' that you can redefine for +%% % accessing your favourite mirror. +%% % \end{singthm} +%% +%% ==== Opening/Downloading Files from an Archive ==== %% 2015/05/25 +%% %% moved down 2015/05/18 +%% You may actually want to \emph{open} a file <file-name> in <path> +%% of a \TeX\ archive +%% % <file-name> displayed as the link text, %% 2011/10/21 +%% % by %% 2013/01/21 +%% by clicking on <file-name> (which is formatted by +%% |\filenamefmt| from \secref{fonts})---or +%% to \emph{offer} this opportunity to readers of your document. +%% In this case, the formatting of \CTAN\ pages +%% (directories) doesn't matter at all, +%% so a randomly chosen archive mirror should do: +%% |\mirrorctanfileref{<path>}{<file-name>}| +\newcommand*{\CTANfileref}[3]{#1{#2/#3}{\filenamefmt{#3}}} +\newcommand*{\mirrorctanfileref}{\CTANfileref\mirrorctanref} +%% |\ctanfileref{<path>}{<file-name>}| is provided as an alias +%% or shorthand for `\mirrorctanfileref': +\newlet\ctanfileref\mirrorctanfileref +%% \begingroup\hfuzz=14pt %% TODO +%% \begin{simpleexamples} +%% \simpleexample{\ctanfileref{\nvCSV\ltxcontrib/filedate/doc}{filedate.pdf}} +%% \simpleexample{\ctanfileref{\nvCSV\ltxcontrib/filedate}{README}} +%% \simpleexample{\ctanfileref{\nvCSV\ltxcontrib}{filedate.zip}} +%% \end{simpleexamples} +%% \endgroup +%% %% 2013/01/21: rm. \tugctanfileref %%%% 2015/05/21 +%% |\mirrorctanfileref| should not be changed, +%% while the user might +%% \[|\renewcommand*{\ctanfileref}{\CTANfileref<archive-ref>}|\] +%% with <archive-ref> from the previous section or the +%% second table in \secref{ctan-tables} +%% (immitate the earlier definition of `\mirrorctanfiler'), +%% or s(h)e might +%% \[|\newcommand*{\myctanfileref}{\CTANfileref<archive-ref>}|\] +%% and (temporarily) +%% \[|\renewcommand*{\ctanfileref}{\myctanfileref}|\] +%% (|\filectanref| that I earlier offered for customizing +%% is dropped with v0.83.) +%% +%% It may be psychologically useful to have an \emph{opposite} +%% to `\ctanfileref' %% 2015/05/23: filectan -> ctanfile +%% that can easily be recognized as such, +%% while `\ctanref' may be unclear. I offer +%% |\dirctanref{<path>}{<text>}| ... +%% %. It may be an alias %% was \dirfile... 2015/05/21 +%% %for `\ctanref', even respecting the `\use'\codedots\ commands +%% %from above. Another proposal above is dangerous with the present idea: +%% as a kind of alias for `\ctanref'---you might change that +%% by `\renewcommand': +\newcommand*{\dirctanref}{\ctanref} +%% \strong{Note:}\enspace Links for opening \CTAN\ files +%% with a different link text than the filename +%% can be generated by `ctanref' commands discribed earlier. +%% +%% ==== The \TeX\ Catalogue OnLine ==== +%% \label{sec:texcat} %% 2012/12/18 +%% % We are not providing access to everything in the +%% % \catalogueref{}{\TeX~catalogue}. +%% Before v0.8, only +%% J\"urgen Fenn's Topical Index of the Catalogue +%% was supported. v0.8 adds package descriptions displayed +%% by the Catalogue. The following shorthand +%% |\catalogueref{<path[#frag]>}{<text>}| is an auxiliary for +%% both of them (and other <path>s the user might want). +%% With empty <path>, +%% it generates an \URL\ of a \catalogueref{}{root} +%% in a \CTAN\ mirror %% shorthand 2012/12/17 +%% of \meta{The \TeX~Catalogue OnLine}: +\newcommand*{\catalogueref}[1]{\mirrorctanref{help/Catalogue/#1}} +%% The user may modify this by +%% \begin{center} +%% `\renewcommand*{\catalogueref}[1]{\myctanref{help/Catalogue/#1}}' +%% \end{center} +%% or by +%% \begin{center} +%% `\MakeBasedHref{\catalogueref}{texcatalogue\ctanorg}' +%% \end{center} +%% ---cf. \urlhttpref{texcatalogue\ctanorg}. +%% +%% Some mirrors seem to display the Catalogue's root directory +%% only this way, while others display the ``Welcome" page. +%% |\cataloguestartref{<text>}| accesses the +%% \cataloguestartref{\strong{Welcome} (\strong{start})} page surely: +\newcommand*{\cataloguestartref}{\catalogueref{index\html}} +%% |\bytopicref{<anchor>}{<text>}| +%% \ %% 2011/10/21 +%% makes <text> a link to <anchor> of +%% \strong{J\"urgen Fenn's Topical Index} %% 2012/12/18 +%% of the \TeX\ Catalogue. You find the <anchor> +%% by clicking at the respective \acro{TOC} entry on top of the page +%% and then read the \URL\ from the browser's navigation display. +\newcommand*{\bytopicref}[1]{\catalogueref{bytopic\html\##1}} +%% \simpleexample{\bytopicref{html}{&\TeX~to HTML}} +%% \par %% recplaces \[\] 2015/05/20 +%% |\catpkgref{<pkg-name>}| makes <pkg-name> +%% a link to the description of the \strong{package} <pkg-name> +%% in \meta{The \TeX~Catalogue Online}. +%% \[|\CatPkgRef{<name>}{<Name>}|\] +%% is a variant for the cases where authors have a special idea +%% <Name> using some capital letters when they describe their packages +%% (\acro{ASCII} %%% ASCII %% 2012/12/14 +%% versions of ``logos" such as `BibTeX') %% was Logos 2012/10/24 +%% while the identifier <name> doesn't allow capital letters. +%% %% 2011/01/24: +%% Also, <Name> may be a package from a \emph{bundle} <name> +%% where <name> has a description page while <Name> +%% doesn't have its \emph{own} description page~... +%% \simpleexample{\CatPkgRef{morehype}{texlinks}} +\newcommand*{\catpkgref}{\DoubleArg\CatPkgRef} +%\newcommand*{\CatPkgRef}[1]{% +% \cat@ctan@pkg@ref\catalogueref{entries/#1\html}} +%% <- v0.83 2015/05/20 -> + \newcommand*{\CatPkgRef}{\cat@ctan@pkg@ref\catpkggenref} +%% v0.83 introduces |\catpkggenref{<pkg-name>}{<text>}| +%% where formatting <text> is up to the user +%% (or not special formatting required): +\newcommand*{\catpkggenref}[1]{\catalogueref{entries/#1\html}} +%% |\cat@ctan@pkg@ref<cmd>{<path>}{<text>}| %% 2012/12/19, rm. frag 2015/05/26 +%% \ ensures that <Name> is typeset as the argument of +%% `\pkgnamefmt' (\secref{fonts}). +%% It is used in \secref{sing-pkgs} again: +\newcommand*{\cat@ctan@pkg@ref}[3]{#1{#2}{\pkgnamefmt{#3}}} +%% \simpleexample{\catpkgref{morehype}} +%% % \begin{example} +%% % \makeatletter \def\ex@mple{\catpkgref{morehype}}% +%% % \fbox{\strut\expandafter\code\expandafter{\expandafter&\ex@mple}}% +%% % %% <- bad spaces +%% % \hskip\labelsep for\hskip\labelsep +%% % \fbox{\strut\ex@mple} +%% % |\catpkgref{morehype}| \ for \ +%% % \fbox{\catpkgref{morehype}} +%% % \end{example} +%% +%% ==== Single Packages without The \TeX~Catalogue ==== +%% \label{sec:sing-pkgs} %% 2012/12/19 +%% v0.83 introduces a way to refer to a package description without +%% telling a package's name. |\wwwctanpkggenref{<id>}{<text>}| +%% does not coerce <text> into a special format: +\newcommand*{\metactan@pkgref}{\metactan@ref{pkg}} +\newcommand*{\wwwctanpkggenref}{\metactan@pkgref\wwwctanorgbaseref} +%% \longsimpleexample +%% {\wwwctanpkggenref{morehype}{an awesome bundle}} +%% |\nullctanpkggenref{<id>}{<text>}| similarly without `www.': +\newcommand*{\nullctanpkggenref}{\metactan@pkgref\nullctanorgbaseref} +%% |\wwwctanpkgref{<pkg-name>}| makes <pkg-name> %% 2015/05/26 +%% a link to a package info page for the package <pkg-name> +%% on `www.ctan.org'. <pkg-name> is displayed and formatted +%% by `\pkgnamefmt{<pkg-name>}'. |\WwwCtanPkgRef{<name>}{<Name>}| +%% is a variant of `\wwwctanpkgref' relating to the latter +%% as `\CatPkgRef' relates to `\catpkgref' (\secref{texcat}): +\newcommand*{\wwwctanpkgref}{\DoubleArg\wwwCtanPkgRef} +\newcommand*{\WwwCtanPkgRef}{\cat@ctan@pkg@ref\wwwctanpkggenref} +% %% Using `\cat@ctan@pkg@ref' from \secref{texcat}: +% \newcommand*{\Ct@nPkgRef}[2]{\cat@ctan@pkg@ref#1{pkg/#2}} +%% |\wwwctanpkgstyref{<name>}| %% 2012/11/27 +%% adds \qtdcode{.sty} to the package name: +\newcommand*{\wwwctanpkgstyref}[1]{\wwwCtanPkgRef{#1}{#1.sty}} +%% Likewise |\nullctanpkgstyref{<name>}| etc.: +\newcommand*{\nullctanpkgstyref}[1]{\nullCtanPkgRef{#1}{#1.sty}} +\newcommand*{\nullctanpkgref}{\DoubleArg\nullCtanPkgRef} +\newcommand*{\NullCtanPkgRef}{\cat@ctan@pkg@ref\nullctanpkggenref} +%% Command names \ |\ctanpkgstyref|, \ |\ctanpkgref|, \ |\CtanPkgRef|, \ +%% and \ |\ctanpkggenref| \ interrelate analogously. +%% I expect these ones are mainly used. +%% Their exact behavior can be chosen from the `\nullctan'\codedots, +%% `\wwwctan'\codedots\ things, they even can use the \TeX\ catalogue: +\newcommand*{\ctanpkgstyref}[1]{\CtanPkgRef{#1}{#1.sty}} +\newcommand*{\ctanpkgref}{\DoubleArg\CtanPkgRef} +\newcommand*{\CtanPkgRef}{\cat@ctan@pkg@ref\ctanpkggenref} +\newcommand*{\ctanpkggenref}{\metactan@pkgref\ctanorgbaseref} +%% v0.83 abolishes `tugctanorgbaseref' as +%% \urlhttpref{tug.ctan.org} no longer has a +%% `pkg' top-level subdirectory: +% \newcommand*{\useTUGpkgpages}{\let\CtanPkgRef\TugCtanPkgRef} +%% After |\useWWWpkgpages|, +%% the package descriptions from `www.ctan.org' are used: +\newcommand*{\let@ctanobref}{\let\ctanorgbaseref} +\newcommand*{\useWWWpkgpages}{\let@ctanobref\wwwctanorgbaseref} +%% After |\useOpkgpages|, `\CtanPkgRef' and `\ctanpkgref' +%% use the package descriptions from `ctan.org'. This command +%% and the previous |\useOpkgpages| also decide whether +%% author (\secref{pkg-au}), topic, and search pages +%% (\secref{pkg-search}) have `www.' in their \URL\ or not: +\newcommand*{\useOpkgpages}{\let@ctanobref\nullctanorgbaseref} +%% And the latter is the \strong{default:} +\useOpkgpages +%% After |\useCATpkgpages|, `\CtanPkgRef' and `\ctanpkgref' +%% use the \TeX~Catalogue to display package informations. +%% The content should be much the same as with +%% [`www.']`ctan.org', the same database is used, +%% it is the design that differs: +\newcommand*{\useCATpkgpages}{\let\CtanPkgRef\CatPkgRef} +%% Finally, we provide experimental +%% \[|\AllPkgRefs{<name>}{<Name>}| \mbox{\quad and\quad} +%% |\allpkgrefs{<name>}|\] +%% offering choice between the two interfaces for each package. +%% \qtdcode{c} will stand for The \TeX~Catalogue and +%% \qtdcode{w} for `www.ctan.org'. After |\useALLpkgpages|, +%% this is what `\CtanPkgRef' and `\ctanpkgref' offer: +\newcommand*{\AllPkgRefs}[2]{% + \pkgnamefmt{#2}\,[\CatPkgRef{#1}{c}\textbar + % \TugCtanPkgRef{#1}{t}\textbar %% rm. v0.83 + \WwwCtanPkgRef{#1}{w}]} +\newcommand*{\allpkgrefs}{\DoubleArg\AllPkgRefs} +\newcommand*{\useALLpkgpages}{\let\CtanPkgRef\AllPkgRefs} +%% \simpleexample{\allpkgrefs{morehype}} +%% (With 'blog.sty', this requires some `\def\textbar{|}' TODO.) +%% +%% ==== Package Author Pages ==== +%% \label{sec:pkg-au} +%% |\wwwctanpkgauref{<id>}{<description>}| creates a link +%% to the list of packages somebody described by <description> +%% maintains: +\newcommand*{\metactan@auref}{\metactan@ref{author}} +\newcommand*{\wwwctanpkgauref}{\metactan@auref\wwwctanorgbaseref} +%% \simpleexample{\wwwctanpkgauref{lueck}{mine}} +%% |\nullctanpkgauref{<id>}{<description>}| removes `www.': +\newcommand*{\nullctanpkgauref}{\metactan@auref\nullctanorgbaseref} +%% |\ctanpkgauref{<id>}{<description>}| chooses from the former +%% possibilities according to the `\use'\codedots\ commands +%% in the previous \secref{sing-pkgs}: +\newcommand*{\ctanpkgauref}{\metactan@auref\ctanorgbaseref} +%% +%% ==== Other Ways to Search for Packages ==== +%% \label{sec:pkg-search} %% 2012/12/29 +%% |\wwwctanpkgtopicref{<topic-id>}{<text>}| accesses a list of +%% packages belonging to the ``topic" with identifier <topic-id>. +\newcommand*{\metactan@topicref}{\metactan@ref{topic}} +\newcommand*{\wwwctanpkgtopicref}{% + \metactan@topicref\wwwctanorgbaseref} +%% \longsimpleexample{\wwwctanpkgtopicref{cvt-html}{make HTML}} +%% |\nullctanpkgtopicref{<topic-id>}{<text>}| without `www.': +\newcommand*{\nullctanpkgtopicref}{% + \metactan@topicref\nullctanorgbaseref} +%% |\nullctanpkgsearch{<text>}| \ and \ |\wwwctanpkgsearch{<text>}| \ +%% create links to a page for searching packages +%% with several options for search criteria: +\newcommand*{\metactan@searchref}[1]{#1{search}} +\newcommand*{\nullctanpkgsearchref}{% + \metactan@searchref\nullctanorgbaseref} +%% \simpleexample{\ctanpkgsearchref{CTAN~search}} +\newcommand*{\wwwctanpkgsearchref}{% + \metactan@searchref\wwwctanorgbaseref} +%% |\ctanpkgtopicref| and |\ctanpkgsearchref| choose +%% according to the `\use'\codedots\ commands in \secref{sing-pkgs}: +\newcommand*{\ctanpkgtopicref}{\metactan@topicref\ctanorgbaseref} +\newcommand*{\ctanpkgsearchref}{\metactan@searchref\ctanorgbaseref} +%% The \TeX\ Catalogue OnLine has offered searching as well, +%% yet today this search page is just the same as the one you +%% get by \wwwctanpkgsearchref. +%% +%% +%% === Mailing Lists === +%% \label{sec:mail} +%% This section mainly provides tools for referring %% 2015/05/28 +%% to pages of or postings to the \CTAN\ announcments +%% (\secref{ctan-ann}) and texhax (\secref{texhax}) mailing lists. +%% v0.7 relies on package \ctanpkgref{langcode} for +%% |\enmonthname{<month-number>}| and |\demonthname{<month-number>}|, +%% for tricks with language codes extending those in +%% \secref{langcode}: +\RequirePackage{langcode} +%% The next definitions are backbones for generating links to +%% web pages about \TeX\ mailing lists. +%% |\TL@piper@parse<year>-<month-number>-<id>| will be used +%% for referring to single postings: +\def\TL@piper@parse#1-#2-#3/{#1-\enmonthname{#2}/#3} +%% \[|\texlistyearmonthref<list-ref>{<2-digits>-<month-no>}|\] +%% will generate \ |<list-ref>{<path>}| \ for linking to the list of postings +%% of the <month-no>th month in the year 20<2-digits>: +\newcommand*{\texlistyearmonthref}[2]{\texlist@yearmonthref#1#2\@nil} +\def\texlist@yearmonthref#1#2-#3\@nil{#1{20#2-\enmonthname{#3}}} +%% \qtd{<path>} will be \qtdcode{20<2-digits>-<month>}, +%% and <month> will be the \emph{English} name of the +%% <month-no>th month of the year. +%% +%% \[|\texlanglistmonthref<month-cmd><list-ref>{<2-digits>-<month-no>}|\] +%% will generate \ |<list-ref>{<path>}{<month>}| \ +%% where <month> is determined from <month-no> by <month-cmd>: +\newcommand*{\texlanglistmonthref}[3]{\texlanglistm@nthref#1#2#3\@nil} +\def\texlanglistm@nthref#1#2#3-#4\@nil{% + #2{20#3-\enmonthname{#4}}{#1{#4}}} +%% |\detexlistmonthref<list-ref>{<2-digits>-<month-no>}| \ +%% now could be used for `<list-ref>{<path>}{<month>}' +%% \emph{German} <month> ... +\newcommand*{\detexlistmonthref}{\texlanglistmonthref\demonthname} +%% ... as could be \ |\entexlistmonthref<list-ref>{<2-digits>-<month-no>}| \ +%% for \emph{English} <month> ... +\newcommand*{\entexlistmonthref}{\texlanglistmonthref\enmonthname} +%% With proper use of \ctanpkgref{langcode} however, +%% \[|\texlistmonthref<list-ref>{<2-digits>-<month-no>}|\] +%% \emph{automatically} chooses between English and German <month> +%% (according to intention ...): +\newcommand*{\texlistmonthref}{\texlanglistmonthref\monthname} +%% +%% === \CTAN\ Announcements === %% 2011/06/27 +%% \label{sec:ctan-ann} %% 2015/05/28 +%% |\ctanannref{<id>}{<text>}| makes <text> a link +%% to the DANTE web page displaying a \CTAN\ +%% announcement. You find <id> by searching +%% \[\texttt{https://lists.dante.de/pipermail/ctan-ann/}\] +%% and then reading the \URL. +%% <id> is composed as +%% \[`<year>-<month>/<6-digits>.html'\]%%%, \[\] 2012/10/24 +%% %% 2012/10/24: +%% where <year> consists of 4 digits and <month> is an \emph{English} +%% month name: +\newcommand*{\ctanannref}[1]{% + \httpsref{lists.dante.de/pipermail/ctan-ann/#1}} +%% |\ctanannpref{<id-code>}{<text>}| is a variant +%% of `\ctanannref' where in place of <id> +%% you only type the third and fourth digit of the +%% year (<2-digits>), then a \qtdcode{-}, then the (arabic) +%% number <month-no> of the month (cf. \secref{mail} so far), +%% then another \qtdcode{-}, +%% and then the actual internal identifier <running-no> +%% (a number of six digits preceding \qtdcode{.html} of the \URL). +%% I.e., \qtd{<id-code>} is \qtdcode{<2-digits>-<month-no>-<running-no>}. +\newcommand*{\ctanannpref}[1]{% + \ctanannref{20\TL@piper@parse#1/\html}} %% `20' 2012/12/08 +%% \[|\ctanannyearmonthref{<2-digits>-<month-no>}|\] generates +%% `\ctanannref{<path>}' from \qtdcode{<2-digits>-<month-no>}---<path> +%% as in \secref{mail} ... +\newcommand*{\ctanannyearmonthref}{\texlistyearmonthref\ctanannref} +%% \[|\ctanannmonthref{<2-digits>-<month-no>}|\] generates +%% `\ctanannref{<path>}{<month>}' where <month> obeys `\langcode' ... +%% % from \qtdcode{<2-digits>-<month-no>} +\newcommand*{\ctanannmonthref}{\texlistmonthref\ctanannref} +%% +%% === \code{\dots stack\dots} Forums === %% 2012/12/17/18 +%% |\stackexref{<id-no>}{<text>}| \ shows exchange about +%% Question No.~<id-no> on \urlhttpref{tex.stackexchange.com}. +%% <id-no> is the number following \qtdcode{/questions/} +%% in the \URL\ +%% (the part of the \URL\ reflecting the caption are not needed). +%% See an example from +%% $<id-no>=\stackexref{84878}{84878}$ in \secref{wiki-stack}. +\newcommand*{\stackexref}{\stackquestionref{tex.stackexchange}} +\newcommand*{\stackquestionref}[2]{\httpref{#1.com/questions/#2}} +%% Likewise, \ |\stackoverref{<id-no>}{<text>}| \ links to +%% \urlhttpref{stackoverflow.com} +%% ($<id-no>=\stackoverref{2118972}{2118972}$ is about file dates): +\newcommand*{\stackoverref}{\stackquestionref{stackoverflow}} +%% +%% === \TUG === %% \TUG 2012/12/15 +%% \label{sec:tug} %% 2012/12/29 +%% |\tugref{<path>}{<text>}| makes <text> a link +%% to <path> on domain `tug.org': +\MakeBasedHref{\tugref}{tug.org} +%% ==== texhax ==== +%% \label{sec:texhax} %% 2015/05/28 +%% |\texhaxref{<id>}{<text>}| makes <text> a link +%% to the \TUG\ web page displaying +%% a texhax posting. You find <id> by searching +%% `tug.org/pipermail/texhax/' and then reading the \URL. +%% <id> is composed as `<year>-<month>/<6-digits>.html'. +\newcommand*{\texhaxref}[1]{\tugref{pipermail/texhax/#1}} +%% |\THref{<id>}| saves you from choosing <text> +%% and uses `texhax' instead. +\newcommand*{\THref}[1]{\texhaxref{#1}{texhax}} +%% (It was `\prg{texhax}' in 'blog.sty', to have something +%% logo-like, without a good idea how to implement it.) +%% +%% |\texhaxpref{<id-code>}{<text>}| is a variant +%% of `\texhaxref' where in place of <id> +%% you only type the third and fourth digit of the +%% year, then a `-', then the (arabic) number of +%% the month, then another `-', and then the actual +%% internal identifier +%% (a number of six digits preceding `.html' of the \URL). +%% I made this macro because I prefer typing to copying +%% from the \URL. +\newcommand*{\texhaxpref}[1]{% %% 2010/09/07 + \texhaxref{20\TL@piper@parse#1/\html}} %% 2011/05/03 +%% |\THpref{<id-code>}| is a variant of `\THref' using +%% <id-code> as with `\texhaxpref': +\newcommand*{\THpref}[1]{\texhaxpref{#1}{texhax}} %% 2011/03/24 +%% TODO: `\texhaxPref#1' searches list of offsets +%% to determine year/month from id ... +%% +%% \[|\texhaxyearmonthref{<2-digits>-<month-no>}|\] generates +%% `\texhaxref{<path>}' from \qtdcode{<2-digits>-<month-no>}---<path> +%% as in \secref{mail} ... +\newcommand*{\texhaxyearmonthref}{\texlistyearmonthref\texhaxref} +%% \[|\texhaxmonthref{<2-digits>-<month-no>}|\] generates +%% `\texhaxref{<path>}{<month>}' where <month> obeys `\langcode' ... +\newcommand*{\texhaxmonthref}{\texlistmonthref\texhaxref} +%% +%% ==== Other ==== +%% %% 2011/04/27 corr. doc. vol/issue +%% |\tugbartref{tb<vol>-<issue>/<filename-base>}{<text>}| +%% makes <text> a link to the \TUG boat article +%% `<filename-base>.pdf' in vol.~<vol> and issue~<issue>: +% \newcommand*{\tugbartref}[1]{\tugref{TUGboat/Articles/#1\pdf}} +\newcommand*{\tugbartref}[1]{\tugref{TUGboat/#1.pdf}} +%% %% <- 2011/04/30 +%% That `tb' can be dropped with +%% \[|\tugbArtref{<vol>-<issue>/<filename-base>}{<text>}|\] +%% %% <- 2015/03/27 -> +%% after this definition: +\newcommand*{\tugbArtref}[1]{\tugbartref{tb#1}} +%% |\tugiref{<anchor>}{<text>}| makes <text> %% <text> 2012/07/23 tugi 2012/08/05 +%% a link to an <anchor> +%% on the \TUG\ web page entitled \qtd{TeX Resources on the Web} +%% (e.g., $<anchor>=\mbox{\qtdcode{web}}$ shows the section entitled +%% \tugiref{web}{\qtd{\TeX~web projects}}): +\newcommand*{\tugiref}[1]{\tugref{interest\html\##1}} +%% It was `\TUGIref' until v0.6, we keep this for compatibility +%% (deprecated): +\newlet\TUGIref\tugiref +%% +%% === \acro{UK FAQ} === +%% |\ukfaqref{<label>}{<text>}| makes <text> a link to +%% the UK~\TeX~FAQ page with ``label"~= <label>: +\newcommand*{\ukfaqref}[1]{\httpref{% +% www.tex.ac.uk/cgi-bin/texfaq2html?label=#1}} + www.tex.ac.uk/FAQ-#1.html}} %% 2015/07/20 +%% +%% === Wikibooks === +%% \label{sec:wikibooks} %% 2013/01/21 +%% |\wikilangbooksref{<language-code>}{<book>/<subject>}{<text>}| +%% %% <- ref 2012/10/04, <book>/<subject> +\newcommand*{\wikilangbooksref}[1]{% %% `lang' 2012/01/06 + \httpbaseref{#1.wikibooks.org/wiki}} +%% |\latexwikibookref{<subject>}{<text>}| \ %% \ 2012/12/16 +%% refers to the %% rm. extra arg. 2012/10/24 +%% (English) \latexwikibookref{}{\emph{\LaTeX} wikibook:} %% lc 2012/12/16 +\newcommand*{\latexwikibookref}[1]{\wikilangbooksref{en}{LaTeX/#1}} +%% The German +%% \wikilangbooksref{de}{LaTeX-Kompendium}{\dqtd{\LaTeX-Kompendium}} +%% is somewhat difficult, I leave it for now~... +%% +%% %% 2012/12/16: +%% |\texwikibookref{<subject>}{<text>}| \ refers to the +%% % \texwikibookref{}{\emph{\TeX} wikibook.} +%% \wikilangbooksref{en}{TeX}{\emph{\TeX} wikibook.} +%% E.g., <subject> may access a description of the +%% \wikilangbooksref{en}{TeX#TeX_Primitives}{\TeX\ \emph{primitive}} +%% `\<subject>', such as `\texwikibookref{if}{\cs{if}}' +%% for \texwikibookref{if}{\cs{if}}. However, some primitives +%% have not been described yet, and the whole \TeX\ wikibook +%% largely is just a list of what needs to be done. +\newcommand*{\texwikibookref}[1]{\wikilangbooksref{en}{TeX/#1}} +%% +%% == Leaving and Version HISTORY == %% 2012/03/09 +\endinput +%% VERSION HISTORY +v0.1 2011/01/24 new file, code from blog.sty v0.3 +v0.2 2011/01/27 \urlfoot, \NormalHTTPref, \foothttpurlref, + "outline" adjusted; + more consistent use of \newcommand and + \@ifdefinable (TODO: guarded \let) +v0.3 2011/02/10 [blog]; \urlpkgfoot +v0.4 2011/04/27 doc. \tugbartref\ corrected + 2011/04/30 shortened link in \tugbartref + 2011/05/03 \TL@piper@parse, tried \ctanannref + 2011/05/13 reworking Wikipedia, arbitrary languages + 2011/06/27 doc.: \acro; \httpsref, \ctanannref + 2011/07/23 doc.: typo \acro{TUG}, `Almost all', page breaks; + \Wikidisambref: different order of arg.s + 2011/08/18 doc.: \acro with UK; wikibooks + 2011/08/27 doc. \acro with URL and PDF; + more doc and code changes for https +uploaded with MOREHYPE r0.4 (not touched by r0.41) +v0.41 2011/09/03 doc.: more specific on \urluml/Wikipedia + 2011/10/06 \mirrorctanref, \tugctanfileref, + \mirrorctanfileref, \ltxcontrib + 2011/10/10 doc. formatting of previous +uploaded with MOREHYPE r0.5(1) +v0.5 2011/10/19 doc. fix LaTeX Wikibook + 2011/10/20 \urlfmt, \filenamefmt and \pkgnamefmt + changed and moved, modified doc. on them, + doc. uses \URL + 2011/10/21 re-order CTAN, \pagebreak's, \ctanref and + choice for it, doc. modified; rm. \ithttpref +uploaded with MOREHYPE r0.52 +v0.6 2012/01/06 \wikilangref etc., \wikiref etc. depend on + \langcode + 2012/01/11 removed old comments for Wikipedia; (C) + 2012/03/09 "URL bases" (\httpbaseref etc.), applied; + \bytopicref uses \mirrorctanref + 2012/03/12 fixed \texhaxref + 2012/04/09 \ctanorgbaseref, \ctanpkgauref + 2012/04/10 makedoc link works! + 2012/05/13 example for \wikilangref corrected +uploaded with MOREHYPE r0.6 +v0.7 2012/07/23 doc.: <text> + 2012/08/05 \tugiref + 2012/10/04 doc. wikibooks: ref + 2012/10/24 ...monthref... requiring `langcode.sty', moving + links to mailing list pages from `texblog.fdf' + here; doc.: \pagebreak s, wikibooks: <book>..., + corr. args, \wikiref refers to `langcode.sty', + `ref', using \qtdcode (new in `makedoc.cfg') + 2012/11/08 doc.: Jim corr. + 2012/11/27 \ctanpkgstyref from 'texblog.fdf' + 2012/11/28 [[...|...]] +uploaded with MOREHYPE r0.7 +v0.7a 2012/12/01 link fix "Piped link" + -> r0.7a +v0.7b 2012/12/06 there again: blogexec -> markblog, above entry ... + -> r0.7b +v0.71 2012/12/08 \ctanannpref like \texhaxpref + -> r0.71 + +v0.8 2012/12/15 \domainref from `texblog.fdf' + doc.: \secref, gathering first subsections in + new section "Links in General" + 2012/12/16 \texwikibooksref; \domainref 1 code line, + mod. doc. LaTeX wikibook + 2012/12/17 \google..., \stackexref, \catalogueref; + doc.: todo done + corr. in sec:bases, + wiki extended, suffix -> tag + 2012/12/18 \cataloguestartref, \html + 2012/12/19 \cat@ctan@pkg@ref, \@double@first@arg; + doc. uses {example}, \fbox, etc. + 2012/12/20 \ctanpkgtopicref + -> r0.8 +v0.81 2012/12/28 doc.: "fonts" \provide, corr. \pkgnamefmt, + reworked \urlfoot + 2012/12/29 \tugctanorg; doc.: TODO on "fonts", + more on Jim ... \tugctanorg + 2012/12/30 ... in sec:search-pkg; mod. doc. \ctanpkgauref, + more doc. wiki "overview", \simplecodefbox etc., + 2012/12/31 doc. "the" Welcome ... + -> r0.81 +v0.82 2013/01/18 \tugctanorg -> alan.smcvt.edu + 2013/01/19 reworking doc. on CTAN; \pagebreak + 2013/01/20 updated (C), reworking doc. on CTAN + 2013/01/21 \MakeBasedHref, \wwwctanref, \usewwwctan, + \newlet; doc.: typo fix, updated sec:x.ctan.org + 2013/01/21 applying \newlet, \myctanref, \usemyctan, + \ctanfileref reimplemented, \filectanref, + \dirctanref; doc.: \ltxcontrib with {example} + -> r0.82 +v0.83 2013/02/04 comment out code for alan.smcvt.edu and + reduce doc. on it -- started + 2013/02/20 \tugbArtref; sec. "Obvious Shorthands": + \hmtl moves, \htm, \pdf, \DoubleArg; + some adjustments for AZ's vanishing; + doc. "Fonts for" -> "Formatting" + 2014/05/25 updated Google search link + 2015/03/27 doc. lines on "dropped" and "URL bases"; + 2015/05/16 short UK FAQ URL + 2015/05/17f. new doc. CTAN: overview/summary + 2015/05/18 rm. old doc. on Jim, reducing CTAN base cmd.s + 2015/05/19 CTAN domains, description pages reworked + 2015/05/20 more discovering, tidyingm and reworking + w.r.t. CTAN + 2015/05/21 doc. fix \dirctanref, ren. titles; \sciservref, + fewer CTAN domains, \texarchive and reworked ... + \awfulexample ... replaced + 2015/05/22 rm. bitelist considerations/\pagebreaks, + different titles + 2015/05/23 typo fix; \nullctanorgbases, reduce table text; + \paragraph -> again reworking early parts of + CTAN section + 2015/05/24 opening CTAN files ready; \prefixref; + doc.: removing page breaks + 2015/05/25 another \newlet; again reworking the CTAN + tables section. + 2015/05/26 doc. \cat@ctan...; \nullctanorgbaseref etc. + -- finished CTAN section + 2015/05/28 some more doc. on mailing lists; \THpref; + rm. "short UK FAQ" -- did *not* work! + 2015/06/14 rm. spurious section title + 2015/07/20 another short URL for the UK FAQ |