File: subsup.tex

package info (click to toggle)
latex2rtf 2.3.18a-5
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,392 kB
  • sloc: ansic: 20,424; makefile: 660; sh: 478; perl: 22
file content (34 lines) | stat: -rwxr-xr-x 983 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
\documentclass{article}

\newif\iflatextortf
\latextortffalse  %ignored by latex2rtf

\iflatextortf
\else
\makeatletter
\DeclareRobustCommand*\textsubscript[1]{%
 \@textsubscript{\selectfont#1}}
\newcommand{\@textsubscript}[1]{%
 {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
\makeatother
\fi

\begin{document}

This text is nonsense but only written to make the use
of \verb#\textsuperscript{-17}# visible.
Here it comes: 10 to -17 should be 10\textsuperscript{-17}.

And this is what mathmode would display: $10^{-17}$

The same for subscript. \verb#\textsubscript{x}# isn't (yet)
implemented in standard \LaTeX\ or \LaTeXe, but it is easy to
add. The definition in the preamble of this document was
suggested in the newsgroup comp.text.tex and works similar
as \verb#\textsuperscript{x}# which is fully supported part of \LaTeXe.

Does \verb#\textsubscript{8}# work?
Here it is: 10 index 8 should be 10\textsubscript{8}.

And the same in mathmode: $10_{8}$
\end{document}