chebfun / ATAP

MATLAB M-files for _Approximation Theory and Approximation Practice_
10 stars 2 forks source link

Chapter 12 doesn't publish() correctly. #2

Open aaustin141 opened 9 years ago

aaustin141 commented 9 years ago

When I use publish to render ATAP chapter 12 as an HTML document, large swathes of the text are completely missing from the output (though the call to publish does not crash). Here are the first two paragraphs I get:

The explorations of the last chapter are glimmerings of potential theory in the complex plane, a subject that has been connected with approximation of functions since the work of Walsh early in the 20th century [Walsh 1969]. In this chapter we shall outline this connection. Potential theory in the complex plane is presented in [Ransford 1995] and [Finkelshtein 2006], and a survey of applications in approximation theory can be found in [Levin & Saff 2006].

This discussion has gone by speedily, and the reader may have to study these matters several times to appreciate how naturally ideas associated with electric charges connect with the accuracy of polynomial approximations. Potential theory is also of central importance in the study of approximation by rational functions; see [Levin & Saff 2006] and [Stahl & Schmelzer 2009].

That is, publish gets the first paragraph and then skips all of the mathematics that form the core of the chapter. The discussion has gone by speedily, indeed.

There may not be anything we can do about this, and if so, I'm happy for this issue to be closed. If we could do something about it though, it might not be a bad idea.

nickhale commented 9 years ago

From here:

Note: When you insert text markup for LaTeX code, that code publishes only when the specified output file format is LaTeX.

so I guess we're stuck with this.

In addition, I get the following errors when I attempt to publish to html (in R2014b):

Warning: Error updating Text. Following is the chain of causes of the error:

 String must have valid interpreter syntax:
$$ z = \phi(s) = {1\over 2} (s + i \sqrt{1-s^2}\kern 1pt), \eqno (12.12) $$

> In defaulterrorcallback at 12
  In /usr/local/MATLAB/R2014b/toolbox/matlab/graphics/private/alternatePrintPath.p>alternatePrintPath at 64
  In print at 215
  In /usr/local/MATLAB/R2014b/toolbox/matlab/codetools/private/snapTex.p>snapTex at 15
  In publish>renderTex at 830
  In publish>createEquationImages at 742
  In publish at 160
  In mdbpublish at 55 
Warning: Error updating Text. Following is the chain of causes of the error:

 String must have valid interpreter syntax:
$$ u(s) = \log |s+i\sqrt{1-s^2}\kern 1pt| - \log 2, \eqno (12.13) $$

> In defaulterrorcallback at 12
  In /usr/local/MATLAB/R2014b/toolbox/matlab/graphics/private/alternatePrintPath.p>alternatePrintPath at 64
  In print at 215
  In /usr/local/MATLAB/R2014b/toolbox/matlab/codetools/private/snapTex.p>snapTex at 15
  In publish>renderTex at 830
  In publish>createEquationImages at 742
  In publish at 160
  In mdbpublish at 55 

I think this is a consequence of the way publish attempts to interpret $$ after line breaks. It can be fixed by changing $$ to \[ and \].

aaustin141 commented 9 years ago

From here:

Note: When you insert text markup for LaTeX code, that code publishes only when the specified output file format is LaTeX.

so I guess we're stuck with this.

Fair enough. Not much we can do about that. Consider the initial issue resolved.

That said, I won't close this just yet, since I'm getting the same warnings you are when publishing to HTML under R2014b. I bet there are other chapters that have this problem, too.