Explicit way to define fonts in the document











up vote
1
down vote

favorite












I have been trying to set up a poster using beamer. My problem is that the poster has very clear specifications: 24-point for paragraphs, 24-point for figure captions, 28-point for authors' names and 36-point for title.



This might be for my lack of knowledge (even though I have been using LaTeX for about 6 years), but I feel like this is one way that word is way better than LaTeX (and it pains me to say that), since with word I know exactly which font is used each part.



In latex not only I can only choose some pre-defined fonts for my document in documentclass, but after I do that it's not explicit which fonts are what size. (Is the base font the font for the paragraph? Then what font is the title? And the Section headers?)



Beamer tries to solve this with the setbeamerfont command, but I found that for some reason it doesn't work for every theme, so either it really doesn't work, or I'm using it wrong and it's a counter-intuitive command.



My question is: is there a way to define each font in your document explicitly, easily, and that works across classes? (So I don't have to learn a command for beamer, a command for reports, etc.)



Here's a MWE. In this example some definitions work and some don't. But most importantly I can't use these definitions with other classes, so they're not general.



documentclass[final]{beamer}
usepackage{beamerposter} % Use the beamerposter package for laying out the poster

% These work
setbeamerfont{title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{block title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{author}{size={fontsize{36}{32}}}
setbeamerfont{date}{size={fontsize{36}{32}}}
% These don't work
setbeamerfont{normaltext}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}
setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}

title{Fake title for MWE} % Poster title
author{Author 1 and Author 2} % Author(s)

begin{document}
maketitle

begin{frame}
begin{alertblock}{Summary}
We introduce a package that makes data processing
significatly more efficient:
begin{itemize}
item Easy to use
item Oopen-source
end{itemize}
end{alertblock}

end{frame} % End of the enclosing frame
end{document}









share|improve this question
























  • Please post a minimal, but compilable example (MWE).
    – TeXnician
    Nov 19 '17 at 17:43










  • It's a general question. I don't see which MWE I could post to illustrate it better. I'll try to come up with something
    – TomCho
    Nov 19 '17 at 17:45










  • You could post a MWE for a beamerposter pointing out where you want which size of text to be applied.
    – TeXnician
    Nov 19 '17 at 17:46










  • @TeXnician I added some MWE. Hope that's what you had in mind.
    – TomCho
    Nov 19 '17 at 18:06










  • Do you really need to use beamer? Are you willing to switch to LuaLaTeX?
    – user139954
    Nov 19 '17 at 18:14















up vote
1
down vote

favorite












I have been trying to set up a poster using beamer. My problem is that the poster has very clear specifications: 24-point for paragraphs, 24-point for figure captions, 28-point for authors' names and 36-point for title.



This might be for my lack of knowledge (even though I have been using LaTeX for about 6 years), but I feel like this is one way that word is way better than LaTeX (and it pains me to say that), since with word I know exactly which font is used each part.



In latex not only I can only choose some pre-defined fonts for my document in documentclass, but after I do that it's not explicit which fonts are what size. (Is the base font the font for the paragraph? Then what font is the title? And the Section headers?)



Beamer tries to solve this with the setbeamerfont command, but I found that for some reason it doesn't work for every theme, so either it really doesn't work, or I'm using it wrong and it's a counter-intuitive command.



My question is: is there a way to define each font in your document explicitly, easily, and that works across classes? (So I don't have to learn a command for beamer, a command for reports, etc.)



Here's a MWE. In this example some definitions work and some don't. But most importantly I can't use these definitions with other classes, so they're not general.



documentclass[final]{beamer}
usepackage{beamerposter} % Use the beamerposter package for laying out the poster

% These work
setbeamerfont{title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{block title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{author}{size={fontsize{36}{32}}}
setbeamerfont{date}{size={fontsize{36}{32}}}
% These don't work
setbeamerfont{normaltext}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}
setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}

title{Fake title for MWE} % Poster title
author{Author 1 and Author 2} % Author(s)

begin{document}
maketitle

begin{frame}
begin{alertblock}{Summary}
We introduce a package that makes data processing
significatly more efficient:
begin{itemize}
item Easy to use
item Oopen-source
end{itemize}
end{alertblock}

end{frame} % End of the enclosing frame
end{document}









share|improve this question
























  • Please post a minimal, but compilable example (MWE).
    – TeXnician
    Nov 19 '17 at 17:43










  • It's a general question. I don't see which MWE I could post to illustrate it better. I'll try to come up with something
    – TomCho
    Nov 19 '17 at 17:45










  • You could post a MWE for a beamerposter pointing out where you want which size of text to be applied.
    – TeXnician
    Nov 19 '17 at 17:46










  • @TeXnician I added some MWE. Hope that's what you had in mind.
    – TomCho
    Nov 19 '17 at 18:06










  • Do you really need to use beamer? Are you willing to switch to LuaLaTeX?
    – user139954
    Nov 19 '17 at 18:14













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have been trying to set up a poster using beamer. My problem is that the poster has very clear specifications: 24-point for paragraphs, 24-point for figure captions, 28-point for authors' names and 36-point for title.



This might be for my lack of knowledge (even though I have been using LaTeX for about 6 years), but I feel like this is one way that word is way better than LaTeX (and it pains me to say that), since with word I know exactly which font is used each part.



In latex not only I can only choose some pre-defined fonts for my document in documentclass, but after I do that it's not explicit which fonts are what size. (Is the base font the font for the paragraph? Then what font is the title? And the Section headers?)



Beamer tries to solve this with the setbeamerfont command, but I found that for some reason it doesn't work for every theme, so either it really doesn't work, or I'm using it wrong and it's a counter-intuitive command.



My question is: is there a way to define each font in your document explicitly, easily, and that works across classes? (So I don't have to learn a command for beamer, a command for reports, etc.)



Here's a MWE. In this example some definitions work and some don't. But most importantly I can't use these definitions with other classes, so they're not general.



documentclass[final]{beamer}
usepackage{beamerposter} % Use the beamerposter package for laying out the poster

% These work
setbeamerfont{title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{block title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{author}{size={fontsize{36}{32}}}
setbeamerfont{date}{size={fontsize{36}{32}}}
% These don't work
setbeamerfont{normaltext}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}
setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}

title{Fake title for MWE} % Poster title
author{Author 1 and Author 2} % Author(s)

begin{document}
maketitle

begin{frame}
begin{alertblock}{Summary}
We introduce a package that makes data processing
significatly more efficient:
begin{itemize}
item Easy to use
item Oopen-source
end{itemize}
end{alertblock}

end{frame} % End of the enclosing frame
end{document}









share|improve this question















I have been trying to set up a poster using beamer. My problem is that the poster has very clear specifications: 24-point for paragraphs, 24-point for figure captions, 28-point for authors' names and 36-point for title.



This might be for my lack of knowledge (even though I have been using LaTeX for about 6 years), but I feel like this is one way that word is way better than LaTeX (and it pains me to say that), since with word I know exactly which font is used each part.



In latex not only I can only choose some pre-defined fonts for my document in documentclass, but after I do that it's not explicit which fonts are what size. (Is the base font the font for the paragraph? Then what font is the title? And the Section headers?)



Beamer tries to solve this with the setbeamerfont command, but I found that for some reason it doesn't work for every theme, so either it really doesn't work, or I'm using it wrong and it's a counter-intuitive command.



My question is: is there a way to define each font in your document explicitly, easily, and that works across classes? (So I don't have to learn a command for beamer, a command for reports, etc.)



Here's a MWE. In this example some definitions work and some don't. But most importantly I can't use these definitions with other classes, so they're not general.



documentclass[final]{beamer}
usepackage{beamerposter} % Use the beamerposter package for laying out the poster

% These work
setbeamerfont{title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{block title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{author}{size={fontsize{36}{32}}}
setbeamerfont{date}{size={fontsize{36}{32}}}
% These don't work
setbeamerfont{normaltext}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}
setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}

title{Fake title for MWE} % Poster title
author{Author 1 and Author 2} % Author(s)

begin{document}
maketitle

begin{frame}
begin{alertblock}{Summary}
We introduce a package that makes data processing
significatly more efficient:
begin{itemize}
item Easy to use
item Oopen-source
end{itemize}
end{alertblock}

end{frame} % End of the enclosing frame
end{document}






beamer fonts beamerposter






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 '17 at 18:06

























asked Nov 19 '17 at 17:40









TomCho

1849




1849












  • Please post a minimal, but compilable example (MWE).
    – TeXnician
    Nov 19 '17 at 17:43










  • It's a general question. I don't see which MWE I could post to illustrate it better. I'll try to come up with something
    – TomCho
    Nov 19 '17 at 17:45










  • You could post a MWE for a beamerposter pointing out where you want which size of text to be applied.
    – TeXnician
    Nov 19 '17 at 17:46










  • @TeXnician I added some MWE. Hope that's what you had in mind.
    – TomCho
    Nov 19 '17 at 18:06










  • Do you really need to use beamer? Are you willing to switch to LuaLaTeX?
    – user139954
    Nov 19 '17 at 18:14


















  • Please post a minimal, but compilable example (MWE).
    – TeXnician
    Nov 19 '17 at 17:43










  • It's a general question. I don't see which MWE I could post to illustrate it better. I'll try to come up with something
    – TomCho
    Nov 19 '17 at 17:45










  • You could post a MWE for a beamerposter pointing out where you want which size of text to be applied.
    – TeXnician
    Nov 19 '17 at 17:46










  • @TeXnician I added some MWE. Hope that's what you had in mind.
    – TomCho
    Nov 19 '17 at 18:06










  • Do you really need to use beamer? Are you willing to switch to LuaLaTeX?
    – user139954
    Nov 19 '17 at 18:14
















Please post a minimal, but compilable example (MWE).
– TeXnician
Nov 19 '17 at 17:43




Please post a minimal, but compilable example (MWE).
– TeXnician
Nov 19 '17 at 17:43












It's a general question. I don't see which MWE I could post to illustrate it better. I'll try to come up with something
– TomCho
Nov 19 '17 at 17:45




It's a general question. I don't see which MWE I could post to illustrate it better. I'll try to come up with something
– TomCho
Nov 19 '17 at 17:45












You could post a MWE for a beamerposter pointing out where you want which size of text to be applied.
– TeXnician
Nov 19 '17 at 17:46




You could post a MWE for a beamerposter pointing out where you want which size of text to be applied.
– TeXnician
Nov 19 '17 at 17:46












@TeXnician I added some MWE. Hope that's what you had in mind.
– TomCho
Nov 19 '17 at 18:06




@TeXnician I added some MWE. Hope that's what you had in mind.
– TomCho
Nov 19 '17 at 18:06












Do you really need to use beamer? Are you willing to switch to LuaLaTeX?
– user139954
Nov 19 '17 at 18:14




Do you really need to use beamer? Are you willing to switch to LuaLaTeX?
– user139954
Nov 19 '17 at 18:14










1 Answer
1






active

oldest

votes

















up vote
1
down vote













To answer for the % These don't work fonts:





  • setbeamerfont{normaltext}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}



    There is a missing space, it should be normal text and a little trick is necessary to use this template, namely AtBeginDocument{usebeamerfont{normal text}}



  • setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
    This command already works perfectly fine, but you are not using block but alertblock, so you'll need setbeamerfont{block body alerted}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}





documentclass[final]{beamer}
usepackage{beamerposter} % Use the beamerposter package for laying out the poster

% These work
setbeamerfont{title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{block title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{author}{size={fontsize{36}{32}}}
setbeamerfont{date}{size={fontsize{36}{32}}}
setbeamerfont{block body alerted}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
setbeamerfont{normal text}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}
AtBeginDocument{usebeamerfont{normal text}}

title{Fake title for MWE} % Poster title
author{Author 1 and Author 2} % Author(s)

begin{document}
begin{frame}
maketitle
text

begin{alertblock}{Summary}
We introduce a package that makes data processing
significatly more efficient:
begin{itemize}
item Easy to use
item Oopen-source
end{itemize}
end{alertblock}

end{frame} % End of the enclosing frame
end{document}


Result:
enter image description here






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f402111%2fexplicit-way-to-define-fonts-in-the-document%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    To answer for the % These don't work fonts:





    • setbeamerfont{normaltext}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}



      There is a missing space, it should be normal text and a little trick is necessary to use this template, namely AtBeginDocument{usebeamerfont{normal text}}



    • setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
      This command already works perfectly fine, but you are not using block but alertblock, so you'll need setbeamerfont{block body alerted}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}





    documentclass[final]{beamer}
    usepackage{beamerposter} % Use the beamerposter package for laying out the poster

    % These work
    setbeamerfont{title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
    setbeamerfont{block title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
    setbeamerfont{author}{size={fontsize{36}{32}}}
    setbeamerfont{date}{size={fontsize{36}{32}}}
    setbeamerfont{block body alerted}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
    setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
    setbeamerfont{normal text}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}
    AtBeginDocument{usebeamerfont{normal text}}

    title{Fake title for MWE} % Poster title
    author{Author 1 and Author 2} % Author(s)

    begin{document}
    begin{frame}
    maketitle
    text

    begin{alertblock}{Summary}
    We introduce a package that makes data processing
    significatly more efficient:
    begin{itemize}
    item Easy to use
    item Oopen-source
    end{itemize}
    end{alertblock}

    end{frame} % End of the enclosing frame
    end{document}


    Result:
    enter image description here






    share|improve this answer



























      up vote
      1
      down vote













      To answer for the % These don't work fonts:





      • setbeamerfont{normaltext}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}



        There is a missing space, it should be normal text and a little trick is necessary to use this template, namely AtBeginDocument{usebeamerfont{normal text}}



      • setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
        This command already works perfectly fine, but you are not using block but alertblock, so you'll need setbeamerfont{block body alerted}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}





      documentclass[final]{beamer}
      usepackage{beamerposter} % Use the beamerposter package for laying out the poster

      % These work
      setbeamerfont{title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
      setbeamerfont{block title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
      setbeamerfont{author}{size={fontsize{36}{32}}}
      setbeamerfont{date}{size={fontsize{36}{32}}}
      setbeamerfont{block body alerted}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
      setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
      setbeamerfont{normal text}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}
      AtBeginDocument{usebeamerfont{normal text}}

      title{Fake title for MWE} % Poster title
      author{Author 1 and Author 2} % Author(s)

      begin{document}
      begin{frame}
      maketitle
      text

      begin{alertblock}{Summary}
      We introduce a package that makes data processing
      significatly more efficient:
      begin{itemize}
      item Easy to use
      item Oopen-source
      end{itemize}
      end{alertblock}

      end{frame} % End of the enclosing frame
      end{document}


      Result:
      enter image description here






      share|improve this answer

























        up vote
        1
        down vote










        up vote
        1
        down vote









        To answer for the % These don't work fonts:





        • setbeamerfont{normaltext}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}



          There is a missing space, it should be normal text and a little trick is necessary to use this template, namely AtBeginDocument{usebeamerfont{normal text}}



        • setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
          This command already works perfectly fine, but you are not using block but alertblock, so you'll need setbeamerfont{block body alerted}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}





        documentclass[final]{beamer}
        usepackage{beamerposter} % Use the beamerposter package for laying out the poster

        % These work
        setbeamerfont{title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
        setbeamerfont{block title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
        setbeamerfont{author}{size={fontsize{36}{32}}}
        setbeamerfont{date}{size={fontsize{36}{32}}}
        setbeamerfont{block body alerted}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
        setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
        setbeamerfont{normal text}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}
        AtBeginDocument{usebeamerfont{normal text}}

        title{Fake title for MWE} % Poster title
        author{Author 1 and Author 2} % Author(s)

        begin{document}
        begin{frame}
        maketitle
        text

        begin{alertblock}{Summary}
        We introduce a package that makes data processing
        significatly more efficient:
        begin{itemize}
        item Easy to use
        item Oopen-source
        end{itemize}
        end{alertblock}

        end{frame} % End of the enclosing frame
        end{document}


        Result:
        enter image description here






        share|improve this answer














        To answer for the % These don't work fonts:





        • setbeamerfont{normaltext}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}



          There is a missing space, it should be normal text and a little trick is necessary to use this template, namely AtBeginDocument{usebeamerfont{normal text}}



        • setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
          This command already works perfectly fine, but you are not using block but alertblock, so you'll need setbeamerfont{block body alerted}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}





        documentclass[final]{beamer}
        usepackage{beamerposter} % Use the beamerposter package for laying out the poster

        % These work
        setbeamerfont{title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
        setbeamerfont{block title}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
        setbeamerfont{author}{size={fontsize{36}{32}}}
        setbeamerfont{date}{size={fontsize{36}{32}}}
        setbeamerfont{block body alerted}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
        setbeamerfont{block body}{family=rmfamily,series=bfseries,size={fontsize{36}{32}}}
        setbeamerfont{normal text}{family=rmfamily,series=bfseries,size={fontsize{30}{32}}}
        AtBeginDocument{usebeamerfont{normal text}}

        title{Fake title for MWE} % Poster title
        author{Author 1 and Author 2} % Author(s)

        begin{document}
        begin{frame}
        maketitle
        text

        begin{alertblock}{Summary}
        We introduce a package that makes data processing
        significatly more efficient:
        begin{itemize}
        item Easy to use
        item Oopen-source
        end{itemize}
        end{alertblock}

        end{frame} % End of the enclosing frame
        end{document}


        Result:
        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 13 at 0:04









        LCarvalho

        969317




        969317










        answered Nov 19 '17 at 18:17









        samcarter

        81.5k791262




        81.5k791262






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f402111%2fexplicit-way-to-define-fonts-in-the-document%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?