我该如何清洁我的棺材?

我该如何清洁我的棺材?

说真的,这个名字就是一座金矿。

我有一个棺材,我想“清理”它并只保留默认的杆子。例如,这是我使用辅助棺材建造的棺材:

Size of coffin \l_tmpa_coffin:
> ht = 6.94444pt
> dp = 0.0pt
> wd = 74.30565pt
Poles of coffin \l_tmpa_coffin:
>  l  =>  {0pt}{0pt}{0pt}{1000pt}
>  hc  =>  {37.15282pt}{0pt}{0pt}{1000pt}
>  r  =>  {74.30565pt}{0pt}{0pt}{1000pt}
>  b  =>  {0pt}{0.0pt}{1000pt}{0pt}
>  vc  =>  {0pt}{3.47223pt}{1000pt}{0pt}
>  t  =>  {0pt}{6.94444pt}{1000pt}{0pt}
>  B  =>  {0pt}{-36.0pt}{1000pt}{0pt}
>  H  =>  {0pt}{0pt}{1000pt}{0pt}
>  T  =>  {0pt}{0.0pt}{1000pt}{0pt}
>  \l_tmpa_coffin -l  =>  {0.0pt}{0.0pt}{0pt}{1000pt}
>  \l_tmpa_coffin -hc  =>  {37.15282pt}{0.0pt}{0pt}{1000pt}
>  \l_tmpa_coffin -r  =>  {74.30565pt}{0.0pt}{0pt}{1000pt}
>  \l_tmpa_coffin -b  =>  {0.0pt}{0.0pt}{1000pt}{0pt}
>  \l_tmpa_coffin -vc  =>  {0.0pt}{3.47223pt}{1000pt}{0pt}
>  \l_tmpa_coffin -t  =>  {0.0pt}{6.94444pt}{1000pt}{0pt}
>  \l_tmpa_coffin -B  =>  {0.0pt}{0.0pt}{1000pt}{0pt}
>  \l_tmpa_coffin -H  =>  {0.0pt}{0.0pt}{1000pt}{0pt}
>  \l_tmpa_coffin -T  =>  {0.0pt}{0.0pt}{1000pt}{0pt}
>  \l_tmpb_coffin -l  =>  {0.0pt}{-36.0pt}{0pt}{1000pt}
>  \l_tmpb_coffin -hc  =>  {28.45274pt}{-36.0pt}{0pt}{1000pt}
>  \l_tmpb_coffin -r  =>  {56.9055pt}{-36.0pt}{0pt}{1000pt}
>  \l_tmpb_coffin -b  =>  {0.0pt}{-37.94444pt}{1000pt}{0pt}
>  \l_tmpb_coffin -vc  =>  {0.0pt}{-15.5pt}{1000pt}{0pt}
>  \l_tmpb_coffin -t  =>  {0.0pt}{6.94444pt}{1000pt}{0pt}
>  \l_tmpb_coffin -B  =>  {0.0pt}{-36.0pt}{1000pt}{0pt}
>  \l_tmpb_coffin -H  =>  {0.0pt}{-36.0pt}{1000pt}{0pt}
>  \l_tmpb_coffin -T  =>  {0.0pt}{0.0pt}{1000pt}{0pt}.

为了调试目的,我只想保留默认极点(即l,hc,r,b,vc,t,B,H,T)。如何清除它们?

平均能量损失

\documentclass{article}
\usepackage{xcoffins}
\begin{document}
\ExplSyntaxOn
\hcoffin_set:Nn \l_tmpa_coffin { here~is~some~text }
\vcoffin_set:Nnn \l_tmpb_coffin {2cm} { here~is~some \par more~text~you~crazy \par people }
\coffin_attach:NnnNnnnn
  \l_tmpa_coffin {l}{t}
  \l_tmpb_coffin {l}{t}
  {0pt}{0pt}
\coffin_display_handles:Nn \l_tmpa_coffin {dark-green}
\ExplSyntaxOff
\end{document}

我的使用创建了一个棺材,对于 XeTeX 来说,它太复杂了,无法在其上显示句柄——我的内存用完了 :( 使用 LuaTeX 可以得到一个 PDF,但是由于分层,手柄/杆几乎无法辨认

答案1

这也许是一种解决方法。当然不是答案。它定义了一个自定义命令来显示指定的句柄。

\documentclass{article}
\usepackage{xcoffins}
\begin{document}
\ExplSyntaxOn
\hcoffin_set:Nn \l_tmpa_coffin { here~is~some~text }
\vcoffin_set:Nnn \l_tmpb_coffin {2cm} { here~is~some \par more~text~you~crazy \par people }
\coffin_attach:NnnNnnnn
  \l_tmpa_coffin {l}{t}
  \l_tmpb_coffin {l}{t}
  {0pt}{0pt}
Standard~diagnostic~display:
\bigskip
\par
\coffin_display_handles:Nn \l_tmpa_coffin {dark~green}
\bigskip\bigskip\bigskip\bigskip
\par
\clist_new:N \l_sa_hpoles_clist
\clist_new:N \l_sa_vpoles_clist
\cs_new_protected_nopar:Npn \sa_display_handles:nnnn #1 #2 #3 #4
{
  \clist_set:Nn \l_sa_hpoles_clist { #2 }
  \clist_set:Nn \l_sa_vpoles_clist { #3 }
  \clist_map_inline:Nn \l_sa_hpoles_clist
  {
    \clist_map_inline:Nn \l_sa_vpoles_clist
    {
      \coffin_mark_handle:Nnnn { #1 } { ##1 } { ####1 } { #4 }
    }
  }
  \coffin_typeset:Nnnnn { #1 } {b} {l} {0pt} {0pt}
}
\cs_generate_variant:Nn \sa_display_handles:nnnn { Nnnn }
Customised~display:
\bigskip\par
\sa_display_handles:Nnnn \l_tmpa_coffin {l,r,hc} {b,vc,t,B,T,H} {magenta}
\ExplSyntaxOff
\end{document}

以下是标准诊断显示和上面给出的自定义诊断显示之间的比较:

比较诊断显示

相关内容