The concept of sections can be a little tricky to wrap your head around. A section is a block of text that adheres to a specific theme or goes together in some way. The most popular kind of section is a chapter, and if you’re writing a novel, this is probably the only kind of section you’ll need.
However, more complex projects like reference manuals or documentation will likely want to subdivide chapters further into different levels of sections, as a way of organizing the content into more easily digestible chunks. For example, this chapter of documentation (the one you’re reading right now!) is split into multiple level 1 sections, and some of those level 1 sections are split into level 2 sections, and so on.
Atlas depends on nested sections in your project in order to create a hierarchical table of contents, both visible to readers, and for devices like the iPad or Kindle to use in their internal navigation systems. This means that if you want those features to work correctly when you build your project, you’ll need to use nested sections to structure your content.
If you’re writing in AsciiDoc or Markdown, then Atlas will take care of adding correctly nested sections based on your headings when you build, with no extra steps needed from you. Proceed normally!
Sections in Atlas can go up to 5 levels deep: Chapter > Section 1 > Section 2 > Section 3 > Section 4.
Sections in the visual editor are clearly delineated by dotted borders--the more borders, the deeper the section is nested. For example, if there are three border lines around a paragraph, then that paragraph is within a section that is three levels deep--most likely a Section 2 within a Section 1 within a Chapter .
The special markup is all happening behind the scenes in the code editor; all you really need to know is that you should use nested sections for your content (as opposed to free-standing headings).
The steps for adding a new section vary depending on what kind of textual element you’re currently editing. Generally, you’ll follow one of these two paths:
Atlas will automatically insert a section at the correct nesting level; for example, if you’re inside a Section 1, Atlas will insert a Section 2; if you’re inside a Section 2, Atlas will insert a Section 3, and so on.
The steps above work great when you’re just working with plain text paragraphs, but sometimes you’ll need to add sections after more complex blocks like notes, sidebars, code blocks, and so on. If you just press Enter, you’ll get a new paragraph inside that block element. To insert a new paragraph after the block, do the following:
If a block element is located at the end of a section, the editor may not allow you to click the + sign to add a new paragraph after that block. To get around this, you’ll need to dive into the HTML behind the scenes:
</div> , </aside> , </pre> , </ul> , or </ol> . (The / means it’s a closing tag, as opposed to an opening tag, which would not have a slash.)<p>Some text.</p>