Menu

#212 LaTeX menu: Curiosities with environments

9.0.3
closed
nobody
None
Bug
AlphaTcl
minor
2019-01-29
2019-01-21
No

Here I report two classes of curiosity. The first relates to the readability of Status Bar messages when certain environment templates are inserted in a LaTeX document. Specifically, when I insert any of the enumerate …, itemize …, description …, thebibliography …, and tabular environments, all of which are essentially lists, the Status Bar has a prompt asking for list length but the text is a very feint grey, which is extremely difficult to read. For all the other environments in the LaTeX>Environments menu the text displayed in the Status Bar is what I would expect: clear, sharp, and dark. It would be great if the nominated environments also produced dark, readable prompts in the Status Bar (when selected).

Further to this, without having any deep insight into how it works, many environments are set using a generic call to ‘TeX::wrapEnvironment’, circa line 525 of latexEngine.tcl. There the Status Bar prompt is created using a ‘set msgText’ command. Lists, on the other hand, seem to be built using the TeX::BuildListBody proc (latexEnvironments.tcl circa line 308). Here Status Bar messages are created using either a prompt::simple command or a prompt::var command (in the case of the TeX::thebibliography proc, circa line 969 of latexEnvironments.tcl). That said, the boxes use the prompt::simple command and they work fine. That is as much sleuthing as it seems sensible for me to embark on. I hope that it is helpful.

The scond curiosity relates to the <insert figure="" environment="">. To see this, select LaTeX>Environments>figure. This throws a dialog box with the invitation to “Choose a macro:”, with includegraphics highlighted as the default. Now select the Cancel button. What I get is</insert>

\begin{figure}[tbp]
\centering
\cancelled{}
\caption{}
\label{fig:}
\end{figure}

With \cancelled{} in place of \includegraphics{} (which is what I would get if had selected OK instead). This is clearly a bug of some description, whereas the other is merely irritating and at most an RFE.

Cheers, Chris.

Discussion

  • Bernard Desgraupes

    I've fixed the second part of this ticket. Changes committed to the repository (rev. 1628 (sourceforge.net)).
    I'll look into the first part too.

     
  • Bernard Desgraupes

    Hi Chris,
    here are a few remarks concerning the first part of this ticket.
    When you try to insert an environment such as itemize, the Status Bar displays an input text field where you can set the number of items. The text you see in gray is a placeholder: it disappears as soon as you start typing in the text field. This is a Cocoa feature: all placeholder strings are displayed in a lighter shade in order to avoid confusion with the actual text.
    In theory, I could force Cocoa to use a different color for the placeholder strings but in any case this must be something different from the color used for the actual string value. I'd rather not.
    Another point (which you probably already know) is that you can have Alpha use a dialog instead of the status bar input field. There is global preference for this called Use Status Bar For Prompts. It is found in Alpha ↣ Preferences ↣ Global Preferences ↣ Window.

     
    • Chris Skeels

      Chris Skeels - 2019-01-22

      Hi Bernard,

      Fair enough. The fact that I find the colour of the prompts (or placeholders) so light that they are difficult to read against the white background of the status bar perhaps says more about my eyesight than anything else. Thanks for the feedback.

      Cheers, Chris.

       
  • Bernard Desgraupes

    • status: open --> fixed
     
  • Chris Skeels

    Chris Skeels - 2019-01-29

    Hi Bernard,

    This should be closed now. Thanks for the fix.

    Cheers, Chris.

     
  • Bernard Desgraupes

    • status: fixed --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB