[tex-eplain] TeX, eplain + BibTeX: apalike style causes overlapping text bib entries in PDF
terry.s at Safe-mail.net
terry.s at Safe-mail.net
Wed Oct 11 12:43:03 CEST 2023
Hello,
IF THIS MESSAGE IS DUPLICATED, I APOLOGIZE (but I think it didn't make it through the first time).
I'm using TeX, eplain and BibTeX and this is my workflow: tex > bibtex > tex > tex > dvipdfmx
I originally had "\input eplain" followed by "\input btxmac" and couldn't compile. Laurence Finster noticed the issue disappears if you move btxmac up (which fixed the error), then Kark Berry notified me it's not even necessary because eplain automatically loads it. (You can also use it by itself without eplain.) After moving btxmac, several new errors broke the compile (unable to find my .bib file in the same directory + also the styles that are pre-installed in TeX Live) ... those errors mysteriously dissappeared after several compiles and are no longer relevant. (I since also removed the manual load of btxmac.)
New errors appeared which I spent a day trying to fix by every combination of changes (and hours double-checking while I drafted an email). That's a lesson in paying attention to the tiniest little niggle when you're focused on something "big" ... so I'll entertain you with that at the end (see if you can guess what I did).
However, I have a new, legitimate issue, for which I present both *suggested test source* given in the btxmac.tex iself and a PDF result that happens if you change the style to 'apalike'. (The bibliography cited is also pre-installed in TeX Live.)
**Using 'apalike' style with or without eplain (without eplain you must load btxmac yourself) causes several words of the first line of every bibliography item to overlap.** (The 'plain' style works fine, so I didn't test any other styles.)
I don't know enough about TeX and how package macros work to diagnose this. I did read he entire source of btxmac.tex, but if anything there should give me a clue, it doesn't. Does anyone know what causes this and how I can patch my document (or even the btxmac source)?
I attached the example source and you can test compile with plain and apalike and change other things + see they don't matter. I also attached the PDF output with apalike that has the overlapped text.
..... And now, for your entertainment .....
No matter what combination of eplain (or not, then load btxmac), plain or apalike style, \enablehyperlinks (or not, and it requires eplain), everything compile without error during the first *tex* run and also *bibtex*. However, on the next 2 runs of *tex* I would get this error (which I could just `Enter' past and run *dvipdfmx* without error):
! Undefined control sequence.
l.5 \newblock Eplain: Expanded plain \tex
"Eplain: Expanded...." is part of a bib entry. Can you guess what caused the "undefined" error? (It's not what you'd think!)
If you can guess what went wrong and where, you'd win a bag of cookies (but you'll have to buy them yourself).
...
...
...
...
No? Okay, here's the entry in my .bib file, and if you can figure it out, buy yourself a cookie (or at least a chocolate chip):
...
@article{berry-eplain:2005, title={Eplain: Expanded Plain \TeX}, author={Berry, Karl and Katsitadze, Oleg}, date={2022-10}, note={({\sl TUGboat} vol.~26 no.~5, 2005)}}
...
...
Well? Notice the terminal said "plain \tex" but I typed "plain \TeX"! Many people put quotes around their kv *values* but it's too easy to accidentally backspace over a quote and not see it (especially with my eyes), so I use {}, which is perfectly legal. But REGARDLESS how you delimit a value, if you want TeX/BibTeX to *preserve the format* (as for multi-word author surnames, which are alternatively just fixed by using surname first with comma, or a title where you want capitalization preferred, etc) the *value* INSIDE quotes or {} must be in {}! Failing to do so allows BibTeX to *convert* titles to lowercase ... so \TeX became \tex. My title should have been in "{}" or {{}} but *not* just {}. BibTeX only changes formatting of certain fields. (See one of many documents on bibliographies by Nicola Talbot,and presumably the BibTeX documentation.)
*THAT'S* what TeX was complaining about ... \tex, not \newblock!
I just spent hours testing with combinations of eplain/not, btxmac/not, plain/apalike (with the caveat you must load btxmac if you don't load eplain). Because I kept getting the error at the start of a bibliography entry, yet plain style is typeset in PDF fine whereas apalike has overlapping text, I thought maybe this "undefined" \newblock (supposedly) messed up that style, maybe.
Yes, that \tex on the terminal niggled at me a couple times, but since I knew it was typed correctly in my .bib file and I was so focused on \newblock (even copying the "just in case" definition from btxmac.tex and pasting it in various places, and even putting a NEW btxmac in my "texmf-local" where the definition was COMMENTED OUT of btxmac.tex) that it went right over my head. Sometimes it helps to focus on the small things (often easy) instead of the big picture. If there's a good saying about this, I can't think of it right now.
Sincerely,
Terry S.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: btxmac-tex-test.tex
Type: application/octet-stream
Size: 1025 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-eplain/attachments/20231011/45bb652c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: COPY-(apalike)_btxmac-tex-test.pdf
Type: application/pdf
Size: 21604 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-eplain/attachments/20231011/45bb652c/attachment.pdf>
More information about the tex-eplain
mailing list.