在 Overleaf 上使用以下命令生成:
\documentclass{article}
\usepackage[portuguese]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fouriernc}
\usepackage{witharrows}
\usepackage{cancel}
\usepackage{amsmath}
\usepackage{tikz}
\renewcommand{\CancelColor}{\color{red}}
\begin{document}
$$
\begin{WithArrows}
\lim_{x \to +\infty} \left[ x \left( \sqrt{x^2-1} -x\right) \right] & = +\infty \left( \color{red}+\infty - \infty \right) \Arrow{Multiplicar e dividir pelo conjugado}\\
& = \lim_{x \to +\infty} \frac{\left( \sqrt{x^2-1} + x\right) \color{red} \left( \sqrt{x^2-1} -x\right)}{ \color{red} \left( \sqrt{x^2-1} -x\right) }\\
&= \lim_{x \to +\infty} \frac{x \left( \left( \sqrt{x^2-1} \right)^2 - x^2 \right)}{\sqrt{x^2-1} -x}\\
& = \lim_{x \to +\infty} \frac{x \left( \left( x^2-1 \right) - x^2 \right)}{\sqrt{x^2-1} -x} \\
& = \lim_{x \to +\infty} \frac{-x}{\sqrt{x^2-1} -x}\\
& = \lim_{x \to +\infty} \frac{-x}{\sqrt{x^2 \left( 1-\frac{1}{x^2} \right)} + x}\\
& = \lim_{x \to +\infty} \frac{-x}{\sqrt{x^2}\sqrt{1-\frac{1}{x^2}}+x}\\
& = \lim_{x \to +\infty} \frac{-x}{x \left( \sqrt{1-\frac{1}{x^2}}+1 \right)}\\
& = \lim_{x \to +\infty} \frac{-\cancel{x}}{\cancel{x}\left( \sqrt{1-\frac{1}{x^2}}+1\right)}\\
& = \lim_{x \to +\infty} \frac{-1}{\sqrt{1-\frac{1}{x^2}}+1} \\
& = \frac{-1}{\sqrt{1}+1}\\
& = -\frac{1}{2}
\end{WithArrows}
$$
\end{document}
然而,当我在计算机上的 Texmaker 上使用这些命令时,出现错误消息:
! Package witharrows Error: Your version of LaTeX (especially expl3) is too
(witharrows) old. You can go on but you will probably have
(witharrows) other errors if you use the functionalities of
(witharrows) witharrows.
Type <return> to continue.
...
l.38 ...rror:nn { witharrows } { expl3~too~old } }
LaTeX does not know anything more about this error, sorry.
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
我该如何修复此问题,或者手动找到并安装此包?
答案1
(我是的作者witharrows
。)
读了您的日志文件后,我明白了。
软件包:expl3 2020-01-12 L3 编程层(加载器)
此版本的expl3
太旧,无法运行 的最新版本witharrows
。
您应该彻底更新您的 TeX 安装,它就会正常工作。