LaTeX forum ⇒ Fonts & Character SetsFont style other then normal font of document

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
User avatar
Ijon Tichy
Posts: 269
Joined: Mon Dec 24, 2018 10:12 am

Font style other then normal font of document

Postby Ijon Tichy » Fri Jan 31, 2020 2:06 pm

sheenshahid wrote:The name of this font is " old English " , which I noted from Microsoft word.

If this is the font from the Microsoft font library the correct name would be "Old English Text MT". If the font has been installed correctly you just have to replace "TeX Gure Chorus" in my example above by the correct font name:

Code: [Select all] [Expand/Collapse] [Download] (fontspec-example-oldengl.tex)
  1. % Important: You have to use LuaLaTeX or XeLaTeX instead of PDFLaTeX zu
  2. % compile this file!
  3. \documentclass{article}
  4.  
  5. \usepackage{fontspec}
  6. \usepackage{blindtext}
  7. \usepackage[english]{babel}
  8.  
  9. \setmainfont{TeX Gyre Termes}% Use the Times clone TeX Gyre Termes as main font.
  10. \newfontfamily{\otherfamily}{Old English Text MT}% Load "Old English Text MT" as an additional font family.
  11.  
  12. \begin{document}
  13. \begin{titlepage}
  14. {\otherfamily This is the name of the university.}
  15. \vfill
  16. {\Huge\bfseries The Name of the Game\par}
  17. \bigskip
  18. {\large\bfseries Me and Boby McGee\par}
  19. \vfill\vfill\vfill
  20. \end{titlepage}
  21. \tableofcontents
  22. \blinddocument
  23. \end{document}

to get
Image
BTW: The name of the font file is OLDENGL.TTF. So can also copy that font file to the document directory and use \newfontfamily{\otherfamily}{OLDENGL.TTF} to load the font by filename instead of font name. This even works without font installation and if loading the font by font name fails.

As you can see, using fontspec with LuaLaTeX or XeLaTeX is very easy.

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

Postby sheenshahid » Sat Feb 01, 2020 6:29 pm

