-
Notifications
You must be signed in to change notification settings - Fork 215
LaTeX: first pass at texstyle infrastructure #2433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
;-) More at a more convenient hour. |
I did quite a bit of refactoring since you last looked at this. It is in a state that would be ready to merge, but I'm not being held back at this point if it doesn't for a while. I will keep adding new texstyle files, and with each, will likely need to refactor some anyway. Three journals: ams-general, taylor-francise-general, and spring-natural-general. Two dependents of ams-general. Should the logic to get the cls/sty files required for a build be inside core or the cli do you think? I haven't started on that. |
Sounds good. I'll checkin when I'm ready to take another look.
Can grabbing class/style files be a discrete function that the pretext/pretext script could execute on-demand? Could they be fetched once, placed with external files and copied into temporary working directory as needed?
Guess it depends on your vision, which is likely very different from last paragraph.
…On March 19, 2025 2:59:11 PM PDT, Oscar Levin ***@***.***> wrote:
oscarlevin left a comment (PreTeXtBook/pretext#2433)
I did quite a bit of refactoring since you last looked at this. It is in a state that would be ready to merge, but I'm not being held back at this point if it doesn't for a while. I will keep adding new texstyle files, and with each, will likely need to refactor some anyway.
Three journals: ams-general, taylor-francise-general, and spring-natural-general. Two dependents of ams-general.
Should the logic to get the cls/sty files required for a build be inside core or the cli do you think? I haven't started on that.
|
Okay, this is in reasonable shape for review now. All 17 journals (including 4 "generic publisher" options) are set up to use texstyle files. This makes the previous xsl for specific journals obsolete! The one big piece that is missing is the fetching of required files to build the resulting latex to pdf. I plan to put that on a separate PR. |
Very good! This is a great project. I built a PDF of the sample article, using the EJC style. Worked great. Two observations:
|
OK, almost merged and realized maybe I'm not doing this right. I did If I do What am I missing about |
No, you need to set the name of a journal (Subsection 44.1.9: Journal name). When this is set, the So it will be interesting to see how the |
OK, sort of as expected. Thanks for the clarification, I had not realized this was already documented.
Yes! I'll do that before merging. To satisfy my curiousity as well. |
For the record - I built the "ejc" texstyle and the "electron-j-combin" journal and compared them with a diff on the resulting @oscarlevin and I reviewed that during Drop-In. A couple rough edges, but nothing to prevent this going in now. |
Merged. Split up the first commit to isolate the new stylesheet (nee template). Great progress - keep it coming! |
There is a LOT going on here, and there will be more to come. Right now:
journals
a folder oftexstyles
contains two different texstyle files describing the latex layout for ams journals and springer nature journals. A third dependent style is independents
, with only the documentclass changed.xsl/latex/pretext-latex-texstyle.xsl
. The goal is that this will replace all the recent journal-specific xsl files. It reads in the correct texstyle file and does all the processing.The xsl file really pushed me to understand how xsl works. There will absolutely be better ways to do some of these things I think. The merging of a dependent and base texstyle, using techniques from assembly, was particularly fun. Also the processing of authors: we bounce back and forth between the source pretext and texstyle file a couple times so we can "loop over" the authors and the author data in the correct order. Fun fun fun.
My plan:
So no rush, but it's here if you are currious.