summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/morehype/twocolpg.sty
blob: f3d2711836c9c0396c919f39965e2879d8485eee (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
\ProvidesPackage{twocolpg}[2011/09/01 2-col. page 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 
%%
\RequirePackage{blog} 

\newif\iftight    \newif\ifdeep         %% 2011/04/29
%% 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:
\newenvironment{spancolscell}[2]{%
    \starttr\startTd{\@colspan{#1} #2 % 
                     \@width{100\%}}% %% TODO works? 
    }{\endTd\endtr}
\newenvironment{hiddencells}
    {\startTable{}\starttr}
    {\endtr\endTable}
\newenvironment{pagehiddencells}
    {\indentii\hiddencells}
    {\indentii\endhiddencells}
\newenvironment{FixedWidthCell}[2]
    {\startTd{#2}\startTable{\@width{#1}}%
     \starttr\startTd{}}
    {\endTd\endtr\endTable\endTd}
\newcommand*{\tablehspace}[1]{\startTd{\@width{#1} /}}
%% <img>:
\newcommand*{\simpleinclgrf}[1]{\IncludeGrf{alt="" \@border{0}}%
                                           {#1}}
\newcommand*{\IncludeGrf}[2]{<img #1 src="#2">}
\newcommand*{\includegraphic}[6]{% 
    \IncludeGrf{%
        \@width{#1} \@height{#2} %% data; presentation:
        \@border{#4} 
        alt="#5" \@title{#6}}%
        {#3}}
\newcommand*{\insertgraphic}[9]{%   %% TODO cf. ...
    \IncludeGrf{%
        \@width{#1} \@height{#2} %% data; presentation:
        \@border{#4} 
        align="#5" hspace="#6" vspace="#8"
        alt="#8" \@title{#9}}%
        {#3}}
\newcommand*{\inclgrfref}[7]{%
    \fileref{#4}{\includegraphic{#1}{#2}{#3}%
                                {#5}{#6}{#7}}}

%% HTTP/Wikipedia tooltips:
\newcommand*{\httptipref}[2]{%
  \TagSurr a{\@title{#1}\@href{http://#2}\@target@blank}}
%% TODO \@title bad with pdfLaTeX.
\newcommand*{\@target@blank}{target="blank"}
\newcommand*{\wikitipref}[2]{%
    \httptipref{Wikipedia}{#1.wikipedia.org/wiki/#2}}
\renewcommand*{\wikideref}{\wikitipref{de}}
\renewcommand*{\wikienref}{\wikitipref{en}}


%% PAGE STRUCTURE: 
\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}{}%
}
%% general head macros:
\newcommand*{\headgrf}  [1]{%
    \indentiii\simplecell{\simpleinclgrf{#1}}}
\newcommand*{\headskip}    {\indentiii\tablehspace}
\newcommand*{\headtitle}[2]{\indentiii\simplecell{\heading#1{#2}}}
% \newcommand*{\headgrfskiptitle}[3]{%
%   \pagehiddencells
%     \headgrf{#1}\CLBrk
%     \headskip{#2}\CLBrk
%     \headtitle1{#3}\CLBrk
%   \endpagehiddencells}
\newcommand*{\headuseskiptitle}[3]{%
  \pagehiddencells\CLBrk
    \indentiii\simplecell{#1}\CLBrk
    \headskip{#2}\CLBrk
    \headtitle1{#3}\CLBrk
  \endpagehiddencells}

\newcommand*{\PAGENAVI}{%
    \indenti\endspancolscell\CLBrk
    \indenti\starttr\CLBrk 
    \ \comment{NAVIGATION COL}\CLBrk 
    \indentii\FixedWidthCell\pagenavicolwidth
                           {\@class{paper} \@valign@t}
%%                      %% omitting `\@height{100\%}' 
    \itemize}
\newcommand*{\PAGEMAINvar}[1]{%
    \indentii\enditemize\ \endFixedWidthCell\CLBrk
    \ \comment{ MAIN COL }\CLBrk
    \indentii\FixedWidthCell{#1}{}} 
\newcommand*{\PAGEMAIN}{\PAGEMAINvar\pagemaincolwidth}
\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}%
}
\newcommand*{\PAGEEND}{\indenti\endspancolscell\endTable}

\endinput