update docs about VNote 3
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
*.vswp
|
||||
_v_recycle_bin
|
||||
vx_recycle_bin
|
||||
|
@ -1,33 +1,33 @@
|
||||
# Build VNote
|
||||
You need **Qt 5.9** and above to build VNote from source.
|
||||
You need **Qt 5.12** and above to build VNote from source.
|
||||
|
||||
## Get the Source Code of VNote
|
||||
VNote's source code is available on [Github](https://github.com/tamlok/vnote). You could download the ZIP archive of the code. Please be aware of that VNote depends on some submodules, so you should also download the source codes of these modules.
|
||||
VNote's source code is available on [GitHub](https://github.com/vnotex/vnote). You could download the ZIP archive of the code. Please be aware of that VNote depends on some submodules, so you should also download the source codes of these modules.
|
||||
|
||||
The recommended way is using **git** like this:
|
||||
|
||||
```
|
||||
git clone https://github.com/tamlok/vnote.git vnote.git
|
||||
git clone https://github.com/vnotex/vnote.git vnote.git
|
||||
cd vnote.git
|
||||
git submodule update --init
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
## Get Qt 5.9
|
||||
You could get the standalone Qt SDK from [Qt Downloads](http://info.qt.io/download-qt-for-application-development). For users in China, you could speed up the download via the [TUNA Mirrors](https://mirrors4.tuna.tsinghua.edu.cn/qt/official_releases/qt/5.9/).
|
||||
## Get Qt 5.12
|
||||
You could get the standalone Qt SDK from [Qt Downloads](http://info.qt.io/download-qt-for-application-development). For users in China, you could speed up the download via the [TUNA Mirrors](https://mirrors4.tuna.tsinghua.edu.cn/qt/official_releases/qt/5.12/).
|
||||
|
||||
## Windows
|
||||
On Windows, you need **Visual Studio 2015** or above to compile VNote.
|
||||
On Windows, you need **Visual Studio 2015** or above to compile VNote (Mingw is **not** supported).
|
||||
|
||||
Open **Qt Creator** and open `vnote.git\VNote.pro` as project. Now you are ready to tune and compile VNote!
|
||||
Open **Qt Creator** and open `vnote.git\vnote.pro` as project. Now you are ready to tune and compile VNote!
|
||||
|
||||
## Linux
|
||||
In Ubuntu, you could get Qt 5.9 from PPA like this:
|
||||
In Ubuntu, you could get Qt 5.12 from PPA like this:
|
||||
|
||||
```sh
|
||||
sudo add-apt-repository ppa:beineri/opt-qt591-trusty -y
|
||||
sudo add-apt-repository ppa:beineri/opt-qt-5.12.10-bionic -y
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get -y install qt59base qt59webengine
|
||||
sudo apt-get -y install qt59webchannel qt59svg qt59location qt59tools qt59translations
|
||||
sudo apt-get -y install qt512base qt512webengine
|
||||
sudo apt-get -y install qt512webchannel qt512svg qt512location qt512tools qt512translations
|
||||
source /opt/qt*/bin/qt*-env.sh
|
||||
```
|
||||
|
||||
@ -37,7 +37,7 @@ Then compile and install VNote like this:
|
||||
cd vnote.git
|
||||
mkdir build
|
||||
cd build
|
||||
qmake ../VNote.pro
|
||||
qmake ../vnote.pro
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
@ -56,12 +56,10 @@ If there is no such lib, you may need to install and configure Fcitx for Qt5 cor
|
||||
Then you need to copy the lib to Qt's plugin directory:
|
||||
|
||||
```
|
||||
<path_to_Qt_installation_directory>/5.9.3/gcc_64/plugins/platforminputcontexts/
|
||||
<path_to_Qt_installation_directory>/5.12.10/gcc_64/plugins/platforminputcontexts/
|
||||
```
|
||||
|
||||
### OpenSSL
|
||||
VNote needs **openSSL 1.0** for networking. To verify if it has been setup correctly, you could check for updates in the *Help* menu of VNote. If VNote fails to check for updates, then you need to copy libraries of openSSL to Qt's library directory.
|
||||
|
||||
After the installation of openSSL, you could find two lib files:
|
||||
|
||||
```
|
||||
@ -72,7 +70,7 @@ After the installation of openSSL, you could find two lib files:
|
||||
Copy these two files to Qt's library directory:
|
||||
|
||||
```
|
||||
<path_to_Qt_installation_directory>/5.9.3/gcc_64/lib/
|
||||
<path_to_Qt_installation_directory>/5.12.10/gcc_64/lib/
|
||||
```
|
||||
|
||||
In Qt's library directory, create symlinks for these two files:
|
||||
@ -86,16 +84,16 @@ ln -s libssl.so.1.0.0 libssl.so
|
||||
If you prefer command line on macOS, you could follow these steps.
|
||||
|
||||
1. Install Xcode and Homebrew;
|
||||
2. Install Qt 5.9.1 via Homebrew:
|
||||
2. Install Qt 5.12.10 via Homebrew:
|
||||
|
||||
```
|
||||
brew install qt@5.9.1
|
||||
brew install qt@5.12.10
|
||||
```
|
||||
|
||||
3. In the project directory, create `build_macos.sh` like this:
|
||||
|
||||
```sh
|
||||
QTDIR="/usr/local/opt/qt@5.9.1"
|
||||
QTDIR="/usr/local/opt/qt@5.12.10"
|
||||
PATH="$QTDIR/bin:$PATH"
|
||||
LDFLAGS=-L$QTDIR/lib
|
||||
CPPFLAGS=-I$QTDIR/include
|
||||
@ -103,7 +101,7 @@ If you prefer command line on macOS, you could follow these steps.
|
||||
mkdir -p build
|
||||
cd build
|
||||
qmake -v
|
||||
qmake CONFIG-=debug CONFIG+=release ../VNote.pro
|
||||
qmake CONFIG-=debug CONFIG+=release ../vnote.pro
|
||||
make -j2
|
||||
```
|
||||
|
||||
@ -114,4 +112,4 @@ If you prefer command line on macOS, you could follow these steps.
|
||||
./build_macos.sh
|
||||
```
|
||||
|
||||
5. Now you got the bundle `path/to/project/build/src/VNote.app`.
|
||||
5. Now you got the bundle `path/to/project/build/src/vnote.app`.
|
||||
|
@ -7,14 +7,14 @@ To provide translations for VNote, you only need to download VNote's source code
|
||||
After installing Qt, there are two tools we need in `path_to_Qt/bin` folder: `lupdate` and `linguist`.
|
||||
|
||||
## Add ts file
|
||||
Given that we want to provide a Traditional Chinese translation for VNote. The locale code should be `zh_HK`. First we add one empty plain text file `src/translations/vnote_zh_HK.ts` under VNote's source code.
|
||||
Given that we want to provide a Traditional Chinese translation for VNote. The locale code should be `zh_HK`. First we add one empty plain text file `src/data/core/translations/vnote_zh_HK.ts` under VNote's source code.
|
||||
|
||||
Then add it to `src/src.pro` file:
|
||||
|
||||
```pro
|
||||
TRANSLATIONS += translations/vnote_zh_CN.ts \
|
||||
translations/vnote_ja.ts \
|
||||
translations/vnote_zh_HK.ts
|
||||
TRANSLATIONS += data/core/translations/vnote_zh_CN.ts \
|
||||
data/core/translations/vnote_ja.ts \
|
||||
data/core/translations/vnote_zh_HK.ts
|
||||
```
|
||||
|
||||
## Update ts file
|
||||
@ -23,19 +23,19 @@ Now we need to update `vnote_zh_HK.ts` according to latest source code via `lupd
|
||||
Execute `lupdate` update VNote's source code root folder:
|
||||
|
||||
```
|
||||
lupdate VNote.pro
|
||||
lupdate src/src.pro
|
||||
```
|
||||
|
||||
It will fill in `vnote_zh_HK.ts` with latest strings need to translate.
|
||||
It will fill in `vnote_zh_HK.ts` with latest strings needed to translate.
|
||||
|
||||
## Fill in ts file with translations
|
||||
```
|
||||
linguist src/translations/vnote_zh_HK.ts
|
||||
linguist src/data/core/translations/vnote_zh_HK.ts
|
||||
```
|
||||
|
||||
This will open Linguist tool for us to do the translation one by one.
|
||||
|
||||
After doing all the translations, select `Save` and `Release` in the `File` menu of Linguist. The `vnote_zh_HK.qm` file should now be generated along side with the ts file.
|
||||
After doing all the translations, select `Save` and `Release` in the `File` menu of Linguist. The `vnote_zh_HK.qm` file should now be generated alongside with the `ts` file.
|
||||
|
||||
## Submit files
|
||||
Now you could submit those two files to the author. The author will integrate them in next release of VNote.
|
||||
|
@ -5,7 +5,7 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:11:19Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:11:19Z",
|
||||
"modified_time": "2021-07-12T12:20:00Z",
|
||||
"name": "Build VNote.md",
|
||||
"tags": [
|
||||
]
|
||||
@ -14,7 +14,7 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2019-03-31T07:23:55Z",
|
||||
"id": "0",
|
||||
"modified_time": "2019-03-31T07:23:55Z",
|
||||
"modified_time": "2021-07-10T01:57:54Z",
|
||||
"name": "Localization and Translations.md",
|
||||
"tags": [
|
||||
]
|
||||
|
33
en_us/docs/Users/Configuration.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Configuration
|
||||
There are three main configurations for VNote.
|
||||
|
||||
* Default configuration;
|
||||
This is the application's default configuration. You should not change any of these files, since they will be overwritten on version update. To custom configuration, you could copy files to the **user configuration** folder and change them.
|
||||
* User configuration;
|
||||
This is the user's configuration which will overrides the default configuration.
|
||||
* Session configuration;
|
||||
This is configuration about session, such as notebook list, geometry state of the main window, and so on. It is the `session.json` file locating in the *user configuration* folder. To modify this file, you need to first close VNote since VNote will write to this file on close.
|
||||
|
||||

|
||||
|
||||
## Components of Configuration
|
||||
There are several folders and files under the configuration folder:
|
||||
|
||||
```
|
||||
.
|
||||
├── dicts (dictionaries for spellcheck)
|
||||
├── docs (docs used by VNote to provide help)
|
||||
├── syntax-highlighting (syntax highlighting files for text editor from Kate)
|
||||
├── themes (themes of VNote)
|
||||
├── web (resources used for read mode)
|
||||
└── vnotex.json (configuration file)
|
||||
```
|
||||
|
||||
For the `vnotex.json` file, please refer to the one in the default configuration folder, which contains comments about each field.
|
||||
|
||||
## Make VNote Portable
|
||||
Users may want to bundle the configuration files alongside with the executable file. Follow these steps to migrate the configuration folders:
|
||||
|
||||
1. Close VNote first;
|
||||
2. Copy the default configuration folder `VNote` to the same folder as the executable file (such as `vnote.exe`) and rename it to `vnotex_files`;
|
||||
3. Copy the user configuration folder `VNote` to the same folder as the executable file and rename it to `user_files`;
|
@ -1,102 +0,0 @@
|
||||
# Export
|
||||
VNote supports rich and extensible export.
|
||||
|
||||

