emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org can't export inline image link to PDF
@ 2019-02-20  4:03 stardiviner
  2019-02-20  7:25 ` stardiviner
  0 siblings, 1 reply; 10+ messages in thread
From: stardiviner @ 2019-02-20  4:03 UTC (permalink / raw)
  To: Org Mode


I have an inline image link like this in Org file:

```org
#+ATTR_ORG: :width 300
#+ATTR_LATEX: :width 3.0in
#+ATTR_HTML: :width 300px
[[file:data/images/me_picture%2023.jpg]]
```

When I export to PDF file, others work fine, but just no image, no link
at the inline image link position. Just blank.

Do I need some extra settings to make it work?

-- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Org can't export inline image link to PDF
  2019-02-20  4:03 Org can't export inline image link to PDF stardiviner
@ 2019-02-20  7:25 ` stardiviner
  2019-02-20 14:32   ` Nicolas Goaziou
  0 siblings, 1 reply; 10+ messages in thread
From: stardiviner @ 2019-02-20  7:25 UTC (permalink / raw)
  To: Org Mode


Now I figured out, because the filename contains a space, which Org auto
converted to `%20' when exit org-insert-link. That's why can't see the
inline image in exported PDF file. After I renamed image filename with
replace space with underline "_". Problem solved.

But, if possible, I still hope Org can fix this problem.

stardiviner <numbchild@gmail.com> writes:

> I have an inline image link like this in Org file:
>
> ```org
> #+ATTR_ORG: :width 300
> #+ATTR_LATEX: :width 3.0in
> #+ATTR_HTML: :width 300px
> [[file:data/images/me_picture%2023.jpg]]
> ```
>
> When I export to PDF file, others work fine, but just no image, no link
> at the inline image link position. Just blank.
>
> Do I need some extra settings to make it work?


-- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Org can't export inline image link to PDF
  2019-02-20  7:25 ` stardiviner
@ 2019-02-20 14:32   ` Nicolas Goaziou
  2019-02-20 15:44     ` stardiviner
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Goaziou @ 2019-02-20 14:32 UTC (permalink / raw)
  To: stardiviner; +Cc: Org Mode

Hello,

stardiviner <numbchild@gmail.com> writes:

> Now I figured out, because the filename contains a space, which Org auto
> converted to `%20' when exit org-insert-link. That's why can't see the
> inline image in exported PDF file. After I renamed image filename with
> replace space with underline "_". Problem solved.
>
> But, if possible, I still hope Org can fix this problem.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Org can't export inline image link to PDF
  2019-02-20 14:32   ` Nicolas Goaziou
@ 2019-02-20 15:44     ` stardiviner
  2019-02-21 14:41       ` Nicolas Goaziou
  0 siblings, 1 reply; 10+ messages in thread
From: stardiviner @ 2019-02-20 15:44 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]


Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> stardiviner <numbchild@gmail.com> writes:
>
>> Now I figured out, because the filename contains a space, which Org auto
>> converted to `%20' when exit org-insert-link. That's why can't see the
>> inline image in exported PDF file. After I renamed image filename with
>> replace space with underline "_". Problem solved.
>>
>> But, if possible, I still hope Org can fix this problem.
>
> Fixed. Thank you.
>
> Regards,

Hi, Nicolas, as always, thanks for quick fix. Still a minor issue.

Here is the screenshot in attachment, you can see the characters 23.bb
left side of the inline image.

The original Org inline image format is:

```org
#+ATTR_ORG: :width 200
#+ATTR_LATEX: :width 2.0in
#+ATTR_HTML: :id avatar :width 200px :alt 那时23岁的我
[[file:data/images/me_picture%2023.jpg]]
```


