On 30/09/2022 20:29, T.V Raman wrote:
9. Note that this is not the end of the trail; for such exports to
make a difference to the end-user, user-facing tools still need to
know "how" to leverage these facilities.
Do you mean that there are no tools yet that may take advantage of math
expressions embedded into PDF as LaTeX source markup? I am just trying
to figure out current state of affairs. I suppose, it is unlikely that
someone from Org mailing list subscribers is ready to invest significant
amount of time into development of LaTeX packages. However if there were
ready to use and safe packages improving accessibility then changing
export templates would be more real goal.
In the meanwhile I have realized that \usepackage{mmap} has a little use
in isolation. Fractions, indices, etc. are lost. Maybe some other
packages should be loaded to provide more informative text equivalent
for math.
Some details concerning what I have tried is below.
Original LaTeX expression:
Text \[ \int_{\alpha}^{\beta} \frac{dx}{x^2 + \varepsilon} \]
pdftotext -layout output for \usepackage{mmap}:
Text \int \beta
dx
\alpha x2 + \varepsilon
end of output
pdftotext output for \usepackage{cmap} and \usepackage[noTeX]{mmap}:
Text ∫︁ 𝛽
𝑑𝑥
𝛼 𝑥2 + 𝜀
end of output
pdftotext output when neither cmap nor mmap is loaded:
Text Z β
dx
α x2 + ε
end of output
For this dumb example effect of mmap is hardly noticeable. Integral
symbol is not replaced by "Z", but it is hard to guess sub- and
superscripts and presence of the \frac command. Without "-layout" order
of symbols is mostly preserved, but structure is lost
Text
∫︁
𝛽
𝛼
𝑑𝑥
𝑥2 + 𝜀