1

How can i choose the char"EB40 also from other font and for every chapter separately?

\documentclass[a4paper,12pt]{book}
\usepackage{fontspec}
\usepackage{titlesec}

\newfontface\cmaiusc[LetterSpace=40,WordSpace=2,RawFeature={+swsh,+dlig}]{lmromancaps10-regular.otf}


\newcommand{\Chapter}[4][]{%
   \chapter[\if\relax\detokenize{#1}\relax#2\else#1\fi]{%
%     \makebox[\textwidth][c]{\includegraphics[width=6in]{#4}}\\
     #2,\\\large #3\\\char"EB40}
   \begin{center}
     \textit{\cmaiusc capitolo\ \roman{chapter}.}
   \end{center}
}
\titleformat{\chapter}[display]%
   {\centering\bfseries\huge}%
   {}%
   {-40pt}%
   {}
\titlespacing*{\chapter}
  {0pt}{0pt}{5pt}


\begin{document}
\Chapter{Analysis mathematica}{principia.}{}
\end{document}
David Carlisle
  • 757,742
Aurelius
  • 7,653
  • 10
  • 49
  • 103
  • 2
    U+EB40 is in the Private Use Area, so you can't rely on it printing the same in different fonts. – egreg Aug 04 '12 at 11:13
  • @egreg i'm sorry, i am explained bad, the EB40 is an example i do not want that character in the specific, but i would to be able to choose any type of character from any type of font for every chapter separately – Aurelius Aug 04 '12 at 12:52
  • Just add an argument. – egreg Aug 04 '12 at 15:46
  • @egreg that is? what argument do you mean? for use un character from another font in math i use \setmathfont[range=\int]{lmmath-regular.otf}for example – Aurelius Aug 04 '12 at 16:12

1 Answers1

4
\newcommand{\Chapter}[5][]{%
   \chapter[\if\relax\detokenize{#1}\relax#2\else#1\fi]{%
%     \makebox[\textwidth][c]{\includegraphics[width=6in]{#4}}\\
     #2,\\\large #3\\{#5}}
   \begin{center}
     \textit{\cmaiusc capitolo\ \roman{chapter}.}
   \end{center}
}

Then

\Chapter{Analysis mathematica}{principia.}{}{\somefont\char"EB40}
David Carlisle
  • 757,742
egreg
  • 1,121,712