Here is my latex file. I just have to write name of the the university in old English style ("Old English Text MT") and the things may same. kindly use latex only and help me i have very short time now.
I request u to solve my problem
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. \documentclass[12pt,a4paper,openany]{report}
  3. \usepackage{latexsym}
  4. \usepackage{graphicx}
  5. \usepackage{amsmath,amsthm}
  6. \usepackage{amssymb}
  7. \usepackage{epsfig}
  8. \usepackage[T1]{fontenc}
  9. \usepackage{palatino}
  10. \usepackage{caption}
  11. \usepackage{mathpazo}
  12. %\usepackage{hang,hangindent=-.5cm}
  13. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  14. \textwidth 5.8in \textheight 8.5 in \topmargin 0.0in \oddsidemargin
  15. 0.0in \evensidemargin 0.0in \setlength{\parindent}{12pt}
  16. \pagestyle{plain}
  17. \renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
  18. \newtheorem{thm}{Theorem}[section]
  19. \newtheorem{cor}[thm]{Corollary}
  20. \newtheorem{lem}[thm]{Lemma}
  21. \newtheorem{prop}[thm]{Proposition}
  22. \newtheorem{ax}{Axiom}
  23. \theoremstyle{definition}
  24. \newtheorem{defn}{Definition}[section]
  25. \theoremstyle{remark}
  26. \newtheorem{rem}{Remark}[section]
  27. \newtheorem*{notation}{Notation}
  28. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  29. \renewcommand{\baselinestretch}{1.5}
  30. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  31. \numberwithin{equation}{chapter}
  32. \begin{document}
  33. %\renewcommand{\thepage}{\roman{page}}[roman page number from title]
  34. \renewcommand{\thepage}{}
  35. \vspace{3cm}
  36. \begin{center}
  37. \section*{\textbf{\Huge{title}}}
  38. \end{center}
  39. %\begin{figure}[htb] % Default value is [tbp]
  40. %\begin{center}
  41. %\epsfig{file=iub.eps, width=0.9 in}
  42. %\end{center}
  43. %\end{figure}
  44. \begin{center}
  45. By
  46. \end{center}
  47. \begin{center}
  48. {\Large\bf{Student name}\\ [2 cm]
  49. \end{center}
  50. \begin{center}
  51. {\Large\bf{Dissertation}}
  52. \end{center}
  53. \begin{center}
  54. %\\ \quad
  55. {\bf{Session 2019}}\\[3 cm]
  56. {\Large\bf{Department name}}\\
  57. {\Large\bf{here is my University name}}\\
  58. {\Large\bf{city,country}}\\
  59. 2020
  60. \end{center}
  61.  
  62. \newpage
  63.  
  64.  
  65. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  66.  
  67.  
  68. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  69. \newpage
  70. \pagenumbering{roman}
  71. \begin{center}
  72. \section*{Student's Declaration}
  73. \end{center}
  74. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  75. \newpage
  76. \begin{center}
  77. \section*{Supervisor's Declaration}
  78. \end{center}
  79. %\addcontentsline{toc}{section}{Supervisor's Declaration}{}
  80. \newpage
  81. \begin{center}
  82. \section*{Certificate}
  83. \end{center}
  84.  
  85. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  86. \newpage
  87. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  88. \begin{center}
  89. \section*{Acknowledgements}
  90. \end{center}
  91. %\addcontentsline{toc}{section}{Acknowledgements}{}
  92. \qquad\qquad \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad
  93. \textbf{Shahid Rafiq}
  94.  
  95. \newpage
  96. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  97. %\begin{center}
  98. %\section*{\underline{\textsl{Dedication}}}
  99. %\end{center}
  100. %\addcontentsline{toc}{section}{Dedication}{}
  101. \qquad\\[4 Cm]
  102. \qquad\qquad \qquad\qquad\qquad\qquad\ \textbf{To my mother, wife and kids}
  103. \qquad\qquad \qquad\qquad\qquad\qquad\qquad\qquad %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  104. %\tableofcontents
  105. %\newpage
  106. %\listoftables
  107. %\addcontentsline{toc}{section}{List of Tables}{}
  108. %\listoffigures
  109. %\addcontentsline{toc}{section}{List of Figures}{}
  110. \newpage
  111. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Preface%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  112. \chapter*{\begin{center}{Preface}\end{center}}
  113. \addcontentsline{toc}{section}{Preface}{}
  114.  
  115.  
  116. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  117. \addcontentsline{toc}{section}{Contents}{}
  118. \tableofcontents
  119. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  120. %\listoftables
  121. {%
  122. \let\oldnumberline\numberline%
  123. \renewcommand{\numberline}{\tablename~\oldnumberline}%
  124. \listoftables%
  125. }
  126. \addcontentsline{toc}{section}{List of Tables}{}
  127. %\renewcommand{\cftfignumwidth}{6em}
  128. %\renewcommand{\cftfigpresnum}{Figure }
  129.  
  130. %\listoffigures
  131. {%
  132. \let\oldnumberline\numberline%
  133. \renewcommand{\numberline}{\figurename~\oldnumberline}%
  134. \listoffigures%
  135. }
  136. %\renewcommand{\cftfigpresnum}{Figure }
  137. \addcontentsline{toc}{section}{List of Figures}{}
  138. %\listoffigures
  139. \newpage
  140. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  141. %\section*{List of Symbols}
  142. %\addcontentsline{toc}{section}{List of Symbols}{}
  143. %\begin{enumerate}
  144. %\item $u$ shows the velocity component along x-axis
  145. %\item $v$ shows the velocity component along y-axis
  146. %\item $w$ shows the velocity component along z-axis
  147. %%\item $A^{b}_{n}$, $H^{b}_{n}$, $S^{a}_{n,e}$ and $S^{a}_{n,o}$ are proposed subdivision schemes
  148. %%\item $A_{n}(z)$ and $P_{n}(z)$ are Laurent polynomials of the subdivision schemes
  149. % \end{enumerate}
  150. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  151. %\newpage
  152. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  153. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  154. \setcounter{page}{1}
  155. \renewcommand{\thepage}{\arabic{page}}
  156. %\include{Chap_1}
  157. %\include{Chap_2}
  158. %\include{Chap_3}
  159. %\include{Chap_4}
  160. %\include{Chap_5}
  161. %\include{Chap_6}
  162. % \include{Conclusions}
  163. %\include{reference}
  164.  
  165.  
  166.  
  167.  
  168. \end{document}

User avatar
Johannes_B
Site Moderator
Posts: 4163
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Feb 01, 2020 7:43 pm

Use a screenshot.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9568
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat Feb 01, 2020 8:29 pm

As Johannes said, you can write it in Word and make a Screenshot and include it using \includegraphics. You could even copy the logo from the university website to have it in its original version in the paper.

If I would be in the situation, I would run XeLaTeX as Ijon wrote just to create the single university name in the desired font as PDF, crop the PDF (pdfcrop) and use \includegraphics in the title with standard LaTeX or pdfLaTeX if the document needs it instead of XeLaTeX.

But including a screenshot or an image from the web site may be the easiest.

Stefan
LaTeX.org admin

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

Postby sheenshahid » Sun Feb 02, 2020 4:44 am

Screen shot or include graphics are not showing that display which may expected. So I m finding a way for this line in standard latex

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

Postby sheenshahid » Wed Feb 05, 2020 10:31 pm

Ijon Tichy wrote:
sheenshahid wrote:The name of this font is " old English " , which I noted from Microsoft word.

If this is the font from the Microsoft font library the correct name would be "Old English Text MT". If the font has been installed correctly you just have to replace "TeX Gure Chorus" in my example above by the correct font name:

Code: [Select all] [Expand/Collapse] [Download] (fontspec-example-oldengl.tex)
  1. % Important: You have to use LuaLaTeX or XeLaTeX instead of PDFLaTeX zu
  2. % compile this file!
  3. \documentclass{article}
  4.  
  5. \usepackage{fontspec}
  6. \usepackage{blindtext}
  7. \usepackage[english]{babel}
  8.  
  9. \setmainfont{TeX Gyre Termes}% Use the Times clone TeX Gyre Termes as main font.
  10. \newfontfamily{\otherfamily}{Old English Text MT}% Load "Old English Text MT" as an additional font family.
  11.  
  12. \begin{document}
  13. \begin{titlepage}
  14. {\otherfamily This is the name of the university.}
  15. \vfill
  16. {\Huge\bfseries The Name of the Game\par}
  17. \bigskip
  18. {\large\bfseries Me and Boby McGee\par}
  19. \vfill\vfill\vfill
  20. \end{titlepage}
  21. \tableofcontents
  22. \blinddocument
  23. \end{document}

to get
Image
BTW: The name of the font file is OLDENGL.TTF. So can also copy that font file to the document directory and use \newfontfamily{\otherfamily}{OLDENGL.TTF} to load the font by filename instead of font name. This even works without font installation and if loading the font by font name fails.

As you can see, using fontspec with LuaLaTeX or XeLaTeX is very easy.


Dear i am using latex and has also installed this font. Plz now tell me what to do,

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

Postby Ijon Tichy » Thu Feb 06, 2020 9:23 am

As already told by me and Johannes: Either use a screenshot of the small text or switch over to xelatex or lualatex as shown. xelatex and lualatex are also LaTeX. For the second suggestion, you just have to remove fontenc, palatino and mathpazo, load fontenc as shown and tell your editor to use either xelatex or lualatex.

BTW: There is several strange code in your example:
  • There is a "Missing } inserted" error in your example.
  • openany is the default of report and also doesn't change anything with single-sided documents, which it the default of report too.
  • Loading deprecated package palatino before package mathpazo doesn't make sense. BTW: Both packages do not load Times New Roman as you wrote initially. They load a Palatino clone.
  • Is is recommended not to change the layout parameters like \topmargin manually but use a package like geometry.
  • \renewcommand{\baselinestretch}{1.5} is not recommended since LaTeX2e (1994) and should be replaced either by \linespread{1.5} or (better) by usage of package setspace.
  • \renewcommand{\thepage}{} is not recommended. A general replacement would be \thispagestyle{empty} if needed in combination with \pagestyle{empty}. But in case of a title page, usage of titlepage environment would be the better suggestion.
  • Here:
    \begin{center}
    \section*{\textbf{\Huge{title}}}
    \end{center}

    the usage of \section* doesn't make any sense. And instead of starting a new center environment for every line, I would recommend to use only a single one.
  • \bf is deprecated. Also it does not hat any argument. You should replace \bf{…} by \textbf{…}, which has an argument, or {\bf …} by {\bfseries …}
  • All the \quad and \qquad are very strange. Some of them even result in an empty line. So usage of either flushleft environment or \hspace would be resommended.
  • The "List of Tables" entry to the table of contents is done after the list of tables, so it references the last page of the list of tables. It is recommended to add it at the very beginning of the list of tables or (better) use a package like bibintoc.
  • Same for the "List of Figures".
  • The correct entry level for the "List of …" entries would be chapter not section.
  • Instead of \setcounter{page}{1}\renewcommand{\thepage}{\arabic{page}} usage of \pagenumbering{arabic} would be recommended.
  • Usage of center environment inside the argument of \chapter or \chapter* is not recommended but an evil hack.
  • The "Contents" entry for the contents shows the wrong page, because of missing \cleardoublepage. Here package bibintoc would be useful too.
  • package epsfig is only a compatibility wrapper package to graphics. You are already using graphicx, so epsfig should not be needed. It is recommended to not longer use epsfig's command \psfig but replace it by graphicx's \includegraphics.
Last edited by Ijon Tichy on Sat Feb 08, 2020 5:47 pm, edited 1 time in total.

User avatar
Johannes_B
Site Moderator
Posts: 4163
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Feb 08, 2020 6:55 am

There is a crosspost on tex.sx
https://tex.stackexchange.com/q/526843/37907
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 1 guest