Wandmalfarbe/pandoc-latex-template

Not able to use custom pdf as page background

pfaco opened this issue · 6 comments

pfaco commented

The page background is working just fine using the example pdf's provided.
When I try to use a custom PDF it fails with the following error:

Error producing PDF.
! Missing endcsname inserted.

protect
l.449 \end{titlepage}

Tried searching here and in pandoc documentation but couldn't find the problem. It seems to happen when generating the pdf using latex.

Any idea what could be wrong on my pdf?

same here

Please provide the source files and the complete command that you used to render your document.

The page background is working just fine using the example pdf's provided.
When I try to use a custom PDF it fails with the following error:

Error producing PDF.
! Missing endcsname inserted.

protect
l.449 \end{titlepage}

Tried searching here and in pandoc documentation but couldn't find the problem. It seems to happen when generating the pdf using latex.

Any idea what could be wrong on my pdf?

Same here...But My problem was special character in the file name. When I remove it worked like a sharm.

noraj commented

For me it was underscore _ in the filename, I replaced it with dash -.

But My problem was special character in the file name. When I remove it worked like a sharm.

Although the following markdown compiles fine on my machine, it is generally a good idea to avoid special characters in filenames.

## With `-`

![](./image-file.pdf){ width=10cm }

## With `_`

![](./image_file.pdf){ width=10cm }

## With `.`

![](./image.file.pdf){ width=10cm }

## With ` `

![](./image file.pdf){ width=10cm }

## With ` ` (URL encoded)

![](./image%20file.pdf){ width=10cm }

## With `%`

![](./image%25file.pdf){ width=10cm }

## With `{`

![](./image{file.pdf){ width=10cm }

## With `ä`

![](./imäge-file.pdf){ width=10cm }

There was a recent problem with grffile in combination with dots in the filename (see jgm/pandoc#5848 for the full discussion).

The following Markdown would not compile, so I would advise against using extra dots . in filenames.

![This is an image.](./image.file.pdf)

I totally overlooked that you are applying a custom page background. Your issue is a known problem. Please apply the fix mentioned in this issue #100. You can also replace the underscore in your filename with a hyphen (-).