1

What is the best way to use special characters in LaTeX? I saw some answers here suggesting that I should use LuaLaTeX but I am not familiar with formatting on it, and I have just begun using LaTeX for my project report.

LaTeX preamble:

\documentclass[english]{report}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\usepackage{pgf}
\usepackage{pgfpages}

This code is supposed to print the text in the center of the page and the line both. It does that however when I use characters like &, ' it shows an error. I have used the name of my institute here as an example

\pagebreak
\hspace{0pt}
\vfill
\begin{center}
PIMPRI CHINCHWAD EDUCATION TRUST’S
\end{center}
\vfill
\hspace{0pt}
\pagebreak

The error:

! Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `latin9'.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.49 PIMPRI CHINCHWAD EDUCATION TRUST��
                                       �S
? H
You need to provide a definition with \DeclareInputText 
or \DeclareInputMath before using this key.
? 
  • 3
    It depends entirely upon what characters you need... very obscure math? linguistic diacritics? lovely dingbats? .... For the simple problem you have, just use: \rq (right quotation mark). Also ampersand is simply: & – David G. Stork Jan 21 '20 at 03:34
  • Is your file really encoded in latin9? Modern editors normally use utf8 today. – Ulrike Fischer Jan 21 '20 at 07:13
  • 1
    https://tex.stackexchange.com/questions/14/how-to-look-up-a-symbol-or-identify-a-math-symbol-or-character – Fran Jan 21 '20 at 07:41
  • Thank you David for the very helpful math equations you suggested. As Fran pointed out, most of the symbols can be written as functions and the link he pointed to is really helpful. Thanks a lot for the help! – Antariksh Pratham Jan 21 '20 at 09:07
  • UlrikeFischer I use TeXworks with UTF8. What I sent was just a small part of the complete document, which is just a template sent by my institute for the project. – Antariksh Pratham Jan 21 '20 at 09:09
  • If you are using UTF-8 then delete \usepackage[latin9]{inputenc} as the only purpose of that command is to specify that you are not using UTF-8 so latex will not understand any non ascii characters after that declaration. – David Carlisle Jan 22 '20 at 11:49
  • David Carlisle I have already made the changes after Ulrike's comment. Thanks a lot for stressing that again – Antariksh Pratham Jan 22 '20 at 12:12

0 Answers0