Tag Info

Hot answers tagged

85

As Schweinebacke has noted, there are two kind of differences: a) differences in availability of commands and environments b) differences in the default settings. Only the latter may be changed easily using options and commands. Differences with regard to available commands and environments: book and report feature the \chapter sectioning command, while ...


53

If you used scrartcl instead of article, the command \subtitle would immediately work as expected. scrartcl belongs to the KOMA-Script classes which are extended replacements of the LaTeX standard classes. I strongly recommend KOMA-Script. For reasons have a look at: Most useful additions in KOMA-Script Your document is considerably large. An ...


33

To supplement Stefan's answer, the core LaTeX article class does not have a \subtitle macro. You can therefore either do something like \title{Title \\ Subtitle} or consider the titlepage environment. Other document classes, notably KOMA-Script, do have a separate \subtitle macro available.


26

The minimal class has already empty page style, so no page number is printed. There's no page number needed for a standalone graphic. minimal doesn't define macros. There's less than in article which could disturb. However, usually I would use minimal just for testing or for showing a minimal working example. Though for just displaying a graphic it might ...


18

The listings package allows you to change the margins (see section 4.10 of the documentation.) \lstset{numbers=right, numberstyle=\tiny, breaklines=true, backgroundcolor=\color{light-gray}, numbersep=5pt, xleftmargin=.25in, xrightmargin=.25in} Adjust as ...


16

The article class recognises the titlepage option, which forces the \maketitle command to create a separate page. \documentclass[titlepage]{article} \author{A.\,N.~Other} \title{Some things I did} \begin{document} \maketitle Some text \end{document}


15

You could split every report into two files: a main file holding only the preamble and an \input as document body, and a second file holding all the actual content. Then you are able to \input or \include all the content files in another main file for the book. % Main file of one report, e.g. `report01.tex` \documentclass{report} \title{...} ...


15

that is all, what minimal defines: \renewcommand\normalsize{\fontsize{10pt}{12pt}\selectfont} \setlength{\textwidth}{6.5in} \setlength{\textheight}{8in} \pagenumbering{arabic} % but no page numbers are printed because: \pagestyle{empty} % this is actually already in the kernel


15

As @Marco mentioned in his comment, "every documentclass" provides the titlepage environment - you won't find it as part of latex.ltx. However, it is probably best to view these macros and environments as they are defined in the class files: article.cls, book.cls and report.cls. However, some discussion may also be warranted. When looking at the titlepage ...


13

