Skip to content

Commit 578bbb4

Browse files
Dioprzrolandlo
authored andcommitted
Structural changes and adding information.
Changes made: - Creation of a new section 'Tools and Editing': - The previous 'Tools and Editing' file is divided into multiple subsections (Eraser tool, Pen and Higlighter tools and LaTeX tool) that facilitate access to documentation on a specific tool. Additionally it lightens the content of the section since some tools have a very extensive documentation. - The documentation of 'Selection and Snapping tools' is added - Creation of a new 'Plugins' section: - The previous Plugins file is divided into two new sections that facilitate punctual search, resulting in a subsection that documents the creation of plugins and another that talks about Notable Plugins (with an invitation to readers to enrich said subsection). - Add information in 'Configuration': - Proposal for the structure of the section, where each section of the 'Preferences' menu corresponds to a subtitle with its respective documentation (perhaps if the information is very extensive later, it is advisable to create navigation subsections like the proposal made in the Tools section) . - Information about the autosave and the default name. - Information on the pressure of the Stylus. - Information about the configuration of buttons on the mouse and stylus. - The pertinent changes are made in the 'mkdocs.yml' to reorder the structure. - The 'toc.integrate' feature is added to 'mkdocs.yml' so that the table of contents is integrated into the navigation menu; giving more space to content and centralizing navigation in a single menu for greater ease. Needs completing - 'Autoloading Journals' in the first section of 'Preferences' - ** tap to select ** configuration and how it works. - Effect of snapping in the Spiline Drawing tool
1 parent e72b6bf commit 578bbb4

File tree

9 files changed

+277
-153
lines changed

9 files changed

+277
-153
lines changed

docs/guide/config.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,77 @@
11
# Configuration
22

3+
# Preferences
4+
Xournal ++ has multiple options that can be configured and customized. Most of these features can be found under **Edit > Preferences**.
5+
6+
## Load / Save
7+
8+
### Autosaving
9+
10+
Enable or disable automatic saving and set the time interval in which it will be done. If the document was previously saved in any folder, the autosave document will be in the same location as a hidden file. Otherwise the file will be saved in the path **~/.xournalpp/autosave**.
11+
12+
### Default Save Name
13+
14+
Name that will be proposed by default when using **Save As** option. Allows the use of placeholders.
15+
16+
### Autoloading Journals
17+
18+
TODO
19+
20+
## Input System
21+
22+
TODO
23+
24+
## Mouse
25+
26+
In this section you can set the behavior of the **middle and right mouse buttons** to associate tools with it. Each tool allows sub settings for thickness, color, stroke type, etc. if they are available.
27+
28+
## Stylus
29+
30+
### Pressure Sensitivity
31+
32+
Enables / disables pressure sensitivity to make thicker strokes when pressing the stylus more heavily. Only effective on tablets that support this feature.
33+
34+
### Artifact Workaround
35+
36+
TODO
37+
38+
### Stylus Buttons
39+
40+
Specifies the behavior of the buttons on the stylus when pressed, allowing them to be associated with tools just like the buttons on the mouse.
41+
42+
The **Button 1** and **Button 2** are typical side buttons. The **Eraser** is supported only by some styluses and works using the opposite side of the pen tip; precisely like a pencil from real life.
43+
44+
These changes are **not** persistent; in other words, once the stylus button is released, the previously held tool will be selected again.
45+
46+
47+
## Touchscreen
48+
49+
TODO
50+
51+
## View
52+
53+
TODO
54+
55+
## Zoom
56+
57+
TODO
58+
59+
## Drawing Area
60+
61+
TODO
62+
63+
## Defaults
64+
65+
TODO
66+
67+
## Audio Recording
68+
69+
TODO
70+
71+
## LaTeX
72+
73+
TODO
74+
75+
## Language
76+
377
TODO

docs/guide/plugins/notable.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Notable Plugins
2+
3+
- The `QuickSnapshot` Plugin uses an external screenshot tool, to quickly take a screen snapshot of a region of the screen and save it into a user specified file
4+
- The `ToggleGrid` Plugin provides a shortcut for toggling between "grid background with snapping to grid" and "plain background without snapping to grid"
5+
- The `ColorCycle`Plugin lets you cycle through a list of colors for the current tool by using the same accelerator repeatedly
6+
- The `LayerActions` Plugin provides shortcuts for cloning non-background layers to the next page, hiding all non-background layers except the footer layers and adding a new top layer on each page.
7+
- The `HandwritingRecognition` Plugin ([work in progress](https://github.com/xournalpp/xournalpp/pull/2176)) uses cloud-based handwriting recogntion to recognize handwritten text from a selection or page layer in a user-specified language.
8+
9+
If you build an interesting plugin that you would like to share, feel free to submit your PR!

docs/guide/plugins.md renamed to docs/guide/plugins/plugins.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Plugins
1+
# Building Plugins
22

33
Xournal++ provides a basic Lua Plugin interface. Plugins can be added without building Xournal++ from source. Their primary use is to add user-specific functionality, shortcuts, make calls to external programs, define user-specific export functions and the like.
44

@@ -202,11 +202,3 @@ package.path = package.path .. "YOUR PATH(S)"
202202
```
203203

204204
in the `initUI`-function.
205-
206-
## Notable Plugins
207-
208-
- The `QuickSnapshot` Plugin uses an external screenshot tool, to quickly take a screen snapshot of a region of the screen and save it into a user specified file
209-
- The `ToggleGrid` Plugin provides a shortcut for toggling between "grid background with snapping to grid" and "plain background without snapping to grid"
210-
- the `ColorCycle`Plugin lets you cycle through a list of colors for the current tool by using the same accelerator repeatedly
211-
- the `LayerActions` Plugin provides shortcuts for cloning non-background layers to the next page, hiding all non-background layers except the footer layers and adding a new top layer on each page.
212-
- The `HandwritingRecognition` Plugin ([work in progress](https://github.com/xournalpp/xournalpp/pull/2176)) uses cloud-based handwriting recogntion to recognize handwritten text from a selection or page layer in a user-specified language.

docs/guide/tools.md

Lines changed: 0 additions & 142 deletions
This file was deleted.

docs/guide/tools/eraser.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Eraser tool
2+
3+
The eraser tool can remove strokes or parts of strokes. It has three modes:
4+
5+
- **Standard**: remove parts of strokes that the cursor moves over.
6+
- **Whiteout**: paint a white stroke on top of what you want to hide. This is useful if you want to erase something from the background.
7+
- **Delete Stroke**: remove the entirety of any stroke that the cursor touches.

docs/guide/tools/latex.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# LaTeX tool
2+
3+
Using the LaTeX tool you can insert LaTeX formulas into a Xournal++ document. In order to use this tool you must have LaTeX installed on your system.
4+
The feature needs to be able to call pdflatex. In addition, the LaTeX `standalone` package needs to be installed, which typically requires installation of `texlive-latex-extra` or `texlive-standalone`. On Ubuntu or similar Linux systems this means
5+
6+
`sudo apt-get install texlive-latex-extra`
7+
8+
For other operating systems you will need to consult your LaTeX installation manual on how to add the standalone LaTeX package.
9+
10+
## Basic LaTeX formulas
11+
12+
Clicking on the LaTeX button in the toolbar will bring up a dialog which will allow you to type in a formula. A preview will be displayed in the center of the dialog, which will keep updating as you type and indicate whether your formula is valid. Once you are done, you can click the OK button to insert the LaTeX into the document; the rendered formula will appear at the center of the current page. The formula can be selected, moved scaled and edited as desired.
13+
14+
Note that the LaTeX formula will always be set in *inline math mode*. If you want to exit math mode, you should write a $-sign to leave math mode and add another $-sign at the end to reenter math-mode. For instance the LaTeX formula
15+
16+
```tex
17+
$\huge$ x^2
18+
```
19+
20+
will use the command `\huge` to increase the font size, which cannot be done in math mode.
21+
22+
## Enhanced LaTeX tool in Xournal++ 1.1.0+dev
23+
24+
The LaTeX tool has recently been extended making it much more configurable. Most importantly a customizable template has been implemented, where you can load packages and define macros. Moreover a LaTeX settings panel has been added, where you choose the template, specify the LaTeX generation command and test your LaTeX configuration. The extension is only available in version 1.1.0+dev.
25+
26+
## Customization of the template
27+
28+
A default LaTeX template is provided under the name `default_template.tex`. By default it is pre-selected in the LaTeX settings panel. Clicking on it, you will find its location in your file system. On Linux systems it will typically be stored in
29+
`/usr/share/xournalpp/resources`.
30+
31+
To generate a custom LaTeX template, make a copy of the default template, save it under a different name and start customizing it by adding packages and macros. Some suggestions are listed here:
32+
33+
- Include the [**graphicx** package](https://ctan.org/pkg/graphicx) by adding `\usepackage{graphicx}` to your template file. As an example this will give you the possibility to add rotated text via a LaTeX formula like
34+
35+
```tex
36+
\text{\rotatebox[origin=c]{90}{My Rotated Text}}
37+
```
38+
39+
- Include the [**TikZ** package](https://www.ctan.org/pkg/pgf) via `\usepackage{tikz}` for creating drawings with the powerful TikZ tool. A simple example would be to draw a table (or grid) with n rows and m columns via `\tikz{\draw (0,0) grid(m,n)}`. See [this issue](https://github.com/xournalpp/xournalpp/issues/2179) for more information.
40+
41+
- Include the [**PGFPlots** package](https://www.ctan.org/pkg/pgfplots) via `\usepackage{pgfplots}` for plotting function graphs. Using a macro you will be able to plot function graphs nicely and very quickly. For example, add the following lines to your template:
42+
43+
```teX
44+
%for defining commands
45+
\usepackage{xargs}
46+
47+
% for drawing and plotting
48+
\usepackage{pgfplots}
49+
\pgfplotsset{compat=newest} % Allows to place the legend below plot
50+
\newcommandx{\graph}[3][1=,2=]{
51+
\begin{tikzpicture}
52+
\begin{axis}[xlabel=$x$,ylabel=$y$, axis lines=center,samples=100, #2]
53+
\addplot[#1]{#3};
54+
\end{axis}
55+
\end{tikzpicture}
56+
}
57+
```
58+
59+
Then a LaTeX-formula like `\graph{x^2}` will plot the normal parabola and `\graph[domain=-2:2, blue][x=1cm,y=1cm]{x^2}` will further restrict the domain, set the color and define units.
60+
61+
- Include the [**Listings** package](https://www.ctan.org/pkg/listings) via `\usepackage{listings}` for proper alignment and syntax coloring of code snippets. You need to define the style with `lstset` as in the following example, which you can add to your template:
62+
63+
```tex
64+
\usepackage{listings}
65+
\lstset{language=C++,
66+
basicstyle=\ttfamily,
67+
keywordstyle=\color{blue}\ttfamily,
68+
stringstyle=\color{red}\ttfamily,
69+
commentstyle=\color{green}\ttfamily,
70+
morecomment=[l][\color{magenta}]{\#}
71+
}
72+
```
73+
74+
In the LaTeX formula you can then use the `lstlistings` enivronment as in the following example
75+
76+
```tex
77+
\begin{lstlisting}
78+
#include<stdio.h>
79+
#include<iostream>
80+
// A comment
81+
int main(void)
82+
{
83+
printf("Hello World\n");
84+
return 0;
85+
}
86+
\end{lstlisting}
87+
```
88+

0 commit comments

Comments
 (0)