Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I tried to generate a pdf file from the following document using pdfLaTeX and XeLaTeX on Windows 7 (MiKTex 2.9). pdfLaTeX responded that I need to use XeLaTeX. When I used XeLaTeX, it said the the font sanskrit cannot be found. I tried other fonts such as samarkan, Bengali,Gurmukhi, Gujarati from the Devanagari font set. Could someone please help me to resolve this issue as well as find the way to run it under pdfLaTeX?

\documentclass[10pt]{report}
\usepackage[letterpaper,top=2.0cm,bottom=2.0cm,left=0.5cm,right=1cm]{geometry}
\usepackage{booktabs}
\usepackage{array}
\usepackage{fancyhdr}
\usepackage[iso]{datetime}
\usepackage{lastpage}

\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hindi}

\usepackage{fontspec}
\setmainfont{Times New Roman}
\newfontfamily\devanagarifont[Scale=MatchUppercase]{sanskrit}
\newfontfamily\devtransl[Mapping=DevRom]{Times New Roman}

\pagestyle{fancy}
\fancyhf{}
\setlength\headheight{0.5pt}
\chead{\textbf{\huge{Inform}}}
\lhead{\textbf{Test1}}
\rhead{\textbf{\normalsize{Sets}}}
\rfoot{\today \hspace{0.5pt} \currenttime}
\cfoot{Page \thepage\ of \pageref{LastPage}}\lfoot{Some}

\renewcommand{\headrulewidth}{1pt}

\usepackage{supertabular}
\begin{document}
\fontsize{8}{10}\selectfont
\tablehead
{
\toprule
& \multicolumn{1}{p{24.5mm}}{\textbf{\foreignlanguage{hindi}{ग्रोस वोलयूम}}}
& \multicolumn{1}{p{21mm}}{\textbf{नेट वाल्यूम}}
& \multicolumn{1}{p{16mm}}{\textbf{लेवल}}
& \multicolumn{1}{p{21mm}}{\textbf{तापमान}}
& \multicolumn{1}{p{16mm}}{\centering{\textbf{ऊलाज}}}
& \multicolumn{1}{p{42mm}}{\centering{\textbf{लास्ट अपडेटड}}}\\

& \multicolumn{1}{p{24.5mm}}{\centering{\textbf{गैलन}}}
& \multicolumn{1}{p{21mm}}{\centering{\textbf{गैलन}}}
& \multicolumn{1}{p{16mm}}{\textbf{सेन्टीमीटर}}
& \multicolumn{1}{p{21mm}}{\centering{\textbf{सेन्टीग्रेड}}}
& \multicolumn{1}{p{16mm}}{\centering{\textbf{गैलन}}} & \\
\toprule
}

\begin{supertabular}{p{35mm}*{6}{r}}
\\ \multicolumn{7}{l}{\textbf {3001}}\\\\
\textbf{टेंक  2} & \multicolumn{6}{l}{SET1}\\
PROD 2& \multicolumn{6}{l}{(4,011 अधिकतम)}\\
\multicolumn{1}{r}{\textbf{प्रोडक्ट}} & 2,495.40 & 2,479.66 & 145.55 & 20.53 & 1,313.07 & 19/04/2012 15:00:23 \\
\multicolumn{1}{r}{\textbf{Water}} & 1.79 & & 1.00 & & & \\\\ 
\textbf{टेंक  3} & \multicolumn{6}{l}{SET2}\\
PROD 3& \multicolumn{6}{l}{(4,011 अधिकतम)}\\
\multicolumn{1}{r}{\textbf{प्रोडक्ट}} & 2,593.08 & 2,578.51 & 150.40 & 20.01 & 1,213.86 & 19/04/2012 15:00:23 \\
\multicolumn{1}{r}{\textbf{SET3}} & 3.32 & & 1.51 & & & \\\\ 
\toprule[2pt]\\
\end{supertabular}
\end{document}
share|improve this question
3  
Welcome to TeX.sx! Thanks for posting a full document. Please follow my advice at I've just been asked to write a minimal example, what is that? to reduce your code to a so-called Minimal Working Example. As it is now, most of the things in your code are entirely unrelated to your actual problem. By making problems abstract and minimal, we try to make them maximally relevant and helpful for other users who might have the same problem. –  doncherry Mar 12 '13 at 18:58
add comment

