diff options
author | Karl Berry <karl@freefriends.org> | 2011-10-16 22:25:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-10-16 22:25:43 +0000 |
commit | aa467adcb6fa142686fa83b549b69a1d51e49d34 (patch) | |
tree | 51cb8d6573ad4861f701f87a538e6afa8a3cddbb /Master/texmf-dist/tex/latex/morehype/blogdot.sty | |
parent | e37d3f4634ed187dba355c4ce6e005f86c7376f4 (diff) |
morehype (16oct11)
git-svn-id: svn://tug.org/texlive/trunk@24303 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/morehype/blogdot.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/morehype/blogdot.sty | 150 |
1 files changed, 121 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/morehype/blogdot.sty b/Master/texmf-dist/tex/latex/morehype/blogdot.sty index 08f4779a099..699cb64805a 100644 --- a/Master/texmf-dist/tex/latex/morehype/blogdot.sty +++ b/Master/texmf-dist/tex/latex/morehype/blogdot.sty @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e}[1994/12/01] %% \newcommand* etc. -\ProvidesPackage{blogdot}[2011/10/10 v0.2 HTML presentations (UL)] +\ProvidesPackage{blogdot}[2011/10/15 v0.3 HTML presentations (UL)] %% copyright (C) 2011 Uwe Lueck, %% http://www.contact-ednotes.sty.de.vu %% -- author-maintained in the sense of LPPL below. @@ -30,11 +30,14 @@ %% \end{quote} %% mean. %% The choices are what I thought should work best -%% on my 1024$\times$600 screen; but I had to optimize -%% the left and right margins experimentally -%% (with Mozilla Firefox~3.6.22 for Ubuntu canonical~-~1.0); -%% see `blogdot.cfg': -\newcommand*{\leftpagemargin}{192} +%% 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, @@ -58,6 +61,16 @@ % \renewcommand*{\body}{% % </head>\CLBrk % <body \@bgcolor{\bodybgcolor} \@align@c>} +%% |\CommentBlogDotWholeWidth| procuces no \HTML\ code ... +\global\let\BlogDotWholeWidth\@empty +%% ... unless calculated with |\SumBlogDotWidth|: +\newcommand*{\SumBlogDotWidth}{{% + \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} @@ -65,7 +78,8 @@ \newcommand*{\startscreenpage}[2]{%% 0 2011/09/25!?: \startTable{% \@cellpadding{0} \@cellspacing{0}% - \maybe@showmargins + \maybe@blogdot@borders %% 2011/10/12 + \maybe@blogdot@frame %% 2011/10/14 }% \CLBrk %% 2011/10/03 \starttr @@ -88,17 +102,9 @@ %% Final cell of first row determines right margin width: \startTd{\@width{\leftpagemargin}}\endTd \endtr -% \tablerow{#1}% \starttr \emptycell\startTd{\@height{\typeareaheight}#1}% } -%% |\ShowBlogDotMargins| shows borders of the page margins: -%% %% 2011/10/03 -\let\maybe@showmargins\@empty -\newcommand*{\ShowBlogDotMargins}{% - \def\maybe@showmargins{\@frame@box rules="all"}} -%% However, the rules seem to affect horizontal positions ... -%% %% |\titlescreenpage| (`\STARTscreenpage' TODO?) %% 2011/10/03 %% opens the title page (I thought). To get it to your screen, %% (make and) click a link like @@ -115,20 +121,26 @@ %% The corner at its right is a link to the anchor to whose name %% |\BlogDotRestart| expands. \newcommand*{\screenbottom}[1]{% + \ifFillBlogDotTypeArea + </p>\ancref{#1}{\BlogDotFillText}% + \fi \endTd\emptycell \endtr \CLBrk - \starttr + \tablerow{bottom margin}% %% 2011/10/13 \emptycell \CLBrk - \simplecell{\ancref{#1}% - {\hvspace{\typeareawidth}% - {\lowerpagemargin}}}% + \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}}}% - \endtr + \endtablerow \CLBrk \endTable } @@ -163,7 +175,7 @@ %% 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]{\TagSurr{h#1}{\@align@c}} +\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 @@ -179,22 +191,102 @@ {\startTable{\@width{#1}}\starttr\startTd{}} {\endTd\endtr\endTable} %% -%% == Test for `blogdot.cfg' == -\InputIfFileExists{blogdot.cfg}{% - \typeout{ - * Using local settings from \string`blogdot.cfg\string' *}% -}{} -%% == The End == -\endinput +%% == 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). It 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 this 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: +\newcommand*{\DontShowBlogDotFillText}{% + \def\BlogDotFillTextColor{\textcolor{\bodybgcolor}}} +\newcommand*{\ShowBlogDotFillText}{% + \def\BlogDotFillTextColor{\textcolor{red}}} +\DontShowBlogDotFillText +%% |\TryBlogDotCFG| looks for `blogdot.cfg', +%% |\TryBlogDotCFG[<file-name-base>]| +%% 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 %% -%% == VERSION HISTORY == +%% == 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 |