diff options
Diffstat (limited to 'info/context-notes-zh-cn/src/ctxnotes.tex')
-rw-r--r-- | info/context-notes-zh-cn/src/ctxnotes.tex | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/info/context-notes-zh-cn/src/ctxnotes.tex b/info/context-notes-zh-cn/src/ctxnotes.tex new file mode 100644 index 0000000000..87059cd3f5 --- /dev/null +++ b/info/context-notes-zh-cn/src/ctxnotes.tex @@ -0,0 +1,88 @@ +\environment doc-env +%\startproduct ctxnotes +\starttext + +% 封面 +\startMPinclusions + def random_hash_frame (expr width, height, offset, linewidth ) = + + def delta = ((uniformdeviate .5offset) + .25offset) enddef ; + x1 := offset ; y1 := offset ; x2 := width-offset ; y2 := height-offset ; + + drawoptions(withpen pencircle scaled linewidth withcolor transparent(1,.8,\MPcolor{BackgroundColor})) ; + fill z1--(x2,y1)--z2--(x1,y2)--cycle ; + + drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{OrnamentColor}) ; + draw (x1-delta,y1)--(x2+delta,y1) ; + draw (x2,y1-delta)--(x2,y2+delta) ; + draw (x2+delta,y2)--(x1-delta,y2) ; + draw (x1,y2+delta)--(x1,y1-delta) ; + + drawoptions(); + setbounds currentpicture to unitsquare xscaled width yscaled height ; + enddef ; +\stopMPinclusions + +\startuseMPgraphic{TitleGraphic} + for i=1 upto 400 : + offset := uniformdeviate 10pt ; + width := 2*offset + 40pt + uniformdeviate 30pt ; + height := 2*offset + 30pt + uniformdeviate 10pt ; + addto currentpicture also + image(random_hash_frame(width,height,offset,1pt)) shifted + (uniformdeviate OverlayWidth, uniformdeviate OverlayHeight) ; + endfor ; +\stopuseMPgraphic + +\defineoverlay [TitleGraphic] [\useMPgraphic{TitleGraphic}] + +% 前文 +\startfrontmatter +\setupbackgrounds [page][background=TitleGraphic] +\startstandardmakeup + \startcolor[white] + \startframedtext[middle][width=.8\textwidth,height=5cm] + \dontleavehmode + \blank[.5cm] + \hfil\bfd\ConTeXt\ 学习笔记\hfil + \blank[.5cm] + \hfil\bfc Using MkIV\hfil + \blank[1cm] + \hfil\bfa Li Yanrui (liyanrui.m2@gmail.com)\hfil + \stopframedtext + \stopcolor + \blank[14cm] +\stopstandardmakeup +\setupbackgrounds [page][background=] +\setuppagenumbering[conversion=romannumerals] +\setuppagenumber[number=1] +\title{目\;\;录}\blank +\placecontent +\stopfrontmatter + +% 正文 +\startbodymatter +\setuppagenumbering[conversion=number] +\setuppagenumber[number=1] +\setups{HeaderFooter} +\component basis +\component fonts +\component layout +\component references +\component project +\component metafun +\stopbodymatter + +% 附录 +\startappendices +\title{参考文献} +\placepublications[criterium=all] +\stopappendices + +% 后文 +\startbackmatter +未完成…… +\stopbackmatter + +%\stopproduct +\stoptext |