毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 计算机安全 >> 正文

浅析trac中的wiki常用语法

更新时间:2010-3-12:  来源:毕业论文

浅析trac中的wiki常用语法
trac中定义的macro宏功能 http://127.0.0.1/trac/wiki/WikiMacros

  使用admin登录之后,可以对若干wiki文章在edit之后将read only选中,这样其他用户就是只读了

  http://localhost/trac/wiki/WikiPageNames

  1. The name must consist of alphabetic characters only. No digits,

  spaces, punctuation, or underscores are allowed.

  2. A name must have at least two capital letters.

  3. The first character must be capitalized.

  4. Every capital letter must be followed by one or more lower-case

  letters.

  5. The use of slash ( / ) is permitted in page names (possibly

  representing a hierarchy).

  wiki的page名字只能包含字母,不能含有数字和符号,

  同时名字至少有2个大写字母,第1个字母必须大写

  每一个大写字母后面至少要跟一个小写字母

  (((如果你的page名字没有按照上面规则命名,那么将不能直接被wiki链接到,

  需要明确的使用[wiki:名字]来建立链接)))

  建立链接一个新的wiki名为Gliethttp,表面提示字符为'大家好',第1个字母必须大写

  [wiki:Gliethttp 大家好]

  如果page名字含有空格,需要输入""

  [wiki:"Space Matters"]

  显示名为MoinMoin的超链接

  [http://moinmo.in/ MoinMoin]

  相对跳转

  [#Relativelinks relative links]

  在标题中使用#label名字,来打一个label,类似于c语言中label:,然后goto label跳转,

  这里使用内容所在page名字#label名字来跳转.

  === Explicit id === #using-explicit-id-in-heading

  == Subheading #sub2

  [wiki:WikiFormatting#sub2 WikiFormatting]

  其中QuotingspaceinTracLinks为链接本page的标题为quoting space in TracLinks的局部label链接

  其实#后面的内容就是去掉空格的字符串,如果含有大写,那么#后的第1个字母必须变为大写,如果全是小写,就没有必要了

  [#QuotingspaceinTracLinks quoting space in TracLinks]

  [#attachment:links attachment: links]在本page之内标题之间直接跳转

  [wiki:TracLinks#attachment:links]在本page跳转到另外一个page的标题处

  显示所有wiki文章,使用WikiMacros内部定义的宏处理函数

  [[TitleIndex(format=group,min=4)]]

  代码高亮显示

  Code Highlighting Support

  #!c (C), #!cpp (C++), #!python (Python), #!perl (Perl), #!ruby (Ruby), #!php (PHP), #!asp (ASP), #!java (Java), #!js (Javascript), #!sql (SQL), #!xml (XML or HTML), #!sh (Bourne/Bash? shell), etc.

  {{{

  #!c

  static void delete_pid(void)

  {

  unlink(HALD_PID_FILE);

  }

  }}}

  嵌入html脚本

  {{{

  #!html

  <h1 style="color: grey">This is raw HTML</h1>

  }}}

  按时间顺序显示wiki

  [[RecentChanges]]

  跳转到按日期排列的wiki中

  [RecentChanges Index by Date]

  只显示最新的3条数据

  [[RecentChanges(Trac,3)]]

  超连接到ticket#1,提示字符为This is a link to ticket number one

  [ticket:1 This is a link to ticket number one]

  [ticket:5000-6000] 显示号为5000-6000之间的所有ticket

  [ticket:1,150] 显示1和150号ticket

  类似的版本号

  [12,30:50]

  [12,30:50/trunk/tools]

  r12:20

  链接到127.0.0.1/register目录

  [//register Register Here]

  链接到http://127.0.0.1/trac/newticket页面

  [/newticket Create a new ticket]

  链接到http://127.0.0.1/trac/页面

  [/ home]

  根据标题建立索引目录,比如== Font Styles ==就是一个索引,其中索引目录标题

  为:Markup Categories

  [[PageOutline(2,Markup Categories,inline)]]

  右上角建立一个黄色的索引表

  [[PageOutline]]

  右上角显示GuideToc黄色索引表

  [[TracGuideToc]]

  强制加入换行,类似'\n'

  [[BR]]

  标题

  = WikiFormatting =

  附件

  attachment:the_file.txt creates a link to the attachment the_file.txt of the current object

  attachment:the_file.txt:wiki:MyPage creates a link to the attachment the_file.txt of the MyPage wiki page

  attachment:the_file.txt:ticket:753 creates a link to the attachment the_file.txt of the ticket 753

  其实上面就是一个link链接路径,就像一个page一样,所以可以使用下面的链接方法

  [attachment:b2t绿色串口.exe:wiki:GxTx b2t绿色串口.exe]

  链接图片

  [[Image(wiki:WikiFormatting:picture.gif)]] (referring to attachment on

  another page)

  [[Image(ticket:1:picture.gif)]] (file attached to a ticket)

  [[Image(htdocs:picture.gif)]] (referring to a file inside project htdocs)

  [[Image(source:/trunk/trac/htdocs/trac_logo_mini.p ng)]] (a file in

  repository)

  * 加入"项目符号"--黑圆点

  * 加入下一级的"项目符号"

  ---- 一条长横线

  '''粗体'''

  ''斜体''

  __下划线__

  ~~删除线~~

  ^上标^

  ,,下标,,

  使用>来建立彩色竖线级联列表

  >> Someone's original text

  > Someone else's reply text

  > * which can be any kind of Wiki markup

  加!号,表示后面紧跟的一个字符非wiki使用

  ![42]

  不要为!后面的数据自动建立链接

  !WikiPageLink

  {{{内容不被wiki语法解释}}}

  或者

  `内容不被wiki语法解释`

  {{{

  可以写上我们的source code,然后将以一个表的形式显示出我们的sourcecode代码

  }}}

  返回到父目录的..

  [..]

  建立tables

  ||Cell 1||Cell 2||Cell 3||

  ||Cell 4||Cell 5||Cell 6||

  建立多行表

  || ||= stable =||= latest =||

  ||= 0.10 =|| 0.10.5 || 0.10.6dev||

  ||= 0.11 =|| 0.11.6 || 0.11.7dev||

浅析trac中的wiki常用语法下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。