Following an answer on my previous question about creating a default preamble, I tried to create a custom template in TexStudio using the commands file-->make template.

Even though the template is saved in .config/template subfolder (I am using Ubuntu 14.04), I cannot load it by using the commands file-->new from template.

In other words, TexStudio finds only default templates (article, book, koma-script, etc).

So my question is how to say to TexStudio to load my custom template?

  • I have no problems with this (in Linux Mint if that matter). The user templates are stored in ~/.config/texstudio/templates/user and should be one template_yourtemplate.tex and one template_yourtemplate.json. – Fran Dec 23 '15 at 10:39
  • In that folder I have one file template_yourtemplate.json and another template_yourtemplate.sty. I don't know if .sty causes the problem. I will try to convert it in .tex file – Yorgos Dec 23 '15 at 10:46
  • Ok! The problem is solved. As it proved, .sty format caused the problem. – Yorgos Dec 23 '15 at 10:52
  • 2
    while this may work for you, there is a significant difference between .sty and .tex files that may cause problems for someone else. if a file contains any command name in which an @ sign appears, the .sty file will automatically recognize it, but in a .tex file, the affected code must be surrounded by \makeatletter ... \makeatother to be handled properly. so, in general, .tex and .sty files are not interchangeable. – barbara beeton Dec 23 '15 at 14:59
  • As I understand TeXstudio templates, as stated there needs to be 2 files placed into ~/.config/texstudio/templates/user, your_template.json (defines author, date, and files to open) and your_template.zip (which contains the tex files to be opened when creating). – ozhank Aug 28 '16 at 3:51

Your Answer

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

Browse other questions tagged or ask your own question.