# CourseUp language specification

CourseUp documents are written in Markdown and LaTeX. There are three conversion passes to create the documents:

• Non-math LaTex style syntax is processed first
• Markdown syntax is processed second
• Math-mode LaTeX is processed last

Additionally, a YAML config defines the core course layout.

## YAML config commands

• CourseTitle
A string that defines the course title.
This title will be used as a generic page title if the output format supports titles.
CourseTitle: "MA123 : Intruduction to elementrary operations"
• Resources
A configuration section that marks the start of course resources.
Resources are course materials that are potentially useful from any course section. They will form top-level links if the output format supports them.
• ResourceName
A string that specifies a resource name.
• ResourceURL
A string that specifies a resource URL.
• FirstCourseDay
A date in the format yyyy-mm-dd that specifies when the course starts.
• LastCourseDay
A date that specifies when the course ends.
• Breaks
A configuration section that marks the start of the break options.
• LastBeforeBreak
A date that specifies when a break begins.
• FirstAfterBreak
A date that specifies when a break ends.

## LaTeX style syntax

• \textInput(x, y)
Defines a text input region. The x and y values define the size of the region in units of em.
• \ifsolution
Begins a solution section. If the solution should be revealed, the commands in this region will be processed.
• \else
Begins a non-solution section.
If the solution should not be shown, the ocmmands in this section will be procesed.
• \fi
Ends a solution section.
• \solutiontrue
Enables solutions for this file.
• \pagebreak
Insert a pagebreak. If the output format supports pagination, a pagebreak is inserted.
• \calendar
Indicates a calendar document. If found, enables calendar keyword processing.
• 
Marks start and end of math mode sections.
• $$and$$
Marks the start and end of inline math mode sections.

## Markdown style syntax

• Session
Marks the start of a learning session in calendar documents.
• due +t
Indicates a due date in calendar documents. The value t indicates the number of days till the item is due.
• sol +t
Indicates a solution reveal date in calendar documents. The value t indicates the number of days till the solution is revealed.
• Rubric
Indicates a rubric table. If followed by a markdown table, the table will be parsed as a rubric if the output format supports it.