First a side remark: With xelatex you should never load inputenc (you did it in your example).
Beside this: Theoretically it is possible to use symbols from an open type font in pdftex. But you need to create a tfm-file, you need to create enc-file(s) and a map-entry. And as pdftex can't subset open type you probably also need to split the open type and create various type1 fonts. This means a lot of work - and imho all this new files will count as "strange packages" and so your publisher will not like it. If you really don't want to use any other package you could perhaps cheat like this:
\documentclass{article}
\usepackage{lmodern}
\begin{document}
$\lbrack\!\lbrack x \rbrack\!\rbrack$
\end{document}
The package is not adapted to unicode-math. It uses e.g. \mathit where with unicode-math you should use \symit. In your example you can solve the problem with this patch, but there more places which need to be corrected. You should contact the author.
\documentclass[12pt,a4paper,twoside]{report}
\usepackage{hepnames}
\usepackage{fontspec}
% With setmainfont here, the \Pgm and \Pgt macros work
\setmainfont
[ Extension = .otf,
UprightFont = *-regular,
BoldFont = *-bold,
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
]{xits}
\usepackage[math-style=ISO]{unicode-math}
% With setmainfont here, the \Pl macro works
\setmathfont
[ Extension = .otf,
BoldFont = *bold,
Ligatures=TeX,
]{xits-math}
\usepackage{xpatch}
\makeatletter
\xpatchcmd\@HepGenStyle{\mathit}{\symit}{}{\show\fail}
\makeatother
\begin{document}
Macros being tested:
\begin{itemize}
\item $\Pgm$ should print $\mu$-like
\item $\Pgt$ should print $\tau$-like
\item $\Pgn$ should print $\nu$-like % I was unable to get this macro, \Pgn, to work under any circumstance
\item $\Pl$ should print an ell
\end{itemize}
\end{document}
Edit
The correct place for the \setmainfont
is behind unicode-math, as this will set \mathit
to the italic version of xits and not to computer modern.
In this case one then has to patch another command and replace \mathup
. The symbols are upright now. If this is not wanted, use \usepackage[italic]{hepnames}
.
\documentclass[12pt,a4paper,twoside]{report}
\usepackage{hepnames}
\usepackage[math-style=ISO]{unicode-math}
\setmainfont
[ Extension = .otf,
UprightFont = *-regular,
BoldFont = *-bold,
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
]{xits}
% With setmainfont here, the \Pl macro works
\setmathfont
[ Extension = .otf,
BoldFont = *bold,
Ligatures=TeX,
]{xits-math}
\usepackage{xpatch}
\makeatletter
\xpatchcmd\@HepGenStyle{\mathit}{\symit}{}{\show\fail}
\xpatchcmd\@HepConStyle{\mathup}{\symup}{}{\show\fail}
\makeatother
\begin{document}
Macros being tested:
\begin{itemize}
\item $\Pgm$ should print $\mu$-like
\item $\Pgt$ should print $\tau$-like
\item $\Pgn$ should print $\nu$-like % I was unable to get this macro, \Pgn, to work under any circumstance
\item $\Pl$ should print an ell
\end{itemize}
\end{document}
Best Answer
You can use the
upint
option forstix
:If you just want the symbols while keeping the fonts, you can do like this: