Math Research Paper Formatter

Math Research Paper Formatter

Structure and format your paper with LaTeX support.

Use LaTeX syntax for mathematical notation. Inline math with $...$ and display math with $$...$$.

${data.conclusion}

References

${data.references}

`; // Render LaTeX math renderMathInElement(reviewOutput, { delimiters: [ {left: '$$', right: '$$', display: true}, {left: '$', right: '$', display: false} ] }); }; const getPaperData = () => { return { title: document.getElementById('paper-title').value.trim() || 'Untitled Paper', author: document.getElementById('paper-author').value.trim() || 'Anonymous', abstract: document.getElementById('paper-abstract').value.trim() || 'No abstract.', introduction: document.getElementById('paper-introduction').value.trim() || 'No introduction.', body: document.getElementById('paper-body').value.trim() || 'No content.', conclusion: document.getElementById('paper-conclusion').value.trim() || 'No conclusion.', references: document.getElementById('paper-references').value.trim() || 'No references.' }; }; tabs.forEach(tab => { tab.addEventListener('click', () => { currentTabIndex = tabIds.indexOf(tab.dataset.tab); updateTabs(); }); }); prevButton.addEventListener('click', () => { if (currentTabIndex > 0) { currentTabIndex--; updateTabs(); } }); nextButton.addEventListener('click', () => { if (currentTabIndex < tabIds.length - 1) { currentTabIndex++; updateTabs(); } }); downloadPdfButton.addEventListener('click', () => { downloadPdfButton.textContent = 'Generating PDF...'; downloadPdfButton.disabled = true; const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'p', unit: 'pt', format: 'a4' }); // Use the html2canvas-powered .html() method pdf.html(reviewOutput, { callback: function (pdf) { const pageCount = pdf.internal.getNumberOfPages(); // Add page numbers for (let i = 1; i <= pageCount; i++) { pdf.setPage(i); pdf.setFontSize(10); pdf.setTextColor(150); pdf.text('Page ' + i + ' of ' + pageCount, pdf.internal.pageSize.getWidth() / 2, pdf.internal.pageSize.getHeight() - 15, { align: 'center' }); } pdf.save('Math-Research-Paper.pdf'); downloadPdfButton.textContent = 'Download Paper as PDF'; downloadPdfButton.disabled = false; }, x: 15, y: 15, width: 565, // A4 width in points is 595, minus margins windowWidth: reviewOutput.scrollWidth }); }); updateTabs(); });
Scroll to Top