texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Re-add translate_txiinternalvalue_macro.init


From: Patrice Dumas
Subject: branch master updated: Re-add translate_txiinternalvalue_macro.init
Date: Wed, 29 Nov 2023 03:16:54 -0500

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new d4db1576cd Re-add translate_txiinternalvalue_macro.init
d4db1576cd is described below

commit d4db1576cde08bd35f92c83e4ce1033a62b8de42
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Nov 29 09:16:03 2023 +0100

    Re-add translate_txiinternalvalue_macro.init
---
 tp/t/init/translate_txiinternalvalue_macro.init | 30 +++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/tp/t/init/translate_txiinternalvalue_macro.init 
b/tp/t/init/translate_txiinternalvalue_macro.init
new file mode 100644
index 0000000000..8269fd1a7f
--- /dev/null
+++ b/tp/t/init/translate_txiinternalvalue_macro.init
@@ -0,0 +1,30 @@
+
+texinfo_register_command_formatting('sp', \&my_sp_formatting);
+
+sub my_sp_formatting($$$$$)
+{
+  my $self = shift;
+  my $cmdname = shift;
+  my $command = shift;
+  my $args = shift;
+  my $content = shift;
+
+  if (defined($command->{'extra'})
+      and defined($command->{'extra'}->{'misc_args'})
+      and defined($command->{'extra'}->{'misc_args'}->[0])) {
+    my $sp_nr = $command->{'extra'}->{'misc_args'}->[0];
+    my $translated_tree = $self->gdt('@macro txiinternalvalue
+user internalvalue
+@end macro
+{myarg} @TeX{}', {'myarg' => {'contents' => [{'text' => $sp_nr}]}});
+    #print STDERR "T 
".Texinfo::Common::debug_print_tree($translated_tree)."\n";
+    $result = $self->convert_tree($translated_tree);
+    return $result;
+  }
+
+  return &{$self->default_command_conversion($cmdname)}($self,
+        $cmdname, $command, $args, $content);
+}
+
+
+1;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]