# Tag Info

## Hot answers tagged article

113

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 ...

65

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 ...

42

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.

29

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 ...

24

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 ...

21

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}

17

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

17

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 ...

17

Maybe with the spy library: \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{shapes,arrows,positioning,arrows,spy} \tikzstyle{arr} = [draw, -latex'] \begin{document} \begin{frame} % premier transparent \frametitle{Figure (1)} \scalebox{.3}{ \begin{tikzpicture}[spy using outlines={circle, magnification=3, size=20cm, connect spies}] \node ...

17

There is not much choice: There is no place for (DPPH) on the first line. If (DPPH) is put on the second line, the inter word spaces are too much for a pleasant result. In this case, package microtype helps (pdfTeX), because it adds more flexibility by allowing the letters to shrink or stretch a little. This helps to reduce the large inter word spaces in ...

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{...} ...

14

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).

14

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 ...

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

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 ...

12

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 ...

12

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, ...

12

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}} ...

12


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 ...

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} ...

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

Use geometry: \usepackage[pass]{geometry} In this way the package will not make any modification to the standard settings, and will only tell the compiler the physical page size. A more complicated way, that requires knowing the page dimensions, but that can be useful with non standard page sizes, is to say \pdfpageheight=210mm \pdfpagewidth=148mm ...

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

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}

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} ...

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