# Slidy2-modified **Repository Path**: hz838/Slidy2-modified ## Basic Information - **Project Name**: Slidy2-modified - **Description**: 修改版的Slidy2,增加了左右箭头和鼠标滚轮的支持 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-12-07 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Slidy2修改版 基于W3C的[Slidy2](https://www.w3.org/Talks/Tools/Slidy2/#(1)),增加了: - 上下箭头按键翻页功能(从而兼容了很大一部分无线PPT翻页器) - 鼠标滚轮翻页功能(代码在`js`最末尾不喜欢可以直接删除) ## 版权 Slidy2是W3C开发的一种在HTML网页中运用`javascript`和`css`实现类似幻灯片播放效果的工具。 其原始版权声明为: By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the work or portions thereof, including modifications: - The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. - Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included. - Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)." ## 与pandoc结合使用 使用`pandoc`工具将`markdown`,`reST`等标记语言转化为`Slidy`幻灯片,需要增加一部分`pandoc`特定的语法。 以`markdown`为例: 文件开头增加以下信息: ``` %幻灯片标题 %作者姓名 %幻灯片日期 ``` 可以使用``##``作为每一页幻灯片起始的标题级别,如果某一页幻灯片需要分阶段放出则增加一行: ``` . . . ``` 需要逐步放出的列表需要使用```incremental``控制,如下: ```markdown ::: incremental - 逐步放出的列表项 - Markdown列表项 - 列表项里面插入公式 - 公式:$\mathbb{R}$ ::: ``` 最终使用pandoc转换的命令为: ``` pandoc -t slidy -s test.md -o test.html --mathml --slide-level 2 -s -V slidy-url='./Slidy2' ``` 注意事项: - ``--mathml``将数学公式转化成了`MathML`格式,也可以选择``--mathjax``。 - ``--slide-level 2``设置``##``标记新的一页幻灯片,也可以更改这一层级为3等其他数字。 - ``-s -V slidy-url='./Slidy2'``给出了Slidy2的位置,应当在`md`文件所在目录底下建立``Slidy2``目录,将本项目中``styles``和``scripts``两个目录复制进去。也可以去掉这一部分那就使用W3C官方的在线Slidy2,没有本项目修改增加的功能。