30 lines
869 B
Lua
30 lines
869 B
Lua
local line_begin = require("luasnip.extras.expand_conditions").line_begin
|
|
|
|
return {
|
|
s(
|
|
{ trig = ";dcwatermark", dscr = "Top-right corner watermark" },
|
|
fmta(
|
|
[[
|
|
\documentclass[a4paper]{article}
|
|
\usepackage[top=.2in,right=.2in]{geometry}
|
|
\usepackage{xcolor}
|
|
\renewcommand{\familydefault}{\sfdefault}
|
|
\begin{document}
|
|
% switch off page number
|
|
% https://tex.stackexchange.com/questions/7355/how-to-suppress-page-number
|
|
\pagenumbering{gobble}
|
|
|
|
% https://superuser.com/questions/280659/how-can-i-apply-a-watermark-on-every-page-of-a-pdf-file
|
|
% pdftk original.pdf stamp watermark.pdf output final.pdf
|
|
|
|
\hfill {\Large \textcolor{red}{``<>''}}
|
|
\end{document}
|
|
|
|
]],
|
|
{
|
|
i(1, "Insert watermark"),
|
|
}
|
|
),
|
|
{ condition = line_begin } -- set condition in the `opts` table
|
|
),
|
|
}
|