Skip to content

Instantly share code, notes, and snippets.

@kn1cht
Last active January 27, 2021 07:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kn1cht/9c8b2e960a4943c640245afd55693424 to your computer and use it in GitHub Desktop.
Save kn1cht/9c8b2e960a4943c640245afd55693424 to your computer and use it in GitHub Desktop.
LaTeXで書いた学位論文もtextlintでチェックしよう
node_modules/
md/
{
"plugins": ["latex"],
"rules": {
"ja-hiragana-fukushi": true,
"ja-hiragana-hojodoushi": true,
"no-mixed-zenkaku-and-hankaku-alphabet": true,
"preset-ja-engineering-paper" :true,
"preset-ja-spacing": true,
"preset-ja-technical-writing": {
"ja-no-mixed-period": {
"periodMark": "." // 論文は全角カンマ
},
"max-kanji-continuous-len": {
max: 8, // 長い用語が多いため、8文字まで許容する
allow: ["倍精度浮動小数点数"]
},
"no-doubled-joshi": false, //preset-japaneseと重複のため
"sentence-length": false //preset-japaneseと重複のため
},
"preset-japanese": {
"no-doubled-joshi": {
"min_interval" : 1,
"allow": ["が"] // がの連続(https://github.com/textlint-ja/textlint-rule-no-doubled-joshi/issues/18)
},
"sentence-length" : {
"severity": "warning", // 数式を検出してもエラーにしない
"max": 100
}
},
"preset-jtf-style": {
"1.2.1.句点(。)と読点(、)": false,
"1.2.2.ピリオド(.)とカンマ(,)": false,
"4.1.3.ピリオド(.)、カンマ(,)": false
}
}
}
{
"name": "my_thesis",
"main": "",
"scripts": {
"test": "npm run pandoc && npm run textlint-md",
"pandoc": "rm -r md/* && find . -type f -name 'main.tex' -prune -o -type f -name '*.tex' -print | xargs -I% pandoc % -t markdown_strict -o md/%.md",
"textlint-md": " textlint -f pretty-error md/",
"textlint": "find . -type f -name '*.tex' -print | xargs textlint -f pretty-error"
},
"repository": {},
"author": "kn1cht",
"license": "ISC",
"devDependencies": {
"textlint": "^11.0.1",
"textlint-plugin-latex": "^1.0.4",
"textlint-rule-ja-hiragana-fukushi": "^1.0.3",
"textlint-rule-ja-hiragana-hojodoushi": "^1.0.4",
"textlint-rule-ng-word": "^1.0.0",
"textlint-rule-no-mixed-zenkaku-and-hankaku-alphabet": "^1.0.1",
"textlint-rule-preset-ja-engineering-paper": "^0.1.0",
"textlint-rule-preset-ja-spacing": "^2.0.1",
"textlint-rule-preset-ja-technical-writing": "^3.1.0",
"textlint-rule-preset-japanese": "^4.0.0",
"textlint-rule-preset-jtf-style": "^2.3.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment