diff --git a/inst/classdef_texi2html.m b/inst/classdef_texi2html.m
index 49dca69..c12b728 100644
--- a/inst/classdef_texi2html.m
+++ b/inst/classdef_texi2html.m
@@ -97,8 +97,11 @@ function classdef_texi2html (clsname, pkgfcns, info)
## Add try catch to help identify classdef file that caused an issue
## during batch processing all functions in a package with package_texi2html
try
+ ## Get help text from constructor
+ [text, format] = get_help_text (MTDS{1});
+
## Build the HTML code for class constructor
- cls_text = __texi2html__ (MTDS{1}, pkgfcns);
+ cls_text = __texi2html__ (text, MTDS{1}, pkgfcns);
## Find the category the classdef belongs to
fcn_idx = find (strcmp (pkgfcns(:,1), clsname));
@@ -120,7 +123,14 @@ function classdef_texi2html (clsname, pkgfcns, info)
for m = 2:numel (MTDS)
method_name = [clsname "." MTDS{m}];
try
- mtds_text = __texi2html__ (method_name, pkgfcns);
+ ## Use custom get_help_text to get help text from methods contained in
+ ## the classdef file, because core get_help_text returns help text from
+ ## parrent class methods instead of the shadowing methods in the classdef
+ text = get_methods_texinfo (clsname, MTDS{m});
+
+ ## Build the HTML code for class method
+ mtds_text = __texi2html__ (text, method_name, pkgfcns);
+
## Load methods template
mtds_template = fileread (fullfile ("_layouts", "method_template.html"));
mtds_template = strrep (mtds_template, "{{METHOD_NAME}}", MTDS{m});
diff --git a/inst/function_texi2html.m b/inst/function_texi2html.m
index 2573bc1..30f07db 100644
--- a/inst/function_texi2html.m
+++ b/inst/function_texi2html.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2023 Andreas Bertsatos
+## Copyright (C) 2023-2024 Andreas Bertsatos
##
## This file is part of the statistics package for GNU Octave.
##
@@ -90,8 +90,11 @@ function function_texi2html (fcnname, pkgfcns, info)
## Add try catch to help identify function file that caused an issue
## during batch processing all functions in a package with package_texi2html
try
- ## Get HTML code from function's texinfo
- fcn_text = __texi2html__ (fcnname, pkgfcns);
+ ## Get help text from function
+ [text, format] = get_help_text (fcnname);
+
+ ## Build HTML code from function's texinfo
+ fcn_text = __texi2html__ (text, fcnname, pkgfcns);
## Find the function's category
fcn_idx = find (strcmp (pkgfcns(:,1), fcnname));
diff --git a/inst/private/__texi2html__.m b/inst/private/__texi2html__.m
index 5f43e3a..99d9f2c 100644
--- a/inst/private/__texi2html__.m
+++ b/inst/private/__texi2html__.m
@@ -16,16 +16,13 @@
## this program; if not, see .
## -*- texinfo -*-
-## @deftypefn {pkg-octave-doc} {@var{html_txt} =} __texi2html__ (@var{fcnname}, @var{pkgfcns})
+## @deftypefn {pkg-octave-doc} {@var{html_txt} =} __texi2html__ (@var{text}, @var{fcnname}, @var{pkgfcns})
##
## Private function to generate HTML text from texinfo.
##
## @end deftypefn
-function html_txt = __texi2html__ (fcnname, pkgfcns)
-
- ## Get help text
- [text, format] = get_help_text (fcnname);
+function html_txt = __texi2html__ (text, fcnname, pkgfcns)
## Scan text for @tex and @end tex tags and replace their bodies with
## a random string to be replaced later on, since fprintf will not process