[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: @dmn in LaTeX
From: |
Gavin D. Smith |
Subject: |
branch master updated: @dmn in LaTeX |
Date: |
Mon, 01 Aug 2022 18:10:34 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 5af1ec65a2 @dmn in LaTeX
5af1ec65a2 is described below
commit 5af1ec65a25a3bd3f6d3cdf4e7496f47b33c7908
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Aug 1 23:10:11 2022 +0100
@dmn in LaTeX
* tp/Texinfo/Convert/LaTeX.pm (_convert): Implement @dmn with
\thinspace, as in texinfo.tex.
---
ChangeLog | 7 +++++++
tp/Texinfo/Convert/LaTeX.pm | 12 +++++++-----
tp/tests/layout/res_parser/formatting_latex/formatting.tex | 10 +++++-----
3 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dabbdd4ddf..7395619849 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-08-01 Gavin Smith <gavinsmith0123@gmail.com>
+
+ @dmn in LaTeX
+
+ * tp/Texinfo/Convert/LaTeX.pm (_convert): Implement @dmn with
+ \thinspace, as in texinfo.tex.
+
2022-07-31 Patrice Dumas <pertusus@free.fr>
Handle txidefnamenospace/omit_def_name_space in HTML
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index ca38b8668f..5cd022ea40 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -70,8 +70,6 @@
#
# Should @tie be expanded to ~?
#
-# @dmn is not implemented
-#
# LaTeX seems to always break at -, and never at _. If @allowcodebreaks
# is true \_ should be set to be a possible break point. Seems that it
# may be done with something like:
@@ -649,9 +647,8 @@ register_style_format_command($code_text_context, 'cite',
'\\normalfont{}\\textsl', \%LaTeX_style_brace_commands,
\%style_brace_format_command_new_commands);
-# FIXME dmn, headitemfont
-my @asis_commands = ('asis', 'clicksequence',
- 'headitemfont', 'dmn');
+# FIXME headitemfont
+my @asis_commands = ('asis', 'clicksequence', 'headitemfont');
foreach my $asis_command (@asis_commands) {
$LaTeX_style_brace_commands{'text'}->{$asis_command} = '';
@@ -2470,6 +2467,11 @@ sub _convert($$)
}
$result = _restart_embrac_if_needed($self, $result, $did_stop_embrac);
return $result;
+ } elsif ($cmdname eq 'dmn') {
+ $result .= '\\thinspace ';
+ if ($element->{'args'}) {
+ $result .= _convert($self, $element->{'args'}->[0]);
+ }
} elsif ($cmdname eq 'kbd') {
# 'kbd' is special, distinct font is typewriter + slanted
# @kbdinputstyle
diff --git a/tp/tests/layout/res_parser/formatting_latex/formatting.tex
b/tp/tests/layout/res_parser/formatting_latex/formatting.tex
index 3aa57c0e8f..dff66192cb 100644
--- a/tp/tests/layout/res_parser/formatting_latex/formatting.tex
+++ b/tp/tests/layout/res_parser/formatting_latex/formatting.tex
@@ -247,7 +247,7 @@ but , ,\@
\texttt{@code\{{-}{-}a\}} \texttt{{-}{-}a}
\texttt{@command\{{-}{-}a\}} \texttt{{-}{-}a}
\texttt{@dfn\{{-}{-}a\}} \textsl{--a}
-\texttt{@dmn\{{-}{-}a\}} --a
+\texttt{@dmn\{{-}{-}a\}} \thinspace --a
\texttt{@email\{{-}{-}a,{-}{-}b\}} \href{mailto:--a}{--b}
\texttt{@email\{,{-}{-}b\}} --b
\texttt{@email\{{-}{-}a\}} \href{mailto:--a}{\nolinkurl{--a}}
@@ -1578,7 +1578,7 @@ but , ,\@
\texttt{@code\{{-}{-}a\}} \texttt{{-}{-}a}
\texttt{@command\{{-}{-}a\}} \texttt{{-}{-}a}
\texttt{@dfn\{{-}{-}a\}} \textsl{--a}
-\texttt{@dmn\{{-}{-}a\}} --a
+\texttt{@dmn\{{-}{-}a\}} \thinspace --a
\texttt{@email\{{-}{-}a,{-}{-}b\}} \href{mailto:--a}{--b}
\texttt{@email\{,{-}{-}b\}} --b
\texttt{@email\{{-}{-}a\}} \href{mailto:--a}{\nolinkurl{--a}}
@@ -2927,7 +2927,7 @@ but , ,\@
\texttt{@code\{{-}{-}a\}} \texttt{{-}{-}a}
\texttt{@command\{{-}{-}a\}} \texttt{{-}{-}a}
\texttt{@dfn\{{-}{-}a\}} \textsl{--a}
-\texttt{@dmn\{{-}{-}a\}} --a
+\texttt{@dmn\{{-}{-}a\}} \thinspace --a
\texttt{@email\{{-}{-}a,{-}{-}b\}} \href{mailto:--a}{--b}
\texttt{@email\{,{-}{-}b\}} --b
\texttt{@email\{{-}{-}a\}} \href{mailto:--a}{\nolinkurl{--a}}
@@ -4254,7 +4254,7 @@ but , ,\@
\texttt{@code\{{-}{-}a\}} \texttt{{-}{-}a}
\texttt{@command\{{-}{-}a\}} \texttt{{-}{-}a}
\texttt{@dfn\{{-}{-}a\}} \textsl{--a}
-\texttt{@dmn\{{-}{-}a\}} --a
+\texttt{@dmn\{{-}{-}a\}} \thinspace --a
\texttt{@email\{{-}{-}a,{-}{-}b\}} \href{mailto:--a}{--b}
\texttt{@email\{,{-}{-}b\}} --b
\texttt{@email\{{-}{-}a\}} \href{mailto:--a}{\nolinkurl{--a}}
@@ -5582,7 +5582,7 @@ but , ,\@
\texttt{@code\{{-}{-}a\}} \texttt{{-}{-}a}
\texttt{@command\{{-}{-}a\}} \texttt{{-}{-}a}
\texttt{@dfn\{{-}{-}a\}} \textsl{{-}{-}a}
-\texttt{@dmn\{{-}{-}a\}} {-}{-}a
+\texttt{@dmn\{{-}{-}a\}} \thinspace {-}{-}a
\texttt{@email\{{-}{-}a,{-}{-}b\}} \href{mailto:--a}{{-}{-}b}
\texttt{@email\{,{-}{-}b\}} {-}{-}b
\texttt{@email\{{-}{-}a\}} \href{mailto:--a}{\nolinkurl{--a}}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: @dmn in LaTeX,
Gavin D. Smith <=