I am writing a paper on the SIR epidemiological model and in addition to the images and graphs I have created in Mathematica, I would like to insert the code before each graph. Is there any way to do this? I write my LaTeX code in the Overleaf
Have you tried to right click on the code cell and use Copy as -> LaTeX ?https://reference.wolfram.com/language/workflow/GenerateTeXWithTheWolframLanguage.html
Oh, I have tried that yet. Thanks
The LaTeX package listings can format Mathematica code, I think.
listings