Change font in just one tabular / section to sans-serif











up vote
1
down vote

favorite












I don't think it's difficult but I got no right answer on google, so I have to asked here:



How to change the font to sans-serif for just one section or the tabular. And I also need the right way to change it back after the tabular, I don't want to use another font, because there should be three default fonts in LaTeX?



My LaTeX code is super simple:



section{2. Section}
begin{tabular}{| c c c c c c c c c c}
...
end{tabular}


Thanks in advance!










share|improve this question









New contributor




Tim4497 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome to TeX.Stackexchange! Can you try the following code: { sffamily begin{tabular}....end{tabular} } ? (the { } around everything will restrict the font change to just this group, so you don't have to worry about changing the font back afterwards)
    – samcarter
    yesterday












  • Hi, welcome to Tex.sx! Please always provide a full minimal working example (MWE) tex.meta.stackexchange.com/questions/228/… when posting a question here. This is quite a basic question. Have a look at overleaf.com/learn/latex/… for choosing a sans-serif for a part of your text. For example use: textsf{Sample Text 0123} within your tabular or do like @samcarter said.
    – JohanFit
    yesterday

















up vote
1
down vote

favorite












I don't think it's difficult but I got no right answer on google, so I have to asked here:



How to change the font to sans-serif for just one section or the tabular. And I also need the right way to change it back after the tabular, I don't want to use another font, because there should be three default fonts in LaTeX?



My LaTeX code is super simple:



section{2. Section}
begin{tabular}{| c c c c c c c c c c}
...
end{tabular}


Thanks in advance!










share|improve this question









New contributor




Tim4497 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome to TeX.Stackexchange! Can you try the following code: { sffamily begin{tabular}....end{tabular} } ? (the { } around everything will restrict the font change to just this group, so you don't have to worry about changing the font back afterwards)
    – samcarter
    yesterday












  • Hi, welcome to Tex.sx! Please always provide a full minimal working example (MWE) tex.meta.stackexchange.com/questions/228/… when posting a question here. This is quite a basic question. Have a look at overleaf.com/learn/latex/… for choosing a sans-serif for a part of your text. For example use: textsf{Sample Text 0123} within your tabular or do like @samcarter said.
    – JohanFit
    yesterday















up vote
1
down vote

favorite









up vote
1
down vote

favorite











I don't think it's difficult but I got no right answer on google, so I have to asked here:



How to change the font to sans-serif for just one section or the tabular. And I also need the right way to change it back after the tabular, I don't want to use another font, because there should be three default fonts in LaTeX?



My LaTeX code is super simple:



section{2. Section}
begin{tabular}{| c c c c c c c c c c}
...
end{tabular}


Thanks in advance!










share|improve this question









New contributor




Tim4497 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I don't think it's difficult but I got no right answer on google, so I have to asked here:



How to change the font to sans-serif for just one section or the tabular. And I also need the right way to change it back after the tabular, I don't want to use another font, because there should be three default fonts in LaTeX?



My LaTeX code is super simple:



section{2. Section}
begin{tabular}{| c c c c c c c c c c}
...
end{tabular}


Thanks in advance!







fonts sans-serif






share|improve this question









New contributor




Tim4497 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Tim4497 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Bernard

162k767192




162k767192






New contributor




Tim4497 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









Tim4497

61




61




New contributor




Tim4497 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Tim4497 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Tim4497 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Welcome to TeX.Stackexchange! Can you try the following code: { sffamily begin{tabular}....end{tabular} } ? (the { } around everything will restrict the font change to just this group, so you don't have to worry about changing the font back afterwards)
    – samcarter
    yesterday












  • Hi, welcome to Tex.sx! Please always provide a full minimal working example (MWE) tex.meta.stackexchange.com/questions/228/… when posting a question here. This is quite a basic question. Have a look at overleaf.com/learn/latex/… for choosing a sans-serif for a part of your text. For example use: textsf{Sample Text 0123} within your tabular or do like @samcarter said.
    – JohanFit
    yesterday




















  • Welcome to TeX.Stackexchange! Can you try the following code: { sffamily begin{tabular}....end{tabular} } ? (the { } around everything will restrict the font change to just this group, so you don't have to worry about changing the font back afterwards)
    – samcarter
    yesterday












  • Hi, welcome to Tex.sx! Please always provide a full minimal working example (MWE) tex.meta.stackexchange.com/questions/228/… when posting a question here. This is quite a basic question. Have a look at overleaf.com/learn/latex/… for choosing a sans-serif for a part of your text. For example use: textsf{Sample Text 0123} within your tabular or do like @samcarter said.
    – JohanFit
    yesterday


















Welcome to TeX.Stackexchange! Can you try the following code: { sffamily begin{tabular}....end{tabular} } ? (the { } around everything will restrict the font change to just this group, so you don't have to worry about changing the font back afterwards)
– samcarter
yesterday






Welcome to TeX.Stackexchange! Can you try the following code: { sffamily begin{tabular}....end{tabular} } ? (the { } around everything will restrict the font change to just this group, so you don't have to worry about changing the font back afterwards)
– samcarter
yesterday














Hi, welcome to Tex.sx! Please always provide a full minimal working example (MWE) tex.meta.stackexchange.com/questions/228/… when posting a question here. This is quite a basic question. Have a look at overleaf.com/learn/latex/… for choosing a sans-serif for a part of your text. For example use: textsf{Sample Text 0123} within your tabular or do like @samcarter said.
– JohanFit
yesterday






Hi, welcome to Tex.sx! Please always provide a full minimal working example (MWE) tex.meta.stackexchange.com/questions/228/… when posting a question here. This is quite a basic question. Have a look at overleaf.com/learn/latex/… for choosing a sans-serif for a part of your text. For example use: textsf{Sample Text 0123} within your tabular or do like @samcarter said.
– JohanFit
yesterday












1 Answer
1






active

oldest

votes

















up vote
1
down vote













To change the font to sans serife you can use command sffamily.



To make sure that only your tabular uses the other font simply enclose command sffamily and your table with {...}. That means that after the closing } the old font before { is used again.



See the following MWE



documentclass{article}

begin{document}
text text text text text
{sffamily % <===========================================================
section{2. Section}
begin{tabular}{| c c c c c c c c c c}
test & test & test & test & test & test & test & test & test & test \
test & test & test & test & test & test & test & test & test & test \
end{tabular}
} % <====================================================================
end{document}


and the resulting pdf:



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
    });


    }
    });






    Tim4497 is a new contributor. Be nice, and check out our Code of Conduct.










     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461106%2fchange-font-in-just-one-tabular-section-to-sans-serif%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 change the font to sans serife you can use command sffamily.



    To make sure that only your tabular uses the other font simply enclose command sffamily and your table with {...}. That means that after the closing } the old font before { is used again.



    See the following MWE



    documentclass{article}

    begin{document}
    text text text text text
    {sffamily % <===========================================================
    section{2. Section}
    begin{tabular}{| c c c c c c c c c c}
    test & test & test & test & test & test & test & test & test & test \
    test & test & test & test & test & test & test & test & test & test \
    end{tabular}
    } % <====================================================================
    end{document}


    and the resulting pdf:



    enter image description here






    share|improve this answer

























      up vote
      1
      down vote













      To change the font to sans serife you can use command sffamily.



      To make sure that only your tabular uses the other font simply enclose command sffamily and your table with {...}. That means that after the closing } the old font before { is used again.



      See the following MWE



      documentclass{article}

      begin{document}
      text text text text text
      {sffamily % <===========================================================
      section{2. Section}
      begin{tabular}{| c c c c c c c c c c}
      test & test & test & test & test & test & test & test & test & test \
      test & test & test & test & test & test & test & test & test & test \
      end{tabular}
      } % <====================================================================
      end{document}


      and the resulting pdf:



      enter image description here






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        To change the font to sans serife you can use command sffamily.



        To make sure that only your tabular uses the other font simply enclose command sffamily and your table with {...}. That means that after the closing } the old font before { is used again.



        See the following MWE



        documentclass{article}

        begin{document}
        text text text text text
        {sffamily % <===========================================================
        section{2. Section}
        begin{tabular}{| c c c c c c c c c c}
        test & test & test & test & test & test & test & test & test & test \
        test & test & test & test & test & test & test & test & test & test \
        end{tabular}
        } % <====================================================================
        end{document}


        and the resulting pdf:



        enter image description here






        share|improve this answer












        To change the font to sans serife you can use command sffamily.



        To make sure that only your tabular uses the other font simply enclose command sffamily and your table with {...}. That means that after the closing } the old font before { is used again.



        See the following MWE



        documentclass{article}

        begin{document}
        text text text text text
        {sffamily % <===========================================================
        section{2. Section}
        begin{tabular}{| c c c c c c c c c c}
        test & test & test & test & test & test & test & test & test & test \
        test & test & test & test & test & test & test & test & test & test \
        end{tabular}
        } % <====================================================================
        end{document}


        and the resulting pdf:



        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered yesterday









        Kurt

        33.9k846156




        33.9k846156






















            Tim4497 is a new contributor. Be nice, and check out our Code of Conduct.










             

            draft saved


            draft discarded


















            Tim4497 is a new contributor. Be nice, and check out our Code of Conduct.













            Tim4497 is a new contributor. Be nice, and check out our Code of Conduct.












            Tim4497 is a new contributor. Be nice, and check out our Code of Conduct.















             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461106%2fchange-font-in-just-one-tabular-section-to-sans-serif%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

            サソリ

            広島県道265号伴広島線

            Accessing regular linux commands in Huawei's Dopra Linux