2 Answers

there are a lot of Times fonts and sanskrit. You have to look into your system for the correct names, eg for Linux

fc-list | grep Sanskrit

However, you have to switch to the sanskrit font

\documentclass[10pt]{report}

\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hindi}

\usepackage{fontspec}
\setmainfont{TimesNewRomanPSStd-Regular}
\newfontfamily\devanagarifont[Scale=MatchUppercase]{Sanskrit2003}
\newfontfamily\devtransl[Mapping=DevRom]{TimesNewRomanPSStd-Regular}

\usepackage{booktabs,supertabular}

\begin{document}
\tablehead
{
\toprule
& \multicolumn{1}{p{24.5mm}}{\devanagarifont\textbf{\foreignlanguage{hindi}{ग्रोस वोलयूम}}}
& \multicolumn{1}{p{21mm}}{\devanagarifont\textbf{नेट वाल्यूम}}
& \multicolumn{1}{p{16mm}}{\devanagarifont\textbf{लेवल}}
& \multicolumn{1}{p{21mm}}{\devanagarifont\textbf{तापमान}}
& \multicolumn{1}{p{16mm}}{\centering{\devanagarifont\textbf{ऊलाज}}}
& \multicolumn{1}{p{42mm}}{\centering{\devanagarifont\textbf{लास्ट अपडेटड}}}\\

& \multicolumn{1}{p{24.5mm}}{\centering{\devanagarifont\textbf{गैलन}}}
& \multicolumn{1}{p{21mm}}{\centering{\devanagarifont\textbf{गैलन}}}
& \multicolumn{1}{p{16mm}}{\devanagarifont\textbf{सेन्टीमीटर}}
& \multicolumn{1}{p{21mm}}{\devanagarifont\centering{\textbf{सेन्टीग्रेड}}}
& \multicolumn{1}{p{16mm}}{\devanagarifont\centering{\textbf{गैलन}}} & \\
\toprule
}

\begin{supertabular}{p{35mm}*{6}{r}}
\\ \multicolumn{7}{l}{\textbf {3001}}\\\\
\devanagarifont\textbf{टेंक  2} & \multicolumn{6}{l}{SET1}\\
PROD 2& \multicolumn{6}{l}{(4,011 \devanagarifont अधिकतम)}\\
\multicolumn{1}{r}{\devanagarifont\textbf{प्रोडक्ट}} & 2,495.40 & 2,479.66 & 145.55 & 20.53 & 1,313.07 & 19/04/2012 15:00:23 \\
\multicolumn{1}{r}{\textbf{Water}} & 1.79 & & 1.00 & & & \\\\ 
\devanagarifont\textbf{टेंक  3} & \multicolumn{6}{l}{SET2}\\
PROD 3& \multicolumn{6}{l}{(4,011\devanagarifont  अधिकतम)}\\
\multicolumn{1}{r}{\devanagarifont\textbf{प्रोडक्ट}} & 2,593.08 & 2,578.51 & 150.40 & 20.01 & 1,213.86 & 19/04/2012 15:00:23 \\
\multicolumn{1}{r}{\textbf{SET3}} & 3.32 & & 1.51 & & & \\\\ 
\toprule[2pt]\\
\end{supertabular}
\end{document}

enter image description here

share|improve this answer
    
Dear Herbert, thank you for your response. I tried the console command in my Windows 7 and returns nothing. Do you know how can I install such font or if there is another font that I can use in this family? Also, is there a way to generate the pdf document by using pdfLatex instead of XeLatex? Thanks again for your help –  Hector Lake Mar 13 '13 at 16:54
    