It is certainly easier to apply such global changes in LaTeX than in Word as LaTeX is really designed for that use. However as in Word the ease of applying global style changes depends greatly on the use of suitable commands within the document. If you change \documentclass{article} to \documentclass{some-journal-class} then the definition of (for ...


13

Here is MWE using the background and the eso-pic package: \documentclass[dvipsnames,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[object=vectorian]{pgfornament} \usepackage{lipsum} % Comment below if you are using the eso-pic version %-------------------------------------------------------------------- ...


13

This is a bit of a non-answer, but the underlying point may be useful. As far as I am able, I don't choose a class to use. The majority of my documents are articles intended for publication in a journal. When I start writing the article, I don't usually have a particular journal in mind. But when I submit the article, I often find that the journal I do ...


13

Using the minimal class instead of article introduces errors and does not remove them. There is nothing in article which can add to your problems. However there are many things missing in minimal which packages and the user normally awaits! I once used it for a table related MWS (minimum working solution :-) ) which first didn't worked. It took me 15 minutes ...


12

If you are loading the package natbib, then \renewcommand{\bibsection}{} after \usepackage[<options>]{natbib} will get rid of the section automatically provided (and also of the blank space you'd get by only redefining \refname or \bibname).


12

I believe the titling package does what you want. From documentation: The package inhibits the normal automatic cancellation of titling commands after \maketitle. This means that you can have multiple instances of the same, or perhaps different, titles in one document. Hooks are provided so that additional titling elements can be defined ...


11

The titlesec package or secsty might have the resources you need. If it's a longer project, look at the memoir document class, which has more options, but will involve more work to conform to university guidelines. Here's a very quick sectsty version of what you want. \usepackage{sectsty} \sectionfont{% \sectionrule{2ex}{1pt}{-1ex}{1pt}% } And to do ...


11

This would be automatic in book class \frontmatter \tableofcontents \mainmatter ... In other classes you could just borrow the definitions from book.cls \makeatletter \newif\if@mainmatter \@mainmattertrue \newcommand\frontmatter{% \cleardoublepage \@mainmatterfalse \pagenumbering{roman}} \newcommand\mainmatter{% \cleardoublepage ...


11

You can do this using the xleftmargin option of listings. See the manual page 33, section 4.10 "Margins and line shapes". Example: \documentclass{article} \usepackage{lipsum} \usepackage{color} \definecolor{light-gray}{gray}{0.95} \usepackage{listings} \lstset{numbers=right, numberstyle=\tiny, breaklines=true, ...


11

Here's a solution using the appendix package (adding the title package option) and a redefinition of \thetable and \thefigure: \documentclass{article} \usepackage[titletoc,toc,title]{appendix} \begin{document} \tableofcontents \section{Dolor sit amet} Have a look at \ref{app:foobar} \begin{appendices} \renewcommand\thetable{\thesection\arabic{table}} ...


10

Let me guess: After the switch from article to report, your \subsection is still unnumbered, but your \section suddenly shows up as "0.x A section" (which resembles the look of \subsection in article)? That is because the report class (and the book class) feature the additional sectioning level \chapter, which becomes the new top level. ...


10

I took Gonzalo Medina's second solution in his answer to "Inspirational" quote at start of chapter and changed the following: Instead of using the memoir class, the epigraph package (from memoirs author) is loaded; \epigraphfontsize is replaced with \epigraphsize; The etoolbox package is used to patch the internal \@epitext command so that ...


10

Set mathindent to be zero. \documentclass[fleqn]{article} \usepackage{breqn,showframe} %% showframe only for showing frames. \begin{document} \setlength{\mathindent}{0pt} \begin{dmath} a = b + c + d + e + f + g + h +i + j + k + l + m + n + p + q \end{dmath} \end{document}


10

graphicx (and some other packages like hyperref and geometry) actually corrects a problem. Without it it can happen that the pdf size shown by the pdf viewer is not equal to the internal \paperwidth and \paperheight. graphicx sets \pdfpagewidth and \pdfpageheight to avoid this problem. If you are getting the wrong page size, make sure that the option of the ...


10

I was having a similar problem and I found this to be a good approximation to the title/subtitle look. It's basically what's already written above but with the \vspace (and I thought a picture would be helpful). \title{The Metrization of Arbitrary Homotopy Spheres \\ \vspace{2 mm} {\large A Nonsensical Review}}


10

If you make the first page using \maketitle this may execute \thispagestyle{plain}. You may either redefine page style plain (see the fancyhdr manual for this), or simply add \thispagestyle{fancy} after \maketitle: \documentclass{article} \usepackage{fancyhdr,lastpage} \pagestyle{fancy} \cfoot{Page \thepage{} of \pageref{LastPage}} \begin{document} ...


9

For customizing sectional units you can use the sectsty package (for relatively "minor" changes) or the titlesec package; for customizing list-like environments, you can use the enumitem package; both enumitem and titlesec are very well documented and the documentations include numerous examples. Here's a little example illustrating the changes you mentioned ...


9

If you want to put QCM inside a table you have alterqcm, this is a package of TeXLive \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[upright]{fourier}%withot fourier symb = $\altersquare$ \usepackage{alterqcm} \parindent0pt \begin{document} \begin{alterqcm}[lq=8cm,language=english] \AQquestion{Question}{% {Proposition 1}, ...


9

The headings are far from being messed up. They are just tagged differently. And the KOMA Script manual tells you quite clearly how you can get what you want. \documentclass[english]{scrartcl} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{blindtext} \setkomafont{disposition}{\normalfont\bfseries} \begin{document} ...


8

Your TeX distribution probably has a default paper size setting that is not A4. Unfortunately, specifying paper size as an option to the document class won't always override this default. Specifically, dvips won't know about the option, and the equivalent part of pdfTeX won't know about it either (the standard document classes predate pdfTeX). The simplest ...


8

In the standard document classes there are four predefined page styles; the following is a quote taken directly from the fancyhdr package documentation: The default behaviour for the standard article, report or book document classes is to use the plain page style, so simply using the twoside class option won't give you the desired position for the page ...



Only top voted, non community-wiki answers of a minimum length are eligible