Live data from Hacker News

The sad state of PDF-Accessibility of LaTex Documents (2016)

umij.wordpress.com

61–70 of 75 posts

Re: The sad state of PDF-Accessibility of LaTex Documents (2016)

#61
post #60
post #59

Earlier quoted context omitted.

I literally don't understand what the hell you are talking about. But this has nothing to do with constructivism. Even if you only allow constructive definitions and proofs, there is still the world of a difference between the definition of an integral and the result you get from evaluating it. Yeah, sure, in theory you can represent an integral as a function that takes another function and two boundary points and re…

>So yeah, here's where I get the feeling that some people should do some more maths and spend good parts of their days proving theorems and playing with definitions before they start complaining about how dumb its language is. Some people have a PhD in mathematical physics and wrote the higher function code of axiom. I guess those people would be difficult to understand for non-experts.

Ok, I misjudged your experience apparently, but you could still do a better job actually engaging with the arguments.

Re: The sad state of PDF-Accessibility of LaTex Documents (2016)

#62
post #54
post #48

The thing is: LaTeX might try hard to look like a declarative language for structured documents, but it is not. It is a set of TeX macros. And TeX is a type setting system. There is no good reason to put the accessibility into the type setting. Instead, use a declarative (e.g., any markup) language, translate that a) to (LaTeX) and b) to accessibility annotations and then combine the two results. Problem solved. Unfo…

Why not simply augment LaTex with PDF tags which would be inserted manually, in the process of typesetting? Something like: \pdftag{blah} Common packages could then generate these tags, and very few modifications of TeX source would be needed.

Yeah, one could do that. But then again, one could do that with any other scripting language. A true declarative document would mean a single source of truth and freedom from those technical matters.

Re: The sad state of PDF-Accessibility of LaTex Documents (2016)

#63
post #18

Earlier quoted context omitted.

Firefox has had MathML support for a long time. Complain to Apple and Google (and vote with your browsing activity, by using the browser that is less driven by commercial considerations).

Safari has supported MathML since 2011. Though apparently the implementation is somewhat buggy. The real issue is the lack of MathML support by Chrome (and until recently, Edge)

Yes, Chrome had some MathML support but removed it (I think as part of their forking of Blink from WebKit).

Re: The sad state of PDF-Accessibility of LaTex Documents (2016)

#64
post #61
post #60

Earlier quoted context omitted.

>So yeah, here's where I get the feeling that some people should do some more maths and spend good parts of their days proving theorems and playing with definitions before they start complaining about how dumb its language is. Some people have a PhD in mathematical physics and wrote the higher function code of axiom. I guess those people would be difficult to understand for non-experts.

Ok, I misjudged your experience apparently, but you could still do a better job actually engaging with the arguments.

You sound like a third year maths student who has just been taught the Lebesgue integral and has decided that it is the _real_ definition of definite integration. Quite frankly I don't have the energy or inclination to have adversarial arguments with people who don't understand what I'm saying. Maybe talk to your professors about the generalizations of integration and why none of them are the 'real' way to integrate a function.

Also the integral procedure defined at the top isn't a function, it's an operator. It returns functions as results, not values.

Re: The sad state of PDF-Accessibility of LaTex Documents (2016)

#65
post #55
post #44

Earlier quoted context omitted.

> In particular, you definition of integral assumes that integrable functions always have an antiderivative, which is wrong. I was objecting at the same time as you were, but I don't think this is the right objection. It's true that not every integrable function has an elementary anti-derivative, but every integrable function f does have an anti-derivative F, at least in the sense that F is almost everywhere differen…

If you say "at least in the sense that F is almost everywhere differentiable", you're already redefining "anti-derivative" to some extent, I feel. But this is just arguing over semantics. Even then, I think your claim that every integrable function has a "generalized antiderivative" is also only true for the Riemann integral. The Dirichlet function is Lebesgue integrable, but it doesn't have an antiderivative even in…

> If you say "at least in the sense that F is almost everywhere differentiable", you're already redefining "anti-derivative" to some extent, I feel. But this is just arguing over semantics.

It is, but let's! Before we re-define the anti-derivative, we'd have to define it. A sensible definition is: a function F is an anti-derivative of a function f if F is everywhere differentiable, and if F' = f everywhere. By this definition, not every integrable function has an anti-derivative.

