Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including graphics when converting from tex to docx #2572

Closed
petobens opened this issue Dec 3, 2015 · 1 comment
Closed

Including graphics when converting from tex to docx #2572

petobens opened this issue Dec 3, 2015 · 1 comment

Comments

@petobens
Copy link

petobens commented Dec 3, 2015

I have three questions regarding converting .tex files with images to .docx files:

Consider the following foo.tex file:

\documentclass{article}
\usepackage{graphicx}
\graphicspath{{figures/}{tables/}}
\usepackage{floatrow}
\begin{document}
\begin{figure}[!htb]
  \includegraphics[scale=1]{foo.png}
  \caption{Foo plot}
\end{figure}
\end{document}

where figures/foo.png is just a black square (and figures/ is a subdirectory inside the directory where foo.tex lives). This produces the following pdf:
image

i)

If I run pandoc -s foo.tex -o foo.docx I get the following error:

pandoc: Could not find image 'foo.png', skipping ...

Apparently pandoc cannot parse the \graphicspath command from the graphicx package. Is it possible to add support for this?

ii) Assume now that pandoc actually finds the foo.png file. The floatrow package (among other things) centers floats automatically. However, when the foo.tex is converted the figure in the .docx file is not centered:

fooasdas

iii) Finally: is it possible to include pdf figure files? I guess not (according to #2381 and #2350).

Thanks in advance for your help and sorry for asking too many questions.

@jgm
Copy link
Owner

jgm commented Dec 8, 2016

Closing in favor of #736 re graphicspath.

We should be able to handle this more smoothly after architectural changes for pandoc 2.0 (current typeclass branch).

@jgm jgm closed this as completed Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants