6

Is it possible to use a local theme placed in the the same folder as your current beamer project? I.e. having a them in /project-name/theme/ that you can make updates to and get the changes instantly when compiling your project.

This would be really handy when developing new themes as you (at least in Windows using MikTeX) have to constantly refresh the name database when developing.

7
  • 1
    Yes. MikTeX will find all themes or packages you have in your working folder. Commented Jul 12, 2013 at 7:59
  • Hi Ignasi, thank for answering my question, however this is not true in the setup I have on my machines. Do you need to add anything to the theme declaration? E.g. \usetheme{theme\my-theme}. Commented Jul 12, 2013 at 8:16
  • 1
    Ignasi is right. It's a big difference to have the package files in the working directory or in a subfolder of the working directory. Commented Jul 12, 2013 at 10:45
  • Hi Marco, Thank you for replying to my question. I did not fully understand your answer, but did you mean that if I put the Theme files directly into the working directory (wd) instead of having them in wd/theme this should work? This is a quick fix, but I would really like to be able to have all the theme files in a subfolder. Do You have any input on how to achieve this? Commented Jul 12, 2013 at 11:36
  • 1
    I don't have access to my computer now, but in the meanwhile, could try with \usepackage{theme\beamerthememy-theme} instead of usetheme? Commented Jul 12, 2013 at 13:29

1 Answer 1

8

If you look at beamerbasetheme.sty file will see that \usetheme commands are defined as particular \usepackage commands. So \usetheme{my-theme-name} is converted to \usepackage{beamerthememy-theme-name}. Similar conversions are done with color, outer, ... themes.

\mode <presentation> { \def\beamer@calltheme#1#2#3{% \def\beamer@themelist{#2} \@for\beamer@themename:=\beamer@themelist\do {\usepackage[{#1}]{#3\beamer@themename}}} \newcommand\usetheme[2][]{\beamer@calltheme{#1}{#2}{beamertheme}} \newcommand\usecolortheme[2][]{\beamer@calltheme{#1}{#2}{beamercolortheme}} \newcommand\usefonttheme[2][]{\beamer@calltheme{#1}{#2}{beamerfonttheme}} \newcommand\useoutertheme[2][]{\beamer@calltheme{#1}{#2}{beameroutertheme}} \newcommand\useinnertheme[2][]{\beamer@calltheme{#1}{#2}{beamerinnertheme}} } 

So if you want to place all your theme files inside a folder inside your working folder, the best solution I can provide is using \usepackage{theme-folder/my manually translated theme name}.

There is a better solution which I cannot provide which consist in hacking previous command with a fourth parameter consisting in your theme folder. Use these new commands while working whith your theme and forget them when you finish it and move all theme files to a regular tex folder.

5
  • What about options passed to beamer? How to handle those. Commented Jan 24, 2017 at 14:29
  • @Kyslik What does it mean? Could you show me an example? Commented Jan 24, 2017 at 15:13
  • \usepackage[options for beamer style]{folder/theme} like that Commented Jan 24, 2017 at 15:14
  • @Kyslik I don't know. Did you try it? Did you found any problem? If you found it, I think the best solution would be to ask a new question, because you will get a larger and better audience. You can mention this question if you consider it convenient. Commented Jan 24, 2017 at 15:23
  • @Kyslik AFAIK there are no options to be added to an \usetheme... Commented Apr 4, 2018 at 6:23

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.