emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Graphics to HTML, LaTeX/PDF and DocBook?
@ 2016-10-04 13:03 Peter Davis
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Davis @ 2016-10-04 13:03 UTC (permalink / raw)
  To: emacs-orgmode

I have a document with a number of embedded dot graphics (and one
ditaa). I'm trying to output these in some vector format, so they will
work across a wide range of devices. However I can't seem to find the
one true graphics format.

png - too low-resolution
pdf - produces links on HTML output
svg - doesn't work with LaTeX (except with svg package, but I don't want
to depend on InkScape)

Are there other options? Suggestions? Can ditaa even do anything other
than png?

Thanks!
-pd

-- 
  Peter Davis
  www.techcurmudgeon.com

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

* Re: Graphics to HTML, LaTeX/PDF and DocBook?
       [not found] <19e18ad2e24f40e5b94d6f695f1d9910@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-10-04 13:40 ` Eric S Fraga
  2016-10-04 16:19   ` Peter Davis
  0 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2016-10-04 13:40 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode@gnu.org

On Tuesday,  4 Oct 2016 at 13:03, Peter Davis wrote:
> I have a document with a number of embedded dot graphics (and one
> ditaa). I'm trying to output these in some vector format, so they will
> work across a wide range of devices. However I can't seem to find the
> one true graphics format.

I don't think there is one true graphics format unfortunately.  What I
would suggest is that you have your src block export the dot graphic to
a specific format based on the export target.  For instance, if
exporting to LaTeX/PDF, use PDF; if exporting to HTML, use SVG.  You can
specify the actual destination using elisp code in the src block header.

> Are there other options? Suggestions? Can ditaa even do anything other
> than png?

