npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bnz-org/mdtex-parser

v1.0.10

Published

TeX 문법이 혼합된 Markdown 문서의 구문 식별

Readme

mdtex-parser

개요

mdtex-parser는 TeX 문법이 혼합된 Markdown 문서를 받아, LaTeX 인라인 구문, LaTeX 블록 구문, Markdown 으로 판단하고, 잘못 판단된 부분을 확인해서 올바른 분류를 적용하기 위한, 구문 보정 프로젝트입니다.

목표

  • LaTeX 문법이 포함된 markdown 기반 문서를 받아 AS-IS 구분자와 내부 내용을 분석합니다.
  • 분석된 내부 내용에 따라 잘못 표현되었을것으로 유추되는 구문을 올바른 구문으로 변경합니다

용어

Tex: 복잡한 수식을 표현하기 위한 언어입니다.

LaTeX: Tex 문법에 매크로 기능을 추가하여 수식을 더 편리하게 작성할 수 있도록 한 구현체입니다.

LaTeX 인라인: LaTeX로 수학 기호를 표현하기 위한 구문입니다. 한 줄에서 일반 텍스트처럼 사용할 수 있습니다.

LaTeX 블록: LaTeX로 수학 기호를 표시하되, 한줄 이상의 여러 줄로 표시해야 하는 경우 사용하는 구문입니다.

Markdown: 문서를 텍스트로 마크업할 수 있도록 하는 서식 언어입니다.

구문: 이 프로젝트 내부에서 문서를 나누는 단위입니다. $a+b$ 라고 하면 a+b 라는 구문으로 나눕니다. "문제$a+b$는?" 라는 문서를 입력받으면 "문제", "a+b", "는?" 과 같은 단위로 나눕니다. 각 마크다운, LaTeX Inline, 마크다운 으로 구분하므로 의도에 맞추어 결과물을 표시할 수 있습니다.

내부 구조

크게 분석기와 보정기로 나눕니다.

파서

파서는 내부 구문의 타입을 얻어내고, 구문의 본문을 통해 필요한 속성을 생성합니다. 예를 들어 개행이 있는지, TeX 구문이 포함되어있는지, Block 시작인지 등 구문의 종류를 규정하고 본문을 분석해서 그 속성을 추가합니다.

보정기

보정기는 파서가 분석한 결과를 토대로 "블록 범위 검사" 와 "마크다운으로 분류된 수식 구문" 과 같은 오류를 확인하고 결과에 맞추어 변환합니다. 파싱 된 결과물은 createOverridedContent 메서드를 통해 다른 타입으로 변경하면서 기록을 위해 원본을 함께 멤버 변수에 담습니다.

Credit

Designed by Young Min 'Matthew' Kim

Implements By. Young Min 'Matthew' Kim