Add indented lines override to \wrapfig.
This commit is contained in:
@@ -82,14 +82,14 @@
|
|||||||
\ExpEnvOption%
|
\ExpEnvOption%
|
||||||
\begin{\l_BigFloat_type_str}[\l_BigFloat_placement_str]% float environment
|
\begin{\l_BigFloat_type_str}[\l_BigFloat_placement_str]% float environment
|
||||||
\begin{SmartAdjustWidth}{%
|
\begin{SmartAdjustWidth}{%
|
||||||
|
|
||||||
\fp_to_dim:n {
|
\fp_to_dim:n {
|
||||||
-\l_BigFloat_overhang_dim
|
-\l_BigFloat_overhang_dim
|
||||||
}%
|
}%
|
||||||
}{%
|
}{%
|
||||||
\fp_to_dim:n {%
|
\fp_to_dim:n {%
|
||||||
-\l_BigFloat_overhang_dim
|
-\l_BigFloat_overhang_dim
|
||||||
* \l_BigFloat_offset_fp
|
* \l_BigFloat_offset_fp
|
||||||
}%
|
}%
|
||||||
}%
|
}%
|
||||||
\begin{minipage}{\linewidth}%
|
\begin{minipage}{\linewidth}%
|
||||||
@@ -118,11 +118,11 @@
|
|||||||
% Key-value options passed to \includegraphics.
|
% Key-value options passed to \includegraphics.
|
||||||
O{}
|
O{}
|
||||||
% Key-value options.
|
% Key-value options.
|
||||||
O{}
|
O{}
|
||||||
% Graphic file.
|
% Graphic file.
|
||||||
m
|
m
|
||||||
% Label.
|
% Label.
|
||||||
>{\TrimSpaces}m
|
>{\TrimSpaces}m
|
||||||
% Caption.
|
% Caption.
|
||||||
m
|
m
|
||||||
}{
|
}{
|
||||||
@@ -142,15 +142,6 @@
|
|||||||
\keys_define:nn{}{
|
\keys_define:nn{}{
|
||||||
BigFig .inherit:n = BigFloat,
|
BigFig .inherit:n = BigFloat,
|
||||||
}
|
}
|
||||||
% \keys_define:nn{BigFig}{
|
|
||||||
% overhang .dim_set:N = \l_BigFig_overhang_dim,
|
|
||||||
% overhang .initial:e = {\c_BigFloat_overhang_dim},
|
|
||||||
|
|
||||||
% placement .clist_set:N= \l_BigFig_placement_clist,
|
|
||||||
|
|
||||||
% offset .fp_set:N = \l_BigFig_offset_fp,
|
|
||||||
% offset .initial:e = {\c_BigFloat_offset_fp},
|
|
||||||
% }
|
|
||||||
|
|
||||||
\NewDocumentCommand{\BigFig}{
|
\NewDocumentCommand{\BigFig}{
|
||||||
% Key=value options.
|
% Key=value options.
|
||||||
@@ -260,15 +251,15 @@
|
|||||||
% #1: Key=value options.
|
% #1: Key=value options.
|
||||||
O{}
|
O{}
|
||||||
% #2: First graphic file.
|
% #2: First graphic file.
|
||||||
m
|
m
|
||||||
% #3: First label.
|
% #3: First label.
|
||||||
>{\TrimSpaces}m
|
>{\TrimSpaces}m
|
||||||
% #4: First caption.
|
% #4: First caption.
|
||||||
>{\TrimSpaces}m
|
>{\TrimSpaces}m
|
||||||
% #5: Second graphic file.
|
% #5: Second graphic file.
|
||||||
m
|
m
|
||||||
% #6: Second label.
|
% #6: Second label.
|
||||||
>{\TrimSpaces}m
|
>{\TrimSpaces}m
|
||||||
% #7: Second caption.
|
% #7: Second caption.
|
||||||
>{\TrimSpaces}m
|
>{\TrimSpaces}m
|
||||||
}{%
|
}{%
|
||||||
|
|||||||
@@ -2,60 +2,62 @@
|
|||||||
\ProvidesPackage{PrimeTeX/packages/Fonts}[2025-06-24]
|
\ProvidesPackage{PrimeTeX/packages/Fonts}[2025-06-24]
|
||||||
|
|
||||||
% Specify Fonts
|
% Specify Fonts
|
||||||
\RequirePackage{fontspec}
|
\RequirePackage{fontspec}
|
||||||
|
|
||||||
\NewDocumentCommand{\fontpath}{}{PrimeTeX/fonts}
|
\NewDocumentCommand{\fontpath}{}{PrimeTeX/fonts}
|
||||||
|
|
||||||
% Main font: Roboto Serif
|
% Main font: Roboto Serif
|
||||||
\setmainfont{RobotoSerif}[
|
\setmainfont{RobotoSerif}[
|
||||||
Path = {\fontpath/RobotoSerif/},
|
Path = {\fontpath/RobotoSerif/},
|
||||||
Extension = .ttf,
|
Extension = .ttf,
|
||||||
UprightFont = *-Light,
|
UprightFont = *-Light,
|
||||||
BoldFont = *-SemiBold,
|
BoldFont = *-SemiBold,
|
||||||
ItalicFont = *-LightItalic,
|
ItalicFont = *-LightItalic,
|
||||||
BoldItalicFont = *-SemiBoldItalic,
|
BoldItalicFont = *-SemiBoldItalic,
|
||||||
]
|
]
|
||||||
|
|
||||||
% Sans serif font: Roboto
|
% Sans serif font: Roboto
|
||||||
\setsansfont{Roboto}[
|
\setsansfont{Roboto}[
|
||||||
Path = {\fontpath/Roboto/},
|
Path = {\fontpath/Roboto/},
|
||||||
Extension = .ttf,
|
Extension = .ttf,
|
||||||
UprightFont = *-Regular,
|
UprightFont = *-Regular,
|
||||||
BoldFont = *-Bold,
|
BoldFont = *-Bold,
|
||||||
ItalicFont = *-Italic,
|
ItalicFont = *-Italic,
|
||||||
BoldItalicFont = *-BoldItalic,
|
BoldItalicFont = *-BoldItalic,
|
||||||
]
|
]
|
||||||
|
|
||||||
% Monospace font: Roboto Mono
|
% Monospace font: Roboto Mono
|
||||||
\setmonofont{RobotoMono}[
|
\setmonofont{RobotoMono}[
|
||||||
Path = {\fontpath/RobotoMono/},
|
Path = {\fontpath/RobotoMono/},
|
||||||
Extension = .ttf,
|
Extension = .ttf,
|
||||||
UprightFont = *-Regular,
|
UprightFont = *-Regular,
|
||||||
BoldFont = *-Bold,
|
BoldFont = *-Bold,
|
||||||
ItalicFont = *-Italic,
|
ItalicFont = *-Italic,
|
||||||
BoldItalicFont = *-BoldItalic,
|
BoldItalicFont = *-BoldItalic,
|
||||||
]
|
]
|
||||||
|
|
||||||
% Headings & Titles font: Roboto Slab
|
% Headings & Titles font: Roboto Slab
|
||||||
\newfontfamily{\sbfamily}{RobotoSlab}[
|
\newfontfamily{\sbfamily}{RobotoSlab}[
|
||||||
Path = {\fontpath/},
|
Path = {\fontpath/},
|
||||||
Extension = .ttf,
|
Extension = .ttf,
|
||||||
UprightFont = RobotoSlab/RobotoSlab-SemiBold,
|
UprightFont = RobotoSlab/RobotoSlab-SemiBold,
|
||||||
BoldFont = RobotoSlab/RobotoSlab-Black,
|
BoldFont = RobotoSlab/RobotoSlab-Black,
|
||||||
% Roboto Slab doesn't have any italic form, so use
|
% Roboto Slab doesn't have any italic form, so use
|
||||||
% the Roboto Serif version.
|
% the Roboto Serif version.
|
||||||
ItalicFont = RobotoSerif/RobotoSerif-SemiBoldItalic,
|
ItalicFont = RobotoSerif/RobotoSerif-SemiBoldItalic,
|
||||||
BoldItalicFont = RobotoSerif/RobotoSerif-ExtraBoldItalic,
|
BoldItalicFont = RobotoSerif/RobotoSerif-ExtraBoldItalic,
|
||||||
]
|
]
|
||||||
|
|
||||||
% Emoji font: Noto Emoji
|
% Emoji font: Noto Emoji
|
||||||
\newfontfamily{\emfamily}{NotoEmoji}[
|
\newfontfamily{\emfamily}{NotoEmoji}[
|
||||||
Path = {\fontpath/},
|
Path = {\fontpath/},
|
||||||
Extension = .ttf,
|
Extension = .ttf,
|
||||||
UprightFont = NotoEmoji/NotoEmoji-Regular,
|
UprightFont = NotoEmoji/NotoEmoji-Regular,
|
||||||
BoldFont = NotoEmoji/NotoEmoji-Bold,
|
BoldFont = NotoEmoji/NotoEmoji-Bold,
|
||||||
ItalicFont = NotoEmoji/NotoEmoji-Light,
|
ItalicFont = NotoEmoji/NotoEmoji-Light,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
\RequirePackage{amssymb}
|
||||||
|
|
||||||
\NewDocumentCommand{\serif}{m}{\textrm{#1}}
|
\NewDocumentCommand{\serif}{m}{\textrm{#1}}
|
||||||
\NewDocumentCommand{\sans}{m}{\textsf{#1}}
|
\NewDocumentCommand{\sans}{m}{\textsf{#1}}
|
||||||
@@ -64,8 +66,6 @@
|
|||||||
\NewDocumentCommand{\code}{m}{\mono{\small{}#1}}
|
\NewDocumentCommand{\code}{m}{\mono{\small{}#1}}
|
||||||
\NewDocumentCommand{\emoji}{m}{{\emfamily{}#1}}
|
\NewDocumentCommand{\emoji}{m}{{\emfamily{}#1}}
|
||||||
|
|
||||||
\RequirePackage{amssymb}
|
|
||||||
|
|
||||||
\RequirePackage[os=win]{menukeys}
|
\RequirePackage[os=win]{menukeys}
|
||||||
|
|
||||||
\renewmenumacro{\directory}[/]{hyphenatepaths}
|
\renewmenumacro{\directory}[/]{hyphenatepaths}
|
||||||
|
|||||||
@@ -44,28 +44,40 @@
|
|||||||
\includegraphics[keepaspectratio,#1]{#2}%
|
\includegraphics[keepaspectratio,#1]{#2}%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\NewDocumentCommand{\@wrapfigbody}{m m m m}{
|
||||||
|
\captionsetup{type=figure}%
|
||||||
|
\capstart%
|
||||||
|
\includegraphics[%
|
||||||
|
keepaspectratio,%
|
||||||
|
#2%
|
||||||
|
]{#1}%
|
||||||
|
\Centering\captionof{figure}{#4}%
|
||||||
|
\label{fig:#3}%
|
||||||
|
}
|
||||||
|
|
||||||
\NewDocumentCommand{\wrapfig}{
|
\NewDocumentCommand{\wrapfig}{
|
||||||
% alignment [l,r,i,o]
|
% #1: alignment [l,r,i,o]
|
||||||
O{O}
|
O{O}
|
||||||
% horizontal_offset
|
% #2: horizontal_offset
|
||||||
O{\marparwidth}
|
O{\marparwidth}
|
||||||
% graphic_file
|
% #3: graphic_file
|
||||||
m
|
m
|
||||||
% (width|height)=lengthvalue
|
% #4: (width|height)=lengthvalue
|
||||||
O{}
|
O{}
|
||||||
% label
|
% #5: label
|
||||||
>{\TrimSpaces}m
|
>{\TrimSpaces}m
|
||||||
% caption
|
% #6: caption
|
||||||
m%
|
m%
|
||||||
|
% #7: indented lines override
|
||||||
|
o
|
||||||
}{%
|
}{%
|
||||||
\begin{wrapfigure}{#1}[#2]%
|
\IfNoValueTF{#7}{%
|
||||||
\captionsetup{type=figure}%
|
\begin{wrapfigure}{#1}[#2]%
|
||||||
\capstart%
|
\@wrapfigbody{#3}{#4}{#5}{#6}%
|
||||||
\includegraphics[%
|
\end{wrapfigure}%
|
||||||
keepaspectratio,%
|
}{%
|
||||||
#4%
|
\begin{wrapfigure}[#7]{#1}[#2]%
|
||||||
]{#3}%
|
\@wrapfigbody{#3}{#4}{#5}{#6}%
|
||||||
\Centering\captionof{figure}{#6}%
|
\end{wrapfigure}%
|
||||||
\label{fig:#5}%
|
}%
|
||||||
\end{wrapfigure}%
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user