Message Boards Message Boards

4
|
22861 Views
|
11 Replies
|
15 Total Likes
View groups...
Share
Share this post:

Best practices for Wolfram technologies authors

As part of my role at Wolfram, I field a lot of questions about publishing guidelines and best practices. Since each author’s project is unique, the answers tend to start with “It depends,” and often involve sharing similar examples. So this post is intended to kindle a conversation between authors who have used or are interested in using Wolfram technologies in their books.

To our veteran authors and readers, please share what formatting approaches you try to emulate or think are well produced, or what specific Wolfram technology-based books you think best demonstrate good content presentation style.

If you have worked on print or e-publications, what methods for incorporating Wolfram technologies have you found to be most effective?

We hope to see this become a productive and engaging discussion in which Wolfram folk will participate as much as possible, particularly to answer questions and provide advice and resources as needed.

11 Replies

Hello everyone, since so many of you have reached out to me asking for the publishing guidelines for Wolfram Language and Mathematica I'm just going to post them here for your convenience.

For Wolfram Mathematica and the Wolfram Language: Use of the Mathematica name should be accompanied by the appropriate copyright indicators outlined below. If there is intent or interest in using the Mathematica spikey, other logo elements, or screenshots, then we do usually request to see a sample artwork proof and how it will be displayed, to ensure that it is consistent with our policies. If the spikey or other logo is used, they may also need to be added to the copyright statement on the inside copyright page. Specifically:

1) When present on the book cover (and at any first usage in the text inside the book), Mathematica should be cited by its full product name of "Wolfram Mathematica", and given the registered trademark symbol.

2)When writing a book that incorporates Wolfram Mathematica, Mathematica refers to the product, program or application but when referring to the language and/or code, function name, or other programming-based features the term Wolfram Language should be used.

3) Mathematica and Wolfram Mathematica are registered trademarks of Wolfram Research, Inc., and Wolfram Language is a trademark of Wolfram Research, Inc. This should be indicated in a copyright statement to be included on the copyright page of the book frontmatter. The simplest acceptable wording would be the following: "Wolfram Mathematica(R) is registered trademark of Wolfram Research, Inc."

4) The Mathematica Spikey logo is a registered trademark of Wolfram Research, Inc.

5) The Mathematica software design, "look and feel", display, and other graphic elements are copyright Wolfram Research, Inc. (for books with Mathematica screenshot images and/or trials included)

Hi Michael,

Were you wanting the TraditionalForm look with limits above and below the summation, but as an inline cell? In that case, you will need to specify the cell option UnderoverscriptBoxOptions -> {LimitsPositioning -> False}. However, the problem you'll by maintaining top/bottom instead of side limits that align top and bottom is the disproportionately large LineSpacing above and below that line of text. Here is an example:

CellPrint@ Cell[TextData[{"Here is an inline TraditionalForm expression, ", ToBoxes[ExpressionCell[ TraditionalForm[ RawBoxes@ TagBox[RowBox[{UnderoverscriptBox["[Sum]", RowBox[{"i", "=", "1"}], "n"], "f"}], HoldForm]], UnderoverscriptBoxOptions -> {LimitsPositioning -> False}, StripOnInput -> True]], ". After the sum there is a line break."}], "Text"]

enter image description here

POSTED BY: Larry Adelston

I didn't know about the limit position option. Much appreciated.

POSTED BY: Michael McCain
Posted 9 years ago

Hi Michael,

an idea that may be sufficient is to select the inline cell, then Cell > Convert To > StandardForm Display / TraditionalForm Display. As far as I can tell it is still not exactly the looks of an Output cell, but maybe closer to what you would like to see. A drastic approach would be to simply rasterize the output into an image, then put the image in place:

Defer@Sum[f, {i, 1, n}] // TraditionalForm // Rasterize[#, ImageSize -> 200] &

Of course a lot of fiddling around with the size of the image may then be necessary, and it probably does not react well to any change in magnification.

Hope this can help, Peter

POSTED BY: Peter Fleck

I have a very particular formatting question for any formatting gurus out there. I really like the format of the output cell in this screen shot below. The clean summation symbol is what you would see in a textbook and i, n and f are in script notation with the proper spacing everywhere.

