我想通过代码强调单词。比如说代码。怎么做?如果我从文件加载代码,是否也可以?是否可以使用变音符号?
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[czech]{babel}
\usepackage{indentfirst}
\usepackage{amsmath}
\usepackage[left=2cm,right=2cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{calc}
\newcommand\tab[1][2cm]{\hspace*{#1}}
\usepackage{float}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{multicol}
\usepackage{enumitem}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{empheq}
\usepackage{xcolor}
\usepackage{xcolor,colortbl}
\usepackage[most]{tcolorbox}
\newtcbinputlisting[auto counter,list inside=lol,list type={lstlisting}]{\mylisting}[3][]{%
listing file={#3},
title=Listing,
colback=white,
colframe=gray!75!black,
fonttitle=\bfseries,
listing only,
breakable,
listing options={basicstyle=\scriptsize\ttfamily},
title={Soubor \thetcbcounter: #2},
#1
}
\newcommand{\listingsfont}{basicstyle=\ttfamily}
\begin{document}
\begin{lstlisting}
Put your code here.
\end{lstlisting}
\mylisting[label=input]{Name}{in.txt}
\end{document}