Comments (13)
That does seem to fix it, thanks!
git bisect
found 3c17869 as the proximate cause, but it seems plausible that it only surfaced the issue, not caused it.
from pandoc.
It seems that HEAD
(e43ab9e) leaves more files behind. (input.tex
, input.log
, input.pdf
; in addition to the input.aux
that 3.1.11.1 also left.)
from pandoc.
Can anybody else running pandoc on Windows reproduce this? It seems to be Windows-specific.
from pandoc.
Interestingly, my attempt at creating a minimal reproducible example is failing. Not sure what it is about my not-minimal example that is causing the issue to occur… But maybe finding the culprit revision will shed some light on it.
from pandoc.
It seems that
HEAD
(e43ab9e) leaves more files behind. (input.tex
,input.log
,input.pdf
; in addition to theinput.aux
that 3.1.11.1 also left.)
A bisection between 3.1.11.1 and HEAD
suggests that this increase was introduced by 2dd98b9, which doesn’t seem so informative at first glance.
(I did that bisection first because I expected it to be faster.)
My next step is going to be the bisection between 3.1.2 and 3.1.11.1 (likely tomorrow as it’s getting a bit late here).
from pandoc.
One thing to check is how deterministic your results are. Are the same files always left behind? Are files always left behind with that version, or just sometimes? Does 3.1.2 never leave them behind?
from pandoc.
It seems quite deterministic as far as I can tell, and the first bisection did provide a clue after all, at least as far as creating a repro case is concerned: it seems that adding a section name does the trick, and adding it actually makes the image unnecessary – even without it, pandoc still leaves input.aux
behind. (But the image makes for another one, just to be sure.)
Here is therefore a repro case:
$ cd tmpandoc
$ pandoc document.md -o document.pdf
from pandoc.
Also: what --pdf-engine
are you using (or just the default)? OK: the default.
from pandoc.
My hunch is that this may have to do with lazy IO, and I note that there are a couple of readFileLazy's in the runTeXProgram code. I would expect that withSystemTempDir would still clean up, but maybe there is a bug in the Windows implementation? We could try replacing all the lazy IO with strict IO in this context -- I remember doing that before for another issue on Windows.
from pandoc.
If you want to try it, you could, in Text.Pandoc.PDF.hs, remove the readFileLazy
from the imports from Text.Pandoc.Class and add this function definition:
readFileLazy :: (PandocMonad m, MonadIO m) => FilePath -> m BL.ByteString
readFileLazy fp = BL.fromStrict <$> readFileStrict fp
Then recompile and see if the problem is still there.
from pandoc.
Commit bd8e317
adds a readFileLazy.
Dec. 15 2023 pandoc 3.1.11
from pandoc.
OK, try with current HEAD, which incorporates the idea I had above.
from pandoc.
Great, I'm glad to have found this. I remember running into a similar issue with lazy IO on Windows over a decade ago.
from pandoc.
Related Issues (20)
- Support of custom documentClass(.cls file) for Latex to Html conversion HOT 4
- pandoc fails to wrap math correctly when generating pptx in unusual places HOT 1
- typst: table colspan not supported HOT 1
- SVG Self-contained fix insufficient in #9420 HOT 1
- ePub v2 fails validation with ePubCheck in pandoc 3.1.12 - worked previously HOT 9
- improve error message with typo {{< var country>}} (no space) HOT 1
- pandoc .tex > .epub : more errors HOT 1
- lang: de-DE and lang=de don't work together for LaTeX HOT 2
- Latex: `header-includes:` works via `--metadata-file` but not via `--metadata` HOT 1
- Support GFM alerts (admonitions) HOT 3
- Invalid Typst output from demo ODT document HOT 5
- Pandoc can't roundtrip ODT -> Typst -> ODT, chokes on its own output HOT 2
- add ListAttributes support for BulletList HOT 1
- Unexpected character when converting from markdown+wikilinks_title_after_pipe HOT 3
- problem fetching remote csl style after upgrade to pandoc 3.1.12.1 HOT 11
- Docker images out of date HOT 1
- hard_line_breaks extension (already present for markdown) for djot writer HOT 2
- Fenced code attributes produce no line numbers in PowerPoint HOT 2
- HTML Reader: figure with table or image both has Image caption in result DOCX HOT 7
- Missing reference in `sitemap.json` with `chunkedhtml` writer HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandoc.