1.0.10 • Published 12 months ago

@bnz-org/mdtex-parser v1.0.10

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
12 months ago

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

JSONStreamabort-controlleracceptsacornacorn-jsxacorn-walkagent-baseajvansi-escapesansi-regexansi-stylesanymatchapache-md5argargparsearray-flattenasn1assert-plusasyncasynckitatomic-sleepaws-sign2aws4b4ababel-jestbabel-plugin-istanbulbabel-plugin-jest-hoistbabel-preset-current-node-syntaxbabel-preset-jestbalanced-matchbare-eventsbase64-jsbcrypt-pbkdfbcryptjsbody-parserbrace-expansionbracesbrowserify-zlibbrowserslistbs-loggerbserbufferbuffer-equal-constant-timebuffer-frombytescall-bindcallsitescamelcasecaniuse-litecaselesschalkchar-regexci-infocjs-module-lexerclipanioncliuicocollect-v8-coveragecolor-convertcolor-namecolorettecombined-streamcompressiblecompressionconcat-mapcontent-dispositioncontent-typeconvert-source-mapcookiecookie-signaturecore-jscore-util-iscorscreate-jestcreate-requirecross-spawndashdashdayjsdebugdedentdeep-isdeepmergedefine-data-propertydelayed-streamdepddestroydetect-newlinediffdiff-sequencesduplexifyecc-jsbnecdsa-sig-formatteree-firstejselectron-to-chromiumemitteryemoji-regexencodeurlend-of-streamenvinfoerror-exes-define-propertyes-errorsescaladeescape-htmlescape-string-regexpeslint-scopeeslint-visitor-keysespreeesprimaesqueryesrecurseestraverseesutilsetagevent-target-shimeventsexecaexitexpectexpressexpress-rate-limitextendextsprintffast-deep-equalfast-fifofast-globfast-json-stable-stringifyfast-levenshteinfast-redactfast-safe-stringifyfast-urifastqfb-watchmanfile-entry-cachefilelistfill-rangefinalhandlerfind-upflat-cacheflattedforever-agentform-dataforwardedfreshfs.realpathfseventsfunction-bindgensyncget-caller-fileget-intrinsicget-package-typeget-streamgetpassglobglob-parentglobalsgopdgraceful-fsgraphemergunzip-maybehandlebarshas-flaghas-property-descriptorshas-protohas-symbolshasownhtml-escaperhttp-errorshttp-signaturehttp-status-codeshttps-proxy-agenthuman-signalsiconv-liteieee754ignoreimport-freshimport-localimurmurhashinflightinheritsipaddr.jsis-arrayishis-core-moduleis-deflateis-extglobis-fullwidth-code-pointis-generator-fnis-globis-gzipis-numberis-promiseis-streamis-typedarrayisarrayisexeisstreamistanbul-lib-coverageistanbul-lib-instrumentistanbul-lib-reportistanbul-lib-source-mapsistanbul-reportsjakejest-changed-filesjest-circusjest-clijest-configjest-diffjest-docblockjest-eachjest-environment-nodejest-get-typejest-haste-mapjest-leak-detectorjest-matcher-utilsjest-message-utiljest-mockjest-pnp-resolverjest-regex-utiljest-resolvejest-resolve-dependenciesjest-runnerjest-runtimejest-snapshotjest-utiljest-validatejest-watcherjest-workerjs-tokensjs-yamljsbnjsescjson-bufferjson-parse-even-better-errorsjson-schemajson-schema-traversejson-stable-stringify-without-jsonifyjson-stringify-safejson5jsonparsejsonwebtokenjsprimjwajwskeyvkleurlevenlevnlines-and-columnslocate-pathlockfilelodashlodash.includeslodash.isbooleanlodash.isintegerlodash.isnumberlodash.isplainobjectlodash.isstringlodash.memoizelodash.mergelodash.oncelowdblru-cachemake-dirmake-errormakeerrormdtex-parsermedia-typermerge-descriptorsmerge-streammerge2methodsmicromatchmimemime-dbmime-typesmimic-fnminimatchminimistmkdirpmsnatural-comparenegotiatorneo-asyncnode-fetchnode-int64node-releasesnormalize-pathnpm-run-pathobject-assignobject-inspecton-exit-leak-freeon-finishedon-headersonceonetimeoptionatorp-limitp-locatep-trypakoparent-moduleparse-jsonparseurlpath-existspath-is-absolutepath-keypath-parsepath-to-regexppeek-streamperformance-nowpicocolorspicomatchpifypinopino-abstract-transportpino-std-serializerspiratespkg-dirpkginfoprelude-lspretty-formatprocessprocess-nextick-argsprocess-warningpromptsproxy-addrpslpumppumpifypunycodepure-randqsquerystringifyqueue-microtaskqueue-tickquick-format-unescapedrange-parserraw-bodyreact-isreadable-streamreal-requirerequire-directoryrequire-from-stringrequires-portresolveresolve-cwdresolve-fromresolve.exportsreusifyrun-parallelsafe-buffersafe-stable-stringifysafer-buffersemversendserve-staticset-function-lengthsetprototypeofshebang-commandshebang-regexside-channelsignal-exitsisteransislashsonic-boomsource-mapsource-map-supportsplit2sprintf-jssshpkstack-utilsstatusesstenostream-shiftstreamxstring-lengthstring-widthstring_decoderstrip-ansistrip-bomstrip-final-newlinestrip-json-commentssupports-colorsupports-preserve-symlinks-flagtar-streamtest-excludetext-decodertext-tablethread-streamthroughthrough2tmplto-fast-propertiesto-regex-rangetoidentifiertough-cookietr46ts-api-utilstunnel-agenttweetnacltypaniontype-checktype-detecttype-festtype-isuglify-jsundici-typesuniversalifyunix-crypt-td-jsunpipeupdate-browserslist-dburi-jsurl-parseutil-deprecateutils-mergeuuidv8-compile-cache-libv8-to-istanbulvalidatorvaryverdaccio-auditverdaccio-htpasswdverrorwalkerwebidl-conversionswhatwg-urlwhichword-wrapwordwrapwrap-ansiwrappywrite-file-atomicxtendy18nyallistyargsyargs-parserynyocto-queue
1.0.10

12 months ago

1.0.9

12 months ago

1.0.8

12 months ago

1.0.7

12 months ago