document.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. export function mockDocument(text: string) {
  2. return {
  3. doc_id: 'story-doc',
  4. getSnapshot: () => text,
  5. hasBufferedOps: () => false,
  6. }
  7. }
  8. export const document = {
  9. tex: `\\documentclass{article}
  10. % Language setting
  11. % Replace \`english' with e.g. \`spanish' to change the document language
  12. \\usepackage[english]{babel}
  13. % Set page size and margins
  14. % Replace \`letterpaper' with\`a4paper' for UK/EU standard size
  15. \\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
  16. % Useful packages
  17. \\usepackage{amsmath}
  18. \\usepackage{graphicx}
  19. \\usepackage[colorlinks=true, allcolors=blue]{hyperref}
  20. \\title{Your Paper}
  21. \\author{You}
  22. \\begin{document}
  23. \\maketitle
  24. \\begin{abstract}
  25. Your abstract.
  26. \\end{abstract}
  27. \\section{Introduction}
  28. Your introduction goes here! Simply start writing your document and use the Recompile button to view the updated PDF preview. Examples of commonly used commands and features are listed below, to help you get started.
  29. Once you're familiar with the editor, you can find various project setting in the Overleaf menu, accessed via the button in the very top left of the editor. To view tutorials, user guides, and further documentation, please visit our \\href{https://www.overleaf.com/learn}{help library}, or head to our plans page to \\href{https://www.overleaf.com/user/subscription/plans}{choose your plan}.`,
  30. }