summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-21 23:25:25 +0000
committerKarl Berry <karl@freefriends.org>2013-03-21 23:25:25 +0000
commit97076a9b1a7446442e2fd04f77d36da8672125f3 (patch)
tree949fec33ce6d7460a2deacf0e5ebf1d4cc0f1e3a
parentcc6a974dc0c0e376fea2434265b38e70a55ad562 (diff)
ebook (21mar13)
git-svn-id: svn://tug.org/texlive/trunk@29466 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/ebook/README28
-rw-r--r--Master/texmf-dist/tex/latex/ebook/ebook.sty92
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check3
-rw-r--r--Master/tlpkg/tlpsrc/collection-publishers.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/ebook.tlpsrc0
5 files changed, 123 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/ebook/README b/Master/texmf-dist/doc/latex/ebook/README
new file mode 100644
index 00000000000..02feacbe239
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ebook/README
@@ -0,0 +1,28 @@
+The file ebook.sty contains a brief description.
+
+Intended use is
+
+ \documentclass{...}
+ \usepackage{ebook}
+ ...
+ \begin{document}
+ \ebook % be careful if not the first command
+ ...
+ \end{document}
+
+Results have been tested with a Kindle e-ink and an iPad mini only.
+In both cases the loaded document was rendered almost as expected. A
+command, \pagefill (to be used instead of \newpage), is motivated by a
+weakness in Kindle's pdf presentation.
+
+Proper rendering depends on the unit's pdf-reader, and Kindle's is a
+little weak in its handling of partly filled pages.
+
+Essentially the page size is set by using the geometry package with
+the text area set to 90%. In addition ebook.sty sets the pagestyle to
+empty (including the first page of the ToC).
+
+Ebook.sty is in the Public Domain.
+
+Author: Jørgen Steensgaard
+
diff --git a/Master/texmf-dist/tex/latex/ebook/ebook.sty b/Master/texmf-dist/tex/latex/ebook/ebook.sty
new file mode 100644
index 00000000000..4b2cb7ab17d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ebook/ebook.sty
@@ -0,0 +1,92 @@
+%%% ====================================================================
+%%% @LaTeX-style-file{
+%%% author = "Jørgen Steensgaard",
+%%% version = "1",
+%%% date = "1 March 2013",
+%%% time = "20:50:55 BST",
+%%% filename = "ebook.sty",
+%%% email = "jsm@steensgaard.org",
+%%% codetable = "ISO/ASCII",
+%%% keywords = "LaTeX, page layout for PDF-ebooks",
+%%% supported = "no",
+%%% docstring = "Page description etc. suitable for writing
+%%% PDF-documents intended to be read on a
+%%% ebook renderers.
+%%% Uses packages moreverb, graphics and hyperref.
+%%% Sets \family- and seriesdefault.
+%%% Removes display of chapter numbers (ToC incl.)
+%%% Provides \ebook as a command that includes
+%%% details needed in the document section.
+%%% "
+%%% }
+%%% ====================================================================
+%
+% This file, ebook.sty, is in the public domain
+\AtBeginDocument{\addtocontents{toc}{\protect\thispagestyle{empty}}}
+\usepackage[ % Page description:
+ % common alternatives are a4paper, a5paper etc.
+ paperwidth=12cm, % horizontal screen size
+ paperheight=16cm, % vertical ditto
+ scale=0.9 % derive other layout details
+]{geometry}
+\usepackage{graphicx}
+\usepackage{hyperref}
+\usepackage{moreverb}
+
+\renewcommand{\familydefault}{cmss}
+\renewcommand{\seriesdefault}{sbc}
+\sffamily % sans-serif for readability
+\mdseries % extra font weight
+\setcounter{secnumdepth}{0}
+\setcounter{tocdepth}{2}
+\pagestyle{empty}
+
+
+\providecommand{\pagefill}[1][0.001mm]{
+\vfill\noindent
+\rule{#1}{#1}
+\newpage\noindent
+}
+
+\providecommand{\ebook}{
+\sffamily % sans-serif for readability
+\mdseries % extra font weight
+\setcounter{secnumdepth}{0}
+\setcounter{tocdepth}{2}
+\pagestyle{empty}
+\Large
+}
+
+\makeatletter
+\renewcommand{\@chapter}[2][]{%
+ \thispagestyle{empty}
+ \ifnum \c@secnumdepth >\m@ne
+ \refstepcounter{chapter}%
+ % \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}{#1}%
+ % {\protect\numberline{}#1}%
+ \else
+ \addcontentsline{toc}{chapter}{#2}%
+ \fi
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{10\p@}}%
+ \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \@makechapterhead{#2}%
+ \@afterheading
+}
+\renewcommand{\@makechapterhead}[1]{%
+ % \vspace*{50\p@}%
+ {\parindent \z@ \raggedright \normalfont
+ \interlinepenalty\@M
+ \Huge \bfseries #1\par\nobreak
+ \vskip 40\p@
+ }}
+\renewcommand{\@makeschapterhead}[1]{%
+ % \vspace*{50\p@}%
+ {\parindent \z@ \raggedright
+ \normalfont
+ \interlinepenalty\@M
+ \Huge \bfseries #1\par\nobreak
+ \vskip 40\p@
+ }}
+\makeatother
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 21f98a40282..2c8740de5f2 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -144,7 +144,8 @@ my @TLP_working = qw(
dvdcoll dvgloss dviasm dviincl dvipdfmx-def
dvipsconfig dynblocks dyntree
ean ean13isbn easy easy-todo easyfig easylist
- ebezier ebgaramond ebong ebsthesis ec ecc ecclesiastic ecltree eco economic
+ ebezier ebgaramond ebong ebook ebsthesis
+ ec ecc ecclesiastic ecltree eco economic
ecv ed edfnotes edmac edmargin ednotes eemeir eepic egameps
egplot eiad eiad-ltx eijkhout einfuehrung ejpecp
elbioimp electrum eledform eledmac ellipsis elmath elpres elsarticle
diff --git a/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc b/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc
index 159710bb5ab..b9fd026d733 100644
--- a/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc
@@ -27,6 +27,7 @@ depend chem-journal
depend classicthesis
depend cmpj
depend confproc
+depend ebook
depend ebsthesis
depend economic
depend ejpecp
diff --git a/Master/tlpkg/tlpsrc/ebook.tlpsrc b/Master/tlpkg/tlpsrc/ebook.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/ebook.tlpsrc