When I tried to generate a table, I got this error “Undefined control sequence”, how to fix it?pdfx and “undefined control sequence” caused by Subject meta-tagPackage xcolor Error: Undefined colors “Maroon”/“Royal Blue” when master has PDF included classicthesis 3.1Error with using pdfpxdimen: “Undefined control sequence”Undefined control sequence when including pdfpages package

Did all integrated Commodore PET monitors always use 60 Hz refresh?

Would Topic Modelling be classified as NLP or NLU?

Unable to register mirrored Deployer Capabilities

Story ID: plugging vacuum leak with one's butt

How much of a discount should I seek when prepaying a whole year's rent?

Can we use a Cryptographic hash function to generate infinite random numbers?

Why is 1>a.txt 2>&1 different from 1>a.txt 2>a.txt ? (Example shown)

Biggest Irreducible Hello World

Why is Trump not being impeached for bribery?

Why does China have so few nuclear weapons?

"Dog" can mean "something of an inferior quality". What animals do we use, if any, to describe the opposite?

How do I compile something for Linux if I don't have enough space for installing GCC?

Sleep for 1000 years

What's the greatest number of hands I can have to annoy my mother-in-law with?

Arrange 5 non-attacking knights on a 5x5 toroidal board

How to analyse 'Element not Found' exceptions when working with Selenium

When is it not okay to cheap out on bike parts?

Is there something as common frequency?

Why do aircraft cockpit displays use uppercase fonts?

I shift the source code, you shift the input!

Does the basis graph of a matroid determine it?

How to say No to idea given by team member, when I know from my experience that it is going to fail?

Will the same Javascript fetched by HTTP and HTTPS be cached separately by the browser?

How do I force `sudo` to ask for a password each time when a specific command is used?



When I tried to generate a table, I got this error “Undefined control sequence”, how to fix it?


pdfx and “undefined control sequence” caused by Subject meta-tagPackage xcolor Error: Undefined colors “Maroon”/“Royal Blue” when master has PDF included classicthesis 3.1Error with using pdfpxdimen: “Undefined control sequence”Undefined control sequence when including pdfpages package






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









2


















This post gives a convenient approach to generate Latex code and I am trying to reproduce that.



This is a piece of Python code,



>>> df = pd.DataFrame('name': ['Raphael', 'Donatello'],
... 'mask': ['red', 'purple'],
... 'weapon': ['sai', 'bo staff'])
>>> print(df.to_latex(index=False)) # doctest: +NORMALIZE_WHITESPACE


which generated this Latex code



begintabularlll
toprule
name & mask & weapon \
midrule
Raphael & red & sai \
Donatello & purple & bo staff \
bottomrule
endtabular


I compiled this code and got this table



enter image description here



and this error



Undefined control sequence

l.15 toprule