enter image description here

I am having problems getting this exact format to appear in an inline cell inside of a text cell. I have tried numerous combinations and settings in the Options Inspector and still can't seem to make it work. I have also tried using boxes. I can get close. I can get the summation limits above and below the summation symbol somtimes, but I cannot get the exactly what you see above. The summation symbol is never exactly the same and the spacing is always off. The bulk of my content is in text cells except for title and section cells that are used for headings.

When writing in these text cells I occasionally need to include a summation symbol in the middle of a bunch of text rather than a new line. So I've tried inserting an inline cell inside the text cell. I believe this is my best bet but can't seem to make it work perfectly. I cannot get the exactly what you see above. The summation symbol is never exactly the same. It's either too thin or doesn't have the same sharp corners and thickness throughout the symbol. In addition, I cannot get the i,n and f to appear in script format or get the spacing just right. I'm looking to reproduce the output of exactly what you see above in an inline cell.

A little background... I am writing lectures for my Calculus class. I would like this notebook to look as textbook-like as possible. Again... The bulk of my content is in text cells. When writing in a text cell I occasionally need to include a summation symbol in the middle of a bunch of text. So I've tried inserting an inline cell inside the text cell. I believe this is my best bet but can't seem to make it work perfectly.

Any ideas?

POSTED BY: Michael McCain

Hi Michael,

Assuming you have constructed your formula using the shortcuts for UnderoverscriptBox (ctrl+7, then ctrl+5), the specific options you will want to set per your needs are:

ScriptLevel->0, FontFamily->"Times"

You can do this in an embedded stylesheet with a custom definition for the "InlineCell" style, or these settings can be applied directly to the inline cell (via the option inspector for the ScriptLevel setting, and the font menu for setting Times).

We have been using a sans serif font for text since Version 9, and inline formulas inherit that same font. To avoid that, you need to specify a font you prefer, which I believe would be Times in your case. You could also set all of your text to Times. This is all best to do in the stylesheet. For complete details on stylesheet editing, please refer to the following documentation online (or in-product):

Working with Stylesheets

AK

POSTED BY: Andre Kuzniarek

That did it! Wow... I was way overthinking this. And thanks for the tip... I will build the font into my stylesheet.

POSTED BY: Michael McCain

Well, I am one of those involved with print media (yes, there are still a few of us left). I have been involved in numerious book projects over the past two decades as an author, co-author, page designer, and compositor. In the early 1990s I started with TeX, using Mathematica as my development environment and either writing directly in LaTeX or converting my notebooks to .tex files. Sometime after the release of Mathematica 3 (1996) though, I switched to using Mathematica to output files that could be sent directly to a production printing device. And I continue to use Mathematica for these tasks, including my current book projects, one of which I hope will be out later this year.

Primarily I now create stylesheets to my own or to other's design and output to PDF as per my publisher's specs. Mostly, the process runs smoothly and I have been able to send my PDF to my publisher with very little if any modification. But of course every system has issues and Mathematica is no exception. Although I have implemented lots of tools and tricks over the years to help me author books and papers, I am always running into things here and there that I just don't know how to do or that are lacking in Mathematica. This is where I think this group can be a great help. People who have experience with various aspects of authoring and publishing are the ones that I have been able to get help from over the years. And conversely, I have fielded lots of questions from others who had questions that I have been able to answer. So I am very encouraged that this forum can be so useful for all of us.

There are some common threads that anyone who has used Mathematica to author or publish will recognize. I list a few here to get some discussion going:

  • creating and using running heads
  • setting up auto-numbering of chapters, sections, exercises
  • creating table of contents, indexes, bibliographies: creation and integration with project
  • use of non-standard fonts (OpenType, e.g.)
  • issues related to PDF or PostScript creation suitable for publishing
  • creation and inclusion of figures and tables;
  • electronic versions of notebooks? CDF, PDF, XML,...
  • source/version control

I am happy to share my experiences in these and related tasks with anyone here. I certainly don't profess to have the answers to all of these things. In fact, I have lots of questions myself that I hope some of you can answer! I'll start posting those over the next few days.

POSTED BY: Paul Wellin

