neoschool
Classcls File: neoschool.cls
Documentation in PDF format: neoschool-en.pdf
LaTeX Source: neoschool-en.tex
The neoschool
class provides secondary school teachers with a
comprehensive set of tools to create their educational documents
(assessments, course materials, exercise sheets with solutions, etc.). To
meet various needs, it offers eight predefined color themes, diverse class
options for layout and typography, specialized environments, dedicated
commands, and different preformatted header styles for each type of
document. It integrates dozens of commonly used LaTeX packages (see list
below), which significantly reduces the preamble and avoids compatibility
issues as much as possible. It’s multilingual, supporting French, English,
and German.
The following packages are automatically loaded by the
neoschool
class:
adforn
, adjustbox
, algpseudocode
,
amssymb
, babel
, bookmark
,
calc
, changespace
, cuted
,
environ
, fancyvrb
, fontawesome5
,
forest
, iftex
, ifthen
,
kvoptions
, lastpage
, marginnote
,
microtype
, mismath
(which loads
mathtools
), multicol
, needspace
,
pdftexcmds
, pgffor
, pgfplots
,
qrcode
, scrlayer-scrpage
, silence
,
siunitx
, tabularray
, tasks
,
tcolorbox
(with the most
option loading
listings
and minted
packages),
textcase
, tikz
, tikzpagenodes
,
tikzsymbols
, ulem
(with
normalem
option), xcolor
(with
table
, svgnames
, dvipsnames
, and
x11names
options), xhfill
, xkeyval
,
xsim
(with use-files
and
clear-aux
options), xstring
.
Compilation in pdflatex
loads fonttenc
(with
T1
option), inputenc
(with
utf8
option), newpxtext
, and
newpxmath
. Compilation in lualatex
makes
available fontspec
, luacas
, lua-ul
,
luacolor
packages and applies
TeX Gyre PagellaX
and TeX Gyre Heros
fonts in
addition to newpxmath
.
The graphics
option loads graphicx
and
wrapfig
, the draft
option loads
blindtext
and lipsum
, and the
mathastext
option loads the mathastext
package.
The math
option loads annotate-equations
,
bm
, cancel
, mathrsfs
,
nncomma
, numprint
, tdsfrmath
(with
suite
and taupe
options),
tkz-euclide
, witharrows
, and xlop
.
The notes
option enables colored and framed notes in the left
and right margins alternately and loads the
todonotes
package.
The apmep
option, which allows direct compilation of
examination papers from the association of the same name, defines a set of
mathematical commands and loads esvect
,
fourier-ons
, numprint
(with
np
option), pstricks
(and many packages from the
pstricks
ecosystem), tabularx
, and
textcomp
.
The mathics
option enables computer algebra via
mathics
(free version of mathematica
) and loads
asymptote
and latexalpha2
packages.
The theme = theme-name
option sets the
document’s color theme. Available themes are: cyprus
,
kassio
, frost
, spring
,
arbutus
, duo
, navy
,
royal
. Most of them are inspired by the ef-themes for
Emacs by Protesilaos Stavrou.
color
: Sets the text color.
color
or
titlehexcolor = hex code
: Sets the title
color.
color
: Sets the section header
color.
color
: Sets the subsection
color.
color
: Sets the
subsubsection color.
color
: Sets the header and
footer color.
lualatex
.
The abstracttitle
option allows customization of the
abstract
environment title:
\documentclass[abstracttitle=Summary]{neoschool}
% In the document
\begin{abstract}
Abstract content...\end{abstract}
font
: Main document font.
options
: Main font
options.
font
: Sans-serif font.options
: Sans-serif font
options.
font
: Monospace font.options
: Monospace font
options.
font
: Mathematical font.options
: Mathematical
font options (only in pdflatex
).
family
: Complete font family.
options
: Font family
options.
length
: Sets horizontal margin
width (2.5cm default); vertical margins adjust accordingly.
length
: Activates
todonotes in margins and sets their width.
length
: Sets indentation width
(1em default).
\documentclass[exam]{neoschool}
\neoheader{
type = Test,
school = Poincarré High School,
level = Senior Year,
duration = 2h,% or false or exam
calculator = true }
\documentclass[eval]{neoschool}
\neoheader{
type = Quiz,
school = Alan Turing Middle School,
level = 8th Grade }
eval
header.
The document header can be configured with the
\neoheader
command:
\neoheader{
type = {Document Type},
school = {School Name},
academy = {Academy Name},
level = {Grade Level},
duration = {Duration},
calculator = {true/false/exam},\faIcon{...}},
leftcontent = {\faIcon{...}},
rightcontent = { }
style
: Font style for all
headers (sffamily
default).
\documentclass[headstyle=rmfamily]{neoschool}
weight
: Weight for all
headers (bfseries
default).
\documentclass[
headstyle=sffamily,
headweight=mdseriesneoschool} ]{
shape
: Shape for all headers
(scshape
default).
\documentclass[
headstyle=sffamily,
headshape=upshapeneoschool} ]{
style
: Style for main title
(inherits from headstyle
).
weight
: Weight for main
title (inherits from headweight
).
shape
: Shape for main title
(upshape
default).
alignment
: Title alignment
(center
default).
\documentclass[
titlestyle=sffamily,
titleweight=bfseries,
titleshape=upshape,
titlealign=leftneoschool} ]{
style
: Numbering style.
circle
: Circled number.box
: Boxed number.dash
: Dash after number.plain
: Simple number.style
: Text style.
sc
: Small caps.upper
: Uppercase.lower
: Lowercase.style
: Global section
style.
ornaments
: With decorative ornaments.underline
: Underlined.normal
: Simple style.highlighted
: With highlighting.shadedline
: With shaded line.alignment
: Section
alignment.
left
: Left-aligned.center
: Centered.right
: Right-aligned.\documentclass[
sectionnumstyle=circle,
sectiontextstyle=upper,
sectionstyle=highlighted,
sectionalign=leftneoschool} ]{
style
: Header/footer style
(based on headstyle
).
\documentclass[headfootstyle=sffamily]{neoschool}
\documentclass[
% Global style
headstyle=sffamily,
headweight=bfseries,
headshape=scshape,
% Main title
titlestyle=sffamily,
titleweight=bfseries,
titleshape=upshape,
titlealign=center,
% Sections
sectionnumstyle=circle,
sectiontextstyle=upper,
sectionstyle=highlighted,
sectionalign=left,
% Headers/footers
headfootstyle=sffamilyneoschool} ]{
The \positionobject
command allows precise placement of
elements on the page:
\positionobject{x-shift}{y-shift}{scale}{content}
\begin{itemize}
\item \texttt{x-shift}: Horizontal offset from top-left corner.
\item \texttt{y-shift}: Vertical offset from top-left corner.
\item \texttt{scale}: Scale factor for content.
\item \texttt{content}: Element to position (image, text, etc.).
\end{itemize}
% Example: Image in top-right corner
\positionobject{15cm}{1cm}{0.5}{\includegraphics{logo.png}}
% Example: Special footer text
\positionobject{2cm}{25cm}{1}{Special footer note}
The *** command divides content horizontally:
% Example with custom values
\splitcontent[0.6][0.05]{
%
This part takes up 60
of total width
}{%
This part takes up 35% space between)
(5
}
% Example with default values (50% / 50%)
\splitcontent{
First column
}{
Second column }
The sidebyside
environment creates two-column boxes with
consistent styling:
\begin{sidebyside}[options]
% Left content
\tcblower
% Right content
\end{sidebyside}
Options are those of tcolorbox
.
\begin{sidebyside}[
title=Comparison,
colback=exampleColor!5,
colbacklower=exampleColor!10
]
First version\tcblower
Improved version\end{sidebyside}
The *** command combines text and image:
% Star (*) reverses image position (right by default)
% Image on right (30% width)
\textwithimage{0.3}{0.95}{
This text describes the adjacent image...
}{images/figure.png}
% Image on left (40% width)
\textwithimage*{0.4}{0.9}{
Description to the right of the image... }{images/schema.png}
The *** command integrates a QR code with associated content:
% Star (*) places QR code on right (left by default)
% QR code on left (2cm default)
\withqrcode{https://example.com}{
Scan for more information
}
% 3cm QR code on right
\withqrcode*[3cm]{https://exercises.com}{
Access online exercises }
\grid[blue]{10cm}{5cm} % Blue grid 10 x 5 cm
\customgrid[red][4mm][4mm]{12cm}{8cm} % Red grid, 4mm mesh
\frenchgrid{15cm}{10cm} % French-style notebook grid
\notebook % Activates lined notebook style
\nbminorgrid % Activates fine grid
\nbmajorgrid % Activates Seyes grid
The neobox
environment provides a quick way to create simple
boxes. It comes in two variants: neobox
with frame and
neobox*
without visible frame:
% Standard box
\begin{neobox}[colframe=blue,colback=blue!5]
Text in a box...\end{neobox}
% Frameless box with colored background
\begin{neobox*}[colback=gray!10]
Text on gray background...\end{neobox*}
The exercise
environment accepts the following options:
number
: Points for the exercise.
number
: Difficulty level
(displayed as stars).
text
: Exercise subtitle or
description.
icon
: Custom icon (uses Font
Awesome library).
theme
: Related theme or chapter.
subject
: Related subject.identifier
: Unique identifier for
referencing.
style
: Specific display style
for this exercise.
\begin{exercise}[
points=4,
level=2,
subtitle=Derivatives,\faPencil,
icon=
topic=Analysis,
subject=Mathematics,
ID=der01,
template=elegant-box
]$f$ defined on $]0 ; +\infty[$
Calculate the derivative of the function $f(x)=x^2\ln(x)$.
by \end{exercise}
\texttt{solution} environment must immediately follow its corresponding \texttt{exercise} environment. Exercise solutions are not displayed by default.
The
\begin{solution}
We use the product rule...\end{solution}
% To reference the exercise elsewhere:
\exercisenumber{der01}. As seen in exercise~
The class offers numerous predefined styles for exercises:
To set a template for the entire document, use the
\xsimsetup
command in the preamble:
\xsimsetup{
% exercise template
exercise/template = elegant-box, % solution template
solution/template = sol-box }
\begin{exercise}[points=2,ID=mcq01]
$e^x$?
What is the derivative of \begin{choices}
\choice $x e^x$
\choice[\correct] $e^x$
\choice $e^{x-1}$
\choice $\ln(x)$
\end{choices}
\end{exercise}
\begin{exercise}[points=3,ID=mcq02]
Which of these numbers are prime?\begin{checkboxes}
\checkbox[\correct*] 2
\checkbox[\correct*] 3
\checkbox 4
\checkbox[\correct*] 5
\end{checkboxes}
\end{exercise}
The following styles are available for all theorem-type environments: amslikethm (minimalist style), boxedthm, classicthm, classythm, elegantthm, shadedthm, slantedthm, soberthm.
Common options:
text
: Theorem title.name
: Label for referencing.
color
: Background color.color
: Frame color.color
: Title color.commands
: Title style.\begin{theorem}[title=Pythagorean Theorem,label=pyth]
In a right triangle, the square of the
hypotenuse equals the sum of squares
of the other two sides.\end{theorem}
% Referencing:
\ref{thm:pyth} According to theorem~
\begin{lemma}[title=Preparatory Lemma,label=prep]
Lemma content...\end{lemma}
% Referencing:
\ref{lem:prep} According to lemma~
\begin{corollary}[
title=Pythagorean Converse,
label=pythrecip
]$a^2 + b^2 = c^2$, then the triangle is
If $A$.
right-angled at \end{corollary}
% Referencing:
\ref{cor:pythrecip} According to corollary~
The neoschool
class offers two options for code handling.
listings
package.
minted
package (requires
Python and the Pygments
library).
style
: Coloring style.
colorful
: Complete coloring (default).minimal
: Minimalist style.academic
: “Academic” style with line numbers.modern
: “Modern” style with colored background.
The class defines the code
environment with the following
structure:
\begin{code}[options]{language}[title][box-style]
source code...\end{code}
Box styles: box-minimal, box-fancy, box-classic, box-elegant, box-diagonal, box-bevel, box-corner, box-rounded, box-downhill, box-bottomtitle, box-bottomtitlef.
\begin{code}[numbers=left]{python}[Function Example][box-fancy]
def hello(name):
print(f"Hello, {name}!")\end{code}
\codeinline[python]{print("Hello")}
\codeinput[options]{language}{file.py}[title][box-style]
When the minted option is activated, code environments
use Pygments
for syntax highlighting. The
code
environment is also available with the
minted
option, using the same syntax:
\usemintedstyle{tango}
\begin{code}[linenos,highlightlines={2,3}]{python}[Function][box-fancy]
def greet(name):
message = f"Hello, {name}!"
print(message)
return message\end{code}
Notes can be placed in the margin with different options:
\tdnote{Important point to remember}
\tdnote[backgroundcolor=blue!5]{Note with light blue background}
todonote
package doesn’t allow direct note placement in
environments, use an anchor point (***) with the same label as the note
content (***).
\boxnote[thm1]{This theorem is important}
\begin{theorem}
\tdmark[thm1] % Reference point for note (same label)
Theorem content...\end{theorem}
Available note options:
color
: Background color.
color
: Text color.color
: Border color.length
: Note width.color
: Reference line color.
Admonition environments highlight important information. Each type has its default color and icon.
\begin{note}[Important Note][\faInfo]
Points to remember...\end{note}
\begin{info}[Further Reading]
Additional information...\end{info}
\begin{warning}[Caution!][\faExclamationTriangle]
Critical points to remember...\end{warning}
\begin{important}[Key Point]
Fundamental concept...\end{important}
\begin{tip}[Calculation Tip][\faLightbulb]
A faster method...\end{tip}
\begin{reminder}[Memorize]
Essential formulas...\end{reminder}
\begin{summary}[In Brief]
Main chapter points...\end{summary}
\begin{toolbox}[Required Tools]
\begin{itemize}
\item Calculator
\item Ruler
\item Compass
\end{itemize}
\end{toolbox}
All admonitions accept three optional parameters: - An optional title - A custom icon - Customization options (colors, borders)
\gradingstrip
% Banner with specified total
\gradingstrip[20]
The totalpoints option sets the default total points.
\documentclass[totalpoints=20]{neoschool}
\mrk[Well done!]{1} % Right margin with comment
\mrk*{1} # Left margin
% Multiple points
\mrks{3} % 3 points right margin
\mrks*[Scale]{3} % 3 points left margin with text
\answerfield{3}
% Area 80% width, 5 lines
\answerfield[0.8\linewidth]{5}
\answerframe{3}
% Frame 80% width, 5 lines
\answerframe[0.8\linewidth]{5}
\vardots
% 5cm dotted line
\vardots[5cm]
\begin{itemize}
\unchecked Goal 1 to complete
\done Goal 2 completed
\wontfix Goal 3 abandoned
\end{itemize}
\competencies{
\\
Calculate derivatives\\
Study variations
Solve equations }
The table automatically displays: - 4 mastery levels with emojis - Checkboxes for assessment
$\mhl{x^2}$
% Custom highlighting
$\mhl[blue!20]{f'(x)}$
% In multi-line equations
\begin{align*}
f(x) &= x^2 + \mhl{2x} + 1 \\
f'(x) &= 2x + \mhl{2}
\end{align*}
$\mc{f(x)}$
% Custom color
$\mc[red]{g(x)}$
% In equation
\[ \mc{f'(x)} = \lim_{h \to 0} \mc[blue]{\frac{f(x+h)-f(x)}{h}} \]
When the apmep option is activated, the following commands become available:
\vect{u} % Vector u with arrow
\vectt{AB} % Vector AB with spacing
\Oij % Frame (O; i,j)
\Oijk % Frame (O; i,j,k)
\Ouv % Frame (O; u,v)
\euro % Euro symbol
\cg % Left bracket
\cd % Right bracket
\pg % Greater than or equal
\pp % Less than or equal
\barre{x} % Overlined x
\ds % \displaystyle
forest
package:\begin{neotree}
A
[B
[D]
[E]
]
[C
[F]
[G]
]\end{neotree}
% With edge weights
\begin{neotree}
A\frac{1}{3}
[B, w=
[D]
[E]
]\frac{2}{3}]
[C, w=\end{neotree}
lualatex
compilation):\neograph{
A -- {B, C, D, F},
B -- {C, D, F},
C -> ["3"] D,
D -- [bend left=10] {E},
E -- [bend left=10] {D},
E -- [bend left=10] {F},
F -- [bend left=10] {E},
A -- [loop] A }
The mathgrid
environment allows arranging equations in a
grid:
\begin{mathgrid}{3}
\neoline
\neocol{
\\
T &= 7xx+9x\\
&= (7+9)x
&= 16x
}\neocol{
\\
U &= 8x^{2}-5x^{2}+x^{2}\\
&= (8-5+1)x^{2}
&= 4x^{2}
}\neocol{
\\
V &= 5a^{2}-6a
&= a(5a-6)
}\neoline
\neocol[2]{
\\
W &= 5a^{2}-6a+3+7a^{2}+a-6\\
&= (5+7)a^{2}+(-6+1)a+(3-6)
&= 12a^{2}-5a-3
}\neocol{
\\
A &= 2x + 3x
&= 5x
}\end{mathgrid}