[Tugindia] A problem with interline spacing.

E. Krishnan ekmath at asianetindia.com
Mon Feb 6 17:25:26 CET 2006


On Mon, 6 Feb 2006, S. venkataraman wrote:

> I have a problem with interline spacing. I want text to be printed
> flushright in 9 point, bold.  The problem is the interline space is too
> much. 


> \newcommand{\coursecode}[1]{\renewcommand{\@ccode}{{\titlefont Course
> Code: #1}}}
> \newcommand{\assignmentcode}[1]{\renewcommand{\@asscode}%
> {{\titlefont Assignment Code: #1}}}

> \newcommand{\makeheading}{\begin{flushright}\@ccode\\
> \@asscode\\
> {\titlefont Maximum Marks: 100}\end{flushright}}

Please remove the font changing commands from the "\coursecode" and 
"\assignmentcode" definitions and put it within the "\makeheading" as 
below:

\documentclass[11pt]{article}


\makeatletter
\newcommand{\@asscode}{\relax}
\newcommand{\@ccode}{\relax}
\newcommand{\titlefont}{%
  \fontfamily{ptm}
  \fontseries{b}
  \fontsize{9}{11}
  \selectfont}
\newcommand{\coursecode}[1]{%
  \renewcommand{\@ccode}{%
    {Course Code: #1}}}
\newcommand{\assignmentcode}[1]{%
  \renewcommand{\@asscode}{%
    {Assignment Code: #1}}}
 \newcommand{\makeheading}{%
   \begin{flushright}
     \titlefont
     \@ccode\\
     \@asscode\\
     Maximum Marks: 100
   \end{flushright}}
 \makeatother


\begin{document}


\coursecode{MTE-12}

\assignmentcode{MTE-12}

\makeheading


\end{document}


It seems that otherwise, though the *size* of the font is changed, the 
baselineskip is retained as 13.6 points (the default for 11 point font) 
within the flushleft environment


-- 
Krishnan



More information about the tugindia mailing list