laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/40342?usp=email )
Change subject: Add separate asciidoc style file without draft ...................................................................... Add separate asciidoc style file without draft * Copy custom-dblatex.sty to custom-dblatex-draft.sty * Remove "DRAFT" from custom-dblatex.sty * Set custom-dblatex-draft.sty as default ASCIIDOCSTYLE This allows setting ASCIIDOCSTYLE=custom-dblatex.sty when building the stable packages to not have the "DRAFT" watermark in the generated document. Doing this is backwards compatible with older osmo-gsm-manuals versions (where it won't remove the watermark, but the build won't fail as the file name is the same). Change-Id: I33d67748b1e97578f4726009ac73fd0c4e7305db --- M build/Makefile.asciidoc.inc A build/custom-dblatex-draft.sty M build/custom-dblatex.sty 3 files changed, 92 insertions(+), 5 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index e2e8ad2..eb6df99 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -27,7 +27,7 @@ ASCIIDOC_PDF = $(ASCIIDOC_NAME:%=%.pdf) ASCIIDOC_CHECKS = $(ASCIIDOC_NAME:%=%.check) -ASCIIDOCSTYLE ?= $(BUILDDIR)/custom-dblatex.sty +ASCIIDOCSTYLE ?= $(BUILDDIR)/custom-dblatex-draft.sty CLEAN_FILES += $(ASCIIDOC_NAME:%=%__*.png) $(ASCIIDOC_NAME:%=%__*.svg) $(ASCIIDOC_CHECKS) CLEAN_FILES += $(ASCIIDOC_PDF) $(ASCIIDOC_NAME:%=%.html) diff --git a/build/custom-dblatex-draft.sty b/build/custom-dblatex-draft.sty new file mode 100644 index 0000000..16931ad --- /dev/null +++ b/build/custom-dblatex-draft.sty @@ -0,0 +1,91 @@ +%% +%% This style is derived from the docbook one. +%% "${OSMO_GSM_MANUALS_DIR}/common" is symlinked to ./common when building. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{asciidoc}[2008/06/05 AsciiDoc DocBook Style] +%% Just use the original package and pass the options. +\RequirePackageWithOptions{docbook} + +% Sidebar is a boxed minipage that can contain verbatim. +% Changed shadow box to double box. +\renewenvironment{sidebar}[1][0.95\textwidth]{ + \hspace{0mm}\newline% + \noindent\begin{Sbox}\begin{minipage}{#1}% + \setlength\parskip{\medskipamount}% +}{ + \end{minipage}\end{Sbox}\doublebox{\TheSbox}% +} + +\usepackage{alltt} +\usepackage{upquote} + +% "DRAFT" on first page +\definecolor{LtGrey}{rgb}{0.875,0.875,0.875} +\AddToShipoutPicture*{ \AtTextCenter{ \makebox(0,0)[c]{\resizebox{\textwidth}{!}{ \rotatebox{45}{\textsf{\textbf{\color{LtGrey}DRAFT}}}}} } } + +\def\Company{sysmocom - s.f.m.c. GmbH} + +\def\DBKcover{ +\ifthenelse{\equal{\DBKedition}{}}{\def\edhead{}}{\def\edhead{Ed. \DBKedition}} + +% ensure the section is called just HISTORY as required by GFDL +\def\DBKrevtitle{HISTORY} + +% put numbers in section headers up to depth 5 (instead of just 3 by default) +\setcounter{secnumdepth}{5} + +% interligne double +\setlength{\oldbaselineskip}{\baselineskip} +\setlength{\baselineskip}{2\oldbaselineskip} +\textsf{ +\vfill +\begin{center} + \includegraphics{./common/images/sysmocom.pdf} + \ \\ % + \huge{\Company} +\end{center} +\vspace{2.5cm} +\begin{center} + \includegraphics{./common/images/osmocom.pdf} + \ \\ % + \vspace{0.5cm} + \huge{\textbf{\DBKtitle}}\\ % + \ifx\DBKsubtitle\relax\else% + \underline{\ \ \ \ \ \ \ \ \ \ \ }\\ % + \ \\ % + \huge{\textbf{\DBKsubtitle}}\\ % + \fi + \vspace*{2.5cm} + \large{by \DBKauthor} +\end{center} +\vfill +\setlength{\baselineskip}{\oldbaselineskip} +\hspace{1cm} +\vspace{1cm} +\begin{center} +\begin{tabular}{p{7cm} p{7cm}} +\Large{\DBKreference{} \edhead} & \\ +\end{tabular} +\end{center} +} + +% Format for the other pages +%\newpage +\setlength{\baselineskip}{\oldbaselineskip} +} + +% left footer +\def\DBKpublisher{} + +\def\releasebox{} +\rfoot[]{\DBKreleaseinfo, \DBKdate} + +\def\maketitle{ + \DBKcover + \DBKcopyright + \DBKlegalblock + \newpage + \lfoot[]{\DBKcopyright} + \DBKdomitete +} diff --git a/build/custom-dblatex.sty b/build/custom-dblatex.sty index 16931ad..0d53bb1 100644 --- a/build/custom-dblatex.sty +++ b/build/custom-dblatex.sty @@ -20,10 +20,6 @@ \usepackage{alltt} \usepackage{upquote} -% "DRAFT" on first page -\definecolor{LtGrey}{rgb}{0.875,0.875,0.875} -\AddToShipoutPicture*{ \AtTextCenter{ \makebox(0,0)[c]{\resizebox{\textwidth}{!}{ \rotatebox{45}{\textsf{\textbf{\color{LtGrey}DRAFT}}}}} } } - \def\Company{sysmocom - s.f.m.c. GmbH} \def\DBKcover{ -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/40342?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I33d67748b1e97578f4726009ac73fd0c4e7305db Gerrit-Change-Number: 40342 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osm...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de> Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: pespin <pes...@sysmocom.de>