From b7cb0adc3e00972b31e4747906e0606751ef8ab0 Mon Sep 17 00:00:00 2001 From: cedounet <134267244+cedounet@users.noreply.github.com> Date: Tue, 15 Aug 2023 17:46:44 +0100 Subject: [PATCH] New Front page (#172) * Improve Title page - Made it full page (almost) - Added a second page with links to github, license info and hard-copy book * Add an xbb target for the cover page For some reasons using picture outside float environment confuses the ebook/dvi building --------- Co-authored-by: Cedric --- book/book.tex | 11 ++-------- book/{images => cover}/cover-page.jpg | Bin book/cover/cover.tex | 30 ++++++++++++++++++++++++++ book/makefile | 10 ++++++--- book/tex4ebook.cfg | 2 +- 5 files changed, 40 insertions(+), 13 deletions(-) rename book/{images => cover}/cover-page.jpg (100%) create mode 100644 book/cover/cover.tex diff --git a/book/book.tex b/book/book.tex index 5a4b5e4..461936d 100644 --- a/book/book.tex +++ b/book/book.tex @@ -8,17 +8,10 @@ \title{The Sourdough Framework} \begin{document} +\input{cover/cover.tex} +\titlepage \frontmatter -% Title page -\begin{titlepage} -\begin{center} - \includegraphics[width=\textwidth]{images/cover-page.jpg} - Version: - \today -\end{center} -\end{titlepage} - % \tableofcontents \ifdefined\HCode\else\tableofcontents\fi diff --git a/book/images/cover-page.jpg b/book/cover/cover-page.jpg similarity index 100% rename from book/images/cover-page.jpg rename to book/cover/cover-page.jpg diff --git a/book/cover/cover.tex b/book/cover/cover.tex new file mode 100644 index 0000000..2137420 --- /dev/null +++ b/book/cover/cover.tex @@ -0,0 +1,30 @@ +\thispagestyle{empty} +\setlength{\unitlength}{1mm} +\noindent\begin{picture}(0,0)(1,-1) +\put(-16.3,-265){\includegraphics[width=1.33\linewidth]{cover/cover-page.jpg}} +\end{picture} + +\newpage +\thispagestyle{empty} + +\rule{1pt}{\textheight} % Vertical line + % Whitespace between the vertical line and title page text +\hspace{0.05\textwidth} + % Paragraph box for holding the title page text, adjust the width to move the +% title page left or right on the page +%\raggedleft% +\parbox[b]{0.75\textwidth}{% +{\Huge\bfseries The Sourdough Framework}\\[2\baselineskip] % Title +{\large\textit{Version: \today}}\\[4\baselineskip] +{\Large\textsc{Hendrik Kleinwächter}} % Author name, lower case for consistent small caps + +% Whitespace between the title block and the copyright text +\vspace{0.5\textheight} + +{\noindent The full source code for the book is available at \\ +\url{https://github.com/hendricius/the-sourdough-framework/} under MIT +license. Do not hesitate to report mistakes or sug\-gestions for +improvements. A hardcover version of the book, featuring a much nicer +design, is also available. More information here: +\url{https://www.breadco.de/hardcover-book}}\\[\baselineskip] +} diff --git a/book/makefile b/book/makefile index d205d62..e6255b4 100644 --- a/book/makefile +++ b/book/makefile @@ -15,7 +15,7 @@ endif website_dir := static_website_html # List all files that are dependencies -chapters = baking basics bread-types flour-types history intro\ +chapters = baking basics bread-types cover flour-types history intro\ non-wheat-sourdough sourdough-starter storing-bread troubleshooting\ wheat-sourdough @@ -37,7 +37,7 @@ website_src := $(src_all) website.cfg website_assets := $(wildcard ../website/assets/*) ruby_src := ../website/modify_build.rb $(website_assets) -ruby_pkg := ../website/Gemfile ../website/Gemfile.lock +ruby_pkg := ../website/Gemfile ../website/Gemfile.lock tgt_figures := $(patsubst %.tex, %.png,$(src_figures)) @@ -55,13 +55,16 @@ tgt_figures := $(patsubst %.tex, %.png,$(src_figures)) @echo "\end{document}" >> $@.in $(LATEX) $@.in +%.xbb: %.jpg + ebb -x $< + book_serif/book.pdf: $(src_all) $(LATEX) -output-directory=book_serif book.tex book_sans_serif/book_sans_serif.pdf: $(src_all) $(LATEX) -output-directory=book_sans_serif book_sans_serif.tex -epub/%.epub: %.tex $(src_all) +epub/%.epub: %.tex $(src_all) cover/cover-page.xbb $(EBOOK) -f epub $< epub/%.mobi: epub/%.epub @@ -164,6 +167,7 @@ clean_figures: - $(CLEAN) $(patsubst %.tex, %.png.in, $(src_figures)) - rm $(patsubst %.tex, %.png.pdf, $(src_figures)) - rm $(patsubst %.tex, %.png.in, $(src_figures)) + - rm cover/cover-page.xbb .PHONY: clean_ebook_build clean_ebook_build: diff --git a/book/tex4ebook.cfg b/book/tex4ebook.cfg index 53c9efa..9906e44 100644 --- a/book/tex4ebook.cfg +++ b/book/tex4ebook.cfg @@ -5,5 +5,5 @@ \Configure{UniqueIdentifier}{https://the-bread-code.io} \Configure{AddCss}{book-ebook.css} \Configure{CoverMimeType}{image/jpeg} -\CoverMetadata{images/cover-page.jpg} +\CoverMetadata{cover/cover-page.jpg} \EndPreamble