Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Not able to use custom pdf as page background #166

Closed
pfaco opened this issue Apr 16, 2020 · 6 comments
Closed

Not able to use custom pdf as page background #166

pfaco opened this issue Apr 16, 2020 · 6 comments
Labels

Comments

@pfaco
Copy link

pfaco commented Apr 16, 2020

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?

@basbebe
Copy link

basbebe commented Jun 6, 2020

same here

@Wandmalfarbe
Copy link
Owner

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

@0xtiago
Copy link

0xtiago commented Jun 26, 2020

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
Copy link
Contributor

noraj commented Aug 1, 2020

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

@Wandmalfarbe
Copy link
Owner

Wandmalfarbe commented Sep 18, 2020

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)

@Wandmalfarbe
Copy link
Owner

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 (-).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants