Skip to content

Commit

Permalink
🤖 Add resizebox for LaTeX conversion (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 authored May 27, 2023
1 parent bb019ae commit 1a8040e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/sweet-bananas-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tex-to-myst': patch
---

Add resizebox macro as a pass through
4 changes: 4 additions & 0 deletions packages/tex-to-myst/src/tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ export const TABLE_HANDLERS: Record<string, Handler> = {
state.closeNode();
});
},
macro_resizebox(node, state) {
const lastArg = getArguments(node, 'group').pop();
if (lastArg) state.renderChildren(lastArg);
},
env_adjustbox(node, state) {
state.renderChildren(node);
},
Expand Down
1 change: 1 addition & 0 deletions packages/tex-to-myst/src/tex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const macros: Record<string, number> = {
tabularx: 2,
supertabular: 1,
adjustbox: 1,
resizebox: 2,
captionof: 2,
// SI Units: https://texdoc.org/serve/siunitx/0
SI: 2,
Expand Down

0 comments on commit 1a8040e

Please sign in to comment.