## LaTeX forum ⇒ Text Formatting ⇒ Text on the right side of page but left justified

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
sheenshahid
Posts: 20
Joined: Fri Jan 24, 2020 10:31 am

### Text on the right side of page but left justified

I want to write some text on the right side of the page but it must be aligned left. Text is like this on the page

Name of Supervisor
Supervisor
Department name
Full name of the University

I am using \documentclass[12pt,a4paper,oneside]{book} with simply latex.

Here is MWE

\documentclass[12pt,a4paper,oneside]{book}\usepackage{latexsym}\usepackage{graphicx}\usepackage{amsmath,amsthm}\usepackage{amssymb}\usepackage{epsfig}\usepackage[T1]{fontenc}\usepackage{palatino}\usepackage{caption}\usepackage{mathpazo}\usepackage{tocloft}\begin{document}\newpage\begin{center}\section*{Supervisor's Declaration}\end{center}%\addcontentsline{toc}{section}{Supervisor's Declaration}{}It is hereby certified that work presented by \textbf{nmae} in the thesis titled \textbf{\textit{" Topic"}} is based on the results of research study conducted by candidate under my supervision. No portion of this work has been formerly been offered for higher degree in this university or any other institute of learning and to best of the author's knowledge, no material has been used in this thesis which is not his own work, except where due acknowledgement has been made. He has fulfilled for the requirements and is qualified to submit this in partial fulfillment for the degree of Doctor of Philosophy (Ph.D. in the field of Subject) in the Faculty of Science, the  University name.\\\\\\\\\bigskip{\raggedleft\begin{tabular}{l@{}}Name of Supervisor\\Supervisor\\Department name\\Full name of the University\end{tabular}\par}\end{document}
Last edited by sheenshahid on Mon Feb 17, 2020 10:14 pm, edited 1 time in total.

Bartman
Posts: 32
Joined: Fri Jan 03, 2020 2:39 pm
A minimal working example would have been nice.

Use the environment of the same name, if it is a title page.

I would like to offer two options:

\documentclass[12pt,a4paper,oneside]{book}\usepackage{varwidth}\usepackage{showframe} \begin{document}{\raggedleft\begin{varwidth}{\linewidth}Name of Supervisor\\Supervisor\\Department name\\Full name of the University\end{varwidth}\par} \bigskip{\raggedleft\begin{tabular}{l@{}}Name of Supervisor\\Supervisor\\Department name\\Full name of the University\end{tabular}\par}\end{document}

sheenshahid
Posts: 20
Joined: Fri Jan 24, 2020 10:31 am
Thanks Dear. Its working. But remaining text on the page becomes centered.

Bartman
Posts: 32
Joined: Fri Jan 03, 2020 2:39 pm
Without an example already mentioned, I don't know where and how the centering takes place. The command \par ends the alignment.

sheenshahid
Posts: 20
Joined: Fri Jan 24, 2020 10:31 am
Bartman wrote:Without an example already mentioned, I don't know where and how the centering takes place. The command \par ends the alignment.

I have edited the post with MWE

Bartman
Posts: 32
Joined: Fri Jan 03, 2020 2:39 pm
\documentclass[12pt,a4paper,oneside]{book}\usepackage{latexsym}\usepackage{graphicx}\usepackage{amsmath,amsthm}\usepackage{amssymb}\usepackage{epsfig}\usepackage[T1]{fontenc}\usepackage{mathpazo}\usepackage{caption}\usepackage{tocloft}\usepackage{csquotes} \begin{document}%\newpage\begin{center}\bfseries\Large Supervisor's Declaration\end{center}%\addcontentsline{toc}{section}{Supervisor's Declaration}{}It is hereby certified that work presented by \textbf{nmae} in the thesis titled \textbf{\textit{\enquote{Topic}}} is based on the results of research study conducted by candidate under my supervision. No portion of this work has been formerly been offered for higher degree in this university or any other institute of learning and to best of the author's knowledge, no material has been used in this thesis which is not his own work, except where due acknowledgement has been made. He has fulfilled for the requirements and is qualified to submit this in partial fulfillment for the degree of Doctor of Philosophy (Ph.D. in the field of Subject) in the Faculty of Science, the University name. \vspace{3\baselineskip}% replacement for \\ macros{\raggedleft\begin{tabular}{l@{}}Name of Supervisor\\Supervisor\\Department name\\Full name of the University\end{tabular}\par}\end{document}
Last edited by Bartman on Tue Feb 18, 2020 6:51 am, edited 1 time in total.

