Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
2  
U+EB40 is in the Private Use Area, so you can't rely on it printing the same in different fonts. –  egreg Aug 4 '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 –  FormlessCloud Aug 4 '12 at 12:52
    
Just add an argument. –  egreg Aug 4 '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 –  FormlessCloud Aug 4 '12 at 16:12

1 Answer 1

up vote 4 down vote accepted
\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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.