Math & ScienceWhat is the best way to section an assignment?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
moijk
Posts: 5
Joined: Thu Jan 14, 2010 9:21 pm

What is the best way to section an assignment?

Post by moijk »

We have biweekly assignments, and I've begun to deliver them in LaTeX. The first one is in, and I have to say I've never delivered anything in math that was more well formatted and readable than it. But I still didn't feel for the sectioning.

I know you have section and subsection, but as far as I know that means 1.0, 1.1 etc. The tasks didn't fit well with that scheme. Is there a way to section with "custom" numbering? (Like if the numbers are 1, 3, 7 and 11 (not consecutive), subsections are a, b, c ..?

Or is there any other way that would look good/better?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: What is the best way to section an assignment?

Post by frabjous »

It would help to know what document class you're using.

For most of them, of course, you can do whatever you want.

\section*{My section title}

Will create an unnumbered section.

If you want to change all sections to numbered alphabetically, you can format the counter like so:

\renewcommand{\thesection}{\alph{section}}

for a b c d

or

\renewcommand{\thesection}{\Alph{section}}

for A B C D

or

\renewcommand{\thesection}{\roman{section}}

for i ii iii iv

etc. etc.

and so on for the other counter formatting commands, and other units (\thechapter, \thesubsection).

You can skip around the numbers with \setcounter{section}{...}, replacing ... with some number, typically one less than the number you want for the next section.

The \sectionlabel and similar commands for the titlesec package provide safer ways of customizing this stuff.

What looks best? Well, that depends entirely on the document. I'm suspicious of why you'd want to jump around from one number to the next -- are you sure sections are really what you want there?

Probably it's best first to figure out what you want to do, and then figure out how to do it, and if you have trouble doing exactly what you want, ask here.
Post Reply