wilsons wrote:
> LaTeX Error:  Missing \begin{document}.
>   \newfontfamily{\G}{L
> ucida Grande}
> You're in trouble here. Try typing <return> to proceed.
> If that doesn't work, type X <return> to quit.
>
> As I mentioned above, the exact same LaTeX code does exactly what I  
> want when placed directly in the preamble and used with ERT.

I suspect that the \newfontfamily command is put in preamble before the 
\usepackage{fontspec}. Since this is a command of that package, you need to 
load the fontspec package from the module.

Try

InsetLayout CharStyle:Greek
        LyxType               charstyle
        LabelString           greek
        LatexType             command
        LatexName             grk
        Preamble
          \RequirePackage{fontspec}
          \newfontfamily{\G}{Lucida Grande}
          \newcommand{\grk}[1]{\G #1}
         EndPreamble
End

InsetLayout CharStyle:Hebrew
        LyxType               charstyle
        LabelString           hebrew
        LatexType             command
        LatexName             heb
        Preamble
         \RequirePackage{fontspec}
         \newfontfamily{\H}{Lucida Grande}
         \newcommand{\heb}[1]{\H #1}
        EndPreamble
End


HTH,
Jürgen

Reply via email to