documentation: Show the correct index for constants and equations

For constant and equations menus, match the index in the help file.

Fixes: #1039
Fixes: #1048

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
Christophe de Dinechin 2024-07-29 00:39:48 +02:00
parent 0f51b08e66
commit fc1dace26d
6 changed files with 46 additions and 29 deletions

View file

@ -4,7 +4,7 @@ The DB48X calculator features a library of constants covering mathematics,
physics, chemistry and computer science. The built-in constants can be extended
using the `config/constants.csv` configuration file.
## Mathematical constants
## Mathematics constants
### π constant
@ -345,26 +345,26 @@ logarithmic quantity, most often expressed in decibels dB. I0 is the sound
intensity used as a reference, corresponding to 0dB.
## Dates
## Dates Constants
### BastilleDay
### BastilleDay constant
French national day
### MartinLutherKingDeath
### MartinLutherKingDeath constant
Martin Luther King Jr., an African-American clergyman and civil rights movement
leader, was fatally shot at the Lorraine Motel in Memphis, Tennessee, on April
4, 1968, at 6:01 p.m.
### IndependenceDay
### IndependenceDay constant
Independence Day, known colloquially as the Fourth of July, is a federal holiday
in the United States which commemorates the ratification of the Declaration of
Independence by the Second Continental Congress on July 4, 1776, establishing
the United States of America.
## Computing-related constants
## Computing constants
### No constant

View file

@ -42,6 +42,12 @@ relative to the loads.
* Internal bending moment is positive counterclockwise on the left-hand part.
* Shear force is positive downward on the left-hand part.
### Elastic Buckling
These equations apply to a slender column (`K·L/r>100`) with length factor `K`.
![Elastic Buckling](img/ElasticBuckling.bmp)
## Electricity

View file

@ -4564,7 +4564,7 @@ The DB48X calculator features a library of constants covering mathematics,
physics, chemistry and computer science. The built-in constants can be extended
using the `config/constants.csv` configuration file.
## Mathematical constants
## Mathematics constants
### π constant
@ -4905,26 +4905,26 @@ logarithmic quantity, most often expressed in decibels dB. I0 is the sound
intensity used as a reference, corresponding to 0dB.
## Dates
## Dates Constants
### BastilleDay
### BastilleDay constant
French national day
### MartinLutherKingDeath
### MartinLutherKingDeath constant
Martin Luther King Jr., an African-American clergyman and civil rights movement
leader, was fatally shot at the Lorraine Motel in Memphis, Tennessee, on April
4, 1968, at 6:01 p.m.
### IndependenceDay
### IndependenceDay constant
Independence Day, known colloquially as the Fourth of July, is a federal holiday
in the United States which commemorates the ratification of the Declaration of
Independence by the Second Continental Congress on July 4, 1776, establishing
the United States of America.
## Computing-related constants
## Computing constants
### No constant
@ -4997,6 +4997,12 @@ relative to the loads.
* Internal bending moment is positive counterclockwise on the left-hand part.
* Shear force is positive downward on the left-hand part.
### Elastic Buckling
These equations apply to a slender column (`K·L/r>100`) with length factor `K`.
![Elastic Buckling](img/ElasticBuckling.bmp)
## Electricity

View file

@ -4564,7 +4564,7 @@ The DB50X calculator features a library of constants covering mathematics,
physics, chemistry and computer science. The built-in constants can be extended
using the `config/constants.csv` configuration file.
## Mathematical constants
## Mathematics constants
### π constant
@ -4905,26 +4905,26 @@ logarithmic quantity, most often expressed in decibels dB. I0 is the sound
intensity used as a reference, corresponding to 0dB.
## Dates
## Dates Constants
### BastilleDay
### BastilleDay constant
French national day
### MartinLutherKingDeath
### MartinLutherKingDeath constant
Martin Luther King Jr., an African-American clergyman and civil rights movement
leader, was fatally shot at the Lorraine Motel in Memphis, Tennessee, on April
4, 1968, at 6:01 p.m.
### IndependenceDay
### IndependenceDay constant
Independence Day, known colloquially as the Fourth of July, is a federal holiday
in the United States which commemorates the ratification of the Declaration of
Independence by the Second Continental Congress on July 4, 1776, establishing
the United States of America.
## Computing-related constants
## Computing constants
### No constant
@ -4997,6 +4997,12 @@ relative to the loads.
* Internal bending moment is positive counterclockwise on the left-hand part.
* Shear force is positive downward on the left-hand part.
### Elastic Buckling
These equations apply to a slender column (`K·L/r>100`) with length factor `K`.
![Elastic Buckling](img/ElasticBuckling.bmp)
## Electricity

View file

@ -276,7 +276,7 @@ static const cstring basic_constants[] =
// ------------------------------------------------------------------------
// MATH CONSTANTS MENU
// ------------------------------------------------------------------------
"Math", nullptr,
"Mathematics", nullptr,
"π", "3.14159", // Evaluated specially (decimal-pi.h)
"e", "2.71828", // Evaluated specially (decimal-e.h)
@ -289,7 +289,7 @@ static const cstring basic_constants[] =
// Chemistry
// ------------------------------------------------------------------------
"Chem", nullptr,
"Chemistry", nullptr,
"NA", "6.0221367E23_mol⁻¹", // Avogradro's number
"k", "1.380658E-23_J/K", // Boltzmann
@ -303,7 +303,7 @@ static const cstring basic_constants[] =
// Physics
// ------------------------------------------------------------------------
"Phys", nullptr,
"Physics", nullptr,
"", "0+1", // Imaginary unit in physics
"c", "299792458_m/s", // Speed of light
@ -342,7 +342,7 @@ static const cstring basic_constants[] =
// ------------------------------------------------------------------------
// Computing
// ------------------------------------------------------------------------
"Comp", nullptr,
"Computing", nullptr,
"No", "False", // No value = false
"Yes", "True", // Yes value = true

View file

@ -72,7 +72,6 @@ static const cstring basic_equations[] =
"RelativityMassEnergy", "'(E_J)=(m_kg)*Ⓒc^2'",
"IdealGas", "'(P_Pa)*(V_m^3)=(n_mol)*ⒸR*(T_K)'"
};
// clang-format on
@ -110,8 +109,8 @@ const equation::config equation::equations =
// Define the configuration for the equations
// ----------------------------------------------------------------------------
{
.menu_help = "Equations",
.help = "Equation",
.menu_help = "",
.help = "",
.prefix = L'',
.type = ID_equation,
.first_menu = ID_EquationsMenu00,