jacquescarette / drasil Goto Github PK
View Code? Open in Web Editor NEWGenerate all the things (focusing on research software)
Home Page: https://jacquescarette.github.io/Drasil
License: BSD 2-Clause "Simplified" License
Generate all the things (focusing on research software)
Home Page: https://jacquescarette.github.io/Drasil
License: BSD 2-Clause "Simplified" License
Drasil does not currently write dollar signs for symbols requiring math mode (such as those with subscripts, Greek letters, etc.)
Luthfi
When Data Definitions are printed in TeX, the symbol is placed in a row called "Label" and the label only appears as part of the Refname row.
In HTML, the row called "Label" displays "DD: " followed by the symbol. The actual label does not appear at all (by label I mean the short name of the data, for example "Heat flux out of coil").
Currently unable to write the logarithm of sth in Expr.
In the PDF file generated from the TeX file, clicking on internal references to theoretical models and data definitions takes you to the beginning of the corresponding section, rather than actually taking you to the model/definition. For example, clicking on a link to T:Lhe (The theoretical model for Latent Heat Energy) will take you to the beginning of the "Theoretical Models" section, rather than the beginning of the actual theoretical model in question.
Would it be possible to add notes to specific items in a table, for example with an asterisk, like in the picture below, without having to type the whole table out manually? Ideally I would want to make tables using mkTable and lambdas, but that's currently not possible if I want to add these notes.
In the TeX file for my manual SRS, \subsubsection*
is used to initialize the derivation sections, so that they can be a separate section with a title, but do not count towards the section numbering. Is there a way for this to be implemented in Drasil?
I can't just make a new Section object for them currently, because they would need to be a subsubsubsection, which isn't possible.
In glassbr_srs -> 6.2.3 Instance Models -> IM2, the relation between LR, GTF, NFL and LSF is like this:
LR = NFL * GTF * LSF.
Currently, the multiplication signs are omitted in the output file, but they are quite meaningful in this case. Otherwise, the equation will look like this: LR = NFLGTFLSF
This might not be an issue at all but I thought I'd mention it just in case. There are some instances in my manual SRS where there is a fraction as part of a paragraph, such as below:
I am currently representing this in Drasil as shown below because I can't find a way to actually print it as a fraction. Representing it as I have is still correct, though, which is why I'm not sure if this is a problem.
Currently unable to write summation symbol with Drasil.
Currently unable to write absolute value bars in Drasil.
When making derived units based on products of other fundamental/derived units, the HTML and TeX printers reverse the symbols.
Changing the lambda expression in the foldr1 to a simple (++) seems to solve the issue.
Luthfi
Currently unable to list bullets within a bullet.
Jingwei
Since the description sections of the Data Definitions are mostly automated, there is currently no way to show the units for each symbol in parentheses following the description for each symbol.
Need to have a way to explicitly add brackets when it is meaningful. For example: k = (i+1)+j.
Currently no way to implement equations with different cases in definitions.
Edit: My typed example didn't format well, so I'll use an image instead. See T_cases (n) in the following image: http://i.stack.imgur.com/jdm47.png
Currently unable to write a Relation with 3 or more Expressions. (e.g. is_safe1 = Pbtol > Pb).
Some of the symbols are unitless. Might need defn for "unitless".
Can we unify how data definitions, theoretical models and instance models are handled in Drasil. Currently the description field of the data definition is automated for data definitions, but not for theoretical models and instanced models. In many cases the content of the description for instance models and theoretical models is just a summary of the variables in the equation or relation.
We should add methods for regression testing of Drasil. The makefiles used in ggk for doing a diff with the "golden" version of the generated file seems like a good model. An e-mail has been sent to Dan with the locations of the makefiles in the mgg repo.
Need to be able to set up config files local to a project (or perhaps even to each recipe). This will allow greater customization of the final output.
Not sure where to start on this.
I have the following equation in my manual SRS:
Which I attempted to code in Drasil with the following code, where items including HTC are the 'h' variables, items including SA are the 'A' variables, and items including htCap are the 'C' variables (I think the rest is self-explanatory, but let me know if anything is unclear):
EqnBlock (Deriv (C temp_W) (C time) := ((C coil_HTC) * (C coil_SA)) /
((C w_mass) * (C htCap_W)) * ((C temp_C) - (C temp_W)) +
((C coil_HTC) * (C coil_SA)) / ((C coil_HTC) * (C coil_SA)) *
((C pcm_HTC) * (C pcm_SA)) / ((C w_mass) * (C htCap_W)) *
((C temp_PCM) - (C temp_W)))
But it ended up looking like this:
The second fraction on the right side of the equation is incorrect. I can get the equation to print out correctly by rearranging the terms in my code and adding some extra brackets like so:
EqnBlock (Deriv (C temp_W) (C time) := ((C coil_HTC) * (C coil_SA)) /
((C w_mass) * (C htCap_W)) * ((C temp_C) - (C temp_W)) +
(((C coil_HTC) * (C coil_SA)) * ((C pcm_HTC) * (C pcm_SA))) /
(((C coil_HTC) * (C coil_SA)) * ((C w_mass) * (C htCap_W))) *
((C temp_PCM) - (C temp_W)))
But since I think the layout of my first attempt was still correct if BEDMAS rules are followed, this might be something that should be looked into. The problem exists in both the TeX and HTML files.
Need to remove the hacks (inferName, firstLetter, repUnd) from RefHelpers and replace them with a better automatic referencing system.
Preferably something that will ensure unique identifiers for each of the TeX/HTML references.
I am having trouble finding out how to start a new paragraph for cases where there are multiple paragraphs in the same section (or subsection, subsubsection, etc.) in the SRS. I tried creating two separate "Paragraph" LayoutObjs but the second one started on the same line as where the first ended, whereas I want it to start on a new, indented line. Is it possible to do that?
@szymczdm Tagging Dan because I am not sure if simply opening an issue alerts anyone.
Brooks
There is currently no way to represent functions in expressions. For example, representing temperature as a function of time by T(t).
I changed from using RelationChunk to EqChunk for the Data Definition Section since I thought I should use the information capture function that Drasil provides. But there'll be a problem if the "Equation" is actually a function. For example, as the screenshot below shows, the description for q̂tol repeats since it appears twice in this Expr.
For this case, should I change it back to RelationChunk since it's more like a relation instead of an equation? Or do we also need to consider about functions in EqChunk and avoid repeating? (We might need to avoid this problem since we want automation for Theoretical Model and Instance Model as well in the end.)
Although an overview of the requirements and design of Drasil is too big a task for the moment, a quick summary of the purpose of each file would be helpful. This could be in the form of a Readme.txt file in each folder.
I require trig functions in some of the equations in my example: sin, cos, tan, sec, csc, cot
Mapping
In the Data Definitions section in "glassbr_srs.pdf" file, there is a relation which is a function that maps from t (nominal thickness) to h (minimum thickness). Details are as follows.
Location: 6.2.4 Data Definitions -> DD1
h = h(t), h(t) = (t = 2.5 => 2.16 | t = 2.7 => 2.59 | t=3.0 => 2.92 | t=4.0 => 3.78 | t=5.0 => 4.57 | t=6.0 => 5.56 | t=8.0 => 7.42 | t=10.0 => 9.02 | t=12.0 => 11.91 | t=16.0 => 15.09 | t=19.0 => 18.26 | t=22.0 => 21.44)
Interpolation
And there are 3 relations which are functions (supposed to be equations, actually using an interpolation algorithm) using their specified parameters. They are listed as follows.
Currently, I can't enter them in Drasil as h = h(t) or q = q(w_TNT, SD) since they can't be a Relation. And the equations used for them might need further discussions.
Commit Drasil.cabal file for ssp example.
Currently you can't reference a theoretical model in the description of another theoretical model, since the theoretical model LayoutObj is defined in the "Body.hs" code and the descriptions for the models are defined in the "Example.hs" code.
This could be fixed just by defining the LayoutObjs for the theoretical models in "Example.hs" instead of "Body.hs", but I'm not sure if that's something we'd be okay with doing?
Currently unable to write the norm symbol (double absolute value bars) in Drasil.
Tables with enough columns will extend past the right margin, as shown below:
It looks to me as if there is enough spacing between the columns that this table could fit within the margins if that spacing were reduced. Even if that's not the case, should the column headers wrap around to multiple lines so that the table can fit within the margins?
This problem only exists for the SRS Doctype, not the HTML files.
I require a way of adding subscripts to the symbols of my defined constants/variables in some circumstances.
For example, a constant/variable is defined with symbol T, but I need to write the equation x = T_i - T_(i-1). Sometimes these are already subscripted, i.e. symbol T_w needs to become T_(w,i).
I have the following table in my SRS, which contains columns for constraints on the variables.
I could make this table with drasil by typing out all of the constraints, but that would be tedious and I think it makes more sense to define the constraints on a variable when you define the variable, so that those constraints can be extracted from the variable using " ^. ".
Drasil should be changed into a library so that projects can simply import it and define their own documents to generate. This will facilitate the work on the various summer projects, without a need for everyone to work directly in the literate-scientific-software repo.
Is there a way to include brackets in expressions (Expr) so that they will appear on the final printed product?
I've tried simply adding the brackets to the expression code, and I've tried using the " :* " operator, but neither method added brackets to the SRS document.
Brooks
Currently unable to write integral symbol with Drasil.
Currently, tables set to False to prevent the table caption from appearing are still considered tables by the table counter in the .tex document. This shifts the numbering for future tables that are set to True.
For example, in my SRS the first three tables do not require a caption, and are therefore set to False. My fourth table does require a caption, but when set to True the caption reads "Table 4: Input Variables" even though it is really only the first table with a caption. I think it should read "Table 1" instead.
Brooks
So that everyone can see their drasil code, we need Jingwei, Brooks and Luthfi to have write access to the git repo. I thought I could add them, but I do not see any part of the interface that lets me add new members. Dan or Jacques, can you please do that?
Currently, there is no way to have in-text citations in Drasil.
I have derivation sections in my SRS which involve displaying equations outside of models or definitions. I've been using the EqnBlock LayoutObj to do this, but EqnBlocks must be formed from Sentences. Does that mean that any of the functionality that has been added or is planned to be added to Expr will not work for EqnBlocks?
For example, in the section of my SRS shown below, those equations involve derivatives. Functionality for displaying derivatives has been added to Expr, but as far as I can tell that functionality won't work here because EqnBlocks are composed of Sentences, not Exprs.
As discussed in the meeting on May 25th, there should be a method for adding quotation marks within a Sentence that will work for both SRS and HTML documents.
Note: I tried using " and this did indeed work for both .tex and HTML, so this might not be a real issue.
As discussed in the meeting on May 25th, there is currently no way to add emphasis to text within Sentences (i.e. boldface, italics).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.