in this MWE
\documentclass[a4paper]{article}
\usepackage{listings}
\usepackage{tcolorbox}
\tcbuselibrary{listings}
\usepackage[no-math]{fontspec}
\usepackage{polyglossia}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Amiri}
\setdefaultlanguage{english}
\setotherlanguage{arabic}
\lstset{language=[LaTeX]TeX,
,escapeinside={*}{*}}
\begin{document}
\begin{lstlisting}
\LaTeX * \textarabic{كلمة عربية}*
\end{lstlisting}
\begin{tcblisting}{listing only,listing options={style=tcblatex,escapeinside={*}{*}}}
\LaTeX * %\textarabic{كلمة عربية}*
\end{tcblisting}
\end{document}
with lstlisting
environment i can show arabic text using listing option escapeinside
, But in contrast, with tcblisting
if i remove %
sign before \textarabic
I get an error alert
! Package polyglossia Error: The current roman font does not contain the Arabic
any idea to fix this ?
style=tcblatex
could be the problem. So, please, try iflisting options={language=[LaTeX]TeX,escapeinside={*}{*}}
solve the problem.listing option={langage= TeX,escapeinside={*}{*}}
([LaTeX]TeX cause error ...!Package Listings Error: File 'T(.tex)' not found), thanks for @ThomasF.Sturm and @KhaledHosnylisting option={language={[LaTeX]TeX},escapeinside={*}{*}}