mathb icon indicating copy to clipboard operation
mathb copied to clipboard

Behave nicely when printing the page and provide a print preview

Open kieranclancy opened this issue 11 years ago • 3 comments

Currently when printing the page, you get all the MathB.in header/footer as well as two columns, one with code and one with the math content.

I think it would be nice if only the math content were printed. In other words, if you could get something similar to what you would get if you ran LaTeX over the document and printed the result.

kieranclancy avatar Feb 28 '14 04:02 kieranclancy

Oh, and I forgot to mention: It would be nice if there were a 'Print preview' button which would hide all the content on the page and just let you focus on the math content.

kieranclancy avatar Feb 28 '14 04:02 kieranclancy

Quick and dirty (irreversible without refreshing).

document.body.innerHTML=document.getElementById('outputCode').innerHTML;

chid avatar Feb 28 '14 07:02 chid

Alternatively with CSS, (nice and reversible). (could use this as a print style)

Do you want me to write this as a pull request?

.output {
   width:80% !important;
   margin-left: auto !important; 
   margin-right: auto !important;
   float: none !important;
}

#footerPanel, #headerPanel, .input {display:none}

chid avatar Feb 28 '14 07:02 chid

This has been resolved in commit fcf3e96. To see an example of the print preview, go to https://mathb.in/1 and select File > Print from the web browser menu. The print preview should not display header, footer, and the form elements anymore. Instead, it should display only the rendered content now.

susam avatar Oct 08 '22 00:10 susam