diff options
author | Karl Berry <karl@freefriends.org> | 2012-12-02 23:18:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-12-02 23:18:36 +0000 |
commit | 59e52a9aaf7ccb545c0e6c410f3859a7b79b43aa (patch) | |
tree | a9d353045009336295b169b1cd9f46a9f8f1e5ab /Master/texmf-dist/tex/latex/morehype/blogligs.sty | |
parent | ecbf2241f32ef261ee58622856756a9e42211886 (diff) |
morehype (2dec12)
git-svn-id: svn://tug.org/texlive/trunk@28418 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/morehype/blogligs.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/morehype/blogligs.sty | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/morehype/blogligs.sty b/Master/texmf-dist/tex/latex/morehype/blogligs.sty new file mode 100644 index 00000000000..75beb5beff7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/morehype/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 + |