Also I tried your example and got: "TimesNewRomanPSStd-Regular" cannot be found. Please help. Thank you –  Hector Lake Mar 13 '13 at 16:58
    
As I wrote, there are a lot of different Times New Roman. That one is installed in my system and in your it maybe another one. You can have a look into the font list. –  Herbert Mar 13 '13 at 17:02
add comment

I was under the impression that Latex has a different set of fonts as the host Operating System, at least for Windows. However it does not, it uses the same fonts as the Operating System. In the above problem and after the suggestion from Herbert, I installed the Sanskrit 2003 font in Windows from http://www.omkarananda-ashram.org/Sanskrit/itranslator2003.htm#dls and it worked:

\documentclass[10pt]{report}

\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hindi}

\usepackage{fontspec}
\setmainfont{Times New Roman}
\newfontfamily\devanagarifont[Scale=MatchUppercase]{Sanskrit 2003}
\newfontfamily\devtransl[Mapping=DevRom]{Times New Roman}

\usepackage{booktabs,supertabular}

\begin{document}
\tablehead
{
\toprule
& \multicolumn{1}{p{24.5mm}}{\devanagarifont\textbf{\foreignlanguage{hindi}{ग्रोस वोलयूम}}}
& \multicolumn{1}{p{21mm}}{\devanagarifont\textbf{नेट वाल्यूम}}
& \multicolumn{1}{p{16mm}}{\devanagarifont\textbf{लेवल}}
& \multicolumn{1}{p{21mm}}{\devanagarifont\textbf{तापमान}}
& \multicolumn{1}{p{16mm}}{\centering{\devanagarifont\textbf{ऊलाज}}}
& \multicolumn{1}{p{42mm}}{\centering{\devanagarifont\textbf{लास्ट अपडेटड}}}\\

& \multicolumn{1}{p{24.5mm}}{\centering{\devanagarifont\textbf{गैलन}}}
& \multicolumn{1}{p{21mm}}{\centering{\devanagarifont\textbf{गैलन}}}
& \multicolumn{1}{p{16mm}}{\devanagarifont\textbf{सेन्टीमीटर}}
& \multicolumn{1}{p{21mm}}{\devanagarifont\centering{\textbf{सेन्टीग्रेड}}}
& \multicolumn{1}{p{16mm}}{\devanagarifont\centering{\textbf{गैलन}}} & \\
\toprule
}

\begin{supertabular}{p{35mm}*{6}{r}}
\\ \multicolumn{7}{l}{\textbf {3001}}\\\\
\devanagarifont\textbf{टेंक  2} & \multicolumn{6}{l}{SET1}\\
PROD 2& \multicolumn{6}{l}{(4,011 \devanagarifont अधिकतम)}\\
\multicolumn{1}{r}{\devanagarifont\textbf{प्रोडक्ट}} & 2,495.40 & 2,479.66 & 145.55 & 20.53 & 1,313.07 & 19/04/2012 15:00:23 \\
\multicolumn{1}{r}{\textbf{Water}} & 1.79 & & 1.00 & & & \\\\ 
\devanagarifont\textbf{टेंक  3} & \multicolumn{6}{l}{SET2}\\
PROD 3& \multicolumn{6}{l}{(4,011\devanagarifont  अधिकतम)}\\
\multicolumn{1}{r}{\devanagarifont\textbf{प्रोडक्ट}} & 2,593.08 & 2,578.51 & 150.40 & 20.01 & 1,213.86 & 19/04/2012 15:00:23 \\
\multicolumn{1}{r}{\textbf{SET3}} & 3.32 & & 1.51 & & & \\\\ 
\toprule[2pt]\\
\end{supertabular}
\end{document}
share|improve this answer
    
Just a tip: if you indent the code by four spaces, it will shown as code. I did just that on your code, see above. Regarding the fonts: pdflatex does use its own set of Type 1 fonts, while XeteX and LuaLaTeX can use the system fonts. –  mafp Mar 14 '13 at 16:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.