├── .devcontainer ├── .latexmkrc ├── Dockerfile ├── devcontainer.json └── docker-compose.yml ├── .gitignore ├── .vscode ├── latex.json.code-snippets └── settings.json ├── README.md ├── docs ├── how_to_use_codespace.md ├── how_to_use_devContainer.md └── image │ ├── CyTeX.svg │ ├── account.png │ ├── create-codespace.png │ ├── vscode-git-icon.png │ └── vscode_><.png ├── main.tex └── out └── main.pdf /.devcontainer/.latexmkrc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | # LaTeX 4 | $latex = 'platex -synctex=1 -halt-on-error -file-line-error %O %S'; 5 | $max_repeat = 5; 6 | 7 | # BibTeX 8 | $bibtex = 'pbibtex %O %S'; 9 | $biber = 'biber --bblencoding=utf8 -u -U --output_safechars %O %S'; 10 | 11 | # index 12 | $makeindex = 'mendex %O -o %D %S'; 13 | 14 | # DVI / PDF 15 | $dvipdf = 'dvipdfmx %O -o %D %S'; 16 | $pdf_mode = 3; 17 | 18 | # preview 19 | $pvc_view_file_via_temporary = 0; 20 | if ($^O eq 'linux') { 21 | $dvi_previewer = "xdg-open %S"; 22 | $pdf_previewer = "xdg-open %S"; 23 | } elsif ($^O eq 'darwin') { 24 | $dvi_previewer = "open %S"; 25 | $pdf_previewer = "open %S"; 26 | } else { 27 | $dvi_previewer = "start %S"; 28 | $pdf_previewer = "start %S"; 29 | } 30 | 31 | # clean up 32 | $clean_full_ext = "%R.synctex.gz" -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # tanuking551/cytex-texlive 2 | # https://hub.docker.com/r/tanuking551/cytex-texlive 3 | 4 | FROM ubuntu:24.04 5 | 6 | ENV DEBIAN_FRONTEND=noninteractive 7 | 8 | RUN apt-get update && apt-get install -y 9 | 10 | # install texlive 11 | RUN apt-get install -y \ 12 | evince \ 13 | latexmk \ 14 | language-pack-ja \ 15 | texlive-latex-base \ 16 | texlive-lang-japanese \ 17 | texlive-latex-recommended \ 18 | texlive-latex-extra \ 19 | texlive-fonts-recommended \ 20 | texlive-extra-utils \ 21 | xzdec 22 | 23 | RUN apt-get install -y \ 24 | cpanminus \ 25 | make \ 26 | perl 27 | 28 | # install utilities 29 | RUN apt-get install -y \ 30 | git \ 31 | wget 32 | 33 | # clean up 34 | RUN rm -rf /var/lib/apt/lists/* \ 35 | && apt-get clean 36 | 37 | 38 | RUN tlmgr init-usertree 39 | # RUN kanji-config-updmap-sys ipaex 40 | 41 | CMD ["bash"] 42 | 43 | # RUN cpanm Log::Log4perl Log::Dispatch::File YAML::Tiny File::HomeDir Unicode::GCString 44 | # RUN cpan install Log::Log4perl File::HomeDir -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cytex", 3 | "dockerComposeFile": "docker-compose.yml", 4 | "service": "cytex-texlive", 5 | "workspaceFolder": "/workspaces/CyTeX", 6 | "shutdownAction": "stopCompose", 7 | "customizations": { 8 | "vscode": { 9 | "settings": { 10 | "extensions.verifySignature": false 11 | }, 12 | "extensions": [ 13 | "james-yu.latex-workshop", 14 | "MS-CEINTL.vscode-language-pack-ja", 15 | "mhutchie.git-graph", 16 | "eamodio.gitlens" 17 | ] 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.devcontainer/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | cytex-texlive: 3 | image: ran350/cytex-texlive:0.1.0 4 | # build: . # if you want to build the image locally 5 | volumes: 6 | - ../:/workspaces/CyTeX 7 | - ./.latexmkrc:/root/.latexmkrc 8 | tty: true 9 | environment: 10 | SHELL: "/bin/bash" 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.dvi 3 | *.fdb_latexmk 4 | *.fls 5 | *.synctex.gz 6 | *.log 7 | 8 | .DS_Store 9 | 10 | out/* 11 | !out/*.pdf -------------------------------------------------------------------------------- /.vscode/latex.json.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | // Place your snippets for latex here. Each snippet is defined under a snippet name and has a prefix, body and 3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: 4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 5 | // same ids are connected. 6 | // Example: 7 | // "Print to console": { 8 | // "prefix": "log", 9 | // "body": [ 10 | // "console.log('$1');", 11 | // "$2" 12 | // ], 13 | // "description": "Log output to console" 14 | // } 15 | "deviding-line": { 16 | "prefix": "dividing-line", 17 | "body": [ 18 | "% -------------------------------------------------------- % " 19 | ], 20 | "description": "区切り線" 21 | }, 22 | "itemize": { 23 | "prefix": "itemize", 24 | "body": [ 25 | "\\begin{itemize}", 26 | " \\item $1", 27 | "\\end{itemize}" 28 | ], 29 | "description": "箇条書き" 30 | }, 31 | "input-soruce-code": { 32 | "prefix": "input-source-code", 33 | "body": [ 34 | "\\begin{figure}[tb]", 35 | " \\centering", 36 | " \\lstinputlisting[caption=$1, label=list:$2]{$3}", 37 | "\\end{figure}" 38 | ], 39 | "description": "ソースコードの読み込み" 40 | }, 41 | "source-code": { 42 | "prefix": "source-code", 43 | "body": [ 44 | "\\begin{figure}[tb]", 45 | "\\begin{lstlisting}[language=$1, caption={$2}, label={list:$3}]", 46 | "$4", 47 | "\\end{lstlisting}", 48 | "\\end{figure}" 49 | ], 50 | "description": "ソースコード" 51 | }, 52 | "minted-source-code": { 53 | "prefix": "minted-source-code", 54 | "body": [ 55 | "\\begin{listing}[tb]", 56 | "\\begin{minted}[bgcolor=bg]{$1}", 57 | "$2", 58 | "\\end{minted}", 59 | "\\caption{$3}", 60 | "\\label{list:$4}", 61 | "\\end{listing}" 62 | ], 63 | "description": "色付きソースコード" 64 | }, 65 | "figure": { 66 | "prefix": "figure", 67 | "body": [ 68 | "\\begin{figure}[tb]", 69 | " \\centering", 70 | " \\includegraphics[clip,width=$1]{assets/$2.png}", 71 | " \\caption{$3}", 72 | " \\label{fig:$4}", 73 | "\\end{figure}" 74 | ], 75 | "description": "図" 76 | }, 77 | "row-figure": { 78 | "prefix": "row-figure", 79 | "body": [ 80 | "\\begin{figure}[tb]", 81 | " \\begin{minipage}{0.5hsize}", 82 | " \\centering", 83 | " \\includegraphics[width=70mm]{$1}", 84 | " \\caption{$2}", 85 | " \\label{fig:$3}", 86 | " \\end{minipage}", 87 | " \\begin{minipage}{0.5hsize}", 88 | " \\centering", 89 | " \\includegraphics[width=70mm]{$4}", 90 | " \\caption{$5}", 91 | " \\label{fig:$6}", 92 | " \\end{minipage}", 93 | "\\end{figure}" 94 | ], 95 | "description": "横並びの図" 96 | }, 97 | "formula": { 98 | "prefix": "formula", 99 | "body": [ 100 | "\\begin{eqnarray}", 101 | " $1", 102 | "\\end{eqnarray}" 103 | ], 104 | "description": "数式" 105 | }, 106 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click", 3 | "latex-workshop.latex.outDir": "./out", 4 | "latex-workshop.latex.autoBuild.run": "onSave", 5 | "latex-workshop.formatting.latex": "latexindent", 6 | "editor.wordSeparators": "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~? 、。「」【】『』()!?てにをはがのともへでや", 7 | "latex-workshop.latex.tools": [ 8 | // latexmk を利用した uplatex によるビルドコマンド 9 | { 10 | "name": "Latexmk (upLaTeX)", 11 | "command": "latexmk", 12 | "args": [ 13 | "-f", 14 | "-gg", 15 | "-synctex=1", 16 | "-interaction=nonstopmode", 17 | "-file-line-error", 18 | "-outdir=%OUTDIR%", 19 | "%DOC%" 20 | ] 21 | }, 22 | // latexmk を利用した platex によるビルドコマンド 23 | // 古い LaTeX のテンプレートを使いまわしている (ドキュメントクラスが jreport や jsreport ) 場合のため 24 | { 25 | "name": "Latexmk (pLaTeX)", 26 | "command": "latexmk", 27 | "args": [ 28 | "-f", 29 | "-gg", 30 | "-pv", 31 | "-latex='platex'", 32 | "-latexoption='-kanji=utf8 -no-guess-input-env'", 33 | "-synctex=1", 34 | "-interaction=nonstopmode", 35 | "-file-line-error", 36 | "%DOC%" 37 | ] 38 | }, 39 | ], 40 | // latex-workshop.latex.recipes: Recipe の定義 41 | "latex-workshop.latex.recipes": [ 42 | // LaTeX(upLaTeX) で書かれた文書のビルドレシピ 43 | { 44 | "name": "upLaTeX", 45 | "tools": [ 46 | "Latexmk (upLaTeX)" 47 | ] 48 | }, 49 | // LaTeX(pLaTeX) で書かれた文書のビルドレシピ 50 | { 51 | "name": "pLaTeX", 52 | "tools": [ 53 | "Latexmk (pLaTeX)" 54 | ] 55 | }, 56 | ], 57 | // latex-workshop.latex.magic.args: マジックコメント付きの LaTeX ドキュメントをビルドする設定 58 | // '%!TEX' で始まる行はマジックコメントと呼ばれ、LaTeX のビルド時にビルドプログラムに解釈され、 59 | // プログラムの挙動を制御する事ができる。 60 | // 参考リンク: https://blog.miz-ar.info/2016/11/magic-comments-in-tex/ 61 | "latex-workshop.latex.magic.args": [ 62 | "-f", 63 | "-gg", 64 | "-pv", 65 | "-synctex=1", 66 | "-interaction=nonstopmode", 67 | "-file-line-error", 68 | "%DOC%" 69 | ], 70 | // latex-workshop.latex.clean.fileTypes: クリーンアップ時に削除されるファイルの拡張子 71 | // LaTeX 文書はビルド時に一時ファイルとしていくつかのファイルを生成するが、最終的に必要となるのは 72 | // PDF ファイルのみである場合などが多い。また、LaTeX のビルド時に失敗した場合、失敗時に生成された 73 | // 一時ファイルの影響で、修正後のビルドに失敗してしまう事がよくある。そのため、一時的なファイルを 74 | // 削除する機能 (クリーンアップ) が LaTeX Workshop には備わっている。 75 | "latex-workshop.latex.clean.fileTypes": [ 76 | "*.aux", 77 | "*.bbl", 78 | "*.blg", 79 | "*.idx", 80 | "*.ind", 81 | "*.lof", 82 | "*.lot", 83 | "*.out", 84 | "*.toc", 85 | "*.acn", 86 | "*.acr", 87 | "*.alg", 88 | "*.glg", 89 | "*.glo", 90 | "*.gls", 91 | "*.ist", 92 | "*.fls", 93 | "*.log", 94 | "*.fdb_latexmk", 95 | "*.synctex.gz", 96 | // for Beamer files 97 | "_minted*", 98 | "*.nav", 99 | "*.snm", 100 | "*.vrb", 101 | ], 102 | // latex-workshop.view.pdf.viewer: PDF ビューアの開き方 103 | // VSCode 自体には PDF ファイルを閲覧する機能が備わっていないが、 104 | // LaTeX Workshop にはその機能が備わっている。 105 | // "tab" オプションを指定すると、今開いているエディタを左右に分割し、右側に生成されたPDFを表示するようにしてくれる 106 | // この PDF ビュアーは LaTeX のビルドによって更新されると同期して内容を更新してくれる。 107 | "latex-workshop.view.pdf.viewer": "tab", 108 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |