我正在使用列表来格式化 xeLaTeX 中的代码块。我发现当我插入一段代码时,输出图像会在底部页脚中生成一个数字。当我将这张图片插入 Anki 的卡片时,它会打开一个很长的大空白。以下是我的 MWE:
\documentclass{article}
\usepackage{tcolorbox,listings}
\usepackage{listings}
\usepackage{color}
\usepackage{tikz}
\usepackage{framed}
\definecolor{background}{HTML}{EEEEEE}
\definecolor{comments}{HTML}{868686}
\definecolor{darkred}{RGB}{139,0,0}
\definecolor{darkblue}{RGB}{0,0,139}
\definecolor{chartreuse}{RGB}{127,255,0}
\definecolor{drakgreen}{RGB}{0,128,0}
\definecolor{lightgray}{RGB}{238,239,240}
\lstset{
language=[LaTeX]Tex,
keywordstyle=\color{darkblue},
texcsstyle=*\color{blue},
basicstyle=\normalfont\ttfamily,
commentstyle=\color{comments}\ttfamily,
stringstyle=\rmfamily,
numbers=none,
numberstyle=\scriptsize,
numbersep=8pt,
showstringspaces=false,
breaklines=true,
frameround=ftff,
captionpos=t,
belowcaptionskip=0em,
belowskip=0em,
literate=
*{\{}{{\textcolor{darkred}{\{}}}{1}
{\}}{{\textcolor{darkred}{\}}}}{1}
{[}{{\textcolor{darkred}{[}}}{1}
{]}{{\textcolor{darkred}{]}}}{1},
}
\lstdefinestyle{mystyle}{
language=[LaTeX]Tex,
extendedchars=true,
breaklines=true,
breakatwhitespace=true,
basicstyle=\ttfamily,
numbers=none,
keywordstyle=\color{darkblue},
keywordstyle=[2]\color{blue},
keywordstyle=[3]\color{darkblue},
keywordstyle=[4]\color{drakgreen},
alsoletter = {!},
keywords=[2]{definecolor,node,addplot},
keywords=[3]{usepackage},
keywords=[4]{begin,end,document,figure,figure*,axis}
}
\tcbuselibrary{listings,skins,breakable}
\newtcblisting{mycode}{
arc=0mm,
top=0mm,
bottom=0mm,
left=3mm,
right=0mm,
width=\textwidth,
boxrule=1pt,
colback=lightgray,
listing only,
listing options={style=mystyle},
breakable
}
\begin{document}
\begin{mycode}
\documentclass{article} % say
\usepackage{tikz}
\begin{document}
We are working on
\begin{tikzpicture}
\draw (-1.5,0) -- (1.5,0);
\draw (0,-1.5) -- (0,1.5);
\end{tikzpicture}.
\end{document}
\end{mycode}
We are working on
\end{document}
如何关闭页脚附近的帧编号以使生成的图像大小合适?