The web site (http://ditaa.sourceforge.net/) says that there is an EPS
plugin...

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.1.1, Org release_8.3.6-1131-gd68497

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

* Re: Graphics to HTML, LaTeX/PDF and DocBook?
  2016-10-04 13:40 ` Graphics to HTML, LaTeX/PDF and DocBook? Eric S Fraga
@ 2016-10-04 16:19   ` Peter Davis
  2016-10-13 14:13     ` Eduardo Mercovich
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Davis @ 2016-10-04 16:19 UTC (permalink / raw)
  To: emacs-orgmode


On Tue, Oct 4, 2016, at 09:40 AM, Eric S Fraga wrote:
> On Tuesday,  4 Oct 2016 at 13:03, Peter Davis wrote:
> > I have a document with a number of embedded dot graphics (and one
> > ditaa). I'm trying to output these in some vector format, so they will
> > work across a wide range of devices. However I can't seem to find the
> > one true graphics format.
> 
> I don't think there is one true graphics format unfortunately.  What I
> would suggest is that you have your src block export the dot graphic to
> a specific format based on the export target.  For instance, if
> exporting to LaTeX/PDF, use PDF; if exporting to HTML, use SVG.  You can
> specify the actual destination using elisp code in the src block header.

Thanks, Eric. 

I've decided to bite the bullet and install InkScape. However, I'm
having a hard time figuring out how to integrate this with org-mode. Org
generates the \includegraphics commands, so I assume it understands the
svg package, which in turn understands inkscape, but I don't know how to
connect them.  There are bits and pieces around the Web, but I haven't
found a coherent explanation of how to set this up. Anyone know of one?

Thanks!
-pd


-- 
  Peter Davis
  www.techcurmudgeon.com

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

* Re: Graphics to HTML, LaTeX/PDF and DocBook?
  2016-10-04 16:19   ` Peter Davis
@ 2016-10-13 14:13     ` Eduardo Mercovich
  2016-10-13 14:35       ` Peter Davis
  0 siblings, 1 reply; 7+ messages in thread
From: Eduardo Mercovich @ 2016-10-13 14:13 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

Hi Peter.

>> > I have a document with a number of embedded dot graphics [...]

> I've decided to bite the bullet and install InkScape. However, I'm
> having a hard time figuring out how to integrate this with org-mode.
> [...]

I export from Inkscape to pdf and include the pdf file. Would that work
for you?

HTH... 

-- 
eduardo mercovich 

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación.

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

* Re: Graphics to HTML, LaTeX/PDF and DocBook?
  2016-10-13 14:13     ` Eduardo Mercovich
@ 2016-10-13 14:35       ` Peter Davis
  2016-10-18 15:13         ` Eduardo Mercovich
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Davis @ 2016-10-13 14:35 UTC (permalink / raw)
  To: Eduardo Mercovich; +Cc: emacs-orgmode



On Thu, Oct 13, 2016, at 10:13 AM, Eduardo Mercovich wrote:
> Hi Peter.
> 
> >> > I have a document with a number of embedded dot graphics [...]
> 
> > I've decided to bite the bullet and install InkScape. However, I'm
> > having a hard time figuring out how to integrate this with org-mode.
> > [...]
> 
> I export from Inkscape to pdf and include the pdf file. Would that work
> for you?
> 
> HTH... 

Hi, Eduardo,

I'm creating the SVGs right in org-mode, using GraphViz dot, like this:

#+BEGIN_SRC dot :file mygraph.svg :cmdline -Kdot -Tsvg
...
#+END_SRC

org-mode then passes this through Inkscape with the command:

inkscape -z -C -f./mygraph.svg -A./mygraph.pdf --export-latex

This appears to be working, as I'm getting a .pdf_tex in the same
directory as my org file. However, LaTeX's \includesvg{} seems unable to
find the .pdf_tex file.

Interestingly, I managed to get the document to output to PDF by
manually running the inkscape command on each of the svg files. org-mode
seems to be trying to do this, but for some reason it's not working. 

Now, however, my text doesn't fit in the boxes. I wonder if there's a
way to make it all \footnotesize in the .pdf_tex files.

Thanks,
-pd


-- 
  Peter Davis
  www.techcurmudgeon.com

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

* Re: Graphics to HTML, LaTeX/PDF and DocBook?
  2016-10-13 14:35       ` Peter Davis
@ 2016-10-18 15:13         ` Eduardo Mercovich
  2016-10-18 17:12           ` Peter Davis
  0 siblings, 1 reply; 7+ messages in thread
From: Eduardo Mercovich @ 2016-10-18 15:13 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

Hi Peter.

[...]
> [...] However, LaTeX's \includesvg{} seems unable to find the .pdf_tex
> file.
> Interestingly, I managed to get the document to output to PDF by
> manually running the inkscape command on each of the svg files. org-mode
> seems to be trying to do this, but for some reason it's not working. 
> Now, however, my text doesn't fit in the boxes. I wonder if there's a
> way to make it all \footnotesize in the .pdf_tex files.

I'm outside that league, I'm sorry that I can't help... can you
"intercept" somehow the middle results to help to diagnose the causes?


-- 
eduardo mercovich 

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación.

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

* Re: Graphics to HTML, LaTeX/PDF and DocBook?
  2016-10-18 15:13         ` Eduardo Mercovich
@ 2016-10-18 17:12           ` Peter Davis
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Davis @ 2016-10-18 17:12 UTC (permalink / raw)
  To: Eduardo Mercovich; +Cc: emacs-orgmode

On Tue, Oct 18, 2016, at 11:13 AM, Eduardo Mercovich wrote:
> Hi Peter.
> 
> [...]
> > [...] However, LaTeX's \includesvg{} seems unable to find the .pdf_tex
> > file.
> > Interestingly, I managed to get the document to output to PDF by
> > manually running the inkscape command on each of the svg files. org-mode
> > seems to be trying to do this, but for some reason it's not working. 
> > Now, however, my text doesn't fit in the boxes. I wonder if there's a
> > way to make it all \footnotesize in the .pdf_tex files.
> 
> I'm outside that league, I'm sorry that I can't help... can you
> "intercept" somehow the middle results to help to diagnose the causes?
> 

Thanks, Eduardo. Perhaps I can get more feedback, but I don't have time
to investigate further right now. If I find anything further, I'll post
here.

Thank you.

-pd

-- 
  Peter Davis
  www.techcurmudgeon.com

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

end of thread, other threads:[~2016-10-18 17:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <19e18ad2e24f40e5b94d6f695f1d9910@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-10-04 13:40 ` Graphics to HTML, LaTeX/PDF and DocBook? Eric S Fraga
2016-10-04 16:19   ` Peter Davis
2016-10-13 14:13     ` Eduardo Mercovich
2016-10-13 14:35       ` Peter Davis
2016-10-18 15:13         ` Eduardo Mercovich
2016-10-18 17:12           ` Peter Davis
2016-10-04 13:03 Peter Davis

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).