Real Work†
clone from Jerry's github (LFS301 & common)†
munakata@PGMIT:~/program$ git clone https://github.com/lftraining/LFS301
Cloning into 'LFS301'...
Username for 'https://github.com': hmunak
Password for 'https://hmunak@github.com':
remote: Enumerating objects: 11955, done.
remote: Counting objects: 100% (516/516), done.
remote: Compressing objects: 100% (371/371), done.
remote: Total 11955 (delta 264), reused 296 (delta 144), pack-reused 11439
Receiving objects: 100% (11955/11955), 13.00 MiB | 4.50 MiB/s, done.
Resolving deltas: 100% (8949/8949), done.
munakata@PGMIT:~/program$ git clone https://github.com/lftraining/common
Cloning into 'common'...
Username for 'https://github.com': hmunak
Password for 'https://hmunak@github.com':
remote: Enumerating objects: 2333, done.
remote: Counting objects: 100% (198/198), done.
remote: Compressing objects: 100% (124/124), done.
remote: Total 2333 (delta 75), reused 172 (delta 58), pack-reused 2135
Receiving objects: 100% (2333/2333), 3.22 MiB | 2.32 MiB/s, done.
Resolving deltas: 100% (1238/1238), done.
munakata@PGMIT:~/program$ ls -al
total 16
drwxr-xr-x 4 munakata munakata 4096 Jul 22 07:29 .
drwxr-xr-x 8 munakata munakata 4096 Jul 22 07:23 ..
drwxr-xr-x 6 munakata munakata 4096 Jul 22 07:28 LFS301
drwxr-xr-x 10 munakata munakata 4096 Jul 22 07:29 common
Ubuntu packages install†
- sudo apt install python-is-python3 がポイント
munakata@PGMIT:~/program/LFS301$ sudo apt update
munakata@PGMIT:~/program/LFS301$ sudo apt upgrade
munakata@PGMIT:~/program/LFS301$ sudo apt install texlive-full
munakata@PGMIT:~/program/LFS301$ sudo apt install python3-pygments
munakata@PGMIT:~/program/LFS301$ sudo apt install python-is-python3
Try to generate LFS301.pdf†
- just works with 'make' or 'make slides' to reproduce EN version
Try to generate LFS301-JP.pdf†
- fully clone LFS301 directory and named it as LFS301-JP
- inside LFS301-JP directory
- clone LFS301.tex and named it as LFS301-JP.tex
- edited LFS301-JP.tex file
- course name as LFS301-JP
- edit course title as 'Linux システム管理'
- remove existing Makefile and created new symbolc-link to commom/Makefile_oneclass_JAPANESE
- At this moment, make works and created pdf file, however
- Chapter 1 & LABS remains English (even Jerry's reference reflected existing Japanese contents)
- I can edit CHAPS for Japanese translation
Reference Files (pulled from following sepatae repos)†
Git repos†
Google Drive†
- As far as the git repo goes, I only had to add 1 real file: LFS301-JP.tex @
- You will have to change the course name when you decide Japanese translation,
- I also added the current LFS301.tex for reference purposes and the link to LFS301-JP as a directory to LFS301.
- then all I had to do was "make release-full" to generate these files.
日本語ファイル(e-learning 用に翻訳したもの)†
ソースファイル†
行数確認†
英語ファイル†
処理プロトコル案1・・・失敗(detex の精度が低くテキストの再現性が低い)†
- tex to txt conversion (drop tex control sequences) ---> OpenDetex or pandoc
- eliminate blank lines (done)
- add index to each line(done)
- reflect index to tex file (aborted)
- compare & match JP_index to EN_index
- replace EN text to JP text
- delete index
- try compling tex files
処理プロトコル案2・・・pdf からテキストをインデックス化し tex ファイルに反映†
- pdftotest でテキスト化
- ファイル名(拡張子抜き):インデックス:テキスト の作成
- 比較用アプリの作成と インデックスマッチング
- オリジナル tex ファイルにインデックスの挿入(または、インデックスに置き換え) → 自動変換のベース
plagiarism detection python (盗用・剽窃チェック) アルゴリズムの検討†
- tex ファイル中の該当箇所を検出するアルゴリズムを検討
- 単純に pdf からテキスト化された文章(当然複数の単語からなる)と Texコマンドを含む Tex ソースファイルを比較した場合、適切にマッチできないことが判明。全くマッチしないわけではなく、複数行の最後の部分でマッチするケースもあった。

- 使えるかもしれない(が、目的が違うので微妙かもしれない)類似プログラム --- pysimilar
単純な文章の類似度判定†
pdftotext と detex で特殊文字が違ったエンコードになった(些細だが、ハマる)†
'What is "Cloud Native" and how it works?' <----- detex (from Tex)
'What is ”Cloud Native” and how it works?\n' <---- pdftotext (from PDF)
Latex†
日本語フォント†
- 考え方としては基本は IPAexGothic、IPAexMincho を利用
- bold についてゴチックは migmix-2p、丸ゴチックは migmix-1m を使うように fontmap を設定する。
- /usr/share/fonts/truetype の下に migmix というディレクトリーを作り ttf ファイルをコピー
- fc-cache -fv でフォントを読み込み、fc-list で認識されたことを確認
- xelatex で fontspec={migmix} を指定してみる
[local] munakata:~/Downloads/migmix-1p-20200307$ sudo cp *.ttf /usr/share/fonts/truetype/migmix/
[local] munakata:~/Downloads/migmix-1p-20200307$ ls -al /usr/share/fonts/truetype/migmix/
合計 6432
drwxr-xr-x 2 root root 4096 7月 26 10:18 .
drwxr-xr-x 82 root root 4096 7月 26 10:17 ..
-rw-r--r-- 1 root root 3413208 7月 26 10:18 migmix-1p-bold.ttf
-rw-r--r-- 1 root root 3160324 7月 26 10:18 migmix-1p-regular.ttf
[local] munakata:~/Downloads/migmix-1p-20200307$ sudo fc-cache
[local] munakata:~/Downloads/migmix-1p-20200307$ sudo fc-list | grep mig
/usr/share/fonts/truetype/migmix/migmix-1p-bold.ttf: MigMix 1P:style=Bold
/usr/share/fonts/truetype/migmix/migmix-1p-regular.ttf: MigMix 1P:style=Regular