Discussion:
[OS X TeX] [OFF] Printing MathJax/StackExchange?
David Craig
2018-10-30 20:02:54 UTC
Permalink
I know this is off-topic, but since it’s math-, font-, and TeX-related, I figured this crowd would be about as good as it gets.

Occasionally I’d like to be able to print answers from stackexchange, either on paper or direct to pdf. The results I get, from every browser I’ve tried (oops, up to now… see below), are incredibly poor. I will leave aside the weird way things print from stackexchange directly, since there is http://www.stackprinter.com/, presumably created to deal with the aforementioned annoyance. In either case, the answers are rendered in MathJax, but when I print, especially the greek characters are converted to something else, and the result is typically useless, or close to it. For example, here is a question and its stackprinter-rendered equivalent:

<https://physics.stackexchange.com/questions/18078/>
<http://www.stackprinter.com/export?question=18078&service=physics.stackexchange>

They render just fine on-sxreen, but when I print, from Chrome or Safari, either to paper or to pdf, I get this:

<http://physics.oregonstate.edu/~craigda/tmp/physics-18078.pdf>

I’m not sure why/where the font substitution is occurring, but it seems to be at the system level since I get the same result from Safari and Chrome.

Curiously, I just discovered that I do NOT get the same result from Firefox (which I rarely use), which prints to pdf as rendered on the screen. So that’s a good clue … for someone else, since I don’t know how these things work under the hood. Is this a webkit issue, since Firefox doesn’t use webkit?

I would appreciate some help in diagnosing/fixing this so I can print the stackprinter results in a useful form, preferably from Chrome. (At least in asking the question I discovered a work-around! I’d still like to understand the underlying issue and not be forced to use Firefox if I can avoid it however.)

Thanks,
David Craig
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.
Ross Moore
2018-10-30 21:36:25 UTC
Permalink
Hello David,

On 31 Oct 2018, at 7:02 am, David Craig <***@panix.com<mailto:***@panix.com>> wrote:

I know this is off-topic, but since it’s math-, font-, and TeX-related, I figured this crowd would be about as good as it gets.

Occasionally I’d like to be able to print answers from stackexchange, either on paper or direct to pdf. The results I get, from every browser I’ve tried (oops, up to now
 see below), are incredibly poor. I will leave aside the weird way things print from stackexchange directly, since there is http://www.stackprinter.com/<https://protect-au.mimecast.com/s/uyg_C91W8rCzAR6jsqp_M9?domain=stackprinter.com>, presumably created to deal with the aforementioned annoyance. In either case, the answers are rendered in MathJax, but when I print, especially the greek characters are converted to something else, and the result is typically useless, or close to it. For example, here is a question and its stackprinter-rendered equivalent:

<https://physics.stackexchange.com/questions/18078/<https://protect-au.mimecast.com/s/ty7NC0YKgRskQJ9zuqjzMO?domain=physics.stackexchange.com>>
<http://www.stackprinter.com/export?question=18078&service=physics.stackexchange<https://protect-au.mimecast.com/s/4k9FCgZ05JfqKPjJhk_qA1?domain=stackprinter.com>>

They render just fine on-sxreen, but when I print, from Chrome or Safari, either to paper or to pdf, I get this:

<http://physics.oregonstate.edu/~craigda/tmp/physics-18078.pdf<https://protect-au.mimecast.com/s/I6SbCjZ12RfYDlw0upYbuC?domain=physics.oregonstate.edu>>

Are you saying that both the above links print badly?
The stackprinter.com<http://stackprinter.com> page prints to PDF just fine for me, using Safari on MacOS 10.13.6 .


Unfortunately physics.stackexchange.com<http://physics.stackexchange.com> is playing up badly at the moment,
so I cannot try that one.


I’m not sure why/where the font substitution is occurring, but it seems to be at the system level since I get the same result from Safari and Chrome.

Curiously, I just discovered that I do NOT get the same result from Firefox (which I rarely use), which prints to pdf as rendered on the screen. So that’s a good clue 
 for someone else, since I don’t know how these things work under the hood. Is this a webkit issue, since Firefox doesn’t use webkit?

I would appreciate some help in diagnosing/fixing this so I can print the stackprinter results in a useful form, preferably from Chrome. (At least in asking the question I discovered a work-around! I’d still like to understand the underlying issue and not be forced to use Firefox if I can avoid it however.)

Thanks,
David Craig


Hope this helps.

Ross


Dr Ross Moore
Mathematics Dept | 12 Wally’s Walk, 734
Macquarie University, NSW 2109, Australia
T: +61 2 9850 8955 | F: +61 2 9850 8114
M:+61 407 288 255 | E: ***@mq.edu.au<mailto:***@mq.edu.au>

http://www.maths.mq.edu.au

<http://mq.edu.au/>
[cid:c2a36353-3def-487d-978e-***@ausprd01.prod.outlook.com]


CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.

This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University. <http://mq.edu.au/>
<http://mq.edu.au/>
David Craig
2018-10-31 06:23:33 UTC
Permalink
Post by Ross Moore
Post by David Craig
<https://physics.stackexchange.com/questions/18078/>
<http://www.stackprinter.com/export?question=18078&service=physics.stackexchange>
<http://physics.oregonstate.edu/~craigda/tmp/physics-18078.pdf>
Are you saying that both the above links print badly?
The linked pdf (which is clearly messed up) is the result of printing to pdf the stackprinter link, yes.
Post by Ross Moore
The stackprinter.com page prints to PDF just fine for me, using Safari on MacOS 10.13.6 .
Hmm… not sure what to make of that.

David Craig


<http://www.panix.com/~dac/>

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.e

Stefan Evert
2018-10-30 21:40:38 UTC
Permalink
Post by David Craig
Curiously, I just discovered that I do NOT get the same result from Firefox (which I rarely use), which prints to pdf as rendered on the screen. So that’s a good clue … for someone else, since I don’t know how these things work under the hood. Is this a webkit issue, since Firefox doesn’t use webkit?
Works for me in Safari 12.0 (MacOS 10.13.6).

My PDF looks like the Web page from stackprinter.com (can't see the original since I only get an error message at that URL). Your PDF only seems to differ in that the Greek superscripts in the first equation are broken.

Which version of Safari do you use?

And, of course: Have you turned it off and on again? At least in earlier OS versions, the font cache sometimes got corrupted and would fail to render certain characters properly until the next reboot.

Best,
Stefan
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-
Loading...