Technical Documentation - Adding External content to another document with automatic renumbering of chapters and Sections

Dear all,

I have created many chapters and sections and stored them as External document. These chapter and section documents have numbering which starts with 1.

Finally I am using these chapters and sections in another document by using add->External option.

I wanted the chapter and section numbering to get aligned and renumbered based on the destination document.

Currently, when I insert the content (add->External), in the destination document, I am seeing each document getting inserted with Chapter and Section numbering as 1 and 1.1.

I want 1, 1.1 and 2, 2.1, etc.....

I don't know how to achieve this.

Please help.

Parents
  • I am able to get the incremental numbering when I insert external content with chapter and section. However, I want to insert external content only at section level which I am not able to do. Is it possible (or) is it something unrealistic? Please clarify

  • It definitely should be possible. The standard Aras samples use chapters and sections. I don´t use the chapters, just sections only. When you mention that numbering for external content is correct when you use chapters, have you looked at the CSS used for the chapters already? You should be able to reuse the settings for the sections elements.

  • 0 オフライン in reply to AngelaIp

    Thanks for your response. The problem I face is, after inserting as external content; if I want to go and insert any section underneath chapter, I am not able to do. Below is the CSS used by me.

    Appreciate your help here.

    Can you explain me with your CSS how you are able to achieve just for the sections only? I can draw some comparison with that.

    /* Counter reset for Section and Figure Numbering used inside the technical document */

    body {
    counter-reset: sectionNum; /* Counter used for Chapter / Section numbering */
    counter-reset: figNum; /* Counter used for Graphic Label numbering */
    text-align: left;
    font-size: 11px;
    color: #005eb8;
    }

    /* Configures the counters used for Chapters and Sections */

    .Chapter, .Section, .Sub-Section {
    counter-increment: sectionNum;
    }

    .Chapter > .Title::before, .Section > .Title::before, .Sub-Section > .Title::before {
    content: counters(sectionNum, '.') ' ';
    }

    .Chapter .Chapter, .Chapter .Section, .Section .Section, .Sub-Section .Sub-Section, .Section .Sub-Section, .Section .Chapter, .Sub-Section .Section {
    counter-reset: sectionNum;
    }

    .XmlSchemaElement[by-reference="external"] > .Chapter, .XmlSchemaElement[by-reference="external"] > .Section,
    .XmlSchemaElement[by-reference="external"] > .Sub-Section {
    counter-reset: none;
    }

    .Chapter .XmlSchemaElement[by-reference="external"] ~ .XmlSchemaElement[by-reference="external"],
    .Section .XmlSchemaElement[by-reference="external"] ~ .XmlSchemaElement[by-reference="external"],
    .Sub-Section .XmlSchemaElement[by-reference="external"] ~ .XmlSchemaElement[by-reference="external"] {
    counter-reset: none;
    }

    /* This work-around is required to reset the counter in sub Sections and Chapters */

    .Chapter .Chapter ~ .Chapter, .Section .Section ~ .Section, .Chapter .Section ~ .Section, .Chapter .Section ~ .Chapter, .Chapter .Chapter ~ .Section, .Sub-Section .Sub-Section ~ .Sub-Section, .Section .Sub-Section ~ .Sub-Section, .Chapter .Section ~ .Sub-Section,
    .Chapter .ArasBlockXmlSchemaElement .Chapter, .Chapter .ArasBlockXmlSchemaElement .Section, .Section .ArasBlockXmlSchemaElement .Sub-Section, .Sub-Section .ArasBlockXmlSchemaElement .Sub-Section {
    counter-reset: none;
    }

  • Some questions first:

    1. Can you quick describe the final structure you use in your final document? What structure are users supposed to use? Chapter --> Section --> Sub-Section --> Sub-Section? 

    2. Or do you use Chapters and Sections on parallel levels? 

    3. Do you use a TOC or something else? In certain cases these often block renumbering.

  • 0 オフライン in reply to AngelaIp

    Thank you once again.

    1. Yes, my document structure consists of Chapter -> Section -> Sub-Section -> Sub-Section.

    2. In addition to above, I use Chapters and sections on parallel levels as well (Ex: please see below)

    3. Yes, I use TOC only and I have no problem with that.

    Please note that here, I am saving Chapter 1 as separate external content, Chapter 2 as separate, Section 2.1 as separate, Sub-Section 2.2.1 as separate content and so on.

    When I try to build my document by using add-> External content with all these individual chapter, section and sub-section contents, first I insert chapter 1.It comes by default as Chapter 1.

    Next I go and add->External content and insert Chapter 2, this time am getting numbering as 1 again.

    After this I want to add Section 2.1 underneath it which I am not able to do (since when I add external content for Section 2.1, it again goes with numbering 1).

  • Thanks for the overview! Still need to know one question first. In your current sample document, do you already use a TOC? Because if the answer it yes, you will need an additional counter-reset otherwise embedded Documents would lead to exactly the described behavior. 

