
使用以下包;
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\usepackage{amsthm}
\usepackage{float}
\usepackage[round]{natbib}
\usepackage{lastpage}
\usepackage{indentfirst}
\usepackage{graphicx}
\usepackage{amsmath}
寫入時顯示未定義的控制序列
{It is called a simple arc of a curve, the set $C$ of points $M(x,y) \in \text{$\R$} ^2 $
(two-dimensional Euclidean space) satisfying the equation:}
也將其更改為以下內容不起作用
{It is called a simple arc of a curve, the set $C$ of points $M(x,y) \in \R ^2 $
我已經包括了
\usepackage{amsmath}
就像大多數論壇上所說的那樣解決問題
答案1
擴展公認的優秀答案:amsfonts
這個符號有很多替代品。
在現代工具鏈中,無需加載任何額外的包unicode-math
即可獲得看起來像早期答案中的 ℝ 。它已經預設設定了。
但是,您可以range=
使用\setmathfont
.例如,要使用泰普林納:
\documentclass[varwidth]{standalone}
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchUppercase}
\setmathfont{Latin Modern Math}
\setmathfont[range=bb]{Typoliner-RW-Light.ttf}
\newcommand\setR{\symbb{R}}
\begin{document}
Let \(S \subset \setR\).
\end{document}
如果您需要與 PDFLaTeX 相容,或者您更喜歡使用舊版 NFSS 字體,您可能需要使用mathalfa
包裹選擇您的補充數學字母表。
答案2
\R
不是標準的 LaTeX 命令,也不是由您載入的任何套件定義的。這是一個很多人似乎都喜歡的自訂命令,但您必須自己定義它。想必你想要類似的東西
\newcommand{\R}{\mathbb{R}}
儘管我本人建議反對。原因很微妙。沒有什麼可以阻止您定義像\R
and 這樣的單字母命令,正如本網站上的許多討論所得出的結論,\R
本質上並不比 更危險或更不危險\realnumbers
,但是很多人陷入了麻煩,因為他們沒有意識到這一點很多LaTeX 已經定義了單字母指令。然後,他們對它們進行定義,並得到奇怪的錯誤,這些錯誤會導致比其價值更多的問題。\R
在語法上也毫無意義。我自己,如果我必須這樣做,\reals
我想我會選擇,但這實際上不關我的事,這取決於你想要定義什麼捷徑,如果你確實想要定義它們的話。
無論如何,您將需要這個amssymb
包才能工作,或者amsfonts
,因為它們定義了\mathbb{}
.
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\newcommand{\R}{\mathbb{R}}
\begin{document}
It is called a simple arc of a curve, the set $C$ of points
$M(x,y) \in \R^{2}$
\end{document}
在其他新聞中,我不太確定為什麼你的句子周圍似乎有大括號,一般來說不需要它們,所以我在這裡刪除了它們。