* Including links with LaTeX code.
@ 2013-10-16 12:45 David Menéndez Hurtado
[not found] ` <96f9dd8e-35e9-4de8-934b-e847d616bf04-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: David Menéndez Hurtado @ 2013-10-16 12:45 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1: Type: text/plain, Size: 2100 bytes --]
I am using Bitbucket's Markdown wiki for source code documentation. It
doesn't support inline LaTeX, so I am linking the images from codecogs. The
code looks like this:
This formula: ![](http://latex.codecogs.com/svg.latex?|W_1W_2|) is
important.
My image: ![](peak_detection/detection_1.png)
I want to be able to generate pdf files from here. If I try directly, it
understands the link as actual LaTeX code:
$ pandoc -o peak.pdf peak_detection.md
pandoc: Could not find image
`http://latex.codecogs.com/svg.latex?|W_1W_2|', skipping...
pandoc: Error producing PDF from TeX source.
! Missing $ inserted.
<inserted text>
$
l.100 ...com/svg.latex?\textbar{}W_1W_2\textbar{}}
It compiles nicely to html, but if I try to transform that to pdf, the
lines get amputated at the formulas. In my example, the PDF output is:
This formula:
My image: [the_image]
I have also tried the --self-contained flag. With v 1.11.1 installed from
Fedora repositories, my images were included, but the LaTeX links were left
as they were without warning, whereas in the v 1.12.0.2 from cabal, it says:
pandoc: Could not find data file http://latex.codecogs.com/svg.latex
and no output is produced.
Codecogs has also a png option instead of png, but the results are the same
in all cases.
Is there a way I can produce PDF files of my wiki, including formulas? I
have a few pages, so I don't mind generate them one by one, but I need the
same .md code to work in Bitbucket and in pdf.
Thank you,
/David.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/96f9dd8e-35e9-4de8-934b-e847d616bf04%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[-- Attachment #2: Type: text/html, Size: 2539 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Including links with LaTeX code.
[not found] ` <96f9dd8e-35e9-4de8-934b-e847d616bf04-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2013-10-16 16:10 ` John MacFarlane
[not found] ` <20131016161045.GB52267-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2013-10-16 16:10 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
I've traced down the problem. Pandoc does try to download images
when absolute URIs are given, but in this case it isn't doing it because
"http://latex.codecogs.com/svg.latex?|W_1W_2|" is not recognized as
an absolute URI. Network.URI's function isAbsoluteURI gives False.
That seems odd to me, but perhaps it's because the | characters aren't
encoded? I will look into it and try to fix. It might be a bug in the
network library.
+++ David Menéndez Hurtado [Oct 16 13 05:45 ]:
> I am using Bitbucket's Markdown wiki for source code documentation. It
> doesn't support inline LaTeX, so I am linking the images from codecogs. The
> code looks like this:
>
> This formula: ![](http://latex.codecogs.com/svg.latex?|W_1W_2|) is
> important.
> My image: ![](peak_detection/detection_1.png)
>
> I want to be able to generate pdf files from here. If I try directly, it
> understands the link as actual LaTeX code:
>
> $ pandoc -o peak.pdf peak_detection.md
> pandoc: Could not find image
> `http://latex.codecogs.com/svg.latex?|W_1W_2|', skipping...
> pandoc: Error producing PDF from TeX source.
> ! Missing $ inserted.
> <inserted text>
> $
> l.100 ...com/svg.latex?\textbar{}W_1W_2\textbar{}}
>
> It compiles nicely to html, but if I try to transform that to pdf, the
> lines get amputated at the formulas. In my example, the PDF output is:
>
> This formula:
> My image: [the_image]
>
> I have also tried the --self-contained flag. With v 1.11.1 installed from
> Fedora repositories, my images were included, but the LaTeX links were left
> as they were without warning, whereas in the v 1.12.0.2 from cabal, it says:
>
> pandoc: Could not find data file http://latex.codecogs.com/svg.latex
>
> and no output is produced.
>
>
> Codecogs has also a png option instead of png, but the results are the same
> in all cases.
>
>
> Is there a way I can produce PDF files of my wiki, including formulas? I
> have a few pages, so I don't mind generate them one by one, but I need the
> same .md code to work in Bitbucket and in pdf.
>
>
> Thank you,
>
> /David.
>
> --
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/96f9dd8e-35e9-4de8-934b-e847d616bf04%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20131016161045.GB52267%40Johns-MacBook-Pro.local.
For more options, visit https://groups.google.com/groups/opt_out.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Including links with LaTeX code.
[not found] ` <20131016161045.GB52267-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2013-10-16 16:27 ` John MacFarlane
0 siblings, 0 replies; 3+ messages in thread
From: John MacFarlane @ 2013-10-16 16:27 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
OK -- solution is to encode the | characters as %7C.
If you write
![](http://latex.codecogs.com/svg.latex?%7CW_1W_2%7C)
it should work
+++ John MacFarlane [Oct 16 13 09:10 ]:
> I've traced down the problem. Pandoc does try to download images
> when absolute URIs are given, but in this case it isn't doing it because
> "http://latex.codecogs.com/svg.latex?|W_1W_2|" is not recognized as
> an absolute URI. Network.URI's function isAbsoluteURI gives False.
> That seems odd to me, but perhaps it's because the | characters aren't
> encoded? I will look into it and try to fix. It might be a bug in the
> network library.
>
> +++ David Menéndez Hurtado [Oct 16 13 05:45 ]:
> > I am using Bitbucket's Markdown wiki for source code documentation. It
> > doesn't support inline LaTeX, so I am linking the images from codecogs. The
> > code looks like this:
> >
> > This formula: ![](http://latex.codecogs.com/svg.latex?|W_1W_2|) is
> > important.
> > My image: ![](peak_detection/detection_1.png)
> >
> > I want to be able to generate pdf files from here. If I try directly, it
> > understands the link as actual LaTeX code:
> >
> > $ pandoc -o peak.pdf peak_detection.md
> > pandoc: Could not find image
> > `http://latex.codecogs.com/svg.latex?|W_1W_2|', skipping...
> > pandoc: Error producing PDF from TeX source.
> > ! Missing $ inserted.
> > <inserted text>
> > $
> > l.100 ...com/svg.latex?\textbar{}W_1W_2\textbar{}}
> >
> > It compiles nicely to html, but if I try to transform that to pdf, the
> > lines get amputated at the formulas. In my example, the PDF output is:
> >
> > This formula:
> > My image: [the_image]
> >
> > I have also tried the --self-contained flag. With v 1.11.1 installed from
> > Fedora repositories, my images were included, but the LaTeX links were left
> > as they were without warning, whereas in the v 1.12.0.2 from cabal, it says:
> >
> > pandoc: Could not find data file http://latex.codecogs.com/svg.latex
> >
> > and no output is produced.
> >
> >
> > Codecogs has also a png option instead of png, but the results are the same
> > in all cases.
> >
> >
> > Is there a way I can produce PDF files of my wiki, including formulas? I
> > have a few pages, so I don't mind generate them one by one, but I need the
> > same .md code to work in Bitbucket and in pdf.
> >
> >
> > Thank you,
> >
> > /David.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/96f9dd8e-35e9-4de8-934b-e847d616bf04%40googlegroups.com.
> > For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20131016162710.GA52482%40Johns-MacBook-Pro.local.
For more options, visit https://groups.google.com/groups/opt_out.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-16 16:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-16 12:45 Including links with LaTeX code David Menéndez Hurtado
[not found] ` <96f9dd8e-35e9-4de8-934b-e847d616bf04-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2013-10-16 16:10 ` John MacFarlane
[not found] ` <20131016161045.GB52267-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2013-10-16 16:27 ` John MacFarlane
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 NNTP newsgroup(s).