Git Product home page Git Product logo

Comments (15)

kawabata avatar kawabata commented on July 21, 2024

Could you describe which format you tried to export?
Also, could you show what line is appeared in "Message" buffer
when export is done?

Something like

Running pandoc with args: (-f org -t markdown -o /Users/kawabata/test.md
--parse-raw --mathjax --standalone /Users/hogehoge/test.tmp956MeQ.org)

should be appeared in "Message" buffer.

On Tue, Aug 25, 2015 at 6:39 AM, stvharman [email protected] wrote:

export via pandoc inserts "file:" whenever there is a link to a file. For
example

file:images/tree.jpg

This creates problems in an import to pelican and results in broken links.
If this phrase is left out, then there is no problem.

When I try pandoc from command line, it does not insert "file:". Would it
be possible to remove this behavior from ox-pandoc.


Reply to this email directly or view it on GitHub
#8.


川幡 太一 (KAWABATA, Taichi) E-mail: [email protected]

from ox-pandoc.

stvharman avatar stvharman commented on July 21, 2024

Thanks. Mine is exactly the same as you posted. The only difference is that I am exporting to html
If I use ox-pandoc, I get

if I use pandoc from the command line, I get
<img src="../images/figure.jpg"
The second one is what I want.

from ox-pandoc.

sebhahn avatar sebhahn commented on July 21, 2024

I can confirm this error. I'm exporting from org to latex/pdf. Is there any workaround?

from ox-pandoc.

sebhahn avatar sebhahn commented on July 21, 2024

Is this problem coming from pandoc or ox-pandoc? Can we expect a fix soon?

from ox-pandoc.

kawabata avatar kawabata commented on July 21, 2024

I could not grasp exactly what would be the problem.

The argument passwd to "pandoc" command is displayed to Messages buffer,
so I think by reproducing the problem with standalone "pandoc" command with
arguments, I think you could identify where the problem is.

If you execute the pandoc command by yourself and the problem is reproduced,
then this is a problem of "pandoc" command.

If your desired command arguments and what "ox-pandoc" passed to
"pandoc" command differ, then it may be a problem of "ox-pandoc".

In that case, please send me an ideal arguments that should be passed to
"pandoc" command from "ox-pandoc", to see if it can be fixed.

Regards,

from ox-pandoc.

sebhahn avatar sebhahn commented on July 21, 2024

The error message is

l.106 \includegraphics{file:./images/test.png}
pandoc: Could not find image file:./images/test.png', skipping...
! Package pdftex.def Error: File file:./images/test.png' not found.

but file: shouldn't be part of the path, guess it's coming from org-mode?

the image has been included with [[.//images/test.png]]

I'm I doing some wrong?

from ox-pandoc.

kawabata avatar kawabata commented on July 21, 2024

I think that this part is not related to ox-pandoc.
As I've test with simple file, I got the output of "\includegraphics{./test.png}" instead of
"\includegraphics{file:./test.png}" where the original text is "[[./test.png]]".

Could you check the version of pandoc you are using?
I'm currently using 1.13.2.

from ox-pandoc.

sebhahn avatar sebhahn commented on July 21, 2024

pandoc 1.15.1.1
org-mode 8.3.1

from ox-pandoc.

kawabata avatar kawabata commented on July 21, 2024

I've updated to 1.15. When I convert the following text to latex format
with `org-pandoc-export-to-latex',

#+TITLE: test
* head
this is [[img.png]] test.

then the output is as follows:

\begin{document}
\maketitle

\section{head}\label{head}

this is \includegraphics{img.png} test.

\end{document}

I still don't quite understand why "file:' is inserted.
Could you try following command to see if it occurs without ox-pandoc?

pandoc -f org -t latex -o ~/test.tex --parse-raw --standalone ~/test.org

from ox-pandoc.

sebhahn avatar sebhahn commented on July 21, 2024

Suddenly it works and I don't know why...

Is it possible to add a caption to an image?

from ox-pandoc.

kawabata avatar kawabata commented on July 21, 2024

something like this?

http://orgmode.org/manual/Images-and-tables.html

from ox-pandoc.

sebhahn avatar sebhahn commented on July 21, 2024

Ok, I had #+CAPTION: after the image, which didn't work.

How is it possible to cite the image: [@fig:name] doesn't seem to do the trick?

from ox-pandoc.

kawabata avatar kawabata commented on July 21, 2024

It seems your problem concerns with the contents of org document,
and that the problem is about "pandoc", but not "ox-pandoc".
`ox-pandoc' is merely a wrapper of "pandoc" software, and it does not
interfere with the contents (unless you specify preprocessor), including
bibliographic citations.

Could you check to see if
you couldn't reproduce the problem with plain "pandoc" command?

e.g.

pandoc -f org -t latex -o ~/test.tex --parse-raw --standalone ~/test.org

Regards,

from ox-pandoc.

sebhahn avatar sebhahn commented on July 21, 2024

Using the plain "pandoc" command I've found that

#+CAPTION: insert figure caption here
#+NAME: fig:1
#+LABEL: fig:1
[[img.png]]

does create

\begin{figure}[htbp]
\centering
\includegraphics{img.png}
\caption{insert figure caption here}
\end{figure}

and the reference [@fig:1] gets correctly translated to fig.~\ref{fig:1} (using pandoc-citeproc), but it doesn't work because \label{fig:1} is missing in the Latex output? Where is the problem org-mode or pandoc?

edit: exporting with standard org-mode export to latex gives:

\caption{\label{fig:orgparagraph1} insert figure caption here}

still not the right label, but at least it is in the latex code

from ox-pandoc.

sebhahn avatar sebhahn commented on July 21, 2024

coming back to the real issue, which is solved now, I know where it comes from.

by adding ./ to e.g. [[./path/img.png]] this will be translated to \includegraphics{fig:./path/img.png}', whereas just using[[path/img.png]]is fine and leads to\includegraphics{path/img.png}`.

this kind of reference [[./path/img.png]] is however needed for the latex org-exporter

I think this issue can be closed.

from ox-pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.