Text FormattingSome Modifications on the article Class

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
s.david
Posts: 43
Joined: Thu Sep 10, 2009 5:22 pm

Some Modifications on the article Class

Post by s.david »

Hello,

I have the following segment of code:

Code: Select all

\documentclass[8pt,a4paper]{article}
\begin{document}
\begin{thebibliography}{99}
\bibitem{Sendonaris20031}
A. Sendonaris, E. Erkip, and B. Aazhang, ``User cooperation
diversity - Part I: System description'', \textit{IEEE Trans.
Commun.}, vol. 51, no. 11, pp. 1927-1938, Nov. 2003.
\bibitem{Sendonaris20032}
A. Sendonaris, E. Erkip, and B. Aazhang, ``User cooperation
diversity - Part II: Implementation aspects and performance
analysis'', \textit{IEEE Trans. Commun.}, vol. 51, no. 11, pp.
1939-1948, Nov. 2003.
\end{thebibliography}
\end{document}
which is the bibliography of a paper. But I need to rename and center the title "References", and I need to eliminate the space between the references. How can I do that?

Thanks in advance

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Some Modifications on the article Class

Post by gmedina »

Hi,

try this:

Code: Select all

\documentclass[a4paper]{article}

\makeatletter
\renewcommand\refname{New name}
\renewenvironment{thebibliography}[1]
     {\section*{\hfil\refname\hfil}%
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \setlength\itemsep{0pt}
            \setlength\parsep{0pt}
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother

\begin{document}
\begin{thebibliography}{99}
\bibitem{Sendonaris20031}
A. Sendonaris, E. Erkip, and B. Aazhang, ``User cooperation
diversity - Part I: System description'', \textit{IEEE Trans.
Commun.}, vol. 51, no. 11, pp. 1927-1938, Nov. 2003.
\bibitem{Sendonaris20032}
A. Sendonaris, E. Erkip, and B. Aazhang, ``User cooperation
diversity - Part II: Implementation aspects and performance
analysis'', \textit{IEEE Trans. Commun.}, vol. 51, no. 11, pp.
1939-1948, Nov. 2003.
\end{thebibliography}
\end{document}
By the way, 8pt is not a valid class option.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
s.david
Posts: 43
Joined: Thu Sep 10, 2009 5:22 pm

Some Modifications on the article Class

Post by s.david »

Thank you gmedina, it works perfectly.
gmedina wrote:... By the way, 8pt is not a valid class option.
What do you mean by this?

Best regards
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Some Modifications on the article Class

Post by localghost »

s.david wrote:
gmedina wrote:... By the way, 8pt is not a valid class option.
[...] What do you mean by this? [...]
Valid options for font size are 10pt, 11pt or 12pt. This 8pt option results in a warning (see log file) and doesn't affect the default font size of 10pt.


Best regards
Thorsten¹
s.david
Posts: 43
Joined: Thu Sep 10, 2009 5:22 pm

Some Modifications on the article Class

Post by s.david »

localghost wrote:
s.david wrote:
gmedina wrote:... By the way, 8pt is not a valid class option.
[...] What do you mean by this? [...]
Valid options for font size are 10pt, 11pt or 12pt. This 8pt option results in a warning (see log file) and doesn't affect the default font size of 10pt.


Best regards
Thorsten¹
I tried this, and yes, you are right. Thank you.

Regards
Post Reply