Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\ulextend 的默认参数可以再次传入么? #363

Closed
4 tasks done
muzimuzhi opened this issue Nov 23, 2021 · 4 comments
Closed
4 tasks done

\ulextend 的默认参数可以再次传入么? #363

muzimuzhi opened this issue Nov 23, 2021 · 4 comments

Comments

@muzimuzhi
Copy link
Contributor

检查 / Check

@e71828

提问

我有个问题 \ulextend{##1} 的默认参数可以再次传入么?

因为问题和原 issue 无关,我代为开一个新 issue。

@muzimuzhi
Copy link
Contributor Author

我没理解「默认参数可以再次传入么」的意思。现在 \ulextend 的定义是

\newcommand{\ulhshift}{-4em}% horizontal shift on underline
\newcommand{\ulextend}[2][350pt]{% extend underline length
\hbox to #1{\hfill\hspace*{\ulhshift}#2\hfill}}

支持的用法为

\ulextend{要添加下划线的内容}  % 相当于 \ulextend[350pt]{要添加下划线的内容}
\ulextend[200pt]{要添加下划线的内容}

想修改的是哪个默认参数?

@e71828
Copy link

e71828 commented Nov 24, 2021

我说的是350pt

我是看这个问题想到的

@muzimuzhi
Copy link
Contributor Author

通过可选参数 \ulextend[...]{...} 可以指定想要的值(和 350pt 相同或不同均可),重定义 \ulextend 才可以修改使用 \ulextend{...} 时的默认行为。以上都和 ##1 这种用法无关,因为都不涉及 "nested macro definitions"。

你提到的「再次传入」,我猜是指修改 \ulextend{...} 的默认行为。不能靠「传入」修改,必须重定义 \ulextend

@e71828
Copy link

e71828 commented Nov 24, 2021

是的,说了这么多,才终于达成了一致的理解。 致上遗憾与抱歉,请关闭这个 issue 吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants