Page LayoutBeamer: Custom Beamer Theme

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
pooz
Posts: 65
Joined: Sat Apr 11, 2009 10:47 am

Beamer: Custom Beamer Theme

Post by pooz »

Hi,

I can use without any problems a custom beamer theme by installing the beamerthememyfile.sty in the same directory as the .tex-file and invoke it successfully by:

Code: Select all

% preamble
\usetheme{myfile}
But I really wouldlike to put this .sty-file(s) in a subfolder.
But how can I point to this subfolder for the themes?

Thank you very much!
cheers

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

pooz
Posts: 65
Joined: Sat Apr 11, 2009 10:47 am

Re: Beamer: Custom Beamer Theme

Post by pooz »

Does anyone have an Idea, how to move a themefile in another directory than the .tex-file resides in?

Thanks!
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Beamer: Custom Beamer Theme

Post by frabjous »

What operating system and latex distribution are you using?
pooz
Posts: 65
Joined: Sat Apr 11, 2009 10:47 am

Re: Beamer: Custom Beamer Theme

Post by pooz »

Mac OS X 10.6.4 and TeXLive-2009
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Beamer: Custom Beamer Theme

Post by frabjous »

This is just a guess, since I'm not a mac user, but try this.

In a terminal type:

tlmgr conf | grep "TEXMFHOME"

It should show you where your local (personal) tex tree is located, or should be located. For me (on linux), it gives:

TEXMFHOME=/home/username/texmf

Mac probably uses "Users" rather than "home", etc., and your actual username rather than "username", etc.

Navigate to that directory (create it if need be):

cd /home/username/texmf
(or whatever)

See if there's a subfolder tex (if not, create it), and then a subfolder of it, latex, then a subfolder of it, beamer, and them a subfolder of it, themes. So the final folder might be something like:

/home/username/texmf/tex/latex/beamer/themes/

Put your .sty file in there, and then run texhash afterwards. (On linux, you need to run "sudo texhash" to run as superuser, but I don't know what the equivalent is on Mac, if any.) I hope that would work. You'll have to try it and let us know.
pooz
Posts: 65
Joined: Sat Apr 11, 2009 10:47 am

Beamer: Custom Beamer Theme

Post by pooz »

Thank you,

your solution works:
I just copied my theme in the folder

Code: Select all

~/Library/texmf/tex/latex
and LaTeX found it automatically.

But now the theme is located in a system folder of my system. The Idea behind my request was, to put the theme in a kind of a Latex-Project folder, like:

Code: Select all

MyLatexFiles\Themes\theme.sty
MyLatexFiles\Paper
MyLatexFiles\Paper2
...
so that all tex files of my Papers access the Themes-Folder and I can copy/backup the "MyLatexFiles" and am on the save side, that I have saved all files, which are needed :-D
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Beamer: Custom Beamer Theme

Post by frabjous »

I haven't tried, but have you tried:

\usetheme{Themes/themename}?

or maybe:

\usepackage{Themes/themename}

?

Well, maybe I'll try it just for the heck of it. I'll report back.

REPORT: Yeah, the latter option seems to work, at least for me. \usetheme{..} is basically the same as \usepackage{beamertheme..}, so you can achieve the same effect with \usepackage{Foldername/beamerthemeName} where the .sty file for the theme is beamerthemeName.sty.
pooz
Posts: 65
Joined: Sat Apr 11, 2009 10:47 am

Beamer: Custom Beamer Theme

Post by pooz »

Thank you, frabjous,

Now I encounter the problem, that other files, which are needed by the theme file, won´t be found, e.g.

\usepackage{ThemeFolder/beamerthemename}

Code: Select all

LaTeX Warning: You have requested package `ThemeFolder/beamerthemename',
! LaTeX Error: File `beamerouterthemename.sty' not found.
Any idea?
Thanks for your help.
Post Reply