-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
* Ajout template lettre docx * create function lettre_word for new output_format * documentation of lettre_word * create template for output format lettre_word * test of template lettre_word * Update readme and news for new word output_format * maj du fichier d'exemple pour la création d'une lettre word * maj du template lettre word * Modification du template pour la prise en compte de la police pour les titres Co-authored-by: cdugeai <colin.dugeai@modernisation.gouv.fr>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2020 République Française | ||
# | ||
# Licensed under the EUPL, Version 1.2 or – as soon they will be approved by | ||
# the European Commission - subsequent versions of the EUPL (the "Licence"); | ||
# You may not use this work except in compliance with the Licence. | ||
# You may obtain a copy of the Licence at: | ||
# | ||
# https://joinup.ec.europa.eu/software/page/eupl | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the Licence is distributed on an "AS IS" basis, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the Licence for the specific language governing permissions and | ||
# limitations under the Licence. | ||
|
||
#' Word output format for creating a docx letter | ||
#' | ||
#' @inheritParams rmarkdown::word_document | ||
#' @param ... Additional arguments passed to \code{rmarkdown::\link{word_document}()}. | ||
#' | ||
#' @return An R Markdown output format object to be passed to | ||
#' \code{rmarkdown::\link{render}()}. | ||
#' @export | ||
#' | ||
#' @examples | ||
lettre_word <- function(reference_docx = pkg_resource("docx", "template_lettre.docx"), ...){ | ||
rmarkdown::word_document(reference_docx = reference_docx, ...) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
#title: "Exemple lettre Word" | ||
output: gouvdown::lettre_word | ||
params: | ||
lettre_date: "01/01/2022" | ||
lettre_lieu: "Paris" | ||
|
||
--- | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(echo = TRUE) | ||
``` | ||
|
||
::: {custom-style="Date"} | ||
`r params$lettre_lieu`, le `r params$lettre_date` | ||
::: | ||
|
||
|
||
::: {custom-style="header-letter"} | ||
Je ne sais plus à quoi doit servir ce style | ||
::: | ||
|
||
|
||
::: {custom-style="header-letter-naming"} | ||
Madame la préfête de la Loire-Atlantique | ||
::: | ||
|
||
::: {custom-style="objet-title"} | ||
Objet: Informations sur ... | ||
::: | ||
|
||
|
||
## Un titre de niveau 2 | ||
|
||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | ||
|
||
|
||
::: {custom-style="header-annexes"} | ||
Annexes | ||
::: | ||
|
||
|
||
Le titre au dessus marque le début de la section des annexes. | ||
|
||
|
||
Listes à puces: | ||
|
||
::: {custom-style="Compact"} | ||
- le style | ||
- "Compact" | ||
- est utilisé pour | ||
- les listes à puces | ||
::: | ||
|
||
|
||
|
||
::: {custom-style="header-annexeN"} | ||
Annexe 1: Première annexe | ||
::: | ||
|
||
|
||
::: {custom-style="subheader-annexe"} | ||
Sous-titre de la première annexe | ||
::: | ||
|
||
Contenu de l'annexe 1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: gouvdown lettre Word | ||
description: > | ||
Un document word au format lettre | ||
create_dir: FALSE |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.