1

(1) Recently I have been researching a lot of fonts, have come across a range of type specimens where designers have deliberately disabled hyphenation (as a stylistic effect) while allowing words to break across lines. (2) They also seem to zero all the inter-word or intra-word stretchable/shrinkable glues while typesetting them. I haven't come across a question about the former (1) (automatic word break with no hyphens), and no clear authoritative answer for the latter (2). Am happy with just a lualatex solution if one exists, generic latex solution is welcome too.

Here's a screen shot of a type specimen:

enter image description here

codepoet
  • 1,316
  • An empty or zero-width \hyphenchar might do it. – Cicada Mar 28 '20 at 08:14
  • 1
    if you completely remove all stretch and shrink how do you propose to justify the text? You could use microtype to allow some font adjustment but that isn't usually enough, also as well as using an invisible hyphen, you would probably need to allow hyphenation between any characters, and close to the ends of words? – David Carlisle Mar 28 '20 at 12:04
  • Yes David, that's a very good point. Indeed hyphenation needs to be allowed anywhere between any character and in any word... I wonder how to do that. – codepoet Mar 30 '20 at 01:47
  • @DavidCarlisle Hi David, I was researching another question few months ago, and had come across your answer to split hbox. Given I don't need hyphenation, I wonder if a minor addition of loop there could become a complete answer for this question, though I don't understand lower level tex much. Here's the link to it: https://tex.stackexchange.com/questions/105816/is-it-possible-to-split-a-hbox – codepoet Apr 01 '20 at 04:45
  • I think you misunderstood that answer (I don't see how it could help here) You really want to allow hyphenation anywhere? so split up ...To give a single.. as T <linebreak> o give a single... ??? – David Carlisle Apr 01 '20 at 08:20
  • @DavidCarlisle Yes T <linebreak> o would be acceptable, as it is for stylistic effect not for typical publishing. Do you mean I misunderstood the link where you discuss splitting \hbox? If a \hbox can be split into 2 smaller ones, I was thinking I could typeset long paragraph as a single \hbox, and then split it as many times to create a multi-line body of text. In my experience, so far, a single line seems to have evenly distributed inter-word spacing so first typesetting it as \hbox would solve that problem... – codepoet Apr 01 '20 at 08:34
  • Unless the breaks fall in the middle of whitespace or a glyph, as that would create an uneven right boundary of paragraph if that space is not distributed as intra-letter space in the line. This is seems like a complex problem :) to undo everything that tex does to typeset things first, and then break it apart. I wonder if there is a latex3 discussion on giving more control into low level behavior of typesetting engine, that would solve my other complex problem too: https://tex.stackexchange.com/questions/519768/get-next-chunk-of-text-of-specified-size-contained-in-a-macro – codepoet Apr 01 '20 at 08:56
  • the hbox splitting answer was how to re-purpose the normal paragraph linebreaking to an hbox, but here you are already in a paragraph setting. (internally setting the whole paragraph to a single line hbox then splitting it is exactly what happens) – David Carlisle Apr 01 '20 at 09:44
  • unless you typeset in a monospace font it it is impossible to justify the right margin if you have no stretching. You need to relax one of these constraints, either allow inter-word stretch of don't justify the margin. – David Carlisle Apr 01 '20 at 09:46

2 Answers2

3

For the first part, a zero-width joiner (U+200D) as the hyphenchar:

no hyphen hyphenation

For the second part, shrink and stretch (and therefore, hyphenate) is what TeX was designed to do. You can play with the fontdimens to see the boundary of the possible. A TikZ solution would probably be the way to go.

MWE

\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}
Cicada
  • 10,129
1

Building upon Cicada's answer, you can add character expansion with microtype; LuaLaTeX is needed.

\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}

(Quotation from the original text.)

enter image description here

egreg
  • 1,121,712
  • Thanks for your note about microtype character expansion. I have actually used that in past, though its good to remember that's an option. I think the complete solution for this question is a loop away from the answer of David for https://tex.stackexchange.com/questions/105816/is-it-possible-to-split-a-hbox. If someone with the understanding of low level tex would know how that would look like, a few months I had spent some time trying to write such a loop with no success. – codepoet Apr 01 '20 at 04:50
  • @reportaman as I commented under the question that answer can't help here. – David Carlisle Apr 01 '20 at 09:48
  • Yes I agree to your comment – codepoet Apr 01 '20 at 09:51