blob: 0b0be279b99d18cd2b7b41f541d205aa4f5a8748 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
\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
|