Hi Paul,

I have a formatting question. I have created some authoring tools for myself for lectures. I have created code following in the footsteps of Eric Schulz in this video here. It's taken be awhile to work through it, but I now have most of the tools I need to create my lectures and modify the format using a stylesheet in an effective and efficient way.

However, I do have a question regarding auto numbering. I've managed to create a palette that prints out '"Example" + (number)'. It works perfectly. Here it is...

ActionMenu["Boxes", {
  "Example" :> {SelectionMove[InputNotebook[], After, Cell],
    NotebookWrite[InputNotebook[],
     Cell[
      TextData[{StyleBox["Example ", "ExampleFont"], 
        StyleBox[CounterBox["ItemNumbered"], "ExampleFont"], "\t", 
        StyleBox["Title", FontWeight -> "Bold"], "\nContent"}], 
      "Example"], After],
    SelectionMove[InputNotebook[], Previous, Cell],
    SelectionMove[InputNotebook[], Before, CellContents],
    SelectionMove[InputNotebook[], Next, Word, 2],
    SelectionMove[InputNotebook[], All, Word]}}, 
 ImageSize -> Full]

It uses the numbering I created in my stylesheet. My only concern is that if I change my palette code above to something else like "Example" + (number)+ (some text)' then I'll have to go back and change every notebook to include the extra 'some text'. In other words I have to decide right now what all of my Example cells are going to look like. I'm wondering if there is a way to create a stylesheet that includes the text '"Example" + (number)'. Then if I wanted to make changes later on down the road I can just change this part of the stylesheet. In other words... can stylesheets be used to include actual text as well as styles?

I hope I made this clear. I am a fairly new, so I apologize if this is a dumb question. I do learn quick though. : )

Mike

Btw... I am very much enjoying your book Paul. I was the one that spoke with you about using 10.1 with your Mathematica book. You very quickly updated your resources to your book to include compatibility with 10.1. Thank you!

POSTED BY: Michael McCain

Hi Michael, If what you are trying to do involves creating a cell with a label at the beginning, this can be done with CellFrameLabels in your stylesheet. Let me try to distill things down to a relatively basic example.

In your stylesheet, start by creating a new cell style, say "ExampleItem". Once done, whenever you create a new cell with this style, it will start with the text "Example XX" where "XX" is an autonumbered integer and the text "Example" cannot be directly edited in your notebook (but can be changed in your stylesheet if you decide to change it to "Key Examples" or some such.

Here is a new definition for this style; it goes in your stylesheet:

Cell[StyleData["ExampleItem"],
 CellFrameLabels->{{
    Cell[
     TextData[{
       StyleBox["Example ", FontSlant -> "Italic"], 
       CounterBox["ExampleCounter"], ". "}], CellBaseline -> Baseline], None}, {
   None, None}},
 CounterIncrements->"ExampleCounter"]

Now, in any notebook that points to a stylesheet containing this style definition, you create a new cell with style "ExampleItem" and it will automatically start with this text and auto-numbered counter. If you unformat the cell, it would look like this:

Cell["", "ExampleItem"]

When you format the cell (Cell > Show Expression) you will see "Example 1. " with what you see coming entirely from your stylesheet definition. If you were to change the stylesheet definition to the following say,

Cell[StyleData["ExampleItem"],
 CellFrameLabels->{{
    Cell[
     TextData[{
       StyleBox["Key Example ", FontSlant -> "Italic"], 
       CounterBox["Chapter"], ".", 
       CounterBox["ExampleCounter"]}], CellBaseline -> Baseline], None}, {
   None, None}},
 CounterIncrements->"ExampleCounter"]

then you would have your displayed cell look like

Key Example X.Y

where "X" is now the Chapter counter (if you were using one) and "Y" is your ExampleCounter.

This works well for cells that start with an auto-numbered label like "Example X" or "Theorem Y", or "Part Z". It is quite another matter it you want such an expression embedded in the middle of a Text cell say. It is doable but I think quite a bit more involved.

POSTED BY: Paul Wellin

This is exactly what I was looking for. I've been stuck on this for quite some time. I appreciate it. Thank you Paul!

POSTED BY: Michael McCain
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract