summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/yb-book/yb-book.tex
blob: 0937552058261aeb7ebb9cad5f0473b4ca52ff44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
% (The MIT License)
%
% Copyright (c) 2021-2022 Yegor Bugayenko
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the 'Software'), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
%
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.

\documentclass[compact,manuscript]{./yb-book}
\usepackage{ffcode}
\usepackage{href-ul}
\renewcommand*\theversion{0.1.0}
\renewcommand*\thedate{2022/01/03}
\renewcommand*\thetitle{\LaTeX{} Class \ff{yb-book}}
\renewcommand*\theauthor{Yegor Bugayenko}

\begin{document}

\includegraphics[height=6em]{yb-book-logo.pdf}
\vspace*{24pt}

\maketitle

\index{Amazon}
The provided class \ff{yb-book} helps me design
\href{https://www.yegor256.com/books.html}{my books} and
publish them
\href{https://www.amazon.com/Yegor-Bugayenko/e/B01AM1QMDK}{on Amazon}.

There are a few class options you can use:

\ff{compact} --- when you need to make text more compact
and take less vertical space;

\ff{manuscript} --- when the format is not for Amazon printing,
but for some other purposes (the page size is A4), like the document
you are reading right now;

\ff{draft} --- when it's a draft for reviewers (the page size is A4)
and you want to have a watermark and a compact form of the content;

\section*{Printers}

There are a number of printers, commands that print large blocks of text
in the expected format:

\ff{\textbackslash{}ybPrintTitlePage} --- prints the first page of a book.

\ff{\textbackslash{}ybPrintTOC} --- prints the table of contents.

\ff{\textbackslash{}ybQuote} --- prints a side quote.

\ff{\textbackslash{}ybPrintBibliography} --- prints the list of bib references.

\ff{\textbackslash{}ybPrintIcons} --- prints your social icons.

\ff{\textbackslash{}ybPrintIndex[1]} --- prints index with an optional name of the section (instead of ``Index'').

For more samples, check the directory \ff{samples/}.

You are welcome to suggest additional commands, but the style
of my books is intentionally as simple as possible, avoiding formatting
as much as possible.

\end{document}