Best way to start customizing Beamer slides

Hello,

I would like to start using TeXmacs for my Beamer presentations.

I’ve got a lot of them in .tex using the beamer class and would like to use the same theme as in my latex documents: I’m using the metropolis theme https://github.com/matze/mtheme

What’s the best starting point to customize a TeXmacs Beamer theme:

  • Title: title bar color, title text alignment, title font size, …
  • Ornament: color, shape, …
  • Slide footer: slide number/total slides number, …

I would like to be able to organize the presentation in section, subsection and to automatically have:

  • the section (on the left) and subsection(on the right) titles in the tile bar of the TeXmacs slide as it the case with latex beamer.
  • a new slide with the section title in it.

Don’t know if it’s possible with TeXmacs, but any help will be warmly welcome :slight_smile:
Have a nice day.

François

Hi François,

That’s a good idea. Beamer Metropolis is an attractive and popular theme, so we can try to make a clone :slight_smile:

Some of the style options in the Beamer style are available from the menus. E.g. if you are in a “strong” tag, you can right-click and go to Preferences->Stong Color to select the color of strong elements.

The title doesn’t seem to have many options to configure it, so you’d have to redefine the tit macro (you can find its definition by entering the title, right-clicking, Preferences->Edit Source).

I’ve made an attempt to copy a few of the style properties of Metropolis and have the following in a style package:

<use-package|beamer|fira-font>

<assign|font-base-size|14>

<assign|title-color|white>

<assign|title-bar-color|#23373b>

<assign|strong-color|#eb811b>

<assign|tit|<\macro|body>
  <\no-margins>
<\surround|<assign|page-this-top|0mm>|<assign|gpag-length|<macro|<minus|1pag|<plus|<times|2|<value|title-vpadding>>|<times|<value|title-font-size>|1.5fn>|0.8fn|<value|par-par-sep>>>>>>
  <with|par-par-sep|0fn|color|<value|title-shadow-color>|font-size|<if|<value|title-old-style>|1|<value|title-font-size>>|<resize|<tabular*|<tformat|<twith|table-width|1par>|<twith|table-hmode|exact>|<cwith|1|1|1|-1|cell-tsep|<value|title-vpadding>>|<cwith|1|1|1|-1|cell-bsep|<value|title-vpadding>>|<cwith|1|1|1|-1|cell-background|<title-bar-color>>|<cwith|1|1|1|1|cell-halign|l>|<cwith|1|1|1|1|cell-hyphen|t>|<twith|table-valign|T>|<cwith|1|1|1|1|cell-bborder|<value|title-border>>|<table|<row|<\cell>
    <with-tit-color|<with|font-shape|small-caps|<arg|body>>>
  </cell>>>>>||<plus|1b|0.2fn>||>>
</surround>
</no-margins>
</macro>>

The title slide could be imitated by something like this:

<assign|title-slide|<\macro|title|author|institute>
  <\wide-tabular>
    <tformat|<cwith|1|1|1|1|cell-valign|c>|<cwith|1|1|1|1|cell-height|0.8pag>|<cwith|1|1|1|1|cell-vmode|exact>|<table|<row|<\cell>
      <\wide-tabular>
        <tformat|<cwith|1|-1|1|1|cell-lsep|1em>|<cwith|1|-1|1|1|cell-rsep|1em>|<cwith|3|4|1|1|cell-bsep|0.5em>|<cwith|3|4|1|1|cell-tsep|0.5em>|<cwith|1|1|1|1|cell-bsep|1em>|<cwith|1|1|1|1|cell-tsep|1em>|<table|<row|<\cell>
         <strong|<arg|title>>
        </cell>>|<row|<\cell>
          <with|color|#eb811b|<hrule>>
        </cell>>|<row|<\cell>
         <very-small|<arg|author>>
       </cell>>|<row|<\cell>
      <tiny|<arg|institute>>
    </cell>>>>
  </wide-tabular>
</cell>>>>
</wide-tabular>
</macro>>

1 Like

Wahoou I’m speechless …
I will try what you’ve kindly done in such a short time, well done : it’s beautiful !

Many thanks for your very helpful help :+1:

Glad you found it helpful!

I’ve had a quick look at automatically making section slides, but I think there is currently no way to do that in the beamer style. Something similar like the title-slide macro above could be done to at least imitate the style of Metropolis.

I agree, this is super and very much needed. We should try to have some common beamer style (or at least quite similar alternatives). I was discussing with Basile to have a repository to gather style files and examples, e.g. in GitHub. For example I’ve already initiated a page where to gather examples of documents: https://texmacs.github.io/notes/docs/example-documents.html What about setting up a GitHub repository with useful material like this style file? In this way it could be improved by the community with PR.

1 Like

I’d be happy to polish this a bit, put it in a style file and upload it somewhere. I notice there is also this “awesome texmacs” page. I could make a repo for my style files and create a PR to have it linked on the “awesome” page.

I think it should be done in a way to be encouraging to all users, so with an invitation to submit in a prominent place (or in several prominent places) and with corresponding advertisement (“you can find user-contributed styles and packages at …”).
For the “awesome” page, I would propose a slight reorganization to separate user-contributed extensions from documents and from external software.

Automatically making section slides could be indeed awesome, as your idea to put common beamer style (or similar alternatives) somewhere.

I feel like I’m a chick among eagles because I know I’m going to ask a stupid question …
Where ($TEXMACS_PATH/styles ?) should we put these style files that Jeroen very kindly shared and in what form (specific name) ?

Sorry, I’m that bad …

On which OS are you?

That page is a bit obsolete, we have now a similar page on the blog. I was thinking to create a GitHub repository for user contributions (style files, macros, etc…) where to accept pull requests, and possibly link the material from the blog, e.g. from the awesome page. For very simple additions like a single style file or a macro, etc… having a full-fledged repository for each seems bloated. What do you think? I was going to create a repository today for his but I was blocked at the choice of the name. Suggestions? Possibilities: texmacs-repo, tm-examples, etc…

You can just put in the same directory of the document. If you want a more stable location you have to put it in your $TEXMACS_HOME_PATH. Maybe you can check the location by opening a shell session inside TeXmacs and then calling the command echo $TEXMACS_HOME_PATH. This will show you the directory. There you can put it in the styles subdirectory.

I would imitate the names of archives of other programs, those which have been very successful at getting users to contribute (Perl, TeX, Python).
So “Comprehensive TeXmacs Archive” or “TeXmacs package index” :wink:

Sorry I wrote $TEXMACS_PATH but indeed mean the styles directory of my $HOME/.TeXmacs/ (my OS is linux)

Regarding the name of the repository there are already a bunch of excellent github repo which share the same name convention:



Why not an awesome-TeXmacs … and of course the name is not misleading :innocent:

Some communties call their user-contributed content sites “forges” (R-forge, Octave forge, etc.). How about tm-forge? Or simply texmacs/forge on github?

tm-forge could render the mail goal of the repository. awesome-texmacs is more for a place where to gather “links” to relevant material and we have already such a page on the blog (contributions are welcome btw!). texmacs comprehensive repository seems much bigger than what we have right now. so I can propose we start with tm-forge and as it grows we could move the material either in the main distro or in a comprehensive repository.

You’re right the awesome-name is perhaps more links, resources sharing.
tm-forge sounds good !

Here we are:

2 Likes

I’ve opted for tm-forge instead of texmacs/forge because the latter will not work well when cloning. Actually even texmacs/notes has the same problem…

Great many thanks :+1: