Skip to content

Commit

Permalink
Merge pull request #2 from wflixu/dev
Browse files Browse the repository at this point in the history
v0.3.0
  • Loading branch information
wflixu authored Apr 21, 2024
2 parents 5b42049 + c193a82 commit 737cfb4
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: "build pkg"

on:
push:
branches:
- dev
branches:
- ['tags']

jobs:
publish-tauri:
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,14 @@ Typster is built using [Tauri](https://tauri.app/).

```
pnpm tauri icon
```
```


## Other similar projects:

- https://github.com/Cubxity/typstudio
- https://github.com/Enter-tainer/typst-preview

## Related projects
- https://github.com/Enter-tainer/typstyle
- https://github.com/nvarner/typst-lsp
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "typster",
"private": true,
"version": "0.2.0",
"version": "0.3.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"package": {
"productName": "typster",
"version": "0.2.0"
"version": "0.3.0"
},
"tauri": {
"macOSPrivateApi": true,
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ const onCreateFile = async () => {
title: "新建文件",
filters: [{
name: 'untitled',
extensions: ['typ']
extensions: ['typ', 'bib', 'yml']
}],
defaultPath: systemStore.editingProject?.path
});
console.log(filePath)
console.warn(filePath)
if (filePath) {
await writeTextFile({ path: filePath, contents: ' ' });
await initFiles();
Expand Down
9 changes: 8 additions & 1 deletion src/pages/project/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,21 @@ onMounted(() => {
}
.list {
display: flex;
flex-wrap: wrap;
gap: 40px;
.list-item {
flex-shrink: 0;
cursor: pointer;
border: 1px solid #ddd;
border-radius: 4px;
position: relative;
padding: 16px;
margin-top: 40px;
/* max-width: 420px; */
min-width: max(240px, 20vw);
flex: 1;
.actions {
position: absolute;
right: 16px;
Expand Down
126 changes: 126 additions & 0 deletions tests/main.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
#set page(
paper: "a4",
margin: (x: 1.8cm, y: 1.5cm),
)
#set text(
font: "New Computer Modern",
size: 16pt
)

#set par(
justify: true,
leading: 0.52em,
)


= Introduction

In this report, we will explore the
various factors that influence fluid
dynamics in glaciers and how they
contribute to the formation and
behaviour of these natural structures.

+ The climate
- Temperature
- Precipitation
+ The topography
+ The geology

#image("./app-icon.png")


The flow rate of a glacier is
defined by the following equation:

$ Q = rho A v + C $



= Introduction

In this report, we will explore the
various factors that influence fluid
dynamics in glaciers and how they
contribute to the formation and
behaviour of these natural structures.

= picture
#figure(
image("app-icon.png", width: 70%),
caption: [
_Glaciers_ form an important part
of the earth's climate system.
],
)


= Methods
We follow the glacier melting models



The equation $Q = rho A v + C$
defines the glacial flow rate.

Total displaced soil by glacial flow:

$ 7.32 beta +
sum_(i=0)^nabla
(Q_i (a_i - epsilon)) / 2 $


$ v := vec(x_1, x_2, x_3) $


#par(justify: true)[
= Background
In the case of glaciers, fluid
dynamics principles can be used
to understand how the movement
and behaviour of the ice is
influenced by factors such as
temperature, pressure, and the
presence of other fluids (such as
water).
]


== Background

#lorem(100)

= package

#import "@preview/cetz:0.2.2": canvas, plot


#let style = (stroke: black, fill: rgb(0, 0, 200, 75))

#canvas(length: 1cm, {
plot.plot(size: (8, 6),
x-tick-step: none,
x-ticks: ((-calc.pi, $-pi$), (0, $0$), (calc.pi, $pi$)),
y-tick-step: 1,
{
plot.add(
style: style,
domain: (-calc.pi, calc.pi), calc.sin)
plot.add(
hypograph: true,
style: style,
domain: (-calc.pi, calc.pi), calc.cos)
plot.add(
hypograph: true,
style: style,
domain: (-calc.pi, calc.pi), x => calc.cos(x + calc.pi))
})
})


= bib

#lorem(40)
@smith2020

#bibliography("works.bib", full: true)
22 changes: 0 additions & 22 deletions tests/show.typ

This file was deleted.

22 changes: 22 additions & 0 deletions tests/works.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@ARTICLE{smith2020,
author = "John Smith",
title = "A New Algorithm for Sorting Numbers",
journal = "Journal of Algorithms",
year = 2020,
volume = 100,
number = 1,
pages = "1-10",
keywords = {sorting, algorithms, complexity},
abstract = "This paper presents a new algorithm for sorting numbers. The algorithm is based on the idea of...",
note = "This is a preliminary version of the paper."
}

@BOOK{jones2019,
author = "Jane Jones",
title = "Introduction to Machine Learning",
publisher = "MIT Press",
year = 2019,
keywords = {machine learning, artificial intelligence, data science},
abstract = "This book provides an introduction to the field of machine learning.",
note = ""
}

0 comments on commit 737cfb4

Please sign in to comment.