2

I currently have a few latex templates stored in a folder. Then I copy and paste to create a new document. I want to streamline this process because, well, I am lazy and I like to play.

Preferably, my latex templates are stored in a single org file as BEGIN_LATEX blocks. And I want function(s) (create-latex-doc-from-template template-name) so that I can turn it into a org-mode link. When I click on the link, it'll create a new buffer with the specified template.

Since these templates are usually pretty big in size, I need proper syntax highlighting to edit them. So yasnippet doesn't work for me.

Any ideas on what I need for this? Thanks.

  • Org mode might add extra complexity for little benefit here. I store my LaTeX templates in a separate directory with one template per file. This way you can edit the templates as LaTeX, with all the syntax-highlighting etc from Auctex. To create a new document, open a new file, and call insert-filename, which is C-x i by default, and select your template file. It would be easy enough to wrap insert-filename in a function that will direct you to your template directory, so you don't need to drill through your entire file tree to find the templates. – Tyler Oct 20 '15 at 17:41
  • I had the same problem for writing scientific articles and have built a nice setup that creates a folder tag-named with year/month of creation and puts inside a latex template file and another folder for figures. I have several links on my org-file depending of which journal I am going to publish to. However, as @Tyler mentioned above I also have the templates in a separate folder. I can give an answer if you're interested on this type of setup. – Andre Jul 6 at 20:24

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.