Formatting usage messages

前端 未结 4 1769
离开以前
离开以前 2021-02-03 14:04

If you take a look at the Combinatorica package in Mathematica8 in (mathematicapath)/AddOns/LegacyPackages/DiscreteMath/Combinatorica.m you wi

4条回答
  •  终归单人心
    2021-02-03 14:37

    I will answer on how the link in the Message is generated. Tracing Message printing shows a call to undocumented Documentation`CreateMessageLink function which returns the URL to the corresponding Documentation page if this page exists:

    Trace[Information[Sin], Documentation`CreateMessageLink]
    
    In[32]:= Documentation`CreateMessageLink["System", "Sin", "argx", "English"]
    
    Out[32]= "paclet:ref/message/General/argx"
    

    In some cases we can also see calls to Internal`MessageButtonHandler which further calls Documentation`CreateMessageLink:

    Trace[Message[Sin::argx, 1, 1], 
     Internal`MessageButtonHandler | Documentation`CreateMessageLink, 
     TraceInternal -> True]
    

提交回复
热议问题