How would I create something like this?

Hello. I found this website and I was wondering how I can recreate it in Hugo.

I’m currently using this theme. (I made it myself)

What are you specifically trying to replicate?

I want to try and replicate how he created the input boxes and how he created the boxes to show the output of the commands.
Is this possible in Hugo?

You’ll need to write JavaScript for getting the interactive behaviour, i.e. what happens on clicking a certain button, etc… For parsing the input, you can look into KaTeX as it allows you to specify a custom delimiter.

This will be a basic implementation. Once done, you can then build upon it by adding more libraries like DeTeXify.

Do you have a link or a reference that I can look into as an example source code?

I don’t have a reference for this, you’ll have to find one on your own. In case you don’t find something, you can start by adding buttons, attaching click handlers to them, and manipulating the markup based on that.

Afterwards, just skim through the documentation of the libraries to see what you’ll need. Normally, the documentation contains examples pertaining to a feature.

Great! Thanks for the info.

GitHub - gillescastel/math-on-quora: Short guide to LaTeX on Quora is the source for the site in question.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.