Skip to content

Tables

There are two different formats of output tables that can be produced:

  • LaTeX (always comes with "References.bib" for citations)

  • Markdown

Producing output table

ParameterTable() is used to produce an output table of all the material parameters in your phase(s) in LaTeX or Markdown format. All you need is a dimensional phase as defined in section 2. Material Parameters in the README.md of GeoParams. This phase should be given to ParameterTable as first argument. There are optional arguments which can be given in ParameterTable. Those are format, filename and rdigits. The format keyword determines whether your table should be in LaTeX or Markdown format (should be given as string). filename determines the name of the file but can also be used to save the file in a different directory other than the GeoParams package directory (should be given as string, note: no file endings needed since they will be determined by the format keyword!). rdigits gives the numbers of decimals to which all parameter values will be rounded (should be given as integer).

Example 1:

julia
julia> MatParam = SetMaterialParams(Name="Viscous Matrix", Phase=1,
                                    Density   = ConstantDensity(),
                                    CreepLaws = LinearViscous=1e23Pa*s));

julia> ParameterTable(MatParam, format="tex", filename="ParameterTable", rdigits=4)
[ Info: Created ParameterTable.tex and References.bib files.

Example 2:

julia
julia> ParameterTable(MatParam, format="md", filename="ParameterTable", rdigits=4)
[ Info: Created ParameterTable.md file.

GeoParams.Tables.ParameterTable Function
julia
ParameterTable(phases; filename="ParameterTable", format="latex", rdigits=4)

Creates a table with all parameters from the material phases. Supports both LaTeX and Markdown formats.

Arguments

  • phases: Material parameter phases (single phase or tuple of phases)

  • filename: Output filename (without extension)

  • format: Output format ("latex"/"tex" or "markdown"/"md")

  • rdigits: Number of decimal places for rounding

Examples

julia
# LaTeX table
ParameterTable(MatParam; format="latex", filename="MyTable")

# Markdown table
ParameterTable(MatParam; format="markdown", filename="MyTable")
source
GeoParams.Tables.extract_parameters_from_phases Function
julia
extract_parameters_from_phases(phases)

Extract all parameters from material phases into dictionaries for LaTeX table generation. Returns (parameters_dict, references_dict).

This function processes material phase definitions and extracts all parameter values, symbols, and metadata needed to generate parameter tables. It handles nested composite rheologies and parallel combinations recursively.

Arguments

  • phases: Single phase or tuple of material phase definitions

Returns

  • parameters_dict: Dictionary with parameter data for table generation

  • references_dict: Dictionary with bibliographic references

Example

julia
params, refs = extract_parameters_from_phases(my_phases)
source
GeoParams.Tables.extract_parameters_from_phases_md Function
julia
extract_parameters_from_phases_md(phases) -> Dict

Extract all parameters from material phases into dictionary for Markdown table generation. Returns parameters dictionary suitable for markdown output.

This function is similar to extract_parameters_from_phases() but preserves Unicode symbols instead of converting them to LaTeX format, making it suitable for Markdown table generation.

Arguments

  • phases: Single phase or tuple of material phase definitions

Returns

  • parameters_dict: Dictionary with parameter data for Markdown table generation

Example

julia
params = extract_parameters_from_phases_md(my_phases)
source
GeoParams.Tables.Dict2LatexTable Function
julia
Dict2LatexTable(d::Dict, refs::Dict; filename="ParameterTable", rdigits=4)

Creates a LaTeX table from the parameter dictionary.

source
GeoParams.Tables.Dict2MarkdownTable Function
julia
Dict2MarkdownTable(d::Dict; filename="ParameterTable", rdigits=4)

Creates a Markdown table from the parameter dictionary.

source
GeoParams.Tables.detachFloatfromExponent Function
julia
detachFloatfromExponent(str::String) -> (Int, String, String)

Returns the number of decimal places, the number without exponent, and the exponent. Returns "1" for the exponent if the input number has no exponent.

source