From fbc73b62c78b771a4d7064eb308e1feaac2cd046 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 11 Jun 2018 12:38:32 +0900 Subject: add aeb-mobile --- texmf-dist/tex/latex/aeb-mobile/aeb-mobile.sty | 28 +++++ texmf-dist/tex/latex/aeb-mobile/aeb_mobile.sty | 139 +++++++++++++++++++++++++ texmf-dist/tex/latex/aeb-mobile/spdef.sty | 42 ++++++++ 3 files changed, 209 insertions(+) create mode 100644 texmf-dist/tex/latex/aeb-mobile/aeb-mobile.sty create mode 100644 texmf-dist/tex/latex/aeb-mobile/aeb_mobile.sty create mode 100644 texmf-dist/tex/latex/aeb-mobile/spdef.sty (limited to 'texmf-dist/tex') diff --git a/texmf-dist/tex/latex/aeb-mobile/aeb-mobile.sty b/texmf-dist/tex/latex/aeb-mobile/aeb-mobile.sty new file mode 100644 index 00000000..54159344 --- /dev/null +++ b/texmf-dist/tex/latex/aeb-mobile/aeb-mobile.sty @@ -0,0 +1,28 @@ +%% +%% This is file `aeb-mobile.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% aeb_mobile.dtx (with options: `copyright,altpkgname') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% aeb_mobile.sty package %% +%% Copyright (C) 2012-2018 %% +%% dpstory@acrotex.net %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1 of the %% +%% License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{aeb-mobile} + [2018/04/26 v1.0 aeb-mobile Alt-name (dps)] +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{aeb_mobile}} +\ProcessOptions +\RequirePackage{aeb_mobile} +\endinput +%% +%% End of file `aeb-mobile.sty'. diff --git a/texmf-dist/tex/latex/aeb-mobile/aeb_mobile.sty b/texmf-dist/tex/latex/aeb-mobile/aeb_mobile.sty new file mode 100644 index 00000000..8705abc2 --- /dev/null +++ b/texmf-dist/tex/latex/aeb-mobile/aeb_mobile.sty @@ -0,0 +1,139 @@ +%% +%% This is file `aeb_mobile.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% aeb_mobile.dtx (with options: `copyright,package') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% aeb_mobile.sty package %% +%% Copyright (C) 2012-2018 %% +%% dpstory@acrotex.net %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1 of the %% +%% License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e}[1997/12/01] +\ProvidesPackage{aeb_mobile} + [2018/04/26 v1.4 aeb\_mobile: Formatting for mobile devices (dps)] +\@ifundefined{ifsmartphone}{\newif\ifsmartphone\smartphonetrue}{} +\DeclareOption{smartphone}{\ifsmartphone\AtEndOfPackage{% + \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{8in}{4in}}\fi} +\newif\ifmob@maketitledefn \mob@maketitledefntrue +\DeclareOption{nomaketitle}{\mob@maketitledefnfalse} +\newif\ifmob@useforms \mob@useformsfalse +\DeclareOption{useforms}{\mob@useformstrue} +\newif\ifmobscalefigures\mobscalefiguresfalse +\newcommand{\scalefiguresOn}{\mobscalefigurestrue} +\newcommand{\scalefiguresOff}{\mobscalefiguresfalse} +\DeclareOption{scalefigures}{\mobscalefigurestrue} +\DeclareOption{!scalefigures}{\mobscalefiguresfalse} +\ProcessOptions +\ifsmartphone\else\expandafter\endinput\fi +\RequirePackage{web} +\RequirePackage{eforms} +\@ifpackageloaded{aeb_pro}{% + \DeclareInitView{% + layoutmag={pagelayout=TwoColumnLeft,mag=FitWidth}, + windowoptions=showtitle}}{% + \hypersetup{pdfdisplaydoctitle=true,% + pdfstartview=FitH -32768,pdfpagelayout=TwoColumnLeft}} +\ifmob@maketitledefn +\renewcommand{\makeinlinetitle} +{% + \begingroup\parskip0pt\parindent0pt + \par\vspace*{6pt} + \noindent\makebox[\linewidth][c]{\bfseries + \color{\webuniversity@color}\webuniversity}\par\kern6pt\noindent + \makebox[\linewidth][c]{\parbox[c]{.75\linewidth}{\centering + \bfseries\color{\webtitle@color}\webtitle}}\par\kern12pt + \noindent\parbox{\linewidth}{\scriptsize + \web@copyright\space\the\year\hfill\thewebemail\\ + \@date\hfill\@ifundefined{aeb@talksite}{\webversion} + {\ifx\aeb@talksite\@empty\webversion + \else\aeb@talksite\fi}% + }\par + \noindent\makebox[\linewidth]{\rule{.67\linewidth}{.4pt}}% + \par\endgroup +} +\fi +\renewcommand{\paragraph}{\edef\mob@partpgraphexp{\noexpand + \@startsection{paragraph}{4}{0pt}% + {\ifdim\parskip=0pt12pt\else0pt\fi}}% + \mob@partpgraphexp{-3pt}{\bfseries}} +\def\mob@adjwidth#1{\ifmobscalefigures{\dimen0=#1 + \dimen0=2\dimen0\relax + \xdef\mob@djwidth{\expandafter\the + \ifdim\dimen0<\textwidth + \dimen0 \else\textwidth\fi}% + }\else\gdef\mob@djwidth{#1}\fi +} +\@ifpackageloaded{graphicx}{% + \define@key{Gin}{width}{\mob@adjwidth{#1}% + \edef\Gin@ewidth{\mob@djwidth}}% +}{} +\begin{insDLJS}[_mobileJS]{mobile}{JS supporting mobile formatting} +var _mobileJS=true +function _printIt(){ + var pp=this.getPrintParams(); + pp.pageHandling=pp.constants.handling.nUp; + pp.nUpPageOrder=pp.constants.nUpPageOrders.Horizontal; + pp.nUpNumPagesH=2; + pp.nUpPageBorder=false; + pp.nUpAutoRotate=false; + this.print(pp); +} +function _toggleViews() { + this.zoomType=zoomtype.fitW; + this.layout=(this.layout!="TwoColumnLeft")?% +"TwoColumnLeft":"OneColumn"; +} +\end{insDLJS} +\newcommand{\mobPrint}[1]{\def\mob@print{#1}} +\mobPrint{Print} +\newcommand{\mobPrintTip}{Click to print this document in two-column + format, recommended.} +\newcommand{\mobToggleCols}[1]{\def\mob@toggleCols{#1}} +\mobToggleCols{Toggle Cols} +\newcommand{\mobToggleColsTip}{Click to toggle between single-column + and two-column page layouts.} +\newcommand{\mobFormPresets}[1]{% + \def\mob@FormPresets{#1}} +\mobFormPresets{\S{S}\BC{}\textSize{8}\autoCenter{n}} +\newcommand{\mobPrintIt}[1][]{% + \ifmob@useforms + {\footnotesize\def\ef@btnspcr{}% + \settoheight{\@tempdima}{\strut}% + \settodepth{\@tempdimb}{\strut}% + \addtolength{\@tempdima}{\@tempdimb}% + \raisebox{-\@tempdimb}{\pushButton[#1\F{-\FPrint} + \TU{\mobPrintTip} + \presets{\mob@FormPresets}% + \CA{\mob@print}\A{\JS{_printIt();}}% + ]{mobPrintIt}{}{\@tempdima}}}\else + \setLink[#1\A{\JS{_printIt();}}]{\mob@print}\fi +} +\newcommand{\mobTwoCols}[1][]{% + \ifmob@useforms + {\footnotesize\def\ef@btnspcr{}% + \settoheight{\@tempdima}{\strut}% + \settodepth{\@tempdimb}{\strut}% + \addtolength{\@tempdima}{\@tempdimb}% + \raisebox{-\@tempdimb}{\pushButton[#1\F{-\FPrint} + \TU{\mobToggleColsTip}\presets{\mob@FormPresets}% + \CA{\mob@toggleCols}\A{\JS{_toggleViews();}}% + ]{mobToggleCols}{}{\@tempdima}}}\else + \setLink[#1\A{\JS{_toggleViews();}}]{\mob@toggleCols}\fi +} +\lheader{\mobPrintIt\relax\ifmob@useforms\kern3bp + \else\,/\,\fi\mobTwoCols\relax} +\newcommand{\generateEvenPage}{\ifodd\value{page}\else + \newpage\lheader{}\null\fi} +\AtEndDocument{\generateEvenPage} +\endinput +%% +%% End of file `aeb_mobile.sty'. diff --git a/texmf-dist/tex/latex/aeb-mobile/spdef.sty b/texmf-dist/tex/latex/aeb-mobile/spdef.sty new file mode 100644 index 00000000..0b4b3006 --- /dev/null +++ b/texmf-dist/tex/latex/aeb-mobile/spdef.sty @@ -0,0 +1,42 @@ +%% +%% This is file `spdef.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% spdef.dtx (with options: `copyright,package') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% spdef.sty package, 2012-01-22 %% +%% Copyright (C) 2012 D. P. Story %% +%% dpstory@uakron.edu %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1 of the %% +%% License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{spdef} + [2012/08/20 v1.2 Defines a switch for smartphone] +\RequirePackage{kvoptions}[2009/07/21] +\newif\ifsmartphone \smartphonefalse +\DeclareVoidOption{ph}{\smartphonetrue} +\DeclareVoidOption{pa}{\smartphonefalse} +\DeclareVoidOption{!ph}{\smartphonefalse} +\DeclareVoidOption{!pa}{\smartphonetrue} +\define@key{spdef}{use}{\@ifundefined{#1}{% + \expandafter\newif\csname if#1\endcsname}{}\csname#1true\endcsname} +\define@key{spdef}{!use}{\@ifundefined{#1}{% + \expandafter\newif\csname if#1\endcsname}{}\csname#1false\endcsname} +\ProcessKeyvalOptions{spdef} +\def\ifsp@default#1#2{\ifsmartphone + \expandafter\def\csname sp@next\endcsname{#1}\else + \expandafter\def\csname sp@next\endcsname{#2}\fi\sp@next} +\def\ifsp@expand#1#2{\ifsmartphone#1\else#2\fi} +\let\ifsp\ifsp@default +\newcommand{\expexe}[1]{\edef\sp@expexe{\noexpand#1}\sp@expexe} +\endinput +%% +%% End of file `spdef.sty'. -- cgit v1.2.3