Học nèHọc nè
Help CenterGetting started with Hocne

Use your own TeX template

Upload your TeX folder once, and every test on Học nè exports to a PDF exactly as your own machine compiles it.

7 min readUpdated

If you still write tests in LaTeX (ex_test, exam or a template of your own), you can bring that template to Học nè. You keep writing the questions on Học nè. When you export, Học nè writes them the way your template writes questions, puts them in the template and compiles with a real TeX Live, so the PDF looks as if you compiled it on your own machine.

Add a template

  1. Open Settings → Export, and scroll to the PDF (TeX) block.
  2. On the Tests & practice row (or Flashcards), press Add a template and choose:
    • Upload a folder: pick the whole template folder on your computer. You can also drag the folder onto the block.
    • Upload a .zip: a zip of the folder, including one downloaded from Overleaf (Menu → Download Source).
    • Choose .tex files: one file or several, with the files they load.
  3. Học nè reads the folder and opens Học nè has read your template.

On a phone, use a .zip or pick files: phones cannot pick a whole folder.

Học nè uploads only what the template needs: the .tex, .sty and .cls files, the fonts and the pictures the sources load. The .git folder, the build folder, the files TeX writes itself and PDFs already built stay on your machine. Press Học nè left N files out to see the list.

Check it before you save

On the left is a real PDF: a sample test of Học nè's in your template. On the right is what Học nè understood:

  • Where the questions go: the \input line Học nè replaces with the test's questions. If the template has two layouts (the whole page and one with a notes column, say), choose under Layout.
  • Header details: each line of the head, with the words it has In the template. Học nè gives each a Field name from those words (Department, School, Exam, Subject, Grade, Time); a line it does not recognise keeps the template's own command name, and you can type a clearer one. Each line is Taken from The test (Học nè fills it from the test's details), Typed at export (you type it when exporting; untyped, it prints as the template has it) or kept As in the template.
  • Template options: the switches your template already has, like black and white. Those turned on here are on for every export. A template's own switch that hides the solutions or the answer key follows Solutions and Answer key at export: ask for the solutions and the template no longer hides them.
  • How questions are written: the syntax Học nè uses for each kind of question.

Whenever you change something, the PDF builds again a moment later. If the template stops with an error, the first row says what, in which file and on which line.

A folder with several main files shows a tab for each. Press Save template on each one you want to keep, or Skip this template.

The AI reads the template

For a template of your own, or one with many details and switches, you can press AI reads the template. The AI reads the main file and the sample content to propose the details' names, the switches and how the template writes questions. AI can be wrong, so look it over before you save. With Học nè AI the price in credits shows on the button before it runs; your own AI is free.

Rather not use AI? Press Skip AI. For ex_test and exam templates Học nè still prints in your template on its own: the header details stay as the template writes them.

Manage your templates

Your templates come after Học nè's, each with a ⋮ menu:

  • Use this template: every export opens with this template (it is marked In use).
  • Download template (.zip): exactly the files you uploaded, with the template map and a sample test. It compiles as it stands in TeX Live or Overleaf. Upload it again and Học nè recognises it at once, with no AI.
  • Make a copy, Rename, Delete. Deleting a template leaves the files you already downloaded as they are.

The free plan keeps 3 templates (50 MB in all), Pro 50 (1 GB). One template holds at most 200 MB and 3,000 files.

Make a template with AI

Have a document you like but no TeX code? Press Add a template → Create with AI and drop in the PDF, the Word file or photos of it. You can also just describe what you want.

  • Học nè measures your pages in your own browser: margins, text size, colours, bands and boxes. The AI then says what each part is. The file itself is not uploaded; only a few pages go to the AI to read.
  • A faint logo behind the text is redrawn as vector shapes. A template holds no picture from your file.
  • You see your sample and the template side by side. To change something, type a sentence and press Rewrite, or press Open in the editor to change the code.
  • Press Use this template to keep it. It is yours alone and counts towards your plan's templates.

The result is a close match and the AI can mistake a part, so compare it with your sample. For a note, Heading styles in the export panel changes the style of each heading.

Edit a template in the TeX editor

On your template, press ⋮ → Edit in the editor, or pick Write TeX code when adding a template (Học nè makes a new template from the kind's first one for you to change). To change one of Học nè's templates: press its ⋮ → Edit a copy; Học nè's stays as it is, the copy is yours. The editor opens in a new tab. The editor has your files, the code and the PDF beside it.

  • Your code saves as you type. Each compile with no error becomes the version your documents print.
  • An error shows with its line. Double-click the PDF page to jump to the matching line of code.
  • AI fix proposes the lines to change. You see them before anything is applied.
  • Học nè keeps each version that compiled, so you can go back.
  • The editor's ⋮ has Rename and Delete; ‹ Templates takes you back to the template list in Settings.

See an example on the TeX editor page.

A TeX project of your own

Besides print templates, the TeX editor keeps your own projects: a thesis, a lesson or any document you write in LaTeX. On the TeX editor page, the New project row has three ways to start: Blank to write from scratch, Upload a .zip (the project's .zip file, one downloaded from Overleaf included) and From a Học nè sample (a test, note or flashcard template with its sample written in, ready to compile). You can also drop a folder or .tex files on that row. A project opens in the tab you are in: pick the engine in Compile with, set the main file with Set as main file, each compile with no error becomes a version in History, and ⋮ has Download PDF and Download project (.zip). The AI Học nè button at the top of the editor answers about the open file and the compile's errors; AI can be wrong and changes none of your files.

How your files are used

Your template files are kept privately for you and used only to print your own documents - never shared and never used for anything else. You need the right to use the files and fonts you upload.

Học nè never changes your original files. What it changes to compile (where the questions go, switches, a replacement font) exists only in the copy on the compiler.

Contact the Học nè team

Still need an answer? Leave your question below and the Học nè team will get back to you as soon as possible.

Loading support form