The section name should align with the text itself; the section label hangs into the left margin.

Even more ideally, the background of the boxes containing the section number and section name should be shaded (differently: the section number is in a box with a slightly darker shade of blue that the section name).

I'd be happy with just this as a solution. But why not hope beyond hope, and tell the full story?

The actual "box" actually has rounded, not square, corners at the left extreme, so much so that the left end of the larger box is actually rounded entirely. Plus, the right end of the "box" containing the section number itself is similar. That is, the far left of the box is a rounded edge, the far right is a vertical edge, and the dividing "line" between the section number and name is rounded also. Here's an attempt in ASCI art, without the top and bottom of the boxes (I couldn't make that look any good):

( 1.2 ) Section name |

No comments on the merits of this format please :-). Just wondering if anyone knows how to do it in LaTeX. I have been playing with various packages, such as titlesec, but I cannot seem to massage this in to what the publisher would like.

I can manage point 3 above (in addition to getting font and font size about right); that's about it.

1 Answer
1

Here's one approach that uses the titlesec package for setting the section titles, and TikZ for drawing the bar. The section numbers are placed in a TikZ node that will grow automatically to accommodate the numbers:

@Jake, what is missing in this solution to accommodate \tableofcontents nicely? Currently it looks ugly when used with the article class (after removing the use of chapters), placing the table of contents title (Contents, in English) on the left margin.
–
RomildoApr 11 '12 at 12:51

1

@Romildo: I've edited the answer, the approach now works without the titlespacing command which caused the wrong alignment.
–
JakeApr 11 '12 at 15:46