docmachine-containers/utils/docs/main.tex
Glenn Y. Rolland 7aabf1235e feat(docs): add support for Bitcoin symbol in LaTeX documents
Enhanced document compatibility with Bitcoin symbol for broader
financial documentation needs.

- Added `newunicodechar` package to support Unicode characters.
- Implemented `\DeclareUnicodeCharacter` command to define custom
  Unicode characters.
- Defined `\bitcoinA` command to render the Bitcoin symbol using Unicode
  20BF.

Signed-off-by: Glenn Y. Rolland <glenux@glenux.net>
2025-03-27 11:02:48 +01:00

49 lines
1.4 KiB
TeX

% main.tex
% Set the document language to English
\usepackage[english]{babel}
\usepackage{newunicodechar}
% Define command \DeclareUnicodeCharacter (which was defined in inputenc for non-utf8 engines)
\newcommand{\DeclareUnicodeCharacter}[2]{%
\begingroup\lccode`|=\string"#1\relax
\lowercase{\endgroup\newunicodechar{|}}{#2}%
}
\def\bitcoinA{%
\leavevmode
\vtop{\offinterlineskip %\bfseries
\setbox0=\hbox{B}%
\setbox2=\hbox to\wd0{\hfil\hskip-.03em
\vrule height .3ex width .15ex\hskip .08em
\vrule height .3ex width .15ex\hfil}
\vbox{\copy2\box0}\box2}}
% \DeclareUnicodeCharacter{21D2}{$\Rightarrow$}
\DeclareUnicodeCharacter{20BF}{\bitcoinA}
% Adjust page geometry
\usepackage[
a4paper, inner=1.5cm, outer=1.5cm, top=2cm, bottom=2cm,
% bindingoffset=0.5cm
]{geometry}
% Configure headers and footers using scrlayer-scrpage
\usepackage[automark,headsepline,footsepline]{scrlayer-scrpage}
\clearpairofpagestyles
\ohead{\headmark}
\ofoot{\pagemark}
\pagestyle{scrheadings}
% Include additional settings from external files
% \input{inline_code.tex}
% \input{bullet_styling.tex}
\input{utils/docs/chapter_breaks.tex}
\input{utils/docs/blockquote.tex}
\input{utils/docs/hyperref_setup.tex}
% Font settings using fontspec
\usepackage{fontspec}
% \setmainfont{DejaVu Serif} % Set your main font
% \setmonofont{SauceCodePro Nerd Font} % Set your monospace (code) font