Skip to content

Commit 5704b06

Browse files
allow non-latex intermediaries for pdf generation (#381)
Co-authored-by: Jessica Tegner <jessica@jessicategner.com>
1 parent 3fd939c commit 5704b06

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pypandoc/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ def _validate_formats(format, to, outputfile):
339339
)
340340

341341
if base_to_format == "pdf":
342-
# pdf formats needs to actually have a to format of latex and a
343-
# filename with an ending pf .pdf
342+
# pdf formats need a filename with an ending of .pdf
344343
if isinstance(outputfile, str):
345344
if outputfile[-4:] != ".pdf":
346345
raise RuntimeError(
@@ -351,11 +350,9 @@ def _validate_formats(format, to, outputfile):
351350
raise RuntimeError(
352351
'PDF output needs an outputfile with ".pdf" as a fileending.'
353352
)
354-
# to is not allowed to contain pdf, but must point to latex
355353
# it's also not allowed to contain extensions according to the docs
356354
if to != base_to_format:
357355
raise RuntimeError("PDF output can't contain any extensions: %s" % to)
358-
to = "latex"
359356

360357
return format, to
361358

0 commit comments

Comments
 (0)