texniccenter 中的錯誤回報

texniccenter 中的錯誤回報

我在 texniccenter 中寫了這個,當我執行 ctrl+F7 時,它給了我錯誤「未定義的控制序列」。我不明白我做錯了什麼。我的程式碼有問題嗎?我還下載了軟體包“bbm”並將其添加到開頭,但沒有任何效果。有人能幫我嗎?希望這個論壇不會太愚蠢。

\documentclass{article}
\usepackage{amsmath}
\usepackage{bbm}
\begin{document}
\section{Problems}
\label{sec:Problems}
\begin{flushleft}
This approach helps a lot since equality cases can be easily obtained.
The left side's >equality case is $r = 1$.
The right side's equality case occur when $y = rx$ passes
through the interior of exactly $n$ squares.
Such cases occur when $r$ is either an
integer, reciprocal of an integer, $r \geq n$ or $0 < r \leq 1/n$.
  $\blacksquare$
\end{flushleft}

2.Determine all functions $f : \mathbb{R} \to \mathbb{R}$ such that
\[f(xy+f(x))=f(x)f(y)+x , \ \ \ \forall x,y \in  \mathbb{R}.\] 
\end{document}

這是我寫下的。我的對齊方式在這裡非常醜陋,對此我深表歉意,但醜陋總比不正確的程式碼好。另外,這是我第一次使用編輯器。通常我在支援\LaTeX\ 的平台上編寫,例如數學SE、MO 等。 ,以便可以清楚地了解錯誤。另外,我想在解決方案結束時給出一個黑色方塊,我試圖給出它,這也給出了「未定義的控制序列:。請幫助我,非常感謝。

答案1

如果你想使用這個包bbm,正確的命令就在\mathbbm{R}這裡。但正如你所需要的為您提供更多包裹\blacksquareamssymb我會推薦經常使用並且包含該包的包amsfonts。後者包含命令(\mathbb{R})您現在正在使用。

我建議使用以下 MWE:

% arara: pdflatex

\documentclass{article}
\usepackage{amssymb}
\usepackage{mathtools} % not needed here, but it loads most of the stuff you will need. E.g. `amsmath`

\begin{document}
\section{Problems}
\label{sec:Problems}
\begin{flushleft}
This approach helps a lot since equality cases can be easily obtained.
The left side's equality case is $r = 1$.
The right side's equality case occurs when $y = rx$ passes
through the interior of exactly $n$ squares.
Such cases occur when $r$ is either an
integer, reciprocal of an integer, $r \geq n$ or $0 < r \leq 1/n$.
 $\blacksquare$
\end{flushleft}

2. Determine all functions $f : \mathbb{R} \to \mathbb{R}$ such that
\[f(xy+f(x))=f(x)f(y)+x , \quad \forall x,y \in  \mathbb{R}.\] 
\end{document}

在此輸入影像描述

相關內容