Add Emoji font and InlineGraphic command.

This commit is contained in:
Silcantar
2025-08-28 22:56:57 -05:00
parent 168dca350f
commit 9147415df7
10 changed files with 35 additions and 11 deletions

View File

@@ -44,7 +44,7 @@
% #2: Tabularray colspec, passed to @boxout argument #2.
O{colspec={X[l,h]}}
% #3: Caption.
+m
m
% #4: [Ww] for warning box.
o
% #5: Body, passed to @boxout.
@@ -80,7 +80,7 @@
% #5: Tabularray colpec, passed to Boxout argument #2.
O{X[l,h]}
% #6: Caption, passed to Boxout argument #3.
+m
m
% #7: [Ww] for warning box, if present passed to Boxout argument #4.
o
% #5: Body, passed to Boxout.
@@ -108,7 +108,7 @@
O{3in}
O{X[l,h]}
>{\TrimSpaces}m
+m
m
o
+b
}{%

View File

@@ -48,16 +48,28 @@
BoldItalicFont = RobotoSerif/RobotoSerif-ExtraBoldItalic,
]
% Emoji font: Noto Emoji
\newfontfamily{\emfamily}{NotoEmoji}[
Path = {\fontpath/},
Extension = .ttf,
UprightFont = NotoEmoji/NotoEmoji-Regular,
BoldFont = NotoEmoji/NotoEmoji-Bold,
ItalicFont = NotoEmoji/NotoEmoji-Light,
]
\NewDocumentCommand{\serif}{m}{\textrm{#1}}
\NewDocumentCommand{\sans}{m}{\textsf{#1}}
\NewDocumentCommand{\mono}{m}{\texttt{#1}}
\NewDocumentCommand{\slab}{m}{{\sbfamily{}#1}}
\NewDocumentCommand{\code}{m}{\mono{\small{}#1}}
\NewDocumentCommand{\emoji}{m}{{\emfamily{}#1}}
\RequirePackage{amssymb}
\RequirePackage[os=win]{menukeys}
\renewmenumacro{\directory}[,]{hyphenatepaths}
\renewmenumacro{\directory}[/]{hyphenatepaths}
\renewmenumacro{\keys}[+]{shadowedangularkeys}
\renewmenumacro{\menu}[>]{angularmenus}
\RenewDocumentCommand{\ctrlname}{}{$\wedge$}

View File

@@ -8,7 +8,17 @@
\RequirePackage{wrapfig2}
\providelength{\iconsize}[0.25in]
\providelength{\igh}[10pt] % igh = Inline Graphics Height.
\providelength{\@InlineGraphicHeight}[12pt]
\providelength{\@InlineGraphicOffset}[-2pt]
\NewDocumentCommand{\InlineGraphic}{
O{\@InlineGraphicHeight}
m
O{\@InlineGraphicOffset}
}{%
\raisebox{#3}{\includegraphics[keepaspectratio,height=#1]{#2}}%
}
% Shorthand command for \includegraphics.
\NewDocumentCommand{\ig}{O{width=0.5in} m}{%
@@ -96,15 +106,15 @@
% First label.
>{\TrimSpaces}m
% First caption.
m
>{\TrimSpaces}m
% Second graphic file.
m
% Second label.
>{\TrimSpaces}m
% Second caption.
m
>{\TrimSpaces}m
}{%
\begin{BigFloat}[generic][#1][#2][#3]%
\begin{BigFloat}[figure][#1][#2][#3]%
\begin{tblr}{%
colspec = {*{2}{Q[c,m,wd=\twinfigwidth]}},%
hlines = {0pt},

View File

@@ -4,6 +4,8 @@
% Suppress warning about \showhyphens being changed.
\let\CheckCommand\providecommand
\RequirePackage{ifthen}
\NewDocumentCommand{\providelength}{m O{0pt}}{%
\ifdeflength{#1}{% It is already defined!
}{% Not defined, so define it!
@@ -126,7 +128,7 @@
}{%
\begin{#1}[#3]% float environment
\begin{SmartAdjustWidth}{-#2}{-#2 * \real{#4}}% adjustwidth(*)
\begin{minipage}{\linewidth}%#2 * (#4 + 1) + \textwidth}%
\begin{minipage}{\linewidth}%{#2 * (#4 + 1) + \textwidth}%
\ifthenelse{\boolean{isDraft}}{%
{\color{layoutColor}\rule{\textwidth}{1pt}\zws}%
#5%
@@ -135,6 +137,6 @@
#5%
}%
\end{minipage}%
\end{#5}%
\end{SmartAdjustWidth}%
\end{#1}%
}{}

View File

@@ -21,7 +21,7 @@
}{
\hypersetup{
allcolors = textColor,
pdfduplex = true,
pdfduplex = DuplexFlipLongEdge,
pdfpagelayout = TwoPageRight,
}
}