DEV Community

Cover image for TexCreate v2.2 Released!
Mustafif
Mustafif

Posted on

TexCreate v2.2 Released!

After releasing Version 2.1, I wanted to focus some more attention on templates, so you can probably guess what is new with this minor update.

Added Custom Template support

So a big update is custom template, and it's best I explain this first, so people understand how to do it.

To create a custom template, you will need two files, main.texcreate and structure.texcreate, without these your build will fail.

Let's create a template called Simple_Report, here's the steps:

Step 0 - Make sure to have TexCreate v2.2.1

# if you don't have it installed already 
$ cargo install texcreate
# if you have it installed 
$ texcreate update
Enter fullscreen mode Exit fullscreen mode

Step 1 - Create the Directory

# Create the directory and necessary files 
$ mkdir Simple_Report 
$ cd Simple_Report 
$ touch main.texcreate && touch structure.texcreate 
Enter fullscreen mode Exit fullscreen mode

Step 2 - Add the content into your templates

  • main.texcreate:

    • Contains all necessary code for the body
  • structure.texcreate:

    • Contains all packages, and extra meta information

Step 3 - Define the custom template inside config.toml

Remove the template field and instead replace it with a custom_template field, and add the path to Simple_Report. With this set, you can now use your very own custom template.

Added Templates

With custom templates available, I also added 2 new prebuilt templates, Dictionary and News. These new templates allow users to create their own dictionary and newspapers, with that said, I also added a new function no_maketitle() to tex_rs::Latex which will disable \maketitle being written to the body of the document (Used in Dictionary and News Templates).

With that said we now have 11 Templates available, all being available on texcreate --list or as shown below:

=======================
  Available Templates
=======================
==> Basic: Designed for simple documents
==> Math: Designed for math focused documents
==> Theatre: Designed to write plays/shows
==> Code: Designed to write code using listings
==> Novel: Designed to write well...novels
==> Beamer: Designed to create presentations
==> Lachaise: Designed for school assignments and academic papers
==> Lachaise-Mod: Modified version of Lachaise Template, changes in colours/design
==> Dictionary: Designed to write your own dictionary
==> News: Designed to write columned newspapers
=======================
Enter fullscreen mode Exit fullscreen mode

Top comments (0)