summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/aeb-mobile/examples/mobile.tex
blob: 41461110bc2b7f3e6132d3e55e197e35f4e4fccd (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
% Studies in mobile formatting for PDF files
% http://www.acrotex.net/blog/?p=766
\RequirePackage[ph]{spdef}
\documentclass[\ifsmartphone12pt\fi,fleqn]{article}
\usepackage{graphicx}
\usepackage[tight,pro]{web}
\usepackage{eforms}
\usepackage[smartphone,useforms]{aeb-mobile}

\DeclareDocInfo
{%
    university={Acro\negthinspace\TeX.Net},
    title={Notes on formatting for a Windows Smart
        Phone\texorpdfstring{\nlfootnotemark}{}},
    author={D. P. Story},
    email={dpstory@acrotex.net},
    subject={Studies in mobile formatting},
    talksite={\href{http://blog.acrotex.net}{Acro\negthinspace\TeX.Net Blog}},
    version={1.0},
    keywords={LaTeX,Windows Mobile,Smartphone,iPad,PDF},
}

\def\nlfootnote#1{\begin{NoHyper}\footnote{#1}\end{NoHyper}}
\def\nlfootnotemark{\begin{NoHyper}\footnotemark{}\end{NoHyper}}

\parskip6pt\parindent0pt

\begin{document}

\ifsmartphone\makeinlinetitle
\else\maketitle\fi

\footnotetext{When viewing this PDF file on a desktop or laptop, you can
    go into \textsf{Reading Mode} by pressing Ctrl+H (Command+H, for
    Mac~OS).}

\section{Introduction}

The dimensions of the document are 4 inches wide and 8 inches high. The
default font size is set to 12~point.

This layout was tested on my mobile device, a \textbf{\textsf{Samsung
Focus}}, with a \textbf{\textsf{Windows OS}}. The display screen is 800 by
480 pixels (a 5:3 aspect ratio).

Below is a math equation to determine the quality of rendering of math.
\[
  \sin^2(x) + \cos^2(x) = 1
\]
We also include a picture to test the quality here too.
\begin{center}
    \includegraphics[width=.67\linewidth]{dpsweb}
\end{center}

The goal is to maximize the experience of the user, that's you, when you
\emph{view} or \emph{print} this document in \textbf{Adobe Reader} on a
computer/laptop, and when you view this document on a smart phone (such as
my \textbf{\textsf{Samsung Focus}}) or an \textbf{\textsf{iPad}}.

\paragraph*{\color{blue}For the Desktop/Laptop.} We list the major design
points:\vspace{-\parskip}
\begin{itemize}
\item The initial view of Adobe Reader is set to  \textsf{Two-Up
    Continuous (Facing)} and \textsf{Fit Width}. When you view the
    \textsf{PDF} on a computer, you get a page of 8~inches wide and
    two columns. This format reads comfortably.
\item The \textbf{Print} button at the top-left of each page prints the
    document with two digital pages per physical page. It prints out how the
    document looks when viewed (with 2Up).
\item The \textbf{Toggle Cols} in the upper-left corner, toggles
    between a single column fit to the width of the window, and the
    two-column layout (fit to width also).

\end{itemize}

\paragraph*{\color{blue}For the \textsf{Smart Phone/iPad}.}
When viewing the document in a smart phone or an \textbf{\textsf{iPad}}, the initial view is
ignored; you get a single, continuous page. The width of the page and
the font size make it easy to read on a digital device. Links do not work
in the app version of \textbf{Adobe Reader}, so the \textbf{Print} and \textbf{Toggle Cols}
links do not work.

\paragraph*{\color{blue}\LaTeX{} Details.}
I used the new package named \textsf{aeb\_mobile}, with the
\texttt{smart\-phone},
\begin{verbatim}
    \usepackage[smartphone,
        useforms]{aeb_mobile}
\end{verbatim}
The package is very simple, it uses the \textsf{web} and \textsf{eforms}
packages. The \textsf{web} is used for the
page layout, and \textsf{eforms} for the links, though \textsf{hyperref}
provides links as well. \textsf{aeb\_mobile} also inserts some document
level JavaScript to define the actions of the two links \textbf{Print} and
\textbf{Toggle~Cols}.

\paragraph*{\color{blue}After Distilling.} I modified the \textbf{Mobile} setting
of the \textbf{\textsf{PDF} Optimizer} dialog box; in the \textbf{Discard
Objects} panel, I unchecked the item \textbf{Discard all Java\-Script
actions}, and in the \textbf{Discard User Data} panel, I unchecked
\textbf{Discard external cross references}. After distilling, the file
size is 71~KB and after \textbf{\textsf{Optimized \textsf{PDF}}} with my
modified \textbf{Mobile} setting the file size is about
57~KB.\nlfootnote{Actual file size may differ from the values stated as I
add text to the document, such as this footnote.}

\textbf{\textcolor{red}{Important:}} Though I have used \textbf{Adobe Distiller}, 
there is nothing in the \textsf{aeb\_mobile}
package that requires it. The document author may use \textsf{pdflatex}, for
example, as the PDF creator.

\paragraph*{\color{blue}Finally.}
I've added an \texttt{\string\AtEndDocument} event to generate an
additional page if there is only an odd number of pages.

Now, back to my retirement. \textsl{dps}

\bigbreak

\paragraph*{\color{red}Questions.}
How does this \textsf{PDF} view in your smart phone or
\textbf{\textsf{iPad}}? Send me your comments, and suggested features. My
email is \href{mailto:dpstory@acrotex.net}{dpstory@acrotex.net}.



\end{document}