On the other hand, we could also just choose to define—not re-define!—an anti-derivative of f to be a function F that is almost everywhere differentiable, and such that F' = f almost everywhere. This definition is more complicated, but also more inclusive; and it handles everything the old definition could.

In this respect it is, and it's no accident, exactly like the Lebesgue integral vis a vis the Riemann integral. Lebesgue's integral has a more complicated definition than Riemann's, and we could call it a re-definition; but, since it handles everything that Riemann's does (with the same answer), we could say in retrospect that Lebesgue's was the correct definition, and Riemann's was just the special case we happened to discover first.

> I think the more important insight here is that integration fundamentally isn't defined through the anti-derivative, and that the two notions are actually related is a deep theorem, rather than just a definition.

Certainly I agree with this!

> And the fact that non-elementary antiderivatives exist is interesting in theory, but in practice you can't use them directly for anything. In particular, in practical situations you will often use numerical methods to integrate a function which will not be based on any notion of anti-derivative at all.

Here again I'd argue over semantics, though I'd concede it's much more a matter of personal preference than my argument above, which I think has mathematical weight behind it. Namely, I'd argue that the numerical integration is doing something directly with the non-elementary anti-derivative, namely, evaluating it at a point—just like we call reading off the value of, say, the sine of an angle from our calculator doing something directly with the sine, even though what we're really doing is summing sufficiently many terms in a Taylor-series approximation.

> [^1] Edit: I think I was wrong here. If you take the function identically zero, then its derivative is identically zero and as such equal to the Dirichlet function almost everywhere. So this is not a counterexample. I still think it's weird to call than an "antiderivative" though.

I agree that it's not a counterexample for the reason you say, and there's no arguing with perceptions of something being weird; it certainly is counter to intuition built out of Riemann integrals. And yet, if we didn't steel ourselves to handle this weirdness, we'd have to say that it didn't have an anti-derivative at all; and why artificially restrict our theorems to match our intuition, rather than expanding our intuition to meet our theorems?

Re: The sad state of PDF-Accessibility of LaTex Documents (2016)

#66
post #65
post #55

Earlier quoted context omitted.

If you say "at least in the sense that F is almost everywhere differentiable", you're already redefining "anti-derivative" to some extent, I feel. But this is just arguing over semantics. Even then, I think your claim that every integrable function has a "generalized antiderivative" is also only true for the Riemann integral. The Dirichlet function is Lebesgue integrable, but it doesn't have an antiderivative even in…

> If you say "at least in the sense that F is almost everywhere differentiable", you're already redefining "anti-derivative" to some extent, I feel. But this is just arguing over semantics. It is, but let's! Before we re-define the anti-derivative, we'd have to define it. A sensible definition is: a function F is an anti-derivative of a function f if F is everywhere differentiable, and if F' = f everywhere. By this d…

As to your first point: In the sense that it's useful to say "every integrable function f has some antiderivative F so that you may compute the integral by computing F at the endpoints", yes, your definition can be useful. On the other hand, it's also an important question to consider "which functions can be derivatives?" and in that sense, the definition is less useful. But definitions are definitions; the most we could objectively argue about is which one is the more standard one.

> Here again I'd argue over semantics, though I'd concede it's much more a matter of personal preference than my argument above, which I think has mathematical weight behind it. Namely, I'd argue that the numerical integration is doing something directly with the non-elementary anti-derivative, namely, evaluating it at a point—just like we call reading off the value of, say, the sine of an angle from our calculator doing something directly with the sine, even though what we're really doing is summing sufficiently many terms in a Taylor-series approximation.

Fundamentally, at a mathematical level, yes. That's what it means for two definitions to be equivalent. But on an algorithmic level, the process of evaluating an integral numerically and the process of finding an antiderivative (especially symbolically) are quite different things.

But in the end, it doesn't seem that we fundamentally disagree.

Re: The sad state of PDF-Accessibility of LaTex Documents (2016)

#67
post #64
post #61

Earlier quoted context omitted.

Ok, I misjudged your experience apparently, but you could still do a better job actually engaging with the arguments.

