结构化和编号的数学笔记

结构化和编号的数学笔记

我需要创建一个文档,以紧凑的形式输入数学定义和结果。理想情况下,样式应遵循下图(抱歉变形了!)。 例子 * 感兴趣的项目由一个包含三列的表格组成,其中:

  1. 第一个包含项目的 id,形式如下:#chapter.#number 或 #section.#number。
  2. 第二列包含问题的定义或陈述。
  3. 第三列包含附加注释。

所有单元格也居中垂直

这是我的初步结论,尽管不太理想:

\documentclass[10pt,a4paper]{article}
\usepackage{booktabs,fullpage,amsfonts,amssymb,lipsum,tabularx}
\usepackage{amsthm}
\usepackage[american]{babel}
\usepackage[labelsep=endash]{caption}
\usepackage[a4paper]{geometry}
\usepackage{array}
\newcounter{rowcount}

\setcounter{rowcount}{0}

\begin{document}

\renewcommand{\arraystretch}{2}
\noindent
\renewcommand{\figurename}{}

\newcommand{\assertion}[2]{
\noindent\begin{figure}
\noindent \begin{tabular}{m{1cm} m{10cm} | m{4.5cm}}
{\caption{}} & #1 & #2 \\
\end{tabular}   
\end{figure}}

\assertion{The vector $x=[x_1,x_3]$ looks exceedingly promising.]}{Though I have some serious doubts about it.}

\end{document}

欢迎任何帮助!

答案1

这是一个可能的方案:

\documentclass[10pt,a4paper]{article}
\usepackage{booktabs,fullpage,amsfonts,amssymb,lipsum,tabularx}
\usepackage{amsthm}
\usepackage[american]{babel}
\usepackage[labelsep=endash]{caption}
\usepackage[a4paper]{geometry}
\usepackage{array,calc}

\usepackage{lipsum}

\newcounter{assertion}[section] % or chapter
\renewcommand{\theassertion}{\thesection.\arabic{assertion}}

\newcommand{\assertion}[2]{%
  \par\addvspace{\topsep}%
  \noindent\refstepcounter{assertion}%
  \makebox[3em][l]{\theassertion}%
  \parbox{.7\textwidth-2em}{#1}%
  \hspace{.5em}\kern-.2pt\vrule\kern-.2pt\hspace{.5em}%
  \parbox{.3\textwidth-2em}{#2}%
  \par\addvspace{\topsep}%
}


\begin{document}

\section{Whatever}

\lipsum[2]

\assertion{
  The vector $x=[x_1,x_3]$ looks exceedingly promising.
}{
  Though I have some serious doubts about it.
}

\assertion{
  \lipsum*[3]
}{
  With some comments
}

\end{document}

在此处输入图片描述

答案2

试试这个代码:

\documentclass{article}
\usepackage{array}

\newcounter{rowcount}[section]
\renewcommand{\therowcount}{\thesection.\arabic{rowcount}}

\begin{document}

\renewcommand{\arraystretch}{2}

\newcommand{\assertion}[2]{%
\refstepcounter{rowcount}%
\noindent\begin{tabular}{m{1cm} m{10cm} | m{4.5cm}}
\therowcount & #1 & #2 \\
\end{tabular}\par}         %\vspace{1em}

\assertion{The vector $x=[x_1,x_3]$ looks exceedingly promising.]}{Though I have some serious doubts about it.}
\assertion{The vector $x=[x_1,x_3]$ looks exceedingly promising.]}{Though I have some serious doubts about it.}
\section{Bla bla}
\assertion{The vector $x=[x_1,x_3]$ looks exceedingly promising.]}{Though I have some serious doubts about it.}
\end{document}

这里不需要身材!

最好使用.75\textwidth .2\textwidth1cm、10cm、4cm 等长度

相关内容