[OS X TeX] Xelatex fontspec Texshop and command line

Herbert Schulz herbs at wideopenwest.com
Sun Dec 19 17:28:08 EST 2010


On Dec 19, 2010, at 3:20 PM, Curiouslearn wrote:

> Thanks very much to all who replied. I am including the last few lines
> (which seem relevant) from the terminal output and the console window
> of the texshop. This will probably give those who know these things a
> better idea of what is happening. Thank you.
> 
> TeXSHOP Console
> ____________________________________________________________________________________________
> fontspec.cfg loaded.
> (/usr/local/texlive/2010/texmf-dist/tex/latex/fontspec/fontspec.cfg))
> (/usr/local/texlive/2010/texmf-dist/tex/latex/tools/array.sty)
> (./minimal_example.aux)
> *geometry* driver: auto-detecting
> *geometry* detected driver: xetex
> [1] (./minimal_example.aux) )
> Output written on minimal_example.pdf (1 page).
> Transcript written on minimal_example.log.
> 
> ____________________________________________________________________________________________
> 
> 
> 
> TERMINAL Console
> ____________________________________________________________________________________________
> fontspec.cfg loaded.
> (/usr/local/texlive/2010/texmf-dist/tex/latex/fontspec/fontspec.cfg))
> (/usr/local/texlive/2010/texmf-dist/tex/latex/tools/array.sty)
> No file minimal_example.aux.
> *geometry* driver: auto-detecting
> *geometry* detected driver: xetex
> [1] (./minimal_example.aux)
> ** WARNING ** Could not locate a virtual/physical font for TFM "cmr12".
> ** WARNING ** >> There are no valid font mapping entry for this font.
> ** WARNING ** >> Font file name "cmr12" was assumed but failed to
> locate that font.
> ** ERROR ** Cannot proceed without .vf or "physical" font for PDF output...
> 
> Output file removed.
> )
> Error 256 (driver return code) generating output;
> file minimal_example.pdf may not be valid.
> Transcript written on minimal_example.log.
> 
> ____________________________________________________________________________________________
> 
> Thanks for your time and help.
> On Sun, Dec 19, 2010 at 3:54 PM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>> 
>> On Dec 19, 2010, at 2:37 PM, Peter Dyballa wrote:
>> 
>>> 
>>> Am 19.12.2010 um 21:23 schrieb Curiouslearn:
>>> 
>>>> The following minimal example compiles fine if I run Xelatex in
>>>> TexShop. However, if I run
>>>> 
>>>>   xelatex filename.tex
>>>> 
>>>> from command line then I get an error and no pdf file is produced. Can
>>>> someone please help me understand what is happening?
>>>> 
>>>> I ran
>>>> 
>>>>   which xelatex
>>>> 
>>>> at the command line to find which xelatex is being called. It outputs:
>>>> 
>>>>   usr/texbin/xelatex
>>> 
>>> 
>>> When TeXShop and you are using the *same command*, then it cannot happen that the *same command* produces different results for the *same file*. Except, maybe, the environments in which the command runs are a bit different...
>>> 
>>> So: Check also TeXShop's preference settings! (And please include the error message and some context around it next time!)
>>> 
>>> --
>>> Greetings
>>> 
>>>  Pete
>>> 
>> 
>> Howdy,
>> 
>> Sorry, I don't have Cambria so I substituted Code2000. Given that it compiles exactly the same way within TeXShop and via Terminal.
>> 
>> By the way the, the default xelatex command called within TeXShop is
>> 
>> xelatex  -file-line-error -synctex=1 "file.tex"
>> 
>> so just running xelatex alone,
>> 
>> xelatex file.tex
>> 
>> should work just fine but not produce a synctex.gz file and not add more information about errors which TeXshop uses to go to errors in the source from the log information.
>> 
>> Good Luck,
>> 
>> Herb Schulz
>> (herbs at wideopenwest dot com)
>> 

Howdy,

Don't understand what is wrong there. What happens if you try to use a different font, like `Hoefler Text'? 

You also might try a more standard use of fontspec by setting the mainfont as in the sample file below:

%%!TEX TS-program = xelatex
%%!TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage[hmargin={1.2in,1.2in},vmargin={1.5in,1.5in}]{geometry}
\usepackage{mdwlist}
\usepackage{paralist}
\usepackage{fontspec}
\usepackage{array}

\setmainfont{Cambria}
%\setmainfont{Hoefler Text}

\setlength{\parindent}{0pt}
\setlength{\parskip}{2ex plus 0.5ex minus 0.1ex}

\linespread{1.05}

\begin{document}
%\fontspec{Cambria}
%\fontspec{Hoefler Text}

This works when typeset from TexShop. However, if I typeset using the
xelatex command at the command line, I get an error.

trying acc\'{e}nted characters.

\end{document}

As I said before, I don't have Cambria (I assume you have a recent MSWord) so I used `Hoefler Text' this time around. By the way, where is the Cambria font stored?

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the MacOSX-TeX mailing list