View Single Post
Old 09-24-2009, 11:19 AM   #80
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by Jellby View Post
How would you know the "correct" output is :

Code:
This \textit{is} \textbf{\textit{in}deed} a strange idea!
and not:

Code:
This \textit{is \textbf{in}}\textbf{deed} a strange idea!
?

Of course, the real output, after a LaTeX run, would be indistinguishable. (Note that whether the whitespace must be italic or not may be debatable, but you should probably keep whatever was in the input file)
Hmmm... spaces should only remain "formatted" if both the previous and the next character is formatted exactly the same way. (This is taken care of by a formatting normalization plugin... and I failed to indicate this in my much simplified code.)

My example was therefore incorrect. But the same problem exists with this slight modification that is legal/plausible within the framework of pacify.

Code:

T  h  i  s     i  s     i  n  d  e  e  d     a     s  t  r  a  n  g  e     i  d  e  a  !  
-- -- -- -- -- -I -I -I -I BI BI B- B- B- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Quote:
Originally Posted by Jellby View Post
I don't know what would be the "canonical" way of dealing with this, but I'd say you'll have to check proper nesting when generating LaTeX code: Whenever a feature is deactivated, check if it's the innermost feature (the last one to have been activated; if it is, close the brace, if it isn't, close the the inner features' braces, close the brace, and open the inner features again.
I might give this a try first actually. Thanks, Jellby.

- Ahi

Last edited by ahi; 09-24-2009 at 11:36 AM.
ahi is offline   Reply With Quote