0

I'm a beginner in LaTeX. For my company, I must prepare some documents and reports that will be built on Jenkins. I have one repository. How to manage different styles and config files in one folder that allows Jenkins to build all kind of reports from one directory.

So to be clear I have one project repo on Bitbucket. Jenkins pulls all code after commit change on the repository, then build and generate *.pdf report file.

If I have one reports per repo everything is ok. But the problem appears when I need to generate more than one report. For example, some: plan.pdf for project A, text.pdf for project B. All of these files have different styling.

I want to have only one repo, but build several *.pdf files with different styling. How to organize project structure in LaTeX, TeX to get thus results?

  • For those of us who are wholly ignorant of what "Jenkins" is or does: Please provide more information about your computing setup and about your TeX setup. E.g., how does 'luatex' (you've set this badge, so it seems natural to ask) come into play? – Mico Jun 21 '19 at 13:28
  • 3
    @coffeina the tex-core tag is about the inner workings of TeX-the-program, so it doesn't really apply here. – Phelype Oleinik Jun 21 '19 at 13:58
  • 1
    Can you explain in more detail where the problem lies? Naively (I know nothing about Jenkins) that you should be able to call LaTeX on several (main) files from Jenkins. What is the problem with your current folder structure? – moewe Jun 21 '19 at 14:46
  • 2
    LaTeX doesn't really have a notion of a 'project directory' or a project structure. You can have as many .tex files in the same directory as you want. You can build them separately by calling pdflatex <filename> (plus additional helper tools etc.). The only thing to keep in mind is that (roughly speaking, I'm not too sure about the details) relative file names in .tex files (things like \input{./foo}) are resolved relative to the working directory in which you call LaTeX and not relative to the file path. – moewe Jun 21 '19 at 14:54
  • 2
    Yes, a good folder/project structure can help keep things nice and tidy, but it is no way a requirement for a successful compilation. – moewe Jun 21 '19 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.