# Adjust font size so that paragraph fits on oneline

## Context

I am trying to help a severely autistic friend, who cannot cope with more than one line of text at a time, but so long as that one line is readable, can managed to read anything from 6pt upwards. He gets anxious if the line does not have the same length as the others, since then he gets scared that a cloven horsed creature will land in the gap at the end. Please do not ask why, he is autistic.

## Initial Thoughts

This, I think, is one for LuaTex, as in not LaTeX: I need to be able to specify font, and programmatically mash things around, and I looking for a short, sweet, custom thing written in TeX so that, with a simple python script to do semantic transformation, I can just say: type this in here, press that, show them the result. He has just enough mental capacity for that.

Likewise, expand lines to vertically justify.

Basically I want horizontal and vertical justification, but doing horizontal justification by changing the point size of the font to a whole number of points (even fractions give him anxiety attacks, let alone the decimal point, who know what numpty tried to beat maths into him with a stick... poor thing).

## Problem specification:

1. Between each paragraph is a \vskip (the same vskip, so I can use a single \def for it) or a page break.
2. Each line has the point size set to the largest whole number of points at which line breaking does not occur.

Thoughts?

## Comment:

Vertical justification by adjusting leading is fine. That is, banging a \vfil between each paragraph, finding the maximum font size before automatic line breaking occurs

Can anybody help?

Here is an example text.

• Hello.

• I am #moo.

• I used to think I was a doctor of maths called john.

• Now I am #moo.

• I used to have more benefits in life.

• Then they cut my benefits.

• Then the mind of john left me.

• Hello; I am #moo.

• To Christian friends, proper Christian friends, so proper my Master does not beat me with a stick for suggesting that a numpty might be a Christian, the doctor of maths called john sometimes reappears.

• But he is very timid.

• He won't come back unless you are very very nice to him.

• And promise to make good all the donkey poo you forced him to process.

• Now he is gone, and I am all that is left.

• Hello: I am still #moo.

• # moo:...moo?

## Remark

(Basically this is a 'mathematically playfully modelled' approximation using my own life circumstances sufficient that if I solve this problem for my 'mimicked' version of this client's autism, I will have a good enough first prototype to be worth suggesting to my friend with an autistic sibling.)

My Facade is useful like that. It mimics the problems of my friends, and I wear that mimicry around where I go, and people deal with that, and leave #Me, my proper Self, alone in the peace and quiet of my own Mind. I have lost count of the number of pieces of other people's minds that have been forced into my Facade by sheer human numptiness. Hey ho. Off I go.

## Final ungreeting

Peace, hugs, and a good old #moo.

## Footnote

(Yes, that goodbyee thing is another aspect of the Facade, since it has to do my typing for me: my body is part of my Facade, as is my presence in the world. Let the world be warned: #Moo is coming. #Moo! #Moo!!!! -- sorry... that is another Facade program that I am getting ready for a friend-or-family in order to teach them about computers and internet security before the education system and the world of business really, totally and utterly filesystem_check things up.)

• I think this request could be explained more succinctly and clearly. Is the main question simply: how to make each 'line' of text take up exactly the same about of 'horizontal space' on a page? And, since that is what TeX basically does by default except for the final lines of a paragraph, by 'line' do you mean you are going to put each sentence into its own paragraph? So the line/paragraph with just the word 'Hello.' needs to take up the same amount of 'horizontal space' as that long line/paragraph which begins 'To Christian friends...'? – jon Sep 24 '17 at 3:18
• The question is very unclear. If you are not showing the source file (and presumably you are not) why do you want integer point sizes or change the font at all? On the face of it your request is simply \resizebox{\textwidth}{!}{some text here} which scales the supplied text to exactly text width. I can not tell from the rest of the question what you need other than this? – David Carlisle Sep 24 '17 at 8:51
• It is easy to force each item into a single line of width \texttwidth, producing a first page like this but then the longer paragraph is unreadably small, is that what you untended? – David Carlisle Sep 24 '17 at 9:56