I have seen the similar question here Does "the GPL doesn't cover the ouput of a program" also apply if...... However, I think the use of LaTex to write a book with code examples that were licensed under Gplv3 is a different case. There is also this similar question How could I copyleft a document that contains a substantial amount of both code and prose?, but they didn't have code examples in text already licensed under Gplv3.
If I was to write a book in LaTex and,
- Protect its source code and by proxy the text to be printed in pdf format with Gplv3.
- It contained code examples in text previously covered under Gplv3 to be printed in pdf format.
It seems like the pdf will also be covered,
- Because the source code contains all text in the pdf book.
- Adapted code blocks in the source code that are printed in the pdf book are covered under gplv3 per the terms of the license.
- There are no user defined inputs and the output is always the same because its just compiling and producing the pdf book.
Is my interpretation incorrect?