当前位置:网站首页>程序员写PPT的小技巧
程序员写PPT的小技巧
2022-08-02 05:09:00 【大淘宝技术】

▐ 将reveal.js运行起来
git clone https://github.com/hakimel/reveal.js
<!doctype html><html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>reveal.js</title> <link rel="stylesheet" href="dist/reset.css"> <link rel="stylesheet" href="dist/reveal.css"> <link rel="stylesheet" href="dist/theme/black.css"> <!-- Theme used for syntax highlighted code --> <link rel="stylesheet" href="plugin/highlight/monokai.css"> </head> <body> <div class="reveal"> <div class="slides"> <section>Slide 1</section> <section>Slide 2</section> </div> </div> <script src="dist/reveal.js"></script> <script src="plugin/notes/notes.js"></script> <script src="plugin/markdown/markdown.js"></script> <script src="plugin/highlight/highlight.js"></script> <script> // More info about initialization & config: // - https://revealjs.com/initialization/ // - https://revealjs.com/config/ Reveal.initialize({ hash: true, // Learn about plugins: https://revealjs.com/plugins/ plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ] });</script> </body></html>
npm start -- --port=30800

▐ reveal.js step by step
<div class="reveal">
<div class="slides">
<section>Slide 1</section>
<section>Slide 2</section>
</div>
</div>
▐ 支持markdown
<section data-markdown>
<textarea data-markdown>
</textarea>
</section>
<section data-markdown>
<textarea data-markdown>
推荐系统的主要算法包括:
- 矩阵分解
- 线性模型
- 树模型
- 深度学习模型
</textarea>
</section>

▐ 换个主题
<link rel="stylesheet" href="dist/theme/black.css">
<link rel="stylesheet" href="dist/theme/beige.css">

▐ 支持数学公式
<script src="plugin/math/math.js"></script>
Reveal.initialize({
hash: true,
math: {
mathjax:
"https://cdn.jsdelivr.net/gh/mathjax/[email protected]/MathJax.js",
config: "TeX-AMS_HTML-full",
// pass other options into `MathJax.Hub.Config()`
TeX: { Macros: { RR: "{\\bf R}" } },
},
plugins: [RevealMarkdown, RevealHighlight, RevealNotes, RevealMath], });
<script src="plugin/math/math.js"></script>
<script>
Reveal.initialize({
hash: true,
math: {
mathjax:
"https://cdn.jsdelivr.net/gh/mathjax/[email protected]/MathJax.js",
config: "TeX-AMS_HTML-full",
// pass other options into `MathJax.Hub.Config()`
TeX: { Macros: { RR: "{\\bf R}" } },
},
plugins: [RevealMarkdown, RevealHighlight, RevealNotes, RevealMath],
});
</script>
<section>
\[\begin{aligned}
\ MAE(X,h)=\frac{1}{m} \sum_{i=1}^m|h(x^i)-y^{(i)}| \
\end{aligned} \]
</section>
<section data-markdown>
<textarea data-markdown>
$MAE(X,h)=\frac{1}{m} \sum_{i=1}^m|h(x^i)-y^{(i)}|$
</textarea>
</section>

▐ 代码高亮


<section>
<pre>
<code class="language-javascript">
model.compile({
optimizer: tf.train.sgd(0.000001),
loss: 'meanSquaredError'
});
return model.fitDataset(flattenedDataset, {
epochs: 10,
callbacks: {
onEpochEnd: async (epoch, logs) => {
console.log(epoch + ':' + logs.loss);
}
}
});
</code>
</pre>
</section>

