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 run the Latex code posted by Stephen Kottwiz as an answer to this question: How to make Sanskrit Title in Devanagari Package

Here's the same code repeated:

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{devanagari}
\usepackage{fontspec,bera}
\begin{document}
\title{{\dn vivekachoodama.ni}}
\author{Sri Sankaracharya}
\maketitle
\begin{flushleft}
{\dn sarvavedaantasiddhaantagocara.m tamagocara.m | \\ govinda.m paramaananda.m {sad}guru.m pra.nato.asmyaham ||  1}


\end{flushleft}
\end{document}

I tried using PDFLatex to process the code and am getting the following error.
line 0: File ended while scanning use of \iow_wrap_loop:w

Can anyone shed any light on this matter?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Since fontspec is being loaded, you need to process the example with xelatex; however, the original code won't work as expected (using xelatex) and will produce the error message

) Runaway argument? \q_stop \exp_args:NNo \group_end: \iow_term:n \l__iow_wrap_tl \iow_term:n \ETC. ! File ended while scanning use of \__iow_wrap_loop:w. <inserted text> 
                \par  l.269 \luatex_if_engine:T
                          { \RequirePackage{fontspec-luatex} \endinput } ?

in order for the example to work (at least in TeX Live2012) it's necessary to load fontspec before devanagari (and the fontenc and inputenc packages should not be loaded):

\documentclass[10pt]{article}
\usepackage{fontspec}
\usepackage{devanagari}
\usepackage{bera}

\title{{\dn vivekachoodama.ni}}
\author{Sri Sankaracharya}

\begin{document}

\maketitle

\begin{flushleft}
{\dn sarvavedaantasiddhaantagocara.m tamagocara.m | \\ govinda.m paramaananda.m {sad}guru.m pra.nato.asmyaham ||  1}
\end{flushleft}

\end{document}

This produces the following output:

enter image description here

and a warning about some fonts not being available:

LaTeX Font Warning: Font shape `EU1/fve/m/n' undefined (Font)
      using `EU1/lmr/m/n' instead on input line 11.

Not loading the bera package suppresses the warning.

If you want to process with pdflatex, remove the fontspec package (and you can again load fontenc and inputenc):

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{devanagari}
\usepackage{bera}

\title{{\dn vivekachoodama.ni}}
\author{Sri Sankaracharya}

\begin{document}

\maketitle

\begin{flushleft}
{\dn sarvavedaantasiddhaantagocara.m tamagocara.m | \\ govinda.m paramaananda.m {sad}guru.m pra.nato.asmyaham ||  1}
\end{flushleft}

\end{document}

This time no warning is produced.

share|improve this answer

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.