diff --git a/Doc/perl/ltxmarkup.perl b/Doc/perl/ltxmarkup.perl
index 92667e44960..07e93cafdde 100644
--- a/Doc/perl/ltxmarkup.perl
+++ b/Doc/perl/ltxmarkup.perl
@@ -45,7 +45,7 @@ sub do_env_macrodesc{
my $params = ltx_process_params(ltx_next_argument());
return "\n
"
. "\n- \$macro"
- . "\n $params"
+ . "\n $params"
. "\n
- "
. $_
. "
";
@@ -56,8 +56,8 @@ sub do_env_envdesc{
my $env = ltx_next_argument();
my $params = ltx_process_params(ltx_next_argument());
return "\n"
- . "\n- \$env"
- . "\n $params"
+ . "\n
- \begin{$env}"
+ . "\n $params"
. "\n
- "
. $_
. "
";