[-- Attachment #2: ox-latex inline image minor issue.png --]
[-- Type: image/png, Size: 99260 bytes --]

[-- Attachment #3: Type: text/plain, Size: 255 bytes --]



-- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Org can't export inline image link to PDF
  2019-02-20 15:44     ` stardiviner
@ 2019-02-21 14:41       ` Nicolas Goaziou
  2019-02-22  9:16         ` stardiviner
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Goaziou @ 2019-02-21 14:41 UTC (permalink / raw)
  To: stardiviner; +Cc: Org Mode

Hello,

stardiviner <numbchild@gmail.com> writes:

> Here is the screenshot in attachment, you can see the characters 23.bb
> left side of the inline image.
>
> The original Org inline image format is:
>
> ```org
> #+ATTR_ORG: :width 200
> #+ATTR_LATEX: :width 2.0in
> #+ATTR_HTML: :id avatar :width 200px :alt 那时23岁的我
> [[file:data/images/me_picture%2023.jpg]]

Would it be an issue with LaTeX? Does "23.bb" appear anywhere in the
LaTeX code generated by Org?

Maybe LaTeX experts could chime in.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Org can't export inline image link to PDF
  2019-02-21 14:41       ` Nicolas Goaziou
@ 2019-02-22  9:16         ` stardiviner
  2019-02-23  1:56           ` Vladimir Lomov
  0 siblings, 1 reply; 10+ messages in thread
From: stardiviner @ 2019-02-22  9:16 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode


Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> stardiviner <numbchild@gmail.com> writes:
>
>> Here is the screenshot in attachment, you can see the characters 23.bb
>> left side of the inline image.
>>
>> The original Org inline image format is:
>>
>> ```org
>> #+ATTR_ORG: :width 200
>> #+ATTR_LATEX: :width 2.0in
>> #+ATTR_HTML: :id avatar :width 200px :alt 那时23岁的我
>> [[file:data/images/me_picture%2023.jpg]]
>
> Would it be an issue with LaTeX? Does "23.bb" appear anywhere in the
> LaTeX code generated by Org?
>
> Maybe LaTeX experts could chime in.

I checked the =Resume.tex= file. The raw latex is this:

#+begin_src latex
\begin{center}
\includegraphics[width=2.0in]{data/images/me_picture 23.jpg}
\end{center}
#+end_src

No "23.bb", I search over the whole TeX file, nothing found. But the
compiled PDF file still have "23.bb".

>
> Regards,


--
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Org can't export inline image link to PDF
  2019-02-22  9:16         ` stardiviner
@ 2019-02-23  1:56           ` Vladimir Lomov
  2019-02-23 10:19             ` stardiviner
  0 siblings, 1 reply; 10+ messages in thread
From: Vladimir Lomov @ 2019-02-23  1:56 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1930 bytes --]

Hello,
** stardiviner [2019-02-22 17:16:41 +0800]:

> 
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> 
>> Hello,
>>
>> stardiviner <numbchild@gmail.com> writes:
>>
>>> Here is the screenshot in attachment, you can see the characters 23.bb
>>> left side of the inline image.
>>>
>>> The original Org inline image format is:
>>>
>>> ```org
>>> #+ATTR_ORG: :width 200
>>> #+ATTR_LATEX: :width 2.0in
>>> #+ATTR_HTML: :id avatar :width 200px :alt 那时23岁的我
>>> [[file:data/images/me_picture%2023.jpg]]
>>
>> Would it be an issue with LaTeX? Does "23.bb" appear anywhere in the
>> LaTeX code generated by Org?
>>
>> Maybe LaTeX experts could chime in.
> 
> I checked the =Resume.tex= file. The raw latex is this:
> 
> #+begin_src latex
> \begin{center}
> \includegraphics[width=2.0in]{data/images/me_picture 23.jpg}
> \end{center}
> #+end_src
> 
> No "23.bb", I search over the whole TeX file, nothing found. But the
> compiled PDF file still have "23.bb".

May be you find what '.bb' file is if you look into the 'graphics'
package documentation (assuming that you use TeX Live run 'texdoc
graphicx', in my local copy on page 13 there is example of .bb file,
search the document for .ps.bb).

As for spaces in file name, if you cannot avoid them use 'grffile'
package with 'graphicx' package.

>>
>> Regards,
> 
> 
> --
> [ stardiviner ]
>        I try to make every word tell the meaning what I want to express.
> 
>        Blog: https://stardiviner.github.io/
>        IRC(freenode): stardiviner, Matrix: stardiviner
>        GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
> 

P.S. The question how the .bb file comes on scene completely related how
LaTeX works with graphic file. Look into documentation or ask question
on TeX.SO or on texhax mailing list.

---
WBR, Vladimir Lomov

-- 
Will this never-ending series of PLEASURABLE EVENTS never cease?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Org can't export inline image link to PDF
  2019-02-23  1:56           ` Vladimir Lomov
@ 2019-02-23 10:19             ` stardiviner
  2019-02-25 13:38               ` Vladimir Lomov
  0 siblings, 1 reply; 10+ messages in thread
From: stardiviner @ 2019-02-23 10:19 UTC (permalink / raw)
  To: emacs-orgmode


Vladimir Lomov <lomov.vl@yandex.ru> writes:

> Hello,
> ** stardiviner [2019-02-22 17:16:41 +0800]:
>
>> 
>> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>> 
>>> Hello,
>>>
>>> stardiviner <numbchild@gmail.com> writes:
>>>
>>>> Here is the screenshot in attachment, you can see the characters 23.bb
>>>> left side of the inline image.
>>>>
>>>> The original Org inline image format is:
>>>>
>>>> ```org
>>>> #+ATTR_ORG: :width 200
>>>> #+ATTR_LATEX: :width 2.0in
>>>> #+ATTR_HTML: :id avatar :width 200px :alt 那时23岁的我
>>>> [[file:data/images/me_picture%2023.jpg]]
>>>
>>> Would it be an issue with LaTeX? Does "23.bb" appear anywhere in the
>>> LaTeX code generated by Org?
>>>
>>> Maybe LaTeX experts could chime in.
>> 
>> I checked the =Resume.tex= file. The raw latex is this:
>> 
>> #+begin_src latex
>> \begin{center}
>> \includegraphics[width=2.0in]{data/images/me_picture 23.jpg}
>> \end{center}
>> #+end_src
>> 
>> No "23.bb", I search over the whole TeX file, nothing found. But the
>> compiled PDF file still have "23.bb".
>
> May be you find what '.bb' file is if you look into the 'graphics'
> package documentation (assuming that you use TeX Live run 'texdoc
> graphicx', in my local copy on page 13 there is example of .bb file,
> search the document for .ps.bb).
>
> As for spaces in file name, if you cannot avoid them use 'grffile'
> package with 'graphicx' package.

I have not found '.bb' files. Neither '.ps.bb' files. I checked out variable
~org-latex-packages-alist~, it have 'grffile' and 'graphicx' packages.

>
>>>
>>> Regards,
>> 
>> 
>> --
>> [ stardiviner ]
>>        I try to make every word tell the meaning what I want to express.
>> 
>>        Blog: https://stardiviner.github.io/
>>        IRC(freenode): stardiviner, Matrix: stardiviner
>>        GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>> 
>
> P.S. The question how the .bb file comes on scene completely related how
> LaTeX works with graphic file. Look into documentation or ask question
> on TeX.SO or on texhax mailing list.
>
> ---
> WBR, Vladimir Lomov


-- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Org can't export inline image link to PDF
  2019-02-23 10:19             ` stardiviner
@ 2019-02-25 13:38               ` Vladimir Lomov
  2019-02-26  4:35                 ` stardiviner
  0 siblings, 1 reply; 10+ messages in thread
From: Vladimir Lomov @ 2019-02-25 13:38 UTC (permalink / raw)
  To: stardiviner; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2662 bytes --]

Hello,

** stardiviner [2019-02-23 18:19:05 +0800]:

[...]

>>> I checked the =Resume.tex= file. The raw latex is this:
>>> 
>>> #+begin_src latex
>>> \begin{center}
>>> \includegraphics[width=2.0in]{data/images/me_picture 23.jpg}
>>> \end{center}
>>> #+end_src
>>> 
>>> No "23.bb", I search over the whole TeX file, nothing found. But the
>>> compiled PDF file still have "23.bb".
>>
>> May be you find what '.bb' file is if you look into the 'graphics'
>> package documentation (assuming that you use TeX Live run 'texdoc
>> graphicx', in my local copy on page 13 there is example of .bb file,
>> search the document for .ps.bb).
>>
>> As for spaces in file name, if you cannot avoid them use 'grffile'
>> package with 'graphicx' package.
>
> I have not found '.bb' files. Neither '.ps.bb' files. I checked out variable
> ~org-latex-packages-alist~, it have 'grffile' and 'graphicx' packages.

>> P.S. The question how the .bb file comes on scene completely related how
>> LaTeX works with graphic file. Look into documentation or ask question
>> on TeX.SO or on texhax mailing list.

The LaTeX cannot work directly with graphic files. In past when only
latex and dvips were existed a user was able to use only PS/EPS graphic
files. latex can work with any graphic files using graphics/graphicx
package. One of the purpose of the package is to provide to latex
information about the size of a figure (Bounding Box) what is found in
EPS file. Sometimes EPS files were gzipped but latex was unable on-fly
decompress them and extract BB information. The workaround for this
situation is to either provide bb keyword for '\includegraphics' command
or create file with extension .eps.bb which will hold necessary
information. Actual inclusion of graphic file was done by dvips program.

Nowadays almost everyone uses pdflatex/xelatex/luatex engines. They use
graphic files in format PDF (native), PNG, JPEG. In most situations the
engine could determine the size of a figure but when it fails it will
include the figure with wrong size.

The problem that you faced is a bit another, while it is looked as being
related to missing BB (bounding box): the latex engine don't like the
space in file name. pdflatex engine being run in special mode don't stop
on missing file but show you information about missing .bb file. A
workaround to use graphic files with spaces in file name is to use
package 'grffile'. Note, however, this workaround is only for graphic
files and don't work to input other LaTeX files with spaces in they
filenames into current one.

---
WBR, Vladimir Lomov

-- 
Sales tax applies.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Org can't export inline image link to PDF
  2019-02-25 13:38               ` Vladimir Lomov
@ 2019-02-26  4:35                 ` stardiviner
  0 siblings, 0 replies; 10+ messages in thread
From: stardiviner @ 2019-02-26  4:35 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: emacs-orgmode


Vladimir Lomov <v.p.lomov@yandex.ru> writes:

> Hello,
>
> ** stardiviner [2019-02-23 18:19:05 +0800]:
>
> [...]
>
>>>> I checked the =Resume.tex= file. The raw latex is this:
>>>> 
>>>> #+begin_src latex
>>>> \begin{center}
>>>> \includegraphics[width=2.0in]{data/images/me_picture 23.jpg}
>>>> \end{center}
>>>> #+end_src
>>>> 
>>>> No "23.bb", I search over the whole TeX file, nothing found. But the
>>>> compiled PDF file still have "23.bb".
>>>
>>> May be you find what '.bb' file is if you look into the 'graphics'
>>> package documentation (assuming that you use TeX Live run 'texdoc
>>> graphicx', in my local copy on page 13 there is example of .bb file,
>>> search the document for .ps.bb).
>>>
>>> As for spaces in file name, if you cannot avoid them use 'grffile'
>>> package with 'graphicx' package.
>>
>> I have not found '.bb' files. Neither '.ps.bb' files. I checked out variable
>> ~org-latex-packages-alist~, it have 'grffile' and 'graphicx' packages.
>
>>> P.S. The question how the .bb file comes on scene completely related how
>>> LaTeX works with graphic file. Look into documentation or ask question
>>> on TeX.SO or on texhax mailing list.
>
> The LaTeX cannot work directly with graphic files. In past when only
> latex and dvips were existed a user was able to use only PS/EPS graphic
> files. latex can work with any graphic files using graphics/graphicx
> package. One of the purpose of the package is to provide to latex
> information about the size of a figure (Bounding Box) what is found in
> EPS file. Sometimes EPS files were gzipped but latex was unable on-fly
> decompress them and extract BB information. The workaround for this
> situation is to either provide bb keyword for '\includegraphics' command
> or create file with extension .eps.bb which will hold necessary
> information. Actual inclusion of graphic file was done by dvips program.
>
> Nowadays almost everyone uses pdflatex/xelatex/luatex engines. They use
> graphic files in format PDF (native), PNG, JPEG. In most situations the
> engine could determine the size of a figure but when it fails it will
> include the figure with wrong size.
>
> The problem that you faced is a bit another, while it is looked as being
> related to missing BB (bounding box): the latex engine don't like the
> space in file name. pdflatex engine being run in special mode don't stop
> on missing file but show you information about missing .bb file. A
> workaround to use graphic files with spaces in file name is to use
> package 'grffile'. Note, however, this workaround is only for graphic
> files and don't work to input other LaTeX files with spaces in they
> filenames into current one.

I see, thanks for explanation, now I understand why. using 'grffile' did fixed
this problem.

>
> ---
> WBR, Vladimir Lomov


-- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-02-26  4:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20  4:03 Org can't export inline image link to PDF stardiviner
2019-02-20  7:25 ` stardiviner
2019-02-20 14:32   ` Nicolas Goaziou
2019-02-20 15:44     ` stardiviner
2019-02-21 14:41       ` Nicolas Goaziou
2019-02-22  9:16         ` stardiviner
2019-02-23  1:56           ` Vladimir Lomov
2019-02-23 10:19             ` stardiviner
2019-02-25 13:38               ` Vladimir Lomov
2019-02-26  4:35                 ` stardiviner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).