XiaoMaColtAI/math-modeling-skill / dsh-plugin/math-modeling-agent/skills/math-modeling/references/roles/编程手
编程手
Verified数学建模的 Python 或 MATLAB 实现、运行、表格输出、可视化和复现阶段。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.3 KB |
| references/MATLAB规范.md | markdown | 3.4 KB |
| references/工作流程.md | markdown | 9.9 KB |
| references/质检清单.md | markdown | 4.2 KB |
| scripts/apply_publication_style.m | other | 2.2 KB |
| scripts/audit_publication_figure.m | other | 3.4 KB |
| scripts/check_env.py | script | 2.7 KB |
| scripts/check_matlab_env.m | other | 1.3 KB |
| scripts/export_publication_figure.m | other | 1.4 KB |
| scripts/figure_audit.py | script | 7.1 KB |
| scripts/plot_style.py | script | 16.8 KB |
| scripts/repro_manifest.py | script | 4.2 KB |
scripts/apply_publication_style.m
View on GitHubfunction style = apply_publication_style(fig, language, widthProfile)
%APPLY_PUBLICATION_STYLE 为数学建模论文图应用统一出版样式。
arguments
fig (1,1) matlab.ui.Figure
language (1,1) string {mustBeMember(language,["zh","en"])} = "zh"
widthProfile (1,1) string {mustBeMember(widthProfile,["single","double","report"])} = "report"
end
widths = struct("single", 3.5, "double", 7.2, "report", 6.3);
fontName = chooseFont(language);
colors = [
0.0000 0.4471 0.6980
0.9020 0.6235 0.0000
0.0000 0.6196 0.4510
0.8353 0.3686 0.0000
0.8000 0.4745 0.6549
0.3373 0.7059 0.9137
0.4196 0.4471 0.5020
];
widthIn = widths.(widthProfile);
fig.Units = "inches";
fig.Position(3:4) = [widthIn, widthIn * 0.62];
fig.Color = "white";
set(fig, "DefaultAxesFontName", fontName, ...
"DefaultAxesFontSize", 7.5, ...
"DefaultAxesLineWidth", 0.7, ...
"DefaultAxesTitleFontSizeMultiplier", 1.0, ...
"DefaultAxesTitleFontWeight", "normal", ...
"DefaultAxesLabelFontSizeMultiplier", 1.0, ...
"DefaultAxesColorOrder", colors, ...
"DefaultLineLineWidth", 1.1, ...
"DefaultLineMarkerSize", 3.5, ...
"DefaultLegendBox", "off");
axesList = findall(fig, "Type", "axes");
for k = 1:numel(axesList)
axesList(k).FontName = fontName;
axesList(k).FontSize = 7.5;
axesList(k).LineWidth = 0.7;
axesList(k).TitleFontSizeMultiplier = 1.0;
axesList(k).TitleFontWeight = "normal";
axesList(k).LabelFontSizeMultiplier = 1.0;
axesList(k).ColorOrder = colors;
axesList(k).Box = "off";
grid(axesList(k), "off");
end
style = struct("font", fontName, "colors", colors, ...
"sizeInches", [widthIn, widthIn * 0.62]);
end
function fontName = chooseFont(language)
fonts = string(listfonts);
if language == "zh"
candidates = ["Noto Sans CJK SC","Source Han Sans SC", ...
"Microsoft YaHei","SimHei","PingFang SC"];
else
candidates = ["Arial","Helvetica","Times New Roman"];
end
fontName = "Helvetica";
for candidate = candidates
if any(strcmpi(fonts, candidate))
fontName = candidate;
return;
end
end
warning("未找到首选字体,导出后必须检查中文与特殊符号是否缺字。");
end
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |