latex3 / hyperref

Hypertext support for LaTeX
168 stars 37 forks source link

PDF form parameter 'menulength' does not work #33

Open donovaly opened 7 years ago

donovaly commented 7 years ago

I use hyperref v6.85a and pdfTeX 1.40.17.

In the hyperref manual it is stated that menulength will determine the number of displayed entries in a list. But

\renewcommand*{\DefaultOptionsofPopdownBox}{print, menulength=2} \ChoiceMenu[popdown, name=country2, default=Ar]{Country:}{Albania=Al, Armenia=Ar, Azerbaidschan=Az}

shows me all 3 entries instead of the desired 2. I am quite sure that menulength worked in previous versions of hyperref.

u-fischer commented 7 years ago

I don't think that anything has changed here, the code from 2014 looks identical.

The popdown option doesn't do much, it is used only once, and then only if combo is active too. menulength seems to be used only if the menu is of type list (that is if combo is not active):


\documentclass{article}
\usepackage{xcolor}
\usepackage{hyperref}

\begin{document}
\begin{Form}

\renewcommand*{\DefaultOptionsofComboBox}{print, color=blue}

\renewcommand*{\DefaultOptionsofPopdownBox}{print, color=red}

\renewcommand*{\DefaultOptionsofListBox}{print, color=green, menulength=2}

\ChoiceMenu[combo, name=country1, default=Ar]
  {Country:}{Albania=Al, Armenia=Ar, Azerbaidschan=Az,Germany=de,england=en}
\ChoiceMenu[combo,popdown, name=country2, default=Ar]
  {Country:}{Albania=Al, Armenia=Ar, Azerbaidschan=Az,Germany=de,england=en}
\ChoiceMenu[name=country3, default=Ar]{Country:}
  {Albania=Al, Armenia=Ar, Azerbaidschan=Az,Germany=de,england=en}

\end{Form}
\end{document}
donovaly commented 7 years ago

Thanks Ulrike, but this is my point - the manual lacks information. It took me a lot of time to find out the different cases. Therefore the docs should be updated.