为什么 LaTeX 中只有偶数的数字?

为什么 LaTeX 中只有偶数的数字?
\documentclass{article}%
%
\usepackage{graphicx}%
\usepackage{mathptmx}%      ‎
\usepackage{subcaption}%
\usepackage{amsmath}%‎‎
\usepackage{booktabs}%
\usepackage{amsthm}%‎‎
\usepackage{amssymb}%
%‎
\begin{document}‎
\begin{figure}
\begin{subfigure}{.55\textwidth}
\centering
\includegraphics[height=6.6cm]{example-image-a}
\subcaption{Exact solution}
\end{subfigure}‎
\begin{subfigure}{.55\textwidth}
\centering
\includegraphics[height=6.6cm]{example-image-a}
\subcaption{N=2}
\end{subfigure}‎
\begin{subfigure}{.55\textwidth}
\centering
\includegraphics[height=6.6cm]{example-image-a}
\subcaption{N=4}
\end{subfigure}‎‎‎
\begin{subfigure}{.45\textwidth}
\centering
\includegraphics[height=5.5cm]{example-image-a}
\subcaption{t=0.5}
\end{subfigure}‎
\caption{Exact and discretized solutions for N=2 and 4. Exact and estimated solutions with t=0.5 for Example 1.}‎
\end{figure}


\end{document}

答案1

您的文档出现多种形式的错误

! Package inputenc Error: Unicode character  (U+200E)

因为它在几个地方都有 Unicode 从右到左的控制标记。

最好删除它们,但你可以添加

\DeclareUnicodeCharacter{200E}{}

到文件顶部,这样该字符就不执行任何操作,然后您的文档运行时不会出错,尽管会警告这些示例宽度太宽,但您的实际图像可能大小不同,所以我忽略了这一点。另外,我不知道您在问题标题中提到的“偶数”是哪个。

\DeclareUnicodeCharacter{200E}{}

\documentclass{article}%
%
\usepackage{graphicx}%
\usepackage{mathptmx}%      ‎
\usepackage{subcaption}%
\usepackage{amsmath}%‎‎
\usepackage{booktabs}%
\usepackage{amsthm}%‎‎
\usepackage{amssymb}%
%‎
\begin{document}‎
\begin{figure}
\begin{subfigure}{.55\textwidth}
\centering
\includegraphics[height=6.6cm]{example-image-a}
\subcaption{Exact solution}
\end{subfigure}‎
\begin{subfigure}{.55\textwidth}
\centering
\includegraphics[height=6.6cm]{example-image-a}
\subcaption{N=2}
\end{subfigure}‎
\begin{subfigure}{.55\textwidth}
\centering
\includegraphics[height=6.6cm]{example-image-a}
\subcaption{N=4}
\end{subfigure}‎‎‎
\begin{subfigure}{.45\textwidth}
\centering
\includegraphics[height=5.5cm]{example-image-a}
\subcaption{t=0.5}
\end{subfigure}‎
\caption{Exact and discretized solutions for N=2 and 4. Exact and estimated solutions with t=0.5 for Example 1.}‎
\end{figure}


\end{document}

在此处输入图片描述

相关内容