You sound like a third year maths student who has just been taught the Lebesgue integral and has decided that it is the _real_ definition of definite integration. Quite frankly I don't have the energy or inclination to have adversarial arguments with people who don't understand what I'm saying. Maybe talk to your professors about the generalizations of integration and why none of them are the 'real' way to integrate…

I don't know lisp so maybe there where more nuances in your code, but often your want to analyse an integral in symbolic terms (for whatever integration definition you are using)

The expression of the integral operator as a function in code is contrary to that with how people usually think about functions and code.

The only language I know that properly manages to represent integrals as code is Wolfram Mathematica by using rich rewrite systems.

That is Integrate(f,a,b) is not code but a data structure to be interpreted by an external (and customizable) integration context that defines numerical types, algorithms, lazyness, etc.

From the links I know of Wolfram Mathematica and lisp this could well be what you meant, but it is quite different from giving a single integration algorithm.

Re: The sad state of PDF-Accessibility of LaTex Documents (2016)

#68
post #55
post #44

Earlier quoted context omitted.

> In particular, you definition of integral assumes that integrable functions always have an antiderivative, which is wrong. I was objecting at the same time as you were, but I don't think this is the right objection. It's true that not every integrable function has an elementary anti-derivative, but every integrable function f does have an anti-derivative F, at least in the sense that F is almost everywhere differen…

If you say "at least in the sense that F is almost everywhere differentiable", you're already redefining "anti-derivative" to some extent, I feel. But this is just arguing over semantics. Even then, I think your claim that every integrable function has a "generalized antiderivative" is also only true for the Riemann integral. The Dirichlet function is Lebesgue integrable, but it doesn't have an antiderivative even in…

My favourite anti-derivatives of the constant zero and Dirichlet function are monotonically increasing.

https://en.wikipedia.org/wiki/Cantor_function

Re: The sad state of PDF-Accessibility of LaTex Documents (2016)

#69

An answer, particularly in the sciences, is to also distribute the source *.tex files, which being plain text with markup, can be handled just fine by things like emacspeak, or accessibility tooling for other sensible editors. This comes up a bit around the blind accessibility issue for mathematics, which is why I suspect it's bubbling up this week on HN.

A friend of mine works with a professor that defines: \be -> \begin{equation}, \ee -> \end{equation}, \ga -> \gamma, \gm -> \gamma, \s -> \section, and so on

Personally I think that latex should produce pdf documents with better mappings so that copy-paste and latex-paragraphs are preserved, even if obviously it will still get messed up in complex layouts

Re: The sad state of PDF-Accessibility of LaTex Documents (2016)

#70
post #67
post #64

Earlier quoted context omitted.

You sound like a third year maths student who has just been taught the Lebesgue integral and has decided that it is the _real_ definition of definite integration. Quite frankly I don't have the energy or inclination to have adversarial arguments with people who don't understand what I'm saying. Maybe talk to your professors about the generalizations of integration and why none of them are the 'real' way to integrate…

I don't know lisp so maybe there where more nuances in your code, but often your want to analyse an integral in symbolic terms (for whatever integration definition you are using) The expression of the integral operator as a function in code is contrary to that with how people usually think about functions and code. The only language I know that properly manages to represent integrals as code is Wolfram Mathematica by…

Many (if not all?) CAS have some internal tree representation of mathematical structures, Mathematica is not the only one. I worked on such a system myself. To define data types for your expressions and then evaluate them via different algorithms is quite natural. So yes, we also used something like Integral(f, from: a, to: b) and then had like a gazillion techniques to actually evaluate that.

Proof assistants do something similar btw, they also encode mathematical expressions as (often recursive) data types and then prove things about those definitions.

edit: to be fair though, the LISP implementation proposed to use the Risch algorithm, which actually does give you symbolic antiderivatives. So that wouldn't be a valid critique of the implementation. There more salient points are a) that the Risch algorithm only works for a certain class of functions (those that have an elementary antiderivative) and b) that by not separating the definition of an integral from its evaluation, you're not able to manipulate it directly as an expression or to evaluate it via different methods (e.g. symbolic vs. numerical methods).

Just think about inputting $complicatedIntegral - $complicatedIntegral. This is clearly zero, but if your integral is "just a function", you're not able to see that and will spend an unreasonable amount of time computing it (twice, even), or worse, will fail to produce a result.

Post reply on HN