74 lines
1.9 KiB
Lua
74 lines
1.9 KiB
Lua
local helpers = require("luasnip-helper-funcs")
|
|
local get_visual = helpers.get_visual
|
|
|
|
return {
|
|
s(
|
|
{ trig = ";dcinit", snippetType = "snippet" },
|
|
fmta(
|
|
[[
|
|
\documentclass[<>]{<>}
|
|
\usepackage[<>]{geometry}
|
|
\usepackage[AutoFallBack=true]{xeCJK}
|
|
\setCJKmainfont<>
|
|
\begin{document}
|
|
<><>
|
|
\end{document}
|
|
]],
|
|
{
|
|
c(1, {
|
|
t(""),
|
|
t("a4paper"),
|
|
t("letter"),
|
|
t("20pt"),
|
|
}),
|
|
c(2, {
|
|
t("article"),
|
|
t("extarticle"),
|
|
t("report"),
|
|
t("moderncv"),
|
|
}),
|
|
c(3, {
|
|
t(""),
|
|
t("margin=3cm"),
|
|
t("top=3cm,bottom=3cm,left=3cm,right=3cm"),
|
|
}),
|
|
c(4, {
|
|
t({
|
|
"{Source Han Serif TC}",
|
|
"\\newCJKfontfamily\\secondaryfont{Source Han Sans TC}",
|
|
"\\newcommand*{\\sfont}[1]{{\\secondaryfont #1}}",
|
|
}),
|
|
t({
|
|
"{Source Han Sans TC}",
|
|
"\\newCJKfontfamily\\secondaryfont{Source Han Serif TC}",
|
|
"\\newcommand*{\\sfont}[1]{{\\secondaryfont #1}}",
|
|
}),
|
|
t({
|
|
"[Path=\\string~/.local/share/fonts/",
|
|
",UprightFeatures = {FontIndex=13}",
|
|
",BoldFeatures = {FontIndex=28}",
|
|
"]{SourceHanSerif.ttc}",
|
|
"\\newCJKfontfamily[Path=\\string~/.local/share/fonts/",
|
|
" ,UprightFeatures = {FontIndex=28}",
|
|
" ,BoldFeatures = {FontIndex=38}",
|
|
"]\\secondaryfont{Source Han Sans TC}",
|
|
"\\newcommand*{\\sfont}[1]{{\\secondaryfont #1}}",
|
|
}),
|
|
t({
|
|
"[Path=\\string~/.local/share/fonts/",
|
|
",UprightFeatures = {FontIndex=28}",
|
|
",BoldFeatures = {FontIndex=38}",
|
|
"]{SourceHanSans.ttc}",
|
|
"\\newCJKfontfamily[Path=\\string~/.local/share/fonts/",
|
|
",UprightFeatures = {FontIndex=13}",
|
|
",BoldFeatures = {FontIndex=28}",
|
|
"]\\secondaryfont{Source Han Serif TC}",
|
|
"\\newcommand*{\\sfont}[1]{{\\secondaryfont #1}}",
|
|
}),
|
|
}),
|
|
d(5, get_visual, {}, { user_args = { "Content here" } }),
|
|
i(0),
|
|
}
|
|
)
|
|
),
|
|
}
|