Reply Children
  • 0 オフライン in reply to AngelaIp

    Yes, I do use a TOC in my existing document. Please see below CSS for the same.

    /* Style rules for Table of Contents */

    .TOC-Section> .Title
    {
    font-size: 20px;
    color: #005eb8;
    margin-bottom: 5px;
    padding: 0px;
    }

    .TOC {
    margin-top: 5px;
    font-size: 11px;
    font-style: normal;
    color: #005eb8;
    margin-bottom: 5px;
    padding: 0px;
    }

    /* This rule will embed a temporary string for TOC Item there are no target Elements in the document*/
    .TOC:empty:after {
    content: 'Source elements for Table of Contents were not found..';
    opacity: 0.5;
    }

    /* Padding/margin applied to each level in the TOC */
    .TOC-Item {
    padding: 0 0 0 5px;
    }

    /* This rule will separate all first level TOC Items */
    .TOC-Item[level='0'] {
    margin-top: 3px;
    }

    /* These rules will specify an indent for each level of TOC Items */
    .TOC-Item[level='1'] {
    padding-left: 1em;
    }

    .TOC-Item[level='2'] {
    padding-left: 2em;
    }

    .TOC-Item[level='3'] {
    padding-left: 3em;
    }

    .TOC-Item[level='4'] {
    padding-left: 4em;
    }

    .TOC-Item[level='5'] {
    padding-left: 5em;
    }

    .TOC-Item[level='6'] {
    padding-left: 6em;
    }

    .TOC-Item[level='7'] {
    padding-left: 7em;
    }

    .TOC-Item[level='8'] {
    padding-left: 8em;
    }

    .TOC-Item[level='9'] {
    padding-left: 9em;
    }

    .TOC-Item[level='10'] {
    padding-left: 10em;
    }

    /* Style for TOC Item Text */
    .TOC-Item span {
    font-weight: normal;
    color: #005eb8 !important;
    text-decoration: none !important;
    }

  • Mixed up a few things. Not TOC can lead to trouble, but embedded sections.

    Can you confirm this one: When an external TechDoc (with sections) is added before a regular internal Section, the Section numbering will not continue.

    But: As soon as you use a regular internal Section BEFORE the embedded document, numbering will be correct. This would indicate the TechDoc glitch I have faced. 

    I solved it by a counter-reset at the beginning of the document. I used .TOC-Section for this one, cause the TOC is a reliable element on the beginning of each document. So in my case TOC was not the problem, but part of the solution. For example you could use something like this:

    .TOC-Section {
      counter-reset: sectionNum;
    }

  • 0 オフライン in reply to AngelaIp

    Oh yes, I too faced the same technical glitch and used counter reset for TOC.

    But the problem I have in my document structure (as shown above); after inserting external content with chapter 1, chapter 2.

    Now I want to insert external content but it should be Section 2.1. How can I achieve this? Because now, when I insert, its treating as new chapter and incrementing to 3 (what I need is Sec 2.1).

  • 0 オフライン in reply to pnataraj03

    I forgot to mention, in my entire document I intend to use only external content to build my complete document (starting from Introduction). 

  • Thanks for the insights! We use an similar setup for using a many external content as possible. In my case I only use multi-level "Sections"  so I am not sure if my solution will work for you the same way.

    This one in your CSS is strange:

    .Chapter .Chapter, .Chapter .Section, .Section .Section, .Sub-Section .Sub-Section, .Section .Sub-Section, .Section .Chapter, .Sub-Section .Section {
    counter-reset: sectionNum;
    }

    You reset the counter for "Chapter->Section", but also for "Section->Chapter". I would leave ".Section .Chapter" away. And ".Sub-Section .Section" also. I am not 100% sure. But for me it looks like you freely allow mixing the structures. And than you are surprised that your counter feels lost :-). 

    The main reason why I don´t use chapters and sub-sections is simply that it´s confused me too many times. You can achieve the same results without them. This way don´t have to take care for their "name", but only for their "levels".

    Some off topic questions:

    1. I see that you use Abbreviations. Is this something users fill manually or is this one automated? I plan to build an add-on where users can mark certain works and then the List of abbreviations will be filled AND completed with the explaining texts automatically. 

    2. Do you use custom tables? The standard tables are to complicated to use from my POV. Made some drafts to make it more end-user friendly, but haven´t finished it yet.

    Maybe we can exchange a few ideas outside this forum. The current discussion shows mainly code that is included by Aras samples. But I don´t want to share high-custom stuff with the "community of thieves".