如何使用從右到左列表(阿拉伯語)的margin
和選項。column
..., أ , ب
我已經為從右到左的列表定義了新的枚舉 ,但是如果我mergin
為 itemize 環境添加或任何其他選項,我會得到 abullet
而不是我定義的標籤。
微量元素
\setuppapersize[A4]
\mainlanguage[arabic]
\setupdirections[bidi=global]
\setupalign[r2l]
\definefontfeature
[arabic]
[mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,tlig=yes,
calt=yes,trep=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]
\starttypescript [serif] [arabic]
\definefontsynonym [Arabic] [name:Amiri] [features=arabic]
\stoptypescript
\starttypescript [serif] [arabic] [name]
\usetypescript[serif][fallback]
\definefontsynonym [Serif][Arabic][features=arabic]
\stoptypescript
\starttypescript [Arabic]
\definetypeface [Arabic] [rm] [serif] [arabic] [default]
\definetypeface [Arabic] [mm] [math] [palatino] [default]
\stoptypescript
\setuplayout[
grid=min,
backspace=20mm, width=170mm,
topspace=10mm, height=275mm,
header=10mm,footer=10mm,
footerdistance=0.5mm
]
\setuppagenumbering[
state=none,
]
\setupbodyfont[Arabic,18pt]
\setupinterlinespace[line=30pt]
\def\arabiclabel#1%
{\ifcase#1 \or أ\or ب\or ج\or د\or ه\or
و\or ي\else
\expandafter\arabiclabel\expandafter{\the\numexpr#1-7\relax}\fi}
\defineconversion[s][\arabiclabel]
\starttext
\startitemize[s]
\item
كلمة
\item
كلمة
\item
كلمة
\stopitemize
\startitemize[s,margin=1em,columnn,three]
\item
كلمة
\item
كلمة
\item
كلمة
\stopitemize
\stoptext
輸出
注意從右到左的列應該從右邊緣開始到左邊緣
答案1
有兩種方法可以在從右到左的環境中設定逐項的列版本。 (這在測試版中有效,我不知道 TeXlive 2015 的穩定版本。無論如何,測試版很快就會在 TeXlive 2016 中出現。)
第一種方法是更改文件中所有項目的行為,這在主要從右到左的文件中很方便。只需將以下內容放入序言中。
\setupmixedcolumns[itemgroupcolumns][direction=reverse]
第二種方法是改變單一項目的方向。在這裡你最好小心,正如其他答案指出的那樣,關鍵字和賦值應該分開。請看下面的範例,使用第二種方法。
\setupalign[r2l]
\starttext
\startitemize[n,columns,three][direction=reverse]
\item One
\item Two
\item Three
\item Four
\item Five
\item Six
\item Seven
\stopitemize
\stoptext
事實上,CONTEXT 中有兩個列項。一個是你用過的,一個是水平的。假設有兩列和兩個以上的項目,第一個方法將第二個項目放在第二行,而第二個方法將第二個項目放在第一個項目之後的第一行。 (例如,這在某些多項選擇題中很有用。)
若要在從右到左設定中使用水平方法,請嘗試以下操作。
\startitemize[n,horizontal,two][direction=reverse]
\startitem One \stopitem
\startitem Two \stopitem
\startitem Three \stopitem
\startitem Four \stopitem
\stopitemize
還有一點:在目前的測試版中,除了(and ) 巨集或產生印度數字的對應鍵之外,您還可以使用\abjadnumerals
and (產生您似乎喜歡的編號)。中定義了一堆類似的編號方法。\arabicnumerals
\arabicdecimals
\persiandecimals
core-con.mkiv
答案2
您的程式碼中有兩個錯誤:
- 關鍵字是
columns
,不是column; - 你必須將關鍵字和分配分開(這是郵件清單中的經典)。
因此,您的第二個專案組應該像這樣開始:
\startitemize [s,columns,three] [margin=1em]