Open Splines opened 1 month ago
It seems to me that setting the default Temp folder and load file path (as in #66) effectively implement this, apart from two differences:
1) the default Temp folder and file path are the same for all PowerPoint presentations, instead of depending on the presentation
2) one needs to click on New LaTeX Display
then "Load File & Generate" (2 clicks) instead of having a dedicated button
Arguably, one typically works on a single presentation for a while, so it's not so bad to change the defaults once, and I'm thus not inclined to fix 1). It's also not clear how to save this setting "per .pptx" (or it would have to be a default inferred from the .pptx name). Re: 2), I'm also not sure it's a mainstream enough feature to expose a button to all users. I guess I could make it into a Macro without a button, which could be added to the Quick Access Toolbar (on Windows only for now, unfortunately).
1) Yeah, that's not so important to me either. As you said: typically, one "works on a single presentation for a while". Just being able to set a global default path is great.
2) That macro on Windows would be much appreciated ;) Then my workflow would literally be: change something in your favorite LaTeX editor and use one single shortcut to insert it in PowerPoint, that'd be blazing fast.
Please try this version: IguanaTex_v1_61_1_20240731.zip The macro is called "LoadDefaultFileAndGenerate".
Hmm, I realize this isn't going to work because the macros only show up when the .pptm is open🤦♂️ So there has to be a button in the ribbon if we want this to be feasible...
Alright, here is a version with a dedicated button: IguanaTex_v1_62.zip Please let me know how it works.
Thank you, works great and exactly what I needed!
The error when an invalid file path is set and you click on Generate from default .tex file
is currently:
You need to set an existing LaTeX file as Default file path using "Make Default" in the Editor Window's "Read from file" pane.
Suggestions:
It seems to me that setting the default Temp folder and load file path (as in https://github.com/Jonathan-LeRoux/IguanaTex/issues/66) effectively implement this, apart from two differences: [...]
I think a third difference is that relative imports in the default file are not correctly resolved, e.g. \input{preamble}
(where preamble.tex
is sitting right next to the default file) will lead to the LaTeX error "File not found".
By the way: I see the "Error in LaTeX Code" popup and once I close it, I get the following error by Microsoft Visual Basic in PowerPoint:
Run-time error '2110':
Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.
This only happens with the new Load File & Generate
button, not with the Load File
button.
Thanks for these comments, they should be addressed in this version: IguanaTex_v1_62_20240801.zip Regarding the preamble, the Temp folder would have to be the folder where the default file is. I'll have to explain that somewhere.
I am aware that there is the
Open in external editor
command. However, consider the following workflow I'd like to use:main.tex
file.main.pptx.tex
file next to themain.tex
file where I remove all the\input{}
commands to my sections and stuff liketableofcontents
. In the end, I might have something like the following left. Note that the\input{preamble}
refers to the filepreamble.tex
file residing next to themain.tex
file.main.pptx.tex
file as default file path in IguanaTex (also see issue #66). Ideally, I wouldn't even have to click onLoad File
. Instead, I could just have one shortcut, to read this files content and insert it as shape in PowerPoint. This way, I could quickly paste parts of my already existing LaTeX project into thismain.pptx.tex
file and use all the packages already defined in the preamble.Challenges/Wishes
\input{preamble}
are correctly resolved.main.pptx.tex
as default when generating (see issue #66).Load File
.