Closed pfefferniels closed 3 years ago
@rettinghaus do you have an opinion on this? Here hyphens at line breaks are also encoded (but using <g>
instead of <pc>
...)
No project has figured out a perfect solution for this. <pc>
isn't mentioned in DTABf
. <g>
is mentioned, but strictly ruled out …
And the TEI Guidelines say, that <g>
represents a glyph, or a non-standard character
Do you think, changing this would improve anything?
I don't have a strong opinion on this, but those lines
if ($('#ignore-lb').is(':checked')) {
const lbWithHyphen = /\-(\n|\s)*<lb(\s)*\/>([a-z]|ſ)/g;
teiComments = teiComments.replace(lbWithHyphen, '$3­');
keyCharacteristics = keyCharacteristics.replace(lbWithHyphen, '$3­');
meterCharacteristics = meterCharacteristics.replace(lbWithHyphen, '$3­');
await Promise.all([renderComments(), renderKeyOverlay(), renderMeterOverlay()]);
$('tei-lb').hide();
} else {
const softHyphen = /\­/g;
teiComments = teiComments.replace(softHyphen, '-<lb/>');
keyCharacteristics = keyCharacteristics.replace(softHyphen, '-<lb/>');
meterCharacteristics = meterCharacteristics.replace(softHyphen, '-<lb/>');
await Promise.all([renderComments(), renderKeyOverlay(), renderMeterOverlay()]);
$('tei-lb').show();
}
do not only take quite some time – each time a page gets loaded, for hiding line breaks is activated by default, but also don't function very reliably.
Using now the DTAs CAB service to turn the textes into their modern forms, including hyphenation. This happens automatically before deploying. It is for sure the best way to cover all kinds of corner cases.
I'd like to propose using
<pc force="weak">-</pc>
for the hyphens at line breaks (as suggested by the TEI guidelines). This could be added by a simple regex on all the TEI documents. I don't feel very good about the regex replacements by JS everytime a Probstück is loaded … This would allow us to simply hide linebreaks by CSS:tei-pc[@force='weak'] { display: none }
andtei-lb { display: none }