jupyterlab-latex icon indicating copy to clipboard operation
jupyterlab-latex copied to clipboard

Menu item "File→New→Latex File" with customizeable template.

Open belonesox opened this issue 7 years ago • 4 comments

For most of Latex newbie is very difficult to create new correct LaTeX file without copy-pasting all that stuff about \documentclass, set of packages, etc.

So, it will be great, if:

  • Jupyter-Latex will have setting like
    c.LatexConfig.latex_template_file = 'simple_article_for_our_institute.tex'
  • New menu "File→New→Latex File" will be added.
  • Calling "File→New→Latex File" we create new latex file from simple_article_for_our_institute.tex

Very simple but useful usecase.

Ideas for further improvements

  • May be with some template interpolation, but template processing looks not so important.
  • May be have set of templates ("article", "corporative report", "lab work", "book") and corresponding set of submenus under "File→New→Latex File"

belonesox avatar Aug 10 '18 19:08 belonesox

This is a nice idea!

ian-r-rose avatar Aug 10 '18 19:08 ian-r-rose

To make it more configurable, maybe a list or dictionary like:

c.LatexConfig.latex_template_files = {
    'name': 'path/to/file.tex'
}

This could even have a couple templates set by default.

I personally have 2 main templates that I use, so this would be AWESOME.

t-makaro avatar Aug 10 '18 20:08 t-makaro

Maybe we could take some inspiration from jupyterlab_templates. It does exactly what we need except that it only accepts using *.ipynb as templates. Or we could ask @timkpaine about supporting non-notebook file types.

t-makaro avatar Aug 25 '18 03:08 t-makaro

i have no issues with accepting non-ipynb files

timkpaine avatar Oct 21 '19 19:10 timkpaine