diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/morehype/blogdot.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/morehype/blogdot.sty | 200 |
1 files changed, 200 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/morehype/blogdot.sty b/Master/texmf-dist/tex/latex/morehype/blogdot.sty new file mode 100644 index 00000000000..08f4779a099 --- /dev/null +++ b/Master/texmf-dist/tex/latex/morehype/blogdot.sty @@ -0,0 +1,200 @@ +\NeedsTeXFormat{LaTeX2e}[1994/12/01] %% \newcommand* etc. +\ProvidesPackage{blogdot}[2011/10/10 v0.2 HTML presentations (UL)] +%% 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 +%% +%% == 'blog' Required == +%% 'blogdot' is an extension of 'blog' +%% (but what about options? TODO): +\RequirePackage{blog} +%% == Size Parameters == +%% \label{sec:dot-size} +%% I assume that it is clear what the following +%% six page dimension parameters +%% \begin{quote} +%% |\leftpagemargin|, |\rightpagemargin|, +%% |\upperpagemargin|,\\|\lowerpagemargin|, +%% |\typeareawidth|, |\typeareaheight| +%% \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} +\newcommand*{\rightpagemargin}{\leftpagemargin} +%% So |\rightpagemargin| ultimately is the same as +%% |\leftpagemargin| as long as you don't redefine it, +%% and it suffices to `\renewcommand' `\leftpagemargin' +%% in order to get a horizontically centered type area +%% with user-defined margin widths.---Something analogous +%% applies to |\upperpagemargin| and |\lowerpagemargin|: +\newcommand*{\upperpagemargin}{80} +\newcommand*{\lowerpagemargin}{\upperpagemargin} +%% A difference to the ``horizontal" parameters is +%% (I expect) that the position of the type area on the +%% screen is affected by |\upperpagemargin| only, +%% and you may choose |\lowerpagemargin| just large enough +%% that the next slide won't be visible on any computer screen +%% you can think of. +\newcommand*{\typeareawidth}{640} +\newcommand*{\typeareaheight}{440} +%% Centering with respect to web page body may work better on +%% different screens (2011/10/03), but it doesn't work here +%% (2011/10/04). +% \renewcommand*{\body}{% +% </head>\CLBrk +% <body \@bgcolor{\bodybgcolor} \@align@c>} +%% +%% == (Backbone for) Starting a ``Slide" == +%% \label{sec:dot-start} +%% |\startscreenpage{<style>}{<anchor-name>}| +\newcommand*{\startscreenpage}[2]{%% 0 2011/09/25!?: + \startTable{% + \@cellpadding{0} \@cellspacing{0}% + \maybe@showmargins + }% + \CLBrk %% 2011/10/03 + \starttr +%% First cell determines both +%% height of upper page margin |\upperpagemargin| +%% and +%% width of left page margin |\leftpagemargin|: + \startTd{\@width {\leftpagemargin }% + \@height{\upperpagemargin}}% +% \textcolor{\bodybgcolor}{XYZ}% + \endTd +%% Using |\typeareawidth|: +% \startTd{\@width{\typeareawidth}}\endTd + \simplecell{% + \CLBrk + \hanc{#2}{\hvspace{\typeareawidth}% + {\upperpagemargin}}% + \CLBrk + }% +%% 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 +%% \[`\ancref{START}{start presentation}':\] +\newcommand*{\titlescreenpage}{% + \startscreenpage{\@align@c}{START}} +%% +%% == Finishing a ``Slide" and ``Restart" (Backbone) == +%% \label{sec:dot-fin} +%% |\screenbottom{<next-anchor>}| finishes the current slide +%% and links to the <next-anchor>, the anchor of a slide opened by +%% \[`\startscreenpage{<style>}{<next-anchor>}'.\] +%% More precisely, the margin below the type area is that link. +%% The corner at its right is a link to the anchor to whose name +%% |\BlogDotRestart| expands. +\newcommand*{\screenbottom}[1]{% + \endTd\emptycell + \endtr + \CLBrk + \starttr + \emptycell + \CLBrk + \simplecell{\ancref{#1}% + {\hvspace{\typeareawidth}% + {\lowerpagemargin}}}% + \CLBrk + \simplecell{\ancref{\BlogDotRestart}% + {\hvspace{\rightpagemargin}% + {\lowerpagemargin}}}% + \endtr + \CLBrk + \endTable +} +%% The default for |\BlogDotRestart| is |START|---the title page. +%% You can `\renew'\-`command' it so you get to a slide +%% containing an overview of the presentation. +\newcommand*{\BlogDotRestart}{START} +%% +%% == Moving to Next ``Slide" (User Level) == +%% \label{sec:dot-next} +%% |\nextscreenpage{<style>}{<anchor-name>}| +%% puts closing the previous slide and opening the next +%% one---having anchor name `<anchor-name>'---together. +%% <style> is for style settings for the next page, +%% made here for choosing between centering the page/slide content +%% and aligning it flush left. +\newcommand*{\nextscreenpage}[2]{% + \screenbottom{#2}\CLBrk + \hrule \CLBrk + \startscreenpage{#1}{#2}} +%% |\nextcenterscreenpage{<anchor-name>}| chooses centering +%% the slide content: +\newcommand*{\nextcenterscreenpage}{\nextscreenpage{\@align@c}} +%% |\nextnormalscreenpage{<anchor-name>}| chooses flush left +%% on the type area determined by |\typeareawidth|: +\newcommand*{\nextnormalscreenpage}{\nextscreenpage{}} +%% +%% == Constructs for Type Area == +%% \label{sec:dot-type} +%% If you want to get centered titles with \xmltagcode{h2} etc., +%% you should declare this in `.css' files. But you may consider +%% 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}} +%% |\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 +%% determined by |\typeareawidth|. It may be used on +%% "centered" slides. It is made for lists whose entries are +%% so short that the page would look unbalanced under a +%% centered title with the list adjusted to the left +%% of the entire type area. (Thinking of standard \LaTeX, +%% it is almost the `{minipage}' environment, however lacking +%% the footnote feature, in that respect it is rather +%% similar to `\parbox' which however is not an environment.) +\newenvironment*{textblock}[1] + {\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 +%% +%% == VERSION HISTORY == +v0.1 2011/09/21f. started + 2011/09/25 spacing/padding off + 2011/09/27 \CLBrk + 2011/09/30 \BlogDotRestart +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 |