Theses, Books, Title pagesunderline under the title increasing as per the title length

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
annier
Posts: 16
Joined: Mon Sep 14, 2015 4:24 pm

underline under the title increasing as per the title length

Post by annier »

In the format of the thesis templates, when we want to underline the thesis title, how can we write the format of the coverpage or other pages so that the length of the underline depends upon the lenth of the title?

Code: Select all

\noindent
Dissertation Title: \fixedunderlinecenter[12.6cm]{\@etitle}\\
...
Yours Sincerely,
Anil Kunwar

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

underline under the title increasing as per the title length

Post by Johannes_B »

Your question is completely unclear to me, especially since you mention a template, but are not mentioning which one. Please elaborate.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
annier
Posts: 16
Joined: Mon Sep 14, 2015 4:24 pm

underline under the title increasing as per the title length

Post by annier »

Hi Johannes,
My question is discussing of longer thesis titles. For now, i use the manual way of dividing the title instead of using the preamble definition of title \etitle.

Code: Select all

Dissertation Title:\fixedunderlinecenter[12.6cm]{This is a very long title }\\
\underline{\makebox[12.6cm]{ and this phrase follows the above part.}}\\
~~\\
The title \etitle is defined in cover.tex as

Code: Select all

\etitle{This is a very long title  and this phrase follows the above part.}
...

Code: Select all

Dissertation Title:\fixedunderlinecenter[12.6cm]{\etitle }\\
If it is written like this, the title will exceed the paper size.

Please refer the following link:
https://github.com/whufanwei/DLUT_XeLaT ... format.tex
from line 355 onwards

Code: Select all

\parbox[t][0.58cm][c]{\textwidth}
    {\sihao\fs 学{\hfill}位{\hfill}论{\hfill}文{\hfill}题{\hfill}目{\hfill}:\fixedunderlinecenter[12.6cm]{\@ctitle}}
    \parbox[t][1.22cm][c]{\textwidth}
    {\sihao\fs 作{\hfill}者{\hfill}签{\hfill}名{\hfill}:\fixeddistanceleft[12.6cm]{\underline{\hspace{5.8cm}}\hfill
	日期:\underline{\hspace{1.4cm}}~年~{\underline{\hspace{0.7cm}}~月~{\underline{\hspace{0.7cm}}~日~}}}}
  \end{center}
  \renewcommand{\baselinestretch}{1.27}
  \cleardoublepage
}
In short what are the roles of
\hfill
and
\parbox?


Yours Sincerely,
Anil Kunwar
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

underline under the title increasing as per the title length

Post by Johannes_B »

This is some really creepy code. Try the following:

Code: Select all

\documentclass{book}
\makeatletter
\newcommand\fixedunderlinecenter[2][1cm]{\underline{\hb@xt@ #1{\hss#2\hss}}}
\makeatother
\usepackage{soul}
\begin{document}
\LARGE
\fixedunderlinecenter[4cm]{Wombat}

\fixedunderlinecenter[10cm]{This is a very long title  and this phrase follows the above part.}
\renewcommand{\fixedunderlinecenter}[2][]{\ul{#2}}

\fixedunderlinecenter{This is a very long title  and this phrase follows the above part.}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
annier
Posts: 16
Joined: Mon Sep 14, 2015 4:24 pm

Re: underline under the title increasing as per the title le

Post by annier »

Hi Johannes,
Thank you providing me an excellent illustration.

Yours Sincerely,
Anil Kunwar
Post Reply