public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Partials in different directory
@ 2022-02-03 23:20 Andrew Loreaux
       [not found] ` <5e1d5e09-526b-49bb-8c8a-a61a3b5e6767n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Loreaux @ 2022-02-03 23:20 UTC (permalink / raw)
  To: pandoc-discuss


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

Is there a way to have partials in a shared directory accessed by multiple 
templates?

Directory structure like this.

tex
--shared
    --latex (where shared partials live)
--template1
    --latex default.tex (to use as main template file)

I can get partials to work if they are in the same directory but it will 
not compile if I move it to shared. Ideally I would like to be able to 
change one partial if need be and it still works for the other templates as 
well.

Thanks!

-- 
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/5e1d5e09-526b-49bb-8c8a-a61a3b5e6767n%40googlegroups.com.

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

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

* Re: Partials in different directory
       [not found] ` <5e1d5e09-526b-49bb-8c8a-a61a3b5e6767n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-02-04 18:44   ` John MacFarlane
  0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2022-02-04 18:44 UTC (permalink / raw)
  To: Andrew Loreaux, pandoc-discuss


Hm, I don't think it can work with that directory structure.
The function getPartial is passed path path constructed from
the path of the template, with the basename of the partial
substituted for the template's base name.

The way this is implemented in pandoc, getPartial will search
for this file along the same path as it searches for templates.

But if the template path is, e.g. tex/template1/default.tex,
it will search for tex/template1/partial.tex and it won't
find this in the directory above...

Perhaps you can solve this with a symbolic link?

Andrew Loreaux <solloron1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Is there a way to have partials in a shared directory accessed by multiple 
> templates?
>
> Directory structure like this.
>
> tex
> --shared
>     --latex (where shared partials live)
> --template1
>     --latex default.tex (to use as main template file)
>
> I can get partials to work if they are in the same directory but it will 
> not compile if I move it to shared. Ideally I would like to be able to 
> change one partial if need be and it still works for the other templates as 
> well.
>
> Thanks!
>
> -- 
> 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/5e1d5e09-526b-49bb-8c8a-a61a3b5e6767n%40googlegroups.com.


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

end of thread, other threads:[~2022-02-04 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 23:20 Partials in different directory Andrew Loreaux
     [not found] ` <5e1d5e09-526b-49bb-8c8a-a61a3b5e6767n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-02-04 18:44   ` 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).