如何创建这种编号样式?

如何创建这种编号样式?

我想创建一个像附图这样的编号样式(问题编号带有一个条形图及其下方的点),但我没有找到任何方法。

在此处输入图片描述

我对 TeX 还很陌生,所以如果能得到任何帮助我都会很感激...谢谢!:)

编辑:我编辑了图像,以便显示更多细节。

答案1

拥有合适的环境:

\documentclass{article}
\usepackage{amsmath,amssymb}

\newcommand{\RR}{\mathbb{R}}
\renewcommand{\vec}[1]{\mathbf{#1}}
\newcommand{\base}[1]{\mathcal{#1}}

\newcounter{problem}
\newlength{\problemtagwidth}
\newlength{\problemtagsep}
\setlength{\problemtagwidth}{1.2cm}
\setlength{\problemtagsep}{0.3cm}

\newenvironment{problem}[1] % #1 = points
 {%
  % ensure to be able to add some vertical space
  \par\addvspace{\topsep}
  % typeset the tag as a smashed top aligned parbox
  % inside a zero width box that protrudes left
  \setlength{\leftskip}{\problemtagwidth}%
  \addtolength{\leftskip}{\problemtagsep}%
  \everydisplay\expandafter{\the\everydisplay\setlength{\displayindent}{0.5\leftskip}}%
  \noindent\stepcounter{problem}%
  \sbox0{%
    \parbox[t]{\problemtagwidth}{%
      \raggedleft
      {\large\bfseries\theproblem}\par
      \vspace{2pt}
      \hrule
      \vspace{2pt}
      {\sffamily pt #1}
    }%
  }%
  \makebox[0pt][r]{\smash{\usebox0}\hspace{\problemtagsep}}%
  \ignorespaces
 }
 {\par}

\newenvironment{solution}
 {\par\noindent\textit{Solution}.\ \ignorespaces}
 {\par\addvspace{\topsep}}

\begin{document}

\begin{problem}{20}
Let $C=[c_{ij}]$ be an $n\times n$ real matrix and
$\base{B}=\{\vec{v}_1,\dots,\vec{v}_n\}$ be a basis of $\RR^n$.
Let $\base{S}=\{\vec{e}_1,\dots,\vec{e}_n\}$ be the standard basis
for $\RR^n$ and let $T\colon\RR^n\to\RR^n$ be a linear operator
defined by
\[
T(\vec{v}_i)=c_{1i}\vec{v}_1+c_{2i}\vec{v}_2+\dots+c_{1n}\vec{v}_n.
\]
Show that the standard matrix for $T$ is $CA$, where
\[
A=[\vec{v}_1\mid\vec{v}_2\mid\dotsb\mid\vec{v}_n]^{-1}.
\]
\end{problem}

\begin{solution}
This is very easy.
\end{solution}

\end{document}

在此处输入图片描述

答案2

这可以通过 Latex 环境实现list。以下是简单示例

\documentclass[11pt,a4paper]{article}

\hoffset=-1in
\textwidth=170mm

\begin{document}

\newcounter{cnt}

\def\itemblock{%
\stepcounter{cnt}%
\parbox[t][0pt][t]{40pt}{%
    \hbox to \hsize {\hss \arabic{cnt}}%
    \vskip 3pt\hrule \vskip 3pt%
    \hbox to \hsize{\hss\textsf{20 pt}}%
}%
}%

\begin{list}{\itemblock}{\leftmargin=60pt\labelwidth=40pt\labelsep=20pt}

\item Let $C=[c_{ij}]$ be an $n\times m$ real matrix and $B=\{v_1, v_2, \ldots, v_3\}$ be a basis for $R^n$. Let $S=\{e1,e2, \ldots, e3\}$ be standard basis for $R^n$ and let $T: R^n \longrightarrow R^n$ be a linear operator defined by.
$$T(v_i) = $$
Show

\item Let $C=[c_{ij}]$ be an $n\times m$ real matrix and $B=\{v_1, v_2, \ldots, v_3\}$ be a basis for $R^n$. Let $S=\{e1,e2, \ldots, e3\}$ be standard basis for $R^n$ and let $T: R^n \longrightarrow R^n$ be a linear operator defined by.
$$T(v_i) = $$
Show

\end{list}

\end{document}

结果如下 在此处输入图片描述

相关内容