# How adjust hat r from Griffiths David's book

I have a difficult to center the hat bold accent as in the Griffiths David's book as the picture below extract from the book:

My output using

\usepackage{baskervald}


is different to the original picture of the book.

 \documentclass[12pt,a4paper,oneside]{book}
\usepackage[lmargin=7cm,rmargin=.7cm,bmargin=2cm,marginparwidth=5.5cm,marginparsep=2em]{geometry}
\usepackage{lipsum,sidenotes,tabularx}
\reversemarginpar % Page margins
\usepackage{graphicx} % Required for including pictures
\usepackage{xcolor}
\usepackage[scr, scaled=1.1]{rsfso}
\usepackage{bm}
\usepackage{amsmath,amssymb}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{dsfont}
\usepackage{mathrsfs}
\usepackage{scalerel}

%----------------------------------------------------------------------------------------
%   r Griffiths, curls and fonts from mt2pro[lite]->pro
%----------------------------------------------------------------------------------------

\def\rcurs{{\mbox{$\resizebox{.09in}{.08in}{\includegraphics[trim= 1em 0 14em 0, clip]{ScriptR}}$}}}
\def\brcurs{{\mbox{$\resizebox{.09in}{.08in}{\includegraphics[trim= 1em 0 14em 0, clip]{BoldR}}$}}}
\def\hrcurs{{\mbox{$\hat \brcurs$}}}
\begin{document}
$V(\mathbf r)=\frac{1}{4\pi \epsilon_0}\int_{\mathcal V} \frac{\mathbf P(\mathbf r')\cdot \hrcurs}{\rcurs^2}d\tau'$
\end{document}


In fact my output is:

How should I fix the problem?

• If you use characters then the font metrics help to align the accents and subscripts but as you are still arbitrarily using boxes to pull non-matching characters from other pdf files that becomes a lot harder. But even if you want different fonts why include the characters as images? – David Carlisle Jun 27 '18 at 21:24
• So does it exist for the Griffiths book r the original character without adding it as an image? If I remember correctly on this site there was a link how to use the Griffiths r using the pictures. Verily for me without image is better. And then I would like to use other calligraphic characters that I need in addition to those of my code as in Figure 1. Thank you so much. – Sebastiano Jun 27 '18 at 21:35
• you presumably had a font to make the pdfs? or have you just scanned a book to get them? – David Carlisle Jun 27 '18 at 21:43
• well you must be able to buy kaufmann and kaufmann-Bold together (the ScriptR.pdf uses kaufmann), but as I have said 10001 times before there really is no reason to use some non standard font here, it's just a fairly standard script font and its bold version, you could use stix for example which is already set up for tex and includes script characters. – David Carlisle Jun 27 '18 at 22:10
• You can grab a snippet from David Griffith's homepage: reed.edu/physics/faculty/griffiths.html (Ctrl+F script) It's all the way at the bottom. – Henri Menke Jul 1 '18 at 22:14

I'd be inclined to use stix2 which has a wide range of times-compatible alphabets already set up including script and bold script

\documentclass[12pt,a4paper,oneside]{book}

%----------------------------------------------------------------------------------------
%   VARIOUS REQUIRED PACKAGES AND CONFIGURATIONS
%----------------------------------------------------------------------------------------
\usepackage[lmargin=7cm,rmargin=.7cm,bmargin=2cm,marginparwidth=5.5cm,marginparsep=2em]{geometry}
\usepackage{lipsum,sidenotes,tabularx}
\reversemarginpar % Page margins
\usepackage{graphicx} % Required for including pictures
\usepackage{xcolor}

%----------------------------------------------------------------------------------------
%   FONTS
%----------------------------------------------------------------------------------------

\usepackage[full]{textcomp}

% you could consider using stix rather than newtxmatn

%\usepackage{bm}
\usepackage{amsmath,amssymb}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc} % Required for including letters with accents
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage{mathtools}

%using stix double struck for consistency
% \usepackage{dsfont}

% you can't want rsfso and mathrsfs (which are basically the same thing)
% but here I use stix script anyway
%%\usepackage[scr, scaled=1.1]{rsfso}
%% \usepackage{mathrsfs}

\usepackage{scalerel}
%\usepackage{amsthm}

\usepackage{stix2}
%----------------------------------------------------------------------------------------
%   bracket
%----------------------------------------------------------------------------------------

\usepackage{braket}

%----------------------------------------------------------------------------------------
%   cancel
%----------------------------------------------------------------------------------------
\usepackage{cancel}

%----------------------------------------------------------------------------------------
%   r Griffiths, curls and fonts from mt2pro[lite]->pro
%----------------------------------------------------------------------------------------

\def\rcurs{\mathscr{r}}
\def\brcurs{\mathbfscr{r}}
\def\hrcurs{\hat{\brcurs}}

\begin{document}
$V(\mathbf{r})=\frac{1}{4\pi \epsilon_0}\int_{\!\!\mathscr{V}}\! \frac{\mathbf{P}(\mathbf{r}')\cdot \hrcurs}{\rcurs^2}d\tau'$
\end{document}

• Thanks a lot for your alternative code. Obviously voted in favour. – Sebastiano Jun 28 '18 at 20:40