summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/awesomebox
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-04 20:54:25 +0000
committerKarl Berry <karl@freefriends.org>2019-04-04 20:54:25 +0000
commit93f5c4643a3d0a596d220ff14756ce68d99afe33 (patch)
tree3b4f0cef3891b27c01ad58fe8856767108594936 /Master/texmf-dist/doc/latex/awesomebox
parenta1793dc7c8f8fa5cb0b32fe6f0218c094a280c56 (diff)
awesomebox (4apr19)
git-svn-id: svn://tug.org/texlive/trunk@50757 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/awesomebox')
-rw-r--r--Master/texmf-dist/doc/latex/awesomebox/README.md3
-rw-r--r--Master/texmf-dist/doc/latex/awesomebox/awesomebox.pdfbin47179 -> 50878 bytes
-rw-r--r--Master/texmf-dist/doc/latex/awesomebox/awesomebox.tex114
3 files changed, 87 insertions, 30 deletions
diff --git a/Master/texmf-dist/doc/latex/awesomebox/README.md b/Master/texmf-dist/doc/latex/awesomebox/README.md
index 47582479b91..18adc1aac5d 100644
--- a/Master/texmf-dist/doc/latex/awesomebox/README.md
+++ b/Master/texmf-dist/doc/latex/awesomebox/README.md
@@ -18,7 +18,8 @@ included in your LaTeX distribution):
- `fontawesome5`
- `xcolor`
-- `tabu`
+- `array`
+- `xparse`
Installation
============
diff --git a/Master/texmf-dist/doc/latex/awesomebox/awesomebox.pdf b/Master/texmf-dist/doc/latex/awesomebox/awesomebox.pdf
index 1f21f7fc6e5..c59857aae35 100644
--- a/Master/texmf-dist/doc/latex/awesomebox/awesomebox.pdf
+++ b/Master/texmf-dist/doc/latex/awesomebox/awesomebox.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/awesomebox/awesomebox.tex b/Master/texmf-dist/doc/latex/awesomebox/awesomebox.tex
index 809c9c43694..8403ed7dd75 100644
--- a/Master/texmf-dist/doc/latex/awesomebox/awesomebox.tex
+++ b/Master/texmf-dist/doc/latex/awesomebox/awesomebox.tex
@@ -1,7 +1,6 @@
\documentclass[a4paper,12pt]{article}
\usepackage{awesomebox}
-\setlength{\aweboxvskip}{0pt}
\usepackage{xltxtra}
\defaultfontfeatures{Scale=MatchLowercase}
@@ -12,6 +11,8 @@
\usepackage{polyglossia}
\setdefaultlanguage{english}
+\usepackage{minted}
+
% Comment out the lines above and uncomment the following lines to test
% usage with pdflatex
%\usepackage[utf8]{inputenc}
@@ -51,7 +52,7 @@
\title{Awesome Boxes}
\author{Étienne Deparis}
-\date{2018-11-26 v0.4}
+\date{2019-04-04 v0.5}
\begin{document}
@@ -145,7 +146,7 @@ The provided boxes follow the name convention of the
\label{sec:environments}
You can also insert admonition blocks with an environment syntax. The
-same names can be used, but with a \emph{block} suffixe.
+same names can be used, but with a \emph{block} suffix.
\begin{verbatim}
\begin{noteblock}
@@ -157,8 +158,6 @@ aliquet libero quis lectus elementum fermentum.
For the exactly same rendering:
-\vspace{5mm}
-
\begin{noteblock}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet
libero quis lectus elementum fermentum.
@@ -183,11 +182,13 @@ For example, if you want to add the \emph{rocket} icon
\label{sec:howtoown}
\subsection{Inline boxes}
-To create your own box, with your own colour, your own icon or your own
-rule width, you can use our meta command:
+To create your own box, with your own icon and colour, your own
+vertical rule width and colour, your own horizontal rules at the top
+and the bottom of your boxes, or a title, you can use our meta
+command:
\begin{center}
-\verb!\awesomebox[rulecolor]{rulewidth}{icon}{iconcolor}{your text content}!
+\verb!\awesomebox[vrulecolor][hrule][title]{vrulewidth}{icon}{iconcolor}{your text content}!
\end{center}
Here are some examples of custom boxes:
@@ -208,14 +209,13 @@ Here are some examples of custom boxes:
\verb!\awesomebox{0pt}{\faCogs}{black}{Lorem ipsum…}!
\end{center}
-\begin{awesomeblock}{0pt}{\faCogs}{black}
- Lorem ipsum dolor sit amet, consectetur
- adipiscing elit. Nam aliquet libero quis lectus elementum fermentum.
+\awesomebox{0pt}{\faCogs}{black}{%
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet
+ libero quis lectus elementum fermentum.
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at
dictum felis. Pellentesque tortor lacus, semper et neque vitae,
- egestas commodo nisl.
-\end{awesomeblock}
+ egestas commodo nisl.}
\begin{center}
\verb!\awesomebox[violet]{2pt}{\faRocket}{violet}{Lorem ipsum…}!
@@ -229,13 +229,41 @@ Here are some examples of custom boxes:
dictum felis. Pellentesque tortor lacus, semper et neque vitae,
egestas commodo nisl.}
+\begin{center}
+\verb!\awesomebox[white][\abShortLine]{0pt}{\faGrinBeam[regular]}{black}{Lorem ipsum…}!
+\end{center}
+
+\awesomebox[white][\abShortLine]{0pt}{\faGrinBeam[regular]}{black}{%
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet
+ libero quis lectus elementum fermentum.
+
+ Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at
+ dictum felis. Pellentesque tortor lacus, semper et neque vitae,
+ egestas commodo nisl.}
+
+\clearpage
+
+\begin{center}
+\verb!\awesomebox[white][\abLongLine][\textbf{Watch out}]{0pt}{\faBomb}{black}{Lorem ipsum…}!
+\end{center}
+
+\awesomebox[white][\abLongLine][\textbf{Watch out}]{0pt}{\faBomb}{black}{%
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet
+ libero quis lectus elementum fermentum.
+
+ Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at
+ dictum felis. Pellentesque tortor lacus, semper et neque vitae,
+ egestas commodo nisl.}
+
\subsection{Environments}
-To create your own box, with your own colour, your own icon or your own
-rule width, you can use our meta command:
+To create your own box, with your own icon and colour, your own
+vertical rule width and colour, your own horizontal rules at the top
+and the bottom of your boxes, or a title, you can use our meta
+command:
\begin{verbatim}
-\begin{awesomeblock}[rulecolor]{rulewidth}{icon}{iconcolor}
+\begin{awesomeblock}[vrulecolor][hrule][title]{vrulewidth}{icon}{iconcolor}
your text content
\end{awesomeblock}
\end{verbatim}
@@ -251,8 +279,6 @@ For example, we can rewrite the first previous example as:
Which will render this way:
-\vspace{5mm}
-
\begin{awesomeblock}[magenta]{5pt}{\faCertificate}{magenta}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet
libero quis lectus elementum fermentum.
@@ -271,8 +297,16 @@ globally your awesome boxes (either the default ones or your new ones).
\subsection{Left margin}
The left margin is the space left before the vertical rule to display
-the icon. You can change it with the following command (9mm is the
-default one): \\ \verb!\setlength{\aweboxleftmargin}{9mm}!.
+the icon. You can change it with the following command
+(\verb!0.08\linewidth! is the default one):\\
+\verb!\setlength{\aweboxleftmargin}{0.08\linewidth}!.
+
+\subsection{Content width}
+
+The content width is the space used to insert the body of your
+admonition block. You can change it with the following command
+(\verb!0.92\linewidth! is the default one):\\
+\verb!\setlength{\aweboxcontentwidth}{0.92\linewidth}!.
\subsection{Vertical skip}
@@ -285,16 +319,16 @@ This length is used to raise (or lower) the left icon. Its default value
is -5mm and you can change it with:
\verb!\setlength{\aweboxsignraise}{-5mm}!.
-\subsection{Rule width}
+\subsection{Vertical rule width}
This width is used for the vertical rule of our four default boxes. Its
default value is 2pt and you can change it with:
\verb!\setlength{\aweboxrulewidth}{2pt}!.
-\subsection{Rule default color}
+\subsection{Vertical rule default color}
-The rule color is an optional argument passed to the commands or
-environments. Its default value is the following (to match the one
+The vertical rule color is an optional argument passed to the commands
+or environments. Its default value is the following (to match the one
defined by AsciiDoctor) and you can change it this way:
\verb!\definecolor{abvrulecolor}{RGB}{221,221,216}!
@@ -334,19 +368,41 @@ prefer the environment API (see Section \ref{sec:environments}):
will give:
-\vspace{5mm}
-
\begin{importantblock}
\begin{itemize}
+ \vspace{-5mm}
\item My first item
\item My second item with \notebox{A note box!}
\item Last and finally
+ \vspace{-5mm}
\end{itemize}
\end{importantblock}
+\clearpage
+
+Or with a more complex example with minted environment:
+
+\begin{verbatim}
+\begin{noteblock}
+ This could be written as:
+
+ \begin{minted}{c++}
+ std::cout << "hello world!" << std::endl;
+ \end{minted}
+\end{noteblock}
+\end{verbatim}
+
+\begin{noteblock}
+ This could be written as:
+
+ \begin{minted}{c++}
+ std::cout << "hello world!" << std::endl;
+ \end{minted}
+\end{noteblock}
+
\section{Breaking changes}
-The version 0.4 of this package introduces a way to customize the rule
+Version 0.4 of this package introduced a way to customize the rule
color. Thus, the commands and environments arguments have been
reorganized to be in a more logical order.
@@ -356,8 +412,8 @@ Historically, the \verb!\awesomebox! command used the following syntax:
\verb!\awesomebox{icon}{rulewidth}{iconcolor}{your text content}!
\end{center}
-This syntax will now leads to compiling errors, as you must now write it
-as the following example show you (and as explained in the Section
+This syntax now leads to compiling errors, as you must now write it
+as the following example shows you (and as explained in the Section
\ref{sec:howtoown} "\nameref{sec:howtoown}"), to avoid an alternate
declaration of rule and icon options: