summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgfornament-han/pgfornament-han_manual.tex
blob: f42480947ceae9e12d6acd39f5ca0a29e2c2f825 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
% !TEX option = --shell-escape
% !TEX program = xelatex
\documentclass[fontset=fandol]{ctexart}

\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}

\usepackage{ragged2e}
\usepackage[svgnames]{xcolor}
\usepackage{pgfornament-han}
\usetikzlibrary{chains}
\usetikzlibrary{calc}
\usetikzlibrary{decorations}
\usetikzlibrary{decorations.text,decorations.markings}

\usepackage{cncolours}

\usepackage{geometry}
\geometry{hmargin=1in,vmargin=0.8in,headheight=10pt}

\usepackage{tcolorbox}
\tcbuselibrary{skins,raster}


%%%%%% 这段代码可以忽视,只是 --shell-escape 时调用 minted 不然就用 listings
\ifnum\shellescape=1
  \tcbuselibrary{minted}
  \setminted{breaksymbolleft={},breakindent=\ccwd}
  \newminted{latex}{}
  \newmintinline{latex}{}
\else
  \tcbuselibrary{listings}
  \newcommand{\latexinline}[1]{\lstinline|#1|}
  \lstnewenvironment{latexcode}{\lstset{language={[LaTeX]TeX}}}{}
  \lstset{basicstyle=\ttfamily}
\fi
%%%%%%%%


\tcbset{fonttitle=\kaishu\large\bfseries,colback=铅白!60!white,colbacktitle=绀青,coltitle=精白,colframe=墨灰}

\makeatletter
\newcommand{\getpgfornamenthanDim}[1]{%
 {\@pgfornamenthanDim{#1}宽:\@pgfornamentX\\高:\@pgfornamentY}%
}
\makeatother

\usepackage{fancyhdr}
\fancyhf{}
\renewcommand{\headrule}{}

\fancyhead[L]{%
\newbox{\fortyseven}
\savebox{\fortyseven}{\pgfornamenthan[scale=0.2,color=鸭卵青]{47}}
\tikzset{every node/.append style={inner sep=0pt,鸭卵青}}
\begin{tikzpicture}[overlay,remember picture]
\node[anchor=north west,shift={(14.5pt,-14.5pt)}] at (current page.north west)
  (nw) {\pgfornamenthan[scale=0.2]{25}};
\node[anchor=north east,shift={(-14.5pt,-14.5pt)}] at (current page.north east)
  (ne) {\pgfornamenthan[scale=0.2,symmetry=v]{25}};
\node[anchor=south west,shift={(14.5pt,14.5pt)}] at (current page.south west)
  (sw) {\pgfornamenthan[scale=0.2,symmetry=h]{25}};
\node[anchor=south east,shift={(-14.5pt,14.5pt)}] at (current page.south east)
  (se) {\pgfornamenthan[scale=0.2,symmetry=c]{25}};
%
\begin{scope}[start chain,node distance=0pt]
\node[anchor=north west,on chain] at (nw.north east) {\usebox{\fortyseven}};
\foreach \i in {1,...,15} {
  \node[on chain]{\usebox{\fortyseven}};
}
\end{scope}
%
\begin{scope}[start chain,node distance=0pt]
\node[anchor=south west,on chain] at (sw.south east) {\usebox{\fortyseven}};
\foreach \i in {1,...,6} \node[on chain]{\usebox{\fortyseven}};
\end{scope}
%
\begin{scope}[start chain=going left,node distance=0pt]
\node[anchor=south east,on chain] at (se.south west) {\usebox{\fortyseven}};
\foreach \i in {1,...,6} \node[on chain]{\usebox{\fortyseven}};
\end{scope}
%
% 垂直的话 chains 比较不好控制,我懒得折腾了,直接用 \foreach。
% 自己算一下, (47) 长度 155. 那么 scale = 0.2 的话……
\foreach \i in {0,...,21}
  \node[anchor=south west,rotate=-90,shift={($\i*(31bp,0)$)}] at (nw.south west)
    {\usebox{\fortyseven}};
%
\foreach \i in {0,...,21}
  \node[anchor=south east,rotate=90,shift={($\i*(-31bp,0)$)}] at (ne.south east)
    {\usebox{\fortyseven}};
%
%% 严格来说应该放在 \fancyfoot 吧,算了一样啦
\node[yshift=32pt,铜绿] at (current page.south) {\pgfornamenthan[scale=0.1]{51}};
\node[yshift=32pt,text=black] at (current page.south) {\large\thepage};
%
\end{tikzpicture}
}

\pagestyle{fancy}
\fancypagestyle{plain}{\pagestyle{fancy}}

\usepackage[colorlinks]{hyperref}

\title{汉风图纹 \texttt{pgfornament-han}}
\author{林莲枝、张晨南}
\date{2019/08/10\\\url{https://github.com/liantze/pgfornament-han}}

\begin{document}

\maketitle

\begin{abstract}
利用 \texttt{pgfornament} 宏包可以在 \LaTeX{} 文件里便捷地画出十分典雅漂亮的、欧式风格的花纹。(详情请自行访问 \url{http://ctan.org/pkg/pgfornament})
 \texttt{pgfornament-han} 宏包的用意,正是为了尝试用 \texttt{pgfornament} 的已有机制,提供一些汉风的传统图纹。所有图纹均由\emph{张晨南}以 CAD 程式定稿、TikZ 绘制,再由\emph{林莲枝}转为适合 \texttt{pgfornament} 机制使用的宏包代码。
\end{abstract}

\part{基本用法}

\texttt{n} 为图纹编号的话,最简单的用法是 \latexinline{\pgfornamenthan[color=red,width=1.5cm]{n}}。
也可以用 \texttt{height} 或者 \texttt{scale} 设定大小。注意图纹比例是不变的,因此只有最后给出的选项有效。此外 \texttt{symmetry} 参数可以实现3种镜像,\texttt{v} (垂直)、\texttt{h}(水平)、\texttt{c}(中心=垂直+水平镜像),画边框的四个角点时很好用。其它TikZ 参数的应用:

\begin{latexcode}
\tikzset{pgfornamentstyle/.append style={draw=black,fill=red,line width=1}}
\pgfornamenthan[scale=2]{n}
\end{latexcode}

以下是一些范例。也记得翻到文档最后的附录,有惊喜。

\bigskip

\begin{tcblisting}{title={文本中的使用},listing side text,righthand width=5.5cm}
先来一个 \pgfornamenthan[color=blue,scale=0.18]{56}
寿字纹。原本的 \pgfornament[scale=0.2]{56} 依然可用。
\end{tcblisting}

\enlargethispage{\baselineskip}


\begin{tcblisting}{title={TikZ选项的应用},listing side text,righthand width=3cm}
\begin{tikzpicture}[baseline={(current bounding box.center)}]
  \tikzset{pgfornamentstyle/.style={
            draw=Goldenrod,fill=Red,line width=1pt}}
  \node[fill=black,circle,draw=Red,line width=2pt,inner sep=-8pt]
    at (0,0) {\pgfornamenthan[scale=0.38]{56}};
\end{tikzpicture}
\end{tcblisting}

\begin{tcblisting}{title={简单的边框范例}}

\begin{tikzpicture}[x=1pt,y=1pt]
    \tikzset{every node/.append style={inner sep=0pt,color=茜色}}
    \node (nw) {\pgfornamenthan[scale=0.35]{1}};
    \node[anchor=north west,right=140bp of nw] (ne) {\pgfornamenthan[symmetry=v,scale=0.35]{1}};
    \node[anchor=north west,below=0pt of nw] (sw) {\pgfornamenthan[symmetry=h,scale=0.35]{1}};
    \node[anchor=north east,below=0pt of ne] (se) {\pgfornamenthan[symmetry=c,scale=0.35]{1}};

    %% 用 pgfornmanet 自带的 \draw (A) to[ornamenthan=19] (B) 机制的话会导致线条高度跟着变化!只好折衷用tikz的 xscale 来实现加长了。\pgfornamenthan 本身的 scale 则要确保和角点的 scale 一致。
    \node[anchor=south west,xscale=2] at (sw.south east) {\pgfornamenthan[scale=0.35]{29}};

    %% 另外一种方法是用 decorations,同样需要注意一下各种长度参数
    \begin{scope}[decoration={markings,
      mark=between positions 0 and 0.75 step 70bp with
        { \node[transform shape,anchor=north west]{\pgfornamenthan[scale=0.35]{29}};}
      }]
      \draw[decorate] (nw.north east) -- (ne.north west);
    \end{scope}

  \node[font=\kaishu,align=center,xshift=70,text=black] at (nw.south east)
     {给我一片海棠红啊海棠红\\血一样的海棠红\\
     沸血的烧痛是乡愁的烧痛\\给我一片海棠红啊海棠红};
\end{tikzpicture}
\end{tcblisting}

\begin{tcblisting}{title={另一个简单的边框范例}}
\begin{tikzpicture}
  \tikzset{every node/.append style={铜绿,inner sep=0pt}}
  \node (nw) {\pgfornamenthan[scale=0.25]{12}};
  \node[right=50bp of nw] (ne) {\pgfornamenthan[scale=0.25,symmetry=v]{12}};
  \node[below=50bp of nw] (sw) {\pgfornamenthan[scale=0.25,symmetry=h]{12}};
  \node[below=50bp of ne] (se) {\pgfornamenthan[scale=0.25,symmetry=c]{12}};
  % 每个部件原宽度为200bp,因此绘画时如果以bp作为单位,会比较容易计算xscale的值。这里 scale=0.25 则部件有效宽度为50bp,刚好是两个角点符号之间的距离,因此不需要再设 xscale。
  \node[anchor=north west] at (nw.north east) {\pgfornamenthan[scale=0.25]{32}};
  \node[anchor=south west] at (sw.south east) {\pgfornamenthan[scale=0.25]{32}};
  \node[anchor=south west,rotate=-90] at (nw.south west) {\pgfornamenthan[scale=0.25]{32}};
  \node[anchor=south east,rotate=90] at (ne.south east) {\pgfornamenthan[scale=0.25]{32}};

\node[anchor=center,靛蓝,shift={(25bp,-25bp)}] at (nw.south east) {\pgfornamenthan[scale=0.5]{57}};
\end{tikzpicture}
\end{tcblisting}


\begin{tcblisting}{title=有些部件衔接可能需要手动\texttt{shift}}
  \begin{tikzpicture}\tikzset{every node/.append style={赤金,inner sep=0pt}}
    \node (nw) {\pgfornamenthan[scale=0.2]{23}};
    \node[right=53bp of nw] (ne) {\pgfornamenthan[scale=0.2,symmetry=v]{23}};
    \node[anchor=north west,xshift=2bp] at (nw.north east) {\pgfornamenthan[scale=0.2]{41}};
    \node[anchor=north east,xshift=-2bp] at (ne.north west) {\pgfornamenthan[scale=0.2,symmetry=v]{41}};
  \end{tikzpicture}
\end{tcblisting}

\begin{tcblisting}{listing only,title={框着整个页面的代码。很适合拿来设计奖状证书的有木有!}}
  \newbox{\fortyseven}
  \savebox{\fortyseven}{\pgfornamenthan[scale=0.2,color=鸭卵青]{47}}
  \tikzset{every node/.append style={inner sep=0pt,鸭卵青}}
  \begin{tikzpicture}[overlay,remember picture]
  \node[anchor=north west,shift={(14.5pt,-14.5pt)}] at (current page.north west)
    (nw) {\pgfornamenthan[scale=0.2]{25}};
  \node[anchor=north east,shift={(-14.5pt,-14.5pt)}] at (current page.north east)
    (ne) {\pgfornamenthan[scale=0.2,symmetry=v]{25}};
  \node[anchor=south west,shift={(14.5pt,14.5pt)}] at (current page.south west)
    (sw) {\pgfornamenthan[scale=0.2,symmetry=h]{25}};
  \node[anchor=south east,shift={(-14.5pt,14.5pt)}] at (current page.south east)
    (se) {\pgfornamenthan[scale=0.2,symmetry=c]{25}};
  %
  \begin{scope}[start chain,node distance=0pt]
  \node[anchor=north west,on chain] at (nw.north east) {\usebox{\fortyseven}};
  \foreach \i in {1,...,15} {
    \node[on chain]{\usebox{\fortyseven}};
  }
  \end{scope}
  %
  \begin{scope}[start chain,node distance=0pt]
  \node[anchor=south west,on chain] at (sw.south east) {\usebox{\fortyseven}};
  \foreach \i in {1,...,6} \node[on chain]{\usebox{\fortyseven}};
  \end{scope}
  %
  \begin{scope}[start chain=going left,node distance=0pt]
  \node[anchor=south east,on chain] at (se.south west) {\usebox{\fortyseven}};
  \foreach \i in {1,...,6} \node[on chain]{\usebox{\fortyseven}};
  \end{scope}
  %
  % 垂直的话 chains 比较不好控制,我懒得折腾了,直接用 \foreach。
  % 自己算一下, (47) 长度 155. 那么 scale = 0.2 的话……
  \foreach \i in {0,...,21}
    \node[anchor=south west,rotate=-90,shift={($\i*(31bp,0)$)}] at (nw.south west)
      {\usebox{\fortyseven}};
  %
  \foreach \i in {0,...,21}
    \node[anchor=south east,rotate=90,shift={($\i*(-31bp,0)$)}] at (ne.south east)
      {\usebox{\fortyseven}};
  %
  %% 严格来说应该放在 \fancyfoot 吧,算了一样啦
  \node[yshift=32pt,铜绿] at (current page.south) {\pgfornamenthan[scale=0.1]{51}};
  \node[yshift=32pt,text=black] at (current page.south) {\large\thepage};
  %
  \end{tikzpicture}
\end{tcblisting}

\part{纹样列表}

以下部件的原宽度、原高度皆以1bp为单元。


\setlength{\parindent}{0pt}\raggedright

\section{角点符号}

\subsection{接单线的角点符号}

有实心线型与对应的空心线型两种。以下皆同。

\bigskip


\foreach \n in {1,...,8}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}

\subsection{接双线的角点符号}

\foreach \n in {9,...,14}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}


\subsection{简单角点符号}

和其他角点符号配合,在一条对角线上使用其他角点符号,另一条对角 线上使用简单角点符号。

\bigskip

\foreach \n in {15,...,18}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}

\subsection{回纹的角点符号}

和连续的回纹配合。

\bigskip

\foreach \n in {19,...,22}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}

\bigskip\bigskip

和离散的回纹配合。

\bigskip

\foreach \n in {23,...,28}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}


\section{线型单元}

\subsection{单线、双线直线}

\foreach \n in {29,...,32}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}

\subsection{回字纹}

\subsubsection{连续}

\foreach \n in {33,...,36}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1.1cm) rectangle (1cm,0.9cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,height=0.6cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.9cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1.1cm) rectangle (2.8cm,0.9cm);
  \end{tikzpicture}\space\space
}%
\foreach \n in {37,...,40}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1.1cm) rectangle (1cm,0.9cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,height=1.1cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.9cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1.1cm) rectangle (2.8cm,0.9cm);
  \end{tikzpicture}\space\space
}

\subsubsection{离散}

\foreach \n in {41,...,44}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1.1cm) rectangle (1cm,0.9cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,height=0.6cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.9cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1.1cm) rectangle (2.8cm,0.9cm);
  \end{tikzpicture}\space\space
}

\subsubsection{离散连接}

\foreach \n in {45,...,48}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1.1cm) rectangle (1cm,0.9cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,height=0.6cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.9cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1.1cm) rectangle (2.8cm,0.9cm);
  \end{tikzpicture}\space\space
}

\subsubsection{圆周排布的回纹}
\foreach \n in {49,...,54}{%
  \begin{tikzpicture}
    \fill[牙色](-1.5cm,-1.5cm) rectangle (1.5cm,1.5cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=2.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0,0) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.6cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1.5cm,-1.5cm) rectangle (3.5cm,1.5cm);
  \end{tikzpicture}\space\space
}

\section{吉祥纹路}

\subsection{福字纹}

\foreach \n in {55}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}

\subsection{寿字纹}

\foreach \n in {56,57}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}

\section{云纹}

\subsection{对称符号}

\foreach \n in {58,...,61}{%
\begin{tikzpicture}
  \fill[牙色](-1.5cm,-1cm) rectangle (1.5cm,1cm);
  \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=2.8cm]{\n}};
  \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (1.3cm,-0.8cm) {\n};
  \node[anchor=west,text width=4em,font=\footnotesize] at (1.6cm,0) {\getpgfornamenthanDim{\n}};
  \draw[color=牙色] (1.5cm,-1cm) rectangle (3.5cm,1cm);
