M
M
这家伙很懒,什么也没写!

注册于 4年前

回答
19
文章
0
关注者
1

  • 如果是要和列表外的段落一致,直接用 wide 模式即可,默认是一个 \parindent 长度的缩进,也可以赋值改变大小;
  • 如果是在列表内部要求段落缩进,只需要设置 listparindent 参数。
\documentclass[a4paper]{article}
\usepackage[slantfont,boldfont]{xeCJK}
\usepackage{lipsum}
\usepackage{zhlipsum}

\usepackage{enumitem}

\begin{document}
    
    \lipsum[1][1-3]
    
    \begin{enumerate}[label=\arabic*.,wide]
    % \begin{enumerate}[label=\arabic*.,wide=2\parindent]
    % \begin{enumerate}[label=\arabic*.,listparindent=\parindent]
        \item 第一项
        \par\lipsum[2][1-3]
        \par\lipsum[3][1-3]
        \item 第二项
        \par\zhlipsum[1-2][name=aspirin]
    \end{enumerate}

\end{document}

scope 上添加一个 name prefix 属性就可以区别了

\begin{tikzpicture}
    \begin{scope}[name prefix = l1-]
    \foreach \x/\y in {1/A,2/B,3/C,4/D}
    {\node[inner sep=0pt](a\x)at(\x,0){$\y$};}
    \foreach \x/\y in {a1/a2,a2/a3,a3/a4}
    {\draw(\x)--(\y);}
    \end{scope}
    
    \begin{scope}[name prefix = l2-, shift={(-1,-.8)}]
    \foreach \x/\y in {1/E,2/F,3/G,4/H}
    {\node[inner sep=0pt](a\x)at(\x,0){$\y$};}
    \foreach \x/\y in {a1/a2,a2/a3,a3/a4}
    {\draw(\x)--(\y);}
    \end{scope}

    \foreach \x in {1,4}{
        \draw [red] (l1-a\x) -- (l2-a\x);
    }
    
\end{tikzpicture}

fafa420503b07341773401052ce2371d.png

同理,还有 name suffix

试了一下,可以编译成功。以下几点你都满足了吗?

  • TeX Live, including the programs latexmk, xindy and biber.
  • Standard fonts included in TeX Live, in particular the Fandol fonts. For some strange reason I used and installed the TeX Gyre Heros fonts in the system. In case of error messages related to these fonts, please look for the OTF files (inside the directories in your computer which store TeX-related fonts) whose names start with texgyreheros, and install them manually in your system.
  • The Noto Sans CJK SC fonts from Noto CJK, which should also be installed system-wide.

\renewcommand{\fltitem}[2][0pt]{
    \setlength{\fltitemwidth}{\linewidth}%
    \addtolength{\fltitemwidth}{-\floatfltwidth}%
    \addtolength{\fltitemwidth}{-0.5em}%
    \parbox[t]{\fltitemwidth}{\item #2}\\[#1]
}

e4e00b6e25e67eb7e606158f5844a798.png

发布
问题