-
Notifications
You must be signed in to change notification settings - Fork 26
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
Determine Document Outline from Actual Document Contents #946
Comments
The cool thing about this feature (even though it is low priority) is that it would be the first instance where the document processor would examine the structure of the document as part of generating the document itself. I think 😄 . |
This would definitely be a step in the right direction for Drasil. Automating the construction of documentation "roadmaps" would be a nice step forward. We should also have it so that these roadmaps can be turned off completely. Not everyone likes them (looking at you @JacquesCarette). 😄 |
Actually I find it rather exciting that we're getting to the point where stylistic differences can become something we don't need to argue about, we just twiddle the right parameters and voila! everyone's happy. |
Exactly! |
Just a note that I think this will come up while working on Projectile, so it might get added to that project in the future. |
Referencing #1164 here as this is the impetus for that issue. |
I just rediscovered this issue in looking over the double pendulum example, I noticed that the last paragraph of the introduction gives a roadmap of the section that is mostly wrong. It mentions sections that are not included in the documentation, like the purpose section and the characteristics of the intended reader section. In issue #2615 this problem is listed for @cd155. @JacquesCarette, I would like @cd155 to fix the Introduction section by adding the relevant subsections, but it would be nice to finally close this issue. Is the reason it hasn't been closed that it is difficult, or just that we haven't got to it yet? Would this be a good issue for @cd155 to tackle as a means to learn more about Drasil? |
Just that we haven't got to it. It would be a good issue to start digging in to Drasil. |
@cd155, I've assigned this issue to you. It will be a good issue to look into to help you learn Drasil. |
I think I locate the place that makes this happen. The Drasil/code/drasil-docLang/Drasil/Sections/Introduction.hs Lines 66 to 72 in 4b9ad0a
The Drasil/code/drasil-docLang/Drasil/Sections/Introduction.hs Lines 45 to 50 in 4b9ad0a
In the first @JacquesCarette reply,
I am not quite sure how to make the document processor examine the structure of the document. Do you know how to start to make it happens? @balacij @tingyuw |
I think @tingyuw is more knowledgeable in this area (this might also be helpful for her work?), so I think it's best for her to take a look at this first. Have you already taken a look at the |
This is something worth discussing and might be useful in the notebook applications. I think the SRS is supposed to build in the same structure and that's why we have the overview paragraphs which can fit in all examples. I think the changes will be made in the |
Indeed. Right now Drasil/code/drasil-docLang/Drasil/DocumentLanguage/Core.hs Lines 102 to 103 in fb9d573
|
@cd155, I'm not sure how far you've gotten on this, but I think the Table of Contents section generator does something like this - it only displays sections that exist. Its not very well optimized, but it might be worth it to take a look at |
@Ant13731 so far, I haven't started to edit any code yet. Thanks for the tips, I will take look at it when I get there. |
@cd155 I just noticed that the Purpose of Document Section has done something similar. It displays the contents based on the number of given elements. - | Constructor for Purpose of Document subsection. Takes a list of 'Sentence's that:
--
-- * Given one element: explains the purpose of the specific example.
-- * Given two elements: explains the purpose of the specific example and the development process.
-- * Otherwise: Uses the default 'developmentProcessParagraph'.
purposeOfDoc :: [Sentence] -> Section
purposeOfDoc [purposeOfProgram] = SRS.prpsOfDoc [mkParagraph purposeOfProgram] []
purposeOfDoc [purposeOfProgram, developmentProcess] = SRS.prpsOfDoc
[mkParagraph purposeOfProgram, mkParagraph developmentProcess] []
purposeOfDoc _ = SRS.prpsOfDoc [mkParagraph developmentProcessParagraph] [] Not sure if it's the same case, but I think it's worth it to give it a look. |
Example: https://jacquescarette.github.io/Drasil/examples/hghc/SRS/srs/HGHC_SRS.html#Sec:IMs The Solution Characteristics section points to a non-existent Instance Model section. |
Another example of this: DblPendulum, Projectile, and possibly more refer to non-existent likely and unlikely changes. |
As mentioned in #935, Tiny's SSD references an IM section that doesn't exist. Drasil should be updated to "automatically deduce the text for the document "roadmap" from the actual contents/recipe for the document."
The text was updated successfully, but these errors were encountered: