Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: proportional vs monospace font in usage text
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
hemmecke

Posts: 15
Registered: 3/11/10
proportional vs monospace font in usage text
Posted: Nov 9, 2011 5:58 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Documenting a function, one uses f::usage = "...".
Unfortunately, doing some ascii arts inside this string like (see end of posting) goes completely wrong when shown in the notebook interface due to usage of proportional font.

I've seen the documentation for Mathematica's builtin QBinomial. While it looks nice in the notebook, in the text interface (math) it shows as

In[1]:= ?QBinomial
QBinomial[n, m, q] gives the q-binomial coefficient (n) .
q
m

which doesn't look perfect, either.

Q1) Is using ascii art a bad idea.
Q2) How can I enter what Mathematica shows for ?QBinomial inside a f::usage string?
Q3) Is it suggested that one should use something like
If[$Notebooks, "notebook format", "ascii format"]
in order to achieve nice output in either format?
Q4) I realized that newlines are handled differently in Mathematica 5.2 and Mathematica 8.
What is the right way to enter line breaks?

Ralf

================
qBinomial::usage = "qBinomial[n, k, q] represents the q-binomial coefficient
of n and k in base q given by

{ n-k+1
{ (q ;q)
_ _ { k
| n | { -----------, for k >= 0,
| | := { (q;q)
|_ k _| { k
q {
{ 0, otherwise.

For a description of (q;q) type '?qPochhammer'.
k"




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.