mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
feat(image): allow customizing font size for math expressions
This commit is contained in:
parent
2096fcdd73
commit
b052eb9372
1 changed files with 5 additions and 3 deletions
|
@ -52,14 +52,16 @@ M.transforms = {
|
|||
end
|
||||
end
|
||||
table.sort(packages)
|
||||
local fs = Snacks.image.config.convert.math.font_size or "large"
|
||||
img.content = ([[
|
||||
\documentclass[preview,border=2pt,varwidth]{standalone}
|
||||
\documentclass[preview,border=2pt,varwidth,12pt]{standalone}
|
||||
\usepackage{%s}
|
||||
\begin{document}
|
||||
{ \Large \color[HTML]{%s}
|
||||
{ \%s \selectfont
|
||||
\color[HTML]{%s}
|
||||
%s}
|
||||
\end{document}
|
||||
]]):format(table.concat(packages, ", "), fg:upper():sub(2), content)
|
||||
]]):format(table.concat(packages, ", "), fs, fg:upper():sub(2), content)
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue