This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[margin=4pt]{standalone} | |
| \usepackage{fontspec} | |
| \setmainfont{Helvetica} | |
| \usepackage{luamplib} | |
| \mplibnumbersystem{double} | |
| \mplibtextextlabel{enable} | |
| \edef\pidecimal{\directlua{ | |
| local pidec = [[ | |
| 14159 26535 89793 23846 26433 83279 50288 41971 69399 37510 | |
| 58209 74944 59230 78164 06286 20899 86280 34825 34211 70679 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \input luamplib.sty | |
| \mplibnumbersystem{double} | |
| \mplibtextextlabel{enable} | |
| \ifdefined\n\else \def\n{5000}\fi | |
| \ifdefined\length\else \def\length{100}\fi | |
| \ifdefined\distance\else \def\distance{100}\fi | |
| \ifnum\length>\distance \let\length\distance\fi | |
| \mplibcode | |
| total := \n; l := \length; d := \distance; | |
| path needle, hline; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local err,warn,info,log = luatexbase.provides_module({ | |
| name = 'webgraphics', | |
| date = '2014/06/30', | |
| version = 0.1, | |
| description = 'include graphics on the web', | |
| author = 'Dohyun Kim', | |
| license = 'public domain', | |
| }) | |
| webgraphics = webgraphics or {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \begingroup\expandafter\expandafter\expandafter\endgroup | |
| \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else | |
| \ProvidesPackage{xxruby}[2014/05/20 v0.1 consecutive ruby annotations] | |
| \fi | |
| \ifdefined\directlua\else | |
| \ifdefined\ruby\else | |
| \usepackage{ruby} | |
| \def\rubysep{-1.25ex} | |
| \def\rubysize{0.6} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \edef\legalhanjanumATcatcode{\catcode`@=\the\catcode`@\relax} | |
| \begingroup\expandafter\expandafter\expandafter\endgroup | |
| \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else | |
| \ProvidesPackage{legalhanjanum}[2014/06/27 v0.1 number to hanja number] | |
| \fi | |
| \catcode`@=11 | |
| \protected\def\legalhanjanum#1{% | |
| \begingroup\edef\x{#1}\count@\z@\toks@{}\expandafter\hanjanum@\x\@@\endgroup | |
| } | |
| \def\hanjanum@#1{% 토큰 순서 뒤집기 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[border=2pt]{standalone} | |
| \usepackage{luatexko} | |
| \usepackage{luamplib} | |
| \mplibtextextlabel{enable} | |
| \begin{document} | |
| \begin{mplibcode} | |
| beginfig(0); | |
| u = 1cm; | |
| rgbcolor juwhang; juwhang = (1, 1/2, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \begingroup | |
| \catcode`P=12 \catcode`T=12 | |
| \lowercase{\endgroup\def\removept#1.#2PT{#1\ifnum#2>0 .#2\fi}} | |
| \def\strippt{\expandafter\removept\the} | |
| \def\convertto#1#2{\strippt\dimexpr#2*65536/\dimexpr1#1\relax\relax} | |
| \def\headertt#1#2{\bf #1} | |
| \halign{\bf#\hfill & | |
| \quad\convert{#}{1pt}\hfil & | |
| \quad\convert{#}{1mm}\hfil & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{minimal} | |
| \usepackage[hangul]{kopubfonts} | |
| \usepackage{luamplib} | |
| \def\cropmplibwithmargin#1{% | |
| \pdfhorigin#1 \pdfvorigin\pdfhorigin | |
| \pdfpagewidth\dimexpr\MPwidth+2\pdfhorigin\relax | |
| \pdfpageheight\dimexpr\MPheight+2\pdfvorigin\relax | |
| } | |
| \begin{document} | |
| \begin{mplibcode} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| verbatimtex \input kotexutf.tex etex; | |
| input boxes; | |
| input cmarrows; | |
| setup_cmarrows( | |
| brace_name = "Biggbrace"; | |
| parameter_file = "cmr12.mf"; | |
| macro_name = "LeftBrace" | |
| ); | |
| def leftbrace (suffix tt,bb) = | |
| LeftBrace (bb.sw+up*bb.dy -- tt.nw+down*tt.dy) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[a4paper]{article} | |
| \usepackage{luamplib, zref-savepos, atbegshi, picture} | |
| \begin{document} | |
| \AtBeginShipoutNext{\AtBeginShipoutUpperLeft{% | |
| \put(0,-\paperheight){% | |
| \begin{mplibcode} | |
| beginfig(0); | |
| x0 := \mpdim{\zposx{z0x} sp}; | |
| y0 := \mpdim{\zposy{z0y} sp}; | |
| x1 := \mpdim{\zposx{z1x} sp}; |