question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: showing equations as is

See original GitHub issue

In table header or in description we must write something like σ<sub>y</sub> or σ_$(y) (with custom macros _$) to show variable names like σ_y. If we need to show variable name in macros separately from value - it can’t be passed as is, it’s need to second variable with value like ‘σy’ For equations with fractions/square roots it’s much more difficult. We can use macroses (for example frac$(x;sqrt$(y)+1)), but they can’t be copied as is if values will be required later. I would like to use CalcPad instead of MarkText for engineering notes, but these problems are hindering me.

Is it possible to introduce special syntax “AS IS” for equations? Or special embedded macros AsIs$ at least? Syntax:

x = 2
^^y = x^2 + sqrt(x)'            shows y = x² + √x
^^y = x^2 + sqrt(x) + z'        shows y = x² + √x + z event if z is not defined
^^x_min                         shows xₘᵢₙ
y = x^2 + sqrt(x)'              shows y = x² + √x = 2²+√2 = 5.41

Or embedded macros:

AsIs$(y=x^2+sqrt(x))'           shows y = x² + √x

Syntax ^^ seems to be better.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
csercommented, Aug 24, 2022

@hildebrandopsj The complexity is about the same as that of Markdown, but:

  • after Typora became paid, there were no convenient Markdown editors left
  • you can copy-paste formulas into calculation sheet
  • formulas are still more readable …although with simple tables in markdown it will be more readable
