emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: Texinfo export: Inline images are NOT rendered in INFO viewer [


From: Ihor Radchenko
Subject: Re: Bug: Texinfo export: Inline images are NOT rendered in INFO viewer [9.4.5 (release_9.4.5-354-g40b70c @ /home/rameshnedunchezian/src/org-mode/lisp/)]
Date: Wed, 19 Oct 2022 02:14:38 +0000

Ramesh Nedunchezian <rameshnedunchezian@outlook.com> writes:

> Bug: Texinfo export: Inline images are NOT rendered in INFO viewer
> [9.4.5 (release_9.4.5-354-g40b70c @ 
> /home/rameshnedunchezian/src/org-mode/lisp/)]
>
>
> 1. Unzip the attached zip file.
> 2. C-x C-f doc/helm.org.  Note that it has inline image.
> 3. C-u C-h i doc/helm.info and rename the buffer. Note that it doesn't
>    display the inline image.
> 4. C-u C-h i doc/helm-1.info and rename the buffer.  Note that it DOES
>    display the inline image.
>
> See the attached screenshot for what the above steps looks like.
>
> (3) above is a bug.  (4) above is after applying the remedy.
>
> You can do a
>
>     ./helm.sh
>
> to recreate the above texi files.  This file also has additional
> observations.
>
> TLDR: The presence of leading "./" in texi file's `@image ...'
> creates the problem.

Sorry for the late reply.
I am unable to reproduce on the latest main.

Re: observations.

## Observation 1: according to
##
##     (info "(texinfo) Image Syntax")
##
## Here is the synopsis of the '@image' command:
##      @image{FILENAME[, WIDTH[, HEIGHT[, ALTTEXT[, EXTENSION]]]]}
##
## For Info and HTML output, 'makeinfo' uses the optional fifth
## argument EXTENSION to '@image' for the filename extension, if it is
## specified and the file is found.  Any leading period should be
## included in EXTENSION.  For example:
##
##      @image{foo,,,,.xpm}
##
##
## So, just to be on the safe side, it would be a good idea to add a dot to
## the image extension.

According to 9.2.1 Image Syntax,

       In Info output, 'makeinfo' writes a reference to the binary image
    file (trying FILENAME suffixed with 'EXTENSION', '.EXTENSION', '.png',
    or '.jpg', in that order) if one exists.  It also literally includes the
    '.txt' file if one exists.  This way, Info readers which can display
    images (such as the Emacs Info browser, running under X) can do so,
    whereas Info readers which can only use text (such as the standalone
    Info reader) can display the textual version.

Dot is unnecessary.

## Observation 2: Why is the caption getting stripped in the output file?

Because texinfo captions cannot have verbatim inside unless you also
provide shortcaption. This is a limitation of texinfo. Not Org.
If you have any ideas how to better deal with these limitations, please
share them.

## Observaion 3: Anyway to take care of the warnings that texi2html
## generates.  Can the CAPTION text be used as an alt text, when there
## is no alt text?

I see no warnings on my side running ./helm.sh

For alt text, won't doing so duplicate the caption and text displayed in
place of the figure?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]