Text FormattingFormatting label references

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
athakur
Posts: 2
Joined: Thu Dec 17, 2009 7:15 pm

Formatting label references

Post by athakur »

Hi All,

I am new to latex community. I started texing (Miktex 2.8) a report. I don't know if the subject line exactly states my problem.

In my report I am getting a space after each chapter number, figure number, and table number (Like, a section number as "1 .1.1" instead of "1.1.1", similarly A table in chapter 2 is labeled as "Table 2 .1: Details of..." instead of "Table 2.1: Details of..." ).

I have a class file which I am fiddling with to get the desired effect and found out that it has to do with \refstepcounter but I don't know how to fix it.

Also, I am not sure if my approach to solve this problem is right.

Please help me. I sincerely don't want to step down to the so called wyswyg wordprocessor. :(

The class file is attached.
Attachments
thesis.cls
thesis.cls file (v0.1 2006/04/26)
(21.88 KiB) Downloaded 254 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Formatting label references

Post by frabjous »

The problem is not to be found in the code you posted. I used it to generate a minimal document.

Code: Select all

\documentclass{thesis}
\begin{document}
\chapter{ChapterName}
\section{SectionName}
\subsection{SubSectionName}\label{somesubsection}
This is section \ref{somesubsection}.
\end{document}
This gave 1.1.1 not 1 .1.1.

Also no problem if I use the standard report class.

Can you post a minimal document that actually produces the error?
athakur
Posts: 2
Joined: Thu Dec 17, 2009 7:15 pm

Formatting label references

Post by athakur »

Hi frabjous,

Thanks for the reply. As you said, there isn't any problem with the class file (atleast this one).

In my tex file (for which I was using a template written by someone else), I found that there were two line preceding the chapters

Code: Select all

\renewcommand{\baselinestretch}{1}
\small\normalsize
When I removed them, the space before the "." was gone from everywhere (as desired).

I don't see any unwanted changes in the document so far due to removal of above two line.

Upon looking up documentation of renewcommand I found that it is used for changing font in between. So, its my hypothesis that, the template was probably written for some thing other than MikTex and work well in that. As in a portability issue. Am I right?

Thanks again for the help,

-Atul
Post Reply