问题:
我怎样才能绘制big right brace
覆盖前四项的内容?
梅威瑟:
\documentclass[12pt,a4paper]{article}
\usepackage[shortlabels]{enumitem}
\usepackage{parskip}
\usepackage[left=1.500cm, right=1.500cm, top=1.500cm, bottom=1.500cm]{geometry}
\begin{document}
\Large
\begin{enumerate}[\bfseries(1),left=0pt]
\item First
\item Second
\item Third
\item Fourth
\item Fifth
\item Sixth
\item Seventh
\item Eighth
\end{enumerate}
\end{document}
答案1
使用tikzmark
和calligraphic brace
:
\documentclass{article}
\usepackage[margin=15mm]{geometry}
\usepackage[shortlabels]{enumitem}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,
calligraphy,
tikzmark}
\begin{document}
\begin{enumerate}[\bfseries(1),left=0pt]
\item \tikzmarknode{A}{First}
\item Second
\item Third
\item \tikzmarknode{B}{Fourth}
\begin{tikzpicture}[remember picture,overlay,
BC/.style = {decorate,
decoration={calligraphic brace, amplitude=5pt,
raise=0.5em, #1}, % for mirroring of brace
very thick,pen colour=red} % <---
]
\draw[BC={}] (A.north -| B.east) -- node[right=1em] {some remark(s)} (B.south east); % <---
\end{tikzpicture}
\item Fifth
\item Sixth
\item Seventh
\item Eighth
\end{enumerate}
\end{document}
编辑: 为了支撑,您可以在支撑绘制命令中使用节点添加一些文本(备注):
\draw[BC={}] (A.north -| B.east) -- node[right=1em] {some remark(s)} (B.south east);
答案2
希望以下标签可以帮助您满足要求:
\documentclass{article}
\usepackage{enumitem}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{enumerate}[nolistsep,start=1]
\item First \tikz[remember picture,overlay]{\coordinate (A) at (0pt,.6\baselineskip);}
\item Second
\item Third
\item Fourth
\begin{tikzpicture}[remember picture,overlay,decoration=brace]
\coordinate (B) at (0pt,-.3\baselineskip);
\coordinate (AB) at (A-|B);% when A left of B
\draw[decorate,thick] (AB) -- (B);
\end{tikzpicture}
\item Fifth
\item Sixth
\item Seventh
\item Eighth
\end{enumerate}
\end{document}
输出: