我有以下 TeX 文档:
\documentclass[12pt,a4paper]{article}
\usepackage[left=19mm,right=19mm,top=20mm,bottom=22mm]{geometry}
\usepackage{makeidx, graphicx, amsmath, amsthm, amssymb, ae}
\setcounter{MaxMatrixCols}{20}
\setlength{\textheight}{260mm}
\setlength{\textwidth}{170mm}
\usepackage[T1]{fontenc}
\newtheoremstyle{italiktekst} %name
{5mm} %Space above, empty = `usual value'
{0mm} %Space below
{\itshape} %Body font
{} %Indent amount (empty = no indent, \parindent = para indent)
{\bfseries} %Thm head font
{} %Punctuation after thm head
{\newline} %Space after thm head: \newline = linebreak
{} %Thm head spec
\theoremstyle{italiktekst}
\swapnumbers
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{problem}[theorem]{Problem}
\renewcommand{\thesection}{\arabic{section}.}
\renewcommand{\thetheorem}{(\thesection\arabic{theorem})}
\setcounter{page}{5}
\begin{document}
\setcounter{section}{-1}
\raggedright
\section{\rm Perron-Frobenius theorem}
\begin{lemma}
\hspace*{5mm}
\label{U_Ainvariant_UT_Ainvariant}
Let $\langle \cdot, \cdot\rangle$ be the standard inner product for ...
\end{lemma}
\vspace*{5mm}
\textbf{\textit{Proof:}}
Recall that for a subspace $\mathcal{U}$ is said to be ...
\hfill{$\square$}\\
\begin{lemma}
\hspace*{5mm}
\label{columns_independent_AP_PD}
Consider arbitrary rectangular matrix $P$ of order
$m\times n$ in which columns are linearly independent.
The column space ...
\end{lemma}
\vspace*{5mm}
\textbf{\textit{Proof:}} Denote by $\mathcal{M}$ column
space ...
\hfill{$\square$}\\
...
\vspace*{5mm}
Recall that, from Lemma \ref{U_Ainvariant_UT_Ainvariant} we have...
\vspace*{5mm}...in Lemma \ref{columns_independent_AP_PD} we have shown that...
\end{document}
该代码的结果如下:
困扰我的是,当我引用某些引理或命题时,如何删除括号(见下图)
有人有什么主意吗?
答案1
我将您的样式定义更改为
\newtheoremstyle{italiktekst} %name
{5mm} %Space above, empty = `usual value'
{5mm} %Space below
{\itshape} %Body font
{} %Indent amount (empty = no indent, \parindent = para indent)
{\bfseries} %Thm head font
{} %Punctuation after thm head
{\newline} %Space after thm head: \newline = linebreak
{(\thmnumber{#2}) \thmname{#1}\thmnote{(#3}} %Thm head spec
即,用括号中的数字指定定理头,从定理计数器中删除括号,即,
\renewcommand{\thetheorem}{\thesection\arabic{theorem}}
最后除去\swapnumbers
得到:
请注意,我还在定理下方添加了 5mm 的跳跃,因为您在两个引理之后手动执行此操作。要排版证明,我建议使用proof
来自的环境amsthm
,它会自动为您设置一个 qed 符号,默认情况下为空方块。为了使单词 Proof 也加粗,后跟一个:
,我稍微更改了默认定义:
\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
\item[\hskip\labelsep
\bfseries\itshape
#1\@addpunct{:}]\ignorespaces
}{%
\popQED\endtrivlist\@endpefalse
}
\makeatother
完整示例:
\documentclass[12pt,a4paper]{article}
\usepackage[left=19mm,right=19mm,top=20mm,bottom=22mm]{geometry}
\usepackage{graphicx, amsmath, amsthm, amssymb}
\setcounter{MaxMatrixCols}{20}
\setlength{\textheight}{260mm}
\setlength{\textwidth}{170mm}
\usepackage[T1]{fontenc}
\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
\item[\hskip\labelsep
\bfseries\itshape
#1\@addpunct{:}]\ignorespaces
}{%
\popQED\endtrivlist\@endpefalse
}
\makeatother
\newtheoremstyle{italiktekst} %name
{5mm} %Space above, empty = `usual value'
{5mm} %Space below
{\itshape} %Body font
{} %Indent amount (empty = no indent, \parindent = para indent) for head
{\bfseries} %Thm head font
{} %Punctuation after thm head
{\newline} %Space after thm head: \newline = linebreak
{(\thmnumber{#2}) \thmname{#1}\thmnote{(#3}} %Thm head spec
\theoremstyle{italiktekst}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{problem}[theorem]{Problem}
\renewcommand{\thesection}{\arabic{section}.}
\renewcommand{\thetheorem}{\thesection\arabic{theorem}}
\setcounter{page}{5}
\begin{document}
\setcounter{section}{-1}
\raggedright
\section{\rm Perron-Frobenius theorem}
\begin{lemma}
\hspace*{5mm}
\label{U_Ainvariant_UT_Ainvariant}
Let $\langle \cdot, \cdot\rangle$ be the standard inner product for ...
\end{lemma}
\begin{proof}
Recall that for a subspace $\mathcal{U}$ is said to be ...
\end{proof}
\begin{lemma}
\hspace*{5mm}
\label{columns_independent_AP_PD}
Consider arbitrary rectangular matrix $P$ of order
$m\times n$ in which columns are linearly independent.
The column space ...
\end{lemma}
\begin{proof}
Denote by $\mathcal{M}$ column
space ...
\end{proof}
...
\vspace*{5mm}
Recall that, from Lemma \ref{U_Ainvariant_UT_Ainvariant} we have...
\vspace*{5mm}...in Lemma \ref{columns_independent_AP_PD} we have shown that...
\end{document}