Files
SuperDerive/examples/subst-chain.tex
T
dela 5b24eba3c8 feat: fill test coverage gaps + fix \sdcol i18n labels
- examples/subst-chain.tex: substitution walkthrough with \sdbox/\sdsubst/\sdstep
- examples/antipatterns.tex: four compile-clean-but-teach-false figures
- tests/invalid/step-outside-row.tex, empty-row.tex, undeclared-role.tex,
  two-contrast-pkg.tex: negative fixtures for package-level warnings
- test.sh: add tests/invalid/ loop
- build.sh: allow superderive-build: allow directive to suppress
  intentional warnings in antipatterns galleries
- superderive.sty: \sdcol respects [en] option for illegal/legal labels
- references/api.md: complete rewrite, all ~12 macros documented
2026-08-22 10:13:36 +08:00

24 lines
702 B
TeX

% Golden example -- a subst chain that must be seen, not just aligned.
% ../scripts/build.sh subst-chain.tex
\documentclass[border=10pt]{standalone}
\usepackage[cjk]{superderive}
\sdsetrole{live}{sdTeal}
\begin{document}
\begin{tikzpicture}
\sdstage{D1}{换元让积分内部对齐}
\sdrow{R1}
\sdbox[role=keep]{x}{$u$}
\sdsubst[role=live]{s1}{u}{x^2}
\sdstep[role=rewrite]{s2}{\int_0^1 x\,e^{x^2}\,dx}{\tfrac12\int_0^1 e^u\,du}
\sdrowend
\sdbbox{all}
\sdtopformula{F}{$\int_0^1 x\,e^{x^2}\,dx = \tfrac12\int_0^1 e^u\,du$}
\sdmeaningbox{mb}{120mm}{all}
{换元是恒等改写,不改值}
{令 $u=x^2$,则 $du=2x\,dx$}
{上下限随 $u$ 一起换掉}
\end{tikzpicture}
\end{document}