Closed bertradio closed 1 month ago
Hi there, that's a fair point and valid use-case. I will open a PR for it as soon as I am able to, thanks!
@bertradio you should be now able to change your font and pass custom arguments if necessary, enjoy!
Thanks. But when I add the code in the README I get this error:
On Thu, May 16, 2024, at 19:36, Armin Veres wrote:
@bertradio https://github.com/bertradio you should be now able to change your font and pass custom arguments if necessary, enjoy!
— Reply to this email directly, view it on GitHub https://github.com/arminveres/md-pdf.nvim/issues/13#issuecomment-2115836936, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLYYRMA4KTZE2IIEFURHUDZCTVDJAVCNFSM6AAAAABHXUJ5ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVHAZTMOJTGY. You are receiving this because you were mentioned.Message ID: @.***>
@bertradio can you provide the exact snippet you used? TIA
No matter what I try and convert I get the same result.
Here is a simple test file that generates the error I sent.
On Thu, May 16, 2024, at 21:03, Armin Veres wrote:
@bertradio https://github.com/bertradio can you provide the exact snippet you used? TIA
— Reply to this email directly, view it on GitHub https://github.com/arminveres/md-pdf.nvim/issues/13#issuecomment-2115988873, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLYYRIWJLVKINS56KK2D3DZCT7HRAVCNFSM6AAAAABHXUJ5ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVHE4DQOBXGM. You are receiving this because you were mentioned.Message ID: @.***>
-- Created: 05/10/24
My_map('n', '
return {
'arminveres/md-pdf.nvim',
branch = 'main', -- you can assume that main is somewhat stable until releases will be made
opts = {
-- no table of contents
toc = false,
-- set code highlighting
highlight = 'pygments',
-- Specify font, nil
uses the default font of the theme
-- fonts = nil,
-- or, where all or only some options can be specified. NOTE: those that are nil
can be left
-- out completely
fonts = {
main_font = nil,
sans_font = "DejaVuSans",
mono_font = "IosevkaTerm Nerd Font Mono",
math_font = nil,
},
-- Custom options passed to pandoc
CLI call, can be ignored for setup
pandoc_user_args = nil,
-- or
-- pandoc_user_args = {
-- -- short
-- "-V KEY[:VALUE]",
-- -- long options
-- "--standalone=false",
-- },
},
}
On Thu, May 16, 2024, at 21:03, Armin Veres wrote:
@bertradio https://github.com/bertradio can you provide the exact snippet you used? TIA
— Reply to this email directly, view it on GitHub https://github.com/arminveres/md-pdf.nvim/issues/13#issuecomment-2115988873, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLYYRIWJLVKINS56KK2D3DZCT7HRAVCNFSM6AAAAABHXUJ5ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVHE4DQOBXGM. You are receiving this because you were mentioned.Message ID: @.***>
@bertradio Yeah the issue seems to be with you copying all of the examples, while they are duplicated, see comments, to show the different ways to set them up. Try this:
{
'arminveres/md-pdf.nvim',
keys = {
{
"<leader>,",
function() require("md-pdf").convert_md_to_pdf() end,
desc = "Markdown preview",
},
},
opts = {
fonts = {
main_fonts = "DejaVuSans" -- or whatever you prefer
}
},
}
Also try to add the exact error you were getting, otherwise it's hard for me to debug.
Here's what I have: return {
'arminveres/md-pdf.nvim',
keys = { { "
}
And this is the nvim error
On Fri, May 17, 2024, at 10:19, Armin Veres wrote:
@bertradio https://github.com/bertradio Yeah the issue seems to be with you copying all the examples, while they are duplicating, see comments, to show the different ways to set them up. Try this:
{ 'arminveres/md-pdf.nvim', keys = { { "
,", function() require("md-pdf").convert_md_to_pdf() end, desc = "Markdown preview", }, }, opts = { fonts = { main_fonts = "DejaVuSans" -- or whatever you prefer } }, } Also try to add the exact error you were getting, otherwise it's hard for me to debug. — Reply to this email directly, view it on GitHub https://github.com/arminveres/md-pdf.nvim/issues/13#issuecomment-2117004787, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLYYROLFPUFL6ELLHAASM3ZCW4P7AVCNFSM6AAAAABHXUJ5ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJXGAYDINZYG4. You are receiving this because you were mentioned.Message ID: @.***>
You still did not provide the error.
I had put it in the email as an inline image. Attached is the file.
On Fri, May 17, 2024, at 12:58, Armin Veres wrote:
You still did not provide the error.
— Reply to this email directly, view it on GitHub https://github.com/arminveres/md-pdf.nvim/issues/13#issuecomment-2117320258, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLYYRIEOJRLWKR2SB7CTQLZCXPHDAVCNFSM6AAAAABHXUJ5ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJXGMZDAMRVHA. You are receiving this because you were mentioned.Message ID: @.***>
I can honestly not see any attachment - yes I looked in my mail -. Can you copy the text or paste the image into GitHub?
Here's the error I'm getting:
md-pdf: Error producing PDF. ! Font \TU/lmr/m/n/10=[lmroman10-regular:+tlig; at 10pt not loadable: metric data not found or bad
That looks like a font error coming from pandoc itself; try different fonts or try finding the correct name. Good luck!
I like sans serif fonts. An option to set the font family would be useful.
Thanks