public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* pandoc to pdf: how to synchronize files output by package ?
@ 2023-02-16 10:00 Pierre-Antoine BRAMERET
       [not found] ` <a0909aa4-e617-4e65-b760-ac617fd192c2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre-Antoine BRAMERET @ 2023-02-16 10:00 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1675 bytes --]

Hi,

I use a package that reads and writes files to synchronize counters.
The package is custom but it is based on this question: 
https://tex.stackexchange.com/questions/124103/how-to-create-a-fixed-counter.

The result is that I need to input files:
\InputIfFileExists{\jobname.notes}{}{}

And output files:
\immediate\openout\jjdbout=\jobname.notes
\immediate\write\jjdbout{\unexpanded\expandafter{\jjdbnotes}}

The problem is that I cannot keep track of this file, as pandoc runs 
pdflatex in a temporary directory.

The hacks I tried:
- write somewhere else but pdflatex correctly prevents that,
- using \write18 to execute some commands, but in that case I don't know 
the  temporary path to synchronize my files to ; I thought it was in 
TEXMFOUTPUT, but this env variable only points to the first run started by 
pandoc (so it's okay to put the files there beforehand, but not to fetch 
the updated versions),
- using \write18 and the package currfile, but if I understood correctly, 
currfile relies on files already existing so I cannot know to which path I 
have to put my files before hand.

Is there something I missed to copy files to output before pandoc calls the 
pdf engine and fetch files after it finished?
How could we do that?

Thanks,
Best,

-- 
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/a0909aa4-e617-4e65-b760-ac617fd192c2n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2297 bytes --]

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

* Re: pandoc to pdf: how to synchronize files output by package ?
       [not found] ` <a0909aa4-e617-4e65-b760-ac617fd192c2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-02-16 12:22   ` Bastien DUMONT
  2023-02-16 14:31     ` Pierre-Antoine BRAMERET
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien DUMONT @ 2023-02-16 12:22 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

A possible solution would be to use Pandoc to produce the TeX file, then process the TeX file yourself with LaTeX.

Le Thursday 16 February 2023 à 02:00:05AM, Pierre-Antoine BRAMERET a écrit :
> Hi,
> 
> I use a package that reads and writes files to synchronize counters.
> The package is custom but it is based on this question: https://
> tex.stackexchange.com/questions/124103/how-to-create-a-fixed-counter.
> 
> The result is that I need to input files:
> \InputIfFileExists{\jobname.notes}{}{}
> 
> And output files:
> \immediate\openout\jjdbout=\jobname.notes
> \immediate\write\jjdbout{\unexpanded\expandafter{\jjdbnotes}}
> 
> The problem is that I cannot keep track of this file, as pandoc runs pdflatex
> in a temporary directory.
> 
> The hacks I tried:
> - write somewhere else but pdflatex correctly prevents that,
> - using \write18 to execute some commands, but in that case I don't know the 
> temporary path to synchronize my files to ; I thought it was in TEXMFOUTPUT,
> but this env variable only points to the first run started by pandoc (so it's
> okay to put the files there beforehand, but not to fetch the updated versions),
> - using \write18 and the package currfile, but if I understood correctly,
> currfile relies on files already existing so I cannot know to which path I have
> to put my files before hand.
> 
> Is there something I missed to copy files to output before pandoc calls the pdf
> engine and fetch files after it finished?
> How could we do that?
> 
> Thanks,
> Best,
> 
> 
> --
> 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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [2]https://groups.google.com/d/msgid/
> pandoc-discuss/a0909aa4-e617-4e65-b760-ac617fd192c2n%40googlegroups.com.
> 
> References:
> 
> [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://groups.google.com/d/msgid/pandoc-discuss/a0909aa4-e617-4e65-b760-ac617fd192c2n%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
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/Y%2B4gEulW/6ZURhy3%40localhost.


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

* Re: pandoc to pdf: how to synchronize files output by package ?
  2023-02-16 12:22   ` Bastien DUMONT
@ 2023-02-16 14:31     ` Pierre-Antoine BRAMERET
  0 siblings, 0 replies; 3+ messages in thread
From: Pierre-Antoine BRAMERET @ 2023-02-16 14:31 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 767 bytes --]

Le jeudi 16 février 2023 à 13:22:48 UTC+1, Bastien DUMONT a écrit :
A possible solution would be to use Pandoc to produce the TeX file, then 
process the TeX file yourself with LaTeX.

Thanks, however with this solution I cannot use pandoc's prerendering of 
some types of images (such as svg, or url which are downloaded at compile 
time).

-- 
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/28808752-81a1-4c23-9ac7-76483c0d217dn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1121 bytes --]

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

end of thread, other threads:[~2023-02-16 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 10:00 pandoc to pdf: how to synchronize files output by package ? Pierre-Antoine BRAMERET
     [not found] ` <a0909aa4-e617-4e65-b760-ac617fd192c2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-02-16 12:22   ` Bastien DUMONT
2023-02-16 14:31     ` Pierre-Antoine BRAMERET

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