Does not format a listing that uses mint
- Dominant language
- No language data
- Stars
- 42
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
### Description
When use mint (a package for formating code), the html generator does not format the listing content according to mint's configuration provided by the author.
Thank you :)
### (Optional:) Please add any files, screenshots, or other information here.
Incorrect formatting of the code:
Here is the code in latex (using the mint package)
```latex
\begin{listing}[!ht]\codeVSpace
\begin{minted}[
linenos,
mathescape,
escapeinside=!!,
fontsize=\scriptsize
]{python}
world = World() # OR World(detect=CstmDetector, track=CstmTracker) $\label{line:world}$
roadNetwork = RoadNetwork('road-network/boston-seaport/') !$\label{line:road-init}$!
world.addGeogConstructs(roadNetwork) !$\label{line:road}$!
world.addVideo(GeospatialVideo(Video('v0.mp4'), Camera('c0.json'))) !$\label{line:gsvideo}$!
world.addVideo(GeospatialVideo(Video('v1.mp4'), Camera('c1.json'))) !$\label{line:end-build}$!
obj, cam, intersection = ( world.object(), world.camera(), !$\label{line:object}$!
world.geogConstruct(type='intersection') )
world.filter( ((obj.type == 'car') | (obj.type == 'truck')) & !$\label{line:filter}$! !$\label{line:pred-type}$!
(distance(obj, cam) < 50) & contains(intersection, obj) & !$\label{line:pred-distance}$! !$\label{line:pred-contain}$!
headingDiff(obj, cam, between=[135, 225]) ) !$\label{line:pred-heading}$!
world.saveVideos('output_videos/', addBoundingBoxes=True) !$\label{line:observe}$!
\end{minted}
\caption{Geospatial Video Analytic Workflow with \oursystem}
\label{listing:python-workflow}\codeVSpace
\end{listing}
```
Here is the pdf output:
Major issues:
1. The generated html does not format the code snippet with correct coloring and font-styling.
2. The generated html does not hide escaped portion of the code as configured (mathescape and escapeinside=!!).
3. The generated html does not display the line number as configured (linenos).
Thank you :)
### (Required) What is this issue most closely related to? Select one.
Choose One
### Internal issue ID
33920bc6-07c2-47cc-ae2c-1d6b0b6daabc
### Paper URL
https://arxiv.org/html/2308.03276v3
### Browser
Chrome/123.0.0.0
### Device Type
Desktop
Contributor guide
Research direction
Start with the linked paper's LaTeX listing using the minted package and compare its generated HTML with the PDF output. Reproduce the case with coloring, font styling, mathescape/escapeinside handling, and linenos enabled; done means the HTML reflects those minted settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100