Comments (14)
Pandoc 1.14 (a.k.a. repo version) has changed API interface. pandoc-1.14 branch contains some work w.r.t. this change. You may want to try it and see if it works. I think it doesn't support external yaml settings as of yet though.
from pandoc-crossref.
And please do check your pandoc version, since PandocError
type is introduced in 1.14, and should not be present in 1.13.2. If it is, then we messed up badly somewhere...
from pandoc-crossref.
If I have 1.13.2 (in /usr/local/bin) and 1.14 (in ~/.cabal/bin) installed simultaneously, but I don't include 1.14 in the $PATH, shouldn't it not try to run 1.14 (and give me 1.14 errors)?
Even if I explicitly tell it to use 1.13.2, I get the same errors:
~/.../filters/pandoc-crossref : /usr/local/bin/pandoc --version
pandoc 1.13.2
...
~/.../filters/pandoc-crossref : /usr/local/bin/pandoc -F pandoc-crossref.hs -i demo.md -o blah.html
pandoc-crossref.hs:152:50:
Couldn't match expected type ‘Pandoc’
with actual type ‘Either Text.Pandoc.Error.PandocError Pandoc’
In the second argument of ‘($)’, namely ‘readMarkdown def s’
In the second argument of ‘($)’, namely
‘getInlines $ readMarkdown def s’
(etc...)
from pandoc-crossref.
Ooh. Switching to the 1.14 branch almost fixes it. There's only one error left. Still strange that 1.13.2 is giving all those 1.14-related errors, though.
pandoc-crossref.hs:167:9:
Non type-variable argument
in the constraint: MonadState References m
(Use FlexibleContexts to permit this)
When checking that ‘setTmplV’ has the inferred type
setTmplV :: forall (m :: * -> *).
MonadState References m =>
(String -> Maybe MetaValue) -> m ()
In an equation for ‘applyTemplate’:
applyTemplate i t tmpl
= do { setTmplV $ \ n -> ...;
res <- replaceTemplate tmpl;
setTmplV $ const Nothing;
.... }
where
setTmplV f = modify $ \ s -> ...
pandoc: Error running filter pandoc-crossref.hs
from pandoc-crossref.
It's likely 1.13.2 binary using 1.14 library from your ~/.ghc
, where cabal installed it. I'm not sure how to fix it, but I'd advise to simply use a sandbox for pandoc-1.14, which does not pollute ghc package set in any way.
As for other error, what ghc version do you run?
from pandoc-crossref.
I'm using GHC 7.10.1.
I'd never heard of cabal sandboxes before (I live with Python; never touched Haskell). Reinstalling 1.14 now.
from pandoc-crossref.
Can't really test with ghc 7.10, but I can try to specify type, so maybe it helps. One moment.
from pandoc-crossref.
Ok, tried specifying type conservatively. Also merged support for settings file into pandoc-1.14
branch. See if this helps.
from pandoc-crossref.
Ack. Finally emerged from cabal hell with freshly sandboxed 1.14 install, and the binary seems to work fine. However, when using pandoc-crossref.hs
as a filter, I get errors about Text.Pandoc and other libraries not existing. I'm absolutely sure this is because ghc isn't looking at the sandbox path (despite it being in my $PATH
—when the filter is run, it doesn't know where to look for the import Text.Pandoc
, etc. commands).
So this is totally off topic from this bug, but I have no idea how to connect the sandboxed version of 1.14 to the filter. Sorry! :)
from pandoc-crossref.
You can build an executable from within cabal sandbox and use that:
cabal --sandbox-config-file=/full/path/to/pandocs/cabal.sandbox.config exec -- ghc --make pandoc-crossref.hs
This will create pandoc-crossref
executable, which you can then use with pandoc-1.14 as usual (i.e. pandoc -F pandoc-crossref ...
). I will be adding cabal build file later, but for now this should do.
from pandoc-crossref.
Getting closer! I can compile pandoc-crossref just fine, but then it complains about not finding a file:
~/.../filters/pandoc-crossref : cabal --sandbox-config-file=/Users/andrew/Research/Markdown\ magic/pandoc_dev/cabal.sandbox.config exec -- ghc --make pandoc-crossref.hs
[1 of 1] Compiling Main ( pandoc-crossref.hs, pandoc-crossref.o )
Linking pandoc-crossref ...
ld: warning: directory not found for option '-L/private/tmp/ghc20150402-41611-1b15z9c/ghc-7.10.1/gmp-static'
~/.../filters/pandoc-crossref : pandoc -F pandoc-crossref demo.md -o asdf.html
pandoc: Error running filter pandoc-crossref
pandoc-crossref: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
(I'm so sorry about this super long thread!)
from pandoc-crossref.
Try pandoc -F ./pandoc-crossref ...
, since it's not in PATH.
from pandoc-crossref.
THAT'S IT. I hadn't thought to include ./
, since I figured the command would see it in the current folder. Thanks so much!
In other news, it ran perfectly fine with no errors, so your conservative type specification worked.
from pandoc-crossref.
Glad to hear it. Closing this as resolved then.
from pandoc-crossref.
Related Issues (20)
- A question regarding the label syntax (allowable characters) HOT 3
- Labels in align / eqnarray environment? HOT 1
- equation label HOT 8
- Figure captions in ODT output should have 'Figure' or 'FigureCaption' style HOT 2
- Unwanted `<br />` are inserted when using `eqnBlockTemplate` with HTML output HOT 4
- Support arm64 HOT 2
- Use `listing` instead of `codelisting` HOT 3
- Make grid tables visible HOT 4
- Mac can not open "pandoc-crossred" because it can not vertify the developer? HOT 3
- New feature request: cross ref for theorems, examples, and problems HOT 1
- Extra dot at the end of the figure caption HOT 6
- How to include a listing as a subfigure in a figure? HOT 1
- The Error ”Filter returned error status 1” HOT 2
- New version of pandoc available HOT 1
- Org-reader subfigs feature HOT 3
- One space too many when prefix is set to empty HOT 5
- New Version of Pandoc HOT 1
- Recommend saying something about pandoc-crossref versus pandoc-xnos in readme HOT 1
- [feature request] support native typst references HOT 1
- wikilink image cross-references are not implemented HOT 3
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-crossref.