Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more test cases #13

Open
WGUNDERWOOD opened this issue Aug 31, 2024 · 2 comments
Open

Add more test cases #13

WGUNDERWOOD opened this issue Aug 31, 2024 · 2 comments
Labels
good first issue Good for newcomers testing Improvements to test cases

Comments

@WGUNDERWOOD
Copy link
Owner

More test cases are always appreciated, to ensure that tex-fmt is behaving correctly, to understand the performance on different documents, and to prevent regressions.

@WGUNDERWOOD WGUNDERWOOD added the testing Improvements to test cases label Aug 31, 2024
@WGUNDERWOOD WGUNDERWOOD added the good first issue Good for newcomers label Sep 26, 2024
@cdesaintguilhem
Copy link
Contributor

Hi, I noticed that the current version doesn't look at sectioning commands.

For example, the following snippet:

\section{Introduction}

If a sectioning command is on the first line, it should remain there.
\subsection{Related Works}
However, a sectioning command in the middle of the file should have an empty line before it.
Also, these commands should be on their own line.\subsection{Our Contributions}And another.\subsection{Outline}

\section{Preliminaries}
However a well-formatted sectioning command should not move.

only gets line-wrapped into:

\section{Introduction}

If a sectioning command is on the first line, it should remain there.
\subsection{Related Works}
However, a sectioning command in the middle of the file should have
an empty line before it.
Also, these commands should be on their own line.\subsection{Our
Contributions}And another.\subsection{Outline}

\section{Preliminaries}
However a well-formatted sectioning command should not move.

Whereas it should perhaps be formatted to:

\section{Introduction}

If a sectioning command is on the first line, it should remain there.

\subsection{Related Works}
However, a sectioning command in the middle of the file should have
an empty line before it.
Also, these commands should be on their own line.

\subsection{Our Contributions}
And another.

\subsection{Outline}

\section{Preliminaries}
However a well-formatted sectioning command should not move.

If this would be a useful test to include, I could make a PR into develop with the corresponding .tex documents.

@WGUNDERWOOD
Copy link
Owner Author

Thanks for this! I agree that commands such as \section{} should go on their own line, so I would be happy to look into an implementation of this. However I think we should not insert extra blank lines, as this may disturb other formatting in the document. For example, sometimes such blank lines may contain a single comment symbol %.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers testing Improvements to test cases
Projects
None yet
Development

No branches or pull requests

2 participants