Skip to content

Commit

Permalink
Merge pull request #231 from mgreminger/latex-export
Browse files Browse the repository at this point in the history
feat: latex export
  • Loading branch information
mgreminger authored Jan 20, 2024
2 parents 65ed189 + 80680c9 commit 46e7c5d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
const apiUrl = window.location.origin;
const currentVersion = 20240110;
const currentVersion = 20240120;
const tutorialHash = "fFjTsnFoSQMLwcvteVoNtL";
const termsVersion = 20240110;
Expand Down Expand Up @@ -1738,7 +1738,7 @@ Please include a link to this sheet in the email to assist in debugging the prob
return markdown;
}
async function getDocument(docType: "docx" | "pdf" | "md", getShareableLink = false) {
async function getDocument(docType: "docx" | "pdf" | "md" | "tex", getShareableLink = false) {
const markDown = "<!-- Created with EngineeringPaper.xyz -->\n" + await getMarkdown(getShareableLink);
const upload_blob = new Blob([markDown], {type: "text/markdown"});
Expand Down
7 changes: 4 additions & 3 deletions src/DownloadDocumentModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
export let open = true;
const dispatch = createEventDispatcher<{
downloadDocument: {docType: "docx" | "pdf" | "md", getShareableLink: boolean};
downloadDocument: {docType: "docx" | "pdf" | "md" | "tex", getShareableLink: boolean};
downloadSheet: null;
}>();
let docType: "epxyz" | "docx" | "pdf" | "md" = "epxyz";
let docType: "epxyz" | "docx" | "pdf" | "md" | "tex" = "epxyz";
let getShareableLink = false;
async function handleSave() {
Expand Down Expand Up @@ -56,11 +56,12 @@
<RadioButton labelText="Markdown File (no data leaves your computer)" value="md" />
<RadioButton labelText="Microsoft Word .docx File (processed on the EngineeringPaper.xyz server, no data is retained on the server)" value="docx" />
<RadioButton labelText="PDF File (processed on the EngineeringPaper.xyz server, no data is retained on the server)" value="pdf" />
<RadioButton labelText="LaTeX File (images and plots are not included, processed on the EngineeringPaper.xyz server, no data is retained on the server)" value="tex" />
</RadioButtonGroup>
<div>
<div class="bx--label">Shareable Link</div>
<Checkbox
labelText="Create a shareable link and add it to the generated document (only applies to md, docx, and pdf files, anyone with this private link will be able to view your original sheet)"
labelText="Create a shareable link and add it to the generated document (only applies to md, docx, pdf, and tex files, anyone with this private link will be able to view your original sheet)"
bind:checked={getShareableLink}
disabled={docType === "epxyz"}
/>
Expand Down
10 changes: 10 additions & 0 deletions src/Updates.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
}
</style>

<em>January 20, 2024</em>
<h4>LaTeX Export</h4>
<p>
In addition to the Microsoft Word and PDF export options, your sheet can now also be exported as a
LaTeX document. Note that images and plots cannot be included when using the LaTeX export
option.
</p>

<br>

<em>January 10, 2024</em>
<h4>Microsoft Word, PDF, and Markdown Export</h4>
<p>
Expand Down

0 comments on commit 46e7c5d

Please sign in to comment.