sheenshahid
Posts: 20
Joined: Fri Jan 24, 2020 10:31 am
Thanks dear, its working bur when i placed it in my thesis file it became centered.

sheenshahid
Posts: 20
Joined: Fri Jan 24, 2020 10:31 am
Bartman wrote:Moreover its also not creating the space for the purpose of signature.
\documentclass[12pt,a4paper,oneside]{book}\usepackage{latexsym}\usepackage{graphicx}\usepackage{amsmath,amsthm}\usepackage{amssymb}\usepackage{epsfig}\usepackage[T1]{fontenc}\usepackage{mathpazo}\usepackage{caption}\usepackage{mathpazo}\usepackage{tocloft}\usepackage{csquotes} \begin{document}%\newpage\begin{center}\bfseries\Large Supervisor's Declaration\end{center}%\addcontentsline{toc}{section}{Supervisor's Declaration}{}It is hereby certified that work presented by \textbf{nmae} in the thesis titled \textbf{\textit{\enquote{Topic}}} is based on the results of research study conducted by candidate under my supervision. No portion of this work has been formerly been offered for higher degree in this university or any other institute of learning and to best of the author's knowledge, no material has been used in this thesis which is not his own work, except where due acknowledgement has been made. He has fulfilled for the requirements and is qualified to submit this in partial fulfillment for the degree of Doctor of Philosophy (Ph.D. in the field of Subject) in the Faculty of Science, the University name. \vspace{3\baselineskip}% replacement for \\ macros{\raggedleft\begin{tabular}{l@{}}Name of Supervisor\\Supervisor\\Department name\\Full name of the University\end{tabular}\par}\end{document}

sheenshahid
Posts: 20
Joined: Fri Jan 24, 2020 10:31 am
sheenshahid wrote:This is the view dear
Bartman wrote:Moreover its also not creating the space for the purpose of signature.
\documentclass[12pt,a4paper,oneside]{book}\usepackage{latexsym}\usepackage{graphicx}\usepackage{amsmath,amsthm}\usepackage{amssymb}\usepackage{epsfig}\usepackage[T1]{fontenc}\usepackage{mathpazo}\usepackage{caption}\usepackage{mathpazo}\usepackage{tocloft}\usepackage{csquotes} \begin{document}%\newpage\begin{center}\bfseries\Large Supervisor's Declaration\end{center}%\addcontentsline{toc}{section}{Supervisor's Declaration}{}It is hereby certified that work presented by \textbf{nmae} in the thesis titled \textbf{\textit{\enquote{Topic}}} is based on the results of research study conducted by candidate under my supervision. No portion of this work has been formerly been offered for higher degree in this university or any other institute of learning and to best of the author's knowledge, no material has been used in this thesis which is not his own work, except where due acknowledgement has been made. He has fulfilled for the requirements and is qualified to submit this in partial fulfillment for the degree of Doctor of Philosophy (Ph.D. in the field of Subject) in the Faculty of Science, the University name. \vspace{3\baselineskip}% replacement for \\ macros{\raggedleft\begin{tabular}{l@{}}Name of Supervisor\\Supervisor\\Department name\\Full name of the University\end{tabular}\par}\end{document}
Attachments
decleration.jpg (76.21 KiB) Viewed 203 times

Ijon Tichy
Posts: 226
Joined: Mon Dec 24, 2018 10:12 am
I cannot reproduce this. With the shown code and up-to-date TeX Live 2019 I get:

BTW: epsfig is a LaTeX 2.09 compatibility wrapper around graphicx. I would recommend to use graphicx (and its command \includegraphics) directly instead of epsfig.