LaTeX forum ⇒ Text FormattingText 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

Postby sheenshahid » Mon Feb 17, 2020 8:14 pm

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

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[12pt,a4paper,oneside]{book}
  2. \usepackage{latexsym}
  3. \usepackage{graphicx}
  4. \usepackage{amsmath,amsthm}
  5. \usepackage{amssymb}
  6. \usepackage{epsfig}
  7. \usepackage[T1]{fontenc}
  8. \usepackage{palatino}
  9. \usepackage{caption}
  10. \usepackage{mathpazo}
  11. \usepackage{tocloft}
  12. \begin{document}
  13. \newpage
  14. \begin{center}
  15. \section*{Supervisor's Declaration}
  16. \end{center}
  17. %\addcontentsline{toc}{section}{Supervisor's Declaration}{}
  18. 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.\\
  19. \\
  20. \\
  21. \\
  22. \bigskip
  23. {\raggedleft
  24. \begin{tabular}{l@{}}
  25. Name of Supervisor\\
  26. Supervisor\\
  27. Department name\\
  28. Full name of the University
  29. \end{tabular}\par}
  30. \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

Postby Bartman » Mon Feb 17, 2020 8:29 pm

A Infominimal 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:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[12pt,a4paper,oneside]{book}
  2. \usepackage{varwidth}
  3. \usepackage{showframe}
  4.  
  5. \begin{document}
  6. {\raggedleft
  7. \begin{varwidth}{\linewidth}
  8. Name of Supervisor\\
  9. Supervisor\\
  10. Department name\\
  11. Full name of the University
  12. \end{varwidth}\par}
  13.  
  14. \bigskip
  15. {\raggedleft
  16. \begin{tabular}{l@{}}
  17. Name of Supervisor\\
  18. Supervisor\\
  19. Department name\\
  20. Full name of the University
  21. \end{tabular}\par}
  22. \end{document}

sheenshahid
Posts: 20
Joined: Fri Jan 24, 2020 10:31 am

Postby sheenshahid » Mon Feb 17, 2020 9:09 pm

Thanks Dear. Its working. But remaining text on the page becomes centered.

Bartman
Posts: 32
Joined: Fri Jan 03, 2020 2:39 pm

Postby Bartman » Mon Feb 17, 2020 9:43 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

Postby sheenshahid » Mon Feb 17, 2020 10:22 pm

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

Postby Bartman » Mon Feb 17, 2020 11:07 pm

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[12pt,a4paper,oneside]{book}
  2. \usepackage{latexsym}
  3. \usepackage{graphicx}
  4. \usepackage{amsmath,amsthm}
  5. \usepackage{amssymb}
  6. \usepackage{epsfig}
  7. \usepackage[T1]{fontenc}
  8. \usepackage{mathpazo}
  9. \usepackage{caption}
  10. \usepackage{tocloft}
  11. \usepackage{csquotes}
  12.  
  13. \begin{document}
  14. %\newpage
  15. \begin{center}
  16. \bfseries\Large Supervisor's Declaration
  17. \end{center}
  18. %\addcontentsline{toc}{section}{Supervisor's Declaration}{}
  19. It is hereby certified that work presented by \textbf{nmae} in the thesis titled
  20. \textbf{\textit{\enquote{Topic}}} is based on the results of research study
  21. conducted by candidate under my supervision. No portion of this work has been
  22. formerly been offered for higher degree in this university or any other institute
  23. of learning and to best of the author's knowledge, no material has been used in this
  24. thesis which is not his own work, except where due acknowledgement has been made.
  25. He has fulfilled for the requirements and is qualified to submit this in partial
  26. fulfillment for the degree of Doctor of Philosophy (Ph.D. in the field of Subject)
  27. in the Faculty of Science, the University name.
  28.  
  29. \vspace{3\baselineskip}% replacement for \\ macros
  30. {\raggedleft
  31. \begin{tabular}{l@{}}
  32. Name of Supervisor\\
  33. Supervisor\\
  34. Department name\\
  35. Full name of the University
  36. \end{tabular}\par}
  37. \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

Postby sheenshahid » Tue Feb 18, 2020 5:15 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

Postby sheenshahid » Tue Feb 18, 2020 6:43 am

Bartman wrote:Moreover its also not creating the space for the purpose of signature.
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[12pt,a4paper,oneside]{book}
  2. \usepackage{latexsym}
  3. \usepackage{graphicx}
  4. \usepackage{amsmath,amsthm}
  5. \usepackage{amssymb}
  6. \usepackage{epsfig}
  7. \usepackage[T1]{fontenc}
  8. \usepackage{mathpazo}
  9. \usepackage{caption}
  10. \usepackage{mathpazo}
  11. \usepackage{tocloft}
  12. \usepackage{csquotes}
  13.  
  14. \begin{document}
  15. %\newpage
  16. \begin{center}
  17. \bfseries\Large Supervisor's Declaration
  18. \end{center}
  19. %\addcontentsline{toc}{section}{Supervisor's Declaration}{}
  20. It is hereby certified that work presented by \textbf{nmae} in the thesis titled
  21. \textbf{\textit{\enquote{Topic}}} is based on the results of research study
  22. conducted by candidate under my supervision. No portion of this work has been
  23. formerly been offered for higher degree in this university or any other institute
  24. of learning and to best of the author's knowledge, no material has been used in this
  25. thesis which is not his own work, except where due acknowledgement has been made.
  26. He has fulfilled for the requirements and is qualified to submit this in partial
  27. fulfillment for the degree of Doctor of Philosophy (Ph.D. in the field of Subject)
  28. in the Faculty of Science, the University name.
  29.  
  30. \vspace{3\baselineskip}% replacement for \\ macros
  31. {\raggedleft
  32. \begin{tabular}{l@{}}
  33. Name of Supervisor\\
  34. Supervisor\\
  35. Department name\\
  36. Full name of the University
  37. \end{tabular}\par}
  38. \end{document}

sheenshahid
Posts: 20
Joined: Fri Jan 24, 2020 10:31 am

Postby sheenshahid » Tue Feb 18, 2020 1:06 pm

sheenshahid wrote:This is the view dear
Bartman wrote:Moreover its also not creating the space for the purpose of signature.
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[12pt,a4paper,oneside]{book}
  2. \usepackage{latexsym}
  3. \usepackage{graphicx}
  4. \usepackage{amsmath,amsthm}
  5. \usepackage{amssymb}
  6. \usepackage{epsfig}
  7. \usepackage[T1]{fontenc}
  8. \usepackage{mathpazo}
  9. \usepackage{caption}
  10. \usepackage{mathpazo}
  11. \usepackage{tocloft}
  12. \usepackage{csquotes}
  13.  
  14. \begin{document}
  15. %\newpage
  16. \begin{center}
  17. \bfseries\Large Supervisor's Declaration
  18. \end{center}
  19. %\addcontentsline{toc}{section}{Supervisor's Declaration}{}
  20. It is hereby certified that work presented by \textbf{nmae} in the thesis titled
  21. \textbf{\textit{\enquote{Topic}}} is based on the results of research study
  22. conducted by candidate under my supervision. No portion of this work has been
  23. formerly been offered for higher degree in this university or any other institute
  24. of learning and to best of the author's knowledge, no material has been used in this
  25. thesis which is not his own work, except where due acknowledgement has been made.
  26. He has fulfilled for the requirements and is qualified to submit this in partial
  27. fulfillment for the degree of Doctor of Philosophy (Ph.D. in the field of Subject)
  28. in the Faculty of Science, the University name.
  29.  
  30. \vspace{3\baselineskip}% replacement for \\ macros
  31. {\raggedleft
  32. \begin{tabular}{l@{}}
  33. Name of Supervisor\\
  34. Supervisor\\
  35. Department name\\
  36. Full name of the University
  37. \end{tabular}\par}
  38. \end{document}
Attachments
decleration.jpg
decleration.jpg (76.21 KiB) Viewed 204 times

User avatar
Ijon Tichy
Posts: 226
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Tue Feb 18, 2020 1:19 pm

I cannot reproduce this. With the shown code and up-to-date TeX Live 2019 I get:

Image

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.


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 2 guests