The control sequence at the end of the top line
of your error message was never def'ed. If you have
misspelled it (e.g., `hobx'), type `I' and the correct
spelling (e.g., `Ihbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


How to fix it?










share|improve this question




















  • 4





    toprule is defined in the booktabs package. Just include it in your document.

    – Alain Merigot
    Sep 30 at 8:29











  • @AlainMerigot Thanks a lot! Please move your comments to answer, I'll accept it.

    – shi95
    Sep 30 at 8:45

















2


















This post gives a convenient approach to generate Latex code and I am trying to reproduce that.



This is a piece of Python code,



>>> df = pd.DataFrame('name': ['Raphael', 'Donatello'],
... 'mask': ['red', 'purple'],
... 'weapon': ['sai', 'bo staff'])
>>> print(df.to_latex(index=False)) # doctest: +NORMALIZE_WHITESPACE


which generated this Latex code



begintabularlll
toprule
name & mask & weapon \
midrule
Raphael & red & sai \
Donatello & purple & bo staff \
bottomrule
endtabular


I compiled this code and got this table



enter image description here



and this error



Undefined control sequence

l.15 toprule

The control sequence at the end of the top line
of your error message was never def'ed. If you have
misspelled it (e.g., `hobx'), type `I' and the correct
spelling (e.g., `Ihbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


How to fix it?










share|improve this question




















  • 4





    toprule is defined in the booktabs package. Just include it in your document.

    – Alain Merigot
    Sep 30 at 8:29











  • @AlainMerigot Thanks a lot! Please move your comments to answer, I'll accept it.

    – shi95
    Sep 30 at 8:45













2













2









2








This post gives a convenient approach to generate Latex code and I am trying to reproduce that.



This is a piece of Python code,



>>> df = pd.DataFrame('name': ['Raphael', 'Donatello'],
... 'mask': ['red', 'purple'],
... 'weapon': ['sai', 'bo staff'])
>>> print(df.to_latex(index=False)) # doctest: +NORMALIZE_WHITESPACE


which generated this Latex code



begintabularlll
toprule
name & mask & weapon \
midrule
Raphael & red & sai \
Donatello & purple & bo staff \
bottomrule
endtabular


I compiled this code and got this table



enter image description here



and this error



Undefined control sequence

l.15 toprule

The control sequence at the end of the top line
of your error message was never def'ed. If you have
misspelled it (e.g., `hobx'), type `I' and the correct
spelling (e.g., `Ihbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


How to fix it?










share|improve this question














This post gives a convenient approach to generate Latex code and I am trying to reproduce that.



This is a piece of Python code,



>>> df = pd.DataFrame('name': ['Raphael', 'Donatello'],
... 'mask': ['red', 'purple'],
... 'weapon': ['sai', 'bo staff'])
>>> print(df.to_latex(index=False)) # doctest: +NORMALIZE_WHITESPACE


which generated this Latex code



begintabularlll
toprule
name & mask & weapon \
midrule
Raphael & red & sai \
Donatello & purple & bo staff \
bottomrule
endtabular


I compiled this code and got this table



enter image description here



and this error



Undefined control sequence

l.15 toprule

The control sequence at the end of the top line
of your error message was never def'ed. If you have
misspelled it (e.g., `hobx'), type `I' and the correct
spelling (e.g., `Ihbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


How to fix it?







pdf






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 30 at 8:25









shi95shi95

1233 bronze badges




1233 bronze badges










  • 4





    toprule is defined in the booktabs package. Just include it in your document.

    – Alain Merigot
    Sep 30 at 8:29











  • @AlainMerigot Thanks a lot! Please move your comments to answer, I'll accept it.

    – shi95
    Sep 30 at 8:45












  • 4





    toprule is defined in the booktabs package. Just include it in your document.

    – Alain Merigot
    Sep 30 at 8:29











  • @AlainMerigot Thanks a lot! Please move your comments to answer, I'll accept it.

    – shi95
    Sep 30 at 8:45







4




4





toprule is defined in the booktabs package. Just include it in your document.

– Alain Merigot
Sep 30 at 8:29





toprule is defined in the booktabs package. Just include it in your document.

– Alain Merigot
Sep 30 at 8:29













@AlainMerigot Thanks a lot! Please move your comments to answer, I'll accept it.

– shi95
Sep 30 at 8:45





@AlainMerigot Thanks a lot! Please move your comments to answer, I'll accept it.

– shi95
Sep 30 at 8:45










1 Answer
1






active

oldest

votes


















6



















toprule (and midrule or bottomrule) are defined in the booktabs package. It must be included before any use.



This package largely improves the visual appearance of tables by providing rules with varying width and by fixing some line spacing problems. Standard latex uses hline to draw a rule between lines.



documentclassarticle

usepackagebooktabs

begindocument
begintabularlll
toprule
name & mask & weapon \
midrule
Raphael & red & sai \
Donatello & purple & bo staff \
bottomrule
endtabular
enddocument


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',
    autoActivateHeartbeat: false,
    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/4.0/"u003ecc by-sa 4.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%2f510374%2fwhen-i-tried-to-generate-a-table-i-got-this-error-undefined-control-sequence%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









    6



















    toprule (and midrule or bottomrule) are defined in the booktabs package. It must be included before any use.



    This package largely improves the visual appearance of tables by providing rules with varying width and by fixing some line spacing problems. Standard latex uses hline to draw a rule between lines.



    documentclassarticle

    usepackagebooktabs

    begindocument
    begintabularlll
    toprule
    name & mask & weapon \
    midrule
    Raphael & red & sai \
    Donatello & purple & bo staff \
    bottomrule
    endtabular
    enddocument


    enter image description here






    share|improve this answer





























      6



















      toprule (and midrule or bottomrule) are defined in the booktabs package. It must be included before any use.



      This package largely improves the visual appearance of tables by providing rules with varying width and by fixing some line spacing problems. Standard latex uses hline to draw a rule between lines.



      documentclassarticle

      usepackagebooktabs

      begindocument
      begintabularlll
      toprule
      name & mask & weapon \
      midrule
      Raphael & red & sai \
      Donatello & purple & bo staff \
      bottomrule
      endtabular
      enddocument


      enter image description here






      share|improve this answer



























        6















        6











        6









        toprule (and midrule or bottomrule) are defined in the booktabs package. It must be included before any use.



        This package largely improves the visual appearance of tables by providing rules with varying width and by fixing some line spacing problems. Standard latex uses hline to draw a rule between lines.



        documentclassarticle

        usepackagebooktabs

        begindocument
        begintabularlll
        toprule
        name & mask & weapon \
        midrule
        Raphael & red & sai \
        Donatello & purple & bo staff \
        bottomrule
        endtabular
        enddocument


        enter image description here






        share|improve this answer














        toprule (and midrule or bottomrule) are defined in the booktabs package. It must be included before any use.



        This package largely improves the visual appearance of tables by providing rules with varying width and by fixing some line spacing problems. Standard latex uses hline to draw a rule between lines.



        documentclassarticle

        usepackagebooktabs

        begindocument
        begintabularlll
        toprule
        name & mask & weapon \
        midrule
        Raphael & red & sai \
        Donatello & purple & bo staff \
        bottomrule
        endtabular
        enddocument


        enter image description here







        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Sep 30 at 9:01









        Alain MerigotAlain Merigot

        5041 gold badge2 silver badges7 bronze badges




        5041 gold badge2 silver badges7 bronze badges































            draft saved

            draft discarded















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f510374%2fwhen-i-tried-to-generate-a-table-i-got-this-error-undefined-control-sequence%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

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?