• No results found

annee-scolaire user guide

N/A
N/A
Protected

Academic year: 2021

Share "annee-scolaire user guide"

Copied!
3
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

annee-scolaire user guide

Yvon Henel

March 28, 2020

Abstract

A macro \anneescolaire to automatically write academic year (French way) according to the date of compilation day.

Résumé

Une macro \anneescolaire pour écrire automatiquement l’année scolaire en fonction de la date du jour de compilation.

La documentation française pour l’utilisateur de l’extension annee-scolaire est dis-ponible sous le nom de annee-scolaire-fra.

1

The Macros

annee-scolaire offers three main document macros which produce text in the final docu-ment and one macro which is used to determine the presentation of the said text.

1.1

Main Macros

This package has three main document macros viz.

\anneescolaire[hshift i]

where hshifti is an integer the default value of which is 0. It is the number of years the academic year is shifted. The same optional argument with the same aim is available for the next two macros.

\anneescolaire

In French “année scolaire” means “school year”.

\debutanneescolaire[hshift i] \debutanneescolaire

In French “début d’année scolaire” means “beginning of school year”.

\finanneescolaire[hshift i] \finanneescolaire

In French “fin d’année scolaire” means “end of school year”. See examples on page2.

This file describes version 1.6, last revised 2020/07/29. Special quarantine edition.E-mail: le.texnicien.de.surface@yvon-henel.fr

(2)

1.2

Presentation Macro

The presentation of the years as written by the three preceding commands may be changed redefining the following macro:

\AnneeScolairePresentation[hnumber i]{hyear i}

where hyear i is a integer (a LATEX3 int ) which is the number of the year to be written in

the document. The optional argument hnumber i can be used to tailor the presentation according to the following scheme

1 presentation of the beginning year in the text created by the macro \anneescolaire; 2 presentation of the ending year in the text created by the macro \anneescolaire; 3 presentation of the year in the text created by the macro \debutanneescolaire; 4 presentation of the year in the text created by the macro \finanneescolaire.

By default, the macro is an alias of \int_to_arabic:n. If you want to change the presentation, you have to redefine the command with \RenewDocumentCommand.

\AnneeScolairePresentation

See examples on page3.

2

The Package Options

The package uses the key-value options. There are four keys: premiermois (first month), premierjour (first day), decalage (shift) and separateur (separator ).

premiermois (int ) is the number of the first month of the school year. It defaults to 8. premierjour (int ) is the number of the first day of the first month of the school year.

Its default value is 1 so the school year begins, by default, on the first of August.

Beware: no attempt is made in order to ensure the consistency of the chosen date — you can chose the 32nd February if you dare. You have to take care of that by yourself.

decalage (int ) is an integer which defaults to 0. It is used to shift the school year:

passing the option decalage=1 to the package forces \anneescolaire to give the next school year.

separateur (token list ) is the text used between the numbers of the two calendar

years which the school year spans. Its default value is “-”.

3

Examples

3.1

Writing the School Year

The text

“Today is March 28, 2020, academic year 2019-2020, beginning in 2019 and ending in 2020.”

is obtained with the code

(3)

Today is \today, academic year \anneescolaire, beginning in~\debutanneesco laire{} and ending in \finanneescolaire.

What follows illustrates the use of the optional argument of the three document commands. On March 28, 2020: \anneescolaire[-1]: 2018-2019 \debutanneescolaire[-1]: 2018 \finanneescolaire[-1]: 2019 \anneescolaire: 2019-2020 \debutanneescolaire: 2019 \finanneescolaire: 2020 \anneescolaire[1]: 2020-2021 \debutanneescolaire[1]: 2020 \finanneescolaire[1]: 2021

3.2

Changing the Look

With the following code:

code \ExplSyntaxOn \RenewDocumentCommand{\AnneeScolairePresentation}{ o m } { \int_case:nn { #1 } { {1} { \textbf{ \int_to_arabic:n { #2 } } } {2} { \int_to_roman:n { #2 } } {3} { \textit{ \int_to_arabic:n { #2 } } } {4} { \int_to_Roman:n { #2 } } } } \ExplSyntaxOff

\anneescolaire \quad \debutanneescolaire \quad \finanneescolaire

We obtain:

2019-mmxx 2019 MMXX

It should be obvious to everyone that the preceding code is given as a mere example of what we can do and certainly not as an example of what we have to!

Le TeXnicien de Surface scripsit.

Referenties

GERELATEERDE DOCUMENTEN

A composite manufacturing process for producing Class A finished components..

Depression and anxiety heterogeneity could be explained by three symptom- mode components (‘anxious-arousal’, ‘anhedonia’ and ‘mood-cognition’), two time-mode

The more appropriate comparison for the regularization dependence of the OTOC is the proof in Schwinger-Keldysh theory that physical correlation functions are independent on the

There is at least one case in which the parliament confirmed a law ruled unconstitutional, but soon after publication the president requested a new constitutional revision; the law

This is a blind text.. This is a

□ George □ John □ Socrates ✓ □ Ringo □ Paul.A. (5 points) One of these things is not like the others; one of these things is not

\VectorStyle[Z]{E}{0.0}{b} — style ‘Z’ means that the end of the arrow body is positioned a little bit after the beginning of the vec- tor, and its orientation is rotated by 180

The follwing text is the same as above but paren- theses are used to test that a preposition stay (or.. not stay, in this case) with following word even if the prepostion is