\end{tikzpicture}\space\space
}


\subsection{左右侧符号}

\foreach \n in {62,...,71}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}


\subsection{角落符号}

\foreach \n in {72,...,75}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}

\subsection{连接线}

\foreach \n in {76,...,77}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}

\section{动物}

\foreach \n in {78,...,78}{%
  \begin{tikzpicture}
    \fill[牙色](-1cm,-1cm) rectangle (1cm,1cm);
    \node[inner sep=0pt] (element) {\pgfornamenthan[color=茜色,width=1.8cm]{\n}};
    \node[inner sep=0pt,font=\footnotesize\bfseries\sffamily,color=紫檀] at (0.8cm,-0.8cm) {\n};
    \node[anchor=west,text width=4em,font=\footnotesize] at (1.1cm,0) {\getpgfornamenthanDim{\n}};
    \draw[color=牙色] (1cm,-1cm) rectangle (2.8cm,1cm);
  \end{tikzpicture}\space\space
}

\vfill

\begin{center}
\begin{tikzpicture}
  \tikzset{every node/.append style={铜绿,inner sep=0pt,node distance=0pt}}
  \node (nw) {\pgfornamenthan[scale=0.2]{6}};
  \node[right=100bp of nw] (ne) {\pgfornamenthan[scale=0.2,symmetry=v]{16}};
  \node[below=-8bp of nw] (sw) {\pgfornamenthan[scale=0.2,symmetry=h]{16}};
  \node[below=-8bp of ne] (se) {\pgfornamenthan[scale=0.2,symmetry=c]{6}};
  \node[anchor=north west,xscale=2.5] at (nw.north east) {\pgfornamenthan[scale=0.2]{30}};
  \node[anchor=south west,xscale=2.5] at (sw.south east) {\pgfornamenthan[scale=0.2]{30}};
  \node[font=\kaishu\Large,text=black,shift={(50bp,4bp)}] at (nw.south east) {待续};
\end{tikzpicture}
\end{center}

\clearpage
\appendix
\setlength{\parindent}{2\ccwd}\justifying
\ctexset{section/name={附录}}
\phantomsection\addcontentsline{toc}{part}{附录}

\section{传统中国颜色 \texttt{cncolours.sty}}

\begingroup


这是我比较早以前做的一个宏包了,色卡取自 \url{http://ylbook.com/cms/web/chuantongsecai/chuantongsecai.htm}。

感谢网友\href{https://github.com/heangfat}{\emph{端憲}},加入了三正色,以及提供繁体中文的颜色名称。

\bigskip

\renewcommand{\baselinestretch}{2}
\newcommand\showcolour[1]{%
  \fcolorbox{乌黑}{#1}{\makebox[2em]{\phantom{M}}}~\makebox[5em][l]{#1}%
}

\begin{RaggedRight}
\showcolour{粉红}
\showcolour{妃色}
\showcolour{品红}
\showcolour{桃红}
\showcolour{海棠红}
\showcolour{石榴红}
\showcolour{樱桃色}
\showcolour{银红}
\showcolour{大红}
\showcolour{绛紫}
\showcolour{绯红}
\showcolour{胭脂}
\showcolour{朱红}
\showcolour{丹}
\showcolour{彤}
\showcolour{茜色}
\showcolour{火红}
\showcolour{赫赤}
\showcolour{嫣红}
\showcolour{洋红}
\showcolour{炎}
\showcolour{赤}
\showcolour{绾}
\showcolour{枣红}
\showcolour{檀}
\showcolour{殷红}
\showcolour{酡红}
\showcolour{酡颜}
\showcolour{鹅黄}
\showcolour{鸭黄}
\showcolour{樱草色}
\showcolour{杏黄}
\showcolour{杏红}
\showcolour{橘黄}
\showcolour{橙黄}
\showcolour{橘红}
\showcolour{姜黄}
\showcolour{缃色}
\showcolour{橙色}
\showcolour{茶色}
\showcolour{驼色}
\showcolour{昏黄}
\showcolour{栗色}
\showcolour{棕色}
\showcolour{棕绿}
\showcolour{棕黑}
\showcolour{棕红}
\showcolour{棕黄}
\showcolour{赭色}
\showcolour{琥珀}
\showcolour{褐色}
\showcolour{枯黄}
\showcolour{黄栌}
\showcolour{秋色}
\showcolour{秋香色}
\showcolour{嫩绿}
\showcolour{柳黄}
\showcolour{柳绿}
\showcolour{竹青}
\showcolour{葱黄}
\showcolour{葱绿}
\showcolour{葱青}
\showcolour{青葱}
\showcolour{油绿}
\showcolour{绿沉}
\showcolour{碧色}
\showcolour{碧绿}
\showcolour{青碧}
\showcolour{翡翠色}
\showcolour{草绿}
\showcolour{青色}
\showcolour{青翠}
\showcolour{青白}
\showcolour{鸭卵青}
\showcolour{蟹壳青}
\showcolour{鸦青}
\showcolour{绿色}
\showcolour{豆绿}
\showcolour{豆青}
\showcolour{石青}
\showcolour{玉色}
\showcolour{缥}
\showcolour{艾绿}
\showcolour{松柏绿}
\showcolour{松花绿}
\showcolour{松花色}
\showcolour{蓝}
\showcolour{靛青}
\showcolour{靛蓝}
\showcolour{碧蓝}
\showcolour{蔚蓝}
\showcolour{宝蓝}
\showcolour{蓝灰色}
\showcolour{藏青}
\showcolour{藏蓝}
\showcolour{黛}
\showcolour{黛绿}
\showcolour{黛蓝}
\showcolour{黛紫}
\showcolour{紫色}
\showcolour{紫酱}
\showcolour{酱紫}
\showcolour{紫檀}
\showcolour{绀青}
\showcolour{紫棠}
\showcolour{青莲}
\showcolour{群青}
\showcolour{雪青}
\showcolour{丁香色}
\showcolour{藕色}
\showcolour{藕荷色}
\showcolour{苍色}
\showcolour{苍黄}
\showcolour{苍青}
\showcolour{苍黑}
\showcolour{苍白}
\showcolour{水色}
\showcolour{水红}
\showcolour{水绿}
\showcolour{水蓝}
\showcolour{淡青}
\showcolour{湖蓝}
\showcolour{湖绿}
\showcolour{精白}
\showcolour{象牙白}
\showcolour{雪白}
\showcolour{月白}
\showcolour{缟}
\showcolour{素}
\showcolour{荼白}
\showcolour{霜色}
\showcolour{花白}
\showcolour{鱼肚白}
\showcolour{莹白}
\showcolour{灰色}
\showcolour{牙色}
\showcolour{铅白}
\showcolour{玄色}
\showcolour{玄青}
\showcolour{乌色}
\showcolour{乌黑}
\showcolour{漆黑}
\showcolour{墨色}
\showcolour{墨灰}
\showcolour{黑色}
\showcolour{缁色}
\showcolour{煤黑}
\showcolour{黧}
\showcolour{黎}
\showcolour{黝}
\showcolour{黝黑}
\showcolour{黯}
\showcolour{赤金}
\showcolour{金色}
\showcolour{银白}
\showcolour{铜绿}
\showcolour{乌金}
\showcolour{老银}
\showcolour{正青}
\showcolour{正赤}
\showcolour{正黄}
\end{RaggedRight}

\clearpage

\CJKfontspec{Noto Serif CJK TC}
以下是繁體中文字體名稱,由網友\href{https://github.com/heangfat}{\emph{端憲}}提供。姜黃、薑黃是兩種植物。未審此指何種,闕之。

\bigskip

\begin{RaggedRight}
\showcolour{粉紅}
\showcolour{妃色}
\showcolour{品紅}
\showcolour{桃紅}
\showcolour{海棠紅}
\showcolour{石榴紅}
\showcolour{櫻桃色}
\showcolour{銀紅}
\showcolour{大紅}
\showcolour{絳紫}
\showcolour{緋紅}
\showcolour{胭脂}
\showcolour{朱紅}
\showcolour{丹}
\showcolour{彤}
\showcolour{茜色}
\showcolour{火紅}
\showcolour{赫赤}
\showcolour{嫣紅}
\showcolour{洋紅}
\showcolour{炎}
\showcolour{赤}
\showcolour{綰}
\showcolour{棗紅}
\showcolour{檀}
\showcolour{殷紅}
\showcolour{酡紅}
\showcolour{酡顏}
\showcolour{鵝黃}
\showcolour{鴨黃}
\showcolour{櫻草色}
\showcolour{杏黃}
\showcolour{杏紅}
\showcolour{橘黃}
\showcolour{橙黃}
\showcolour{橘紅}
\showcolour{姜黄}
\showcolour{緗色}
\showcolour{橙色}
\showcolour{茶色}
\showcolour{駝色}
\showcolour{昏黃}
\showcolour{栗色}
\showcolour{椶色}
\showcolour{椶綠}
\showcolour{椶黑}
\showcolour{椶紅}
\showcolour{椶黃}
\showcolour{赭色}
\showcolour{琥珀}
\showcolour{褐色}
\showcolour{枯黃}
\showcolour{黃櫨}
\showcolour{秋色}
\showcolour{秋香色}
\showcolour{嫩綠}
\showcolour{柳黃}
\showcolour{柳綠}
\showcolour{竹青}
\showcolour{蔥黃}
\showcolour{蔥綠}
\showcolour{蔥青}
\showcolour{青蔥}
\showcolour{油綠}
\showcolour{綠沉}
\showcolour{碧色}
\showcolour{碧綠}
\showcolour{青碧}
\showcolour{翡翠色}
\showcolour{草綠}
\showcolour{青色}
\showcolour{青翠}
\showcolour{青白}
\showcolour{鴨卵青}
\showcolour{蟹殼青}
\showcolour{鴉青}
\showcolour{綠色}
\showcolour{豆綠}
\showcolour{豆青}
\showcolour{石青}
\showcolour{玉色}
\showcolour{縹}
\showcolour{艾綠}
\showcolour{松柏綠}
\showcolour{松花綠}
\showcolour{松花色}
\showcolour{藍}
\showcolour{靛青}
\showcolour{靛藍}
\showcolour{碧藍}
\showcolour{蔚藍}
\showcolour{寶藍}
\showcolour{藍灰色}
\showcolour{藏青}
\showcolour{藏藍}
\showcolour{黛}
\showcolour{黛綠}
\showcolour{黛藍}
\showcolour{黛紫}
\showcolour{紫色}
\showcolour{紫醬}
\showcolour{醬紫}
\showcolour{紫檀}
\showcolour{紺青}
\showcolour{紫棠}
\showcolour{青蓮}
\showcolour{群青}
\showcolour{雪青}
\showcolour{丁香色}
\showcolour{藕色}
\showcolour{藕荷色}
\showcolour{蒼色}
\showcolour{蒼黃}
\showcolour{蒼青}
\showcolour{蒼黑}
\showcolour{蒼白}
\showcolour{水色}
\showcolour{水紅}
\showcolour{水綠}
\showcolour{水藍}
\showcolour{淡青}
\showcolour{湖藍}
\showcolour{湖綠}
\showcolour{精白}
\showcolour{象牙白}
\showcolour{雪白}
\showcolour{月白}
\showcolour{縞}
\showcolour{素}
\showcolour{荼白}
\showcolour{霜色}
\showcolour{花白}
\showcolour{魚肚白}
\showcolour{瑩白}
\showcolour{灰色}
\showcolour{牙色}
\showcolour{鉛白}
\showcolour{玄色}
\showcolour{玄青}
\showcolour{烏色}
\showcolour{烏黑}
\showcolour{漆黑}
\showcolour{墨色}
\showcolour{墨灰}
\showcolour{黑色}
\showcolour{緇色}
\showcolour{煤黑}
\showcolour{黧}
\showcolour{黎}
\showcolour{黝}
\showcolour{黝黑}
\showcolour{黯}
\showcolour{赤金}
\showcolour{金色}
\showcolour{銀白}
\showcolour{銅綠}
\showcolour{烏金}
\showcolour{老銀}
\showcolour{正青}
\showcolour{正赤}
\showcolour{正黃}
\end{RaggedRight}

\endgroup

\clearpage

\section{萧山 Beamer 主题 Xiaoshan Beamer Theme \texttt{beamerthemeXiaoshan.sty}}

这个Beamer主题是以 \href{https://ctan.org/pkg/beamertheme-metropolis}{Metropolis} 为基础,用 \texttt{cncolours.sty} 调了一下颜色,加入少许汉风纹样。

\bigskip

\begin{tcblisting}{listing side comment,title={使用范例},pdf comment={xiaoshan-sample.pdf}}
\documentclass{ctexbeamer}

\usetheme{Xiaoshan}

\author{林莲枝}
\title{萧山Beamer主题}
\subtitle{\texttt{pgfornament-han}附录福利}

\begin{document}

\begin{frame}
  \maketitle
\end{frame}

\section{简介}

\begin{frame}
  \frametitle{其实是 Metropolis 主题的魔改}
  \begin{itemize}
    \item 改了颜色(用了 \texttt{cncolours.sty})
    \item 加入 \texttt{pgfornament-han} 汉风纹样元素
  \end{itemize}
\end{frame}
......
\end{document}
\end{tcblisting}


\clearpage

\section{神马浮云 Beamer 主题 Heavenly Clouds Beamer Theme \texttt{beamerthemeHeavenlyClouds.sty}}

这个Beamer主题是我一次病中摸鱼摸出来的,脑洞略大。每一页的背景的云彩纹样,位置、大小、深浅都是随机的,所以如果内容页数比较多,编译时运算可能会比较花时间,请自行斟酌使用此主题。

\bigskip

\begin{tcblisting}{listing side comment,title={使用范例},pdf comment={heavenlyclouds-sample.pdf}}
\documentclass{ctexbeamer}
\usetheme{HeavenlyClouds}

\author{林莲枝}
\title{神马浮云\\Beamer主题}
\subtitle{\texttt{pgfornament-han}附录福利}

\begin{document}

\begin{frame}[noframenumbering]
  \maketitle
\end{frame}

\section{简介一}

\begin{frame}[fragile,allowframebreaks]
  \frametitle{此主题脑洞略大}
  ...
\end{frame}
...
\end{document}
\end{tcblisting}

一些注意事项:
\begin{itemize}
  \item Mac 或 Linux 系统上,\texttt{ctex}是不提供隶书\mintinline{latex}{\lishu}的,请自己设定。例:

  \mintinline{latex}{\providecommand{\lishu}{\CJKfontspec{Libian SC}[BoldFont=Baoli SC,Scale=1.2]}}

  \item 可以用 \mintinline{latex}{\simpleprogressmarker} 以简单圆点代替进度条上的神马。

  \item 标题页的寿字纹,可以用各自高校的标志代替。中国高校校徽很多都是圆形的。确保一下背景是透明色的 png 或 pdf 档就可以了。

  \mintinline{latex}{\titlegraphic{\includegraphics[width=2cm]{logo}}}


  \item 也可以在导言区加一句 \mintinline{latex}{\alttitlecircle},会得到另一种标题页的装饰纹样。效果如下:

  \begin{tikzpicture}%[transform shape,scale=0.5]
    \newbox{\circleelem}%
    \savebox{\circleelem}{%
      \tikzset{pgfornamentstyle/.style={transform shape}}%
      \pgfornamenthan[width=0.5236cm,
         color=殷红!80!black,
         symmetry=h]{74}%
    }
    \begin{scope}[decoration={markings, mark=between positions 0 and 1 step 0.5236cm
    with { \node[transform shape,inner sep=0pt,outer sep=0pt]{\usebox{\circleelem}}; }} ]
    \path [postaction={decorate}] circle (1cm);
    \end{scope}%
    \node {\pgfornamenthan[width=1.25cm,color=殷红]{56}};
  \end{tikzpicture} \emph{效果有可能有点狂,请视场合斟酌使用。}

\end{itemize}


\end{document}