IUBLibTech / newton_chymistry

New version of 'The Chymistry of Isaac Newton', using XProc pipelines to generate a website based on TEI XML encodings of Newton's alchemical manuscripts, and Apache Solr as a search engine.
2 stars 0 forks source link

Rendering for @rend="ti-X" not working for certain elements #128

Open aewingate opened 11 months ago

aewingate commented 11 months ago

The encoding guidelines state that encoders should be able to use rend="ti-X" where X = values from 1 to 10 to indicate the number of ems an indent has (see encoding guidelines here).

This appears to work for <head> and <p>. But some manuscripts are using it for <hi> and it's not working. I've used XQuery to figure out all the elements that use this attribute and these are:

It would be great if we could get the indenting to work for all elements, and also if I could have a list of the elements this rendering should work with so I can add that to the encoding guidelines.

aewingate commented 11 months ago

Also, here's a list of the files that have elements that use this rendering and what elements it's applied to:

<mssSet xmlns="http://www.tei-c.org/ns/1.0">
   <ms>
      <id>ALCH00006</id>
      <attr>head p</attr>
   </ms>
   <ms>
      <id>ALCH00024</id>
      <attr>head</attr>
   </ms>
   <ms>
      <id>ALCH00052</id>
      <attr>head</attr>
   </ms>
   <ms>
      <id>ALCH00061</id>
      <attr>head</attr>
   </ms>
   <ms>
      <id>ALCH00062</id>
      <attr>head</attr>
   </ms>
   <ms>
      <id>ALCH00063.06</id>
      <attr>head hi</attr>
   </ms>
   <ms>
      <id>ALCH00063.09</id>
      <attr>p head item</attr>
   </ms>
   <ms>
      <id>ALCH00063.11</id>
      <attr>head p item</attr>
   </ms>
   <ms>
      <id>ALCH00063</id>
      <attr>head hi p item</attr>
   </ms>
   <ms>
      <id>ALCH00064</id>
      <attr>head</attr>
   </ms>
   <ms>
      <id>ALCH00065</id>
      <attr>head</attr>
   </ms>
   <ms>
      <id>ALCH00072</id>
      <attr>head</attr>
   </ms>
   <ms>
      <id>ALCH00075</id>
      <attr>head</attr>
   </ms>
   <ms>
      <id>ALCH00078</id>
      <attr>p</attr>
   </ms>
   <ms>
      <id>ALCH00089</id>
      <attr>head</attr>
   </ms>
   <ms>
      <id>ALCH00093</id>
      <attr>hi</attr>
   </ms>
   <ms>
      <id>ALCH00094</id>
      <attr>head hi</attr>
   </ms>
   <ms>
      <id>ALCH00096</id>
      <attr>hi</attr>
   </ms>
   <ms>
      <id>ALCH00097</id>
      <attr>hi</attr>
   </ms>
   <ms>
      <id>ALCH00099</id>
      <attr>item p</attr>
   </ms>
   <ms>
      <id>ALCH00100</id>
      <attr>item</attr>
   </ms>
   <ms>
      <id>ALCH00112</id>
      <attr>l</attr>
   </ms>
   <ms>
      <id>ALCH00124</id>
      <attr>hi</attr>
   </ms>
   <ms>
      <id>ALCH00136</id>
      <attr>item hi</attr>
   </ms>
   <ms>
      <id>ALCH00200</id>
      <attr>item</attr>
   </ms>
   <ms>
      <id>ALCH00201</id>
      <attr>item div</attr>
   </ms>
</mssSet>
tubesoft commented 11 months ago

According to the CSS code, it should work from ti--1 to ti-10. I will investigate what is going on.

tubesoft commented 11 months ago

One thing that I found is that the indentation is not applied if the element is inline. For example, <hi> goes inline instead of forming a block in html. If the part is inline, adding an indent to it does not make sense. On the other hand, <p> and <item> forms a block in html, which enables us to add indentation. This is how html works, so it's not something we can change.