Using KnitML, Part Two: Customizing the Result 
Previously in this series, I showed you how I converted Jenna Wilson's Banff sweater to a KnitML pattern. In this post, I'm going to show you how you can customize the pattern to your preferences.

For those of you reading this post who are not involved with the KnitML Project, I'm asking that you keep an open mind and not judge or dismiss this software based on its current limitations. Please remember that this is beta software, supported and nurtured by the knitting community. Your suggestions for improvement are most welcome (and, in fact, sought after). The software needs to be made better, and only you can make this possible. You can leave a comment on the blog, you can contact me privately (by clicking on the Contact Me link on the sidebar). or you can post a thread on the Ravelry KnitML group. Thanks!

When I open up the KEL editor, notice that there are three different views of the KnitML pattern: Code, XML, and Pattern.


The Code View is where I get to work with and edit the pattern. The XML view shows the pattern in true KnitML format, derived directly from the Code View. If I were to publish this KnitML pattern online, this is the file I would share. The Pattern View shows how the pattern looks using my personal preferences.

The pattern editor ships with a set of sensible defaults for the pattern view. Here is what Banff looks like out-of-the-box:


While this is certainly fine, it's not entirely to my liking. I can open up the Preferences page and make a few changes.


I'm not a huge fan of Arial. Garamond would look much nicer.




To get the pattern to re-render, I must navigate away from the Pattern View (either to the Code or XML View) and then back to the Pattern View. (There will be an easier way to do this in a future release.)

Notice the gauge is expressed as a 4-inch swatch in stockinette stitch.


You may recall that I expressed the gauge like this:
Gauge 'stockinette' {
StitchGauge: 3.5 stitchesPerInch
RowGauge: 5.25 rowsPerInch
}
The Pattern View does the conversion to a square for me. If you don't care for gauges written this way, you can uncheck the "Describe gauge as a square" option in the Preferences page.



We intend to support non-stockinette-based gauges in the future.

If you are familiar with the original pattern from Knitty, you probably know that it did not come with charts. You also may remember that I did not type in anything that looked like a chart when I created the pattern in the Code View.

I can tell the renderer to construct charts from the KnitML pattern. To do this, go to the Preferences page, expand the Rendering option on the left, click on Charts and then check the box labelled "Enable chart creation for instructions." The renderer will make a chart whenever it can.


Here is a part of the pattern that shows charts well:

(The legend has some cleanup work slated for the next release.)

By default, the renderer uses simple text art for its symbols (based on the Unicode character set). Since I have the Aire River Knitting Font installed on my machine, I could use those symbols instead.


If I wanted to manipulate the chart further, I could copy and paste it directly into a spreadsheet.



Note that if you don't use Windows and Excel, it may take a little more work to get it into this form. While the copy/paste with Firefox and OpenOffice does work, the font settings are not preserved. In order to get the Aire River font to look correct, you would have to re-apply that font to the cells of the chart.

Notice that the charts are all right justified with respect to their "no stitch" elements. In a future release, the renderer will be able to infer whether to center, left, or right justify depending on conditions. This will help keep the chart looking more like the finished object. For more complex charts, however, auto-justification may not always be possible. A designer may choose to specify the placement of every "no stitch" element themselves to guarantee their own chart layout.

So how do you write patterns in KnitML which were originally designed as a chart? Right now, the process to convert a chart to KnitML is manual (by writing out the appropriate KEL syntax). This is undeniably awkward. In the future, existing software (such as but not limited to Knit Visualizer) could make this a whole lot easier by creating the KnitML chart instead of you having to do it.

I can also customize the instructions themselves. Here are the defaults for several common decreases:


Suppose I knit in combined style (or left-handed) and prefer all decreases to indicate their lean. I can edit my preferences to display RLD or LLD (right-leaning decrease, left-leaning decrease):


That will end up looking like this:


Suppose French is my native language. I can have the pattern rendered in French using international units:


It will render all of the non-custom instructions in French automatically.


A pattern designer can provide translation files for their customized sections. The Nutkin2 sample demonstrates how to fully internationalize a pattern. Future releases may be able to provide an "auto translate" feature if no translation is found for the given language.

I've touched on the major points of the Pattern Editor. If you have any questions, ideas, or thoughts, please feel free to comment here on the blog, contact me privately, or ask a question on the KnitML Ravelry group or the public Answers forum.

[ add comment ] ( 2 views )   |  [ 0 trackbacks ]   |  permalink  |  related link

<Back | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>