Obsidian 插件(二):Advanced

您所在的位置:网站首页 表情包图片模板下载安装 Obsidian 插件(二):Advanced

Obsidian 插件(二):Advanced

2024-07-07 20:59:20| 来源: 网络整理| 查看: 265

目录Advanced Slides 的使用一、 概述1、 简介2、 特征3、 第一个 PPT二、 基础语法1、 水平垂直幻灯片2、 元素注释3、 幻灯片注释4、 块注解5、 元素动画6、 内联样式7、 幻灯片背景样式8、 演讲者模式9、 列表动画10、 画图支持11、 图标12、 表情包13、 图表支持14、 幻灯片动画三、 布局1、 拆分组件2、 网格组件2.1 基本语法2.2 浮动2.3 属性2.3.1 背景2.3.2 边框2.3.3 动画2.3.4 不透明度2.3.5 过滤2.3.6 旋转2.3.7 填充2.3.8 对齐2.3.9 justify-content2.3.10 元素动画2.3.11 总结四、 模板1、 基础使用2、 可选变量3、 案例3.1 模板文件3.2 幻灯片4、 默认模板五、 配置选项

Advanced Slides 的使用 一、 概述 1、 简介

Advanced Slides 是 Obsidian 的开源插件,允许您在 Obsidian 中创建基于eveal.js的演示文稿。使用此工具,任何能够在 Obsidian 中创建笔记的人也可以创建漂亮的演示文稿。

其遵循以下理念convention over configuration,这意味着在大多数情况下,只需使用Obsidian Markdown 语法编写一个 Slide 就足够了。

官方文档位置:https://mszturc.github.io/obsidian-advanced-slides

