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{article} | |
\usepackage{luamplib} | |
\begin{document} | |
\directlua{ | |
function luamplib.utf8substr (t,b,e) | |
local ob = utf8.offset(t,b+1) | |
local oe = utf8.offset(t,e) | |
local ms = utf8.char(utf8.codepoint(t,ob,oe)):gsub('"','"&ditto&"') | |
return string.format('"\csstring\%s"', ms) | |
end |
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{article} | |
\usepackage{luamplib} | |
\begin{document} | |
\mpfig | |
u:=100; % 그리기 용도. 계산만 하려면 1. | |
path A, B; numeric ra, rb; pair ca, cb; | |
cb = (1u,9u+rb); | |
ca = (1u,9u-rb-ra); |
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{article} | |
\usepackage{luamplib} | |
\begin{document} | |
\directlua{ | |
function gettablines () | |
local gap, width = 12, string.format("\csstring\%f",tex.sp'\the\linewidth'/65781.76) | |
local instance = luamplib.instances['\mpfiginstancename'] | |
local lines = instance:get_path"lines" | |
local offsets = instance:get_path"offsets" |
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{article} | |
\usepackage{fontspec} | |
\setmainfont{TeX Gyre Pagella} | |
%\setmainfont{Noto Sans CJK KR} | |
\usepackage{luamplib} | |
\mplibsetformat{metafun} | |
\directlua{ mplibglyph = require'mplibglyph' } | |
\begin{document} | |
\mpfig* |
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{article} | |
\usepackage{fontspec,xcolor,luamplib} | |
\setmainfont{tex gyre pagella} | |
\directlua{ | |
local function ol(f,_,v) | |
v = tonumber(v) or 3 | |
v = v * f.size / 6578.176 % 3 means 0.3pt when using 10pt font | |
f.width = v | |
f.mode = 1 | |
end |
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{article} | |
\usepackage{kotex} | |
\newfontfeature{NoEmbedding}{noembedding} | |
\directlua{ | |
local function noembed (tfmdata) | |
local properties = tfmdata.properties | |
if not properties.filename then | |
properties.filename = tfmdata.filename | |
end |
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 xetexko.sty | |
\input ulem.sty | |
\catcode`@=11 | |
\UL@hook\expandafter{\the\UL@hook | |
\protected\def\dotemph#1{% | |
\ifx\ \LA@space\else \UL@stop\fi | |
\leavevmode | |
\setbox\XeKo@dotemph@box\hbox{\raise\dotemphraise\hbox{\dotemphchar}}% | |
\begingroup | |
\let\XeKo@maybe@dotemph\XeKo@do@dotemph |
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
\font\ntss="Noto Sans CJK KR:mapping=tex-text;script=hang;language=KOR" at 10pt | |
\ntss | |
% xetex -no-pdf xxx.tex 한 후 dviasm 을 실행해 gid 를 알아낸다. | |
\setbox0\hbox{\XeTeXglyph 63116} | |
\rpcode\font 63116=\dimexpr100\wd0/(\fontdimen6\font/10)\relax | |
\XeTeXprotrudechars=2 | |
가. |
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} | |
\chardef\XeTeXcharclassIgnore=4096 | |
\chardef\XeTeXcharclassBoundary=4095 | |
\newXeTeXintercharclass\XeTeXcharclassID | |
\newXeTeXintercharclass\XeTeXcharclassCJ | |
\newXeTeXintercharclass\XeTeXcharclassOP | |
\newXeTeXintercharclass\XeTeXcharclassCL | |
\newXeTeXintercharclass\XeTeXcharclassEX | |
\newXeTeXintercharclass\XeTeXcharclassIS | |
\newXeTeXintercharclass\XeTeXcharclassNS |
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{kotex,iftex} | |
\defaultfontfeatures+{Renderer=OpenType} | |
\setmainhangulfont{Noto Sans CJK KR}[Script=Hangul, BoldFont=* Bold] | |
\newfontfamily\manjufont{Noto Sans Mongolian}[Script=Mongolian] | |
\ifluatex | |
\hangulpunctuations=0 | |
\directlua{ | |
function reverselines(box) | |
local t, head, curr, prevdp = {} |
NewerOlder