ConTeXt 在使用 Lettrine 模組的 LMTX 環境中是否會失敗?

ConTeXt 在使用 Lettrine 模組的 LMTX 環境中是否會失敗?

我已成功地將 ConTeXt MkIV 用於我的所有文件。

到目前為止,在我的 Arch Linux 發行版中,這種 TeX 風格的一切都進展順利,這要歸功於情境最小化來自 AUR 的軟體包安裝。

前幾天我安裝了盧阿泰克斯包,也來自 AUR。然後,我從ctx流明編譯我的 ConTeXt 文檔。這是迄今為止我的工作流程中唯一發生變化的事情(我的序言是相同的,而且我也不必更改\input文件中的任何內容)。

我的 pdf 中沒有任何變化,除了 LMTX 與 Lettrine 的一些奇怪行為:我刪除的大寫字母沒有整合到文字中,而是保留在頁邊距內,如下所示。

在此輸入影像描述

然而,每次我回到 ConTeXt MkIV 環境(ctx)使用相同的命令一切都再次完美運行context preamble.tex

在此輸入影像描述

這個論壇中是否有人在 LMTX 和 Lettrine 與 ConTeXt 之間經歷過同樣的奇怪行為TeX 直播分佈或與情境獨立

我的 LuaMetaTex 版本是 2.07.10

我還添加了我的程式碼的摘錄,其中包含我在這裡編寫的各個部分,這些部分一個接一個地連接在一起,新的 LMTX 可能不喜歡:

\setuplanguage[es][leftquotation=«,rightquotation=»]
    
\mainlanguage[es]
\definepapersize[mybook][width=6in,height=9in]
    
\setuppapersize[mybook]

\usemodule[lettrine]
\def \LettrineStyle
    
  {\definefontsynonym[LettrineFont][Bold]\dropcapitals
\setuplettrine[A][Lines=3,Slope=4pt,Findent=-3pt,Hang=0.04,FontHook={\LettrineStyle}]
\setuplettrine[L][Lines=3,Hang=0.06,Findent=-6pt,Nindent=12pt,
FontHook={\LettrineStyle}]
\setuplettrine[E][Lines=3,Hang=0.10,FontHook={\LettrineStyle}]
\setuplettrine[B][Lines=3,Hang=0.04,Raise=0.00,Oversize=0.00,
FontHook={\LettrineStyle}]
\setuplettrine[R][Lines=3,Oversize=0.04,Hang=0.06,Raise=0.00,
FontHook={\LettrineStyle}]
\setuplettrine[Q][Lines=3,Hang=0.08,
Nindent=1em,Raise=0.16,Oversize=-0.10,
FontHook={\LettrineStyle}]
\setuplettrine[M][Lines=3,Hang=0.06,Raise=0.00,FontHook={\LettrineStyle}]
    
\setuplettrine[W][Lines=3,Hang=0.04,Raise=0.00,Findent=2pt,Slope=-4pt,
Nindent=-4pt,Oversize=0.00,
FontHook={\LettrineStyle}]

\definefontfeature[body]
    
[mode=node,calt=no,itlc=yes,
liga=yes,dlig=no,hlig=no,
rlig=no,tlig=yes,kern=yes,swsh=yes,
    
onum=yes,salt=no,script=latn,pnum=yes,
    
protrusion=quality,expansion=quality]
    
\definefontfamily[mainfont][rm][cochineal][features=body]

\setuplayout % global
 layout
[
grid=yes,
%backspace=52pt,
%width=318pt,
    
width=fit,
    
topspace=36pt,
    
header=12pt,
    
headerdistance=13.50pt,
    
height=569pt,
    
footer=26pt,
    
footerdistance=12pt
]
\definegridsnapping[tolerant]

\definefontsize[t]
    
\definefontsize[u]
    
\definefontsize[v]
    
\definefontsize[w]
    
\definefontsize[y]
    
\definefontsize[z]
\definebodyfontenvironment[12.46pt][t=12.00pt,

u=11.30pt,v=15.20pt,w=8pt,y=30pt,z=10.20pt]
     
    \switchtobodyfont[12.46pt]
        
        
    \setupbodyfont[mainfont]
        
        
    \setupindenting[yes,medium]
        
        
    \setupalign[hz,hanging,height]
    \setupinterlinespace[line=15.45pt]
      

雖然我對 Lettrine 工作原理的了解幾乎毫無用處,但我懷疑這與該模組處理段落的方式有關。 LMTX 會改變這種情況嗎?

我花了幾個小時到處嘗試。這是一個帶有測試銘文的範例。雖然結果是正確的,但我很困惑:它不是使用 MkIV 編譯的,而是使用相同的流明環境和命令如前正文。

使用 LMTX 編譯

是的,它是用LMTX再次編譯的,沒有改變我舊程式碼的一個數字;當然,我只是添加了必要的程式碼來創建我的範例銘文。現在我將在下面分享我添加的包含它的程式碼。

\usemodule[annotation]
\definelayout[epigraph]
    [
      backspace=176pt,
      width=194pt
    ]
    \defineannotation
      [Epigraph]
      [
        alternative=command,
        style=tfa,
        spacebefore=small,
        spaceafter=big,
        command=\PlaceEpigraph,
      ]
    \define[2]\PlaceEpigraph
      {\startalignment[hanging,flushleft,nothyphenated]
    \setupinterlinespace[line=22pt]
    \placeannotationcontent
    \stopalignment}

\startmakeup[standard][doublesided=yes]
  
\setuplayout[epigraph]
    
\startEpigraph
     
\lettrine{A}{hora} \switchtobodyfont[initialtext],rest of my dummy text.
     
\stopEpigraph
    
\startalignment[flushright]
         
    \blank[0.8cm,force]{\tfa\sc Geofrey Chaucer,\hspace[big\blank[0.1cm,force]
    {\switchtobodyfont[initialtext]\tfa\em The Canterbury Tales \hspace[big]}
            
\stopalignment
      
\stopmakeup

我沒有找到這個正確結果的解釋,它與 LXMT 和 Letrine 再次在正文中作為罕見輸出給我們提供的異常相距甚遠。

這個謎很可能與揭露真相有關關聯米克普已經為我們提供了。但我對程式碼沒有深入的了解,無法將其與該線程的內容聯繫起來,也無法消除其解決方案給我帶來的疑慮,目前看來,這不僅是最好的,而且是唯一的。

順便說一下,關於漢斯·哈根在他的內部發出的警告公告,更具體地說\forgetparagraphfreezing,任何人都可以用簡單的語言向我解釋為什麼保持段落凍結相關嗎?相反,說實話,我不知道這意味著什麼

……在 lmtx 中,我們到處都希望啟用凍結功能。

相關內容