Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EDITION] Intro replacements #1815

Open
26 tasks
musicEnfanthen opened this issue Sep 25, 2024 · 0 comments
Open
26 tasks

[EDITION] Intro replacements #1815

musicEnfanthen opened this issue Sep 25, 2024 · 0 comments

Comments

@musicEnfanthen
Copy link
Member

musicEnfanthen commented Sep 25, 2024

Formatting

Italics:

  • .text-T31{ font-family:'Sabon LT Pro'; font-style:italic; }
<span class="text-T31">(.*?)</span>

-->

<em>$1</em>

Bold:

  • .text-T33{ font-family:'Sabon LT Pro'; font-weight:bold; }
<span class="text-T33">(.*?)</span>

-->

<strong>$1</strong>

Underline:

  • .text-T86{ text-decoration:underline; }
<span class="text-T86">(.*?)</span>

-->

<u>$1</u>

Superscript/Subscript

  • .text-T57{ vertical-align:super; font-size:58%;}
<span class="text-T57">(.*?)</span>

-->

<sup>$1</sup>

Link todo:

  • .text-T54{ background-color:#00ff00; }
<span class="text-T57">(.*?)</span>

-->

<span class="link-todo">$1</span>

Empty spans:

  • ...
<span class="(.*?)"/>

-->

$1

Plain text (it's better to replace all other formating first):

  • .text-T1{ font-family:'Times New Roman'; }
<span class="text-T1">(.*?)</span>

-->

$1

Quotes:

  • Replace all double qoutes with singles: " --> '

Non-representable styles:

  • Manually check those styles marked as
    /* ODF styles with no properties representable as CSS: .dp1 .Footnote_20_Symbol .T51 .T52 .T53 .T55 .T56 .T65 .T66 .T72 .T75 .T76 .T77 .T78 .T80 .T81 .T82 .T84 .T87 .T89 { } */
    Most of the time, these are just plain text, but strikings can be included here.

Caution

There can be mixed formattings like:
.text-T83{ color:#0563c1; vertical-align:super; font-size:58%;text-decoration:underline; font-weight:bold; }.
These needs to be checked manually.

check for:

  • chains of <em> elements: </em><em>, </em> <em>, </em>&nbsp;<em>,
  • empty <em> elements: <em></em>, <em> </em>, <em>&nbsp;</em>
  • chains of <strong> elements: </strong><strong>, </strong> <strong>, </strong>&nbsp;<strong>
  • empty <strong> elements: <strong></strong>, <strong> </strong>, <strong>&nbsp;</strong>

Apparatus

Inner link spans

  • ...
<span class='text-Internet_20_link'>(.*?)</span>

-->

$1
  • für <a>:
class='text-Internet_20_link'

-->

class='link'

Links to app:

  • ...
<a href='https://edition.anton-webern.ch/edition/complex/(.*?)/report(side:editionInfo)#(.*?)'

-->

<a (click)=\"ref.navigateToReportFragment({complexId: '$1', fragmentId: '$2'})\"

In-text note refs:

  • ...
title='Footnote: |

-->

title='
  • ...
<span class='Footnote_(.*?)_anchor' title='(.*?)'><a href='#ftn(.*?)' id='body_ftn(.*?)'>(.*?)</a></span>

-->

<sup><a id='note-ref-$3' (click)=\"ref.navigateToIntroFragment({complexId: '', fragmentId: 'note-$3'})\" title='$2'>$5</a></sup>

Notes:

  • ...
<p class='paragraph-P6'>(.*?)</p>

-->

<p class='note'>$1</p>
  • ...
<p class='note'><span class='footnodeNumber'><a class='Footnote_20_Symbol' id='ftn(.*?)' href='#body_ftn(.*?)'>(.*?)</a></span>

-->

<p id='note-$1' class='note'><a class='note-backlink' (click)=\"ref.navigateToIntroFragment({complexId: '', fragmentId: 'note-ref-$1'})\">$3</a>
  • ...
id='note-(\d)' class='note'

-->

id='note-$1' class='note note-1-dig'
  • ...
</a>|

-->

</a> | 

Note refs:

  • Anm. 10 / note 10
Anm.\s(\d{1,3})

-->

Anm. <a (click)=\"ref.navigateToIntroFragment({complexId: '', fragmentId: 'note-$1'})\">$1</a>

bzw.

note <a (click)=\"ref.navigateToIntroFragment({complexId: '', fragmentId: 'note-$1'})\">$1</a>

Glyphs

  • [a], [bb], [mf] etc.
[a]

-->

<span class='glyph'>{{ref.getGlyph('[a]')}}</span>

Paragraphs

  • Remove blank lines
  • Remove empty paragraphs: <p class='paragraph-P2'> </p>
  • Remove comments: <!--Next 'div' was a 'text:p'.-->
  • change div to p:
    <div class='paragraph-P(\d)'>(.*?)</div> --> <p class='paragraph-P$1'>$2</p>
  • Replace paragraph classes with correct classes: no-indent, small
<p class='paragraph-P8'>(.*?)</p>

-->

<p class='no-indent spacebreak'>$1</p>
  • Add class spacebreak to those paragraphs that start after a blank line

check for:

  • blank space at the end of lines: </span></p>, </span>, </p>
@musicEnfanthen musicEnfanthen changed the title Intro replacements [EDITION] Intro replacements Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant