Skip to content

Commit a52c793

Browse files
Merge pull request #272 from rpgtex/master
Update v0.8.0 with latest changes.
2 parents 0107e14 + cb67118 commit a52c793

File tree

4 files changed

+28
-20
lines changed

4 files changed

+28
-20
lines changed

example.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ \part{Customization}
266266
\chapter{Colors}
267267

268268
\begin{table*}[b]
269-
\caption{\DndFontTableTitle{}Colors Supported by this Package\label{tab:colors}}
269+
\caption{\DndFontTableTitle{}Colors Supported by this Package}\label{tab:colors}
270270

271271
\begin{tabularx}{\linewidth}{lX}
272272
\textbf{Color} & \textbf{Description} \\

lib/dndfonts.sty

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66
\RequirePackage{lettrine}
77
\RequirePackage{Royal}
8+
\RequirePackage[auto]{contour}
89

910
\bool_if:NT \l__dnd_layout_bool
1011
{
@@ -22,19 +23,6 @@
2223
{ \sffamily }
2324
}
2425

25-
% Add the outlines
26-
\NewDocumentCommand{\DndContour}{ O{} m }
27-
{
28-
\textpdfrender
29-
{
30-
TextRenderingMode = FillStroke,
31-
StrokeColor = contourgray,
32-
LineWidth = 0.03ex,
33-
RenderingIntent = RelativeColorimetric,
34-
#1
35-
}{#2}
36-
}
37-
3826
\keys_define:nn { dnd / fonts }
3927
{
4028
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -327,3 +315,24 @@
327315
{#2}
328316
{#3}
329317
}
318+
319+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
320+
% Contour that can break across lines. Can accept \newline to force a break.
321+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322+
\cs_new_protected:Npn \__dnd_contour_preserve_space:nn #1#2
323+
{
324+
\group_begin:
325+
\seq_set_split:Nnn \l_tmpa_seq { ~ } { #2 }
326+
\seq_set_map:NNn \l_tmpb_seq \l_tmpa_seq { \exp_not:n {\contour{#1}{##1}} }
327+
\seq_use:Nn \l_tmpb_seq { ~ }
328+
\group_end:
329+
}
330+
331+
\NewDocumentCommand{\DndContour}{ O{contourgray} m }
332+
{
333+
\group_begin:
334+
\seq_set_split:Nnn \l_tmpa_seq { \newline } { #2 }
335+
\seq_set_map:NNn \l_tmpb_seq \l_tmpa_seq { \exp_not:n {\__dnd_contour_preserve_space:nn{#1}{##1}} }
336+
\seq_use:Nn \l_tmpb_seq { \newline }
337+
\group_end:
338+
}

lib/dndsections.sty

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
\bool_if:NT \l__dnd_layout_bool
44
{
5-
\RequirePackage{pdfrender}
6-
75
% Change part numbering to Arabic numbers from Roman numerals
86
\renewcommand{\thepart}{\arabic{part}}
97

@@ -23,15 +21,15 @@
2321
[display]
2422
{ \centering \DndFontPart } % format
2523
{ \DndContour{\partname\ \thepart} } % label
26-
{2ex} % sep
24+
{ 2ex } % sep
2725
{ \DndContour } % before-code
2826

2927
% Chapter
3028
\titleformat {\chapter}
3129
{ \DndFontChapter } % format
3230
{ \DndContour{\chaptertitlename\ \thechapter :} } % label
3331
{ \wordsep } % sep
34-
{\DndContour} % before-code
32+
{ \DndContour } % before-code
3533

3634
\titlespacing* {\chapter}
3735
{ 0pt } % left
@@ -47,7 +45,7 @@
4745

4846
\titlespacing* { \section }
4947
{ 0pt } % left
50-
{ 1.3ex plus .43ex minus .43ex } % before-sep
48+
{ 1.3ex plus .43ex minus .43ex } % before-sep
5149
{ 0pt } % after-sep
5250

5351
% Subsection
@@ -60,7 +58,7 @@
6058

6159
\titlespacing*{ \subsection }
6260
{ 0pt } % left
63-
{ 1.4ex plus .47ex minus .47ex } % before-sep
61+
{ 1.4ex plus .47ex minus .47ex } % before-sep
6462
{ 1.2ex } % after-sep
6563

6664
% Subsubsection

packages.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ bookman
2626
cfr-initials
2727
cm
2828
colortbl
29+
contour
2930
courier
3031
ec
3132
enumitem

0 commit comments

Comments
 (0)