* Change resolution of LaTeX formulas in HTML output?
@ 2010-08-04 17:00 amscopub-mail
2010-08-04 22:32 ` Bastien
2010-08-05 19:14 ` Dan Davison
0 siblings, 2 replies; 16+ messages in thread
From: amscopub-mail @ 2010-08-04 17:00 UTC (permalink / raw)
To: emacs-orgmode
Is there a way to control the resolution of PNG LaTeX formulas when you export to HTML?
You can control the font size directly in the header but there doesn't seem to be a way to use org-mode to control the resolution...
BTW, I'm not exporting to LaTeX directly because I'm using PrinceXML to convert the HTML file to a PDF.
--Uriel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-04 17:00 amscopub-mail
@ 2010-08-04 22:32 ` Bastien
2010-08-05 19:11 ` Dan Davison
2010-08-06 10:46 ` Carsten Dominik
2010-08-05 19:14 ` Dan Davison
1 sibling, 2 replies; 16+ messages in thread
From: Bastien @ 2010-08-04 22:32 UTC (permalink / raw)
To: amscopub-mail; +Cc: emacs-orgmode
amscopub-mail@yahoo.com writes:
> Is there a way to control the resolution of PNG LaTeX formulas when
> you export to HTML?
I've implemented this.
You can define the :html-resolution in `org-format-latex-options'.
Please test and report any problem.
--
Bastien
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
@ 2010-08-05 16:06 amscopub-mail
2010-08-05 17:06 ` Nick Dokos
0 siblings, 1 reply; 16+ messages in thread
From: amscopub-mail @ 2010-08-05 16:06 UTC (permalink / raw)
To: emacs-orgmode
Thanks for the reply.
What version of org-mode is that defined in? I'm using 7.01g.
When I bring up org-format-latex-options, it doesn't define that variable in the documentation. Setting the variable doesn't seem to do anything. The PNG files are always 72 x 72 ppi.
I tried setting it to this:
:html-resolution 90
:html-resolution 300
but to no avail.
--Uriel
On Thu, 05 Aug 2010 00:32:16 +0200
Bastien <bastien.guerry@wikimedia.fr> wrote:
> amscopub-mail@yahoo.com writes:
>
> > Is there a way to control the resolution of PNG LaTeX formulas when
> > you export to HTML?
>
> I've implemented this.
>
> You can define the :html-resolution in `org-format-latex-options'.
>
> Please test and report any problem.
>
> --
> Bastien
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-05 16:06 Change resolution of LaTeX formulas in HTML output? amscopub-mail
@ 2010-08-05 17:06 ` Nick Dokos
2010-08-05 18:25 ` Bastien
0 siblings, 1 reply; 16+ messages in thread
From: Nick Dokos @ 2010-08-05 17:06 UTC (permalink / raw)
To: amscopub-mail; +Cc: nicholas.dokos, emacs-orgmode
amscopub-mail@yahoo.com wrote:
> Thanks for the reply.
>
> What version of org-mode is that defined in? I'm using 7.01g.
>
I presume it's not in any released version. You'll probably have
to pull the latest from the git repository to get it.
HTH,
Nick
> When I bring up org-format-latex-options, it doesn't define that variable in the documentation. Setting the variable doesn't seem to do anything. The PNG files are always 72 x 72 ppi.
>
> I tried setting it to this:
>
> :html-resolution 90
> :html-resolution 300
>
> but to no avail.
>
> --Uriel
>
> On Thu, 05 Aug 2010 00:32:16 +0200
> Bastien <bastien.guerry@wikimedia.fr> wrote:
>
> > amscopub-mail@yahoo.com writes:
> >
> > > Is there a way to control the resolution of PNG LaTeX formulas when
> > > you export to HTML?
> >
> > I've implemented this.
> >
> > You can define the :html-resolution in `org-format-latex-options'.
> >
> > Please test and report any problem.
> >
> > --
> > Bastien
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-05 17:06 ` Nick Dokos
@ 2010-08-05 18:25 ` Bastien
0 siblings, 0 replies; 16+ messages in thread
From: Bastien @ 2010-08-05 18:25 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode
Nick Dokos <nicholas.dokos@hp.com> writes:
> amscopub-mail@yahoo.com wrote:
>
>> Thanks for the reply.
>>
>> What version of org-mode is that defined in? I'm using 7.01g.
>>
>
> I presume it's not in any released version. You'll probably have
> to pull the latest from the git repository to get it.
Yes, indeed. Sorry not to have mentionned it.
--
Bastien
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-04 22:32 ` Bastien
@ 2010-08-05 19:11 ` Dan Davison
2010-08-06 9:12 ` Bastien
2010-08-06 10:46 ` Carsten Dominik
1 sibling, 1 reply; 16+ messages in thread
From: Dan Davison @ 2010-08-05 19:11 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
Bastien <bastien.guerry@wikimedia.fr> writes:
> amscopub-mail@yahoo.com writes:
>
>> Is there a way to control the resolution of PNG LaTeX formulas when
>> you export to HTML?
>
> I've implemented this.
>
> You can define the :html-resolution in `org-format-latex-options'.
>
> Please test and report any problem.
Bastien --
Am I right in understanding that if we increase html-resolution the
resulting images will come out larger in a web browser; i.e that there
is no way to maintain the images the same size while making them appear
"sharper" in a web browser?
Dan
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-04 17:00 amscopub-mail
2010-08-04 22:32 ` Bastien
@ 2010-08-05 19:14 ` Dan Davison
2010-08-05 20:34 ` Sebastian Rose
1 sibling, 1 reply; 16+ messages in thread
From: Dan Davison @ 2010-08-05 19:14 UTC (permalink / raw)
To: amscopub-mail; +Cc: emacs-orgmode
amscopub-mail@yahoo.com writes:
> Is there a way to control the resolution of PNG LaTeX formulas when you export to HTML?
>
> You can control the font size directly in the header but there doesn't seem to be a way to use org-mode to control the resolution...
>
> BTW, I'm not exporting to LaTeX directly because I'm using PrinceXML to convert the HTML file to a PDF.
Hi Uriel,
Could you tell us a bit about what the advantages of PrinceXML are? One
question I have is: is it possible to get vector graphics (ps, pdf)
incorporated into the resulting pdf? Is there an open source
alternative? (I've been doing this with "print to file" in the print
dialog box in a web browser in linux).
Dan
>
> --Uriel
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-05 20:34 ` Sebastian Rose
@ 2010-08-05 21:36 ` Dan Davison
2010-08-05 22:14 ` Sebastian Rose
0 siblings, 1 reply; 16+ messages in thread
From: Dan Davison @ 2010-08-05 21:36 UTC (permalink / raw)
To: Sebastian Rose; +Cc: emacs-orgmode
Sebastian Rose <sebastian_rose@gmx.de> writes:
> Dan Davison <davison@stats.ox.ac.uk> writes:
>> amscopub-mail@yahoo.com writes:
>>
>>> Is there a way to control the resolution of PNG LaTeX formulas when you export to HTML?
>>>
>>> You can control the font size directly in the header but there doesn't seem to be a way to use org-mode to control the resolution...
>>>
>>> BTW, I'm not exporting to LaTeX directly because I'm using PrinceXML to convert the HTML file to a PDF.
>>
>> Hi Uriel,
>>
>> Could you tell us a bit about what the advantages of PrinceXML are? One
>> question I have is: is it possible to get vector graphics (ps, pdf)
>> incorporated into the resulting pdf? Is there an open source
>> alternative? (I've been doing this with "print to file" in the print
>> dialog box in a web browser in linux).
>
>
> htmldoc (see http://www.htmldoc.org/)
>
> It comes with a GUI and is free enough to be in Debian.
Thanks.
> Not sure if it is that perfect, but when ever I tried it it worked.
> Didn't use it for ages. I use Org mode and LaTeX2e instead ;)
Can you point me to an example that shows how to make source code in
latex look (almost) as nice as html?
In case anyone has any enlightenment, a quick try suggests that htmldoc
doesn't work out-of-the-box on html produced by org-mode (error below).
/tmp> htmldoc --webpage -f x.pdf x.html
ERR011: Unable to parse HTML element on line 15!
PAGES: 1
BYTES: 39131
/tmp> sed -n 15p x.html
<!--/*--><![CDATA[/*><!--*/
Dan
>
>
>
> Sebastian
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-05 21:36 ` Dan Davison
@ 2010-08-05 22:14 ` Sebastian Rose
0 siblings, 0 replies; 16+ messages in thread
From: Sebastian Rose @ 2010-08-05 22:14 UTC (permalink / raw)
To: Dan Davison; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
Dan Davison <davison@stats.ox.ac.uk> writes:
> Can you point me to an example that shows how to make source code in
> latex look (almost) as nice as html?
That is supposed to work with the `listings' package. I havent tried
that yet.
I still use my old LaTeX headers and write verbatim LaTeX code. I'd
like to switch though, since it's a lot to type.
Here is an example:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-verbatim, Size: 487 bytes --]
\begin{codeblock}
\keyword{public function}~\func{\_\_construct}~(\increaseindent[15]\doindent
\variable{\$instance}~=~\konstante{MAP\_STANDARD\_JS\_INSTANCE},\doindent
\variable{\$z}~=~\konstante{MAP\_STANDARD\_ZOOM},\doindent
\variable{\$centerX}~=~-1,\doindent
\variable{\$centerY}~=~-1,\doindent
\variable{\$highlights}~=~\keyword{true},\doindent
\variable{\$spots}~=~\keyword{false}\doindent
)\resetindent
\end{codeblock}
[-- Attachment #3: Type: text/plain, Size: 178 bytes --]
Looks horrible, does it?
You can find the "listings.pdf" documentation here:
http://www.ctan.org/tex-archive/macros/latex/contrib/listings/
Best wishes
Sebastian
[-- Attachment #4: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-05 19:11 ` Dan Davison
@ 2010-08-06 9:12 ` Bastien
0 siblings, 0 replies; 16+ messages in thread
From: Bastien @ 2010-08-06 9:12 UTC (permalink / raw)
To: Dan Davison; +Cc: emacs-orgmode
Dan Davison <davison@stats.ox.ac.uk> writes:
> Am I right in understanding that if we increase html-resolution the
> resulting images will come out larger in a web browser;
You're right.
Actually having a :resolution would perhaps make sense, at least for
consistency sake. What do you (and the OP) think?
> i.e that there is no way to maintain the images the same size while
> making them appear "sharper" in a web browser?
I guess this is related to the quality of the png, which is defined by
the -Q switch for dvipng. Would you like to set this as well?
--
Bastien
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-04 22:32 ` Bastien
2010-08-05 19:11 ` Dan Davison
@ 2010-08-06 10:46 ` Carsten Dominik
2010-08-06 17:21 ` Bastien
1 sibling, 1 reply; 16+ messages in thread
From: Carsten Dominik @ 2010-08-06 10:46 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
On Aug 5, 2010, at 12:32 AM, Bastien wrote:
> amscopub-mail@yahoo.com writes:
>
>> Is there a way to control the resolution of PNG LaTeX formulas when
>> you export to HTML?
>
> I've implemented this.
I would not think that we need this change, the :scale and :html-scale
parameters do this for in-buffer display and html formatting,
respectively.
Please revert this change.
- Carsten
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
@ 2010-08-06 14:05 Uri Avalos
0 siblings, 0 replies; 16+ messages in thread
From: Uri Avalos @ 2010-08-06 14:05 UTC (permalink / raw)
To: emacs-orgmode
Carsten, we are trying to increase the resolution of the images for *print* (ppi or dpi) while keeping the image the size on the web page. (As I wrote in the first email, I'm generating an HTML file with LaTeX pngs and then converting that to a PDF.)
Unfortunately, the html-scale and scale options by themselves do *not* get the job done.
Anyhow, this has been done before in Twiki. Check out the "rendering options" in this page:
https://twiki.cern.ch/twiki/bin/view/TWiki/LatexModePlugin
The way this plugin gets LaTeX pngs of 300 ppi (without an increase in screen size) is by simultaneously increasing the resolution and *decreasing* the html-scale.
Just tried that approach with :html-scale .25 and :html-resolution 300 but with *no* noticeable increase in quality.
On Fri, 6 Aug 2010 12:46:28 +0200
Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
> On Aug 5, 2010, at 12:32 AM, Bastien wrote:
>
> > amscopub-mail@yahoo.com writes:
> >
> >> Is there a way to control the resolution of PNG LaTeX formulas when
> >> you export to HTML?
> >
> > I've implemented this.
>
> I would not think that we need this change, the :scale and :html-scale
> parameters do this for in-buffer display and html formatting,
> respectively.
>
> Please revert this change.
>
> - Carsten
>
--
--Thanks!
Uriel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
@ 2010-08-06 15:17 amscopub-mail
2010-08-07 6:04 ` Carsten Dominik
0 siblings, 1 reply; 16+ messages in thread
From: amscopub-mail @ 2010-08-06 15:17 UTC (permalink / raw)
To: emacs-orgmode
Carsten, we are trying to increase the resolution of the images for *print* (ppi or dpi) while keeping the image the size on the web page. (As I wrote in the first email, I'm generating an HTML file with LaTeX pngs and then converting that to a PDF.)
Unfortunately, the html-scale and scale options by themselves do *not* get the job done.
Anyhow, this has been done before in Twiki. Check out the "rendering options" in this page:
https://twiki.cern.ch/twiki/bin/view/TWiki/LatexModePlugin
The way this plugin gets LaTeX pngs of 300 ppi (without an increase in screen size) is by simultaneously increasing the resolution and *decreasing* the html-scale.
Just tried that approach with :html-scale .25 and :html-resolution 300 but with *no* noticeable increase in quality. I think :html-scale actually changes the size of the file. In the twiki plugin, html-scale changes the size of the file *in the HTML* only.
On Fri, 6 Aug 2010 12:46:28 +0200
Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
> On Aug 5, 2010, at 12:32 AM, Bastien wrote:
>
> > amscopub-mail@yahoo.com writes:
> >
> >> Is there a way to control the resolution of PNG LaTeX formulas when
> >> you export to HTML?
> >
> > I've implemented this.
>
> I would not think that we need this change, the :scale and :html-scale
> parameters do this for in-buffer display and html formatting,
> respectively.
>
> Please revert this change.
>
> - Carsten
>
--
--Thanks!
Uriel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-06 10:46 ` Carsten Dominik
@ 2010-08-06 17:21 ` Bastien
0 siblings, 0 replies; 16+ messages in thread
From: Bastien @ 2010-08-06 17:21 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> I would not think that we need this change, the :scale and :html-scale
> parameters do this for in-buffer display and html formatting,
> respectively.
>
>
> Please revert this change.
Done.
--
Bastien
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
@ 2010-08-06 19:39 amscopub-mail
0 siblings, 0 replies; 16+ messages in thread
From: amscopub-mail @ 2010-08-06 19:39 UTC (permalink / raw)
To: emacs-orgmode
I just tripped over myself :-) After reading this excellent discussion of dpi (http://www.danheller.com/tech-dpi.html ), I think the problem might just be dvipng. The "problem" is that while the PNGs look good on the screen, they look horrible in the printer. I tried creating some PNGs with with dpi's of 1000. The images were very pixelated. If you print such a low quality image, it will look horrible, no matter how high the dpi.
I tried using the Q switch but that didn't seem to do anything. Maybe there is some type of combination of switches that produces better quality PNGs? Or an alternative program that does the same thing?
On Fri, 6 Aug 2010 07:05:58 -0700 (PDT)
Uri Avalos <uriavalos@yahoo.com> wrote:
> Carsten, we are trying to increase the resolution of the images for *print* (ppi or dpi) while keeping the image the size on the web page. (As I wrote in the first email, I'm generating an HTML file with LaTeX pngs and then converting that to a PDF.)
>
> Unfortunately, the html-scale and scale options by themselves do *not* get the job done.
>
> Anyhow, this has been done before in Twiki. Check out the "rendering options" in this page:
>
> https://twiki.cern.ch/twiki/bin/view/TWiki/LatexModePlugin
>
> The way this plugin gets LaTeX pngs of 300 ppi (without an increase in screen size) is by simultaneously increasing the resolution and *decreasing* the html-scale.
>
> Just tried that approach with :html-scale .25 and :html-resolution 300 but with *no* noticeable increase in quality.
>
> On Fri, 6 Aug 2010 12:46:28 +0200
> Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
> >
> > On Aug 5, 2010, at 12:32 AM, Bastien wrote:
> >
> > > amscopub-mail@yahoo.com writes:
> > >
> > >> Is there a way to control the resolution of PNG LaTeX formulas when
> > >> you export to HTML?
> > >
> > > I've implemented this.
> >
> > I would not think that we need this change, the :scale and :html-scale
> > parameters do this for in-buffer display and html formatting,
> > respectively.
> >
> > Please revert this change.
> >
> > - Carsten
> >
>
>
> --
> --Thanks!
> Uriel
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
--
--Thanks!
Uriel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output?
2010-08-06 15:17 amscopub-mail
@ 2010-08-07 6:04 ` Carsten Dominik
0 siblings, 0 replies; 16+ messages in thread
From: Carsten Dominik @ 2010-08-07 6:04 UTC (permalink / raw)
To: amscopub-mail; +Cc: emacs-orgmode
On Aug 6, 2010, at 5:17 PM, amscopub-mail@yahoo.com wrote:
> Carsten, we are trying to increase the resolution of the images for
> *print* (ppi or dpi) while keeping the image the size on the web
> page. (As I wrote in the first email, I'm generating an HTML file
> with LaTeX pngs and then converting that to a PDF.)
Ah, I see now. Obviously I read only part of the discussion. Sorry.
The problem is that both html-resolution and html-scale get translated
into a pixel size.
what we really would need is to make the picture big and the to scale
it down in the browser
by an html attribute. Maybe :html-scale is an unfortunate naming
because it it sounds like
it would be an html attribute for the included image.
Did you follow the recent discussion about MathJax? I think this
might be a better way
to get good resolution math into an HTML page.
If you want to print the result, why don't you go through LaTeX?
- Carsten
>
> Unfortunately, the html-scale and scale options by themselves do
> *not* get the job done.
>
> Anyhow, this has been done before in Twiki. Check out the "rendering
> options" in this page:
>
> https://twiki.cern.ch/twiki/bin/view/TWiki/LatexModePlugin
>
> The way this plugin gets LaTeX pngs of 300 ppi (without an increase
> in screen size) is by simultaneously increasing the resolution and
> *decreasing* the html-scale.
>
> Just tried that approach with :html-scale .25 and :html-resolution
> 300 but with *no* noticeable increase in quality. I think :html-
> scale actually changes the size of the file. In the twiki plugin,
> html-scale changes the size of the file *in the HTML* only.
>
> On Fri, 6 Aug 2010 12:46:28 +0200
> Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
>>
>> On Aug 5, 2010, at 12:32 AM, Bastien wrote:
>>
>>> amscopub-mail@yahoo.com writes:
>>>
>>>> Is there a way to control the resolution of PNG LaTeX formulas when
>>>> you export to HTML?
>>>
>>> I've implemented this.
>>
>> I would not think that we need this change, the :scale and :html-
>> scale
>> parameters do this for in-buffer display and html formatting,
>> respectively.
>>
>> Please revert this change.
>>
>> - Carsten
>>
>
>
> --
> --Thanks!
> Uriel
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2010-08-07 6:04 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 16:06 Change resolution of LaTeX formulas in HTML output? amscopub-mail
2010-08-05 17:06 ` Nick Dokos
2010-08-05 18:25 ` Bastien
-- strict thread matches above, loose matches on Subject: below --
2010-08-06 19:39 amscopub-mail
2010-08-06 15:17 amscopub-mail
2010-08-07 6:04 ` Carsten Dominik
2010-08-06 14:05 Uri Avalos
2010-08-04 17:00 amscopub-mail
2010-08-04 22:32 ` Bastien
2010-08-05 19:11 ` Dan Davison
2010-08-06 9:12 ` Bastien
2010-08-06 10:46 ` Carsten Dominik
2010-08-06 17:21 ` Bastien
2010-08-05 19:14 ` Dan Davison
2010-08-05 20:34 ` Sebastian Rose
2010-08-05 21:36 ` Dan Davison
2010-08-05 22:14 ` Sebastian Rose
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).