From: Joe Corneli via "Emacs development discussions." <emacs-devel@gnu.org>
To: emacs-devel@gnu.org
Subject: SVG with embedded png
Date: Tue, 18 May 2021 11:45:08 +0100 [thread overview]
Message-ID: <87pmxomibv.fsf@Proteus> (raw)
[-- Attachment #1: Type: text/plain, Size: 2239 bytes --]
Hello, the attached SVG file was made with M-x org-latex-preview. It
includes an embedded PNG file.
The source is this LaTeX-in-Org oneliner, together with the PNG.
$$\mathit{Hello} \includegraphics[width=2cm,natwidth=445,natheight=661]{/home/joe/tools_for_thought/Tft1st.png}$$
The generated SVG image displays correctly in Mozilla Firefox 88.0.1.
However, inside Of Emacs 28.0.50 (2021-05-05, 31f64d), the image
displays, but I don’t see the embedded png file. The PNG displays fine
in Emacs via M-x find-file.
Relevant config settigs:
(setq org-preview-latex-default-process 'dvisvgm)
(setq org-preview-latex-process-alist
'((dvipng :programs
("latex" "dvipng")
:description "dvi > png" :message "you need to install the programs: latex and dvipng." :image-input-type "dvi" :image-output-type "png" :image-size-adjust
(1.0 . 1.0)
:latex-compiler
("latex -interaction nonstopmode -output-directory %o %f")
:image-converter
("dvipng -D %D -T tight -o %O %f"))
(dvisvgm :programs
("latex" "/usr/local/texlive/2021/bin/x86_64-linux/dvisvgm")
:description "dvi > svg"
:message "you need to install the programs: latex and dvisvgm."
:image-input-type "dvi" :image-output-type "svg"
:image-size-adjust (1.7 . .1)
:latex-compiler
("latex -interaction nonstopmode -output-directory %o %f")
:image-converter
("/usr/local/texlive/2021/bin/x86_64-linux/dvisvgm %f -n -e -c %S -o %O"))
(imagemagick :programs
("latex" "convert")
:description "pdf > png" :message "you need to install the programs: latex and imagemagick." :image-input-type "pdf" :image-output-type "png" :image-size-adjust
(1.0 . 1.0)
:latex-compiler
("pdflatex -interaction nonstopmode -output-directory %o %f")
:image-converter
("convert -density %D -trim -antialias %f -quality 100 %O"))))
[-- Attachment #2: Tft.svg --]
[-- Type: image/svg+xml, Size: 5222 bytes --]
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.11.1 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='186.305243pt' height='196.266296pt' viewBox='452.293796 43.074989 186.305243 196.266296'>
<defs>
<path id='g0-72' d='M7.402242-6.097136C7.481943-6.41594 7.561644-6.495641 8.18929-6.495641C8.398506-6.495641 8.488169-6.495641 8.488169-6.674969C8.488169-6.784558 8.418431-6.804483 8.348692-6.804483C7.970112-6.804483 7.561644-6.774595 7.173101-6.774595C6.774595-6.774595 6.366127-6.804483 5.977584-6.804483C5.917808-6.804483 5.788294-6.804483 5.788294-6.615193C5.788294-6.495641 5.867995-6.495641 6.057285-6.495641C6.366127-6.495641 6.635118-6.495641 6.635118-6.326276C6.635118-6.296389 6.635118-6.276463 6.595268-6.136986L5.987547-3.696139H3.257783L3.855542-6.097136C3.935243-6.41594 4.014944-6.495641 4.64259-6.495641C4.851806-6.495641 4.941469-6.495641 4.941469-6.674969C4.941469-6.784558 4.871731-6.804483 4.801993-6.804483C4.423412-6.804483 4.014944-6.774595 3.626401-6.774595C3.227895-6.774595 2.819427-6.804483 2.430884-6.804483C2.371108-6.804483 2.241594-6.804483 2.241594-6.615193C2.241594-6.495641 2.321295-6.495641 2.510585-6.495641C2.819427-6.495641 3.088418-6.495641 3.088418-6.326276C3.088418-6.296389 3.088418-6.276463 3.048568-6.136986L1.703611-.727273C1.62391-.388543 1.564134-.308842 .886675-.308842C.727273-.308842 .617684-.308842 .617684-.119552C.617684 0 .727273 0 .757161 0C1.135741 0 1.544209-.029888 1.932752-.029888C2.331258-.029888 2.739726 0 3.128269 0C3.198007 0 3.317559 0 3.317559-.179328C3.317559-.308842 3.247821-.308842 3.048568-.308842C2.470735-.308842 2.470735-.388543 2.470735-.478207C2.470735-.518057 2.470735-.537983 2.510585-.67746L3.178082-3.387298H5.907846L5.250311-.727273C5.17061-.388543 5.110834-.308842 4.433375-.308842C4.273973-.308842 4.164384-.308842 4.164384-.119552C4.164384 0 4.273973 0 4.303861 0C4.682441 0 5.090909-.029888 5.479452-.029888C5.877958-.029888 6.286426 0 6.674969 0C6.744707 0 6.864259 0 6.864259-.179328C6.864259-.308842 6.794521-.308842 6.595268-.308842C6.017435-.308842 6.017435-.388543 6.017435-.478207C6.017435-.488169 6.017435-.557908 6.057285-.707347L7.402242-6.097136Z'/>
<path id='g0-101' d='M2.381071-2.30137C2.67995-2.30137 3.347447-2.331258 3.825654-2.520548C4.612702-2.839352 4.612702-3.486924 4.612702-3.556663C4.612702-4.014944 4.244085-4.403487 3.606476-4.403487C2.560399-4.403487 1.135741-3.39726 1.135741-1.633873C1.135741-.737235 1.613948 .109589 2.560399 .109589C3.835616 .109589 4.662516-.886675 4.662516-1.036115C4.662516-1.085928 4.582814-1.195517 4.503113-1.195517C4.463263-1.195517 4.4533-1.185554 4.373599-1.085928C3.636364-.14944 2.749689-.109589 2.580324-.109589C1.932752-.109589 1.823163-.816936 1.823163-1.205479C1.823163-1.58406 1.92279-2.032379 1.992528-2.30137H2.381071ZM2.052304-2.520548C2.480697-4.154421 3.506849-4.184309 3.606476-4.184309C4.004981-4.184309 4.234122-3.915318 4.234122-3.576588C4.234122-2.520548 2.590286-2.520548 2.261519-2.520548H2.052304Z'/>
<path id='g0-108' d='M3.01868-6.665006C3.028643-6.694894 3.048568-6.774595 3.048568-6.794521C3.048568-6.884184 2.988792-6.914072 2.909091-6.914072C2.879203-6.914072 2.779577-6.90411 2.749689-6.894147L1.763387-6.814446C1.643836-6.804483 1.534247-6.794521 1.534247-6.60523C1.534247-6.495641 1.633873-6.495641 1.77335-6.495641C2.251557-6.495641 2.271482-6.425903 2.271482-6.326276C2.271482-6.296389 2.241594-6.166874 2.241594-6.156912L.996264-1.175592C.986301-1.135741 .936488-.936488 .936488-.787049C.936488-.259029 1.295143 .109589 1.77335 .109589C2.15193 .109589 2.351183-.159402 2.480697-.408468C2.650062-.757161 2.789539-1.39477 2.789539-1.424658C2.789539-1.524284 2.709838-1.524284 2.6401-1.524284C2.590286-1.524284 2.530511-1.524284 2.500623-1.474471L2.430884-1.225405C2.261519-.52802 2.072229-.109589 1.793275-.109589C1.534247-.109589 1.534247-.37858 1.534247-.518057C1.534247-.587796 1.534247-.737235 1.594022-.976339L3.01868-6.665006Z'/>
<path id='g0-111' d='M5.070984-2.769614C5.070984-3.716065 4.483188-4.403487 3.616438-4.403487C2.381071-4.403487 1.09589-2.988792 1.09589-1.534247C1.09589-.508095 1.723537 .109589 2.550436 .109589C3.785803 .109589 5.070984-1.305106 5.070984-2.769614ZM2.550436-.109589C2.161893-.109589 1.793275-.418431 1.793275-1.135741C1.793275-1.633873 2.052304-2.739726 2.371108-3.277709C2.739726-3.88543 3.217933-4.184309 3.606476-4.184309C4.094645-4.184309 4.373599-3.745953 4.373599-3.158157C4.373599-2.729763 4.154421-1.703611 3.835616-1.105853C3.5467-.557908 3.038605-.109589 2.550436-.109589Z'/>
</defs>
<g id='page1' transform='matrix(2.331429 0 0 2.331429 0 0)'>
<rect x='193.998564' y='18.475792' width='79.910337' height='84.182847' fill='#0d0e14'/>
<g fill='#dcdccc'>
<use x='193.998564' y='102.54905' xlink:href='#g0-72'/>
<use x='201.404084' y='102.54905' xlink:href='#g0-101'/>
<use x='205.98687' y='102.54905' xlink:href='#g0-108'/>
<use x='209.042064' y='102.54905' xlink:href='#g0-108'/>
<use x='211.588058' y='102.54905' xlink:href='#g0-111'/>
</g>
<image x='0' y='0' width='445' height='661' xlink:href='/home/joe/tools_for_thought/Tft1st.png' transform='matrix(.127191 0 0 .127191 217.308901 18.475792)'/>
</g>
</svg>
[-- Attachment #3: Tft1st.png --]
[-- Type: image/png, Size: 391204 bytes --]
[-- Attachment #4: Type: text/plain, Size: 280 bytes --]
--
Dr Joseph A. Corneli (https://github.com/holtzermann17)
HYPERREAL ENTERPRISES LTD is a private company limited by shares, incorporated
25th, June 2019 as Company Number 634284 on the Register of Companies for
Scotland (https://beta.companieshouse.gov.uk/company/SC634284).
next reply other threads:[~2021-05-18 10:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 10:45 Joe Corneli via Emacs development discussions. [this message]
2021-05-18 12:25 ` SVG with embedded png Eli Zaretskii
2021-05-18 12:50 ` tomas
2021-05-18 12:54 ` Basil L. Contovounesios
2021-05-18 12:40 ` Joost Kremers
2021-05-18 14:24 ` Joe Corneli via Emacs development discussions.
2021-05-18 18:05 ` Alan Third
2021-05-18 18:09 ` Alan Third
2021-05-19 12:57 ` Joe Corneli via Emacs development discussions.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmxomibv.fsf@Proteus \
--to=emacs-devel@gnu.org \
--cc=joseph.corneli.em@hyperreal.enterprises \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).