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

paragraph ends (sub)section #83

Open
martinra opened this issue Apr 23, 2023 · 0 comments
Open

paragraph ends (sub)section #83

martinra opened this issue Apr 23, 2023 · 0 comments

Comments

@martinra
Copy link
Contributor

A paragraph node at the moment ends any preceding variation of section nodes. Paragraphs, however, I think are an independent subdivision of text, i.e., it is correct to have a section with some paragraphs, then subsections with further paragraphs etc.

For example,

\documentclass{article}

\begin{document}

\section{S}
\paragraph{P}
\subsection{SS}
\paragraph{P}
\subsection{SS}

\end{document}

yields (using TSPlayground)

class_include [0, 0] - [0, 23]
  path: curly_group_path [0, 14] - [0, 23]
    path: path [0, 15] - [0, 22]
generic_environment [2, 0] - [10, 14]
  begin: begin [2, 0] - [2, 16]
    name: curly_group_text [2, 6] - [2, 16]
      text: text [2, 7] - [2, 15]
        word: word [2, 7] - [2, 15]
  section [4, 0] - [5, 13]
    text: curly_group [4, 8] - [4, 11]
      text [4, 9] - [4, 10]
        word: word [4, 9] - [4, 10]
    paragraph [5, 0] - [5, 13]
      text: curly_group [5, 10] - [5, 13]
        text [5, 11] - [5, 12]
          word: word [5, 11] - [5, 12]
  subsection [6, 0] - [7, 13]
    text: curly_group [6, 11] - [6, 15]
      text [6, 12] - [6, 14]
        word: word [6, 12] - [6, 14]
    paragraph [7, 0] - [7, 13]
      text: curly_group [7, 10] - [7, 13]
        text [7, 11] - [7, 12]
          word: word [7, 11] - [7, 12]
  subsection [8, 0] - [8, 15]
    text: curly_group [8, 11] - [8, 15]
      text [8, 12] - [8, 14]
        word: word [8, 12] - [8, 14]
  end: end [10, 0] - [10, 14]
    name: curly_group_text [10, 4] - [10, 14]
      text: text [10, 5] - [10, 13]
        word: word [10, 5] - [10, 13]

In this example, the subsections (including the paragraphs they contain) should appear one level lower in the tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant