You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[hidelinks]{hyperref}
\ifTUTeX%%% xelatex and lualatex produce PDF only\newcommand{\nonnegativeNat}{\href{http://en.wikipedia.org/wiki/Natural_number}{\mathbb{N}}}
\else\ifpdf%%% for pdflatex\newcommand{\nonnegativeNat}{\href{http://en.wikipedia.org/wiki/Natural_number}{\mathbb{N}}}
\else%%% for latex\newcommand{\nonnegativeNat}{%\mathchoice%
{\href{http://en.wikipedia.org/wiki/Natural_number}{\mathbb{N}}}%
{\href{http://en.wikipedia.org/wiki/Natural_number}{\mathbb{N}}}%
{\text{$\href{http://en.wikipedia.org/wiki/Natural_number}{\mathbb{N}}$}}%
{\text{$\href{http://en.wikipedia.org/wiki/Natural_number}{\mathbb{N}}$}}%
}
\fi\fi\begin{document}
\[\nonnegativeNat^{\nonnegativeNat^{\nonnegativeNat}}\]\end{document}
This luckily yields smaller sizes in superscripts and supersuperscripts in DVI and Postscript:
Is there any problem with this solution (except the blue color and the underlining, as this would be a different issue)? If so, what is it? If there's no problem, is {\text{$\href{http://en.wikipedia.org/wiki/Natural_number}{\mathbb{N}}$}} somehow simplifiable (I believe it does more than we need to)? For example,
\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[hidelinks]{hyperref}
\ifTUTeX%%% xelatex and lualatex produce PDF only\newcommand{\nonnegativeNat}{\href{http://en.wikipedia.org/wiki/Natural_number}{\mathbb{N}}}
\else\ifpdf%%% for pdflatex\newcommand{\nonnegativeNat}{\href{http://en.wikipedia.org/wiki/Natural_number}{\mathbb{N}}}
\else%%% for latex\newcommand{\nonnegativeNat}{%\mathchoice%
{\href{http://en.wikipedia.org/wiki/Natural_number}{\displaystyle\mathbb{N}}}%
{\href{http://en.wikipedia.org/wiki/Natural_number}{\textstyle\mathbb{N}}}%
{\href{http://en.wikipedia.org/wiki/Natural_number}{\scriptstyle\mathbb{N}}}%
{\href{http://en.wikipedia.org/wiki/Natural_number}{\scriptscriptstyle\mathbb{N}}}%
}
\fi\fi\begin{document}
\[\nonnegativeNat^{\nonnegativeNat^{\nonnegativeNat}}\]\end{document}
seems to produce the same (visually correct) sizes in the output.
Or does hyperref have a command doing the whole thing for us already? We really don't wish to reinvent the wheel.
The text was updated successfully, but these errors were encountered:
Feeding
to
latex
followed bydvips
yields normal-size superscripts and supersuperscripts in DVI and Postscripts:This is bad. Following https://tex.stackexchange.com/questions/399705/gls-in-the-subscript-has-too-normal-size#comment994726_399705 , we insert
\text{$…$}
for the first-order and second-order scripts on thelatex
-dvips
route and leave the command as it is for all the other cases:This luckily yields smaller sizes in superscripts and supersuperscripts in DVI and Postscript:
Is there any problem with this solution (except the blue color and the underlining, as this would be a different issue)? If so, what is it? If there's no problem, is
{\text{$\href{http://en.wikipedia.org/wiki/Natural_number}{\mathbb{N}}$}}
somehow simplifiable (I believe it does more than we need to)? For example,seems to produce the same (visually correct) sizes in the output.
Or does
hyperref
have a command doing the whole thing for us already? We really don't wish to reinvent the wheel.The text was updated successfully, but these errors were encountered: