<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>> [...] still produces a pdf which cannot recognize the word.</div>
<div> </div>
<div>You need to switch to \rm after resetting it.</div>
<div> </div>
<div>\font\rm=ecrm1000<br/>
\rm<br/>
th{\char233}orie</div>
<div> </div>
<div>should do the trick. There are probably \chardef definitions that go along with the EC fonts so you don't have to use \char explicitly.</div>
<div>TeX also has a \chardef primitive but I'd have to look up how it works. I'd check the documentation for the EC fonts. This looks like a good place to start: <a href="https://www.ctan.org/pkg/ec" target="_blank">https://www.ctan.org/pkg/ec</a></div>
<div>
<div>
<div> </div>
<div>Without looking anything up, I could suggest something like this:</div>
<div> </div>
<div>\catcode`\é=\active</div>
<div>\defé{\char233}</div>
<div>\catcode`\á=\active</div>
<div>\defá{\char225}</div>
<div> </div>
<div>However, if your editor uses two or more bytes to represent the é, á, etc., characters, this won't work. I once had this problem with Emacs, when I was using characters I thought were ASCII but were being represented in another way. There is probably a way of changing this in Emacs, but I would guess that you're using something else, anyway.</div>
<div> </div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Donnerstag, 20. Januar 2022 um 22:20 Uhr<br/>
<b>Von:</b> "Gérald Tenenbaum" <gerald.ten@free.fr><br/>
<b>An:</b> "Laurence Finston" <Laurence.Finston@gmx.de><br/>
<b>Betreff:</b> Re: Aw: Re: Re: Re: [tex-eplain] accents problem in pdf generated by eplain</div>
<div>
<div style="font-family: Lucida Sans;">
<div style="font-family: Lucida Sans;">The file<br/>
<div style="margin-left: 40.0px;">\magnification 1200<br/>
\font\rm=ecrm1000<br/>
th\'eorie<br/>
\end</div>
still produces a pdf which cannot recognize the word. See screen capture.<br/>
When you say "you can run `tex testfont'." how do you do this. In Terminal?<br/>
<br/>
<br/>
<br/>
<span>Laurence Finston a écrit le 20/01/2022 à 21:59 :</span>
<blockquote>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>> Produces a pdf which is correct for viewing but fails finding the word "théorie".</div>
<div> </div>
<div>This can't work with the CM fonts because an é is not a character 'e with acute' but rather a normal 'e' (at position 101 in the CM fonts)</div>
<div>together with an acute accent character (at position 19) which is typeset over it. You therefore can't find it by searching for 'é'. In addition,</div>
<div>you can't specify hyphenation for words with accents with CM.</div>
<div> </div>
<div>For this and other reasons, the EC (European Computer Modern) fonts were created, which do have single characters with accents. I suspect LaTeX is using them (or some other font with this feature) by default or because of some package or other that you're loading, but I have to pass on questions relating to LaTeX.</div>
<div> </div>
<div>Of course, there's no reason why you can't use the EC fonts together with eplain:</div>
<div>
<div>\font\rm=ecrm1000</div>
<div>
<div>\font\it=ecti1000</div>
<div>etc.</div>
<div> </div>
<div>Personally, I wouldn't bother changing the math fonts.</div>
<div> </div>
<div>If you want to see the characters of a font and their encodings (in octal and hexadecimal), you can run `tex testfont'. I've attached the output (with tables -- there are other options) for cmr10 and ecrm1000.</div>
<div> </div>
</div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Donnerstag, 20. Januar 2022 um 21:16 Uhr<br/>
<b>Von:</b> "Gérald Tenenbaum" <a class="moz-txt-link-rfc2396E" href="mailto:gerald.ten@free.fr" onclick="parent.window.location.href='mailto:gerald.ten@free.fr'; return false;" target="_blank"><gerald.ten@free.fr></a><br/>
<b>An:</b> "Laurence Finston" <a class="moz-txt-link-rfc2396E" href="mailto:Laurence.Finston@gmx.de" onclick="parent.window.location.href='mailto:Laurence.Finston@gmx.de'; return false;" target="_blank"><Laurence.Finston@gmx.de></a><br/>
<b>Betreff:</b> Re: Aw: Re: Re: [tex-eplain] accents problem in pdf generated by eplain</div>
<div>
<div style="font-family: Lucida Sans;">
<div style="font-family: Lucida Sans;">Hello again,<br/>
<br/>
TeXShop actually works with (and depends on) MacTeX.<br/>
When I type in LaTeX with TeXShop, the problem does not arise.<br/>
When I type in Plain TeX and eplain I use the appended file to avoid typing TeX accents (i.e. type é instead of \'e).<br/>
However even the code<br/>
<div style="margin-left: 40.0px;">\magnification 1200<br/>
th\'eorie<br/>
\end</div>
<br/>
Produces a pdf which is correct for viewing but fails finding the word "théorie".<br/>
I suspect it is an encoding issue, but have no idea of where to look.<br/>
I tried all the manipulations with postscript, dvi, ps2pdf, etc. Nothing works.<br/>
<br/>
<br/>
<span>Laurence Finston a écrit le 20/01/2022 à 20:28 :</span>
<blockquote>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>> I view pdf's with Adobe Acrobat DC. When I open wit Aperçu, I still get no result.<br/>
> Printing the page is OK, accents are there.<br/>
</div>
<div>How about if you look at the PDF in your browser?</div>
<div> </div>
<div>At any rate, it would appear that it is not a TeX or eplain problem. I'm not familiar with TeXShop. I would try the following:</div>
<div> </div>
<div>If you're generating PDF directly, I would try the following:</div>
<div> </div>
<div>1. Generate a DVI file, i.e., by using TeX the "normal" way.</div>
<div> </div>
<div>2. Look at it with xdvi or YAP or some other DVI viewer.</div>
<div> </div>
<div>3. Convert the DVI to PostScript with dvips (dvips -o <ps-filename> <dvi-filename>).</div>
<div> </div>
<div>4. Look at the result with Ghostview (gv) or evince ("Document Viewer") or some other PostScript viewer. </div>
<div> </div>
<div>If that works, as I expect it would, you could try:</div>
<div> </div>
<div>5. Convert the PostScript to PDF with ps2pdf (ps2pdf <ps-filename>) and then check the result. You could try downloading evince, if you don't already have it.</div>
<div> </div>
<div>
<div>If the problem lies with TeXShop, you could try installing MacTeX: <a class="moz-txt-link-freetext" href="https://tug.org/mactex/index.html" target="_blank">https://tug.org/mactex/index.html</a></div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Donnerstag, 20. Januar 2022 um 19:12 Uhr<br/>
<b>Von:</b> "Gérald Tenenbaum" <a class="moz-txt-link-rfc2396E" href="mailto:gerald.ten@free.fr" onclick="parent.window.location.href='mailto:gerald.ten@free.fr'; return false;" target="_blank"><gerald.ten@free.fr></a><br/>
<b>An:</b> "Laurence Finston" <a class="moz-txt-link-rfc2396E" href="mailto:Laurence.Finston@gmx.de" onclick="parent.window.location.href='mailto:Laurence.Finston@gmx.de'; return false;" target="_blank"><Laurence.Finston@gmx.de></a><br/>
<b>Betreff:</b> Re: Aw: Re: [tex-eplain] accents problem in pdf generated by eplain</div>
<div>
<div style="font-family: Lucida Sans;">
<div style="font-family: Lucida Sans;">I view pdf's with Adobe Acrobat DC. When I open wit Aperçu, I still get no result.<br/>
Printing the page is OK, accents are there.<br/>
<br/>
<br/>
<span>Laurence Finston a écrit le 20/01/2022 à 18:39 :</span>
<blockquote>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div>By "example", I meant of the source code. However, it may not be necessary:</div>
<div> </div>
<div>> Please find attached one page extracted from the whole document. You will see that searching for "théorie" returns no result.</div>
<div> </div>
<div>It does on my computer (see attachment). Maybe the problem is with your PDF viewer. Have you tried printing the page?</div>
<div> </div>
<div>To the best of my knowledge, PDFs embed the fonts used, so I don't know why any PDF viewer on the market would be unable to display this document correctly. However, I'm not an expert on the subject.</div>
<div> </div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Donnerstag, 20. Januar 2022 um 18:27 Uhr<br/>
<b>Von:</b> "Gérald Tenenbaum" <a class="moz-txt-link-rfc2396E" href="mailto:gerald.ten@free.fr" onclick="parent.window.location.href='mailto:gerald.ten@free.fr'; return false;" target="_blank"><gerald.ten@free.fr></a><br/>
<b>An:</b> "Laurence Finston" <a class="moz-txt-link-rfc2396E" href="mailto:Laurence.Finston@gmx.de" onclick="parent.window.location.href='mailto:Laurence.Finston@gmx.de'; return false;" target="_blank"><Laurence.Finston@gmx.de></a><br/>
<b>Betreff:</b> Re: Aw: [tex-eplain] accents problem in pdf generated by eplain</div>
<div>
<div style="font-family: Lucida Sans;">
<div style="font-family: Lucida Sans;">Many thanks for helping.<br/>
Please find attached one page extracted from the whole document. You will see that searching for "théorie" returns no result.<br/>
I use TeXShop + eplain on a mac.<br/>
Regards,<br/>
<br/>
Gérald<br/>
<br/>
<span>Laurence Finston a écrit le 20/01/2022 à 18:07 :</span>
<blockquote>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>It would be helpful if you would supply an example and also explain exactly what version of TeX, etc., you're using; specifically how you are generating the PDF file. </div>
<div> </div>
<div>I don't know if this could be the problem, but I have occasionally had issues with things not working when using pdftex that do work with tex + dvips + ps2pdf. This applies, logically enough, to features specific to dvips. However, it might be worth a try, anyway.</div>
<div>
<div>
<div> </div>
<div>A typical cause of problems with accented letters not being printed is when using accented letters in the input with fonts with no corresponding glyphs. With a "normal" version of TeX and the CM fonts, you're on the safe side if you use control sequences, e.g., {\'a}, {\"a}, etc. It is possible to set up characters as being "active", but that may not be relevant here.</div>
<div> </div>
<div>Since CM doesn't contain accented characters as single glyphs, you will get characters plus an accent by using the control sequences. If you are using some other font that does define single characters with accents, you must use the correct characters in your input, corresponding to the encoding of the font. If you are using characters in the input that aren't assigned to characters in the current font, nothing will be printed.</div>
<div> </div>
<div>Laurence</div>
<div> </div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Donnerstag, 20. Januar 2022 um 17:45 Uhr<br/>
<b>Von:</b> "Gérald Tenenbaum" <a class="moz-txt-link-rfc2396E" href="mailto:gerald.ten@free.fr" onclick="parent.window.location.href='mailto:gerald.ten@free.fr'; return false;" target="_blank"><gerald.ten@free.fr></a><br/>
<b>An:</b> <a class="moz-txt-link-abbreviated" href="mailto:tex-eplain@tug.org" onclick="parent.window.location.href='mailto:tex-eplain@tug.org'; return false;" target="_blank">tex-eplain@tug.org</a><br/>
<b>Betreff:</b> [tex-eplain] accents problem in pdf generated by eplain</div>
<div>
<div style="font-family: Lucida Sans;">
<div style="font-family: Lucida Sans;">Hello,<br/>
<br/>
I come across an unexpected issue with the pdf file of a book written with eplain. I turns out that accented letters are not recognized by the pdf. is there anything I can modify either in the source or in the pdf to make accents recognized?<br/>
Many thanks in advance for any help.<br/>
Gérald Tenenbaum</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>