0

I have to replicate a word page into latex. I have put in my best efforts but unfortunately, the text of item 10 spans two lines, which can be seen from Figure 1 (generated by the given below MWO). Figure 2 is what is desired. I have tried many solutions. In some cases, the font of the full title is reduced automatically. I am unable to design the correct page. enter image description here

This is the target page

\documentclass[11pt]{article}
\hoffset-7mm

\usepackage{anyfontsize}
\usepackage{setspace}
\usepackage[font={it,small}]{caption}
\usepackage{booktabs, makecell, 
rotating}
\usepackage{threeparttable}


\usepackage{enumerate}
\usepackage{float}
\renewcommand{\labelenumi} 
{\roman{enumi})}
\usepackage{algorithmic}
\usepackage{algorithm}
\renewcommand{\algorithmicrequire} 
{\textbf{Input:}}
\renewcommand{\algorithmicensure} 
{\textbf{Output:}}

\usepackage{tikz}

\usetikzlibrary{positioning}
\usetikzlibrary{calc} 


\addtolength{\textwidth}{18mm}
\addtolength{\textheight}{10mm}
\addtolength{\topmargin}{-10mm}


\begin{document}

\begin{titlepage}

\parindent0cm

\thispagestyle{empty}
\begin{center}

\begin{spacing}{1.3}        
\uppercase{\textbf{{\fontsize{16pt} 
{1cm}\selectfont The title of the 
thesis should come here with font 
times new roman of size 16}}}
\end{spacing} 

\rule{15cm}{0.05cm}\\   
\uppercase{\textbf{{{\fontsize{14pt} 
{1cm}\selectfont BY \\ \bigskip              
Name Last-name}}}}
\end{center}    

\textbf{{\fontsize{14pt}{ 
0.1cm}\selectfont
\begin{tabular} 
{p{0.05\textwidth}p{0.93\textwidth}}
    1)& ROLL No:  \hfill  
12345678-001  
    \\[1.5ex]
    2) & REGISTRATION No: \hfill 
123456789 
    \\[1.5ex]
    3) & DEGREE PROGRAM: \hfill 
PhD
    \\[1.5ex]
    4) &  DEPARTMENT: \hfill 
Department
    \\[1.5ex]
    5) &  FACULTY: \hfill Faculty
    \\[1.5ex]
    6) &  CAMPUS NAME: \hfill City 
XYZ 
    \\[1.5ex]
    7) &  SUPERVISOR NAME: \hfill 
Dr. Xyz 
    \\[1.5ex]
    8) &  DEGREE ENROLLMENT 
SEMESTER: \hfill Season 2050
    \\[1.5ex]
    9) &  FREEZED OR MISSED 
SEMESTER(S) (IF ANY): 
    \hfill Nill
    \\[1.5ex]
    10) &  DATE OF SYNOPSIS 
SUBMISSION TO THE DEPARTMENT: \hfill 
08.03.2022
    \\\addlinespace[1.5ex]
    11) &  DATE OF APPROVAL FROM 
DRRC
    \\[1.5ex]
\end{tabular}
}}


\bigskip


\textbf{{\fontsize{14pt} 
{0.1cm}\selectfont
\begin{tabular} 
{p{0.7\textwidth}p{0.93\textwidth}}
    Scholar Signature: & 
\tikz\draw [thick,dashed] (0,0) -- 
(4,0); 
    \\[4.5ex]
    Supervisor Signature: & 
\tikz\draw [thick,dashed] (0,0) -- 
(4,0);
    \\[4.5ex]
    Chairperson/Head Signature: & 
\tikz\draw [thick,dashed] (0,0) -- 
(4,0);
    \\[4.5ex]
    Convener Faculty Board 
Signature: & \tikz\draw [thick,dashed] 
(0,0) -- (4,0);
    \\[4.5ex]
    Date of approval by ASRB: & 
\tikz\draw [thick,dashed] (0,0) -- 
(4,0);
    \\[4.5ex]
\end{tabular}
}}


\end{titlepage}

\end{document}
5
  • Are you allowed to abbreviate the long word "department", e.g. to "dptmnt" or so? // Can't really understand the problem you try to convey.
    – MS-SPO
    Commented Jan 31, 2023 at 13:38
  • @MS-SPO I am not allowed to abbreviate the words. If you compile MWO above you will find item 10 spanning two lines with a narrow spacing than normal. I have tried to make it normal but it doesn't work for me. The overall font size is changed for this title page from the methods I used. Commented Jan 31, 2023 at 13:43
  • Ok. Can you add a screenshot of the relevant part(s) your code produce, i.e. your problem visualized? As I read it, the current screenshot seems to be a blueprint or so giving requirements, is it?
    – MS-SPO
    Commented Jan 31, 2023 at 13:53
  • 1
    @MS-PSO , I have added the figure of my code in the question now. Commented Jan 31, 2023 at 14:23
  • Fine. // For your reference, do you know these 2 sources? 1) Examples ctan.org/pkg/titlepages 2) Wikibooks on Latex en.wikibooks.org/wiki/LaTeX .
    – MS-SPO
    Commented Jan 31, 2023 at 14:37

