自動換行,不帶連字符,將完全對齊的段落中的所有拉伸/收縮詞間詞內粘合歸零

自動換行,不帶連字符,將完全對齊的段落中的所有拉伸/收縮詞間詞內粘合歸零

(1) 最近我一直在研究很多字體,遇到了一系列的字體樣本,其中設計師故意禁用連字符(作為一種風格效果),同時允許單字跨行。 (2) 他們在排版時似乎也將所有字間或字內的可拉伸/可收縮的膠水歸零。我還沒有遇到關於前者(1)(沒有連字符的自動分詞)的問題,並且對於後者(2)也沒有明確的權威答案。我對 lualatex 解決方案(如果存在)感到滿意,也歡迎通用乳膠解決方案。

這是一個類型樣本的螢幕截圖:

在此輸入影像描述

答案1

對於第一部分,零寬度連接符號 (U+200D) 作為連字號:

沒有連字符連字符

對於第二部分,收縮和拉伸(因此,連字符)是 TeX 的設計目的。您可以使用fontdimens 來查看可能性的邊界。 TikZ 解決方案可能是最佳選擇。

微量元素

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\hyphenchar\font=8205 %zerowidth joiner
%\spaceskip=0.6em
%\raggedright 
%\usepackage[document]{ragged2e}

% See: https://tex.stackexchange.com/questions/23921/how-to-shorten-shrink-spaces-between-words
\fontdimen2\font=1pt %space
\fontdimen3\font=0.1pt %stretch
\fontdimen4\font=0.1pt %shrink
\fontdimen7\font=1pt % extra space

\begin{document}


From Wikipedia:


\parbox{2in}{Newspeak is the language of Oceania, a totalitarian superstate that is the setting of George Orwell's dystopian novel Nineteen Eighty-Four (1984). To meet the ideological requirements of English Socialism (Ingsoc) in Oceania, the ruling Party created Newspeak,[1] a controlled language of simplified grammar and limited vocabulary, meant to limit the freedom of thought—personal identity, self-expression, free will—that threatens the ideology of the régime of Big Brother and the Party, who have criminalised such concepts into thoughtcrime, as contradictions of Ingsoc orthodoxy.[2][3][4]}

\end{document}

答案2

基於 Cicada 的答案,您可以添加字元擴展microtype;需要 LuaLaTeX。

\documentclass{article}
\usepackage[british]{babel}
\usepackage{fontspec}
\usepackage[expansion=true]{microtype}

\microtypesetup{stretch=100,shrink=0}

\setmainfont{XCharter}[
  WordSpace={0.5,0.1,0.1},
  Scale=0.9,
]

\frenchspacing
\prehyphenchar="200D
\hyphenpenalty=-5000 % make hyphenation more desirable, for demonstration purposes

\textwidth=0.85\textwidth

\begin{document}

\textsc{Newspeak was the official language} of Oceania and had been devised to meet 
the ideological needs of Ingsoc, or English Socialism. In the year 1984 there 
was not as yet anyone who used Newspeak as his sole means of communication, 
either in speech or writing. The leading articles in the \emph{Times} were written 
in it, but this was a \emph{tour de force} which could only be carried out by a 
specialist. It was expected that Newspeak would have finally superseded 
Oldspeak (or Standard English, as we should call it) by about the year 2050. 
Meanwhile it gained ground steadily, all Party members tending to use Newspeak 
words and grammatical constructions more and more in their everyday speech. 
The version in use in 1984, and embodied in the Ninth and Tenth Editions of 
the \textbf{Newspeak Dictionary}, was a provisional one, and contained many superfluous 
words and archaic formations which were due to be suppressed later. It is with 
the final, perfected version, as embodied in the Eleventh Edition of the 
Dictionary, that we are concerned here.
%
The purpose of Newspeak was not only to provide a medium of expression for the 
world-view and mental habits proper to the devotees of Ingsoc, but to make all 
other modes of thought impossible. It was intended that when Newspeak had been 
adopted once and for all and Oldspeak forgotten, a heretical thought---that is, 
a thought diverging from the principles of Ingsoc---should be literally 
unthinkable, at least so far as thought is dependent on words. Its vocabulary 
was so constructed as to give exact and often very subtle expression to every 
meaning that a Party member could properly wish to express, while excluding all 
other meanings and also the possibility of arriving at them by indirect methods. 
This was done partly by the invention of new words, but chiefly by eliminating 
undesirable words and by stripping such words as remained of unorthodox meanings, 
and so far as possible of all secondary meanings whatever. To give a single 
example. The word \emph{free} still existed in Newspeak, but it could only be used in 
such statements as ‘This dog is free from lice’ or ‘This field is free from weeds’. 
It could not be used in its old sense of ‘politically free’ or ‘intellectually free’ 
since political and intellectual freedom no longer existed even as concepts, and 
were therefore of necessity nameless. Quite apart from the suppression of 
definitely heretical words, reduction of vocabulary was regarded as an end in 
itself, and no word that could be dispensed with was allowed to survive. Newspeak 
was designed not to extend but to diminish the range of thought, and this purpose 
was indirectly assisted by cutting the choice of words down to a minimum.
%
Newspeak was founded on the English language as we now know it, though many 
Newspeak sentences, even when not containing newly-created words, would be barely 
intelligible to an English-speaker of our own day. Newspeak words were divided 
into three distinct classes, known as the A vocabulary, the B vocabulary (also 
called compound words), and the C vocabulary. It will be simpler to discuss each 
class separately, but the grammatical peculiarities of the language can be dealt 
with in the section devoted to the A vocabulary, since the same rules held good 
for all three categories.

\end{document}

(引自原文。)

在此輸入影像描述

相關內容