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

code-block: bash or console or :: #194

Closed
core-man opened this issue Apr 22, 2021 · 9 comments
Closed

code-block: bash or console or :: #194

core-man opened this issue Apr 22, 2021 · 9 comments

Comments

@core-man
Copy link
Collaborator

core-man commented Apr 22, 2021

我们用以上三种方式表示命令行

@seisman
Copy link
Owner

seisman commented Apr 22, 2021

我不理解你想表达什么

@wangliang1989
Copy link
Collaborator

他的意思可能是说rst文件里的代码块用bash、console 和::三种形式表示

@core-man
Copy link
Collaborator Author

他的意思可能是说rst文件里的代码块用bash、console 和::三种形式表示

yes,我们在地震学教程基本上只用::语法

@seisman
Copy link
Owner

seisman commented Apr 23, 2021

这个是历史遗留问题。上一个大版本里,手册是用 latex 写的,在使用 pandoc 转换的过程中自动生成了 code-block 指令。

我个人建议,对于所有SAC命令,统一采用如下语法:

.. code-block:: console
    
   SAC> r *.SAC
   SAC> p

主要原因在于:

  1. 文档里目前主要用 console 和 bash,很少用 ::,改起来方便
  2. 统一使用 console,未来也许可以对 console 做特殊设置,以专门为SAC做语法高亮。如果使用 bash 就会影响到其他脚本,使用 :: 在会影响到其他非SAC执行环境

@wangliang1989
Copy link
Collaborator

我认为可以,这个规则 @seisman 可否写到wiki里,我们改的时候好参考

@core-man
Copy link
Collaborator Author

我认为可以,这个规则 @seisman 可否写到wiki里,我们改的时候好参考

可以直接在处理 #161 的时候加进去,现在就我们三个人活跃,没必须直接加wiki里了。

@wangliang1989
Copy link
Collaborator

@seisman 你可不可以增加一节,对这类写作风格问题集中说明?

@core-man
Copy link
Collaborator Author

core-man commented Jun 5, 2021

@seisman 你可不可以增加一节,对这类写作风格问题集中说明?

这个计划写入贡献指南(#161

@seisman
Copy link
Owner

seisman commented Jun 7, 2021

code-block 已更新完成。

这一规则已经写入 wiki https://github.com/seisman/SAC_Docs_zh/wiki/%E6%96%87%E6%A1%A3%E9%A3%8E%E6%A0%BC

等以后再把 wiki 迁移到文档中。

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

3 participants