jlcode icon indicating copy to clipboard operation
jlcode copied to clipboard

Avoid clutteting LaTeX project

Open KronosTheLate opened this issue 3 years ago • 7 comments

To use this package, I have uploaded the files from here to my overleaf latex project. This leaves me with the following file structure: image

Which is a quite horrible mess. Is it possible to make things prettier? If I put everything into a folder, the the paths become wrong. It feels like the paths are defined internally, so that I can not change them without changing the source code.

EDIT: If this IS in fact possible, an example of how to make it happen in the readme would be lovely.

KronosTheLate avatar May 16 '22 11:05 KronosTheLate

Well, first of all, you do not need all files. Essentially, jlcode.sty and the *.tff files if you do not compile your document with pdftex but luatex or xtex instead ar sufficient. Forget about createkwlists.jl, manual.pdf, etc.

Concerning your problem, I think the easiest way to avoid what you call a horrible mess is to make the jlcode package known to your local miktex distribution so that it loads like a normal package, check out this youtube video I found: https://www.youtube.com/watch?v=9OtTvKMhAMc

wg030 avatar May 17 '22 13:05 wg030

I am using overleaf, so I do not have a local installation...

But thanks for your tips. Could a section in the readme on how to not clutter the latex project be appropriate?

KronosTheLate avatar May 23 '22 12:05 KronosTheLate

I am using overleaf, so I do not have a local installation...

Ahh, I see. In that case my recommendation cannot be applied, of course. I think the best you can do is the following then: Put the font files *.tff into a folder like jlfontfiles and change the path attribute in the command (lines 496-498)

  \setmonofont{JuliaMono}[
  Extension = .ttf,
  Path = ./,
  %[...]
  ]

to

  \setmonofont{JuliaMono}[
  Extension = .ttf,
  Path = ./jlfontfiles/,
  %[...]
  ]

Concerning the jlcode.sty I think there is no good way to load the package from a different folder so you are best to put in the root folder next to your main.tex. But as I said all other files are not needed anyway so your structure would be way more organized.


But thanks for your tips. Could a section in the readme on how to not clutter the latex project be appropriate?

Yes, I think we can add a some description on how to do that with the next major update.

wg030 avatar May 30 '22 10:05 wg030

How difficult would it be to add the Julia language to the listings package, to allow what one can currently do for Python?: \begin{lstlisting}[language=Python], from this overleaf example page.

KronosTheLate avatar Jun 27 '22 15:06 KronosTheLate

Well, as you can see in the issue #16, I already tried to get the definition into the listings package by contacting the current maintainer. He was very receptive to this idea when I mailed him back then, but he likely has a lot of other stuff to do, too. I think so because as you can see under https://ctan.org/pkg/listings, there has not been an update in 2021, neither in 2022. It might help if someone else contacts him, too, so that he gets to know that there is some interest in adding the Julia language definition to the listings package.

wg030 avatar Jun 27 '22 18:06 wg030

And he is e-mailed. I will keep this issue open until there is some description of how to handle the problem is the readme.md, or in case Julia is supported in Listings.

KronosTheLate avatar Jun 27 '22 18:06 KronosTheLate

And he is e-mailed. I will keep this issue open until there is some description of how to handle the problem is the readme.md, or in case Julia is supported in Listings.

👍 Support of the listings package would of course be awesome, but there is not much more than asking we could do here. So let's see what happens. However as I said a description in the readme and/or in the manual is definitiley added with the next update.

wg030 avatar Jun 28 '22 12:06 wg030