示例末尾的框问题

示例末尾的框问题

我必须在每个示例的末尾都签名。但是,在各种情况下,它出现在其他地方。我希望它总是在同一个地方。我希望它位于最后一行的右侧。就像第一个示例一样。我不希望像第二个和第三个示例那样低。示例结束时文本很好。但是,当使用数组或方程式结束时,它在下面。我不知道如何更改它。这对我来说非常重要。

在此处输入图片描述 这是我的代码:

\documentclass[12pt,a4paper,twoside]{book}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm, amssymb}
\usepackage[polish]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{latexsym}
\usepackage[nottoc]{tocbibind}
\usepackage{graphicx}
\usepackage{fancyhdr}   
\usepackage{indentfirst}  
\usepackage{dsfont}
\usepackage{stackrel}
\usepackage{etoolbox}
\usepackage{listingsutf8}
\usepackage{ucs}
\usepackage{url}

\textwidth 15.3cm 
\textheight 22.2cm 
\topmargin 0cm 
\oddsidemargin 0.55cm 
\evensidemargin 0cm 

\fancypagestyle{number}{
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}


\newtheoremstyle{stylexample}% name
  {}%      Space above, empty = `usual value'
  {}%      Space below
  {\normalfont}% Body font e.g. \normalfont \bfseries \itshape
  {}%         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{stylzad}
\newtheorem{example}[chapter]{Example}
\AtEndEnvironment{example}{\null\hfill\qedsymbol}

\begin{document}
\thispagestyle{number}\chapter{Number}

\begin{example}
During the 19th century, mathematicians began to develop many different abstractions which share certain properties of numbers and may be seen as extending the concept. Among the first were the hypercomplex numbers, which consist of various extensions or modifications of the complex number system. Today, number systems are considered important special examples of much more general categories such as rings and fields, and the application of the term "number" is a matter of convention, without fundamental significance.
\end{example}

\begin{example}
$$
\begin{array}{c}
abc:\\
a  \\
b \\
c .\\
\end{array}$$\end{example}

\begin{example}
\begin{equation} \nonumber
2+3=5
\end{equation}
\end{example}

\end{document}

答案1

解决此问题的方法是在关闭任何环境(例如或)\qedhere之前,在最后一行数学末尾使用。arrayalign

\begin{example}
\[
\begin{array}{c}
abc:\\
a   \\
b   \\
c. \qedhere % <-- here
\end{array}
\]
\end{example}

相关内容