2、 特征 编辑幻灯片时的实时预览 幻灯片的主题支持 嵌入支持 - 在幻灯片中包含其他 Markdown 文档 -![[Note.md#FirstChapter]] 图像支持 通过 Obsidian Synthax 包含图像 -![[picture.jpg]] 管道图像属性 - -![[image.png|100x100]] 块支持 -::: block 脚注支持 -Here's a footnote[^1] 在 Markdown 中定义样式表 -.... 通过 frontmatter 将选项传递给 Slide Compiler 注释元素 支持内部链接 [[Note]]将在 Presentation 中呈现为普通文本 带别名[[Note|My Note]] Excalidraw 支持 流程图支持 3、 第一个 PPT

官方示例演示文稿:https://liuzhongkun1.github.io/ppt/example/index.html

创建步骤:

创建幻灯片

打开实时预览

二、 基础语法 1、 水平垂直幻灯片

要创建水平幻灯片,请使用由两个空行包围的三个破折号。要创建垂直幻灯片,请使用两个空行包围的两个破折号:

# Slide 1 --- # Slide 2.1 -- # Slide 2.2 2、 元素注释

用来设置元素的样式

text with border text with background text with attribute 3、 幻灯片注释

您可以通过注释为整个幻灯片传递样式或类属性:

# Header with coral background color Paragraph has coral background color, too! --- - All Bullet points - have green - background color 4、 块注解

可以使用块注释对幻灯片的各个部分进行分组。通过对代码块进行注释,该代码块中的所有项目都将获得注释的属性:

::: block #### Header _and_ Paragraph content *in same block* ::: --- no color ::: block everything inside this block has red background color ::: block blue ::: red ::: no color 5、 元素动画

用于突出显示或逐步显示幻灯片上的单个元素。在移动到下一张幻灯片之前,将逐步执行具有类片段的每个元素。默认片段样式是从不可见开始淡入。可以通过将不同的类附加到片段来更改此样式。

Fade in Fade out Highlight red Fade in, then out Slide up while fading in --- - Permanent item - Appear Fourth - Appear Third - Appear Second - Appear First

常见的动画样式:https://revealjs.com/fragments/

6、 内联样式

你可以在你的标记中定义 css 样式:

通过使用标签

.with-border{ border: 1px solid red; } styled text

通过 CSS 文件包含它们

--- css: [css/layout.css,css/customFonts.css] --- 7、 幻灯片背景样式

你可以通过注释幻灯片来改变背景:

## Slide with text based background --- ## Slide with hex based background --- ## Slide with rgb based background --- ## Slide with hsl based background --- # Slide without background --- ## Slide with image background --- ## Slide with image background #2 --- ## with opacity 0.5 ≙ 50% opacity --- ## More options: See [reveal backgrounds](https://revealjs.com/backgrounds/)

可以通过 fontmatter 添加内容来更改所有幻灯片的背景:

--- bg: red bg: '#ff0000' bg: rgb(70, 70, 255) bg: transparent --- 8、 演讲者模式

Advanced Slides 带有演讲者备注功能,可用于在演讲者视图中呈现每张幻灯片的备注。

要访问扬声器视图,您必须打开Slide Preview然后点击Open in Browser右上角的按钮。您的幻灯片将在您的默认网络浏览器中打开。按键盘上的 »S« 键打开备注窗口。

注释窗口还可以让您预览下一张幻灯片,因此即使您没有写任何注释,它也可能会有所帮助。

## My Slide This is part of my Presentation note: this is not! Only the speaker might see this text. - and this bulletpoint - or this picture ![](https://picsum.photos/id/1005/250/250) 9、 列表动画

基于片段概念的高级幻灯片引入了一个约定,自动将片段注释添加到有序和无序列表的项目符号点。通过使用 + 或 ) 作为列表的指示符,列表将自动显示为片段列表。

# Unordered list - First - Second - Third --- # Fragmented unordered list - Permanent + First + Second + Third --- # Ordered list 1. First 2. Second 3. Third --- # Fragmented ordered list 1. Permanent 2) Second 3) Third 4) Fourth 10、 画图支持

需要在 Excalidraw 设置中激活 Auto-Export SVG/PNG。

#### Excalidraw support ![[Sample.excalidraw|100]] ![[Sample.excalidraw]] 11、 图标

您可以使用以下标记将图标添加到幻灯片中:

![](fab fa-font-awesome fa-4x) ## Icons --- ### Basic Syntax ![](fas fa-envelope fa-4x) Short Syntax ![](fas fa-envelope fa-4x) HTML Synthax ShortCode Synthax :fas_envelope: --- # Sizing --- # Rotating Icons --- # Animating Icons --- #### Bordered + Pulled Icons Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter — tomorrow we will run faster, stretch our arms further... And one fine morning — So we beat on, boats against the current, borne back ceaselessly into the past. Gatsby believed in the green light, the orgastic future that year by year recedes before us. It eluded us then, but that’s no matter — tomorrow we will run faster, stretch our arms further... And one fine morning — So we beat on.

支持的所有图标:https://fontawesome.com/v5/search

字体图标使用教程:https://fontawesome.com/v5/docs/web/reference-icons/

12、 表情包

你可以在幻灯片中使用表情包短代码:

:smile: => 😄

可以使用 Obsidian 的表情包插件来快速的查找表情包:obsidian-emoji-toolbar

13、 图表支持

Advanced Slides 允许使用Obsidian Charts插件语法或Reveal.js Charts语法添加图表。

目前不支持以下功能:

数据视图集成 表中的图表

Obsidian Charts:

```chart type: bar labels: [Monday,Tuesday,Wednesday,Thursday,Friday, Saturday, Sunday, "next Week", "next Month"] series: - title: Title 1 data: [1,2,3,4,5,6,7,8,9] - title: Title 2 data: [5,4,3,2,1,0,-1,-2,-3] ```

官方文档:https://charts.phibr0.de/chart%20types/

Reveal.js Charts:

官方文档:https://github.com/rajgoel/reveal.js-plugins

14、 幻灯片动画

Advanced Slides 可以自动为幻灯片中的元素设置动画。您需要做的就是添加data-auto-animate到两个相邻的幻灯片注释和自动动画将为两者之间的所有匹配元素设置动画。

这是一个简单的示例,可以让您更好地了解如何使用它:

# Title --- # Title ##### **Subtitle** ###### *Author - 2022*

更多的动画教程:https://revealjs.com/auto-animate/

三、 布局 1、 拆分组件

通过使用标签您可以按行和列拆分幻灯片的内容

通过设置 even 属性,拆分元素的内容被平均分配:

![](https://picsum.photos/id/1005/250/250) ![](https://picsum.photos/id/1010/250/250) ![](https://picsum.photos/id/1025/250/250)

通过添加 gap 属性,每个元素之间将有一个间隙:

**Lorem Ipsum** is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem

在此拆分中,每个元素之间有 3em 的间隙

如果你想按比例分割一张幻灯片,你可以用 left 和 right 属性来做到这一点。左右分别代表滑动栏的比例:

**Lorem Ipsum** is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem

在此拆分中,左侧元素的宽度是右侧元素宽度的两倍

通过添加一个 wrap 属性,您可以定义一个新行应该在多少个元素之后开始:

![](https://picsum.photos/id/1010/250/250) ![](https://picsum.photos/id/1011/250/250) ![](https://picsum.photos/id/1012/250/250) ![](https://picsum.photos/id/1013/250/250) ![](https://picsum.photos/id/1014/250/250) ![](https://picsum.photos/id/1015/250/250)

此拆分有 2 行。第一行有 4 张图片,第二行有 2 张。

通过不添加边距属性自动删除行和列之间的间隙:

![](https://picsum.photos/id/1001/250/250) ![](https://picsum.photos/id/1002/250/250) ![](https://picsum.photos/id/1003/250/250) ![](https://picsum.photos/id/1004/250/250) ![](https://picsum.photos/id/1005/250/250) ![](https://picsum.photos/id/1006/250/250) ![](https://picsum.photos/id/1009/250/250) ![](https://picsum.photos/id/1008/250/250)

此拆分在行和列之间没有间隙。

2、 网格组件 2.1 基本语法

通过使用标签,您可以分部分布置幻灯片的内容。

网格布局拖放用于调整幻灯片内容的大小和位置。

拖动以调整幻灯片上一块内容的大小 放下该块以将该块放置在幻灯片上的任何位置。

基本语法:

参数:

drag属性的宽度和高度值定义了内容显示区域的大小

drop属性的x和y值定义幻灯片上应插入内容的位置

按坐标定位:

可以在drop属性上为x和y设置正值和负值。每种情况下正负值的含义总结如下:

正 x 值表示相对于幻灯片左边缘的位置。 负 x 值表示相对于幻灯片右边缘的位置。 正 y 值表示相对于幻灯片上边缘的位置。 负 y 值表示相对于幻灯片底部边缘的位置。 60 x 55 25 x 55 90 x 20

按名称定位:

为方便起见,已命名一些常见的网格位置。命名位置可以用来代替drop属性上的x和y坐标。当前定义了以下命名位置:

center top bottom left right topleft topright bottomleft bottomright Top Left Right with default size Bottom

默认情况下,假定值是基于幻灯片大小的百分比。将px附加到像素大小的值。

2.2 浮动

以下语法用于为网格定义自定义流:

使用col或row的值作为flow属性定义网格的布局行为。如果未指定 flow 属性,则网格会自动继承默认的col flow 行为。

什么时候使用flow="col"布局和间距行为发生在网格中:

孩子在网格内垂直呈现

每个孩子之间注入等量的空间

在网格的开始和结束处注入等量的空间

Heading ![[Image.jpg]] **Lorem Ipsum** is simply dummy text

什么时候使用flow=row布局和间距行为发生在网格中:

子项在网格内水平呈现。 每个孩子之间注入等量的空间 在网格的开始和结束处注入等量的空间 Left ![[Image.jpg]] **Lorem Ipsum** is simply dummy text 2.3 属性 2.3.1 背景

grid bg 属性用于为网格定义自定义背景。添加到网格的子项呈现在背景之上。

示例:

### Make ### Noise ### some 2.3.2 边框

网格边框属性用于为网格部分定义自定义边框。自定义边框有助于突出显示或区分幻灯片上的网格。

参数:

width选项采用thin、medium、thick或像素值(例如10px )的值。 style 选项采用dotted、solid、dashed、inset或outset的值。 color选项采用任何有效的CSS Color Value。 thick dotted blue 20px solid white thick dotted blue 2.3.3 动画

网格动画属性用于定义网格部分的幻灯片动画。动画适用于网格和所有关联的子项。

其中animate属性的类型选项可以采用以下动画类型之一:

fadeIn fadeOut slideRightIn slideLeftIn slideUpIn slideDownIn slideRightOut slideLeftOut slideUpOut slideDownOut scaleUp scaleUpOut scaleDown scaleDownOut

速度选项是可选的。指定时,它接受较慢或较快的值。

2.3.4 不透明度

网格不透明度属性用于控制网格部分的透明度。调整部分的不透明度也会影响所有相关子项的不透明度。

其中opacity属性的level选项可以取0.0到1.0之间的任何值。不透明度值为 0.0 的网格部分是不可见的。

2.3.5 过滤

网格过滤器属性用于定义网格部分的过滤器效果。网格部分的滤镜效果也会影响所有关联的子项。

其中过滤器属性的效果选项可以采用以下类型之一:

blur bright contrast grayscale hue invert saturate sepia ![[Image.jpg]] Text is too blurry 2.3.6 旋转

网格旋转属性用于控制网格部分的二维旋转。网格部分的旋转也会影响所有关联的子项。

其中,rotate属性的deg选项是正值或负值表示从 0 到 360 度的旋转度数。

Hello World! 2.3.7 填充

grid pad属性用于定义网格的自定义填充。自定义填充可以通过控制网格子项周围的空间来帮助增强内容的整体外观。

pad属性上的top、right、bottom和left选项都采用像素大小值。遵循标准的CSS 填充规则,这四个选项也可以只指定两个值甚至一个值,例如:

###### Lorem Ipsum wasnt simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book here there ![[Image.jpg|800]]

此属性引入的填充不会增加网格本身的大小。相反,它减少了可用于在网格内渲染子项的区域的大小。

2.3.8 对齐

网格align属性用于定义网格部分的水平对齐方式。

其中align属性的类型选项可以采用以下类型之一:

left right center (default) justify / block top bottom topleft topright bottomleft bottomright stretch This text is aligned to the left side of the box This text is aligned to the right side of the box Stretches the text so that each line has equal width (like in newspapers and magazines) ![[Title-Wide.png]] ![[Title-Wide.png]] ![[Title-Wide.png]] ![[Title-Wide.png]] ![[Title-Wide.png]] 2.3.9 justify-content

grid justify-content属性用于定义网格组件如何在其子组件之间和周围分配空间。

其中justify-content属性的类型选项可以采用以下类型之一:

start center space-between space-around space-evenly (default) end Item 1 Item 2 Item 3 Item 4 Item 1 Item 2 Item 3 Item 4 Item 1 Item 2 Item 3 Item 4 2.3.10 元素动画

grid frag 属性用于定义网格的片段。片段用于突出显示或逐步显示幻灯片上的单个元素。

frag属性的index选项是一个正值表示片段显示的顺序。

### Fragments: + Right + Bottom Right Grid Bottom Grid

正如您在示例中肯定看到的那样,您可以将 Fragment 和[Fragment List](#5、 元素动画)相互组合。默认情况下,片段列表生成从 1 开始的索引。

2.3.11 总结 drag=“width height” drop=“x y | topleft | top | topright | left | center | right | bottomleft | bottom | bottomright” flow=“col | row” bg=“color name | #425232 | rgb(255, 99, 71) | hsl(0, 100%, 50%)” pad=“all sides | vertical horizontal | top right bottom left” align=“left | right | center | justify | block | top | bottom | topleft | topright | bottomleft | bottomright | stretch” border=“width style color” animate=“fadeIn | fadeOut | slideRightIn | slideLeftIn | slideUpIn | slideDownIn | slideRightOut | slideLeftOut | slideUpOut | slideDownOut | scaleUp | scaleUpOut | scaleDown | scaleDownOut | slower | faster” opacity=“0.1…1” rotate=“0…360” filter=“blur | bright | contrast | grayscale | hue | invert | saturate | sepia” frag=“1” style="" class="" 四、 模板

Advanced Slides 允许您根据幻灯片模板设计单独的幻灯片。每个幻灯片模板都可以有独特的布局和结构,您可以在整个演示文稿中重复使用。使用幻灯片模板可以轻松快速地创建在不同幻灯片中使用不同布局格式的演示文稿。此外,幻灯片模板减少了 md 演示文档中的冗余代码(又名样板代码)。

1、 基础使用

以下幻灯片模板定义了一个幻灯片结构,该结构具有主要内容区域和页脚。应命名为tpl-footer并且可以作为常规 md 笔记存储在您用于制作演示文稿的项目中的任何位置。

请注意,每个模板都必须包含变量,即使它没有在幻灯片内容中使用。

一旦我们创建了这个幻灯片模板,我们就可以通过以下方式制作幻灯片注释来在我们的演示文稿中引用它:

# This header will be part of the content section defined in the template Everything define outside a block will be placed in the content section. Therefore every template has to contain at least a content variable. To place a text into the footer section you have to create a block comment with the name of the variable you defined in the template. ::: footer #### This header will be placed in the footer section of the template ::: 2、 可选变量

默认情况下,幻灯片模板中的每个变量都必须由幻灯片中的块注释设置。否则,将在变量中放置一个虚拟文本,提醒您为此变量创建块注释。但是在某些情况下您不希望出现这种行为,例如当您在模板的页脚中有一个引文行,但您不需要引用任何引文。因此,您可以在模板中创建一个部分并?在其定义中添加一个:

在您在幻灯片中创建页脚块注释之前,页脚标记将不可见。

3、 案例 3.1 模板文件 .horizontal_dotted_line{ border-bottom: 2px dotted gray; } } ###### © 2022 Advanced Slides 3.2 幻灯片 --- theme: consult height: 540 margin: 0 maxScale: 4 --- ::: title ### _**This is the Title of this Slide**_ ::: ::: left ![[Image.jpg|1500]] ::: .small-indent > ul { padding-left: 1em; } ::: right **Header #1** - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. - tium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequa - augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit a - Nam quam nunc Umsetzungsschritte **Header #2** - Curabitur - condimentum - Maecenas **Header #3** - justo - rhoncus - semper ::: ::: source ###### Source: Copied from Lorem ipsum dolor Generator ::: 4、 默认模板

您可以定义一个默认模板,通过添加defaultTemplate您的 yaml 的 frontmatter 属性:

--- defaultTemplate: "[[tpl-footer]]" --- 五、 配置选项 Name Description Possible Values Default Value width 设置演示文稿的宽度 number 960 height 设置演示文稿的宽度 number 700: margin 内容周围的空白区域 number 0.04: minScale 应用于内容的最小可能比例的界限 number 0.2 maxScale 应用于内容的最大可能规模的界限 number 2.0 notesSeparator 设置注释分隔符 string note: separator 设置幻灯片分隔符 string ^( ?| )—( ?| )$ verticalSeparator 设置垂直滑动分隔符 string ^( ?| )–( ?| )$ enableLinks 在幻灯片中启用反向链接 true / false false theme 设置主题 see theme docs black highlightTheme 设置高亮主题 see theme docs zenburn css 添加更多的 css 文件 [] enableOverview 在幻灯片的右下角显示概览按钮 true / false false enableChalkboard 为幻灯片激活黑板 true / false false controls 显示演示控制箭头 true / false true controlsLayout 确定控件出现的位置 edges / bottom-right bottom-right progress 显示演示进度条 true / false true slideNumber 显示当前幻灯片的页码 see reveal.js docs false overview 启用幻灯片概览模式 true / false true center 幻灯片的垂直居中 true / false true loop 循环演示 true / false false rtl 将呈现方向更改为 RTL true / false false shuffle 每次加载演示文稿时随机化幻灯片的顺序 true / false false fragments 全局打开和关闭片段 true / false true showNotes 标记演讲者注释是否应该对所有观众可见 true / false false autoSlide 控制自动前进到下一张幻灯片 number (in milliseconds) 0 transition 过渡风格 none / fade / slide / convex / concave / zoom slide transitionSpeed 过渡速度 default / fast / slow default bg 为所有幻灯片设置默认背景 see slide background docs ‘#ffffff’ markdown 设置标记的选项 (see note below) (see note below) enableTimeBar 激活幻灯片的流逝计时器栏 true / false false timeForPresentation 以秒为单位设置流逝计时器的时间 number 120 defaultTemplate 设置将应用于所有幻灯片的模板 see template docs null

本文来自博客园,作者:Kenny_LZK,转载请注明原文链接:https://www.cnblogs.com/liuzhongkun/p/17096534.html



【本文地址】

公司简介

联系我们

今日新闻


点击排行

实验室常用的仪器、试剂和
说到实验室常用到的东西,主要就分为仪器、试剂和耗
不用再找了,全球10大实验
01、赛默飞世尔科技(热电)Thermo Fisher Scientif
三代水柜的量产巅峰T-72坦
作者:寞寒最近,西边闹腾挺大,本来小寞以为忙完这
通风柜跟实验室通风系统有
说到通风柜跟实验室通风,不少人都纠结二者到底是不
集消毒杀菌、烘干收纳为一
厨房是家里细菌较多的地方,潮湿的环境、没有完全密
实验室设备之全钢实验台如
全钢实验台是实验室家具中较为重要的家具之一,很多

推荐新闻


图片新闻

实验室药品柜的特性有哪些
实验室药品柜是实验室家具的重要组成部分之一,主要
小学科学实验中有哪些教学
计算机 计算器 一般 打孔器 打气筒 仪器车 显微镜
实验室各种仪器原理动图讲
1.紫外分光光谱UV分析原理:吸收紫外光能量,引起分
高中化学常见仪器及实验装
1、可加热仪器:2、计量仪器:(1)仪器A的名称:量
微生物操作主要设备和器具
今天盘点一下微生物操作主要设备和器具,别嫌我啰嗦
浅谈通风柜使用基本常识
 众所周知,通风柜功能中最主要的就是排气功能。在

专题文章

    CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