Skip to content

Commit

Permalink
Updating GlassBR HTML stable to use mathjax
Browse files Browse the repository at this point in the history
  • Loading branch information
danscime committed Aug 7, 2019
1 parent e2e70d3 commit b8481f3
Showing 1 changed file with 40 additions and 161 deletions.
201 changes: 40 additions & 161 deletions code/stable/glassbr/Website/GlassBR_SRS.html
Original file line number Diff line number Diff line change
Expand Up @@ -770,11 +770,7 @@ <h3>Theoretical Models</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>is-safeProb = P<sub>f</sub>&thinsp;&lt;&thinsp;P<sub>ftol</sub></em>
</div>
</td>
<td>$$is-safeProb={P_{\text{f}}}<{P_{\text{f}\text{tol}}}$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down Expand Up @@ -826,11 +822,7 @@ <h3>Theoretical Models</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>is-safeLoad = capacity&thinsp;&gt;&thinsp;Load</em>
</div>
</td>
<td>$$is-safeLoad=capacity>Load$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down Expand Up @@ -903,12 +895,7 @@ <h3>Data Definitions</h3>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>B = <div class="fraction">
<span class="fup">k</span>
<span class="fdn">(a&#8239;b)<sup>m&minus;1</sup></span>
</div>&#8239;(E&#8239;h<sup>2</sup>)<sup>m</sup>&#8239;LDF&#8239;e<sup>J</sup></em>
</div>
$$B=\frac{k}{\left(a b\right)^{m-1}} \left(E h^{2}\right)^{m} LDF e^{J}$$
</td>
</tr>
<tr>
Expand Down Expand Up @@ -990,50 +977,20 @@ <h3>Data Definitions</h3>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>h = <div class="fraction">
<span class="fup">1</span>
<span class="fdn">1000</span>
</div>&#8239;<span class="casebr">{</span>
<div class="cases">
<span>
2.16 , <span class="case">t = 2.5</span>
</span>
<span>
2.59 , <span class="case">t = 2.7</span>
</span>
<span>
2.92 , <span class="case">t = 3.0</span>
</span>
<span>
3.78 , <span class="case">t = 4.0</span>
</span>
<span>
4.57 , <span class="case">t = 5.0</span>
</span>
<span>
5.56 , <span class="case">t = 6.0</span>
</span>
<span>
7.42 , <span class="case">t = 8.0</span>
</span>
<span>
9.02 , <span class="case">t = 10.0</span>
</span>
<span>
11.91 , <span class="case">t = 12.0</span>
</span>
<span>
15.09 , <span class="case">t = 16.0</span>
</span>
<span>
18.26 , <span class="case">t = 19.0</span>
</span>
<span>
21.44 , <span class="case">t = 22.0</span>
</span>
</div></em>
</div>
$$h=\frac{1}{1000} \begin{cases}
2.16, & t=2.5\\
2.59, & t=2.7\\
2.92, & t=3.0\\
3.78, & t=4.0\\
4.57, & t=5.0\\
5.56, & t=6.0\\
7.42, & t=8.0\\
9.02, & t=10.0\\
11.91, & t=12.0\\
15.09, & t=16.0\\
18.26, & t=19.0\\
21.44, & t=22.0
\end{cases}$$
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1091,15 +1048,7 @@ <h3>Data Definitions</h3>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>LDF = (<div class="fraction">
<span class="fup">t<sub>d</sub></span>
<span class="fdn">60</span>
</div>)<sup><div class="fraction">
<span class="fup">m</span>
<span class="fdn">16</span>
</div></sup></em>
</div>
$$LDF=\left(\frac{{t_{\text{d}}}}{60}\right)^{\frac{m}{16}}$$
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1158,11 +1107,7 @@ <h3>Data Definitions</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>J = interpZ("SDF.txt",AR,q&#770;)</em>
</div>
</td>
<td>$$J=interpZ\left(\text{``SDF.txt''},AR,\hat{q}\right)$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down Expand Up @@ -1225,14 +1170,7 @@ <h3>Data Definitions</h3>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>NFL = <div class="fraction">
<span class="fup">
q&#770;<sub>tol</sub>&#8239;E&#8239;h<sup>4</sup>
</span>
<span class="fdn">(a&#8239;b)<sup>2</sup></span>
</div></em>
</div>
$$NFL=\frac{{\hat{q}_{\text{tol}}} E h^{4}}{\left(a b\right)^{2}}$$
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1301,14 +1239,11 @@ <h3>Data Definitions</h3>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>GTF = <span class="casebr">{</span>
<div class="cases">
<span>1 , <span class="case">g = "AN"</span></span>
<span>4 , <span class="case">g = "FT"</span></span>
<span>2 , <span class="case">g = "HS"</span></span>
</div></em>
</div>
$$GTF=\begin{cases}
1, & g=\text{``AN''}\\
4, & g=\text{``FT''}\\
2, & g=\text{``HS''}
\end{cases}$$
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1365,14 +1300,7 @@ <h3>Data Definitions</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>q&#770; = <div class="fraction">
<span class="fup">q&#8239;(a&#8239;b)<sup>2</sup></span>
<span class="fdn">E&#8239;h<sup>4</sup>&#8239;GTF</span>
</div></em>
</div>
</td>
<td>$$\hat{q}=\frac{q \left(a b\right)^{2}}{E h^{4} GTF}$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down Expand Up @@ -1449,9 +1377,7 @@ <h3>Data Definitions</h3>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>q&#770;<sub>tol</sub> = interpY("SDF.txt",AR,J<sub>tol</sub>)</em>
</div>
$${\hat{q}_{\text{tol}}}=interpY\left(\text{``SDF.txt''},AR,{J_{\text{tol}}}\right)$$
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1513,21 +1439,7 @@ <h3>Data Definitions</h3>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>J<sub>tol</sub> = ln(ln(<div class="fraction">
<span class="fup">1</span>
<span class="fdn">
1&minus;P<sub>btol</sub>
</span>
</div>)&#8239;<div class="fraction">
<span class="fup">
(a&#8239;b)<sup>m&minus;1</sup>
</span>
<span class="fdn">
k&#8239;(E&#8239;h<sup>2</sup>)<sup>m</sup>&#8239;LDF
</span>
</div>)</em>
</div>
$${J_{\text{tol}}}=\ln\left(\ln\left(\frac{1}{1-{P_{\text{b}\text{tol}}}}\right) \frac{\left(a b\right)^{m-1}}{k \left(E h^{2}\right)^{m} LDF}\right)$$
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1609,9 +1521,7 @@ <h3>Data Definitions</h3>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>SD = &radic;(SD<sub>x</sub><sup>2</sup>&plus;SD<sub>y</sub><sup>2</sup>&plus;SD<sub>z</sub><sup>2</sup>)</em>
</div>
$$SD=\sqrt{{SD_{\text{x}}}^{2}+{SD_{\text{y}}}^{2}+{SD_{\text{z}}}^{2}}$$
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1666,14 +1576,7 @@ <h3>Data Definitions</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>AR = <div class="fraction">
<span class="fup">a</span>
<span class="fdn">b</span>
</div></em>
</div>
</td>
<td>$$AR=\frac{a}{b}$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down Expand Up @@ -1730,9 +1633,7 @@ <h3>Data Definitions</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation"><em>w<sub>TNT</sub> = w&#8239;TNT</em></div>
</td>
<td>$${w_{TNT}}=w TNT$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down Expand Up @@ -1781,11 +1682,7 @@ <h3>Data Definitions</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>P<sub>b</sub> = 1&minus;e<sup>&minus;B</sup></em>
</div>
</td>
<td>$${P_{\text{b}}}=1-e^{-B}$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down Expand Up @@ -1843,9 +1740,7 @@ <h3>Data Definitions</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation"><em>LR = NFL&#8239;GTF&#8239;LSF</em></div>
</td>
<td>$$LR=NFL GTF LSF$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down Expand Up @@ -1902,11 +1797,7 @@ <h3>Data Definitions</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>q = interpY("TSD.txt",SD,w<sub>TNT</sub>)</em>
</div>
</td>
<td>$$q=interpY\left(\text{``TSD.txt''},SD,{w_{TNT}}\right)$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down Expand Up @@ -1980,12 +1871,8 @@ <h3>Instance Models</h3>
<tr>
<th>Input Constraints</th>
<td>
<div class="equation">
<em>P<sub>b</sub>&thinsp;&gt;&thinsp;0</em>
</div>
<div class="equation">
<em>P<sub>btol</sub>&thinsp;&gt;&thinsp;0</em>
</div>
$${P_{\text{b}}}>0$$
$${P_{\text{b}\text{tol}}}>0$$
</td>
</tr>
<tr>
Expand All @@ -1994,11 +1881,7 @@ <h3>Instance Models</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>is-safePb = P<sub>b</sub>&thinsp;&lt;&thinsp;P<sub>btol</sub></em>
</div>
</td>
<td>$$is-safePb={P_{\text{b}}}<{P_{\text{b}\text{tol}}}$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down Expand Up @@ -2061,8 +1944,8 @@ <h3>Instance Models</h3>
<tr>
<th>Input Constraints</th>
<td>
<div class="equation"><em>LR&thinsp;&gt;&thinsp;0</em></div>
<div class="equation"><em>q&thinsp;&gt;&thinsp;0</em></div>
$$LR>0$$
$$q>0$$
</td>
</tr>
<tr>
Expand All @@ -2071,11 +1954,7 @@ <h3>Instance Models</h3>
</tr>
<tr>
<th>Equation</th>
<td>
<div class="equation">
<em>is-safeLR = LR&thinsp;&gt;&thinsp;q</em>
</div>
</td>
<td>$$is-safeLR=LR>q$$</td>
</tr>
<tr>
<th>Description</th>
Expand Down

7 comments on commit b8481f3

@JacquesCarette
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GlassBR really benefited quite a lot from this. Though is-safeLR seems like it ought to be a LABEL rather than a VARIABLE ? Whole words shouldn't be 'raw' inside $$.

@smiths
Copy link
Collaborator

@smiths smiths commented on b8481f3 Aug 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JacquesCarette, I think the problem with is-safe is similar to the formatting problem we discussed for subscripts and superscripts (#1639, #1750). It is a variable, but formatting it as a variable using the usual LaTeX conventions will lead to something that is spaced incorrectly. Variables that use "words" are not that uncommon. When it comes up in my writing, I use $\mathit{is-safeLR}$. Could we do that here?

@JacquesCarette
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer $\mathsf{is-safeLR}$ myself. But that ought to be a meta-choice. What is needed is to 'encode' that some variables are 'full words' rather than essentially-single-letter. Then the display mechanism (i.e. printer) can use that information to choose different ways of displaying those.

So we have Variable and Label, we probably need LongVariable too. Semantically it's still a variable, but it can be displayed differently. @samm82 implemented the first split, so perhaps this tweak is easiest for him?

@samm82
Copy link
Collaborator

@samm82 samm82 commented on b8481f3 Aug 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the distinction between a Variable and a LongVariable? ie. which one would min or final be? Should Label and Variable only be used to modify a symbol (ie. as subscripts), while LongVariable would function as the "base" of a symbol?

@smiths
Copy link
Collaborator

@smiths smiths commented on b8481f3 Aug 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JacquesCarette, I use \mathit{} for variables, because of the convention that variables should be italics, but my (very) limited research shows that others do not stick to this. I believe Bill Farmer uses the same sans serif font idea that you use. I agree that this should be something that the user can decide.

@samm82, long variables are variables that are more than one character long.

@samm82
Copy link
Collaborator

@samm82 samm82 commented on b8481f3 Aug 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, wouldn't it make more sense to just have the printer use mathsf if the string associated with the Variable is more than one character and not add the LongVariable constructor?

@JacquesCarette
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I think there are 2-3 character variables that we can display 'normally'. As long as the italics ligatures are weird for any of the letters...

Please sign in to comment.