Skip to content

Commit

Permalink
update for math enhancements in R 4.2.x
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84741 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
smeyer committed Jul 23, 2023
1 parent 15a721f commit c09ad86
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions doc/manual/R-exts.texi
Original file line number Diff line number Diff line change
Expand Up @@ -7848,8 +7848,9 @@ Packages referred to by these `other forms' should be declared in the
@findex \deqn

Mathematical formulae should be set beautifully for printed
documentation yet we still want something useful for text and @HTML{}
online help. To this end, the two commands
documentation and in KaTeX/MathJax-enhanced @HTML{} help (as from
@R{} 4.2.0) yet we still want something useful for plain-text (and
legacy @HTML{}) help. To this end, the two commands
@code{\eqn@{@var{latex}@}@{@var{ascii}@}} and
@code{\deqn@{@var{latex}@}@{@var{ascii}@}} are used. Whereas @code{\eqn}
is used for ``inline'' formulae (corresponding to @TeX{}'s
Expand All @@ -7873,19 +7874,19 @@ The following example is from @file{Poisson.Rd}:
@end example

@iftex
For the @LaTeX{} manual, this becomes
For the @LaTeX{} manual and in enhanced @HTML{} help, this becomes
@c: this is TeXinfo markup, not the result of the conversions.
@quotation
@cartouche
@tex
$$ p(x) = \lambda^x\ {e^{-\lambda} \over x!} $$
$$ p(x) = {\lambda^x e^{-\lambda} \over x!} $$
for $x = 0, 1, 2, \ldots$.
@end tex
@end cartouche
@end quotation
@end iftex

For text on-line help we get
In plain-text help we get

@quotation
@cartouche
Expand All @@ -7897,12 +7898,13 @@ for x = 0, 1, 2, ....
@end cartouche
@end quotation

Greek letters (both cases) will be rendered in @HTML{} if preceded by a
In legacy @HTML{} help, Greek letters (both cases) will be rendered if preceded by a
backslash, @code{\dots} and @code{\ldots} will be rendered as ellipses
and @code{\sqrt}, @code{\ge} and @code{\le} as mathematical symbols.

Note that only basic @LaTeX{} can be used, there being no provision to
specify @LaTeX{} style files such as the AMS extensions.
specify @LaTeX{} style files, but AMS extensions are supported
as from @R{} 4.2.2.

@node Figures, Insertions, Mathematics, Writing R documentation files
@section Figures
Expand Down

0 comments on commit c09ad86

Please sign in to comment.