<link rel="stylesheet" href="plugin/highlight/zenburn.css" />
<link rel="stylesheet" href="dist/theme/moon.css" />

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<title>reveal.js学习</title>
<link rel="stylesheet" href="dist/reset.css" />
<link rel="stylesheet" href="dist/reveal.css" />
<link rel="stylesheet" href="dist/theme/moon.css" />
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css" />
</head>
<body>
<div class="reveal">
<div class="slides">
<section>Slide 1</section>
<section>
\[\begin{aligned}
\ MAE(X,h)=\frac{1}{m} \sum_{i=1}^m|h(x^i)-y^{(i)}| \
\end{aligned} \]
</section>
<section data-markdown>
<textarea data-markdown>
推荐系统的主要算法包括:
- 矩阵分解
- 线性模型
- 树模型
- 深度学习模型
</textarea
>
</section>
<section data-markdown>
<textarea data-markdown>
$MAE(X,h)=\frac{1}{m} \sum_{i=1}^m|h(x^i)-y^{(i)}|$
</textarea>
</section>
<section>
<pre>
<code class="language-javascript">
model.compile({
optimizer: tf.train.sgd(0.000001),
loss: 'meanSquaredError'
});
return model.fitDataset(flattenedDataset, {
epochs: 10,
callbacks: {
onEpochEnd: async (epoch, logs) => {
console.log(epoch + ':' + logs.loss);
}
}
});
</code>
</pre>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script src="plugin/math/math.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
math: {
mathjax:
"https://cdn.jsdelivr.net/gh/mathjax/[email protected]/MathJax.js",
config: "TeX-AMS_HTML-full",
// pass other options into `MathJax.Hub.Config()`
TeX: { Macros: { RR: "{\\bf R}" } },
},
// Learn about plugins: https://revealjs.com/plugins/
plugins: [RevealMarkdown, RevealHighlight, RevealNotes, RevealMath],
});
</script>
</body>
</html>
▐ 背景图片
<section data-background-image="https://cdn.jsdelivr.net/www.jsdelivr.com/000a3f2b6a7baa6ae0f786a251fd105e4b230d8e/img/landing/[email protected]"> </section>
▐ HTML and CSS
<section>
<h3 style="{color: #ffec3d;}">推荐系统的冷启动</h3>
<ul>
<li>利用热门数据</li>
<li>利用用户注册信息</li>
<li>利用第三方数据</li>
<li>利用物品内容属性</li>
</ul>
</section>
<style>
ul {
font-size: 18px;
}
</style>
▐ 淡入淡出
<section>
<h3>推荐系统的冷启动</h3>
<ul>
<li class="fragment">利用热门数据</li>
<li class="fragment">利用用户注册信息</li>
<li class="fragment">利用第三方数据</li>
<li class="fragment">利用物品内容属性</li>
</ul>
</section>

<section>
<h3>推荐系统的冷启动</h3>
<ul>
<li class="fragment highlight-red">利用热门数据</li>
<li>利用用户注册信息</li>
<li>利用第三方数据</li>
<li>利用物品内容属性</li>
</ul>
</section>

▐ 导出为PDF

▐ 更进一步


本文分享自微信公众号 - 淘系技术(AlibabaMTT)。
如有侵权,请联系 [email protected] 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。
边栏推荐
- 浏览器的onload事件
- 51单片机外设篇:ADC
- C语言小游戏——扫雷小游戏
- The Go language learning notes - dealing with timeout - use the language from scratch from Context
- Redis集群模式
- 一线大厂软件测试流程(思维导图)详解
- [PSQL] 函数、谓词、CASE表达式、集合运算
- Use the browser's local storage to realize the function of remembering the user name
- leetcode每天5题-Day04
- CPU使用率和负载区别及分析
猜你喜欢

C language: Check for omissions and fill in vacancies (3)

复盘:图像饱和度计算公式和图像信噪(PSNR)比计算公式

浏览器的onload事件

Linux CentOS8安装Redis6

leetcode每天5题-Day04

Meta公司内部项目-RaptorX:将Presto性能提升10倍

51 MCU peripherals: DS18B20

12 reasons for MySQL slow query

【合集- 行业解决方案】如何搭建高性能的数据加速与数据编排平台

51 microcontroller peripherals article: dot-matrix LCD
随机推荐
navicat connects to MySQL and reports an error: 1045 - Access denied for user 'root'@'localhost' (using password YES)
金山云团队分享 | 5000字读懂Presto如何与Alluxio搭配
How much does a test environment cost? Start with cost and efficiency
Matlab论文插图绘制模板第41期—气泡图(bubblechart)
跨桌面端Web容器演进
ELK log analysis system
测试技术之APP蓝牙连接测试
Redis database
Google Chrome(谷歌浏览器)安装使用
【合集- 行业解决方案】如何搭建高性能的数据加速与数据编排平台
【C语言】LeetCode26.删除有序数组中的重复项&&LeetCode88.合并两个有序数组
卸载redis
25K test old bird's 6-year experience in interviews, four types of companies, four types of questions...
C语言基础知识梳理总结:零基础入门请看这一篇
Detailed explanation of AMQP protocol
软件测试在职2年跳槽4次,你还在怪老板不给你涨薪?
Review: image saturation calculation formula and image signal-to-noise (PSNR) ratio calculation formula
整合ssm(一)
nacos registry
APP Bluetooth connection test of test technology

