Skip to content

Commit

Permalink
changed latex workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pa-senger committed May 21, 2024
1 parent dff3d1b commit a7d12cf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/latex.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
name: LaTeX CI

name: Build LaTeX document
on: [pull_request]

jobs:
build:
runs-on: ubuntu-20.04

build_latex:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install LaTeX
run: |
sudo apt-get -y update
sudo apt-get -y install texlive-full
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile LaTeX document
run: |
pdflatex report.tex
bibtex report
pdflatex report.tex
pdflatex report.tex
uses: xu-cheng/latex-action@v2
with:
root_file: report.tex
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"bbox": "48.59074,7.75693,48.59164,7.75975",
"bbox": "48.5797,7.7435,48.5856,7.7551",
"LOD": 0,
"default_height": 10,
"default_genus": "Platanus",
"output_name": "contades"
"output_name": "grande_ile"
}
23 changes: 16 additions & 7 deletions src/tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,14 @@ void Tree::wrap(int lod) {
"Juniperus", "Larix",
"Picea", "Pinus",
"Pseudotsuga", "Chamaecyparis",
"Calocedrus"}; // -> Cedrus
std::vector<std::string> hetre = {"Fadus"}; // -> Acer
std::vector<std::string> tulipier = {"Liriodendron"}; // -> Liquidambar
std::vector<std::string> broad_leef = {"Corylus", "Quercus", "Carya",
"Fagus"}; // -> Aesculus
"Calocedrus"}; // -> Cedrus
std::vector<std::string> hetre = {"Fadus"}; // -> Acer
std::vector<std::string> tulipier = {"Liriodendron", "Fraxinus",
"Pyrus"}; // -> Liquidambar
std::vector<std::string> big_tree = {"Corylus", "Carya", "Fagus", "Celtis",
"Ailanthus"}; // -> Quercus
std::vector<std::string> long_tree = {"Alnus"}; // -> Ginkgo
std::vector<std::string> prunus = {"Prunus"}; // -> Aesculus

if (std::find(known_tree.begin(), known_tree.end(), M_genus) !=
known_tree.end()) {
Expand All @@ -103,8 +106,14 @@ void Tree::wrap(int lod) {
} else if (std::find(tulipier.begin(), tulipier.end(), M_genus) !=
tulipier.end()) {
filename += "Liquidambar";
} else if (std::find(broad_leef.begin(), broad_leef.end(), M_genus) !=
broad_leef.end()) {
} else if (std::find(big_tree.begin(), big_tree.end(), M_genus) !=
big_tree.end()) {
filename += "Quercus";
} else if (std::find(long_tree.begin(), long_tree.end(), M_genus) !=
long_tree.end()) {
filename += "Ginkgo";
} else if (std::find(prunus.begin(), prunus.end(), M_genus) !=
prunus.end()) {
filename += "Aesculus";
} else {
std::cerr << "Unknown genus: " << M_genus << std::endl;
Expand Down

0 comments on commit a7d12cf

Please sign in to comment.