Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using document class report and I have decided to use one of the predefined styles of Vincent Zoonekynd's for chapter headings, with some modifications.

\documentclass[11pt,a4paper,oneside]{report}
\usepackage{xcolor}
\makeatletter
\def\LigneVerticale{\vrule height 1.5cm depth 0.9cm\hspace{0.1cm}\relax}
\def\LignesVerticales{%
  \let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
\def\GrosCarreAvecUnChiffre#1{%
  \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
  \rlap{\hbox to 1cm{\hss\mbox{\color{white}#1}\hss}}%
  \vrule height 0pt width 1cm depth 0pt}
\def\GrosCarreAvecUnChiffres#1{{%
  \color{white}%
  \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
  \rlap{\hbox to 1cm{\hss\mbox{\color{black}#1}\hss}}%
  \vrule height 0pt width 1cm depth 0pt}}
\def\@makechapterhead#1{
    \vspace*{-20pt}
    \hbox{%
    \huge\bfseries
    \LignesVerticales
    \hspace{-0.62cm}%
    \GrosCarreAvecUnChiffre{\thechapter}
    \hspace{0.2cm}\hbox{#1}%
    }\par\vskip 0.5cm}
 \def\@makeschapterhead#1{
    \vspace*{-20pt}
    \hbox{%
    \huge\bfseries
    \LignesVerticales
    \hspace{-0.62cm}%
    \GrosCarreAvecUnChiffres{\thechapter}
    \hspace{0.2cm}\hbox{#1}%
    }\par\vskip 0.5cm}
\makeatother

\begin{document}
\chapter{Name}
\chapter*{Surname}
\end{document}

I would like to make other modifications and don't know how to do this. The definition for \chapter is alright, no other modification is needed. The only change is about \chapter*s. I would like to put any number (zero) away and move the name of the chapter to the left in the white box. Does anyone know how to change this?

share|improve this question

closed as too localized by doncherry, Kurt, lockstep, Qrrbrbirlbel, Guido Nov 26 '12 at 5:34

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Hi Jane! :) A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  Paulo Cereda May 22 '12 at 11:25
    
I assume where your code said \white it was supposed to say \color{white}. I fixed that, hope that's ok. –  doncherry May 22 '12 at 11:33
add comment

1 Answer

up vote 2 down vote accepted

Via trial and error, I modified the following part as follows, which seems to work:

\def\GrosCarreAvecUnChiffres#1{{%
  \color{white}%
  \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
% \rlap{\hbox to 1cm{\hss\mbox{\color{black}#1}\hss}}%
% \vrule height 0pt width 1cm depth 0pt%
  \hspace{-0.25cm}% This is new
  }}

screenshot of output

share|improve this answer
    
Great job!!:-)) –  Jane May 22 '12 at 12:04
2  
@Jane: Glad I could help. It'd be nice if you upvoted this answer, as well as some of the answers to your other questions. I see you have ten questions, nine of which have an accepted answer, but you only voted three times. –  doncherry May 22 '12 at 12:06
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.