Print

Print


On the problem of excess white space and unwanted newlines:
 
The direct translation of your TeX idiom actually works, but it's less
attractive, because the SGML comment delimeters are uglier. So, you
could do something like:
 
      <docImprint><!--
      --><publisher><!--
         --><hi rend=OurLogoType>Our Company's Name Goes Here</hi>
         </publisher>
 
If an element is not declared to have mixed content, whitespace between
elements is ignored, but the rules for ignoring whitespace are painfully
non-obvious in the case of mixed-content (You'll need to spend some time
with the book). You may be able use some TEI modifications to remove
mixed-content from inconvenient places if there aren't too many of them.
 
Another possibility would be to use a TCL script in CoST to remove
multiple whitespace characters (annoying to script) or to trim leading
and trailing spaces.
 
A simple way to do that would be (to fix a variable named content):
 
  regsub -all [ \t]  $content " " content
 
But this would make the kind of long lines that you don't like. You
could justify it afterwards, or simply leave the newlines alone (since
the extra line breaks are probably less distracting than the masses of
extra spaces left by the indenting).  This method may keep some speces
you'd rather not have, but you'll never lose significant space this way.
 
The second approach, something like:
 
   set content [string trim $content " \n\t\r"]
 
would remove leading and trailing whitespace from the values of
variable, but you would then need to modify your TCL scripts to insert
whitespace between tags depending on the markup (and perhaps the
context). I'd guess that you might also need a way to override that
behaviour for some weird special cases (like bold substrings within
non-bold words).
 
David G. Durand