diff options
author | Karl Berry <karl@freefriends.org> | 2014-10-02 22:37:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-10-02 22:37:13 +0000 |
commit | 57641fb7736fa7dfb82f596d9cac992db6651895 (patch) | |
tree | 7519dedbe553cc6c418fa709d96b5e25fd9a9381 /Master/texmf-dist/tex/latex/drm | |
parent | f28d6db58747245c798b3e77ac8a8871b9190095 (diff) |
drm (2oct14)
git-svn-id: svn://tug.org/texlive/trunk@35300 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/drm')
-rw-r--r-- | Master/texmf-dist/tex/latex/drm/drm.sty | 297 |
1 files changed, 296 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/drm/drm.sty b/Master/texmf-dist/tex/latex/drm/drm.sty index cf0861805d2..418d9f37374 100644 --- a/Master/texmf-dist/tex/latex/drm/drm.sty +++ b/Master/texmf-dist/tex/latex/drm/drm.sty @@ -25,21 +25,29 @@ %% This work consists of the files listed in drmfilelist.txt. \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{drm}[2015/01/01 v2.2 support for dozenal fonts] +\ProvidesPackage{drm}[2015/01/01 v3.0 support for dozenal fonts] \RequirePackage[LGR,OML,OMS,TS1,T1]{fontenc} \RequirePackage{modroman} \RequirePackage{amsmath} +\RequirePackage{gmp} \newif\ifnodefault\nodefaultfalse \newif\ifnodefaultmath\nodefaultmathfalse \newif\ifnodefaulttext\nodefaulttextfalse \newif\ifsymbolsonly\symbolsonlyfalse +\newif\iftypeone\typeonefalse \DeclareOption{nodefault}{\nodefaulttrue\nodefaultmathtrue% \nodefaulttexttrue} \DeclareOption{nodefaultmath}{\nodefaultmathtrue} \DeclareOption{nodefaulttext}{\nodefaulttexttrue} \DeclareOption{symbolsonly}{\symbolsonlytrue\nodefaulttrue% \nodefaulttexttrue\nodefaultmathtrue} +\DeclareOption{typeone}{\typeonetrue} \ProcessOptions +\iftypeone +\RequirePackage{ifpdf} +\ifpdf +\pdfmapfile{=drm.map} +\fi \DeclareFontFamily{T1}{drm}{} \DeclareFontFamily{TS1}{drm}{} \DeclareFontFamily{LGR}{drm}{} @@ -102,6 +110,70 @@ <8> drmsym8 <9> drmsym9 <10-12> drmsym10 <12-14> drmsym12 <14-17> drmsym14 <17-24> drmsym17 <24-> drmsym24 }{} \DeclareFontShape{LGR}{drm}{m}{n}{<-> drmgrk10 }{} +\else +\DeclareFontFamily{T1}{drm}{} +\DeclareFontFamily{TS1}{drm}{} +\DeclareFontFamily{LGR}{drm}{} +\DeclareFontFamily{U}{drmsups}{} +\DeclareFontFamily{U}{drminfs}{} +\DeclareFontShape{U}{drminfs}{m}{n}{ <-7> drminf6 +<7> drminf7 <8> drminf8 <9> drminf9 <10-12> drminf10 +<12-13> drminf12 <14-17> drminf14 <17-24> drminf17 +<24-> drminf24 }{} +\DeclareFontShape{U}{drmsups}{m}{n}{ <-7> drmfigs6 +<7> drmfigs7 <8> drmfigs8 <9> drmfigs9 <10-12> drmfigs10 +<12-13> drmfigs12 <14-17> drmfigs14 <17-24> drmfigs17 +<24-> drmfigs24 }{} +\DeclareFontShape{T1}{drm}{m}{n}{ <-7> drm6 <7> drm7 <8> drm8 +<9> drm9 <10-12> drm10 <12-13> drm12 <14-17> drm14 +<17-24> drm17 <24-> drm24 }{} +\DeclareFontShape{T1}{drm}{m}{sc}{<-7> drmsc6 <7> drmsc7 +<8> drmsc8 <9> drmsc9 <10-12> drmsc10 <12-14> drmsc12 +<14-17> drmsc14 <17-24> drmsc17 <24-> drmsc24 }{} +\DeclareFontShape{T1}{drm}{m}{tc}{<-7> drmtc6 <7> drmtc7 +<8> drmtc8 <9> drmtc9 <10-12> drmtc10 <12-14> drmtc12 +<14-17> drmtc14 <17-24> drmtc17 <24-> drmtc24 }{} +\DeclareFontShape{T1}{drm}{bx}{sc}{<-7> drmscbx6 <7> drmscbx7 +<8> drmscbx8 <9> drmscbx9 <10-12> drmscbx10 <12-14> drmscbx12 +<14-17> drmscbx14 <17-24> drmscbx17 <24-> drmscbx24 }{} +\DeclareFontShape{T1}{drm}{bx}{tc}{<-7> drmtcbx6 <7> drmtcbx7 +<8> drmtcbx8 <9> drmtcbx9 <10-12> drmtcbx10 <12-14> drmtcbx12 +<14-17> drmtcbx14 <17-24> drmtcbx17 <24-> drmtcbx24 }{} +\DeclareFontShape{T1}{drm}{m}{itsc}{<-7> drmitsc6 <7> drmitsc7 +<8> drmitsc8 <9> drmitsc9 <10-12> drmitsc10 <12-14> drmitsc12 +<14-17> drmitsc14 <17-24> drmitsc17 <24-> drmitsc24 }{} +\DeclareFontShape{T1}{drm}{m}{ittc}{<-7> drmittc6 <7> drmittc7 +<8> drmittc8 <9> drmittc9 <10-12> drmittc10 <12-14> drmittc12 +<14-17> drmittc14 <17-24> drmittc17 <24-> drmittc24 }{} +\DeclareFontShape{T1}{drm}{m}{sl}{<-7> drmsl6 <7> drmsl7 +<8> drmsl8 <9> drmsl9 <10-12> drmsl10 <12-14> drmsl12 +<14-17> drmsl14 <17-24> drmsl17 <24-> drmsl24 }{} +\DeclareFontShape{T1}{drm}{m}{it}{ <-7> drmit6 <7> drmit7 +<8> drmit8 <9> drmit9 <10-12> drmit10 <12-14> drmit12 +<14-17> drmit14 <17-24> drmit17 <24-> drmit24 }{} +\DeclareFontShape{T1}{drm}{bx}{it}{ <-7> drmitbx6 <7> drmitbx7 +<8> drmitbx8 <9> drmitbx9 <10-12> drmitbx10 <12-14> drmitbx12 +<14-17> drmitbx14 <17-24> drmitbx17 <24-> drmitbx24 }{} +\DeclareFontShape{T1}{drm}{m}{ui}{<-7> drmui6 <7> drmui7 +<8> drmui8 <9> drmui9 <10-12> drmui10 <12-14> drmui12 +<14-17> drmui14 <17-24> drmui17 <24-> drmui24 }{} +\DeclareFontShape{T1}{drm}{bx}{ui}{<-7> drmuibx6 <7> drmuibx7 +<8> drmuibx8 <9> drmuibx9 <10-12> drmuibx10 <12-14> drmuibx12 +<14-17> drmuibx14 <17-24> drmuibx17 <24-> drmuibx24 }{} +\DeclareFontShape{T1}{drm}{l}{n}{<-7> drml6 <7> drml7 +<8> drml8 <9> drml9 <10-12> drml10 <12-14> drml12 +<14-17> drml14 <17-24> drml17 <24-> drml24 }{} +\DeclareFontShape{T1}{drm}{b}{n}{<-7> drmb6 <7> drmb7 +<8> drmb8 <9> drmb9 <10-12> drmb10 <12-14> drmb12 +<14-17> drmb14 <17-24> drmb17 <24-> drmb24 }{} +\DeclareFontShape{T1}{drm}{bx}{n}{<-7> drmbx6 <7> drmbx7 +<8> drmbx8 <9> drmbx9 <10-12> drmbx10 <12-14> drmbx12 +<14-17> drmbx14 <17-24> drmbx17 <24-> drmbx24 }{} +\DeclareFontShape{TS1}{drm}{m}{n}{<-7> drmsym7 +<8> drmsym8 <9> drmsym9 <10-12> drmsym10 <12-14> drmsym12 +<14-17> drmsym14 <17-24> drmsym17 <24-> drmsym24 }{} +\DeclareFontShape{LGR}{drm}{m}{n}{<-> drmgrk10 }{} +\fi \ifnodefault\else\ifnodefaulttext\else \renewcommand\encodingdefault{T1} \renewcommand\familydefault{drm} @@ -778,6 +850,229 @@ \hbox to\drmfelipaft{\hfil}% }% }% +\def\drmdecinitfontdefault{% +\def\drmdecinitfont{% +\unexpanded{\font\drminitfontcom=drm10} +}% +}% +\def\drmdecinitfont{% +\unexpanded{\font\drminitfontcom=drm10} % +}% +\def\drmdecinit#1#2#3#4#5{% +\begin{mpost} +primarydef pct along pat = +(arctime (pct * (arclength pat)) of pat) of pat +enddef; +w=#1; h=#2; +pen thinpen; thinpen = pencircle scaled (w/288); +pen medpen; medpen = pencircle scaled (w/144); +pen thickpen; thickpen = pencircle scaled (w/144 + w/288); +pen ththickpen; ththickpen = pencircle scaled (w/72); +pen thththickpen; thththickpen = pencircle scaled (w/36); +leaflen = w/6.5; +leafletlen = w/20; +leafletwid = w/40; +leafletgap = w/40; +pen leafpen; leafpen = pencircle xscaled leafletlen +yscaled leafletwid; +pen sideleafpen; sideleafpen = pencircle yscaled leafletlen +xscaled leafletwid rotated -35; +def border = +pickup thththickpen; +draw top lft (0,h)--top rt(w,h)--bot rt(w,0)--bot +lft(0,0)--cycle withcolor #3; +pickup ththickpen; +draw (top lft (0,h)--top rt(w,h)--bot rt(w,0)--bot +lft(0,0)--cycle) scaled 0.95 shifted (0.025w,0.025h) +withcolor #3; +enddef; +def leaf(expr p,s,r,t) = +path leafpath; +leafpath = ((p shifted (leafletlen/2,0)).. +(p shifted (0,leafletwid/2)).. +(p shifted (-leafletlen/2,0)).. +(p shifted (0,-leafletwid/2))..cycle) +rotatedaround (p,s); +if t = 0: +fill leafpath withcolor r; +elseif t = 1: +fill leafpath reflectedabout +((w/2,h),(w/2,0)) withcolor r; +elseif t = 2: +fill leafpath reflectedabout +((0,h/2),(w,h/2)) withcolor r; +elseif t = 3: +fill leafpath reflectedabout +((0,h/2),(w,h/2)) reflectedabout ((w/2,h),(w/2,0)) +withcolor r; +fi +enddef; +def branch(expr p,s,b) = +pickup thickpen; +pair t; t = p rotatedaround (p,s); +pair u; u = point 1.0 along (t{dir (s+90)}.. +t shifted (0.3leaflen,leaflen) rotatedaround (t,s)); +pair q; q = (t shifted (1.4leafletwid,0)) rotatedaround (t,s); +pair v; v = (q shifted (0.3leaflen,leaflen)) rotatedaround (q,s); +pair r; r = (t shifted (-1.4leafletwid,0)) rotatedaround (t,s); +pair a; a = (r shifted (0.3leaflen,leaflen)) rotatedaround (r,s); +if b = 0: +draw (t{dir (s+90)}..u) withcolor #3; +elseif b = 1: +draw (t{dir (s+90)}..u) reflectedabout ((w/2,h),(w/2,0)) +withcolor #3; +elseif b = 2: +draw (t{dir (s+90)}..u) reflectedabout ((0,h/2),(w,h/2)) +withcolor #3; +elseif b = 3: +draw (t{dir (s+90)}..u) reflectedabout ((0,h/2),(w,h/2)) +reflectedabout ((w/2,h),(w/2,0)) withcolor #3; +fi +leaf((point 0.15 along (q{dir (s+90)}..v)),s,#3,b); +leaf((point 0.45 along (q{dir (s+90)}..v)),s,#3,b); +leaf((point 0.75 along (q{dir (s+90)}..v)),s,#3,b); +leaf((point 0.15 along (r{dir (s+90)}..a)),s,#3,b); +leaf((point 0.45 along (r{dir (s+90)}..a)),s,#3,b); +leaf((point 0.75 along (r{dir (s+90)}..a)),s,#3,b); +leaf((point 0.98 along (t{dir (s+90)}..u)),s+60,white,b); +leaf((point 1.00 along (t{dir (s+90)}..u)),s+60,#3,b); +enddef; +def football(expr p) = +pickup thinpen; +draw (z26..z30..z31..z26..z32..z33..cycle) +rotatedaround ((w/2,h/2),p) withcolor #3; +pickup ththickpen; +draw (z20..z24..z21) rotatedaround ((w/2,h/2),p) +withcolor white; +draw (z21..z25..z20) rotatedaround ((w/2,h/2),p) +withcolor white; +draw (z20..tension 1.4..z22..z23..tension 1.5..z20) +rotatedaround ((w/2,h/2),p) withcolor white; +draw (z21..tension 1.4..z22..z23..tension 1.5..z21) +rotatedaround ((w/2,h/2),p) withcolor white; +pickup medpen; +draw (z20..z24..z21) rotatedaround ((w/2,h/2),p) +withcolor #3; +draw (z21..z25..z20) rotatedaround ((w/2,h/2),p) +withcolor #3; +draw (z20..tension 1.4..z22..z23..tension 1.5..z20) +rotatedaround ((w/2,h/2),p) withcolor #3; +draw (z21..tension 1.4..z22..z23..tension 1.5..z21) +rotatedaround ((w/2,h/2),p) withcolor #3; +fill (z34..z36..z35..z37..cycle) rotatedaround +((w/2,h/2),p) withcolor #3; +fill (z38..z40..z39..z41..cycle) rotatedaround +((w/2,h/2),p) withcolor #3; +fill (z42..z44..z43..z45..cycle) rotatedaround +((w/2,h/2),p) withcolor #3; +enddef; +border; +z0 = (w-3.3leafletwid-(w/11),h-leaflen-(w/144)); +z1 = (w/2,2h/3);%h-leafletwid-2pt); +z2 = z0 reflectedabout ((w/2,h),(w/2,0)); +z3 = (2w/3,h/2);%w-leafletwid-2pt,h/2); +z4 = z0 reflectedabout ((w,h/2),(0,h/2)); +z5 = z1 reflectedabout ((0,h/2),(w,h/2)); +z6 = z4 reflectedabout ((w/2,h),(w/2,0)); +z7 = z3 reflectedabout ((w/2,h),(w/2,0)); +pickup thickpen; +draw z0{dir -120}..{left}z1{left}..{dir 120}z2 withcolor #3; +draw z0{dir -120}..{down}z3{down}..{dir -60}z4 withcolor #3; +draw z4{dir 120}..{left}z5{left}..{dir -120}z6 withcolor #3; +draw z6{dir 60}..{up}z7{up}..{dir 120}z2 withcolor #3; +branch(z0,-30,0); +branch(z0,-30,1); +branch(z0,-30,2); +branch(z0,-30,3); +z10 = (w/2,h-leafletwid-(w/72)); +z11 = z10 rotatedaround ((w/2,h/2),90); +z12 = z10 rotatedaround ((w/2,h/2),180); +z13 = z10 rotatedaround ((w/2,h/2),270); +path greatcirc; greatcirc = z10..z11..z12..z13..cycle; +pickup thththickpen; +draw greatcirc withcolor white; +pickup ththickpen; +draw greatcirc withcolor #3; +z20 = z2 shifted (0,-leafletlen); +z21 = z6 shifted (0,leafletlen); +z22 = z11 shifted (leafletlen,0); +z23 = z7 shifted (-leafletlen,0); +z24 = 0.25[z11,z7]; +z25 = 0.75[z11,z7]; +z26 = 0.5[z11,z7]; +z27 = 0.25[z2,z6]; +z28 = 0.5[z2,z6]; +z29 = 0.75[z2,z6]; +z30 = 0.5[z11,z2]; +z31 = 0.5[z7,z2]; +z32 = 0.5[z6,z11]; +z33 = 0.5[z6,z7]; +z34 = z26 shifted (-leafletlen,0); +z35 = z26 shifted (leafletlen,0); +z36 = z26 shifted (0,leafletwid); +z37 = z26 shifted (0,-leafletwid); +z38 = z27 shifted (-0.8leafletwid,0); +z39 = z27 shifted (0.8leafletwid,0); +z40 = z27 shifted (0,0.8leafletlen); +z41 = z27 shifted (0,-0.8leafletlen); +z42 = z29 shifted (-0.8leafletwid,0); +z43 = z29 shifted (0.8leafletwid,0); +z44 = z29 shifted (0,0.8leafletlen); +z45 = z29 shifted (0,-0.8leafletlen); +football(0); +football(90); +football(180); +football(270); +z50 = z1 shifted (0,-leafletwid); +z51 = z3 shifted (-leafletwid,0); +z52 = z5 shifted (0,leafletwid); +z53 = z7 shifted (leafletwid,0); +z54 = 0.4[(w/2,h/2),(0,h)]; +z55 = 0.4[(w/2,h/2),(w,h)]; +z56 = 0.4[(w/2,h/2),(w,0)]; +z57 = 0.4[(w/2,h/2),(0,0)]; +pickup thickpen; +draw z50..z51..z52..z53..cycle withcolor #3; +pickup medpen; +draw z50{left}..z54 withcolor #3; +draw z50{right}..z55 withcolor #3; +draw z51{up}..z55 withcolor #3; +draw z51{down}..z56 withcolor #3; +draw z52{right}..z56 withcolor #3; +draw z52{left}..z57 withcolor #3; +draw z53{down}..z57 withcolor #3; +draw z53{up}..z54 withcolor #3; +z60 = z50 shifted (0,-leafletwid); +z61 = z51 shifted (-leafletwid,0); +z62 = z52 shifted (0,leafletwid); +z63 = z53 shifted (leafletwid,0); +z64 = (w/2,h/2) shifted (0,leafletlen); +z65 = (w/2,h/2) shifted (leafletlen,0); +z66 = (w/2,h/2) shifted (0,-leafletlen); +z67 = (w/2,h/2) shifted (-leafletlen,0); +z68 = 0.5[z64,z65]; +z69 = 0.5[z65,z66]; +z70 = 0.5[z66,z67]; +z71 = 0.5[z67,z64]; +z72 = 0.5[z60,z61]; +z73 = 0.5[z61,z62]; +z74 = 0.5[z62,z63]; +z75 = 0.5[z63,z60]; +z76 = 0.2[z71,z75]; +z77 = point 0.4 along (z63{up}..{right}z60); +z78 = point 0.6 along (z63{up}..{right}z60); +z79 = 0.6[z63,z76]; +pickup thinpen; +path innerbord; innerbord = +z60{z64-z60}..z71..{z63-z67}z63{up}..{right}z60; +draw innerbord withcolor #3; +draw innerbord rotatedaround ((w/2,h/2),90) withcolor #3; +draw innerbord rotatedaround ((w/2,h/2),180) withcolor #3; +draw innerbord rotatedaround ((w/2,h/2),270) withcolor #3; +label(btex {\drmdecinitfont at#2\unexpanded{\drminitfontcom} #5} etex,(w/2,h/2)) +withcolor #4; +\end{mpost} +} \endinput %% %% End of file `drm.sty'. |