Difference between revisions of "How to make a MyWay"

From Wiki
Jump to navigation Jump to search
(Details of using mag-01)
 
m (Just a small correction to my previous edit.)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<[[Modules]]|
+
[[This Way - My Way#MyWay|My Way]] is an online publication whose articles are primarily short introductions to specific aspects of ConTeXt. To give My Way articles a consistent look, they are formatted in a specific style that is set up by the {{code|magazine-basic}} module. This style should be used for My Way articles only, since using it for other documents might confuse readers in their expectations.
  
{{note| This is just a copy of [http://www.pragma-ade.com/general/magazines/mag-0000.pdf How to make a MyWay] for the ease of online viewing}}
+
Formatting an article for My Way is simple. Just do three things:
  
[[My Way]] is a ConTeXt related publication, in most cases short introductions to new functionality. The style may be used by users for providing similar documents, but preferably not for other purposes, since it may confuse readers in their expectations.
+
# Use the {{code|magazine-basic}} module (which is included in the ConTeXt distrubtion, so it doesn't need installing).
 +
# Write an abstract and enclose it in {{cmd|startbuffer|[abstract]}} and {{cmd|stopbuffer}}.
 +
# Specify the article's metadata (title, author, affiliation if there is one, and date) as keyword-value options for {{cmd|startdocument}}.
 +
 
 +
With the {{code|magazine-basic}} module, the abstract actually doesn't appear in the article anywhere, but you should still include it since it might be used in some other or later version of the My Way style.
 +
 
 +
Here's a minimal example of a My Way article:
 +
<texcode>
 +
\usemodule[magazine-basic]
 +
 
 +
\startbuffer[abstract]
 +
This is a very abstract abstract.\ldots
 +
\stopbuffer
 +
 
 +
\startdocument[title={Example My Way article}, author={Arthur Author}, affiliation={University of the Round Table}, date={October 20, 2020}]
 +
 
 +
% put the article's text here
 +
\input knuth
 +
 
 +
\stopdocument
 +
</texcode>
 +
By modifying this example, you can easily format your own article for My Way. For more information and inspiration, look through the source code that is shown at the end of recent [[This Way - My Way#ThisWay|This Way]] articles.
 +
 
 +
 
 +
{{note| What follows below is a copy of the original article [http://www.pragma-ade.com/general/magazines/mag-0000.pdf How to make a MyWay] from 2003, so it may be outdated, and the details may no longer be correct.}}
 +
 
 +
[[This Way - My Way#MyWay|My Way]] is a ConTeXt related publication, in most cases short introductions to new functionality. The style may be used by users for providing similar documents, but preferably not for other purposes, since it may confuse readers in their expectations.
  
 
We’ve chosen a layout which is more functional than beautiful. This layout provides several text areas: headers and footers, margins and edges as well as a main text area. The surrounding (gray) makes the main page (which is slightly smaller than A4) stand out and is suitable for viewing in spread mode.
 
We’ve chosen a layout which is more functional than beautiful. This layout provides several text areas: headers and footers, margins and edges as well as a main text area. The surrounding (gray) makes the main page (which is slightly smaller than A4) stand out and is suitable for viewing in spread mode.
Line 37: Line 63:
 
\setups [lastpage] \stoptext
 
\setups [lastpage] \stoptext
 
</texcode>
 
</texcode>
 +
 +
[[Category:Documentation]]

Latest revision as of 16:02, 17 October 2020

My Way is an online publication whose articles are primarily short introductions to specific aspects of ConTeXt. To give My Way articles a consistent look, they are formatted in a specific style that is set up by the magazine-basic module. This style should be used for My Way articles only, since using it for other documents might confuse readers in their expectations.

Formatting an article for My Way is simple. Just do three things:

  1. Use the magazine-basic module (which is included in the ConTeXt distrubtion, so it doesn't need installing).
  2. Write an abstract and enclose it in \startbuffer[abstract] and \stopbuffer.
  3. Specify the article's metadata (title, author, affiliation if there is one, and date) as keyword-value options for \startdocument.

With the magazine-basic module, the abstract actually doesn't appear in the article anywhere, but you should still include it since it might be used in some other or later version of the My Way style.

Here's a minimal example of a My Way article:

\usemodule[magazine-basic]

\startbuffer[abstract]
This is a very abstract abstract.\ldots
\stopbuffer

\startdocument[title={Example My Way article}, author={Arthur Author}, affiliation={University of the Round Table}, date={October 20, 2020}]

% put the article's text here
\input knuth

\stopdocument

By modifying this example, you can easily format your own article for My Way. For more information and inspiration, look through the source code that is shown at the end of recent This Way articles.



NOTE: What follows below is a copy of the original article How to make a MyWay from 2003, so it may be outdated, and the details may no longer be correct.

My Way is a ConTeXt related publication, in most cases short introductions to new functionality. The style may be used by users for providing similar documents, but preferably not for other purposes, since it may confuse readers in their expectations.

We’ve chosen a layout which is more functional than beautiful. This layout provides several text areas: headers and footers, margins and edges as well as a main text area. The surrounding (gray) makes the main page (which is slightly smaller than A4) stand out and is suitable for viewing in spread mode.

The documents produced at Pragma ADE are called ThisWay, user documents gets the title My Way. The Pragma ADE issues are numbered. We strongly advise you not to use the mag- prefix for your issues, since this may lead to clashes with files distributed by Pragma ADE.

A sample MyWay document looks as follows


\usemodule[mag-01]

% Substitute the text between <+...+> 
\setvariables
  [magazine]
  [      title=<+Title of MyWay+>,
        author=<+Name of author+>,
   affiliation=<+Affiliation of author+>,
          date=<+date of publication+>,
  ]

\startbuffer[abstract]
<+Abstract of MyWay+>
\stopbuffer

\setupheadertexts[section] 

\starttext \setups [titlepage] \setups [title]

<+ Write article here +>

\setups [listing] %If you want the source listing of the module to be printed
\setups [lastpage] \stoptext