2

As stated in the title, I want to create a package (.zip, .tgz, basically an archive) with a Beamer template which can be deflated in one of the texmf trees and be ready to use, without hassling the end users.

It's a port from a PowerPoint template, and some images (photos and so on, not reproducible with TikZ) HAVE TO be included (yeah it is a bad thing, I know).

My current workaround is to hardcode the path of the images in the template and to ask the users to change it with their local path: since I know it is a horrible thing, I've been searching for a better solution, but found nothing.

Besides, since I have written TikZ code (for optionally drawing a progress bar) which requires package totcount, I'd like not to rely on user for loading it and load it from the template itself. Any idea?

6
  • 1
    This is what I've done in the past. It is extremely hacky but it saves the images on the fly. The answer is for an eps figure but you can do it for other formats too. Can you embed an image so it doesn't need to be stored as a separate file?
    – percusse
    Commented Oct 1, 2014 at 17:57
  • Good solution, but I think this would put images on every run in the .tex files's directories, and this is not what I want. Otherwise several copies of the images will be present all over the filesystem...
    – Astrinus
    Commented Oct 2, 2014 at 7:19
  • Not really. filecontents won't overwrite if it is already created or you can control what to do. It's a good package.
    – percusse
    Commented Oct 2, 2014 at 7:31
  • But suppose I have my template in ~/texmf/tex/latex/ (or in /usr/share/texmf/tex/latex/, where the user can't write) and my .tex files in ~/tex. filecontents would write in the texmf/ tree or in ~/tex? And then, the doc of filecontents says "In the original code a pre-existing file would not be overwritten. In the new version the file existence check is used solely to decide whether to output “Writing file ‘ filename ’” or “Overwriting file ‘ filename ’”"
    – Astrinus
    Commented Oct 2, 2014 at 7:47
  • Your package should be in the local texmf not in the distro folders. Because it is not maintained by TeXLive. Otherwise make a package with a dtx structure and send them the whole package or even upload to CTAN. Then they can use the package right away.
    – percusse
    Commented Oct 2, 2014 at 8:15

1 Answer 1

0

Putting all the stuff in one of the texmf trees (with unique names) and adding some \RequirePackages solved all the problems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .