%%
%% Copyright (C) 2026 Benjamim Lima Neto
%%
%% This work may be distributed and/or modified under
%% the conditions of the LaTeX Project Public License,
%% either version 1.3c of this license or (at your option)
%% any later version.
%%
%% The latest version of this license is at:
%% https://www.latex-project.org/lppl.txt
%%
%% This work has the LPPL maintenance status `maintained'.
%% The Current Maintainer of this work is Benjamim Lima Neto.
%%
%% Contact information is provided in README.md.
%% This work consists of kleinbottle.sty, kleinbottle.tex,
%% README.md, and the derived file kleinbottle.pdf.
%%

\documentclass[12pt,a4paper]{article}

% --------------------------------------------------
% Packages
% --------------------------------------------------

\usepackage{iftex}
\ifPDFTeX
  \usepackage[utf8]{inputenc}
  \usepackage[T1]{fontenc}
\fi
\usepackage{lmodern}
\usepackage[margin=2.5cm]{geometry}
\usepackage{array}
\usepackage{booktabs}
\usepackage{xcolor}
\usepackage{kleinbottle}
\usepackage{hyperref}

% --------------------------------------------------
% Colors
% --------------------------------------------------

\definecolor{ManualBlue}{HTML}{234A76}
\definecolor{CustomGreen}{HTML}{2A9D8F}
\definecolor{CustomPurple}{HTML}{7952B3}

\hypersetup{
    colorlinks=true,
    linkcolor=ManualBlue,
    urlcolor=ManualBlue,
    citecolor=ManualBlue,
    pdftitle={The kleinbottle package},
    pdfauthor={Benjamim Lima Neto},
    pdfsubject={User manual, version 1.01},
    pdfkeywords={LaTeX, TikZ, Klein bottle, topology}
}

% --------------------------------------------------
% Title
% --------------------------------------------------

\title{
    \klein[color=ManualBlue,scale=5]\par\vspace{0.4cm}
    \texttt{kleinbottle}\par\vspace{0.2cm}
    \large A Tiny \LaTeX{} Package for Drawing a Klein Bottle
}

\author{Benjamim Lima Neto}

\date{Version 1.01 -- November 30, 2026}

% --------------------------------------------------
% Document
% --------------------------------------------------

\begin{document}

\maketitle

\begin{abstract}
The \texttt{kleinbottle} package provides a simple and
customizable TikZ illustration of the Klein bottle.
Through a single command, users can insert a miniature
representation of this mathematical object into their
\LaTeX{} documents and customize its color, opacity,
size, rotation, and position.
\end{abstract}

\tableofcontents\clearpage

% --------------------------------------------------
\section{Introduction}
% --------------------------------------------------

The Klein bottle is a well-known example of a compact
non-orientable surface without boundary. It is named
after the German mathematician Felix Klein.

The \texttt{kleinbottle} package provides a stylized
two-dimensional representation of the usual
self-intersecting immersion of the Klein bottle
in three-dimensional Euclidean space.

Its purpose is to make it easy to incorporate this
mathematical object into articles, presentations,
lecture notes, books, and other \LaTeX{} documents,
without requiring users to write their own TikZ code.

The package is intentionally lightweight and provides
a single command with eight optional keys grouped into five customization
categories.

% --------------------------------------------------
\section{Requirements}
% --------------------------------------------------

The package requires the following packages:

\begin{itemize}
    \item \href{https://ctan.org/pkg/pgf}{\texttt{TikZ/PGF}}: for drawing the Klein bottle;
    \item \href{https://ctan.org/pkg/xcolor}{\texttt{xcolor}}: for color customization;
    \item \href{https://ctan.org/pkg/graphicx}{\texttt{graphicx}}: for proportional scaling.
\end{itemize}

All dependencies are loaded automatically by
\texttt{kleinbottle}. There is no need to load them
manually unless additional functionality is required.
Version 1.01 has been tested with pdf\LaTeX, Xe\LaTeX,
and Lua\LaTeX{} in PDF output.

% --------------------------------------------------
\section{Installation}
% --------------------------------------------------

For manual installation, place the file
\texttt{kleinbottle.sty} in the same directory as your
main \LaTeX{} document, or in an appropriate local
TeX directory.

Then load the package in the preamble:

\begin{verbatim}
\usepackage{kleinbottle}
\end{verbatim}

No additional configuration is required.

% --------------------------------------------------
\section{Basic Usage}
% --------------------------------------------------

To insert the default Klein bottle miniature, simply
write:

\begin{verbatim}
\klein
\end{verbatim}

The result is:

\begin{center}
    \klein
\end{center}

The command accepts an optional argument containing
a comma-separated list of key--value pairs.

Its complete syntax is:

\begin{verbatim}
\klein[color=<color>,
       opacity=<number>,
       scale=<number>,
       rotate=<angle>,
       left=<number>, right=<number>,
       up=<number>, down=<number>]
\end{verbatim}

All eight keys are optional and may be specified
individually, simultaneously, or in any order.

Whenever an option is omitted, its default value
is used.

\subsection{Available Options}

\begin{center}
\renewcommand{\arraystretch}{1.4}
\begin{tabular}{lll}
\toprule
\textbf{Option} & \textbf{Default} & \textbf{Accepted values}\\
\midrule
\texttt{color}   & \texttt{black} & Valid xcolor expressions\\
\texttt{opacity} & \texttt{100}   & Numbers from 0 to 100\\
\texttt{scale}   & \texttt{1}     & Positive numbers\\
\texttt{rotate}  & \texttt{0}     & Angles from 0 to 360\\
\texttt{left}    & \texttt{0}     & Signed distance in cm\\
\texttt{right}   & \texttt{0}     & Signed distance in cm\\
\texttt{up}      & \texttt{0}     & Signed distance in cm\\
\texttt{down}    & \texttt{0}     & Signed distance in cm\\
\bottomrule
\end{tabular}
\end{center}

% --------------------------------------------------
\section{Customization}
% --------------------------------------------------

\subsection{Color}

The \texttt{color} option changes the color of the
miniature, including its solid and dashed lines.

The default color is black.

Named colors and color expressions supported by the
\texttt{xcolor} package may be used.

\begin{center}
\renewcommand{\arraystretch}{2}
\begin{tabular}{lc}
\toprule
\textbf{Command} & \textbf{Result}\\
\midrule
\verb|\klein[color=black]|   & \klein[color=black]\\
\verb|\klein[color=red]|     & \klein[color=red]\\
\verb|\klein[color=blue]|    & \klein[color=blue]\\
\verb|\klein[color=green]|   & \klein[color=green]\\
\verb|\klein[color=orange]|  & \klein[color=orange]\\
\verb|\klein[color=purple]|  & \klein[color=purple]\\
\verb|\klein[color=cyan]|    & \klein[color=cyan]\\
\verb|\klein[color=magenta]| & \klein[color=magenta]\\
\bottomrule
\end{tabular}
\end{center}

\subsubsection{Color Mixing}

The package also supports the color-mixing syntax
provided by \texttt{xcolor}.

\begin{center}
\renewcommand{\arraystretch}{2}
\begin{tabular}{lc}
\toprule
\textbf{Command} & \textbf{Result}\\
\midrule
\verb|\klein[color=blue!50!red]|
    & \klein[color=blue!50!red]\\
\verb|\klein[color=red!40!black]|
    & \klein[color=red!40!black]\\
\verb|\klein[color=green!50!black]|
    & \klein[color=green!50!black]\\
\verb|\klein[color=orange!70!black]|
    & \klein[color=orange!70!black]\\
\verb|\klein[color=blue!30!white]|
    & \klein[color=blue!30!white]\\
\bottomrule
\end{tabular}
\end{center}

\subsubsection{Custom Colors}

Users may define their own colors using the
\verb|\definecolor| command.

For example:

\begin{verbatim}
\definecolor{CustomGreen}{HTML}{2A9D8F}
\definecolor{CustomPurple}{HTML}{7952B3}

\klein[color=CustomGreen]
\klein[color=CustomPurple]
\end{verbatim}

\begin{center}
    \klein[color=CustomGreen]
    \qquad
    \klein[color=CustomPurple]
\end{center}

Any color model supported by \texttt{xcolor},
such as RGB, rgb, HTML, or CMYK, may be used
to define a named color.

% --------------------------------------------------
\subsection{Opacity}
% --------------------------------------------------

The \texttt{opacity} option controls the transparency
of the miniature.

Opacity is expressed as a percentage, with values
ranging from 0 to 100:

\begin{itemize}
    \item \texttt{opacity=100}: fully opaque;
    \item \texttt{opacity=50}: partially transparent;
    \item \texttt{opacity=0}: fully transparent.
\end{itemize}

The default value is 100.

\begin{center}
\renewcommand{\arraystretch}{2}
\begin{tabular}{lc}
\toprule
\textbf{Command} & \textbf{Result}\\
\midrule
\verb|\klein[opacity=100]| & \klein[opacity=100]\\
\verb|\klein[opacity=80]|  & \klein[opacity=80]\\
\verb|\klein[opacity=60]|  & \klein[opacity=60]\\
\verb|\klein[opacity=40]|  & \klein[opacity=40]\\
\verb|\klein[opacity=20]|  & \klein[opacity=20]\\
\verb|\klein[opacity=0]|   & \klein[opacity=0]\\
\bottomrule
\end{tabular}
\end{center}

For a clearer comparison, the following miniatures
are displayed at a larger scale:

\begin{center}
\begin{tabular}{ccccc}
    \klein[opacity=100,scale=4] &
    \klein[opacity=75,scale=4]  &
    \klein[opacity=50,scale=4]  &
    \klein[opacity=25,scale=4]  &
    \klein[opacity=0,scale=4]   \\[0.3cm]
    100\% & 75\% & 50\% & 25\% & 0\%
\end{tabular}
\end{center}

Since version 1.01, the strokes are composited as a single
TikZ transparency group before the requested opacity is applied.
This prevents the extra darkening at overlapping strokes that
occurred in version 1.0. The original curves and dash patterns
are unchanged. Mixing a color with white is not equivalent to
transparency over a colored background.

Notice that a fully transparent miniature still
occupies space in the document.

Decimal values are also supported, for example:

\begin{verbatim}
\klein[opacity=37.5]
\end{verbatim}

% --------------------------------------------------
\subsection{Scale}
% --------------------------------------------------

The \texttt{scale} option changes the size of the
miniature by multiplying its original dimensions
by a positive factor.

The default value is 1.

Values strictly between 0 and 1 reduce the miniature,
whereas values greater than 1 enlarge it.

Scaling is proportional: the dimensions, line
widths, and dash patterns are scaled together.

\begin{center}
\renewcommand{\arraystretch}{1.8}
\begin{tabular}{lc}
\toprule
\textbf{Command} & \textbf{Result}\\
\midrule
\verb|\klein[scale=0.25]| & \klein[scale=0.25]\\
\verb|\klein[scale=0.5]|  & \klein[scale=0.5]\\
\verb|\klein[scale=1]|    & \klein[scale=1]\\
\verb|\klein[scale=1.5]|  & \klein[scale=1.5]\\
\verb|\klein[scale=2]|    & \klein[scale=2]\\
\verb|\klein[scale=3]|    & \klein[scale=3]\\
\verb|\klein[scale=5]|    & \klein[scale=5]\\
\bottomrule
\end{tabular}
\end{center}

The following illustration compares several
different scaling factors.

\begin{center}
\begin{tabular}{cccccc}
    \klein[scale=0.5] &
    \klein[scale=1]   &
    \klein[scale=2]   &
    \klein[scale=3]   &
    \klein[scale=4]   &
    \klein[scale=5]   \\[0.3cm]
    $0.5$ & $1$ & $2$ & $3$ & $4$ & $5$
\end{tabular}
\end{center}

The scale must be strictly positive.
Zero and negative scaling factors are not accepted.

Extremely small or large factors are subject to PGF numerical
precision and TeX dimensional limits. A very small positive
number may be rounded to zero.

% --------------------------------------------------
\subsection{Rotation}
% --------------------------------------------------

The \texttt{rotate} option rotates the miniature
counterclockwise by a given angle, expressed in degrees.

The accepted values range from 0 to 360, with
a default value of 0.

\begin{center}
\renewcommand{\arraystretch}{2}
\begin{tabular}{lc}
\toprule
\textbf{Command} & \textbf{Result}\\
\midrule
\verb|\klein[rotate=0]|   & \klein[rotate=0]\\
\verb|\klein[rotate=45]|  & \klein[rotate=45]\\
\verb|\klein[rotate=90]|  & \klein[rotate=90]\\
\verb|\klein[rotate=135]| & \klein[rotate=135]\\
\verb|\klein[rotate=180]| & \klein[rotate=180]\\
\verb|\klein[rotate=225]| & \klein[rotate=225]\\
\verb|\klein[rotate=270]| & \klein[rotate=270]\\
\verb|\klein[rotate=315]| & \klein[rotate=315]\\
\verb|\klein[rotate=360]| & \klein[rotate=360]\\
\bottomrule
\end{tabular}
\end{center}

The following illustration shows eight different
orientations of the miniature:

\begin{center}
\begin{tabular}{cccc}
    \klein[rotate=0,scale=4]   &
    \klein[rotate=45,scale=4]  &
    \klein[rotate=90,scale=4]  &
    \klein[rotate=135,scale=4] \\[0.3cm]
    $0^\circ$ & $45^\circ$ & $90^\circ$ & $135^\circ$
    \\[0.8cm]
    \klein[rotate=180,scale=4] &
    \klein[rotate=225,scale=4] &
    \klein[rotate=270,scale=4] &
    \klein[rotate=315,scale=4] \\[0.3cm]
    $180^\circ$ & $225^\circ$ & $270^\circ$ & $315^\circ$
\end{tabular}
\end{center}

Fractional angles are also supported:

\begin{verbatim}
\klein[rotate=22.5]
\end{verbatim}

A rotation of 360 degrees produces the same
orientation as a rotation of 0 degrees.

% --------------------------------------------------
\subsection{Positioning}

Version 1.01 introduces four positioning keys: \texttt{left},
\texttt{right}, \texttt{up}, and \texttt{down}. Each specifies a
signed distance in centimeters; the default is zero. Use numbers
without the unit suffix (for example, \texttt{up=0.5}, not
\texttt{up=0.5cm}). Negative values reverse the direction.

The resulting displacement is
\[
  \Delta x=(\mathrm{right}-\mathrm{left})\,\mathrm{cm},\qquad
  \Delta y=(\mathrm{up}-\mathrm{down})\,\mathrm{cm}.
\]
The displacement is applied after scaling and rotation, in the
horizontal and vertical directions of the surrounding text, not
in the rotated coordinate system of the drawing. In particular,
\texttt{up=1} raises the miniature by one centimeter regardless
of its scale or rotation (in an ordinary untransformed text area).

\subsubsection{Vertical Displacement}

\begin{verbatim}
\klein[scale=3,up=0.5]
\klein[scale=3]
\klein[scale=3,down=0.5]
\end{verbatim}
\begin{center}
  \klein[scale=3,up=0.5]\qquad
  \klein[scale=3]\qquad
  \klein[scale=3,down=0.5]
\end{center}

Vertical displacement can change the height or depth of the
surrounding line. This is useful when aligning a rotated miniature
with an upright one. Rotation alone does not automatically align
their visual centers.

\begin{verbatim}
\klein[scale=3] \quad \klein[scale=3,rotate=180]
\klein[scale=3] \quad \klein[scale=3,rotate=180,up=0.8]
\end{verbatim}
\begin{center}
  \klein[scale=3]\quad\klein[scale=3,rotate=180]
  \qquad\quad
  \klein[scale=3]\quad\klein[scale=3,rotate=180,up=0.8]
\end{center}
The appropriate correction depends on the scale, rotation, font,
and desired alignment. The value above is illustrative.

\subsubsection{Horizontal Displacement}

\begin{verbatim}
\klein[scale=3,left=0.5]
\klein[scale=3]
\klein[scale=3,right=0.5]
\end{verbatim}
\begin{center}
  \klein[scale=3,left=0.5]\qquad
  \klein[scale=3]\qquad
  \klein[scale=3,right=0.5]
\end{center}
Horizontal displacement preserves the original horizontal advance
of the miniature. It moves the drawing without moving subsequent
text. The following examples illustrate this property. Extra space is
reserved after the miniature to avoid overlap:

\begin{verbatim}
A \klein\hspace{0.8cm}B
A \klein[right=0.5]\hspace{0.8cm}B
\end{verbatim}
\begin{center}
  A \klein\hspace{0.8cm}B\par\medskip
  A \klein[right=0.5]\hspace{0.8cm}B
\end{center}
Large offsets can cause overlap with adjacent text or extend beyond
margins. Add spacing explicitly when necessary.

\subsubsection{Negative and Combined Displacements}

For example, \texttt{up=-0.5} and \texttt{down=0.5} are equivalent.
Likewise, \texttt{left=-0.5} and \texttt{right=0.5} are equivalent.
Opposing keys cancel when their values are equal. All four keys
may be used together:

\begin{verbatim}
\klein[scale=3,left=-0.2,right=0.1,up=0.5,down=0.2]
\end{verbatim}
\begin{center}
  \klein[scale=3,left=-0.2,right=0.1,up=0.5,down=0.2]
\end{center}
The net displacement is 0.3 cm to the right and 0.3 cm upward.
Distances remain subject to the numerical and dimensional limits
of PGF and TeX.

% --------------------------------------------------
\section{Combining Options}
% --------------------------------------------------

All customization options are independent and
may be combined in a single command.

For example:

\begin{verbatim}
\klein[color=blue, opacity=75, scale=4, rotate=30,
       right=0.3, up=0.4]
\end{verbatim}

\begin{center}
    \klein[color=blue,opacity=75,scale=4,rotate=30,right=0.3,up=0.4]
\end{center}

The options may be specified in any order.
Therefore, the following two commands are equivalent:

\begin{verbatim}
\klein[color=red, scale=3, rotate=45]
\klein[rotate=45, color=red, scale=3]
\end{verbatim}

\begin{center}
    \klein[color=red,scale=3,rotate=45]
    \qquad
    \klein[rotate=45,color=red,scale=3]
\end{center}

\subsection{Additional Examples}

\begin{verbatim}
\klein[color=purple, opacity=50, scale=4, rotate=45]
\end{verbatim}

\begin{center}
    \klein[color=purple,opacity=50,scale=4,rotate=45]
\end{center}

\begin{verbatim}
\klein[color=orange!70!black, scale=5, rotate=90]
\end{verbatim}

\begin{center}
    \klein[color=orange!70!black,scale=5,rotate=90]
\end{center}

\begin{verbatim}
\klein[color=CustomGreen, opacity=80, scale=4, rotate=315]
\end{verbatim}

\begin{center}
    \klein[color=CustomGreen,opacity=80,scale=4,rotate=315]
\end{center}

% --------------------------------------------------
\section{Scope of Customization}
% --------------------------------------------------

The customization options apply only to the
individual invocation of the \verb|\klein| command.

They do not modify the default appearance of
subsequent miniatures.

For example:

\begin{verbatim}
\klein[color=red, scale=3]
\klein
\klein[color=blue, rotate=90]
\klein
\end{verbatim}

\begin{center}
    \klein[color=red,scale=3]
    \qquad
    \klein
    \qquad
    \klein[color=blue,rotate=90]
    \qquad
    \klein
\end{center}

Each invocation starts with the default settings
before applying the options supplied by the user. This includes
all four positioning keys. If a key is repeated, its last
assignment takes precedence.

% --------------------------------------------------
\section{Using the Miniature in Documents}
% --------------------------------------------------

\subsection{Inline Usage}

The default miniature is designed to be inserted
directly into ordinary text.

For example:

\begin{verbatim}
The Klein bottle \klein\ is a non-orientable surface.
\end{verbatim}

\begin{quote}
The Klein bottle \klein\ is a non-orientable surface.
\end{quote}

The miniature may also be customized within a
paragraph:

\begin{verbatim}
The Klein bottle \klein[color=blue]
is a classical object in topology.
\end{verbatim}

\begin{quote}
The Klein bottle \klein[color=blue]
is a classical object in topology.
\end{quote}

\subsection{Consecutive Miniatures}

Version 1.01 fixes unintended paragraph breaks in inline use.
Consecutive miniatures can be placed on the same line without
additional boxes, provided there is enough horizontal space.
Use an explicit control space after the bare command if an
interword space is desired.

\begin{verbatim}
Look, one Klein bottle \klein.
Now look at two \klein\ \klein.

\klein\klein\klein
\klein \quad \klein \qquad \klein
\end{verbatim}
\begin{quote}
Look, one Klein bottle \klein.
Now look at two \klein\ \klein.
\end{quote}
\begin{center}
  \klein\klein\klein\par\medskip
  \klein \quad \klein \qquad \klein
\end{center}
The miniature is a graphic, not a mathematical font character;
its size does not automatically follow math script styles.

\subsection{Displayed Illustrations}

Larger scaling factors can be used to produce
standalone illustrations.

\begin{verbatim}
\begin{center}
    \klein[color=blue!70!black, scale=8]
\end{center}
\end{verbatim}

\begin{center}
    \klein[color=blue!70!black,scale=8]
\end{center}

Since the miniature is drawn using TikZ,
it is not based on an external bitmap image.
In PDF output, it retains its vector-based
appearance when enlarged.

\subsection{Figures and Captions}

The miniature may also be placed inside a
standard figure environment.

\begin{verbatim}
\begin{figure}[ht]
    \centering
    \klein[color=ManualBlue, scale=5]
    \caption{A representation of the Klein bottle.}
\end{figure}
\end{verbatim}

\begin{center}
    \klein[color=ManualBlue,scale=5]\par\vspace{0.2cm}
    \small Figure example: A representation
    of the Klein bottle.
\end{center}

% --------------------------------------------------
\subsection{Tables and Beamer Presentations}

The command can be used in table cells and Beamer frames.
For example:
\begin{verbatim}
\begin{tabular}{cc}
  \klein[color=red] & \klein[rotate=180,up=0.25]
\end{tabular}
\end{verbatim}
\begin{center}
\begin{tabular}{cc}
  \klein[color=red] & \klein[rotate=180,up=0.25]
\end{tabular}
\end{center}

\begin{verbatim}
\documentclass{beamer}
\usepackage{kleinbottle}
\begin{document}
\begin{frame}{The Klein Bottle}
  \klein[color=blue,scale=4]
\end{frame}
\end{document}
\end{verbatim}
For PDF bookmarks, provide a textual alternative with
\verb|\texorpdfstring| when using \verb|\klein| in a section title.

% --------------------------------------------------
\section{Error Handling}
% --------------------------------------------------

Use decimal numbers without units, percent signs, or degree symbols.
Use a decimal point, not a decimal comma.

The package checks the numerical values supplied
to the \texttt{opacity}, \texttt{scale}, and
\texttt{rotate} options.

Values outside the accepted ranges generate
package errors.

\begin{center}
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{ll}
\toprule
\textbf{Invalid command} & \textbf{Reason}\\
\midrule
\verb|\klein[opacity=-10]| & Negative opacity\\
\verb|\klein[opacity=120]| & Opacity above 100\\
\verb|\klein[scale=0]|     & Zero scaling factor\\
\verb|\klein[scale=-2]|    & Negative scaling factor\\
\verb|\klein[rotate=-45]|  & Negative rotation\\
\verb|\klein[rotate=400]|  & Rotation above 360 degrees\\
\bottomrule
\end{tabular}
\end{center}

If compilation continues after a numerical
range error, the corresponding option is
replaced by its default value.

Undefined colors and unrecognized option names
are handled by the underlying \texttt{xcolor}
and \texttt{pgfkeys} mechanisms. Non-numeric input may
produce a PGF math error; the fallback described above
only applies to numerical range errors. The positioning keys accept
signed numerical distances and have no additional package-defined
range restriction. Invalid positioning inputs may generate PGF math
errors; they do not have a dedicated fallback. Always correct invalid
arguments before distributing the document.

% --------------------------------------------------
\section{Minimal Working Example}

The following complete example uses all five customization
categories. The right-hand panel reproduces its contents in a
smaller typesetting area, rather than showing a full output page.

\medskip
\noindent
\begin{minipage}[t]{0.58\textwidth}
\vspace{0pt}
\textbf{Source code}\par
\small
\begin{verbatim}
\documentclass{article}
\usepackage{kleinbottle}
\definecolor{MyColor}{HTML}{234A76}

\begin{document}

One Klein bottle \klein.
Two Klein bottles \klein\ \klein.

\begin{center}
  \klein[color=MyColor,scale=3]
  \quad
  \klein[color=red,opacity=50,
         scale=3,rotate=180,up=.8]
\end{center}

\end{document}
\end{verbatim}
\end{minipage}%
\hfill
\begin{minipage}[t]{0.38\textwidth}
\vspace{0pt}
\textbf{Output}\par\medskip
\noindent\fbox{%
  \begin{minipage}{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
  \small
  \definecolor{MyColor}{HTML}{234A76}
  One Klein bottle \klein.
  Two Klein bottles \klein\ \klein.
  \begin{center}
    \klein[color=MyColor,scale=3]\quad
    \klein[color=red,opacity=50,scale=3,rotate=180,up=.8]
  \end{center}
  \end{minipage}%
}
\end{minipage}
\par\medskip

% --------------------------------------------------
\section{License and Maintenance}
% --------------------------------------------------

Copyright \textcopyright{} 2026 Benjamim Lima Neto.

This package may be distributed and/or modified
under the conditions of the \LaTeX{} Project
Public License (LPPL), either version 1.3c of
this license or, at your option, any later version.

The latest version of this license is available at:

\begin{center}
\url{https://www.latex-project.org/lppl.txt}
\end{center}

The package has the LPPL maintenance status
\texttt{maintained}.

The author and current maintainer is Benjamim Lima Neto.
Bug reports and suggestions may be submitted using the contact
information in the accompanying \texttt{README.md} file.
The Work consists of \texttt{kleinbottle.sty},
\texttt{kleinbottle.tex}, \texttt{README.md}, and the derived
file \texttt{kleinbottle.pdf}. The accompanying \texttt{LICENSE}
contains the official LPPL text.

% --------------------------------------------------
\section{Version History}
% --------------------------------------------------

\noindent
\textbf{Version 1.01 -- November 30, 2026}
\begin{itemize}
  \item Fixed unintended paragraph breaks and consecutive inline placement.
  \item Applied opacity to the complete drawing using a transparency group.
  \item Added four signed positioning keys, in centimeters.
  \item Preserved the original curves and existing customization interface.
  \item Updated the user manual and examples.
\end{itemize}

\noindent
\textbf{Version 1.0 -- November 26, 2026}

\begin{itemize}
    \item Initial release.
    \item Introduction of the \verb|\klein| command.
    \item Color customization.
    \item Opacity customization.
    \item Proportional scaling.
    \item Rotation in degrees.
    \item Validation of numerical option ranges.
\end{itemize}

\medskip

\begin{center}
    \klein[color=ManualBlue,scale=2]
    \qquad
    \klein[color=CustomGreen,scale=2]
    \qquad
    \klein[color=CustomPurple,scale=2]
\end{center}
\vfill
\hfill Benjamim Lima Neto

\end{document}
