-
Notifications
You must be signed in to change notification settings - Fork 25
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
Experiment with generating an mdBook-based variant of the SRS #3722
Comments
@balacij I like this project, especially if the finished product looks something like the Rust Book example. I like the table of contents on the left-side pane. If the md document looked very similar to our html version of the SRS, we won't have gained very much. Once it works for the SRS, it would be great if we could also get it to work for the Jupyter notebook work that Ting-Yu did. The mdBook seems like a nice format for presenting material for teaching purposes. |
@balacij @smiths I am interested in this project. Are there any existing documentation on SRS rendering/generation that may be helpful in getting started. I understand the first step would be to manually create an example; however, going through the Drasil code for the existing SRS formats, I felt a bit lost. I want to gain a general understanding of SRS generation before going into the project. Also, how feasible does this project sound for a beginner in Haskell, but a quick learner? |
Not that I know of yet, but I'm working on some through the file I presented in our May 6th meeting (#3715). I wouldn't be too worried about being able to understand the Haskell code right now -- there's nothing too fancy in the Haskell code, it's just large and pieces might be far apart from one another. You'll definitely come to understand it along the way. To get a better idea of what (4) would entail, you can look at any of the examples' (e.g., projectile's) SRS section declarations, trace where they're used to build a 'document', trace where said document is used in generation, see how the code generator works at a high level, and then slowly dissect how things work. The packages you'll be most interested in are The steps I provided strays away from the high-level code (where do files go, what are the files, what information goes where) of the existing document generation code in Drasil, but tons of the lower-level code (how I think it's feasible. There's plenty of help around, and, as with all work on Drasil, there will be group activity 🙂 |
Great job with the explanation and all the links @balacij. If @BilalM04 is interested in this project, it feels like a nice worthwhile, but feasible, piece of work. I think it would be a candidate for an end-of-summer poster. 😄 A nice thing about md is that it looks good with an html viewer. Unlike pdf files for the requirements, there is no need to download anything. Someone can just navigate to the file and view it. I could see this becoming our "go to" version of the SRS, replacing the html version as the most convenient. |
Thanks! I never thought about that (it being a candidate for a poster), but it sounds great! I didn't really think about that either (it becoming the "go to" SRS version), but I can definitely see that happening. With the prospective mdBook variant splitting up the SRS into pages, I think we can get really creative with information presentation. For example, if users had to switch pages to look up an acronym, that could be annoying, so we could mitigate that through two ways: (i) showing long-versions of acronyms on first instance for each page, and (ii) adding tooltips to each instance of an acronym (e.g., NASA <- hover your mouse to see the example). Similarly, with references, we can add on-page listings of relevant sources. I'm sure that extends to other things too, like definitions of SRS-relevant words, descriptions of instance models, etc.. That being said, tooltips can probably be added to the existing HTML SRS variant too, but I only thought about this when I thought of the frustration of having to manually navigate between pages to see relevant information, while in a single webpage, I would just hit CTRL+F and search for whatever I needed. |
I (very unprettily) forked the mdBook repo and made a branch ( I also noticed that mdBook's Markdown flavour seems to generate an HTML "stub" for a caption (see the empty <div id="Figure:sysCtxDiag">
<p><img src="../images/SystemContextFigure.png" alt="System Context Figure">
<strong></strong></p><p align="center"><strong>System Context</strong></p><p></p>
</div> |
Brief Progress UpdateCreated a TODO list in the OP of steps that immediately jump out that need to be completed. Checked off the ones I have already completed. Current Task: Generate a single page Markdown SRS. I opted to begin with generating a single page SRS as it is easier for debugging when rendering different components, and once a single page is nicely printed, separating it into different files should not be too difficult. Notes from #3760
UpdateThe current state of the generated SRS can be found here.
Immediate Action Items
|
From #3760, it was decided to keep the table format for definitions, but add a heading using the The two options for headings were:
## Calculation of Landing Time <div style="float: right; color: grey; font-size: 12pt;"><em>IM:calOfLandingTime</em></div>
## Calculation of landing time {#IM:calOfLandingTime} I opted for option 2 as for the longer headings, the refname and title got very close together and it no longer looked nice: My question is how should the headings be aligned? Tables in mdbook are automatically centered in the page. For the smaller tables that don't span the entire width, the headings aligned to the left look odd. But for other tables it looks fine. Aligning headings in the center requires HTML hacks, whereas left aligned can be done in pure markdown (see option 2 above): <h2 id="TM:velocity" align="center">Velocity</h2> Additionally, some headings include Mathjax equations, for example: As a result, the heading tags then need to span across multiple lines for the markdown and mathjax to be rendered: <h2 id="DD:speedIY" align="center">
\\(y\\)-component of initial velocity
</h2> |
@BilalM04 I agree that the centred heading does look nicer. Part of the reason it looks odd for short headings is that the table is centred. If the table was left-justified it might look more natural. If at any point we can't decide how something should look, we could make it a documentation variability and make specifying the formatting value part of the recipe. 😄 |
I agree with @smiths . |
Great progress! Thank you for the update! Generating Also, from the
|
Project Proposal
mdBook is used to build the Rust Book, and it looks pretty good to me. For reference, mdBook...
This project should be fun. Approximately, the steps should be...
Recalling that Markdown is really just a language over HTML, we can (1) reuse our special HTML components in particular. Furthermore, since we have MathJaX support in mdBook, we can (2) reuse our LaTeX renderer.
Project Progress
Development is ongoing by @BilalM04 under the mdBookPrinter branch.
TODO:
The text was updated successfully, but these errors were encountered: