[tex-eplain] Can't use nor define my own "newlinechar"

terry.s at Safe-mail.net terry.s at Safe-mail.net
Thu Oct 12 21:39:20 CEST 2023


I knew that ... I KNOW that! How did I get so far down the rabbit hole I forgot?

Oh yeah ... when I define it with \newlinechar=`^^J, typing: ^^J prints the Greek Omega! (That happens if I do no definition at all, too.) And of course, if you leave off the backtick you get "Missing number, treated as zero".

I wonder if this because math fonts are loaded? (Not hand-loaded, but the document has formulas and I use $s to print some characters.) But then TeX *always* loads Computer Modern Math with Computer Modern by default, doesn't it?

I was trying all sorts of other ways to define it, like \def (obviously just creates a shortcut), \let and so on. Never gonna work!
I'd really like to make \nl the newline character ... what I should do (and should have though of) was to look at OpTeX source and see how Petr Oslak defines it. Don't know why I didn't think of that!

The thing is, the *eplain* documentation says this is ALREADY defined as ^^J, but it's not. And using \show reveals it has some sort of circular definition to itself! (Maybe I don't understand the terminal output in this case.)


-------- Original Message --------
From: Laurence.Finston at gmx.net
Apparently from: tex-eplain-bounces+terry.s=safe-mail.net at tug.org
To: tex-eplain TUG <tex-eplain at tug.org>
Subject: Re: [tex-eplain] Can't use nor define my own "newlinechar"
Date: Thu, 12 Oct 2023 20:07:41 +0200

> That's not how it works.  You type ^^J in your document, not \newlinechar.  I only ever use this in \write commands,
> or \message, which is like writing to standard output:
> 
> \newlinechar=`^^J
> \newwrite\abc
> \openout\abc=abc.tex
> \write\abc{abc^^Jdef}
> \closeout\abc
> \bye
> 
> This is what's written to abc.tex:
> abc
> def
> 
> 
> > Gesendet: Donnerstag, 12. Oktober 2023 um 19:42 Uhr
> > Von: terry.s at Safe-mail.net
> > An: tex-eplain at tug.org
> > Betreff: [tex-eplain] Can't use nor define my own "newlinechar"
> >
> > Hello,
> >
> > I'm trying to use \newlinechar, a documented feature of eplain. It produces the error "Missing number, treated as zero". I also loaded epsf and colordvi because they are loaded in a file in Laurence Finston's GNU 3DLDF (glyph_test.tex), and he's able to define it himself. I'm on TeX Live 2022. However, that made no difference (so they're commented here). Also, commenting eplain and using TeX by itself makes no difference.
> >
> > (I realize I can use \obeylines\break but I'd like to avoid the typing!)
> >
> > If I attempt to define it like Laurence as the error is the same (when I try to use it; merely defining it gives no error): \newlinechar=`^^J
> >
> > Attached is a minimal example; you can comment and uncomment various packages and my own definition.
> >


More information about the tex-eplain mailing list.