yuxtech.github.io
yuxtech.github.io
这家伙很懒,什么也没写!

注册于 4年前

回答
4
文章
0
关注者
2

增加shortlabels选项

\documentclass[12pt,twoside]{ctexbook}
\usepackage[inline,shortlabels]{enumitem}
\setlist[enumerate,1]{label = 定理\arabic*.}

\begin{document}
\begin{enumerate}
    \item test
    \item wodfj
\end{enumerate}

希望能够实现自动添加“性质”
\begin{enumerate}[性质\arabic*.]
    \item test
    \item wodfj
\end{enumerate}
\end{document} 

QQ截图20210508094616.png

picinpar即可

\documentclass{article}
\usepackage[many]{tcolorbox}
\usepackage{lipsum,picinpar}

\begin{document}
\begin{window}[2,l,
  \begin{tcolorbox}[width = 3cm]
    This is a tcolorbox. This is some comment.
  \end{tcolorbox},]
\lipsum[1]
\end{window}

\end{document} 

QQ截图20210416152008.png

\documentclass{ctexart}
\usepackage[many]{tcolorbox}
\newcounter{example}[section]

\tcbset{
  inbox/.style = {
    left = 0.5mm,
    right = 0.5mm,
    top = -0.5mm,
    bottom = -0.5mm,
    enhanced,
    boxrule = -1pt,
    colback = blue!80, 
    on line,
    overlay = {
      \draw [blue!80] (frame.west) -- ++ (-0.24cm,0);
    }
  },
  outbox/.style = {
    middle = 0mm,
    segmentation hidden,
    colback = white,
    arc = 0mm,
    enhanced,
    overlay = {
      \draw [blue!80] ([yshift=-1.358mm]frame.north west) -- (frame.south west)node[circle,draw,fill,inner sep=1.2pt,anchor=north]{};
    },
    boxrule = -0.1mm,
    enforce breakable,
    left = 1.5mm,
    top = -1.3mm,
    bottom = -1mm,
    right = 0mm
  }
}

\newcommand\example{
  \refstepcounter{example}
  \tcbox[inbox] { \color{white}例 \arabic{example} }\quad
  \label{exam\arabic{section}.\arabic{example}}
}

\newcommand\solution{
  \tcbox[inbox]{\color{white}解} \quad 
}

\usepackage[colorlinks]{hyperref}

\begin{document}
\section{第一节}

\begin{tcolorbox}[outbox]
\example 计算
  \[
    (a + b)(a - b) .
  \]
\tcblower
\solution 这是例 \ref{exam1.1} 的解答.
  \[
    (a + b)(a - b) = a^2 - b^2.
  \]
\end{tcolorbox}
\end{document} 

QQ截图20210324144441.png

发布
问题