View Single Post
Old 10-18-2020, 07:11 AM   #6
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 955
Karma: 149907
Join Date: Jul 2013
Location: Rotterdam
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Those extra spaces are due to the style-settings.

The xml-code for article aanhaling:
Code:
<ar>
<head><k>aanhaling</k></head><def><blockquote><span> <span><b> <span><u>aa</u></span>nˇhaˇling</b></span> <span> <span>de<sup><i>v</i></sup></span> </span> <span> <span> <span><i>meerv</i></span>: aanhalingen</span>; <span><span><i>verkleinw</i></span>: aanhalinkje</span></span> </span> <span> <span> <span> <span><i>zelfst nw</i></span> </span> <span> <span> <span> <span><b>citaat</b></span> </span> </span> </span> </span> </span></blockquote></def>
</ar>
If you prettify this it reads like:
Code:
<ar>
  <head>
    <k>aanhaling</k>
  </head>
  <def>
    <blockquote>
      <span>
        <span>
          <b>
            <span>
              <u>aa</u>
            </span>nˇhaˇling
          </b>
        </span>
        <span>
          <span>de
            <sup>
              <i>v</i>
            </sup>
          </span>
        </span>
        <span>
          <span>
            <span>
              <i>meerv</i>
            </span>: aanhalingen
          </span>; 
          <span>
            <span>
              <i>verkleinw</i>
            </span>: aanhalinkje
          </span>
        </span>
      </span>
      <span>
        <span>
          <span>
            <span>
              <i>zelfst nw</i>
            </span>
          </span>
          <span>
            <span>
              <span>
                <span>
                  <b>citaat</b>
                </span>
              </span>
            </span>
          </span>
        </span>
      </span>
    </blockquote>
  </def>
</ar>
Apparently, the mobireader app interprets span.span within a blockquotes as lines. The other span-blocks have no further impact. The "ˇ" is just one symbol long.

The pocketbook reader dictionary app interprets each span-block as a text with spacing around it. So additional spans are additional spaces. It also liberally spaces the "ˇ" symbol. (I think it interprets it as a list symbol.) I don't know whether it is possible to tweak the internal styling of the dictionary in pocketbook. It would be nice if the location of its style sheet were known.

Koreader does allow for css-tweaking. I've included a css with the most usual tweaks, that Koreader likes, but for the VanDale it would be nice to include styling that generates a new line after the closing span-tag (</span>) of the second nested span-block within a blockquote.

This would allow for the VanDale to have enumerations such as those for aanhalingsteken to start a new line. I'll look into that.
Prettified article xml for aanhalingsteken:
Code:
<ar>
  <head>
    <k>aanhalingsteken</k>
  </head>
  <def>
    <blockquote>
      <span>
        <span>
          <b>
            <span>
              <u>aa</u>
            </span>nˇhaˇlingsˇteˇken
          </b>
        </span>
        <span>
          <span>het</span>
        </span>
      </span>
      <span>
        <span>
          <span>
            <span>
              <i>zelfst nw</i>
            </span>
          </span>
          <span>
            <span>
              <span>
                <b>1. </b>
              </span>
              <span>
                <span>elk van beide leestekens die dienen om geciteerde woorden van die van de schrijver zelf te onderscheiden, of die aangeven dat de gemarkeerde woorden niet letterlijk opgevat dienen te worden</span>
              </span>
              <span>
                <blockquote align="left">
                  <span>
                    <b>• </b>
                  </span>
                  <span>
                    <i>
                      <span>
                        <b>tussen</b>
                      </span> aanhalingstekens
                    </i>
                  </span> | 
                  <span>om aan te geven dat de spreker een andere mening heeft</span>
                </blockquote>
              </span>
            </span>
            <span>
              <span>
                <b>2. </b>
              </span>
              <span>
                <span>
                  <span>
                    <b>teken</b>
                  </span> dat dient om een woord of getal op een lagere plaats in dezelfde kolom te herhalen
                </span>
              </span>
            </span>
          </span>
        </span>
      </span>
    </blockquote>
  </def>
</ar>
Apparently, the css-style should be:
Code:
blockquote.span.span {display:block}
or
Code:
blockquote.span.span::after{content: '\A'; white-space: pre;}
However, both don't seem to work. Even tried changing '\A' to '\n' and to '&#xD' ';' (I've separated them, because the forum editor converts it to a newline. )

Last edited by Markismus; 10-18-2020 at 07:33 AM.
Markismus is offline   Reply With Quote