0

I want to customise the title page like the format in the following picture. This title page is a part of the smfart.cls, which I will attach to below. Now I just want to use that title page formatting rather than the entire class file, since some ordinary packages are limited when using the class file smfart.cls. My question is: Is it possible to extract some codes from the given smfart.cls so as to form a package file, and then the desired title page (as displayed in following picture) formatting could be realised?

my desired title page style

Because of the limitation of characters I just attach the link of the class file smfart.cls. See http://smf4.emath.fr/Publications/Formats/

Open the SMF link above and look at the head title Classes et styles LaTeX 2e, and then click on the item smfart.cls under that head title, you can get the whole code of the class file.

My own article sample is as follows:

\documentclass[a4paper,twoside,11pt]{article}
\usepackage{blindtext}
%\usepackage{showframe}
\usepackage{tocbibind}
\usepackage{amssymb,amsmath,amsthm}
\usepackage{tocloft} %customize title page
\usepackage[headheight=15pt,top=2.54cm,bottom=2.54cm,left=3.81cm,right=3.54cm]{geometry} % 1inch=2.54cm

\usepackage{fancyhdr} %should be followed with the package `geometry'
\pagestyle{fancy}
\fancyhf{} %activer the `fancy' page-style
 \fancyhead[CO]{My article sample}%It's the `aritcle name' centerd on every odd-side page.
 \fancyhead[CE]{The Author}%It's the `author name' centerd on every even-side page.
 \fancyhead[LE,RO]{\oldstylenums{\thepage}}%It's the `page number' on the left of even-side page and on the right of odd-side page.
 \renewcommand{\headrulewidth}{0pt}%modify the width of `header line' to be zero.

%----------------------------------------------------------------------------------
% redefine the page style `plain' to kepp the page style of `table of contents' in accordance with the style of entire document.
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields 
\fancyhead[CO]{My article sample}
\fancyhead[CE]{The Author}
\fancyhead[LE,RO]{\oldstylenums{\thepage}}}
%----------------------------------------------------------------------------------


\usepackage{titlesec} %[noindentafter] customize `sectioning' title
\titleformat{\section}[block]{\filcenter\Large\bfseries}{\oldstylenums{\thesection}.}{.5em}{}
\titlespacing*{\section}{0pt}{2\baselineskip}{1\baselineskip} % This command together with the command above setup the centering of `section' title with a `period' following the section number, i.e. `1. Introduction' in the center place before the first paragraph.

\usepackage{indentfirst}
\setlength{\parindent}{15pt} % customize the indent of first line of every paragraph.
\setlength{\parskip}{5pt}    % skip of paragraph 


%----------------------------------------------------------------------------------
 \usepackage{ifthen} %show font of current document
 \makeatletter
 \newcommand{\showfont}{encoding: \f@encoding{},
   family: \f@family{},
   series: \f@series{},
   shape: \f@shape{},
   size: \f@size{}
 }
 \makeatother
%----------------------------------------------------------------------------------

%\renewcommand{\cfttoctitlefont}{\normalsize\bfseries}
\renewcommand{\cfttoctitlefont}{\hfill\normalsize\bfseries} %% This command together with
\renewcommand{\cftaftertoctitle}{\hfill}                    %%  this command give a centered normalized bold title
%\renewcommand{\cftsecdotsep}{1} % setup doted header between `section' title entry and page number, as for the subsection, this setup is default.
\renewcommand{\cftsubsecdotsep}{1} 
\renewcommand{\cftsubsubsecdotsep}{1} % The spacing between any dots in the leader


\cftsetindents{section}{3em}{1.2em}
\cftsetindents{subsection}{4.4em}{1.9em}
\cftsetindents{subsubsection}{6.5em}{2.6em} %sets the <entry>'s indent to the length <indent> %and its numwidth to the length <numwidth>.

%\cftsetrmarg{5em} %fault value=2.55em
\cftsetpnumwidth{2em}% default value is 1.55em
%\makeatletter \renewcommand{\@tocrmarg}{5em} \makeatother
\renewcommand{\cftpnumalign}{r}

\renewcommand{\cftsecaftersnum}{.} %To add a symbol `period' after the section number in `numbering box'
%\renewcommand{\cftsecpresnum}{\S}  %To put something (e.g., a symbol) before the section number in `numbering box'
\renewcommand{\cftaftertoctitle}{\hfill\mbox{}}


\let\endtitlepage\relax  %Preventing page break after title page. Note: `\let\newpage\relax' may also avoid following page break.
\addcontentsline{toc}{section}{Introduction}
\setcounter{tocdepth}{3} %determine the displaying level on table of content


\tolerance=400
\pretolerance=200

\begin{document}

\begin{titlepage}
%\clearpage
\noindent\centering\rule{14cm}{0.4pt}\hfill

\vspace*{4em}{\centering\bf %9em, \usefont{OT1}{cmr}{m}{it} 
My article sample\par}

\vspace{2em}
{\hfill\centering The Author\hfill} %\hfill \itshape A story of love, hate and fame

\vspace{2em}
{\hfill\centering\rule{3.5cm}{0.4pt}\hfill}

\vskip 1cm
\setlength{\parskip}{\smallskipamount}

\begin{center}
\begin{minipage}{0.81\textwidth}
{\itshape\bfseries Abstract. ---} \hspace*{0.3cm} \small The classes \texttt{smfbook} and \texttt{smfart} are intended to help the preparation in \LaTeX of the monographs and articles to be published by the Soci\'et\'e ma\-th\'e\-ma\-ti\-que de France. They require \LaTeXe\ and the \AmS-\LaTeX\ packages.\par
This paper exhibits the main features of these classes.
\end{minipage}

\vspace{0.5\baselineskip}

\begin{minipage}{0.81\textwidth}
{\itshape\bfseries R\'esum\'e. ---} \hspace*{0.3cm} \small Les classes \texttt{smfbook} et \texttt{smfart} sont destin\'ees \`a la composition en \LaTeX\ des monographies et articles \'edit\'es par la Soci\'et\'e ma\-th\'e\-ma\-ti\-que de France. Elles n\'ecessitent \LaTeXe\ ainsi que les macros \LaTeX\ de l'AMS.\par
Ce document en pr\'esente l'utilisation.
\end{minipage}
\end{center}
%\thispagestyle{empty} %this command remove the `header' and `footer' of the current page, i.e. the current `page style' is `empty'. Thus the page number certainly does not appear on this page.
\end{titlepage}


\section*{Introduction}
\blindtext \par
\blindtext \par
\blindtext \par



{\clearpage
%\setlength{\cftbeforetoctitleskip}{2cm}% the distance before the content symbol `contents'
\setlength{\cftbeforesecskip}{3pt} % the vertical separation between two same level items---i.e. two `sections', or two `subsection'
%\addcontentsline{toc}{section}{Introduction}
% \addcontentsline{toc}{section}{Contents} % This task is completed by the package `tocbibind'. This package could also add the the bibliography into the table of contents
\tableofcontents
%\thispagestyle{empty} %this command remove the `header' and `footer' of the current page, i.e. the current `page style' is `empty'. Thus the page number certainly does not appear on this page.%
\thispagestyle{plain} %kepp the page style of `table of contents' in accordance with the style of entire document.
%\setcounter{page}{0}  %this command can remove the page number on title-page
\clearpage}

%\showfont

\section{Test section}
\blindtext
\subsection{Test subsection}
\blindtext
\subsubsection{Test subsubsection}
\subsection{Test subsection}
\blindtext

\section{Test section two}
\blindtext
\subsection{Test subsection}
\blindtext
\subsection{Test subsection}
\blindtext
\subsubsection{Test subsubsection}
\subsection{Test subsection}
\blindtext
\end{document}
Troy
  • 13,741
GL_n
  • 193
  • https://tex.stackexchange.com/questions/209993/how-to-customize-my-titlepage/210280#210280 – Johannes_B Jun 29 '17 at 09:43
  • 1
    The answers to »How to customize my titlepage« shows indeed titlepages. The image in the question shows something like a in-page-title aka title head. So environment titlepage that is often used in the answer should/could be replaced, e.g., by a minipage. As an alternative the abstract etc. could also become part of the titlepage. – Schweinebacke Jun 29 '17 at 12:17
  • Actually I want to write my own title-page package by extracting some codes from the given class file smfart.cls, but it's too difficult for me to complete this task. So I turn to considering the somewhat simple example in the site suggested by @Johannes_B or by @TeXnician. – GL_n Jun 29 '17 at 14:39
  • My desired layout of the title-page is exactly what is displayed in the picture loaded in my original post above. – GL_n Jun 29 '17 at 14:51
  • 1
    The picture does not show a title page. It shows a title, an abstract (in two languages) and a table of contents. It is unclear what you want to include in the title, if some pieces are optional. As it stands, the question is too broad. The linked answer covers titlepage package writing as well as journal titles and optional arguments. It also mentions the wikibook (links to more sources). – Johannes_B Jun 29 '17 at 16:22
  • The answer could also just be: Copy the relevant code and call it as a package. I don't know how the class code looks like. – Johannes_B Jun 29 '17 at 16:24
  • @Johannes_B I write an article sample to describe what I want to say. The code is added into my original post. – GL_n Jul 01 '17 at 12:14
  • 1
    Off-topic: Whoever came up with the name smfart for the document class at hand was evidently quite unaware of how persons familiar with the English language would "visually parse" the word, leading to some unintended hilariousness... – Mico Jul 01 '17 at 13:45
  • @Mico :-) Nice one – Johannes_B Jul 01 '17 at 13:48

0 Answers0