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

ctxdoc: verbatim 模块的行距有误 #303

Closed
stone-zeng opened this issue Aug 2, 2017 · 1 comment
Closed

ctxdoc: verbatim 模块的行距有误 #303

stone-zeng opened this issue Aug 2, 2017 · 1 comment
Assignees
Labels

Comments

@stone-zeng
Copy link
Member

如下图所示,%<<COMMENT%COMMENT 所在行上方间距偏小。

default

(来源:xpinyin.pdf

问题可能出在 \@@_module_verb:w\l_@@_verbatim_line_tl 最后带一个回车符 ^^M ,直接输出该
token list 会使行距按照 \footnotesize 更新,比正常代码行偏小。

我目前的解决方案是先把 \l_@@_verbatim_line_tl 最后的 ^^M 去掉,输出之后再补上一个 \par

@stone-zeng
Copy link
Member Author

给一个 MWE:

% \iffalse
%<*driver>
\documentclass{ctxdoc}
\begin{document}
  \DocInput{\jobname.tex}
\end{document}
%</driver>
% \fi
%
%    \begin{macrocode}
\newcommand\foo{bar}
%<<TAG
Some code
%TAG
\newcommand\bar{foo}
\renewcommand\foo{bar}
%<*test>
Some code
%</test>
\renewcommand\bar{foo}
%    \end{macrocode}
% \Finale

第 2、4 两行往上偏了一点。
default

@qinglee qinglee closed this as completed in 0f21e62 Aug 7, 2017
@qinglee qinglee self-assigned this Aug 9, 2017
@qinglee qinglee added the bug label Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants