7

Right now this I'm getting this for my first subsubsection:

G.1.1.

I would like for this to be

G1.1.

Does anybody know if it is possible to remove the first dot and put G and 1 together without a space between? Code below:

\documentclass{article}

\begin{document}

\renewcommand{\thesection}{\Alph{section}}
\setcounter{section}{7}
\setcounter{subsection}{1}
\subsubsection{Hello World} % G.1.1 I want it to be G1.1

\end{document}
  • 2
    Welcome to TeX.sx! I took the liberty to reduce your code to a minimal working example (MWE). Please always do that before posting a question here; a MWE is our standard format and requirement, which makes it easier for others to identify your problem and help you with it. It actually turned out that none of your -- admittedly nicely organized -- preamble was relevant to the problem. You did forget \end{document} though. And I'd recommend using braces {} for \renewcommand. – doncherry Sep 21 '12 at 4:24
6

You have to redefine \thesubsection, i.e.,

\renewcommand{\thesubsection}{\thesection\arabic{subsection}}
|improve this answer|||||
  • Almost there, but now i'm getting 71.1 instead on G1.1? – Niels Sønderbæk Sep 20 '12 at 23:10
  • 1
    @NielsSønderbæk: Use \renewcommand\thesection{\Alph{section}} \renewcommand{\thesubsection}{\thesection\arabic{subsection}}. – user11232 Sep 20 '12 at 23:11
  • I accidentally deleted my first \renewcommand, which is what caused the mistake. Thank you so much! – Niels Sønderbæk Sep 20 '12 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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