Fonts & Character SetsModerncv XeTeX: \textit ignored

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
thag1987
Posts: 17
Joined: Sun Jun 14, 2015 11:19 pm

Moderncv XeTeX: \textit ignored

Post by thag1987 »

Code: Select all

Code, edit and compile here:
\newcommand{\entry}[4]{
#1&\parbox[t]{7.2cm}{
\textbf{#2}
\hfill
{\footnotesize\color{lightgray} #3}\\
#4\\}\\}
\entry
{2010 - 2014}
{Bachelor of Science}
{University}
{
lorem ipsum\\
lorem ipsum\\
lorem ipsum\\
\textit{italic textpart}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Looks like I can't do additional textformatting, like \textit, \textbf, \emph etc. in the argument. Is there a way to accomplish this without modifying the entry command?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Moderncv XeTeX: \textit ignored

Post by Johannes_B »

Where is that snippet coming from? Please provide a minimal working example, so we can reproduce the behaviour you are describing.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Moderncv XeTeX: \textit ignored

Post by Stefan Kottwitz »

Looks like a CV class such as moderncv. However, here's nothing to see which could cause this. Perhaps the chosen font version has no italic version.

As Johannes said, if you would post a compilable example (with minimal dummy text), we could help to fix it.

Stefan
LaTeX.org admin
thag1987
Posts: 17
Joined: Sun Jun 14, 2015 11:19 pm

Moderncv XeTeX: \textit ignored

Post by thag1987 »

Code: Select all

Code, edit and compile here:
\documentclass{article}
\usepackage[utf8]{inputenc}
\newcommand{\entry}[4]{
#1&\parbox[t]{7.2cm}{
\textbf{#2}
\hfill
{\footnotesize\color{lightgray} #3}\\
#4\\}\\}
\begin{document}
\entry
{2010 - 2014}
{Bachelor of Science}
{University}
{
lorem ipsum\\
lorem ipsum\\
lorem ipsum\\
\textit{italic textpart}
}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Sorry for that. I thought this was enough as a sample. But with this snipped it actually compiled fine. Testing it out separately let me find the mistake.

Code: Select all

Code, edit and compile here:
\setmainfont % font that's been used everywhere where not specifically defined otherwise
[Mapping=tex-text,
BoldFont=HelveticaNeue-Bold.ttf,
ItalicFont=HelveticaNeue-Italic.ttf%<-----------
{HelveticaNeue.ttf}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Forgot to define the font mapping initially.
Post Reply