Skip to content

Commit

Permalink
replace DOI with "unpublished report" in case the pdf is generated wi…
Browse files Browse the repository at this point in the history
…thout colophon
  • Loading branch information
ThierryO committed Oct 24, 2023
1 parent d126336 commit 0090130
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 18 deletions.
8 changes: 8 additions & 0 deletions R/pdf_report.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ pdf_report <- function(
)
)
validate_doi(ifelse(has_name(fm, "doi"), fm$doi, "1.1/1"))
fm$doi <- ifelse(
has_name(fm, "nocolophon"),
c(
nl = "onuitgeven rapport", en = "unpublished report",
fr = "rapport non publié"
)[lang],
fm$doi
)

path("pandoc", "inbo_rapport.tex") |>
system.file(package = "INBOmd") -> template
Expand Down
4 changes: 0 additions & 4 deletions inst/local_tex/tex/latex/inborapport_2015/flanders_report.sty
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
\fancyfoot{}
\fancyfoot[LO, RE]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\href{https://www.vlaanderen.be/en}{www.vlaanderen.be}}}}
\fancyfoot[LE, RO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \pagename \textbf{ \thepage} / \textbf{\pageref*{LastPage}}}}
\ifnum \@colophon > 0
\fancyfoot[CE, CO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\@doi}}}
\fi
\renewcommand{\footrule}{\vbox to 8pt{\hbox
to\headwidth{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont\leaders\hbox{/}\hfill}\vss}}
\renewcommand{\headrulewidth}{0pt}
Expand All @@ -27,9 +25,7 @@ to\headwidth{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}
\fancyhead{}
\fancyfoot{}
\fancyfoot[LO, RE]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\href{https://www.vlaanderen.be/en}{www.vlaanderen.be}}}}
\ifnum \@colophon > 0
\fancyfoot[CE, CO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\@doi}}}
\fi
\fancyfoot[LE, RO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \pagename \textbf{ \thepage} / \textbf{\pageref*{LastPage}}}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@
\vspace{144pt}

\hspace{10mm}\parbox[t]{140mm}{
\fontsize{\fontsizeordernr}{\fontsizeordernrinter}\selectfont \raggedright \ifnum \@colophon > 0 \mainColourURL{\@doi} \\ \fi \@ordernumber
\fontsize{\fontsizeordernr}{\fontsizeordernrinter}\selectfont \raggedright \mainColourURL{\@doi} \\ \@ordernumber
}

\vfill
Expand Down
4 changes: 0 additions & 4 deletions inst/local_tex/tex/latex/inborapport_2015/flandre_report.sty
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
\fancyfoot{}
\fancyfoot[LO, RE]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\href{https://www.vlaanderen.be/fr}{www.vlaanderen.be}}}}
\fancyfoot[LE, RO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \pagename \textbf{ \thepage} / \textbf{\pageref*{LastPage}}}}
\ifnum \@colophon > 0
\fancyfoot[CE, CO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\@doi}}}
\fi
\renewcommand{\footrule}{\vbox to 8pt{\hbox
to\headwidth{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont\leaders\hbox{/}\hfill}\vss}}
\renewcommand{\headrulewidth}{0pt}
Expand All @@ -27,9 +25,7 @@ to\headwidth{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}
\fancyhead{}
\fancyfoot{}
\fancyfoot[LO, RE]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\href{https://www.vlaanderen.be/fr}{www.vlaanderen.be}}}}
\ifnum \@colophon > 0
\fancyfoot[CE, CO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\@doi}}}
\fi
\fancyfoot[LE, RO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \pagename \textbf{ \thepage} / \textbf{\pageref*{LastPage}}}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
Expand Down
6 changes: 1 addition & 5 deletions inst/local_tex/tex/latex/inborapport_2015/inbo_report.sty
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
\fancyfoot{}
\fancyfoot[LO, RE]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\href{https://www.vlaanderen.be/inbo}{vlaanderen.be/inbo}}}}
\fancyfoot[LE, RO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont Pagina \textbf{\thepage} van \textbf{\pageref*{LastPage}}}}
\ifnum \@colophon > 0
\fancyfoot[CE, CO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\@doi}}}
\fi
\renewcommand{\footrule}{\vbox to 8pt{\hbox
to\headwidth{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont\leaders\hbox{/}\hfill}\vss}}
\renewcommand{\headrulewidth}{0pt}
Expand All @@ -27,9 +25,7 @@ to\headwidth{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}
\fancyhead{}
\fancyfoot{}
\fancyfoot[LO, RE]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\href{https://www.vlaanderen.be/inbo}{vlaanderen.be/inbo}}}}
\ifnum \@colophon > 0
\fancyfoot[CE, CO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\@doi}}}
\fi
\fancyfoot[CE, CO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\@doi}}}
\fancyfoot[LE, RO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont Pagina \textbf{\thepage} van \textbf{\pageref*{LastPage}}}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
\fancyfoot{}
\fancyfoot[LO, RE]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\href{https://www.vlaanderen.be}{www.vlaanderen.be}}}}
\fancyfoot[LE, RO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont Pagina \textbf{\thepage} van \textbf{\pageref*{LastPage}}}}
\ifnum \@colophon > 0
\fancyfoot[CE, CO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\@doi}}}
\fi
\renewcommand{\footrule}{\vbox to 8pt{\hbox
to\headwidth{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont\leaders\hbox{/}\hfill}\vss}}
\renewcommand{\headrulewidth}{0pt}
Expand All @@ -26,9 +24,7 @@ to\headwidth{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}
\fancyhead{}
\fancyfoot{}
\fancyfoot[LO, RE]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\href{https://www.vlaanderen.be}{www.vlaanderen.be}}}}
\ifnum \@colophon > 0
\fancyfoot[CE, CO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont \mainColourURL{\@doi}}}
\fi
\fancyfoot[LE, RO]{{\color{main.colour}\fontsize{\fontsizefooter}{\fontsizefooterinter}\selectfont Pagina \textbf{\thepage} van \textbf{\pageref*{LastPage}}}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
Expand Down

0 comments on commit 0090130

Please sign in to comment.