|
||||
|
||||
## Sources
|
||||
There are four sources to select which notes to export.
|
||||
|
||||
- **Current Note**
|
||||
- Export current note;
|
||||
- **Current Folder**
|
||||
- Export all the notes within current folder;
|
||||
- Support export subfolders recursively;
|
||||
- **Current Notebook**
|
||||
- Export all the notes of current notebook;
|
||||
- **Cart**
|
||||
- Cart is a tool to collect random notes for further processing.
|
||||
|
||||
## Options
|
||||
We could specify **Markdown renderer**, **Markdown rendering background**, **Markdown rendering style**, and **Markdown rendering code block style** for the export. For example, we could specify a *transparent* background when we export PDFs.
|
||||
|
||||
## Formats
|
||||
### Markdown
|
||||
We could export a Markdown note as Markdown format. For a note named `vnote.md`, VNote will create a folder named `vnote_md`, then copy the `vnote.md` to this folder, then copy local images of this note, then copy the attachments of this note. After this, we could compress this folder and share it.
|
||||
|
||||
### HTML
|
||||
When exporting a note as HTML format, VNote will first render the Markdown note and then output the HTML as a file. Advanced settings of HTML format includes:
|
||||
|
||||
- **Embed CSS styles**
|
||||
- Embed CSS styles in the exported HTML file.
|
||||
- **Complete page**
|
||||
- When checked, VNote will also export related images besides the HTML file. If not checked, you may lose local images.
|
||||
- **MIME HTML**
|
||||
- Export the MIME HTML format.
|
||||
|
||||
### PDF
|
||||
VNote supports exporting notes as PDF files. Page size and margins are configurable. There are two engines to choose to do the export.
|
||||
|
||||
#### Built-In Engine
|
||||
The built-in engine works better with the content, but lacks the bookmark in the generated PDF file.
|
||||
|
||||
#### wkhtmltopdf
|
||||
[wkhtmltopdf](https://wkhtmltopdf.org/) is a third-party tool to convert HTML to PDF. You need to install this extra tool which will be used by VNote. When using this engine, VNote will first convert the Markdown notes to HTML format, and then call *wkhtmltopdf* with the generated HTML files as input.
|
||||
|
||||

|
||||
|
||||
Advanced settings includes:
|
||||
|
||||
- **wkhtmltopdf path**
|
||||
- Path of the wkhtmltopdf executable.
|
||||
- **Title**
|
||||
- Title of the generated PDF. It is only valid when **All In One** is enabled.
|
||||
- **Output file name**
|
||||
- The name of the generated PDF file. It is only valid when All In One is enabled.
|
||||
- **Page Number**
|
||||
- Whether append page number to every page and the position of it.
|
||||
- **Enable background**
|
||||
- Whether enable the background of the HTML.
|
||||
- **Additional options**
|
||||
- Additional global options which will be passed to wkhtmltopdf. For available options, please reference the documentation of wkhtmltopdf.
|
||||
|
||||
### PDF (All In One)
|
||||
When choosing this format, VNote will utilize the wkhtmltopdf tool to convert multiple Markdown notes into **one** PDF file. To make this work well, a good practice in using VNote is to turn on **Heading Sequence** starting from level 2 and insert the title as level 1 heading for each note.
|
||||
|
||||
### Custom
|
||||
The **Custom** format enable users to choose whatever tool they like to process notes.
|
||||
|
||||

|
||||
|
||||
Advanced settings:
|
||||
|
||||
- **Source format**
|
||||
- VNote supports using Markdown or HTML format as the inputs to your tool.
|
||||
- **Output suffix**
|
||||
- The suffix of the output file, such as `docx`, `pdf`, or `ppt`.
|
||||
- **Enable All In One**
|
||||
- Whether put multiple notes as the input once to your tool. They are separated by spaces.
|
||||
- **Output file name**
|
||||
- The file name of the output. It is only valid when All In One is enabled.
|
||||
- **Input directories separator**
|
||||
- VNote could pass the directories of the input notes to your tool. You could use these directories as the resource folders. This option specifies the separator to concatenate these directories.
|
||||
- Command
|
||||
- The command executed by VNote. Some special place holder you could use:
|
||||
- `%0`: the input files;
|
||||
- `%1`: the output file;
|
||||
- `%2`: the rendering CSS style file to be used;
|
||||
- `%3`: the input file directories;
|
||||
- `%4`: the rendering code block CSS style file to be used;
|
||||
|
||||
An example to use [Pandoc](http://pandoc.org) to export notes:
|
||||
|
||||
```sh
|
||||
pandoc --resource-path=.:"%3" --css="%2" --css="%4" -s -o "%1" "%0"
|
||||
```
|
||||
|
||||
::: alert-info
|
||||
|
||||
On Windows, you need to change the separator from `:` to `;` according to Pandoc.
|
||||
|
||||
:::
|
||||
|
||||
If the output suffix is `pdf`, it will generate the PDF file; if it is `docx`, it will generate the DOCX file; and if it is `pptx`, it will generate the PPTX file.
|
@ -1,74 +1,27 @@
|
||||
# Frequently Asked Questions
|
||||
## How to specify customized MathJax script?
|
||||
VNote supports a configuration `[web]/mathjax_javascript` which specifies the location of the MathJax and its configuration to use. The default value may look like this:
|
||||
## How to Specify Custom MathJax Script?
|
||||
VNote uses MathJax 3 to render math formulas. To specify the MathJax script to use, do the following steps:
|
||||
|
||||
```ini
|
||||
[web]
|
||||
; Location and configuration for Mathjax
|
||||
mathjax_javascript=https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML
|
||||
1. Open the default configuration folder, and copy `web/js/mathjax.js` to the user configuration folder as `web/js/mathjax.js`, then you could modify the copied `mathjax.js` file here. VNote will use this file instead of the default one.
|
||||
2. Edit the `mathjax.js` file. The MathJax script to use is given by:
|
||||
```js
|
||||
this.mathJaxScript = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js';
|
||||
```
|
||||
|
||||
You could download the MathJax ([howto](https://docs.mathjax.org/en/latest/web/hosting.html)) and specify a local copy of the MathJax to use:
|
||||
|
||||
```js
|
||||
this.mathJaxScript = 'file://c:/Users/foo/mathjax/tex-svg.js';
|
||||
```
|
||||
|
||||
You could download the MathJax ([howto](http://docs.mathjax.org/en/latest/installation.html)) and specify a local copy of the MathJax to use, like `mathjax_javascript="file:///home/tamlok/Downloads/MathJax-2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"`.
|
||||
## Interface Is Freezed
|
||||
## Cursor Is Not Visible in Edit Mode
|
||||
## Crash When Opening A Note
|
||||
All the above 3 issues may be caused by the driver of the display card only on Windows. Steps to solve it:
|
||||
|
||||
You could also specify customized script in GUI settings dialog:
|
||||
|
||||

|
||||
|
||||
Notes:
|
||||
|
||||
- Need to prepend `file://` to the local path;
|
||||
- Using local path may get the fonts wrong. I think a better way is to run a light HTTP server locally.
|
||||
|
||||
## How to make VNote more "portable"?
|
||||
VNote will read and store configuration files in the common directory of the operating system to store application data. If you prefer to put these configuration files along with the VNote executable, you coulud copy or create the `vnote.ini` file in the directory containing VNote executable. VNote will first try to read `vnote.ini` from where the executable exists.
|
||||
|
||||
However, please notice that VNote will store the notebook's path in the configuration file, so it may read a wrong path and complain about errors if you copy VNote to another computer.
|
||||
|
||||
## How to draw diagrams using Mermaid or Flowchart.js?
|
||||
1. Enable `Mermaid Diagram` and `Flowchart.js` in the `Markdown` menu;
|
||||
2. Re-open opened tabs to let it take effect;
|
||||
3. For Mermaid, write a fenced code block specified with language `mermaid`;
|
||||
4. For Flowchart.js, write a fenced code block specified with language `flowchart` or `flow`;
|
||||
|
||||
Mermaid example:
|
||||
|
||||
```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```
|
||||
|
||||
Flowchart.js example:
|
||||
|
||||
```flowchart
|
||||
st=>start: Start:>http://www.google.com[blank]
|
||||
e=>end:>http://www.google.com
|
||||
op1=>operation: My Operation
|
||||
sub1=>subroutine: My Subroutine
|
||||
cond=>condition: Yes
|
||||
or No?:>http://www.google.com
|
||||
io=>inputoutput: catch something...
|
||||
|
||||
st->op1->cond
|
||||
cond(yes)->io->e
|
||||
cond(no)->sub1(right)->op1
|
||||
```
|
||||
|
||||
## How to open a note in another tab?
|
||||

|
||||
|
||||
When `Single click to open a note in current tab` is enabled, single-click in the note list to open the note in current tab, while double-click to open it in a new tab.
|
||||
|
||||
## Interface is freezed
|
||||
## Cursor is not visible in edit mode
|
||||
## Crash when opening a note
|
||||
## Menu does not work in fullscreen mode
|
||||
All the above 4 issues may be caused by the driver of the display card. Steps to solve it:
|
||||
|
||||
1. On Windows, try to update the display card driver;
|
||||
1. Try to update the display card driver;
|
||||
2. Try to schedule VNote to run with integrated display card;
|
||||
3. If not works, try to declare a system environment variable named `QT_OPENGL` and set its value to `desktop`, or `angle`, or `software`.
|
||||
3. If it does not works, try to set the `OpenGL`value one by one in the `Settings` dialog.
|
||||

|
||||
|
||||
Restart of VNote is needed after the action.
|
||||
Restart of VNote is needed after each step to check if it takes effect.
|
||||
|
@ -1,43 +0,0 @@
|
||||
# Full-Text Search
|
||||
VNote provides powerful built-in full-text search to search your notes.
|
||||
|
||||
`Ctrl+E C` or `Ctrl+Alt F` to activate the **Search** dock widget. You could also activate it through the `Edit` or `View` menu.
|
||||
|
||||

|
||||
|
||||
## Keywords
|
||||
- Specify the keywords to search for;
|
||||
- Support `&&` and `||` for AND and OR logics, such as `markdown && vnote`;
|
||||
- Space-separated keywords mean AND, such as `markdown vnote`;
|
||||
|
||||
### Magic Switch
|
||||
VNote supports **Magic Switch** in the keywords to turn on/off some options of the search:
|
||||
|
||||
- `\f` or `\F`: disable or enable **Fuzzy Search**;
|
||||
- `\c` or `\C`: case insensitive or sensitive;
|
||||
- `\r` or `\R`: disable or enable **Regular Expression**;
|
||||
- `\w` or `\W`: disable or enable **Whole Word Only**;
|
||||
|
||||
Example: `vnote \C \W` to search `vnote` with case-insensitive and whole-word-only.
|
||||
|
||||
## Scope
|
||||
There are four scopes to constrain the search:
|
||||
|
||||
- `Opened Notes`;
|
||||
- `Current Folder`;
|
||||
- `Current Notebook`;
|
||||
- `All Notebooks`;
|
||||
|
||||
## Object
|
||||
Specify whether the search should be executed against the **Content** or the **Name**.
|
||||
|
||||
## Target
|
||||
We could search among:
|
||||
|
||||
- `Note`;
|
||||
- `Folder`;
|
||||
- `Notebook`;
|
||||
- `Note/Folder/Notebook`;
|
||||
|
||||
## File Pattern
|
||||
We could specify the file pattern to filter the files we are interested in, such as `*.md` to search only Markdown files.
|
@ -1,5 +1,5 @@
|
||||
# Get Started
|
||||
VNote is distributed on **Linux**, **Windows**, and **macOS**. You could always download standalone packages from the [Downloads](https://github.com/tamlok/vnote#downloads) page.
|
||||
VNote is distributed on **Linux**, **Windows**, and **macOS**. You could always download standalone packages from the [Downloads](https://github.com/vnotex/vnote#downloads) page.
|
||||
|
||||
It is recommended to download and use the **stable releases** of VNote. If you prefer to use some latest features of VNote, you could try the latest continuous build from `master` branch.
|
||||
|
||||
@ -8,25 +8,20 @@ Besides the standalone packages, some package managers may already package and d
|
||||
## Main Interface
|
||||
Here is a snapshot of VNote's main interface.
|
||||
|
||||

|
||||
|
||||
### Menubar and Toolbar
|
||||
VNote provides some settings via **Menubar** at the top of the window and provides some handy shortcuts via **Toolbar** right below the menubar. Place mouse over the menu item or button, there is a tooltip or status tip to help illustrating the function of that item or button.
|
||||

|
||||
|
||||
### Notebooks, Folders, and Notes
|
||||
VNote uses **Notebooks**, **Folders**, and **Notes** hierarchy for note management. The left-side panel is used to navigate through your notebooks, folders, and notes.
|
||||
|
||||
At the first time you launch VNote, you will be prompted to create your first notebook. A notebook corresponds to a directory in your file system. You should choose an empty directory as your *Notebook Root Folder*. All the contents of this notebook will be stored whthin the Notebook Root Folder.
|
||||
A notebook corresponds to a directory in your file system. You should choose an empty directory as your *Notebook Root Folder*. All the contents of this notebook will be stored within the Notebook Root Folder.
|
||||
|
||||
Once you have a notebook, you could create folders in this notebook. VNote supports infinite levels of folders.
|
||||
|
||||
The bottom panel at the left side will list all the notes of current folder. You could create a new note via the context menu.
|
||||
|
||||
### Content Area
|
||||
The middle area which occupies most of the space is the **Content Area**, which is used to read and edit notes. VNote supports opening multiple notes by tabs.
|
||||
|
||||
### Tools Dock Widget
|
||||
At the right-side panel, there are multiple tools to facilitate your reading and editing, such as **Outline** and **Snippets**.
|
||||
### Dock Widgets
|
||||
At the left side, there are several dock widgets, including **Navigation**, **Outline**, **Search** and so on. They could be dragged and dropped freely and placed at the left/top/right/bottom of the main window.
|
||||
|
||||
## Ready To Go
|
||||
That is it! Now you could read, edit, and mange your notes in VNote!
|
@ -1,61 +0,0 @@
|
||||
# Image Hosting
|
||||
From v2.8, VNote supports several image hosting services. Now VNote could upload local images to cloud services.
|
||||
|
||||
There are 4 services now VNote supports:
|
||||
|
||||
- GitHub;
|
||||
- Gitee;
|
||||
- Wechat;
|
||||
- Tencent Cloud;
|
||||
|
||||
For each service, you need to configure the service provider and provide some kind of tokens to VNote to enable VNote access the service.
|
||||
|
||||
There are two common options for each service:
|
||||
|
||||
- `Keep image scale`: Whether keep the scaling of the images in the new links;
|
||||
- `Copy the new content instead of replacing`: After uploading images, just copy the content with new links, without touching the original file;
|
||||
|
||||
## Configurations
|
||||
### GitHub
|
||||

|
||||
|
||||
For GitHub, you need to provide:
|
||||
|
||||
- `Personal access token`: Go to the `Settings` of GitHub, then `Developer Settings`, then `Personal Access Tokens`, and generate a new token with full control of repo.
|
||||

|
||||
- `Repo name`: Name of the repository in GitHub to hold your images;
|
||||
- `User name`: User name of GitHub;
|
||||
|
||||
### Gitee
|
||||
Gitee is quite the same as GitHub.
|
||||
|
||||
### Wechat
|
||||

|
||||
|
||||
Go to [Wechat Public Platform](https://mp.weixin.qq.com/), then `Development`, then `Basic Settings`, and get your `AppID` and `AppSecret`.
|
||||
|
||||
One more step is to write your IP address into the `IP Whitelist` to allow uploading images from your local host.
|
||||
|
||||
The `markdown2WechatToolUrl` is a link which you want VNote to open automatically after copying the new content.
|
||||
|
||||
### Tencent Cloud
|
||||

|
||||
|
||||
1. Go to [Tencent Cloud Platform](https://console.cloud.tencent.com/) and select the `Object Store` product;
|
||||
2. Go to the `Keys Management` and generate a new API key (`SecretId` and `SecretKey`);
|
||||
3. Go back to the `Object Store` panel and select the `Store Bucket List` to create a store bucket (with the `Access Permission` being `Public Read Private Write`);
|
||||
4. Click the `Basic Settings` on the left and get the `Access Domain`;
|
||||
5. In the same page, add a rule to the `CORS Settings`;
|
||||

|
||||
|
||||
## How to use
|
||||
After you finish writing a note, you could choose to upload images to image hosting service in the context menu (in Edit mode).
|
||||
|
||||

|
||||
|
||||
VNote will go through all the local images and upload them to chosen service.
|
||||
|
||||
- If you choose to replace image links in the original file, the content will be modified after finishing uploading. VNote will prompt to delete unused local images when you save the note.
|
||||
- Otherwise, VNote will copy the new content with new image links and leave the original note untouched.
|
||||
|
||||
Thanks @fengwenhua for this pull request!
|
@ -1,46 +0,0 @@
|
||||
# Magic Word
|
||||
**Magic Words** are some characters that have special meanings. They will be evaluated to some pre-defined characters. For one simple example, `date` could be evaluated to the date of today.
|
||||
|
||||
VNote support magic words in most of the input widgets. For example, you could use magic word for the note name when creating a note.
|
||||
|
||||
`%da% work log.md` will be evaluated as `20180128 work log.md` since `%da%` is a magic word which is defined as the date of today in the form `YYYYMMDD`.
|
||||
|
||||
In the editor, you could type `%da%`, and then press shortcut `Ctrl+E M`, which will evaluate the word under cursor as magic word.
|
||||
|
||||
For example, type following words:
|
||||
|
||||
```
|
||||
Today is %da%
|
||||
```
|
||||
|
||||
Then press `Ctrl+E M`, it will be changed to:
|
||||
|
||||
```
|
||||
Today is 20180128
|
||||
```
|
||||
|
||||
## Built-In Magic Words
|
||||
VNote has defined lots of magic words. In the input dialog, type `%help%` to show a list of defined magic words.
|
||||
|
||||

|
||||
|
||||
## Custom Magic Words
|
||||
Edit the `vnote.ini` file in configuration folder like this:
|
||||
|
||||
```ini
|
||||
[magic_words]
|
||||
1\name=vnote
|
||||
1\definition="vnote is a great tool! -- Written %datetime%"
|
||||
2\name=hw
|
||||
2\definition="hello world!"
|
||||
size=2
|
||||
```
|
||||
|
||||
Now we got two magic words `vnote` (based on another magic word `datetime`) and `hw`.
|
||||
|
||||
## Magic Word In Snippet
|
||||
[Snippet](snippet.html) also supports magic word. Now we could define a snippet to insert current date like this:
|
||||
|
||||

|
||||
|
||||
Now in edit mode, we could hit `Ctrl+E S D` to insert current date.
|
@ -1,32 +1,26 @@
|
||||
# Notes Management
|
||||
VNote adopts **notebooks-folders-notes** hierarchy for notes management. A notebook corresponds to a directory in the file system, which is called **Notebook Root Folder**. Folders of a notebook correspond to directories within the Notebook Root Folder. Notes inside a folder corresponds to files within that directory.
|
||||
|
||||
VNote may use some index files to keep track of all the notes within a notebook, so it is recommended to manage your notes within VNote.
|
||||
|
||||
## Notebook
|
||||
Notebook is an independent, self-explanatory container in VNote. A notebook is a **Notebook Root Folder** in the file system. The root folder contains all the notes and configuration files of that notebook.
|
||||
|
||||
### Create A Notebook
|
||||
You could create a new notebook by specifying following fields:
|
||||
You could create a notebook directly from an empty Notebook Root Folder.
|
||||
|
||||
- **Notebook Name**
|
||||
- Name of your notebook in VNote. It is only used to identify your notebook in VNote. It will not be written into the configuration of the notebook.
|
||||
- **Notebook Root Folder**
|
||||
- Choose an **EMPTY** directory in your system to hold all the contents of this notebook. This choosen directory is assumed to be in the control of VNote.
|
||||
- **Image Folder**
|
||||
- This is the name of the folder used to store local images of notes. VNote uses a given folder which has the same parent folder of the notes to store images of those notes.
|
||||
- **Attachment Folder**
|
||||
- This is the name of the folder used to store attachment files of notes.
|
||||
If you have already many Markdown files before using VNote, you could **New Notebook From Folder** to construct a notebook from existing folder.
|
||||
|
||||
### Migrate and Import A Notebook
|
||||
A notebook is an independent directory in the file system, so you could just copy or synchronize the *Notebook Root Folder* to migrate a notebook.
|
||||
|
||||
You could import an existing notebook into VNote by selecting its *Notebook Root Folder* when creating a notebook. VNote will try to read the configuration files to restore the notebook.
|
||||
You could import an existing notebook into VNote by selecting its *Notebook Root Folder*. VNote will try to read the configuration files to restore the notebook.
|
||||
|
||||
Combining these, you could create your notebooks in a directory which is synchronized via third-party service, such as Dropbox and OneDrive, and then in another computer, you could import that directory into VNote as a notebook. With this, you could use VNote to edit and manage your notes, which will be synchronized by other trusted services, both at home and at work.
|
||||

|
||||
|
||||
## Folders
|
||||
The hierarchy of folders within a notebook is the same as that of the directories within the *Notebook Root Folder*. You could create as many as possible levels of folders theoritically.
|
||||
Combining these, you could create your notebooks in a directory which is synchronized via third-party service, such as Dropbox and OneDrive, and then on another computer, you could import that directory into VNote as a notebook. With this, you could use VNote to edit and manage your notes, which will be synchronized by other trusted services, both at home and at work.
|
||||
|
||||
## Notes
|
||||
You could import external files into VNote as notes by the `New Notes From Files` action in `File` menu. VNote will **copy** selected files into current folder as notes.
|
||||
### Import Files and Folders
|
||||
You could import external files and folders into existing notebook.
|
||||
|
||||
In theory, a note in VNote could use any suffix. Notes with suffix `.md` will be treated as Markdown files.
|
||||

|
@ -1,42 +1,40 @@
|
||||
# Snippet
|
||||
Snippet is designed to facilitate the repeated input of some words.
|
||||
Snippet is designed to facilitate the repeated inputs of some words.
|
||||
|
||||
## Snippet Management
|
||||
You could manage snippets via the `Tools` dock widget.
|
||||
There is a `json` file for a user-defined snippet. There are some built-in snippets, such as inputting current date. Built-in snippets are read-only and there is a `*` suffix in after their names.
|
||||
|
||||

|
||||
|
||||
In this panel, we could:
|
||||
|
||||
1. Create a snippet;
|
||||
2. Open snippet folder;
|
||||
VNote uses a folder in the configuration folder to store all the snippets and use configuration file `snippet.json` for management. Each snippet corresponds to one file.
|
||||
3. View and edit the information about a snippet;
|
||||
4. Sort and delete snippets;
|
||||
5. Apply (insert) a snippet into the editor;
|
||||

|
||||
|
||||
## Define A Snippet
|
||||
A snippet contains:
|
||||

|
||||
|
||||
- Snippet Name
|
||||
- Identifies a snippet. It is also the name of the corresponding file in the snippet folder.
|
||||
- Snippet Type
|
||||
- Plain text or HTML. Currently only plain text is supported.
|
||||
- Shortcut
|
||||
- You could designate one of the 26 characters (`a` to `z`) to insert snippet quickly.
|
||||
- Cursor Mark
|
||||
- VNote uses Cursor Mark to mark the position of the cursor after applying a snippet. Should appears only once in the `Content`.
|
||||
- Selection Mark
|
||||
- VNote uses Selection Mark to mark the position to insert the selected text before applying a snippet. Selection mark could appear multiple times in the `Content`. After applying a snippet, all the selection marks will be replaced with the selected text.
|
||||
- Content
|
||||
- The content of the snippet which will be inserted at the position of current cursor while applying a snippet.
|
||||
- Snippet Name: The identifier of a snippet. It will be used to search for a snippet.
|
||||
- Shortcut: You could assign a shortcut to s snippet to quickly locate a snippet. The shortcut is two digits.
|
||||
- Cursor Mark: VNote uses Cursor Mark to mark the position of the cursor after applying a snippet. Should appears only once in the `Content`.
|
||||
- Selection Mark: VNote uses Selection Mark to mark the position to insert the selected text before applying a snippet. Selection mark could appear multiple times in the `Content`. After applying a snippet, all the selection marks will be replaced with the selected text.
|
||||
|
||||
## Apply A Snippet
|
||||
### Snippet Panel
|
||||
Place the cursor at the proper position and double click a snippet in the snippet panel to apply a snippet.
|
||||
|
||||
### Shortcuts
|
||||
You could use **Captain Mode** to apply a snippet quickly. In edit mode, press `Ctrl+E S` to activate snippet selection dialog, which shows all the snippets **with shortcut defined**. Press the corresponding shortcut key to apply a snippet.
|
||||
In editor, press `Ctrl+G, I` will call out a panel containing all the snippets.
|
||||
|
||||
You could directly type `00` to apply `My First Snippet`. Or you could type keyword `my` to search snippets by name and press `Enter` to apply the first hit snippet.
|
||||
|
||||
You could press `Tab` to focus on the snippet list and use `Ctrl+H/J/K/L` to navigate through items and press `Enter` to apply the selected snippet.
|
||||
|
||||

|
||||
|
||||
### Symbol
|
||||
Another simple way to apply a snippet is type `%snippet_name%` in the editor directly and press `Ctrl+G, I` to translate that symbol into snippet `snippet_name`.
|
||||
|
||||
Many line edit widgets in VNote also support snippet in this way, such as:
|
||||
|
||||
* New Note dialog;
|
||||
* New Notebook dialog;
|
||||
* Note template;
|
||||
|
||||
## Examples
|
||||
### Insert Code Block with CPP
|
||||
|
@ -3,22 +3,22 @@ VNote supports creating a note from a template.
|
||||
|
||||
When creating a note, you could choose one template in the dialog.
|
||||
|
||||

|
||||

|
||||
|
||||
VNote stores template files in the `templates` subfolder of the configuration folders. One file corresponds to one template. You could access the template folder by clicking the "folder" icon  besides the combo box.
|
||||
VNote stores template files in the `templates` folder. One file corresponds to one template.
|
||||
|
||||
You could add or delete template files in the template folder via system's file browser.
|
||||
You could add or delete template files directly in the template folder via system's file browser.
|
||||
|
||||
VNote supports **Magic Word** in template. For example, you could write a template like this:
|
||||
VNote supports **Snippet** in template. For example, you could write a template like this:
|
||||
|
||||
```md
|
||||
# %no%
|
||||
This is a template using **Magic Word** to insert note name as the title automatically.
|
||||
This is a template using **Snippet** to insert note name as the title automatically.
|
||||
```
|
||||
|
||||
`%no%` is a magic word which will be evaluated to the note name (without suffix). Hence if the note name is `week report.md`, then the new note will look like this:
|
||||
`%no%` is a built-in snippet which will be evaluated to the note name (without suffix). Hence if the note name is `week report.md`, then the new note will look like this:
|
||||
|
||||
```md
|
||||
# week report
|
||||
This is a template using **Magic Word** to insert note name as the title automatically.
|
||||
This is a template using **Snippet** to insert note name as the title automatically.
|
||||
```
|
@ -2,377 +2,18 @@
|
||||
## Themes
|
||||
A **theme** specifies the look of VNote, the style of the editor and read mode, and the syntax highlight style of code block.
|
||||
|
||||
A theme corresponds to a folder in the `themes` subfolder in the configuration folder with structure:
|
||||
A theme corresponds to a folder in the `themes` folder. You could change and manage themes in the `Settings` dialog.
|
||||
|
||||
```
|
||||
themes/
|
||||
├── v_pure
|
||||
│ ├── arrow_dropdown.svg
|
||||
│ ├── branch_closed.svg
|
||||
│ ├── branch_end.svg
|
||||
│ ├── branch_more.svg
|
||||
│ ├── branch_open.svg
|
||||
│ ├── checkbox_checked.svg
|
||||
│ ├── checkbox_unchecked.svg
|
||||
│ ├── close_grey.svg
|
||||
│ ├── close.svg
|
||||
│ ├── down_disabled.svg
|
||||
│ ├── down.svg
|
||||
│ ├── float.svg
|
||||
│ ├── left_disabled.svg
|
||||
│ ├── left.svg
|
||||
│ ├── line.svg
|
||||
│ ├── menu_checkbox.svg
|
||||
│ ├── menu_radiobutton.svg
|
||||
│ ├── radiobutton_checked.svg
|
||||
│ ├── radiobutton_unchecked.svg
|
||||
│ ├── right_disabled.svg
|
||||
│ ├── right.svg
|
||||
│ ├── up_disabled.svg
|
||||
│ ├── up.svg
|
||||
│ ├── v_pure_codeblock.css
|
||||
│ ├── v_pure.css
|
||||
│ ├── v_pure.mdhl
|
||||
│ ├── v_pure.palette
|
||||
│ └── v_pure.qss
|
||||
```
|
||||

|
||||
|
||||
- `v_pure.palette`: the main entry of a theme, which specifies other files and styles;
|
||||
- `v_pure.qss`: file for [**Qt Style Sheet**](http://doc.qt.io/qt-5/stylesheet-reference.html), which specifies the look of all the widgets;
|
||||
- `v_pure.mdhl`: file for the style of Markdown editor, using [The Syntax of PEG Markdown Highlight Stylesheets](http://hasseg.org/peg-markdown-highlight/docs/stylesheet_syntax.html);
|
||||
- `v_pure.css`: file for the style of read mode;
|
||||
- `v_pure_codeblock.css`: file for the style of the code block highlight in read mode, using [Highlight.js](https://highlightjs.org/static/demo/);
|
||||
### How to Add A Theme
|
||||
It is a good practice to start a custom theme based on an existing theme. Copy the folder of your favorite theme and paste it into the `themes` folder under **user configuration** folder. Remember to rename the folder.
|
||||
|
||||
### Palette of Theme
|
||||
Let's look into the `.palette` file. The file is in `INI` format.
|
||||
### Components of A Theme
|
||||
Some key files of a theme:
|
||||
|
||||
#### [metadata]
|
||||
This section specifies other style files this theme will use.
|
||||
|
||||
```ini
|
||||
; File path could be absolute path or relative path (related to this file).
|
||||
; Use @color_tag to reference a style.
|
||||
|
||||
[metadata]
|
||||
qss_file=v_pure.qss
|
||||
mdhl_file=v_pure.mdhl
|
||||
css_file=v_pure.css
|
||||
codeblock_css_file=v_pure_codeblock.css
|
||||
version=2
|
||||
```
|
||||
|
||||
#### [phony]
|
||||
This section is used to define **variables** for fundamental, abstract color attributes. A variable could be referenced by `@variable_name` to define another variable.
|
||||
|
||||
These variables are referenced by other sections, so you are free to choose and define your own ones.
|
||||
|
||||
```ini
|
||||
[phony]
|
||||
; Abstract color attributes.
|
||||
master_fg=#F5F5F5
|
||||
master_bg=#00897B
|
||||
master_light_bg=#80CBC4
|
||||
master_dark_bg=#00796B
|
||||
master_focus_bg=#009688
|
||||
master_hover_bg=#009688
|
||||
master_pressed_bg=#00796B
|
||||
|
||||
base_fg=#222222
|
||||
base_bg=#EAEAEA
|
||||
|
||||
main_fg=@base_fg
|
||||
main_bg=@base_bg
|
||||
|
||||
title_fg=@base_fg
|
||||
title_bg=@base_bg
|
||||
|
||||
disabled_fg=#9E9E9E
|
||||
|
||||
content_fg=@base_fg
|
||||
content_bg=@base_bg
|
||||
|
||||
border_bg=#D3D3D3
|
||||
|
||||
separator_bg=#D3D3D3
|
||||
|
||||
hover_fg=@base_fg
|
||||
hover_bg=#D0D0D0
|
||||
|
||||
selected_fg=@base_fg
|
||||
selected_bg=#BDBDBD
|
||||
|
||||
active_fg=@selected_fg
|
||||
active_bg=@selected_bg
|
||||
|
||||
inactive_fg=@selected_fg
|
||||
inactive_bg=#D3D3D3
|
||||
|
||||
focus_fg=@selected_fg
|
||||
focus_bg=@selected_bg
|
||||
|
||||
pressed_fg=@base_fg
|
||||
pressed_bg=#B2B2B2
|
||||
|
||||
edit_fg=#222222
|
||||
edit_bg=#F5F5F5
|
||||
edit_focus_bg=#E0F2F1
|
||||
edit_focus_border=@master_bg
|
||||
edit_selection_fg=@edit_fg
|
||||
edit_selection_bg=@master_light_bg
|
||||
|
||||
icon_fg=#222222
|
||||
icon_disabled_fg=@disabled_fg
|
||||
|
||||
danger_fg=#F5F5F5
|
||||
danger_bg=#C9302C
|
||||
danger_focus_bg=#D9534F
|
||||
danger_hover_bg=#D9534F
|
||||
danger_pressed_bg=#AC2925
|
||||
```
|
||||
|
||||
#### [soft_defined]
|
||||
This section define variables which will be used by VNote code. You **MUST** define these variables to make VNote looks right.
|
||||
|
||||
```ini
|
||||
[soft_defined]
|
||||
; VAvatar.
|
||||
; The foreground color of the avatar when Captain mode is triggered.
|
||||
avatar_captain_mode_fg=@master_fg
|
||||
; The background color of the avatar when Captain mode is triggered.
|
||||
avatar_captain_mode_bg=@master_bg
|
||||
|
||||
; Style of the label in Navigation mode.
|
||||
navigation_label_fg=@master_fg
|
||||
navigation_label_bg=@master_bg
|
||||
|
||||
; Style of the bubble of VButtonWithWidget.
|
||||
bubble_fg=@master_fg
|
||||
bubble_bg=@master_bg
|
||||
|
||||
; Icons' foreground.
|
||||
danger_icon_fg=@danger_bg
|
||||
item_icon_fg=@icon_fg
|
||||
title_icon_fg=@icon_fg
|
||||
|
||||
; VVimIndicator.
|
||||
vim_indicator_key_label_fg=@base_fg
|
||||
vim_indicator_mode_label_fg=@base_fg
|
||||
vim_indicator_cmd_edit_pending_bg=@selected_bg
|
||||
|
||||
; VTabIndicator.
|
||||
tab_indicator_label_fg=@base_fg
|
||||
|
||||
; Html template.
|
||||
template_title_flash_light_fg=@master_light_bg
|
||||
template_title_flash_dark_fg=@master_bg
|
||||
|
||||
; Search hit items in list or tree view.
|
||||
search_hit_item_fg=@selected_fg
|
||||
search_hit_item_bg=@master_light_bg
|
||||
```
|
||||
|
||||
#### [widgets]
|
||||
This section defines variables to be used in `qss` file to define concrete style of different widgets. They are referenced by the `qss` file.
|
||||
|
||||
```ini
|
||||
[widgets]
|
||||
; Widget color attributes.
|
||||
|
||||
; QWidget.
|
||||
widget_fg=@base_fg
|
||||
|
||||
; Separator of dock widgets.
|
||||
dock_separator_bg=@border_bg
|
||||
dock_separator_hover_bg=@border_bg
|
||||
|
||||
; Menubar.
|
||||
menubar_bg=@main_bg
|
||||
menubar_fg=@main_fg
|
||||
menubar_item_selected_bg=@selected_bg
|
||||
|
||||
; Menu.
|
||||
menu_bg=@base_bg
|
||||
menu_fg=@base_fg
|
||||
menu_item_disabled_fg=@disabled_fg
|
||||
menu_item_selected_fg=@selected_fg
|
||||
menu_item_selected_bg=@selected_bg
|
||||
menu_separator_bg=@separator_bg
|
||||
menu_icon_fg=@icon_fg
|
||||
menu_icon_danger_fg=@danger_icon_fg
|
||||
```
|
||||
|
||||
The `qss` file may look like this if you are curious:
|
||||
|
||||
```css
|
||||
/* QWidget */
|
||||
QWidget
|
||||
{
|
||||
color: @widget_fg;
|
||||
font-family: "Hiragino Sans GB", "冬青黑体", "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "WenQuanYi Micro Hei", "文泉驿雅黑", "Dengxian", "等线体", "STXihei", "华文细黑", "Liberation Sans", "Droid Sans", "NSimSun", "新宋体", "SimSun", "宋体", "Helvetica", "sans-serif", "Tahoma", "Arial", "Verdana", "Geneva", "Georgia", "Times New Roman";
|
||||
}
|
||||
|
||||
QWidget[NotebookPanel="true"] {
|
||||
padding-left: 3px;
|
||||
}
|
||||
/* End QWidget */
|
||||
|
||||
/* QMainWindow */
|
||||
QMainWindow {
|
||||
color: @base_fg;
|
||||
background: @base_bg;
|
||||
}
|
||||
|
||||
QMainWindow::separator {
|
||||
background: @dock_separator_bg;
|
||||
width: 2px;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
QMainWindow::separator:hover {
|
||||
background: @dock_separator_hover_bg;
|
||||
}
|
||||
/* End QMainWindow */
|
||||
|
||||
QMenuBar {
|
||||
border: none;
|
||||
background: @menubar_bg;
|
||||
color: @menubar_fg;
|
||||
}
|
||||
|
||||
QMenuBar::item:selected {
|
||||
background: @menubar_item_selected_bg;
|
||||
}
|
||||
```
|
||||
|
||||
### Custom Themes
|
||||
VNote supports custom themes. Just place your theme (folder) to the `themes` folder, restart VNote and choose your theme in the `File` menu.
|
||||
|
||||
The best way to custom a theme is tuning a defaut theme. VNote will output default themes in the `themes` folder (or if not, you could download it [here](https://github.com/tamlok/vnote/tree/master/src/resources/themes)). Copy a default theme and rename the `palette` file. Then you could tune it to your taste. Restart of VNote is needed to let the changes take effect.
|
||||
|
||||
## Editor Styles
|
||||
Editor style is specified by a `mdhl` file. Each theme may carry a `mdhl` file. You could also apply another `mdhl` file instead of using the default one specified by the theme. Separate style file could be placed in the `styles` folder in the configuration folder. Restart of VNote is needed to scan new `mdhl` files and re-open of notes is needed to apply new style.
|
||||
|
||||

|
||||
|
||||
### Syntax of MDHL File
|
||||
The `mdhl` file adopts the [The Syntax of PEG Markdown Highlight Stylesheets](http://hasseg.org/peg-markdown-highlight/docs/stylesheet_syntax.html) and expands it to support more elements.
|
||||
|
||||
```
|
||||
# This is the default markdown styles used for Peg-Markdown-Highlight
|
||||
# created by Le Tan(tamlokveer@gmail.com).
|
||||
# For a complete description of the syntax, please refer to the original
|
||||
# documentation of the style parser
|
||||
# [The Syntax of PEG Markdown Highlight Stylesheets](http://hasseg.org/peg-markdown-highlight/docs/stylesheet_syntax.html).
|
||||
# VNote adds some styles in the syntax which will be marked [VNote] in the comment.
|
||||
#
|
||||
# Note: Empty lines within a section is NOT allowed.
|
||||
# Note: Do NOT modify this file directly. Copy it and tune your own style!
|
||||
|
||||
editor
|
||||
# QTextEdit just choose the first available font, so specify the Chinese fonts first
|
||||
# Do not use "" to quote the name
|
||||
font-family: Hiragino Sans GB, 冬青黑体, Microsoft YaHei, 微软雅黑, Microsoft YaHei UI, WenQuanYi Micro Hei, 文泉驿雅黑, Dengxian, 等线体, STXihei, 华文细黑, Liberation Sans, Droid Sans, NSimSun, 新宋体, SimSun, 宋体, Helvetica, sans-serif, Tahoma, Arial, Verdana, Geneva, Georgia, Times New Roman
|
||||
font-size: 12
|
||||
foreground: 222222
|
||||
background: f5f5f5
|
||||
# [VNote] Style for trailing space
|
||||
trailing-space: a8a8a8
|
||||
# [VNote] Style for line number
|
||||
line-number-background: eaeaea
|
||||
line-number-foreground: 424242
|
||||
# [VNote] Style for selected word highlight
|
||||
selected-word-foreground: 222222
|
||||
selected-word-background: dfdf00
|
||||
# [VNote] Style for searched word highlight
|
||||
searched-word-foreground: 222222
|
||||
searched-word-background: 4db6ac
|
||||
# [VNote] Style for searched word under cursor highlight
|
||||
searched-word-cursor-foreground: 222222
|
||||
searched-word-cursor-background: 66bb6a
|
||||
# [VNote] Style for incremental searched word highlight
|
||||
incremental-searched-word-foreground: 222222
|
||||
incremental-searched-word-background: ce93d8
|
||||
# [VNote] Style for color column in fenced code block
|
||||
color-column-background: dd0000
|
||||
color-column-foreground: ffff00
|
||||
# [VNote} Style for preview image line
|
||||
preview-image-line-foreground: 9575cd
|
||||
|
||||
editor-selection
|
||||
foreground: eeeeee
|
||||
background: 005fff
|
||||
|
||||
editor-current-line
|
||||
background: c5cae9
|
||||
# [VNote] Vim insert mode cursor line background
|
||||
vim-insert-background: c5cae9
|
||||
# [VNote] Vim normal mode cursor line background
|
||||
vim-normal-background: e0e0e0
|
||||
# [VNote] Vim visual mode cursor line background
|
||||
vim-visual-background: bbdefb
|
||||
# [VNote] Vim replace mode cursor line background
|
||||
vim-replace-background: f8bbd0
|
||||
|
||||
H1
|
||||
foreground: 222222
|
||||
font-style: bold
|
||||
font-size: +8
|
||||
|
||||
VERBATIM
|
||||
foreground: 673ab7
|
||||
font-family: Consolas, Monaco, Andale Mono, Monospace, Courier New
|
||||
# [VNote] Codeblock sylte from HighlightJS (bold, italic, underlined, color)
|
||||
# The last occurence of the same attribute takes effect
|
||||
# Could specify multiple attribute in one line
|
||||
hljs-comment: 6c6c6c
|
||||
hljs-keyword: 0000ee
|
||||
hljs-attribute: 0000ee
|
||||
hljs-selector-tag: 0000ee
|
||||
hljs-meta-keyword: 0000ee
|
||||
hljs-doctag: 0000ee
|
||||
hljs-name: 0000ee
|
||||
hljs-type: 880000
|
||||
hljs-string: 880000
|
||||
hljs-number: 880000
|
||||
hljs-selector-id: 880000
|
||||
hljs-selector-class: 880000
|
||||
hljs-quote: 880000
|
||||
hljs-template-tag: 880000
|
||||
hljs-deletion: 880000
|
||||
hljs-title: bold, 880000
|
||||
hljs-section: bold, 880000
|
||||
hljs-regexp: bc6060
|
||||
hljs-symbol: bc6060
|
||||
hljs-variable: bc6060
|
||||
hljs-template-variable: bc6060
|
||||
hljs-link: bc6060
|
||||
hljs-selector-attr: bc6060
|
||||
hljs-selector-pseudo: bc6060
|
||||
hljs-literal: af00d7
|
||||
hljs-built_in: 008700
|
||||
hljs-bullet: 008700
|
||||
hljs-code: 008700
|
||||
hljs-addition: 008700
|
||||
hljs-meta: 1f7199
|
||||
hljs-meta-string: 4d99bf
|
||||
hljs-emphasis: italic
|
||||
hljs-strong: bold
|
||||
```
|
||||
|
||||
The syntax highlight of the code blocks in edit mode is specified by the `VERBATIM` element.
|
||||
|
||||
For example, if you want to change the font size of the code block in edit mode, you may need to add the following line under `VERBATIM` element:
|
||||
|
||||
```
|
||||
font-size: -2
|
||||
```
|
||||
|
||||
## Rendering Styles
|
||||
Rendering style in read mode is specified by a `css` file. Each theme may carry a `css` file. You could also apply another `css` file instead of using the default one specified by the theme. Separate style file could be placed in the `styles` folder in the configuration folder. Restart of VNote is needed to scan new `css` files and re-open of notes is needed to apply new style.
|
||||
|
||||

|
||||
|
||||
## Code Block Rendering Styles
|
||||
Rendering style in read mode is specified by a `css` file. Each theme may carry a `css` file. You could also apply another `css` file instead of using the default one specified by the theme. Separate style file could be placed in the `styles/codeblock_styles` folder in the configuration folder. Restart of VNote is needed to scan new `css` files and re-open of notes is needed to apply new style.
|
||||
|
||||
This file is used by the **highlight.js** renderer engine. You could download existing style files from [Highlight.js Github](https://github.com/isagalaev/highlight.js/tree/master/src/styles).
|
||||
- `palette.json`: the palette of a theme which defines several colors to be used in the theme;
|
||||
- `interface.qss`: file for [**Qt Style Sheet**](http://doc.qt.io/qt-5/stylesheet-reference.html), which specifies the look of all the widgets; it will use the colors defined by `palette.json`;
|
||||
- `text-editor.theme`: theme file of the text editor (as well as Markdown editor);
|
||||
- `web.css`: style sheet file of the read mode of Markdown;
|
||||
- `highlight.css`: style sheet file of the read mode of Markdown for code block syntax highlight; VNote uses [Prism](https://prismjs.com/) for syntax highlight in read mode;
|
||||
|
@ -1,8 +1,10 @@
|
||||
# Why VNote
|
||||
## What is VNote
|
||||
VNote is a **V**im-inspired **Note**-taking application, designed specially for **Markdown**. It is not yet just another Markdown editor. VNote is designed to be a powerful Markdown editor with sweet note management, or a note-taking application with pleasant Markdown experience.
|
||||
At the very beginning, VNote is a **V**im-inspired **Note**-taking application, designed specially for **Markdown**. It is not yet just another Markdown editor. VNote is designed to be a powerful Markdown editor with sweet note management, or a note-taking application with pleasant Markdown experience.
|
||||
|
||||
VNote is free, and open source. You could get VNote for Linux, Windows, and macOS.
|
||||
Now VNote is intended to be a pleasant note-taking platform, supporting more document types in the future.
|
||||
|
||||
VNote is free and open source. You could get VNote for Linux, Windows, and macOS.
|
||||
|
||||
## Why Another Markdown Wheel
|
||||
### Insights About Markdown
|
||||
|
@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
id="svg8"
|
||||
version="1.1"
|
||||
viewBox="0 0 135.46666 135.46666"
|
||||
height="512"
|
||||
width="512">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(0,-161.53335)"
|
||||
id="g4579"
|
||||
style="display:inline">
|
||||
<path
|
||||
id="path4682"
|
||||
d="m 42.289995,195.6223 -20.278396,3.3e-4 25.334055,70.74483 c 0.448204,1.32121 2.064047,4.66939 4.092726,4.73001 l 21.555975,0.0275 c -8.602263,-24.03459 -17.204501,-48.0692 -25.806767,-72.10379 -0.624661,-1.37844 -2.606139,-3.39892 -4.897593,-3.39892 z"
|
||||
style="fill:#00897b;fill-opacity:1;stroke:none;stroke-width:0.2399714;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
id="path856"
|
||||
d="M 113.45506,217.57986 C 97.982428,237.70991 80.859596,259.34026 72.994356,271.125 l -6.893565,-23.90176 33.174646,-43.1022 z"
|
||||
style="fill:#00897b;fill-opacity:1;stroke:none;stroke-width:0.2399714;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
id="path4577"
|
||||
d="m 113.44472,191.54848 c 0.0504,-1.94436 -1.34529,-4.1252 -3.90208,-4.13813 l -22.932325,-0.002 c 5.340575,7.09033 15.661615,18.31157 26.844745,30.17171 z"
|
||||
style="fill:#00897b;fill-opacity:1;stroke:none;stroke-width:0.21666166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 224 KiB |
@ -5,8 +5,8 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T11:05:58Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T11:05:58Z",
|
||||
"name": "welcome.md",
|
||||
"modified_time": "2021-07-11T08:59:08Z",
|
||||
"name": "Welcome.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
@ -14,7 +14,7 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:08:25Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:08:25Z",
|
||||
"modified_time": "2021-07-11T09:02:39Z",
|
||||
"name": "Why VNote.md",
|
||||
"tags": [
|
||||
]
|
||||
@ -23,7 +23,7 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:09:23Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:09:23Z",
|
||||
"modified_time": "2021-07-12T12:41:51Z",
|
||||
"name": "Get Started.md",
|
||||
"tags": [
|
||||
]
|
||||
@ -32,34 +32,34 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:13:02Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:13:02Z",
|
||||
"modified_time": "2021-07-12T12:50:26Z",
|
||||
"name": "Notes Management.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2021-07-12T00:48:35Z",
|
||||
"id": "0",
|
||||
"modified_time": "2021-07-12T01:40:43Z",
|
||||
"name": "Configuration.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:15:19Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:15:19Z",
|
||||
"modified_time": "2021-07-11T09:41:37Z",
|
||||
"name": "Snippet.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:16:15Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:16:15Z",
|
||||
"name": "Magic Word.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:17:11Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:17:11Z",
|
||||
"modified_time": "2021-07-11T09:44:41Z",
|
||||
"name": "Template.md",
|
||||
"tags": [
|
||||
]
|
||||
@ -68,43 +68,16 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:18:17Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:18:17Z",
|
||||
"modified_time": "2021-07-13T01:36:34Z",
|
||||
"name": "Themes and Styles.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:19:30Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:19:30Z",
|
||||
"name": "Export.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:20:52Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:20:52Z",
|
||||
"name": "Full-Text Search.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2019-11-29T23:45:27Z",
|
||||
"id": "0",
|
||||
"modified_time": "2019-11-29T23:45:27Z",
|
||||
"name": "Image Hosting.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:22:16Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:22:16Z",
|
||||
"modified_time": "2021-07-13T11:27:24Z",
|
||||
"name": "Frequently Asked Questions.md",
|
||||
"tags": [
|
||||
]
|
||||
|
BIN
en_us/docs/Users/vx_images/1104828189178.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
en_us/docs/Users/vx_images/2520536170752.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
en_us/docs/Users/vx_images/2626403110753.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
en_us/docs/Users/vx_images/2697610189178.png
Normal file
After Width: | Height: | Size: 257 KiB |
BIN
en_us/docs/Users/vx_images/34358160752.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
en_us/docs/Users/vx_images/3838649189178.png
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
en_us/docs/Users/vx_images/4005621197211.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
en_us/docs/Users/vx_images/4184025170752.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
en_us/docs/Users/vx_images/5164826090753.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
en_us/docs/Users/vx_images/5480642170752.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
en_us/docs/Users/vx_images/5560217177045.png
Normal file
After Width: | Height: | Size: 20 KiB |
@ -1,13 +1,5 @@
|
||||
# Welcome to VNote's Documentation
|
||||
|
||||

|
||||

|
||||
|
||||
VNote is a note-taking application that knows programmers and Markdown better.
|
||||
|
||||
VNote is open source and available on [GitHub](https://github.com/tamlok/vnote).
|
||||
|
||||
Documentation is also available in [Read The Docs](https://vnote.readthedocs.io) in languages:
|
||||
|
||||
- [English](http://vnote.readthedocs.io/en/latest/)
|
||||
- [Simplified Chinese 简体中文](http://vnote.readthedocs.io/zh_CN/latest/)
|
||||
- [Japanese 日本語](http://vnote.readthedocs.io/ja/latest/)
|
||||
VNote is a pleasant note-taking platform since 2016. VNote is open source and available on [GitHub](https://github.com/vnotex/vnote).
|
@ -3,7 +3,7 @@
|
||||
|
||||
::: alert-success
|
||||
|
||||
VNote 3.0.1 is released! Check out [what's new](https://github.com/vnotex/vnote/releases)!
|
||||
VNote 3.4.0 is released! Check out [what's new](https://github.com/vnotex/vnote/releases)!
|
||||
|
||||
:::
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T05:04:27Z",
|
||||
"id": "0",
|
||||
"modified_time": "2021-05-12T12:52:36Z",
|
||||
"modified_time": "2021-07-10T01:53:51Z",
|
||||
"name": "index.md",
|
||||
"tags": [
|
||||
]
|
||||
|
6
vx.json
@ -3,14 +3,14 @@
|
||||
"files": [
|
||||
],
|
||||
"folders": [
|
||||
{
|
||||
"name": "vx_recycle_bin"
|
||||
},
|
||||
{
|
||||
"name": "en_us"
|
||||
},
|
||||
{
|
||||
"name": "zh_cn"
|
||||
},
|
||||
{
|
||||
"name": "vx_recycle_bin"
|
||||
}
|
||||
],
|
||||
"id": "1",
|
||||
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"created_time": "2021-05-12T12:13:25Z",
|
||||
"files": [
|
||||
],
|
||||
"folders": [
|
||||
],
|
||||
"id": "0",
|
||||
"modified_time": "2021-05-12T12:13:25Z",
|
||||
"version": "1"
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:31:29Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:31:29Z",
|
||||
"modified_time": "2021-07-12T12:19:46Z",
|
||||
"name": "构建VNote.md",
|
||||
"tags": [
|
||||
]
|
||||
|
@ -1,43 +1,43 @@
|
||||
# 构建VNote
|
||||
您需要**Qt 5.9**或以上版本才能从源代码创建VNote。
|
||||
# 构建 VNote
|
||||
您需要 **Qt 5.12** 或以上版本才能从源代码创建 VNote。
|
||||
|
||||
## 获取VNote的源代码
|
||||
VNote的源代码可在 [Github](https://github.com/tamlok/vnote) 上获取。您可以下载代码的ZIP存档。请注意,VNote依赖于某些子模块,因此您还应该下载这些模块的源代码。
|
||||
## 获取 VNote 的源代码
|
||||
VNote 的源代码可在 [GitHub](https://github.com/vnotex/vnote) 上获取。您可以下载代码的ZIP存档。请注意,VNote 依赖于某些子模块,因此您还应该下载这些模块的源代码。
|
||||
|
||||
推荐的方法是像以下方式使用**git**:
|
||||
推荐的方法是像以下方式使用 **git**:
|
||||
|
||||
```
|
||||
git clone https://github.com/tamlok/vnote.git vnote.git
|
||||
git clone https://github.com/vnotex/vnote.git vnote.git
|
||||
cd vnote.git
|
||||
git submodule update --init
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
## 获取Qt 5.9
|
||||
您可以从 [Qt Downloads](http://info.qt.io/download-qt-for-application-development) 获取完整的 Qt SDK。对于中国用户,您可以通过[TUNA 镜像](https://mirrors4.tuna.tsinghua.edu.cn/qt/official_releases/qt/5.9/) 加快下载速度。
|
||||
## 获取 Qt 5.12
|
||||
您可以从 [Qt Downloads](http://info.qt.io/download-qt-for-application-development) 获取完整的 Qt SDK。对于中国大陆用户,您可以通过 [TUNA 镜像](https://mirrors4.tuna.tsinghua.edu.cn/qt/official_releases/qt/5.12/) 加快下载速度。
|
||||
|
||||
## Windows
|
||||
在 Windows 上,您需要 **Visual Studio 2015** 或更高版本来编译 VNote。
|
||||
在 Windows 上,您需要 **Visual Studio 2015** 或更高版本来编译 VNote (Mingw **不**受支持)。
|
||||
|
||||
打开 **Qt Creator** 并打开`vnote.git\VNote.pro`作为项目。现在您已准备好调整和编译VNote!
|
||||
打开 **Qt Creator** 并打开 `vnote.git\vnote.pro` 作为项目。现在您已准备好调整和编译 VNote!
|
||||
|
||||
## Linux
|
||||
在Ubuntu中,你可以像这样从PPA获得 Qt 5.9:
|
||||
在Ubuntu中,你可以像这样从PPA获得 Qt 5.12:
|
||||
|
||||
```sh
|
||||
sudo add-apt-repository ppa:beineri/opt-qt591-trusty -y
|
||||
sudo add-apt-repository ppa:beineri/opt-qt5.12.10-bionic -y
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get -y install qt59base qt59webengine
|
||||
sudo apt-get -y install qt59webchannel qt59svg qt59location qt59tools qt59translations
|
||||
sudo apt-get -y install qt512base qt512webengine
|
||||
sudo apt-get -y install qt512webchannel qt512svg qt512location qt512tools qt512translations
|
||||
source /opt/qt*/bin/qt*-env.sh
|
||||
```
|
||||
|
||||
然后像这样编译和安装VNote:
|
||||
然后像这样编译和安装 VNote:
|
||||
|
||||
```sh
|
||||
cd vnote.git
|
||||
mkdir build
|
||||
cd build
|
||||
qmake ../VNote.pro
|
||||
qmake ../vnote.pro
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
@ -53,26 +53,26 @@ fcitx-diagnose | grep libfcitxplatforminputcontextplugin.so
|
||||
|
||||
如果没有这样的库,您可能需要在继续之前为 Qt5 正确安装和配置 Fcitx。
|
||||
|
||||
然后你需要将lib复制到Qt的插件目录:
|
||||
然后您需要将库文件复制到 Qt 的插件目录:
|
||||
|
||||
```
|
||||
<path_to_Qt_installation_directory>/5.9.3/gcc_64/plugins/platforminputcontexts/
|
||||
<path_to_Qt_installation_directory>/5.12.10/gcc_64/plugins/platforminputcontexts/
|
||||
```
|
||||
|
||||
### OpenSSL
|
||||
VNote需要 **openSSL 1.0** 以实现联网。要验证它是否已正确设置,您可以在VNote的帮助菜单中检查更新。如果VNote无法检查更新,则需要将openSSL的库复制到Qt的库目录中。
|
||||
VNote 需要 **openSSL 1.0** 以实现联网。
|
||||
|
||||
安装openSSL后,您可以找到两个lib文件:
|
||||
安装 openSSL 后,您可以找到两个库文件:
|
||||
|
||||
```
|
||||
/usr/lib/libcrypto.so.1.0.0
|
||||
/usr/lib/libssl.so.1.0.0
|
||||
```
|
||||
|
||||
将这两个文件复制到Qt的库目录中:
|
||||
将这两个文件复制到 Qt 的库目录中:
|
||||
|
||||
```
|
||||
<path_to_Qt_installation_directory>/5.9.3/gcc_64/lib/
|
||||
<path_to_Qt_installation_directory>/5.12.10/gcc_64/lib/
|
||||
```
|
||||
|
||||
在Qt的库目录中,为这两个文件创建符号链接:
|
||||
@ -83,19 +83,19 @@ ln -s libssl.so.1.0.0 libssl.so
|
||||
```
|
||||
|
||||
## MacOS
|
||||
如果您更喜欢macOS上的命令行,则可以按照以下步骤操作。
|
||||
如果您更喜欢 macOS 上的命令行操作方式,则可以按照以下步骤操作。
|
||||
|
||||
1. 安装Xcode和Homebrew;
|
||||
2. 通过Homebrew安装Qt 5.9.1:
|
||||
1. 安装 Xcode 和 Homebrew;
|
||||
2. 通过 Homebrew 安装 Qt:
|
||||
|
||||
```
|
||||
brew install qt@5.9.1
|
||||
brew install qt@5.12.10
|
||||
```
|
||||
|
||||
3. 在项目目录中,像下面那样创建`build_macos.sh`:
|
||||
3. 在项目目录中,像下面那样创建 `build_macos.sh`:
|
||||
|
||||
```sh
|
||||
QTDIR="/usr/local/opt/qt@5.9.1"
|
||||
QTDIR="/usr/local/opt/qt@5.12.10"
|
||||
PATH="$QTDIR/bin:$PATH"
|
||||
LDFLAGS=-L$QTDIR/lib
|
||||
CPPFLAGS=-I$QTDIR/include
|
||||
@ -103,7 +103,7 @@ ln -s libssl.so.1.0.0 libssl.so
|
||||
mkdir -p build
|
||||
cd build
|
||||
qmake -v
|
||||
qmake CONFIG-=debug CONFIG+=release ../VNote.pro
|
||||
qmake CONFIG-=debug CONFIG+=release ../vnote.pro
|
||||
make -j2
|
||||
```
|
||||
|
||||
@ -114,4 +114,4 @@ ln -s libssl.so.1.0.0 libssl.so
|
||||
./build_macos.sh
|
||||
```
|
||||
|
||||
5. 现在你得到了bundle路径 `path/to/project/build/src/VNote.app` 。
|
||||
5. 现在你得到了bundle路径 `path/to/project/build/src/vnote.app` 。
|
||||
|
@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
id="svg8"
|
||||
version="1.1"
|
||||
viewBox="0 0 135.46666 135.46666"
|
||||
height="512"
|
||||
width="512">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(0,-161.53335)"
|
||||
id="g4579"
|
||||
style="display:inline">
|
||||
<path
|
||||
id="path4682"
|
||||
d="m 42.289995,195.6223 -20.278396,3.3e-4 25.334055,70.74483 c 0.448204,1.32121 2.064047,4.66939 4.092726,4.73001 l 21.555975,0.0275 c -8.602263,-24.03459 -17.204501,-48.0692 -25.806767,-72.10379 -0.624661,-1.37844 -2.606139,-3.39892 -4.897593,-3.39892 z"
|
||||
style="fill:#00897b;fill-opacity:1;stroke:none;stroke-width:0.2399714;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
id="path856"
|
||||
d="M 113.45506,217.57986 C 97.982428,237.70991 80.859596,259.34026 72.994356,271.125 l -6.893565,-23.90176 33.174646,-43.1022 z"
|
||||
style="fill:#00897b;fill-opacity:1;stroke:none;stroke-width:0.2399714;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
id="path4577"
|
||||
d="m 113.44472,191.54848 c 0.0504,-1.94436 -1.34529,-4.1252 -3.90208,-4.13813 l -22.932325,-0.002 c 5.340575,7.09033 15.661615,18.31157 26.844745,30.17171 z"
|
||||
style="fill:#00897b;fill-opacity:1;stroke:none;stroke-width:0.21666166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 224 KiB |
@ -5,7 +5,7 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:26:23Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:26:23Z",
|
||||
"modified_time": "2021-07-12T12:22:14Z",
|
||||
"name": "欢迎使用.md",
|
||||
"tags": [
|
||||
]
|
||||
@ -14,8 +14,8 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:28:54Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:28:54Z",
|
||||
"name": "为什么需要VNote.md",
|
||||
"modified_time": "2021-07-12T12:35:12Z",
|
||||
"name": "为什么需要 VNote.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
@ -23,7 +23,7 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:29:11Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:29:11Z",
|
||||
"modified_time": "2021-07-12T12:43:38Z",
|
||||
"name": "快速上手.md",
|
||||
"tags": [
|
||||
]
|
||||
@ -32,34 +32,34 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:29:25Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:29:25Z",
|
||||
"modified_time": "2021-07-12T12:56:05Z",
|
||||
"name": "笔记管理.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2021-07-12T13:00:13Z",
|
||||
"id": "0",
|
||||
"modified_time": "2021-07-12T13:08:50Z",
|
||||
"name": "配置.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:29:35Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:29:35Z",
|
||||
"modified_time": "2021-07-13T11:27:54Z",
|
||||
"name": "片段.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:29:45Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:29:45Z",
|
||||
"name": "幻词.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:29:56Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:29:56Z",
|
||||
"modified_time": "2021-07-13T11:28:05Z",
|
||||
"name": "模板.md",
|
||||
"tags": [
|
||||
]
|
||||
@ -68,43 +68,16 @@
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:30:05Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:30:05Z",
|
||||
"modified_time": "2021-07-13T11:28:14Z",
|
||||
"name": "主题和样式.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:30:14Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:30:14Z",
|
||||
"name": "导出.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:30:59Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:30:59Z",
|
||||
"name": "全文搜索.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2019-11-30T02:30:17Z",
|
||||
"id": "0",
|
||||
"modified_time": "2019-11-30T02:30:17Z",
|
||||
"name": "图床.md",
|
||||
"tags": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachment_folder": "",
|
||||
"created_time": "2018-11-24T12:31:22Z",
|
||||
"id": "0",
|
||||
"modified_time": "2018-11-24T12:31:22Z",
|
||||
"modified_time": "2021-07-13T11:28:22Z",
|
||||
"name": "常见问题.md",
|
||||
"tags": [
|
||||
]
|
||||
|
BIN
zh_cn/docs/用户/vx_images/1568921200753.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
zh_cn/docs/用户/vx_images/1610953207046.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
zh_cn/docs/用户/vx_images/196439219179.png
Normal file
After Width: | Height: | Size: 204 KiB |
BIN
zh_cn/docs/用户/vx_images/2288635109882.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
zh_cn/docs/用户/vx_images/306805229881.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
zh_cn/docs/用户/vx_images/3264925097047.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
zh_cn/docs/用户/vx_images/3474050080754.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
zh_cn/docs/用户/vx_images/3831753136437.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
zh_cn/docs/用户/vx_images/4562350099180.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
zh_cn/docs/用户/vx_images/5011855227212.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
zh_cn/docs/用户/vx_images/990329117213.png
Normal file
After Width: | Height: | Size: 22 KiB |
20
zh_cn/docs/用户/为什么需要 VNote.md
Normal file
@ -0,0 +1,20 @@
|
||||
# 为什么需要 VNote
|
||||
## 什么是 VNote
|
||||
开始之初,VNote 是一款专为 **Markdown** 设计的 **V**im 风格笔记应用程序。它不仅仅是一个 Markdown 编辑器。 VNote 旨在成为一个带有便捷笔记管理的功能强大的 Markdown 编辑器,或者一个拥有舒适 Markdown 体验的笔记软件。
|
||||
|
||||
现在,VNote 致力于成为一个舒适的笔记平台,会逐步支持更多的文档格式。
|
||||
|
||||
VNote 是免费、开源的。您可以获得适用于 Linux,Windows 和 macOS 的版本。
|
||||
|
||||
## 为什么要造另一个 Markdown 轮子
|
||||
### 关于 Markdown 的见解
|
||||
Markdown 作为一种简单的标记语言,与富文本不同,与生俱来就带有**编辑和阅读之间的鸿沟**。处理该鸿沟的方法一般有三种:
|
||||
|
||||
1. 作为一个极端,一些编辑器只是将 Markdown 视为**纯文本**。用户可能会迷失在凌乱的黑色字符中,**难于追踪**笔记的信息脉络。
|
||||
2. 大多数 Markdown 编辑器使用两个并排面板以**同时编辑和预览** Markdown 笔记。它使事情变得更加简单,因为用户可以在编辑文本的同时预览到一个美观的排版和布局。但是,两个面板可能占据整个屏幕,并且用户要不断左右移动视线,这使用户极其容易分心。
|
||||
3. 另一个极端是,一些编辑器在用户输入后马上转换 Markdown 元素,使得在使用 Markdown 时就像使用一些快捷方式在 Word 里编辑富文本文档一样。这可能与 Markdown 的设计目标相冲突。
|
||||
|
||||
由于大多数编辑器选择第二种方式,因此很多用户一提起 Markdown 就会想起实时预览。这可能是一个对 Markdown 的**误解**。定位为简单的标记语言,Markdown 旨在帮助在编辑时方便跟踪文本信息,并在转换为 HTML 后进行阅读时提供漂亮的排版。
|
||||
|
||||
### VNote 的权衡方式
|
||||
VNote 尝试通过**精心调整的语法高亮和其他一些功能**来最小化鸿沟并为 Markdown 提供尽可能好的所见即所得效果。通过帮助跟踪内容,用户无需预览或者在输入后立即修改文本。
|
@ -1,18 +0,0 @@
|
||||
# 为什么需要VNote
|
||||
## 什么是VNote
|
||||
VNote是一款专为**Markdown**设计的**V**im风格**笔记**应用程序。它不仅仅是一个Markdown编辑器。VNote旨在成为一个功能强大的Markdown编辑器,带有便捷的笔记管理功能,同时具有友好的Markdown体验的笔记记录应用程序。
|
||||
|
||||
VNote是免费、开源的。您可以获得适用于Linux,Windows和macOS的VNote。
|
||||
|
||||
## 为什么要造另一个Markdown「轮子」
|
||||
### 关于Markdown的见解
|
||||
Markdown作为一种简单的标记语言,与富文本不同,它诞生是为了**弥补编辑器和阅读器之间存在的差距**。解决这种差距的方法有三种:
|
||||
|
||||
1. 作为一个极端,一些编辑器只是将Markdown视为**纯文本**。用户可能会迷失在凌乱的黑色字符中。记录追踪笔记的信息是**十分困难**。
|
||||
2. 大多数Markdown编辑器使用两个并排面板以**同时编辑和预览**Markdown笔记。它使事情变得更加简单,因为用户可以在编辑文本的同时预览的排版和布局结果。但是,两个面板可能占据整个屏幕,并且用户要不断左右移动视线,这使用户极其容易分心。
|
||||
3. 另一个极端是,一些编辑器在用户输入后马上转换Markdown元素,使得在使用Markdown时就像使用一些快捷方式在Word里编辑富文本文档一样。这可能与Markdown的目标相冲突。
|
||||
|
||||
由于大多数编辑器选择第二种方式来消除差距,人们总是会在使用Markdown时需要预览结果。这可能是一个关于Markdown的**误解**。定位为简单的标记语言,Markdown旨在帮助在编辑时跟踪文本信息,并在转换为HTML后进行阅读时提供漂亮的排版。设计
|
||||
|
||||
### VNote的权衡方式
|
||||
VNote尝试通过**调整语法高亮和其他一些功能**来最小化差距并为Markdown提供最佳的所见即所得效果。通过跟踪内容的协助,无需在输入后立即预览或转换文本。
|
@ -1,378 +1,19 @@
|
||||
# 主题和样式
|
||||
## 主题
|
||||
**主题**用于指定VNote的外观,编辑器的样式和读取模式,以及代码块的语法高亮样式。
|
||||
**主题**用于指定 VNote 的外观、编辑器和阅读模式的样式,以及代码块的语法高亮样式。
|
||||
|
||||
主题对应于配置文件夹中的`themes`文件夹中的子文件夹,其结构如下:
|
||||
一个主题对应于 `themes` 文件夹中的一个子文件夹。可以通过`设置`对话框中更改或者管理主题。
|
||||
|
||||
```
|
||||
themes/
|
||||
├── v_pure
|
||||
│ ├── arrow_dropdown.svg
|
||||
│ ├── branch_closed.svg
|
||||
│ ├── branch_end.svg
|
||||
│ ├── branch_more.svg
|
||||
│ ├── branch_open.svg
|
||||
│ ├── checkbox_checked.svg
|
||||
│ ├── checkbox_unchecked.svg
|
||||
│ ├── close_grey.svg
|
||||
│ ├── close.svg
|
||||
│ ├── down_disabled.svg
|
||||
│ ├── down.svg
|
||||
│ ├── float.svg
|
||||
│ ├── left_disabled.svg
|
||||
│ ├── left.svg
|
||||
│ ├── line.svg
|
||||
│ ├── menu_checkbox.svg
|
||||
│ ├── menu_radiobutton.svg
|
||||
│ ├── radiobutton_checked.svg
|
||||
│ ├── radiobutton_unchecked.svg
|
||||
│ ├── right_disabled.svg
|
||||
│ ├── right.svg
|
||||
│ ├── up_disabled.svg
|
||||
│ ├── up.svg
|
||||
│ ├── v_pure_codeblock.css
|
||||
│ ├── v_pure.css
|
||||
│ ├── v_pure.mdhl
|
||||
│ ├── v_pure.palette
|
||||
│ └── v_pure.qss
|
||||
```
|
||||

|
||||
|
||||
- `v_pure.palette`:主题的主要条目,指定其他文件和样式;
|
||||
- `v_pure.qss`:[Qt样式表](http://doc.qt.io/qt-5/stylesheet-reference.html)的文件,它指定所有小部件的外观;
|
||||
- `v_pure.mdhl`:Markdown 编辑器风格的文件,使用[PEG Markdown的语法突出显示样式表](http://hasseg.org/peg-markdown-highlight/docs/stylesheet_syntax.html);
|
||||
- `v_pure.css`:文件的阅读模式;
|
||||
- `v_pure_codeblock.css`:使用Highlight.js[在读取模式下突出显示代码块样式的文件](https://highlightjs.org/static/demo/);
|
||||
### 如何添加一个主题
|
||||
一个好的做法是基于一个已有的主题来进行自定义一个新的主题。复制您最喜欢的主题的文件夹到**用户配置**文件夹下面的 `themes` 文件夹下面。记得重命名该文件夹。
|
||||
|
||||
### 主题调色板
|
||||
我们来看看`.palette`文件。该文件采用 `INI` 格式。
|
||||
### 主题的成分
|
||||
一个主题的一些关键文件:
|
||||
|
||||
#### [metadata]
|
||||
此部分指定该主题将使用的其他样式文件。
|
||||
|
||||
```ini
|
||||
; File path could be absolute path or relative path (related to this file).
|
||||
; Use @color_tag to reference a style.
|
||||
|
||||
[metadata]
|
||||
qss_file=v_pure.qss
|
||||
mdhl_file=v_pure.mdhl
|
||||
css_file=v_pure.css
|
||||
codeblock_css_file=v_pure_codeblock.css
|
||||
version=2
|
||||
```
|
||||
|
||||
#### [phony]
|
||||
此部分用于定义基本抽象颜色属性的**变量**。变量可以通过`@变量名`引用并定义另一个变量。
|
||||
|
||||
这些变量由其他部分引用,因此您可以自由选择和定义自己的变量。
|
||||
|
||||
```ini
|
||||
[phony]
|
||||
; Abstract color attributes.
|
||||
master_fg=#F5F5F5
|
||||
master_bg=#00897B
|
||||
master_light_bg=#80CBC4
|
||||
master_dark_bg=#00796B
|
||||
master_focus_bg=#009688
|
||||
master_hover_bg=#009688
|
||||
master_pressed_bg=#00796B
|
||||
|
||||
base_fg=#222222
|
||||
base_bg=#EAEAEA
|
||||
|
||||
main_fg=@base_fg
|
||||
main_bg=@base_bg
|
||||
|
||||
title_fg=@base_fg
|
||||
title_bg=@base_bg
|
||||
|
||||
disabled_fg=#9E9E9E
|
||||
|
||||
content_fg=@base_fg
|
||||
content_bg=@base_bg
|
||||
|
||||
border_bg=#D3D3D3
|
||||
|
||||
separator_bg=#D3D3D3
|
||||
|
||||
hover_fg=@base_fg
|
||||
hover_bg=#D0D0D0
|
||||
|
||||
selected_fg=@base_fg
|
||||
selected_bg=#BDBDBD
|
||||
|
||||
active_fg=@selected_fg
|
||||
active_bg=@selected_bg
|
||||
|
||||
inactive_fg=@selected_fg
|
||||
inactive_bg=#D3D3D3
|
||||
|
||||
focus_fg=@selected_fg
|
||||
focus_bg=@selected_bg
|
||||
|
||||
pressed_fg=@base_fg
|
||||
pressed_bg=#B2B2B2
|
||||
|
||||
edit_fg=#222222
|
||||
edit_bg=#F5F5F5
|
||||
edit_focus_bg=#E0F2F1
|
||||
edit_focus_border=@master_bg
|
||||
edit_selection_fg=@edit_fg
|
||||
edit_selection_bg=@master_light_bg
|
||||
|
||||
icon_fg=#222222
|
||||
icon_disabled_fg=@disabled_fg
|
||||
|
||||
danger_fg=#F5F5F5
|
||||
danger_bg=#C9302C
|
||||
danger_focus_bg=#D9534F
|
||||
danger_hover_bg=#D9534F
|
||||
danger_pressed_bg=#AC2925
|
||||
```
|
||||
|
||||
#### [soft_defined]
|
||||
本节定义Vnote代码所使用的变量。你**必须**定义这些变量才能使VNote看起来正确。
|
||||
|
||||
```ini
|
||||
[soft_defined]
|
||||
; VAvatar.
|
||||
; The foreground color of the avatar when Captain mode is triggered.
|
||||
avatar_captain_mode_fg=@master_fg
|
||||
; The background color of the avatar when Captain mode is triggered.
|
||||
avatar_captain_mode_bg=@master_bg
|
||||
|
||||
; Style of the label in Navigation mode.
|
||||
navigation_label_fg=@master_fg
|
||||
navigation_label_bg=@master_bg
|
||||
|
||||
; Style of the bubble of VButtonWithWidget.
|
||||
bubble_fg=@master_fg
|
||||
bubble_bg=@master_bg
|
||||
|
||||
; Icons' foreground.
|
||||
danger_icon_fg=@danger_bg
|
||||
item_icon_fg=@icon_fg
|
||||
title_icon_fg=@icon_fg
|
||||
|
||||
; VVimIndicator.
|
||||
vim_indicator_key_label_fg=@base_fg
|
||||
vim_indicator_mode_label_fg=@base_fg
|
||||
vim_indicator_cmd_edit_pending_bg=@selected_bg
|
||||
|
||||
; VTabIndicator.
|
||||
tab_indicator_label_fg=@base_fg
|
||||
|
||||
; Html template.
|
||||
template_title_flash_light_fg=@master_light_bg
|
||||
template_title_flash_dark_fg=@master_bg
|
||||
|
||||
; Search hit items in list or tree view.
|
||||
search_hit_item_fg=@selected_fg
|
||||
search_hit_item_bg=@master_light_bg
|
||||
```
|
||||
|
||||
#### [widgets]
|
||||
本节定义了要在`qss`文件中使用的变量,以定义不同小部件的具体样式。它们被qss文件引用。
|
||||
|
||||
```ini
|
||||
[widgets]
|
||||
; Widget color attributes.
|
||||
|
||||
; QWidget.
|
||||
widget_fg=@base_fg
|
||||
|
||||
; Separator of dock widgets.
|
||||
dock_separator_bg=@border_bg
|
||||
dock_separator_hover_bg=@border_bg
|
||||
|
||||
; Menubar.
|
||||
menubar_bg=@main_bg
|
||||
menubar_fg=@main_fg
|
||||
menubar_item_selected_bg=@selected_bg
|
||||
|
||||
; Menu.
|
||||
menu_bg=@base_bg
|
||||
menu_fg=@base_fg
|
||||
menu_item_disabled_fg=@disabled_fg
|
||||
menu_item_selected_fg=@selected_fg
|
||||
menu_item_selected_bg=@selected_bg
|
||||
menu_separator_bg=@separator_bg
|
||||
menu_icon_fg=@icon_fg
|
||||
menu_icon_danger_fg=@danger_icon_fg
|
||||
```
|
||||
|
||||
如果你好奇,`qss` 文件可能看起来像这样:
|
||||
|
||||
```css
|
||||
/* QWidget */
|
||||
QWidget
|
||||
{
|
||||
color: @widget_fg;
|
||||
font-family: "Hiragino Sans GB", "冬青黑体", "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "WenQuanYi Micro Hei", "文泉驿雅黑", "Dengxian", "等线体", "STXihei", "华文细黑", "Liberation Sans", "Droid Sans", "NSimSun", "新宋体", "SimSun", "宋体", "Helvetica", "sans-serif", "Tahoma", "Arial", "Verdana", "Geneva", "Georgia", "Times New Roman";
|
||||
}
|
||||
|
||||
QWidget[NotebookPanel="true"] {
|
||||
padding-left: 3px;
|
||||
}
|
||||
/* End QWidget */
|
||||
|
||||
/* QMainWindow */
|
||||
QMainWindow {
|
||||
color: @base_fg;
|
||||
background: @base_bg;
|
||||
}
|
||||
|
||||
QMainWindow::separator {
|
||||
background: @dock_separator_bg;
|
||||
width: 2px;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
QMainWindow::separator:hover {
|
||||
background: @dock_separator_hover_bg;
|
||||
}
|
||||
/* End QMainWindow */
|
||||
|
||||
QMenuBar {
|
||||
border: none;
|
||||
background: @menubar_bg;
|
||||
color: @menubar_fg;
|
||||
}
|
||||
|
||||
QMenuBar::item:selected {
|
||||
background: @menubar_item_selected_bg;
|
||||
}
|
||||
```
|
||||
|
||||
### 自定义主题
|
||||
VNote支持自定义主题。只需将theme(文件夹)放在`themes`文件夹中,重新启动VNote并在菜单中的`File`中选择你的theme即可。
|
||||
|
||||
自定义主题的最佳方法是调整默认主题。VNote将在`themes` 文件夹中输出默认主题(如果没有,您可以在[此处](https://github.com/tamlok/vnote/tree/master/src/resources/themes)下载)。复制默认主题并重命名 `palette` 文件。然后你可以根据自己的喜好调整它。需要重新启动VNote才能使更改生效。
|
||||
|
||||
## 编辑风格
|
||||
编辑器样式由`mdhl`文件指定。每个主题可能带有一个`mdhl`文件。您还可以应用另一个`mdhl`文件,而不是使用主题指定的默认文件。单独的样式文件可以放在配置文件夹的`styles` 文件夹中。为了扫描新的`mdhl`文件需要重新启动VNote,并且需要重新打开笔记以应用新样式。
|
||||
|
||||

|
||||
|
||||
### MDHL文件的语法
|
||||
`mdhl` 文件采用[PEG Markdown的语法高亮样式表](http://hasseg.org/peg-markdown-highlight/docs/stylesheet_syntax.html)并扩展它以支持更多元素。
|
||||
|
||||
```
|
||||
# This is the default markdown styles used for Peg-Markdown-Highlight
|
||||
# created by Le Tan(tamlokveer@gmail.com).
|
||||
# For a complete description of the syntax, please refer to the original
|
||||
# documentation of the style parser
|
||||
# [The Syntax of PEG Markdown Highlight Stylesheets](http://hasseg.org/peg-markdown-highlight/docs/stylesheet_syntax.html).
|
||||
# VNote adds some styles in the syntax which will be marked [VNote] in the comment.
|
||||
#
|
||||
# Note: Empty lines within a section is NOT allowed.
|
||||
# Note: Do NOT modify this file directly. Copy it and tune your own style!
|
||||
|
||||
editor
|
||||
# QTextEdit just choose the first available font, so specify the Chinese fonts first
|
||||
# Do not use "" to quote the name
|
||||
font-family: Hiragino Sans GB, 冬青黑体, Microsoft YaHei, 微软雅黑, Microsoft YaHei UI, WenQuanYi Micro Hei, 文泉驿雅黑, Dengxian, 等线体, STXihei, 华文细黑, Liberation Sans, Droid Sans, NSimSun, 新宋体, SimSun, 宋体, Helvetica, sans-serif, Tahoma, Arial, Verdana, Geneva, Georgia, Times New Roman
|
||||
font-size: 12
|
||||
foreground: 222222
|
||||
background: f5f5f5
|
||||
# [VNote] Style for trailing space
|
||||
trailing-space: a8a8a8
|
||||
# [VNote] Style for line number
|
||||
line-number-background: eaeaea
|
||||
line-number-foreground: 424242
|
||||
# [VNote] Style for selected word highlight
|
||||
selected-word-foreground: 222222
|
||||
selected-word-background: dfdf00
|
||||
# [VNote] Style for searched word highlight
|
||||
searched-word-foreground: 222222
|
||||
searched-word-background: 4db6ac
|
||||
# [VNote] Style for searched word under cursor highlight
|
||||
searched-word-cursor-foreground: 222222
|
||||
searched-word-cursor-background: 66bb6a
|
||||
# [VNote] Style for incremental searched word highlight
|
||||
incremental-searched-word-foreground: 222222
|
||||
incremental-searched-word-background: ce93d8
|
||||
# [VNote] Style for color column in fenced code block
|
||||
color-column-background: dd0000
|
||||
color-column-foreground: ffff00
|
||||
# [VNote} Style for preview image line
|
||||
preview-image-line-foreground: 9575cd
|
||||
|
||||
editor-selection
|
||||
foreground: eeeeee
|
||||
background: 005fff
|
||||
|
||||
editor-current-line
|
||||
background: c5cae9
|
||||
# [VNote] Vim insert mode cursor line background
|
||||
vim-insert-background: c5cae9
|
||||
# [VNote] Vim normal mode cursor line background
|
||||
vim-normal-background: e0e0e0
|
||||
# [VNote] Vim visual mode cursor line background
|
||||
vim-visual-background: bbdefb
|
||||
# [VNote] Vim replace mode cursor line background
|
||||
vim-replace-background: f8bbd0
|
||||
|
||||
H1
|
||||
foreground: 222222
|
||||
font-style: bold
|
||||
font-size: +8
|
||||
|
||||
VERBATIM
|
||||
foreground: 673ab7
|
||||
font-family: Consolas, Monaco, Andale Mono, Monospace, Courier New
|
||||
# [VNote] Codeblock sylte from HighlightJS (bold, italic, underlined, color)
|
||||
# The last occurence of the same attribute takes effect
|
||||
# Could specify multiple attribute in one line
|
||||
hljs-comment: 6c6c6c
|
||||
hljs-keyword: 0000ee
|
||||
hljs-attribute: 0000ee
|
||||
hljs-selector-tag: 0000ee
|
||||
hljs-meta-keyword: 0000ee
|
||||
hljs-doctag: 0000ee
|
||||
hljs-name: 0000ee
|
||||
hljs-type: 880000
|
||||
hljs-string: 880000
|
||||
hljs-number: 880000
|
||||
hljs-selector-id: 880000
|
||||
hljs-selector-class: 880000
|
||||
hljs-quote: 880000
|
||||
hljs-template-tag: 880000
|
||||
hljs-deletion: 880000
|
||||
hljs-title: bold, 880000
|
||||
hljs-section: bold, 880000
|
||||
hljs-regexp: bc6060
|
||||
hljs-symbol: bc6060
|
||||
hljs-variable: bc6060
|
||||
hljs-template-variable: bc6060
|
||||
hljs-link: bc6060
|
||||
hljs-selector-attr: bc6060
|
||||
hljs-selector-pseudo: bc6060
|
||||
hljs-literal: af00d7
|
||||
hljs-built_in: 008700
|
||||
hljs-bullet: 008700
|
||||
hljs-code: 008700
|
||||
hljs-addition: 008700
|
||||
hljs-meta: 1f7199
|
||||
hljs-meta-string: 4d99bf
|
||||
hljs-emphasis: italic
|
||||
hljs-strong: bold
|
||||
```
|
||||
|
||||
The syntax highlight of the code blocks in edit mode is specified by the `VERBATIM` element.
|
||||
|
||||
For example, if you want to change the font size of the code block in edit mode, you may need to add the following line under `VERBATIM` element:
|
||||
|
||||
```
|
||||
font-size: -2
|
||||
```
|
||||
|
||||
## 渲染样式
|
||||
读取模式下的呈现样式由`css`文件指定。每个主题都可以带有一个`css`文件。您还可以应用另一个`css`文件,而不是使用主题指定的默认文件。单独的样式文件可以放在配置文件夹的 `styles`文件夹中。为了扫描新的css文件需要重新启动`css`,并且需要重新打开笔记以应用新样式。
|
||||
|
||||

|
||||
|
||||
## 代码块渲染样式
|
||||
读取模式下的呈现样式由`css` 文件指定。每个主题都可以带有一个`css` 文件。您还可以应用另一个`css` 文件,而不是使用主题指定的默认文件。单独的样式文件可以放在配置文件夹的`styles/codeblock_styles` 文件夹中。为了扫描新的`css` 文件需要重新启动VNote,并且需要重新打开注释笔记以应用新样式。
|
||||
|
||||
该文件由 **highlight.js** 渲染器引擎使用。您可以从[Highlight.js Github](https://github.com/isagalaev/highlight.js/tree/master/src/styles)下载现有的样式文件。
|
||||
- `palette.json`: 主题的调色文件,定义了主题中会用到的各种颜色;
|
||||
- `interface.qss`: 这是一个 [**Qt 样式文件**](http://doc.qt.io/qt-5/stylesheet-reference.html),定义了所有窗口部件的外观;该文件会使用 `palette.json` 里面定义的颜色;
|
||||
- `text-editor.theme`: 文本编辑器(以及 Markdown 编辑器)的主题文件;
|
||||
- `web.css`: Markdown 阅读模式的样式文件;
|
||||
- `highlight.css`: Markdown 阅读模式的代码块语法高亮样式文件;VNote 在阅读模式使用 [Prism](https://prismjs.com/) 来进行语法高亮;
|
||||
|
@ -1,43 +0,0 @@
|
||||
# 全文搜索
|
||||
VNote提供强大的内置的全文搜索功能,以搜索您的笔记。
|
||||
|
||||
按`Ctrl+E C` 或`Ctrl+Alt F` 激活**搜索**坞小部件。您也可以通过`编辑`或`查看`菜单激活它。
|
||||
|
||||

|
||||
|
||||
## 关键词
|
||||
- 指定要搜索的关键字;
|
||||
- 支持`&&`和`||` 用于AND和OR逻辑,例如`markdown && vnote`;
|
||||
- 以空格分隔的关键字表示AND,例如 `markdown vnote`;
|
||||
|
||||
### Magic Switch
|
||||
VNote支持关键字中的**Magic Switch**来打开/关闭搜索的某些选项:
|
||||
|
||||
- `\f`或`\F`:禁用或启用**模糊搜索**;
|
||||
- `\c`或`\C`:不区分大小写或敏感;
|
||||
- `\r`或`\R`:禁用或启用**正则表达式**;
|
||||
- `\w`或`\W`:禁用或启用**仅限全字**;
|
||||
|
||||
例子:`vnote \C \W`用于`不区分大小写`并且`仅限全字`搜索vnote。
|
||||
|
||||
## 范围
|
||||
限制搜索有四个范围:
|
||||
|
||||
- `已打开笔记`;
|
||||
- `当前文件夹`;
|
||||
- `当前笔记本`;
|
||||
- `所有笔记本`;
|
||||
|
||||
## 对象
|
||||
指定是否应对**内容**或**名称**执行搜索。
|
||||
|
||||
## 目标
|
||||
我们可以搜索:
|
||||
|
||||
- `笔记`;
|
||||
- `文件夹`;
|
||||
- `笔记本`;
|
||||
- `笔记/文件夹/笔记本`;
|
||||
|
||||
## 文件模式
|
||||
我们可以指定文件模式来过滤以获得我们感兴趣的文件,例如`*.md`以仅搜索Markdown文件。
|
@ -1,66 +0,0 @@
|
||||
# 图床
|
||||
从v2.8开始,VNote支持多个图床服务,将本地图片上传到云服务。
|
||||
|
||||
当前VNote支持4个服务:
|
||||
|
||||
- GitHub;
|
||||
- Gitee;
|
||||
- 微信公众平台;
|
||||
- 腾讯云;
|
||||
|
||||
对于每个服务,您都需要配置服务提供商并向VNote提供相关令牌以访问这些服务。
|
||||
|
||||
每个服务当前有一些共同的选项:
|
||||
|
||||
- `保留图片缩放`: 新的图片链接中是否保留缩放;
|
||||
- `复制而非替换新内容`: 上传图片后,只复制带有新链接的内容,不要替换原文件;
|
||||
|
||||
## 配置
|
||||
### GitHub
|
||||

|
||||
|
||||
对于GitHub,需要提供:
|
||||
|
||||
- `个人访问令牌`: 访问GitHub的`Settings`,`Developer Settings`,`Personal Access Tokens`,然后生成一个新的令牌(需要提供仓库的全部访问权限)。
|
||||

|
||||
- `仓库名`:用于保存图片的GitHub仓库名;
|
||||
- `用户名`:GitHub用户名;
|
||||
|
||||
### Gitee
|
||||
Gitee的配置和GitHub大同小异。
|
||||
|
||||
### 微信公众平台
|
||||

|
||||
|
||||
访问[微信公众平台](https://mp.weixin.qq.com/),`开发`,`基本配置`,找到`开发者ID`和`开发者密码`即可。
|
||||
|
||||
另外,还需要在`IP白名单`中添加当前电脑的IP地址。
|
||||
|
||||
`markdown2WechatToolUrl` 可以填写一个链接,VNote在复制内容后自动打开该链接,方便后续发布。
|
||||
|
||||
### 腾讯云
|
||||

|
||||
|
||||
访问[腾讯云管理后台](https://console.cloud.tencent.com/),`云产品`,`对象存储`。
|
||||
|
||||
在`密钥管理`中新建密钥,拿到`SecretId`和`SecretKey`。
|
||||
|
||||
回到`对象存储`,选择`存储桶列表`,`创建存储桶`,访问权限选择`公有读私有写`即可。
|
||||
|
||||
在左侧`基础配置`,可以看到VNote需要的`访问域名`。
|
||||
|
||||
最后,还需要添加一个CORS规则:
|
||||
|
||||

|
||||
|
||||
## 如何使用
|
||||
完成编写一篇笔记后,可以在上下文菜单中选择上传本地图片到指定图床服务中(在编辑模式下)。
|
||||
|
||||

|
||||
|
||||
VNote会遍历所有的本地图片并上传。
|
||||
|
||||
- 如果选择了替换原文件,则上传完成后会修改文件内容。保存的时候,VNote会提示是是否删除不再被引用的图片。
|
||||
- 否则,VNote只会复制新的内容,但不会修改原文件。
|
||||
|
||||
感谢@fengwenhua提供该功能实现!
|
@ -1,102 +0,0 @@
|
||||
# 导出
|
||||
VNote支持丰富且可扩展的导出。
|
||||
|
||||

|
||||
|
||||
## 来源
|
||||
有四种来源可供选择需要导出的笔记。
|
||||
|
||||
- **当前笔记**
|
||||
- 导出当前笔记;
|
||||
- **当前文件夹**
|
||||
- 导出当前文件夹中的所有笔记;
|
||||
- 支持递归导出子文件夹;
|
||||
- **当前笔记本**
|
||||
- 导出当前笔记本的所有笔记;
|
||||
- **小推车**
|
||||
- 小推车是一个收集随机笔记以便进一步处理的工具。
|
||||
|
||||
## 选项
|
||||
我们可以为导出指定**Markdown渲染器**,**Markdown渲染背景**,**Markdown渲染样式**和**Markdown渲染代码块样式**。例如,我们可以在导出为PDFs时指定*透明*背景。
|
||||
|
||||
## 格式
|
||||
### Markdown
|
||||
我们可以将Markdown类型的笔记导出为Markdown格式。对于名为`vnote.md`的笔记,VNote将创建名为`vnote_md`的文件夹,然后将`vnote_md`复制到此文件夹,然后复制此笔记的本地图像,然后复制此笔记的附件。在此之后,我们可以压缩此文件夹并共享它。
|
||||
|
||||
### HTML
|
||||
将注释导出为HTML格式时,VNote将首先呈现笔记的Markdown格式,然后将HTML作为文件输出。HTML格式的高级设置包括:
|
||||
|
||||
- **嵌入CSS样式**
|
||||
- 在导出的HTML文件中嵌入CSS样式。
|
||||
- **完整页面**
|
||||
- 选中后,VNote还将导出除HTML文件之外的相关图像。如果未选中,则可能会丢失本地图像。
|
||||
- **MIME HTML**
|
||||
- 导出MIME HTML格式。
|
||||
|
||||
### PDF
|
||||
VNote支持将笔记导出为PDF文件。页面大小和边距是可配置的。有两个引擎可供选择执行导出。
|
||||
|
||||
#### 内置引擎
|
||||
内置引擎可以更好地处理内容,但在生成的PDF文件中缺少书签。
|
||||
|
||||
#### wkhtmltopdf
|
||||
[wkhtmltopdf](https://wkhtmltopdf.org/)是将HTML转换为PDF的第三方工具。您需要额外安装这个VNote将使用的工具。使用此引擎时,VNote将首先将Markdown注释转换为HTML格式,然后使用生成的HTML文件作为输入调用*wkhtmltopdf*。
|
||||
|
||||

|
||||
|
||||
高级设置包括:
|
||||
|
||||
- **wkhtmltopdf** 路径
|
||||
- wkhtmltopdf可执行文件的路径。
|
||||
- **标题**
|
||||
- 生成的PDF的标题。它仅在启用**All In One**时有效。
|
||||
- **输出的文件名**
|
||||
- 生成的PDF文件的名称。它仅在启用**All In One**时有效。
|
||||
- **页码**
|
||||
- 是否将页码附加到每个页面及其位置。
|
||||
- **启用背景**
|
||||
- 是否启用HTML的背景。
|
||||
- **其他选项**
|
||||
- 其他全局选项将传递给wkhtmltopdf。有关可用选项,请参阅wkhtmltopdf的文档。
|
||||
|
||||
### PDF(All In One)
|
||||
选择此格式时,VNote将使用wkhtmltopdf工具将多个Markdown笔记转换为**一个**PDF文件。为了使这项工作顺利进行,一个实用技巧是从二级标题作为**标题序列**的开始,并将每个笔记的名称以一级标题形式插入。
|
||||
|
||||
### 自定义
|
||||
**自定义**格式使用户可以选择他们喜欢的任何工具来处理笔记。
|
||||
|
||||

|
||||
|
||||
高级设置:
|
||||
|
||||
- **格式来源**
|
||||
- VNote支持使用Markdown或HTML格式作为输入的工具。
|
||||
- **输出后缀**
|
||||
- 输出文件的后缀,例如docx,pdf或ppt。
|
||||
- **启用All In One**
|
||||
- 是否将多个笔记一次性输入到您的工具中。它们由空格分隔。
|
||||
- **输出的文件名**
|
||||
- 输出的文件名。它仅在启用**All In One**时有效。
|
||||
- **输入目录分隔符**
|
||||
- VNote可以将输入笔记的目录传递给您的工具。您可以使用这些目录作为来源文件夹。此选项指定用于连接这些目录的分隔符。
|
||||
- 命令
|
||||
- 该命令由VNote执行。您可以使用的一些特殊占位符:
|
||||
- %0:输入文件;
|
||||
- %1:输出文件;
|
||||
- %2:要使用的渲染CSS样式的文件;
|
||||
- %3:输入文件目录;
|
||||
- %4:渲染代码块要使用的CSS样式的文件;
|
||||
|
||||
使用[pandoc](http://pandoc.org)导出笔记的示例:
|
||||
|
||||
```sh
|
||||
pandoc --resource-path=.:"%3" --css="%2" --css="%4" -s -o "%1" "%0"
|
||||
```
|
||||
|
||||
::: alert-info
|
||||
|
||||
根据Pandoc语法,Windows上,需要将分隔符`:`改为`;`。
|
||||
|
||||
:::
|
||||
|
||||
如果输出的后缀是`pdf`,它将生成PDF文件;如果是`docx`,它将生成DOCX文件;如果是`pptx`,它将生成PPTX文件。
|
@ -1,74 +1,29 @@
|
||||
# 常见问题
|
||||
## 如何指定自定义的MathJax脚本?
|
||||
VNote支持配置`[web]/mathjax_javascript` ,它指定MathJax的位置及其使用的配置。默认值可能如下所示:
|
||||
## 如何指定自定义 MathJax 脚本?
|
||||
VNote 使用 MathJax 3 渲染数学公式。要指定使用的 MathJax 脚本,请执行以下步骤:
|
||||
|
||||
```ini
|
||||
[web]
|
||||
; Location and configuration for Mathjax
|
||||
mathjax_javascript=https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML
|
||||
1. 打开默认配置文件夹,复制其中的 `web/js/mathjax.js` 到用户配置文件夹,保留路径 `web/js/mathjax.js`,然后就可以修改该 `mathjax.js` 文件了。这样,VNote 就会使用复制后的文件,而不是默认的文件。
|
||||
2. 编辑 `mathjax.js` 文件。使用的 MathJax 脚本由这一行指定:
|
||||
```js
|
||||
this.mathJaxScript = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js';
|
||||
```
|
||||
|
||||
您可以[下载 MathJax](https://docs.mathjax.org/en/latest/web/hosting.html) 并指定一个本地的 MathJax 脚本:
|
||||
|
||||
```js
|
||||
this.mathJaxScript = 'file://c:/Users/foo/mathjax/tex-svg.js';
|
||||
```
|
||||
|
||||
您可以下载MathJax ([howto](http://docs.mathjax.org/en/latest/installation.html)) 并指定要使用的MathJax的本地副本,例如`mathjax_javascript="file:///home/tamlok/Downloads/MathJax-2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"`。
|
||||
|
||||
您还可以在GUI设置对话框中指定自定义脚本:
|
||||
|
||||

|
||||
|
||||
注意:
|
||||
|
||||
- 请在本地路径前加上`file://`;
|
||||
- 使用本地路径可能会无法找到字体。一个比较好的方法是在本机上运行一个轻量级的HTTP服务器。
|
||||
|
||||
## 如何让VNote更「便携」?
|
||||
VNote将读取并存储配置文件到操作系统的公共目录中以存储应用程序数据。如果您希望将这些配置文件与VNote可执行文件一起放置,则可以在包含VNote可执行文件的目录中复制或创建`vnote.ini`文件。VNote将首先尝试从可执行文件所在的位置读取`vnote.ini`。
|
||||
|
||||
但请注意,VNote会将笔记本的路径存储在配置文件中,因此如果将VNote复制到另一台计算机,它可能会读取错误的路径并报错。
|
||||
|
||||
## 如何使用Mermaid或Flowchart.js绘制图表?
|
||||
1. 在`Markdown`菜单中启用`Mermaid Diagram`和`Flowchart.js`;
|
||||
2. 重新打开已打开的标签让它生效;
|
||||
3. 对于Mermaid,用`mermaid`语言编写一个码块;
|
||||
4. 对于Flowchart.js,用`flowchart` 或`flow`语言编写代码块;
|
||||
|
||||
Mermaid的例子:
|
||||
|
||||
```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```
|
||||
|
||||
Flowchart.js例子:
|
||||
|
||||
```flowchart
|
||||
st=>start: Start:>http://www.google.com[blank]
|
||||
e=>end:>http://www.google.com
|
||||
op1=>operation: My Operation
|
||||
sub1=>subroutine: My Subroutine
|
||||
cond=>condition: Yes
|
||||
or No?:>http://www.google.com
|
||||
io=>inputoutput: catch something...
|
||||
|
||||
st->op1->cond
|
||||
cond(yes)->io->e
|
||||
cond(no)->sub1(right)->op1
|
||||
```
|
||||
|
||||
## 如何在另一个标签中打开笔记?
|
||||

|
||||
|
||||
当`单击在当前标签中打开该笔记`是可用的,在笔记列表中单击一个笔记本可以在当前的标签中打开,而双击笔记列表的笔记则在新标签中打开它。
|
||||
## 更新后启动失败
|
||||
|
||||
## 界面无响应
|
||||
## 编辑模式中没有光标
|
||||
## 打开一个笔记后软件异常退出
|
||||
## 全屏模式中菜单无法正常显示
|
||||
以上这4个问题可能是由显卡驱动引起的。建议解决步骤:
|
||||
## 编辑模式中光标不可见
|
||||
## 打开一个笔记时程序崩溃
|
||||
当出现在 Windows 上时,以上三个问题都可能是因为显卡驱动的原因。可以逐步尝试以下3个步骤:
|
||||
|
||||
1. 如果是Windows系统,可以尝试更新显卡驱动;
|
||||
2. 尝试指定VNote使用集成显卡;
|
||||
3. 如果还不能解决,尝试新建一个系统环境变量`QT_OPENGL`,可以尝试的值包括`desktop`或`angle`或`software`。
|
||||
1. 尝试更新显卡驱动;
|
||||
2. 尝试将 VNote 指定使用集成显卡;
|
||||
3. 尝试在`设置`对话框里面指定 `OpenGL` 的值,逐个值进行尝试。
|
||||

|
||||
|
||||
在以上操作之后,需要重启VNote。
|
||||
每一步操作都需要重启 VNote 来验证是否有用。
|
||||
|
@ -1,46 +0,0 @@
|
||||
# 幻词
|
||||
**幻词**是一些具有特殊含义的字符。它们将被识别为一些预先定义好的字符。举一个简单的例子,`date`可以识别为今天的日期。
|
||||
|
||||
VNote在大多数输入窗口小部件中支持片段插入。例如,您可以在创建备注时插入片段作为备注名称。
|
||||
|
||||
`%da% work log.md`将识别为`20180128 work log.md` ,因为`%da%`是一个幻词,它以`YYYYMMDD`的形式定义为今天的日期。
|
||||
|
||||
在编辑器中,您可以键入 `%da%`,然后按快捷键 `Ctrl+E M`,它将光标下的单词识别为幻词。
|
||||
|
||||
例如,键入以下单词:
|
||||
|
||||
```
|
||||
Today is %da%
|
||||
```
|
||||
|
||||
然后按 `Ctrl+E M`,它将更改为:
|
||||
|
||||
```
|
||||
Today is 20180128
|
||||
```
|
||||
|
||||
## 内置幻词
|
||||
VNote定义了许多幻词。在输入对话框中,键入`%help%` 以显示已定义的幻词列表。
|
||||
|
||||

|
||||
|
||||
## 自定义幻词
|
||||
在配置文件夹中编辑 `vnote.ini` 文件,如下所示:
|
||||
|
||||
```ini
|
||||
[magic_words]
|
||||
1\name=vnote
|
||||
1\definition="vnote is a great tool! -- Written %datetime%"
|
||||
2\name=hw
|
||||
2\definition="hello world!"
|
||||
size=2
|
||||
```
|
||||
|
||||
现在我们得到了两个幻词分别是:`vnote`(基于另一个幻词`datetime`)和`hw`。
|
||||
|
||||
## 在片段中的幻词
|
||||
[Snippet](snippet.html) 也支持幻词。现在我们可以定义一个片段来插入当前日期,如下所示:
|
||||
|
||||

|
||||
|
||||
现在处于编辑模式,我们可以按`Ctrl+E S D`来插入当前日期。
|
@ -1,32 +1,27 @@
|
||||
# 快速上手
|
||||
VNote适用于在**Linux**,**Windows**和**macOS**系统。您可以从[下载](https://github.com/tamlok/vnote#downloads)页面获取独立软件包。
|
||||
VNote 适用于 **Linux** , **Windows** 和 **macOS** 操作系统。您可以从[下载](https://github.com/vnotex/vnote#downloads)页面获取独立软件包。
|
||||
|
||||
建议下载并使用VNote的**稳定版本**。如果您更喜欢使用VNote的一些最新功能,可以尝试从`master`分支产生的最新版本。
|
||||
建议下载并使用 VNote 的**稳定版本** 。如果您更喜欢使用 VNote 的一些最新功能,可以尝试使用从 `master` 分支产生的最新版本。
|
||||
|
||||
除了独立的安装包之外,一些包管理器可能已经打包和分发VNote,例如*AUR*和*homebrew cask*。
|
||||
除了独立的安装包之外,一些包管理者可能已经打包和分发 VNote ,例如 *AUR* 和 *homebrew cask* 。
|
||||
|
||||
## 主界面
|
||||
这是VNote主界面的截图。
|
||||
这是 VNote 主界面的截图。
|
||||
|
||||

|
||||
|
||||
### 菜单栏和工具栏
|
||||
VNote通过窗口顶部的**菜单栏**提供一些设置,并通过菜单项或按钮上的菜单栏下方的**工具栏**提供一些方便的快捷键。将光标放在菜单栏选项或按钮出,会出现一个工具提示或状态提示,有助于说明该选项或按钮的功能。
|
||||

|
||||
|
||||
### 笔记本,文件夹和笔记
|
||||
VNote使用**笔记本**、**文件夹**和**笔记**层次结构进行笔记管理。左侧面板用于浏览笔记本,文件夹和笔记。
|
||||
|
||||
第一次启动VNote时,系统将提示您创建第一个笔记本。笔记本对应于文件系统中的目录。您应该选择一个空目录作为您的笔记本根文件夹。此笔记本的所有内容都将被存储在笔记本根文件夹中。
|
||||
笔记本对应于文件系统中的目录。您应该选择一个空目录作为您的 *笔记本根文件夹* 。此笔记本的所有内容都将被存储在笔记本根文件夹中。
|
||||
|
||||
一旦你有了一个笔记本,你可以在这个笔记本中创建文件夹。VNote支持无限级别的文件夹。
|
||||
|
||||
左侧的面板的下部将列出当前文件夹中所有笔记。您可以在通过在该区域右侧菜单创建新的笔记。
|
||||
一旦您有了一个笔记本,就可以在这个笔记本中创建文件夹。VNote 支持无限级别的文件夹。
|
||||
|
||||
### 内容区域
|
||||
占据大部分空间的中间区域是**内容区域**,用于读取和编辑笔记。VNote支持通过选项卡打开多个笔记。
|
||||
占据大部分空间的中间区域是**内容区域** ,用于阅读和编辑笔记。VNote 支持通过选项卡打开多个笔记。
|
||||
|
||||
### 工具坞小部件。
|
||||
在右侧面板中,有多个工具可以方便您进行阅读和编辑,例如**大纲**和**片段**。
|
||||
### 停靠部件
|
||||
在左侧,有多个停靠部件,包括**导航** , **大纲** , **搜索**等。它们可以被自由拖拽并放置到主窗口的上下左右部分。
|
||||
|
||||
### 准备好开始
|
||||
这就是VNote了!现在,您可以在VNote中阅读,编辑和管理您的笔记了!
|
||||
### 准备开始
|
||||
这就是 VNote 了!现在,您可以在 VNote 中阅读、编辑和管理您的笔记了!
|
@ -1,24 +1,24 @@
|
||||
# 模板
|
||||
VNote支持基于模板创建笔记。
|
||||
VNote 支持基于模板创建笔记。
|
||||
|
||||
创建笔记时,您可以在对话框中选择一个模板。
|
||||
|
||||

|
||||

|
||||
|
||||
VNote将模板文件存储在配置文件夹的templates子文件夹中。一个文件对应一个模板。您可以通过单击组合框旁边的「文件夹」图标来访问模板文件夹。
|
||||
VNote 将模板文件保存在文件夹 `templates` 中。一个文件对应一个模板。
|
||||
|
||||
您可以通过系统的文件浏览器在模板文件夹中添加或删除模板文件。
|
||||
可以通过系统的文件浏览器直接添加或者删除模板文件。
|
||||
|
||||
VNote支持模板中的**Magic Word**。例如,您可以编写如下模板:
|
||||
模板文件中支持**片段**。例如,可以在一个模板中这样写:
|
||||
|
||||
```md
|
||||
# %no%
|
||||
This is a template using **Magic Word** to insert note name as the title automatically.
|
||||
This is a template using **Snippet** to insert note name as the title automatically.
|
||||
```
|
||||
|
||||
`%no%` 是一个Magic Word,将笔记的名称自动识别为标题(不带后缀)。 因此,如果笔记命名为 `week report.md`,则新笔记将如下所示:
|
||||
`%no%` 是一个内建片段,会被识别为当前笔记名字(不带后缀)。 因此,如果笔记命名为 `week report.md` ,则新笔记内容将如下:
|
||||
|
||||
```md
|
||||
# week report
|
||||
This is a template using **Magic Word** to insert note name as the title automatically.
|
||||
This is a template using **Snippet** to insert note name as the title automatically.
|
||||
```
|
@ -1,12 +1,4 @@
|
||||
# 欢迎使用VNote文档
|
||||

|
||||
# 欢迎使用 VNote 文档
|
||||

|
||||
|
||||
VNote是一个更懂程序员和Markdown的笔记。
|
||||
|
||||
VNote是开源的,源代码托管在[GitHub](https://github.com/tamlok/vnote)。
|
||||
|
||||
文档同时也托管在[Read The Docs](https://vnote.readthedocs.io)上面,包括语言:
|
||||
|
||||
- [英文 English](http://vnote.readthedocs.io/en/latest/)
|
||||
- [简体中文](http://vnote.readthedocs.io/zh_CN/latest/)
|
||||
- [日文 日本語](http://vnote.readthedocs.io/ja/latest/)
|
||||
VNote 是一个舒适的笔记平台,始于2016年。VNote 是开源的,源代码托管在 [GitHub](https://github.com/vnotex/vnote)。
|