Adding Griffith's script r to Lyx

by Bo Johnson   Last Updated November 08, 2018 22:23 PM

I've gotten Griffiths' script r from his website https://www.reed.edu/physics/faculty/griffiths/ and have things working in just a regular Latex editor. I compile using PDFLatex. I would like to get things working in Lyx but I'm having a hard time finding out how to get it all set up. Has anyone done this and knows how best to get it working in Lyx?

Tags : lyx


Answers 1


The simplest way, for a single document at least, would be to place ScriptR.pdf and BoldR.pdf in the same folder as the .lyx file, and then go to Document --> Settings --> LaTeX preamble in the LyX document, and add

\usepackage{graphicx}

\def\rcurs{{\mbox{$\resizebox{.16in}{.08in}{\includegraphics{ScriptR}}$}}}
\def\brcurs{{\mbox{$\resizebox{.16in}{.08in}{\includegraphics{BoldR}}$}}}
\def\hrcurs{{\mbox{$\hat \brcurs$}}}

from the sample .tex file. (If you have already added an image to the document via the LyX GUI, you don't need \usepackage{graphicx}.)

To use them, add an ERT with Ctrl + L and type e.g. \rcurs. If in math mode, then I don't think you need to type the backslash, i.e. type just rcurs after hitting Ctrl + L.

Torbjørn T.
Torbjørn T.
November 08, 2018 22:12 PM

Related Questions