newline discrepancy between HTML and hardcopy

Aperta
#1,530 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
html, perl, tex
Ambito
backend

Direzione di ricerca

The payload names the BEGIN_TEXT/END_TEXT block and the $PAR macro as the source of the blank-line handling, and compares the HTML output (a div) with the TeX hardcopy output. Start by reproducing the example in both output modes to confirm the difference. Done needs a maintainer decision on whether blank lines should be normalized before $PAR is interpolated, since the thread leaves that open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

If you have like:

BEGIN_TEXT
Hello world
Hello world

Hello world
END_TEXT

Then the HTML output has a div whose source preserves all the whitespace, but a reader doesn't see that whitespace. The reader just sees

Hello world Hello world Hello world

Meanwhile in hardcopy output, again the white space is preserved in the tex, but that double line break makes an impact and the reader sees:

Hello world Hello world
Hello world

Of course it's been this way forever. I wondered if it's worth making the behavior be consistent. I think it would be "easy" to just remove blank lines from input before things like $PAR are interpolated, so that the hardcopy behavior would move to be like the HTML behavior. Of course, there is no discrepancy when using PGML, so maybe this is just a quirk of some old way of doing things that should not be used anymore.

I happened to notice this discrepancy while investigating a PreTeXt output issue that I won't get into here, but I am working on separately.

Lingua principale
Perl
Stelle
48
Fork
78
Merge medio
5g 13h
PR unite (30g)
9

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openwebwork/pg

Tutte le issue di openwebwork/pg

Issue simili

Altre issue su Perl

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.