Comments (17)
It seems that pandoc-crossref was built with different version of pandoc than you're running. Make sure that you build pandoc and pandoc-crossref in the same sandbox. Also run ghc-pkg check
if you're not using sandboxes, it's possible that some packages are broken by updates.
from pandoc-crossref.
I reinstalled crossref and it will process and create the pdf. However it does not label the figures appropriately nor insert the reference. Unfortunately, I haven't used a sandbox, in fact I am not familiar with it. Perhaps I need to wipe the slate clean and start over.
from pandoc-crossref.
Let me know if it doesn't help. It's always possible I messed up somewhere.
from pandoc-crossref.
I reinstalled everything and got the same result. I am not familiar with the sandboxes. My preliminary investigation shows that sandboxes can be set up for each build. So, should I set up a sandbox for pandoc and a separate on for crossref? Sorry for the basic question...
from pandoc-crossref.
Wait. I think I might have misinterpreted error log you provided. Sorry. Sleep deprivation does that. Could you show what command do you use to run Pandoc?
from pandoc-crossref.
I have altered the paths to protect the innocent
"C:/path/cabal/bin/pandoc" +RTS -K512m -RTS 2015HarshaText.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output 2015HarshaText.pdf --filter pandoc-citeproc --template "c:\path\R\library\rmarkdown\rmd\latex\default-1.14.tex" --highlight-style tango --latex-engine pdflatex --include-in-header "c:\\path\\HABsPDFheader.tex" --filter pandoc-crossref --variable "geometry:margin=1in" --bibliography "c:\\path\\Lake-Harsha\\HABs.bib"
from pandoc-crossref.
Okay... Could you change order of filters so that pandoc-crossref appears before pandoc-citeproc and test that one out?
from pandoc-crossref.
I am using Rstudio and don't know exactly how the pandoc command is generated. I am looking into it... Thanks for the help!
from pandoc-crossref.
i was able to run the command manually but didn't fix the problem. Here is a bit more description of what I am doing.
markdown snippet:
####Structure
Microcystins are cyclic heptapeptides @fig:MCStruct with @campos_molecular_2010
![Microcystin Structure](../figures/microcystin.png){#fig:MCStruct}
output in pdf
Structure
Microcystins are cyclic heptapeptides ??? with [1]
command:
"C:/path/cabal/bin/pandoc" +RTS -K512m -RTS HABsLitReview.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output HABsLitReview.pdf --filter pandoc-citeproc --template "c:\path\R\library\rmarkdown\rmd\latex\default-1.14.tex" --highlight-style tango --latex-engine pdflatex --include-in-header "c:\\path\\HABsPDFheader.tex" --filter pandoc-crossref --variable "geometry:margin=1in" --filter pandoc-citeproc --bibliography "c:\\path\\HABs.bib"
from pandoc-crossref.
You're using pandoc-citeproc
twice here:
"C:/path/cabal/bin/pandoc" +RTS -K512m -RTS HABsLitReview.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output HABsLitReview.pdf --filter pandoc-citeproc --template "c:\path\R\library\rmarkdown\rmd\latex\default-1.14.tex" --highlight-style tango --latex-engine pdflatex --include-in-header "c:\path\HABsPDFheader.tex" --filter pandoc-crossref --variable "geometry:margin=1in" --filter pandoc-citeproc --bibliography "c:\path\HABs.bib"
while in fact --bibliography
implies --filter pandoc-citeproc
(as per README)
Please remove first instance of --filter pandoc-citeproc
(in fact you can safely remove both, but that's up to you)
from pandoc-crossref.
Hell, there is one more problem. --include-in-header
also overrides header-includes
metadata that pandoc-crossref uses with LaTeX output. I should probably add this caveat to README.
You could probably add pandoc-crossref definitions yourself, but actual definitions depend on filter settings.
Here is the default verision for reference:
\AtBeginDocument{%
\renewcommand*\figurename{Figure}
\renewcommand*\tablename{Table}
}
\AtBeginDocument{%
\renewcommand*\listfigurename{List of Figures}
\renewcommand*\listtablename{List of Tables}
}
\usepackage{float}
\floatstyle{ruled}
\makeatletter
\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]}
\makeatother
\floatname{codelisting}{Listing}
\newcommand*\listoflistings{\listof{codelisting}{List of Listings}}
from pandoc-crossref.
Further investigation revealed the following in the .tex file produced by pandoc
\paragraph{Structure}\label{structure}
Microcystins are cyclic heptapeptides Figure\ref{fig:MCStruct} with
\includegraphics{../figures/microcystin.png}
\paragraph{Mode of Action}\label{mode-of-action}
Is this the intended? The \includegraphics is not wrapped in \figure and has no label.
Also, I have read some other posts regarding the integration of cross referencing in pandoc and it seems this issue is still quite up in the air. can you provide any insight into where this is going?
Thanks!
from pandoc-crossref.
Maybe there is no label because of a bug in the latest pandoc version (1.16.x). See here for a pull reguest: 2637.
BTW: I run into the SoftBreak issue too but fix it by using the latest Haskell platform 7.10.3 and compiled everything again.
from pandoc-crossref.
Okay, so I messed up badly with 0.1.6.4 release, it pretty much broke LaTeX output for figures. 0.1.6.5 should work.
jgm/pandoc#2637 shouldn't affect anything until released, since pandoc-crossref manages LaTeX labels by itself. I will have to remove that after next pandoc release (since I have no idea which version will have that PR included, I can't do that until release)
@HJAllen, I have literally no idea why \includegraphics
is not wrapped in figure
environment. It should be. All I can suggest is try updating to pandoc-1.16.0.2 and pandoc-crossref-0.1.6.5.
from pandoc-crossref.
success. I updated pandoc and pandoc-crossref to latest. I am using Rstudio and knitr which has the pandoc options 'hard coded' in the knit function so I used a lower level command rmarkdown::pandoc_convert to provide the filters in the appropriate order as in:
rmarkdown::pandoc_convert("HABsLitReview.Rmd", to="latex",output='HABsLitReview.pdf',citeproc=FALSE,options=c('--filter','pandoc-crossref','--filter','pandoc-citeproc.exe'),verbose=TRUE)
from pandoc-crossref.
@HJAllen, FYI, rstudio/rmarkdown@07da257 fixes filter order issue. rmarkdown 0.9.3 should have that once released.
from pandoc-crossref.
great! thanks for the pointer.
Also, thank you for your hard work on this filter. As far as my workflow goes, cross-refs, or lack of, were the last thing holding me back and your solution makes markdown and pandoc a great tool!
from pandoc-crossref.
Related Issues (20)
- 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
- Numbered equation misplaced in ODT output HOT 1
- pandoc could not pick up the figure which pandoc-crossref specifies using "<figure" HOT 1
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.