1 Answer 1

1

There are many ways to accomplish what you are after. My post is intended to give you a cleaner start with your code, e.g. by removing what's not needed by now (and may inflict unwanted interactions).

Remember, while Word is a text processor, LaTeX is about typesetting, a bit like in Gutenberg's days, compiling and positioning blocks of letters made from lead.

Basic idea

So the basic idea is to separate structure from formatting. That's why I put the 3 blocks of text (title, admin, signatures) inside the document-environment, and moved all their fine-print to macros to the preamble.

I used tabularx, as it will adjust all columns with an X automatically. So {lXr} aligns the first column left, the third right, and the middle so that "it will look pretty", somehow.

tabularx is an extension of tabular, so it needs its width specified: {.97\textwidth} . The deviation from 1 accounts for visual right alignment with the title.

Macro \adm allows you to enter each line more easily, leaving the ., : and all other stuff to the macro, putting the & for the table, too. E.g replace #1 by \textbf{#1} for a bold number there, and all table entries will look alike.

Macro \sign uses \dotfill, where you tried tikz. The \vspace{} at the end is probably not the best way to do it.

The title comes twofold:

  • as a constant (\myTitle; put your text there)
  • as an output (\putTitle, which could have absorbed \myTitle as well)

! The % at the end of each line in the macro are vital to hinder unwanted insertion of spaces !

What's left to do

After obtaining a first result many things are left to do. The font sizes: absorb these inside the few macros defined (you want their effect being localized, not valid for the rest of your document).

Margins and table-positioning of course. Check for package layout on ctan.org, which allows you to show all current settings as drqsn rectangles over your page.

You may want to have a look at package fancyhdr, to deal with pagenumber in footnote. However, check this site to account for correct numbering lateron. frontmatter may be a valuable search term.

result

\documentclass[10pt,a4paper]{article}% assuming A4 paper
\usepackage{tabularx}

% === Macros ====================================
% ~~~ one line of admin ~~~~~~~~~~~~~~~
%     3 parameters; simplify: put . (or ')' ), :, dotfill and \\
\newcommand\adm[3]{#1.&#2:&#3\\}

% ~~~ one line in signatures ~~~~~~~~~~~~~~~
%    1 parameter // vertical space expressed e.g. in multiples
\newcommand\sign[1]{#1\dotfill\\\vspace{2\baselineskip}}

% ~~~ put and format title ~~~~~~~~~~~~~~~~~
%     the '%' at each line hinder insertion of extra space
\newcommand\putTitle[1]{%
    \begin{center}%
        \textbf{#1}%
        \vspace{.8\baselineskip}%
        \hrule%
    \end{center}%
}

% === Constant text string(s) ======================
\newcommand\myTitle[0]{This is probably one of the longest title mankind ever invented to dance around the one topic out of many topics to demonstrate which is just a demonstration}

% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\begin{document}

\putTitle{\myTitle}

\vspace{.7cm}

% ~~~ admin ~~~~~~~~~~~~~~~~~~~~~~~~~~~
%     the X in tabularx adjusts columnwidth "in a pretty way"
%     "Alpha Zulu" just to demonstrate autoadjustment
%     all format-related fineprint delegated to maccro above
\begin{tabularx}{.97\textwidth}{lXr}
    \adm{1}{ROLL No.}{12345678-001}
    \adm{2}{REGISTRATION No.}{123456789}
    \adm{3}{DEGREE PROGRAM}{PhD}
    \adm{4}{DEPARTMENT}{Department Alpha Zulu}
    \adm{5}{FACULTY}{Faculty}
    \adm{6}{CAMPUS NAME}{Mystery City}
    \adm{7}{SUPERVISOR NAME}{Dr. Strangelove}
    \adm{8}{DEGREE ENROLLMENT SEMESTER}{Season 2050}
    \adm{9}{FREEZED OR MISSED SEMESTER(S) (IF ANY)}{Nill}
    \adm{10}{DATE OF SYNOPSIS SUBMISSION TO THE DEPARTMENT}{08.03.2022}
    \adm{11}{DATE OF APPROVAL FROM DRRC}{\dotfill}
\end{tabularx}

% ~~~ visual separation ~~~~~~~~~~~~~~~~~
\vspace{2.5\baselineskip}

% ~~~ signatures ~~~~~~~~~~~~~~~~~~~~~~~~~~~
\begin{tabularx}{.97\textwidth}{X}
    \sign{Scholar Signature:}   
    \sign{Supervisor Signature:}
    \sign{Chairperson/Head Signature:}
    \sign{Convener Faculty Board Signature:}
    \sign{Date of approval by ASRB:}
\end{tabularx}

\end{document}

You must log in to answer this question.

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