🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 18 (from laksa082)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

đźš«
NOT INDEXABLE
âś…
CRAWLED
6 months ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffFAILdownload_stamp > now() - 6 MONTH6.2 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://tex.stackexchange.com/questions/74941/add-option-to-class-with-command
Last Crawled2025-10-03 22:55:44 (6 months ago)
First Indexed2017-09-11 12:13:09 (8 years ago)
HTTP Status Code200
Meta Titledocument classes - Add option to class with command - TeX - LaTeX Stack Exchange
Meta Descriptionnull
Meta Canonicalnull
Boilerpipe Text
If a class or package is loaded, LaTeX does not load them again (the exception is package fontenc ). It only checks the options, if there are new ones and then LaTeX throws an error because of the option clash. That also means, you can't give options later to the class or package. But it is possible to do it before: \PassOptionsToClass {headinclude,footinclude}{scrbook} \documentclass {scrbook} Some classes and packages provide setup commands that allow to change the behaviour of the class or package at a later time, e.g.: \documentclass {scrbook} \KOMAoptions {headinclude,footinclude} \recalctypearea
Markdown
# ![site logo](https://stackoverflow.com/Content/Img/SE-logo75.png) By clicking “Sign up”, you agree to our [terms of service](https://tex.stackexchange.com/legal/terms-of-service/public) and acknowledge you have read our [privacy policy](https://tex.stackexchange.com/legal/privacy-policy). # OR Already have an account? [Log in](https://tex.stackexchange.com/users/login) [Skip to main content](https://tex.stackexchange.com/questions/74941/add-option-to-class-with-command#content) #### Stack Exchange Network Stack Exchange network consists of 183 Q\&A communities including [Stack Overflow](https://stackoverflow.com/), the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. [Visit Stack Exchange](https://stackexchange.com/) 1. - [Tour Start here for a quick overview of the site](https://tex.stackexchange.com/tour) - [Help Center Detailed answers to any questions you might have](https://tex.stackexchange.com/help) - [Meta Discuss the workings and policies of this site](https://tex.meta.stackexchange.com/) - [About Us Learn more about Stack Overflow the company, and our products](https://stackoverflow.co/) 2. ### [current community](https://tex.stackexchange.com/) - [TeX - LaTeX](https://tex.stackexchange.com/) [help](https://tex.stackexchange.com/help) [chat](https://chat.stackexchange.com/?tab=all&sort=active) - [TeX - LaTeX Meta](https://tex.meta.stackexchange.com/) ### your communities [Sign up](https://tex.stackexchange.com/users/signup?ssrc=site_switcher&returnurl=https%3A%2F%2Ftex.stackexchange.com%2Fquestions%2F74941%2Fadd-option-to-class-with-command) or [log in](https://tex.stackexchange.com/users/login?ssrc=site_switcher&returnurl=https%3A%2F%2Ftex.stackexchange.com%2Fquestions%2F74941%2Fadd-option-to-class-with-command) to customize your list. ### [more stack exchange communities](https://stackexchange.com/sites) [company blog](https://stackoverflow.blog/) 3. [Log in](https://tex.stackexchange.com/users/login?ssrc=head&returnurl=https%3A%2F%2Ftex.stackexchange.com%2Fquestions%2F74941%2Fadd-option-to-class-with-command) 4. [Sign up](https://tex.stackexchange.com/users/signup?ssrc=head&returnurl=https%3A%2F%2Ftex.stackexchange.com%2Fquestions%2F74941%2Fadd-option-to-class-with-command) [![TeX - LaTeX](https://cdn.sstatic.net/Sites/tex/Img/logo.svg?v=43890f90cb01)](https://tex.stackexchange.com/) 1. 1. [Home](https://tex.stackexchange.com/) 2. [Questions](https://tex.stackexchange.com/questions) 3. [Unanswered](https://tex.stackexchange.com/unanswered) 4. [AI Assist Labs](https://stackoverflow.ai/) 5. [Tags](https://tex.stackexchange.com/tags) 6. [Chat](https://chat.stackexchange.com/rooms/158962/stack-exchange-lobby) 7. [Users](https://tex.stackexchange.com/users) 8. [Companies](https://stackoverflow.com/jobs/companies?so_medium=tex&so_source=SiteNav) 2. Teams ![](https://cdn.sstatic.net/Img/teams/teams-promo.svg?v=e507948b81bf) Ask questions, find answers and collaborate at work with Stack Overflow for Teams. [Try Teams for free](https://stackoverflowteams.com/teams/create/free/?utm_medium=referral&utm_source=tex-community&utm_campaign=side-bar&utm_content=explore-teams) [Explore Teams](https://stackoverflow.co/teams/?utm_medium=referral&utm_source=tex-community&utm_campaign=side-bar&utm_content=explore-teams) 3. [Teams]() 4. Ask questions, find answers and collaborate at work with Stack Overflow for Teams. [Explore Teams](https://stackoverflow.co/teams/?utm_medium=referral&utm_source=tex-community&utm_campaign=side-bar&utm_content=explore-teams-compact) **Teams** Q\&A for work Connect and share knowledge within a single location that is structured and easy to search. [Learn more about Teams](https://stackoverflow.co/teams/) # ![Illustration of upvote icon after it is clicked](https://cdn.sstatic.net/Img/modal/img-upvote.png?v=fce73bd9724d) # Hang on, you can't upvote just yet. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. **Upvoting** indicates when questions and answers are useful. [What's reputation and how do I get it?](https://stackoverflow.com/help/whats-reputation) Instead, you can save this post to reference later. Save this post for later Not now # ![Illustration of upvote icon after it is clicked](https://cdn.sstatic.net/Img/modal/img-free-votes.png?v=1c5aa3dac50b) # Thanks for your vote! You now have 5 free votes weekly. Free votes - count toward the total vote score - does not give reputation to the author Continue to help good content that is interesting, well-researched, and useful, rise to the top! To gain full voting privileges, [earn reputation](https://tex.stackexchange.com/help/whats-reputation). Got it\! Go to help center to learn more # [Add option to class with command](https://tex.stackexchange.com/questions/74941/add-option-to-class-with-command) [Ask Question](https://tex.stackexchange.com/questions/ask) Asked 13 years ago Modified [13 years ago](https://tex.stackexchange.com/questions/74941/add-option-to-class-with-command?lastactivity "2012-10-02 05:46:22Z") Viewed 4k times This question shows research effort; it is useful and clear 9 Save this question. Show activity on this post. Is it possible add at the loaded class some options? look at the example below: ``` \documentclass{scrbook} \AddOptionsToClass{headinclude,footinclude}% something like this command \begin{document} test \end{document} ``` - [document-classes](https://tex.stackexchange.com/questions/tagged/document-classes "show questions tagged 'document-classes'") - [class-options](https://tex.stackexchange.com/questions/tagged/class-options "show questions tagged 'class-options'") [Share](https://tex.stackexchange.com/q/74941 "Short permalink to this question") Share a link to this question Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this question](https://tex.stackexchange.com/posts/74941/edit) Follow Follow this question to receive notifications [edited Oct 2, 2012 at 5:36](https://tex.stackexchange.com/posts/74941/revisions "show all edits to this post") [![lockstep's user avatar](https://i.sstatic.net/zb5Zo.png?s=64)](https://tex.stackexchange.com/users/510/lockstep) [lockstep](https://tex.stackexchange.com/users/510/lockstep) 257k7474 gold badges737737 silver badges803803 bronze badges asked Oct 1, 2012 at 21:04 [![Aurelius's user avatar](https://www.gravatar.com/avatar/58380a33418781ce9011cbffa99e8d07?s=64&d=identicon&r=PG&f=y&so-version=2)](https://tex.stackexchange.com/users/14524/aurelius) [Aurelius](https://tex.stackexchange.com/users/14524/aurelius)Aurelius 7,8131212 gold badges5656 silver badges106106 bronze badges 1 - I would do a `\def\MyClassOptions{}` *before* `\documentclass`, and use `\documentclass[MyClassOptions]{scrbook}`. This could also allow (with some additional logic) for a way to specify the class options on the command line, if so desired. Peter Grill – [Peter Grill](https://tex.stackexchange.com/users/4301/peter-grill "228,441 reputation") 2012-10-01 21:06:26 +00:00 [Commented Oct 1, 2012 at 21:06](https://tex.stackexchange.com/questions/74941/add-option-to-class-with-command#comment160003_74941) [Add a comment](https://tex.stackexchange.com/questions/74941/add-option-to-class-with-command "Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.") \| ## 2 Answers 2 Sorted by: [Reset to default](https://tex.stackexchange.com/questions/74941/add-option-to-class-with-command?answertab=scoredesc#tab-top) This answer is useful 15 Save this answer. Show activity on this post. If a class or package is loaded, LaTeX does not load them again (the exception is package `fontenc`). It only checks the options, if there are new ones and then LaTeX throws an error because of the option clash. That also means, you can't give options later to the class or package. But it is possible to do it before: ``` \PassOptionsToClass{headinclude,footinclude}{scrbook} \documentclass{scrbook} ``` Some classes and packages provide setup commands that allow to change the behaviour of the class or package at a later time, e.g.: ``` \documentclass{scrbook} \KOMAoptions{headinclude,footinclude} \recalctypearea ``` [Share](https://tex.stackexchange.com/a/74943 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this answer](https://tex.stackexchange.com/posts/74943/edit) Follow Follow this answer to receive notifications answered Oct 1, 2012 at 21:20 [![Heiko Oberdiek's user avatar](https://i.sstatic.net/r7TI9.png?s=64)](https://tex.stackexchange.com/users/16967/heiko-oberdiek) [Heiko Oberdiek](https://tex.stackexchange.com/users/16967/heiko-oberdiek)Heiko Oberdiek 277k2525 gold badges737737 silver badges1\.1k1\.1k bronze badges [Add a comment](https://tex.stackexchange.com/questions/74941/add-option-to-class-with-command "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| This answer is useful 1 Save this answer. Show activity on this post. The solution I have been using is: ``` \ifdefined\ClassOptions \else \def\ClassOptions{draft} \fi \documentclass[\ClassOptions]{article} ``` This allows you to change the options via the command line if so desired. [Share](https://tex.stackexchange.com/a/74962 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this answer](https://tex.stackexchange.com/posts/74962/edit) Follow Follow this answer to receive notifications answered Oct 2, 2012 at 5:46 [![Peter Grill's user avatar](https://www.gravatar.com/avatar/d8dd59f76caa3a12e11f215126b8c118?s=64&d=identicon&r=PG)](https://tex.stackexchange.com/users/4301/peter-grill) [Peter Grill](https://tex.stackexchange.com/users/4301/peter-grill)Peter Grill 228k5151 gold badges600600 silver badges956956 bronze badges [Add a comment](https://tex.stackexchange.com/questions/74941/add-option-to-class-with-command "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| ## You must [log in](https://tex.stackexchange.com/users/login?ssrc=question_page&returnurl=https%3A%2F%2Ftex.stackexchange.com%2Fquestions%2F74941) to answer this question. Start asking to get answers Find the answer to your question by asking. [Ask question](https://tex.stackexchange.com/questions/ask) Explore related questions - [document-classes](https://tex.stackexchange.com/questions/tagged/document-classes "show questions tagged 'document-classes'") - [class-options](https://tex.stackexchange.com/questions/tagged/class-options "show questions tagged 'class-options'") See similar questions with these tags. - The Overflow Blog - [As your AI gets smarter, so must your API](https://stackoverflow.blog/2025/09/30/as-your-ai-gets-smarter-so-must-your-api/?cb=1) - [One is not the loneliest number for API calls](https://stackoverflow.blog/2025/10/03/one-is-not-the-loneliest-number-for-api-calls/?cb=1) - Featured on Meta - [Spevacus has joined us as a Community Manager](https://meta.stackexchange.com/questions/412667/spevacus-has-joined-us-as-a-community-manager?cb=1) - [Introducing a new proactive anti-spam measure](https://meta.stackexchange.com/questions/412705/introducing-a-new-proactive-anti-spam-measure?cb=1) #### Linked [7](https://tex.stackexchange.com/questions/135263/passing-options-to-unknown-class?lq=1 "Question score (upvotes - downvotes)") [Passing Options to Unknown Class](https://tex.stackexchange.com/questions/135263/passing-options-to-unknown-class?noredirect=1&lq=1) #### Related [9](https://tex.stackexchange.com/questions/17582/latex3-processkeysoptions-hangs-while-processing-global-class-option?rq=1 "Question score (upvotes - downvotes)") [LaTeX3: \\ProcessKeysOptions hangs while processing global (class) option](https://tex.stackexchange.com/questions/17582/latex3-processkeysoptions-hangs-while-processing-global-class-option?rq=1) [25](https://tex.stackexchange.com/questions/110292/testing-for-a-documentclass-option?rq=1 "Question score (upvotes - downvotes)") [testing for a documentclass option](https://tex.stackexchange.com/questions/110292/testing-for-a-documentclass-option?rq=1) [5](https://tex.stackexchange.com/questions/177137/how-to-add-a-document-class-to-texstudio?rq=1 "Question score (upvotes - downvotes)") [How to add a document class to TexStudio?](https://tex.stackexchange.com/questions/177137/how-to-add-a-document-class-to-texstudio?rq=1) [4](https://tex.stackexchange.com/questions/231255/strange-behavior-when-inheriting-class-options?rq=1 "Question score (upvotes - downvotes)") [Strange Behavior when Inheriting Class Options](https://tex.stackexchange.com/questions/231255/strange-behavior-when-inheriting-class-options?rq=1) [2](https://tex.stackexchange.com/questions/392797/can-i-know-the-class-options-in-a-document-or-user-defined-package?rq=1 "Question score (upvotes - downvotes)") [Can I know the class options in a document (or user-defined package)?](https://tex.stackexchange.com/questions/392797/can-i-know-the-class-options-in-a-document-or-user-defined-package?rq=1) [2](https://tex.stackexchange.com/questions/568440/can-one-suspend-a-document-class-option-for-even-uneven-pages?rq=1 "Question score (upvotes - downvotes)") [Can one suspend a document class option for even/uneven pages?](https://tex.stackexchange.com/questions/568440/can-one-suspend-a-document-class-option-for-even-uneven-pages?rq=1) [1](https://tex.stackexchange.com/questions/634124/how-to-change-default-options-of-a-document-class?rq=1 "Question score (upvotes - downvotes)") [How to change default options of a document class?](https://tex.stackexchange.com/questions/634124/how-to-change-default-options-of-a-document-class?rq=1) [5](https://tex.stackexchange.com/questions/682439/unused-global-optionss-when-using-arguments-in-options-of-class?rq=1 "Question score (upvotes - downvotes)") ["Unused global options(s)" when using arguments in options of class](https://tex.stackexchange.com/questions/682439/unused-global-optionss-when-using-arguments-in-options-of-class?rq=1) #### [Hot Network Questions](https://stackexchange.com/questions?tab=hot) - [NTFS journaling and MFT entry modified](https://superuser.com/questions/1926037/ntfs-journaling-and-mft-entry-modified) - [The construction symbol ✠](https://tex.stackexchange.com/questions/751889/the-construction-symbol) - [Separability of continuous functions with compact support](https://math.stackexchange.com/questions/5099744/separability-of-continuous-functions-with-compact-support) - [Windows cannot delete extremely deep/corrupted folder structure](https://serverfault.com/questions/1193141/windows-cannot-delete-extremely-deep-corrupted-folder-structure) - [What is going on with the shield proficiency rules?](https://rpg.stackexchange.com/questions/216712/what-is-going-on-with-the-shield-proficiency-rules) - [Where does the Unix pack compressor come from?](https://retrocomputing.stackexchange.com/questions/32120/where-does-the-unix-pack-compressor-come-from) - [In an enterprise software team, is it recommended for developers to maintain a business knowledge wiki to understand domain concepts and processes?](https://softwareengineering.stackexchange.com/questions/459257/in-an-enterprise-software-team-is-it-recommended-for-developers-to-maintain-a-b) - [Generic term for open-drain / open-collector](https://electronics.stackexchange.com/questions/756288/generic-term-for-open-drain-open-collector) - [Is "shell" (the computing metaphor) really translated "coquille rose"?](https://french.stackexchange.com/questions/56200/is-shell-the-computing-metaphor-really-translated-coquille-rose) - [Best crops to grow that are calorie dense, easy to grow AND fire-resistant?](https://worldbuilding.stackexchange.com/questions/269280/best-crops-to-grow-that-are-calorie-dense-easy-to-grow-and-fire-resistant) - [Conflicted over pursuing a PhD but taking a significant pay cut](https://academia.stackexchange.com/questions/221525/conflicted-over-pursuing-a-phd-but-taking-a-significant-pay-cut) - [Calculating probabilities for the naive Fisher-Yates shuffling algorithm](https://mathoverflow.net/questions/501094/calculating-probabilities-for-the-naive-fisher-yates-shuffling-algorithm) - [Tikz - How to draw/create a branching structure using Tikz nodes and Tikz paths with directed edges?](https://tex.stackexchange.com/questions/751989/tikz-how-to-draw-create-a-branching-structure-using-tikz-nodes-and-tikz-paths) - [Early-career publishing strategy - steady output of low-impact papers or making yourself known for something?](https://academia.stackexchange.com/questions/221569/early-career-publishing-strategy-steady-output-of-low-impact-papers-or-making) - [Why does my audio transformer step up voltage but not drive my headphones loudly?](https://electronics.stackexchange.com/questions/756423/why-does-my-audio-transformer-step-up-voltage-but-not-drive-my-headphones-loudly) - [Two squares in a circle intersecting at one point](https://math.stackexchange.com/questions/5099325/two-squares-in-a-circle-intersecting-at-one-point) - [Concerns about using ChatGPT with mathematical paper writing assistance](https://academia.stackexchange.com/questions/221542/concerns-about-using-chatgpt-with-mathematical-paper-writing-assistance) - [1970s or earlier short story about a group of scientists who discover they have been made to forget Chicago ever existed](https://scifi.stackexchange.com/questions/299454/1970s-or-earlier-short-story-about-a-group-of-scientists-who-discover-they-have) - [Why can a model with higher MSE still have a higher R² than another model](https://stats.stackexchange.com/questions/670554/why-can-a-model-with-higher-mse-still-have-a-higher-r%C2%B2-than-another-model) - [Are coin toss sequences really equally unlikely?](https://philosophy.stackexchange.com/questions/130901/are-coin-toss-sequences-really-equally-unlikely) - [Output impedance of a simple BJT current source](https://electronics.stackexchange.com/questions/756421/output-impedance-of-a-simple-bjt-current-source) - [Cinderblocks missing in two corners of my house](https://diy.stackexchange.com/questions/323368/cinderblocks-missing-in-two-corners-of-my-house) - [How many species of animals are biologically immortal?](https://biology.stackexchange.com/questions/117994/how-many-species-of-animals-are-biologically-immortal) - [Why does a mismatching printf specifier also affect subsequent arguments?](https://stackoverflow.com/questions/79779696/why-does-a-mismatching-printf-specifier-also-affect-subsequent-arguments) [more hot questions](https://tex.stackexchange.com/questions/74941/add-option-to-class-with-command) [Question feed](https://tex.stackexchange.com/feeds/question/74941 "Feed of this question and its answers") # Subscribe to RSS Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader. ![](https://tex.stackexchange.com/posts/74941/ivc/381b?prg=d7c3694d-6927-4d4c-8aba-9e2aa3392225) lang-tex # Why are you flagging this comment? It contains harassment, bigotry or abuse. This comment attacks a person or group. Learn more in our [Code of Conduct](https://tex.stackexchange.com/conduct/abusive-behavior). It's unfriendly or unkind. This comment is rude or condescending. Learn more in our [Code of Conduct](https://tex.stackexchange.com/conduct/abusive-behavior). Not needed. This comment is not relevant to the post. ``` ``` Enter at least 6 characters Something else. A problem not listed above. Try to be as specific as possible. ``` ``` Enter at least 6 characters Flag comment Cancel You have 0 flags left today ##### [TeX - LaTeX](https://tex.stackexchange.com/) - [Tour](https://tex.stackexchange.com/tour) - [Help](https://tex.stackexchange.com/help) - [Chat](https://chat.stackexchange.com/?tab=all&sort=active) - [Contact](https://tex.stackexchange.com/contact) - [Feedback](https://tex.meta.stackexchange.com/) ##### [Company](https://stackoverflow.co/) - [Stack Overflow](https://stackoverflow.com/) - [Teams](https://stackoverflow.co/teams/) - [Advertising](https://stackoverflow.co/advertising/) - [Talent](https://stackoverflow.co/advertising/employer-branding/) - [About](https://stackoverflow.co/) - [Press](https://stackoverflow.co/company/press/) - [Legal](https://stackoverflow.com/legal) - [Privacy Policy](https://stackoverflow.com/legal/privacy-policy) - [Terms of Service](https://stackoverflow.com/legal/terms-of-service/public) - Cookie Settings - [Cookie Policy](https://policies.stackoverflow.co/stack-overflow/cookie-policy) ##### [Stack Exchange Network](https://stackexchange.com/) - [Technology](https://stackexchange.com/sites#technology) - [Culture & recreation](https://stackexchange.com/sites#culturerecreation) - [Life & arts](https://stackexchange.com/sites#lifearts) - [Science](https://stackexchange.com/sites#science) - [Professional](https://stackexchange.com/sites#professional) - [Business](https://stackexchange.com/sites#business) - [API](https://api.stackexchange.com/) - [Data](https://data.stackexchange.com/) - [Blog](https://stackoverflow.blog/?blb=1) - [Facebook](https://www.facebook.com/officialstackoverflow/) - [Twitter](https://twitter.com/stackoverflow) - [LinkedIn](https://linkedin.com/company/stack-overflow) - [Instagram](https://www.instagram.com/thestackoverflow) Site design / logo © 2025 Stack Exchange Inc; user contributions licensed under [CC BY-SA](https://stackoverflow.com/help/licensing) . rev 2025.10.2.34811
Readable Markdownnull
Shard18 (laksa)
Root Hash8045678284012640218
Unparsed URLcom,stackexchange!tex,/questions/74941/add-option-to-class-with-command s443