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, 2019 at 13:28
  • @Mico thanks for pointing that. I was on mind TeX or LaTeX. My setup: one repo on bitbucket, and Jenkins on the server. Jenkins job pulls repo into the pipeline after the change and bild *.pdf file from tex, or LaTeX. But this is one problem: if I have one repo and one project documentation to generate it's ok. But if I have more then one project documentation to generate I don't know how to organise project files in this one folder for different projects.
    – coffeina
    Jun 21, 2019 at 13:56
  • 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, 2019 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, 2019 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, 2019 at 15:03


You must log in to answer this question.

Browse other questions tagged .