diff --git a/.gitattributes b/.gitattributes index 2a9441e2..6cde586e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -22,7 +22,10 @@ sjtuvi.sty linguist-generated=true beamerfontthemesjtubeamer.sty linguist-generated=true beamerouterthemesjtubeamer.sty linguist-generated=true sjtucover.sty linguist-generated=true + +# l3build generated file sjtubeamer.code-snippets linguist-generated=true +MANIFEST.md linguist-generated=true # regression test target file *.tlg linguist-generated=true \ No newline at end of file diff --git a/.github/ci/build_contrib.sh b/.github/ci/build_contrib.sh index a1400475..0fa2b78f 100755 --- a/.github/ci/build_contrib.sh +++ b/.github/ci/build_contrib.sh @@ -10,7 +10,7 @@ do latexmk $@ $theme.tex -shell-escape cp $theme.pdf build/$theme.pdf echo Compiling $theme preview ... - sed -e "s||$theme|g" src/doc/contrib.template.tex > build/contrib.$theme.tex + sed -e "s||$theme|g" src/support/contrib.template.tex > build/contrib.$theme.tex latexmk $@ -outdir=build build/contrib.$theme.tex echo Converting $theme to png... convert -verbose -density 500 -resize '1280' build/contrib.$theme.pdf build/contrib.$theme.png diff --git a/.github/ci/build_package.sh b/.github/ci/build_package.sh index 00906d44..f50a8d64 100755 --- a/.github/ci/build_package.sh +++ b/.github/ci/build_package.sh @@ -1,8 +1,12 @@ #!/bin/bash cd src -l3build ctan + # This will trigger checkinit_hook() to move the files to the root directory. +l3build ctan +l3build cache-demo # cache demos for making the next ctan process faster +l3build manifest +l3build ctan cd .. .github/ci/copy_resources.sh diff --git a/.github/ci/gen_cover.sh b/.github/ci/gen_cover.sh index 04cc9e8a..153dcee6 100755 --- a/.github/ci/gen_cover.sh +++ b/.github/ci/gen_cover.sh @@ -5,17 +5,17 @@ set -e mkdir -p build # covers -sed -e "s||red,light|g" src/doc/cover.template.tex > build/cover-red-light.tex -sed -e "s||red,dark|g" src/doc/cover.template.tex > build/cover-red-dark.tex -sed -e "s||blue,light|g" src/doc/cover.template.tex > build/cover-blue-light.tex -sed -e "s||blue,dark|g" src/doc/cover.template.tex > build/cover-blue-dark.tex +sed -e "s||red,light|g" src/support/cover.template.tex > build/cover-red-light.tex +sed -e "s||red,dark|g" src/support/cover.template.tex > build/cover-red-dark.tex +sed -e "s||blue,light|g" src/support/cover.template.tex > build/cover-blue-light.tex +sed -e "s||blue,dark|g" src/support/cover.template.tex > build/cover-blue-dark.tex # compile covers latexmk $@ -outdir=build build/cover-*.tex # copy cover main file with removed last line -cp -f src/doc/cover.tex build/cover.tex -sed -e "s|\\\end{document}||g" src/doc/cover.tex > build/cover.tex +cp -f src/support/cover.tex build/cover.tex +sed -e "s|\\\end{document}||g" src/support/cover.tex > build/cover.tex # contrib for theme in contrib/*; diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5eeb96e4..120e3c17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,7 +96,8 @@ jobs: - uses: xu-cheng/texlive-action/full@v1 with: run: | - apk add diffutils git make + apk add diffutils findutils git make + git config --global --add safe.directory /github/workspace make format-dev - name: check if generated files are of latest version run: | diff --git a/.github/workflows/contrib.yml b/.github/workflows/contrib.yml index 51724bda..0b15d627 100644 --- a/.github/workflows/contrib.yml +++ b/.github/workflows/contrib.yml @@ -8,6 +8,8 @@ on: branches: - main - develop + types: + - 'review_requested' paths: - 'contrib/**' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2108e093..20116730 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,3 +114,12 @@ jobs: asset_path: src/build/distrib/ctan/sjtubeamer/sjtubeamer.pdf asset_name: sjtubeamer.pdf asset_content_type: application/pdf + - name: add quickstart + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: src/build/distrib/ctan/sjtubeamer/sjtubeamerquickstart.pdf + asset_name: sjtubeamerquickstart.pdf + asset_content_type: application/pdf \ No newline at end of file diff --git a/.vscode/sjtubeamer.code-snippets b/.vscode/sjtubeamer.code-snippets index dd8fe41b..0febbef2 100644 --- a/.vscode/sjtubeamer.code-snippets +++ b/.vscode/sjtubeamer.code-snippets @@ -33,73 +33,73 @@ "scope": "doctex,tex,latex", "prefix": "\\bgcenterbox", "body": "\\bgcenterbox{$1}", - "description": "Define a command to make a centered background box easily.\n" + "description": " Define a command to make a centered\n background box easily.\n" }, "coverpage": { "scope": "doctex,tex", "prefix": "\\coverpage", "body": "\\coverpage{$1}", - "description": "Common command for \\titlepage and \\bottompage, and more.\n" + "description": " Common command for \\titlepage and\n \\bottompage, and more.\n" }, "definecover": { "scope": "doctex,tex", "prefix": "\\definecover", "body": "\\definecover{$1}", - "description": "Command generator for \\maketitle and \\makebottom. Redefinition on \\beamer@writeslideentrty locally will remove the corresponding navigation dot for miniframe outer theme.\nThis command receives one parameter for the cover type like ``title'' or ``bottom''.\n" + "description": " Command generator for \\maketitle\n and \\makebottom.\n This command receives one parameter for\n the cover type like ``title'' or\n ``bottom''.\n" }, "bibliolist": { "scope": "doctex,tex,latex", "prefix": "\n\\begin{bibliolist", "body": "\n\\begin{bibliolist}{$1}\n\t$2\n\\end{bibliolist}\n", - "description": "Create a bibliography list manually with \\item patched for \\newblock. \nYou can just use \\item without \\newblock command, or you could use \\newblock with \\articleitem, \\bookitem, \\onlineitem.\nThe mandantory parameter (usually 00) indicates the widest label among items, if you want to indicate the item label seperately.\n" + "description": " Create a bibliography list manually with\n \\item patched for \\newblock. \n\n You can just use \\item without\n \\newblock command, or you could use\n \\newblock with \\articleitem,\n \\bookitem, \\onlineitem.\n\n The mandantory parameter (usually 00)\n indicates the widest label among items,\n if you want to indicate the item label\n seperately.\n" }, "highlight": { "scope": "doctex,tex,latex", "prefix": "\\highlight", "body": "\\highlight<$3>[${1:structure}]{$2}", - "description": "Highlight the given text. Create a structure color background block with white text.\nReceives one optional paramenter to specify the background color. If you want to modify the color of the text, use \\color{} command or \\textcolor{}{} command for your text.\nFor a general use and better control, use \\colorbox{}{} from xcolor directly.\nOverlay option can be specified as well.\n" + "description": " Highlight the given text.\n\n Create a structure color\n background block with white text.\n\n Receives one optional paramenter to\n specify the background color.\n If you want to modify the color of the\n text, use \\color{} command or\n \\textcolor{}{} command for your text.\n\n For a general use and better control,\n use \\colorbox{}{} from xcolor\n directly.\n\n Overlay option can be specified as well.\n" }, "paragraph": { "scope": "doctex,tex,latex", "prefix": "\\paragraph", "body": "\\paragraph{$1}", - "description": "Making a new paragraph through dark background color and white forground, which confirms the visual identity system on making use of vi shapes.\nSince beamer has deleted \\paragraph macro in this class, this template defines a macro for that to indicate it is another point and more paragraph-like. It is useful for the migration from article class.\nIf it is the end of paragraph, the trailing space will be removed by \\TeX{}. The additional newline after this command will be get an output rather than the original sectioning command.\n" + "description": " Making a new paragraph through dark\n background color and white forground,\n which confirms the visual identity\n system on making use of vi shapes.\n\n Since beamer has deleted \\paragraph\n macro in this class, this template\n defines a macro for that to indicate it\n is another point and more\n paragraph-like.\n\n It is useful for the migration from\n article class.\n If it is the end of paragraph, the\n trailing space will be removed by\n \\TeX{}.\n The additional newline after this\n command will get an output rather\n than the original sectioning command.\n" }, "stampbox": { "scope": "doctex,tex,latex", "prefix": "\n\\begin{stampbox", "body": "\n\\begin{stampbox}[${1:cprimary}]\n\t$2\n\\end{stampbox}\n", - "description": "Make a box with stampline border.\nThe optional paramter indicates the color of the border line.\n" + "description": " Make a box with stampline border.\n\n The optional paramter indicates the\n color of the border line.\n" }, "stamphrule": { "scope": "doctex,tex,latex", "prefix": "\\stamphrule", "body": "\\stamphrule[${1:cprimary}]", - "description": "Insert a stampline with the length textwidth.\nThe optional paramter indicates the color of the stampline.\n" + "description": " Insert a stampline with the length\n textwidth.\n \n The optional paramter indicates the\n color of the stampline.\n" }, "stampblock": { "scope": "doctex,tex,latex", "prefix": "\n\\begin{stampblock", "body": "\n\\begin{stampblock}<$3>[${1:}]{$2}\n\t$3\n\\end{stampblock}\n", - "description": "Create a block with title decorated by the stamp shape with incremental numbering.\nA mandantory parameter is needed for the title.\nAn optional parameter is for the customized numbering.\nOverlay could be specified. In this scenario, the optional parameter must be specified in case of the unexpected increment of the counter.\n" + "description": " Create a block with title decorated by\n the stamp shape with incremental\n numbering.\n\n A mandantory parameter is needed for\n the title.\n\n An optional parameter is for the\n customized numbering.\n\n Overlay could be specified.\n In this scenario, the optional parameter\n must be specified in case of the\n unexpected increment of the counter.\n" }, "codeblock": { "scope": "doctex,tex,latex", "prefix": "\n\\begin{codeblock", "body": "\n\\begin{codeblock}[${1:}]{$2}\n\t$3\n\\end{codeblock}\n", - "description": "Code block environment is made for presenting code in an obvious way.\nThe first optional parameter is passed to listing, which mostly sets the language to highlight, see the listings package for more details. \nThe second required parameter receives the title to make.\nADVANCED TIP: For longer typeset, use lstlisting environment directly and remove the frame environment around the code input for occupying cross the pages. No numbering is preset so you need to set the number manually for this basic command.\n" + "description": " Code block environment is made for\n presenting code in an obvious way.\n\n The first optional parameter is passed\n to listing, which mostly sets the\n language to highlight, see the\n listings package for more details.\n\n The second required parameter receives\n the title to make.\n\n ADVANCED TIP:\n For longer typeset, use lstlisting\n environment directly and remove the\n frame environment around the code\n input for occupying cross the pages.\n No numbering is preset so you need to\n set the number manually for this basic\n command.\n" }, "highlightline": { "scope": "doctex,tex,latex", "prefix": "\\highlightline", "body": "\\highlightline<$1>", - "description": "Highlight the current line with a light background. \nIt is useful for the codeblock environment with escapechar option to insert the command for highlighting. For example, set the optional argument escapechar=|, and insert |\\highlightline| at the first position in the line you want to highlight.\nYou could use overlay specification for this macro.\n" + "description": " Highlight the current line with a light\n background.\n \n It is useful for the codeblock environment\n with escapechar option to insert the\n command for highlighting.\n\n For example, set the optional argument\n escapechar=|, and insert\n |\\highlightline| at the first position\n in the line you want to highlight.\n\n You could use overlay specification\n for this macro.\n" }, "codeblockinput": { "scope": "doctex,tex,latex", "prefix": "\\codeblockinput", "body": "\\codeblockinput[${1:}]{$2}{$3}", - "description": "Code block environment for external file input. The same style like codeblock.\nThe first optional parameter is passed to listing.\nThe second required parameter receives the title to make.\nThe third required paramter receives the file to typeset.\nADVANCED TIP: For longer typeset, use lstinputlisting command directly and remove the frame environment around the code input for occupying cross the pages. No numbering is preset so you need to set the number manually for this basic command.\n" + "description": " Code block environment for external file\n input. The same style like codeblock.\n\n The first optional parameter is passed\n to listing.\n\n The second required parameter receives\n the title to make.\n\n The third required paramter receives the\n file to typeset.\n\n ADVANCED TIP:\n For longer typeset, use\n \\lstinputlisting\n command directly and remove the\n frame\n environment around the code input for\n occupying cross the pages.\n No numbering is preset so you need to\n set the number manually for this basic\n command.\n" }, "sjtubeamer@outer@nav": { "scope": "doctex,tex", @@ -117,186 +117,186 @@ "scope": "doctex,tex", "prefix": "\\sjtubeamer@cover", "body": "\\sjtubeamer@cover", - "description": "This macro selects the cover theme.\n\\begin{description}\n\\item[maxplus] The titlegraphic will be a photo.\n\\item[max] The background will be the photo.\n\\item[min] The design will be minimalistic.\n\\item[my]Reserved interface for developers for customized title page and bottom page.\n\\end{description}\n\n$\\rightarrow$ The following will demostrates how to pass options between files.\n\n$\\rightarrow$ To set up an option, use \\DeclareOptionBeamer to let beamer theme receive such an option and store the value into a variable.\n\n$\\rightarrow$ To make the variable easy to follow and avoid duplicates, the naming system is as follows:\n\\begin{itemize}\n\\item Start with the project name sjtubeamer.\n\\item Split by @ symbol and move to the next level.\n\\item The final level should be the variable name itself.\n\\end{itemize}\n" + "description": " This macro selects the cover theme.\n maxplus\n The titlegraphic will be a photo.\n max\n The background will be the photo.\n min\n The design will be minimalistic.\n my\n Reserved interface for developers for\n customized title page and bottom page.\n" }, "sjtubeamer@color": { "scope": "doctex,tex", "prefix": "\\sjtubeamer@color", "body": "\\sjtubeamer@color", - "description": "Choose the main color palette.\n\\begin{description}\n\\item[red] The red color palatte. sjtuRed*\n\\item[blue] The blue color palatte. sjtuBlue*\n\\end{description}\n\n" + "description": " Choose the main color palette.\n\n red. sjtuRed*\n blue sjtuBlue*\n" }, "sjtubeamer@lum": { "scope": "doctex,tex", "prefix": "\\sjtubeamer@lum", "body": "\\sjtubeamer@lum", - "description": "Decide whether it is in light mode or dark mode. Switch the lumination.\n" + "description": " Decide whether it is in light mode or\n dark mode. Switch the lumination.\n" }, "sjtubeamer@lang": { "scope": "doctex,tex", "prefix": "\\sjtubeamer@lang", "body": "\\sjtubeamer@lang", - "description": "Set the main language of this beamer. If the user is using ctexbeamer class, the default option will be Chinese. If the user use ctex package after using this theme, such an advanced user should specify the language to Chinese manually.\n\nTODO: may be a built in support for Chinese will be used in the future. Just taken \\RequirePackage[scheme=plain]{ctex} for basic Chinese character support.\n" + "description": " Set the main language of this beamer.\n\n If the user is using ctexbeamer\n class, the default option will be\n Chinese.\n\n If the user use ctex package after\n using this theme, such an advanced user\n should specify the language to Chinese\n manually.\n\n TODO:\n may be a built in support for Chinese\n will be used in the future. Just taken\n \\RequirePackage[scheme=plain]{ctex}\n for basic Chinese character support.\n" }, "sjtubeamer@nav": { "scope": "doctex,tex", "prefix": "\\sjtubeamer@nav", "body": "\\sjtubeamer@nav", - "description": "Choose the outer theme for this template.\n" + "description": " Choose the outer theme for this template.\n" }, "sjtubeamer@logopos": { "scope": "doctex,tex", "prefix": "\\sjtubeamer@logopos", "body": "\\sjtubeamer@logopos", - "description": "Choose the override outer logo position. No default option will get executed since it has already been executed by the selection of \\sjtubeamer@cover.\n" + "description": " Choose the override outer logo position.\n\n No default option will get executed\n since it has already been executed by\n the selection of \\sjtubeamer@cover.\n" }, "usesjtutheme": { "scope": "doctex,tex,latex", "prefix": "\\usesjtutheme", "body": "\\usesjtutheme{$1}", - "description": "You could load other contrib plugin by this command. Use comma-seperated list to load multiple sub-themes in one line. The \\getcontribpath is defined in sjtuvi package loaded in inner theme.\n\nYou could pass options to all the sub-themes by writing in the square brackets. Then, in your sub-theme, you could use \\if\\EqualOption{}{