* html-export - limit size of pic to page-size?
@ 2013-02-03 2:41 Thorsten Jolitz
2013-02-03 5:44 ` Eric S Fraga
2013-02-03 12:20 ` Dieter Wilhelm
0 siblings, 2 replies; 8+ messages in thread
From: Thorsten Jolitz @ 2013-02-03 2:41 UTC (permalink / raw)
To: emacs-orgmode
Hi List,
when exporting plantuml code blocks to .png files, the resulting
pictures can be tiny or really huge, depending on the class hierarchy
modeled.
Is it possible to restrict the size of the graphic to the html
page-size, no matter how big the resulting .png file actually is?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: html-export - limit size of pic to page-size?
2013-02-03 2:41 html-export - limit size of pic to page-size? Thorsten Jolitz
@ 2013-02-03 5:44 ` Eric S Fraga
2013-02-03 9:25 ` Thorsten Jolitz
2013-02-03 12:20 ` Dieter Wilhelm
1 sibling, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2013-02-03 5:44 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
Thorsten Jolitz <tjolitz@googlemail.com> writes:
> Hi List,
>
> when exporting plantuml code blocks to .png files, the resulting
> pictures can be tiny or really huge, depending on the class hierarchy
> modeled.
>
> Is it possible to restrict the size of the graphic to the html
> page-size, no matter how big the resulting .png file actually is?
Have you looked at the section in the manual on exporting to HTML,
specifically the section entitled "Images in HTML export"? You can
specify whatever HTML attributes you want for the image.
By the way, I am not sure what you mean by "html page-size" as HTML has
no concept of pages, per se. Maybe you mean the width?
HTH,
eric
--
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-898-g005917
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: html-export - limit size of pic to page-size?
2013-02-03 5:44 ` Eric S Fraga
@ 2013-02-03 9:25 ` Thorsten Jolitz
0 siblings, 0 replies; 8+ messages in thread
From: Thorsten Jolitz @ 2013-02-03 9:25 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Thorsten Jolitz <tjolitz@googlemail.com> writes:
> Have you looked at the section in the manual on exporting to HTML,
> specifically the section entitled "Images in HTML export"? You can
> specify whatever HTML attributes you want for the image.
OK, thanks for the hint.
> By the way, I am not sure what you mean by "html page-size" as HTML has
> no concept of pages, per se. Maybe you mean the width?
Yes, 'width' is what I meant by 'page-size'.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: html-export - limit size of pic to page-size?
2013-02-03 2:41 html-export - limit size of pic to page-size? Thorsten Jolitz
2013-02-03 5:44 ` Eric S Fraga
@ 2013-02-03 12:20 ` Dieter Wilhelm
2013-02-03 14:41 ` Thorsten Jolitz
1 sibling, 1 reply; 8+ messages in thread
From: Dieter Wilhelm @ 2013-02-03 12:20 UTC (permalink / raw)
To: emacs-orgmode
Thorsten Jolitz <tjolitz@googlemail.com> writes:
> Hi List,
>
> when exporting plantuml code blocks to .png files, the resulting
> pictures can be tiny or really huge, depending on the class hierarchy
> modeled.
>
> Is it possible to restrict the size of the graphic to the html
> page-size, no matter how big the resulting .png file actually is?
For example
#+ATTR_HTML: width="600"
--
Best wishes
H. Dieter Wilhelm
Darmstadt
Germany
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: html-export - limit size of pic to page-size?
2013-02-03 12:20 ` Dieter Wilhelm
@ 2013-02-03 14:41 ` Thorsten Jolitz
2013-02-03 15:42 ` Dieter Wilhelm
2013-02-03 22:44 ` Eric S Fraga
0 siblings, 2 replies; 8+ messages in thread
From: Thorsten Jolitz @ 2013-02-03 14:41 UTC (permalink / raw)
To: emacs-orgmode
Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:
> For example
>
> #+ATTR_HTML: width="600"
Actually my question was meant with regards to Org-babel code blocks,
e.g.
,--------------------------------------------
| +name: class-diagram
| +begin_src plantuml :file class-diagram.png
`--------------------------------------------
Is it possible to specify the html 'width=600' or 'width=auto' in the
'begin_src' line or in the subtree-properties - or do I have to let my
program write the
,------------------------
| +ATTR_HTML: width="600"
`------------------------
on top of the inserted link to 'class-diagram.png' when exporting to
html?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: html-export - limit size of pic to page-size?
2013-02-03 14:41 ` Thorsten Jolitz
@ 2013-02-03 15:42 ` Dieter Wilhelm
2013-02-03 18:16 ` Thorsten Jolitz
2013-02-03 22:44 ` Eric S Fraga
1 sibling, 1 reply; 8+ messages in thread
From: Dieter Wilhelm @ 2013-02-03 15:42 UTC (permalink / raw)
To: emacs-orgmode
Thorsten Jolitz <tjolitz@googlemail.com> writes:
> Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:
>
>> For example
>>
>> #+ATTR_HTML: width="600"
>
> Actually my question was meant with regards to Org-babel code blocks,
> e.g.
>
> ,--------------------------------------------
> | +name: class-diagram
> | +begin_src plantuml :file class-diagram.png
> `--------------------------------------------
What is plantuml? Something like gnuplot? Can't you create a png with
exactly the resolution you want?
Dieter
> Is it possible to specify the html 'width=600' or 'width=auto' in the
> 'begin_src' line or in the subtree-properties - or do I have to let my
> program write the
>
> ,------------------------
> | +ATTR_HTML: width="600"
> `------------------------
>
> on top of the inserted link to 'class-diagram.png' when exporting to
> html?
--
Best wishes
H. Dieter Wilhelm
Darmstadt
Germany
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: html-export - limit size of pic to page-size?
2013-02-03 15:42 ` Dieter Wilhelm
@ 2013-02-03 18:16 ` Thorsten Jolitz
0 siblings, 0 replies; 8+ messages in thread
From: Thorsten Jolitz @ 2013-02-03 18:16 UTC (permalink / raw)
To: emacs-orgmode
Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:
> What is plantuml? Something like gnuplot? Can't you create a png with
> exactly the resolution you want?
Nice tip, thanks, it did not come to my mind that the problem might be
much easier to solve on the plantuml (textbased software for UML diagram
creation) side than on the Org-mode side, but it is - there is a 'scale'
command for zoom-functionality in plantuml:
,-----------------
| scale 1.5
| scale 2/3
| scale 200 width
| scale 200 height
| scale 200*100
`-----------------
are examples.
Although it seems impossible to determine the right relative scale
factor without knowing the grafic size a priori, this way I can offer a
pic scaled down to absolute width=600 and a download link to the
original size png.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: html-export - limit size of pic to page-size?
2013-02-03 14:41 ` Thorsten Jolitz
2013-02-03 15:42 ` Dieter Wilhelm
@ 2013-02-03 22:44 ` Eric S Fraga
1 sibling, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2013-02-03 22:44 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 896 bytes --]
Thorsten Jolitz <tjolitz@googlemail.com> writes:
> Is it possible to specify the html 'width=600' or 'width=auto' in the
> 'begin_src' line or in the subtree-properties - or do I have to let my
> program write the
>
> ,------------------------
> | +ATTR_HTML: width="600"
> `------------------------
>
> on top of the inserted link to 'class-diagram.png' when exporting to
> html?
You can put that line immediately above the #+RESULTS line after the
first time you evaluate the source code block. Subsequent evaluations
of the source code will replace the results but will leave those lines
present. See the attached example.
This is easier, in my opinion, than having to change the code to
generate a specific size, especially if have different export targets
for the same document.
HTH,
eric
--
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org 7.9.3e-897-g787a07
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: uml.org --]
[-- Type: text/org, Size: 421 bytes --]
#+name: umltest
#+begin_src plantuml :file uml.png :exports results
skinparam monochrome true
autonumber
footbox off
actor Somebody #white
actor me #882222
Somebody -> me : ask for grant review
me -> me : spend some time thinking about this
Somebody <- me : review grant
#+end_src
#+CAPTION: UML diagram
#+LABEL: fig:uml
#+ATTR_LATEX: width=\linewidth
#+ATTR_HTML: width="600px"
#+results: umltest
[[file:uml.png]]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-02-03 22:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-03 2:41 html-export - limit size of pic to page-size? Thorsten Jolitz
2013-02-03 5:44 ` Eric S Fraga
2013-02-03 9:25 ` Thorsten Jolitz
2013-02-03 12:20 ` Dieter Wilhelm
2013-02-03 14:41 ` Thorsten Jolitz
2013-02-03 15:42 ` Dieter Wilhelm
2013-02-03 18:16 ` Thorsten Jolitz
2013-02-03 22:44 ` Eric S Fraga
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.