Skip to content

Commit

Permalink
Update README.md: update comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgio committed Aug 21, 2024
1 parent d229970 commit c00c026
Showing 1 changed file with 59 additions and 36 deletions.
95 changes: 59 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,38 +64,6 @@ Built with Quarkdown itself — <a href="demo/demo.qmd" target="_blank"><strong>
&nbsp;
## Installation
Download `quarkdown.zip` from the [releases](https://github.com/iamgio/quarkdown/releases) page or build it yourself with `gradlew distZip`, and unzip it.
If you'd rather keep it minimal, `gradlew build` produces only the JAR file.
The `bin` directory contains the executable scripts. Optionally, add it to your `PATH` to access Quarkdown more easily.
Java 17 or higher is required.
## Getting started
Running the program with no command-line arguments runs it in REPL mode. This is great for familiarizing yourself with Quarkdown, but it's probably not what you're looking for.
Running `quarkdown path-to-file.qmd` will compile the given file, save the output to file and log its content.
If the project is composed by multiple source files, the target file must be the root one, i.e. the one that includes the other files.
> [!NOTE]
> The `qmd` extension is conventionally the standard one, but any can be used.
**Options:**
- **`-o <dir>`** or **`--output <dir>`**: sets the directory of the output files. If unset, defaults to `./output`.
- **`--pretty`**: produces pretty output code. This is useful for debugging or to read the output code more easily,
but it should be disabled in production as the results might be visually affected.
- **`--clean`**: deletes the content of the output directory before producing new files. Destructive operation.
- **`--strict`**: forces the program to exit if an error occurs. When not in strict mode, errors are shown as boxes in the document.
- **`-Dloglevel=<level>`** (JVM property): sets the log level. If set to `warning` or higher, the output content is not printed out.
## Comparison
| | Markdown | LaTeX | Quarkdown |
Expand All @@ -116,21 +84,41 @@ If the project is composed by multiple source files, the target file must be the
<td>
```latex
\tableofcontents
\section{Section}
\subsection{Subsection}
\begin{enumerate}
\item \textbf{First} item
\item \textbf{Second} item
\end{itemize}
\begin{center}
This text is \textit{centered}.
\end{center}
\begin{figure}[!h]
\centering
\begin{subfigure}[b]
\includegraphics[width=0.3\linewidth]{img1.png}
\end{subfigure}
\begin{subfigure}[b]
\includegraphics[width=0.3\linewidth]{img2.png}
\end{subfigure}
\begin{subfigure}[b]
\includegraphics[width=0.3\linewidth]{img3.png}
\end{subfigure}
\end{figure}
```
</td>
<td>

```markdown
.tableofcontents

# Section

## Subsection
Expand All @@ -140,13 +128,52 @@ If the project is composed by multiple source files, the target file must be the

.center
This text is _centered_.

.row alignment:{spacebetween}
![Image 1](img1.png)

![Image 2](img2.png)

![Image 3](img3.png)
```

</td>
</tr>
</tbody>
</table>

## Installation

Download `quarkdown.zip` from the [releases](https://github.com/iamgio/quarkdown/releases) page or build it yourself with `gradlew distZip`, and unzip it.
If you'd rather keep it minimal, `gradlew build` produces only the JAR file.

The `bin` directory contains the executable scripts. Optionally, add it to your `PATH` to access Quarkdown more easily.

Java 17 or higher is required.

## Getting started

Running the program with no command-line arguments runs it in REPL mode. This is great for familiarizing yourself with Quarkdown, but it's probably not what you're looking for.

Running `quarkdown path-to-file.qmd` will compile the given file, save the output to file and log its content.
If the project is composed by multiple source files, the target file must be the root one, i.e. the one that includes the other files.

> [!NOTE]
> The `qmd` extension is conventionally the standard one, but any can be used.
**Options:**

- **`-o <dir>`** or **`--output <dir>`**: sets the directory of the output files. If unset, defaults to `./output`.

- **`--pretty`**: produces pretty output code. This is useful for debugging or to read the output code more easily,
but it should be disabled in production as the results might be visually affected.

- **`--clean`**: deletes the content of the output directory before producing new files. Destructive operation.

- **`--strict`**: forces the program to exit if an error occurs. When not in strict mode, errors are shown as boxes in the document.

- **`-Dloglevel=<level>`** (JVM property): sets the log level. If set to `warning` or higher, the output content is not printed out.

## Targets

HTML is currently the only supported rendering target. LaTeX rendering is a future goal.
Expand All @@ -160,10 +187,6 @@ The desired document type can be set by calling the `.doctype` function within t
- `.doctype {slides}`
- `.doctype {paged}`

> [!TIP]
> If not set via the command line argument `--out <dir>` or `-o <dir>`,
> output files are saved into the `output` directory by default.
## Scripting

<details>
Expand Down

0 comments on commit c00c026

Please sign in to comment.