#noc
"Трубы
D_a' - внешний диаметр
D'- внутренний диаметр
c = c_1 + c_2' - суммарная прибавка к толщине стенки
c_1' - сумма прибавок для компенсации допуска на минимальную толщину стенки заготовки и максимального утонения при технологических операциях
c_2' - прибавка для компенсации коррозии и эрозии
s' - номинальная толщина стенки
s_min' - наименьшая отбраковочная толщина (по таблице)
φ_y' - коэффициент прочности продольного сварного шва при растяжении (1 - для бесшовных труб)
'Допускаемое напряжение для сталей в рабочих условиях <p class="ref">[ГОСТ 32388-2013]</p>
'ᅟᅟ'IσI = min(σ_u/2.4; σ_y/1.5)
'Допускаемое напряжение для сталей в условиях испытаний <p class="ref">[ГОСТ 32388-2013]</p>
'ᅟᅟ'IσI_test = σ_y/1.1
'Давление испытаний (при отсутствии в Т.З.) <p class="ref">[ГОСТ 32388-2013, (11.1)]</p>
'ᅟᅟ'p_test ≥ 1.25*p*(IσI_20/IσI)', не менее '0.2MPa
'Расчетная толщина стенки трубы при '(s - c)/D_a ≤ 0.25' по внешнему диаметру
'<p class="ref">[ГОСТ 32388-2013]</p>
'ᅟᅟ's_R = p*D_a/(2*φ_y*IσI + p)
'Допускаемое рабочее давление при 'switch(D ≥ 200mm; (s - c)/D ≤ 0.1; D < 200mm; (s - c)/D ≤ 0.3)' по внутреннему диаметру
'<p class="ref">[ГОСТ 34233.2-2017]</p>
'ᅟᅟ's_R = (p*D)/(2*IσI*φ - p)
'Отбраковочная толщина стенки деталей трубопровода <p class="ref">[ГОСТ 32388-2013]</p>
'ᅟᅟ'IsI = max(s_R + c_1; s_min)
'Допустимое рабочее и испытательное давление при '(s - c)/D_a ≤ 0.25' по внешнему диаметру <p class="ref">[ГОСТ 32388-2013]</p>
'ᅟᅟ'IpI = (2*(s - c)*φ_y*IσI)/(D_a - (s - c))
'ᅟᅟ'IpI_test = (2*(s - c_1)*φ_y*IσI_test)/(D_a - (s - c_1))
'Допускаемое рабочее и испытательное давление при 'switch(D ≥ 200mm; (s - c)/D ≤ 0.1; D < 200mm; (s - c)/D ≤ 0.3)'по внутреннему диаметру <p class="ref">[ГОСТ 34233.2-2017]</p>
'ᅟᅟ'IpI = (2*IσI*φ_p*(s - c))/(D + s - c)
'ᅟᅟ'IpI_test = (2*IσI_test*φ_p*(s - c_1))/(D + s - c_1)
'Проектный выбор номинальной толщины стенки <p class="ref">[ГОСТ 32388-2013]</p>
'ᅟᅟ's ≥ max(s_R + c; s_min + c_2)
'<p class="ref">[ГОСТ 32388-2013]</p>
'Таблица - Наименьшая отбраковочная толщина стенки 's_min
'<table class="bordered">
'<tr><th>'D_a', mm</th><td>≤ 25</td><td>≤ 57</td><td>≤ 114</td><td>≤ 219</td><td>≤ 325</td><td>≤ 377</td><td>> 426</td><tr>
'<tr><th>'s_min', mm</th><td>1.0</td><td>1.5</td><td>2.0</td><td>2.5</td><td>3.0</td><td>3.5</td><td>4.0</td><tr>
'</table>
'Таблица - Допуски на толщину стенки по часто применяемым нормативам     
'<table class="bordered">
'    <tr><th>Стандарт</th><th colspan="2">Толщина стенки</th>
'    <th>Допуск на минимальную толщину стенки</th></tr>
'    <tr><td rowspan="4">ГОСТ 8734-75
'<br/>Трубы стальные бесшовные холоднодеформированные</td>
'        <td colspan="2">'s ≤ 1'</td><td>±0.12мм</td></tr>
'        <tr><td colspan="2">'s ≤ 2.5' и 'D_a ≥ 110'</td><td>±12%</td></tr>
'        <tr><td colspan="2">'s ≤ 5'</td><td>±10%</td></tr>
'        <tr><td colspan="2">'s > 5'</td><td>±8%</td></tr>
'    <tr><td rowspan="6">ГОСТ 8732-78
'<br/>Трубы стальные бесшовные горячедеформированные</td>
'        <td rowspan="3">'D_a ≤ 219'</td>
'            <td>'s ≤ 15'</td><td>повышенная точность: ±12.5%
'<br/>обычная точность: +12.5%-15%</td></tr>
'            <tr><td>'s < 30'</td><td>повышенная точность: +10%-12.5%
'<br/>обычная точность: ±12.5%</td></tr>
'            <tr><td>'s ≥ 30'</td><td>повышенная точность: ±10%
'<br/>обычная точность: +10%-12.5%</td></tr>
'        <tr><td rowspan="3">'D_a > 219'</td>
'            <td>'s ≤ 15'</td><td>+12.5%-15%</td></tr>
'            <tr><td>'s < 30'</td><td>±12.5%</td></tr>
'            <tr><td>'s ≥ 30'</td><td>+10%-12.5%</td></tr>
'    <tr><td rowspan="2">ТУ 14-3Р-124-2012
'<br/>Трубы стальные бесшовные повышенной корозионной стойкочти для обустройства месторождений ОАО «НК «РОСНЕФТЬ»</td>
'        <td colspan="2">'5 < s ≤ 25'</td><td>+15%-12.5%</td>
'        <tr><td colspan="2">'s > 25'</td><td>+3.7 или +10%, -3,0 или -10%, в зависимости от того, что больше</td></tr>
'    <tr><td rowspan="4">ТУ 14-3Р-137-2015
'<br/>Трубы стальные бесшовные хладостойкие для газопроводов, газлифтных систем добычи нефти и обустройства газовых месторождений</td>
'        <td rowspan="2">'D_a ≤ 219'</td>
'            <td>'s ≤ 15'</td><td>категория C: +15.0%-12.5%
'<br/>категория E: ±12.5%</td>
'            <tr><td>'s ≤ 25'</td><td>±12,5%</td></tr>
'        <tr><td rowspan="2">'D_a > 219'</td>
'            <td>'s ≤ 1'</td><td>категория C: +15.0%-12.5%
'<br/>категория E: ±12.5%</td></tr>
'            <tr><td>'s ≤ 25'</td><td>категория C: ±12.5%'
'<br/>категория E: +12.5%-10.0%</td>
'</table>
'<p class="ref">[ГОСТ 8732-78]</p>
'Ряд наружных диаметров труб (* - по договорному сотрудничеству):
'20*    21.3*    22*    25    26.9*    28    30*    31.8*    32    33.7*    35*    38    40*    42    42.4*    44.5*    45    48.3*    50    51*    54    57    60*    60.3*    63.5*    68    70    73    76    82.5*    83    89    95    102    104    108    114    121    127    133    140    146    152    159    165*    168    178*    180    194    203    219    245    273    399    324*    325    351    356*    377    402    406*    426    450    457    (465)    480    500    508*    530    (550)
'<p class="ref">[ГОСТ 8732-78]</p>
'Ряд толщин труб:
'2.6*    2.8    3    3.2*    3.5    4    4.5    5    5.5    6 (6.5)    7    (7.5)    8    (8.5)    9    (9.5)    10    11    12    (13)    14    (15)    16    17    18    (19)    20    22    (24)    25    (26)    28    30    32    (34)    (35)    36    (38)    40    (42)    45    (48)    50    56    60    63    (65)    70    75

The part of view: image

1reaction
Proektsoftbgcommented, Aug 22, 2022

OK, I will remove the variable checks tomorrow, but after I solve the mistery why it skips the first one. Maybe it is a hidden bug that may appear somewhere else, unexpectedly. 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Feature Request] Inline and Display Math : r/UpNote_App
I've found that UpNote supports TeX formulas, which can be inserted using the CTRL+SHIFT+M keyboard shortcut or by enclosing the TeX command in ......
Read more >
Equations in Comments - Feature requests
Would it be possible to enter equations into comments and have them rendered with MathJax (both in MetaPDF and the exported HTML annotations)?...
Read more >
Feature request: Enter formula in report
Any formula manually entered in will display as plain text rather than performing a calculation. I am not sure how the would work,...
Read more >
Requesting Feature for Excel
I want to submit a feature request to Microsoft about allowing users to enlarge/resize the Evaluate Formula dialog box; however, I can't request...
Read more >
Power Up Formulas in SmartSuite [Feature Request] - YouTube
What if we had the ability to render the output of formulas as other SmartSuite fields like single selects, percentages and toggles?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found