diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-09-22 23:59:38 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-09-22 23:59:38 +0200 |
commit | 911b7885be5e8869437dac88ce6133bada362f02 (patch) | |
tree | 0b4fdf90f28abaf134fe72848ebffaefb18aa068 /doc | |
parent | da740dc1a25d220f75048485afd9f6bf5a6461ed (diff) | |
download | gnutls-911b7885be5e8869437dac88ce6133bada362f02.tar.gz |
Added epub version of manual
Diffstat (limited to 'doc')
-rw-r--r-- | doc/latex/Makefile.am | 44 | ||||
-rw-r--r-- | doc/latex/cover-epub.tex (renamed from doc/latex/cover.tex.in) | 31 | ||||
-rw-r--r-- | doc/latex/epub.tex | 80 | ||||
-rw-r--r-- | doc/latex/macros-epub.tex | 215 |
4 files changed, 351 insertions, 19 deletions
diff --git a/doc/latex/Makefile.am b/doc/latex/Makefile.am index 841def247a..3a030d1565 100644 --- a/doc/latex/Makefile.am +++ b/doc/latex/Makefile.am @@ -1,4 +1,5 @@ -TEX_OBJECTS = gnutls.tex macros.tex fdl.tex cover.tex gnutls.bib +TEX_OBJECTS = gnutls.tex macros.tex macros-epub.tex fdl.tex cover.tex gnutls.bib \ + cover-epub.tex GEN_TEX_OBJECTS = cha-preface.tex cha-library.tex cha-intro-tls.tex cha-auth.tex \ cha-cert-auth.tex cha-gtls-app.tex cha-tls-app.tex cha-programs.tex cha-support.tex \ @@ -119,14 +120,41 @@ extra-api.tex: $(srcdir)/../../libextra/gnutls_extra.c SOURCE_GEN_FILES = extra-api.tex pgp-api.tex x509-api.tex gnutls-api.tex gnutls-enums.tex +PDF_FILES = gnutls-client-server-use-case.pdf gnutls-crypto-layers.pdf \ + gnutls-handshake-sequence.pdf gnutls-handshake-state.pdf \ + gnutls-internals.pdf gnutls-layers.pdf gnutls-logo.pdf \ + gnutls-modauth.pdf gnutls-pgp.pdf gnutls-x509.pdf pkcs11-vision.pdf + gnutls.pdf: $(SOURCE_GEN_FILES) $(TEX_OBJECTS) $(GEN_TEX_OBJECTS) $(MAKE) -C .. errcodes printlist alert-printlist - -pdflatex gnutls.tex - -bibtex gnutls - -makeindex gnutls.idx - -pdflatex gnutls.tex && pdflatex gnutls.tex +# for i in $(PDF_FILES);do cp ../$$i .;done + pdflatex gnutls.tex + bibtex gnutls + makeindex gnutls.idx + pdflatex gnutls.tex && pdflatex gnutls.tex +# for i in $(PDF_FILES);do rm -f $$i;done + +PNG_FILES = gnutls-client-server-use-case.png gnutls-crypto-layers.png \ + gnutls-handshake-sequence.png gnutls-handshake-state.png \ + gnutls-internals.png gnutls-layers.png gnutls-logo.png \ + gnutls-modauth.png gnutls-pgp.png gnutls-x509.png pkcs11-vision.png + +epub.html: $(SOURCE_GEN_FILES) $(TEX_OBJECTS) $(GEN_TEX_OBJECTS) + $(MAKE) -C .. errcodes printlist alert-printlist + mkdir -p epub + for i in $(PNG_FILES);do cp ../$$i epub;done + htlatex epub.tex "xhtml,pmathml" " -cunihtf -utf8 -cvalidate'" + bibtex epub + makeindex epub.idx + htlatex epub.tex "xhtml,pmathml" " -cunihtf -utf8 -cvalidate'" + cp epub*.html epub + sed -i 's/\.\.\//\.\//g' epub/epub.html + cd epub && zip gnutls-epub.zip * +# for i in $(PNG_FILES);do rm -f $$i;done clean-am: - rm -f $(GEN_TEX_OBJECTS) $(SOURCE_GEN_FILES) gnutls.aux gnutls.bbl gnutls.blg gnutls.idx gnutls.ilg gnutls.ind gnutls.log gnutls.out gnutls.toc - rm -rf functions enums - + rm -f $(GEN_TEX_OBJECTS) $(SOURCE_GEN_FILES) gnutls.aux gnutls.bbl gnutls.blg gnutls.idx \ + gnutls.ilg gnutls.ind gnutls.log gnutls.out gnutls.toc epub.4ct epub.4tc epub.aux epub.bbl \ + epub.blg epub.css epub.dvi epub*.html epub.idv epub.idx epub.ilg epub.ind epub.lg epub.lof \ + epub.log epub.lot epub.out epub.xref epub.toc epub.tmp + rm -rf functions enums epub $(PNG_FILES) $(PDF_FILES) diff --git a/doc/latex/cover.tex.in b/doc/latex/cover-epub.tex index b0d6d84829..43a9efb34b 100644 --- a/doc/latex/cover.tex.in +++ b/doc/latex/cover-epub.tex @@ -1,10 +1,28 @@ \thispagestyle{empty} + +\vspace*{\stretch{2}} +\begin{center} +\huge{The GnuTLS manual} +\vspace*{\stretch{2}} +\end{center} + +%\newpage +%\vspace*{\stretch{2}} +%\begin{center} +%\includegraphics[width=6cm]{../gnutls-logo} +%\end{center} + +%\vspace*{\stretch{2}} + +\newpage + +\thispagestyle{empty} \vspace*{\stretch{2}} -\begin{quotation} +\begin{flushleft} Copyright \copyright{} 2011 Free Software Foundation, Inc. -\end{quotation} +\end{flushleft} \begin{flushleft} Permission is granted to copy, distribute and/or modify this document @@ -15,12 +33,3 @@ copy of the license is included in the section entitled ``GNU Free Documentation License''. \end{flushleft} -\newpage -\thispagestyle{empty} - -\vspace*{\stretch{2}} -\begin{center} -\includegraphics[width=6cm]{../gnutls-logo.pdf} -\end{center} - -\vspace*{\stretch{2}} diff --git a/doc/latex/epub.tex b/doc/latex/epub.tex new file mode 100644 index 0000000000..20c6297fcf --- /dev/null +++ b/doc/latex/epub.tex @@ -0,0 +1,80 @@ +\documentclass[]{book} +\bibliographystyle{plain} +\usepackage{graphicx} +\usepackage{makeidx} +\usepackage{supertabular} +\usepackage{color} +\usepackage{hyperref} +\usepackage{listings} +\usepackage{verbatim} +\usepackage[greek,english]{babel}%for euro sign +\usepackage{float} +\usepackage{fancyvrb} +\usepackage{framed} + +\DeclareGraphicsExtensions{.png} + +%\newcommand{\euro}[0]{euro} +\renewcommand{\textfraction}{0.00} +\renewcommand{\floatpagefraction}{0.8} +\renewcommand{\dblfloatpagefraction}{0.8} + + +\input{macros-epub} + +\makeindex + +\begin{document} + +\frontmatter + +\input{cover-epub} + +\setcounter{tocdepth}{1} +\tableofcontents +\listoftables +\listoffigures + +\input{cha-preface} + +\mainmatter + +\input{cha-library} + + +\input{cha-intro-tls} + +\input{cha-auth} + +\input{cha-cert-auth} + +\input{cha-gtls-app} + +\input{cha-tls-app} + +\input{cha-programs} + +\input{cha-internals} + +\appendix + +\input{cha-support} + +\input{cha-ciphersuites} + +\input{cha-errors} + +\input{fdl} + +\backmatter + +\printindex +\addcontentsline{toc}{chapter}{Index} + +\bibliography{gnutls} +\addcontentsline{toc}{chapter}{Bibliography} + +\cleardoublepage + +\end{document} + diff --git a/doc/latex/macros-epub.tex b/doc/latex/macros-epub.tex new file mode 100644 index 0000000000..3f0b6d5fad --- /dev/null +++ b/doc/latex/macros-epub.tex @@ -0,0 +1,215 @@ +\newcommand{\gnutls}{{\emph{GnuTLS}}} +\newcommand{\gnutlse}{{\emph{GnuTLS-extra}}} +\newcommand{\tlsI}{{\emph{TLS 1.0}}} +\newcommand{\tlsII}{{\emph{TLS 1.1}}} +\newcommand{\tls}{{\emph{TLS}}} +\newcommand{\sslIII}{{\emph{SSL 3.0}}} +\newcommand{\sslII}{{\emph{SSL 2.0}}} +\newcommand{\ssl}{{\emph{SSL}}} +\newcommand{\HRule}{\rule{\linewidth}{0.4mm}} + +\newcommand{\code}[1]{% + {\tt{#1}}% +} + +\newcommand{\command}[1]{% + ``{\tt{#1}}''% +} + +\newcommand{\myref}[1]{% + \autoref{#1}% +} + +\newcommand{\file}[1]{% + ``{\tt{#1}}''% +} + +\newcommand{\acronym}[1]{% + {#1}% +} + +\newcommand{\examplefile}[1]{% + {\VerbatimInput[frame=single,numbers=left,numbersep=3pt,fontsize=\footnotesize]{#1}}% +} + +\DefineVerbatimEnvironment{example}{Verbatim}% +{numbers=left,frame=single,numbersep=3pt,fontsize=\footnotesize} + +\DefineVerbatimEnvironment{smallexample}{Verbatim}% +{frame=single,numbersep=3pt,fontsize=\footnotesize} + + +\newcommand{\funcref}[2]{% + %\hyperref[#2]{#1()}% + \code{#1}% +} + +\newcommand{\showfunc}[1]{% + \let\Oldfd\functionDescription + \let\Oldendfd\endfunctionDescription + \let\functionDescription=\comment + \let\endfunctionDescription=\endcomment + \let\Oldfr\functionReturns + \let\Oldendfr\endfunctionReturns + \let\functionReturns=\comment + \let\endfunctionReturns=\endcomment +\texttt{ + \input{functions/#1} +} + \let\functionDescription=\Oldfd + \let\endfunctionDescription=\Oldendfd + \let\functionReturns=\Oldfr + \let\endfunctionReturns=\Oldendfr +} + +\newcommand{\showfuncdesc}[1]{% + \begin{figure}[htbp] + \begin{minipage}[l]{\linewidth} +% \begin{framed} + \texttt{ + \input{functions/#1} + } +% \end{framed} + \end{minipage} + \end{figure} +} + +\newcommand{\showenumdesc}[2]{% + \begin{table}[h] + \begin{minipage}[l]{\linewidth} +% \begin{framed} + \texttt{ + \input{enums/#1} + } +% \end{framed} + \vspace{0.15cm} + \end{minipage} + \caption{#2} + \label{#1} + \end{table} +} + +\newcommand{\showfuncA}[1]{% + \begin{figure}[H] + \begin{samepage} +% \begin{framed} + \showfunc{#1} +% \end{framed} + \end{samepage} + \end{figure} +} + +\newcommand{\showfuncB}[2]{% + \begin{figure}[H] + \begin{samepage} +% \begin{framed} + \showfunc{#1} + \vspace{0.2cm} + \showfunc{#2} +% \end{framed} + \end{samepage} + \end{figure} +} + +\newcommand{\showfuncC}[3]{% + \begin{figure}[H] + \begin{samepage} +% \begin{framed} + \showfunc{#1} + \vspace{0.2cm} + \showfunc{#2} + \vspace{0.2cm} + \showfunc{#3} +% \end{framed} + \end{samepage} + \end{figure} +} + +\newcommand{\showfuncD}[4]{% + \begin{figure}[H] + \begin{samepage} +% \begin{framed} + \showfunc{#1} + \vspace{0.2cm} + \showfunc{#2} + \vspace{0.2cm} + \showfunc{#3} + \vspace{0.2cm} + \showfunc{#4} +% \end{framed} + \end{samepage} + \end{figure} +} + +\newcommand{\showfuncE}[5]{% + \begin{figure}[H] + \begin{samepage} +% \begin{framed} + \showfunc{#1} + \vspace{0.2cm} + \showfunc{#2} + \vspace{0.2cm} + \showfunc{#3} + \vspace{0.2cm} + \showfunc{#4} + \vspace{0.2cm} + \showfunc{#5} +% \end{framed} + \end{samepage} + \end{figure} +} + +\newcommand{\showfuncF}[6]{% + \begin{figure}[H] + \begin{samepage} + \showfunc{#1} + \vspace{0.2cm} + \showfunc{#2} + \vspace{0.2cm} + \showfunc{#3} + \vspace{0.2cm} + \showfunc{#4} + \vspace{0.2cm} + \showfunc{#5} + \vspace{0.2cm} + \showfunc{#6} + \end{samepage} + \end{figure} +} + +\newenvironment{function}% + {\begin{minipage}[l]{1\linewidth}}% + {\end{minipage}} + +\let\functionArguments=\comment +\let\endfunctionArguments=\endcomment + +\let\functionExamples=\comment +\let\endfunctionExamples=\endcomment + +\newenvironment{functionDescription}% +{\vspace{0.5cm}{\bf Description:}\footnotesize} +{} + +\newenvironment{enum}% +{}% +{} + +\newcommand{\enumElement}[2]{% +{\scriptsize {\bf #1}} & {\scriptsize #2}\\% +} + +\newenvironment{enumList}% +{\begin{tabular}{p{.43\linewidth}p{.53\linewidth}}}% +{\end{tabular}} + +\newcommand{\functionTitle}[1]{} +\newcommand{\enumTitle}[1]{enum {\bf #1}:} + +\newenvironment{functionReturns}% +{\vspace{0.5cm}{\bf Returns:}\footnotesize} +{} + +\let\functionSince=\comment +\let\endfunctionSince=\endcomment + |