diff --git a/help/manual/common/defs.tex b/help/manual/common/defs.tex index 6c4cbb1c..d21c2d6a 100644 --- a/help/manual/common/defs.tex +++ b/help/manual/common/defs.tex @@ -5,11 +5,12 @@ \usepackage{graphicx} \usepackage{color} \usepackage{textcomp} -\usepackage[hidelinks]{hyperref} +\usepackage[hidelinks, pdfusetitle]{hyperref} \usepackage{float} \usepackage{ltxcmds} \usepackage{fp} \usepackage{tikz} +\usepackage{etoolbox} \usetikzlibrary{calc} \usetikzlibrary{fit} @@ -71,4 +72,104 @@ \centering \includegraphics[scale=\defaultGraphicsScale]{#1} \end{figure} -} \ No newline at end of file +} + +\newcommand{\manualtitlepage}[2][]{ { + \def\title{#2} + \def\translator{#1} + + \begin{titlepage} + + \pgfdeclarelayer{background} + \pgfsetlayers{background,main} + \begin{tikzpicture}[remember picture, overlay, text depth=0] + + \definecolor{title blue}{HTML}{206C8F} + \definecolor{title orange}{HTML}{F59201} + \pgfdeclareimage[width=0.2\textwidth]{logo}{../common/logo} + \pgfdeclareimage{cover picture}{../common/cover-picture} + \coordinate (NW) at ($(current page.north west) + (0.5, -0.5)$); + \coordinate (NE) at ($(current page.north east) + (-0.5, -0.5)$); + \coordinate (SW) at ($(current page.south west) + (0.5, 0.5)$); + \coordinate (SE) at ($(current page.south east) + (-0.5, 0.5)$); + + % Logo at the top left corner. + \node[ + below right, + align=left, + font=\Large, + execute at begin node=\setlength\baselineskip{3ex}] + at ($(NW) + (1.5, -1.5)$) { + \pgfuseimage{logo}\\ + Build Your Own Blocks + }; + + % Version number. + \node[ + below right, + color=white, + font=\fontsize{40pt}{48pt}\selectfont] + at ($(NE) - (7, 5)$) { + 4.0 + }; + + % Title. Note: the % at the end is necessary for correct spacing between the text and orange background. + \node[ + left, + text=white, + align=right, + inner sep=15pt, + font=\fontsize{40pt}{42pt}\selectfont] + (title text) + at ($(NE) - (1.5, 9)$) { + \title% + }; + + % The cover picture. + \node[below left, inner sep=0] (cover picture) + at ($(NE) - (0, 12)$) { + \pgfuseimage{cover picture} + }; + \draw[white, ultra thick] + (cover picture.north west) -- (cover picture.north east); + \draw[white, ultra thick] + (cover picture.south west) -- (cover picture.south east); + + % Authors. + \node[above right, color=white, align=left, font=\Large] + at ($(SE) + (-7, 3)$) { + Brian Harvey\\ + Jens M\"onig + }; + + % Translator. + \ifdefempty{\translator}{}{ + \node [below right, color=white, align=left, font=\large] + at ($(SE) + (-7, 2)$) { + \translator + }; + } + + \begin{pgfonlayer}{background} + % Blue bar on the right. + \fill[title blue] ($(NE) - (7.5, 0)$) rectangle (SE); + + % Title background stretches to the left until it reaches the left edge, which means (NW.x, title text.west.y). + \coordinate (title background left point) + at (NW |- title text.west); + % Orange title background. + \node[ + fit=(title text) (title background left point), + shape=rectangle, + fill=title orange, + text=white, + draw=white, + ultra thick, + align=right, + inner sep=0, + font=\fontsize{40pt}{42pt}\selectfont] {}; + \end{pgfonlayer} + + \end{tikzpicture} + \end{titlepage} +} } \ No newline at end of file diff --git a/help/manual/en/snap-manual.tex b/help/manual/en/snap-manual.tex index a1c4f6bb..5bb4b5af 100644 --- a/help/manual/en/snap-manual.tex +++ b/help/manual/en/snap-manual.tex @@ -4,95 +4,11 @@ \begin{document} -\title{\Snap{} Reference Manual} -\author{Brian Harvey \and Jens M\"{o}nig} +\title{Snap! Reference Manual} +\author{Brian Harvey\texorpdfstring{ \and}{,} Jens M\"onig} \date{} -\begin{titlepage} - -\pgfdeclarelayer{background} -\pgfsetlayers{background,main} -\begin{tikzpicture}[remember picture, overlay, text depth=0] - -\definecolor{title blue}{HTML}{206C8F} -\definecolor{title orange}{HTML}{F59201} -\pgfdeclareimage[width=0.2\textwidth]{logo}{../common/logo} -\pgfdeclareimage{cover picture}{../common/cover-picture} -\coordinate (NW) at ($(current page.north west) + (0.5, -0.5)$); -\coordinate (NE) at ($(current page.north east) + (-0.5, -0.5)$); -\coordinate (SW) at ($(current page.south west) + (0.5, 0.5)$); -\coordinate (SE) at ($(current page.south east) + (-0.5, 0.5)$); - -% Logo at the top left corner. -\node[ - below right, - align=left, - font=\Large, - execute at begin node=\setlength\baselineskip{3ex}] - at ($(NW) + (1.5, -1.5)$) { - \pgfuseimage{logo}\\ - Build Your Own Blocks -}; - -% Version number. -\node[ - below right, - color=white, - font=\fontsize{40pt}{48pt}\selectfont] - at ($(NE) - (7, 5)$) { - 4.0 -}; - -% Title. Note: the % at the end is necessary for correct spacing between the text and orange background. -\node[ - left, - text=white, - align=right, - inner sep=15pt, - font=\fontsize{40pt}{42pt}\selectfont] - (title text) - at ($(NE) - (1.5, 9)$) { - Snap! Reference Manual% -}; - -% The cover picture. -\node[below left, inner sep=0] (cover picture) - at ($(NE) - (0, 12)$) { - \pgfuseimage{cover picture} -}; -\draw[white, ultra thick] - (cover picture.north west) -- (cover picture.north east); -\draw[white, ultra thick] - (cover picture.south west) -- (cover picture.south east); - -% Authors. -\node[above right, color=white, align=left, font=\Large] at ($(SE) + (-7, 2)$) { - Brian Harvey\\ - Jens M\"onig -}; - -\begin{pgfonlayer}{background} - % Blue bar on the right. - \fill[title blue] ($(NE) - (7.5, 0)$) rectangle (SE); - - % Title background stretches to the left until it reaches the left edge, which means (NW.x, title text.west.y). - \coordinate (title background left point) - at (NW |- title text.west); - % Orange title background. - \node[ - fit=(title text) (title background left point), - shape=rectangle, - fill=title orange, - text=white, - draw=white, - ultra thick, - align=right, - inner sep=0, - font=\fontsize{40pt}{42pt}\selectfont] {}; -\end{pgfonlayer} - -\end{tikzpicture} -\end{titlepage} +\manualtitlepage{Snap! Reference Manual} \tableofcontents diff --git a/help/manual/pl/snap-podrecznik.tex b/help/manual/pl/snap-podrecznik.tex index 31b3f1cf..16bdb6e3 100644 --- a/help/manual/pl/snap-podrecznik.tex +++ b/help/manual/pl/snap-podrecznik.tex @@ -11,11 +11,11 @@ \begin{document} -\title{\Snap{} \\ Podręcznik użytkownika} -\author{Brian Harvey \and Jens M\"{o}nig} +\title{Snap! --- Podręcznik użytkownika} +\author{Brian Harvey\texorpdfstring{ \and}{,} Jens M\"onig} \date{} -\maketitle +\manualtitlepage[Tłumaczenie na język polski:\\Bartosz Leper]{Snap!\\Podręcznik użytkownika} \tableofcontents