Skip to content

ShapeLayer/modernized-boj-description-converter

Repository files navigation

modernized-boj-description-converter

Note

This is a dependency-updated version of solved-ac/boj-description-converter

As of January 2025, I have resolved dependency issues in the original repository, including removing deprecated modules. Most problems are caused by create-react-app, so this repository has a dependency on vite, not a dependency created by create-react-app.

Note

When deploying this to GitHub Pages, you may have to configure the repository variable BASE_URL=<base-url>.
For more information, see <Using the vars context to access configuration variable values> section on <Store information in variables> documentation.

Note

The main branch contains an opened pull request at upstream #2 that has not yet been merged. The unmerged is the upstream branch.

solved-ac.github.io/boj-description-converter

Convert UCPC-flavored olymp.sty based TeX problem statements to HTML, complying with BOJ Stack and UCPC formatting guidelines.

Why?

For contests on BOJ with printed problemset, it is often challenging to:

  • Keep TeX and HTML descriptions synced - especially when multiple problemsetters are working on multiple problems
  • Convert one format to another - although BOJ supports MathJax, it is such a tedious and easily mistakable job to translate TeX markups to HTML. Few examples include:
    • \alpha&alpha; (greek letter 'alpha')
    • `` ... ''&ldquo; ... &rdquo; (double quotes)
    • \textit{...}<em>...</em> (italic text)
    • \textbf{...}<strong>...</strong> (bold text)
    • \begin{center}...\end{center}<p style="text-align:center;"><code>...</code></span> (centered text)
    • \t{...}<span style="color:#e74c3c;"><code>...</code></span> (colored verbatim)
    • \begin{itemize} \item ... \end{itemize}<ul> <li>...</li> </ul> (unordered list)

This project aims to eliminate manual converting work by problemsetters, and make problemsetters to just focus on setting great problems.

Usage

  1. Copy-paste olymp.sty based TeX problem statement into the left input area.
  2. Preview the render output and fix the statement if needed.
  3. Copy-paste generated HTML to BOJ Stack.

'I hate MathJax' Mode

This tool offers the ability to try rendering the equations in pure HTML while avoiding MathJax as much as possible. Currently supports the following:

  • Superscripts and subscripts
  • Most of the TeX math symbol rendering commands, i. e. \le, \delta, \rightarrow
  • Italic texts on variables
  • Spacing around operators and functions like ln or sin
  • Fractions
  • \sum

Contributing

Contributions are welcome!

TODO

  • Cleanup code
  • tabular environment
  • Converting \color names to hex string

About

Convert olymp.sty based TeX problem files to BOJ Stack descriptions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 3

  •  
  •  
  •