2

I've created an automatic report for my company that gets some input datasets and automatically returns a data analysis report with texts, figures, tables, and some data analysis results. Depending on the type of the input datasets, the data analyses performed for them might be different. Therefore, what I need to do is to put all of the analyses in the LYX and somehow come up with a way to put some conditional statements for different sections. For instance, suppose based on the input dataset, I should skip section 1 and section 3, is there any way to do it in LYX?

I really appreciate your help.

  • Is the use of ERTs okay? – Werner Jul 25 '14 at 23:36
  • @Werner, Yes sir :) – Sam Jul 25 '14 at 23:39
  • Is the LyX document created automatically with every input dataset? Or do you have a template that has a number of sections that already exist and you just want to be able to turn some of them on/off? – Werner Jul 25 '14 at 23:44
  • @Werner, The second one actually. I have a LYX template and I need to turn some sections on and some off. I really appreciate your help. – Sam Jul 26 '14 at 0:19
  • 2
    Another way is to use branches. Select what you want and go to Insert > Branch. Control which are activated by right-clicking on the branches or Document > Settings > Branches – scottkosty Jul 26 '14 at 1:33
4

Here is a proof-of-concept (click to enlarge):

enter image description here

  • Define a conditional (say) \newif\ifmethodology which can be set to true (\methodologytrue) or false (\methodologyfalse) in the Document > Settings... > LaTeX Preamble.

  • Surround your conditional section (say, Methodology) with ERTs \ifmethodology and \fi. Depending on the set condition, this entire block of text will either be included/excluded.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.