[SOLVED] Merging files together based on latex syntax.
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a latex code file which links itself to many other latex files. The syntax is as follows:
\input{*path of file to be inputed*}
The path is relative to the current working directory, so if my file is stored in /home/kevin/mybook.tex and I want to include a file in /home/kevin/latexstuff/copyleft.tex I simply write:
\input{latexstuff/copyleft.tex}
The latex compiler includes these files just as if they had been copied and pasted into the main latex file at the point specified. My problem is that I have a document which depends on quite a bit of these \input commands, but I am trying to use a latex preprocessor (ratexdb, adds database fields to your latex documents) which does not support \input commands, leaving my file only half processed.
So I was wondering: is there any easy way to parse through my main file, detect only the \input commands, interpret the syntax and include the files specified (where specified), and produce a second, populated file, which can then be processed by ratexdb?
I've seen amazing things done with makefiles, bash scripts, grep, cat, perl, etc., but I'm not quite sure how to use these tools to solve my problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.