-
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
Remove eqN #1778
Comments
This comment has been minimized.
This comment has been minimized.
I have 2 quick questions for @smiths I was fixing the equation labels for this issue, so things like "Equation (3)". I encountered 2 problems. In the factor of safety derivation for the SSP example, what is equation 4 and what is equation 5? Right now I am assuming that equation 4 is the 4th equation listed in the derivation, and likewise the equation 5 is the 5th equation. Secondly, while the pdf version of the generated SRS in my branch matches stable But the tex differs. The reference in the stable SRS is In theory the generated SRS should not match stable, that is the reference to equation 1 should be clickable and be colored red. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I'm joining in this discussion late, but @muhammadaliog3, in answer to your question, (#1778 (comment)), in LaTeX references to equations are not done with href but with a \label, \ref paper. The label is given with the equation and then the the ref will find the equation number. This requires two compilation passes. The equations are also usually automatically numbered in LaTeX. I'm glad you noticed this issue @muhammadaliog3 because the LaTeX for the equations is not proper LaTeX. It could be that, since we generate the documentation, we are also keeping track of the equation numbers, but that won't automatically give us the hyperlinks. |
This comment has been minimized.
This comment has been minimized.
@smiths carrying on from could you give a quick example here about how to create a equation reference, in "not proper latex"? It can be really simple, like F=ma. |
With the end of summer approaching, I have decided to provide a summary of the comments above that have now been marked as resolved, if you wish you may unresolve them, but I have provided a summary of the issue in this comment. Essentially in this issue we want to reference equations. But equations are Expr's, these cannot be referenced in drasil. Our first approach was to make them labelled contents, however contents are probably not the appropiate data type becasue these are used mainly for printing, not knowledge storage/capture. In other words we would change derivations to store the appropiate types, roughly like the following data DerivEqn = DerivEqn Expr | DerivEqn ReferableExpr
data DerivInfo = DerivSentBlock [Sentence] | DerivEqnBlock [DerivEqn]
data Derivation = Derivation Sentence [DerivInfo] @JacquesCarette ultimately decided that the datatype for ReferableExpr to be "a wrapper, potentially thin, around Expr that is more focused than Contents that is referable A referable expression really ought to have a name (aka a UID). One associates a UID to a chunk. So a referable expression should be somewhat akin to a QDefinition, but without the external name (i.e. just the defining expression, without a new external name to assign it to); there's probably something within the hierarchy of chunks that fits that already? That definitely needs to be thoroughly investigated first. " Eventually we reached: " Secondly the problem we encountered was how do we reference equations in latex code, as the "LaTeX for the equations is not proper LaTeX.". This means that when a reference to equations is made, drasil needs to generate the appropiate label (which will most likely be different then regular referencing). Unfortunately, we have not yet decided what referencing label we are going to use |
@muhammadaliog3, with respect to your question above (#1778 (comment)), the way that I do equation referencing in LaTeX is to use a label/ref paper. The equation is given a label, like: |
eqN
is a big hack and should be replaced by an actual reference to the equation block. This means that the equation blocks must beLabelledContent
. This should be done by usingeqUnR
and/or automatically creating a reference for an equation in another helper function.The text was updated successfully, but these errors were encountered: