Integrating Sage with other IDEs

LaTeXmkIn an earlier post I mentioned that the Kile IDE could be set up so that it could handle the sagetex package easily. By following the instructions posted on this page pressing a single button could compile your document, run Sage on the resulting .sage file, and then finally put the Sage output into the document with one more compilation. It will save the user quite a bit of time if they plan on using sagetex.

But this page makes it clear you can also integrate Sage with other IDEs. The instructions are a little too terse for me so I've added a page to go through the steps. It's posted on the sidebar or you can click here.

LaTeX: Handwriting on Notebook Paper

NBpaperWithHandwritingI mentioned a handwriting font in $latex \LaTeX$ back in this post. Now we'll create a notebook paper background to put our writing on. The notebook paper image can be created by opening Xournal, choosing the type of paper and saving it as a PDF.

XournalPaper

I've chosen the traditional white notebook paper for the background. Of course, Xournal gives you more choices, if you want. Now open the notebook PDF with GIMP and save it as a .jpeg file.

GimpWPbackgroundNow TeXStackExchange can help you use that image as a background of your $latex \LaTeX$ document. Adapting the code gives the image at the top of this post. I've posted the white notebook paper jpeg along with the sample tex file showing how we can adjust the fontsize to get the handwriting to stay on the lines. They are located on the Handouts page.

Sage Interact: L-systems

Lsystem1_4iter

Lindermayer systems, also known as L-systems for short, were designed to describe the growth of plants. They consist of an alphabet, which can vary, an axiom (representing the starting point), and 1 or more replacement rules. Using the alphabet of symbols

  1. F  from current position, draw a segment of length 1 in direction angle
  2. f  from current position, move length 1 in direction angle
  3. +  from current position, rotate left angle degrees
  4. -  from current position, rotate right angle degrees
  5. [  put the current position on the stack
  6. ]  make the current position the last position on the stack

you start with a string of symbols (the axiom), a specified number of iterations and some replacement rules. Each iteration will replace F and/or f with another string of letters.(eg F-> F++fF). I've put together a Sage Interact manipulative, posted on the Python/Sage page which will show the result of following the rules of the L-system.

LsystemInteractI've also added a new page on L-systems which will give some examples. L-systems illustrate a teaching point: Repeating simple rules can create complicated structures.

How do I...create a multicolumn document?

MultiColmnI've added another page to the "How Do I...?" section of the LaTeX page. It's on creating multicolumn documents. As always, $latex \LaTeX$ has multiple was to do the same thing. I'm using the multicol package. As the link indicates, this "...de­fines a mul­ti­cols en­vi­ron­ment which type­sets text in mul­ti­ple columns (up to a max­i­mum of 10).... The pack­age en­ables you to switch be­tween any (per­mit­ted) num­ber of columns at will...". You can find the link on the sidebar or you can click here to view the page.

Sage Essentials: Saving anaglyph output

anaglyphFinalThe picture above is a 3-D anaglyph created by Sage; all you need are the 3-D glasses to enjoy it. Unfortunately, saving the output is trickier than it should be. You'll need to have a Sage notebook which you can get, for example, by installing Sage onto your computer (rather than using a Sage Cell Server) or opening a Sage Notebook account here. Installing Sage onto your computer is preferable as the notebook account is not as reliable.

I've added a new page called Sage Essentials which will take you through the steps. It already has some other information on it (migrated from this post); look at the bottom of the page for saving anaglyph output.