Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapters, Sections, etc... #7

Closed
mgmillani opened this issue Oct 19, 2014 · 4 comments
Closed

Chapters, Sections, etc... #7

mgmillani opened this issue Oct 19, 2014 · 4 comments
Labels

Comments

@mgmillani
Copy link
Collaborator

  • Paragraphs probably should be preceded by 5 numbers (e.g. 1.1.1.1.2)
  • Spacing between numbering and title should be smaller
@mgmillani mgmillani added the bug label Oct 19, 2014
@matthiasdiener
Copy link
Contributor

As far as I can see, paragraphs are already preceded by 5 numbers, although the paragraph title appears with no special style (i.e., the same style as the normal text):

2.3.1.2.1 test paragraph

@mgmillani
Copy link
Collaborator Author

The first issue is indeed solved (and the paragraph title should have the same style as the text according to the standards), but the second isn't. For example, we get:

1    Introduction

instead of:

1 Introduction

@matthiasdiener
Copy link
Contributor

Regarding the second issue, what do you think of the following (somewhat silly) patch:

diff --git a/inputs/iiufrgs.cls b/inputs/iiufrgs.cls
index 39a79c8..e79cca9 100644
--- a/inputs/iiufrgs.cls
+++ b/inputs/iiufrgs.cls
@@ -410,9 +410,12 @@
         \penalty\@highpenalty
         \endgroup
 }
+
+\newlength{\seclen}\settowidth{\seclen}{\textbf{2.2~}}
+\newlength{\subseclen}\settowidth{\subseclen}{2.2.2~}
 \renewcommand*{\l@section}[2]
-              {\@dottedtocline{1}{0em}{2.8em}{\textbf{#1}}{\hss #2}}
-\renewcommand*{\l@subsection}{\@dottedtocline{2}{0em}{3.7em}}
+              {\@dottedtocline{1}{0em}{\seclen}{\textbf{#1}}{\hss #2}}
+\renewcommand*{\l@subsection}{\@dottedtocline{2}{0em}{\subseclen}}
 \newif\if@aftertoc
 \@aftertocfalse
 \renewcommand{\tableofcontents}{%
@@ -504,7 +507,7 @@
         \xdef\Hy@chapapp{CHAPTER}%
         \gdef\theHchapter{\thechapter}%
         \refstepcounter{chapter}%
-        \addcontentsline{toc}{chapter}{\protect\numberline{\@chapapp\thechapter}#1}%
+        \addcontentsline{toc}{chapter}{\protect\@chapapp\thechapter~#1}%
         \addtocontents{lof}{\protect\addvspace{10\p@}}%
         \addtocontents{lot}{\protect\addvspace{10\p@}}%
         \pagestyle{iiufrgs}\let\ps@plain\ps@iiufrgs%
@@ -513,7 +516,7 @@
 \def\@makechapterhead#1{%
         %\vspace*{90pt}
         %\vspace{12pt}
-        \reset@font\noindent{\ii@chapterfont\sffamily\textbf{\@chapapp\thechapter\hspace{1em}\MakeUppercase{#1}}\par}
+        \reset@font\noindent{\ii@chapterfont\sffamily\textbf{\@chapapp\thechapter\hphantom{~}\MakeUppercase{#1}}\par}
         \addvspace{12pt}
         %\par
 }
@@ -553,6 +556,7 @@
 % Formatação das seções
 %==============================================================================
 \setcounter{secnumdepth}{5}
+\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname\ }

 \renewcommand{\section}{%
         \@startsection{section}{2}{0pt}{18pt}{18pt}{\reset@font\normalsize\bfseries}

@mgmillani
Copy link
Collaborator Author

Seems to work. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants