Skip to content

Commit

Permalink
Cleanup root folder to reduce file mess
Browse files Browse the repository at this point in the history
- Moved format config files to tools folder
  • Loading branch information
isabellenuessli committed Jun 20, 2021
1 parent a908cbd commit d0f1aca
Show file tree
Hide file tree
Showing 19 changed files with 109 additions and 37 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Test*
!Content.html
Content.jira

.envrc
.envrc
node_modules
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"davidanson.vscode-markdownlint",
"notZaki.pandocciter",
"naco-siren.gradle-language",
"richardwillis.vscode-gradle"
"richardwillis.vscode-gradle",
"koihik.vscode-lua-format",
"mathiasfrohlich.kotlin",
]
}
35 changes: 20 additions & 15 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"search.exclude": {
"**/node_modules": true,
},
"editor.tabSize": 4,
"files.autoGuessEncoding": false,
"files.encoding": "utf8",
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/node_modules": true,
"**/.DS_Store": true,
"**/.svn": true,
"**/CVS": true
},
"files.trimTrailingWhitespace": false,
"latex-workshop.latex.autoBuild.run": "never",
Expand All @@ -28,31 +25,39 @@
{
"args": [
"-r",
"../.latexmkrc",
"../tools/.latexmkrc",
"-xelatex",
"-cd-",
"%DOC%"
],
"command": "latexmk",
"cwd": "",
"env": {},
"cwd":"",
"name": "latexmk"
}
],
"PandocCiter.DefaultBib": "literature/bibliography.bib",
"prettier.configPath": "tools/.prettierrc",
"python.formatting.provider": "yapf",
"python.formatting.yapfArgs": [
"--style",
"tools/.style.yapf"
],
"python.linting.enabled": true,
"python.linting.flake8Enabled": false,
"python.linting.pycodestyleEnabled": false,
"python.linting.pylamaEnabled": true,
"python.linting.pylintEnabled": false,
"editor.tabSize": 4,
"spellright.language": [
"de"
],
"search.exclude": {
"**/node_modules": true
},
"spellright.documentTypes": [
"latex",
"plaintext",
"markdown"
],
"PandocCiter.DefaultBib": "literature/bibliography.bib",
}
"spellright.language": [
"de"
],
"vscode-lua-format.configPath": "tools/.lua-format"
}
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

Binary file modified Content.pdf
Binary file not shown.
19 changes: 11 additions & 8 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,34 +77,37 @@ brew install java

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

### Yarn

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

```
cd tools
../build/yarn/bin/yarn install --modules-path build/node_modules
```

### Pandoc

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

For **Linux** and **macOs**:

```shell
export HOMEBREW_NO_INSTALL_CLEANUP=1
cd Homebrew/Library/Taps/homebrew/homebrew-core &&
git checkout 36b6c2d8cd71580a4fd3055375f87a8c52cd5846~20 && # installs 2.9.2.1
HOMEBREW_NO_AUTO_UPDATE=1 brew install pandoc pandoc-citeproc pandoc-crossref &&
brew install pandoc pandoc-citeproc pandoc-crossref # installs 2.10.1
brew install pandoc pandoc-crossref
```

For **Windows**:

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

### Python

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

```shell
pip3 install -r .requirements
pip3 install -r tools/.requirements
```

The best way is to setup a python environment `python venv` since `pandoc`. The VS Code config `python.pythonPath` path needs to be set.
Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ plugins {
@Suppress("unchecked_cast", "nothing_to_inline")
inline fun <T> uncheckedCast(target: Any?): T = target as T


apply(plugin = "java")
apply(from = "gradle/runCommand.gradle.kts")
val checkCmd = project.extensions.getByName("checkCommand")
Expand All @@ -22,6 +21,8 @@ frontend {
nodeInstallDirectory.set(file("${project.buildDir}/node"))
yarnEnabled.set(true)
yarnVersion.set("1.22.10")
packageJsonDirectory.set(file("${project.rootDir}/tools"))
installScript.set("install --modules-folder='${project.buildDir}/node_modules'")
yarnInstallDirectory.set(file("${project.buildDir}/yarn"))
}

Expand Down
1 change: 1 addition & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*
!.gitignore
!build.gradle.kts
!output-tex
!output-tex/input.tex
56 changes: 50 additions & 6 deletions build/output-tex/input.tex
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,27 @@ \subsection{HTML Table}\label{html-table}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}}@{}}
\caption{Table by included \texttt{.html} file.}\tabularnewline
\toprule
Fruits & Vegetables & Constraints & Properties \\
\begin{minipage}[b]{\linewidth}\raggedright
Fruits
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Vegetables
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Constraints
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Properties
\end{minipage} \\
\midrule
\endfirsthead
\toprule
Fruits & Vegetables & Constraints & Properties \\
\begin{minipage}[b]{\linewidth}\raggedright
Fruits
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Vegetables
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Constraints
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Properties
\end{minipage} \\
\midrule
\endhead
\textbf{First} & \begin{minipage}[t]{\linewidth}\raggedright
Expand Down Expand Up @@ -913,11 +929,27 @@ \subsection{\texorpdfstring{\LaTeX~Table}{~Table}}\label{table}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}}@{}}
\caption{Table by included \texttt{.html} file.}\tabularnewline
\toprule
Fruits & Vegetables & Constraints & Properties \\
\begin{minipage}[b]{\linewidth}\raggedright
Fruits
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Vegetables
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Constraints
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Properties
\end{minipage} \\
\midrule
\endfirsthead
\toprule
Fruits & Vegetables & Constraints & Properties \\
\begin{minipage}[b]{\linewidth}\raggedright
Fruits
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Vegetables
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Constraints
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Properties
\end{minipage} \\
\midrule
\endhead
\textbf{First} & \begin{minipage}[t]{\linewidth}\raggedright
Expand Down Expand Up @@ -995,11 +1027,23 @@ \subsection{Markdown Table}\label{sec:multi-line-table}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.26}}@{}}
\caption{Sample grid table.}\tabularnewline
\toprule
Fruit & Price & Advantages \\
\begin{minipage}[b]{\linewidth}\raggedright
Fruit
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Price
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Advantages
\end{minipage} \\
\midrule
\endfirsthead
\toprule
Fruit & Price & Advantages \\
\begin{minipage}[b]{\linewidth}\raggedright
Fruit
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Price
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Advantages
\end{minipage} \\
\midrule
\endhead
Bananas & \$1.34 & \begin{minipage}[t]{\linewidth}\raggedright
Expand Down
20 changes: 18 additions & 2 deletions chapters/tables-tex/TableExample.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,27 @@
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}}@{}}
\caption{Table by included \texttt{.html} file.}\tabularnewline
\toprule
Fruits & Vegetables & Constraints & Properties \\
\begin{minipage}[b]{\linewidth}\raggedright
Fruits
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Vegetables
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Constraints
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Properties
\end{minipage} \\
\midrule
\endfirsthead
\toprule
Fruits & Vegetables & Constraints & Properties \\
\begin{minipage}[b]{\linewidth}\raggedright
Fruits
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Vegetables
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Constraints
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Properties
\end{minipage} \\
\midrule
\endhead
\textbf{First} & \begin{minipage}[t]{\linewidth}\raggedright
Expand Down
2 changes: 1 addition & 1 deletion convert/pandoc/defaults/pandoc-latex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pdf-engine: latexmk
pdf-engine-opt:
- "-xelatex"
- "-r"
- ".latexmkrc"
- "tools/.latexmkrc"
- "-gg"
- "-outdir=build/output-tex"

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = "TechnicalMarkdown"
rootProject.name = "TechnicalMarkdown"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d0f1aca

Please sign in to comment.