Skip to content

Commit

Permalink
Fix multiple entries support
Browse files Browse the repository at this point in the history
  • Loading branch information
MuTsunTsai committed Mar 23, 2024
1 parent 12ed883 commit 2436ad4
Show file tree
Hide file tree
Showing 6 changed files with 391 additions and 382 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/
example.md
section.md
screenshots/
2 changes: 1 addition & 1 deletion components/Frankfurt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
for(let i = 1; i < $slidev.nav.slides.length; i++) {
const slide = $slidev.nav.slides[i];
const section = (slide.meta?.slide as SlideInfoBase)?.frontmatter?.section;
if(section) {
if(section && section != title) {
if(pages.length > 0) result.push([title, pages]);
pages = [];
title = section;
Expand Down
47 changes: 1 addition & 46 deletions example.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,54 +79,9 @@ function updateUser(id: number, update: Partial<User>) {

---
section: Frankfurt
src: section.md
---

# Frankfurt theme

<Item title="Definition 1">This is definition 1.</Item>

---

# Theorem 1

<Item title="Theorem 1">

Let $A\subseteq\N$ be a set such that $\pi_A(x)=x/\delta+O(x^\alpha)$,
where $\delta\in[1,\infty)$ and $0\le\alpha<1$.
Then we have

$$
M_A(x)=\frac{1}{2\delta}x\log x+
\frac 1 \delta\left(\gamma-\frac{1}{2}\log\frac \delta 2-\frac{1}{2}\right)x
+O_A\!\left(x^{\frac{2\alpha+2}{\alpha+3}}\right).
$$

</Item>

---

# Theorem 2

<Item title="Theorem 2">

Let $A\subseteq\N$ be a set such that, for some $\delta>0$,
$$
\pi_A(x)=\frac{x}{\delta\log x}\left(1+\frac{1}{\log x}+O\!\left({\frac{1}{\log^2 x}}\right)\right)
$$
for all sufficiently large $x$. Then we have, for sufficiently large $x$,
$$
\begin{align*}
M_A(x)
&=
\frac{\log2}{\delta}x-\frac{1}{\delta}\frac{x\log\log x}{\log x}+
\frac{1}{\delta}\left(\gamma-\log\frac{\delta}{4}\right)\frac{x\log\log x}{\log x}\\
&\qquad+
\frac{1}{2\delta}\frac{x(\log\log x)^2}{\log^2 x}+O_A\!\left(\frac{x\log\log x}{\log^2 x}\right).
\end{align*}
$$

</Item>

---
section: Final words
layout: center
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"screenshot": "slidev export example.md --per-slide --format png --output screenshots"
},
"dependencies": {
"@slidev/types": "^0.48.3",
"@slidev/types": "^0.48.7",
"codemirror-theme-vars": "^0.1.2",
"prism-theme-vars": "^0.2.4",
"theme-vitesse": "^0.7.7"
},
"devDependencies": {
"@slidev/cli": "^0.48.3",
"@slidev/cli": "^0.48.7",
"playwright-chromium": "^1.42.1"
},
"//": "Learn more: https://sli.dev/themes/write-a-theme.html",
Expand Down
Loading

0 comments on commit 2436ad4

Please sign in to comment.