0

in the class I am writing (imeko_acta.cls), which is based on article.cls, I have redefined the \maketitle command to have a specific title area. This is always a onecolumn, full text width section at the start of the first page, and after it the document will continue as a classic two columns research article.

The generated article will allways be a two columns one...but for some internal documents, and also for future expansion, I decided to implement also the possibility to have a one column body.

Everything works correctly (i.e. the switch from one to two and viceversa) a part for one thing.

When I swith from two to one column, the title area is moved up by a certain amount of space, more or less 10 points (figured out by experimentations).

The code for the maketitle definition is here:

\def\@maketitle{%
    \null
    \ifonecolumn
        \vskip-36pt%
    \else
        \vskip-26pt%
    \fi
    \parindent0pt
    \footnotesize\sffamily
    \begin{minipage}[b]{0.933\textwidth}
            \newdimen\upperrule%
            \upperrule=\textwidth%
            \advance\upperrule by -2pt%
            \raggedright
            {\large\bfseries {\MakeUppercase{\@Journal}}\par}\vskip2pt%
            {\small\bfseries {\@ISSN}\par}\vskip1pt%
            {\small\itshape {\@JournalInfoHeader}\par}\vskip2pt%
            \noindent\textcolor[RGB]{49,1,98}{\rule{\upperrule}{1.5pt}}%
    \end{minipage}\hfill%
    \begin{minipage}[b]{0.062\textwidth}
        \includegraphics[width=1.28cm]{./imeko.png}
    \end{minipage}%
    \vskip15pt%
    \begingroup
    \huge{\bfseries\@title}\par%
    \vskip15pt%
    \large{\bfseries\@AIauthors}\par%
    \vskip14pt%
    \itshape\small\@AIaffiliations\par%
    \endgroup%%
    \vskip17pt%
    \fcolorbox{AIAbstractBackground}{AIAbstractBackground}{%
        \hskip4pt%
        \parbox{\textwidth}{\vskip6pt%
            \ifvoid\absbox\else\unvbox\absbox\par\vskip6pt\fi}%
        \hskip4pt%
    }
    \vskip10pt%
    \hbox to \textwidth{\leaders\hbox to 2pt{\scriptsize . \hss}\hfil}
    \vskip12pt%
    {\bfseries Section:}\space\@arttype\par
    \vskip6pt%pt%
    {\bfseries Keywords:}\space\@Keywords\par
    \vskip6pt%pt%
    {\bfseries Citation:}\space\@Citation\par
    \vskip6pt%
    {\bfseries Section Editor:}\space\@Editor,\space\@EditorAffiliation\par
    \vskip6pt%
    {\bfseries Received:}\space{\@Received};\space{\bfseries In Final Form:}%
    \space\@FinalForm;\space{\bfseries Published:}\space\@Published.\par
    \vskip6pt%
    {\bfseries Copyright:}\space\@CopyRight\par
    \vskip6pt%
    {\bfseries Funding:}\space\@Funding\par
    \vskip6pt%
    {\bfseries Corresponding Author:}\space\CorrespondingAuthor\par
    \vskip6pt%
    \hbox to \textwidth{\leaders\hbox to 2pt{\scriptsize . \hss}\hfil}
    \vskip20pt%
}

Besides the different information contained there, the interesting part is clearly the initial lines.

When the class was only for two columns documents, the first lines were these ones:

\def\@maketitle{%
    \vskip-26pt%
    \parindent0pt

Then, when I noticed that, switching to a onecolumn document, everything was moved down, I added a conditional to modify the vskip to a negative -36 pt (10 points more than in two columns case).

Therefore, my question is: why switching to onecolumn requires to change the vskip? While everything is acceptable now, I am unable to understand why does this happen, since the (original) maketitle area had no code dependent on the twocolumn switch, and also margins and page sizes where not set differently.

I thank you very much everyone that would provide me with an explanation for this behavior.

Cheers Federico

0

1 Answer 1

1

You have not provided a usable example, but a simpler example would be

enter image description here

On the left is the output from

\documentclass{article}
\makeatletter
\renewcommand\@oddhead{HHH\dotfill HHH}
\makeatother
\begin{document}

\noindent XXX\dotfill XXX

\end{document}

and on the right from

\documentclass[twocolumn]{article}
\makeatletter
\renewcommand\@oddhead{HHH\dotfill HHH}
\makeatother
\begin{document}

\twocolumn[%
\noindent XXX\dotfill XXX
]

\end{document}

In article class (and presumably, although you do not show the code, in your class) \maketitle in two column does

\twocolumn[\@maketitle]

So the \@maketitle code that you show in the single column case is acting on the main vertical list and in the two column case it is in the box generated by the optional argument of \twocolumn which is essentially a custom figure* spanning box across the two columns. So the starting position for your initial \vskip is not in the same place.

This can be seen in the above example where the page head HHH... is in the same position in both examples, but the first line of text XXX...in the main vertical list on the left is slightly lower than the text in the spanning box on the right.

1
  • Thank you very much for your clarification. Sorry for not having provided an example, but you hit the point, I redefined \@maketitle, but not \maketitle, which is hence kept from article.cls. What I am not able to understand is, hence, how to technically make the two things to be exactly in the same place, independently from the number of columns. I mean, there is a Latex parameter which I can use to exactly calculate what shift to use in each of the two situations? Just to conclude, now things are suboptimal but works...This is to satisfy my curiosity and search for the "optimal" solution.
    – TrAmA
    Commented May 13 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .