Closed rcalvo12 closed 1 year ago
My proposed solution: make it so that the copy and the handout are produced in the location of the original lyx file so that the relative pathways will always lead to the same place. We will still remove the copy and move the handout at the end of the process.
@rcalvo12 the solution you propose sounds good to me. For an original file NAME.lyx
, I'd propose to name the temporary files as NAME.handout.lyx
and NAME.handout.pdf
. That way, we can add *.handout.lyx
and *.handout.pdf
to the .gitignore
and avoid accidental commits of the temporary files even if they aren't successfully removed from the location of NAME.lyx
. What do you think?
@marcopetterson do you want to give this issue a try?
@jmshapir sure! Happy to do it. I don't seem to be able to assign it to me though
Thanks @marcopetterson! I've assigned you here. At the moment you have only Read
permissions on this repo but we can elevate when needed.
If you'd like to meet with @rcalvo12 @ew487 to discuss feel free to reach out to me via e-mail and I will connect you.
Thanks!
@jmshapir could you elevate my permissions? I believe I am ready to open a PR for this issue.
Thank you!
@jmshapir could you elevate my permissions? I believe I am ready to open a PR for this issue.
Thank you!
Done! Use it wisely, thanks @marcopetterson!
@marcopetterson just checking if you wanted to open a pull here? Thanks!
Thread continues here
Summary: in this issue we fixed the handout lyx sourcing changing the location that handout files are temporarily stored before being moved to their final location
In this issue we want to make a fix to the LyX builder handout functionality. The issue was first spotted in PolEc #7.
Right now the lyx handout functionality works by taking the original lyx script and making a copy of it that lives in the output folder of the first target. Then this copy is compiled into the handout which temporarily lives in the output folder of the first target. Then the copy is removed and the handout is moved to the proper output folder for the handout. An issue happens here when the lyx script refers to a relative file location, for example when an image is inserted. Because the original and copy of the lyx file are in different locations, if the source file can't be reached by the same relative path from both the original and copy locations - say because they are at different levels of the repo - then the copy won't be able to find the image sources and will break.
My proposed solution: make it so that the copy and the handout are produced in the location of the original lyx file so that the relative pathways will always lead to the same place. We will still remove the copy and move the handout at the end of the process.
@jmshapir if you have a different solution in mind, please let me know.