6

While working on my thesis, I customized a beamer theme with the corporate design of my university. Now I would like to share it with other students so they don't need to bother with recreating a nice beamer template. I would like to be able to share the theme locally, since it includes some pictures and artwork that I cannot publish freely.

Is there a good, well-accepted way to share a beamer theme with others? Actually, the question can be divided into two parts:

  1. How should I format and divide my code? Should I use beamer's structure of inner, outer, font and color theme? What should I do with packages and commands that are currently in the preamble of my document and needed for the the theme (e.g. fonts)?
  2. How do I distribute the code? Where should users "install" the theme (most other students are less proficient of LaTeX than I am, I think)? Are there other things I should consider?
  • 1
    github or ctan are the standard places. – percusse Apr 4 '16 at 11:12
  • Is your question how to distribute the theme, or how to make your mods into a package that can be distributed? – Johannes_B Apr 4 '16 at 11:22
  • 1
    If it's college/university only, you could distribute it over a elearning platform such as moodle. You might also ask your IT department if they can setup a permanent host for you. – naphaneal Apr 4 '16 at 11:53
4

Disclaimer: Highly opinion based

How to formate?

I would definitely go with the standard beamer way and divide into inner-, outer-, color-, and fonttheme.

This seems to be the best way that future generations of user can modify it. Let's say they want to change a colour:

  • An experienced user will know which file to modify and quickly find the relevant lines.

  • But it will also be advantageous for new users. Instead of having to search through a very long and complex file to find the correct line, the filename will give them a clue where to look (OK, outer and inner are not so intuitive, but the others are) or they can ask here and will hopefully get the answer "if the theme is following standard beamer conventions, look in the ...colortheme.sty".

What to do with stuff in the preamble?

Don't rely on that users will copy your example and use the things from your preamble. So everything which is necessary to compile your theme should go into the the theme files. You can include packages with \RequirePackage{}.

But keep a few thing in mind:

  • Try to limit the use. This might be completely harmless with standard packages which are part of every basic tex distribution, but packages can also cause problems.

  • For non-standard packages users might be annoyed if they have the install them

  • Especially for "heavy" packages like tikz there is a risk for incompatibilities or option clashes with other packages. It also seems that there was a lot of work done on these packages over the last few years. Which is great as many things were improved, but using their new features will cause problems with users of previous versions.

fonts?

Every time you use something non-standard, provide an automatic fallback solution. Judging from the number of questions on this site fonts are first thing that can go wrong. Especially if you fold in a number of different operating systems.

Where to distribute?

This depends. If you won't continue working on this project, a static solution may be fine. For example place a .zip on some internal website or similar. If you are going to continue this project or fix bugs a dynamic hosting might be favourable. If you use version control services like bitbucket also offer privat repositories where your users can get up to date versions. But this requires your potential users to have an account there...

Where should users "install" the theme?

For inexperienced users the easiest instruction is to just copy all the .sty files and images from your .zip file in the same folder as their document. That way all the files will be found.

Of course this gets annoying once the user wants to work on different projects with this theme. Then the advanced install instruction should be to place the folder with the theme files in their local $TEXMF path.

Are there other things I should consider?

  • One problem I ran into where different requirements for include paths of images, depending if the files where placed in the texmf tree of the folder of the current document. In the end I used this solution: https://tex.stackexchange.com/a/242236/36296

  • Be cautious with fancy stuff. Something might work on your computer. It might work on all the computers you test it with, but be assured there will be some combination of operating system, pdf viewers and tex distributions outdated for centuries which will break it - and one of your users will always find this combination.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.