TeX - LaTeX Asked on June 17, 2021
I have several tex files to create a pdf.
The root.tex
use input{}
to import other tex files.
While I’m editing other tex files, I want to compile my tex by using some shortcut instead of using mouse to switch to root.tex
and compile it.
My question is:
Is there any shortcut that can help me compile the root.tex no matter which file I’m in in Kile?
You can create projects
in Kile.
In Kile you can create and work with projects. A project is a group of LATEX, graphic, BibTEX or other files that contain all the information that is used to build your complete document. A typical project would be a document consisting of several chapters, written in different .tex files; all of them could be included in a project, to make the whole document easier to manage. The specifications of the project are stored in a special file, with extension .kilepr.
You can then either let Kile automatically find the root.tex
or tell it where to look and then all the build commands work as expected.
Answered by StrongBad on June 17, 2021
If you don't like Kile Projects, you could do what I do:
At the bottom, below the end{document}
line, I have a line defining a shell alias that, for your case, could look somewhat like
alias rtx="cd home/mike/tex && pdflatex root.tex"
While I work in Kile, I have always a Konsole window open; at the beginning of my work session, I paste the text above into the Konsole window and then, for the rest of the day, I simply type rtx
in the Konsole window. Or just use the up-arrow.
That could be made more sophisticated, making the alias persistent or turning it into a short shell script, but I like it exactly this way. Easy and flexible!
Answered by vaettchen on June 17, 2021
In case someone is still ending up here for a solution, you should know that now it is possible to set a master file in Kile.
Just go to: menu > Settings, and click on entry "Define Current Document as 'Master Document'".
From then on, any compile command that you run (either from shortcuts or by clicking on a button) will have as argument the master file.
Answered by Niccco on June 17, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP