Skip to content

Commit d0f1aca

Browse files
Cleanup root folder to reduce file mess
- Moved format config files to tools folder
1 parent a908cbd commit d0f1aca

File tree

19 files changed

+109
-37
lines changed

19 files changed

+109
-37
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ Test*
1212
!Content.html
1313
Content.jira
1414

15-
.envrc
15+
.envrc
16+
node_modules

.vscode/extensions.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"davidanson.vscode-markdownlint",
77
"notZaki.pandocciter",
88
"naco-siren.gradle-language",
9-
"richardwillis.vscode-gradle"
9+
"richardwillis.vscode-gradle",
10+
"koihik.vscode-lua-format",
11+
"mathiasfrohlich.kotlin",
1012
]
1113
}

.vscode/settings.json

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
{
22
"editor.formatOnPaste": true,
33
"editor.formatOnType": true,
4-
"search.exclude": {
5-
"**/node_modules": true,
6-
},
4+
"editor.tabSize": 4,
75
"files.autoGuessEncoding": false,
86
"files.encoding": "utf8",
97
"files.exclude": {
8+
"**/.DS_Store": true,
109
"**/.git": true,
11-
"**/.svn": true,
1210
"**/.hg": true,
13-
"**/CVS": true,
14-
"**/node_modules": true,
15-
"**/.DS_Store": true,
11+
"**/.svn": true,
12+
"**/CVS": true
1613
},
1714
"files.trimTrailingWhitespace": false,
1815
"latex-workshop.latex.autoBuild.run": "never",
@@ -28,31 +25,39 @@
2825
{
2926
"args": [
3027
"-r",
31-
"../.latexmkrc",
28+
"../tools/.latexmkrc",
3229
"-xelatex",
3330
"-cd-",
3431
"%DOC%"
3532
],
3633
"command": "latexmk",
34+
"cwd": "",
3735
"env": {},
38-
"cwd":"",
3936
"name": "latexmk"
4037
}
4138
],
39+
"PandocCiter.DefaultBib": "literature/bibliography.bib",
40+
"prettier.configPath": "tools/.prettierrc",
4241
"python.formatting.provider": "yapf",
42+
"python.formatting.yapfArgs": [
43+
"--style",
44+
"tools/.style.yapf"
45+
],
4346
"python.linting.enabled": true,
4447
"python.linting.flake8Enabled": false,
4548
"python.linting.pycodestyleEnabled": false,
4649
"python.linting.pylamaEnabled": true,
4750
"python.linting.pylintEnabled": false,
48-
"editor.tabSize": 4,
49-
"spellright.language": [
50-
"de"
51-
],
51+
"search.exclude": {
52+
"**/node_modules": true
53+
},
5254
"spellright.documentTypes": [
5355
"latex",
5456
"plaintext",
5557
"markdown"
5658
],
57-
"PandocCiter.DefaultBib": "literature/bibliography.bib",
58-
}
59+
"spellright.language": [
60+
"de"
61+
],
62+
"vscode-lua-format.configPath": "tools/.lua-format"
63+
}

.yarnrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

Content.pdf

0 Bytes
Binary file not shown.

Readme.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,34 +77,37 @@ brew install java
7777

7878
You should not need to install Gradle, since everything is setup by the checked-in `gradlew` Gradle wrapper.
7979

80+
### Yarn
81+
82+
You should not need to install ``yarn`` since everything is handled by the dependent Gradle task `installFrontend`. If you experience problems with having the node modules not correctly setup, use
83+
84+
```
85+
cd tools
86+
../build/yarn/bin/yarn install --modules-path build/node_modules
87+
```
88+
8089
### Pandoc
8190

8291
Install [pandoc](https://pandoc.org/installing.html) (>= 2.9.2.1, tested with 2.11.0.4)
8392

8493
For **Linux** and **macOs**:
8594

8695
```shell
87-
export HOMEBREW_NO_INSTALL_CLEANUP=1
88-
cd Homebrew/Library/Taps/homebrew/homebrew-core &&
89-
git checkout 36b6c2d8cd71580a4fd3055375f87a8c52cd5846~20 && # installs 2.9.2.1
90-
HOMEBREW_NO_AUTO_UPDATE=1 brew install pandoc pandoc-citeproc pandoc-crossref &&
91-
brew install pandoc pandoc-citeproc pandoc-crossref # installs 2.10.1
96+
brew install pandoc pandoc-crossref
9297
```
9398

9499
For **Windows**:
95100

96101
```shell
97102
choco install pandoc
98-
git clone https://github.com/gabyx/chocolatey-packages.git@patch-1 temp
99-
cd temp && choco install ./pandoc-crossref/pandoc-crossref.nuspec
100103
```
101104

102105
### Python
103106

104107
Install a recent `python3` (>= 3.6) and the following packages:
105108

106109
```shell
107-
pip3 install -r .requirements
110+
pip3 install -r tools/.requirements
108111
```
109112

110113
The best way is to setup a python environment `python venv` since `pandoc`. The VS Code config `python.pythonPath` path needs to be set.

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ plugins {
88
@Suppress("unchecked_cast", "nothing_to_inline")
99
inline fun <T> uncheckedCast(target: Any?): T = target as T
1010

11-
1211
apply(plugin = "java")
1312
apply(from = "gradle/runCommand.gradle.kts")
1413
val checkCmd = project.extensions.getByName("checkCommand")
@@ -22,6 +21,8 @@ frontend {
2221
nodeInstallDirectory.set(file("${project.buildDir}/node"))
2322
yarnEnabled.set(true)
2423
yarnVersion.set("1.22.10")
24+
packageJsonDirectory.set(file("${project.rootDir}/tools"))
25+
installScript.set("install --modules-folder='${project.buildDir}/node_modules'")
2526
yarnInstallDirectory.set(file("${project.buildDir}/yarn"))
2627
}
2728

build/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*
22
!.gitignore
3+
!build.gradle.kts
34
!output-tex
45
!output-tex/input.tex

build/output-tex/input.tex

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -840,11 +840,27 @@ \subsection{HTML Table}\label{html-table}}
840840
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}}@{}}
841841
\caption{Table by included \texttt{.html} file.}\tabularnewline
842842
\toprule
843-
Fruits & Vegetables & Constraints & Properties \\
843+
\begin{minipage}[b]{\linewidth}\raggedright
844+
Fruits
845+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
846+
Vegetables
847+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
848+
Constraints
849+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
850+
Properties
851+
\end{minipage} \\
844852
\midrule
845853
\endfirsthead
846854
\toprule
847-
Fruits & Vegetables & Constraints & Properties \\
855+
\begin{minipage}[b]{\linewidth}\raggedright
856+
Fruits
857+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
858+
Vegetables
859+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
860+
Constraints
861+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
862+
Properties
863+
\end{minipage} \\
848864
\midrule
849865
\endhead
850866
\textbf{First} & \begin{minipage}[t]{\linewidth}\raggedright
@@ -913,11 +929,27 @@ \subsection{\texorpdfstring{\LaTeX~Table}{~Table}}\label{table}}
913929
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}}@{}}
914930
\caption{Table by included \texttt{.html} file.}\tabularnewline
915931
\toprule
916-
Fruits & Vegetables & Constraints & Properties \\
932+
\begin{minipage}[b]{\linewidth}\raggedright
933+
Fruits
934+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
935+
Vegetables
936+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
937+
Constraints
938+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
939+
Properties
940+
\end{minipage} \\
917941
\midrule
918942
\endfirsthead
919943
\toprule
920-
Fruits & Vegetables & Constraints & Properties \\
944+
\begin{minipage}[b]{\linewidth}\raggedright
945+
Fruits
946+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
947+
Vegetables
948+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
949+
Constraints
950+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
951+
Properties
952+
\end{minipage} \\
921953
\midrule
922954
\endhead
923955
\textbf{First} & \begin{minipage}[t]{\linewidth}\raggedright
@@ -995,11 +1027,23 @@ \subsection{Markdown Table}\label{sec:multi-line-table}}
9951027
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.26}}@{}}
9961028
\caption{Sample grid table.}\tabularnewline
9971029
\toprule
998-
Fruit & Price & Advantages \\
1030+
\begin{minipage}[b]{\linewidth}\raggedright
1031+
Fruit
1032+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
1033+
Price
1034+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
1035+
Advantages
1036+
\end{minipage} \\
9991037
\midrule
10001038
\endfirsthead
10011039
\toprule
1002-
Fruit & Price & Advantages \\
1040+
\begin{minipage}[b]{\linewidth}\raggedright
1041+
Fruit
1042+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
1043+
Price
1044+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
1045+
Advantages
1046+
\end{minipage} \\
10031047
\midrule
10041048
\endhead
10051049
Bananas & \$1.34 & \begin{minipage}[t]{\linewidth}\raggedright

chapters/tables-tex/TableExample.tex

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,27 @@
55
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}}@{}}
66
\caption{Table by included \texttt{.html} file.}\tabularnewline
77
\toprule
8-
Fruits & Vegetables & Constraints & Properties \\
8+
\begin{minipage}[b]{\linewidth}\raggedright
9+
Fruits
10+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
11+
Vegetables
12+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
13+
Constraints
14+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
15+
Properties
16+
\end{minipage} \\
917
\midrule
1018
\endfirsthead
1119
\toprule
12-
Fruits & Vegetables & Constraints & Properties \\
20+
\begin{minipage}[b]{\linewidth}\raggedright
21+
Fruits
22+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
23+
Vegetables
24+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
25+
Constraints
26+
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
27+
Properties
28+
\end{minipage} \\
1329
\midrule
1430
\endhead
1531
\textbf{First} & \begin{minipage}[t]{\linewidth}\raggedright

0 commit comments

Comments
 (0)