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.

Friends,

I am working on a XeLaTeX document. I am almost done with my document, but I need to input text from a foreign language. I am running Mac OS X. I go to Preferences > Language & Text and in there I enable Gurmukhi - QWERTY. This allows me to input Punjabi characters, which I am able to see in MS Word. I want to input the following unicode characters:

ਰੋਂਦਾ ਬੱਚਾ  ਿੲਕ

However, when I simply paste it into my TeXworks file, it simply does not show up when I compile a PDF file. I have indeed tried to google this, but came up with nothing other than adding some of these statements to my preamble. I am pretty desperate at this point.

My preamble already looks like this:

\documentclass[a4paper,12pt]{article} %options: [a4paper, leqno, 11pt]
\usepackage{setspace}
\usepackage{fullpage}
\usepackage[cm-default]{fontspec}
\usepackage{amssymb}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage[utf8]{inputenc}

% -----Page Style-------------
\pagestyle{plain}

% -----Symbols----------------

\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{graphicx}
share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

You need to load a font which contains these characters. Load an appropriate font using \setmainfont and all should be well.

share|improve this answer
    
someone by jleedev was able to solve my problem, suggesting I do this: \newfontfamily\gu{Gurmukhi MT} \begin{document} {\gu ਰੋਂਦਾ ਬੱਚਾ ਿੲਕ} It worked perfectly. –  somefreakingguy Dec 14 '10 at 10:06
add comment

If you don’t want to (or can’t) use the same font for both alphabets, I think you have to explicitly choose the font when you need it.

\newfontfamily\gu{Gurmukhi MT}
\begin{document}
{\gu ਰੋਂਦਾ ਬੱਚਾ  ਿੲਕ}

(On Mac you can use “Gurmukhi MT”; FreeSans and FreeSerif also contain the glyphs.)

Also: The inputenc package warns that it should not be loaded as XeTeX already uses UTF8.

share|improve this answer
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.