This commit is contained in:
sharings 2025-07-26 12:43:01 +00:00
commit 1e2ca5a6fc
71 changed files with 3330 additions and 0 deletions

View file

@ -0,0 +1,30 @@
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
),
}