[Tikzdevice-bugs] getMetrics error
Sharpie
chuck at sharpsteen.net
Tue Mar 8 06:51:08 CET 2011
On Monday, March 7, 2011 1:47:10 PM UTC-8, Anh Nguyen wrote:
>
> No matter what I do, I cannot get tikzDevice to run. I've already set the
> correct path to my LaTex compiler but this is the error I get running
> "testRTikZDevice.R"-- I'm at a loss to why this is happening.
Hi Anh,
It looks like the test that is failing is the XeLaTeX test which is designed
to show ways in which the XeLaTeX engine can exploit system fonts and access
advanced features such as glyph variants. From the log and your explanation
of the steps you took to set up, it looks like `pdflatex` was used as the
LaTeX compiler---the test requires a XeTeX-based compiler such as `xelatex`
in order to run successfully.
I'm not sure it is possible to successfully run this particular test on
stock Windows, even if you set `xelatex` to be the compiler that is used.
This is because particular font being used, Zapfino, is provided by default
on OS X (where we do most of our development) but is only available for
other platforms through commercial purchase (if I recall correctly).
The test uses Zapfino because it is one of the few fonts that provides a
large number of variants for each glyph.
-Charlie
> ------------
>
> >
>
> source("C:\\Users\\***\\Documents\\R\\win-library\\2.12\\tikzDevice\\tests\\testRTikZDevice.
> R")
> Running Test 01 ... \documentclass{article}
> \usepackage[active,tightpage,xetex]{preview}
> \PreviewEnvironment{pgfpicture}
> \setlength\PreviewBorder{0pt}
> \usepackage{fontspec}
> \usepackage[colorlinks, breaklinks, pdftitle={The Beauty of
> LaTeX},pdfauthor={Taraborelli, Dario}]{hyperref}
> \usepackage{tikz}
> \usepackage{color}
> \definecolor{Gray}{rgb}{.7,.7,.7}
> \definecolor{lightblue}{rgb}{.2,.5,1}
> \definecolor{myred}{rgb}{1,0,0}
> \newcommand{\red}[1]{\color{myred} #1}
> \newcommand{\reda}[1]{\color{myred}\fontspec[Variant=2]{Zapfino}#1}
> \newcommand{\redb}[1]{\color{myred}\fontspec[Variant=3]{Zapfino}#1}
> \newcommand{\redc}[1]{\color{myred}\fontspec[Variant=4]{Zapfino}#1}
> \newcommand{\redd}[1]{\color{myred}\fontspec[Variant=5]{Zapfino}#1}
> \newcommand{\rede}[1]{\color{myred}\fontspec[Variant=6]{Zapfino}#1}
> \newcommand{\redf}[1]{\color{myred}\fontspec[Variant=7]{Zapfino}#1}
> \newcommand{\redg}[1]{\color{myred}\fontspec[Variant=8]{Zapfino}#1}
> \newcommand{\lbl}[1]{\color{lightblue} #1}
> \newcommand{\lbla}[1]{\color{lightblue}\fontspec[Variant=2]{Zapfino}#1}
> \newcommand{\lblb}[1]{\color{lightblue}\fontspec[Variant=3]{Zapfino}#1}
> \newcommand{\lblc}[1]{\color{lightblue}\fontspec[Variant=4]{Zapfino}#1}
> \newcommand{\lbld}[1]{\color{lightblue}\fontspec[Variant=5]{Zapfino}#1}
> \newcommand{\lble}[1]{\color{lightblue}\fontspec[Variant=6]{Zapfino}#1}
> \newcommand{\lblf}[1]{\color{lightblue}\fontspec[Variant=7]{Zapfino}#1}
> \newcommand{\lblg}[1]{\color{lightblue}\fontspec[Variant=8]{Zapfino}#1}
> \newcommand{\old}[1]{
> \fontspec[Ligatures={Common, Rare},Variant=1,Swashes={LineInitial,
> LineFinal}]{Zapfino}
> \fontsize{25pt}{30pt}\selectfont #1}%
> \newcommand{\smallprint}[1]{\fontspec{Hoefler
> Text}\fontsize{10pt}{13pt}\color{Gray}\selectfont #1}%
>
> \usepackage[utf8]{inputenc}
>
> \usepackage[T1]{fontenc}
>
> \usetikzlibrary{calc}
>
> \batchmode
> \begin{document}
> \begin{tikzpicture}
> \node[inner sep=0pt, outer sep=0pt, scale=1.20000004768372] (TeX)
> {\bfseries
> Test 1%
> };
> \path let \p1 = ($(TeX.east) - (TeX.west)$),
> \n1 = {veclen(\x1,\y1)} in (TeX.east) -- (TeX.west)
> node{ \typeout{tikzTeXWidth=\n1} };
> \makeatletter
> \@@end
> This is pdfTeX, Version 3.1415926-1.40.11 (MiKTeX 2.9) (preloaded
> format=pdflatex 2011.3.7) 7 MAR 2011 13:12
> entering extended mode
> **C:/Users/***/AppData/Local/Temp/RtmpQMS6zb/tikzStringWidthCalc.tex
> (C:/Users/***/AppData/Local/Temp/RtmpQMS6zb/tikzStringWidthCalc.tex
> LaTeX2e <2009/09/24>
> Babel <v3.8l> and hyphenation patterns for english, afrikaans,
> ancientgreek,
> ar
> abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan,
> coptic,
> croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish,
> french,
> ga
> lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian,
> iceland
> ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin,
> lat
> vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek,
> ngerm
> an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish,
> portuguese,
> romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish,
> swis
> sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian,
> uppersorbian, u
> senglishmax, welsh, loaded.
> (C:\MiKTeX\tex\latex\base\article.cls
> Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
> (C:\MiKTeX\tex\latex\base\size10.clo
> File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
> )
> \c at part=\count79
> \c at section=\count80
> \c at subsection=\count81
> \c at subsubsection=\count82
> \c at paragraph=\count83
> \c at subparagraph=\count84
> \c at figure=\count85
> \c at table=\count86
> \abovecaptionskip=\skip41
> \belowcaptionskip=\skip42
> \bibindent=\dimen102
> )
> Error in getMetricsFromLatex(TeXMetrics) :
> TeX was unable to calculate metrics for the following string
> or character:
>
> Test 1
>
> Common reasons for failure include:
> * The string contains a character which is special to LaTeX unless
> escaped properly, such as % or $.
> * The string makes use of LaTeX commands provided by a package and
> the tikzDevice was not told to load the package.
>
> The contents of the LaTeX log of the aborted run have been printed above,
> it may contain additional details as to why the metric calculation failed.
> In addition: Warning messages:
> 1: In readLines(texOut) :
> incomplete final line found on
> 'C:\Users\***\AppData\Local\Temp\RtmpQMS6zb/tikzStringWidthCalc.log'
> 2: In readLines(texLog) :
> incomplete final line found on
> 'C:\Users\***\AppData\Local\Temp\RtmpQMS6zb/tikzStringWidthCalc.log'
> Timing stopped at: 0.02 0 0.22
>
> -----
>
> BTW, pdflatex is showing up correctly according to my options():
>
> $R_PDFLATEXCMD
> [1] "C:/MikTex/miktex/bin/pdflatex.exe"
>
> $tikzLatex
> [1] "C:/MikTex/miktex/bin/pdflatex.exe"
>
> $tikzLatexDefault
> [1] "C:/MikTex/miktex/bin/pdflatex.exe"
> _______________________________________________
> Tikzdevice-bugs mailing list
> Tikzdev... at lists.r-forge.r-project.org
>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tikzdevice-bugs
>
>
More information about the Tikzdevice-bugs
mailing list