svm-r-markdown-templates icon indicating copy to clipboard operation
svm-r-markdown-templates copied to clipboard

Title centering creates blank page

Open dragonattheend opened this issue 2 years ago • 0 comments

I want to have the title, author and affiliation centered in article rmarkdown, which relies on svm-latex-ms.tex

I changed this part of the template (\raggedright to \center and changes to author related parts)

\makeatletter
\def\@maketitle{%
  \newpage
%  \null
%  \vskip 2em%
%  \begin{center}%
  \let \footnote \thanks
    {\fontsize{18}{20}\selectfont\raggedright  \setlength{\parindent}{0pt} \@title \par}%
}
%\fi
\makeatother

I'm using this RMarkdown template https://github.com/svmiller/svm-r-markdown-templates/blob/master/article-example/svm-rmarkdown-article-example.Rmd

It has https://github.com/svmiller/svm-r-markdown-templates/blob/master/svm-latex-ms.tex as template

I want to have the title, author and affiliation centered.

I changed this part of the template (\raggedright to \center and changes to author related parts)

\makeatletter \def@maketitle{% \newpage % \null % \vskip 2em% % \begin{center}% \let \footnote \thanks {\fontsize{18}{20}\selectfont\raggedright \setlength{\parindent}{0pt} @title \par}% } %\fi \makeatother

to

\makeatletter
\def\@maketitle{%
  \newpage
%  \null
%  \vskip 2em%
%  \begin{center}%
  \let \footnote \thanks
    {\fontsize{18}{20}\selectfont\center  \setlength{\parindent}{0pt} \@title \par}%
}
%\fi
\makeatother

And this part

{% \usefont{T1}{pnc}{m}{n}
\setlength{\parindent}{0pt}
\thispagestyle{plain}
{\fontsize{18}{20}\selectfont\raggedright 
\maketitle  % title \par  

}

{
   \vskip 13.5pt\relax \normalsize\fontsize{11}{12} 
$if(anonymous)$\hfill $else$$for(author)$\textbf{\authorfont $author.name$} \hskip 15pt \emph{\small $author.affiliation$}  $sep$ \par $endfor$ $endif$

}

}

to

{% \usefont{T1}{pnc}{m}{n}
\setlength{\parindent}{0pt}
\thispagestyle{plain}
{\fontsize{18}{20}\selectfont\center
\maketitle  % title \par

}

{
   \vskip 13.5pt\relax \normalsize\fontsize{11}{12}
$if(anonymous)$\hfill $else$$for(author)$\center\textbf{\authorfont $author.name$} \emph{\center\small $author.affiliation$}  $sep$ \par $endfor$ $endif$

}

}

This somehow creates a blank first page in the output.

My goal is to have the title, author, affiliation and abstract vertically centered separately on my first page.

dragonattheend avatar Dec 02 '21 21:12 dragonattheend