From e2a430b840b2c2234345b4732ef2df23e73e4dbb Mon Sep 17 00:00:00 2001 From: Gavin Date: Mon, 15 May 2023 22:54:39 +0200 Subject: [PATCH] decent-looking pdf output --- .../introduction/Hibernate_Introduction.adoc | 17 +++- .../src/main/asciidoc/introduction/theme.yml | 81 +++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 documentation/src/main/asciidoc/introduction/theme.yml diff --git a/documentation/src/main/asciidoc/introduction/Hibernate_Introduction.adoc b/documentation/src/main/asciidoc/introduction/Hibernate_Introduction.adoc index 237b046de0..af15ac5222 100644 --- a/documentation/src/main/asciidoc/introduction/Hibernate_Introduction.adoc +++ b/documentation/src/main/asciidoc/introduction/Hibernate_Introduction.adoc @@ -1,10 +1,20 @@ +:pdf-theme: theme.yml +:source-highlighter: rouge +:icons: font +:doctype: book +:pdf-fontsdir: fonts + = An introduction to Hibernate 6 Gavin King and the Hibernate team :toc: :toclevels: 3 +<<< + include::Preface.adoc[] +<<< + :numbered: [[introduction]] @@ -93,7 +103,7 @@ For example: | `org.hibernate.annotations.FetchMode` | `javax.persistence.FetchType` | `org.hibernate.query.Query` | `javax.persistence.Query` | `org.hibernate.Cache` | `javax.persistence.Cache` -| `@org.hibernate.annotations.NamedQuery` | `@javax.persistence.NamedQuery`, +| `@org.hibernate.annotations.NamedQuery` | `@javax.persistence.NamedQuery` | `@org.hibernate.annotations.Cache` | `@javax.persistence.Cacheable` |=== @@ -486,9 +496,14 @@ This introduction will guide you through the basic tasks involved in developing Naturally, we'll start at the top of this list, with the least-interesting topic: _configuration_. +<<< include::Configuration.adoc[] +<<< include::Entities.adoc[] +<<< include::Mapping.adoc[] +<<< include::Interacting.adoc[] +<<< include::Tuning.adoc[] // include::../userguide/chapters/query/hql/QueryLanguage.adoc[] diff --git a/documentation/src/main/asciidoc/introduction/theme.yml b/documentation/src/main/asciidoc/introduction/theme.yml new file mode 100644 index 0000000000..895f9b9aef --- /dev/null +++ b/documentation/src/main/asciidoc/introduction/theme.yml @@ -0,0 +1,81 @@ +extends: base +page: + margin: [30,50,30,50] +font: + catalog: + merge: false + Roboto: + normal: Roboto-Regular.ttf + italic: Roboto-Italic.ttf + bold: Roboto-Bold.ttf + bold_italic: Roboto-BoldItalic.ttf + Roboto Light: + normal: Roboto-Light.ttf + italic: Roboto-LightItalic.ttf +base: + font: + color: #151e3d + family: Roboto + size: 9 + line-height-length: 11.5 + line-height: $base-line-height-length / $base-font-size +prose: + margin-bottom: 8 +image: + width: 70% + align: center +code: + font-size: 8 + font-color: #281e5d + border-width: 0 + padding: [4,4,4,20] +# background-color: #f7f7f7 +# font-family: Inconsolata +sidebar: + border-width: 0 + title: + align: center +admonition: + column-rule: + style: solid + width: 3 + color: #f0f0f0 +heading: + font: + color: #b22222 + size: 11 + style: bold + line-height: 1.2 + h2-font-size: $base-font-size * 1.3 + h3-font-size: $base-font-size * 1.2 + h4-font-size: $base-font-size * 1.1 + h5-font-size: $base-font-size * 1.0 + margin-bottom: $base-line-height-length +link: + font-color: #002FA7 +list: + indent: $base-font-size * 1.5 + item-spacing: 2 +table: + caption: + text-align: right + side: top + font-size: 8 + grid: + color: #f0f0f0 + style: solid + width: 1 + border: + width: 1 + color: #f0f0f0 + head: + background-color: #f0f0f0 + cell: + padding: 6 +codespan: + font-size: 8 + font-color: #281e5d +footer: + border-width: 0 +quote: + font-style: italic \ No newline at end of file