Skip to content

Instantly share code, notes, and snippets.

View dohyunkim's full-sized avatar

Dohyun Kim dohyunkim

View GitHub Profile
@dohyunkim
dohyunkim / mpvarshare.tex
Created January 27, 2014 05:49
sharing metapost variables between mplibcode environments: a proof of concept
\documentclass{article}
\usepackage{luamplib}
\everymplib{
if (readfrom "mymplibtmp.mp" <> EOF):
input mymplibtmp;
fi;
closefrom "mymplibtmp.mp";
if unknown u: u := 10; fi;
beginfig(0);
}
@dohyunkim
dohyunkim / mpbackground.tex
Created January 14, 2014 08:30
mplib figure as a page background
%\pdfcompresslevel=0
%\pdfobjcompresslevel=0
\input luamplib.sty
\mplibsetformat{metafun}
\newbox\MpPageBg
\setbox\MpPageBg\hbox{%
\mplibcode
beginfig(0);
draw btex D R A F T etex scaled 14 rotated 60
withcolor transparent("normal", 0.2, black);
@dohyunkim
dohyunkim / ivstest.tex
Last active January 2, 2016 16:09
HanaMin IVS test file
\documentclass{article}
\usepackage{xetexko}
\setmainhanjafont{HanaMinA}
\newfontfamily\fallbackhanjafont{HanaMinB}
\begin{document}
%\hanjacjksymbols % or \prevfontcjksymbols % not needed any more
\Huge
道\char"E0100
道\char"E0101
@dohyunkim
dohyunkim / trans.tex
Created December 29, 2013 16:11
test file for transparency. Current (Dec. 2013) luaotfload-colors.lua conflicts with luamplib package on the development.
\input luaotfload.sty
\input luamplib.sty
\mplibsetformat{metafun}
\mplibcode
beginfig(0);
path p; p:= unitcircle scaled 2cm;
fill p withcolor transparent("normal",0.5,red);
fill p xshifted 1cm withcolor transparent("normal",0.5,blue) ;
endfig;
\endmplibcode
@dohyunkim
dohyunkim / charboxes.tex
Last active December 31, 2015 01:39
사용자가 지시한 폰트에 들어있는 모든 글리프를 박스를 둘러 보여준다.
\message{^^JName of the font to test = }
\bgroup
\endlinechar-1
\global\read-1 to\myfontname
\egroup
\ifx\empty\myfontname
\def\myfontname{ec-lmr12}
\fi
\font\myfont=\myfontname\space at 15pt
\def\numtohex{%