public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Do not build context file in /tmp
@ 2021-06-24  5:54 'juh' via pandoc-discuss
  2021-06-24 14:07 ` BPJ
  2021-06-28 17:26 ` John MacFarlane
  0 siblings, 2 replies; 4+ messages in thread
From: 'juh' via pandoc-discuss @ 2021-06-24  5:54 UTC (permalink / raw)
  To: Pandoc Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]

Hi all,

am I right that pandoc uses /tmp to build the intermediate context
source file?

My problem is that I have a hierarchy of supporting files relative to
the directory of the markdown source file which context needs to build
correctly.

While:

pandoc -t context -o test.tex test.md
context test.tex

works fine

pandoc -t context --pdf-engine=context -o test.pdf test.md

throws error as multiple context environments are not found.

There is a work around by putting all supporting files in a special
folder of the context distribution 

context/tex/texmf-local

You have to call "context --generate" the make any changes in this path
known to context. This is annoying but possible.

But the path to the original source folder is lost so that it is
impossible to include things stored along with the source file.

projectdir/source.md
projectdir/image.png

When context is called inside the project folder it is of course
possible to include the image file.  When context is called on a tmp
file in /tmp the path is lost.

Is there a switch to build all files in the working directory?

Jan Ulrich Hasecke
-- 
Autoren-Homepage: ......... http://literatur.hasecke.com
Satiren & Essays: ......... http://www.sudelbuch.de
Privater Blog: ............ http://www.hasecke.eu
Netzliteratur-Projekt: .... http://www.generationenprojekt.de


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

* Re: Do not build context file in /tmp
  2021-06-24  5:54 Do not build context file in /tmp 'juh' via pandoc-discuss
@ 2021-06-24 14:07 ` BPJ
       [not found]   ` <CADAJKhChK6LhKSx3X-bi6G756V3XMOkyhi_gkv-ndMPQwSfTNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2021-06-28 17:26 ` John MacFarlane
  1 sibling, 1 reply; 4+ messages in thread
From: BPJ @ 2021-06-24 14:07 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 2872 bytes --]

I guess the proper workaround is to use a Makefile (or any build
system/script of your choice) and have it build/assemble things with
pandoc/context right in your project directory and then remove any junk
automatically, rather than relying on pandoc running context. The learning
curve of make is kind of steep, especially if you use it for things which
differ from the most typical use cases but it pays off and gets less steep
fairly quickly.

https://www.google.com/search?q=alternatives+to+makefile



Den tors 24 juni 2021 07:55'juh' via pandoc-discuss <
pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> skrev:

> Hi all,
>
> am I right that pandoc uses /tmp to build the intermediate context
> source file?
>
> My problem is that I have a hierarchy of supporting files relative to
> the directory of the markdown source file which context needs to build
> correctly.
>
> While:
>
> pandoc -t context -o test.tex test.md
> context test.tex
>
> works fine
>
> pandoc -t context --pdf-engine=context -o test.pdf test.md
>
> throws error as multiple context environments are not found.
>
> There is a work around by putting all supporting files in a special
> folder of the context distribution
>
> context/tex/texmf-local
>
> You have to call "context --generate" the make any changes in this path
> known to context. This is annoying but possible.
>
> But the path to the original source folder is lost so that it is
> impossible to include things stored along with the source file.
>
> projectdir/source.md
> projectdir/image.png
>
> When context is called inside the project folder it is of course
> possible to include the image file.  When context is called on a tmp
> file in /tmp the path is lost.
>
> Is there a switch to build all files in the working directory?
>
> Jan Ulrich Hasecke
> --
> Autoren-Homepage: ......... http://literatur.hasecke.com
> Satiren & Essays: ......... http://www.sudelbuch.de
> Privater Blog: ............ http://www.hasecke.eu
> Netzliteratur-Projekt: .... http://www.generationenprojekt.de
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/20210624055435.GA11054%40sokrates
> .
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhChK6LhKSx3X-bi6G756V3XMOkyhi_gkv-ndMPQwSfTNQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4401 bytes --]

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

* Re: Do not build context file in /tmp
       [not found]   ` <CADAJKhChK6LhKSx3X-bi6G756V3XMOkyhi_gkv-ndMPQwSfTNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-06-24 16:59     ` 'juh' via pandoc-discuss
  0 siblings, 0 replies; 4+ messages in thread
From: 'juh' via pandoc-discuss @ 2021-06-24 16:59 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

Hi BPJ,

Am Thu, Jun 24, 2021 at 04:07:29PM +0200 schrieb BPJ:
 > I guess the proper workaround is to use a Makefile (or any build
> system/script of your choice) and have it build/assemble things with
> pandoc/context right in your project directory and then remove any junk
> automatically, rather than relying on pandoc running context. The learning
> curve of make is kind of steep, especially if you use it for things which
> differ from the most typical use cases but it pays off and gets less steep
> fairly quickly.
> 
> https://www.google.com/search?q=alternatives+to+makefile

Thanks a lot for confirming. I'll go this way.

Ciao!
Jan Ulrich Hasecke

-- 
Autoren-Homepage: ......... http://literatur.hasecke.com
Satiren & Essays: ......... http://www.sudelbuch.de
Privater Blog: ............ http://www.hasecke.eu
Netzliteratur-Projekt: .... http://www.generationenprojekt.de


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

* Re: Do not build context file in /tmp
  2021-06-24  5:54 Do not build context file in /tmp 'juh' via pandoc-discuss
  2021-06-24 14:07 ` BPJ
@ 2021-06-28 17:26 ` John MacFarlane
  1 sibling, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2021-06-28 17:26 UTC (permalink / raw)
  To: 'juh' via pandoc-discuss, Pandoc Mailinglist


You could try

TMPDIR=. pandoc in.md -o out.pdf -t context

but this might have other bad effects!

"'juh' via pandoc-discuss" <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
writes:

> Hi all,
>
> am I right that pandoc uses /tmp to build the intermediate context
> source file?
>
> My problem is that I have a hierarchy of supporting files relative to
> the directory of the markdown source file which context needs to build
> correctly.
>
> While:
>
> pandoc -t context -o test.tex test.md
> context test.tex
>
> works fine
>
> pandoc -t context --pdf-engine=context -o test.pdf test.md
>
> throws error as multiple context environments are not found.
>
> There is a work around by putting all supporting files in a special
> folder of the context distribution 
>
> context/tex/texmf-local
>
> You have to call "context --generate" the make any changes in this path
> known to context. This is annoying but possible.
>
> But the path to the original source folder is lost so that it is
> impossible to include things stored along with the source file.
>
> projectdir/source.md
> projectdir/image.png
>
> When context is called inside the project folder it is of course
> possible to include the image file.  When context is called on a tmp
> file in /tmp the path is lost.
>
> Is there a switch to build all files in the working directory?
>
> Jan Ulrich Hasecke
> -- 
> Autoren-Homepage: ......... http://literatur.hasecke.com
> Satiren & Essays: ......... http://www.sudelbuch.de
> Privater Blog: ............ http://www.hasecke.eu
> Netzliteratur-Projekt: .... http://www.generationenprojekt.de
>
>
> -- 
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20210624055435.GA11054%40sokrates.


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

end of thread, other threads:[~2021-06-28 17:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24  5:54 Do not build context file in /tmp 'juh' via pandoc-discuss
2021-06-24 14:07 ` BPJ
     [not found]   ` <CADAJKhChK6LhKSx3X-bi6G756V3XMOkyhi_gkv-ndMPQwSfTNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-24 16:59     ` 'juh' via pandoc-discuss
2021-06-28 17:26 ` 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).