\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\~{&nbsp;}%                    %% 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

