Skip to content

Latex Transformation

IT4KT Builder allows creating LaTeX output from a course. However, in current version there are some limitations that need to be taken in mind before generation:

  • Latex transformation doesn’t support SVG images.
  • Latex transformation doesn’t support media tokens conversion (YouTube, video or audio tokens).
  • Solution and Result elements are not hideable (modifier * has no effect).


LaTeX conversion is implemented besides main functionality of it4kt-builder. We’ve decided to generate LaTeX output to latex-output directory instead of output to prevent from output overriding. To run transformation you can use following command:

it4kt-builder latex

If you use recommended course layout, you cen run the command from the pyvenv directory:

  • Unix: pyvenv/bin/it4kt-builder latex

  • Windows: pyvenv\Scripts\it4kt-builder latex

If you would like to change language of conversion then you can use -l or --language flag with translation language abbreviation as an argument. You’re free to use multiple languages for conversion:

it4kt-builder latex -l sk

# or with multiple languages

it4kt-builder latex -l sk -l en

First language is going to be treated as default language and the output will be generated at root of latex-output directory. Another languages will be generate to subdirectories named by language you’ve just passed.


For more info about localization check dedicated localization recipe.

To manipulate included .tex files you need to edit article.tex in generated folder.

Output directory structure

At first sight you can see that latex-output directory is very similar to HTML output one. You can find article.tex file, which behaves like an index file for LaTeX project. In this file you can see all the imports including styles/it4kt.tex file, which includes all default styles for LaTeX transformation.

You’re free to manually edit these files, but they will be overwritten as soon as you run another round of LaTeX conversion. Custom styling will be discussed in next section of this recipe page.

Custom LaTeX styling

Users are free to append custom LaTeX file to the transformation when they need to change something in template or add custom styling for their own elements (check Customize Kpimark).

These styles, unlike the default one, are not going to be overriden during conversion proccess. On every run of conversion, the tool will take the most current version of this file and append it to a transformated course.

To append custom styles file during conversion you can use -s or --style flag followed by path argument:

it4kt-builder latex -l sk -s my_styles.tex


The path is relative to your current terminal location.